/* minecraftcombatai.com
 *
 * The same constraints as the mod's arcade screen, moved to a browser. They are listed in
 * fabricmod/UI_DESIGN.md as a counter-reference to a specific cluster of generated-design
 * tells, and every one of them is a rule here rather than a preference:
 *
 *   no gradient      -- there is no `linear-gradient` in this file, at all
 *   no blur          -- no backdrop-filter, no filter: blur
 *   no radius        -- the reset below zeroes it globally and nothing re-enables it
 *   no drop shadow   -- surfaces are separated by a 1px LINE rule, which is the mod's rule
 *   no default sans  -- headings are the mod's own 5x7 face, drawn as SVG rects by art.js
 *   no card triplet  -- the layout is asymmetric and every card is sized to its content
 *
 * `site/test/check.mjs` asserts the first four against the live computed styles, so they
 * cannot rot back in. The colours are Pal.java, and the test asserts that too.
 */

/* ------------------------------------------------------------------ the palette --- */

:root {
    /* Pal.java, verbatim. Twelve colours, and a thirteenth should feel expensive. */
    --void: #0a0c11;
    --shell: #161b24;
    --well: #0e1219;
    --chip: #212936;
    --chip-hot: #2e3949;
    --line: #39445a;
    --text: #e9edf3;
    --dim: #7b8798;
    --faint: #5e6979;
    --mint: #5be0a8;
    --amber: #ffc15e;
    --red: #ff5b6e;
    --mint-dark: #10382e;
    --red-dark: #4a1c26;

    /* Dynamic strings are on a machine face, the way the mod puts them on the game's. */
    --mono: ui-monospace, "JetBrains Mono", "DejaVu Sans Mono", "Liberation Mono",
            Menlo, Consolas, monospace;

    --gap: 18px;
    --edge: 1px solid var(--line);
}

/* -------------------------------------------------------------------- the reset --- */

*, *::before, *::after {
    box-sizing: border-box;
    /* Not a default being restated: this is the rule. Nothing on this site is rounded. */
    border-radius: 0;
}

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

body {
    margin: 0;
    background: var(--void);
    color: var(--text);
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.55;
    /* A dense screen with long measures is unreadable; cards cap their own width. */
    overflow-x: hidden;
}

a { color: var(--mint); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover, a:focus-visible { border-bottom-color: currentColor; }
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

img { max-width: 100%; display: block; }
p { margin: 0 0 0.9em; }
p:last-child { margin-bottom: 0; }

/* Screen-reader text. Display headings are SVG rects, so the words live here too --
 * otherwise the page has no headings for anything that is not looking at pixels. */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---------------------------------------------------------------- display face --- */

/* art.js replaces the contents with an <svg> of one rect per glyph run. Until it does,
 * and forever if scripting is off, the element is the plain text -- upper-cased and
 * letter-spaced so the fallback is a deliberate state rather than a broken one. */
.display {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 400;
    margin: 0;
    line-height: 1;
}
.display svg { display: block; height: auto; max-width: 100%; }

/* ------------------------------------------------------------------- the shell --- */

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

/* --- marquee ------------------------------------------------------------------- */

.marquee {
    border-bottom: var(--edge);
    background: var(--shell);
    position: sticky;
    top: 0;
    z-index: 20;
}
.marquee-in {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 56px;
    padding: 8px 16px;
    max-width: 1180px;
    margin: 0 auto;
    flex-wrap: wrap;
}
/* min-height so the wordmark is a 24px-plus target in its own right, not a 22px strip of
 * text that happens to be a link. */
.wordmark { display: flex; align-items: center; gap: 0; flex: 0 0 auto; min-height: 30px; }
.wordmark .display { display: inline-block; }

/* The star field the mod runs across its marquee. Canvas, so it is pixels and not a
 * CSS animation of a blurred dot. */
#marquee-stars {
    flex: 1 1 120px;
    min-width: 0;
    height: 28px;
    display: block;
    align-self: center;
}

/* flex-shrink 1: when the links are wider than the row on their own (a tablet with every
 * page linked), the nav shrinks to the row and its links wrap, instead of running off the
 * side. Where it fits, nothing changes: line breaks use the unshrunk width. */
.nav { display: flex; gap: 6px; flex-wrap: wrap; flex: 0 1 auto; }
.nav a {
    background: var(--chip);
    border: var(--edge);
    color: var(--dim);
    padding: 7px 11px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    min-height: 30px;
    display: flex;
    align-items: center;
}
.nav a:hover, .nav a:focus-visible { background: var(--chip-hot); color: var(--text); border-bottom-color: var(--line); }
.nav a[aria-current="page"] { color: var(--mint); border-color: var(--mint); background: var(--mint-dark); }

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

/* One surface, one 1px edge, a caption in the corner. Every panel on the mod's screen
 * is this and nothing else. */
.card {
    background: var(--shell);
    border: var(--edge);
    padding: 16px;
    position: relative;
}
.card.well { background: var(--well); }

.card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.card-tag {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--faint);
}
.card-tag.mint { color: var(--mint); }
.card-tag.amber { color: var(--amber); }
.card-tag.red { color: var(--red); }

section { padding: 40px 0 8px; }
/* The marquee is sticky, so an in-page anchor lands with the section heading underneath
 * it. Clear the marquee's own height plus a little air. */
section[id] { scroll-margin-top: 72px; }
.section-head { margin-bottom: 18px; }
.section-head .lede { color: var(--dim); max-width: 62ch; margin-top: 12px; }

/* --- lamps and chips ------------------------------------------------------------ */

.lamp {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dim);
}
.lamp::before {
    content: "";
    width: 7px; height: 7px;
    background: currentColor;
    flex: 0 0 auto;
}
.lamp.mint { color: var(--mint); }
.lamp.amber { color: var(--amber); }
.lamp.red { color: var(--red); }

.chip {
    display: inline-block;
    background: var(--chip);
    border: var(--edge);
    color: var(--dim);
    padding: 3px 8px;
    font-size: 11px;
    letter-spacing: 0.1em;
}

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

/* Asymmetric on purpose: a statement column and a readout column, not two equal halves
 * and not three interchangeable tiles. */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: var(--gap);
    padding-top: 34px;
}
.hero-copy p { color: var(--dim); max-width: 56ch; }
.hero-copy p strong { color: var(--text); font-weight: 400; }
.hero-title { margin-bottom: 20px; }
.hero-sub { margin-bottom: 18px; }

.hero-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 1px;
    background: var(--line);
    border: var(--edge);
    margin-top: 22px;
}
.hero-facts.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fact { background: var(--well); padding: 11px 12px; }
.fact .v { font-size: 19px; color: var(--mint); line-height: 1.2; }
.fact .k {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--faint);
    margin-top: 3px;
}

/* The PEN: one big portrait and the facts beside it, exactly as the mod arranges it. */
.pen { display: flex; flex-direction: column; gap: 14px; }
.pen-top { display: flex; gap: 16px; align-items: flex-start; }
.pen-art {
    background: var(--well);
    border: var(--edge);
    padding: 8px;
    flex: 0 0 auto;
}
.pen-meta { min-width: 0; flex: 1 1 auto; }
.pen-tagline { color: var(--dim); font-size: 12px; margin: 6px 0 10px; }

/* --- pips ---------------------------------------------------------------------- */

/* The pips are a feeling; the value beside them is the fact. Both, always. */
.pips { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 9px; align-items: center; font-size: 12px; }
.pips dt { color: var(--faint); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }
.pips dd { margin: 0; color: var(--text); }
.pip-row { display: flex; gap: 3px; }
.pip { width: 7px; height: 7px; background: var(--chip); border: 1px solid var(--line); }
.pip.on { background: currentColor; border-color: currentColor; }

/* --- the stable ---------------------------------------------------------------- */

/* A roster, the way the mod lists checkpoints: rows, a caret on the live one, and the
 * species colour carried by the name rather than by a slab down the edge. */
.stable { border: var(--edge); background: var(--well); }
.stable-row {
    display: grid;
    grid-template-columns: 16px auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 14px;
    border-bottom: var(--edge);
}
.stable-row:last-child { border-bottom: 0; }
.stable-row.live { background: var(--mint-dark); }
.caret { color: var(--mint); font-size: 12px; text-align: center; }
.stable-row:not(.live) .caret { color: transparent; }
.stable-art { background: var(--void); border: var(--edge); padding: 5px; }
.stable-body { min-width: 0; }
.stable-name { font-size: 15px; letter-spacing: 0.06em; }
.stable-what { color: var(--dim); font-size: 12px; margin-top: 2px; }
.stable-facts { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 11px; color: var(--faint); }
.stable-facts b { color: var(--text); font-weight: 400; }
/* FAINT is legal on WELL and SHELL and nowhere else -- Pal.java says so in a comment, and
 * the live row is neither. It measured 2.32:1 here, which is the same number the mod's own
 * checker caught on its chips. DIM on this surface is 3.54:1. */
.stable-row.live .stable-facts { color: var(--dim); }
.stable-side { text-align: right; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }

/* --- the brain ----------------------------------------------------------------- */

.brain-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
    gap: var(--gap);
    align-items: start;
}
#brain-canvas { width: 100%; height: auto; display: block; background: var(--void); border: var(--edge); }
.brain-legend { display: flex; flex-direction: column; gap: 12px; }
.legend-item { display: grid; grid-template-columns: 10px 1fr; gap: 10px; align-items: start; }
.legend-swatch { width: 10px; height: 10px; margin-top: 5px; background: currentColor; }
.legend-item h3 { margin: 0 0 3px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 400; color: var(--text); }
.legend-item p { color: var(--dim); font-size: 12px; margin: 0; }

.brain-switch { display: flex; gap: 6px; flex-wrap: wrap; }
.brain-switch button {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: var(--chip);
    border: var(--edge);
    color: var(--dim);
    padding: 8px 12px;
    min-height: 30px;
    min-width: 62px;
    cursor: pointer;
}
.brain-switch button:hover { background: var(--chip-hot); color: var(--text); }
.brain-switch button[aria-pressed="true"] { background: var(--mint-dark); border-color: var(--mint); color: var(--mint); }

/* --- screens ------------------------------------------------------------------- */

/* The control screen is 854 logical pixels of one-pixel rules and a 5x7 face. Shown in a
 * half-width column it was being sampled at about 0.6, and at that ratio the rules and the
 * glyph strokes land between samples and simply are not drawn -- the figure rendered as an
 * empty dark rectangle while every assertion about it passed. So the control screens get
 * the full measure, and the overlay strips, which are only 238 logical pixels wide, share
 * a row underneath. */
.screens { display: flex; flex-direction: column; gap: var(--gap); }
.hud-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }
.shot { border: var(--edge); background: var(--void); }
/* `height: auto` is load-bearing, not a default being restated. The width/height
 * attributes are there so the browser reserves the right box before the PNG arrives; with
 * `width: 100%` and no `height: auto`, the attribute is taken as a literal pixel height
 * and every screenshot renders into a box of the wrong shape.
 *
 * Smooth scaling, not `pixelated`. These PNGs are 2x and 3x renders being shown a little
 * under their file size, and nearest-neighbour resampling on the way down is what dropped
 * the mod's one-pixel rules entirely. `pixelated` is for going up, and nothing here does. */
.shot img { width: 100%; height: auto; image-rendering: auto; }
.shot figcaption { border-top: var(--edge); padding: 10px 12px; color: var(--dim); font-size: 12px; background: var(--shell); }
.shot figcaption b { color: var(--text); font-weight: 400; }
.shot-stack { display: flex; flex-direction: column; gap: var(--gap); }
.shot-pair { display: flex; flex-direction: column; gap: var(--gap); }

/* The overlay is a tall, narrow strip, so it does not want a caption underneath it: two of
 * them side by side in the right-hand column left each caption about a hundred pixels wide
 * and eleven lines long. Caption beside the image instead, which is also what the shape of
 * the artwork was asking for. */
/* 240px, not 150: the overlay is 238 logical pixels wide, so anything under that is
 * sampling it down and losing the same one-pixel rules the control screens were losing. */
.shot.side { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); align-items: start; }
.shot.side img { border-right: var(--edge); }
.shot.side figcaption { border-top: 0; background: var(--shell); }

/* --- video --------------------------------------------------------------------- */

.tapes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.tape { border: var(--edge); background: var(--shell); display: flex; flex-direction: column; }

/* The lead tape is the newest model, and it is laid out differently rather than merely
 * being first in an identical row -- poster beside the copy instead of above it. */
.tape.lead { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); margin-bottom: var(--gap); }
.tape.lead .tape-frame { border-bottom: 0; border-right: var(--edge); }
.tape.lead .tape-body { padding: 18px; align-self: center; }
.tape-frame { position: relative; aspect-ratio: 16 / 9; background: var(--void); border-bottom: var(--edge); }
.tape-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Facade until clicked: no YouTube request on load, which is also why there is no
 * consent banner anywhere on this site. */
.tape-poster {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    gap: 14px;
    background: var(--void);
    border: 0;
    cursor: pointer;
    font-family: var(--mono);
    color: var(--text);
    padding: 16px;
}
.tape-poster:hover { background: var(--well); }
.tape-play { color: var(--red); font-size: 28px; line-height: 1; }
.tape-poster .l { text-align: left; font-size: 16px; letter-spacing: 0.04em; }
.tape-poster .l .tape-play { display: block; margin-bottom: 6px; }
.tape.lead .tape-poster { gap: 24px; }
.tape.lead .tape-poster .l { font-size: 20px; }
.tape-poster .l span { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-top: 5px; }
.tape-poster canvas { flex: 0 0 auto; }
.tape-body { padding: 14px; }
.tape-body h3 { margin: 0 0 6px; font-size: 14px; font-weight: 400; letter-spacing: 0.04em; }
.tape-body p { color: var(--dim); font-size: 12px; }
.tape-meta { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
/* A flex item is blockified, so this link is a standalone control rather than a word in a
 * sentence, and it has to be tappable like one. */
.tape-meta a { display: inline-flex; align-items: center; min-height: 24px; }

/* --- the cast ------------------------------------------------------------------ */

.cast { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: var(--edge); }
.cast-cell { background: var(--well); padding: 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.cast-cell .n { font-size: 12px; letter-spacing: 0.16em; }
.cast-cell .c { color: var(--faint); font-size: 11px; }

/* --- leaderboard --------------------------------------------------------------- */

.tiers { display: flex; flex-direction: column; }
.tier {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    border: var(--edge);
    border-bottom: 0;
    background: var(--well);
}
.tier:last-child { border-bottom: var(--edge); }
.tier-key {
    display: flex; align-items: center; justify-content: center;
    border-right: var(--edge);
    background: var(--shell);
    padding: 14px 0;
}
.tier-body { padding: 13px 15px; min-width: 0; }
.tier-body h3 { margin: 0; font-size: 13px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; }
.tier-body p { color: var(--dim); font-size: 12px; margin: 4px 0 0; }
.tier-slots { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.slot {
    border: 1px dashed var(--line);
    color: var(--faint);
    font-size: 10px;
    letter-spacing: 0.14em;
    padding: 5px 10px;
    min-height: 26px;
    display: flex;
    align-items: center;
}

.standings { width: 100%; border-collapse: collapse; border: var(--edge); }
.standings caption { text-align: left; color: var(--faint); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; padding-bottom: 10px; }
.standings th, .standings td { text-align: left; padding: 11px 13px; border-bottom: var(--edge); font-weight: 400; }
.standings thead th { background: var(--chip); color: var(--dim); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.standings tbody td { color: var(--faint); background: var(--well); }
.standings tbody tr:last-child td { border-bottom: 0; }
.standings-wrap { overflow-x: auto; }

/* --- callout ------------------------------------------------------------------- */

.callout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; border: var(--edge); background: var(--shell); padding: 18px; }
.callout p { color: var(--dim); margin: 8px 0 0; max-width: 60ch; }

/* --- inquiries ----------------------------------------------------------------- */

.contact-card { align-self: start; min-width: 0; }
.contact-heading { display: flex; gap: 16px; align-items: center; justify-content: center; margin-bottom: 16px; }
.contact-heading h2 { margin: 0 0 4px; font-size: 16px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
.contact-heading p, .donation-card p { color: var(--dim); font-size: 12px; margin: 0; }
.contact-card .action-link { width: 100%; }
.contact-card .fine-print { text-align: center; }
.action-link, .copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    background: var(--chip);
    border: var(--edge);
    color: var(--mint);
    font: 11px var(--mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    appearance: none;
    -webkit-appearance: none;
}
.action-link:hover, .action-link:focus-visible, .copy-button:hover, .copy-button:focus-visible {
    background: var(--chip-hot);
    border-bottom-color: var(--line);
}
.copy-button { cursor: pointer; }
.fine-print { color: var(--faint); font-size: 11px; margin-top: 10px; overflow-wrap: anywhere; }

.directory { border: var(--edge); background: var(--well); }
.directory-row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    min-height: 58px;
    padding: 12px 14px;
    border-bottom: var(--edge);
    color: var(--text);
    min-width: 0;
}
.directory-row:last-child { border-bottom: 0; }
.directory-row:hover, .directory-row:focus-visible { background: var(--shell); border-bottom-color: var(--line); }
.directory-name { color: var(--mint); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.directory-copy { color: var(--dim); font-size: 12px; }
.directory-go { color: var(--faint); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }

.donation-card { max-width: 900px; min-width: 0; overflow: hidden; }
.wallet {
    display: block;
    margin: 14px 0;
    padding: 13px;
    border: var(--edge);
    background: var(--void);
    color: var(--amber);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.65;
    overflow-wrap: anywhere;
    word-break: break-all;
    user-select: all;
    max-width: 100%;
}
.copy-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.copy-status { color: var(--dim); font-size: 11px; }

/* --- the API, pricing and the account ------------------------------------------ */

.plans { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: var(--gap); align-items: start; }
.plan { border: var(--edge); background: var(--shell); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.plan.lead { background: var(--well); border-color: var(--mint); }
.plan h3 { margin: 0; font-size: 13px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; }
.plan .price { font-size: 26px; color: var(--text); line-height: 1.1; }
.plan .price small { font-size: 12px; color: var(--dim); letter-spacing: 0.06em; }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.plan li { color: var(--dim); font-size: 12px; padding-left: 14px; position: relative; }
.plan li::before { content: "\25AA"; position: absolute; left: 0; color: var(--mint); }
.plan li b { color: var(--text); font-weight: 400; }
.plan .action-link { align-self: flex-start; cursor: pointer; }

.rates { width: 100%; border-collapse: collapse; border: var(--edge); }
.rates th, .rates td { text-align: left; padding: 10px 12px; border-bottom: var(--edge); font-weight: 400; font-size: 12px; vertical-align: top; }
.rates thead th { background: var(--chip); color: var(--dim); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.rates tbody td { color: var(--dim); background: var(--well); }
.rates tbody td:first-child { color: var(--text); }
.rates code, .doc code { font-family: var(--mono); color: var(--amber); font-size: 12px; }
.rates-wrap { overflow-x: auto; }

.doc h3 { margin: 26px 0 8px; font-size: 13px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); }
.doc p, .doc li { color: var(--dim); max-width: 74ch; }
.doc ul, .doc ol { padding-left: 20px; margin: 0 0 0.9em; }
.doc li { margin-bottom: 4px; }
.doc strong { color: var(--text); font-weight: 400; }
pre.code {
    margin: 10px 0 16px;
    padding: 13px;
    border: var(--edge);
    background: var(--void);
    color: var(--text);
    font: 12px/1.6 var(--mono);
    overflow-x: auto;
    max-width: 100%;
}
pre.code .c { color: var(--faint); }

.notice { border: var(--edge); border-left: 3px solid var(--amber); background: var(--well); padding: 12px 14px; color: var(--dim); font-size: 12px; margin: 0 0 var(--gap); }
.notice.mint { border-left-color: var(--mint); }
.notice.red { border-left-color: var(--red); }
.notice strong { color: var(--text); font-weight: 400; }

.form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { color: var(--dim); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.field input {
    min-height: 34px;
    padding: 7px 10px;
    background: var(--void);
    border: var(--edge);
    color: var(--text);
    font: 13px var(--mono);
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
}
.field input:focus-visible { outline: 2px solid var(--mint); outline-offset: 1px; }
.check-row { display: flex; gap: 10px; align-items: center; color: var(--dim); font-size: 12px; min-height: 24px; }
.check-row input { width: 24px; height: 24px; flex: 0 0 24px; margin: 0; accent-color: var(--mint); }
.form-status { min-height: 18px; font-size: 12px; color: var(--amber); }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.dash { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
/* Flex, not a 2-column grid: the controls wrap under the key when the card is narrow,
   instead of a wide region picker squeezing the key text to one character a line. */
.key-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; border-bottom: var(--edge); }
.key-row > :first-child { flex: 1 1 220px; min-width: 0; }
.key-row > .key-actions { flex: 0 1 auto; max-width: 100%; }
.key-region { min-width: 0; text-overflow: ellipsis; }
.key-row:last-child { border-bottom: 0; }
.key-row code { font: 12px var(--mono); color: var(--text); overflow-wrap: anywhere; }
.key-row span { color: var(--faint); font-size: 11px; display: block; margin-top: 2px; }
.secret-once { display: block; margin: 10px 0; padding: 12px; border: 1px solid var(--amber); background: var(--void); color: var(--amber); font: 12px var(--mono); overflow-wrap: anywhere; user-select: all; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hidden { display: none !important; }

/* The latency notice every buyer ticks before Stripe (account.js). */
.notice-dialog {
    background: var(--shell);
    color: var(--text);
    border: var(--edge);
    border-left: 3px solid var(--amber);
    padding: 18px;
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
}
.notice-dialog::backdrop { background: rgba(10, 12, 17, 0.85); }
.notice-dialog p { color: var(--dim); font-size: 12px; margin: 0 0 10px; }
.notice-dialog p strong { color: var(--text); font-weight: 400; }
.notice-dialog .check-row { margin-top: 14px; }
.notice-dialog .button-row { margin-top: 16px; justify-content: flex-end; }
.action-link:disabled { color: var(--faint); cursor: not-allowed; }

/* --- developer dashboard (dev.html) --------------------------------------------- */

.cell-input {
    min-height: 34px;
    padding: 7px 10px;
    background: var(--void);
    border: var(--edge);
    color: var(--text);
    font: 13px var(--mono);
    max-width: 100%;
}
.cell-input:focus-visible { outline: 2px solid var(--mint); outline-offset: 1px; }
.rates .cell-input { min-height: 30px; padding: 4px 6px; width: 7.5em; font-size: 12px; }
.rates select.cell-input { width: auto; }
.rates .check-row { min-height: 30px; }
.devgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: var(--gap); align-items: start; margin-bottom: var(--gap); }
.devstack { display: flex; flex-direction: column; gap: var(--gap); }
.rates-wrap.tall { max-height: 460px; overflow-y: auto; }
.rates-wrap.tall thead th { position: sticky; top: 0; }
.hero-facts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fact .v.amber { color: var(--amber); }
.fact .v.red { color: var(--red); }
.region-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: var(--edge); }
.region-row:last-child { border-bottom: 0; }
.region-row .meta { color: var(--faint); font-size: 11px; margin-top: 3px; overflow-wrap: anywhere; }
.bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; align-items: end; height: 150px; border-bottom: var(--edge); margin-top: 12px; }
.bar-pair { display: flex; gap: 2px; align-items: flex-end; height: 100%; min-width: 0; }
.bar { flex: 1 1 0; min-height: 1px; }
.bar.rev { background: var(--mint); }
.bar.gpu { background: var(--red); }
.bar-days { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; margin-top: 6px; font-size: 9px; color: var(--faint); text-align: center; }
.legend-line { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 11px; color: var(--dim); }
.swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.swatch.rev { background: var(--mint); }
.swatch.gpu { background: var(--red); }
.sampler-row td { background: var(--void) !important; }
.sampler-grid { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.sampler-grid .field { min-width: 0; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 16px; }

/* --- footer -------------------------------------------------------------------- */

footer { border-top: var(--edge); margin-top: 48px; padding: 22px 0 40px; }
.foot { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; color: var(--faint); font-size: 11px; letter-spacing: 0.06em; }
.foot a { color: var(--dim); }
.foot-socials { flex-basis: 100%; }

/* ---------------------------------------------------------------- narrow screens --- */

/* The mod drops cards that do not fit rather than painting them half outside their own
 * panel. Same idea: columns collapse, nothing is allowed to overflow sideways. */
@media (max-width: 900px) {
    .hero, .brain-grid, .tapes, .tape.lead { grid-template-columns: minmax(0, 1fr); }
    .tape.lead .tape-frame { border-bottom: var(--edge); border-right: 0; }
    .callout { grid-template-columns: minmax(0, 1fr); }
    /* The overlay strips stop sharing a row: two side-caption figures in half a phone is
     * a 90px image column and a caption one word wide. */
    .hud-row { grid-template-columns: minmax(0, 1fr); }
    .plans, .auth-grid, .dash { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    body { font-size: 13px; }
    section { padding: 30px 0 6px; }
    .marquee-in { min-height: 50px; }
    #marquee-stars { display: none; }
    .nav { width: 100%; }
    .nav a { flex: 1 1 auto; justify-content: center; }
    .shot.side { grid-template-columns: minmax(0, 1fr); }
    .shot.side img { border-right: 0; border-bottom: var(--edge); max-width: 240px; }
    .shot.side figcaption { border-top: var(--edge); }
    .pen-top { flex-direction: column; }
    /* The roster loses its caret column and its right-hand species label before it
     * starts squeezing the name, which is the load-bearing string. */
    .stable-row { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
    .stable-row .caret, .stable-row .stable-side { display: none; }
    .tier { grid-template-columns: 44px minmax(0, 1fr); }
    .directory-row { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; }
    .directory-copy { grid-column: 1 / -1; }
    .contact-heading { flex-direction: column; text-align: center; }
    .copy-button { width: 100%; }
    .wallet { font-size: 11px; }
    .hero-facts.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bars, .bar-days { gap: 2px; }
    .region-row { grid-template-columns: minmax(0, 1fr); }
    .devgrid { grid-template-columns: minmax(0, 1fr); }
}

/* Motion is events, not loops -- and for anyone who has asked for less of it, none. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Per-key regional routing controls. */
.field select, .key-region { min-height: 34px; padding: 7px 10px; background: var(--void); border: var(--edge); color: var(--text); font: 12px var(--mono); max-width: 100%; }
.field select { width: 100%; }
.field select:focus-visible, .key-region:focus-visible { outline: 2px solid var(--mint); outline-offset: 1px; }
.key-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 540px) { .key-row > .key-actions { flex-basis: 100%; } }

/* --- the showcase (index) -------------------------------------------------------- */

/* The hero leads with the result now, so the kicker and the two calls to action sit
 * either side of the headline. The kicker's lamp is the one loop on the page that is
 * allowed to blink without an event: it is a recording light. */
.hero-kicker { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; color: var(--dim); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.lamp.blink::before { animation: lamp-blink 1.4s steps(1, end) infinite; }
@keyframes lamp-blink { 50% { background: transparent; } }
.hero .button-row { margin-top: 18px; }
.action-link.hot { background: var(--mint-dark); border-color: var(--mint); color: var(--mint); }
.action-link.hot:hover, .action-link.hot:focus-visible { background: var(--mint-dark); color: var(--text); }

/* The duel card: the replay on top, the set tallies under it. */
.duel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.duel-stage { background: var(--void); border: var(--edge); min-width: 0; }
#duel-canvas { display: block; }
.duel-note { color: var(--dim); font-size: 11px; margin: 0; }

.sets { border: var(--edge); background: var(--well); }
.set-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: var(--edge); }
.set-row:last-child { border-bottom: 0; }
.set-vs { color: var(--dim); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
/* A score is one token: "45-18" broken over two lines reads as two numbers. */
.hero .fact .v { white-space: nowrap; }
.set-score { color: var(--text); font-size: 13px; letter-spacing: 0.04em; }
.cells { display: flex; flex-wrap: wrap; gap: 2px; min-width: 0; }
.cell { width: 7px; height: 7px; background: var(--chip); }
.cell.w { color: var(--mint); }
.cell.l { color: var(--red); }
/* Each round lights in turn, once, when the row is first seen -- the set being played
 * back, not a loop. `steps` so a square is off or on, never half a colour. */
.cells.lit .cell { animation: cell-lit 0.16s steps(1, end) forwards; }
@keyframes cell-lit { to { background: currentColor; } }

/* The receipts table under the lead tape. */
.tape-body .rates { margin: 12px 0 4px; }
.tape-body .rates td.win { color: var(--mint); }

/* The archive is a directory of links out, so it reuses that row and only adds an icon. */
.directory-row canvas { display: block; }
.archive .directory-row { grid-template-columns: 34px 170px minmax(0, 1fr) auto; }

/* --- the run: a dated log, the way the mod's event tape reads ---------------------- */

.run { border: var(--edge); background: var(--well); }
.run-row {
    display: grid;
    grid-template-columns: 70px 34px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: var(--edge);
}
.run-row:last-child { border-bottom: 0; }
.run-row.peak { background: var(--shell); border-left: 3px solid var(--amber); padding-left: 11px; }
.run-date { color: var(--amber); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.run-row canvas { display: block; }
.run-row h3 { margin: 0; font-size: 13px; font-weight: 400; letter-spacing: 0.04em; color: var(--text); }
.run-row p { margin: 2px 0 0; color: var(--dim); font-size: 12px; }
.run-row .action-link { min-height: 30px; padding: 6px 10px; }

/* Proof chips on the stable rows. */
.stable-proof { display: inline-block; margin-left: 8px; color: var(--amber); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }

@media (max-width: 640px) {
    .run-row { grid-template-columns: 34px minmax(0, 1fr); gap: 4px 12px; }
    .run-row canvas { grid-row: 1 / span 2; }
    .run-date { grid-column: 2; }
    .run-body { grid-column: 2; }
    .run-row .action-link { grid-column: 2; justify-self: start; margin-top: 6px; }
    .archive .directory-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
    .archive .directory-copy { grid-column: 2 / -1; }
    .archive .directory-go { grid-column: 3; grid-row: 1; white-space: nowrap; }
    .set-row { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 8px; }
    /* Four facts in a 2x2, not three and an orphan. */
    .hero .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* 26 rounds of 15-11 on one line at phone width. */
    .cell { width: 5px; height: 5px; }
}

/* --- R1 Local (r1.html) ---------------------------------------------------------- */

/* The creatures' own colours (Creature.java), used only as each bot's accent edge and name. */
:root { --pip: #4fb2ff; --rivet: #ff3d8b; --monarch: #ffd84a; }

.r1-trailer { align-self: start; }
.r1-trailer video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--well); border: var(--edge); }

/* The family is a roster, like the stable on the index: rows, not three interchangeable tiles. */
.r1-family { display: grid; gap: var(--gap); }
.r1-bot {
    display: grid;
    grid-template-columns: 184px minmax(0, 1fr) 172px;
    gap: 18px;
    align-items: center;
    background: var(--shell);
    border: var(--edge);
    border-left: 3px solid var(--bot);
    padding: 14px;
}
.r1-bot-art video { display: block; width: 100%; height: auto; aspect-ratio: 1; background: var(--well); border: var(--edge); }
.r1-bot-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; color: var(--bot); font-weight: 400; }
.r1-bot-tier { color: var(--dim); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.r1-bot-body p { color: var(--dim); margin: 0; max-width: 62ch; }
.r1-bot-body p strong { color: var(--text); font-weight: 400; }
.r1-points { margin: 10px 0 0; padding-left: 18px; color: var(--dim); font-size: 12px; }
.r1-points li { margin: 3px 0; }
.r1-bot-side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.r1-bot-side .fine-print { margin-top: 0; }
.r1-price { font: 22px var(--mono); color: var(--text); }
.r1-ladder { margin: var(--gap) 0 0; }
.r1-ladder img, .r1-feature img { display: block; width: 100%; height: auto; border: var(--edge); }

.r1-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 76ch; }
.r1-steps li { display: flex; gap: 12px; align-items: flex-start; color: var(--dim); }
.r1-steps strong { color: var(--text); font-weight: 400; }
.r1-step-n { flex: 0 0 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--mint); color: var(--mint); font: 12px var(--mono); }

/* One big picture and two small ones beside it. */
.r1-features { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--gap); }
.r1-feature { margin: 0; }
.r1-feature.wide { grid-row: span 2; }
.r1-feature figcaption { color: var(--dim); font-size: 12px; margin-top: 10px; }
.r1-feature figcaption strong { color: var(--text); font-weight: 400; }

.r1-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--gap); align-items: start; }
.r1-columns p { color: var(--dim); margin: 0; }
.r1-columns p strong { color: var(--text); font-weight: 400; }

.r1-faq { max-width: 80ch; }
.r1-qa { border-bottom: var(--edge); padding: 12px 0; }
.r1-qa h3 { color: var(--text); font-size: 13px; font-weight: 400; margin: 0; }
.r1-qa p { color: var(--dim); margin: 6px 0 0; }
.r1-soon { display: inline-flex; align-items: center; min-height: 30px; padding: 6px 10px; border: var(--edge); color: var(--dim); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.notice-dialog .r1-points { margin: 0 0 10px; }

@media (max-width: 900px) {
    .r1-bot { grid-template-columns: 132px minmax(0, 1fr); }
    .r1-bot-side { grid-column: 1 / -1; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; }
    .r1-features, .r1-columns { grid-template-columns: minmax(0, 1fr); }
    .r1-feature.wide { grid-row: auto; }
}
@media (max-width: 540px) {
    .r1-bot { grid-template-columns: minmax(0, 1fr); }
    .r1-bot-art { max-width: 200px; }
}

/* --- developer portal: sections (dev.html) -------------------------------------- */

.portal { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.portal-nav {
    position: sticky;
    top: 78px;
    display: flex;
    flex-direction: column;
    background: var(--shell);
    border: var(--edge);
}
.portal-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 40px;
    padding: 9px 12px;
    border-left: 3px solid transparent;
    border-bottom: var(--edge);
    color: var(--dim);
    font: 12px var(--mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
}
.portal-nav a:hover, .portal-nav a:focus-visible { background: var(--chip); color: var(--text); }
.portal-nav a[aria-current] { border-left-color: var(--mint); background: var(--chip); color: var(--text); }
.nav-badge { font-size: 10px; letter-spacing: 0.06em; color: var(--dim); }
.nav-badge:empty { display: none; }
.nav-badge.mint { color: var(--mint); }
.nav-badge.amber { color: var(--amber); }
.nav-badge.red { color: var(--red); }
.portal-who { display: flex; flex-direction: column; gap: 6px; padding: 12px; font-size: 11px; color: var(--faint); overflow-wrap: anywhere; }
.portal-who .lamp { letter-spacing: 0.08em; }
.portal-main { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.portal-section { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.portal-section[hidden], [data-log-pane][hidden] { display: none; }
.portal-main .devgrid { margin-bottom: 0; }
.section-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-bar h2 { margin: 0; font-size: 15px; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text); }

.attention { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.attention li { border-left: 3px solid var(--line); background: var(--well); padding: 8px 10px; font-size: 12px; color: var(--dim); }
.attention li.mint { border-left-color: var(--mint); }
.attention li.amber { border-left-color: var(--amber); }
.attention li.red { border-left-color: var(--red); }
.attention a { color: var(--text); text-decoration: none; display: block; }
.attention a:hover, .attention a:focus-visible { text-decoration: underline; }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.kpi { display: flex; flex-direction: column; gap: 3px; padding: 12px; background: var(--shell); border: var(--edge); text-decoration: none; min-width: 0; }
.kpi:hover, .kpi:focus-visible { background: var(--chip); }
.kpi .v { font-size: 20px; color: var(--mint); line-height: 1.2; overflow-wrap: anywhere; }
.kpi .v.amber { color: var(--amber); }
.kpi .v.red { color: var(--red); }
.kpi .k { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; }
.toolbar .field { min-width: 130px; flex: 0 1 auto; }
.toolbar .field.grow { flex: 1 1 220px; }
.card.flush { padding: 0; }
.card.flush .rates { border: 0; }
.hero-facts.r1-facts { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; background: none; border: 0; margin-top: 0; }
.hero-facts.r1-facts .fact { border: var(--edge); min-width: 0; overflow-wrap: anywhere; }
.card .hero-facts.r1-facts { margin-top: 4px; }

.seg { display: flex; flex-wrap: wrap; }
.seg button {
    min-height: 34px;
    padding: 8px 12px;
    background: var(--chip);
    border: var(--edge);
    color: var(--dim);
    font: 11px var(--mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}
.seg button + button { border-left: 0; }
.seg button[aria-selected="true"] { color: var(--mint); background: var(--chip-hot); border-bottom: 2px solid var(--mint); padding-bottom: 7px; }
.more-row { justify-content: center; }

.copy-button.danger, .action-link.danger { color: var(--red); }
.copy-button:disabled { color: var(--faint); cursor: not-allowed; }
.link-button {
    background: none;
    border: 0;
    padding: 0;
    min-height: 24px;
    color: var(--mint);
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-decoration: underline;
    cursor: pointer;
}
.account-title { font: 15px var(--mono); color: var(--text); overflow-wrap: anywhere; }
[data-account-detail] { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
h3.sub { margin: 10px 0 0; font-size: 11px; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.button-row.tight { gap: 6px; }
.button-row.tight .copy-button { min-height: 28px; padding: 4px 8px; }
.actions-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.portal-dialog { border-left-color: var(--mint); }
.portal-dialog h3 { margin: 0; font-size: 13px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); }
.portal-dialog .field input, .portal-dialog .field select { width: 100%; }

@media (max-width: 900px) {
    .portal { grid-template-columns: minmax(0, 1fr); }
    .portal-nav { position: static; flex-direction: row; flex-wrap: wrap; }
    .portal-nav a { border-left: 0; border-bottom: 3px solid transparent; flex: 1 1 auto; justify-content: center; }
    .portal-nav a[aria-current] { border-bottom-color: var(--mint); }
    .portal-who { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; gap: 6px 14px; border-top: var(--edge); }
}
@media (max-width: 640px) {
    .toolbar .field { flex: 1 1 140px; }
    .button-row.tight .copy-button { width: auto; }
}
[data-dialog-fields] { display: flex; flex-direction: column; gap: 12px; }
[data-dialog-fields]:empty, [data-dialog-text]:empty { display: none; }

/* /pay.html: a Bitcoin order (assets/js/pay.js). */
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--gap); align-items: start; margin-bottom: var(--gap); }
.field-label { color: var(--dim); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.pay-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.pay-value { font: 14px var(--mono); color: var(--text); overflow-wrap: anywhere; user-select: all; }
.pay-qr { width: min(100%, 260px); margin: 10px 0; background: #fff; }
.pay-qr svg { display: block; width: 100%; height: auto; }

/* dev.html #wallet: the recovery words, numbered, in reading order. */
.word-grid { list-style: decimal inside; margin: 12px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 6px; }
.word-grid li { font: 14px var(--mono); color: var(--text); background: var(--well); border: var(--edge); padding: 6px 8px; }
.kpis.wallet-kpis { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.wallet-kpis .kpi .v { font-size: 17px; }

/* /sword-coach.html: one real fight, the shots, the 44 techniques (assets/js/coach.js). */
.coach-hero .fact dd { margin: 0; }
.coach-fight { display: flex; flex-direction: column; gap: 12px; }
.coach-key { color: var(--dim); font-size: 11px; display: inline-flex; align-items: center; gap: 6px; }
.coach-key i { display: inline-block; width: 14px; height: 3px; }
.coach-key i.you { background: var(--mint); }
.coach-key i.them { background: var(--amber); margin-left: 8px; }
.coach-chart { border: var(--edge); background: var(--well); min-height: 150px; }
.coach-chart svg { display: block; width: 100%; height: 170px; }
.coach-chart polyline { fill: none; stroke-width: 2; }
.coach-chart polyline.you { stroke: var(--mint); }
.coach-chart polyline.them { stroke: var(--amber); }
.coach-chart .pick { fill: var(--chip-hot); }
.coach-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(24px, 1fr)); gap: 3px; }
.coach-strip .cell { appearance: none; -webkit-appearance: none; width: 100%; min-height: 28px; background: var(--chip); border: var(--edge); cursor: pointer; padding: 0; }
.coach-strip .cell.good { background: var(--mint-dark); border-color: var(--mint); }
.coach-strip .cell.bad { background: var(--red-dark); border-color: var(--red); }
.coach-strip .cell[aria-pressed="true"] { outline: 2px solid var(--text); outline-offset: 1px; }
.coach-read { min-height: 132px; }
.coach-read .head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--dim); font-size: 12px; margin-bottom: 10px; }
.coach-read .head .n { color: var(--text); }
.coach-read .sides { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); }
.coach-read .side { border-left: 3px solid var(--line); padding-left: 12px; min-width: 0; }
.coach-read .side.you { border-left-color: var(--mint); }
.coach-read .side.them { border-left-color: var(--amber); }
.coach-read .side .k { color: var(--dim); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }
.coach-read .side .v { color: var(--text); font-size: 16px; margin: 2px 0; }
.coach-read .side .h { color: var(--dim); font-size: 12px; }
.coach-read .call { color: var(--dim); margin: 12px 0 0; font-size: 12px; }
.coach-read .call.good { color: var(--mint); }
.coach-read .call.bad { color: var(--red); }
.coach-shots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); }
.coach-shot { margin: 0; min-width: 0; }
.coach-shot.wide { grid-column: 1 / -1; }
.coach-shot img { display: block; width: 100%; height: auto; border: var(--edge); }
.coach-shot figcaption { color: var(--dim); font-size: 12px; margin-top: 10px; max-width: 80ch; }
.coach-shot figcaption strong { color: var(--text); font-weight: 400; }
.coach-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.brain-pill { appearance: none; -webkit-appearance: none; min-height: 30px; padding: 6px 10px; background: var(--chip); border: var(--edge); color: var(--dim); font: 11px var(--mono); letter-spacing: 0.08em; cursor: pointer; }
.brain-pill:hover, .brain-pill:focus-visible { background: var(--chip-hot); color: var(--text); }
.brain-pill[aria-pressed="true"] { background: var(--mint-dark); border-color: var(--mint); color: var(--mint); }
.coach-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1px; background: var(--line); border: var(--edge); }
.coach-list .tech { background: var(--well); padding: 10px 12px; min-width: 0; }
.coach-list .name { color: var(--text); display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.coach-list .tier { color: var(--dim); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; flex: 0 0 auto; }
.coach-list p { color: var(--dim); font-size: 12px; margin: 4px 0 0; }
.coach-needs { max-width: 76ch; font-size: 13px; }
@media (max-width: 760px) {
    .coach-shots { grid-template-columns: minmax(0, 1fr); }
    .coach-read .sides { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
