:root {
  --ink: #07111f;
  --navy: #0b1d32;
  --panel: #102945;
  --panel-2: #153858;
  --paper: #f3f7fa;
  --white: #ffffff;
  --muted: #9eb1c4;
  --text: #203247;
  --blue: #35b9ff;
  --blue-soft: #bceaff;
  --copper: #f08a4b;
  --copper-soft: #ffd2b6;
  --line: #d6e2ea;
  --max: 1180px;
  --shadow: 0 18px 50px rgba(5, 20, 36, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}
a { color: inherit; }
img, svg { max-width: 100%; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--white); padding: .7rem 1rem; }
.skip-link:focus { left: .75rem; }

.site-header { background: rgba(7,17,31,.97); color: var(--white); border-bottom: 1px solid rgba(255,255,255,.09); position: sticky; top: 0; z-index: 20; }
.nav-wrap { max-width: var(--max); margin: 0 auto; padding: .85rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { text-decoration: none; display: flex; align-items: center; gap: .8rem; min-width: 0; }
.brand-mark { width: 2.4rem; height: 2.4rem; flex: 0 0 auto; }
.brand-name { display: block; font-weight: 780; letter-spacing: -.02em; line-height: 1.05; }
.brand-name span { color: var(--copper); }
.brand-domain { display: block; color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; margin-top: .22rem; }
.site-nav { display: flex; gap: .25rem; align-items: center; }
.site-nav a { color: #dbe7f0; text-decoration: none; padding: .55rem .75rem; border-radius: .35rem; font-size: .92rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--panel); color: var(--white); }
.menu-button { display: none; border: 1px solid #42566a; color: white; background: transparent; border-radius: .35rem; padding: .5rem .7rem; font: inherit; }

.hero { color: white; background: var(--ink); overflow: hidden; }
.hero-grid { max-width: var(--max); margin: 0 auto; min-height: 31rem; padding: 5rem 1.25rem 4.5rem; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(20rem,.85fr); gap: 5rem; align-items: center; }
.eyebrow { color: var(--blue); font-size: .78rem; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; margin: 0 0 1rem; }
h1, h2, h3 { color: var(--navy); line-height: 1.15; letter-spacing: -.025em; }
.hero h1 { color: white; font-size: clamp(2.7rem,6vw,5.4rem); margin: 0 0 1.4rem; max-width: 780px; }
.hero h1 span { color: var(--copper); }
.hero-copy { max-width: 700px; font-size: 1.18rem; color: #c4d2df; margin: 0 0 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 2.9rem; padding: .65rem 1rem; border: 1px solid transparent; border-radius: .35rem; text-decoration: none; font-weight: 720; }
.button-primary { background: var(--copper); color: #1b0d04; }
.button-primary:hover { background: #ff9a5b; }
.button-secondary { border-color: #47627c; color: white; background: rgba(255,255,255,.03); }
.signal-card { position: relative; min-height: 21rem; border: 1px solid rgba(255,255,255,.15); background: linear-gradient(145deg, rgba(53,185,255,.09), rgba(240,138,75,.08)); box-shadow: inset 0 0 60px rgba(53,185,255,.04); border-radius: .75rem; overflow: hidden; }
.signal-card svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.signal-label { position: absolute; left: 1.5rem; bottom: 1.4rem; color: #d7e6f1; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }

.section { padding: 4.5rem 1.25rem; }
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-dark { background: var(--navy); color: #c9d6e1; }
.section-dark h2, .section-dark h3 { color: white; }
.section-head { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(2rem,4vw,3.25rem); margin: 0; }
.section-head p { max-width: 580px; margin: 0; color: #5b7083; }
.section-dark .section-head p { color: #a9bac9; }
.three-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.route-card { background: white; border: 1px solid var(--line); border-top: 4px solid var(--blue); padding: 1.4rem; min-height: 15rem; box-shadow: 0 10px 28px rgba(9,31,52,.07); }
.route-card:nth-child(2) { border-top-color: var(--copper); }
.route-card:nth-child(3) { border-top-color: #78d7c4; }
.route-number { color: #74899b; font: 700 .8rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.route-card h3 { margin: 1.5rem 0 .65rem; font-size: 1.35rem; }
.route-card p { margin: 0 0 1.1rem; }
.text-link { color: #006aa3; font-weight: 720; text-underline-offset: .18em; }
.section-dark .text-link { color: var(--blue-soft); }

.principles { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; background: #28445e; border: 1px solid #28445e; }
.principle { background: var(--navy); padding: 1.5rem; }
.principle strong { color: white; display: block; margin-bottom: .4rem; }
.principle span { color: #aebdca; font-size: .92rem; }

.page-hero { background: var(--ink); color: white; padding: 4rem 1.25rem 3.5rem; }
.page-hero-inner { max-width: var(--max); margin: 0 auto; }
.page-hero h1 { color: white; font-size: clamp(2.6rem,6vw,4.8rem); margin: 0 0 1rem; }
.page-hero p { color: #c2d1dd; max-width: 760px; font-size: 1.1rem; margin: 0; }
.catalogue { padding: 3rem 1.25rem 5rem; }
.catalogue-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: 1.2rem; }
.catalogue-column { background: white; border: 1px solid var(--line); box-shadow: var(--shadow); }
.column-head { padding: 1.25rem 1.3rem 1.1rem; background: var(--panel); color: white; border-top: 4px solid var(--blue); }
.catalogue-column:nth-child(2) .column-head { border-top-color: var(--copper); }
.catalogue-column:nth-child(3) .column-head { border-top-color: #78d7c4; }
.column-head small { color: #aac0d2; font: 700 .78rem/1 ui-monospace, monospace; letter-spacing: .08em; }
.column-head h2 { color: white; margin: .75rem 0 .35rem; font-size: 1.4rem; }
.column-head p { color: #bfd0dc; margin: 0; font-size: .9rem; }
.module-list { list-style: none; padding: 0; margin: 0; }
.module-list li + li { border-top: 1px solid var(--line); }
.module-list a { display: block; padding: 1.05rem 1.25rem 1.15rem; text-decoration: none; transition: background .15s, transform .15s; }
.module-list a:hover { background: #f1f8fc; transform: translateX(.18rem); }
.module-id { display: block; color: #677d90; font: 700 .76rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; margin-bottom: .45rem; }
.module-title { display: block; color: var(--navy); font-weight: 760; line-height: 1.3; }
.module-summary { display: block; color: #65798b; font-size: .88rem; line-height: 1.45; margin-top: .4rem; }

.content-page { max-width: 900px; margin: 0 auto; padding: 4rem 1.25rem 5rem; }
.content-page h2 { font-size: 2rem; margin-top: 2.5rem; }
.content-page h3 { margin-top: 1.8rem; }
.content-page p, .content-page li { max-width: 760px; }
.content-page li + li { margin-top: .55rem; }
.callout { border-left: 5px solid var(--copper); background: white; padding: 1.2rem 1.4rem; margin: 2rem 0; box-shadow: 0 8px 24px rgba(9,31,52,.06); }
.module-meta { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.5rem; }
.pill { border: 1px solid #37526c; color: #d6e4ee; padding: .35rem .6rem; border-radius: 999px; font-size: .78rem; }
.lesson-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin: 1.25rem 0 2rem; }
.lesson { background: white; border: 1px solid var(--line); padding: 1rem 1.1rem; }
.lesson b { color: var(--navy); display: block; }
.lesson span { color: #677b8d; font-size: .9rem; }
.module-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--line); margin-top: 3rem; background: white; }
.module-nav > * { min-height: 5rem; padding: .85rem 1rem; display: flex; flex-direction: column; justify-content: center; text-decoration: none; }
.module-nav > * + * { border-left: 1px solid var(--line); }
.module-nav a:hover { background: #edf7fc; }
.module-nav span { color: #6f8394; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.module-nav strong { color: var(--navy); margin-top: .3rem; }
.module-nav .module-up { text-align: center; align-items: center; }
.module-nav > :last-child { text-align: right; align-items: flex-end; }
.module-nav .disabled { background: #f5f7f9; }
.module-nav .disabled strong { color: #8b9aa7; }
.module-nav small { color: #6c8091; font-size: .76rem; line-height: 1.25; margin-top: .2rem; }

.module-hero .page-hero-inner { max-width: 1040px; }
.module-content { max-width: var(--max); margin: 0 auto; padding: 3.5rem 1.25rem 5rem; display: grid; grid-template-columns: 13rem minmax(0,1fr); gap: 3.5rem; align-items: start; }
.module-body { max-width: 820px; }
.module-contents { position: sticky; top: 6.2rem; border-top: 4px solid var(--blue); background: white; box-shadow: 0 8px 25px rgba(9,31,52,.07); padding: 1.1rem 1rem; }
.module-contents > strong { color: var(--navy); }
.module-contents ol { margin: .8rem 0 0; padding-left: 1.25rem; color: #76899a; font-size: .82rem; }
.module-contents li + li { margin-top: .38rem; }
.module-contents a { color: #38566e; text-decoration: none; }
.module-contents a:hover { color: #006da8; text-decoration: underline; }
.module-body section { scroll-margin-top: 6.5rem; }
.module-body h2 { font-size: clamp(1.65rem,3vw,2.25rem); margin: .2rem 0 1rem; }
.module-body h3 { font-size: 1.05rem; }
.module-body p, .module-body li { max-width: 800px; }
.module-body li + li { margin-top: .55rem; }
.section-kicker { margin: 0 0 .35rem; color: #0879b5; font: 750 .76rem/1.2 ui-monospace,SFMono-Regular,Consolas,monospace; text-transform: uppercase; letter-spacing: .11em; }
.objective-list { background: white; border-left: 5px solid var(--copper); padding: 1.25rem 1.4rem 1.25rem 2.6rem; box-shadow: 0 8px 24px rgba(9,31,52,.06); }
.lesson-section { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 2.6rem; }
.table-scroll { overflow-x: auto; margin-top: 1.2rem; }
.decision-table { width: 100%; min-width: 620px; border-collapse: collapse; background: white; border: 1px solid var(--line); font-size: .91rem; }
.decision-table th, .decision-table td { padding: .85rem .9rem; text-align: left; vertical-align: top; border: 1px solid var(--line); }
.decision-table thead th { color: white; background: var(--panel); }
.decision-table tbody th { color: var(--navy); background: #edf5f9; width: 24%; }
.worked-example { margin-top: 3rem; padding: 2rem; background: var(--navy); color: #d2e0ea; border-top: 5px solid var(--copper); }
.worked-example h2 { color: white; }
.worked-example .section-kicker { color: var(--copper-soft); }
.example-step { border-top: 1px solid #35516a; padding-top: 1rem; margin-top: 1rem; }
.example-step strong { color: var(--blue-soft); }
.example-step p { margin-bottom: 0; }
.evidence-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.evidence-card { background: white; border: 1px solid var(--line); border-top: 3px solid var(--blue); padding: 1rem 1.1rem; }
.evidence-card h3 { margin: 0 0 .4rem; }
.evidence-card p { margin: 0; color: #617689; font-size: .9rem; }
.failure-panel { margin-top: 3rem; padding: 1.5rem 1.7rem; background: #fff4ed; border: 1px solid #f1cab2; }
.failure-panel h2 { font-size: 1.65rem; }
.failure-panel .section-kicker { color: #9e4c1b; }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding: .75rem .8rem .75rem 2.7rem; background: white; border: 1px solid var(--line); }
.check-list li::before { content: '?'; position: absolute; left: .8rem; top: .72rem; width: 1.2rem; height: 1.2rem; display: grid; place-items: center; color: #06334d; background: var(--blue-soft); border-radius: 50%; font-weight: 800; font-size: .75rem; }
.key-takeaway { margin: 3rem 0; padding: 1.45rem 1.6rem; color: white; background: #07111f; border-left: 5px solid var(--copper); }
.key-takeaway strong { color: var(--copper-soft); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.key-takeaway p { margin: .55rem 0 0; font-size: 1.08rem; }
.references { border-top: 1px solid var(--line); padding-top: 2rem; }
.references h2 { font-size: 1.45rem; }
.references a { color: #006da8; text-underline-offset: .18em; }
.reference-note { color: #728596; font-size: .82rem; }

.contact-panel { background: white; border: 1px solid var(--line); display: grid; grid-template-columns: .8fr 1.2fr; box-shadow: var(--shadow); }
.contact-label { background: var(--navy); color: white; padding: 2rem; }
.contact-label h2 { color: white; margin-top: 0; }
.contact-details { padding: 2rem; }
.contact-page { max-width: var(--max); }
.contact-email { margin-top: 2rem; }
.contact-email span { display: block; color: var(--blue-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.contact-email a { color: white; overflow-wrap: anywhere; }
.contact-form { display: grid; gap: 1rem; }
.contact-form label { display: grid; gap: .38rem; color: var(--navy); font-weight: 700; }
.contact-form label small { color: #708396; font-weight: 500; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; border: 1px solid #b9cad6; border-radius: .3rem; background: #fbfdff; color: var(--text); padding: .75rem .8rem; font: inherit; line-height: 1.35; }
.contact-form textarea { resize: vertical; min-height: 9rem; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 3px solid rgba(53,185,255,.23); border-color: #168dc8; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.form-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.form-note { color: #677b8d; font-size: .84rem; margin: 0; }
.thank-you-hero { min-height: 68vh; display: flex; align-items: center; }

.site-footer { background: #050c14; color: #91a6b7; padding: 2.4rem 1.25rem; }
.footer-inner { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 2rem; align-items: end; }
.footer-brand { color: white; font-weight: 740; }
.footer-brand span { color: var(--copper); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { color: #b8c7d3; }

@media (max-width: 860px) {
  .menu-button { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; padding: .8rem 1rem 1rem; background: var(--ink); border-top: 1px solid #293c4e; flex-direction: column; align-items: stretch; }
  .site-nav.open { display: flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 3.5rem; }
  .signal-card { min-height: 15rem; }
  .three-grid, .catalogue-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalogue-column { box-shadow: 0 8px 22px rgba(9,31,52,.08); }
  .module-content { grid-template-columns: 1fr; gap: 1.5rem; }
  .module-contents { position: static; }
  .module-contents ol { columns: 2; column-gap: 2rem; }
}
@media (max-width: 560px) {
  .brand-domain { display: none; }
  .hero-grid { min-height: auto; padding-top: 3rem; }
  .hero h1 { font-size: 2.75rem; }
  .section, .content-page { padding-top: 3.2rem; padding-bottom: 3.2rem; }
  .section-head, .footer-inner { align-items: start; flex-direction: column; }
  .principles, .lesson-grid, .contact-panel, .form-grid { grid-template-columns: 1fr; }
  .module-nav { grid-template-columns: 1fr; }
  .module-nav > * + * { border-left: 0; border-top: 1px solid var(--line); }
  .module-nav > :last-child { text-align: left; align-items: flex-start; }
  .module-contents ol { columns: 1; }
  .evidence-grid { grid-template-columns: 1fr; }
  .worked-example { padding: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Temporary domain placeholder */
.placeholder-page { min-height: 100vh; color: #dce8f1; background: radial-gradient(circle at 82% 18%,rgba(53,185,255,.12),transparent 26rem),radial-gradient(circle at 18% 82%,rgba(240,138,75,.08),transparent 24rem),var(--ink); display: grid; grid-template-rows: auto 1fr auto; }
.placeholder-header { width: min(calc(100% - 2.5rem),var(--max)); margin: 0 auto; padding: 1.35rem 0; border-bottom: 1px solid rgba(255,255,255,.11); }
.placeholder-main { width: min(calc(100% - 2.5rem),var(--max)); margin: 0 auto; padding: clamp(3.5rem,9vh,7.5rem) 0; display: grid; grid-template-columns: minmax(0,.9fr) minmax(24rem,1.1fr); align-items: center; gap: clamp(2.5rem,7vw,7rem); }
.placeholder-copy h1 { color: white; font-size: clamp(3.2rem,6.5vw,6.5rem); max-width: 9ch; margin: 0 0 1.5rem; }
.placeholder-copy h1 span { color: var(--copper); }
.placeholder-intro { color: #b7c9d8; font-size: clamp(1.05rem,2vw,1.3rem); max-width: 40rem; margin: 0; }
.placeholder-status { margin-top: 2rem; display: inline-flex; align-items: center; gap: .7rem; color: var(--blue-soft); font: 700 .82rem/1 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: .09em; text-transform: uppercase; }
.status-pulse { width: .65rem; height: .65rem; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 .35rem rgba(53,185,255,.12),0 0 1.1rem rgba(53,185,255,.7); }
.firmware-window { position: relative; overflow: hidden; background: rgba(9,25,43,.86); border: 1px solid #31506a; border-radius: .7rem; box-shadow: 0 30px 80px rgba(0,0,0,.32); }
.window-bar { min-height: 2.8rem; padding: .8rem 1rem; display: flex; align-items: center; gap: .5rem; background: #102945; border-bottom: 1px solid #31506a; }
.window-bar span { width: .65rem; height: .65rem; border-radius: 50%; background: #56738c; }
.window-bar span:first-child { background: var(--copper); }
.window-bar b { margin-left: auto; color: #8fa7ba; font: 600 .75rem/1 ui-monospace,SFMono-Regular,Consolas,monospace; }
.terminal-copy { padding: clamp(1.4rem,4vw,2.3rem); font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
.terminal-copy p { margin: 0; padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.07); color: #d5e4ef; }
.terminal-copy .prompt { color: var(--blue); margin-right: 1rem; }
.terminal-copy .boot-line { border: 0; margin-top: 1.25rem; color: var(--copper-soft); font-size: .9rem; }
.boot-line > span:first-child { color: var(--copper); margin-right: .65rem; }
.cursor { display: inline-block; width: .55rem; height: 1rem; margin-left: .4rem; vertical-align: -.15rem; background: var(--copper); animation: cursor-blink 1.1s steps(1) infinite; }
.trace { width: 100%; height: 6rem; display: block; border-top: 1px solid rgba(255,255,255,.08); }
.trace-grid { stroke: rgba(113,145,170,.13); stroke-width: 1; fill: none; }
.trace-line { stroke: var(--blue); stroke-width: 3; fill: none; filter: drop-shadow(0 0 5px rgba(53,185,255,.65)); }
.placeholder-footer { width: min(calc(100% - 2.5rem),var(--max)); margin: 0 auto; padding: 1.25rem 0 1.6rem; border-top: 1px solid rgba(255,255,255,.11); display: flex; justify-content: space-between; gap: 1rem; color: #8299ac; font-size: .82rem; }
@keyframes cursor-blink { 0%,45% { opacity: 1; } 46%,100% { opacity: 0; } }
@media (max-width: 800px) { .placeholder-main { grid-template-columns: 1fr; } .placeholder-copy h1 { max-width: 12ch; } }
@media (max-width: 560px) { .placeholder-main { padding: 3.5rem 0; } .placeholder-copy h1 { font-size: 3rem; } .terminal-copy { font-size: .85rem; } .placeholder-footer { flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }
