@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #f2efe8;
  --bg-strong: #e7e1d4;
  --surface: rgba(252, 249, 242, 0.94);
  --surface-solid: #fbf8f1;
  --surface-muted: rgba(233, 227, 214, 0.72);
  --border: rgba(25, 34, 34, 0.12);
  --border-strong: rgba(25, 34, 34, 0.2);
  --text: #182122;
  --text-soft: #4e5b5d;
  --text-muted: #687173;
  --accent: #193d36;
  --accent-soft: #2d5a51;
  --accent-alt: #7a6647;
  --danger: #6e3428;
  --shadow: 0 14px 32px rgba(28, 28, 24, 0.04);
  --shadow-soft: 0 10px 22px rgba(28, 28, 24, 0.026);
  --radius-sm: 0.75rem;
  --radius-md: 1.1rem;
  --radius-lg: 1.4rem;
  --radius-xl: 1.8rem;
  --shell: min(1220px, calc(100vw - 3rem));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(122, 102, 71, 0.04), transparent 30rem),
    radial-gradient(circle at 100% 0%, rgba(25, 61, 54, 0.03), transparent 28rem),
    linear-gradient(180deg, #f7f4ee 0%, var(--bg) 54%, #ece7dc 100%);
  color: var(--text);
  line-height: 1.65;
}

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

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(246, 243, 236, 0.88);
  border-bottom: 1px solid var(--border);
}

.header-shell {
  width: 100%;
  margin: 0;
  padding: 0 1.35rem 0 1rem;
  display: grid;
  grid-template-columns: 14.75rem minmax(0, 1fr);
  align-items: start;
  gap: 1.75rem;
  min-height: 4.8rem;
}

.section-shell {
  width: var(--shell);
  margin: 0 auto;
}

.brand {
  display: grid;
  gap: 0.15rem;
  align-content: start;
  justify-self: start;
  min-width: 0;
  padding: 0.85rem 0 0.7rem;
}

.brand-mark,
.eyebrow,
.system-code,
.layer-step,
.meta-label,
.doc-path,
.brand-subtitle,
.site-nav a,
.pill {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  font-size: 0.95rem;
  color: var(--accent);
}

.brand-subtitle {
  font-size: 0.64rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 11rem;
}

.nav-rail {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-self: stretch;
  padding: 0.92rem 0 0.65rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
  gap: clamp(0.85rem, 0.95vw, 1.35rem);
  flex-wrap: nowrap;
}

.site-nav a {
  position: relative;
  font-size: 0.69rem;
  color: var(--text-soft);
  line-height: 1.45;
  white-space: nowrap;
}

.site-nav a.is-active,
.site-nav a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  padding: 0.6rem 0.9rem;
  font: inherit;
  color: var(--text);
}

main {
  padding-bottom: 2rem;
}

.hero {
  padding: 2.3rem 0 3.1rem;
}

.section {
  position: relative;
  padding: 3rem 0 3.15rem;
}

.story-grid,
.two-up,
.detail-grid,
.footer-grid {
  display: grid;
  gap: 1.4rem;
}

.hero-panel {
  padding: 2.3rem 2.45rem 2rem;
  border: 1px solid rgba(25, 34, 34, 0.08);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(252, 249, 242, 0.86), rgba(248, 244, 235, 0.66)),
    rgba(252, 249, 242, 0.72);
  box-shadow: var(--shadow-soft);
}

.hero-main {
  display: grid;
  gap: 1rem;
  width: 100%;
  justify-items: center;
  text-align: center;
}

.hero-copy-block {
  display: grid;
  gap: 0.8rem;
  width: min(100%, 64rem);
  justify-items: center;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.74rem;
  color: var(--accent-alt);
}

.hero-kicker {
  margin-bottom: 0;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-wrap: balance;
}

.hero-title,
h1 {
  max-width: 14.5ch;
  margin-bottom: 0;
  margin-inline: auto;
  font-size: clamp(2.85rem, 5.3vw, 4.95rem);
  letter-spacing: -0.045em;
  line-height: 0.92;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.65rem, 2.55vw, 2.55rem);
}

h3 {
  margin-bottom: 0.75rem;
  font-size: 1.12rem;
}

.lead {
  max-width: 58rem;
  margin-bottom: 0;
  font-size: 1.1rem;
  color: var(--text-soft);
}

p,
li {
  font-size: 0.96rem;
}

.hero-copy,
.section-copy,
.footer-copy,
.content-card p,
.side-card p,
.card p {
  color: var(--text-soft);
}

.meta-card,
.card,
.content-card,
.side-card,
.issue-card,
.path-card,
.layer-band,
.support-card,
.refusal-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.meta-card {
  padding: 0.85rem 0.95rem;
  box-shadow: var(--shadow-soft);
}

.hero-points {
  display: grid;
  gap: 0.45rem;
  width: min(100%, 58rem);
  justify-items: center;
}

.hero-point {
  margin: 0;
  max-width: 56rem;
}

.hero-meta-band {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.35rem;
  justify-content: center;
}

.hero-meta-pill {
  display: inline-grid;
  gap: 0.28rem;
  min-width: 11rem;
  max-width: 18rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  background: rgba(251, 248, 241, 0.92);
  box-shadow: var(--shadow-soft);
  text-align: center;
  justify-items: center;
}

.hero-meta-pill strong {
  font-size: 1rem;
  line-height: 1.4;
}

.meta-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.section-heading {
  max-width: 48rem;
  margin-bottom: 1.9rem;
}

.section-heading--narrow {
  max-width: 36rem;
}

.section-heading.left {
  margin-bottom: 1.2rem;
}

.section-frame {
  padding: 2rem;
  border: 1px solid rgba(25, 34, 34, 0.08);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(252, 249, 242, 0.8), rgba(248, 243, 234, 0.68)),
    rgba(252, 249, 242, 0.7);
  box-shadow: var(--shadow-soft);
}

.section-frame--compact {
  padding: 1.7rem;
}

.section-muted {
  position: relative;
}

.section-muted::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(231, 225, 212, 0.22), rgba(231, 225, 212, 0.38));
  z-index: -1;
}

.section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(24, 33, 34, 0.08) 18%,
    rgba(24, 33, 34, 0.08) 82%,
    transparent
  );
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(24, 33, 34, 0.08) 18%,
    rgba(24, 33, 34, 0.08) 82%,
    transparent
  );
}

.issue-grid,
.card-grid,
.path-grid {
  display: grid;
  gap: 1.1rem;
}

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

.issue-grid--signals {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.issue-card {
  grid-column: span 4;
  padding: 1rem 1.05rem;
  min-height: 4.2rem;
  display: flex;
  align-items: flex-start;
  box-shadow: var(--shadow-soft);
}

.issue-card p {
  margin: 0;
  color: var(--text);
}

.issue-grid--signals .issue-card:nth-child(-n + 3) {
  grid-column: span 4;
  min-height: 4.2rem;
}

.issue-grid--signals .issue-card:nth-child(4),
.issue-grid--signals .issue-card:nth-child(5) {
  grid-column: span 4;
  min-height: 5.6rem;
}

.issue-grid--signals .issue-card:nth-child(6) {
  grid-column: span 4;
  min-height: 5.6rem;
}

.layer-diagram {
  display: grid;
  gap: 1.15rem;
}

.layer-band {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-soft);
}

.layer-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  background: rgba(25, 61, 54, 0.08);
  color: var(--accent);
}

.layer-question {
  margin-bottom: 0;
  color: var(--accent-soft);
}

.card-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
}

.card-grid > * {
  grid-column: span 4;
}

.card,
.content-card,
.side-card,
.refusal-panel,
.support-card {
  padding: 1.2rem 1.15rem;
}

.card-medium {
  min-height: 15rem;
}

.doc-card {
  min-height: 16.75rem;
}

.system-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: 100%;
  min-height: 16.35rem;
}

.system-code {
  font-size: 0.72rem;
  color: var(--accent);
}

.system-card__head {
  display: grid;
  gap: 0.4rem;
}

.system-card__body {
  flex: 1 1 auto;
}

.system-card h3 {
  max-width: none;
  margin-bottom: 0.35rem;
}

.system-grid--4 > * {
  grid-column: span 6;
}

.system-grid--5 > *:nth-child(-n + 3) {
  grid-column: span 4;
}

.system-grid--5 > *:nth-child(n + 4) {
  grid-column: span 6;
}

.system-card__link {
  padding-top: 0.5rem;
  border-top: 1px solid rgba(24, 33, 34, 0.08);
}

.card-strapline {
  color: var(--accent-soft);
}

.text-link {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  gap: 0.4rem;
  color: var(--accent);
}

.text-link::after {
  content: ">";
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1.35rem;
}

.two-up--balanced {
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
}

.support-card {
  display: grid;
  gap: 1rem;
}

.support-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding-left: 1.1rem;
}

.bullet-list {
  display: grid;
  gap: 0.65rem;
  padding-left: 1.1rem;
}

.bullet-list.tight {
  gap: 0.45rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: rgba(25, 61, 54, 0.08);
  color: var(--accent);
  font-size: 0.7rem;
}

.path-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 0.72fr) minmax(0, 1.28fr);
  gap: 1.5rem;
  align-items: start;
}

.path-layout .section-heading {
  margin-bottom: 0;
}

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

.path-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1rem 1rem;
  min-height: 6.75rem;
  box-shadow: var(--shadow-soft);
}

.path-grid--routes .path-card {
  grid-column: span 1;
}

.path-card strong {
  color: var(--accent);
  margin-top: auto;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.3rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.crumb-sep {
  color: rgba(24, 33, 34, 0.38);
}

.story-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 1.25rem;
}

.detail-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.75fr);
  align-items: start;
  gap: 1.2rem;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 1rem;
}

.link-list,
.source-list {
  display: grid;
  gap: 0.75rem;
  padding-left: 1.1rem;
}

.source-list li {
  display: grid;
  gap: 0.18rem;
}

.source-list.compact {
  gap: 0.8rem;
}

.doc-path {
  color: var(--text-muted);
  font-size: 0.66rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
}

.top-gap {
  margin-top: 1rem;
}

.site-footer {
  position: relative;
  padding: 1.4rem 0 2.8rem;
}

.footer-grid {
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(11rem, 0.6fr));
  align-items: start;
  gap: 1.8rem;
  padding-top: 1rem;
}

.footer-brand-block,
.footer-group {
  display: grid;
  gap: 0.7rem;
}

.footer-brand-block {
  max-width: 32rem;
}

.footer-group a {
  color: var(--text-soft);
}

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

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1280px) {
  .header-shell {
    padding-inline: 1rem;
    grid-template-columns: 13.25rem minmax(0, 1fr);
  }

  .hero-panel {
    padding-inline: 2.2rem;
  }
}

@media (max-width: 1080px) {
  .card-grid,
  .issue-grid,
  .path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid,
  .footer-grid,
  .path-layout,
  .two-up--balanced {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero-panel,
  .section-frame {
    padding: 1.65rem;
  }

  .hero-copy-block {
    max-width: none;
  }

  .hero-meta-band {
    gap: 0.7rem;
  }

  .issue-grid--signals,
  .path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid > *,
  .issue-card,
  .issue-grid--signals .issue-card,
  .path-grid--routes .path-card {
    grid-column: span 1;
  }

  .system-grid--4 > *,
  .system-grid--5 > * {
    grid-column: span 1;
  }

  .issue-grid--signals .issue-card,
  .issue-grid--signals .issue-card:nth-child(-n + 3),
  .issue-grid--signals .issue-card:nth-child(4),
  .issue-grid--signals .issue-card:nth-child(5),
  .issue-grid--signals .issue-card:nth-child(6),
  .path-grid--routes .path-card {
    min-height: auto;
  }

  .header-shell {
    grid-template-columns: 12.35rem minmax(0, 1fr);
    gap: 0.85rem;
  }

  .site-nav {
    gap: 0.62rem;
  }

  .site-nav a {
    font-size: 0.64rem;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.5rem);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: rgba(251, 248, 241, 0.98);
    box-shadow: var(--shadow);
  }

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

  .header-shell {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-inline: 0.9rem;
  }

  .nav-rail {
    min-width: auto;
    padding: 0.8rem 0 0;
  }

  .story-grid,
  .two-up,
  .issue-grid,
  .card-grid,
  .path-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .issue-grid--signals,
  .path-grid--routes {
    grid-template-columns: 1fr;
  }

  .card-grid > *,
  .issue-card,
  .issue-grid--signals .issue-card,
  .path-grid--routes .path-card {
    grid-column: span 1;
  }

  .hero,
  .section {
    padding-top: 2.45rem;
    padding-bottom: 2.55rem;
  }

  .hero-panel,
  .section-frame {
    padding: 1.35rem;
  }

  .hero-title,
  h1 {
    max-width: none;
    font-size: clamp(2.35rem, 9.5vw, 3.55rem);
  }

  .lead {
    font-size: 1rem;
  }

  .hero-point {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
