:root {
  --bg: #f5f1e8;
  --paper: #fffdf8;
  --paper-strong: #ffffff;
  --ink: #08111d;
  --ink-soft: #31404f;
  --navy: #002e5d;
  --navy-deep: #001631;
  --gold: #f7b538;
  --line: #d7d0c4;
  --slab: #ede6da;
  --good: #d9f0e2;
  --radius: 24px;
  --shadow: 0 24px 48px rgba(8, 17, 29, 0.08);
  --wrap: min(1120px, calc(100% - 2rem));
  --preview-chrome-height: 1.95rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  padding-top: calc(var(--preview-chrome-height) + 0.25rem);
  font-family: "Public Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(247, 181, 56, 0.18), transparent 26%),
    linear-gradient(180deg, #fbf7ef 0%, var(--bg) 100%);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 46, 93, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 46, 93, 0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.36), transparent 78%);
}

a {
  color: inherit;
}

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

select,
button,
input {
  font: inherit;
}

.site-frame {
  position: fixed;
  inset: 0;
  border: 12px solid transparent;
  pointer-events: none;
}

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

.header {
  padding: 0.5rem 0 3rem;
}

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

.preview-bar,
.nav-shell,
.hero,
.two-column,
.card-grid,
.three-up,
.stat-grid,
.salary-grid,
.visual,
.resource-grid,
.footer-shell,
.footer-links,
.log-grid {
  display: grid;
  gap: 1rem;
}

.nav-shell,
.card,
.content-card,
.hero-panel,
.stat-card,
.log-card,
.signal-box,
.source-note,
.footer-shell,
.visual article,
.resource-grid a {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.preview-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(8, 17, 29, 0.08);
  background: rgba(247, 243, 235, 0.72);
  backdrop-filter: blur(10px);
}

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

.preview-tag,
.preview-switch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.preview-label,
.eyebrow,
.card-tag,
.panel-kicker,
.visual-label {
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 46, 93, 0.72);
}

.preview-tag strong {
  font-size: 0.67rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.preview-switch select {
  min-width: 8.8rem;
  min-height: 1.45rem;
  padding: 0.1rem 1.35rem 0.1rem 0.42rem;
  border: 1px solid rgba(8, 17, 29, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  font-size: 0.68rem;
  line-height: 1.1;
  box-shadow: none;
}

.nav-shell {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
}

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

.brand strong,
h1,
h2,
h3 {
  font-family: "Archivo Expanded", sans-serif;
  letter-spacing: -0.03em;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: var(--navy);
  color: #fff;
}

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

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

.nav a {
  padding: 0.78rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

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

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

.hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: start;
}

.hero-copy,
.page-hero,
.hero-panel,
.content-card,
.card,
.log-card,
.source-note {
  padding: 1.3rem;
  border-radius: var(--radius);
}

.hero-copy,
.page-hero {
  background: var(--navy-deep);
  color: #fff;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 0.96;
  margin-top: 0.6rem;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 1.05;
}

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

.lede {
  margin-top: 1rem;
  font-size: 1.05rem;
  max-width: 46rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.15rem;
}

.button,
.button-ghost,
.text-link,
.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
}

.button,
.button-ghost {
  min-height: 3rem;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
}

.button {
  background: var(--gold);
  color: var(--ink);
}

.button-ghost {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
}

.hero-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f5efe3 100%);
}

.stat-grid,
.salary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.stat-card,
.salary-grid div {
  padding: 1rem;
  border-radius: 18px;
}

.stat-card span,
.metric {
  display: block;
  font-family: "Archivo Expanded", sans-serif;
  font-size: 1.7rem;
  color: var(--navy);
}

.section {
  padding: 1.6rem 0 2.8rem;
}

.section-dark {
  background: var(--navy-deep);
  color: #fff;
}

.section-slab {
  background: rgba(237, 230, 218, 0.72);
}

.section-head {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

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

.card,
.content-card,
.log-card {
  display: grid;
  gap: 0.8rem;
}

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

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

.dark-card {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.text-link,
.footer-links a {
  width: fit-content;
  color: var(--navy);
}

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

.text-link:hover,
.button:hover,
.button-ghost:hover,
.footer-links a:hover,
.nav a:hover {
  transform: translateY(-2px);
}

.visual {
  border-radius: var(--radius);
}

.lifecycle-visual {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  align-items: stretch;
}

.lifecycle-bar,
.visual-side {
  display: grid;
  gap: 1rem;
}

.lifecycle-first,
.lifecycle-rest {
  padding: 1.3rem;
  border-radius: var(--radius);
}

.lifecycle-first {
  background: #fff;
  color: var(--ink);
}

.lifecycle-rest {
  background: var(--gold);
  color: var(--ink);
}

.lifecycle-bar strong {
  display: block;
  margin-top: 0.4rem;
  font-family: "Archivo Expanded", sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
}

.signal-box {
  padding: 1.2rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
}

.stack-visual,
.ladder-visual {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stack-step,
.ladder-rung {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  background: var(--gold);
  font-weight: 700;
}

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

.resource-grid a {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  text-decoration: none;
  font-weight: 600;
}

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

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

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

.metric-card {
  align-items: center;
  text-align: center;
}

.fact-list {
  padding-left: 1.2rem;
  display: grid;
  gap: 0.55rem;
}

.fine-print {
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.source-note {
  background: var(--paper-strong);
}

.footer {
  padding: 0 0 2rem;
}

.footer-shell {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-radius: var(--radius);
  padding: 1.2rem;
}

.footer-links {
  grid-auto-flow: row;
  justify-items: start;
}

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

.current-log {
  background: var(--good);
}

.pending-log {
  background: #fff4d7;
}

@media (max-width: 980px) {
  .hero,
  .card-grid,
  .stack-visual,
  .ladder-visual,
  .two-column,
  .three-up,
  .log-grid,
  .lifecycle-visual,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .nav-shell {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .preview-bar,
  .stat-grid,
  .salary-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .preview-bar {
    gap: 0.18rem;
    padding: 0.08rem 0 0.12rem;
  }

  .preview-switch select {
    min-width: 0;
    width: 100%;
  }

  h1 {
    line-height: 1.02;
  }
}
