:root {
  --bg: #efe9df;
  --paper: #f8f5ef;
  --paper-2: #ece4d8;
  --paper-3: #e4d7c4;
  --ink: #11141a;
  --ink-soft: #4c5561;
  --navy: #10365f;
  --navy-deep: #091b31;
  --gold: #b48a33;
  --gold-soft: #e9dcc0;
  --line: #171d25;
  --line-soft: rgba(23, 29, 37, 0.16);
  --wrap: min(1160px, calc(100% - 2rem));
  --preview-h: 1.65rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  padding-top: 0.6rem;
  font-family: "Public Sans", sans-serif;
  color: var(--ink);
  line-height: 1.55;
  background:
    linear-gradient(180deg, rgba(16, 54, 95, 0.04), transparent 12rem),
    linear-gradient(180deg, #f8f4ed 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 20, 26, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 20, 26, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 78%);
}

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.45rem;
  right: 0.55rem;
  z-index: 100;
}

.preview-chrome .wrap {
  width: auto;
  margin: 0;
}

.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,
.action-strip,
.page-actions {
  display: grid;
  gap: 1rem;
}

.preview-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--preview-h);
  padding: 0.18rem 0.25rem 0.18rem 0.45rem;
  border: 1px solid var(--line-soft);
  background: rgba(248, 245, 239, 0.92);
}

.preview-note {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(17, 20, 26, 0.68);
  white-space: nowrap;
}

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

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

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

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

.preview-actions select {
  min-width: 8rem;
  padding: 0 0.35rem;
}

.header {
  padding: 1.2rem 0 2.5rem;
}

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

.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,
.action-card {
  border: 1.5px solid var(--line);
  background: rgba(248, 245, 239, 0.97);
}

.nav-shell {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding: 1rem 1.05rem;
  border-top-width: 3px;
}

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

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.1rem;
  min-height: 3.1rem;
  padding: 0 0.8rem;
  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,
.metric,
.stat-box strong {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.045em;
}

.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 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.nav a {
  padding: 0.72rem 0.88rem;
  border: 1.5px 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.12fr) minmax(320px, 0.88fr);
  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,
.action-card {
  padding: 1.25rem;
}

.hero-copy,
.hero-proof,
.page-hero,
.source-panel,
.content-card,
.hub-card,
.metric-card,
.action-card {
  display: grid;
  gap: 0.9rem;
}

.hero-copy {
  gap: 1rem;
  background:
    linear-gradient(135deg, rgba(16, 54, 95, 0.08), transparent 34%),
    var(--paper);
}

.hero-proof {
  align-content: start;
  background:
    linear-gradient(180deg, rgba(180, 138, 51, 0.15), transparent 7rem),
    #f7f1e6;
}

.eyebrow,
.card-tag,
.visual-label,
.step-index,
.metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(16, 54, 95, 0.85);
}

h1 {
  font-size: clamp(2.7rem, 5.6vw, 5.2rem);
  line-height: 0.9;
  max-width: 11.5ch;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  line-height: 0.96;
}

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

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

.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));
  gap: 0.85rem 1rem;
}

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

.stat-box strong,
.metric {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 0.95;
}

.stat-box p {
  margin-top: 0.35rem;
  font-size: 0.94rem;
}

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

.section {
  padding: 2rem 0 2.35rem;
  border-top: 1px solid var(--line-soft);
}

.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,
.action-strip {
  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,
.action-card.featured {
  background:
    linear-gradient(180deg, rgba(180, 138, 51, 0.14), transparent 9rem),
    var(--paper);
}

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

.route-card.contrast .card-tag,
.signal-card.contrast .card-tag,
.footer-shell .eyebrow,
.action-card.contrast .card-tag {
  color: rgba(233, 220, 192, 0.92);
}

.route-card.contrast .text-link,
.signal-card.contrast .text-link,
.action-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(248, 245, 239, 0.97);
}

.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.58fr) minmax(0, 1.42fr);
  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.35rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: 0.92;
}

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

.side-panel {
  padding: 1rem 0;
  border-top: 1.5px 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,
.page-actions,
.roles-grid {
  gap: 0;
  border: 1.5px solid var(--line);
}

.student-step,
.action-card {
  border: 0;
}

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

.student-step:last-child,
.action-card: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,
.log-card.pending-log {
  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);
}

.role-card {
  padding: 1rem 1.05rem;
  border-right: 1px solid var(--line);
  background: rgba(248, 245, 239, 0.97);
}

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

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

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

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

.source-panel {
  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));
}

@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,
  .action-strip {
    grid-template-columns: 1fr;
  }

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

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

  .role-card:first-child,
  .action-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) {
  .preview-chrome {
    position: static;
    padding: 0.65rem 1rem 0;
  }

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

  .preview-bar {
    display: grid;
    justify-items: stretch;
  }

  .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);
  }
}
