:root {
  color-scheme: light;
  --bg: #fbf8f1;
  --paper: #fffdf8;
  --paper-soft: #f5efe3;
  --ink: #1d1d1b;
  --muted: #635f57;
  --line: #ded6c8;
  --accent: #bd3527;
  --accent-dark: #92291f;
  --green: #7a9641;
  --blue: #4d7c95;
  --gold: #d17b25;
  --shadow: 0 20px 50px rgba(52, 38, 20, 0.12);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181512;
  --paper: #211d18;
  --paper-soft: #2c261f;
  --ink: #f8f0df;
  --muted: #c6b9a5;
  --line: #453b31;
  --accent: #df5949;
  --accent-dark: #f07662;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.86), transparent 34rem),
    linear-gradient(180deg, var(--bg), var(--paper-soft));
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 28px 54px 22px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  width: fit-content;
}

.brand-name {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.brand-tagline {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.2px;
  line-height: 1.4;
  text-transform: uppercase;
}

.form-status {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 800;
  margin: 0;
}

.form-status.is-error {
  color: var(--accent);
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  font-family: var(--serif);
  font-size: 17px;
}

.primary-nav a {
  position: relative;
  padding: 8px 0;
}

.primary-nav a::after {
  position: absolute;
  right: -24px;
  color: #cbbdae;
  content: "·";
}

.primary-nav a:last-child::after {
  content: "";
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--accent);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.icon-button,
.nav-toggle,
.social-row a {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper-soft) 78%, var(--paper));
  color: var(--ink);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.icon-button:hover,
.nav-toggle:hover,
.social-row a:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--accent);
}

.icon-button svg,
.social-row svg {
  width: 20px;
  height: 20px;
}

.nav-toggle {
  display: none;
  gap: 4px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: currentColor;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 68px;
  align-items: center;
  max-width: 1140px;
  min-height: 540px;
  margin: 0 auto;
  padding: 34px 24px 30px;
}

.hero-copy h1,
.category-hero h1,
.about-intro h1,
.legal-page h1 {
  max-width: 680px;
  margin: 0;
  font-family: var(--serif);
  font-size: 60px;
  font-weight: 700;
  line-height: 1.06;
}

.hero-copy p {
  max-width: 410px;
  margin: 24px 0;
  color: var(--ink);
  font-size: 20px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2.4px;
  line-height: 1.3;
  text-transform: uppercase;
}

.rule {
  display: block;
  width: 52px;
  height: 2px;
  margin: 24px 0 0;
  background: var(--accent);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 5px;
  background: var(--accent);
  color: #fffaf2;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(152, 45, 33, 0.18);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
  background: var(--accent-dark);
  box-shadow: 0 14px 28px rgba(152, 45, 33, 0.22);
}

.hero-media,
.featured-image {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 1.28;
  object-fit: cover;
  object-position: 42% 50%;
}

.category-band,
.article-band {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 66%, transparent);
  padding: 30px 24px 28px;
}

.section-heading {
  max-width: 680px;
  margin: 0 auto 24px;
  text-align: center;
}

.section-heading.align-left {
  max-width: 1140px;
  text-align: left;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.15;
}

.section-heading .rule {
  margin: 14px auto 0;
}

.section-heading.align-left .rule {
  margin-left: 0;
}

.section-heading p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 1140px;
  margin: 0 auto;
}

.category-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(49, 38, 26, 0.04);
}

.category-card img {
  width: 100%;
  height: 184px;
  object-fit: cover;
}

.category-card .card-icon {
  position: absolute;
  top: 152px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 4px solid var(--paper);
  border-radius: 999px;
  color: #fff;
  transform: translateX(-50%);
}

.category-card .card-icon svg {
  width: 29px;
  height: 29px;
}

.accent-red .card-icon {
  background: var(--accent);
}

.accent-green .card-icon {
  background: var(--green);
}

.accent-blue .card-icon {
  background: var(--blue);
}

.accent-gold .card-icon {
  background: var(--gold);
}

.card-body {
  min-height: 230px;
  padding: 52px 26px 26px;
  text-align: center;
}

.card-body h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.15;
}

.card-body p {
  margin: 0;
  color: var(--ink);
}

.card-body a,
.article-card button,
.search-results a {
  display: inline-flex;
  gap: 8px;
  margin-top: 24px;
  color: var(--accent);
  font-weight: 800;
}

.featured-story {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 24px 34px;
}

.featured-image img {
  width: 100%;
  aspect-ratio: 1.9;
  object-fit: cover;
}

.featured-copy {
  padding: 22px 0 22px 4px;
}

.featured-copy h2 {
  max-width: 470px;
  margin: 0;
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1.06;
}

.featured-copy p:not(.eyebrow) {
  max-width: 470px;
  margin: 18px 0 24px;
  color: var(--ink);
  font-size: 18px;
}

.newsletter {
  display: grid;
  grid-template-columns: auto minmax(220px, 0.8fr) minmax(340px, 1.5fr);
  gap: 28px;
  align-items: center;
  padding: 28px max(24px, calc((100vw - 1140px) / 2));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--paper-soft), var(--paper));
}

.newsletter.compact {
  border-bottom: 0;
}

.newsletter-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--accent);
}

.newsletter-icon svg {
  width: 34px;
  height: 34px;
}

.newsletter h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
}

.newsletter p {
  margin: 0;
  color: var(--muted);
}

.newsletter-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
}

.newsletter-form input,
.search-dialog input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 18px;
  outline: none;
}

.newsletter-form input:focus,
.search-dialog input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.site-footer {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 48px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 24px 34px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
}

.footer-columns h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 17px;
}

.footer-columns a {
  display: block;
  margin: 6px 0;
  color: var(--ink);
  font-size: 14px;
}

.footer-columns a:hover {
  color: var(--accent);
}

.social-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 6px;
}

.category-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr);
  gap: 42px;
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
  padding: 44px 24px 34px;
}

.category-hero-text p:not(.eyebrow) {
  max-width: 520px;
  color: var(--muted);
  font-size: 19px;
}

.category-hero-image {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.category-hero-image img {
  width: 100%;
  aspect-ratio: 1.36;
  object-fit: cover;
}

.category-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 510px;
  margin-top: 28px;
}

.category-stats span {
  display: block;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.category-stats strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  max-width: 1140px;
  margin: 0 auto;
}

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 26px;
}

.article-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.16;
}

.article-card p {
  margin: 16px 0 0;
  color: var(--muted);
}

.article-card button {
  align-self: flex-start;
  margin-top: auto;
  border: 0;
  background: transparent;
  padding: 18px 0 0;
  cursor: pointer;
}

.story-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 20, 16, 0.58);
}

.story-modal[hidden] {
  display: none;
}

.story-dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: min(760px, 86vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 34px;
  box-shadow: var(--shadow);
}

.story-dialog h2 {
  margin: 0 48px 16px 0;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.12;
}

.story-dialog p {
  color: var(--muted);
  font-size: 18px;
}

.story-dialog .icon-button {
  position: absolute;
  top: 22px;
  right: 22px;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 42px;
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
  padding: 46px 24px 30px;
}

.about-logo {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 28px;
}

.about-logo img {
  width: 100%;
}

.about-intro p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  font-size: 20px;
}

.prose-page,
.legal-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 34px 24px 50px;
}

.prose-page p,
.prose-page li,
.legal-page p,
.legal-page li {
  color: var(--muted);
  font-size: 18px;
}

.prose-page h2,
.legal-page h2 {
  margin: 34px 0 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 28px;
}

.theme-list {
  display: grid;
  gap: 14px;
  padding-left: 20px;
}

.legal-page {
  padding-top: 54px;
}

.legal-page h1 {
  margin-bottom: 24px;
}

.legal-page a {
  color: var(--accent);
  font-weight: 800;
}

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: start center;
  padding: 86px 24px 24px;
  background: rgba(24, 20, 16, 0.58);
}

.search-panel[hidden] {
  display: none;
}

.search-dialog {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 22px;
  box-shadow: var(--shadow);
}

.search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.search-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
}

.search-results {
  display: grid;
  gap: 12px;
  max-height: 430px;
  overflow: auto;
  margin-top: 18px;
}

.search-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.search-result h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
}

.search-result p {
  margin: 6px 0 0;
  color: var(--muted);
}

.search-result a {
  margin-top: 8px;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 22px 26px;
  }

  .primary-nav {
    position: fixed;
    inset: 89px 18px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    padding: 12px;
    box-shadow: var(--shadow);
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a {
    padding: 14px;
  }

  .primary-nav a::after {
    content: "";
  }

  .nav-toggle {
    display: inline-grid;
  }

  .hero,
  .category-hero,
  .about-hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  .hero-media {
    order: -1;
  }

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

  .featured-story,
  .newsletter,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }

  .site-header {
    padding: 18px;
  }

  .brand-name {
    font-size: 25px;
  }

  .brand-tagline {
    max-width: 185px;
    font-size: 8px;
    letter-spacing: 1.6px;
  }

  .header-actions {
    gap: 7px;
  }

  .header-actions .icon-button {
    display: none;
  }

  .hero-copy h1,
  .category-hero h1,
  .about-intro h1,
  .legal-page h1 {
    font-size: 38px;
  }

  .hero-copy p,
  .category-hero-text p:not(.eyebrow),
  .about-intro p:not(.eyebrow) {
    font-size: 17px;
  }

  .hero,
  .category-hero,
  .about-hero {
    padding-inline: 18px;
  }

  .category-band,
  .article-band {
    padding-inline: 18px;
  }

  .category-grid,
  .article-grid,
  .newsletter-form,
  .category-stats,
  .footer-columns {
    grid-template-columns: 1fr;
  }

  .category-card img {
    height: 210px;
  }

  .category-card .card-icon {
    top: 178px;
  }

  .featured-story {
    padding-inline: 18px;
  }

  .featured-copy h2 {
    font-size: 34px;
  }

  .newsletter {
    padding: 24px 18px;
  }

  .newsletter-form .button {
    width: 100%;
  }

  .site-footer {
    padding-inline: 18px;
  }

  .story-dialog {
    padding: 28px 22px;
  }

  .story-dialog h2 {
    font-size: 30px;
  }
}
