/* BroadbandBackup.co.uk — design system
   Ink navy + "online" green + "failover" amber. System fonts only, no external requests. */
:root {
  --ink: #0a1628;
  --ink-2: #12223b;
  --ink-3: #1b2f4f;
  --paper: #f5f7fa;
  --card: #ffffff;
  --line: #e2e7ee;
  --line-2: #cfd7e2;
  --text: #15233b;
  --muted: #56657c;
  --green: #19c58a;
  --green-ink: #067a55;
  --green-soft: #e3f7ef;
  --amber: #f5a524;
  --amber-ink: #8f5600;
  --amber-soft: #fff3dd;
  --red: #ef4b4b;
  --red-soft: #fde8e8;
  --blue-soft: #e8eef8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10, 22, 40, .06), 0 8px 24px -12px rgba(10, 22, 40, .18);
  --shadow-lg: 0 2px 4px rgba(10, 22, 40, .06), 0 24px 48px -20px rgba(10, 22, 40, .35);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--text);
  background: var(--paper); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--green-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.015em; color: var(--ink); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.35rem); letter-spacing: -.03em; font-weight: 800; }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.1vw, 2.05rem); font-weight: 750; }
h3, .h3 { font-size: 1.18rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 24px; height: 24px; flex: none; }
.icon-sm { width: 18px; height: 18px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--amber); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

/* ---------- header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(10, 22, 40, .86);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06); transition: box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .7); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 650; letter-spacing: -.01em; }
.brand:hover { color: #fff; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 1.08rem; white-space: nowrap; }
.brand-name b { color: var(--green); font-weight: 800; }
.brand-tld { color: rgba(255, 255, 255, .5); font-weight: 500; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 8px 12px; border-radius: 999px; color: rgba(255, 255, 255, .78);
  text-decoration: none; font-size: .93rem; font-weight: 550; transition: color .2s, background .2s;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.main-nav a[aria-current="page"] { color: var(--ink); background: var(--green); }
.mobile-nav { display: none; margin-left: auto; position: relative; }
.mobile-nav summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary:hover { background: rgba(255, 255, 255, .08); }
.burger, .burger i, .burger::before, .burger::after { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.burger { position: relative; background: transparent; height: 14px; }
.burger i { position: absolute; top: 6px; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: 0; } .burger::after { bottom: 0; }
.mobile-nav[open] .burger i { opacity: 0; }
.mobile-nav[open] .burger::before { transform: translateY(6px) rotate(45deg); }
.mobile-nav[open] .burger::after { transform: translateY(-6px) rotate(-45deg); }
.mobile-nav nav {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(86vw, 320px); background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow-lg);
  animation: drop .22s var(--ease);
}
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav a { display: block; padding: 12px 14px; color: #fff; text-decoration: none; border-radius: 10px; font-weight: 550; }
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { background: rgba(255, 255, 255, .07); }
.mobile-nav a[aria-current="page"] { color: var(--green); }
.mobile-nav .sep { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 6px; padding-top: 6px; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--green), #6ee7b7); box-shadow: 0 0 12px rgba(25, 197, 138, .7); }
.page-home .progress, .page-info .progress { display: none; }

/* ---------- shared bits */
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .86);
  font-size: .82rem; font-weight: 600; letter-spacing: .01em;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(25, 197, 138, .6); animation: ping 2.4s infinite; flex: none; }
.chip-down .dot { background: var(--red); box-shadow: 0 0 0 0 rgba(239, 75, 75, .6); animation-name: ping-red; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(25, 197, 138, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(25, 197, 138, 0); } }
@keyframes ping-red { 0% { box-shadow: 0 0 0 0 rgba(239, 75, 75, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(239, 75, 75, 0); } }
.eyebrow { margin: 0 0 18px; }
.kicker { font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--green-ink); font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.section-dark .kicker { color: var(--green); }
.lead { font-size: clamp(1.06rem, 1rem + .35vw, 1.24rem); color: var(--muted); max-width: 62ch; }
.hero .lead, .article-hero .lead, .page-hero .lead { color: rgba(255, 255, 255, .78); }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
}
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 999px; font-weight: 700;
  text-decoration: none; font-size: .98rem; transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s; border: 1px solid transparent;
}
.btn .icon { transition: transform .25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { background: var(--green); color: var(--ink); box-shadow: 0 8px 24px -10px rgba(25, 197, 138, .8); }
.btn-primary:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 12px 28px -10px rgba(25, 197, 138, .9); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.hero .btn-ghost { border-color: rgba(255, 255, 255, .25); color: #fff; }
.hero .btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .06); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }

/* ---------- hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 85% -10%, #163257 0%, transparent 60%), var(--ink); color: #fff; padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 100px); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hl { background: linear-gradient(90deg, var(--green), #8ef0c8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }

/* failover visualization */
.viz {
  position: relative; margin: 0; background: linear-gradient(180deg, rgba(27, 47, 79, .75), rgba(18, 34, 59, .85));
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 22px; padding: 16px 16px 14px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.viz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 4px 6px; }
.viz-title { font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.viz-status { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 650; padding: 5px 11px 5px 9px; border-radius: 999px; background: rgba(25, 197, 138, .12); color: #8ef0c8; transition: background .4s, color .4s; }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); transition: background .3s, box-shadow .3s; }
.viz[data-state="fault"] .viz-status { background: rgba(239, 75, 75, .14); color: #ffb3b3; }
.viz[data-state="fault"] .led { background: var(--red); box-shadow: 0 0 10px var(--red); }
.viz[data-state="backup"] .viz-status, .viz[data-state="restored"] .viz-status { background: rgba(245, 165, 36, .14); color: #ffd48a; }
.viz[data-state="backup"] .led, .viz[data-state="restored"] .led { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.viz-svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz-svg text { fill: rgba(255, 255, 255, .62); font: 600 12px var(--font); letter-spacing: .02em; }
.route { fill: none; stroke-width: 3; stroke-linecap: round; transition: stroke .5s, opacity .5s; }
.route-primary { stroke: var(--green); filter: drop-shadow(0 0 6px rgba(25, 197, 138, .45)); }
.route-backup { stroke: rgba(245, 165, 36, .45); stroke-dasharray: 2 9; }
.viz[data-state="fault"] .route-primary { stroke: var(--red); stroke-dasharray: 10 8; filter: none; opacity: .75; }
.viz[data-state="backup"] .route-primary { stroke: rgba(239, 75, 75, .55); stroke-dasharray: 10 8; filter: none; }
.viz[data-state="restored"] .route-primary { stroke: rgba(25, 197, 138, .6); stroke-dasharray: 10 8; filter: none; animation: dash 1s linear infinite; }
.viz[data-state="backup"] .route-backup, .viz[data-state="restored"] .route-backup { stroke: var(--amber); stroke-dasharray: none; filter: drop-shadow(0 0 6px rgba(245, 165, 36, .5)); }
@keyframes dash { to { stroke-dashoffset: -36; } }
.node circle, .node rect { fill: var(--ink); stroke: rgba(255, 255, 255, .22); stroke-width: 1.5; transition: stroke .4s, fill .4s; }
.node .glyph, .node .glyph circle { fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.node-home circle:not(.halo) { stroke: rgba(255, 255, 255, .35); }
.node .halo { stroke: none; fill: url(#viz-glow); animation: breathe 3.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.viz[data-state="backup"] .halo, .viz[data-state="restored"] .halo { opacity: .55; }
.node-net circle { stroke: rgba(25, 197, 138, .6); }
@keyframes breathe { 50% { transform: scale(1.12); opacity: .6; } }
.node-cabinet rect { stroke: rgba(25, 197, 138, .6); }
.node .fault { opacity: 0; transform: scale(.6); transition: opacity .3s, transform .3s var(--ease); transform-box: fill-box; transform-origin: center; }
.node .fault circle { fill: var(--red); stroke: rgba(255, 255, 255, .9); stroke-width: 2; }
.node .fault path { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.viz[data-state="fault"] .fault, .viz[data-state="backup"] .fault { opacity: 1; transform: none; }
.node-mast rect { stroke: rgba(245, 165, 36, .5); }
.node-mast .wave { fill: none; stroke: var(--amber); stroke-width: 1.7; stroke-linecap: round; opacity: .25; }
.viz[data-state="backup"] .wave, .viz[data-state="restored"] .wave { animation: wave 1.4s ease-in-out infinite; }
.viz[data-state="backup"] .w2, .viz[data-state="restored"] .w2 { animation-delay: .25s; }
@keyframes wave { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.packets circle { fill: #fff; }
.packets circle.p-primary { fill: #b6f5dc; filter: drop-shadow(0 0 4px rgba(25, 197, 138, .9)); }
.packets circle.p-backup { fill: #ffe2a8; filter: drop-shadow(0 0 4px rgba(245, 165, 36, .9)); }
.viz-log { display: grid; grid-template-columns: auto auto 1fr; gap: 6px 22px; font-family: var(--mono); font-size: .76rem; padding: 10px 6px 2px; border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 4px; }
.log-row { display: contents; }
.log-row .k { color: rgba(255, 255, 255, .4); text-transform: uppercase; letter-spacing: .1em; display: none; }
.log-row { display: flex; gap: 8px; align-items: baseline; }
.log-event { grid-column: 1 / -1; }
.log-row .k { display: inline; }
.v { color: rgba(255, 255, 255, .85); transition: color .3s; }
.v-primary { color: #8ef0c8; } .v-backup { color: rgba(255, 255, 255, .6); }
.viz[data-state="fault"] .v-primary, .viz[data-state="backup"] .v-primary { color: #ffb3b3; }
.viz[data-state="backup"] .v-backup, .viz[data-state="restored"] .v-backup { color: #ffd48a; }
.viz[data-state="restored"] .v-primary { color: #8ef0c8; }
.viz-toggle {
  position: absolute; right: 14px; bottom: 44px; width: 34px; height: 34px; border-radius: 50%; display: none; place-items: center;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .8); cursor: pointer;
}
.js .viz-toggle { display: grid; }
.viz-toggle:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.viz-toggle .i-play { display: none; }
.viz-toggle[aria-pressed="true"] .i-play { display: block; }
.viz-toggle[aria-pressed="true"] .i-pause { display: none; }
.viz-note { margin: 8px 4px 0; font-size: .75rem; color: rgba(255, 255, 255, .45); }

/* ---------- sections */
.section { position: relative; padding: clamp(56px, 7vw, 96px) 0; }
.section-tint { background: #edf1f6; }
.section-dark { background: var(--ink); color: #fff; overflow: hidden; }
.section-dark h2 { color: #fff; }
.section-dark .section-lead { color: rgba(255, 255, 255, .7); }
.section-lead { color: var(--muted); max-width: 64ch; margin-bottom: 36px; font-size: 1.06rem; }
.two-col-intro { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.two-col-intro .intro { position: sticky; top: 100px; }
.intro p { color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }

/* legend + matrix */
.legend { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .86rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend li::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.yes { --c: var(--green); --soft: var(--green-soft); --ink-c: var(--green-ink); }
.cond-yes { --c: #6fdcb3; --soft: #eefaf5; --ink-c: var(--green-ink); }
.cond { --c: var(--amber); --soft: var(--amber-soft); --ink-c: var(--amber-ink); }
.maybe { --c: #9aa8bd; --soft: #eef1f6; --ink-c: #45546b; }
.matrix { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 10px; box-shadow: var(--shadow); }
.mx-tabs { display: flex; gap: 4px; padding: 4px; background: #eef2f7; border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.no-js .mx-tabs { display: none; }
.mx-tabs button {
  flex: 1 0 auto; border: 0; background: transparent; font: inherit; font-size: .9rem; font-weight: 650; color: var(--muted);
  padding: 10px 14px; border-radius: 10px; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s;
}
.mx-tabs button:hover { color: var(--ink); }
.mx-tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(10, 22, 40, .12); }
.mx-panel { padding: 18px 12px 6px; }
.js .mx-panel[hidden] { display: none; }
.no-js .mx-panel + .mx-panel { border-top: 1px solid var(--line); margin-top: 8px; }
.js .mx-panel:not([hidden]) { animation: fade-up .45s var(--ease); }
.mx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mx-head h3 { margin: 0; }
.mx-meter { display: inline-flex; gap: 4px; }
.mx-meter i { width: 22px; height: 8px; border-radius: 4px; background: var(--c); }
.mx-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 14px 0 16px; font-size: .9rem; }
.mx-facts div { display: contents; }
.mx-facts dt { color: var(--muted); font-weight: 600; }
.mx-facts dd { margin: 0; }
.mx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mx-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--soft); border-left: 4px solid var(--c); }
.js .mx-panel:not([hidden]) .mx-row { animation: slide-in .5s var(--ease) both; }
.js .mx-panel .mx-row:nth-child(2) { animation-delay: .05s; } .js .mx-panel .mx-row:nth-child(3) { animation-delay: .1s; }
.js .mx-panel .mx-row:nth-child(4) { animation-delay: .15s; } .js .mx-panel .mx-row:nth-child(5) { animation-delay: .2s; }
.mx-fail { font-weight: 700; color: var(--ink); font-size: .95rem; }
.mx-res { display: flex; flex-direction: column; gap: 2px; }
.mx-badge { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-c); font-weight: 700; }
.mx-text { font-size: .9rem; color: var(--text); }
.mx-source { margin: 12px 12px 6px; font-size: .82rem; color: var(--muted); }
@keyframes slide-in { from { opacity: 0; transform: translateX(-8px); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }

/* guide cards */
.guide-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.guide-grid > li { grid-column: span 2; display: flex; }
.guide-grid > li:nth-child(1), .guide-grid > li:nth-child(2) { grid-column: span 3; }
.guide-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 24px 24px 30px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); color: var(--text); }
.guide-top { display: flex; align-items: center; justify-content: space-between; }
.guide-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--ink); color: var(--green); }
.guide-time { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.guide-kicker { font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green-ink); font-weight: 700; margin-top: 6px; }
.guide-title { font-size: 1.16rem; font-weight: 750; color: var(--ink); line-height: 1.3; letter-spacing: -.01em; }
.guide-text { color: var(--muted); font-size: .95rem; }
.guide-more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--green-ink); padding-top: 8px; }
.guide-card:hover .guide-more .icon { transform: translateX(3px); }
.guide-more .icon { transition: transform .25s var(--ease); }
.guide-route { position: absolute; left: 0; right: 0; bottom: 8px; width: 100%; height: 18px; }
.guide-route path { fill: none; stroke: var(--green); stroke-width: 2; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .9s var(--ease); vector-effect: non-scaling-stroke; }
.guide-route path.alt { stroke: var(--amber); stroke-dasharray: 3 6; stroke-dashoffset: 0; opacity: 0; transition: opacity .4s .3s; }
.guide-card:hover .guide-route path, .guide-card:focus-visible .guide-route path { stroke-dashoffset: 0; }
.guide-card:hover .guide-route path.alt, .guide-card:focus-visible .guide-route path.alt { opacity: 1; }
.guide-card.small { padding: 16px 18px; flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; }
.guide-card.small .guide-icon { width: 40px; height: 40px; border-radius: 12px; }
.guide-card.small .guide-kicker { margin: 0; width: calc(100% - 60px); order: 2; display: none; }
.guide-card.small .guide-title { font-size: 1rem; }
.guide-grid-small { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.guide-grid-small > li, .guide-grid-small > li:nth-child(1), .guide-grid-small > li:nth-child(2) { grid-column: auto; }

/* key numbers */
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; position: relative; }
.fact a {
  position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 22px 22px 24px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09); color: #fff; text-decoration: none; transition: background .3s, border-color .3s, transform .3s var(--ease);
}
.fact a:hover { background: rgba(255, 255, 255, .07); border-color: rgba(25, 197, 138, .45); transform: translateY(-2px); color: #fff; }
.fact-label { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255, 255, 255, .55); }
.fact-value { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.7rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: #fff; }
.fact-value small { font-size: .95rem; font-weight: 600; letter-spacing: 0; color: var(--green); }
.fact-note { color: rgba(255, 255, 255, .7); font-size: .93rem; }
.bars { position: absolute; right: 20px; top: 22px; display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.bars i { width: 4px; border-radius: 2px; background: rgba(25, 197, 138, .35); }
.bars i:nth-child(1) { height: 25%; } .bars i:nth-child(2) { height: 50%; } .bars i:nth-child(3) { height: 75%; } .bars i:nth-child(4) { height: 100%; }
.fact a:hover .bars i { animation: bar 1.2s ease-in-out infinite; background: var(--green); }
.fact a:hover .bars i:nth-child(2) { animation-delay: .1s; } .fact a:hover .bars i:nth-child(3) { animation-delay: .2s; } .fact a:hover .bars i:nth-child(4) { animation-delay: .3s; }
@keyframes bar { 50% { opacity: .35; } }

/* five-question steps */
.steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 14px; counter-reset: s; }
.steps::before { content: ""; position: absolute; left: 21px; top: 24px; bottom: 24px; width: 2px; background: linear-gradient(var(--green), var(--amber)); opacity: .5; border-radius: 2px; }
.steps li { position: relative; padding: 18px 20px 16px 70px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.steps h3 { font-size: 1.05rem; margin: 0 0 4px; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }
.step-n { position: absolute; left: 6px; top: 16px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--green); font-family: var(--mono); font-weight: 700; font-size: .9rem; box-shadow: 0 0 0 5px var(--paper); }

.ticks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); box-shadow: inset 0 0 0 1.5px var(--green); }
.ticks li::after { content: ""; position: absolute; left: 7px; top: 8px; width: 8px; height: 5px; border-left: 2px solid var(--green-ink); border-bottom: 2px solid var(--green-ink); transform: rotate(-45deg); }
.card-cta { background: var(--ink); color: rgba(255, 255, 255, .78); border-radius: 22px; padding: 30px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.card-cta::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(rgba(25, 197, 138, .35), transparent 70%); }
.card-cta h2 { color: #fff; margin-top: 16px; }
.card-cta .guide-icon { background: rgba(255, 255, 255, .08); }

/* ---------- article hero */
.article-hero, .page-hero { position: relative; overflow: hidden; background: radial-gradient(900px 500px at 90% -20%, #163257 0%, transparent 60%), var(--ink); color: #fff; padding: 34px 0 86px; }
.article-hero h1, .page-hero h1 { color: #fff; max-width: 22ch; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); }
.page-hero { padding-bottom: 76px; }
.page-hero h1 { max-width: none; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 26px; font-size: .86rem; color: rgba(255, 255, 255, .55); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: rgba(255, 255, 255, .3); }
.breadcrumbs a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.breadcrumbs a:hover { color: #fff; text-decoration: underline; }
.article-hero .chip .icon { color: var(--green); }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 26px 0 0; font-size: .9rem; }
.article-meta dt { color: rgba(255, 255, 255, .5); font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.article-meta dd { margin: 2px 0 0; font-weight: 650; }
.signal-line { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 60px; display: block; }
.signal-line path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.sl-base { stroke: rgba(25, 197, 138, .25); }
.sl-pulse { stroke: var(--green); stroke-dasharray: 90 1400; animation: travel 6s linear infinite; filter: drop-shadow(0 0 4px rgba(25, 197, 138, .9)); }
.sl-backup { stroke: rgba(245, 165, 36, .5); stroke-dasharray: 2 8; }
@keyframes travel { from { stroke-dashoffset: 1490; } to { stroke-dashoffset: 0; } }

/* ---------- article layout */
.article-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding: 44px 0 30px; align-items: start; }
.toc { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; font-size: .9rem; scrollbar-width: thin; }
.toc summary { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; cursor: pointer; list-style: none; padding: 4px 0 10px; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; transition: color .2s, border-color .2s; }
.toc li a:hover { color: var(--ink); }
.toc li a.active { color: var(--ink); border-left-color: var(--green); font-weight: 650; }
.article-body { min-width: 0; max-width: 760px; }
.prose > p:first-child { font-size: 1.04rem; }
.prose h2 { margin-top: 2.2em; padding-top: .2em; scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.7em; }
.prose > h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--green-ink); }
.prose strong { color: var(--ink); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.5em 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--blue-soft); padding: .1em .35em; border-radius: 5px; }
.cite { font-size: .68em; line-height: 0; margin-left: 1px; }
.cite a { display: inline-block; min-width: 1.5em; padding: .1em .3em; border-radius: 6px; background: var(--blue-soft); color: #3a5378; text-decoration: none; font-weight: 700; text-align: center; transition: background .2s, color .2s; }
.cite a:hover { background: var(--ink); color: #fff; }
.cite + .cite { margin-left: 2px; }
.article-hero .cite a, thead .cite a { background: rgba(255, 255, 255, .14); color: #fff; }
.article-hero .cite a:hover { background: var(--green); color: var(--ink); }
a.ext:not(.src-link)::after { content: "↗"; font-size: .8em; margin-left: 2px; }
.summary { margin: 28px 0 8px; padding: 22px 26px 18px; border-radius: var(--radius); background: var(--ink); color: rgba(255, 255, 255, .86); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.summary::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--green), var(--amber)); }
.summary-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.summary h2 { color: #fff; font-size: 1.1rem; margin: 0; padding: 0; font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.summary ul { list-style: none; padding: 0; margin: 0; }
.summary li { position: relative; padding: 9px 0 9px 26px; border-top: 1px solid rgba(255, 255, 255, .08); }
.summary li:first-child { border-top: 0; }
.summary li::before { content: ""; position: absolute; left: 3px; top: 1.05em; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(25, 197, 138, .8); }
.summary strong { color: #fff; }
.summary a { color: #8ef0c8; }
.summary .cite a { background: rgba(255, 255, 255, .1); color: #fff; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: ping 2.4s infinite; }
.callout { margin: 1.5em 0; padding: 16px 20px; border-left: 4px solid var(--amber); background: var(--amber-soft); border-radius: 0 12px 12px 0; }
.callout p:last-child { margin: 0; }

pre.diagram { margin: 1.5em 0; padding: 18px 20px; background: var(--ink); color: #cfe9df; border-radius: 14px; overflow-x: auto; font-size: .8rem; line-height: 1.7; box-shadow: var(--shadow-lg); border-left: 3px solid var(--green); }
pre.diagram code { font-family: var(--mono); background: none; padding: 0; color: inherit; white-space: pre; }

/* tables */
.table-wrap { margin: 1.6em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 3px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.5; }
table.wide { min-width: 720px; }
thead th { background: var(--ink); color: #fff; font-weight: 650; text-align: left; padding: 12px 14px; font-size: .82rem; letter-spacing: .01em; position: sticky; top: 0; }
thead th a { color: #8ef0c8; }
tbody th, tbody td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; text-align: left; }
tbody th { font-weight: 700; color: var(--ink); background: #fafbfd; }
tbody tr:hover td, tbody tr:hover th { background: #f3f8f6; }
td .cite a, th .cite a { font-size: .95em; }

/* FAQ */
.faq { display: grid; gap: 10px; margin-top: 18px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); transition: border-color .2s; }
.faq-item[open] { border-color: rgba(25, 197, 138, .6); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 1.03rem; }
.faq-icon { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green-soft); }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 8px; top: 12px; width: 10px; height: 2px; background: var(--green-ink); border-radius: 2px; transition: transform .25s var(--ease); }
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0); }
.faq-answer { padding: 0 20px 6px; color: var(--text); }
.faq-item[open] .faq-answer { animation: fade-up .3s var(--ease); }

/* sources */
.sources { margin-top: 2.6em; padding: 22px 24px 10px; background: #eef2f7; border-radius: var(--radius); }
.sources h2 { font-size: 1.05rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; margin-top: 0; }
.source-list { font-size: .86rem; color: var(--muted); padding-left: 1.8em; }
.source-list li { margin: .45em 0; padding: 2px 6px; border-radius: 6px; scroll-margin-top: 100px; transition: background .6s; }
.source-list li:target { background: var(--amber-soft); color: var(--text); }
.src-link { font-weight: 650; word-break: break-word; }
.src-link::after { content: " ↗"; }
.article-note { margin-top: 2em; font-size: .86rem; color: var(--muted); padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: 12px; }
.next-guide { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 16px; margin: 28px 0 0; padding: 20px 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s; }
.next-guide:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.next-label { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--green-ink); font-weight: 700; }
.next-title { grid-row: 2; font-weight: 750; color: var(--ink); font-size: 1.08rem; }
.next-guide .icon { grid-row: 1 / 3; grid-column: 2; color: var(--green-ink); transition: transform .25s var(--ease); }
.next-guide:hover .icon { transform: translateX(4px); }
.related { padding: 50px 0 70px; border-top: 1px solid var(--line); background: #edf1f6; }
.related h2 { font-size: 1.3rem; }
.page-body { padding: 44px 0 70px; }

/* ---------- footer */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .7); padding: 56px 0 26px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr .7fr; gap: 36px; }
.footer-about p { margin: 16px 0 0; max-width: 46ch; }
.status-line { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .76rem; color: rgba(255, 255, 255, .6); }
.footer-h { color: #fff; font-size: .78rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .14em; margin: 6px 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .8rem; color: rgba(255, 255, 255, .5); display: flex; justify-content: space-between; gap: 24px; }
.footer-bottom p { margin: 0; max-width: 80ch; }

/* ---------- reveal-on-scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .guide-grid .reveal:nth-child(2), .js .facts .reveal:nth-child(2), .js .steps .reveal:nth-child(2) { transition-delay: .06s; }
.js .guide-grid .reveal:nth-child(3), .js .facts .reveal:nth-child(3), .js .steps .reveal:nth-child(3) { transition-delay: .12s; }
.js .guide-grid .reveal:nth-child(4), .js .facts .reveal:nth-child(4), .js .steps .reveal:nth-child(4) { transition-delay: .18s; }
.js .guide-grid .reveal:nth-child(5), .js .facts .reveal:nth-child(5), .js .steps .reveal:nth-child(5) { transition-delay: .24s; }
.js .facts .reveal:nth-child(6) { transition-delay: .3s; }

/* ---------- responsive */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .mobile-nav { display: block; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .viz { max-width: 640px; }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-grid > li, .guide-grid > li:nth-child(1), .guide-grid > li:nth-child(2) { grid-column: auto; }
  .guide-grid > li:nth-child(1) { grid-column: 1 / -1; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; padding-top: 24px; }
  .toc { position: static; max-height: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
  .toc details:not([open]) summary { padding-bottom: 4px; }
  .toc summary::after { content: " +"; }
  .toc details[open] summary::after { content: " –"; }
  .two-col-intro, .two-col { grid-template-columns: minmax(0, 1fr); }
  .two-col-intro .intro { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .brand-tld { display: none; }
  .guide-grid, .facts { grid-template-columns: 1fr; }
  .guide-grid > li:nth-child(1) { grid-column: auto; }
  .mx-row { grid-template-columns: 1fr; gap: 4px; }
  .mx-tabs button { flex: 0 0 auto; }
  .viz { padding: 12px 10px 12px; border-radius: 18px; }
  .viz-svg text { font-size: 15px; }
  .viz-toggle { bottom: auto; top: 12px; right: 12px; }
  .viz-top { padding-right: 40px; }
  .viz-title { display: none; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .article-hero { padding-bottom: 72px; }
  .summary { padding: 18px 18px 12px; }
  .sources { padding: 18px 16px 8px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .sl-pulse { display: none; }
}

@media print {
  .site-header, .site-footer, .toc, .related, .progress, .viz-toggle, .signal-line, .next-guide { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .article-hero, .page-hero, .hero { background: #fff; color: #000; padding: 0 0 12pt; }
  .article-hero h1, .page-hero h1, .hero h1 { color: #000; }
  .article-layout { display: block; }
  .summary { background: #fff; color: #000; border: 1px solid #999; box-shadow: none; }
  .summary h2, .summary strong { color: #000; }
  a.ext::after, .src-link::after { content: ""; }
}
