@font-face { font-family: 'Big Shoulders Display'; font-weight: 700; font-style: normal; font-display: swap;
  src: url(viewer/fonts/big-shoulders-display-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 700; font-style: normal; font-display: swap;
  src: url(viewer/fonts/big-shoulders-display-latin-ext-700-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 900; font-style: normal; font-display: swap;
  src: url(viewer/fonts/big-shoulders-display-latin-900-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 900; font-style: normal; font-display: swap;
  src: url(viewer/fonts/big-shoulders-display-latin-ext-900-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sometype Mono'; font-weight: 400; font-style: normal; font-display: swap;
  src: url(viewer/fonts/sometype-mono-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sometype Mono'; font-weight: 400; font-style: normal; font-display: swap;
  src: url(viewer/fonts/sometype-mono-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sometype Mono'; font-weight: 700; font-style: normal; font-display: swap;
  src: url(viewer/fonts/sometype-mono-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sometype Mono'; font-weight: 700; font-style: normal; font-display: swap;
  src: url(viewer/fonts/sometype-mono-latin-ext-700-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans Condensed'; font-weight: 400; font-style: normal; font-display: swap;
  src: url(viewer/fonts/ibm-plex-sans-condensed-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Condensed'; font-weight: 400; font-style: normal; font-display: swap;
  src: url(viewer/fonts/ibm-plex-sans-condensed-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans Condensed'; font-weight: 600; font-style: normal; font-display: swap;
  src: url(viewer/fonts/ibm-plex-sans-condensed-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Condensed'; font-weight: 600; font-style: normal; font-display: swap;
  src: url(viewer/fonts/ibm-plex-sans-condensed-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* ==========================================================================================================================
   Shtemeri web site. One stylesheet for every page.
   Same product as the viewer, calmer: graphite base, warm paper type, one accent (the viewer's signal amber), hazard stripes
   as the only ornament. Saturated colour appears only as data: fleet colours (chips) and the red of danger. Fonts are the
   viewer's own (viewer/fonts): Big Shoulders Display for headings, Sometype Mono for data, IBM Plex Sans Condensed for text.
   ========================================================================================================================== */

:root {
  --ink: #05070a;
  --bg: #07090d;
  --surface: #0b0f15;
  --surface-2: #10151d;
  --surface-3: #171d28;
  --line: rgba(232, 220, 190, 0.12);
  --line-strong: rgba(232, 220, 190, 0.28);
  --paper: #ece4d0;
  --paper-2: #c9c2b0;
  --muted: #8d95a2;
  --dim: #5c6471;
  --amber: #ffb02e;
  --amber-glow: rgba(255, 176, 46, 0.35);
  --amber-wash: rgba(255, 176, 46, 0.08);
  /* SOLO accent (mockup v3). The page accent is --mode*: amber, or cyan on the pages that carry data-modes while SOLO is the selected mode (js/layout.js, end of this file). */
  --cyan: #59d4ff;
  --cyan-glow: rgba(89, 212, 255, 0.35);
  --cyan-wash: rgba(89, 212, 255, 0.08);
  /* Solitaire (green) and Duel (violet), the other two modes (Features:Duel, mockup docs/mockups/modovi-cetiri.html). Green is NOT --ok, so that an "ok" mark is never taken for the accent; violet is not --hazard, red is danger and deleting. */
  --leaf: #9ee37d;
  --leaf-glow: rgba(158, 227, 125, 0.35);
  --leaf-wash: rgba(158, 227, 125, 0.08);
  --violet: #c084fc;
  --violet-glow: rgba(192, 132, 252, 0.35);
  --violet-wash: rgba(192, 132, 252, 0.08);
  /* CTF (Mantis #4188) takes --ok, the one colour of the palette that is neither another mode's nor danger: its accent block is at the end of the Solitaire and Duel section. */
  --mode: var(--amber);
  --mode-hi: #ffc766;         /* hover of a link */
  --mode-hi2: #ffbe55;        /* hover of a primary button */
  --mode-glow: var(--amber-glow);
  --mode-wash: var(--amber-wash);
  --mode-bg: rgba(255, 176, 46, 0.075);
  --mode-hover: rgba(255, 176, 46, 0.045);    /* the faint tints of the accent (row hover, panels, a fresh row): plain rgba, so that a browser that does not know color-mix() still has them */
  --mode-hover2: rgba(255, 176, 46, 0.05);
  --mode-faint: rgba(255, 176, 46, 0.015);
  --mode-cur: rgba(255, 176, 46, 0.06);
  --mode-flash: rgba(255, 176, 46, 0.22);
  --hazard: #ff4b5c;
  --hazard-wash: rgba(255, 75, 92, 0.09);
  --ok: #4de2a1;
  --ok-wash: rgba(77, 226, 161, 0.08);
  --display: 'Big Shoulders Display', 'Arial Narrow', Impact, 'Segoe UI', sans-serif;
  --mono: 'Sometype Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --text: 'IBM Plex Sans Condensed', 'Segoe UI', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
  --header-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background:
    radial-gradient(1100px 480px at 6% -8%, var(--mode-bg), transparent 62%),
    var(--bg);
  color: var(--paper); font: 400 16.5px/1.55 var(--text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* a faint tactical grid that fades out below the fold */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(232, 220, 190, 0.032) 1px, transparent 1px), linear-gradient(90deg, rgba(232, 220, 190, 0.032) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, transparent 75%); mask-image: linear-gradient(180deg, #000 0, transparent 75%);
}
main { flex: 1 0 auto; display: block; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--mode); color: var(--ink); }
a { color: var(--mode); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--mode-hi); }
:focus-visible { outline: 2px solid var(--mode); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: 0.07em; line-height: 1; color: var(--paper); }
p { margin: 0 0 1em; }
code, kbd, samp { font-family: var(--mono); font-size: 0.88em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--mode); color: var(--ink); padding: 10px 14px; font: 700 13px/1 var(--mono); letter-spacing: .08em; text-decoration: none; }
.skip:focus { top: 10px; }

.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap.narrow { max-width: calc(760px + 2 * var(--gutter)); }
.wrap.mid { max-width: calc(980px + 2 * var(--gutter)); }

/* ------------------------------------------------------------------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 50; min-height: var(--header-h); background: rgba(6, 8, 12, 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { position: relative; display: inline-block; font: 900 25px/1 var(--display); letter-spacing: 0.24em; color: var(--paper); text-decoration: none; padding-bottom: 7px; margin-top: 4px; text-shadow: 0 0 22px rgba(255, 176, 46, 0.22); }
.brand::after { content: ''; position: absolute; left: 0; right: 0.24em; bottom: 0; height: 4px; background: repeating-linear-gradient(-45deg, var(--amber) 0 5px, transparent 5px 10px); opacity: 0.9; }
.brand:hover { color: #fff; }
/* STAGING instance (Features:Staging): a colour used nowhere else in the design, so nobody takes the test copy for the real arena */
.staging-badge { flex: none; align-self: center; margin-top: 4px; padding: 5px 9px 4px; font: 800 13px/1 var(--display); letter-spacing: .16em; color: #14001a; background: #ff2fd0; box-shadow: 0 0 0 2px #14001a, 0 0 16px rgba(255, 47, 208, .65); border-radius: 3px; white-space: nowrap; cursor: help; }
.nav { display: flex; align-items: stretch; gap: 2px; height: 100%; }
.nav a { position: relative; display: flex; align-items: center; white-space: nowrap; padding: 0 14px; font: 400 12px/1 var(--mono); letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color .15s; }
.nav a:hover { color: var(--paper); }
.nav a[aria-current='page'] { color: var(--mode); }
.nav a[aria-current='page']::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--mode); box-shadow: 0 0 12px var(--mode-glow); }
.auth { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.userlink { display: inline-flex; align-items: center; gap: 9px; padding: 7px 4px; font: 400 12.5px/1 var(--mono); letter-spacing: .06em; color: var(--paper); text-decoration: none; max-width: 190px; }
.userlink i { width: 8px; height: 8px; background: var(--ok); box-shadow: 0 0 8px rgba(77, 226, 161, .7); flex: none; }
.userlink span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userlink:hover { color: var(--mode); }
/* HR · EN switch in the header (js/layout.js); html.i18n-pending: js/lang-boot.js hides the page of a non-Croatian visitor until js/i18n.js has translated the static text */
.lang-switch { display: inline-flex; align-items: center; font: 400 12px/1 var(--mono); letter-spacing: .12em; }
.lang-switch button { appearance: none; -webkit-appearance: none; background: transparent; border: 0; margin: 0; padding: 10px 5px; font: inherit; letter-spacing: inherit; text-transform: uppercase; color: var(--muted); cursor: pointer; transition: color .15s; }
.lang-switch button:hover { color: var(--paper); }
.lang-switch button[aria-pressed='true'] { color: var(--mode); cursor: default; }
.lang-switch .sep { color: var(--dim); }
html.i18n-pending body { visibility: hidden; }
.menu-btn { display: none; width: 42px; height: 42px; margin-left: 4px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; padding: 0; position: relative; }
.menu-btn i, .menu-btn i::before, .menu-btn i::after { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--paper); content: ''; transition: transform .2s, opacity .2s; }
.menu-btn i { top: 20px; }
.menu-btn i::before { top: -7px; left: 0; right: 0; }
.menu-btn i::after { top: 7px; left: 0; right: 0; }
.menu-btn[aria-expanded='true'] i { background: transparent; }
.menu-btn[aria-expanded='true'] i::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded='true'] i::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .site-header .bar { gap: 12px; }
  .menu-btn { display: block; }
  .auth { margin-left: auto; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: var(--header-h); height: auto; flex-direction: column; background: rgba(6, 8, 12, 0.98); border-bottom: 1px solid var(--line-strong); padding: 6px var(--gutter) 14px; }
  .nav.open { display: flex; }
  .nav a { padding: 15px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
  .nav a[aria-current='page']::after { left: 0; right: auto; width: 34px; bottom: -1px; }
  .auth .btn { display: none; }
  .nav .nav-login { display: flex; }
}
.nav .nav-login { display: none; color: var(--mode); }
@media (max-width: 880px) { .nav.open .nav-login { display: flex; } }

/* ------------------------------------------------------------------------------------------------------------ page head */
.page-head { padding: clamp(30px, 5vw, 58px) 0 clamp(20px, 3vw, 30px); }
.kicker { font: 400 11.5px/1.3 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--mode); }
.kicker .sep { color: var(--dim); margin: 0 .5em; }
.page-head h1 { font-size: clamp(40px, 6.2vw, 70px); margin-top: 12px; line-height: .95; letter-spacing: .06em; }
.page-head .lede { margin: 18px 0 0; max-width: 64ch; color: var(--paper-2); font-size: 17.5px; }
.stripe { display: block; width: 92px; height: 5px; margin-top: 20px; background: repeating-linear-gradient(-45deg, var(--mode) 0 5px, transparent 5px 10px); opacity: .85; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.section { padding: clamp(24px, 4vw, 44px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: .1em; }
.section-head .meta.near { margin-right: auto; }
.section-head .meta { font: 400 11.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.section-head .kicker { display: block; margin-bottom: 9px; }
.section h3 { font-size: 21px; letter-spacing: .1em; margin: 0 0 12px; }

/* ------------------------------------------------------------------------------------------------------------ buttons, forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 2px 20px 0; border: 1px solid var(--line-strong); background: transparent; color: var(--paper); font: 800 16px/1 var(--display); letter-spacing: 0.17em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s, color .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { border-color: var(--paper); color: #fff; }
.btn.primary { background: var(--mode); border-color: var(--mode); color: var(--ink); }
.btn.primary:hover { background: var(--mode-hi2); border-color: var(--mode-hi2); color: var(--ink); box-shadow: 0 0 24px var(--mode-glow); }
.btn.danger:hover { border-color: var(--hazard); color: #ff8393; }
.btn.sm { min-height: 32px; padding: 2px 13px 0; font-size: 14px; letter-spacing: .15em; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .42; cursor: not-allowed; box-shadow: none; pointer-events: none; }
.btn .spin { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--mode); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; font: inherit; }
.linkbtn:hover { color: var(--mode-hi); }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; min-width: 0; }
.field > label, .label { font: 400 11.5px/1.2 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.hint { font-size: 14px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 0; color: var(--paper); font: 400 16px/1.3 var(--text); transition: border-color .15s, box-shadow .15s; }
.input.mono { font-family: var(--mono); font-size: 14px; }
.input::placeholder { color: var(--dim); }
.input:hover { border-color: rgba(232, 220, 190, 0.45); }
.input:focus { border-color: var(--mode); outline: none; box-shadow: 0 0 0 3px var(--mode-wash), 0 0 0 1px var(--mode); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
select.input option, select.input optgroup { background: var(--surface-2); color: var(--paper); }
.form-grid { display: grid; gap: 0 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.checkrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; position: relative; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { flex: none; position: relative; width: 46px; height: 24px; border: 1px solid var(--line-strong); background: var(--surface-2); transition: border-color .15s, background .15s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: var(--muted); transition: transform .16s, background .16s, box-shadow .16s; }
.switch input:checked + .track { border-color: var(--mode); background: var(--mode-wash); }
.switch input:checked + .track::after { transform: translateX(22px); background: var(--mode); box-shadow: 0 0 10px var(--mode-glow); }
.switch input:focus-visible + .track { outline: 2px solid var(--mode); outline-offset: 3px; }
.switch input:disabled + .track { opacity: .45; }
.switch .sw-label { font: 400 15px/1.2 var(--text); color: var(--paper-2); }
.switch .sw-state { font: 400 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line-strong); margin-bottom: 26px; overflow-x: auto; overflow-y: hidden; }
.tabs [role='tab'] { position: relative; padding: 14px 20px 12px; background: none; border: 0; cursor: pointer; font: 800 18px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; transition: color .15s; }
.tabs a[role='tab'] { text-decoration: none; }
.tabs [role='tab']:hover { color: var(--paper); }
.tabs [role='tab'][aria-selected='true'] { color: var(--mode); }
.tabs [role='tab'][aria-selected='true']::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--mode); box-shadow: 0 0 14px var(--mode-glow); }

/* ------------------------------------------------------------------------------------------------------------ frames, notes */
.frame { position: relative; background: linear-gradient(180deg, rgba(15, 19, 26, 0.9), rgba(8, 10, 14, 0.9)); border: 1px solid var(--line); }
.frame::before, .frame::after { content: ''; position: absolute; width: 12px; height: 12px; border: 0 solid var(--mode); pointer-events: none; z-index: 2; }
.frame::before { left: -1px; top: -1px; border-left-width: 2px; border-top-width: 2px; }
.frame::after { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; }
.frame.pad { padding: clamp(18px, 3vw, 30px); }

.note { padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--mode); background: var(--mode-wash); color: var(--paper); font-size: 15.5px; margin: 0 0 16px; }
.note.error { border-left-color: var(--hazard); background: var(--hazard-wash); color: #ffd4d9; }
.note.ok { border-left-color: var(--ok); background: var(--ok-wash); }
.note.plain { border-left-color: var(--line-strong); background: transparent; color: var(--paper-2); }
.note strong { font-weight: 600; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); }
.empty b { display: block; font: 800 22px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--paper-2); margin-bottom: 10px; }
.loading-line { font: 400 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 28px 0; }
.loading-line::after { content: ''; display: inline-block; width: 40px; height: 2px; margin-left: 12px; vertical-align: middle; background: linear-gradient(90deg, var(--mode) 0 30%, transparent 30%); background-size: 200% 100%; animation: slide 1s linear infinite; }
@keyframes slide { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.toast-host { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { font: 700 12px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); background: var(--mode); padding: 10px 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .55); animation: toastin .25s ease both; }
.toast.error { background: var(--hazard); color: #fff; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------------------------------------------------ tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 16px; }
.tbl th { text-align: left; font: 400 11px/1.25 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--mode-hover); }
.tbl .num { text-align: right; font-family: var(--mono); font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl th.num { text-align: right; }
.tbl .shrink { width: 1%; white-space: nowrap; }
.tbl tr.mine { background: linear-gradient(90deg, var(--mode-wash), transparent 60%); }
.tbl tr.mine td:first-child { box-shadow: inset 3px 0 0 var(--mode); }
.tbl td.dim, .dim { color: var(--muted); }
.tbl caption { text-align: left; padding: 0 0 8px; }
.tbl a { color: inherit; text-decoration: none; }
.tbl a:hover { color: var(--mode); }
.tbl td a.mono { display: inline-block; padding: 8px 0; }

.rank { font: 900 28px/1 var(--display); color: var(--paper-2); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.rank.r1 { color: var(--mode); text-shadow: 0 0 18px var(--mode-glow); }
.tbl .rank { display: inline-block; min-width: 1.6ch; }
.place { display: inline-block; font: 900 24px/1 var(--display); color: var(--paper-2); min-width: 1.4ch; }
.place.p1 { color: var(--mode); text-shadow: 0 0 16px var(--mode-glow); }

.fleet { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; vertical-align: middle; }
.chip { flex: none; width: 6px; height: 20px; background: var(--c, #666); box-shadow: 0 0 10px color-mix(in srgb, var(--c, #666) 65%, transparent), 0 0 2px var(--c, #666); }
.chip.sq { width: 12px; height: 12px; }
.fleet.big { gap: 14px; }
.fleet.big .chip { width: 10px; height: clamp(34px, 5vw, 50px); }
.fleet a { color: inherit; text-decoration: none; min-width: 0; display: inline-flex; }
.fleet a:hover .fleet-name { color: var(--mode); }
.fleet-name { font: 800 19px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-top: .22em; margin-top: -.22em; }
.fleet-name.big { font-size: clamp(32px, 5vw, 52px); }
.owner { font: 400 13px/1.2 var(--mono); color: var(--muted); letter-spacing: .02em; }
.owner a { color: inherit; }
.badge { display: inline-block; font: 400 10px/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; padding: 4px 6px 3px; border: 1px solid var(--line-strong); color: var(--paper-2); white-space: nowrap; vertical-align: middle; }
.badge.house { border-color: rgba(201, 194, 176, .45); }
.badge.on { background: var(--mode); border-color: var(--mode); color: var(--ink); font-weight: 700; }
.badge.ok { border-color: rgba(77, 226, 161, .55); color: var(--ok); }
.badge.bad { border-color: rgba(255, 75, 92, .6); color: #ff8393; }
.badge.run { border-color: var(--mode); color: var(--mode); }
.badge.run::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: var(--mode); animation: pulse 1.2s ease-in-out infinite; }
.delta { font-family: var(--mono); font-size: 13px; }
.delta.up { color: var(--ok); }
.delta.down { color: #ff7a88; }
.mv { font: 400 11px/1 var(--mono); }
.mv.up { color: var(--ok); }
.mv.down { color: #ff7a88; }
.rating { font-family: var(--mono); font-variant-numeric: tabular-nums; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

.placing { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.placing .pl { display: inline-flex; align-items: center; gap: 7px; font: 400 13px/1 var(--mono); color: var(--paper-2); white-space: nowrap; }
.placing .pl b { font: 900 17px/1 var(--display); color: var(--muted); }
.placing .pl:first-child b { color: var(--mode); }
.placing .chip { height: 14px; width: 5px; }

.live-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 14px 4px 9px; font: 800 15px/1 var(--display); letter-spacing: .18em; color: #fff; background: #d6213a; box-shadow: 0 0 18px rgba(214, 33, 58, .5); clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s ease-in-out infinite; }
.live-badge.idle { background: #3a4150; box-shadow: none; }
.live-badge.idle i { animation: none; background: var(--mode); }

/* ------------------------------------------------------------------------------------------------------------ viewer frames */
.viewer-frame { position: relative; background: var(--ink); aspect-ratio: 16 / 9; max-height: 76vh; min-height: 300px; width: 100%; overflow: hidden; }
.viewer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--ink); }
.viewer-frame.bleed { border-left: 0; border-right: 0; }
.viewer-frame .veil { position: absolute; inset: 0; display: none; place-items: center; text-align: center; background: radial-gradient(ellipse at 50% 42%, #101620 0, #05070a 70%); padding: 24px; z-index: 3; }
.viewer-frame .veil.show { display: grid; }
.veil b { display: block; font: 900 clamp(28px, 4vw, 44px)/1.05 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--paper); }
.veil span { display: block; margin-top: 12px; font: 400 12px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.statusbar { display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; padding: 10px 16px; border: 1px solid var(--line); border-top: 0; background: var(--surface); min-height: 54px; }
.statusbar .grow { flex: 1 1 13em; min-width: 0; }
.statusbar .st-main { font: 400 13px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--paper-2); }
.statusbar .st-main b { color: var(--paper); font-weight: 700; }
.statusbar .count { font: 800 22px/1 var(--display); letter-spacing: .08em; color: var(--mode); font-variant-numeric: tabular-nums; }
/* "Znaš li da…" (js/hints.js, Mantis #3959): one quiet line under the viewer on the home page and on a match page; empty and hidden when there is nothing to say or the viewer hid the tips */
.hint-line { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 18px; flex-wrap: wrap; margin-top: 10px; padding: 0 2px; color: var(--paper-2); font-size: 14px; line-height: 1.45; }
.hint-line[hidden] { display: none; }
.hint-line .hl-body { margin: 0; flex: 1 1 24em; min-width: 0; max-width: 78ch; }
.hint-line .hl-lead { color: var(--mode); font-weight: 700; }
.hint-line .hl-hide { flex: none; margin: 0; padding: 4px 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.hint-line .hl-hide:hover, .hint-line .hl-hide:focus-visible { color: var(--paper); }
.hint-wrap .hint-line { margin-top: 14px; }
/* the daily cup on the home page (js/pages/index.js): switch above the viewer (only while a cup runs), KUP chip in the bar, final leaderboard over the viewer */
.stream-switch { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 14px; padding: 0 0 10px; }
.stream-switch[hidden] { display: none; }
.stream-switch .sw-cap { font: 400 11.5px/1.3 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.stream-switch .mode-seg button { padding: 11px 16px; }
.cup-chip { display: inline-flex; align-items: center; padding: 5px 14px 4px 9px; font: 800 15px/1 var(--display); letter-spacing: .18em; color: var(--ink); background: var(--amber); clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
.cup-panel { position: absolute; inset: 0; z-index: 4; display: flex; overflow-y: auto; padding: clamp(14px, 3vw, 30px) 16px; background: radial-gradient(ellipse at 50% 30%, #101620 0, #05070a 70%); }
.cup-panel[hidden] { display: none; }
.cup-panel .cp-in { width: min(680px, 100%); margin: auto; }
.cup-panel h2 { margin: 8px 0 6px; font: 900 clamp(26px, 3.6vw, 40px)/1.05 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--paper); }
.cup-panel .cp-win, .cup-panel .cp-next { margin: 0 0 14px; color: var(--paper-2); }
.cup-panel .cp-win b { color: var(--paper); }
.cup-panel .cp-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.cup-panel .tbl th, .cup-panel .tbl td { padding: 7px 9px; }
@media (max-width: 700px) { .stream-switch { justify-content: space-between; } .cup-panel .tbl { font-size: 14px; } .cup-panel h2 { font-size: 24px; } }

/* ------------------------------------------------------------------------------------------------------------ home */
.hero-head { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: end; padding-top: clamp(22px, 3.2vw, 38px); padding-bottom: clamp(16px, 2vw, 22px); }
.hero-head h1 { font-size: clamp(34px, 5.2vw, 58px); margin-top: 11px; letter-spacing: .06em; }
.hero-head p { margin: 14px 0 0; max-width: 62ch; color: var(--paper-2); font-size: 17px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 4px 0 22px 66px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.steps li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; font: 900 44px/1 var(--display); color: transparent; -webkit-text-stroke: 1px var(--mode); letter-spacing: .02em; }
.steps h3 { font-size: 22px; letter-spacing: .09em; margin: 3px 0 6px; }
.steps p { margin: 0; color: var(--paper-2); font-size: 16px; }

/* ------------------------------------------------------------------------------------------------------------ match page */
.match-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: clamp(18px, 2.4vw, 28px) 0 16px; }
.match-head h1 { font-size: clamp(30px, 4.4vw, 48px); margin-top: 9px; }
.meta-list { display: flex; gap: 8px 26px; flex-wrap: wrap; font: 400 12.5px/1.3 var(--mono); letter-spacing: .06em; color: var(--muted); }
.meta-list b { color: var(--paper); font-weight: 400; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border: 1px solid var(--line); margin-bottom: 24px; }
.stat-grid > div { padding: 14px 18px; border-right: 1px solid var(--line); }
.stat-grid > div:last-child { border-right: 0; }
.stat-grid .k { font: 400 11px/1.2 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.stat-grid .v { font: 900 34px/1.1 var(--display); letter-spacing: .04em; margin-top: 6px; color: var(--paper); font-variant-numeric: tabular-nums; }
.sharebox { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.sharebox .input { flex: 1; min-width: 220px; }

/* ------------------------------------------------------------------------------------------------------------ code view, editor */
.codeview { display: flex; overflow: auto; max-height: 68vh; border: 1px solid var(--line-strong); background: #070a0f; font: 13px/20px var(--mono); tab-size: 4; }
.codeview .ln { position: sticky; left: 0; flex: none; padding: 12px 12px 12px 14px; text-align: right; color: var(--dim); background: #090c12; border-right: 1px solid var(--line); user-select: none; white-space: pre; }
.codeview .src { margin: 0; padding: 12px 18px 12px 14px; color: var(--paper); white-space: pre; font: inherit; min-width: 0; }
.editor { display: grid; grid-template-columns: auto minmax(0, 1fr); border: 1px solid var(--line-strong); background: #070a0f; font: 13.5px/var(--ed-lh, 20px) var(--mono); transition: border-color .15s, box-shadow .15s; }
.editor:focus-within { border-color: var(--mode); box-shadow: 0 0 0 3px var(--mode-wash); }
.editor .gutter { contain: size; overflow: hidden; padding: 12px 12px 40px 14px; text-align: right; color: var(--dim); background: #090c12; border-right: 1px solid var(--line); user-select: none; -webkit-user-select: none; white-space: pre; min-width: 3.4em; }
.editor .gutter span { display: block; height: var(--ed-lh, 20px); }
.editor .gutter span.err { color: #fff; background: var(--hazard); margin-left: -14px; margin-right: -12px; padding: 0 12px 0 14px; }
.editor .gutter span.warn { color: var(--ink); background: var(--mode); margin-left: -14px; margin-right: -12px; padding: 0 12px 0 14px; }
.editor textarea { display: block; width: 100%; height: clamp(360px, 56vh, 640px); margin: 0; padding: 12px 16px; border: 0; border-radius: 0; background: transparent; color: var(--paper); font: inherit; line-height: var(--ed-lh, 20px); resize: vertical; white-space: pre; overflow: auto; tab-size: 4; -moz-tab-size: 4; outline: none; }
.editor textarea::placeholder { color: var(--dim); }
/* The optional parts of js/editor.js (Mantis #3929). .ed-body holds the textarea; with the colour layer (.hl) a <pre> with the coloured text lies under the transparent textarea:
   both layers must have the same metrics (font, size, line height, tab size, padding, no ligatures: Sometype Mono has calt), the pre is moved with the scroll of the textarea. */
.editor .ed-body { position: relative; min-width: 0; }
.editor .ed-hl { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.editor .ed-code { margin: 0; padding: 12px 16px; font: inherit; line-height: var(--ed-lh, 20px); white-space: pre; tab-size: 4; -moz-tab-size: 4; color: var(--paper); will-change: transform; }
.editor.hl textarea, .editor .ed-code { font-variant-ligatures: none; font-kerning: none; text-rendering: auto; letter-spacing: 0; }
.editor.hl textarea { color: transparent; caret-color: var(--paper); position: relative; }
.editor.hl textarea::selection { background: rgba(236, 228, 208, .2); color: transparent; }
.editor.ro { background: #090c12; }
.editor.ro textarea { cursor: text; }
.editor .ed-cur { position: absolute; left: 0; right: 0; top: 0; background: rgba(236, 228, 208, .045); }
.editor .gutter span.cur { color: var(--paper); }
.tk-keyword { color: #e5a35a; }
.tk-type { color: #7fc3d6; }
.tk-api { color: #7fd6a4; }
.tk-string { color: #cdd88f; }
.tk-comment { color: var(--dim); }
.tk-number { color: #d9a0c4; }
.tk-preproc { color: var(--muted); }
.tk-error { color: #cdd88f; text-decoration: underline wavy var(--hazard); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tk-ul-error { text-decoration: underline wavy var(--hazard); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tk-ul-warning { text-decoration: underline wavy var(--mode); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tk-br { background: rgba(236, 228, 208, .2); box-shadow: 0 0 0 1px var(--line-strong); }
.ed-probe { position: absolute; visibility: hidden; white-space: pre; font: inherit; }
.ed-pop { position: absolute; z-index: 5; min-width: 260px; max-width: min(560px, 100%); background: var(--surface-3); border: 1px solid var(--line-strong); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); font: 13px/24px var(--mono); }
.ed-pop ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.ed-pop li { display: flex; gap: 14px; align-items: baseline; justify-content: space-between; padding: 0 10px; cursor: pointer; white-space: nowrap; }
.ed-pop li.sel { background: var(--mode-bg); box-shadow: inset 2px 0 0 var(--mode); }
.ed-pop li .nm { color: var(--paper); }
.ed-pop li.k-method .nm { color: #7fd6a4; }
.ed-pop li.k-value .nm, .ed-pop li.k-const .nm { color: #d9a0c4; }
.ed-pop li .sg { color: var(--dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.ed-pop .pdoc { padding: 6px 10px 8px; border-top: 1px solid var(--line); font: 400 14px/1.4 var(--text); color: var(--paper-2); white-space: normal; }
.ed-doc { margin-top: 6px; padding: 8px 12px; border: 1px solid var(--line); border-left: 3px solid var(--mode); background: var(--surface); }
.ed-doc[hidden], .ed-pop[hidden] { display: none; }
.ed-doc .sig { font: 13px/1.5 var(--mono); color: var(--paper); overflow-x: auto; white-space: pre; }
.ed-doc .sig b { color: var(--mode); font-weight: 700; }
.ed-doc .desc { font: 400 14.5px/1.45 var(--text); color: var(--paper-2); margin-top: 2px; }
.ed-doc .guide-link { font-size: 13px; }
.ed-status { display: flex; justify-content: flex-end; gap: 16px; padding: 4px 2px 0; font: 12px/1.6 var(--mono); color: var(--muted); }
.diag { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-left: 4px solid var(--hazard); background: var(--hazard-wash); }
.diag.warnonly { border-left-color: var(--mode); background: var(--mode-wash); }
.diag li + li { border-top: 1px solid var(--line); }
.diag button { display: grid; grid-template-columns: 78px 1fr; gap: 14px; width: 100%; text-align: left; padding: 10px 14px; background: none; border: 0; color: var(--paper); cursor: pointer; font: 400 15px/1.4 var(--text); }
.diag button:hover { background: rgba(255, 255, 255, .04); }
.diag .pos { font: 700 13px/1.6 var(--mono); color: #ff8393; }
.diag .sev { display: block; font: 400 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.diag .code-id { color: var(--muted); font: 400 12px/1 var(--mono); margin-left: 8px; }

.workbench > * { min-width: 0; }
.workbench { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.fleet-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.fleet-list li { border-bottom: 1px solid var(--line); }
.fleet-list .row { display: flex; align-items: stretch; }
.fleet-list button.pick { flex: 1; min-width: 0; text-align: left; padding: 12px 10px 12px 12px; background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; gap: 6px; border-left: 3px solid transparent; }
.fleet-list button.pick:hover { background: var(--mode-hover2); }
.fleet-list li.sel button.pick { border-left-color: var(--mode); background: var(--mode-wash); }
.fleet-list .sub { font: 400 12px/1.2 var(--mono); color: var(--muted); letter-spacing: .03em; }
.fleet-list .go { align-self: center; padding: 8px 12px; font: 400 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.fleet-list .go:hover { color: var(--mode); }
.fleet-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 12px 12px 15px; }
.star-btn { width: 34px; height: 34px; padding: 0; background: none; border: 1px solid var(--line-strong); color: var(--muted); font: 400 20px/1 var(--text); cursor: pointer; flex: none; }
.star-btn:hover { border-color: var(--paper); color: var(--paper); }
.star-btn.on { color: var(--mode); border-color: var(--mode); }
.star-btn:disabled { opacity: .6; cursor: default; }
h1 .star-btn { align-self: center; }
.swatches { display: contents; }
.swatch { width: 22px; height: 22px; padding: 0; border: 1px solid var(--line-strong); cursor: pointer; flex: none; color: var(--paper-2); background: none; font: 400 14px/1 var(--mono); }
.swatch:hover { border-color: var(--paper); }
.swatch[aria-pressed="true"] { outline: 2px solid var(--paper); outline-offset: 1px; }
.swatch.none { margin-left: 6px; border-style: dashed; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23c8ced8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.2 8a4.8 4.8 0 1 0 1.6-3.6'/%3E%3Cpath d='M3.2 2.6v3h3'/%3E%3C/svg%3E") center / 14px 14px no-repeat; }
.slots { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.slots li { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); background: var(--surface-2); min-width: 0; }
.slots li .slot-n { font: 400 11px/1 var(--mono); color: var(--dim); letter-spacing: .1em; flex: none; width: 2.2em; }
.slots li .grow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.slots li button { flex: none; width: 32px; height: 32px; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; font: 700 15px/1 var(--mono); }
.slots li button:hover { color: #fff; border-color: var(--hazard); background: var(--hazard-wash); }
.slots li.me { border-left: 3px solid var(--mode); }
.addrow { display: flex; gap: 10px; align-items: stretch; }
.addrow select { flex: 1; min-width: 0; }
.progress { height: 3px; background: rgba(255, 255, 255, .09); overflow: hidden; position: relative; margin: 14px 0 8px; }
.progress i { position: absolute; top: 0; bottom: 0; width: 38%; background: var(--mode); box-shadow: 0 0 12px var(--mode-glow); animation: load 1.1s cubic-bezier(.5, 0, .5, 1) infinite; }
@keyframes load { from { left: -40%; } to { left: 100%; } }

/* ------------------------------------------------------------------------------------------------------------ account */
.tokenbox { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; padding: 14px; border: 1px solid var(--mode); background: var(--mode-wash); margin: 0 0 18px; }
.tokenbox code { flex: 1; min-width: 200px; padding: 10px 12px; background: var(--ink); border: 1px solid var(--line); font-size: 13.5px; word-break: break-all; color: var(--paper); user-select: all; }
.cmdbox { position: relative; margin: 10px 0 14px; }
.cmdbox pre { margin: 0; padding: 14px 16px; padding-right: 110px; background: #070a0f; border: 1px solid var(--line-strong); border-left: 3px solid var(--mode); overflow-x: auto; font: 13.5px/1.55 var(--mono); color: var(--paper); white-space: pre-wrap; overflow-wrap: anywhere; }
.cmdbox .btn { position: absolute; top: 8px; right: 8px; }
.method { padding: 22px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 30px; }
.method:first-of-type { border-top: 0; }
.method h3 { margin: 0; font-size: 22px; }
.method h3 small { display: block; margin-top: 8px; font: 400 11px/1.3 var(--mono); letter-spacing: .14em; color: var(--muted); }

/* ------------------------------------------------------------------------------------------------------------ guide */
.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(26px, 5vw, 64px); align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 18px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; padding-right: 8px; }
.toc .label { display: block; margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 15px; line-height: 1.3; color: var(--paper-2); text-decoration: none; }
.toc a:hover { color: var(--mode); }
.toc a.active { color: var(--mode); border-left-color: var(--mode); }
.toc .sub a { padding-left: 28px; font-size: 14px; color: var(--muted); }
.toc-mobile { display: none; margin-bottom: 20px; border: 1px solid var(--line-strong); }
.toc-mobile summary { padding: 12px 16px; cursor: pointer; font: 800 16px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.toc-mobile .toc-inner { padding: 4px 16px 14px; }
.prose { max-width: 78ch; min-width: 0; }
.prose h1 { font-size: 40px; margin-bottom: 18px; }
.prose h2 { font-size: clamp(26px, 3.6vw, 34px); letter-spacing: .1em; margin: 2.2em 0 .7em; padding-top: 1.1em; border-top: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose h3 { font-size: 22px; letter-spacing: .1em; margin: 1.8em 0 .6em; color: var(--paper); }
.prose h4 { font-size: 17px; letter-spacing: .12em; margin: 1.5em 0 .5em; color: var(--paper-2); }
.prose p, .prose li { color: var(--paper-2); }
.prose strong { color: var(--paper); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin: .25em 0; }
.prose li::marker { color: var(--mode); }
.prose code { background: rgba(255, 255, 255, .065); padding: 1px 5px; color: var(--paper); border-radius: 0; word-break: break-word; }
.prose pre { margin: 0 0 1.3em; padding: 14px 18px; background: #070a0f; border: 1px solid var(--line); border-left: 3px solid var(--mode); overflow-x: auto; font: 13px/1.55 var(--mono); tab-size: 4; }
.prose pre code { background: none; padding: 0; font-size: inherit; word-break: normal; white-space: pre; }
.prose blockquote { margin: 0 0 1.2em; padding: 6px 0 6px 18px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.prose .tbl-wrap { margin: 0 0 1.4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th { text-align: left; font: 400 11px/1.25 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.prose td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--paper-2); }
.prose td code { white-space: nowrap; }
.prose hr { margin: 2em 0; }

/* ------------------------------------------------------------------------------------------------------------ login, oauth */
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 460px); gap: clamp(28px, 6vw, 84px); align-items: start; padding: clamp(30px, 6vw, 72px) 0 24px; }
.auth-intro h1 { font-size: clamp(40px, 6vw, 72px); margin-top: 12px; line-height: .95; }
.auth-intro .lede { margin: 18px 0 0; max-width: 40ch; color: var(--paper-2); font-size: 17.5px; }
.auth-card { width: 100%; }
.auth-card .tabs { margin: -6px -6px 24px; }
@media (max-width: 860px) { .auth-layout { grid-template-columns: 1fr; } }
.consent { text-align: left; }
.consent h1 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.02; letter-spacing: .06em; }
.perms { list-style: none; margin: 0 0 22px; padding: 0; border-top: 1px solid var(--line); }
.perms li { padding: 11px 0 11px 28px; border-bottom: 1px solid var(--line); position: relative; color: var(--paper-2); }
.perms li::before { content: ''; position: absolute; left: 4px; top: 19px; width: 8px; height: 8px; background: var(--mode); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0 0 22px; font: 400 14px/1.4 var(--mono); }
.kv dt { color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-size: 11.5px; padding-top: 2px; }
.kv dd { margin: 0; color: var(--paper); word-break: break-all; }

/* ------------------------------------------------------------------------------------------------------------ footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .35)); }
.site-footer .inner { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: baseline; justify-content: space-between; padding-top: 28px; padding-bottom: 34px; }
.site-footer .brand { font-size: 18px; padding-bottom: 5px; margin-top: 0; }
.site-footer .brand::after { height: 3px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer .links a { font: 400 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.site-footer .links a:hover { color: var(--mode); }
.site-footer .fine { flex-basis: 100%; font: 400 12px/1.5 var(--mono); letter-spacing: .04em; color: var(--dim); margin: 0; }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 22px; }
.mb0 { margin-bottom: 0; }

/* ------------------------------------------------------------------------------------------------------------ tutorial (Mantis #3931: /tutorial and /tutorial/{id}, js/pages/tutorial.js) */
.tut-lbl { font: 400 11.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tut-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.tut-dots i { width: 8px; height: 8px; background: transparent; border: 1px solid var(--line-strong); }
.tut-dots i.on { background: var(--mode); border-color: var(--mode); }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.tut-save { font: 400 12px/1.3 var(--mono); letter-spacing: .08em; }
.tut-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-bottom: 8px; }
.tut-summary .count { font: 400 13px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--paper-2); }
.tut-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tut-card { border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, background .15s; }
.tut-card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.tut-card.next { border-color: var(--mode); }
.tut-card.solved { border-left: 3px solid var(--ok); }
.tut-card-link { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: baseline; padding: 14px 16px; color: var(--paper); text-decoration: none; height: 100%; }
.tut-card-link .no { font: 900 34px/1 var(--display); color: transparent; -webkit-text-stroke: 1px var(--mode); grid-row: span 3; }
.tut-card-link .api code { margin-right: 8px; font: 12px var(--mono); color: var(--muted); background: none; padding: 0; }
.tut-card-link .ttl { font: 800 20px/1.1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.tut-card-link .meta-row { grid-column: 2; }
.tut-head { padding: clamp(18px, 3vw, 30px) 0 14px; }
.tut-head h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1; letter-spacing: .06em; margin: 8px 0 10px; }
.tut-crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; font: 400 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.tut-crumbs .pos { color: var(--muted); margin-right: auto; }
.tut-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "brief viewer" "editor viewer"; gap: 18px clamp(20px, 3vw, 40px); align-items: start; }
.tut-grid > * { min-width: 0; }
.tut-brief { grid-area: brief; }
.tut-viewer-col { grid-area: viewer; position: sticky; top: calc(var(--header-h) + 10px); max-height: calc(100vh - var(--header-h) - 20px); overflow-y: auto; }
.tut-editor { grid-area: editor; }
.tut-brief .goal { margin: 0 0 12px; font-size: 18px; color: var(--paper); }
.tut-brief .teaches { border: 1px solid var(--line); background: var(--surface); padding: 0 14px; }
.tut-brief .teaches summary { cursor: pointer; padding: 10px 0; font: 400 11.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tut-brief .teaches summary:hover { color: var(--mode); }
.tut-brief .teaches p { margin: 0 0 12px; color: var(--paper-2); font-size: 16px; }
.tut-viewer { position: relative; aspect-ratio: 16 / 10; min-height: 260px; max-height: 70vh; width: 100%; background: var(--ink); border: 1px solid var(--line); overflow: hidden; }
.tut-viewer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--ink); }
.tut-verdict { margin-top: 12px; }
.tut-verdict .note { margin-bottom: 10px; }
.tut-verdict .tbl { font-size: 14.5px; margin-bottom: 10px; }
.tut-verdict .tbl th, .tut-verdict .tbl td { padding: 7px 10px; }
.mt-s { margin-top: 10px; }
button.linkish { background: none; border: 0; padding: 0; color: var(--mode); font: inherit; cursor: pointer; text-decoration: underline; }
.tut-editor .editor textarea { height: clamp(300px, 46vh, 520px); }
.tut-editor .diag, .tut-editor .note { margin-top: 10px; }
.tut-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 12px; }
.tut-bar .keys { margin-left: auto; font-family: var(--mono); font-size: 12px; }
.btn.on { border-color: var(--mode); color: var(--mode); }
.tut-help { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.tut-help .btn-row { margin-bottom: 8px; }
.tut-hint { margin: 8px 0; padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--mode); background: var(--surface); }
.tut-hint p { margin: 0 0 6px; }
.tut-hint pre.tool { margin: 6px 0; padding: 8px 12px; background: #070a0f; border: 1px solid var(--line); font: 13.5px/1.5 var(--mono); overflow-x: auto; }
.tut-hint .api-list code { margin-right: 8px; font: 12.5px var(--mono); color: var(--paper-2); }
.tut-solution { margin: 8px 0; }
.tut-solution .editor textarea { height: clamp(200px, 32vh, 360px); }
.tut-final { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--mode); background: var(--mode-wash); }
.tut-final h3 { margin: 0 0 8px; }
.tut-debug { padding-top: clamp(24px, 4vw, 40px); }
.tut-debug-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px clamp(20px, 3vw, 40px); align-items: start; }
.tut-debug-grid > * { min-width: 0; }
.tut-debug h3 { font-size: 18px; margin: 0 0 10px; }
.tel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; margin: 0 0 12px; }
.tel-grid.wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tel-cell dt { font: 400 10.5px/1.3 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.tel-cell dd { margin: 2px 0 0; font: 13.5px/1.5 var(--mono); color: var(--paper); overflow-wrap: anywhere; }
.tel-cell code { font: inherit; background: none; padding: 0; }
.tel-cell .sub { color: var(--muted); font-size: 12px; }
.tel-cell .bad, code.bad { color: #ff8393; }
.tel-list { display: block; white-space: pre-wrap; }
.tut-console { max-height: 320px; overflow: auto; border: 1px solid var(--line); background: #070a0f; }
.tut-console ol { list-style: none; margin: 0; padding: 0; }
.tut-console button { display: grid; grid-template-columns: 54px 1fr; gap: 10px; width: 100%; text-align: left; padding: 4px 10px; background: none; border: 0; color: var(--paper); font: 13px/1.5 var(--mono); cursor: pointer; }
.tut-console button:hover { background: rgba(255, 255, 255, .05); }
.tut-console .tn { color: var(--mode); }
.tut-console li.future button { opacity: .45; }
.tut-console .hint { padding: 10px 12px; margin: 0; }
@media (max-width: 980px) {
  .tut-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brief" "viewer" "editor"; }
  .tut-viewer-col { position: static; max-height: none; overflow: visible; }
  .tut-debug-grid { grid-template-columns: minmax(0, 1fr); }
  .tut-bar .keys { display: none; }
}
@media (max-width: 560px) { .tut-viewer { aspect-ratio: 4 / 3; } .tut-cards { grid-template-columns: minmax(0, 1fr); } }
/* The header has six to eight links plus the language switch, the login buttons and on staging a label, and the page is at most 1200 px wide: from the burger (880) up the header is
   tighter in three steps (js/layout.js puts .nav-long on it always). Sized with the real widths of the fonts for hr and en, with and without Tutorial, Cup, the STAGING label, an
   administrator link and a long user name (Mantis #4063): nothing wraps and nothing leaves the screen. */
@media (min-width: 881px) {
  .site-header.nav-long .bar { gap: 14px; }
  .site-header.nav-long .brand { font-size: 22px; letter-spacing: .18em; }
  .site-header.nav-long .nav a { padding: 0 8px; letter-spacing: .1em; }
  .site-header.nav-long .nav a[aria-current='page']::after { left: 8px; right: 8px; }
  .site-header.nav-long .auth { gap: 6px; }
  .site-header.nav-long .auth .btn.sm { padding: 2px 9px 0; letter-spacing: .1em; }
}
@media (min-width: 881px) and (max-width: 1260px) {
  .site-header.nav-long .bar { gap: 8px; }
  .site-header.nav-long .brand { font-size: 19px; letter-spacing: .12em; }
  .site-header.nav-long .nav { gap: 0; }
  .site-header.nav-long .nav a { padding: 0 5px; font-size: 11px; letter-spacing: .05em; }
  .site-header.nav-long .nav a[aria-current='page']::after { left: 5px; right: 5px; }
  .site-header.nav-long .auth .btn.sm { padding: 2px 6px 0; letter-spacing: .05em; }
}
@media (min-width: 881px) and (max-width: 1000px) {
  .site-header.nav-long .bar { gap: 5px; }
  .site-header.nav-long .brand { font-size: 16px; letter-spacing: .08em; }
  .site-header.nav-long .nav a { padding: 0 3px; font-size: 10px; letter-spacing: 0; }
  .site-header.nav-long .nav a[aria-current='page']::after { left: 3px; right: 3px; }
  .site-header.nav-long .auth { gap: 3px; }
  .site-header.nav-long .auth .btn.sm { padding: 2px 4px 0; letter-spacing: 0; }
}

/* ------------------------------------------------------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-layout .toc { display: none; }
  .toc-mobile { display: block; }
  .method { grid-template-columns: minmax(0, 1fr); }
  .hero-head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .viewer-frame { aspect-ratio: 4 / 5; max-height: 82vh; min-height: 0; }
  .hide-sm { display: none !important; }
  .tbl th, .tbl td { padding: 11px 9px; }
  .tbl { font-size: 15px; }
  .brand { font-size: 21px; }
  .stat-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat-grid > div:last-child { border-bottom: 0; }
  .btn { padding: 2px 16px 0; }
  .statusbar { padding: 10px 12px; }
  .tabs [role='tab'] { padding: 13px 14px 11px; font-size: 17px; }
}
/* a phone held sideways: the viewer of the match page takes the whole screen height (the page header scrolls away above it; see utakmica.js) */
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  html { scroll-padding-top: 0; }
  .site-header { position: static; }
  .viewer-frame.bleed { aspect-ratio: auto; height: 100vh; height: 100dvh; max-height: none; min-height: 0; }
}
@media (max-width: 420px) {
  .site-header .bar { gap: 8px; }
  /* brand + HR · EN + user + menu must fit 360 px */
  .brand { font-size: 20px; letter-spacing: 0.2em; }
  .staging-badge { font-size: 11px; letter-spacing: .08em; padding: 4px 6px 3px; }
  .lang-switch { letter-spacing: .04em; }
  .lang-switch button { padding: 10px 3px; }
  .userlink { max-width: 84px; gap: 6px; }
  .menu-btn { margin-left: 0; }
  .editor .gutter { min-width: 2.8em; padding-left: 8px; padding-right: 8px; }
  .diag button { grid-template-columns: 62px 1fr; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .live-badge i, .badge.run::before { animation: none; }
}

/* rating history on the fleet profile (js/pages/flota.js) */
.rh-wrap { border: 1px solid var(--line); background: var(--surface); padding: 10px 8px 4px; margin-bottom: 14px; }
.rh-chart { display: block; width: 100%; height: auto; font: 400 11px var(--mono); }
.rh-chart text { fill: var(--muted); }
.rh-chart .grid line { stroke: var(--line); stroke-width: 1; }
.rh-chart .vmarks line { stroke: var(--line-strong); stroke-dasharray: 3 4; }
.rh-chart .vmarks text { fill: var(--mode); letter-spacing: .08em; }
.rh-chart .line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.rh-chart .now { fill: var(--paper); font-size: 13px; font-weight: 700; }
.rh-table summary { cursor: pointer; padding: 8px 0; font: 400 11.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rh-table summary:hover { color: var(--mode); }

/* "Connect your LLM (MCP)" panel at the top of the workshop (js/connect.js) */
.connect { margin: 0 0 30px; border: 1px solid var(--line-strong); border-left: 3px solid var(--mode); background: linear-gradient(180deg, var(--mode-hover2), var(--mode-faint)); }
.connect > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 16px 20px; }
.connect > summary::-webkit-details-marker { display: none; }
.connect > summary::before { content: '+'; font: 700 18px/1 var(--mono); color: var(--mode); width: 14px; }
.connect[open] > summary::before { content: '−'; }
.connect-title { font: 800 24px/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--paper); }
.connect-sub { font: 400 12px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.connect-body { padding: 0 20px 18px; }
.connect-lead { max-width: 76ch; color: var(--paper-2); margin: 0 0 16px; }
.connect-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.connect-way { padding: 14px 16px; background: rgba(5,7,10,.55); border: 1px solid var(--line); min-width: 0; }
.connect-way h3 { margin: 0 0 8px; font-size: 20px; }
.connect-way h3 small { display: block; margin-top: 6px; font: 400 11px/1.3 var(--mono); letter-spacing: .14em; color: var(--muted); }
.connect-way p { margin: 0 0 8px; font-size: 14px; color: var(--paper-2); }
.connect-way .cmdbox pre { font-size: 12.5px; padding-right: 16px; padding-bottom: 46px; }
.connect-way .cmdbox .btn { top: auto; bottom: 8px; }
.connect-next { margin: 14px 0 0; }
.connect.is-connected { border-left-color: var(--ok); background: rgba(77,226,161,.03); margin-bottom: 22px; }
.connect.is-connected > summary { padding: 10px 16px; align-items: center; }
.connect.is-connected > summary::before { color: var(--muted); font-size: 15px; }
.connect.is-connected .connect-title { font-size: 17px; }
.connect-ok { width: 9px; height: 9px; background: var(--ok); box-shadow: 0 0 8px rgba(77,226,161,.7); align-self: center; }
@media (max-width: 1100px) { .connect-grid { grid-template-columns: 1fr; } }

/* LLM mode / manual mode bar at the top of the workshop (js/pages/moje.js) */
.modebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 0 0 14px; }
.mode-status { display: inline-flex; align-items: center; gap: 10px; font: 400 12px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mode-dot { width: 9px; height: 9px; background: var(--dim); flex: none; }
.mode-dot.on { background: var(--ok); box-shadow: 0 0 8px rgba(77,226,161,.7); }
.mode-seg { display: inline-flex; border: 1px solid var(--line-strong); }
.mode-seg button { appearance: none; border: 0; margin: 0; background: transparent; color: var(--muted); padding: 9px 14px; font: 700 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.mode-seg button + button { border-left: 1px solid var(--line-strong); }
.mode-seg button:hover { color: var(--paper); }
.mode-seg button[aria-pressed='true'] { background: var(--mode); color: var(--ink); }
.mode-hint { margin: -4px 0 22px; max-width: 80ch; }
tr.fresh td { animation: freshrow 2.4s ease-out; }
@keyframes freshrow { from { background: var(--mode-flash); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { tr.fresh td { animation: none; background: var(--mode-wash); } }

/* Guide for an LLM without MCP, above the code field on /moje (#3851) */
.guide-box { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; margin: 0 0 10px; padding: 12px 14px; background: rgba(5,7,10,.55); border: 1px solid var(--line); border-left: 3px solid var(--mode); }
.guide-box-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.guide-box-text b { font: 700 13px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--paper-2); }

/* Start from a house fleet (#3852): cards on /moje, the button on a house fleet's profile, the name dialog */
.house-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.house-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 16px; background: rgba(5,7,10,.55); border: 1px solid var(--line); min-width: 0; }
.house-card h3 { margin: 0; font-size: 22px; }
.house-card p { margin: 0; flex: 1; }
.fork-row { margin-top: 18px; }
.fork-dialog { max-width: min(480px, calc(100vw - 32px)); width: 100%; padding: 22px 24px; background: var(--surface); color: var(--paper); border: 1px solid var(--line-strong); border-left: 3px solid var(--mode); }
.fork-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.fork-dialog h2 { margin: 0 0 8px; font-size: 26px; }

/* ------------------------------------------------------------------------------------------------------------ /admin (server status) */
.stat-grid .v.sm { font-size: 22px; line-height: 1.25; word-break: break-word; }
.stat-grid > .adm-bad .v, .stat-grid > .adm-crash.high .v { color: #ff8393; }
.stat-grid > .adm-crash.high { background: var(--hazard-wash); box-shadow: inset 0 0 0 1px rgba(255, 75, 92, .55); }
.stat-grid > .adm-crash.some .v { color: var(--mode); }
.adm-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 4px; }
.adm-bar p { margin: 0; }
.adm-updated.error { color: #ff8393; }
.adm-meter { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; }
.adm-meter .bar { flex: 1; height: 8px; background: rgba(232, 220, 190, .1); }
.adm-meter .bar i { display: block; height: 100%; background: var(--ok); }
.adm-meter.mid .bar i { background: var(--mode); }
.adm-meter.high .bar i { background: var(--hazard); }
.adm-meter .pct { font: 400 12px/1 var(--mono); color: var(--muted); min-width: 4ch; text-align: right; }
.adm-kv { grid-template-columns: 1fr; }
.adm-kv dd { margin-bottom: 12px; }
.adm-cfg dd { word-break: break-word; }
.adm-tbl td.adm-crash { font-weight: 700; }
.adm-tbl td.adm-crash.none { color: var(--dim); font-weight: 400; }
.adm-tbl td.adm-crash.some { color: var(--mode); }
.adm-tbl td.adm-crash.high { color: #fff; background: var(--hazard); }
.adm-tbl tr.adm-row-high td:first-child { box-shadow: inset 3px 0 0 var(--hazard); }
.stat-grid .adm-sub { font: 400 12px/1.3 var(--mono); letter-spacing: 0; margin-top: 4px; }
.adm-cup-kv dd { word-break: normal; overflow-wrap: anywhere; }
.adm-cup-controls { max-width: 560px; }
.adm-cup-controls .adm-cup-minutes { max-width: 200px; margin-bottom: 14px; }
.adm-cup-controls .hint { margin: 12px 0 0; }
.adm-cup-controls .adm-cup-off { color: var(--amber); }
.adm-cup-controls .mode-seg button:disabled { opacity: .5; cursor: default; }
.adm-confirm { margin: 14px 0 0; }
.adm-confirm[hidden], .adm-cup-controls [hidden] { display: none; }
.adm-confirm .adm-confirm-text { margin: 0 0 12px; }
.adm-cup-msg { margin-top: 14px; }
.adm-cup-msg:empty { display: none; }
.adm-cup-msg .note { margin-bottom: 0; }
.adm-names { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 13px/1.3 var(--mono); }
@media (max-width: 640px) {
  .stat-grid > div { border-bottom: 1px solid var(--line); }
  .adm-tbl td, .adm-tbl th { padding-left: 8px; padding-right: 8px; }
}

/* leaderboard live refresh (js/pages/ljestvica.js): a rating that changed flashes up / down; reduced motion gets no flash */
.rating.flash-up { animation: ratingup 1.4s ease-out; }
.rating.flash-down { animation: ratingdown 1.4s ease-out; }
@keyframes ratingup { 0%, 30% { color: var(--ok); text-shadow: 0 0 10px rgba(77,226,161,.6); } 100% { text-shadow: 0 0 0 transparent; } }
@keyframes ratingdown { 0%, 30% { color: #ff7a88; text-shadow: 0 0 10px rgba(255,122,136,.55); } 100% { text-shadow: 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .rating.flash-up, .rating.flash-down { animation: none; } }

/* the name of a fleet that plays in a match on air right now (js/lbtable.js, Mantis #3824): a soft light sweep over the letters, one loop = SHIMMER_MS (2.5 s)
   in lbtable.js; the sweep takes about 70 % of it, then the name rests. The chip beside it is not touched. Reduced motion: no movement, a static silver underline. Matches on air at once sweep a third of a loop apart (lbtable.js). */
.fleet-name.playing {
  background: linear-gradient(105deg, var(--paper) 0 36%, #b9c2cc 44%, #ffffff 50%, #b9c2cc 56%, var(--paper) 64% 100%) 100% 0 / 300% 100% no-repeat;   /* silver (Daniel 7. 10.: „ne na žuto, nego na silver") */
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: nameshimmer 2.5s ease-in-out infinite;
}
.fleet a:hover .fleet-name.playing { color: transparent; }
@keyframes nameshimmer { 0% { background-position: 100% 0; } 70%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .fleet-name.playing {
    animation: none; background: linear-gradient(#b9c2cc, #b9c2cc) 0 100% / 100% 2px no-repeat; padding-bottom: .16em; margin-bottom: -.16em;
    -webkit-background-clip: border-box; background-clip: border-box; color: inherit; -webkit-text-fill-color: currentColor;
  }
  .fleet a:hover .fleet-name.playing { color: #d7dde3; }
}

/* ------------------------------------------------------------------------------------------------------------ cups (Mantis #3894) */
.ver { color: var(--muted); font-size: 13px; letter-spacing: .04em; }          /* "v7" after a fleet name: a cup always prints the version */
.cup-ref { margin-top: 4px; font: 400 11.5px/1.3 var(--mono); letter-spacing: .04em; }
.cup-ref a { color: var(--muted); }
.stat-grid .v .owner { font-size: 13px; }
/* The cup leaderboard page (Mantis #3894): the table is the page; one line above it says which cup, arrows page through the cups; the rest is smaller and below. */
.cup-head { padding-bottom: clamp(12px, 2vw, 20px); }
.cup-head h1 { font-size: clamp(32px, 4.8vw, 54px); }
.cup-line { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.cup-line-text { flex: 1; margin: 0; font-size: clamp(15px, 2vw, 18px); line-height: 1.4; color: var(--paper-2); }
.cup-line-text .cup-name { color: var(--paper); }
.cup-line-text .sep { color: var(--muted); }
.cup-arrow { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); color: var(--paper); font-size: 20px; line-height: 1; text-decoration: none; }
a.cup-arrow:hover, a.cup-arrow:focus-visible { border-color: var(--amber); color: var(--amber); }
.cup-arrow.off { opacity: .28; }
.cup-next { margin: 0 0 14px; font: 400 12.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cup-next b { color: var(--amber); font-weight: 400; font-variant-numeric: tabular-nums; }
.section.minor { padding: clamp(16px, 3vw, 28px) 0; }
.section.minor .section-head h2 { font-size: clamp(18px, 2.4vw, 22px); }
.section.minor .stat-grid { margin-bottom: 0; }
.cup-lede { max-width: 64ch; margin-top: 8px; }
.tbl tr[aria-current='true'] td { background: var(--mode-cur); }

/* ------------------------------------------------------------------------------------------------------------ game mode (SOLO, Mantis #3919, mockup v3)
   The mode is the CONTEXT of the page: a switch at the top right (js/layout.js) and everything below it is for the selected mode. The pages that obey it carry
   data-modes on <body> (home, /ljestvica, /solo, /flota, /moje); on them the accent --mode is amber for the ladder and cyan for SOLO. Nothing here applies while
   Features:Solo is off: no switch is drawn and data-mode is never set. The cup is no mode: while the home page shows the cup stream (js/lang-boot.js before the first paint, then watchingCup() in
   js/layout.js) <html> carries data-watch='cup' and the page keeps the amber it always had, whatever mode is selected; the selected mode itself is not touched. The pages without data-modes
   (/kup, /utakmice, ...) never take the SOLO accent. */
html[data-mode='solo']:not([data-watch='cup']) body[data-modes] { --mode: var(--cyan); --mode-hi: #8fe3ff; --mode-hi2: #7fdcff; --mode-glow: var(--cyan-glow); --mode-wash: var(--cyan-wash); --mode-bg: rgba(89, 212, 255, 0.075);
  --mode-hover: rgba(89, 212, 255, 0.045); --mode-hover2: rgba(89, 212, 255, 0.05); --mode-faint: rgba(89, 212, 255, 0.015); --mode-cur: rgba(89, 212, 255, 0.06); --mode-flash: rgba(89, 212, 255, 0.22); }
.mode-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 20px; padding: 14px 0; border-top: 3px solid var(--mode); border-bottom: 1px solid var(--line); }
.mode-bar[hidden] { display: none; }
.mode-bar .what { flex: 1 1 240px; min-width: 0; font-size: 14px; color: var(--muted); }
.mode-bar .what b { color: var(--mode); font-weight: 600; }
.mode-bar .modepick { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.mode-bar .lbl, .mode-label { font: 400 11.5px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); }
.seg button { appearance: none; margin: 0; border: 0; background: transparent; color: var(--paper-2); padding: 10px 16px 8px; font: 800 15px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button:hover { color: var(--paper); }
.seg button[aria-pressed='true'] { background: var(--mode); color: var(--ink); box-shadow: 0 0 18px var(--mode-glow); cursor: default; }
.seg button:focus-visible { outline: 2px solid var(--mode); outline-offset: 2px; }
.stream-switch .seg button { padding: 11px 16px 9px; }
.badge.elsewhere { border-color: var(--line-strong); color: var(--muted); }
.stat-grid .v .state-mode { color: var(--mode); }
.cup-chip.solo-chip { background: var(--cyan); }
@media (max-width: 700px) {
  .mode-bar { gap: 8px 12px; padding: 12px 0; }
  .mode-bar .what { flex-basis: 100%; }      /* the words on a line of their own, the switch under them stays at the right (margin-left: auto) */
  /* "aktivna na ljestvici / u SOLO-u" next to a version: on its own line and allowed to break, else the column of states grows and pushes the buttons off a phone */
  .badge.elsewhere { display: block; max-width: 11ch; margin-top: 6px; white-space: normal; line-height: 1.3; }
}

/* ------------------------------------------------------------------------------------------------------------ Solitaire and Duel (Features:Duel, Mantis #3940, mockup docs/mockups/modovi-cetiri.html)
   The same blocks as the SOLO one: the accent of the two private modes on the pages that obey the mode, off while the cup is shown. The drop-down of the four modes (js/dropdown.js, js/layout.js), the line of the
   channel under the mode bar (js/channel.js) and the panels over the viewer of the home page. None of it is drawn while the flag is off. */
html[data-mode='solitaire']:not([data-watch='cup']) body[data-modes] { --mode: var(--leaf); --mode-hi: #b9f0a0; --mode-hi2: #aeea92; --mode-glow: var(--leaf-glow); --mode-wash: var(--leaf-wash); --mode-bg: rgba(158, 227, 125, 0.075);
  --mode-hover: rgba(158, 227, 125, 0.045); --mode-hover2: rgba(158, 227, 125, 0.05); --mode-faint: rgba(158, 227, 125, 0.015); --mode-cur: rgba(158, 227, 125, 0.06); --mode-flash: rgba(158, 227, 125, 0.22); }
html[data-mode='ctf']:not([data-watch='cup']) body[data-modes] { --mode: var(--ok); --mode-hi: #85ecbf; --mode-hi2: #74e8b5; --mode-glow: rgba(77, 226, 161, 0.35); --mode-wash: var(--ok-wash); --mode-bg: rgba(77, 226, 161, 0.075);
  --mode-hover: rgba(77, 226, 161, 0.045); --mode-hover2: rgba(77, 226, 161, 0.05); --mode-faint: rgba(77, 226, 161, 0.015); --mode-cur: rgba(77, 226, 161, 0.06); --mode-flash: rgba(77, 226, 161, 0.22); }
html[data-mode='duel']:not([data-watch='cup']) body[data-modes] { --mode: var(--violet); --mode-hi: #d4a8fd; --mode-hi2: #cc9ffc; --mode-glow: var(--violet-glow); --mode-wash: var(--violet-wash); --mode-bg: rgba(192, 132, 252, 0.075);
  --mode-hover: rgba(192, 132, 252, 0.045); --mode-hover2: rgba(192, 132, 252, 0.05); --mode-faint: rgba(192, 132, 252, 0.015); --mode-cur: rgba(192, 132, 252, 0.06); --mode-flash: rgba(192, 132, 252, 0.22); }
.dd { position: relative; display: inline-block; }
.dd-btn { appearance: none; margin: 0; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; border: 1px solid var(--line-strong); background: transparent; color: var(--paper); padding: 9px 12px 7px 14px; font: 700 13.5px/1 var(--mono); letter-spacing: .04em; text-align: left; }
.dd-btn:hover { border-color: var(--paper); }
.dd-btn:focus-visible { outline: 2px solid var(--mode); outline-offset: 2px; }
.dd-car { flex: none; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid currentColor; transition: transform .15s; }
.dd-btn[aria-expanded='true'] .dd-car { transform: rotate(180deg); }
.dd-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; min-width: 300px; max-width: min(420px, calc(100vw - 32px)); margin: 0; padding: 4px 0; list-style: none; background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: 0 18px 50px rgba(0, 0, 0, .6); outline: none; }
.dd-menu[hidden] { display: none; }
.dd-opt { display: grid; gap: 3px; padding: 8px 12px 7px; cursor: pointer; border-left: 3px solid transparent; }
.dd-opt.active, .dd-opt:hover { background: rgba(232, 220, 190, 0.06); }
.dd-opt[aria-selected='true'] { border-left-color: var(--mc, var(--mode)); }
.dd-nm { font: 400 14px/1.3 var(--mono); color: var(--paper); overflow-wrap: anywhere; }
.dd-ds { font: 400 12.5px/1.3 var(--mono); color: var(--muted); }
.dd-grp { padding: 10px 12px 2px; font: 400 10.5px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); cursor: default; }
.dd-grp:empty { padding: 2px 0 0; border-top: 1px solid var(--line); margin-top: 4px; }
/* the drop-down of the modes: filled in the colour of the mode, four rows with a colour square */
.mode-dd .dd-btn { background: var(--mode); border-color: var(--mode); color: var(--ink); font: 800 15px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 0 18px var(--mode-glow); }
.mode-dd .dd-btn:hover { border-color: var(--paper); }
.mode-dd .dd-menu { left: auto; right: 0; min-width: 330px; }
.mode-dd .dd-opt { position: relative; padding: 10px 14px 9px 40px; }
.mode-dd .dd-sw { position: absolute; left: 14px; top: 13px; width: 12px; height: 12px; background: var(--mc); box-shadow: 0 0 10px var(--mc); }
.mode-dd .dd-nm { font: 800 16px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.mode-box .mode-bar { border-bottom: 1px solid var(--line); }
button.cup-arrow { background: transparent; cursor: pointer; font-family: inherit; }
button.cup-arrow:hover:not(:disabled), button.cup-arrow:focus-visible { border-color: var(--mode); color: var(--mode); }
button.cup-arrow:disabled { opacity: .28; cursor: default; }
.mode-card { margin: 14px 0; border: 1px solid var(--line-strong); border-left: 4px solid var(--mode); background: var(--mode-wash); padding: 14px 16px; display: grid; gap: 8px; }
.mode-card b { font-weight: 600; color: var(--paper); }
.mode-card p { margin: 0; font-size: 15px; color: var(--paper-2); max-width: 70ch; }
.chan-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--paper-2); }
.chan-row[hidden] { display: none; }
.chan-row .lbl { font: 400 11.5px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.chan-row .sep { color: var(--dim); }
.chan-row .mono { color: var(--paper); }
.stream-switch.has-modebar { display: block; padding: 0 0 10px; }
.stream-switch.has-modebar .mode-bar { margin-top: 0; }
.cup-btn { appearance: none; margin: 0; cursor: pointer; border: 1px solid var(--amber); background: transparent; color: var(--amber); padding: 9px 12px 7px; font: 800 15px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.cup-btn[aria-pressed='true'] { background: var(--amber); color: var(--ink); box-shadow: 0 0 18px var(--amber-glow); }
.cup-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.mode-panel { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; overflow-y: auto; padding: clamp(14px, 3vw, 30px) 16px; background: rgba(5, 7, 10, .86); text-align: center; }
.mode-panel[hidden] { display: none; }
.mode-panel .mp-in { display: grid; gap: 12px; justify-items: center; width: min(620px, 100%); margin: auto; }
.mode-panel h2 { margin: 0; font: 900 clamp(24px, 3.4vw, 36px)/1.05 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--paper); }
.mode-panel p { margin: 0; color: var(--paper-2); font-size: 15px; max-width: 56ch; }
.mode-panel .mp-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.mp-list { display: grid; gap: 6px; width: 100%; text-align: left; font-size: 14px; }
.mp-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); }
.mp-row b { font: 400 14px/1.3 var(--mono); color: var(--paper); }
.mp-row .grow { flex: 1; color: var(--muted); }
.cup-chip.duel-chip { background: var(--violet); }
.cup-chip.solitaire-chip { background: var(--leaf); }
.cup-chip.ctf-chip { background: var(--ok); }
.badge.mirror { border-color: var(--dim); color: var(--muted); }
.badge.expires { border-color: var(--line-strong); color: var(--muted); }
@media (max-width: 700px) {
  .mode-dd .dd-menu { min-width: min(330px, calc(100vw - 32px)); }
  .dd-menu { min-width: min(300px, calc(100vw - 32px)); }
  .chan-row { gap: 8px 10px; }
}

/* Feature switches of the admin page (Mantis #3976): a real toggle (track and thumb) on a button with role="switch". On: green track, thumb to the right, the word ON; off: dark track, grey thumb to the left, the word OFF. */
.sw-list { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.sw-row { display: flex; gap: 18px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--line); }
.sw-row:first-child { border-top: 0; }
.sw-ctl { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100px; }
.sw { appearance: none; position: relative; display: block; width: 60px; height: 32px; margin: 0; padding: 0; cursor: pointer; border: 2px solid var(--line-strong); border-radius: 16px; background: var(--surface-3); transition: background .15s, border-color .15s; }
.sw-track { position: absolute; inset: 0; display: block; }
.sw-thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); box-shadow: 0 1px 3px rgba(0, 0, 0, .55); transition: transform .16s, background .16s; }
.sw.on { background: var(--ok); border-color: var(--ok); }
.sw.on .sw-thumb { transform: translateX(28px); background: var(--ink); }
.sw:hover:not(:disabled) { border-color: var(--paper-2); }
.sw.on:hover:not(:disabled) { border-color: var(--paper); }
.sw:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
.sw:disabled { opacity: .5; cursor: default; }
.sw-word { font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sw-word.on { color: var(--ok); }
.sw-body { min-width: 0; flex: 1; }
.sw-title { font: 600 17px/1.3 var(--text); color: var(--paper); }
.sw-title .badge { margin-left: 6px; }
.sw-body .sw-desc { margin: 4px 0 0; }
.sw-body .sw-meta { font: 400 12px/1.4 var(--mono); margin-top: 6px; }
.sw-body .sw-meta[hidden], .sw-body .badge[hidden], .sw-body .btn[hidden] { display: none; }
.sw-body .sw-revert { margin-top: 8px; }
.sw-body .adm-confirm { max-width: 520px; }
.sw-hint { margin: 0 0 6px; }
.sw-body .sw-err { margin-top: 8px; max-width: 520px; }
.sw-body .sw-err:empty { display: none; }
.sw-ro .sw-word { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .sw, .sw-thumb { transition: none; } }
@media (forced-colors: active) { .sw { border-color: CanvasText; } .sw.on { background: Highlight; } .sw-thumb { background: CanvasText; } .sw.on .sw-thumb { background: HighlightText; } }
@media (max-width: 640px) { .sw-row { gap: 12px; } .sw-ctl { width: 84px; } }

/* Shtemer Watch (Mantis #4076, /shtemer-watch): the fleet activations. The line under the title says when the server read the data and turns red when it is old; a day row heads
   each day; the mode of an activation is a badge in the colour of that mode (the colours of the mode switch, js/layout.js). */
.feed-meta { margin-top: 14px; font: 400 12px/1.4 var(--mono); letter-spacing: .08em; color: var(--muted); }
.feed-meta.stale { color: #ff8393; }
.tbl.watch td.when { font-family: var(--mono); font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl.watch td .sub { display: block; margin-top: 3px; font: 400 12px/1.3 var(--mono); color: var(--muted); }
.tbl.watch tr.day td { padding: 22px 14px 8px; border-bottom: 1px solid var(--line-strong); font: 400 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mode); }
.tbl.watch tr.day:hover { background: none; }
.tbl.watch .badge.mode-ladder { border-color: var(--amber); color: var(--amber); }
.tbl.watch .badge.mode-solo { border-color: var(--cyan); color: var(--cyan); }
.tbl.watch .badge.mode-solitaire { border-color: var(--leaf); color: var(--leaf); }
.tbl.watch .badge.mode-duel { border-color: var(--violet); color: var(--violet); }
.tbl.watch .badge.mode-ctf { border-color: var(--ok); color: var(--ok); }
.tbl.watch .badge.new-user { margin-left: 8px; border-color: rgba(77, 226, 161, .55); color: var(--ok); }
@media (max-width: 560px) { .tbl.watch td, .tbl.watch th { padding-left: 8px; padding-right: 8px; } }

/* The medals of the achievements (Mantis #3816, U2; the mockup #4137, js/medals.js): one drawing everywhere, a knurled metal rim, a ribbon in the colour of the group, the motif engraved in
   the field, laurel and stars by tier. The metals and the ribbons are fixed colours, never the accent of the mode; the parts of the SVG take them by class. Sizes: a leaderboard row 30 px
   (compact, without ribbon and laurel), the fleet profile 104 px, a badge on the match page 26 px (compact). The motifs are js/medal-motifs.js. */
.medal { display: inline-block; flex: none; vertical-align: middle; line-height: 0; }
.medal svg { display: block; width: 100%; height: 100%; max-width: none; overflow: visible; }
.medal.bronze { --m-a: #f7c591; --m-b: #c98445; --m-c: #7d4720; --m-p: #3a1f0b; }
.medal.silver { --m-a: #ffffff; --m-b: #c4ccd7; --m-c: #77818e; --m-p: #2f353e; }
.medal.gold { --m-a: #fff3b0; --m-b: #f1bf2f; --m-c: #a06c0a; --m-p: #4a3103; }
.medal.g-amber { --rib: #ffb02e; --rib-e: #6e4708; }        /* the wins */
.medal.g-cyan { --rib: #59d4ff; --rib-e: #14536b; }         /* the shooting */
.medal.g-hazard { --rib: #ff4b5c; --rib-e: #6e1520; }       /* the mishaps */
.medal.g-leaf { --rib: #9ee37d; --rib-e: #36592a; }         /* survival and boxes */
.medal stop.a { stop-color: var(--m-a); }
.medal stop.b { stop-color: var(--m-b); }
.medal stop.c { stop-color: var(--m-c); }
.medal .rb { fill: none; stroke: var(--rib-e); stroke-width: 1.3; }   /* as the mockup draws it (its .thin wins over the fill): the dark body, the coloured edge, stripes and centre */
.medal .rk { fill: var(--rib-e); }
.medal .bar { fill: none; stroke: var(--m-c); stroke-width: 1.3; }
.medal .loop { fill: none; stroke-width: 3.2; }
.medal .stem { fill: none; stroke: var(--m-c); stroke-width: 1.3; }
.medal .leaves { stroke: var(--m-c); stroke-width: .7; }
.medal .teeth { stroke: var(--m-c); stroke-width: 1; }
.medal .face { stroke: var(--m-p); stroke-width: .8; }
.medal .field { stroke: var(--m-c); stroke-width: 1.4; }
.medal .shine { fill: none; stroke: #ffffff; stroke-width: 1.6; stroke-linecap: round; opacity: .5; }
.medal .sym { fill: none; stroke: var(--m-p); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.medal .sym.hi { stroke: var(--m-a); opacity: .75; }
.medal .stars { fill: var(--m-p); }
/* the colour of a count by its tier */
.ach-tx.gold { color: #ffd863; }
.ach-tx.silver { color: #cfd6e0; }
.ach-tx.bronze { color: #e39d61; }
/* the medals of a leaderboard row (of a version, of a cup entry): the three best, each its own medal, the name on hover; "+N" the rest (a link to the section of the fleet page) */
.medal-tally { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.medal-tally .tm { display: inline-flex; line-height: 0; }
.medal-tally .more { padding-left: 2px; font: 700 13px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--paper-2); white-space: nowrap; }
.medal-tally a.more { text-decoration: none; }
.medal-tally a.more:hover, .medal-tally a.more:focus-visible { color: var(--paper); text-decoration: underline; }
/* the section "Achievementi" of a fleet page: a card per medal the version earned; "+N" of a leaderboard row leads here, below the sticky header */
#achievements { scroll-margin-top: calc(var(--header-h) + 16px); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.ach-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 16px 16px; text-align: center; background: var(--surface); border: 1px solid var(--line); }
.ach-card .nm { font: 700 21px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; color: var(--paper); }
.ach-card .ds { font-size: 13px; line-height: 1.3; color: var(--paper-2); }
.ach-card .ct { margin-top: auto; font: 700 12px/1 var(--mono); letter-spacing: .04em; }
@media (max-width: 560px) { .ach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .ach-card { padding: 14px 10px 12px; } .ach-card .nm { font-size: 18px; } }
/* a badge on the match page: an achievement the fleet earned in that match */
.ach-badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px 3px 3px; border: 1px solid var(--line-strong); font: 400 11px/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--paper-2); white-space: nowrap; vertical-align: middle; }
