/* gamesense.kirk site theme, gamesense.pub forum language.
 *
 * Design read: product site + member/admin control panels for gamesense.kirk users,
 * gamesense forum visual language. Dials: ENERGY 2 / RHYTHM 2 / MOTION 1.
 *
 * Why each decision (antislop R-31):
 * - Colors: lifted from ModScreen.java (COL_WINDOW #0E0E0E, COL_PANEL_BORDER #222, COL_GREEN #96C93D)
 *   so the site and the in-game menu read as one product.
 * - Dark only: the product is an in-game menu that users open over a dark UI; the brand has no light form.
 * - Verdana: the font gamesense renders its menu and forum in; built for screen legibility at 11-13px.
 *   No web font download, so text paints immediately.
 * - Square corners everywhere: gamesense controls are square; radius 0 is the system, not an omission.
 * - Rainbow strip: the 2px HSB sweep from ModScreen.renderRainbowStrip, used only on top of the page
 *   and on top of "window" surfaces (dialogs, login/register windows). Nowhere else.
 * - Lime: the single accent. Links, the active nav underline, checked controls, and one primary button per screen.
 * - Tables and category bars instead of card grids: forum structure carries the hierarchy.
 * - Groupboxes (fieldset + legend) only around forms, like menu groupboxes.
 * - Shadow only on dialogs (they float above the page); nothing else is elevated.
 * - Motion: hover/press state changes and a loading bar only, all off under prefers-reduced-motion.
 */

:root {
  color-scheme: dark;
  --page: #0a0a0a;
  --board: #0e0e0e;
  --row: #101010;
  --row-hover: #151515;
  --inset: #080808;
  --head-a: #1b1b1b;
  --head-b: #141414;
  --line: #222222;
  --line-soft: #1a1a1a;
  --line-ctl: #2e2e2e;
  --text: #a6a6a6;
  --text-dim: #8a8a8a;
  --text-bright: #cccccc;
  --white: #eaeaea;
  --lime: #96c93d;
  --lime-hi: #b2de5f;
  --lime-dim: #5f7f26;
  --red: #f26461; /* 5.07:1 on the lightest control surface, 6.22:1 on the board */
  --red-line: #5a2424;
  --yellow: #ffd740;
  --mono: Consolas, "Lucida Console", "DejaVu Sans Mono", monospace;
  --sans: Verdana, Tahoma, "DejaVu Sans", Geneva, sans-serif;
  --rainbow: linear-gradient(90deg,
    hsl(0 100% 57.5%), hsl(60 100% 57.5%), hsl(120 100% 57.5%), hsl(180 100% 57.5%),
    hsl(240 100% 57.5%), hsl(300 100% 57.5%), hsl(360 100% 57.5%));
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #2a2a2a var(--page); }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 12px/1.55 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, video, canvas { max-width: 100%; display: block; }
/* Author display rules (.cp, .field, ...) would otherwise beat the UA [hidden] rule. */
[hidden] { display: none !important; }
td code { overflow-wrap: anywhere; }
h1, h2, h3, h4 { color: var(--white); margin: 0; font-weight: bold; line-height: 1.3; }
h1 { font-size: 20px; }
h2 { font-size: 13px; }
h3 { font-size: 12px; }
p { margin: 0 0 10px; }
ul, ol { margin: 0; padding: 0; }
strong, b { color: var(--text-bright); }
small { font-size: 11px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

a { color: var(--lime); text-decoration: none; }
a:hover { color: var(--lime-hi); text-decoration: underline; }

/* One visible focus treatment for every control (R-32). */
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
a, button, summary, select, label[for], input[type="checkbox"], input[type="radio"], input[type="range"], [role="tab"] { cursor: pointer; }
:disabled, [aria-disabled="true"] { cursor: not-allowed; }

code, kbd, .mono { font-family: var(--mono); font-size: 12px; }
code { background: var(--inset); border: 1px solid var(--line-soft); padding: 0 4px; color: var(--text-bright); }
kbd { background: #181818; border: 1px solid var(--line-ctl); border-bottom-width: 2px; padding: 0 5px; color: var(--text-bright); }
pre.code {
  margin: 0 0 12px; padding: 10px 12px; background: var(--inset); border: 1px solid var(--line-soft);
  color: var(--text-bright); font: 12px/1.6 var(--mono); overflow-x: auto; white-space: pre;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 8px; top: -40px; z-index: 50; background: var(--lime); color: #000; padding: 6px 10px; }
.skip:focus { top: 8px; }

/* ── Signature strip ─────────────────────────────────────────── */
.gs-strip { height: 2px; background: var(--rainbow); flex: 0 0 auto; }

/* ── Header ──────────────────────────────────────────────────── */
.gs-head { background: #0c0c0c; }
.gs-head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.logo { font: bold 22px/1 var(--sans); color: var(--white); letter-spacing: -0.5px; }
.logo span, .logo-sm span { color: var(--lime); }
.logo:hover { color: var(--white); text-decoration: none; }
.logo-sm { font-weight: bold; color: var(--text-bright); }

.userbox { display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 12px; flex-wrap: wrap; }
.userbox .who { display: flex; align-items: center; gap: 8px; color: var(--text-bright); }
.userbox ul { list-style: none; display: flex; align-items: center; gap: 2px 12px; flex-wrap: wrap; }
.userbox li { display: flex; align-items: center; }
.userbox .linklike { line-height: inherit; }
.userbox .count { color: #0a0a0a; background: var(--lime); padding: 0 5px; margin-left: 3px; font-size: 11px; font-weight: bold; }
.avatar {
  width: 32px; height: 32px; flex: 0 0 auto; display: inline-grid; place-items: center;
  background: #1c1c1c; border: 1px solid var(--line-ctl); color: var(--lime); font-weight: bold; font-size: 13px;
  text-transform: uppercase;
}
.avatar.lg { width: 72px; height: 72px; font-size: 28px; }
.avatar.sm { width: 22px; height: 22px; font-size: 11px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Navigation bar (forum navlinks) ─────────────────────────── */
.gs-nav { background: var(--row); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gs-nav-in { display: flex; align-items: stretch; }
.gs-nav ul { list-style: none; display: flex; flex-wrap: wrap; }
.gs-nav a {
  display: block; padding: 10px 12px; color: var(--text); font-size: 12px;
}
.gs-nav a:hover { color: var(--white); background: var(--row-hover); text-decoration: none; }
.gs-nav a[aria-current="page"] { color: var(--white); background: #161616; box-shadow: inset 0 -2px 0 var(--lime); }
.gs-nav .nav-toggle { display: none; }

.gs-crumbs { border-bottom: 1px solid var(--line); background: #0c0c0c; }
.gs-crumbs-in { display: flex; justify-content: space-between; gap: 8px 16px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; font-size: 11px; }
.crumbs { color: var(--text-dim); }
.crumbs a { color: var(--text-bright); }
.crumbs .sep { margin: 0 6px; color: var(--text-dim); }
.crumbs-meta { color: var(--text-dim); }
.crumbs-meta b { color: var(--text-bright); font-weight: normal; }

.gs-main { padding: 16px 0 32px; }

/* ── Footer ──────────────────────────────────────────────────── */
.gs-foot { border-top: 1px solid var(--line); background: #0c0c0c; font-size: 11px; color: var(--text-dim); }
.gs-foot-in { display: flex; justify-content: space-between; align-items: center; gap: 8px 20px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.gs-foot p { margin: 0; }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.foot-links a { color: var(--text); }

/* ── Boards (category bar + body) ────────────────────────────── */
.board { background: var(--board); border: 1px solid var(--line); margin-bottom: 16px; min-width: 0; }
.board-head {
  display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap;
  padding: 8px 12px; background: linear-gradient(var(--head-a), var(--head-b)); border-bottom: 1px solid var(--line);
}
.board-head h2, .board-head h1 { font-size: 12px; color: var(--white); }
.board-head .meta { font-size: 11px; color: var(--text-dim); }
.board-body { padding: 12px; }
.board-body > :last-child { margin-bottom: 0; }
.board-foot { padding: 8px 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--text-dim); display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; justify-content: space-between; }

/* Forum-style tables */
/* position:relative makes the wrapper the containing block for .visually-hidden spans inside wide tables;
   without it they escape the overflow clip and widen the whole page. */
.tbl-wrap { position: relative; width: 100%; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: bold; color: var(--text-dim); background: #121212;
  padding: 6px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #121212; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .nowrap { white-space: nowrap; }
.tbl .narrow { width: 1%; white-space: nowrap; }
.row-title { color: var(--white); font-weight: bold; }
a.row-title:hover { color: var(--lime-hi); }
.row-desc { color: var(--text-dim); font-size: 11.5px; margin-top: 2px; }
.row-desc p { margin: 0; }

/* Tables that become stacked rows on phones (td needs data-label). */
@media (max-width: 720px) {
  .tbl.stack thead { display: none; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .tbl.stack tr:last-child { border-bottom: 0; }
  .tbl.stack td { border: 0; padding: 4px 12px; text-align: left; }
  .tbl.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--text-dim); }
  .tbl.stack td.num { text-align: left; }
}

/* ── Status labels (real states only) ────────────────────────── */
.tag {
  display: inline-block; padding: 0 6px; font-size: 11px; line-height: 18px; border: 1px solid var(--line-ctl);
  color: var(--text); background: #141414; white-space: nowrap; vertical-align: middle;
}
.tag.ok { color: var(--lime); border-color: var(--lime-dim); }
.tag.bad { color: var(--red); border-color: var(--red-line); }
.tag.warn { color: var(--yellow); border-color: #5a4a14; }
.yes { color: var(--lime); }
.no { color: var(--text-dim); }
.txt-red { color: var(--red); }
.txt-yellow { color: var(--yellow); }
.txt-lime { color: var(--lime); }
.txt-dim { color: var(--text-dim); }
.txt-bright { color: var(--text-bright); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 30px; padding: 5px 14px; font: 12px/1.2 var(--sans); color: var(--text-bright);
  background: linear-gradient(#232323, #1a1a1a); border: 1px solid var(--line-ctl);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); text-align: center; white-space: nowrap;
}
.btn:hover { color: var(--white); border-color: #3e3e3e; background: linear-gradient(#2b2b2b, #202020); text-decoration: none; }
.btn:active { background: #161616; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; }
.btn:disabled:hover { color: var(--text-bright); border-color: var(--line-ctl); background: linear-gradient(#232323, #1a1a1a); }
.btn-primary { color: #0a0a0a; font-weight: bold; background: linear-gradient(#a6d64e, #87b834); border-color: #6c9629; }
.btn-primary:hover { color: #000; border-color: #86b734; background: linear-gradient(#b4e15f, #95c63e); }
.btn-primary:active { background: #7fae2f; }
.btn-primary:disabled:hover { color: #0a0a0a; border-color: #6c9629; background: linear-gradient(#a6d64e, #87b834); }
.btn-danger { color: var(--red); }
.btn-danger:hover { color: #ff7a77; border-color: var(--red-line); background: linear-gradient(#2a1616, #201111); }
.btn-sm { min-height: 24px; padding: 2px 9px; font-size: 11px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; color: var(--lime); font: inherit; }
.linklike:hover { color: var(--lime-hi); text-decoration: underline; }
.linklike.row-title { color: var(--white); text-align: left; font-weight: bold; }
.linklike.row-title:hover { color: var(--lime-hi); }

/* ── Groupbox forms ──────────────────────────────────────────── */
fieldset.gb { border: 1px solid var(--line); background: var(--board); margin: 0 0 16px; padding: 12px 14px 14px; min-width: 0; }
fieldset.gb > legend { padding: 0 6px; margin-left: -2px; font-weight: bold; color: var(--text-bright); font-size: 12px; }
.gb-note { color: var(--text-dim); font-size: 11.5px; margin: 0 0 10px; }
.field { display: grid; gap: 4px; margin-bottom: 10px; min-width: 0; }
.field > label, .field > .label { font-size: 11.5px; color: var(--text); }
.field .hint { font-size: 11px; color: var(--text-dim); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { flex: 1 1 180px; margin-bottom: 0; }

.input, select.input, textarea.input {
  width: 100%; min-height: 30px; padding: 6px 8px; font: 12px/1.4 var(--sans); color: var(--white);
  background: var(--inset); border: 1px solid #2a2a2a; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); border-radius: 0;
}
textarea.input { min-height: 90px; resize: vertical; }
.input::placeholder { color: #808080; } /* 5.07:1 on the inset field, AA for small text */
.input:hover { border-color: #353535; }
.input:focus { border-color: var(--lime-dim); }
.input:focus-visible { outline: 2px solid var(--lime); outline-offset: 0; }
.input[aria-invalid="true"] { border-color: var(--red); }
.input.mono { font-family: var(--mono); }
select.input { appearance: none; padding-right: 26px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 13px) 50%, calc(100% - 9px) 50%; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }

/* gamesense checkbox: small square, lime fill when on */
.check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; color: var(--text); font-size: 12px; cursor: pointer; }
.check:has(input:disabled) { cursor: not-allowed; }
.chips button:disabled { opacity: .45; }
fieldset.gb hr { margin: 10px 0; border-top-color: var(--line-soft); }
.check input[type="checkbox"], .check input[type="radio"] {
  appearance: none; flex: 0 0 auto; width: 13px; height: 13px; margin: 1px 0 0; border: 1px solid #383838;
  background: linear-gradient(#2a2a2a, #1b1b1b);
}
.check input[type="radio"] { border-radius: 0; }
.check input:checked { background: linear-gradient(#aedb5a, #7ea82e); border-color: var(--lime-dim); }
.check input:disabled { opacity: .4; }
.check:hover input:not(:disabled) { border-color: #4a4a4a; }
.check .sub { display: block; color: var(--text-dim); font-size: 11px; }

input[type="range"] { width: 100%; accent-color: var(--lime); }

.msg { min-height: 18px; font-size: 11.5px; margin-top: 8px; }
.msg.ok { color: var(--lime); }
.msg.err { color: var(--red); }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs [role="tab"] {
  background: #121212; border: 1px solid var(--line); border-bottom: 0; color: var(--text); padding: 7px 12px;
  font: 12px var(--sans); margin-bottom: -1px; min-height: 30px;
}
.tabs [role="tab"]:hover { color: var(--white); }
.tabs [role="tab"][aria-selected="true"] { background: var(--board); color: var(--white); box-shadow: inset 0 2px 0 var(--lime); border-bottom: 1px solid var(--board); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips button { background: #121212; border: 1px solid var(--line); color: var(--text); padding: 4px 10px; font: 11.5px var(--sans); min-height: 26px; }
.chips button:hover { color: var(--white); border-color: #333; }
.chips button[aria-pressed="true"] { color: #0a0a0a; background: var(--lime); border-color: var(--lime-dim); }

/* ── Control panel layout (UCP / ACP) ────────────────────────── */
.cp { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.cp-menu { background: var(--board); border: 1px solid var(--line); position: sticky; top: 12px; }
.cp-menu h2 { font-size: 12px; padding: 8px 12px; background: linear-gradient(var(--head-a), var(--head-b)); border-bottom: 1px solid var(--line); }
.cp-menu ul { list-style: none; padding: 4px 0; }
.cp-menu li + li.group { margin-top: 6px; border-top: 1px solid var(--line-soft); padding-top: 6px; }
.cp-menu .group-label { display: block; padding: 4px 12px; font-size: 11px; color: var(--text-dim); }
.cp-menu a { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 12px; color: var(--text); }
.cp-menu a:hover { background: var(--row-hover); color: var(--white); text-decoration: none; }
.cp-menu a[aria-current="true"] { color: var(--white); background: #161616; box-shadow: inset 2px 0 0 var(--lime); }
.cp-menu a .n { color: var(--text-dim); font-size: 11px; }
.cp-section[hidden] { display: none; }
.cp-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.cp-title h1 { font-size: 16px; }
.cp-title p { margin: 0; color: var(--text-dim); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }

/* Definition rows (key/value like forum profile) */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.kv dt { color: var(--text-dim); }
.kv dd { margin: 0; color: var(--text-bright); min-width: 0; overflow-wrap: anywhere; }

/* Statistics line (forum footer style) */
.stats-line { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; list-style: none; }
.stats-line li { color: var(--text-dim); }
.stats-line b { color: var(--white); font-weight: bold; }

/* ── Data states (R-27) ──────────────────────────────────────── */
.state { padding: 18px 12px; text-align: center; color: var(--text-dim); font-size: 12px; }
.state.error { color: var(--red); }
.state .btn { margin-top: 8px; }
.state.loading::after {
  content: ""; display: block; width: 120px; height: 2px; margin: 10px auto 0; background:
  linear-gradient(90deg, transparent, var(--lime), transparent) 0 0 / 60px 2px no-repeat #1a1a1a;
  animation: gs-load 1s linear infinite;
}
@keyframes gs-load { from { background-position: -60px 0; } to { background-position: 120px 0; } }
td.state-cell { padding: 0; }

/* ── Dialogs ─────────────────────────────────────────────────── */
dialog.gs-dialog {
  padding: 0; border: 1px solid #2c2c2c; background: var(--board); color: var(--text);
  width: calc(100% - 32px); max-width: 520px; max-height: calc(100vh - 32px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .7);
}
dialog.gs-dialog.wide { max-width: 760px; }
dialog.gs-dialog::backdrop { background: rgba(0, 0, 0, .72); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--head-a), var(--head-b)); }
.dlg-head h2 { font-size: 12px; }
.dlg-x { background: none; border: 1px solid transparent; color: var(--text); width: 28px; height: 28px; font: 16px/1 var(--sans); }
.dlg-x:hover { color: var(--white); border-color: var(--line-ctl); }
.dlg-body { padding: 14px 12px; overflow-y: auto; max-height: calc(100vh - 140px); }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid var(--line); }

/* Windows: login / register boxes styled like a small menu window */
.window { background: var(--board); border: 1px solid var(--line); max-width: 420px; margin: 24px auto; }
.window-head { padding: 9px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--head-a), var(--head-b)); }
.window-head h1 { font-size: 13px; }
.window-body { padding: 16px 14px; }
.window-foot { padding: 9px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--text-dim); display: flex; gap: 8px 14px; flex-wrap: wrap; justify-content: space-between; }

/* ── Toasts ──────────────────────────────────────────────────── */
.toasts { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: grid; gap: 6px; max-width: min(360px, calc(100vw - 32px)); }
.toast { background: #151515; border: 1px solid #2c2c2c; color: var(--text-bright); padding: 9px 12px; font-size: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.6); }
.toast.ok { border-color: var(--lime-dim); }
.toast.err { border-color: var(--red-line); color: #ff8a87; }

/* ── Long-form text (guide, terms, docs) ─────────────────────── */
.prose { font-size: 13px; line-height: 1.7; color: var(--text); max-width: 76ch; }
.prose h2 { font-size: 14px; margin: 22px 0 8px; }
.prose h3 { font-size: 13px; margin: 18px 0 6px; color: var(--text-bright); }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 12px; }
.prose li { margin-bottom: 4px; }
.prose > :first-child { margin-top: 0; }

/* Expandable rows (details) */
details.row-detail > summary { list-style: none; display: flex; gap: 10px; align-items: baseline; }
details.row-detail > summary::-webkit-details-marker { display: none; }
details.row-detail > summary::before { content: "+"; font-family: var(--mono); color: var(--lime); width: 10px; flex: 0 0 auto; }
details.row-detail[open] > summary::before { content: "\2212"; }

/* Media tiles: fixed 16:9 box so videos never resize the page while loading (R-40). */
.media-tile { display: block; color: var(--text-bright); }
.media-tile:hover { color: var(--white); text-decoration: none; }
.media-tile video { aspect-ratio: 16 / 9; width: 100%; background: var(--inset); border: 1px solid var(--line-soft); }
.media-tile .t { margin-top: 6px; font-size: 11.5px; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cp { grid-template-columns: minmax(0, 1fr); }
  .cp-menu { position: static; }
  .cp-menu ul { display: flex; flex-wrap: wrap; padding: 4px; }
  .cp-menu li + li.group { margin: 0; border: 0; padding: 0; }
  .cp-menu .group-label { display: none; }
  .cp-menu a[aria-current="true"] { box-shadow: inset 0 -2px 0 var(--lime); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .gs-nav .nav-toggle { display: inline-flex; margin: 6px 0; align-self: flex-start; }
  .gs-nav-in { flex-direction: column; align-items: stretch; }
  .gs-nav ul { display: none; flex-direction: column; padding-bottom: 6px; }
  .gs-nav ul.open { display: flex; }
  .gs-nav a { padding: 12px 8px; min-height: 44px; }
  .gs-nav a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--lime); }
  /* Phone: every control is at least 44px in the direction a thumb lands (antislop R-03). */
  .btn, .btn-sm { min-height: 44px; min-width: 44px; }
  .linklike { display: inline-flex; align-items: center; min-height: 44px; }
  summary { padding-block: 13px; }
  .input, select.input { min-height: 44px; font-size: 16px; }
  .file { min-height: 44px; }
  .check { min-height: 44px; align-items: center; }
  .check input[type="checkbox"], .check input[type="radio"] { width: 20px; height: 20px; margin: 0; }
  .cp-menu a { min-height: 44px; align-items: center; }
  .userbox a, .userbox .linklike, .foot-links a, .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  .tabs [role="tab"], .chips button { min-height: 44px; min-width: 44px; }
  details.row-detail > summary { min-height: 44px; align-items: center; }
  .linklike.row-title { display: inline-flex; align-items: center; min-height: 44px; }
  .dlg-x { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
