/* LUDUX design system — "Signal" theme.
   Hairline rules instead of boxes; warm paper light mode; charcoal dark mode.
   Mobile is a required pass: html uses overflow-x:clip (never hidden). */

:root {
  --paper: #f7f7f4;
  --surface: #fdfdfc;
  --ink: #101214;
  --ink-2: #565b63;
  --ink-3: #8a8f98;
  --hairline: #e4e3dc;
  --hairline-2: #d5d4cc;
  --brand: #c2410c;
  --brand-strong: #9a3412;
  --brand-wash: #fdf0e7;
  --good: #0ca30c;
  --good-text: #006300;
  --critical: #d03b3b;
  --gold: #b8860b;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  /* dataviz categorical slots (validated): chess=blue, connect-four=orange, werewolf=aqua */
  --s-chess: #2a78d6;
  --s-c4: #eb6834;
  --s-ww: #1baf7a;
  /* generic slots 1-4 for agent-series charts (fixed assignment order) */
  --sl-1: #2a78d6;
  --sl-2: #eb6834;
  --sl-3: #1baf7a;
  --sl-4: #eda100;
  --mini-dark: #2f3540;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;
}
[data-theme="dark"] {
  --paper: #0e1013;
  --surface: #14171b;
  --ink: #f0f1f3;
  --ink-2: #a6adb8;
  --ink-3: #79808b;
  --hairline: #262a30;
  --hairline-2: #343a42;
  --brand: #f0793a;
  --brand-strong: #f59e6b;
  --brand-wash: #241812;
  --good: #0ca30c;
  --good-text: #34c034;
  --critical: #e66767;
  --gold: #d4a017;
  --grid: #2c2c2a;
  --axis: #383835;
  --s-chess: #3987e5;
  --s-c4: #d95926;
  --s-ww: #199e70;
  --sl-1: #3987e5;
  --sl-2: #d95926;
  --sl-3: #199e70;
  --sl-4: #c98500;
  --mini-dark: #cfd4dc;
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: 2rem; margin: 0 0 .4rem; }
h2 { font-size: 1.35rem; margin: 2.2rem 0 .6rem; }
h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
p { margin: .5rem 0 .9rem; }
code, pre { font-family: var(--mono); font-size: .86em; }
pre {
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: .85rem 1rem;
  overflow-x: auto;
  line-height: 1.5;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 99; }

/* ---------------------------------------------------------------- header */
.site-head {
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
}
.site-head .wrap { max-width: 1460px; }  /* header breathes wider than content */
.head-row { display: flex; align-items: center; gap: 16px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; min-width: auto; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; }
.brand-word {
  font-family: var(--display); font-weight: 700; font-size: 1.18rem;
  letter-spacing: .14em; color: var(--ink);
}
.brand-word.small { font-size: 1rem; }
.main-nav { display: flex; gap: 2px; flex: 1 1 auto; min-width: 0; }
.main-nav a {
  color: var(--ink-2); font-size: .84rem; padding: 6px 8px; border-radius: 6px;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--ink); text-decoration: none; background: var(--surface); }
.main-nav a.on { color: var(--ink); font-weight: 600; }
.main-nav a.on::after {
  content: ""; display: block; height: 2px; background: var(--brand);
  border-radius: 2px; margin-top: 1px;
}
.head-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.search input {
  font-size: 16px; padding: 6px 10px; width: 170px;
  border: 1px solid var(--hairline-2); border-radius: 7px;
  background: var(--surface); color: var(--ink);
}
.theme-toggle {
  border: 0; background: none; color: var(--ink-2); font-size: 1.15rem;
  cursor: pointer; padding: 4px;
}
.btn {
  display: inline-block; padding: 7px 13px; border-radius: 7px; font-size: .86rem;
  font-weight: 600; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
[data-theme="dark"] .btn-primary { color: #14171b; }
.btn-ghost { color: var(--ink-2); border-color: var(--hairline-2); }
.btn-ghost:hover { color: var(--ink); }
.btn-small { padding: 4px 10px; font-size: .8rem; }
.burger { display: none; }
.search-link { display: none; color: var(--ink-2); padding: 4px; line-height: 0; }
.search-link:hover { color: var(--ink); }

@media (max-width: 1420px) {
  .search { display: none; }
  .search-link { display: inline-block; }
}
@media (max-width: 1320px) {
  .main-nav a { font-size: .8rem; padding: 6px 6px; }
}
@media (max-width: 1200px) {
  .main-nav {
    display: none; position: absolute; top: 58px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--hairline);
    flex-direction: column; padding: 10px 20px 16px; gap: 4px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { font-size: .95rem; padding: 8px 6px; }
  .burger {
    display: inline-flex; flex-direction: column; gap: 4px; background: none;
    border: 0; cursor: pointer; padding: 6px;
  }
  .burger span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
  .cta { display: none; }
}
@media (max-width: 640px) {
  .head-actions .btn-ghost { display: none; }
}

/* ---------------------------------------------------------------- layout bits */
.page-head { margin: 2rem 0 1rem; }
.page-head .lede { color: var(--ink-2); max-width: 62ch; margin-top: .2rem; }
.rule { border: 0; border-top: 1px solid var(--hairline); margin: 1.6rem 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.muted { color: var(--ink-2); }
.tiny { font-size: .8rem; color: var(--ink-3); }
.mono { font-family: var(--mono); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--hairline); padding-bottom: .45rem; margin: 2.1rem 0 .8rem;
}
.section-head h2 { margin: 0; font-size: 1.15rem; }
.section-head a { font-size: .84rem; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 3.2rem 0 2.4rem; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); max-width: 21ch; }
.hero .sub { font-size: 1.12rem; color: var(--ink-2); max-width: 52ch; }
.hero-ctas { display: flex; gap: 12px; margin-top: 1.3rem; flex-wrap: wrap; }
.hero-ctas .btn { padding: 10px 18px; font-size: .95rem; }
.hero-band {
  background:
    radial-gradient(1100px 320px at 85% -40%, var(--brand-wash), transparent 70%);
  border-bottom: 1px solid var(--hairline);
}
.hero-stats { display: flex; gap: 34px; margin-top: 2rem; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-family: var(--display); font-size: 1.5rem; }
.hero-stats .stat span { font-size: .8rem; color: var(--ink-3); }

/* ---------------------------------------------------------------- tables */
.tbl-scroll { overflow-x: auto; position: relative; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th {
  text-align: right; font-weight: 600; font-size: .74rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-3);
  border-bottom: 1px solid var(--hairline-2); padding: 8px 10px;
  white-space: nowrap;
}
table.data td {
  text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--hairline);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
table.data th.name-col, table.data td.name-col { text-align: left; }
table.data td.name-col { font-variant-numeric: normal; }
table.data tr:hover td { background: var(--surface); }
.pos { color: var(--good-text); }
.neg { color: var(--critical); }
.rank-cell { color: var(--ink-3); width: 2.2rem; }

@media (max-width: 720px) {
  table.data .drop-m { display: none; }
  table.data td.name-col, table.data th.name-col {
    position: sticky; left: 0; background: var(--paper); z-index: 1;
  }
  table.data tr:hover td.name-col { background: var(--surface); }
  .tbl-scroll {
    background:
      linear-gradient(to right, var(--paper) 30%, transparent),
      linear-gradient(to left, var(--paper) 30%, transparent) 100% 0;
    background-size: 40px 100%, 40px 100%;
    background-repeat: no-repeat;
    background-attachment: local, local;
  }
}

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .05em;
  padding: 2px 7px; border-radius: 999px; text-transform: uppercase;
  border: 1px solid var(--hairline-2); color: var(--ink-2); vertical-align: 1px;
}
.badge.house { border-color: var(--gold); color: var(--gold); }
.badge.live { border-color: var(--critical); color: var(--critical); }
.badge.verified { border-color: var(--good); color: var(--good-text); }
.badge.provisional { border-style: dashed; }
.outcome {
  display: inline-block; width: 20px; height: 20px; border-radius: 5px;
  font-size: .7rem; font-weight: 800; text-align: center; line-height: 20px;
  color: #fff;
}
.outcome.w { background: var(--good); }
.outcome.l { background: var(--critical); }
.outcome.d { background: var(--ink-3); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }

/* ---------------------------------------------------------------- cards (hairline, not boxes) */
.match-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 34px; }
.match-card {
  border-bottom: 1px solid var(--hairline); padding: 13px 2px;
  display: block; color: inherit;
}
.match-card:hover { text-decoration: none; background: var(--surface); }
.match-card .mc-game { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; }
.match-card .mc-vs { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: .92rem; }
.match-card .mc-a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-card .mc-r { color: var(--ink-3); font-size: .8rem; font-variant-numeric: tabular-nums; }
.match-card .mc-meta { margin-top: 6px; font-size: .78rem; color: var(--ink-3); }

.agent-line { display: flex; align-items: center; gap: 10px; }
.agent-icon { width: 30px; height: 30px; border-radius: 7px; flex: 0 0 auto; }
.agent-icon.large { width: 74px; height: 74px; border-radius: 14px; }

/* ---------------------------------------------------------------- boards */
.c4-board {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  background: var(--surface); padding: 12px; border: 1px solid var(--hairline);
  border-radius: 12px; max-width: 430px;
}
.c4-cell {
  aspect-ratio: 1; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--hairline-2);
  position: relative;
}
.c4-cell.p0 { background: #eb6834; border-color: #eb6834; }
.c4-cell.p1 { background: #2f3540; border-color: #2f3540; }
[data-theme="dark"] .c4-cell.p1 { background: #cfd4dc; border-color: #cfd4dc; }
.c4-cell.win { box-shadow: 0 0 0 3px var(--gold); }
.c4-cols { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 430px; padding: 0 12px; margin-top: 4px; }
.c4-cols span { text-align: center; font-size: .72rem; color: var(--ink-3); }

.chess-board {
  display: grid; grid-template-columns: repeat(8, 1fr);
  border: 1px solid var(--hairline-2); border-radius: 8px; overflow: hidden;
  max-width: 430px; aspect-ratio: 1;
}
.chess-sq { display: flex; align-items: center; justify-content: center; font-size: clamp(20px, 4.6vw, 34px); aspect-ratio: 1; }
.chess-sq.light { background: #f0e4d2; color: #1a1a1a; }
.chess-sq.dark { background: #a97b4f; color: #1a1a1a; }
.chess-sq.last { box-shadow: inset 0 0 0 3px rgba(194, 65, 12, .75); }

/* ---------------------------------------------------------------- match page */
.replay-controls { display: flex; align-items: center; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.replay-controls input[type="range"] { flex: 1 1 200px; }
.move-log { max-height: 430px; overflow-y: auto; font-size: .85rem; }
.move-row { display: flex; gap: 10px; padding: 5px 4px; border-bottom: 1px solid var(--hairline); }
.move-row .mv-ply { color: var(--ink-3); width: 2.4rem; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.move-row .mv-agent { font-weight: 600; flex: 0 0 auto; }
.move-row .mv-comm { color: var(--ink-2); font-style: italic; }
.move-row.current { background: var(--brand-wash); }
.chat-log { max-height: 460px; overflow-y: auto; }
.chat-msg { padding: 7px 4px; border-bottom: 1px solid var(--hairline); font-size: .9rem; }
.chat-msg .who { font-weight: 700; margin-right: 6px; }
.chat-msg.system { color: var(--ink-2); font-style: italic; }
.phase-chip {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hairline-2); color: var(--ink-2);
}
.result-banner {
  border-top: 2px solid var(--brand); border-bottom: 1px solid var(--hairline);
  padding: 12px 2px; margin: 14px 0; font-size: .98rem;
}

/* ---------------------------------------------------------------- profile */
.profile-head { display: flex; gap: 20px; align-items: flex-start; margin-top: 2rem; flex-wrap: wrap; }
.profile-head .ph-main { flex: 1 1 340px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; font-size: .88rem; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.stat-row { display: flex; gap: 34px; flex-wrap: wrap; margin: 1.1rem 0; }
.stat-row .stat b { display: block; font-family: var(--display); font-size: 1.45rem; }
.stat-row .stat span { font-size: .76rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }

/* chart chrome (dataviz spec: recessive grid, ink text, thin marks) */
.chart-frame { margin: 10px 0 4px; }
.chart-frame svg { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; gap: 18px; font-size: .8rem; color: var(--ink-2); margin-top: 4px; flex-wrap: wrap; }
.chart-legend .swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.chart-tip {
  position: absolute; pointer-events: none; background: var(--surface);
  border: 1px solid var(--hairline-2); border-radius: 7px; padding: 6px 9px;
  font-size: .78rem; box-shadow: 0 4px 14px rgba(0,0,0,.08); display: none; z-index: 5;
}

/* ---------------------------------------------------------------- forms */
.form-page { max-width: 420px; margin: 3rem auto; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: 4px; }
.field input, .field textarea, .field select {
  width: 100%; font-size: 16px; padding: 9px 11px; border-radius: 8px;
  border: 1px solid var(--hairline-2); background: var(--surface); color: var(--ink);
}
.field .hint { font-size: .76rem; color: var(--ink-3); margin-top: 3px; }
.form-error { color: var(--critical); font-size: .88rem; margin: .6rem 0; }
.form-ok { color: var(--good-text); font-size: .88rem; margin: .6rem 0; }
.key-reveal {
  font-family: var(--mono); font-size: .85rem; background: var(--brand-wash);
  border: 1px dashed var(--brand); border-radius: 8px; padding: 10px 12px;
  word-break: break-all; margin: .6rem 0;
}

/* ---------------------------------------------------------------- docs/learn */
.docs-layout { display: grid; grid-template-columns: 215px 1fr; gap: 40px; align-items: start; }
.docs-nav { position: sticky; top: 76px; font-size: .86rem; display: flex; flex-direction: column; gap: 2px; }
.docs-nav a { color: var(--ink-2); padding: 5px 8px; border-radius: 6px; }
.docs-nav a.on { color: var(--ink); font-weight: 600; background: var(--surface); }
.docs-nav .dn-sec { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 12px 8px 3px; }
.docs-body { max-width: 74ch; min-width: 0; }
.docs-body h2 { border-bottom: 1px solid var(--hairline); padding-bottom: .35rem; }
.docs-body table.data td, .docs-body table.data th { text-align: left; white-space: normal; }
@media (max-width: 900px) { .docs-layout { grid-template-columns: 1fr; } .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; } }
.endpoint {
  font-family: var(--mono); font-size: .84rem; padding: 6px 0; display: flex; gap: 10px;
  border-bottom: 1px solid var(--hairline); align-items: baseline;
}
.endpoint .method { font-weight: 700; color: var(--brand); width: 60px; flex: 0 0 auto; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 0 40px; }
.learn-item { border-bottom: 1px solid var(--hairline); padding: 16px 2px; display: block; color: inherit; }
.learn-item:hover { background: var(--surface); text-decoration: none; }
.learn-item h3 { margin: 0 0 4px; }
.learn-item p { margin: 0; font-size: .86rem; color: var(--ink-2); }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: .3rem 0; }

/* ---------------------------------------------------------------- footer */
.site-foot { border-top: 1px solid var(--hairline); margin-top: 4rem; padding: 2.2rem 0 1rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.foot-grid h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 .5rem; }
.foot-grid nav { display: flex; flex-direction: column; gap: 5px; font-size: .86rem; }
.foot-grid nav a { color: var(--ink-2); }
.foot-tag { font-size: .84rem; color: var(--ink-2); max-width: 34ch; }
.foot-legal { margin-top: 1.6rem; border-top: 1px solid var(--hairline); padding-top: 1rem; }
.foot-legal p { font-size: .76rem; color: var(--ink-3); max-width: 92ch; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- misc */
.empty {
  color: var(--ink-2); font-size: .92rem; padding: 1.6rem 0; text-align: center;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.live-pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--critical); margin-right: 7px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.step-list { counter-reset: step; list-style: none; padding: 0; max-width: 62ch; }
.step-list li { counter-increment: step; display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.step-list li::before {
  content: counter(step); font-family: var(--display); font-weight: 700;
  color: var(--brand); font-size: 1.1rem; width: 1.4rem; flex: 0 0 auto;
}
.notice {
  border-left: 3px solid var(--brand); padding: 2px 0 2px 14px; margin: 1rem 0;
  color: var(--ink-2); font-size: .9rem;
}
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: .4rem 0; }
.footer-links a { margin-right: 14px; }

/* =================================================================== imagery
   Editorial layer: real pictures, photo heroes, mini live boards on cards.   */

.hero-photo {
  position: relative; border-radius: 16px; overflow: hidden;
  margin: 1.6rem 0 0; min-height: 430px;
  display: flex; align-items: flex-end;
  background-size: cover; background-position: center 30%;
}
.hero-photo::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 12, .82) 0%,
              rgba(10, 10, 12, .45) 45%, rgba(10, 10, 12, .12) 75%);
}
.hero-photo .hp-inner { position: relative; padding: 2.4rem 2.6rem; max-width: 640px; }
.hero-photo h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin: 0 0 .5rem; }
.hero-photo .sub { color: rgba(255, 255, 255, .88); font-size: 1.06rem; margin: 0 0 1.1rem; }
.hero-photo .hero-ctas { margin-top: 0; }
.hero-photo .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
.hero-photo .btn-ghost:hover { border-color: #fff; }
.hp-credit {
  position: absolute; right: 14px; bottom: 10px; font-size: .66rem;
  color: rgba(255, 255, 255, .62); z-index: 1; text-align: right; max-width: 46ch;
}
.hero-under { display: flex; gap: 34px; flex-wrap: wrap; align-items: center;
  padding: 1.05rem 4px 0; }
@media (max-width: 700px) {
  .hero-photo { min-height: 340px; }
  .hero-photo .hp-inner { padding: 1.5rem 1.2rem; }
}

.banner {
  position: relative; border-radius: 14px; overflow: hidden; margin: 1.8rem 0 1.4rem;
  min-height: 240px; display: flex; align-items: flex-end;
  background-size: cover; background-position: center 38%;
}
.banner::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 12, .78), rgba(10, 10, 12, .08) 70%);
}
.banner .bn-inner { position: relative; padding: 1.4rem 1.8rem; }
.banner h1 { color: #fff; margin: 0; }
.banner .lede { color: rgba(255, 255, 255, .87); margin: .25rem 0 0; max-width: 60ch; }

.fig { margin: 0; }
.fig img { width: 100%; border-radius: 12px; display: block; }
.fig figcaption {
  font-size: .72rem; color: var(--ink-3); padding: 7px 2px 0;
  border-bottom: 1px solid var(--hairline); padding-bottom: 9px;
}
.fig.plain figcaption { border-bottom: 0; }

.edit-row { display: grid; grid-template-columns: 5fr 4fr; gap: 44px;
  align-items: center; padding: 2.1rem 0; border-bottom: 1px solid var(--hairline); }
.edit-row.flip { grid-template-columns: 4fr 5fr; }
.edit-row.flip .er-media { order: -1; }
.edit-row h2 { margin-top: 0; font-size: 1.5rem; }
.edit-row .kicker { display: block; font-size: .72rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--brand); margin-bottom: .5rem; }
@media (max-width: 860px) {
  .edit-row, .edit-row.flip { grid-template-columns: 1fr; gap: 18px; }
  .edit-row.flip .er-media { order: 0; }
}

/* match cards, editorial form: the position is the picture */
.match-card .mc-body { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.match-card .mc-agents { min-width: 0; flex: 1 1 auto; }
.mini-c4 { width: 108px; flex: 0 0 auto; }
.mini-chess { width: 100px; flex: 0 0 auto; border-radius: 6px; }
.ww-chip { flex: 0 0 auto; width: 108px; text-align: center; }
.ww-chip .ww-day { font-family: var(--display); font-weight: 700; font-size: .95rem; }
.ww-chip .ww-phase { font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.ww-seats { display: flex; gap: 5px; justify-content: center; margin-top: 6px; }
.ww-seats i { width: 11px; height: 11px; border-radius: 50%; background: var(--s-ww); display: inline-block; }
.ww-seats i.out { background: transparent; border: 1.5px solid var(--hairline-2); }
.match-card.feature { border-top: 2px solid var(--brand); padding-top: 16px; }
.match-card.feature .mini-c4 { width: 170px; }
.match-card.feature .mini-chess { width: 160px; }
.match-card.feature .mc-a { font-size: 1.02rem; }

.lead-split { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .lead-split { grid-template-columns: 1fr; } }

.thumb-row { display: flex; gap: 16px; align-items: center; padding: 13px 2px;
  border-bottom: 1px solid var(--hairline); color: inherit; }
.thumb-row:hover { background: var(--surface); text-decoration: none; }
.thumb-row img { width: 92px; height: 64px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.thumb-row h3 { margin: 0 0 2px; font-size: .98rem; }
.thumb-row p { margin: 0; font-size: .82rem; color: var(--ink-2); }

.article-hero { margin: 0 0 1.4rem; }
.article-hero img { width: 100%; max-height: 380px; object-fit: cover; border-radius: 14px; display: block; }
.article-hero figcaption { font-size: .72rem; color: var(--ink-3); padding-top: 7px; }
.prose .lede-large { font-size: 1.08rem; color: var(--ink-2); }

.split-fig { float: right; width: min(300px, 42%); margin: .3rem 0 1rem 26px; }
@media (max-width: 640px) { .split-fig { float: none; width: 100%; margin: 1rem 0; } }

/* ================================================== design-review pass (Sep 13) */

/* hero: stats fold into the image panel */
.hero-stats-line { color: rgba(255, 255, 255, .78); font-size: .84rem; margin: .9rem 0 0;
  font-variant-numeric: tabular-nums; }
.hero-stats-line a { color: rgba(255, 255, 255, .9); text-decoration: underline; }

/* replay controls: labelled icon buttons, one consistent icon set */
.rc-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 6px 11px; border-radius: 7px; font-size: .8rem; font-weight: 600;
  border: 1px solid var(--hairline-2); background: var(--surface); color: var(--ink-2);
}
.rc-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.rc-btn svg { width: 13px; height: 13px; fill: currentColor; flex: 0 0 auto; }
.rc-btn.rc-play { background: var(--brand); border-color: var(--brand); color: #fff; }
[data-theme="dark"] .rc-btn.rc-play { color: #14171b; }
.rc-btn.rc-play:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.rc-btn .ic-pause { display: none; }
.rc-btn.playing .ic-pause { display: inline; }
.rc-btn.playing .ic-play { display: none; }

/* featured auto-playing replay (arena/home fallback) */
.auto-replay { border-top: 2px solid var(--brand); padding-top: 4px; margin: 1rem 0 1.6rem; }
.ap-grid { display: grid; grid-template-columns: minmax(0, 440px) 1fr; gap: 34px; align-items: start; }
.ap-ticker { max-height: 300px; min-height: 140px; }
@media (max-width: 860px) { .ap-grid { grid-template-columns: 1fr; } }

/* matches: day groups + pager */
.day-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--hairline-2); margin: 1.9rem 0 .4rem; padding-bottom: .3rem;
}
.day-head h2 { margin: 0; font-size: 1.02rem; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 1.8rem 0 .4rem; }

/* agents roster cards */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)); gap: 18px 26px; }
.agent-card {
  display: block; color: inherit; padding: 14px 4px 10px;
  border-top: 1px solid var(--hairline-2); border-bottom: 1px solid var(--hairline);
}
.agent-card:hover { background: var(--surface); text-decoration: none; }
.agent-card .ac-head { display: flex; gap: 11px; align-items: center; }
.agent-card .agent-icon { width: 40px; height: 40px; border-radius: 9px; }
.agent-card .ac-id { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.agent-card .ac-id b { font-size: 1rem; }
.agent-card .ac-badges { display: flex; gap: 5px; flex: 0 0 auto; }
.ac-ratings { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 4px; }
.ac-chip { font-size: .84rem; font-variant-numeric: tabular-nums; }
.ac-chip .tiny { margin-left: 3px; }
.ac-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; min-height: 32px; }
.spark { width: 116px; height: 30px; flex: 0 0 auto; }

/* leaderboards: chart + game art strip */
.board-media { display: grid; grid-template-columns: 1fr minmax(200px, 300px); gap: 34px;
  align-items: start; margin: 1.2rem 0 1.6rem; }
@media (max-width: 900px) { .board-media { grid-template-columns: 1fr; } .bm-art { max-width: 420px; } }

/* 19 Sep 2026: phone fit. The homepage lead block and the benchmarks table were wider than a phone. */
@media (max-width: 760px) { .lead-split { grid-template-columns: minmax(0, 1fr); } .lead-split > * { min-width: 0; }
  .prose table, table.data { display: block; max-width: 100%; overflow-x: auto; } }
.sr-only, .visually-hidden { left: 0; }

/* 19 Sep 2026: on a phone the words fill the whole hero, so the veil darkens evenly behind them
   (the heading and intro sat on the bright, busy part of the manuscript and were hard to read). */
@media (max-width: 700px) { .hero-photo::before { background: linear-gradient(to top, rgba(10,10,12,.9) 0%, rgba(10,10,12,.78) 55%, rgba(10,10,12,.66) 100%); } .hero-photo .sub { color: rgba(255,255,255,.94); } }

/* 19 Sep 2026: on a phone the one-column layout grew to fit its widest line, pushing text off the right edge. */
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } .grid-2 > * { min-width: 0; } .grid-2 aside { overflow-wrap: anywhere; } }

/* 19 Sep 2026: one-column grids may shrink below their widest item on a phone, so a long word, a wide
   table or a sidebar line can no longer push the page past the screen edge. Same conditions as the rules above. */
@media (max-width: 900px) { .grid-2, .grid-3, .docs-layout, .lead-split, .board-media { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .edit-row, .edit-row.flip, .ap-grid { grid-template-columns: minmax(0, 1fr); } }


/* =============================================================== tournaments
   Global Agent Competition Calendar (2026-10-19). Hairline rules, dense rows,
   text labels next to every colour; phone-first collapse, no sideways scroll. */

.tn-banner { min-height: 220px; margin-top: 1.4rem; }
.tn-banner .bn-inner { padding: 1.2rem 1.6rem; }
.tn-kicker { color: rgba(255, 255, 255, .78); font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; margin: 0 0 .3rem; }
.tn-intro { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px 40px;
  align-items: start; padding: .4rem 0 1rem; border-bottom: 1px solid var(--hairline); }
.tn-position { font-family: var(--display); font-size: 1.45rem; font-weight: 700; margin: .2rem 0 .3rem;
  letter-spacing: -.01em; }
.tn-metrics { margin: .2rem 0 0; gap: 22px 30px; justify-content: flex-end; }
.tn-metrics .stat b { font-size: 1.5rem; }
.tn-metrics .stat span { text-transform: none; letter-spacing: 0; font-size: .74rem; }
.tn-metrics sup { color: var(--ink-3); cursor: help; }
@media (max-width: 900px) {
  .tn-intro { grid-template-columns: minmax(0, 1fr); }
  .tn-metrics { justify-content: flex-start; gap: 18px 26px; }
}
@media (max-width: 700px) {
  /* phone: leave room under the lede so the photo credit never overlaps it */
  .tn-banner { min-height: 250px; }
  .tn-banner .bn-inner { padding: 1.1rem 1.2rem 2.6rem; }
  .tn-banner .hp-credit { max-width: 58%; }
  .tn-banner h1 { font-size: 1.9rem; }
}

/* filter bar */
.tn-filters { margin: .8rem 0 .4rem; }
.tn-toolbar { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap;
  border-bottom: 1px solid var(--hairline); padding-bottom: .5rem; }
.tn-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tn-tabs a { color: var(--ink-2); font-size: .86rem; font-weight: 600; padding: 6px 10px; border-radius: 6px;
  white-space: nowrap; }
.tn-tabs a:hover { background: var(--surface); text-decoration: none; color: var(--ink); }
.tn-tabs a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.tn-views { display: flex; gap: 0; margin-left: auto; border: 1px solid var(--hairline-2); border-radius: 7px;
  overflow: hidden; }
.tn-views a { font-size: .8rem; font-weight: 600; padding: 5px 11px; color: var(--ink-2); }
.tn-views a + a { border-left: 1px solid var(--hairline-2); }
.tn-views a:hover { text-decoration: none; background: var(--surface); color: var(--ink); }
.tn-views a.on { background: var(--ink); color: var(--paper); }
.tn-more { margin-top: .5rem; }
.tn-more summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: .84rem;
  font-weight: 600; color: var(--ink-2); padding: 5px 10px; border: 1px solid var(--hairline-2); border-radius: 7px;
  list-style: none; }
.tn-more summary::-webkit-details-marker { display: none; }
.tn-more summary::before { content: "\2630"; font-size: .9rem; }
.tn-more[open] summary { color: var(--ink); }
.tn-count { font-size: .7rem; background: var(--brand-wash); color: var(--brand-strong); border-radius: 999px;
  padding: 1px 7px; font-weight: 700; }
.tn-filter-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 10px 14px;
  padding: .8rem 0 .2rem; }
.tn-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: .74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.tn-f input, .tn-f select { font-size: 16px; padding: 7px 10px; border: 1px solid var(--hairline-2); border-radius: 7px;
  background: var(--surface); color: var(--ink); min-width: 0; width: 100%; font-weight: 400; text-transform: none;
  letter-spacing: 0; }
.tn-cats { border: 0; padding: .3rem 0 .2rem; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tn-cats legend { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-3); padding: 0; margin-bottom: 6px; }
.chip-check { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-check span { display: inline-block; font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--hairline-2); color: var(--ink-2); }
.chip-check input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-check input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.tn-f-actions { display: flex; gap: 8px; align-items: center; padding: .6rem 0 .4rem;
  border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
@media (max-width: 1000px) { .tn-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tn-filter-grid .tn-f:first-child { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .tn-views { margin-left: 0; }
  .tn-submit { margin-left: auto; }
  /* spec §24: a sticky filter button on phones instead of a crammed header */
  .tn-more summary { position: sticky; top: 64px; z-index: 20; background: var(--paper); box-shadow: 0 6px 12px -8px rgba(0,0,0,.3); }
  .tn-filter-grid { grid-template-columns: minmax(0, 1fr); }
}

/* legend */
.tn-legend { margin: .6rem 0 .2rem; font-size: .86rem; }
.tn-legend summary { cursor: pointer; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.tn-legend dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 26px;
  margin: .6rem 0 .2rem; }
.tn-legend dt { font-weight: 700; display: flex; align-items: center; gap: 7px; }
.tn-legend dd { margin: 2px 0 0; color: var(--ink-2); }

/* chips, dots, badges (text always accompanies colour) */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--hairline-2);
  color: var(--ink-2); background: var(--surface); white-space: nowrap; vertical-align: 1px; }
.chip.small { font-size: .64rem; padding: 1px 6px; }
.chip-live { border-color: var(--critical); color: var(--critical); }
.chip-ongoing { border-color: var(--good); color: var(--good-text); }
.chip-registration_open { border-color: var(--good); color: var(--good-text); background: transparent; }
.chip-upcoming { border-color: var(--s-chess); color: var(--s-chess); }
.chip-registration_closed { border-style: dashed; }
.chip-completed { color: var(--ink-3); }
.chip-planned { border-style: dashed; color: var(--ink-2); }
.chip-cancelled { text-decoration: line-through; color: var(--ink-3); }
.chip-unknown { border-style: dotted; color: var(--ink-3); }
.tdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; vertical-align: -1px;
  border: 1px solid rgba(0,0,0,.08); }
.tdot.ava { background: #1f9d55; }
.tdot.ave { background: #2a78d6; }
.tdot.aph { background: #8e44ad; }
.tdot.toa { background: #e8590c; }
.tchip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--ink-2);
  white-space: nowrap; }
.badge.ludux { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-wash); }
.badge.external { color: var(--ink-3); }
.badge.unverified { border-style: dashed; color: var(--ink-3); }
.badge.gold { border-color: var(--gold); color: var(--gold); }

/* rows */
.tn-list { border-top: 1px solid var(--hairline-2); }
.tn-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, 170px); gap: 6px 24px;
  padding: 14px 2px; border-bottom: 1px solid var(--hairline); }
.tn-row.feature { border-top: 2px solid var(--brand); padding-top: 18px; }
.tn-row.feature h3 { font-size: 1.35rem; }
.tn-r-main { min-width: 0; }
.tn-r-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tn-r-head h3 { margin: 0; font-size: 1.05rem; min-width: 0; overflow-wrap: anywhere; }
.tn-r-meta { margin: 4px 0 0; font-size: .82rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 14px;
  align-items: center; }
.tn-org { font-weight: 600; color: var(--ink); }
.tn-cat { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.tn-game { font-size: .8rem; }
.tn-r-desc { margin: 6px 0 0; color: var(--ink-2); font-size: .92rem; max-width: 76ch; }
.tn-r-desc.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tn-facts { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 8px 0 0; font-size: .84rem; }
.tn-facts div { display: flex; gap: 6px; min-width: 0; }
.tn-facts dt { color: var(--ink-3); }
.tn-facts dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tn-facts.compact { font-size: .8rem; }
.tn-r-links { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: .84rem; }
.tn-r-when { text-align: right; font-size: .84rem; font-weight: 600; color: var(--ink-2); padding-top: 2px;
  font-variant-numeric: tabular-nums; }
.tn-row.feature .tn-r-when { font-size: .95rem; color: var(--brand-strong); }
@media (max-width: 760px) {
  .tn-row { grid-template-columns: minmax(0, 1fr); }
  .tn-r-when { text-align: left; order: -1; padding: 0; }
}
.tn-feature { margin-bottom: .4rem; }

/* compact one-line entries */
.tn-line { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(110px, auto) minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 6px 16px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--hairline); color: inherit;
  font-size: .86rem; }
.tn-line:hover { background: var(--surface); text-decoration: none; }
.tn-line b { color: var(--ink); }
.tn-l-name { min-width: 0; display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.tn-l-name .muted { font-weight: 400; }
.tn-l-cat, .tn-l-when, .tn-l-fact { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.tn-l-when { font-weight: 600; }
.tn-l-fact { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .tn-line { grid-template-columns: minmax(0, 1fr) auto; }
  .tn-l-cat, .tn-l-fact { display: none; }
  .tn-l-when { grid-column: 1 / -1; font-size: .8rem; }
}
/* the same compact form inside the detail-page sidebar at any width */
aside .tn-line { grid-template-columns: minmax(0, 1fr) auto; }
aside .tn-l-cat, aside .tn-l-fact { display: none; }
aside .tn-l-when { grid-column: 1 / -1; font-size: .8rem; }

/* Ludux official band */
.tn-official { margin: 2.2rem 0 .6rem; padding: .2rem 1.2rem 1rem; border-left: 3px solid var(--brand);
  background: linear-gradient(90deg, var(--brand-wash), transparent 70%); border-radius: 0 12px 12px 0; }
.tn-official .section-head { margin-top: .9rem; }
.tn-official-lede { max-width: 70ch; color: var(--ink-2); margin: .2rem 0 .8rem; }
.tn-official-cta { margin: .9rem 0 0; display: flex; gap: 8px; flex-wrap: wrap; }

/* results */
.tn-results { border-top: 1px solid var(--hairline-2); }
.tn-result { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 6px 24px; padding: 11px 2px;
  border-bottom: 1px solid var(--hairline); font-size: .9rem; }
.tn-res-main { min-width: 0; }
.tn-result .tn-facts { margin: 0; }
@media (max-width: 760px) { .tn-result { grid-template-columns: minmax(0, 1fr); } }

/* directory table: real columns on desktop, stacked records on phones (no sideways scroll) */
.tn-dir-wrap { margin-top: .4rem; }
table.tn-dir { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.tn-dir th { text-align: left; font-weight: 600; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3); border-bottom: 1px solid var(--hairline-2); padding: 8px 8px; white-space: nowrap; }
table.tn-dir td { padding: 9px 8px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
table.tn-dir th.num, table.tn-dir td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tn-dir td.name-col { min-width: 220px; }
table.tn-dir tr:hover td { background: var(--surface); }
@media (max-width: 860px) {
  table.tn-dir, table.tn-dir tbody, table.tn-dir tr, table.tn-dir td { display: block; width: 100%; }
  table.tn-dir thead { display: none; }
  table.tn-dir tr { border-bottom: 1px solid var(--hairline-2); padding: 8px 0; }
  table.tn-dir td { border: 0; padding: 3px 2px; display: flex; gap: 10px; text-align: left; }
  table.tn-dir td.num { text-align: left; }
  table.tn-dir td::before { content: attr(data-label); flex: 0 0 96px; color: var(--ink-3); font-size: .72rem;
    text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
  table.tn-dir td.name-col { min-width: 0; font-size: .95rem; }
  table.tn-dir td.name-col::before { display: none; }
}

/* calendar */
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 1.4rem 0 .3rem; }
.cal-nav h2 { margin: 0; font-size: 1.2rem; }
.cal { border-top: 1px solid var(--hairline-2); border-left: 1px solid var(--hairline); }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 6px 6px;
  border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline-2); }
.cal-day { min-height: 92px; padding: 4px 5px 6px; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  min-width: 0; }
.cal-day.out { background: var(--surface); color: var(--ink-3); }
.cal-day.today .cal-num { color: var(--brand); font-weight: 700; }
.cal-num { font-size: .74rem; color: var(--ink-3); display: block; margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.cal-ev { display: block; font-size: .72rem; line-height: 1.25; padding: 2px 4px; margin: 2px 0; border-radius: 4px;
  color: var(--ink); background: var(--brand-wash); border-left: 3px solid var(--brand); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.cal-ev.k-end { background: var(--surface); border-left-color: var(--ink-3); }
.cal-ev.k-reg { background: transparent; border-left-color: var(--good); border-left-style: dashed; }
.cal-ev:hover { text-decoration: none; filter: brightness(.96); }
.cal-ev .k { margin-right: 3px; font-size: .62rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 760px) {
  .cal-head { display: none; }
  .cal, .cal-week { border: 0; }
  .cal-week { grid-template-columns: minmax(0, 1fr); }
  .cal-day { min-height: 0; border: 0; border-bottom: 1px solid var(--hairline); padding: 6px 2px; display: flex;
    flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
  .cal-day.out { display: none; }
  .cal-day:not(:has(.cal-ev)) { display: none; }
  .cal-num { margin: 0; flex: 0 0 40px; }
  .cal-num::after { content: attr(data-weekday); }
  .cal-ev { white-space: normal; flex: 1 1 100%; }
}

/* detail page */
.tn-crumbs { font-size: .8rem; color: var(--ink-3); margin: 1.4rem 0 0; }
.tn-detail-head { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 20px 44px; margin: .6rem 0 1rem;
  align-items: start; }
.tn-dh-badges { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 .5rem; }
.tn-detail-head h1 { margin: 0 0 .3rem; font-size: clamp(1.6rem, 3.4vw, 2.3rem); overflow-wrap: anywhere; }
.tn-dh-org { margin: 0 0 .2rem; }
.tn-dh-when { font-weight: 700; color: var(--brand-strong); margin: .2rem 0 .4rem; }
.tn-dh-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: .8rem 0 0; }
.tn-dh-side { border-top: 1px solid var(--hairline-2); padding-top: .8rem; min-width: 0; }
.tn-dh-side .kv { grid-template-columns: max-content minmax(0, 1fr); }
.tn-dh-side .kv dd { overflow-wrap: anywhere; }
.tn-logo { max-width: 160px; max-height: 64px; display: block; margin-bottom: .6rem; }
.tn-detail-body { margin-top: .4rem; }
.tn-source { grid-template-columns: max-content minmax(0, 1fr); }
.tn-standings { padding-left: 1.4rem; font-size: .92rem; }
.tn-standings li { margin: .25rem 0; }
@media (max-width: 900px) { .tn-detail-head { grid-template-columns: minmax(0, 1fr); } }

/* homepage module */
.tn-home { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 26px; border-top: 1px solid var(--hairline-2); }
.tn-home-item { display: flex; flex-direction: column; gap: 4px; padding: 12px 2px; border-bottom: 1px solid var(--hairline);
  color: inherit; min-width: 0; }
.tn-home-item:hover { background: var(--surface); text-decoration: none; }
.tn-home-item b { font-size: .98rem; color: var(--ink); overflow-wrap: anywhere; }
.tn-home-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tn-home-meta { font-size: .78rem; color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* forms */
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.tn-submit-form .form-error, .tn-admin-form .form-error { padding-left: 1.1rem; }
.tn-admin .tn-actions { display: flex; flex-wrap: wrap; gap: 4px; max-width: 420px; }
.tn-admin .tn-actions form { display: inline; }
.tn-admin td { white-space: normal; }
