/* Zac's addons - the whole site's look.
   Colours and sizes are named once here; nothing below uses a raw colour.
   green = ready / selected, gold = under the pointer, blue = fixed, rust = needs attention. */

@font-face { font-family: "Marcellus"; src: url("fonts/marcellus-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  /* THE ADDONS' OWN PALETTE (ZacUI Core_Colors.lua, the same family Readycheck paints from):
     flat dark greys, black one-pixel borders, gold as the one accent. No gold title bars:
     the addons dropped those (Zac, 2026-11-24). The names on the left are this
     file's; the note on the right is where each value comes from. */
  --ground: #1c1c1c;        /* ui.windowBg      0.110 */
  --raised: #262626;        /* ui.cardBg        0.150 */
  --field: #292929;         /* ui.elementBg     0.160 */
  --head: #242424;          /* ui.headerBg      0.140 */
  --sunk: #181818;          /* sidebar.bg       0.095 */
  --btn: #2a2a2a;           /* button.bg        0.165 */
  --btn-hover: #373737;     /* button.hover     0.215 */
  --line: #000000;          /* ui.border */
  --line-soft: rgba(255, 255, 255, 0.07);   /* a divider inside a panel */
  --bone: #e6e6e6;          /* text.normal      0.90 */
  --bone-dim: #999999;      /* text.gray        0.60 */
  --bone-faint: #737373;    /* text.disabled    0.45 */
  --ready: #80cc80;         /* text.green: ticks, "ready" */
  --sel-line: #599e59;      /* ui.borderSelected: the ring on what is selected */
  --ready-wash: #263626;    /* button.active: the fill of what is selected */
  --ready-ink: #1c1c1c;     /* text on a filled button */
  --gold: #d9a640;          /* ui.accent / ui.borderHover: hover, focus, the thin rules */
  --gold-wash: rgba(217, 166, 64, 0.16);
  --title: #ffd100;         /* text.gold: titles */
  --fixed: #66b3ff;         /* text.blue */
  --fixed-wash: rgba(102, 179, 255, 0.12);
  --rust: #ff9933;          /* text.orange: needs attention */
  --rust-wash: rgba(255, 153, 51, 0.10);
  --bad: #ff4d4d;           /* text.red */

  --head-font: "Marcellus", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --body: "Alegreya Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --r: 2px;                 /* the addons' windows are square-cornered */
  --gap: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--ground); color: var(--bone);
  font: 400 1.0625rem/1.55 var(--body);
  font-variant-numeric: lining-nums;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; outline: none; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--head-font); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.12; letter-spacing: -0.005em; }
h2 { font-size: 1.55rem; line-height: 1.2; }
h3 { font-size: 1.2rem; line-height: 1.25; }
p { margin: 0; }
a { color: var(--bone); text-decoration-color: var(--bone-faint); text-underline-offset: 0.18em; }
a:hover { color: var(--gold); text-decoration-color: var(--gold); }
em { color: var(--bone-faint); font-style: normal; font-size: 0.92em; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--sunk); border: 1px solid var(--line-soft); border-radius: 3px; padding: 0.1em 0.4em; }
mark { background: rgba(217, 166, 64, 0.30); color: inherit; border-radius: 2px; padding: 0 0.1em; }

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

.wrap { width: 100%; max-width: 70rem; margin: 0 auto; padding-left: max(1.25rem, env(safe-area-inset-left, 0px)); padding-right: max(1.25rem, env(safe-area-inset-right, 0px)); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ready); color: var(--ready-ink); padding: 0.5rem 1rem; z-index: 50; }
.skip:focus { left: 0; }
.sub { color: var(--bone-dim); max-width: 62ch; }
.hint { color: var(--bone-faint); font-size: 0.95rem; max-width: 66ch; }
.fine { color: var(--bone-faint); font-size: 0.88rem; }

/* ---------- buttons and links that act like buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
  font: 500 1rem/1.2 var(--body); color: var(--bone); text-decoration: none; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r);
  padding: 0.55em 0.95em; min-height: 2.5rem;
}
.btn:hover { color: var(--gold); border-color: var(--gold); }
.btn-go { background: var(--ready); border-color: var(--ready); color: var(--ready-ink); font-weight: 700; }
.btn-go:hover { background: var(--gold); border-color: var(--gold); color: var(--ready-ink); }
.btn-big { font-size: 1.1rem; padding: 0.7em 1.4em; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: default; pointer-events: none; }
.link { font: inherit; color: var(--bone); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--bone-faint); text-underline-offset: 0.18em; }
.link:hover { color: var(--gold); text-decoration-color: var(--gold); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--sunk); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 0.5rem 1.75rem; flex-wrap: wrap; padding-block: 0.7rem; }
.brand { font-family: var(--head-font); font-size: 1.3rem; text-decoration: none; margin-right: auto; }
.nav { display: flex; gap: 1.5rem; }
.nav a { text-decoration: none; color: var(--bone-dim); padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--gold); }
.nav a[aria-current="page"] { color: var(--ready); border-bottom-color: var(--ready); }
.top-report[aria-current="page"] { background: transparent; color: var(--ready); }

/* ---------- home: the statement and the ready check ---------- */
.hero { padding-block: clamp(2.25rem, 6vw, 4.5rem) 2rem; }
.hero-say { max-width: 46rem; }
.lede { margin-top: 1rem; font-size: 1.2rem; color: var(--bone-dim); max-width: 54ch; }

.roster { margin-top: clamp(1.75rem, 4vw, 3rem); background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); }
.roster-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.5rem; flex-wrap: wrap; padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--line); }
.roster-head h2 { font-size: 1.25rem; }
.roster-state { color: var(--bone-faint); font-size: 0.95rem; }
.roster-list { list-style: none; margin: 0; padding: 0; }
.r-row { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem auto; gap: 0.5rem 1.25rem; align-items: center; padding: 1.1rem 1.25rem; }
.r-row + .r-row { border-top: 1px solid var(--line-soft); }
.r-tick { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; color: var(--bone-faint); }
.r-tick svg { width: 1.3rem; height: 1.3rem; }
.r-tick path { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; }
.r-row[data-state="ready"] .r-tick { color: var(--ready); }
.r-row[data-state="ready"] .r-tick path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.32s ease-out; }
.r-row[data-state="away"] .r-tick { color: var(--rust); }
.r-row[data-state="away"] .r-tick path { stroke-dashoffset: 0; }
.r-who { min-width: 0; }
.r-who p { color: var(--bone-dim); }
.r-who .r-new { color: var(--bone-faint); font-size: 0.95rem; margin-top: 0.15rem; }
.r-ver { display: flex; flex-direction: column; }
.r-ver strong { font: 500 1.65rem/1.1 var(--body); font-variant-numeric: lining-nums tabular-nums; }  /* body face: its zero cannot be read as an O */
.r-ver span { color: var(--bone-faint); font-size: 0.92rem; }
.r-act { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; align-items: center; }
.r-more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.97rem; }

.games-in { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; vertical-align: middle; }
.g { display: inline-block; font-size: 0.78rem; line-height: 1; padding: 0.22em 0.5em; border: 1px solid var(--line); border-radius: 999px; color: var(--bone-dim); white-space: nowrap; }

/* ---------- home: what changed since ---------- */
.since, .known { padding-block: 2.5rem; border-top: 1px solid var(--line-soft); }
.since .sub, .known .sub { margin-top: 0.4rem; }
.since-form { display: grid; grid-template-columns: repeat(3, minmax(0, 14rem)); gap: 1rem; margin-top: 1.25rem; }
label > span { display: block; font-weight: 500; margin-bottom: 0.3rem; }
select, input[type="text"], input[type="search"], textarea {
  width: 100%; font: inherit; color: var(--bone); background: var(--sunk);
  border: 1px solid var(--line); border-radius: var(--r); padding: 0.55em 0.7em; min-height: 2.6rem;
}
textarea { resize: vertical; line-height: 1.45; }
textarea.mono { font-size: 0.88rem; }
select:hover, input:hover, textarea:hover { border-color: var(--bone-faint); }
::placeholder { color: var(--bone-faint); opacity: 1; }
.since-out { margin-top: 1.5rem; }
.since-sum { font-size: 1.15rem; }
.since-sum strong { color: var(--ready); font-weight: 700; }
.since-get { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.9rem; }
.since-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem 2.5rem; margin-top: 1.75rem; }

.sec h3 { font: 700 0.95rem/1.2 var(--body); display: flex; align-items: center; gap: 0.5em; margin-bottom: 0.55rem; }
.sec h3::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 2px; background: currentColor; }
.sec-added h3 { color: var(--ready); }
.sec-fixed h3 { color: var(--fixed); }
.sec-changed h3 { color: var(--bone); }
.sec-removed h3 { color: var(--rust); }
.sec ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.sec li { position: relative; padding-left: 1.05rem; max-width: 76ch; }
.sec li::before { content: ""; position: absolute; left: 0.1rem; top: 0.68em; width: 0.32rem; height: 0.32rem; border-radius: 50%; background: var(--bone-faint); }
.sec li ul { margin-top: 0.4rem; }
.sec li li { color: var(--bone-dim); }
.sec .in-v { color: var(--bone-faint); font-size: 0.88rem; white-space: nowrap; margin-left: 0.3em; }
.more { margin-top: 0.7rem; }

.known-list, .side-card ul { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.known-list li { background: var(--raised); border: 1px solid var(--line-soft); border-left: 3px solid var(--rust); border-radius: var(--r); padding: 0.7rem 1rem; }
.known-list small, .side-card small { color: var(--bone-faint); display: block; }

/* ---------- what changed ---------- */
.page-h { font-size: clamp(1.9rem, 3.6vw, 2.6rem); padding-top: clamp(1.75rem, 4vw, 3rem); }
.tabs { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; margin-top: 1.25rem; border-bottom: 1px solid var(--line); }
.tabs button { font: 400 1.2rem/1.2 var(--head-font); color: var(--bone-dim); background: none; border: 0; border-bottom: 2px solid transparent; padding: 0.55rem 0; margin-bottom: -1px; cursor: pointer; }
.tabs button:hover { color: var(--gold); }
.tabs button[aria-pressed="true"] { color: var(--ready); border-bottom-color: var(--ready); }
.tabs small { font: 400 0.85rem var(--body); color: var(--bone-faint); margin-left: 0.4em; font-variant-numeric: tabular-nums; }

.log-tools { display: grid; grid-template-columns: minmax(0, 1fr) 12rem auto; gap: 1rem; align-items: end; margin-top: 1.25rem; }
.log-tools .pick span { margin-bottom: 0.3rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips button { font: 500 0.95rem/1 var(--body); color: var(--bone-dim); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 0.55em 0.95em; min-height: 2.6rem; cursor: pointer; }
.chips button:hover { color: var(--gold); border-color: var(--gold); }
.chips button[aria-pressed="true"] { color: var(--ready); border-color: var(--ready); background: var(--ready-wash); }
.log-count { color: var(--bone-faint); margin-top: 0.9rem; font-size: 0.95rem; }
.log { padding-bottom: 3rem; }

.ver { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.25rem 1.5rem; padding-block: 1.75rem; border-top: 1px solid var(--line-soft); }
.ver:first-child { border-top: 0; }
.ver-n { font: 500 1.9rem/1.1 var(--body); font-variant-numeric: lining-nums tabular-nums; }
.ver-n a { text-decoration: none; }
.ver-d { color: var(--bone-faint); font-size: 0.92rem; margin-top: 0.2rem; }
.ver-body { min-width: 0; display: grid; gap: 1.1rem; }
.ver-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.5rem; }
.ver-top h2 { font-size: 1.35rem; }
.ver-top .link { font-size: 0.95rem; color: var(--bone-dim); }
.ver.is-target .ver-n { color: var(--ready); }
.tag { display: inline-block; font: 700 0.78rem/1 var(--body); padding: 0.28em 0.55em; border-radius: 3px; vertical-align: 0.1em; margin-left: 0.4em; }
.tag-new { background: var(--ready-wash); color: var(--ready); }
.empty { padding: 2.5rem 0; color: var(--bone-dim); }

/* ---------- report ---------- */
.report { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 2.5rem; align-items: start; padding-bottom: 3.5rem; }
.report-main { min-width: 0; }
.report-main > .sub { margin-top: 0.5rem; }
.report-side { position: sticky; top: 5rem; display: grid; gap: 1rem; margin-top: clamp(1.75rem, 4vw, 3rem); }
.side-card { background: var(--raised); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 1rem 1.1rem; font-size: 0.97rem; }
.side-card h2 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.side-card .sub { font-size: 0.95rem; }
.side-card ul { margin-top: 0.7rem; }
.side-card p + p, .side-card ul + p { margin-top: 0.7rem; }
#side-fixed { border-left: 3px solid var(--fixed); }
#side-known { border-left: 3px solid var(--rust); }
.tips li { padding-left: 1rem; position: relative; }
.tips li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 0.32rem; height: 0.32rem; border-radius: 50%; background: var(--ready); }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.step { margin-top: 2rem; display: grid; gap: 1rem; }
.step > legend { font: 400 1.3rem/1.2 var(--head-font); padding: 0; margin-bottom: 0.9rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.num { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 1px solid var(--line); font: 700 0.95rem/1 var(--body); color: var(--bone-dim); flex: none; }
.seg, .addon-pick { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.seg label, .addon-pick label { position: relative; cursor: pointer; }
.seg input, .addon-pick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span, .addon-pick span { display: block; margin: 0; padding: 0.55em 1em; border: 1px solid var(--line); border-radius: var(--r); color: var(--bone-dim); font-weight: 500; }
.seg label:hover span, .addon-pick label:hover span { color: var(--gold); border-color: var(--gold); }
.seg input:checked + span, .addon-pick input:checked + span { color: var(--ready); border-color: var(--ready); background: var(--ready-wash); }
.seg input:focus-visible + span, .addon-pick input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 15rem)); gap: 1rem; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.block { display: block; }
.bugonly { display: grid; gap: 1rem; }
.check { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--ready); }
.check span { margin: 0; font-weight: 400; }
.err { color: var(--rust); font-size: 0.97rem; }
.note { border: 1px solid var(--line); border-left: 3px solid var(--fixed); border-radius: var(--r); background: var(--raised); padding: 0.8rem 1rem; }
.note-warn { border-left-color: var(--rust); background: var(--rust-wash); }
.note p + p { margin-top: 0.4rem; }
.shot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.shot-name { color: var(--bone-faint); min-width: 0; overflow-wrap: anywhere; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 2rem; }
.send + .hint { margin-top: 0.7rem; }
#r-result { margin-top: 1rem; }

.done { margin-top: 2rem; background: var(--raised); border: 1px solid var(--ready); border-radius: var(--r); padding: 1.75rem; outline: none; }
.done-tick { width: 3rem; height: 3rem; color: var(--ready); }
.done h2 { margin-top: 0.5rem; }
.done p { margin-top: 0.5rem; color: var(--bone-dim); max-width: 60ch; }
.done .ref strong { font-family: var(--mono); color: var(--bone); letter-spacing: 0.04em; user-select: all; }

/* ---------- help ---------- */
.help { padding-bottom: 3.5rem; }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 3rem; margin-top: 1.75rem; }
.help article { min-width: 0; display: grid; gap: 0.75rem; align-content: start; }
.help article p, .help article li { max-width: 62ch; color: var(--bone-dim); }
.help article strong { color: var(--bone); }
.steps { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.5rem; }
.cmd code { font-size: 1rem; padding: 0.3em 0.6em; user-select: all; }
.defs { margin: 0; display: grid; gap: 0.7rem; }
.defs dt { font-weight: 700; }
.defs dd { margin: 0; color: var(--bone-dim); }
.games-wrap { overflow-x: auto; }
table.games { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
.games th, .games td { text-align: left; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--line-soft); font-weight: 400; }
.games thead th { color: var(--bone-faint); font-size: 0.9rem; }
.games td.yes { color: var(--ready); font-weight: 700; }
.games td.no { color: var(--bone-faint); }
.cmd-h { margin-top: 3rem; }
.cmds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 3rem; margin-top: 1.25rem; }
.cmds h3 { margin-bottom: 0.6rem; }
.cmds dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.45rem 1rem; }
.cmds dt code { white-space: nowrap; }
.cmds dd { margin: 0; color: var(--bone-dim); }
.reach { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line-soft); }
.reach p { margin-top: 0.5rem; color: var(--bone-dim); max-width: 62ch; }

/* ---------- footer, toast ---------- */
.foot { background: var(--sunk); border-top: 1px solid var(--line-soft); margin-top: 2rem; }
.foot-in { padding-block: 1.5rem; display: grid; gap: 0.5rem; }
#foot-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.toast { position: fixed; left: 50%; bottom: max(1.5rem, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--bone); color: var(--sunk); font-weight: 700; padding: 0.6rem 1.1rem; border-radius: var(--r); z-index: 40; max-width: calc(100vw - 2rem); }

/* ---------- narrower screens ---------- */
@media (max-width: 60rem) {
  .report { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .report-side { position: static; margin-top: 0; order: 2; }
  .log-tools { grid-template-columns: minmax(0, 1fr) 11rem; }
  .log-tools .chips { grid-column: 1 / -1; }
  .r-row { grid-template-columns: minmax(0, 1fr) auto; }
  .r-act { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .top-in { gap: 0.4rem 1rem; }
  .nav { order: 3; width: 100%; gap: 0.3rem 0.9rem; flex-wrap: wrap; font-size: 0.94rem; }
  .nav a { white-space: nowrap; }
  .since-form, .row2, .row3, .help-grid, .cmds { grid-template-columns: minmax(0, 1fr); }
  .log-tools { grid-template-columns: minmax(0, 1fr); }
  .ver { grid-template-columns: minmax(0, 1fr); }
  .ver-side { display: flex; align-items: baseline; gap: 0.75rem; }
  .cmds dl { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .cmds dd { margin-bottom: 0.5rem; }
  .send .btn { flex: 1 1 100%; }
  .r-row { padding: 1rem; gap: 0.5rem 0.9rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
  .r-ver, .r-act, .r-more { grid-column: 1; }
  .r-ver { flex-direction: row; align-items: baseline; gap: 0.6rem; }
  .roster-head { padding: 0.8rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   The dressing: ground, panels, the raid picture, the addon drawings.
   Same colours as above; nothing here changes what a control means.
   ===================================================================== */
::selection { background: rgba(217, 166, 64, 0.35); }
html { scrollbar-color: var(--line) var(--sunk); }

/* a lit corner and a little grain, so the slate is not a flat fill */
body {
  background:
    radial-gradient(60rem 30rem at 85% -8rem, rgba(217, 166, 64, 0.07), transparent 70%),
    var(--ground);
  background-attachment: scroll;
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.top { z-index: 20; }
main, .foot { position: relative; z-index: 2; }

/* the mark beside the name */
.brand { display: inline-flex; align-items: center; gap: 0.55rem; }
.mark { width: 1.5rem; height: 1.5rem; flex: none; }
.mark-d { fill: var(--gold-wash); stroke: var(--gold); stroke-width: 1.6; stroke-linejoin: round; }
.mark-c { fill: none; stroke: var(--ready); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.brand:hover .mark-d { stroke: var(--title); }

/* buttons get a little weight */
.btn { background: var(--btn); box-shadow: none; transition: border-color 0.12s, color 0.12s, background-color 0.12s; }
.btn-go { background: var(--gold); box-shadow: none; }
.btn-go:hover { background: #ecc063; }
.top-report[aria-current="page"] { background: transparent; box-shadow: none; }

/* panels: one recipe for everything that sits on the ground */
.roster, .side-card, .done, .since-card, .help article, .cmds > div, .known-list li {
  background: var(--raised);
  box-shadow: 0 12px 28px -18px rgba(0, 0, 0, 0.8);
}
/* ---------- the top of the home page ---------- */
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); gap: 2rem 3.5rem; align-items: center; }
.hero-act { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }

.raid { margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.85); }
.raid-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem 0.55rem; }
.grp { display: grid; gap: 3px; }
.cell { position: relative; display: block; height: 15px; background: #121212; border: 1px solid #000; border-radius: 0; overflow: hidden; }
.cell::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--hp) * 100%); background: linear-gradient(rgba(255, 255, 255, 0.22), rgba(0, 0, 0, 0.12)), var(--c); opacity: 0.34; transition: opacity 0.35s; }
.cell::after { content: ""; position: absolute; right: 3px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; border: 1.5px solid rgba(230, 230, 230, 0.25); }
.cell[data-s="ready"]::before { opacity: 0.78; }
.cell[data-s="ready"]::after {
  border: 0; border-radius: 0; background: #ffffff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.7 2.7L10 3.4' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.7 2.7L10 3.4' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: pop 0.28s ease-out;
}
@keyframes pop { from { transform: scale(2.2); opacity: 0; } to { transform: none; opacity: 1; } }
.raid figcaption { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.8rem; color: var(--bone-faint); font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.raid figcaption .link { color: var(--bone-dim); }

/* ---------- the roster, dressed ---------- */

.r-row { transition: background-color 0.15s; }
.r-row:hover { background: rgba(255, 255, 255, 0.022); }
.r-who { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; align-items: start; }
.r-who > * { grid-column: 2; }
.r-who > .glyph { grid-column: 1; grid-row: 1 / span 3; }
.glyph { display: block; width: 4.6rem; padding: 0.35rem; border: 1px solid var(--line-soft); border-radius: 4px; background: var(--sunk); color: var(--bone-faint); }
.glyph svg { display: block; width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.glyph .hl { stroke: var(--ready); }
.glyph .hlf { fill: var(--ready); stroke: none; }
.r-row:hover .glyph { border-color: var(--line); color: var(--bone-dim); }
.roster-foot { padding: 0.8rem 1.25rem; border-top: 1px solid var(--line); color: var(--bone-faint); font-size: 0.92rem; }

/* ---------- since ---------- */
.since-form select { box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35); }
select, input[type="text"], input[type="search"], textarea { box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35); transition: border-color 0.12s; }
select:focus, input:focus, textarea:focus { border-color: var(--gold); outline: none; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 3px var(--gold-wash); }

/* the kind of change, as a small plate */
.sec h3 { display: inline-flex; padding: 0.3em 0.65em 0.3em 0.55em; border-radius: 3px; background: rgba(255, 255, 255, 0.04); }
.sec-added h3 { background: var(--ready-wash); }
.sec-fixed h3 { background: var(--fixed-wash); }
.sec-removed h3 { background: var(--rust-wash); }
.sec ul { margin-top: 0.1rem; }

/* ---------- what changed: a line of versions down the page ---------- */
.ver-body { position: relative; }
@media (min-width: 40.01rem) {
  .ver { border-top: 0; padding-block: 0; }
  .ver-side { padding-block: 1.6rem; text-align: right; }
  .ver-body { border-left: 1px solid var(--line); padding: 1.6rem 0 1.6rem 1.75rem; }
  .ver-body::before { content: ""; position: absolute; left: -5px; top: 2.15rem; width: 9px; height: 9px; border-radius: 50%; background: var(--ground); border: 2px solid var(--bone-faint); }
  .ver:first-child .ver-body::before { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 4px var(--gold-wash); }
  .ver.is-target .ver-body::before { border-color: var(--ready); }
  .ver:hover .ver-body::before { border-color: var(--gold); }
}
.tabs button { transition: color 0.12s; }
.log-tools { padding: 1rem; margin-top: 1.25rem; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--raised); border-color: var(--line); }

/* ---------- report ---------- */
.ideaonly { display: grid; gap: 1rem; }
.num { background: var(--sunk); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4); }
.step > legend .num { color: var(--gold); border-color: var(--gold); }
.seg span, .addon-pick span { background: var(--btn); transition: border-color 0.12s, color 0.12s; }
.done-tick { filter: none; }

/* ---------- help ---------- */
.help article, .cmds > div { border: 1px solid var(--line-soft); border-radius: var(--r); padding: 1.25rem 1.4rem; }
.help-grid, .cmds { gap: 1.25rem; }
.cmds dt code { color: var(--gold); border-color: var(--line); }
.cmd code { color: var(--gold); border-color: var(--line); }
.games td.yes::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--ready); margin-right: 0.45em; vertical-align: 0.08em; }

/* ---------- footer ---------- */
.foot { background: var(--sunk); border-top: 1px solid var(--line); }

@media (max-width: 60rem) {
  .hero-top { grid-template-columns: minmax(0, 1fr); }
  .raid { max-width: 30rem; }
}
@media (max-width: 40rem) {
  .r-who { column-gap: 0.75rem; }
  .glyph { width: 3.4rem; padding: 0.25rem; }
  .r-who > .glyph { grid-row: 1 / span 2; }
  .hero-act .btn { flex: 1 1 auto; }
  .raid { padding: 0.75rem; }
  .cell { height: 13px; }
  .log-tools { padding: 0.8rem; }
  .roster-foot { padding: 0.8rem 1rem; }
}


/* =====================================================================
   THE ADDONS' LOOK, where a token alone does not say it:
   flat buttons that take a gold edge under the mouse, a green ring on
   what is selected, square corners.
   ===================================================================== */
/* titles are white; the accent is on the second word of the name only, as on the addons' own window */
.brand, .brand:hover { color: #ffffff; }
.brand b { font-weight: 400; color: var(--gold); }
.nav a { color: var(--bone); }
.nav a:hover { color: var(--gold); }
.nav a[aria-current="page"] { color: var(--ready); border-bottom-color: var(--sel-line); }

/* a panel's title bar */
.roster-head { background: var(--head); border-bottom: 1px solid var(--line); }
.roster-state { color: var(--bone-dim); }
.r-row + .r-row { border-top-color: var(--line); }
.roster-foot { border-top-color: var(--line); background: var(--sunk); }

/* buttons */
.btn { color: var(--bone); border-color: var(--line); }
.btn:hover { color: var(--bone); background: var(--btn-hover); border-color: var(--gold); }
.btn-go, .btn-go:hover { color: var(--ready-ink); border-color: var(--line); }
.top-report[aria-current="page"] { background: var(--ready-wash); color: var(--bone); border-color: var(--sel-line); }
.link:hover, a:hover { color: var(--gold); }

/* fields */
select, input[type="text"], input[type="search"], textarea { background: var(--field); border-color: var(--line); }
select:hover, input:hover, textarea:hover { border-color: var(--bone-faint); }
code { background: var(--sunk); border-color: var(--line); }

/* what is selected: the green ring and fill */
.tabs { border-bottom-color: var(--line); }
.tabs button[aria-pressed="true"] { color: var(--ready); border-bottom-color: var(--sel-line); }
.chips button, .g { border-radius: var(--r); }
.chips button { background: var(--btn); border-color: var(--line); color: var(--bone); }
.chips button:hover { background: var(--btn-hover); color: var(--bone); border-color: var(--gold); }
.chips button[aria-pressed="true"] { color: var(--bone); border-color: var(--sel-line); background: var(--ready-wash); }
.seg span, .addon-pick span { border-color: var(--line); color: var(--bone); }
.seg label:hover span, .addon-pick label:hover span { color: var(--bone); background: var(--btn-hover); border-color: var(--gold); }
.seg input:checked + span, .addon-pick input:checked + span { color: var(--bone); border-color: var(--sel-line); background: var(--ready-wash); }
.g { border-color: var(--line); background: var(--sunk); color: var(--bone-dim); }

/* ready, away */
.r-row[data-state="ready"] .r-tick { color: var(--ready); }
.r-row[data-state="away"] .r-tick { color: var(--bad); }
.glyph { border-color: var(--line); }
.glyph .hl { stroke: var(--gold); }
.glyph .hlf { fill: var(--gold); }
.r-row:hover .glyph { border-color: var(--gold); }
.since-sum strong { color: var(--gold); }
.tag-new { background: var(--gold-wash); color: var(--gold); }
.sec-added h3 { color: var(--ready); background: var(--ready-wash); }
.sec-changed h3 { color: var(--gold); background: var(--gold-wash); }
.sec li::before { background: var(--bone-faint); }
.tips li::before { background: var(--gold); }
.games td.yes { color: var(--ready); }
.games th, .games td { border-bottom-color: var(--line-soft); }

/* panels and lines */
.side-card, .help article, .cmds > div, .known-list li, .log-tools, .raid, .done { border-color: var(--line); }
.since, .known, .reach { border-top-color: var(--line-soft); }
.ver-body { border-left-color: var(--bone-faint); }
.ver-body::before { background: var(--ground); }
.ver.is-target .ver-n { color: var(--gold); }
.ver.is-target .ver-body::before { border-color: var(--gold); }
#side-fixed { border-left: 3px solid var(--fixed); }
#side-known, .known-list li { border-left: 3px solid var(--rust); }
.note { border-color: var(--line); border-left: 3px solid var(--fixed); }
.note-warn { border-left-color: var(--rust); }
.err { color: var(--bad); }
.done { border-color: var(--sel-line); }
.done-tick { color: var(--ready); }
.toast { background: var(--gold); color: var(--ready-ink); }
html { scrollbar-color: rgba(255, 255, 255, 0.27) #141414; }


/* =====================================================================
   THE ADDONS' OWN ICONS (assets/icons: the files the addons ship, as PNG).
   ZacUI's Z, Readycheck's check mark, DefaultFrames' frames; the check is
   also the tick wherever something is ready or sent.
   ===================================================================== */
img.mark { width: 1.75rem; height: 1.75rem; display: block; }
.aicon { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); }
.aicon img { display: block; width: 2.75rem; height: 2.75rem; object-fit: contain; }
.r-who > .aicon { grid-column: 1; grid-row: 1 / span 3; }
.r-row:hover .aicon { border-color: var(--gold); }
.aicon-s { display: inline-grid; width: 1.25rem; height: 1.25rem; background: none; border: 0; vertical-align: -0.22em; margin-right: 0.45em; }
.aicon-s img { width: 1.25rem; height: 1.25rem; }
.tabs button .aicon-s { vertical-align: -0.12em; }
.seg span, .addon-pick span { display: flex; align-items: center; }

.r-tick img.r-check { width: 2rem; height: 2rem; display: block; opacity: 0; transform: scale(1.6); }
.r-row[data-state="ready"] .r-tick img.r-check { opacity: 1; transform: none; transition: opacity 0.25s ease-out, transform 0.25s ease-out; }
.r-dash { display: block; width: 0.9rem; height: 3px; border-radius: 1px; background: currentColor; }
img.done-tick { width: 3rem; height: 3rem; display: block; }

/* a raider who has answered: the addons' white check on the bar */
.cell[data-s="ready"]::after {
  background: url("icons/check-white.png") center / contain no-repeat;
  -webkit-mask: none; mask: none;
  width: 11px; height: 11px; margin-top: -5.5px; right: 2px;
}
@media (max-width: 40rem) {
  .aicon { width: 2.75rem; height: 2.75rem; }
  .aicon img { width: 2.1rem; height: 2.1rem; }
  .r-who > .aicon { grid-row: 1 / span 2; }
}

/* a notice set from the admin panel (data/site.json) */
.site-notice { margin-top: 1rem; }
.site-notice a { color: var(--gold); }
