/* NetworkEngineerPath landing. White by default, dark via the header toggle.
   One accent (fiber-jacket orange), one radius (6px), IBM Plex Sans for text,
   JetBrains Mono for numbers, addresses and code. */

:root {
  --bg: #ffffff;
  --tint: #f5f6f7;
  --surface: #ffffff;
  --text: #15171a;
  --muted: #555c66;
  --line: #e2e5e9;
  --line-strong: #c9ced5;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-soft: #fff1ea;
  --war: #9f1239;
  --war-soft: #fff0f3;
  --code-bg: #f5f6f7;
  --focus: #c2410c;
  --r: 6px;
  --wrap: 1160px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e1012;
  --tint: #14171a;
  --surface: #181b1f;
  --text: #e9ebee;
  --muted: #a0a7b1;
  --line: #262a30;
  --line-strong: #383e46;
  --accent: #fb8a4c;
  --accent-ink: #1a0d05;
  --accent-soft: #2a1a10;
  --war: #fb7190;
  --war-soft: #2a131a;
  --code-bg: #14171a;
  --focus: #fb8a4c;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
code, .mono { font-family: var(--mono); font-feature-settings: "zero" 1; }
code { font-size: 0.9em; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: 16px; top: -48px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: var(--r); z-index: 30; }
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 820px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.wordmark { font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; }
.wordmark span { color: var(--accent); }
.wordmark--sm { font-size: 15px; }
.site-nav { display: flex; gap: 22px; margin-left: 12px; }
.site-nav a { font-size: 15px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.site-nav a:hover { color: var(--text); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: var(--r); background: transparent; color: var(--text); cursor: pointer;
  transition: border-color 0.2s;
}
.icon-btn:hover { border-color: var(--line-strong); }
.theme-icon--sun { display: none; }
[data-theme="dark"] .theme-icon--sun { display: block; }
[data-theme="dark"] .theme-icon--moon { display: none; }
.lang-switch { font: 500 13px var(--mono); color: var(--muted); text-decoration: none; padding: 10px 6px; }
.lang-switch:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: var(--r); border: 1px solid transparent;
  font: 600 15px var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn-primary:disabled { opacity: 0.7; cursor: progress; }
.btn-quiet { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-quiet.is-disabled { color: var(--muted); cursor: not-allowed; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.soon { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.link-btn { background: none; border: 0; padding: 8px 0; font: 500 15px var(--sans); color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Forms */
.field { display: grid; gap: 6px; }
.field-label { font-size: 14px; font-weight: 500; color: var(--text); }
.field-input {
  width: 100%; min-height: 46px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface); color: var(--text); font: 400 16px var(--sans);
  transition: border-color 0.2s;
}
.field-input::placeholder { color: var(--muted); opacity: 0.85; }
.field-input:hover { border-color: var(--muted); }
.field-input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.field-input.is-invalid { border-color: var(--war); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-error { min-height: 22px; margin-top: 6px; font-size: 14px; color: var(--war); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hp-field { position: absolute; left: -9999px; }
.notify-success {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border: 1px solid var(--accent); border-radius: var(--r); background: var(--accent-soft);
}
.notify-success svg { color: var(--accent); flex: none; margin-top: 2px; }
.notify-success[hidden], .notify-form[hidden] { display: none; }

/* Hero */
.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-title { font-size: clamp(36px, 4.4vw, 56px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.06; max-width: 13ch; }
.hero-sub { margin: 20px 0 28px; font-size: 19px; color: var(--muted); max-width: 44ch; }

/* Subnet calculator */
.calc {
  margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -32px color-mix(in srgb, var(--text) 30%, transparent);
}
.calc-head { font: 600 13px var(--mono); color: var(--accent); }
.calc-task { margin: 8px 0 18px; font-size: 15px; color: var(--muted); }
.calc-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }
.field--prefix output { color: var(--accent); font-weight: 600; margin-left: 4px; }
input[type="range"] { width: 100%; height: 46px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.bits {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  padding: 12px; margin: 4px 0 18px; border-radius: var(--r); background: var(--tint);
  font: 500 15px var(--mono);
}
.bit { color: var(--muted); opacity: 0.75; transition: color 0.2s; }
.bit--net { color: var(--accent); opacity: 1; font-weight: 600; }
.bit-dot { color: var(--line-strong); }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin: 0; }
.calc-out div { border-top: 1px solid var(--line); padding-top: 8px; }
.calc-out dt { font-size: 13px; color: var(--muted); }
.calc-out dd { margin: 2px 0 0; font-size: 16px; font-weight: 500; }

/* Sections */
.section { padding: 96px 0; }
.section--tint { background: var(--tint); }
.section-title { font-size: clamp(28px, 3.2vw, 40px); font-weight: 700; letter-spacing: -0.025em; }
.section-lead { margin-top: 14px; font-size: 18px; color: var(--muted); max-width: 64ch; }
.body-text { margin-top: 14px; font-size: 17px; color: var(--muted); max-width: 60ch; }
.aside-note { margin-top: 28px; font-size: 15px; color: var(--muted); max-width: 70ch; }

.tag {
  display: inline-block; vertical-align: 2px; margin-left: 4px; padding: 1px 7px;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  font: 500 11px/1.6 var(--mono); color: var(--muted); white-space: nowrap;
}
.tag--free { border-color: var(--accent); color: var(--accent); }
.tag--war { border-color: var(--war); color: var(--war); }

/* Route: the parts as hops */
.hops { list-style: none; margin: 44px 0 0; padding: 0; counter-reset: hop; }
.hop {
  display: grid; grid-template-columns: 56px 1fr minmax(220px, 300px); gap: 20px; align-items: start;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.hop:last-child { border-bottom: 1px solid var(--line); }
.hop-n {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line-strong); border-radius: 50%; font-size: 14px; font-weight: 600;
  position: relative; background: var(--bg);
}
.hop:not(:last-child) .hop-n::after {
  content: ""; position: absolute; top: 40px; left: 50%; width: 1px; height: calc(100% + 40px);
  background: var(--line-strong); transform: translateX(-0.5px);
}
.hop { position: relative; }
.hop-title { font-size: 19px; font-weight: 600; }
.hop-blocks { margin-top: 4px; font-size: 15px; color: var(--muted); }
.hop-meta { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding-top: 6px; }
.hop-bar { grid-column: 1 / -1; display: block; height: 6px; width: var(--w); background: var(--accent); border-radius: 3px; transform-origin: left; }
.hop-range { font-size: 14px; }
.hop-count { font-size: 14px; color: var(--muted); text-align: right; }
.js .hops .hop-bar { transform: scaleX(0); transition: transform 0.9s var(--ease); }
.js .hops.is-visible .hop-bar { transform: scaleX(1); }

/* A step */
.step-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.anatomy { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; counter-reset: a; }
.anatomy li { counter-increment: a; }
.anatomy h3 { font-size: 16px; font-weight: 600; }
.anatomy h3::before { content: counter(a) ". "; font-family: var(--mono); color: var(--accent); }
.anatomy p { margin-top: 4px; font-size: 15px; color: var(--muted); }
.code-file { margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; position: sticky; top: 96px; }
.code-name { padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.code { margin: 0; padding: 16px; overflow-x: auto; font: 400 13.5px/1.7 var(--mono); }
.code code { background: none; padding: 0; font-size: inherit; }

/* Lab nodes: a two-column sheet */
.nodes { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }
.nodes li { padding: 18px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; }
.nodes h3 { font-size: 17px; font-weight: 600; }
.nodes p { grid-column: 1; font-size: 15px; color: var(--muted); }
.nodes .nodes-src { grid-column: 2; grid-row: 1 / span 2; font-size: 12.5px; color: var(--accent); text-align: right; max-width: 18ch; }

/* Syllabus */
.syl-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 16px 24px; margin-top: 36px; }
.syl-search { flex: 1 1 320px; max-width: 420px; }
.syl-count { font-size: 14px; color: var(--muted); min-height: 22px; padding-bottom: 12px; }
.syl-tools .link-btn { margin-left: auto; padding-bottom: 12px; }
.syl-none { margin-top: 24px; color: var(--muted); }
.syl { margin-top: 28px; display: grid; gap: 36px; }
.syl-part[hidden] { display: none; }
.syl-part-title { font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.syl-part-title .mono { color: var(--accent); margin-right: 6px; }
.syl-block { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 8px; }
.syl-block[hidden] { display: none; }
.syl-block summary {
  display: grid; grid-template-columns: 36px 1fr auto auto; gap: 16px; align-items: center;
  padding: 14px 18px; cursor: pointer; list-style: none;
}
.syl-block summary::-webkit-details-marker { display: none; }
.syl-block summary:hover .syl-name { color: var(--accent); }
.syl-letter {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r);
  background: var(--tint); font-weight: 600; font-size: 14px;
}
.syl-block[open] .syl-letter { background: var(--accent); color: var(--accent-ink); }
.syl-name { font-weight: 600; font-size: 17px; transition: color 0.2s; }
.syl-range { font-size: 13px; color: var(--muted); }
.syl-cnt { font-size: 13px; color: var(--muted); min-width: 72px; text-align: right; }
.syl-lab { padding: 0 18px 0 70px; font-size: 14px; color: var(--muted); }
.syl-steps { list-style: none; margin: 10px 0 0; padding: 4px 18px 18px 70px; columns: 2; column-gap: 40px; }
.syl-steps li { display: flex; gap: 12px; padding: 5px 0; font-size: 15px; break-inside: avoid; }
.syl-steps li[hidden] { display: none; }
.syl-n { font-size: 13px; color: var(--muted); padding-top: 2px; flex: none; }

/* Certification map */
.cert-scroll { margin-top: 36px; overflow-x: auto; position: relative; }
.cert { border-collapse: separate; border-spacing: 4px; min-width: 760px; }
.cert th { font-size: 14px; font-weight: 500; color: var(--muted); }
.cert thead th { font-size: 13px; text-align: center; padding-bottom: 4px; }
.cert tbody th { text-align: left; padding-right: 16px; white-space: nowrap; color: var(--text); }
.cert td { width: 26px; height: 26px; border-radius: 4px; background: var(--tint); }
.cert td.on { background: var(--accent); }

/* FAQ */
.faq { margin-top: 32px; }
.faq-item { border-top: 1px solid var(--line-strong); }
.faq-item:last-child { border-bottom: 1px solid var(--line-strong); }
.faq-item summary {
  display: flex; justify-content: space-between; gap: 16px; padding: 18px 0;
  font-weight: 600; font-size: 17px; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font: 400 22px/1 var(--mono); color: var(--accent); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 0 20px; color: var(--muted); max-width: 66ch; }

/* Waitlist */
.waitlist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font-size: 14px; color: var(--muted); }
.footer-legal { display: flex; gap: 18px; }
.footer-legal a { color: var(--muted); }
.footer-copy { margin-left: auto; }

/* Scroll reveal, only with JS and motion allowed */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js .hops .hop-bar { transform: none; transition: none; }
}

/* Responsive */
@media (max-width: 1020px) {
  .site-nav { display: none; }
  .hero-grid, .step-grid, .waitlist-grid { grid-template-columns: 1fr; gap: 40px; }
  .code-file { position: static; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .header-tools .btn { display: none; }
  .hero { padding: 40px 0 56px; }
  .section { padding: 64px 0; }
  .field-row, .calc-inputs, .anatomy, .nodes { grid-template-columns: 1fr; }
  .calc { padding: 18px; }
  .bits { font-size: 12.5px; padding: 10px 8px; }
  .hop { grid-template-columns: 48px 1fr; }
  .hop-meta { grid-column: 2; }
  .syl-block summary { grid-template-columns: 32px 1fr auto; gap: 12px; padding: 12px 14px; }
  .syl-cnt { display: none; }
  .syl-lab, .syl-steps { padding-left: 14px; padding-right: 14px; }
  .syl-steps { columns: 1; }
  .syl-tools .link-btn { margin-left: 0; }
  .footer-copy { margin-left: 0; }
}

/* Grid children may shrink below their content (the code block and the cert
   table scroll inside their own boxes instead of widening the page). */
.hero-grid > *, .step-grid > *, .waitlist-grid > *, .wrap > * { min-width: 0; }
