/* Sabujak Benchwork — Sabujak Works palette (paper, ink, deep green) + the two model colours for data only. */
@font-face { font-family: 'Jua'; src: url('assets/jua-latin.woff2') format('woff2'); font-display: swap; }
:root {
  --paper: #f7f5ed; --card: #fffdf6; --ink: #263e34; --muted: #647268; --line: #dcded2; --deep: #315b46; --soft: #eeeee3;
  --ok: #315b46; --bad: #e03131; --pass: #a9afa2; --timeout: #8c7ab8;
  --body: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Segoe UI', sans-serif;
  --display: 'Jua', var(--body);
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 var(--body); font-variant-numeric: tabular-nums; }
a { color: inherit; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(32px, 4.4vw, 50px); }
h2 { font-size: clamp(22px, 2.4vw, 28px); }
.kicker { font: 600 11px/1.4 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.lede { font-size: 17px; color: #3d5248; max-width: 62ch; }
.muted { color: var(--muted); }
small { font-size: 12px; color: var(--muted); }
:focus-visible { outline: 3px solid var(--deep); outline-offset: 2px; border-radius: 4px; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 22px var(--display); letter-spacing: -0.02em; }
.brand b { font-weight: 400; color: var(--deep); }
.brand img { width: 40px; height: 40px; }
nav { display: flex; gap: 22px; font: 600 .875rem/1.45 var(--body); margin-left: auto; }
nav a { text-decoration: none; color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent; }
nav a.on, nav a:hover { color: var(--ink); border-color: var(--ink); }
.watch { background: #c92a2a; color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 999px; }
.watch:hover { background: #a61e1e; }

/* live strip */
.live-strip { background: var(--ink); color: var(--paper); }
.live-in { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; font-size: 14px; flex-wrap: wrap; }
.live-in > b { letter-spacing: .08em; font-size: 12px; color: #ffb4a8; }
.live-in .dot { width: 9px; height: 9px; border-radius: 50%; background: #ff6b5b; animation: blink 1.4s infinite; }
.live-in .lm { color: #c9d3cc; }
.live-in .ls { margin-left: auto; font-size: 15px; }
.live-in .ls b { filter: brightness(1.35); }
@keyframes blink { 50% { opacity: .25; } }

main { padding: 36px 0 64px; min-height: 60vh; }
section { margin-top: 56px; }
section:first-child, .crumb + section { margin-top: 0; }
.crumb { font-size: 13px; color: var(--muted); margin: 0 0 18px; }
.crumb a { color: var(--muted); }
.shead { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; flex-wrap: wrap; }
.shead p { margin: 0; color: var(--muted); font-size: 14px; max-width: 60ch; }
.shead > a { font-weight: 600; font-size: 14px; }
.loading { color: var(--muted); }

/* intro + head to head */
.intro { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.intro.two { margin-top: 56px; }
.intro-text h1 { margin-bottom: 18px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 14px; margin-top: 22px; }
.facts b { color: var(--ink); font-size: 18px; margin-right: 4px; }
details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
summary { cursor: pointer; font-weight: 600; font-size: 14px; }
pre { white-space: pre-wrap; font: 13px/1.55 var(--mono); background: var(--soft); border-radius: 10px; padding: 14px 16px; margin: 10px 0 0; }

.tape { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px 8px; }
.tape.empty { padding: 28px 22px; color: var(--muted); }
.tape .trow { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(var(--n, 2), minmax(0, 1fr)); align-items: center; gap: 10px; padding: 10px 0 9px; border-top: 1px solid var(--line); }
.tape .thead { border-top: 0; align-items: end; padding-top: 2px; }
.tape .th { display: grid; justify-items: end; gap: 2px; text-align: right; min-width: 0; }
.tape .th .chip { white-space: normal; justify-content: flex-end; text-align: right; }
.tape .th small { font-size: 11px; color: var(--muted); line-height: 1.25; }
.tape .trow > .tl { font-size: 13px; color: var(--muted); text-align: left; }
.tape .trow > b { font: 22px var(--display); font-weight: 400; color: var(--ink); text-align: right; display: grid; justify-items: end; gap: 4px; }
.tape .trow > b.win { color: var(--c); }
.tape .tb { display: block; width: 100%; height: 4px; background: var(--soft); border-radius: 2px; overflow: hidden; }
.tape .tb i { display: block; height: 100%; border-radius: 2px; }
.vs { font: 14px var(--display); color: var(--muted); }
.tsub { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin: 4px 0 6px; }
.tfoot { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); margin: 0; padding: 10px 0 12px; }
.testnote { background: #fff3c4; border: 1px solid #ecd98a; border-radius: 12px; padding: 10px 16px; font-size: 14px; margin: 0 0 28px; }
.nw { white-space: nowrap; }
.livetag { font: 700 10px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: #c92a2a; border-radius: 4px; padding: 3px 5px; vertical-align: 3px; margin-left: 6px; font-style: normal; }
.lhead { font-size: 11px !important; font-weight: 600 !important; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 4px !important; padding-bottom: 8px !important; }
.lhead:hover { background: none !important; }
.go { color: var(--muted); font-size: 18px; text-align: right; }
.upnext { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 16px 0 0; font-size: 14px; }
.upnext > span { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.upnext a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; min-height: 44px; }
.upnext a:hover { text-decoration: underline; }
.pk { margin-top: 22px; }
.note { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.chart .ax.strong { font-weight: 700; }
.chart .endl { font: 700 13px var(--body); }
.tape .trow > b small { font: 12px var(--body); }
.split { grid-column: 1 / -1; display: flex; height: 4px; border-radius: 2px; overflow: hidden; gap: 2px; margin-top: 2px; }
.split i { display: block; height: 100%; border-radius: 2px; }


/* charts in grids */
.trends { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.trends.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 22px; }
.trends figure, .gcharts figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 6px; min-width: 0; }
.trends figcaption, .gcharts figcaption { font-weight: 700; font-size: 14px; margin: 0 0 4px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trends figcaption small, .gcharts figcaption small { font-weight: 400; }
.chart .ax.band { font-size: 10px; letter-spacing: .02em; }
.bandlg { margin-top: -4px; }
.bandlg .lnote { margin-left: auto; }
.bandlg .lk { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.bandlg i.sw { width: 14px; height: 10px; border-radius: 3px; border: 1px solid rgba(38,62,52,.15); }
.tl { display: block; font-size: 11px; }
.hb-axis { padding-top: 0; padding-bottom: 0; }
.hb-axis:hover { background: none; }
.ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 2px; }
.gcharts .legend { margin: 2px 0 6px 4px; }
.gcharts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.gcharts figure { padding: 14px 16px 10px; }
.hbars { display: grid; gap: 4px; }
.hb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; align-items: center; text-decoration: none; padding: 6px 4px; border-radius: 8px; }
.hb:hover { background: var(--soft); }
.hb-k { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; min-width: 0; }
.hb-v { display: grid; gap: 4px; }
.hb-r { display: grid; grid-template-columns: 1fr 48px; align-items: center; gap: 8px; }
.hb-r i { display: block; height: 10px; border-radius: 5px; min-width: 2px; }
.hb-r b { font-size: 13px; text-align: right; }

.chip { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }

/* game list */
.gicon { border-radius: 22%; flex: none; display: block; background: var(--soft); }
.glist { display: grid; }
.grow { display: grid; grid-template-columns: 48px minmax(0, 2.2fr) 1fr 1fr 1.3fr 24px; align-items: center; gap: 18px; padding: 14px 6px; border-bottom: 1px solid var(--line); text-decoration: none; }
.grow:hover, .mrow:hover { background: var(--card); }
.gt b { font: 20px var(--display); font-weight: 400; display: block; }
.gt small { display: block; }
.gn { color: var(--muted); font-size: 14px; }
.gw { font: 22px var(--display); }
.gw i { color: var(--muted); font-style: normal; margin: 0 6px; }
.gw small, .gs small { display: block; font-family: var(--body); }
.gs { font-size: 16px; font-weight: 600; }

/* match list */
.mlist { display: grid; }
.mrow { display: grid; grid-template-columns: minmax(0, 1.6fr) 1.2fr 1fr 1fr 0.8fr; align-items: center; gap: 16px; padding: 11px 6px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.mg { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.mg small { display: block; font-weight: 400; }
.ms { font: 20px var(--display); white-space: nowrap; }
.ms b { font-weight: 400; color: var(--muted); }
.ms b.win { color: var(--c); }
.ms i { font-style: normal; color: var(--muted); margin: 0 6px; }
.mw { font-weight: 600; }
.ma small { display: block; }
.mt { color: var(--muted); text-align: right; }
.ma .ph { display: none; }

.streams { list-style: none; margin: 0; padding: 0; }
.streams li { display: grid; grid-template-columns: 1.3fr 1.6fr 1fr; gap: 16px; padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: 14px; align-items: center; }
.streams li span:first-child { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.streams li span:last-child { text-align: right; }

/* game page */
.ghead { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ghead .lede { margin: 6px 0 0; }
.store { margin-left: auto; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 700; padding: 12px 18px; border-radius: 12px; display: grid; line-height: 1.3; }
.store small { color: #c9d3cc; font-weight: 400; }
.store:hover { background: var(--deep); }

/* charts */
.chart { width: 100%; height: auto; display: block; }
.chart .g { stroke: var(--line); stroke-width: 1; }
.chart .ax { font: 12px var(--body); fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.vb-k { display: grid; gap: 0; }
.vbar { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.vb { display: flex; height: 16px; border-radius: 6px; overflow: hidden; background: var(--soft); }
.vb i { display: block; height: 100%; }
.vb-l { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.vb-l i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }

/* match page */
.score-head { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); align-items: end; gap: 10px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 28px; }
.score-head .mid { grid-column: 1 / -1; text-align: center; display: grid; gap: 2px; margin-bottom: 6px; }
.score-head .mid span { font: 22px var(--display); }
.score-head .mid small { color: var(--muted); }
.score-head .side { display: grid; justify-items: center; gap: 2px; text-align: center; min-width: 0; }
.score-head .side .chip { white-space: normal; justify-content: center; }
.score-head .side b { font: clamp(34px, 5vw, 56px) var(--display); font-weight: 400; color: var(--c); opacity: .55; line-height: 1.1; }
.score-head .side b.win { opacity: 1; }
.score-head .side small { font-size: 12px; color: var(--muted); }
.eyes { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; }
.eye { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; border-top: 4px solid var(--c); }
.eye img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; display: block; background: #ddd; }
.eye figcaption { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 10px 12px 12px; font-size: 13px; align-items: center; }
.eye .chip { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.eye .at, .eye .lat { color: var(--muted); text-align: right; }
.eye code { grid-column: 1 / -1; font: 13px var(--mono); background: var(--soft); border-radius: 6px; padding: 5px 8px; overflow-wrap: anywhere; }
.eye .vd { font-weight: 700; filter: brightness(.85); }

/* matches page */
.fchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.fchip { text-decoration: none; font-size: 13px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; background: var(--card); }
.fchip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.more { margin: 18px auto 0; display: block; font: 600 14px var(--body); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 10px 22px; cursor: pointer; min-height: 44px; }

/* method */
.prose { max-width: 720px; }
.prose h1 { margin-bottom: 14px; }
.prose h2 { margin: 40px 0 10px; }
.prose li { margin-bottom: 6px; }
.prose dt { font-weight: 700; margin-top: 14px; }
.prose dd { margin: 2px 0 0; color: #3d5248; }

.foot { border-top: 1px solid var(--line); padding: 22px 0 30px; font-size: 13px; color: var(--muted); }
.foot-in { display: flex; justify-content: space-between; gap: 8px 18px; flex-wrap: wrap; }
.foot .biz { font-style: normal; width: 100%; font-size: 12px; }

@media (max-width: 900px) {
  .trends, .trends.two, .gcharts { grid-template-columns: 1fr; }
  .lnote { margin-left: 0; }
  .intro { grid-template-columns: 1fr; gap: 32px; }
  .grow { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .grow .gn, .grow .go, .lhead { display: none !important; }
  .grow .gs { grid-column: 2 / -1; font-size: 14px; }
  .mrow { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .mrow .mw, .mrow .ma { font-size: 13px; color: var(--muted); font-weight: 400; }
  .mrow .ma { grid-column: 1; }
  .mrow .mw { grid-column: 2; text-align: right; }
  .mrow .mt { grid-row: 2; grid-column: 2; }
  .streams li { grid-template-columns: 1fr; gap: 2px; }
  .streams li span:last-child { text-align: left; }
}
@media (max-width: 900px) { .ma .ph { display: inline; } }
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .top-in { gap: 12px; min-height: 58px; flex-wrap: wrap; padding: 8px 0; }
  .brand { font-size: 19px; }
  .brand img { width: 32px; height: 32px; }
  nav { order: 3; width: 100%; margin: 0; gap: 18px; }
  .watch { margin-left: auto; padding: 7px 12px; font-size: 13px; }
  main { padding-top: 24px; }
  section { margin-top: 44px; }
  .tape { padding: 16px 16px 6px; }
  .tape .trow { grid-template-columns: minmax(0, 1fr) repeat(var(--n, 2), minmax(0, 1fr)); gap: 8px; }
  .tape .trow > b { font-size: 18px; }
  .tape .th small { display: none; }
  .tape .th .chip { font-size: 12px; gap: 5px; }
  .score-head { padding: 16px 12px; gap: 8px 10px; }
  .score-head .side .chip { font-size: 12px; }
  .score-head .side b { font-size: 30px; }
  .vbar { grid-template-columns: 1fr; }
  .vb-l { grid-column: 1; }
  .eyes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .live-in .ls { margin-left: 0; width: 100%; padding-bottom: 8px; }
  .store { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .live-in .dot { animation: none; } }

/* match write-ups and game summaries (bench/site/render.js matchStory, gameInsights) */
.story { max-width: 760px; }
.story h2 { margin: 0 0 10px; }
.story p { color: #3d5248; margin: 0 0 12px; }
.story a { color: var(--deep); font-weight: 600; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 48px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.pager a { text-decoration: none; color: var(--deep); }
.pager a:hover { text-decoration: underline; }

/* match rows without their own page (bench/build.mjs gives pages to the latest and each day's notable matches) */
.mrow.nolink:hover { background: none; }
.ms b + i { margin: 0 4px; }
