:root {
  color-scheme: dark;
  --bg: #071016;
  --surface: #101c24;
  --surface-2: #162832;
  --text: #f7fafc;
  --muted: #b5c5ce;
  --blue: #4eace9;
  --blue-strong: #7bc8f8;
  --line: #2b424f;
  --warning: #ffd166;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.65; }
a { color: var(--blue-strong); }
a:hover { color: #b6e2ff; }
button, input { font: inherit; }

.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: 100;
  transform: translateY(-180%); padding: .65rem 1rem; border-radius: .5rem;
  background: var(--blue); color: #061018; font-weight: 800;
}
.skip-link:focus { transform: none; }

.hero {
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 80% 20%, #123b52 0, transparent 38%), linear-gradient(145deg, #071016 25%, #0d202b 100%);
}
.hero-inner { max-width: var(--max); margin: auto; padding: clamp(3rem, 8vw, 7rem) 1.25rem 3.5rem; }
.brand { width: min(390px, 76vw); height: auto; }
.eyebrow { margin: 2.2rem 0 .4rem; color: var(--blue-strong); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { max-width: 880px; margin: 0; font-size: clamp(2.5rem, 7vw, 5.5rem); line-height: 1.02; letter-spacing: -.04em; }
.lede { max-width: 760px; margin: 1.25rem 0 0; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.button { display: inline-flex; min-height: 48px; align-items: center; padding: .65rem 1rem; border: 1px solid var(--blue); border-radius: .65rem; text-decoration: none; font-weight: 800; }
.button.primary { background: var(--blue); color: #071016; }

.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 3rem; max-width: var(--max); margin: auto; padding: 2rem 1.25rem 5rem; }
.toc { position: sticky; top: 1rem; align-self: start; max-height: calc(100vh - 2rem); overflow: auto; }
.toc h2 { margin-top: 0; font-size: .8rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.toc nav { display: grid; gap: .15rem; }
.toc a { padding: .32rem .55rem; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a[aria-current="true"] { border-left-color: var(--blue); color: var(--text); background: #10222d; }
.search { width: 100%; margin: 0 0 1rem; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); color: var(--text); }
.search:focus { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); border-color: var(--blue); }

main { min-width: 0; }
.doc-section { padding: 1rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.doc-section:last-child { border-bottom: 0; }
h2 { margin: 0 0 .8rem; font-size: clamp(1.75rem, 4vw, 2.7rem); line-height: 1.15; }
h3 { margin: 2rem 0 .55rem; font-size: 1.35rem; line-height: 1.25; }
p, li { max-width: 78ch; }
.note { margin: 1.25rem 0; padding: 1rem 1.1rem; border-left: 4px solid var(--blue); background: var(--surface); border-radius: 0 .6rem .6rem 0; }
.warning { border-left-color: var(--warning); }
.meta { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.card { padding: 1.1rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); }
.card h3 { margin-top: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { position: relative; padding: .9rem 1rem .9rem 3.5rem; margin: .65rem 0; background: var(--surface); border-radius: .65rem; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 1rem; top: .85rem; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--blue); color: #071016; font-weight: 900; }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--line); border-radius: .75rem; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: .75rem .85rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: #173649; color: #fff; }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #13232c; }

.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.4rem 0; }
figure { margin: 0; padding: .75rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--surface); }
figure img { display: block; width: 100%; height: auto; max-height: 680px; object-fit: contain; border-radius: .45rem; background: #000; cursor: zoom-in; }
figure img:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; }
figcaption { margin-top: .65rem; color: var(--muted); font-size: .92rem; }
.shot-dialog { width: min(96vw, 1100px); max-width: none; max-height: 96vh; padding: 3rem 1rem 1rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--surface); color: var(--text); }
.shot-dialog::backdrop { background: rgb(0 0 0 / 88%); }
.shot-dialog img { display: block; width: auto; max-width: 100%; max-height: calc(96vh - 7rem); margin: auto; border-radius: .45rem; background: #000; }
.shot-dialog p { margin: .75rem auto 0; text-align: center; color: var(--muted); }
.shot-dialog-close { position: absolute; top: .55rem; right: .7rem; min-height: 40px; padding: .35rem .7rem; border: 1px solid var(--blue); border-radius: .5rem; background: var(--surface-2); color: var(--text); cursor: pointer; }
kbd { padding: .12rem .38rem; border: 1px solid #68808d; border-bottom-width: 2px; border-radius: .3rem; background: #172731; color: #fff; font-family: inherit; font-weight: 750; white-space: nowrap; }
code { overflow-wrap: anywhere; color: #bce5ff; }
.back-top { display: inline-block; margin-top: 1rem; font-weight: 700; }
footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { max-width: var(--max); margin: auto; padding: 2rem 1.25rem; }
[hidden] { display: none !important; }

@media (max-width: 820px) {
  .layout { display: block; }
  .toc { position: static; max-height: none; margin-bottom: 2rem; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); }
  .toc nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .shots, .toc nav { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 2.5rem; }
  th, td { padding: .65rem; }
}
@media print {
  :root { color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #f2f5f7; --text: #111; --muted: #444; --line: #bbb; --blue-strong: #075f98; }
  .hero { background: none; }
  .hero-inner { padding: 1cm 0; }
  .brand { filter: invert(1); }
  .layout { display: block; max-width: none; padding: 0; }
  .toc, .hero-actions, .back-top, .shot-dialog { display: none; }
  .doc-section { break-before: page; }
  .doc-section:first-child { break-before: auto; }
  figure, table, .card { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
