/* Shared styles for the BlastHood user guide (docs/*.html). */
:root {
  --ground: #F2F5F3;
  --surface: #FFFFFF;
  --shot-ground: #060908;
  --line: #D6DFDA;
  --line-strong: #BCC8C1;
  --ink: #0E1512;
  --ink-2: #46554D;
  --ink-3: #6C7A72;
  --brand: #15803D;
  --brand-soft: #E3F4E8;
  --warn: #8A5A00;
  --warn-soft: #FBF0D9;
  --danger: #B42318;
  --danger-soft: #FBE7E5;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #060908;
    --surface: #0B100E;
    --line: #1B2420;
    --line-strong: #29342F;
    --ink: #ECF2EE;
    --ink-2: #A3B1A9;
    --ink-3: #6F7D76;
    --brand: #4ADE80;
    --brand-soft: #0E2A1A;
    --warn: #F5B942;
    --warn-soft: #2A2110;
    --danger: #F87171;
    --danger-soft: #2B1414;
  }
}
:root[data-theme="dark"] {
  --ground: #060908;
  --surface: #0B100E;
  --line: #1B2420;
  --line-strong: #29342F;
  --ink: #ECF2EE;
  --ink-2: #A3B1A9;
  --ink-3: #6F7D76;
  --brand: #4ADE80;
  --brand-soft: #0E2A1A;
  --warn: #F5B942;
  --warn-soft: #2A2110;
  --danger: #F87171;
  --danger-soft: #2B1414;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--brand); }

/* Top navigation */
.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topnav .in {
  max-width: 1120px;
  margin-inline: auto;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
}
.topnav .home { font-weight: 700; color: var(--ink); text-decoration: none; margin-right: 8px; }
.topnav .links { display: flex; flex-wrap: wrap; gap: 4px; }
.topnav .links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
}
.topnav .links a:hover { color: var(--ink); background: var(--brand-soft); }
.topnav .links a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  display: grid;
  gap: 48px;
  padding: 40px 20px 72px;
}

header.intro { display: grid; gap: 20px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0;
}
h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-wrap: balance;
}
.lede { margin: 0; max-width: 72ch; color: var(--ink-2); }
h2 { margin: 0; font-size: 20px; letter-spacing: -0.015em; font-weight: 600; text-wrap: balance; }

.spec {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin: 0;
}
.spec div { background: var(--surface); padding: 12px 14px; display: grid; gap: 2px; }
.spec dt { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.spec dd { margin: 0; font-family: var(--mono); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.fine { margin: 0; font-size: 13px; color: var(--ink-3); max-width: 80ch; }

/* Numbered "watch for" list */
.watch { display: grid; gap: 14px; }
.watch ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: w; }
.watch li {
  counter-increment: w;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.watch li::before {
  content: counter(w);
  font-family: var(--mono);
  font-size: 13px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--danger-soft);
  color: var(--danger);
}
.watch li strong { display: block; font-weight: 600; }
.watch li span { color: var(--ink-2); }

/* Steps: plain numbered how-to */
.howto ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; color: var(--ink-2); }
.howto { display: grid; gap: 12px; }

/* Tour: screenshot + notes */
.tour { display: grid; gap: 56px; }
.tour > h2 { margin-bottom: -32px; }
.stop {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.stop > div:first-child { display: grid; gap: 14px; align-content: start; }
.stop.wide { grid-template-columns: 1fr; gap: 16px; }
.stop.wide .notes { position: static; max-width: 80ch; }
.shot {
  margin: 0;
  background: var(--shot-ground);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 10px;
}
/* Never wider than the screenshot itself: scaling up only blurs it. */
.shot img { display: block; width: auto; max-width: 100%; height: auto; margin-inline: auto; border-radius: 6px; cursor: zoom-in; }
.shot img:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.notes { display: grid; gap: 12px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 64px); }
.notes h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.notes p { margin: 0; color: var(--ink-2); }
.notes ul { margin: 0; padding-left: 18px; color: var(--ink-2); display: grid; gap: 6px; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--brand-soft);
  color: var(--ink);
  padding: 1px 5px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.chip {
  justify-self: start;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.chip.ok { color: var(--brand); background: var(--brand-soft); }
.chip.warn { color: var(--warn); background: var(--warn-soft); }
.chip.bad { color: var(--danger); background: var(--danger-soft); }

details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
summary { cursor: pointer; padding: 16px 18px; font-weight: 600; }
summary:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
details .shot { margin: 0 12px 12px; }

/* Index: category cards */
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cat {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}
.cat:hover { border-color: var(--brand); }
.cat img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; border-radius: 6px; background: var(--shot-ground); }
.cat strong { font-size: 16px; }
.cat span { color: var(--ink-2); font-size: 14px; }
.flow { display: grid; gap: 12px; }
.flow ol { margin: 0; padding-left: 22px; color: var(--ink-2); display: grid; gap: 6px; }

.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pager a { font-weight: 600; text-decoration: none; }

@media (max-width: 820px) {
  .spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stop { grid-template-columns: 1fr; gap: 16px; }
  .notes { position: static; }
  .tour { gap: 44px; }
  .tour > h2 { margin-bottom: -24px; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .spec, .cats { grid-template-columns: 1fr; }
}

/* Zoom: a click on a screenshot shows it at full size; any click closes it. */
.zoom {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  overflow: auto;
  padding: 24px;
  background: rgba(3, 6, 5, 0.86);
  cursor: zoom-out;
  overscroll-behavior: contain;
}
.zoom[hidden] { display: none; }
/* margin: auto, not place-items: center, so a screenshot taller than the
   window starts at its top and scrolls instead of being cut off above. */
.zoom img {
  display: block;
  margin: auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
html.zoom-open { overflow: hidden; }
@media (max-width: 640px) { .zoom { padding: 12px; } }
