/*
 * Oran Arşivi panel: "defter" (ledger) identity. Ink navy for structure, paper for the ground, one warm amber accent.
 * One hand-written stylesheet, no framework, no external resource (the CSP is default-src 'self').
 *
 * Tokens: every colour is a variable. Dark theme = :root[data-theme="dark"], or the system preference when the visitor
 * has not chosen (:root:not([data-theme="light"]) inside the media query). Text / background pairs were checked against
 * WCAG AA (4.5:1) with a script; the ratios are listed beside the pairs. Spacing follows a 4 / 8 px grid.
 * Colour never carries a meaning alone: states have words and icons, sites have monograms, strips have heights and hatching.
 */

:root {
  color-scheme: light;

  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --line: #e4e1d8;
  --line-strong: #c9c5b8;
  --text: #1a1f2b;             /* on surface 16.5, on bg 15.0 */
  --muted: #5c6370;            /* on surface 6.1, on bg 5.5, on surface-2 5.7 */
  --ink: #111a2c;              /* sidebar, score board: dark in both themes */
  --ink-2: #1b2842;
  --ink-text: #c9d2e3;         /* on ink 11.4 */
  --accent: #f0a429;           /* a ground, never text; dark text on it 8.9 */
  --on-accent: #1a1205;
  --accent-text: #8a5200;      /* on surface 6.4, on bg 5.8 */
  --link: #1d4f91;             /* on surface 8.1, on bg 7.4 */
  --link-hover: #123663;
  --focus: #1d4f91;
  --btn: #1d4f91;
  --btn-hover: #163f75;
  --on-btn: #ffffff;           /* on btn 8.1 */
  --shadow: 0 1px 2px rgba(17, 26, 44, .05);

  --good-bg: #e1f3e6;  --good-fg: #14532d;  --good-mark: #2e9e5b;   /* text 7.9 */
  --warn-bg: #ffe9c9;  --warn-fg: #7a3b00;  --warn-mark: #d9822b;   /* text 7.2; orange-yellow, hatched or iconed: never the amber alone */
  --bad-bg: #fde6e3;   --bad-fg: #8c1d18;   --bad-mark: #d64545;    /* text 7.6 */
  --off-bg: #e9e8e3;   --off-fg: #4a505c;   --off-mark: #aaa69a;    /* text 6.6 */
  --info-bg: #e3ecf8;  --info-fg: #17407d;                          /* text 8.5 */

  /* Site identities: our own colour + two letters, never the sites' own branding. White text on each: 4.8 to 6.5. */
  --s-nesine: #0b7285;   --s-nesine-on: #ffffff;
  --s-iddaa: #4054c8;    --s-iddaa-on: #ffffff;
  --s-misli: #a3278f;    --s-misli-on: #ffffff;
  --s-oley: #c2410c;     --s-oley-on: #ffffff;
  --s-birebin: #1d68c9;  --s-birebin-on: #ffffff;

  --radius: 10px;
  --radius-sm: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b111b;
  --surface: #121a27;
  --surface-2: #172131;
  --line: #243146;
  --line-strong: #3a4b66;
  --text: #e6ebf3;             /* on surface 14.6, on bg 15.8 */
  --muted: #9aa7b9;            /* on surface 7.2, on bg 7.8, on surface-2 6.6 */
  --ink: #0a0f18;
  --ink-2: #131c2d;
  --ink-text: #c9d2e3;
  --accent: #f5b041;           /* on surface 9.3 */
  --on-accent: #1a1205;
  --accent-text: #f5b041;
  --link: #8ab8ff;             /* on surface 8.6, on bg 9.4 */
  --link-hover: #b5d3ff;
  --focus: #8ab8ff;
  --btn: #8ab8ff;
  --btn-hover: #b5d3ff;
  --on-btn: #0a1220;           /* on btn 9.5 */
  --shadow: none;

  --good-bg: #12301f;  --good-fg: #8fe0aa;  --good-mark: #46c27c;   /* 9.1 */
  --warn-bg: #3b2608;  --warn-fg: #ffc27a;  --warn-mark: #f0a23e;   /* 9.0 */
  --bad-bg: #3d1714;   --bad-fg: #ffa9a1;   --bad-mark: #ff7b72;    /* 8.6 */
  --off-bg: #222b3a;   --off-fg: #b4bfce;   --off-mark: #55627a;    /* 7.7 */
  --info-bg: #14294a;  --info-fg: #9cc4f7;                          /* 8.1 */

  --s-nesine: #3bc9db;   --s-nesine-on: #032a31;
  --s-iddaa: #9bb0ff;    --s-iddaa-on: #0d1440;
  --s-misli: #f08ad9;    --s-misli-on: #35082d;
  --s-oley: #ffa564;     --s-oley-on: #3a1500;
  --s-birebin: #74b6ff;  --s-birebin-on: #052446;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b111b;
    --surface: #121a27;
    --surface-2: #172131;
    --line: #243146;
    --line-strong: #3a4b66;
    --text: #e6ebf3;
    --muted: #9aa7b9;
    --ink: #0a0f18;
    --ink-2: #131c2d;
    --ink-text: #c9d2e3;
    --accent: #f5b041;
    --on-accent: #1a1205;
    --accent-text: #f5b041;
    --link: #8ab8ff;
    --link-hover: #b5d3ff;
    --focus: #8ab8ff;
    --btn: #8ab8ff;
    --btn-hover: #b5d3ff;
    --on-btn: #0a1220;
    --shadow: none;

    --good-bg: #12301f;  --good-fg: #8fe0aa;  --good-mark: #46c27c;
    --warn-bg: #3b2608;  --warn-fg: #ffc27a;  --warn-mark: #f0a23e;
    --bad-bg: #3d1714;   --bad-fg: #ffa9a1;   --bad-mark: #ff7b72;
    --off-bg: #222b3a;   --off-fg: #b4bfce;   --off-mark: #55627a;
    --info-bg: #14294a;  --info-fg: #9cc4f7;

    --s-nesine: #3bc9db;   --s-nesine-on: #032a31;
    --s-iddaa: #9bb0ff;    --s-iddaa-on: #0d1440;
    --s-misli: #f08ad9;    --s-misli-on: #35082d;
    --s-oley: #ffa564;     --s-oley-on: #3a1500;
    --s-birebin: #74b6ff;  --s-birebin-on: #052446;
  }
}

.site-nesine { --site: var(--s-nesine); --site-on: var(--s-nesine-on); }
.site-iddaa { --site: var(--s-iddaa); --site-on: var(--s-iddaa-on); }
.site-misli { --site: var(--s-misli); --site-on: var(--s-misli-on); }
.site-oley { --site: var(--s-oley); --site-on: var(--s-oley-on); }
.site-birebin { --site: var(--s-birebin); --site-on: var(--s-birebin-on); }

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font: 15px/1.55 var(--font); color: var(--text); background: var(--bg);
  font-variant-numeric: tabular-nums;
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0; font-weight: 750; letter-spacing: -.015em; }
h2 { font-size: 1.0625rem; line-height: 1.4; margin: 0 0 12px; font-weight: 700; letter-spacing: -.005em; }
h3 { font-size: .9375rem; line-height: 1.4; margin: 0; font-weight: 700; }
h4 { font-size: .9375rem; margin: 16px 0 4px; }
p { margin: 0 0 12px; }
ul { margin: 0; padding-left: 20px; }
.muted { color: var(--muted); }
.small { font-size: .8125rem; color: var(--muted); }
.num { text-align: right; }
.wrap { white-space: normal; min-width: 12rem; }
.mono { font-family: var(--mono); font-size: .875em; }
.tech-text { overflow-wrap: anywhere; }
.skip { position: absolute; left: 8px; top: -100px; z-index: 60; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: var(--radius-sm); font-weight: 700; }
.skip:focus { top: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.js-only { display: none; }
.js .js-only { display: flex; }

.ico { width: 1.125em; height: 1.125em; flex: none; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- app shell */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.app-bare { display: block; background: linear-gradient(to bottom, var(--ink) 0, var(--ink) 168px, var(--bg) 168px); }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30;
  display: flex; flex-direction: column; gap: 24px; padding: 20px 12px 16px;
  background: var(--ink); color: var(--ink-text);
}
.sidebar a { color: inherit; text-decoration: none; }
.sidebar :focus-visible { outline-color: var(--accent); }

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.mark-bg { fill: #1b2842; stroke: rgba(255, 255, 255, .14); stroke-width: 1; }
.app-bare .mark-bg { fill: #1b2842; }
.mark-bars { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; fill: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 1.0625rem; letter-spacing: -.01em; }
.brand-text small { font-size: .6875rem; color: var(--ink-text); opacity: .75; }

.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a, .side-user, .side-btn {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
  color: var(--ink-text); font-weight: 560; font-size: .9375rem; transition: background-color .15s, color .15s;
}
.side-nav a:hover, .side-user:hover, .side-btn:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-nav a[aria-current="page"] { background: rgba(255, 255, 255, .09); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.side-nav .ico, .side-foot .ico { width: 20px; height: 20px; }
.nav-count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 800; line-height: 20px; text-align: center; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .1); }
.side-btn { width: 100%; margin: 0; justify-content: flex-start; background: transparent; border: 0; font: inherit; font-weight: 560; font-size: .9375rem; cursor: pointer; text-align: left; }
.side-foot form { margin: 0; }
.side-user .nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-version { padding: 8px 12px 0; font-size: .6875rem; color: var(--ink-text); opacity: .6; }

.theme-toggle { display: none; }
.js .theme-toggle { display: flex; }
.theme-toggle .ico-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: none; }
}

.content { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.topbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding: 28px 32px 8px; }
.topbar-title { min-width: 0; flex: 1 1 320px; }
.topbar-title .lead { margin: 4px 0 0; color: var(--muted); max-width: 72ch; }
.searchbar { position: relative; display: flex; align-items: center; gap: 8px; margin: 8px 32px 0; }
.searchbar input:not([type=checkbox]):not([type=hidden]) { flex: 1; min-width: 0; padding: 12px 14px 12px 44px; font-size: 1rem; }
.searchbar .ico { position: absolute; left: 14px; color: var(--muted); pointer-events: none; width: 20px; height: 20px; }
.searchbar button { padding: 12px 22px; }

.page { flex: 1; width: 100%; padding: 16px 32px 40px; }
.app-bare .page { margin: 0 auto; max-width: 560px; }
.bare-top { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 20px 32px; max-width: 1240px; margin: 0 auto; }
.bare-top .side-btn { width: auto; color: var(--ink-text); }
.site-footer { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 16px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }
.app-bare .site-footer { justify-content: center; border-top: 0; }

.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; font-size: .8125rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 8px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current="page"] { color: var(--text); font-weight: 650; }
.back { margin: 0 0 12px; font-size: .875rem; }

/* ---------------------------------------------------------------- panels, sections */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; box-shadow: var(--shadow); }
.panel > h2:first-child { margin-top: 0; }
.panel-head, .section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; }
.panel-head h2, .section-head h2 { margin: 0; }
.section-head { margin: 24px 0 12px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush > .panel-head { padding: 16px 20px 0; }
.panel.flush > p { padding: 0 20px; }
.empty { padding: 24px; text-align: center; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius); margin: 0 0 16px; }
.empty-inline, .calm { display: flex; align-items: center; gap: 8px; color: var(--good-fg); font-weight: 600; margin: 0 0 16px; }
.calm { padding: 12px 16px; background: var(--good-bg); border-radius: var(--radius); }
.link-strong { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; text-decoration: none; }
.link-strong:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- verdict, numbers */
.verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 20px 24px; margin: 0 0 16px; border: 1px solid; border-left-width: 6px; border-radius: var(--radius); }
.verdict-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 999px; background: rgba(255, 255, 255, .55); }
:root[data-theme="dark"] .verdict-icon { background: rgba(255, 255, 255, .08); }
.verdict-icon .ico { width: 26px; height: 26px; stroke-width: 2.5; }
.verdict-label { margin: 0; font-size: .8125rem; font-weight: 700; letter-spacing: .02em; opacity: .9; }
.verdict-text { margin: 0; font-size: 1.375rem; line-height: 1.3; font-weight: 750; letter-spacing: -.01em; }
.verdict-note { margin: 0 0 0 auto; padding: 4px 12px; border-radius: 999px; background: var(--off-bg); color: var(--off-fg); font-size: .8125rem; font-weight: 600; }
.v-good { background: var(--good-bg); color: var(--good-fg); border-color: var(--good-mark); }
.v-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-mark); }
.v-bad { background: var(--bad-bg); color: var(--bad-fg); border-color: var(--bad-mark); }

.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.number { position: relative; padding: 16px 16px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.number::before { content: ""; position: absolute; left: 16px; top: 0; width: 32px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.number-value { font-size: 1.875rem; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.number-value .of { font-size: 1.125rem; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.number-label { margin-top: 2px; font-size: .875rem; font-weight: 650; }
.number-note { font-size: .75rem; color: var(--muted); }

/* ---------------------------------------------------------------- alert cards */
.alert-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 0 0 16px; }
.alert-card { padding: 16px 20px; background: var(--bad-bg); color: var(--bad-fg); border: 1px solid var(--bad-mark); border-left-width: 6px; border-radius: var(--radius); }
.alert-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.alert-card .small { color: inherit; opacity: .9; }
.alert-card h2 { margin: 0 0 4px; font-size: 1.0625rem; }
.alert-card p { margin: 0 0 4px; }
.more-link { align-self: center; font-weight: 650; display: inline-flex; gap: 6px; align-items: center; }

/* ---------------------------------------------------------------- badges and site marks */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .8125rem; line-height: 1.5; font-weight: 600; white-space: nowrap; background: var(--off-bg); color: var(--off-fg); border: 1px solid transparent; }
.badge strong { font-weight: 650; }
.badge .ico { width: 14px; height: 14px; }
.badge.state-good { background: var(--good-bg); color: var(--good-fg); border-color: color-mix(in srgb, var(--good-mark) 45%, transparent); }
.badge.state-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-mark); }
.badge.state-bad { background: var(--bad-bg); color: var(--bad-fg); border-color: color-mix(in srgb, var(--bad-mark) 55%, transparent); }
.badge.state-off { background: var(--off-bg); color: var(--off-fg); }
.badge.badge-info { background: var(--info-bg); color: var(--info-fg); }

.site-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; white-space: nowrap; }
.mono-tag { display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 5px; border-radius: 6px; background: var(--site); color: var(--site-on); font-size: .6875rem; font-weight: 800; letter-spacing: .03em; font-style: normal; }
.site-chip.is-dim { opacity: .75; }
.site-chip.is-dim .mono-tag { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
a .site-chip { color: inherit; }

/* ---------------------------------------------------------------- site cards and strips */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.site-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px 12px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--site); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.site-card.is-closed { background: var(--surface-2); border-top-color: var(--line-strong); }
.site-card.is-closed .site-title { opacity: .7; }
.site-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.site-title { font-size: 1.125rem; }
.site-title .mono-tag { height: 26px; min-width: 34px; font-size: .75rem; }
.site-card .last-poll { margin: 0; color: var(--muted); }
.site-card .last-poll strong { color: var(--text); font-size: 1.0625rem; }
.site-card .why { margin: 0; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-fg); font-size: .8125rem; font-weight: 600; }
.site-card.state-bad .why { background: var(--bad-bg); color: var(--bad-fg); }
.closed-line { margin: 4px 0 0; font-size: 1rem; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: .875rem; color: var(--muted); }
.facts b { color: var(--text); font-size: 1rem; font-weight: 750; }
.site-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }

.strip { display: grid; grid-template-columns: repeat(48, minmax(0, 1fr)); gap: 2px; height: 36px; align-items: end; margin-top: 4px; }
.slice { display: block; height: 100%; border-radius: 2px; }
.slice-ok { background: var(--good-mark); }
.slice-part { height: 72%; background: repeating-linear-gradient(135deg, var(--warn-mark) 0 3px, color-mix(in srgb, var(--warn-mark) 35%, var(--surface)) 3px 5px); }
.slice-none { background: var(--bad-mark); }
.slice-notice { height: 46%; background: var(--warn-mark); }
.slice-empty { height: 18%; background: var(--line-strong); }
.strip-axis { display: flex; justify-content: space-between; font-size: .6875rem; color: var(--muted); margin-top: -2px; }
.strip-note { margin: 0; font-size: .8125rem; color: var(--muted); }

details.tech { margin-top: 4px; border-top: 1px dashed var(--line); padding-top: 6px; font-size: .8125rem; color: var(--muted); }
details.tech summary { cursor: pointer; font-weight: 600; width: fit-content; }
details.tech ul { margin: 6px 0 4px; padding-left: 18px; }
details.tech p { margin: 6px 0 0; }
td details.tech { border: 0; padding: 0; margin: 0; }

/* ---------------------------------------------------------------- coverage matrix */
.matrix-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.matrix { width: 100%; border-collapse: collapse; }
.matrix th, .matrix td { padding: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: normal; }
.matrix thead th { padding: 12px 16px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line-strong); font-weight: 650; border-top: 3px solid var(--site, transparent); }
.matrix thead th:first-child { border-top-color: transparent; color: var(--muted); font-size: .8125rem; }
.matrix tbody th, .matrix tfoot th { padding: 10px 16px; font-weight: 650; }
.matrix .counter { display: block; margin-top: 2px; font-size: .75rem; font-weight: 500; color: var(--muted); }
.matrix tbody tr:hover { background: var(--surface-2); }
.matrix tfoot th, .matrix tfoot td { border-top: 2px solid var(--line-strong); border-bottom: 0; background: var(--surface-2); }
.mx-cell { display: block; padding: 10px 16px; color: var(--text); text-decoration: none; }
.mx-cell:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.mx-main { display: block; font-size: 1.1875rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.mx-sub { display: block; font-size: .75rem; color: var(--muted); }
.diff { display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-fg); font-size: .75rem; font-weight: 700; line-height: 1.5; vertical-align: .15em; }
.matrix-note { margin-top: 8px; }
.matrix-cards { display: none; }
.mx-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--site); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; }
.mx-card header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; }
.mx-total { color: var(--muted); text-decoration: none; font-size: .8125rem; }
.mx-total b { color: var(--text); }
.mx-card ul { list-style: none; margin: 0; padding: 0; }
.mx-card li a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.mx-card li small { color: var(--muted); margin-left: 8px; }

/* ---------------------------------------------------------------- chips, pills, filters */
.seg { display: inline-flex; padding: 3px; margin: 0 0 12px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px; max-width: 100%; }
.seg a { padding: 6px 18px; border-radius: 999px; color: var(--muted); font-weight: 650; font-size: .875rem; text-decoration: none; }
.seg a:hover { color: var(--text); }
.seg a.is-on { background: var(--ink); color: #fff; box-shadow: inset 0 -3px 0 var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chip, .pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 600; font-size: .875rem; text-decoration: none; transition: background-color .15s, border-color .15s; }
.chip small, .pill small { color: var(--muted); font-weight: 500; }
.chip:hover, .pill:hover { background: var(--surface-2); border-color: var(--muted); color: var(--text); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: inset 0 -3px 0 var(--accent); }
.chip.is-on small { color: var(--ink-text); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.pill { padding: 6px 14px 6px 8px; }
.pill.is-on { background: var(--site); border-color: var(--site); color: var(--site-on); }
.pill.is-on small { color: inherit; opacity: .85; }
.pill.is-on .mono-tag { background: var(--site-on); color: var(--site); }

.filter-bar .field.big-search { flex: 1 1 100%; position: relative; margin: 0; }
.filter-bar .field.big-search .ico { position: absolute; left: 14px; bottom: 13px; color: var(--muted); width: 20px; height: 20px; pointer-events: none; }
.filter-bar .field.big-search input:not([type=checkbox]):not([type=hidden]) { padding: 12px 14px 12px 44px; font-size: 1.0625rem; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; padding: 16px 20px; margin: 0 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.filter-bar .field { margin: 0; flex: 0 1 170px; }
.filter-bar .field.grow { flex: 1 1 200px; }
.filter-actions { display: flex; gap: 8px; }

/* ---------------------------------------------------------------- match list */
.match-table td { vertical-align: middle; }
.match-table tbody tr { position: relative; }
.match-table tr.is-past { opacity: .72; }
.match-table .when { min-width: 9rem; }
.match-table .when strong, .match-table .what strong { display: block; font-weight: 700; }
.match-table small { display: block; color: var(--muted); font-size: .75rem; }
.match-table .what { white-space: normal; min-width: 14rem; }
.match-table .what a { color: var(--text); text-decoration: none; }
.match-table .what a::after { content: ""; position: absolute; inset: 0; }
.match-table .what a:focus-visible { outline: none; }
.match-table tbody tr:focus-within { outline: 3px solid var(--focus); outline-offset: -3px; }
.match-table tbody tr:hover .what strong { color: var(--link); text-decoration: underline; }
.match-table .sites { white-space: nowrap; }
.match-table .sites .site-chip { margin-right: 4px; }

/* ---------------------------------------------------------------- match page: score board */
.board { position: relative; margin: 0 0 16px; padding: 20px 28px 16px; background: var(--ink); color: var(--ink-text); border-radius: var(--radius); overflow: hidden; }
.board::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--accent); }
.board-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .875rem; font-weight: 600; letter-spacing: .01em; }
.board-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px 24px; padding: 20px 0 16px; }
.board-teams.single { grid-template-columns: 1fr; text-align: center; }
.team { font-size: 1.75rem; line-height: 1.2; font-weight: 800; color: #fff; letter-spacing: -.015em; overflow-wrap: anywhere; }
.team.home { text-align: right; }
.board-teams.single .team.home { text-align: center; }
.score-box { text-align: center; min-width: 7rem; }
.score { font-size: 3rem; line-height: 1; font-weight: 800; color: var(--accent); letter-spacing: .02em; }
.score-none { font-size: 1.125rem; font-weight: 700; color: #fff; }
.score-parts { margin-top: 6px; font-size: .8125rem; color: var(--ink-text); }
.board-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .875rem; }
.board-foot strong { color: #fff; }
.board-sites { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-left: auto; }
.board .site-chip { color: #fff; }
.notice { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 12px 16px; border-radius: var(--radius-sm); }
.notice ul { margin: 4px 0 0; }
.notice-bad { background: var(--bad-bg); color: var(--bad-fg); border-left: 4px solid var(--bad-mark); }
.board details.help { margin-top: 10px; font-size: .8125rem; }
.board details.help summary { cursor: pointer; font-weight: 600; width: fit-content; }
.board details.help p { margin: 6px 0 0; max-width: 80ch; }

/* ---------------------------------------------------------------- markets */
.market-tools { align-items: flex-end; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 12px; }
.market-tools .field { margin: 0; flex: 0 1 320px; }
.market-tools .check { margin: 0 0 8px; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 12px; margin: 0 0 16px; align-items: start; }
.market { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; box-shadow: var(--shadow); min-width: 0; }
.market[hidden] { display: none; }
.market-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.market-meta { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 2px 0 10px; font-size: .75rem; color: var(--muted); }
.odd-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.odd-chip { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 8px; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .15s, background-color .15s; }
.odd-chip:hover { border-color: var(--muted); background: var(--surface); color: var(--text); }
.oc-name { font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }
.oc-odd { font-size: 1.125rem; font-weight: 800; text-align: right; letter-spacing: -.01em; }
.oc-odd.boosted { color: var(--accent-text); }
.oc-verdict { display: none; }
.oc-meta, .oc-changes { grid-column: 1 / -1; font-size: .6875rem; color: var(--muted); line-height: 1.4; }
.oc-changes::before { content: "● "; color: var(--accent); font-size: .5rem; vertical-align: .15em; }
.odd-chip.won { background: var(--good-bg); border-color: var(--good-mark); color: var(--good-fg); }
.odd-chip.won .oc-meta, .odd-chip.won .oc-changes { color: inherit; opacity: .85; }
.odd-chip.won .oc-name { font-weight: 750; }
.odd-chip.lost { opacity: .72; }
.odd-chip.lost .oc-odd { text-decoration: line-through; text-decoration-thickness: 1.5px; font-weight: 650; }
.odd-chip.void { background: var(--warn-bg); border-color: var(--warn-mark); color: var(--warn-fg); }
.odd-chip.void .oc-meta, .odd-chip.void .oc-changes { color: inherit; opacity: .85; }
.odd-chip.unknown { border-style: dashed; border-color: var(--muted); }
.odd-chip.won, .odd-chip.lost, .odd-chip.void, .odd-chip.unknown { grid-template-columns: minmax(0, 1fr) auto auto; }
.odd-chip.won .oc-verdict, .odd-chip.lost .oc-verdict, .odd-chip.void .oc-verdict, .odd-chip.unknown .oc-verdict { display: inline-flex; }
.odd-chip.is-off { opacity: .6; background: transparent; }
.odd-chip.is-off .oc-odd { font-size: .8125rem; font-weight: 600; color: var(--muted); font-style: italic; }

details.fold { margin: 0 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.fold > summary { cursor: pointer; padding: 12px 20px; font-weight: 700; }
details.fold[open] > summary { border-bottom: 1px solid var(--line); }
details.fold > :not(summary) { margin-left: 20px; margin-right: 20px; }
details.fold > .table-wrap { margin: 0; }
details.fold > :last-child { margin-bottom: 16px; }
details.fold > .empty { margin-top: 16px; }

/* ---------------------------------------------------------------- selection page */
.sel-head { margin: 0 0 16px; }
.sel-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0 0; color: var(--muted); }
.numbers-4 .number-note { overflow-wrap: anywhere; }
.chart-panel { padding: 16px 20px 12px; }
.odds-chart { display: block; width: 100%; height: auto; }
.chart-narrow { display: none; }
@media (max-width: 760px) { .chart-wide { display: none; } .chart-narrow { display: block; } }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-label { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart-line { fill: none; stroke: var(--site); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--surface); stroke: var(--site); stroke-width: 2; }
.chart-dot:hover { fill: var(--site); }
.chart-gap { fill: var(--off-mark); fill-opacity: .25; stroke: var(--off-mark); stroke-dasharray: 3 3; }
.chart-start { stroke: var(--accent-text); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart-note { margin: 4px 0 0; }
.other-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.other-chip { display: flex; flex-direction: column; gap: 2px; min-width: 150px; padding: 8px 14px; border: 1px solid var(--line); border-top: 3px solid var(--site); border-radius: var(--radius); background: var(--surface-2); color: var(--text); text-decoration: none; }
.other-chip:hover { background: var(--surface); border-color: var(--muted); border-top-color: var(--site); }
.other-chip.is-on { background: var(--surface); box-shadow: 0 0 0 2px var(--site); }
.other-chip .oc-odd { text-align: left; font-size: 1.25rem; }
.other-chip small { color: var(--muted); }
.other-chip.is-off .oc-odd { font-size: .875rem; font-style: italic; color: var(--muted); }
.odds-cell { font-weight: 750; }

/* ---------------------------------------------------------------- days */
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 12px; padding: 0; list-style: none; font-size: .8125rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.heat-wrap { overflow-x: auto; }
.heat { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.heat th, .heat td { padding: 0; text-align: center; font-weight: 500; }
.heat thead th { color: var(--muted); font-size: .6875rem; line-height: 1.1; padding-bottom: 2px; }
.heat thead td, .heat tbody th { width: 128px; text-align: left; }
.heat .hd-num { display: block; }
.heat .hd-month { display: block; font-size: .5625rem; opacity: .8; }
.hm { display: grid; place-items: center; height: 32px; border-radius: 6px; font-size: .8125rem; font-weight: 800; text-decoration: none; border: 1px solid transparent; }
.legend .hm { display: inline-grid; width: 28px; height: 22px; }
a.hm:hover { border-color: var(--text); }
.hm-full { background: var(--good-bg); color: var(--good-fg); border-color: color-mix(in srgb, var(--good-mark) 55%, transparent); }
.hm-partial { background: repeating-linear-gradient(135deg, var(--bad-bg) 0 4px, color-mix(in srgb, var(--bad-mark) 38%, var(--bad-bg)) 4px 8px); color: var(--bad-fg); border-color: var(--bad-mark); }
.hm-closed { background: var(--surface-2); color: var(--muted); border: 1px dotted var(--line-strong); }
.hm-none { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); font-weight: 500; }
.missing-list { list-style: none; margin: 0; padding: 0; }
.missing-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.missing-list li:first-child { border-top: 0; }
.miss-day { font-weight: 700; font-variant-numeric: tabular-nums; }
.miss-why { color: var(--muted); }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 8px; }
.report-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.report-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.report-day { font-weight: 800; font-size: 1.0625rem; }
.report-verdict { margin: 0; font-weight: 700; }
.report-verdict.big { font-size: 1.25rem; margin-bottom: 12px; }
pre.report { margin: 0; white-space: pre-wrap; word-break: break-word; font: .875rem/1.5 var(--mono); }
.poll-head { display: flex; align-items: center; gap: 16px; margin: 0 0 12px; font-size: 1.125rem; }
.poll-head .mono-tag { height: 28px; min-width: 36px; font-size: .8125rem; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
.panel.flush .table-wrap { border-top: 1px solid var(--line); margin-top: 12px; }
.panel.flush > .table-wrap:first-child { border-top: 0; margin-top: 0; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
thead th { background: var(--surface-2); color: var(--muted); font-size: .8125rem; font-weight: 650; border-bottom: 1px solid var(--line-strong); }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; }
tbody tr { transition: background-color .12s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child > td { border-bottom: 0; }
tr.selected td { background: color-mix(in srgb, var(--accent) 14%, transparent); }
th.num, td.num { text-align: right; }
.table-note { margin: 8px 0 0; padding: 0 20px 12px; font-size: .8125rem; color: var(--muted); }

.sort-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: inherit; color: inherit; width: 100%; }
th.num .sort-btn { justify-content: flex-end; }
.sort-btn:hover { color: var(--text); }
.sort-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sort-ind { display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; opacity: .35; border-top: 5px solid currentColor; }
th[aria-sort="ascending"] .sort-ind { border-top: 0; border-bottom: 5px solid currentColor; opacity: 1; }
th[aria-sort="descending"] .sort-ind { opacity: 1; }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--accent-text); }

/* ---------------------------------------------------------------- forms and buttons */
label { display: block; margin: 0 0 4px; font-weight: 650; font-size: .8125rem; color: var(--muted); }
.field { margin-bottom: 16px; }
input:not([type=checkbox]):not([type=hidden]), select {
  width: 100%; padding: 9px 12px; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .15s;
}
input::placeholder { color: var(--muted); opacity: 1; }
input:not([type=checkbox]):not([type=hidden]):hover, select:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--btn); vertical-align: -.2em; margin-right: 8px; }
label.check { font-weight: 550; color: var(--text); display: flex; align-items: center; font-size: .875rem; }

.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 9px 16px; font: inherit; font-weight: 650; line-height: 1.3; color: var(--on-btn); background: var(--btn); border: 1px solid var(--btn); border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s; }
.btn:hover, button:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--on-btn); }
.btn-secondary, button.secondary { color: var(--text); background: var(--surface); border-color: var(--line-strong); }
.btn-secondary:hover, button.secondary:hover { background: var(--surface-2); border-color: var(--muted); color: var(--text); }
.btn-sm, .actions button { padding: 5px 12px; font-size: .8125rem; }
button.danger { color: #fff; background: #a3241d; border-color: #a3241d; }
button.danger:hover { background: #861c16; border-color: #861c16; color: #fff; }
:root[data-theme="dark"] button.danger { color: #1a0907; background: #ff9b92; border-color: #ff9b92; }
:root[data-theme="dark"] button.danger:hover { background: #ffb8b1; border-color: #ffb8b1; color: #1a0907; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) button.danger { color: #1a0907; background: #ff9b92; border-color: #ff9b92; }
  :root:not([data-theme="light"]) button.danger:hover { background: #ffb8b1; border-color: #ffb8b1; color: #1a0907; }
}
.sidebar button.side-btn, .bare-top button.side-btn { background: transparent; border: 0; padding: 10px 12px; color: var(--ink-text); }
.sidebar button.side-btn:hover, .bare-top button.side-btn:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; white-space: normal; min-width: 18rem; }
.actions form { display: flex; gap: 8px; align-items: center; margin: 0; }
.actions input { width: 11rem; padding: 5px 8px; font-size: .8125rem; }

.alert { display: block; padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 16px; border: 1px solid transparent; }
.alert.error { background: var(--bad-bg); color: var(--bad-fg); border-color: var(--bad-mark); }
.alert.ok { background: var(--good-bg); color: var(--good-fg); border-color: var(--good-mark); }
.alert.info { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-fg); }

.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 16px 0; flex-wrap: wrap; }
.pager-page { color: var(--muted); font-size: .875rem; font-weight: 600; }

/* ---------------------------------------------------------------- sign-in, errors */
.auth-shell { display: grid; place-items: start center; padding: 40px 0 24px; }
.panel.form-card { max-width: 32rem; }
.panel.narrow { width: 100%; max-width: 26rem; margin-left: auto; margin-right: auto; }
.login-card { padding: 28px; box-shadow: 0 8px 28px rgba(17, 26, 44, .14); }
.auth-brand { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.auth-brand .brand-mark { width: 44px; height: 44px; }
.auth-brand h1 { font-size: 1.375rem; }
.auth-brand p { margin: 4px 0 0; color: var(--muted); font-size: .875rem; }
.panel.narrow button[type=submit] { width: 100%; padding: 11px 16px; }
.login-foot { margin: 16px 0 0; text-align: center; }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1100px) {
  .app { grid-template-columns: 64px minmax(0, 1fr); }
  .sidebar { padding: 16px 8px; align-items: center; }
  .brand { padding: 0; }
  .brand-text, .nav-label, .side-version { display: none; }
  .side-nav a, .side-user, .side-btn { justify-content: center; padding: 11px; }
  .side-nav { align-items: stretch; }
  .nav-count { position: absolute; top: 2px; right: 0; min-width: 18px; padding: 0 5px; font-size: .6875rem; line-height: 16px; }
  .side-foot { align-items: stretch; width: 100%; }
  .topbar { padding: 24px 20px 8px; }
  .searchbar { margin: 8px 20px 0; }
  .page { padding: 16px 20px 32px; }
  .site-footer { padding: 16px 20px; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .app { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 12px 0; }
  .brand-text { display: flex; }
  .brand-text small { display: none; }
  .brand-mark { width: 30px; height: 30px; }
  .side-nav { order: 3; flex: 1 0 100%; flex-direction: row; gap: 4px; overflow-x: auto; margin: 0 -12px; padding: 0 12px 8px; scrollbar-width: none; }
  /* The row scrolls by touch; a scrollbar under five links is only noise. */
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a { flex: none; padding: 8px 12px; }
  .side-nav .nav-label { display: inline; }
  .side-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }
  .nav-count { position: static; margin-left: 4px; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; width: auto; padding: 0; border: 0; gap: 0; }
  .side-foot .side-btn, .side-foot .side-user { padding: 8px; width: auto; }
  .side-foot .nav-label { display: none; }
  .topbar { padding: 16px 12px 4px; gap: 12px; }
  .searchbar { margin: 8px 12px 0; }
  h1 { font-size: 1.3rem; }
  .page { padding: 12px 12px 28px; }
  .site-footer { padding: 12px; flex-direction: column; }
  .bare-top { padding: 16px 12px; }
  .app-bare .page { padding-top: 0; }
  .panel { padding: 16px; }
  .panel.flush { padding: 0; }
  .numbers { gap: 8px; }
  .number-value { font-size: 1.5rem; }
  .verdict { padding: 16px; }
  .verdict-text { font-size: 1.125rem; }
  .verdict-note { margin-left: 0; }
  .matrix-wrap { display: none; }
  .matrix-cards { display: block; }
  .filter-bar { padding: 12px; }
  .filter-bar { gap: 8px 12px; }
  .filter-bar .field { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .filter-bar .field.grow { flex: 1 1 100%; }
  .board { padding: 16px 16px 12px 20px; }
  .board-teams { grid-template-columns: 1fr; text-align: center; gap: 8px; padding: 12px 0; }
  .team { font-size: 1.375rem; }
  .team.home { text-align: center; }
  .score { font-size: 2.5rem; }
  .board-sites { margin-left: 0; }
  .market-grid { gap: 8px; }
  .odd-chips { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .match-table thead { display: none; }
  .match-table, .match-table tbody { display: block; }
  .match-table tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .match-table td { display: block; padding: 0; border: 0; }
  .match-table .what { grid-column: 1 / -1; grid-row: 1; min-width: 0; }
  .match-table .when { grid-row: 2; min-width: 0; }
  .match-table .when small { display: inline; margin-left: 6px; }
  .match-table .sport { display: none; }
  .match-table .sites { grid-row: 2; grid-column: 2; text-align: right; }
  .match-table .sites .site-chip { margin: 0 0 0 2px; }
  .heat thead td, .heat tbody th { width: 40px; }
  .heat .site-chip .chip-text { display: none; }
  .heat { border-spacing: 2px; }
  .heat-wrap { overflow-x: hidden; }
  .hm { height: 28px; font-size: 0; }
  .heat thead th .hd-num { visibility: hidden; }
  .heat thead th:nth-child(5n+1) .hd-num { visibility: visible; }
  .heat .hd-month { display: none; }
  .legend .hm { font-size: .75rem; }
  .other-chip { flex: 1 1 140px; }
}

@media (max-width: 420px) {
  .numbers { grid-template-columns: 1fr 1fr; }
  .number { padding: 14px 12px 12px; }
  .number-value { font-size: 1.375rem; }
  .strip { gap: 1px; }
}

/* ---------------------------------------------------------------- all-sites comparison on the match page */
/* Equal rows, equal columns, the same plain number in every site's cell; only a price that differs is loud. */
.pill-all { padding: 6px 14px; }
.pill-all.is-on { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: inset 0 -3px 0 var(--accent); }
.pill-all.is-on small { color: var(--ink-text); opacity: 1; }
.cmp-summary { margin: 0 0 4px; font-size: 1rem; }
.cmp-diff-count { color: var(--accent-text); }
.cmp-legend { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 0 0 12px; }
.cmp-key { white-space: nowrap; }
.cmp-grid { columns: 460px; column-gap: 16px; margin: 0 0 16px; }
.market.cmp { break-inside: avoid; margin: 0 0 12px; padding: 10px 14px 6px; max-width: 540px; }
.market.cmp .market-head { align-items: center; flex-wrap: nowrap; }
.market.cmp h3 { min-width: 0; overflow-wrap: anywhere; }
.cmp-tag { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.cmp-tag.is-diff { padding: 1px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-mark); font-size: .8125rem; font-weight: 700; }
.cmp-tag .ico { width: 14px; height: 14px; }
.cmp-state { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 2px 0 4px; }
.cmp-site-state { display: inline-flex; align-items: center; gap: 4px; }
.cmp-site-state .mono-tag, .cmp-table .mono-tag { height: 22px; min-width: 26px; }
.cmp-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-variant-numeric: tabular-nums; }
.cmp-table th, .cmp-table td { height: 38px; padding: 0 2px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; vertical-align: middle; font-weight: 500; }
.cmp-table thead th { height: 34px; border-bottom: 1px solid var(--line-strong); }
.cmp-table tbody tr:last-child > th, .cmp-table tbody tr:last-child > td { border-bottom: 0; }
.cmp-table th.cmp-name { text-align: left; font-size: .875rem; font-weight: 600; padding: 6px 8px 6px 0; white-space: normal; overflow-wrap: break-word; word-break: normal; line-height: 1.25; }
/* Narrow site columns leave the selection name room: long names (players, combined picks) wrap by word, not by letter. */
.cmp-table th.cmp-site { width: 60px; }
.cmp-table .oc-verdict { display: inline-flex; vertical-align: -.15em; margin-left: 4px; }
.cmp-table .cv-won { color: var(--good-fg); }
.cmp-table .cv-lost { color: var(--muted); }
.cmp-row:hover { background: var(--surface-2); }
.cmp-odd { display: inline-flex; align-items: baseline; justify-content: center; gap: 3px; min-width: 3.25rem; padding: 3px 6px; border: 1.5px solid transparent; border-radius: 8px; color: var(--text); text-decoration: none; white-space: nowrap; }
.cmp-odd:hover { border-color: var(--muted); }
.co-value { font-size: .9375rem; font-weight: 500; }
.cmp-row:not(.differs) .co-value { color: var(--muted); }
.cmp-row.differs th.cmp-name { font-weight: 750; }
.cmp-odd.diff-up, .cmp-odd.diff-down { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.cmp-odd.diff-up .co-value, .cmp-odd.diff-down .co-value { font-weight: 800; }
.co-dir { font-size: .6875rem; color: var(--accent-text); font-weight: 800; }
.co-boost { display: inline-flex; align-items: baseline; gap: 1px; padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-text); font-size: .6875rem; font-weight: 700; line-height: 1.3; }
/* A site's promotional price hangs to the right of its standard price, outside the price's own box: the standard price
   stays on the column's axis, so every site's numbers line up. The column is wider to give the tag room. */
.cmp-table th.cmp-site.has-boost { width: 148px; }
.cmp-odd.has-boost { position: relative; }
.cmp-odd.has-boost > .co-boost { position: absolute; left: calc(100% + 2px); top: 50%; transform: translateY(-50%); padding: 0 3px; }
.cmp-na { color: var(--muted); opacity: .7; text-decoration: none; }
.cmp-none { font-size: .75rem; font-style: italic; }
.cmp-removed s { color: var(--muted); }

@media (max-width: 560px) {
  /* Five site columns do not fit beside the selection name: the name takes its own line and the prices run below it. */
  .cmp-grid { columns: auto; }
  .cmp-table, .cmp-table thead, .cmp-table tbody { display: block; }
  .cmp-table tr { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cmp-table.cols-2 tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmp-table.cols-3 tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cmp-table.cols-4 tr { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cmp-table.cols-6 tr { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cmp-table thead th.cmp-name { display: none; }
  .cmp-table th.cmp-site { width: auto; }
  .cmp-table tbody th.cmp-name { grid-column: 1 / -1; height: auto; padding: 6px 0 0; border-bottom: 0; }
  .cmp-table tbody tr { border-bottom: 1px solid var(--line); }
  .cmp-table td { height: 34px; border-bottom: 0; }
  .cmp-odd { min-width: 0; padding: 2px 3px; gap: 2px; }
  .co-boost-val { display: none; } /* the arrow stays, the value is in its title */
  .cmp-table th.cmp-site.has-boost { width: auto; }
  .cmp-odd.has-boost > .co-boost { position: static; transform: none; }
  .market.cmp { padding: 10px 10px 4px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.filter-bar input:not([type=checkbox]):not([type=hidden]):not([type=search]), .filter-bar select { height: 44px; }

/* ==== MCP call log ==== */
.numbers.numbers-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.numbers.numbers-5 .number-note { overflow-wrap: anywhere; }
.mcp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; margin-bottom: 24px; }
.mcp-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px 12px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.mcp-card.is-idle { background: var(--surface-2); border-top-color: var(--line-strong); }
.mcp-card.is-selected { box-shadow: 0 0 0 2px var(--accent); }
.mcp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mcp-card-head h3 { margin: 0; font-size: 1.125rem; overflow-wrap: anywhere; }
.mcp-card-head h3 a { color: var(--text); text-decoration: none; }
.mcp-card-head h3 a:hover { text-decoration: underline; }
.mcp-big { margin: 0; color: var(--muted); }
.mcp-big strong { color: var(--text); font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }
.mcp-facts { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; }
.mcp-facts div { display: flex; flex-direction: column; }
.mcp-facts dt { font-size: .75rem; color: var(--muted); }
.mcp-facts dd { margin: 0; font-weight: 700; }
.mcp-facts dd.has-errors { color: var(--bad-fg); }
.mcp-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mcp-tools li { padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-2); font-size: .8125rem; }
.mcp-tools small { color: var(--muted); font-weight: 700; margin-left: 4px; }
.mcp-strip { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; height: 32px; align-items: end; margin-top: 4px; }
.mcp-slice { display: block; border-radius: 2px; background: var(--line-strong); height: 12%; }
.mcp-slice.lv1 { height: 28%; background: var(--accent); opacity: .55; }
.mcp-slice.lv2 { height: 52%; background: var(--accent); opacity: .7; }
.mcp-slice.lv3 { height: 76%; background: var(--accent); opacity: .85; }
.mcp-slice.lv4 { height: 100%; background: var(--accent); }
.mcp-args-full { overflow-wrap: anywhere; white-space: pre-wrap; }
/* Nine columns: tighter cells so the last one (client address) is visible without scrolling on a laptop screen. */
.mcp-calls th, .mcp-calls td { padding: 8px 8px; font-size: .875rem; }
.mcp-calls td.wrap { max-width: 230px; }
@media (max-width: 720px) {
  .numbers.numbers-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ==== server screen ==== */
.vi { display: none; }
.verdict.v-good .vi-good, .verdict.v-warn .vi-warn, .verdict.v-bad .vi-bad { display: inline-grid; }
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin: 0 0 16px; }
.srv-card { margin: 0; min-width: 0; }
.srv-card .panel-head { margin-bottom: 4px; }
.srv-big { margin: 0 0 8px; font-size: 1.875rem; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.srv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.srv-two .srv-big { font-size: 1.375rem; }
.srv-label { margin: 0; font-size: .8125rem; font-weight: 650; color: var(--muted); }
.srv-line { margin: 6px 0 0; font-weight: 650; }
.srv-card .small { margin: 4px 0 0; }
progress.srv-bar { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 10px; border: 0; border-radius: 999px; background: var(--off-bg); overflow: hidden; }
progress.srv-bar::-webkit-progress-bar { background: var(--off-bg); border-radius: 999px; }
progress.srv-bar::-webkit-progress-value { background: var(--good-mark); border-radius: 999px; }
progress.srv-bar::-moz-progress-bar { background: var(--good-mark); border-radius: 999px; }
progress.srv-bar[data-level="warn"]::-webkit-progress-value { background: var(--warn-mark); }
progress.srv-bar[data-level="warn"]::-moz-progress-bar { background: var(--warn-mark); }
progress.srv-bar[data-level="bad"]::-webkit-progress-value { background: var(--bad-mark); }
progress.srv-bar[data-level="bad"]::-moz-progress-bar { background: var(--bad-mark); }
progress.srv-bar[data-level="info"]::-webkit-progress-value { background: var(--link); }
progress.srv-bar[data-level="info"]::-moz-progress-bar { background: var(--link); }
progress.srv-bar[data-level="off"]::-webkit-progress-value { background: var(--off-mark); }
progress.srv-bar[data-level="off"]::-moz-progress-bar { background: var(--off-mark); }
.spark { display: block; width: 100%; height: 64px; margin: 10px 0 4px; background: var(--surface-2); border-radius: var(--radius-sm); }
.spark polyline { fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark polygon { fill: var(--info-bg); stroke: none; }
.spark .line-a { stroke: var(--link); }
.spark .line-b { stroke: var(--accent-text); stroke-dasharray: 4 2; }
.key::before { content: ""; display: inline-block; width: 18px; height: 0; margin-right: 4px; vertical-align: middle; border-top: 2px solid var(--link); }
.key-b::before { border-top: 2px dashed var(--accent-text); }
.srv-facts { margin: 8px 0 0; display: grid; gap: 4px; }
.srv-facts > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; border-top: 1px solid var(--line); padding-top: 4px; font-size: .875rem; }
.srv-facts dt { color: var(--muted); }
.srv-facts dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.srv-containers { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.srv-containers li { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(5rem, auto) minmax(0, 2fr); align-items: center; gap: 8px 16px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.srv-cmem { display: grid; gap: 4px; min-width: 0; }
.srv-ccpu { font-weight: 650; }
.srv-foot { margin: 0 0 16px; }
.srv-limits { margin-bottom: 16px; }
@media (max-width: 560px) {
  .srv-containers li { grid-template-columns: 1fr auto; }
  .srv-cmem { grid-column: 1 / -1; }
  .srv-big { font-size: 1.5rem; }
}
[hidden].alert, .srv-card [hidden] { display: none !important; }
