:root {
  color-scheme: light;
  --page: #f9f9f7; --surface: #fcfcfb; --ink: #0b0b0b; --ink2: #52514e; --muted: #898781;
  --grid: #e1e0d9; --axis: #c3c2b7; --border: rgba(11,11,11,.10); --wash: rgba(11,11,11,.05);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --other: #b5b3ab;
  /* Data is Claude clay orange (the logo coin); --accent-text is the darker step for small text. */
  --accent: #d97757; --accent-text: #b4532f; --track: #f5ded4; --warning: #fab219; --critical: #b42318; --good: #0a7d4f;
  --shadow: 0 4px 16px rgba(0,0,0,.10);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --ink: #f0efec; --ink2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --border: rgba(255,255,255,.10); --wash: rgba(255,255,255,.06);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --other: #5b5a55;
    --accent: #e0805f; --accent-text: #f0a184; --track: #4a2a1f; --critical: #f2545b; --good: #0ca30c; --shadow: 0 4px 16px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --ink: #f0efec; --ink2: #c3c2b7; --muted: #898781;
  --grid: #2c2c2a; --axis: #383835; --border: rgba(255,255,255,.10); --wash: rgba(255,255,255,.06);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --other: #5b5a55;
  --accent: #e0805f; --accent-text: #f0a184; --track: #4a2a1f; --critical: #f2545b; --good: #0ca30c; --shadow: 0 4px 16px rgba(0,0,0,.5);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); }
body { font: 14px/1.5 "Inter", "Segoe UI Variable Text", system-ui, -apple-system, "Segoe UI", sans-serif; overflow-x: clip; }
:root { --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace; }
main { max-width: 1200px; margin: 0 auto; padding: 20px clamp(16px, 3vw, 32px) 56px; }
main.narrow { max-width: 720px; }
a { color: var(--ink); text-underline-offset: 2px; }
h1 { font-size: 22px; font-weight: 650; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
h3 { font-size: 13px; font-weight: 600; color: var(--ink2); margin: 0 0 8px; }
p { margin: 6px 0; }
.sub, .hint { color: var(--ink2); font-size: 13px; }
.muted { color: var(--muted); }
code, pre, kbd { font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
code { background: var(--wash); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }

/* header & nav */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { width: 28px; height: 28px; }
nav.tabs { display: flex; gap: 2px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 10px; padding: 3px; background: var(--surface); }
nav.tabs a { text-decoration: none; color: var(--ink2); padding: 5px 12px; border-radius: 7px; font-size: 13.5px; }
nav.tabs a:hover { background: var(--wash); }
nav.tabs a[aria-current="page"] { background: var(--ink); color: var(--surface); font-weight: 600; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; margin-bottom: 10px; }
.card-head p { margin: 2px 0 0; color: var(--ink2); font-size: 13px; }
.banner { border: 1px solid var(--border); border-left: 3px solid var(--ink); background: var(--surface); padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.banner.warn { border-left-color: var(--warning); }
.banner.bad { border-left-color: var(--critical); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spacer { flex: 1; }

/* controls */
button, .btn { font: inherit; font-size: 13.5px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  padding: 7px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { background: var(--wash); }
button.primary, .btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); font-weight: 600; }
button.primary:hover { opacity: .9; }
button.danger { color: var(--critical); }
button.link { border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, .seg button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
input[type=text], input[type=number], select { font: inherit; font-size: 14px; color: var(--ink); background: var(--page); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px; min-width: 0; }
input[type=number] { width: 90px; }
.field { display: grid; gap: 4px; font-size: 13px; color: var(--ink2); }
.readonly { color: var(--ink); font-size: 14px; padding: 2px 0; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
label.check input { margin-top: 3px; }
.form { display: grid; gap: 12px; max-width: 420px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 9px; padding: 2px; background: var(--surface); }
.seg button { font-size: 13px; color: var(--ink2); background: none; border: 0; border-radius: 7px; padding: 5px 11px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); font-weight: 600; }

/* prompt box */
.prompt { position: relative; background: var(--page); border: 1px solid var(--border); border-radius: 10px; margin: 10px 0; }
.prompt .pbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--border); }
.prompt pre { margin: 0; padding: 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 340px; overflow: auto; line-height: 1.5; }
.steps { margin: 8px 0 0; padding-left: 20px; color: var(--ink2); font-size: 13px; }
.steps li { margin: 3px 0; }
.status { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--wash); font-size: 13.5px; }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.status.waiting .dot { animation: pulse 1.4s ease-in-out infinite; background: var(--accent); }
.status.done .dot { background: var(--good); }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .status.waiting .dot { animation: none; } }

/* leaderboard */
.board { display: grid; gap: 2px; }
.brow { display: grid; grid-template-columns: 28px minmax(0, 1.2fr) minmax(0, 2fr); gap: 12px; align-items: center; padding: 10px 6px; border-radius: 8px; }
.brow + .brow { border-top: 1px solid var(--grid); }
.brow.me { background: var(--wash); }
.rank { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; text-align: center; }
.who { min-width: 0; }
.who .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.who .meta { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.you { font-size: 11px; font-weight: 600; color: var(--ink2); border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; }
.swatch.hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.metric { min-width: 0; }
.metric .line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.metric .big { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.metric .detail { color: var(--ink2); font-size: 12px; }
.meter { position: relative; height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; margin-top: 6px; }
.meter > div { height: 100%; border-radius: 4px; background: var(--accent); }
.meter.est > div { background: repeating-linear-gradient(135deg, var(--accent) 0 4px, color-mix(in srgb, var(--accent) 55%, var(--surface)) 4px 7px); }
/* Past 100% (a reset used mid-week) the meter goes round again in a darker shade, over the full first lap. */
.meter > div.lap { position: absolute; left: 0; top: 0; background: color-mix(in srgb, var(--accent) 55%, var(--ink)); box-shadow: 2px 0 0 var(--surface); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--border); color: var(--ink2); white-space: nowrap; }
.badge.hit { color: var(--critical); border-color: color-mix(in srgb, var(--critical) 45%, transparent); }
.badge.hit::before { content: "▲"; font-size: 9px; }
.badge.sweet { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.dots { display: flex; gap: 4px; margin-top: 6px; }
.dots span { width: 14px; height: 14px; border-radius: 4px; background: var(--wash); border: 1px solid var(--border); }
.dots span.sweet { background: var(--good); border-color: var(--good); }
.dots span.hit { background: none; border-color: var(--critical); position: relative; }
.dots span.hit::after { content: "▲"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 8px; color: var(--critical); }
.dots span.played { background: color-mix(in srgb, var(--ink2) 25%, transparent); }
.mix { display: flex; height: 10px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--surface); margin-top: 6px; }
.mix > div { height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink2); margin: 2px 0 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.legend i.line { height: 3px; border-radius: 2px; width: 14px; }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .reflabel { fill: var(--ink2); }
.heat { display: grid; gap: 3px; align-items: center; font-size: 12px; }
.heat .lab { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.heat .cell { aspect-ratio: 1; border-radius: 3px; background: var(--wash); min-width: 6px; }
.heat .cell.off { background: none; border: 1px dashed var(--border); }
.heat .cell.act { background: none; border: 1.5px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.heat .colhead { color: var(--muted); font-size: 10.5px; text-align: center; overflow: visible; white-space: nowrap; }
.empty { color: var(--muted); padding: 28px 0; text-align: center; }
.tip { position: fixed; z-index: 10; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; font-size: 12.5px; box-shadow: var(--shadow); min-width: 160px; max-width: 300px; display: none; }
.tip .t { color: var(--ink2); margin-bottom: 4px; }
.tip .r { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tip .r b { font-weight: 600; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.tip .r i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tip .r span { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; }
details { margin-top: 10px; }
summary { cursor: pointer; color: var(--ink2); font-size: 13px; }
.tablewrap { overflow-x: auto; margin-top: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
th, td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--grid); white-space: nowrap; font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--ink2); font-weight: 600; }

/* lists */
.list { display: grid; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--grid); flex-wrap: wrap; }
.item:first-child { border-top: 0; }
.item .grow { flex: 1; min-width: 160px; }
.copyline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copyline code { padding: 7px 10px; font-size: 13px; flex: 1; min-width: 0; }

/* profile: role chips (multi-select) and the line on what they're working on */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.chip { border-radius: 999px; padding: 8px 15px; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); transition: background-color .15s, color .15s, border-color .15s; }
.chip:hover { border-color: var(--ink2); background: var(--surface); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); font-weight: 600; }
.chip[aria-pressed="true"]::before { content: "✓ "; }
.chip.other { border-style: dashed; color: var(--ink2); }
.other-box input { width: 150px; border-radius: 999px; padding: 7px 14px; font-size: 14px; }
.chips.small { gap: 6px; margin: 10px 0 0; }
.chips.small .chip { padding: 3px 10px; font-size: 12.5px; color: var(--ink2); }
.chips.small .chip[aria-pressed="true"] { color: var(--surface); }
.chips.small .chip[aria-pressed="true"]::before { content: none; }
.flabel { display: block; font-size: 13px; color: var(--ink2); margin-top: 4px; }
.flabel + .chips { margin-top: 6px; }
.welcome .field { margin-top: 10px; }
.welcome .acts { margin-top: 16px; }
.hint.suggest { color: var(--ink2); }
.who .about { color: var(--ink2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }

/* signed-out call to action */
/* The one call to action: big, in ink (white in dark mode). Orange stays in the logo and Claude data. */
.btn.mega { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 17px 34px; font-size: 19px; font-weight: 700;
  border-radius: 14px; border: 0; color: var(--surface); text-decoration: none; background: var(--ink);
  box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--ink) 45%, transparent); transition: transform .15s ease, box-shadow .15s ease; }
.btn.mega:hover { background: color-mix(in srgb, var(--ink) 86%, var(--surface)); transform: translateY(-1px); box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--ink) 55%, transparent); }
.btn.mega:active { transform: translateY(1px); }
.btn.mega .arrow { display: inline-block; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(3px); } }
.btn.mega:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.hero .cta { margin: 18px 0 4px; }
/* The join message card. */
.join-card textarea { display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 14px 16px; border: 0; border-radius: 0 0 10px 10px; resize: vertical;
  background: transparent; color: var(--ink); font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 150px; }
.join-card textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.seg.small button { font-size: 12px; padding: 3px 9px; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.acts .btn.open { text-decoration: none; }
.join-card .foot { margin-top: 12px; }
.card.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 transparent; } 20% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 40%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 560px) { .btn.mega { width: 100%; box-sizing: border-box; padding: 16px 20px; font-size: 18px; } .acts > * { flex: 1 1 auto; text-align: center; } }
@media (prefers-reduced-motion: reduce) { .btn.mega .arrow, .card.flash { animation: none; } .btn.mega { transition: none; } }
.cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 6px; }
.btn.big, button.big { padding: 10px 18px; font-size: 15px; border-radius: 10px; }
.top .btn.primary { padding: 6px 14px; }
.feats { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 16px; }
.feats li { font-size: 13px; color: var(--ink2); padding-left: 18px; position: relative; }
.feats li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }

/* AI tool switcher */
.toolbar { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin: 0 0 14px; }

/* token totals */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.stat { background: var(--page); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.stat .label { font-size: 12.5px; color: var(--ink2); }
.stat .value { font-size: 26px; font-weight: 650; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; margin: 2px 0 1px; white-space: nowrap; }
.stat .detail { font-size: 12px; color: var(--muted); }

/* signed-out preview of the leaderboard: cycles through the Usage %, Tokens and Streaks rankings */
.demo { background: var(--page); border: 1px solid var(--border); border-radius: 12px; padding: 12px 12px 4px; margin: 18px 0 6px; }
.demo-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.demo-tabs { display: flex; gap: 4px; }
.demo-tabs span { font-size: 12px; font-weight: 600; color: var(--muted); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); transition: background-color .4s, color .4s, border-color .4s; }
.demo-tabs span.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.demo-when { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.demo-list { position: relative; }
.demo .demo-row { position: absolute; left: 0; right: 0; top: 0; border-top: 0; transition: transform .75s cubic-bezier(.2, .75, .2, 1); }
.demo .viz { position: relative; height: 12px; margin-top: 6px; }
.demo .viz .meter { position: absolute; left: 0; right: 0; top: 2px; margin: 0; transition: opacity .4s; }
.demo .viz .dots { position: absolute; left: 0; top: 0; margin: 0; gap: 4px; opacity: 0; transition: opacity .4s; }
.demo .viz .dots span { width: 12px; height: 12px; border-radius: 3px; box-sizing: border-box; transition: background-color .3s, border-color .3s; }
.demo[data-m="streak"] .viz .meter { opacity: 0; }
.demo[data-m="streak"] .viz .dots { opacity: 1; }
.demo .meter .band { position: absolute; left: 80%; width: 20%; top: 0; bottom: 0; background: color-mix(in srgb, var(--good) 35%, transparent); transition: opacity .4s; }
.demo[data-m="tok"] .meter .band { opacity: 0; }
.demo .meter > div { position: relative; transition: width .9s cubic-bezier(.2, .75, .2, 1), background-color .3s; }
.demo .meter > div.hit { background: var(--critical); }
.demo .badge:empty { display: none; }
.demo .badge { animation: pop .35s ease-out; }
.demo-cap { color: var(--ink2); font-size: 13px; min-height: 2.6em; margin: 8px 2px; }
.demo.still .demo-row, .demo.still .meter > div, .demo.still .viz * { transition: none; }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }
@media (max-width: 640px) {
  .demo .brow { grid-template-columns: 16px 74px minmax(0, 1fr); gap: 8px; padding: 8px 4px; }
  .demo .brow .metric { grid-column: auto; }
  .demo .metric .big { font-size: 15px; }
  .demo .metric .line { flex-wrap: nowrap; }
  .demo-when { display: none; }
}
@media (prefers-reduced-motion: reduce) { .demo .badge { animation: none; } }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 8px 14px;
  border-radius: 8px; font-size: 13.5px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 20; }
#toast.show { opacity: 1; }

@media (max-width: 640px) {
  .brow { grid-template-columns: 22px minmax(0, 1fr); }
  .brow .metric { grid-column: 2; }
  .metric .big { font-size: 16px; }
  main { padding-top: 14px; }
}

/* ---------- landing: wide, two columns, a dotted grid behind the hero ---------- */
main.landing .top { margin-bottom: 8px; }
main.landing .hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px);
  align-items: center; padding: clamp(28px, 6vw, 80px) 0 clamp(32px, 5vw, 64px); }
main.landing .hero::before { content: ""; position: absolute; z-index: -1; pointer-events: none; top: -120px; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at 50% 40%, #000 25%, transparent 78%); mask-image: radial-gradient(ellipse 70% 75% at 50% 40%, #000 25%, transparent 78%); }
.hero-title { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -.035em; font-weight: 720; margin: 0; text-wrap: balance; }
.hero-sub { font-size: clamp(15px, 1.35vw, 18px); line-height: 1.55; color: var(--ink2); margin: 18px 0 0; max-width: 34em; text-wrap: pretty; }
.hero .cta { margin: 30px 0 0; }
.promises { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.promises li { display: flex; align-items: center; gap: 8px; font: 500 12.5px/1.2 var(--mono); color: var(--ink2); letter-spacing: -.01em; }
.promises .pi { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); }
.promises .pi svg { width: 14px; height: 14px; }
/* the preview sits in a window frame */
.hero-demo { position: relative; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 34px 14px 6px;
  box-shadow: 0 1px 0 var(--border), 0 24px 60px -28px color-mix(in srgb, var(--ink) 35%, transparent); }
.hero-demo::before { content: ""; position: absolute; top: 14px; left: 16px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--axis); box-shadow: 14px 0 0 var(--axis), 28px 0 0 var(--axis); }
.hero-demo .demo { margin: 0; border: 0; background: transparent; padding: 0; }
.demo-tabs span { font-family: var(--mono); font-weight: 500; letter-spacing: -.01em; }
.stat .label { font: 500 11.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stat .value { font-family: var(--mono); letter-spacing: -.03em; }
.rank { font-family: var(--mono); }
main.landing .card { border-radius: 16px; padding: 20px; }
@media (max-width: 900px) {
  main.landing .hero { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
}
@media (max-width: 560px) {
  .hero-title { font-size: 32px; }
  .promises { flex-direction: column; gap: 10px; }
  .hero-demo { padding: 30px 8px 4px; border-radius: 14px; }
}

/* ---------- sign-in, public board ---------- */
.top-links { display: flex; align-items: center; gap: 6px; }
.top-links a { text-decoration: none; color: var(--ink2); font-size: 14px; padding: 6px 12px; border-radius: 8px; }
.top-links a:hover { background: var(--wash); color: var(--ink); }
.top-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.top-links a.btn { color: var(--ink); border: 1px solid var(--border); background: var(--surface); }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--ink); text-decoration: none; }
.btn.ghost:hover { background: var(--wash); }
.hero .cta .btn.big { padding: 16px 24px; font-size: 16px; border-radius: 14px; }
.providers { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }
.providers .provider { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; font-size: 15px; font-weight: 600; border-radius: 10px; min-width: 210px; }
.providers.small { margin: 8px 0 0; }
.providers.small .provider { padding: 7px 14px; font-size: 13.5px; min-width: 0; }
.banner.save .providers { display: inline-flex; margin: 6px 8px 0 0; vertical-align: middle; }
.signin-first { border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; margin: 12px 0 4px; }
.signin-alt { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 14px; }
.signin-alt h3 { margin: 12px 0 2px; color: var(--ink); font-size: 14px; }
.signin-alt h3:first-child { margin-top: 0; }
.signin-alt .copyline { margin: 8px 0 4px; }
.signin-alt .copyline code { white-space: normal; line-height: 1.45; }
.new-here { margin-top: 16px; }
.join-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; border: 1px solid var(--border);
  border-radius: 14px; background: var(--surface); padding: 12px 14px 12px 18px; margin-bottom: 16px; font-weight: 500; }
.idrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--grid); }
.idrow:first-of-type { border-top: 0; }
@media (max-width: 560px) {
  .providers .provider { flex: 1 1 100%; }
  .top-links a:not(.btn) { padding: 6px 8px; }
  .hero .cta .btn.big { width: 100%; }
}
.prose h3 { color: var(--ink); font-size: 15px; margin: 18px 0 4px; }
.prose p { line-height: 1.6; margin: 0 0 8px; }
.site-foot { text-align: center; margin-top: 28px; }

/* ---------- clean leaderboard ---------- */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.board-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg.period[hidden] { display: none; }
.role-select { font: inherit; font-size: 13.5px; padding: 6px 30px 6px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); }
.seg.pills { border: 0; background: none; padding: 0; gap: 6px; margin: 12px 0 6px; }
.seg.pills button { font-family: var(--mono); font-size: 12.5px; font-weight: 500; border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; color: var(--muted); }
.seg.pills button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.board .brow { padding: 14px 8px; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1.6fr); }
.board .name { font-size: 15.5px; font-weight: 600; }
.board .name .pname { color: var(--ink); text-decoration: none; }
.board .name .pname:hover { text-decoration: underline; }
.board .meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.board .metric .big { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.board .metric .line { gap: 8px; }
.board .metric .meter { height: 10px; border-radius: 6px; margin-top: 8px; }
.board .metric .meter > div { border-radius: 6px; }
@media (max-width: 640px) { .board .brow { grid-template-columns: 22px minmax(0, 1fr); } .board .metric .big { font-size: 19px; } }

/* ---------- live totals ---------- */
.live { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 14px 18px 16px; margin: 0 0 16px; }
.live-title { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.live-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--grid); }
.live-cell { padding: 12px 16px 0 0; }
.live-cell + .live-cell { border-left: 1px solid var(--grid); padding-left: 16px; }
.live-label { font-size: 13px; color: var(--ink2); }
.live-value { font: 700 clamp(20px, 2.6vw, 28px)/1.2 var(--mono); letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-value.accent { color: var(--accent-text); }
main.landing .live { margin-top: 8px; }
@media (max-width: 560px) { .live-grid { grid-template-columns: 1fr; } .live-cell + .live-cell { border-left: 0; border-top: 1px solid var(--grid); padding-left: 0; } .live-cell { padding: 10px 0; } }

/* ---------- person page ---------- */
.back { display: inline-block; margin: 0 0 12px; color: var(--ink2); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--ink); }
.person-name { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.person .meta { color: var(--muted); margin-top: 4px; }
.about-line { margin: 8px 0 0; color: var(--ink2); }
.ptiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.ptiles .stat { background: var(--surface); }
.ptiles .stat.focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ptiles .value { font-family: var(--mono); font-size: 24px; font-weight: 700; letter-spacing: -.03em; margin: 2px 0; }
@media (max-width: 900px) { .ptiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ptiles .stat.focus { grid-column: 1 / -1; } }
.bars { display: flex; align-items: stretch; gap: 3px; height: 170px; margin-top: 12px; }
.bar-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.bar-track { flex: 1; display: flex; align-items: flex-end; }
.bar { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 0; }
.bar.open { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.bar.hit { background: var(--critical); }
.bar-col:hover .bar { filter: brightness(1.15); }
.bar-label { font-size: 11px; color: var(--muted); text-align: center; height: 16px; margin-top: 4px; white-space: nowrap; overflow: visible; }

/* ---------- standard sign-in buttons ---------- */
.oauth-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 42px; padding: 0 16px; min-width: 240px;
  font: 500 14.5px/1 "Roboto", "Segoe UI", system-ui, sans-serif; text-decoration: none; border-radius: 6px; box-sizing: border-box; }
.oauth-logo { display: inline-flex; width: 20px; height: 20px; }
.oauth-logo svg { width: 20px; height: 20px; }
.oauth-btn.google { background: #fff; color: #1f1f1f; border: 1px solid #747775; }
.oauth-btn.google:hover { background: #f8f9fa; box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15); }
.oauth-btn.github { background: #24292f; color: #fff; border: 1px solid #24292f; }
.oauth-btn.github:hover { background: #32383f; }
.oauth-btn.dev { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .oauth-btn.google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
  :root:not([data-theme="light"]) .oauth-btn.github { background: #f6f8fa; color: #24292f; border-color: #f6f8fa; }
}
.providers.small .oauth-btn { height: 36px; min-width: 0; font-size: 13.5px; padding: 0 12px; }
@media (max-width: 560px) { .oauth-btn { flex: 1 1 100%; } }

/* ---------- member page ---------- */
.person { padding: 22px 22px 18px; }
.person-top { display: flex; gap: 18px; align-items: flex-start; }
.avatar { flex: none; width: 72px; height: 72px; border-radius: 18px; background: var(--ink); color: var(--surface); display: flex; align-items: center; justify-content: center; font: 700 30px/1 var(--mono); }
.avatar.hollow { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 2px var(--axis); }
.person-who { flex: 1; min-width: 0; }
.person-name { font-size: 26px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; font-size: 13.5px; }
.rank-badge { border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; background: var(--wash); font-weight: 500; }
.rank-badge b { color: var(--accent-text); }
.person-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.person-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; }
.live-detail { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.person-bar { justify-content: space-between; margin: 6px 0 10px; }
.person-bar h3 { margin: 0; font-size: 16px; color: var(--ink); }
.range-total { text-align: right; }
.range-total .live-value { font-size: 24px; }
.bar.future { background: none; box-shadow: inset 0 0 0 1px var(--grid); border-radius: 4px; }
.contrib { margin-top: 14px; overflow-x: auto; }
.contrib-months, .contrib-grid { display: grid; gap: 3px; min-width: 640px; }
.contrib-months span { font-size: 11px; color: var(--muted); white-space: nowrap; height: 16px; }
.contrib-grid { grid-auto-flow: column; grid-template-rows: repeat(7, auto); }
.sq { display: inline-block; aspect-ratio: 1; border-radius: 3px; background: var(--wash); min-width: 9px; }
.sq.pad { visibility: hidden; }
.sq.l1 { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.sq.l2 { background: color-mix(in srgb, var(--accent) 55%, var(--surface)); }
.sq.l3 { background: color-mix(in srgb, var(--accent) 78%, var(--surface)); }
.sq.l4 { background: var(--accent); }
.contrib-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.contrib-legend .sq { width: 11px; min-width: 11px; }
@media (max-width: 760px) { .person-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .person-strip .live-cell:nth-child(3) { border-left: 0; padding-left: 0; } .person-top { flex-wrap: wrap; } .avatar { width: 56px; height: 56px; font-size: 24px; } }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-right: 8px; vertical-align: 1px; animation: livepulse 1.8s ease-in-out infinite; }
@keyframes livepulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ==========================================================================
   Design system v2 (Dec 2026): calm, techy, easy to scan.
   - Surfaces separate by tone, not lines: no card borders, no row dividers.
   - One control family: segmented controls and selects share height, radius and fill.
   - Numbers in mono and tabular; labels small and quiet; one data color (orange).
   ========================================================================== */
:root { --page: #f6f6f4; --surface: #ffffff; --fill: rgba(11, 11, 11, .045); --fill-strong: rgba(11, 11, 11, .08); --radius: 14px; --ctl: 34px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --page: #0b0b0b; --surface: #161615; --fill: rgba(255, 255, 255, .06); --fill-strong: rgba(255, 255, 255, .1); } }
:root[data-theme="dark"] { --page: #0b0b0b; --surface: #161615; --fill: rgba(255, 255, 255, .06); --fill-strong: rgba(255, 255, 255, .1); }

.card, .live, .stat, .join-strip, .hero-demo, .ptiles .stat { border: 0 !important; box-shadow: none; }
.card { border-radius: var(--radius); padding: 20px 22px; }
.banner { border: 0; border-radius: 12px; background: var(--fill); }
.banner.warn { background: color-mix(in srgb, var(--warning) 16%, transparent); }
.banner.bad { background: color-mix(in srgb, var(--critical) 12%, transparent); }
.hero-demo { background: var(--surface); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .25) !important; }

/* controls */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 0; border-radius: 11px; background: var(--fill); }
.seg button { height: calc(var(--ctl) - 6px); padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ink2);
  font-family: inherit; font-size: 13.5px; font-weight: 500; line-height: 1; letter-spacing: 0; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 .5px rgba(0, 0, 0, .04); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: var(--fill-strong); box-shadow: none; } }
select.filter, .role-select { height: var(--ctl); border: 0; border-radius: 10px; background-color: var(--fill); color: var(--ink); font-family: inherit; font-size: 13.5px; font-weight: 500; line-height: 1;
  padding: 0 30px 0 12px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
select.filter:hover { background-color: var(--fill-strong); }
nav.tabs { border: 0; background: var(--fill); border-radius: 11px; }
nav.tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.top-links a.btn { border: 0; background: var(--fill); }
.top-links a.btn.primary { background: var(--ink); color: var(--surface); }

/* page head: title left, period right */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 10px 0 18px; }
.page-title { font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin: 0; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* totals: three numbers, no box */
.summary { margin-bottom: 26px; }
.summary .live { background: none; padding: 0; margin: 0; }
.summary .card { background: none; padding: 0; }
.live { background: var(--surface); border-radius: var(--radius); padding: 18px 22px 20px; }
.live-grid { border-top: 0; gap: 8px 32px; }
.live-cell, .live-cell + .live-cell { border: 0 !important; padding: 0 !important; }
.live-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; }
.live-value { font-size: clamp(24px, 3vw, 34px); margin-top: 6px; }

/* toolbar above the rows */
.board-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 10px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }

/* rows: avatar, name, role; number and bar. The whole row opens the person's page. */
.board { gap: 4px; }
.board .brow, .brow + .brow { border: 0; }
.board .brow { grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1.5fr); gap: 16px; padding: 14px 14px; border-radius: 14px; background: var(--surface); cursor: pointer; transition: background-color .15s, transform .15s; }
.board .brow:hover { background: color-mix(in srgb, var(--surface) 88%, var(--ink)); }
.board .brow.me { box-shadow: inset 0 0 0 1.5px var(--accent); }
.board .rank { font: 600 14px/1 var(--mono); color: var(--muted); text-align: left; }
.board .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.board .who-text { min-width: 0; }
.board .name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; min-width: 0; }
.board .name .pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .meta { font-size: 13px; margin-top: 2px; }
.board .metric .big { font-family: var(--mono); font-size: 20px; letter-spacing: -.03em; }
.board .metric .meter { background: var(--fill); }
.you { border: 0; background: var(--fill); }

/* avatars */
.av { flex: none; display: inline-flex; border-radius: 10px; overflow: hidden; background: var(--fill); }
.av img, .av svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.person-top .av { border-radius: 20px; }

/* stat tiles and person page follow the same rules */
.stats { gap: 24px; }
.stat { background: none; padding: 0; }
.stat .label { font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1.3; text-transform: none; letter-spacing: 0; color: var(--muted); }
.ptiles .stat { background: var(--surface); padding: 14px 16px; border-radius: 12px; }
.ptiles .stat.focus { box-shadow: inset 0 0 0 1.5px var(--accent) !important; }
.person-strip { margin-top: 22px; }
.bars { gap: 4px; }
.bar { border-radius: 5px 5px 2px 2px; }

@media (max-width: 640px) {
  .page-title { font-size: 26px; }
  .board .brow { grid-template-columns: 22px minmax(0, 1fr); gap: 10px 12px; padding: 12px; }
  .board .brow .metric { grid-column: 2; }
  .board-bar .seg { width: 100%; }
  .filters { width: 100%; }
  .filters select { flex: 1 1 40%; }
  .live-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; }
  .live-value { font-size: 18px; }
}
@media (max-width: 640px) {
  .live-grid { grid-template-columns: 1fr 1fr; }
  .live-grid .live-cell:nth-child(2) { grid-column: 1 / -1; order: -1; }
  .live-value { font-size: 22px; }
  .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: none; }
}

/* The homepage preview uses the board's own rows; only its motion and frame are its own. */
.demo .meter .band { display: none; }
.demo .demo-seg { pointer-events: none; }
.demo .board .brow { background: none; cursor: default; padding: 12px 10px; }
.demo .board .brow.me { background: var(--fill); box-shadow: inset 0 0 0 1.5px var(--accent); }
.demo .board .brow:hover { background: none; }
.demo .board .brow.me:hover { background: var(--fill); }
.badge { display: inline-flex; align-items: center; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 999px; border: 0; }
.badge.hit { color: var(--critical); background: color-mix(in srgb, var(--critical) 12%, transparent); }
.badge.hit::before { content: "▲"; font-size: 8px; }
.badge.sweet { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
@media (max-width: 640px) { .demo .board .brow { grid-template-columns: 16px minmax(0, 1fr) minmax(0, 1.1fr); gap: 8px; padding: 10px 6px; } .demo .board .brow .metric { grid-column: auto; } .demo .av { width: 30px !important; height: 30px !important; } }

/* streak badge on avatars */
.av-wrap { position: relative; display: inline-flex; flex: none; }
.streak-badge { position: absolute; right: -6px; bottom: -5px; display: inline-flex; align-items: center; gap: 1px; height: 17px; padding: 0 5px 0 3px;
  border-radius: 999px; background: var(--surface); color: var(--accent-text); font: 700 11px/1 var(--mono); box-shadow: 0 0 0 2px var(--surface), 0 1px 3px rgba(0, 0, 0, .18); }
.streak-badge .flame { display: inline-flex; width: 11px; height: 11px; color: var(--accent); }
.streak-badge .flame svg { width: 11px; height: 11px; }
.streak-badge.big { height: 24px; padding: 0 8px 0 6px; font-size: 13px; right: -8px; bottom: -7px; }
.streak-badge.big .flame, .streak-badge.big .flame svg { width: 15px; height: 15px; }
.board .brow .streak-badge { box-shadow: 0 0 0 2px var(--surface), 0 1px 3px rgba(0, 0, 0, .18); }
.dots .now { border-style: dashed !important; }
.highlight { margin: 8px 0 0; font-weight: 600; color: var(--accent-text); }
/* calmer focus ring on segmented controls (keyboard only) */
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg button:focus:not(:focus-visible) { outline: none; }

.streak-grid { margin-top: 14px; }
.streak-grid .live-cell.on .live-value { color: var(--accent-text); }
select.filter[hidden] { display: none; }
.dots .hit { background: var(--critical); border-color: var(--critical); }

/* rows with several numbers: the ranked one leads (orange, bar), the others sit beside it */
.board .brow { grid-template-columns: 34px minmax(0, 1fr) minmax(0, 2.1fr); }
.metric.multi { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.m-main .big { color: var(--accent-text); }
.m-side { display: flex; gap: 6px; }
.mini { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 76px; padding: 6px 10px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; }
.mini:hover { background: var(--fill); }
.mini-l { font-size: 11.5px; color: var(--muted); }
.mini-v { font: 600 14px/1 var(--mono); color: var(--ink2); letter-spacing: -.02em; white-space: nowrap; }
.demo .metric.multi { display: block; }
/* rank and movement */
.board .rank { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.move { font: 600 10.5px/1 var(--mono); letter-spacing: -.02em; }
.move.up { color: var(--good); }
.move.down { color: var(--critical); }
/* your row, pinned while it's off screen */
.you-pin { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%); display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); cursor: pointer; z-index: 15;
  transition: transform .25s ease; font-size: 14px; }
.you-pin.show { transform: translate(-50%, 0); }
.you-pin .pin-rank { font: 700 14px/1 var(--mono); }
.you-pin .pin-name { font-weight: 600; }
.you-pin .pin-value { font: 700 14px/1 var(--mono); color: color-mix(in srgb, var(--accent) 70%, var(--surface)); }
.you-pin .streak-badge { display: none; }
/* head: share + period */
.head-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-btn { height: var(--ctl); padding: 0 14px; border: 0; background: var(--fill); border-radius: 10px; font-weight: 500; }
/* tooltip */
#tip { max-width: 300px; line-height: 1.45; white-space: normal; }
@media (max-width: 640px) {
  .board .brow { grid-template-columns: 26px minmax(0, 1fr); }
  .metric.multi { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .m-side { gap: 2px; }
  .mini { min-width: 0; padding: 4px 8px 4px 0; flex-direction: row; align-items: baseline; gap: 5px; }
  .head-acts { width: 100%; }
}

.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--ctl); height: var(--ctl); padding: 0; border: 0; border-radius: 10px; background: var(--fill); color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--fill-strong); }
.icon-btn svg { width: 18px; height: 18px; }

/* bar charts: gridlines with axis labels, values on the bars */
.chartbox { position: relative; padding-left: 44px; margin-top: 18px; }
.bars-grid { position: absolute; left: 0; right: 0; top: 0; bottom: 20px; pointer-events: none; }
.gline { position: absolute; left: 44px; right: 0; border-top: 1px dashed color-mix(in srgb, var(--ink) 12%, transparent); }
.gline span { position: absolute; left: -44px; width: 38px; top: -7px; text-align: right; font: 500 11px/1 var(--mono); color: var(--muted); }
.gline.limit { border-top-style: solid; border-top-color: color-mix(in srgb, var(--critical) 45%, transparent); }
.gline.limit span { color: var(--critical); }
.chartbox .bars { margin-top: 0; position: relative; }
.bar { position: relative; }
.bar-val { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 3px; font: 600 11px/1 var(--mono); color: var(--ink2); white-space: nowrap; }
@media (max-width: 640px) { .bar-val { display: none; } .chartbox { padding-left: 36px; } .gline { left: 36px; } .gline span { left: -36px; width: 32px; } }

/* member page header: the name leads */
.person-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.person-name { font-size: 34px; font-weight: 750; letter-spacing: -.035em; line-height: 1.05; margin: 0; }
.person-name-row .rank-badge { font-size: 13px; padding: 4px 10px; border: 0; background: var(--fill); }
.person-meta { margin-top: 6px; font-size: 14px; }
.person-meta a { color: inherit; }
.person .about-line { margin: 8px 0 0; font-size: 15px; }
.person .highlight { margin: 6px 0 0; font-size: 15px; }
.person-top { align-items: center; }
@media (max-width: 640px) { .person-name { font-size: 28px; } }

/* bar shades follow the contributions grid */
.bar.lv1 { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.bar.lv2 { background: color-mix(in srgb, var(--accent) 55%, var(--surface)); }
.bar.lv3 { background: color-mix(in srgb, var(--accent) 78%, var(--surface)); }
.bar.lv4 { background: var(--accent); }
.bar.hit { background: var(--critical); }
.bar.open { opacity: .55; }
.bar.future { background: none; }
/* member header on phones: smaller avatar, share in the corner */
.person { position: relative; }
@media (max-width: 640px) {
  .person-top { flex-wrap: nowrap; align-items: flex-start; gap: 14px; }
  .person-top .av { width: 56px !important; height: 56px !important; border-radius: 14px; }
  .person-who { padding-right: 40px; }
  .person-acts { position: absolute; top: 16px; right: 16px; }
  .person-name { font-size: 26px; }
}

/* member header v3: one type scale; colour only in chips */
.person-name { font-size: 28px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.person .about-line { margin: 4px 0 0; font-size: 15px; color: var(--ink2); }
.person-meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.person-meta a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.person-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pchip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--fill); color: var(--ink2); font-size: 13px; font-weight: 500; }
.pchip.hot { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-text); }
.pchip.hit { background: color-mix(in srgb, var(--critical) 12%, transparent); color: var(--critical); }
.person .highlight, .person-name-row .rank-badge { display: none; }
@media (max-width: 640px) { .person-name { font-size: 24px; } }
/* Same height whatever the period: empty charts keep their frame, board rows keep one height. */
.chart-empty { position: absolute; left: 44px; right: 0; top: 0; bottom: 20px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; pointer-events: none; }
.board .brow { min-height: 72px; box-sizing: border-box; }
.board .m-main { min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
.range-total { min-width: 140px; }
.range-total .live-detail { min-height: 1.4em; }
@media (min-width: 641px) { .board .brow { height: 76px; } .demo .board .brow { height: auto; } }

.bar.future { box-shadow: none !important; background: none !important; }
.bar-label.ahead { opacity: .45; }
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg.small button { height: 26px; padding: 0 10px; font-size: 12.5px; }
.avg-tag { font-size: 12px; font-weight: 500; color: var(--muted); align-self: flex-end; margin-bottom: 3px; }

/* card corners: the number, then one short label, both right-aligned */
.corner { display: flex; flex-direction: column; align-items: flex-end; text-align: right; margin-left: auto; }
.corner-v { font: 700 24px/1.1 var(--mono); letter-spacing: -.03em; }
.corner-l { margin-top: 4px; font-size: 13px; color: var(--muted); }
select.filter option.opt-head { font-weight: 700; }

/* form fields: one component for text inputs and the growing one-line textarea */
.field-label { display: inline-flex; align-items: center; gap: 6px; }
textarea.grow-input { font: inherit; font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--page); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px; width: 100%; box-sizing: border-box; resize: none; overflow: hidden; min-height: 36px; }
textarea.grow-input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.spark { color: var(--accent, #e8772e); font-size: 13px; cursor: help; line-height: 1; }
.spark[hidden] { display: none; }
/* settings profile: a responsive grid that fills its card (two columns on wide screens, one on phones) */
.form.form-full { max-width: none; margin-top: 12px; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.form.form-full > .span-all { grid-column: 1 / -1; }
.form.form-full > .flabel { margin: 4px 0 -8px; }
.form.form-full > .chips { margin: 0; }
.form.form-full .field input[type=text], .form.form-full .field select { width: 100%; box-sizing: border-box; }
.form-acts { display: flex; justify-content: flex-end; padding-top: 4px; }
.form-acts .primary { min-width: 120px; }
.welcome .field { width: 100%; }
.form-acts .primary { justify-content: center; }

/* Following: leaderboard-style rows, the whole row opens the person's page */
.flist { display: grid; gap: 4px; margin-top: 10px; }
.frow { display: flex; align-items: center; gap: 16px; padding: 12px 14px; border-radius: 14px; cursor: pointer; transition: background-color .15s; }
.frow:hover { background: color-mix(in srgb, var(--surface) 88%, var(--ink)); }
.frow .who { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.frow .who-text { min-width: 0; }
.frow .pname { color: inherit; text-decoration: none; }
.frow .pname:hover { text-decoration: underline; }
button.quiet { color: var(--ink2); background: none; border-color: var(--border); font-size: 13px; padding: 6px 12px; }
button.quiet:hover { color: var(--ink); background: var(--wash); }
.frow .name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; min-width: 0; }
.frow .name .pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .meta { font-size: 13px; margin-top: 2px; color: var(--muted); }

/* settings list: label and hint on the left, the value or control on the right */
.slist { margin-top: 6px; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0; }
.srow + .srow { border-top: 1px solid var(--grid); }
.srow-t { min-width: 0; }
.srow-l { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.srow-s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.srow-v { flex-shrink: 0; font-size: 14px; color: var(--ink); text-align: right; }
.srow-v .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.time-in { font: inherit; font-size: 14px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--page); color: var(--ink); }
/* on/off switch built on a real checkbox */
input.switch { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 999px; background: var(--axis); position: relative; cursor: pointer; margin: 0; transition: background-color .15s; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
input.switch:checked { background: var(--ink); }
input.switch:checked::after { transform: translateX(16px); }
input.switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 560px) { .srow { flex-wrap: wrap; gap: 10px; } .srow-v .row { justify-content: flex-start; } }
input.switch:checked::after { background: var(--surface); }

/* top right: section tabs, then your own page */
.top-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.me-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 600; transition: background-color .15s; }
.me-btn:hover { background: var(--wash); }
.me-btn[aria-current="page"] { border-color: var(--ink); }
.me-btn .av { border-radius: 50%; overflow: hidden; }
.me-btn .me-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* profile header: avatar top-aligned with the name, about and meta lines; actions on the name's line */
.person-top { align-items: flex-start; }
.person-name-row { flex-wrap: nowrap; }
.person-name-row .person-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-name-row .person-acts { margin-left: auto; flex-shrink: 0; flex-wrap: nowrap; align-items: center; }
a.icon-btn { text-decoration: none; }
@media (max-width: 640px) { .person-name-row .person-acts { position: static; } .person-who { padding-right: 0; } }

/* picked roles show their order instead of a checkmark */
.chip[aria-pressed="true"][data-n]::before { content: attr(data-n); display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin: 0 7px 0 -5px;
  border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 11.5px; font-weight: 700; vertical-align: 1px; }
/* icon buttons: no fill at rest, grey on hover and press; 36px tap target */
.icon-btn, .share-btn { background: transparent; }
.icon-btn:hover, .icon-btn:focus-visible, .icon-btn:active { background: var(--fill-strong); }

/* you, in the comparison charts: orange, heavier, outlined */
.heat { position: relative; }
.heat .lab.me { font-weight: 700; }
.legend .me { font-weight: 700; }
.legend .me .line { height: 4px; }
.me-btn { border: 0; background: transparent; }
.me-btn:hover, .me-btn[aria-current="page"] { background: var(--fill-strong); border: 0; }
/* text and icon buttons in a header share one height */
.person-acts > button:not(.icon-btn), .person-acts > .btn { height: var(--ctl); padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 10px; }

.ssub { margin: 18px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.card-head + .slist { margin-top: 2px; }

/* comparison tables: equal columns for everyone; you in bold */
table.cmp { table-layout: fixed; width: 100%; }
table.cmp th:first-child, table.cmp td:first-child { width: 110px; }
table.cmp th, table.cmp td { overflow-wrap: anywhere; }
table.cmp .me { font-weight: 700; }
/* filters: grey fill with the selected tab's slight shadow; selected tab and filters share the lighter 500 weight */
select.filter, .role-select { font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.04); }
.seg button[aria-pressed="true"] { font-weight: 500; }
.seg button:focus-visible { outline: 2px solid var(--ink); }

/* homepage: use more of wide screens, keep a gutter */
main.landing { max-width: 1440px; padding-left: clamp(16px, 4vw, 56px); padding-right: clamp(16px, 4vw, 56px); }
main.landing .hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.hero-copy { container-type: inline-size; }
.hero-title.two-line { font-size: clamp(30px, 7.4cqi, 68px); text-wrap: initial; }
.hero-title.two-line span { display: inline-block; white-space: nowrap; }
@media (max-width: 900px) { main.landing .hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .hero-title.two-line { font-size: 32px; } .hero-title.two-line span { display: inline; white-space: normal; } }
/* footer link: present, but out of the way */
.site-foot { text-align: right; margin-top: 40px; font-size: 11.5px; }
.site-foot a { color: var(--muted); text-decoration: none; opacity: .75; }
.site-foot a:hover { opacity: 1; text-decoration: underline; }
/* homepage: always stacked (headline + button, then the preview full width) */
main.landing .hero { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
/* homepage type & rhythm: the headline leads at every width; gaps scale with it */
main.landing .hero { gap: clamp(36px, 5vw, 64px); padding: clamp(24px, 5vw, 64px) 0 clamp(32px, 4vw, 56px); align-items: start; }
.hero-title.two-line { font-size: clamp(30px, 7.4cqi, 92px); line-height: 1.02; letter-spacing: -.04em; }
.hero .cta { margin: clamp(24px, 3.4cqi, 44px) 0 0; }
.hero .cta .btn.mega { font-size: clamp(16px, 1.35vw, 19px); padding: clamp(14px, 1.2vw, 18px) clamp(24px, 2.4vw, 36px); }
@media (max-width: 560px) {
  .hero-title.two-line { font-size: clamp(34px, 10vw, 40px); line-height: 1.05; }
  .hero .cta { margin-top: 24px; }
}
/* rank change: new on the board since the last snapshot */
.move.new { color: var(--accent); font-size: 9.5px; letter-spacing: .04em; }
/* homepage proof: all-time numbers + animated board. Stacked by default; side by side on wide screens */
.hero-show { display: grid; gap: 16px; min-width: 0; }
.hero-show .live { margin: 0 !important; }
.hero-show .live-title { margin-bottom: 14px; }
@media (max-width: 1099px) { .hero-show .live { order: 2; } }
@media (min-width: 1100px) {
  .hero-show { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 20px; align-items: stretch; }
  .hero-show .live { display: flex; flex-direction: column; padding: 24px 26px; }
  .hero-show .live-grid { grid-template-columns: 1fr !important; gap: 0; flex: 1; align-content: space-evenly; }
  .hero-show .live-cell { padding: 18px 0 !important; }
  .hero-show .live-cell + .live-cell { border-top: 1px solid var(--grid) !important; }
  .hero-show .live-grid .live-cell:nth-child(2) { order: 0; grid-column: auto; }
  .hero-show .live-value { font-size: clamp(30px, 2.4vw, 40px); }
}
@media (min-width: 1100px) {
  .hero-show { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); }
  .hero-show .live-value { font-size: clamp(24px, 1.95vw, 32px); }
}
/* homepage numbers: plain, like the leaderboard's strip (no card, no dividers) */
.hero-show .live { background: none !important; padding: 0 !important; border-radius: 0; }
.hero-show .live-cell + .live-cell { border-top: 0 !important; }
@media (min-width: 1100px) {
  .hero-show .live { padding-top: 12px !important; }
  .hero-show .live-grid { flex: 0 1 auto; align-content: start; gap: 28px; }
  .hero-show .live-cell { padding: 0 !important; }
}
/* stacked homepage: the numbers lead, the animation follows */
@media (max-width: 1099px) { .hero-show .live { order: 0; } .hero-show { gap: 24px; } }
/* wide homepage: "All time" lines up with the demo's window dots, "Members" with its tabs */
@media (min-width: 1100px) { .hero-show .live { padding-top: 8px !important; } }
/* signed-out hero: both buttons share one height; the two promises sit close under them as the button's fine print */
.hero .cta { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.hero .cta .btn.ghost.big { display: inline-flex; align-items: center; }
.hero .promises { margin-top: 16px; }
/* headline with "AI": a little more room so the longer first line never touches the edge */
.hero-title.two-line { font-size: clamp(30px, 7.1cqi, 92px); }
@media (max-width: 560px) { .hero-title.two-line { font-size: clamp(34px, 10vw, 40px); } }
/* One page frame everywhere: the header (logo + nav) sits in the same place on every page, signed in or not.
   Narrow pages keep a 720px reading column, centered under that header. */
main, main.narrow, main.landing { max-width: 1440px; padding-left: clamp(16px, 4vw, 56px); padding-right: clamp(16px, 4vw, 56px); }
main.narrow > :not(.top) { max-width: 720px; margin-left: auto !important; margin-right: auto !important; }
/* the header never shifts: one weight for every nav state (current page shows by fill/colour, not by width),
   and the scrollbar's space is always reserved so short and long pages line up */
html { scrollbar-gutter: stable; }
nav.tabs a, nav.tabs a[aria-current="page"], .top-links a, .top-links a[aria-current="page"] { font-weight: 500; }
/* same header row height for guests and members, so the logo never moves when you sign in */
.top { min-height: 36px; }
/* achievement badges carry a crown (in the badge's own colour) so they read as earned, not as tags.
   Plain labels (you, following, roles) and nudges stay without it. */
.badge.hit::before, .badge.sweet::before, .pchip.hot::before, .pchip.hit::before {
  content: ""; flex: none; width: 1.05em; height: 1.05em; margin-right: 4px; font-size: inherit; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 5.2l3.2 2.6L8 3.2l2.8 4.6L14 5.2l-1.3 7H3.3z'/%3E%3Crect x='3.3' y='12.9' width='9.4' height='1.6' rx='.6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 5.2l3.2 2.6L8 3.2l2.8 4.6L14 5.2l-1.3 7H3.3z'/%3E%3Crect x='3.3' y='12.9' width='9.4' height='1.6' rx='.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pchip.hot::before, .pchip.hit::before { margin-right: 6px; }
/* Header sticks to the top on tablet/desktop (same place on every page). On the homepage its Join fades in
   once the big Join button has scrolled away; on phones the header scrolls and Join always shows. */
@media (min-width: 700px) {
  main > .top { position: sticky; top: 0; z-index: 30; margin-top: -12px; padding: 12px 0; background: var(--page);
    box-shadow: 0 0 0 100vmax var(--page); clip-path: inset(0 -100vmax); }
  .top-links a.btn.primary { transition: opacity .2s, visibility .2s; }
  .top-links a.btn.primary.tj-hide { opacity: 0; visibility: hidden; }
}
@media (min-width: 700px) { main > .top { margin-bottom: 6px; } main.landing > .top { margin-bottom: -4px; } }
@media (min-width: 700px) { main > .top { min-height: 60px; } }
@media (min-width: 700px) { [id] { scroll-margin-top: 76px; } }
