/* Strategy Test. Palette and type follow the UX prototype: IBM Plex Sans for text, Unbounded for the display
   headings, IBM Plex Mono for numbers. Light and dark themes via prefers-color-scheme. */
:root {
  --bg: #F2F4F6; --card: #FFFFFF; --sunk: #E8ECF0; --text: #121820; --muted: #5B6672; --line: #D7DDE3;
  --accent: #1F4FD8; --accent-soft: #E5EBFB; --accent-text: #FFFFFF;
  --good: #0E7A55; --good-soft: #DFF2EA; --bad: #B4382C; --bad-soft: #F8E5E2; --warn: #8E6210; --warn-bg: #F6EDD6; --warn-line: #E8D7A8;
  --scrim: rgba(18, 24, 32, .45); --shadow: 0 10px 30px rgba(18, 24, 32, .12);
  --f-display: "Unbounded", "IBM Plex Sans", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 10px; --top: 60px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F141A; --card: #161C24; --sunk: #1E2630; --text: #E5EAF0; --muted: #97A3B0; --line: #2A3440;
    --accent: #7598FF; --accent-soft: #1C2848; --accent-text: #0A1022;
    --good: #45C796; --good-soft: #11301F; --bad: #F27C6F; --bad-soft: #3A1C18; --warn: #E4B65C; --warn-bg: #352A12; --warn-line: #5A4920;
    --scrim: rgba(0, 0, 0, .6); --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--f-body);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 10px; }
h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line);
  padding: env(safe-area-inset-top) 16px 0;
}
.topbar-in { max-width: 1120px; margin: 0 auto; min-height: var(--top); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo {
  font-family: var(--f-display); font-weight: 600; font-size: 16px; letter-spacing: -.01em; color: var(--text);
  text-decoration: none; display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.logo-mark { width: 24px; height: 24px; border-radius: 6px; background: #1F4FD8; display: grid; place-items: center; flex: none; }
.badge {
  font-family: var(--f-mono); font-size: 11px; color: var(--warn); background: var(--warn-bg); padding: 2px 6px;
  border-radius: 4px; letter-spacing: .04em; text-transform: uppercase;
}
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.nav-btn {
  background: none; border: 0; padding: 8px 12px; border-radius: 8px; color: var(--muted); cursor: pointer;
  font-weight: 500; white-space: nowrap; min-height: 40px;
}
.nav-btn:hover { background: var(--sunk); color: var(--text); }
.nav-btn[aria-current="page"] { color: var(--text); background: var(--sunk); }
.spacer { flex: 1; }
.lang-select { width: auto; }
.acct {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; white-space: nowrap; font-size: 14px; font-weight: 500; min-height: 38px;
}
.acct:hover { border-color: var(--muted); }
.acct.reg { cursor: default; padding-left: 6px; max-width: 240px; overflow: hidden; }
.acct.reg #account-email { overflow: hidden; text-overflow: ellipsis; }
.acct-dot {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-text);
  display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; text-transform: uppercase;
}
.acct-wrap { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 760px) {
  .topbar-in { gap: 8px; padding-bottom: 6px; }
  .main-nav { order: 10; width: 100%; margin: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .badge { display: none; }
  .acct.reg { max-width: 150px; }
  .logo { font-size: 14px; gap: 6px; }
  .lang-select { font-size: 13px; padding: 0 2px; min-height: 34px; max-width: 96px; }
  .acct { padding: 4px 10px; min-height: 34px; font-size: 13px; }
  .main-nav { gap: 2px; }
  .nav-btn { padding: 6px 8px; font-size: 13px; min-height: 36px; }
}

/* ------------------------------------------------ layout */
main, footer { max-width: 920px; margin: 0 auto; padding: 0 16px; }
main { padding-top: 32px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 28px; }
.view { display: flex; flex-direction: column; gap: 20px; }
.view[hidden], .view-block[hidden] { display: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0; }
.sub-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 12px 0; background: var(--card); }
.banner { max-width: 888px; margin: 16px auto 0; padding: 10px 14px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.fine { font-size: 12px; }
.meta { color: var(--muted); font-size: 14px; margin: 4px 0 8px; }

/* ------------------------------------------------ hero and composer */
.hero { display: flex; flex-direction: column; gap: 14px; }
.eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0; }
.hero h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(26px, 4.6vw, 44px); letter-spacing: -.02em; max-width: 26ch; }
.lede { font-size: 17px; color: var(--muted); max-width: 62ch; margin: 0; }
.composer {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); margin-top: 10px;
}
.composer:focus-within { border-color: var(--accent); }
.composer textarea {
  width: 100%; border: 0; background: transparent; resize: vertical; padding: 12px 12px 4px; font-size: 16px;
  min-height: 104px; outline: none;
}
.composer-foot { display: flex; align-items: center; gap: 10px; padding: 6px; flex-wrap: wrap; }
.composer-foot .usage { margin: 0 auto 0 0; flex: 1 1 180px; }
.voice { display: flex; gap: 6px; align-items: center; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.examples .label { font-size: 13px; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.examples .chips { display: contents; }
.chip {
  border: 1px dashed var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: 6px 12px;
  font-size: 13px; cursor: pointer; min-height: 34px; text-align: left;
}
.chip:hover { border-style: solid; border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------ controls */
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.row .primary { margin-left: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--line); font-weight: 500;
  background: var(--card); color: var(--text); cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--sunk); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn.secondary.on, .btn.ghost.on { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.link { border: 0; background: none; color: var(--accent); padding: 0 4px; min-height: 36px; }
.select, .input {
  min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: inherit;
  padding: 0 10px; max-width: 100%;
}
.select.sm { min-height: 36px; font-size: 14px; padding: 0 6px; }
.input { width: 100%; }

/* ------------------------------------------------ plan and results */
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--sunk); color: var(--muted); margin-right: 8px; }
.tag.done { background: var(--good-soft); color: var(--good); }
.tag.failed, .tag.unsupported, .tag.no_data { background: var(--bad-soft); color: var(--bad); }
ul.plain { margin: 6px 0; padding-left: 20px; }
details { margin: 8px 0; }
summary { cursor: pointer; font-weight: 500; min-height: 32px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 500; }
td { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; font-family: var(--f-body); }
.pos { color: var(--good); } .neg { color: var(--bad); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 12px 0; }
.metric { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.metric .label { color: var(--muted); font-size: 12px; }
.metric .value { font-family: var(--f-mono); font-weight: 500; font-size: 16px; font-variant-numeric: tabular-nums; }
.warn { background: var(--warn-bg); color: var(--text); border: 1px solid var(--warn-line); border-radius: 8px; padding: 10px 12px; margin: 6px 0; font-size: 14px; }
.chart { width: 100%; height: auto; min-height: 140px; display: block; color: var(--accent); }
.chart-axis { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; font-family: var(--f-mono); }

/* ------------------------------------------------ catalog */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.view-block > .hint { margin-bottom: 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
.rcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rcard h3 { margin: 0; }
.rcard p { margin: 0; font-size: 14px; color: var(--muted); }
.rcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-family: var(--f-mono); }
.rcard .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 4px 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rcard .kv dt { color: var(--muted); font-size: 11px; }
.rcard .kv dd { margin: 0; font-family: var(--f-mono); font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; }
.rcard .row { margin-top: auto; padding-top: 6px; }
.rcard .row .primary { margin-left: 0; }
.rcard .btn { min-height: 38px; padding: 0 12px; font-size: 14px; }
.rcard .earlier { color: var(--good); font-size: 13px; }
.big { display: flex; flex-direction: column; gap: 2px; }
.big-num { font-family: var(--f-display); font-weight: 600; font-size: 28px; letter-spacing: -.02em; line-height: 1.1; }
.big.large .big-num { font-size: clamp(34px, 6vw, 52px); }
.big-sub { font-size: 13px; color: var(--muted); }
.sub-card .edited { background: var(--warn-bg); color: var(--text); border-radius: 6px; padding: 6px 10px; font-size: 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-body); font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--sunk); color: var(--muted);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.held_up { background: var(--good-soft); color: var(--good); }
.pill.failed { background: var(--bad-soft); color: var(--bad); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--card); }
.seg button { border: 0; background: none; color: var(--muted); padding: 6px 14px; min-height: 34px; cursor: pointer; border-radius: 6px; }
.seg button[aria-pressed="true"] { background: var(--sunk); color: var(--text); font-weight: 500; }

/* ------------------------------------------------ history */
.history { list-style: none; padding: 0 16px; }
.history li { display: flex; align-items: flex-start; gap: 6px; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.history li .h-open {
  flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: inherit;
  padding: 12px 2px; cursor: pointer; min-height: 52px; display: flex; flex-direction: column; gap: 4px;
}
.history li .h-open:hover .h-text { color: var(--accent); }
.history .h-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.history .h-nums { display: inline-flex; align-items: baseline; gap: 8px; }
.history .h-nums b { font-family: var(--f-display); font-size: 18px; font-weight: 600; }
.history .h-text { overflow-wrap: anywhere; }
.history .when { color: var(--muted); font-size: 12px; display: block; font-family: var(--f-mono); }
#history-card .history:empty { display: none; }
#history-filter { margin-bottom: 10px; flex-wrap: wrap; }
.star {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card);
  color: var(--muted); border-radius: 8px; padding: 6px 12px; min-height: 36px; cursor: pointer; font: inherit; font-size: 14px;
}
.star .star-mark { font-size: 18px; line-height: 1; }
.star:hover { color: var(--text); border-color: var(--muted); }
.star.on { color: #B7791F; border-color: #E9C46A; background: rgba(233, 196, 106, .12); }
.star.sm { border: 0; background: none; padding: 12px 8px; min-width: 44px; min-height: 44px; justify-content: center; }
.star.sm.on { background: none; }
.res-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ------------------------------------------------ statistics (admins) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.tile b { font-family: var(--f-display); font-size: 26px; font-weight: 600; }
.tile span { color: var(--muted); font-size: 13px; }
svg.bars { width: 100%; height: auto; display: block; }
svg.bars rect { fill: var(--accent); }
svg.bars .base { stroke: var(--line); }
svg.bars text { fill: var(--muted); font-size: 11px; font-family: var(--f-mono); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
table.mini { width: 100%; border-collapse: collapse; font-size: 14px; }
table.mini td { padding: 5px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
table.mini td.num { text-align: right; font-family: var(--f-mono); padding-left: 12px; }

/* ------------------------------------------------ sign-in dialog */
.modal { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.dialog {
  background: var(--card); border-radius: 14px; max-width: 420px; width: 100%; padding: 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px; position: relative;
}
.dialog h2 { font-family: var(--f-display); font-size: 20px; padding-right: 32px; margin: 0; }
.dialog .hint { margin: 0; }
.dialog .x {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 8px; border: 0; background: none;
  cursor: pointer; font-size: 22px; line-height: 1; color: var(--muted);
}
.dialog .x:hover { background: var(--sunk); }

/* ------------------------------------------------ learning pages (server-rendered) */
.article { max-width: 920px; }
.article section { display: flex; flex-direction: column; gap: 12px; }
.article section p { margin: 0; max-width: 72ch; }
.article h2 { font-size: 22px; margin: 8px 0 0; }
.display-h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(26px, 4.2vw, 40px); letter-spacing: -.02em; }
.takeaway { background: var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; font-weight: 500; }
.learn-table td a { font-family: var(--f-body); }
.learn-langs { font-size: 13px; display: flex; gap: 4px; flex-wrap: wrap; }
.learn-langs a { color: var(--muted); text-decoration: none; padding: 2px 4px; }
.learn-langs a[aria-current="page"] { color: var(--text); font-weight: 600; }
.cta .btn { text-decoration: none; }
a.nav-btn { text-decoration: none; display: inline-flex; align-items: center; }
footer { color: var(--muted); font-size: 13px; padding-bottom: 32px; border-top: 1px solid var(--line); padding-top: 20px; }
@media (max-width: 520px) {
  main { padding-top: 22px; }
  .composer-foot .btn.primary { width: 100%; }
  .card { padding: 16px; }
}

/* ------------------------------------------------ result view (train / validation / out-of-sample) */
#results:has(.result) { background: none; border: 0; padding: 0; }
.result { display: flex; flex-direction: column; gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 10px; }
.res-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.res-head h2.display { font-family: var(--f-display); font-weight: 600; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; margin: 4px 0 0; }
.pill.fragile, .pill.few_trades { background: var(--warn-bg); color: var(--warn); }
.verdict { border-radius: var(--radius); padding: 16px 18px; }
.verdict.up { background: var(--good-soft); } .verdict.down { background: var(--bad-soft); } .verdict.warn { background: var(--warn-bg); }
.verdict b { display: block; font-size: 16px; }
.verdict.up b { color: var(--good); } .verdict.down b { color: var(--bad); } .verdict.warn b { color: var(--warn); }
.verdict p { margin: 4px 0 10px; font-size: 14px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.checks .mono { font-family: var(--f-mono); font-size: 12px; text-align: right; opacity: .85; }
.ck { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--card); }
.ck.ok { color: var(--good); } .ck.no { color: var(--bad); } .ck.na { color: var(--muted); }
@media (max-width: 520px) { .checks li { grid-template-columns: 22px minmax(0, 1fr); } .checks .mono { grid-column: 2; text-align: left; } }
.summary-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.summary-chips span { font-size: 13px; background: var(--sunk); border-radius: 6px; padding: 4px 9px; }
.editor-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px 16px; }
.editor { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: 12px; color: var(--muted); }
.input.sm { min-height: 36px; font-family: var(--f-mono); font-size: 14px; }
.chart-card { display: flex; flex-direction: column; gap: 10px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 18px; vertical-align: middle; margin-right: 6px; }
.legend .lg-eq { border-top: 2px solid var(--accent); }
.legend .lg-hold { border-top: 2px dashed var(--muted); }
.legend .lg-worst { width: 12px; height: 12px; border-radius: 2px; background: var(--bad); opacity: .35; }
.chart-wrap { overflow-x: auto; }
.chart.big { min-height: 0; }
.chart .band-oos { fill: var(--accent-soft); }
.chart .band-val { fill: var(--sunk); }
.chart .worst-band { fill: var(--bad); opacity: .18; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .grid.base { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart .tick { fill: var(--muted); font-family: var(--f-mono); font-size: 11px; }
.chart .band-label { fill: var(--muted); font-size: 11px; font-family: var(--f-body); }
.chart .band-label.oos { fill: var(--accent); font-weight: 600; }
.chart .line-eq { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart .line-hold { fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-dasharray: 4 4; }
.chart .dot-eq { fill: var(--accent); }
.depth { display: flex; flex-direction: column; gap: 8px; font-size: 13px; border-top: 1px solid var(--line); padding-top: 12px; }
.depth > div { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; align-items: start; }
.depth .sw { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); margin-top: 3px; }
.depth .sw.val { background: var(--sunk); } .depth .sw.oos { background: var(--accent-soft); border-color: var(--accent); border-left-width: 3px; }
table.seg-table { min-width: 480px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg-table .oos { background: var(--accent-soft); }
.parts-line { font-size: 16px; font-weight: 500; margin: 0; }
.parts { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.parts .pr { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 80px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.parts .pr.total { font-weight: 600; border-bottom: 0; }
.parts .pl { font-size: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.parts .pl small { font-size: 12px; color: var(--muted); font-weight: 400; }
.parts .pr b { text-align: right; font-size: 14px; font-family: var(--f-mono); }
.pb { position: relative; height: 12px; background: var(--sunk); border-radius: 3px; }
.pb::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--muted); }
.pb i { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.pb i.pos { background: var(--good); } .pb i.neg { background: var(--bad); }
@media (max-width: 560px) { .parts .pr { grid-template-columns: minmax(0, 1fr) 80px; } .parts .pb { grid-column: 1 / -1; grid-row: 2; } }
.card h3 { margin: 0; }
.card.stack p { margin: 0; }
.worst { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--bad); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.worst > b { font-size: 16px; }
.worst p { font-size: 14px; margin: 0; max-width: 72ch; }
.kv.kv4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kv.kv4 dt { font-size: 11px; color: var(--muted); }
.kv.kv4 dd { margin: 0; font-family: var(--f-mono); font-size: 14px; font-weight: 500; }
.guest-note { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; }
#results > .seg { align-self: flex-start; margin-bottom: 14px; flex-wrap: wrap; }
