/* badge.virtualshack.io — shared shell
 *
 * Palette rule (docs/web-content-plan.md "Design language"): parent-site chrome
 * from virtualshack.io (hugo-coder dark: #212121 / #dadada / #42a5f5) with the
 * badge's mint #3ddc97 kept as the sub-brand accent. The `//` heading motif
 * mirrors the device OLED (// home, // storage, // options) — that through-line
 * from screen → page → docs is the brand, keep it.
 *
 * Parent site is colorscheme-auto, so we honour prefers-color-scheme too.
 */

:root {
  --bg: #212121;          /* virtualshack.io dark bg */
  --fg: #dadada;
  --link: #42a5f5;        /* parent accent */
  --accent: #3ddc97;      /* badge sub-brand mint */
  --panel: #2b2b2b;
  --rule: #424242;
  --code-bg: #4f4f4f;
  --muted: #8b949e;
  --warn: #ffb454;
  --err: #ff5370;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa;
    --fg: #212121;
    --link: #1565c0;
    --accent: #0f9d63;    /* mint darkened for contrast on white */
    --panel: #efefef;
    --rule: #d5d5d5;
    --code-bg: #e4e4e4;
    --muted: #5c6570;
    --warn: #a05e00;
    --err: #c62828;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.65 ui-monospace, Menlo, Consolas, monospace;
  -webkit-text-size-adjust: 100%;
}

.wrapper { max-width: 780px; margin: 0 auto; padding: 32px 20px 64px; }

a { color: var(--link); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3 { line-height: 1.3; font-weight: 700; }
h1 { font-size: 26px; margin: 0 0 6px; color: var(--accent); letter-spacing: .5px; }
h2 { font-size: 18px; margin: 40px 0 12px; color: var(--accent); scroll-margin-top: 16px; }
h3 { font-size: 15px; margin: 24px 0 8px; color: var(--fg); }

p, li { margin: 0 0 12px; }
ul, ol { padding-left: 22px; }

code {
  background: var(--code-bg);
  color: var(--fg);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: .92em;
}

pre {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;          /* diagrams scroll themselves; the page never does */
  font-size: 13px;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

.tagline { color: var(--muted); margin: 0 0 4px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 36px 0; }

/* callouts — one shape, three severities */
.note {
  border-left: 3px solid var(--link);
  background: var(--panel);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
}
.note.warn { border-left-color: var(--warn); }
.note.stop { border-left-color: var(--err); }
.note :last-child { margin-bottom: 0; }
.note b { color: var(--fg); }

/* the big call-to-action to the provisioning app */
.cta {
  display: inline-block;
  margin: 8px 0 4px;
  padding: 12px 20px;
  background: var(--accent);
  color: #08110b;
  font-weight: 700;
  border-radius: 8px;
}
.cta:hover, .cta:focus { text-decoration: none; opacity: .9; }

/* table of contents */
.toc { border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px 6px; margin: 24px 0; }
.toc ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 24px; }
.toc li { margin: 0 0 6px; }
@media (max-width: 520px) { .toc ul { columns: 1; } }

/* ── photos ──────────────────────────────────────────────────────────────────
   Usage:
     <figure>
       <img src="assets/photo-badge.jpg" alt="a badge, screen lit, showing HOME"
            width="1600" height="1200" loading="lazy" decoding="async">
       <figcaption>the whole point</figcaption>
     </figure>
   Always set width/height (the real pixel dimensions) — the browser reserves the
   space before the file loads, so nothing jumps as photos stream in on con wifi.
   loading="lazy" on everything below the fold; NOT on the first/hero image, which
   should load immediately. A faint border keeps a dark photo from bleeding into
   the dark page background. */
img { max-width: 100%; height: auto; display: block; }

figure {
  margin: 24px 0;
}
figure img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);      /* shows while the image is still decoding */
}
figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Two or more photos side by side; collapses to one column on a phone. */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.shots figure { margin: 0; }

dl { margin: 0; }
dt { color: var(--accent); margin-top: 16px; }
dd { margin: 4px 0 0; }

footer {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 13px;
}

/* offline/browser banners injected by JS */
#banner { display: none; }
#banner.show { display: block; }
