/* AI Arena — chart chrome per the reference dataviz palette; roles not raw hex in components. */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f3f2ee;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11,11,11,0.10);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --claude: #eb6834;
  --codex: #2a78d6;
  --seq-lo: #cde2fb; --seq-hi: #0d366b;
  --good: #006300;
  --warn: #fab219;
  --shadow: 0 1px 2px rgba(11,11,11,.04), 0 4px 16px rgba(11,11,11,.05);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #232322;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --baseline: #383835;
  --border: rgba(255,255,255,0.10);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --claude: #d95926;
  --codex: #3987e5;
  --seq-lo: #16324f; --seq-hi: #9ec5f4;
  --good: #0ca30c;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
}

html { font-size: 15px; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 1240px; margin: 0 auto; padding: 0 24px 40px; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 28px; padding: 16px 0 14px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; text-decoration: none; width: 176px; flex: none; }
.brand-mark { display: block; }
.brand-mark .bm-txt { fill: var(--ink); font-family: inherit; font-size: 16.5px; font-weight: 750; }
.tabs { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.tab {
  border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 550;
  padding: 6px 13px; border-radius: 8px; cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tab { position: relative; }
.tab-dot {
  position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--warn); box-shadow: 0 0 0 2px var(--surface-2);
}
.tab-dot.run { background: var(--s1); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* header help popover */
.topbar-right { position: relative; }
.popover {
  position: absolute; top: 40px; right: 0; z-index: 60; width: 320px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 14px 16px; font-size: 13px; color: var(--ink-2); line-height: 1.55;
}
.popover h4 { color: var(--ink); font-size: 13px; margin-bottom: 6px; }
.popover p { margin: 6px 0; }
.popover code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; font-size: 11.5px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.me-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 550; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); padding: 3px 12px 3px 4px; border-radius: 99px; }

/* avatars — circle-masked photos, initial-on-accent fallback */
.avatar { border-radius: 50%; object-fit: cover; display: inline-block; flex: none; border: 1px solid var(--border); }
.av-fallback { color: #fff; font-weight: 700; text-align: center; border: 0; }
.tico { display: inline-block; border-radius: 4px; flex: none; }
/* the source marks are opposite-polarity (light vs dark plate) — invert one per
   theme so both tools always read with the same polarity */
:root[data-theme="dark"] .tico-claude { filter: invert(1) hue-rotate(180deg); }
:root:not([data-theme="dark"]) .tico-codex { filter: invert(1) hue-rotate(180deg); }

/* inline search, styled like the other controls */
input.search {
  font: inherit; font-size: 12.5px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 6px 11px; width: 220px;
}
input.search::placeholder { color: var(--muted); }
input.search:focus { outline: none; border-color: var(--baseline); background: var(--surface); }
.icon-btn { border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 15px; }
.icon-btn:hover { color: var(--ink); }
.icon-btn.txt { width: auto; padding: 0 12px; font-size: 12.5px; font-weight: 550; font-family: inherit; }

/* ---------- shell: sidebar filters + content ---------- */
.shell { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 28px; align-items: start; }
.side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 20px; }
.fgroup { display: flex; flex-direction: column; gap: 3px; }
.flabel { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-bottom: 5px; padding-left: 2px; }
.frow {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: 0; background: none; font: inherit; font-size: 13px; font-weight: 550; color: var(--ink-2);
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
}
.frow:hover { color: var(--ink); background: var(--surface-2); }
.frow.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--border); padding: 5px 9px; }
.frow .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.frow .demo-tag { margin-left: auto; }
.side select.ctl { width: 100%; max-width: none; }
.main { min-width: 0; }
@media (max-width: 940px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .fgroup { min-width: 150px; }
  .brand { width: auto; }
}

/* page-local control rows (category chips, sort) */
.filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 2px; }
.seg button {
  border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 550; color: var(--ink-2);
  padding: 5px 11px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.key { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.key-claude { background: var(--claude); }
.key-codex { background: var(--codex); }
select.ctl {
  font: inherit; font-size: 12.5px; font-weight: 550; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 7px 10px; max-width: 220px; cursor: pointer;
}
select.ctl:hover { background: var(--surface); }
.filter-spacer { flex: 1; }
.codeblock {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; line-height: 1.8;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; color: var(--ink); white-space: pre; overflow-x: auto; margin-top: 8px;
}
.codeblock .cmt { color: var(--muted); }
.pubrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--grid); font-size: 13px; }
.pubrow:last-child { border-bottom: 0; }
.pubrow .p-score { font-size: 11.5px; width: 40px; }
.pubrow .pr-cat { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); width: 90px; flex: none; }
.pubrow .pr-text { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.pubrow .p-copy { margin-left: 0; }
.pub-ok { color: var(--good); font-weight: 650; }

/* ---------- layout ---------- */
.view { display: flex; flex-direction: column; gap: 14px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g23 { grid-template-columns: 2fr 1fr; }
.g32 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 980px) { .g2, .g3, .g23, .g32 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; box-shadow: var(--shadow); min-width: 0;
}
.card h3 { font-size: 13px; font-weight: 650; color: var(--ink-2); margin-bottom: 8px; letter-spacing: .01em; display: flex; align-items: center; gap: 7px; }
.card .sub { font-size: 12px; color: var(--muted); margin: -4px 0 10px; }
.c-info {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  font-size: 10px; font-weight: 700; line-height: 1; cursor: help; padding: 0;
}
.c-info:hover { color: var(--ink); }
.card .chart { width: 100%; }

/* stat tiles — four columns, two on narrow screens */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.t-info {
  position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  font-size: 11px; font-weight: 700; line-height: 1; cursor: help; padding: 0;
}
.t-info:hover { color: var(--ink); }
.tooltip .tt-body { font-size: 12px; color: var(--ink-2); line-height: 1.5; max-width: 280px; }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; box-shadow: var(--shadow);
  position: relative; overflow: hidden; display: flex; flex-direction: column; height: 132px;
}
.tile .t-label { font-size: 12px; color: var(--muted); }
.tile .t-value { font-size: 27px; font-weight: 650; letter-spacing: -0.01em; margin-top: 2px; }
.tile .t-value.hero { font-size: 34px; }
.tile .t-delta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.tile .t-delta .up { color: var(--good); }
/* pure numbers: centred both ways, a size up */
.tile.t-center { justify-content: center; align-items: center; text-align: center; }
.tile.t-center .t-label { position: absolute; top: 14px; left: 16px; right: 16px; text-align: left; }
.tile.t-center .t-value { font-size: 32px; margin-top: 10px; }
/* sparkline pinned flush to the bottom edge; the value centres above it */
.tile.t-spark { padding-bottom: 46px; }
.tile .spark { position: absolute; left: 0; right: 0; bottom: 0; height: 44px; display: block; }

/* legends */
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.legend .li { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.legend .lk { width: 14px; height: 2px; border-radius: 1px; }

/* tooltip */
.tooltip {
  position: fixed; z-index: 99; pointer-events: none; max-width: 320px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 11px; font-size: 12.5px; box-shadow: var(--shadow);
}
.tooltip .tt-title { font-weight: 650; font-size: 12px; margin-bottom: 4px; color: var(--ink-2); }
.tooltip .tt-row { display: flex; align-items: center; gap: 7px; padding: 1px 0; }
.tooltip .tt-key { width: 12px; height: 2.5px; border-radius: 2px; flex: none; }
.tooltip .tt-val { font-weight: 650; margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.tooltip .tt-lbl { color: var(--ink-2); }

/* leaderboard */
.demo-tag { font-size: 9.5px; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--border); padding: 1px 5px; border-radius: 5px; }
.seg .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.lb th.hl, .lb td.hl { background: var(--surface-2); }

.lb { width: 100%; border-collapse: collapse; font-size: 13px; }
.lb th { text-align: right; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--grid); }
.lb th:first-child { text-align: left; }
.lb td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--grid); font-variant-numeric: tabular-nums; }
.lb td:first-child { text-align: left; }
.lb tr:last-child td { border-bottom: 0; }
.lb .u { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.lb .u .dot { width: 9px; height: 9px; border-radius: 50%; }
.lb .bar-cell { position: relative; }
.lb .mini-bar { position: absolute; left: 0; top: 20%; height: 60%; opacity: .14; border-radius: 3px; }
.lb tr { cursor: pointer; }
.lb tr:hover td { background: var(--surface-2); }

/* prompt cards — one rigid anatomy so every card reads identically:
   [score | category | date] / [who · where] / text / note / tags / copy.
   The Prompts page is a single wide column for comfortable inspection;
   .pcards.grid3 is the compact multi-column variant used in previews. */
.pcards { display: grid; grid-template-columns: 1fr; gap: 16px; width: 100%; align-items: stretch; }
.pcards.grid3 { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); max-width: none; gap: 14px; }
.pcards.grid3 .p-text { height: 220px; font-size: 12px; }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.pcard.p-off { opacity: .55; }
.pcard .p-head { display: flex; align-items: center; gap: 9px; }
.p-score {
  font-weight: 700; font-size: 12.5px; border-radius: 7px; padding: 2px 0; width: 46px; text-align: center;
  flex: none; background: var(--surface-2); border: 1px solid var(--border); font-variant-numeric: tabular-nums;
}
.p-score.s8 { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
.p-cat { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.p-date { margin-left: auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.p-who { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); min-height: 26px; }
.p-who .sep { color: var(--muted); }
.p-actions { margin-left: auto; display: inline-flex; gap: 7px; }
.p-text {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; line-height: 1.65;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px;
  white-space: pre-wrap; overflow-wrap: break-word; max-height: 480px; overflow-y: auto; color: var(--ink); flex: none;
}
.p-note { font-size: 13px; color: var(--ink-2); }
.p-note b { color: var(--ink); }
.p-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.p-tag { font-size: 10.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); padding: 2px 7px; border-radius: 6px; }
.p-copy { margin-left: auto; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 11.5px; padding: 3px 10px; border-radius: 7px; cursor: pointer; flex: none; }
.p-copy:hover { color: var(--ink); }

/* insights */
.insights { display: flex; flex-direction: column; gap: 8px; }
.insight { display: flex; gap: 10px; font-size: 13px; color: var(--ink-2); }
.insight .i-mark { color: var(--s1); flex: none; }
.insight b { color: var(--ink); font-weight: 650; }

/* sessions table */
.sess-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sess-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 5px 8px; border-bottom: 1px solid var(--grid); cursor: pointer; white-space: nowrap; }
.sess-table th.num, .sess-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sess-table td { padding: 6px 8px; border-bottom: 1px solid var(--grid); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess-table tr:hover td { background: var(--surface-2); }
.sess-table .t-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2.5px; margin-right: 6px; }

/* about — readable measure, generous leading */
.prose { max-width: 700px; font-size: 14.5px; color: var(--ink-2); line-height: 1.7; }
.prose h1, .prose h2, .prose h3 { color: var(--ink); margin: 28px 0 10px; line-height: 1.3; }
.prose h1 { font-size: 21px; } .prose h3 { font-size: 15px; }
.prose h2 { font-size: 17px; padding-bottom: 7px; border-bottom: 1px solid var(--grid); }
.prose td.num, .prose th.num { text-align: right; font-variant-numeric: tabular-nums; }
.prose tr.guess td { color: var(--ink-2); }
.prose > :first-child, .prose h2:first-child { margin-top: 4px; }
.prose p { margin: 12px 0; }
.prose b { color: var(--ink); font-weight: 650; }
.prose ul { margin: 10px 0; }
.prose li { margin: 7px 0 7px 20px; padding-left: 2px; }
.prose code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 12.5px; }
.prose blockquote { border-left: 3px solid var(--baseline); padding: 2px 0 2px 14px; color: var(--muted); margin: 14px 0; font-style: italic; }
.prose table { border-collapse: collapse; margin: 14px 0; font-size: 13.5px; line-height: 1.5; }
.prose th, .prose td { border: 1px solid var(--grid); padding: 9px 13px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); color: var(--ink); font-weight: 650; }

/* setup */
.btn {
  font: inherit; font-size: 13px; font-weight: 600; color: #fff; background: var(--s1);
  border: 0; border-radius: 9px; padding: 8px 16px; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.subtle { background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); }
input.text {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 9px; padding: 7px 11px; width: 260px;
}
input.text:focus { outline: none; border-color: var(--baseline); background: var(--surface); }
.field { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.field label { font-size: 12px; color: var(--muted); min-width: 90px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 3px 8px; }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0; line-height: 1; }
.chip button:hover { color: var(--ink); }
.joblog {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; line-height: 1.6;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; color: var(--ink-2); white-space: pre-wrap; max-height: 200px; overflow-y: auto; margin-top: 10px;
}
.setup-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.avatar-lg { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }

/* habits — technique profiles */
.habit-summary { font-size: 14px; color: var(--ink); line-height: 1.6; margin: 4px 0 14px; max-width: 760px; }
.habit { padding: 10px 0; border-top: 1px solid var(--grid); }
.habit-head { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.habit-str { color: var(--s1); font-size: 11px; letter-spacing: 1px; flex: none; }
.habit-detail { font-size: 13px; color: var(--ink-2); margin: 4px 0 2px 0; line-height: 1.55; max-width: 760px; }
.habit-quote {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; color: var(--muted);
  margin-top: 5px; padding-left: 10px; border-left: 2px solid var(--grid); line-height: 1.5;
}
.pb-row { display: flex; gap: 18px; padding: 14px 0; border-top: 1px solid var(--grid); align-items: flex-start; }
.pb-who { display: flex; align-items: center; gap: 9px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; flex: none; width: 150px; text-align: left; padding: 0; }
.pb-who:hover b { text-decoration: underline; }
.pb-body { min-width: 0; flex: 1; }
.pb-summary { font-size: 13px; color: var(--ink-2); line-height: 1.65; margin-bottom: 12px; max-width: 900px; }
.pb-traits { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 5px 24px; }
.pb-trait { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--ink); }
.pb-trait .habit-str { flex: none; }

.pb-detail { margin-top: 6px; }
.tmpl-head { font-size: 13px; color: var(--ink-2); margin: 16px 0 4px; }
.tmpl-head b { color: var(--ink); }
.tmpl { margin-top: 14px; }
.tmpl-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 650; color: var(--ink); margin-bottom: 6px; }
.tmpl-lead { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.tmpl-meta { color: var(--ink-2); font-weight: 550; }
.tmpl-body.scroll { max-height: 420px; overflow-y: auto; }
.tmpl.p-off { opacity: .55; }
.tmpl:first-child { margin-top: 2px; }
.tmpl-body {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; line-height: 1.6;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; color: var(--ink); white-space: pre-wrap; overflow-wrap: break-word;
}

/* pipeline — the one workflow: collect → grade → profile → share */
.steps { display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 0 14px; padding: 16px 0; border-top: 1px solid var(--grid); }
.step:first-child { border-top: 0; padding-top: 4px; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--ink-2); font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step.done .step-num { background: var(--s1); border-color: var(--s1); color: #fff; }
.step-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.step-title { font-size: 14px; font-weight: 650; color: var(--ink); }
.step-status { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.step-status b { color: var(--ink); }
.step-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 9px; }
.step-note { font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 7px; max-width: 820px; }
/* About: steps inherit the prose measure and read as document sections */
.about-steps { margin-top: 6px; }
.about-steps .step-note { max-width: none; font-size: 13px; color: var(--ink-2); line-height: 1.65; }
.about-steps .step-title { font-size: 14.5px; }

/* run controls */
input.slider { width: 260px; accent-color: var(--s1); }
.est { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.est b { color: var(--ink); }

.empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 14px; }
.empty code { background: var(--surface-2); padding: 2px 8px; border-radius: 6px; }
.foot { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 11.5px; margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--grid); }
.foot em { font-style: normal; color: var(--ink-2); }

svg text { font-family: inherit; }
.axis-lbl { font-size: 10.5px; fill: var(--muted); }
.bar-lbl { font-size: 11px; fill: var(--ink-2); font-weight: 600; }
.mini-hint { font-size: 11.5px; color: var(--muted); }
button.linky { border: 0; background: none; color: var(--s1); cursor: pointer; font: inherit; font-size: 12.5px; padding: 0; }

/* read-only hosted demo */
.me-pill.demo { padding: 3px 12px; }
a.icon-btn { display: inline-flex; align-items: center; text-decoration: none; }
a.icon-btn.gh { background: linear-gradient(120deg, #1c5cab, #3987e5 55%, #22d3ee); color: #fff; border: 0; font-weight: 650; }
a.icon-btn.gh:hover { filter: brightness(1.1); color: #fff; }
