/* Layout: one long scroll that goes from the surface (light bands) down to the dive (a deep marine band), then back to reference material: cameras, keys, FAQ. */
:root {
  --bg: #F2F6F7;          /* surface water: pale, slightly blue */
  --surface: #FFFFFF;
  --ink: #0E2430;         /* deep marine */
  --muted: #4E6470;
  --line: #D3DEE3;
  --accent: #EE5A0E;      /* SMB orange: the surface marker buoy */
  --accent-ink: #A9400A;  /* accent for text on light grounds */
  --on-accent: #1C0C02;
  --deep: #0A1F2B;        /* the dive band, same in both themes */
  --deep-2: #12303F;
  --deep-fg: #DCE9EE;
  --deep-muted: #8FAAB7;
  --ok: #1E7F5C;
  --ok-bg: #E2F3EC;
  --warn: #8A5A00;
  --warn-bg: #FBF0D6;
  --na: #5A6A73;
  --na-bg: #E8EDF0;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 1.2rem + 2.6vw, 2.75rem);
  --step-4: clamp(2.4rem, 1.2rem + 4.6vw, 4.4rem);

  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --wrap: 1120px;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09161D; --surface: #0F202A; --ink: #E2ECEF; --muted: #93A8B3; --line: #1F3644;
    --accent: #FF7631; --accent-ink: #FF9A63; --on-accent: #1C0C02;
    --deep: #051018; --deep-2: #0D2532; --deep-fg: #DCE9EE; --deep-muted: #8FAAB7;
    --ok: #5FD1A4; --ok-bg: #0F3328; --warn: #F2C46B; --warn-bg: #3A2C0E; --na: #A4B3BB; --na-bg: #1A2B35;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09161D; --surface: #0F202A; --ink: #E2ECEF; --muted: #93A8B3; --line: #1F3644;
  --accent: #FF7631; --accent-ink: #FF9A63; --on-accent: #1C0C02;
  --deep: #051018; --deep-2: #0D2532; --deep-fg: #DCE9EE; --deep-muted: #8FAAB7;
  --ok: #5FD1A4; --ok-bg: #0F3328; --warn: #F2C46B; --warn-bg: #3A2C0E; --na: #A4B3BB; --na-bg: #1A2B35;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }

a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.band { padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.wrap { max-width: var(--wrap); margin-inline: auto; }

h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; line-height: 1.05; }
h1 { font-size: var(--step-4); font-weight: 850; font-stretch: 118%; letter-spacing: -0.02em; }
h2 { font-size: var(--step-3); font-weight: 800; font-stretch: 112%; letter-spacing: -0.015em; }
h3 { font-size: var(--step-1); font-weight: 700; font-stretch: 100%; line-height: 1.2; }
p { margin: 0; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 58ch; line-height: 1.5; }
.eyebrow { font-family: var(--f-mono); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-ink); }
kbd {
  font-family: var(--f-mono); font-size: 0.85em; padding: 0.05em 0.45em; border-radius: 5px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--surface); color: var(--ink); white-space: nowrap;
}
code { font-family: var(--f-mono); font-size: 0.92em; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 800; font-stretch: 110%; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.nav { display: flex; gap: 20px; margin-left: auto; font-size: var(--step--1); }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav .opt { display: none; } }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600;
  padding: 0.8em 1.15em; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: transform .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { border-color: var(--on-accent); }
.btn small { font-family: var(--f-mono); font-weight: 400; font-size: 0.75rem; opacity: 0.8; }
.btn svg { width: 18px; height: 18px; flex: none; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* Hero */
.hero { padding-block: 56px 40px; }
.hero .wrap { display: grid; gap: 36px; }
.hero-text { display: grid; gap: 22px; }
.status { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--f-mono); font-size: 0.8rem; color: var(--muted); }
.status span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

.viewer { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; background: #0B3D5C; border: 1px solid var(--line); touch-action: pan-y; }
.viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.viewer .hdr { clip-path: inset(0 0 0 var(--split, 50%)); }
.handle { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 2px; margin-left: -1px; background: #FFFFFF; box-shadow: 0 0 0 1px rgba(0,0,0,.25); pointer-events: none; }
.handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #FFFFFF; box-shadow: 0 2px 10px rgba(0,0,0,.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E2430' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 22px;
}
.viewer:focus-within .handle::after { outline: 3px solid var(--accent); outline-offset: 2px; }
.viewer input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.tag {
  position: absolute; top: 12px; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 6px; background: rgba(6, 22, 31, 0.62); color: #E6F0F3; pointer-events: none; white-space: nowrap;
}
.tag.l { left: 12px; } .tag.r { right: 12px; }
.tele {
  position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; max-width: calc(100% - 24px);
  font-family: var(--f-mono); font-size: 0.74rem; color: #E6F0F3; background: rgba(6, 22, 31, 0.55); padding: 6px 10px; border-radius: 6px; pointer-events: none;
}
.tele b { font-weight: 500; color: #FFB48A; }
.caption { font-size: 0.8rem; color: var(--muted); margin-top: 10px; }
@media (max-width: 520px) { .tele .opt { display: none; } }

@media (min-width: 980px) {
  .hero .wrap { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: center; gap: 48px; }
}

/* Generic section */
.section { padding-block: 72px; }
.section-head { display: grid; gap: 14px; margin-bottom: 36px; max-width: 760px; }

/* Gap section */
.gap-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.gap-item { display: grid; gap: 10px; align-content: start; padding-top: 16px; border-top: 2px solid var(--ink); }
.gap-item p { color: var(--muted); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; }
.steps li::before { content: counter(s); font-family: var(--f-display); font-weight: 850; font-stretch: 125%; font-size: 2rem; line-height: 1; color: var(--accent-ink); }
.steps p { color: var(--muted); }

/* Features */
.features { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.feature { background: var(--bg); padding: 26px; display: grid; gap: 10px; align-content: start; }
.feature p { color: var(--muted); }
.feature .meta { font-family: var(--f-mono); font-size: 0.78rem; color: var(--accent-ink); }

/* Archive comparison */
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
thead th { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
tbody th { font-weight: 600; width: 30%; }
td.us { color: var(--ink); font-weight: 500; }
td.them { color: var(--muted); }
.note { font-size: 0.85rem; color: var(--muted); margin-top: 14px; max-width: 70ch; }

/* Dive band */
.dive { background: var(--deep); color: var(--deep-fg); position: relative; overflow: hidden; }
.dive .eyebrow { color: #FF9A63; }
.dive .lede, .dive p { color: var(--deep-muted); }
.dive h2, .dive h3 { color: #F2F8FA; }
.dive-grid { display: grid; gap: 36px; }
@media (min-width: 900px) { .dive-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: start; } }
.stat { display: grid; gap: 8px; padding: 26px; border-radius: var(--radius); background: var(--deep-2); border: 1px solid rgba(255,255,255,0.08); }
.stat .num { font-family: var(--f-display); font-weight: 850; font-stretch: 125%; font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); line-height: 1; color: #F2F8FA; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25em; }
.stat .num .arrow { color: #FF9A63; font-stretch: 100%; }
.stat .num .unit { font-family: var(--f-mono); font-size: 0.35em; font-weight: 500; color: var(--deep-muted); }
.preset { font-family: var(--f-mono); font-size: 0.85rem; display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; padding: 18px 20px; border-radius: var(--radius); border: 1px dashed rgba(255,255,255,0.18); color: var(--deep-fg); }
.preset dt { color: var(--deep-muted); }
.preset dd { margin: 0; font-variant-numeric: tabular-nums; }
.dive-points { display: grid; gap: 18px; margin-top: 8px; }
.dive-points div { display: grid; gap: 6px; }
.dive .kbd-dark kbd { background: var(--deep-2); border-color: rgba(255,255,255,0.2); color: var(--deep-fg); }

/* Cameras */
.pill { display: inline-block; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.exp { color: var(--warn); background: var(--warn-bg); }
.pill.part { color: var(--na); background: var(--na-bg); }
.cams td:nth-child(2) { width: 150px; }

/* Keys */
.keys { display: grid; gap: 10px 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.key { display: flex; justify-content: space-between; gap: 16px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.key span:last-child { text-align: right; flex: none; }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font-weight: 600; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-family: var(--f-mono); font-size: 1.3rem; color: var(--accent-ink); }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 0 20px; color: var(--muted); max-width: 66ch; display: grid; gap: 10px; }

/* Help */
.help { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.help-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 12px; align-content: start; background: var(--surface); }
.help-card p { color: var(--muted); }
.help-card a { color: var(--accent-ink); font-weight: 600; text-underline-offset: 3px; }

/* Footer */
footer { border-top: 1px solid var(--line); }
footer .wrap { padding-block: 36px 48px; display: grid; gap: 18px; font-size: 0.88rem; color: var(--muted); }
footer .row { display: flex; flex-wrap: wrap; gap: 10px 28px; }
footer a { color: var(--ink); }

/* Routes from the hub to the audience pages */
.routes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.route {
  display: grid; gap: 8px; align-content: start; text-decoration: none; padding: 22px 24px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); transition: border-color .15s ease, transform .15s ease;
}
.route:hover { border-color: var(--accent); transform: translateY(-1px); }
.route .who { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.route h3 { display: flex; align-items: baseline; gap: 10px; }
.route h3 .go { color: var(--accent-ink); font-family: var(--f-mono); font-weight: 500; }
.route p { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .route { transition: none; } .route:hover { transform: none; } }
.section.tight-top { padding-top: 0; }
.section.routes-band { padding-block: 8px 72px; }
.stack { display: grid; gap: 18px; align-content: start; }
.inline-link { color: #FFB48A; font-weight: 600; text-underline-offset: 3px; }
.text-link { color: var(--accent-ink); font-weight: 600; text-underline-offset: 3px; }
.cam-sub { font-weight: 400; color: var(--muted); }

/* Divers page: before-the-dive checklist */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: c; max-width: 820px; }
.checklist li { counter-increment: c; display: grid; grid-template-columns: 2.4rem 1fr; gap: 6px 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.checklist li::before { content: counter(c); grid-row: span 2; font-family: var(--f-display); font-weight: 850; font-stretch: 125%; font-size: 1.7rem; line-height: 1; color: var(--accent-ink); }
.checklist h3 { font-size: 1.1rem; }
.checklist p { color: var(--muted); }
.honest { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; color: var(--muted); max-width: 70ch; }

.gap-grid.pairs { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
