:root {
  --ink: #15211f;
  --muted: #53605d;
  --subtle: #f4f7f4;
  --paper: #ffffff;
  --line: #dce5e1;
  --brand: #0f766e;
  --brand-dark: #0b4f4a;
  --accent: #d95f3d;
  --gold: #c48a1c;
  --violet: #635bce;
  --shadow: 0 18px 45px rgba(18, 33, 31, 0.10);
  --radius: 8px;
  --container: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  background: var(--subtle);
}

a {
  color: inherit;
  text-decoration-color: rgba(15, 118, 110, 0.35);
  text-underline-offset: 0.22em;
  transition: color 180ms ease, text-decoration-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

a:hover { color: var(--brand); text-decoration-color: var(--brand); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(217, 95, 61, 0.45);
  outline-offset: 3px;
}

h1, h2, h3 {
  line-height: 1.14;
  margin: 0 0 0.65rem;
  letter-spacing: 0;
}

h1 { font-size: 3rem; max-width: 820px; }
h2 { font-size: 2rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

ul, ol { padding-left: 1.25rem; }

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  background: #fbfcfb;
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.55;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  z-index: 100;
  background: var(--ink);
  color: white;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.93);
  border-bottom: 1px solid rgba(220, 229, 225, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-weight: 900;
  line-height: 1;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  text-decoration: none;
  font-weight: 650;
  color: #2d3936;
  padding: 0.55rem 0.72rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--subtle);
  color: var(--brand-dark);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: white;
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--ink);
  display: block;
}

.hero {
  min-height: 640px;
  position: relative;
  display: grid;
  align-items: center;
  color: white;
  background:
    linear-gradient(90deg, rgba(10, 21, 20, 0.86), rgba(10, 21, 20, 0.44)),
    var(--hero-image) center / cover no-repeat;
}

.hero-content {
  padding: 6rem 0 7rem;
}

.hero h1 {
  font-size: 4.25rem;
  margin-bottom: 1rem;
}

.hero p {
  max-width: 650px;
  font-size: 1.22rem;
}

.hero-kicker,
.section-label,
.eyebrow {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero .hero-kicker { color: #9be2d9; }

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: white;
  border-radius: var(--radius);
  padding: 0.72rem 1rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: white;
  transform: translateY(-1px);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.55);
}

.button-secondary:hover {
  background: white;
  color: var(--brand-dark);
}

.hero-credit {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  font-size: 0.78rem;
  opacity: 0.78;
  max-width: 80%;
}

.section {
  padding: 5rem 0;
}

.section-tight { padding: 3.5rem 0; }
.section-last { padding-bottom: 6rem; }
.alt-band { background: var(--subtle); }

.split-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: start;
}

.split-intro p:last-child {
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading {
  margin-bottom: 1.6rem;
}

.section-heading h2 {
  max-width: 760px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

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

.article-card,
.category-card,
.author-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: clip;
  box-shadow: 0 1px 0 rgba(21, 33, 31, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.article-card:hover,
.category-card:hover,
.author-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(15, 118, 110, 0.28);
}

.card-image-link,
.category-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--subtle);
}

.article-card img,
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, opacity 220ms ease;
}

.article-card:hover img,
.category-card:hover img {
  transform: scale(1.025);
}

.card-body,
.category-card div,
.author-card {
  padding: 1.2rem;
}

.article-card h2,
.category-card h2,
.author-card h2 {
  font-size: 1.25rem;
  margin-top: 0.25rem;
}

.article-card h2 a,
.category-card h2 a,
.author-card h2 a {
  text-decoration: none;
}

.article-card p,
.category-card p,
.author-card p {
  color: var(--muted);
}

.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.card-meta span,
.tag-row span {
  display: inline-flex;
  border: 1px solid var(--line);
  color: #43504d;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: #fbfcfb;
}

.category-grid,
.author-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.category-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: stretch;
}

.category-card-image {
  height: 100%;
  aspect-ratio: auto;
}

.editorial-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 2rem;
  align-items: start;
  border-top: 3px solid var(--brand);
  border-bottom: 1px solid var(--line);
  padding: 2.4rem 0;
}

.check-list li {
  margin-bottom: 0.55rem;
}

.page-hero {
  background: var(--subtle);
  border-bottom: 1px solid var(--line);
  padding: 4rem 0;
}

.page-hero.simple {
  padding: 4.5rem 0 3.5rem;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.1rem;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 2rem;
  align-items: center;
}

.page-hero figure,
.feature-figure {
  margin: 0;
}

.page-hero img,
.feature-figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

figcaption {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.5rem;
}

.breadcrumbs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.2rem;
}

.prose-intro,
.narrow-content {
  max-width: 760px;
}

.narrow-content h2,
.prose-intro h2 {
  margin-top: 2rem;
}

.sibling-links {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.sibling-links div {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sibling-links a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  text-decoration: none;
  font-weight: 700;
  background: white;
}

.article-page {
  padding-top: 2rem;
}

.article-header {
  max-width: 840px;
  padding: 2rem 0 2rem;
}

.article-header h1 {
  font-size: 3.35rem;
}

.dek {
  color: var(--muted);
  font-size: 1.22rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  color: var(--muted);
  margin: 1rem 0;
  font-size: 0.95rem;
}

.feature-figure {
  margin-bottom: 2.5rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 740px);
  gap: 3rem;
  align-items: start;
  justify-content: center;
}

.article-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 1rem;
}

.toc-box,
.side-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: #fbfcfb;
}

.toc-box h2,
.side-note h2 {
  font-size: 1rem;
}

.toc-box ol {
  margin-bottom: 0;
  padding-left: 1.1rem;
  font-size: 0.92rem;
}

.copy-link {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.article-content {
  font-size: 1.07rem;
}

.article-content section {
  padding: 0 0 2.6rem;
  scroll-margin-top: 100px;
}

.article-content h2 {
  margin-top: 0;
  padding-top: 0.2rem;
}

.key-box {
  border-left: 4px solid var(--accent);
  background: #fff8f5;
  padding: 1rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 1rem;
}

.internal-link-box {
  border: 1px solid var(--line);
  background: #fbfffd;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1.4rem 0;
}

.internal-link-box h3 {
  margin-top: 0;
}

.internal-link-box ul {
  margin-bottom: 0;
}

.method-list li,
.article-content li {
  margin-bottom: 0.55rem;
}

.prompt-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.prompt-compare h3 {
  font-size: 1rem;
  color: var(--brand-dark);
}

.faq-section details {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}

.faq-section summary {
  cursor: pointer;
  font-weight: 800;
}

.sources-section ul {
  list-style: none;
  padding-left: 0;
}

.sources-section li {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 0.8rem;
}

.sources-section span {
  color: var(--muted);
  font-size: 0.9rem;
}

.related-section {
  padding: 3rem 0 6rem;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent);
  z-index: 90;
}

.contact-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

label {
  display: block;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  font: inherit;
  background: white;
  color: var(--ink);
}

textarea { resize: vertical; }

.site-footer {
  background: #101a18;
  color: #e9f1ee;
  padding: 4rem 0 1.5rem;
}

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

.site-footer p,
.site-footer li {
  color: #b8c7c2;
}

.site-footer h2 {
  font-size: 1rem;
  color: white;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li {
  margin-bottom: 0.4rem;
}

.footer-link-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #e9f1ee;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.consent-panel {
  position: fixed;
  z-index: 90;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.consent-panel-inner {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 1.25rem;
  align-items: end;
  padding: 1rem;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: calc(var(--radius) + 0.35rem);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.consent-panel h2 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.15rem;
}

.consent-panel p {
  margin: 0.35rem 0;
  color: var(--muted);
}

.consent-options {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.7rem;
  padding-top: 0.2rem;
}

.consent-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.consent-option input {
  width: auto;
  min-height: 0;
  margin-top: 0.2rem;
}

.consent-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  h1 { font-size: 2.45rem; }
  .hero { min-height: 560px; }
  .hero h1 { font-size: 3.15rem; }
  .split-intro,
  .page-hero-grid,
  .editorial-band,
  .article-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
    order: 2;
  }
  .card-grid,
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .category-grid,
  .author-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .primary-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    padding: 0.75rem 1rem 1rem;
    background: white;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .primary-nav.is-open {
    display: grid;
    justify-content: stretch;
  }
  .nav-link {
    width: 100%;
  }
  .hero {
    min-height: 540px;
    align-items: end;
  }
  .hero-content {
    padding: 5.5rem 0 5rem;
  }
  .hero h1 {
    font-size: 2.7rem;
  }
  .hero p {
    font-size: 1.04rem;
  }
  .section {
    padding: 3.5rem 0;
  }
  .card-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .category-card {
    grid-template-columns: 1fr;
  }
  .category-card-image {
    aspect-ratio: 16 / 9;
  }
  .article-header h1 {
    font-size: 2.35rem;
  }
  .prompt-compare {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    display: block;
  }
  .consent-panel-inner {
    grid-template-columns: 1fr;
  }
  .consent-actions {
    justify-content: stretch;
  }
  .consent-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
