:root {
  --red: #a50d0d;
  --red-dark: #7e0909;
  --ink: #2c2c2c;
  --muted: #737373;
  --line: #dedede;
  --paper: #ffffff;
  --cream: #f5e4c4;
  --bg: #eeeeee;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: #b01212;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1124px, calc(100% - 28px));
  margin: 0 auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-header {
  background: linear-gradient(to top, var(--red-dark), var(--red));
  color: #fff;
  margin-bottom: 20px;
}

.header-top {
  padding: 18px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: #fff;
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand:hover {
  text-decoration: none;
}

.brand span {
  font-size: 32px;
  font-weight: 700;
}

.brand small {
  color: #ffe6d9;
  font-size: 14px;
  margin-top: 4px;
}

.site-search {
  display: flex;
  width: min(360px, 45%);
}

.site-search input,
.site-search button {
  border: 0;
  font: inherit;
}

.site-search input {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
}

.site-search button {
  background: #333;
  color: #fff;
  cursor: pointer;
  padding: 10px 14px;
}

.primary-nav {
  background: rgba(0, 0, 0, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.primary-nav .container {
  display: flex;
  flex-wrap: wrap;
}

.primary-nav a {
  border-right: 1px solid rgba(0, 0, 0, 0.18);
  color: #fff;
  display: block;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 14px;
  text-transform: uppercase;
}

.primary-nav a:first-child {
  border-left: 1px solid rgba(0, 0, 0, 0.18);
}

.primary-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.site-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.site-main,
.widget,
.featured-post,
.section-block,
.article {
  background: var(--paper);
}

.site-main {
  min-width: 0;
}

.home-hero,
.archive-header,
.article-header {
  background: var(--cream);
  padding: 18px;
}

.home-hero h1,
.archive-header h1,
.article-header h1 {
  color: #4e3910;
  line-height: 1.18;
  margin: 0 0 8px;
}

.home-hero h1 {
  font-size: 34px;
}

.home-hero p,
.archive-header p {
  margin: 0;
}

.breadcrumb {
  color: #725d36;
  font-size: 13px;
  margin-bottom: 8px;
}

.eyebrow {
  color: #725d36;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.featured-post,
.section-block {
  border-top: 1px solid var(--line);
  padding: 18px;
}

.featured-post h2 {
  font-size: 28px;
  line-height: 1.2;
  margin: 6px 0 10px;
}

.section-heading {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 8px;
}

.section-heading h2 {
  color: #333;
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.section-link {
  border: 1px solid var(--line);
  display: block;
  min-height: 78px;
  padding: 12px;
}

.section-link strong,
.related-grid strong {
  color: #333;
  display: block;
  line-height: 1.25;
}

.section-link span,
.related-grid span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 6px;
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-links a,
.term-links a,
.read-more {
  background: #444;
  color: #fff;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
}

.page-links a:hover,
.term-links a:hover,
.read-more:hover {
  background: var(--red);
  text-decoration: none;
}

.article-list {
  display: grid;
  gap: 14px;
}

.article-teaser {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.article-teaser:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.article-teaser h2 {
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 6px;
}

.article-teaser h2 a,
.featured-post h2 a {
  color: #333;
}

.article-teaser p,
.featured-post p {
  margin: 0 0 12px;
}

.post-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13px;
  margin-bottom: 10px;
}

.term-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.article-body {
  padding: 18px;
}

.article-body img,
.article-body iframe,
.article-body object,
.article-body embed {
  height: auto;
  max-width: 100%;
}

.article-body h2,
.article-body h3 {
  color: #4e3910;
  line-height: 1.25;
}

.article-body blockquote {
  border-left: 4px solid var(--red);
  margin: 18px 0;
  padding: 10px 16px;
  background: #f7f7f7;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.related-grid a {
  border: 1px solid var(--line);
  display: block;
  padding: 12px;
}

.sidebar {
  display: grid;
  gap: 18px;
}

.widget {
  padding: 14px;
}

.widget h2 {
  background: var(--cream);
  color: #4e3910;
  font-size: 18px;
  line-height: 1.2;
  margin: -14px -14px 12px;
  padding: 10px 14px;
}

.compact-list,
.category-list {
  margin: 0;
  padding-left: 18px;
}

.compact-list li,
.category-list li {
  margin-bottom: 9px;
}

.category-list {
  list-style: none;
  padding-left: 0;
}

.category-list li {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
}

.category-list span {
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  color: var(--muted);
}

.site-footer {
  background: #2e2e2e;
  color: #ccc;
  margin-top: 24px;
  padding: 20px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.site-footer a {
  color: #fff;
}

@media (max-width: 900px) {
  .site-layout {
    grid-template-columns: 1fr;
  }

  .site-search {
    width: min(100%, 360px);
  }

  .section-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .header-inner,
  .section-heading,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .brand span {
    font-size: 27px;
  }

  .site-search {
    width: 100%;
  }

  .primary-nav a {
    flex: 1 1 50%;
    padding: 11px 10px;
  }

  .section-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
}
