/* Fluxer install page — dark-first, AMOLED-black toggle in the header
   (boot.js sets data-theme on <html> before first paint). */

:root {
  color-scheme: dark;

  --bg: #08090d;
  --surface: #11141c;
  --surface-2: #171b25;
  --surface-3: #1e2330;
  --line: #242a38;
  --line-strong: #333b4d;

  --text: #e9ecf3;
  --text-dim: #a3abbe;
  --text-faint: #6f7889;

  --accent: #7aa2ff;
  --accent-hover: #93b4ff;
  --accent-ink: #060c19;
  --accent-soft: rgba(122, 162, 255, 0.12);
  --accent-ring: rgba(122, 162, 255, 0.45);
  --mint: #63e6be;

  --code-bg: #05070c;
  --code-line: #1c2230;
  --code-text: #dbe3f4;

  --glow-1: rgba(60, 96, 190, 0.5);
  --glow-2: rgba(29, 120, 100, 0.38);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px -18px rgba(0, 0, 0, 0.9);

  --step: 1.5rem;
  --maxw: 820px;
}

[data-theme="amoled"] {
  color-scheme: dark;

  --bg: #000000;
  --surface: #0a0b0e;
  --surface-2: #101218;
  --surface-3: #16181f;
  --line: #1e212b;
  --line-strong: #2b2f3c;

  --text: #dfe3ea;
  --text-dim: #8f96a6;
  --text-faint: #5f6575;

  /* Near-monochrome: hues barely above gray, glows off (pure black stays black). */
  --accent: #76819b;
  --accent-hover: #868fa9;
  --accent-ink: #000000;
  --accent-soft: rgba(118, 129, 155, 0.12);
  --accent-ring: rgba(118, 129, 155, 0.35);
  --mint: #78897f;

  --code-bg: #000000;
  --code-line: #16181f;
  --code-text: #cfd5e0;

  --glow-1: transparent;
  --glow-2: transparent;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 12% -10%, var(--glow-1) 0%, transparent 65%),
    radial-gradient(700px 360px at 92% -6%, var(--glow-2) 0%, transparent 62%);
  opacity: 0.55;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ---------- typography ---------- */

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.muted { color: var(--text-dim); }
.small { font-size: 13.5px; line-height: 1.55; }
.faint { color: var(--text-faint); }

code, kbd, samp, pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

p code,
li code,
td code,
figcaption code,
summary code {
  font-size: 0.875em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  word-break: break-word;
}

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 2px;
}

a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  text-decoration: none;
}

.brand .mark {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 7px;
  background: linear-gradient(140deg, var(--accent), var(--mint));
  display: grid;
  place-items: center;
  color: var(--accent-ink);
}

.brand .mark svg { width: 15px; height: 15px; }

.topbar .spacer { flex: 1; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; }

.theme-toggle .sun { display: none; }
[data-theme="amoled"] .theme-toggle .sun { display: block; }
[data-theme="amoled"] .theme-toggle .moon { display: none; }

/* ---------- hero ---------- */

.hero { padding: 40px 0 8px; }

.hero h1 {
  font-size: clamp(32px, 6vw, 44px);
  margin: 0 0 10px;
}

.hero .lede {
  margin: 0;
  font-size: 17px;
  color: var(--text-dim);
  max-width: 54ch;
}

.instance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 6px 8px 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--text-dim);
  max-width: 100%;
}

.instance-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  flex: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 22%, transparent);
}

.instance-pill code {
  color: var(--text);
  font-size: 13px;
  background: none;
  border: 0;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instance-pill .mini {
  border: 0;
  background: var(--surface-3);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  flex: none;
  transition: background 0.15s, color 0.15s;
}

.instance-pill .mini:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- platform picker ---------- */

.picker { margin: 32px 0 20px; }

.picker-label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
}

.tabgroup {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tabgroup > .glyph {
  display: grid;
  place-items: center;
  width: 26px;
  color: var(--text-faint);
  flex: none;
}

.tabgroup > .glyph svg { width: 15px; height: 15px; }

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.tab:hover { color: var(--text); background: var(--surface-2); }

.tab[aria-selected="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.tab[aria-selected="true"]:hover { background: var(--accent-hover); color: var(--accent-ink); }

/* ---------- pane switching ----------
   Which pane is on screen is driven by <html data-tab>, which boot.js sets in
   <head> before first paint — so an iPhone lands on the iPhone pane with no
   flash of the Arch one. No JS means no data-tab, and you get the Arch pane
   plus the #nojs card listing everything. */

#pane-ios,
#pane-android,
#instance-howto { display: none; }

[data-tab="ios"] #pane,
[data-tab="ios"] #script-card,
[data-tab="android"] #pane,
[data-tab="android"] #script-card { display: none; }

[data-tab="ios"] #pane-ios,
[data-tab="android"] #pane-android,
[data-tab="ios"] #instance-howto,
[data-tab="android"] #instance-howto { display: block; }

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.card h2 {
  font-size: 19px;
  margin: 0 0 6px;
}

.card h3 {
  font-size: 15px;
  margin: 22px 0 8px;
  color: var(--text);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.card-head p { margin: 4px 0 0; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 8px;
}

/* ---------- edition row ---------- */

.pane-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.pane-row .field-label { margin: 0; }

select {
  font: inherit;
  font-size: 14px;
  padding: 8px 32px 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background-color: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 14px center, right 9px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

select:hover { border-color: var(--line-strong); }

/* ---------- command box ---------- */

.cmdbox {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: var(--radius);
  padding: 12px 12px 12px 14px;
}

.cmdbox::before {
  content: "$";
  color: var(--mint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  align-self: flex-start;
  padding-top: 1px;
  user-select: none;
  flex: none;
}

.cmdbox code {
  flex: 1;
  min-width: 0;
  color: var(--code-text);
  font-size: 13.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.cmdbox.manual { margin-top: 12px; }
.cmdbox.manual::before { content: "#"; color: var(--text-faint); }
.cmdbox.manual code { white-space: pre-wrap; }

.btn,
.copy {
  appearance: none;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s, transform 0.08s;
}

.btn:hover,
.copy:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn:active,
.copy:active { transform: translateY(1px); }

.copy { align-self: flex-start; flex: none; }
.copy svg { width: 14px; height: 14px; }
.copy .tick { display: none; }
.copy.done { background: var(--mint); color: var(--accent-ink); }
.copy.done .tick { display: block; }
.copy.done .clip { display: none; }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

.btn-outline:hover { background: var(--accent-soft); color: var(--accent); }

.cmd-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 0;
}

.cmd-meta p { margin: 0; }

/* ---------- steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 38px;
  color: var(--text-dim);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.card ol:not(.steps),
.card ul:not(.steps) {
  margin: 0 0 8px;
  padding-left: 20px;
  color: var(--text-dim);
}

.card li { margin: 5px 0; }
.card li strong { color: var(--text); }

/* ---------- details ---------- */

details {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

summary {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
}

summary::-webkit-details-marker { display: none; }

summary::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.15s;
}

details[open] > summary::before { transform: rotate(90deg); }
summary:hover { color: var(--text); }

/* ---------- buttons row / screenshots ---------- */

.dl-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 6px;
}

.dl-btns .btn,
.dl-btns .btn-outline { padding: 11px 18px; }

.shots {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 16px 0 4px;
}

.shots figure { margin: 0; flex: 1 1 190px; max-width: 250px; }

.shots img {
  width: 100%;
  height: auto;
  /* Explicit ratio reserves the box before the lazy image lands (no CLS). */
  aspect-ratio: 757 / 1334;
  border-radius: 16px;
  display: block;
  background: var(--surface-2);
}

.shots figcaption {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 9px;
}

/* Each shot is a real link to the file, so it still opens with JS off; app.js
   upgrades the click into the lightbox below. */
.shot {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  line-height: 0;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.shot img { transition: transform 0.25s ease; }
.shot:hover img { transform: scale(1.03); }

.shot-zoom {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(6, 8, 14, 0.7);
  color: #fff;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s, transform 0.16s;
}

.shot-zoom svg { width: 15px; height: 15px; }
.shot:hover .shot-zoom,
.shot:focus-visible .shot-zoom { opacity: 1; transform: none; }

/* Touch devices get no hover, so keep the affordance visible. */
@media (hover: none) {
  .shot-zoom { opacity: 1; transform: none; }
  .shot:hover img { transform: none; }
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(3, 5, 10, 0.95);
  backdrop-filter: blur(4px);
}

.lightbox-stage {
  position: absolute;
  inset: 0;
  display: grid;
  /* minmax(0,1fr) pins the row/column to the content box. Without it the
     implicit track sizes to the image and the img's max-height:100% resolves
     against the image itself, so it never scales down. */
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  /* "safe" keeps the image reachable by scrolling on small screens
     instead of clipping it. */
  place-items: safe center;
  padding: 60px 16px 76px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.lightbox-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 14px;
  cursor: zoom-in;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.95);
}

.lightbox-btn {
  display: grid;
  place-items: center;
  flex: none;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(10, 12, 18, 0.72);
  color: #eef1f7;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.lightbox-btn:hover { background: rgba(28, 33, 45, 0.92); border-color: rgba(255, 255, 255, 0.3); }
.lightbox-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox-btn svg { width: 19px; height: 19px; }

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

/* Nav and caption live in a bar under the image so nothing ever covers it. */
.lightbox-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 14px 14px;
  background: linear-gradient(to top, rgba(4, 6, 12, 0.94) 55%, transparent);
}

.lightbox-nav { width: 42px; height: 42px; }

.lightbox-caption {
  flex: 1;
  min-width: 0;
  margin: 0;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.4;
  color: #d3dae8;
}

/* Keep the page behind the modal from scrolling under the finger. */
.lightbox-open, .lightbox-open body { overflow: hidden; }

/* ---------- push-flavour choice (Android) ---------- */

.choice { border: 0; padding: 0; margin: 20px 0 22px; min-width: 0; }
.choice legend { padding: 0; margin-bottom: 10px; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.segmented label {
  display: block;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.segmented label strong {
  display: block;
  font-size: 14.5px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.segmented label small {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  margin-top: 4px;
  color: var(--text-dim);
}

.segmented label:hover { border-color: var(--line-strong); }

.segmented input:checked + label {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.segmented input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Only the blocks for the chosen flavour stay on screen. Driven by :has() so
   the toggle also works with JS off; app.js falls back to [hidden] on the rare
   engine without :has() support. */
#pane-android [data-push] { display: none; }
#pane-android:has(#push-fcm:checked) .dl-btns[data-push="fcm"],
#pane-android:has(#push-oss:checked) .dl-btns[data-push="oss"] { display: flex; }
#pane-android:has(#push-fcm:checked) .abi-list[data-push="fcm"],
#pane-android:has(#push-oss:checked) .abi-list[data-push="oss"] { display: grid; }

/* ---------- ABI download list ---------- */

.abi-list { list-style: none; margin: 14px 0 0; padding: 0; gap: 8px; }

.abi {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin: 0;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.abi-name {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  color: var(--text);
}

.abi-size {
  color: var(--text-faint);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  flex: none;
}

.abi .btn-outline { padding: 6px 15px; font-size: 13px; flex: none; }

.abi.is-yours { border-color: var(--accent); background: var(--accent-soft); }
.abi.is-yours .btn-outline { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.badge {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- table (scripts listing) ---------- */

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.table { width: 100%; border-collapse: collapse; font-size: 14px; }

.table th,
.table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.table tbody tr:last-child > * { border-bottom: 0; }

.table thead th {
  color: var(--text-faint);
  font-weight: 650;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--surface-2);
}

/* Row headers are data, not column labels — keep them looking like cells. */
.table tbody th { font-weight: 650; }

.table .btns { white-space: nowrap; text-align: right; }

.table .btns a {
  display: inline-block;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 650;
  border-radius: 8px;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  text-decoration: none;
}

.table .btns a:hover { background: var(--accent-soft); }

/* ---------- notes / toast / footer ---------- */

.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.55;
}

.note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--text-faint); }
.note p { margin: 0; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}

.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 20px 48px;
  color: var(--text-faint);
  font-size: 13.5px;
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  align-items: center;
}

.site-footer .sep { color: var(--line-strong); }

.fingerprint {
  display: block;
  font-size: 12px;
  line-height: 1.7;
  word-break: break-all;
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  color: var(--code-text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 10px 0 0;
}

.hidden,
[hidden] { display: none !important; }

/* Utilities — the CSP forbids inline style attributes, so spacing lives here. */
.mt { margin-top: 18px; }
.mt-lg { margin-top: 28px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- no-JS ---------- */

.no-js .js-only { display: none !important; }
.js-only-hidden { display: none; }
.no-js .js-only-hidden { display: revert; }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  body { font-size: 15px; }
  .wrap { padding-bottom: 56px; }
  .hero { padding-top: 28px; }
  .hero .lede { font-size: 16px; }
  .card { padding: 18px 16px; border-radius: var(--radius); }

  .tabs { flex-direction: column; align-items: stretch; gap: 8px; }
  .tabgroup { overflow-x: auto; scrollbar-width: none; }
  .tabgroup::-webkit-scrollbar { display: none; }
  .tab { flex: 1 0 auto; text-align: center; }

  .cmdbox { flex-wrap: wrap; }
  .cmdbox .copy { width: 100%; justify-content: center; align-self: stretch; }

  /* Two-up thumbnails: full width would make each phone shot ~700px tall. */
  .shots { gap: 12px; flex-wrap: nowrap; }
  .shots figure { flex: 1 1 0; min-width: 0; max-width: none; }
  .shots figcaption { font-size: 12.5px; }

  /* Don't ellipsis away the instance host — wrap it instead. */
  .instance-pill { flex-wrap: wrap; row-gap: 4px; }
  .instance-pill code { white-space: normal; word-break: break-all; }

  .segmented { grid-template-columns: 1fr; }
  .abi { padding: 12px 14px; }
  .abi .btn-outline { flex: 1 0 100%; text-align: center; justify-content: center; }
  .dl-btns .btn,
  .dl-btns .btn-outline { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .bg, .topbar, .toast, .picker { display: none; }
  .card { break-inside: avoid; box-shadow: none; }
}
