:root {
  --bg: #f4efe6;
  --paper: #fbf8f2;
  --paper-2: #f0e8dc;
  --paper-3: #e4d8c6;
  --ink: #11161d;
  --ink-soft: #4a5563;
  --navy: #113a66;
  --navy-deep: #0a2038;
  --gold: #d9a441;
  --gold-soft: #f0dfb7;
  --line: #202935;
  --line-soft: rgba(17, 22, 29, 0.18);
  --wrap: min(1160px, calc(100% - 2rem));
  --preview-h: 1.9rem;
  --radius: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  padding-top: calc(var(--preview-h) + 0.4rem);
  font-family: "Public Sans", sans-serif;
  color: var(--ink);
  line-height: 1.55;
  background:
    linear-gradient(180deg, rgba(217, 164, 65, 0.08), transparent 11rem),
    linear-gradient(180deg, #fbf8f2 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 22, 29, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 22, 29, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.24), transparent 80%);
}

a {
  color: inherit;
}

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

select,
button,
input {
  font: inherit;
}

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

.preview-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(251, 248, 242, 0.9);
  backdrop-filter: blur(8px);
}

.preview-bar,
.nav-shell,
.hero-grid,
.hero-proof,
.hero-actions,
.route-grid,
.stats-grid,
.cost-visual,
.cost-side,
.student-section,
.student-rail,
.hub-grid,
.hub-links,
.three-grid,
.two-column,
.roles-grid,
.metric-band,
.log-grid,
.footer-shell,
.source-links {
  display: grid;
  gap: 1rem;
}

.preview-bar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--preview-h);
  gap: 0.65rem;
}

.preview-note {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(17, 58, 102, 0.82);
}

.preview-note strong {
  color: var(--ink);
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.preview-actions a,
.preview-actions select {
  min-height: 1.4rem;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font-size: 0.68rem;
}

.preview-actions a {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  text-decoration: none;
}

.preview-actions select {
  min-width: 9rem;
  padding: 0.08rem 0.45rem;
  border-radius: 0;
}

.header {
  padding: 0.75rem 0 2.2rem;
}

.header-compact {
  padding-bottom: 1.5rem;
}

.nav-shell,
.hero-copy,
.hero-proof,
.page-hero,
.route-card,
.signal-card,
.student-aside,
.student-step,
.hub-card,
.content-card,
.metric-card,
.log-card,
.footer-shell,
.source-panel {
  border: 1.5px solid var(--line);
  background: rgba(251, 248, 242, 0.96);
}

.nav-shell {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding: 1rem 1.1rem;
}

.brand {
  display: inline-grid;
  gap: 0.35rem;
  text-decoration: none;
}

.brand-lockup {
  display: inline-flex;
  gap: 0.85rem;
  align-items: center;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  min-height: 3rem;
  padding: 0 0.75rem;
  background: var(--navy);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-copy strong,
h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.brand-copy small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.nav a,
.button,
.button-secondary,
.text-link {
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.nav a {
  padding: 0.72rem 0.88rem;
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.nav a.active,
.nav a:hover,
.nav a:focus-visible {
  background: var(--navy);
  color: #fff;
}

.hero-grid,
.page-hero {
  margin-top: 1rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: stretch;
}

.hero-copy,
.hero-proof,
.page-hero,
.route-card,
.signal-card,
.student-aside,
.student-step,
.hub-card,
.content-card,
.metric-card,
.log-card,
.footer-shell,
.source-panel {
  padding: 1.25rem;
}

.hero-copy,
.hero-proof,
.page-hero,
.source-panel {
  display: grid;
  gap: 0.95rem;
}

.hero-copy {
  display: grid;
  gap: 1rem;
  background:
    linear-gradient(135deg, rgba(17, 58, 102, 0.1), transparent 35%),
    var(--paper);
}

.hero-proof {
  align-content: start;
  background:
    linear-gradient(180deg, rgba(217, 164, 65, 0.16), transparent 10rem),
    #f8f3ea;
}

.eyebrow,
.card-tag,
.visual-label,
.step-index,
.metric-label {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(17, 58, 102, 0.84);
}

h1 {
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  line-height: 0.92;
  max-width: 12ch;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.7rem);
  line-height: 0.98;
}

h3 {
  font-size: 1.12rem;
  line-height: 1.08;
}

.lede {
  font-size: 1.07rem;
  max-width: 42rem;
}

.hero-summary,
.section-copy,
.fine-print,
.muted {
  color: var(--ink-soft);
}

.hero-actions {
  grid-auto-flow: column;
  justify-content: start;
  gap: 0.7rem;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.05rem;
  border: 1.5px solid var(--line);
  text-decoration: none;
  font-weight: 700;
}

.button {
  background: var(--navy);
  color: #fff;
}

.button-secondary {
  background: transparent;
}

.button:hover,
.button-secondary:hover,
.text-link:hover {
  transform: translateY(-1px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.text-link::after {
  content: "→";
  margin-left: 0.45rem;
}

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

.stat-box {
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.stat-box strong,
.metric {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1;
}

.stat-box p {
  margin-top: 0.38rem;
  font-size: 0.95rem;
}

.proof-note {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.section {
  padding: 1.4rem 0 2.25rem;
}

.section-head {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.section-head.split {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  align-items: end;
}

.rule {
  height: 2px;
  background: var(--line);
}

.route-grid,
.three-grid,
.roles-grid,
.hub-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-card,
.signal-card,
.hub-card,
.content-card,
.log-card {
  display: grid;
  gap: 0.75rem;
}

.route-card.featured,
.student-aside,
.metric-card.is-highlight,
.log-card.current-log {
  background:
    linear-gradient(180deg, rgba(217, 164, 65, 0.16), transparent 9rem),
    var(--paper);
}

.route-card.contrast,
.signal-card.contrast,
.footer-shell {
  background: var(--navy-deep);
  color: #fff;
}

.route-card.contrast .card-tag,
.signal-card.contrast .card-tag,
.footer-shell .eyebrow {
  color: rgba(240, 223, 183, 0.92);
}

.route-card.contrast .text-link,
.signal-card.contrast .text-link {
  color: #fff;
}

.cost-visual {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  border: 1.5px solid var(--line);
  background: rgba(251, 248, 242, 0.96);
}

.cost-main,
.cost-side {
  padding: 1.2rem;
}

.cost-main {
  display: grid;
  gap: 1rem;
  border-right: 1.5px solid var(--line);
}

.cost-bar {
  display: grid;
  grid-template-columns: minmax(140px, 0.55fr) minmax(0, 1.45fr);
  border: 1.5px solid var(--line);
}

.cost-segment {
  padding: 1rem;
}

.cost-segment:first-child {
  border-right: 1.5px solid var(--line);
  background: #fff;
}

.cost-segment:last-child {
  background: var(--gold-soft);
}

.cost-segment strong {
  display: block;
  margin-top: 0.4rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
}

.cost-side {
  align-content: start;
}

.side-panel {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.side-panel:first-child {
  padding-top: 0;
  border-top: 0;
}

.student-section {
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  align-items: start;
}

.student-rail {
  gap: 0;
  border: 1.5px solid var(--line);
}

.student-step {
  border: 0;
  border-bottom: 1px solid var(--line);
}

.student-step:last-child {
  border-bottom: 0;
}

.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.step-index {
  color: var(--navy);
}

.student-aside {
  display: grid;
  gap: 1rem;
}

.hub-links {
  grid-template-columns: 1fr;
}

.hub-link {
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.hub-link:first-child {
  padding-top: 0;
  border-top: 0;
}

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

.content-card.alt {
  background: var(--paper-2);
}

.stack-list,
.fact-list,
.source-links {
  padding-left: 0;
  list-style: none;
}

.stack-list li,
.fact-list li {
  padding: 0.7rem 0;
  border-top: 1px solid var(--line-soft);
}

.stack-list li:first-child,
.fact-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

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

.metric-card {
  gap: 0.7rem;
  align-content: start;
}

.metric-label {
  color: var(--ink-soft);
}

.roles-grid {
  gap: 0;
  border: 1.5px solid var(--line);
  background: rgba(251, 248, 242, 0.96);
}

.role-card {
  padding: 1rem 1.05rem;
  border-right: 1px solid var(--line);
}

.role-card:last-child {
  border-right: 0;
}

.source-panel {
  display: grid;
  gap: 1rem;
}

.source-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.source-links a {
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
}

.footer {
  padding: 0 0 2rem;
}

.footer-shell {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

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

.log-card.pending-log {
  background: var(--paper-2);
}

@media (max-width: 1040px) {
  .hero-grid,
  .section-head.split,
  .cost-visual,
  .student-section,
  .route-grid,
  .three-grid,
  .hub-grid,
  .two-column,
  .metric-band,
  .roles-grid,
  .log-grid,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .cost-main {
    border-right: 0;
    border-bottom: 1.5px solid var(--line);
  }

  .role-card {
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .role-card:first-child {
    border-top: 0;
  }
}

@media (max-width: 840px) {
  .nav-shell {
    grid-template-columns: 1fr;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero-actions {
    grid-auto-flow: row;
  }
}

@media (max-width: 720px) {
  body {
    padding-top: calc(var(--preview-h) + 0.55rem);
  }

  .preview-bar,
  .stats-grid,
  .source-links {
    grid-template-columns: 1fr;
  }

  .preview-actions {
    width: 100%;
  }

  .preview-actions a,
  .preview-actions select {
    width: 100%;
  }

  .cost-bar {
    grid-template-columns: 1fr;
  }

  .cost-segment:first-child {
    border-right: 0;
    border-bottom: 1.5px solid var(--line);
  }
}
