:root {
  --bg: #f6f3ee;
  --surface: #fcfaf7;
  --text: #2a2723;
  --text-soft: #5e5850;   /* 6.35:1 on bg */
  --text-dim: #736d66;    /* receded fields: 4.91:1 on surface */
  --line: #e6e0d6;
  --btn: #efeae3;
  --btn-hover: #e9e3da;
  --btn-text: #2a2723;
  --focus: #6b5f4f;
  --shadow: 0 1px 2px rgba(60, 45, 30, .05), 0 6px 20px rgba(60, 45, 30, .07);
  --ph-l: 0.905; --ph-c: 0.022; --ph-ink: #5e5850;
  --ph-none: #ece6dd;     /* one neutral tint for "no photo" on the front: no per-person cue */
  --hard: #9a7424; --good: #5b7a45;   /* grade meaning: muted, always paired with the label */
  --strong: #3e5c7c; --dispersive: #587592; --weak: #7a8ea3;   /* coupling: one slate, darker = stronger; edges ≥ 3:1 */
  --scrim: rgb(42 39 35 / .28);
  --w: 360px;             /* card + action bar width */
  --r: 6px; --r-btn: 4px;
  /* one bottom padding for both sides, so the card doesn't move on flip:
     action stack 44 + 10 gap + 48, plus the bar's 12 top + 16 bottom padding, plus 16 air */
  --pad-bottom: 146px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191715; --surface: #221f1c; --text: #ece6de; --text-soft: #b3aa9e; --text-dim: #948d85;
    --line: #342f2a; --btn: #2c2824; --btn-hover: #332e29; --btn-text: #ece6de; --focus: #cbbfae;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    --ph-l: 0.34; --ph-c: 0.02; --ph-ink: #c9c0b4; --ph-none: #2b2723;
    --hard: #c4a766; --good: #93ae7c;
    --strong: #a9c0d8; --dispersive: #8aa1b8; --weak: #6f8398;
    --scrim: rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; top: 0; left: 0; margin: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.flag { font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif; font-weight: 400; }
.dim { color: var(--text-dim); }

/* ---------- page ---------- */
main { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 20px 16px var(--pad-bottom); }
.top { position: relative; width: 100%; max-width: var(--w); display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--text-soft); margin-bottom: 20px; }
.empty { margin: auto; color: var(--text-soft); }
.top .count { margin-left: auto; font-variant-numeric: tabular-nums; }
.top .count b { font-weight: 500; }
/* the 44px menu button sits in the 13px row without making it taller */
.top .menu-btn { margin: -14px -10px -14px 4px; align-self: center; }
.stage { width: 100%; max-width: var(--w); flex: 1; display: flex; align-items: center; perspective: 1400px; }

/* ---------- card: both faces stacked in one grid cell, card sizes from the taller face ---------- */
.card { width: 100%; display: grid; transform-style: preserve-3d;
  transition: transform 260ms cubic-bezier(.3,.7,.3,1); }
.card:not(.flipped) { cursor: pointer; }
.card.flipped { transform: rotateY(180deg); }
.face { grid-area: 1 / 1; min-width: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow);
  backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden;
  display: flex; flex-direction: column; }
.back { transform: rotateY(180deg); }

/* photo square */
.ph { aspect-ratio: 1; width: 100%; max-width: 100%; display: grid; place-items: center; user-select: none; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; display: block; }
/* back only: calm initials placeholder */
.ph.initials { background: oklch(var(--ph-l) var(--ph-c) var(--hue)); color: var(--ph-ink); font-weight: 500; letter-spacing: .04em; }
/* front only: one neutral tint, no initials, no hue */
.ph.none { background: var(--ph-none); color: var(--text-soft); font-size: 13px; }

.front .ph { border-radius: var(--r) var(--r) 0 0; }
.front .cue { flex: 1; min-height: 48px; display: grid; place-items: center; font-size: 15px; color: var(--text-soft); }

.back { padding: 20px; gap: 16px; }
/* text fronts: the name (C2) or the clues (C3) in place of the photo */
.front .clue { flex: 1; padding: 28px 20px 0; display: flex; flex-direction: column; justify-content: center; gap: 10px;
  font-size: 15px; line-height: 1.4; }
.front .clue + .cue { flex: none; min-height: 88px; }
.front .clue .name { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.15; letter-spacing: -.015em; overflow-wrap: anywhere; }
.front .clue .inst { font-weight: 500; }
.front ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

.back .head { display: flex; gap: 16px; align-items: center; }
.back .head .ph { width: 112px; flex: none; border-radius: 4px; font-size: 34px; }
.back .name { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.15; letter-spacing: -.015em; overflow-wrap: anywhere; }
.back .profile { display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.4; }
.back .inst { font-weight: 500; }
.back ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.back hr { border: 0; border-top: 1px solid var(--line); margin: 0; width: 100%; }
/* coupling on the back: the shared .seg with four segments */
.cpl { display: flex; flex-direction: column; gap: 8px; margin-top: -4px; }
.cpl .lbl { font-size: 13px; font-weight: 500; color: var(--text-soft); }
.cpl .seg button { font-size: 13px; }   /* 74px segments at 375; "Decoupled" is 68px */
@media (max-width: 339px) { .cpl .seg button { padding: 0; font-size: 12px; letter-spacing: -.01em; } }
/* 0–3 key hints: in the segment's corner (labels fill it), shown only while the keyboard is in the control */
.cpl .seg kbd { display: none; position: absolute; top: 3px; right: 4px; margin: 0; font-size: 10px; line-height: 1; }
@media (hover: hover) { .cpl .seg:has(:focus-visible) kbd { display: inline; } }
/* ...where 2 and 3 set coupling, not the grade */
body:has(.cpl .seg :focus-visible) .actions kbd { visibility: hidden; }
/* two lines stay reserved in every state, so the vertically centred card never moves under the finger */
.hint { font-size: 13px; line-height: 18px; color: var(--text-dim); margin: 0; min-height: 36px; }
.hint b { font-weight: 600; color: var(--text-soft); }
.back.decoupled .head .ph { filter: grayscale(1); }
/* C2/C4 partial-credit rules; the Intro's two memory prompts */
.help { font-size: 13px; line-height: 18px; color: var(--text-soft); margin: 0; }
.intro .prompts { font-size: 15px; line-height: 1.4; color: var(--text-soft); }

/* ---------- bottom action zone: a two-row stack of the same height on both sides ---------- */
.actions { position: fixed; left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; justify-content: center; background: var(--bg); }
.actions .inner { width: 100%; max-width: var(--w); display: flex; flex-direction: column; gap: 10px; }
.btn { min-height: 48px; border: 0; border-radius: var(--r-btn);
  background: var(--btn); color: var(--btn-text); font-weight: 500; font-size: 15px; cursor: pointer; }
.btn:hover:not(:disabled) { background: var(--btn-hover); }
.quiet { min-height: 44px; border: 0; border-radius: var(--r-btn); background: transparent; color: var(--text-soft);
  font-size: 15px; font-weight: 500; cursor: pointer; }
.quiet:hover { color: var(--text); }
kbd { font: inherit; font-size: 12px; font-weight: 400; color: var(--text-soft); margin-left: 8px; }
@media (hover: none) { kbd { display: none; } }

/* Segmented control (Hard | Good; Coupling): one thumb slides under the checked label, no gaps between segments.
   --n = number of segments; each value sets its index --i and meaning colour --c. No data-v (optional value
   not set yet) = no thumb. Meaning colour only in the thumb's muted tint and edge, always paired with the label (principle 9). */
.seg { --n: 2; --i: 0; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  min-height: 44px; padding: 3px; border-radius: var(--r-btn); box-shadow: inset 0 0 0 1px var(--line); }
.seg .thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); border-radius: 3px;
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); box-shadow: inset 0 0 0 1px var(--c); /* edge ≥ 3:1 vs track */
  transform: translateX(calc(var(--i) * 100%));
  transition: transform 200ms cubic-bezier(.3,.7,.3,1), background-color 200ms, box-shadow 200ms, opacity 150ms; }
.seg[data-v="hard"] { --c: var(--hard); }
.seg[data-v="good"] { --c: var(--good); --i: 1; }
.seg[data-v="decoupled"] { --c: var(--text-dim); }
.seg[data-v="weak"] { --c: var(--weak); --i: 1; }
.seg[data-v="dispersive"] { --c: var(--dispersive); --i: 2; }
.seg[data-v="strong"] { --c: var(--strong); --i: 3; }
.seg[data-v="decoupled"] .thumb { background: var(--btn); }   /* neutral: leaving the deck, not a regime */
.seg:not([data-v]) .thumb { display: none; }
/* an optional control set for the first time: the thumb fades in at its place instead of sliding in from the left */
@starting-style { .seg.optional .thumb { opacity: 0; } }
.seg button { position: relative; z-index: 1; min-width: 0; padding: 0 2px; border: 0; background: transparent;
  border-radius: 3px; cursor: pointer; white-space: nowrap; font-size: 15px; font-weight: 500; color: var(--text-soft); }
.seg button:hover, .seg button[aria-checked="true"] { color: var(--text); }
.seg button:focus-visible { outline-offset: 0; }
.note { min-height: 44px; display: grid; place-items: center; font-size: 15px; color: var(--text-soft); }

/* ---------- session title + Today/Focus picker: bottom sheet on phones, popover over the column from 900px ---------- */
/* the 44px title button sits in the 13px row without making it taller, like the menu button */
.title { display: flex; align-items: center; gap: 6px; min-height: 44px; margin: -14px 0 -14px -8px; padding: 0 6px 0 8px;
  align-self: center; border: 0; border-radius: var(--r-btn); background: none; font-size: 15px; font-weight: 500;
  color: var(--text); cursor: pointer; min-width: 0; white-space: nowrap; }
.title:hover, .title[aria-expanded="true"] { background: var(--btn); }
.title .f { display: inline-flex; align-items: center; gap: 5px; color: var(--text-soft); font-weight: 400; }
.title .chev { flex: none; color: var(--text-soft); }
.title kbd { margin-left: 2px; color: var(--text-dim); }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
.scrim { position: fixed; inset: 0; z-index: 9; background: var(--scrim); }
.sheet { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; background: var(--surface); color: var(--text);
  border-radius: var(--r) var(--r) 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 16px; }
.sheet .grp { display: flex; flex-direction: column; gap: 8px; }
.sheet .gh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; }
.sheet .gh .h { font-weight: 500; color: var(--text-soft); }
.sheet .gh .cap { color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet .hint2 { margin: 0; font-size: 13px; color: var(--text-dim); }
.sheet .n { font-variant-numeric: tabular-nums; color: var(--text-dim); font-weight: 400; }
/* back to Today: one tap, applies at once */
.back-today { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: -4px -4px 0; padding: 0 10px 0 8px;
  border: 0; border-radius: var(--r-btn); background: none; font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; }
.back-today:hover { background: var(--btn); }
.back-today svg { color: var(--text-soft); flex: none; }
.back-today .v { flex: 1; }
.sheet .rule { height: 1px; background: var(--line); margin: -4px 0; }
/* coupling: four segments, selection by fill + weight; the outline stays the focus ring's */
.cseg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 3px; border-radius: var(--r-btn);
  box-shadow: inset 0 0 0 1px var(--line); }
.cseg button { min-height: 50px; min-width: 0; padding: 0 2px; border: 0; border-radius: 3px; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-soft); }
.cseg button:focus-visible { outline-offset: 0; }
.cseg .l { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.cseg .n { font-size: 12px; }
.cseg button:hover:not(:disabled), .cseg button[aria-checked="true"] { color: var(--text); background: var(--btn); }
.cseg button[aria-checked="true"] .l { font-weight: 600; }
.cseg button[aria-checked="true"]:is(.c-strong, .c-dispersive, .c-weak) { background: color-mix(in srgb, var(--c) 20%, var(--surface)); }
.cseg button[aria-checked="true"] .n { color: var(--text-soft); }
/* exercise: rows, selected = --btn fill + trailing check */
.opts { display: flex; flex-direction: column; gap: 2px; }
.opts button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border: 0; border-radius: var(--r-btn);
  background: none; font-size: 15px; color: var(--text-soft); text-align: left; cursor: pointer; }
.opts button:hover:not(:disabled) { color: var(--text); background: var(--btn); }
.opts .v { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opts .code { display: inline-block; width: 26px; color: var(--text-dim); font-weight: 500; }
.opts .ck { width: 14px; flex: none; display: grid; place-items: center; }
.opts .ck svg { visibility: hidden; }
.opts button[aria-checked="true"] { color: var(--text); font-weight: 500; background: var(--btn); }
.opts button[aria-checked="true"] :is(.code, .n) { color: var(--text-soft); }
.opts button[aria-checked="true"] .ck svg { visibility: visible; }
.cseg button:disabled, .opts button:disabled { cursor: default; color: var(--text-dim); }
.cseg button:disabled:not([aria-checked="true"]) .sw { opacity: .5; }
.study:disabled { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--text-soft); cursor: default; font-weight: 400; }
.study:disabled kbd { display: none; }
.picker-open .actions kbd { visibility: hidden; }
@media (min-width: 900px) {
  .scrim { background: none; }
  /* popover: the column's width, under the title row, standing in for the card; border only, no shadow */
  .sheet { position: absolute; top: calc(100% + 18px); bottom: auto; border-radius: var(--r);
    box-shadow: inset 0 0 0 1px var(--line); padding: 12px 16px 16px; }
  .cseg button { min-height: 46px; }
  .picker-open .stage { visibility: hidden; }
}

/* ---------- done ---------- */
.done { margin: auto; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.done .mark { color: var(--text-soft); margin-bottom: 4px; display: block; }
.done h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.done p { margin: 0; font-size: 15px; color: var(--text-soft); line-height: 1.5; }
.done p b { font-weight: 500; color: var(--text); }
.done .sub { font-size: 13px; color: var(--text-dim); }

@media (prefers-reduced-motion: reduce) { .card, .seg .thumb { transition: none !important; } }

/* ---------- menu: hamburger → drawer from the right on phones, dropdown under the button from 900px ---------- */
.menu-btn, .menu-close { width: 44px; height: 44px; display: grid; place-items: center; flex: none; padding: 0; border: 0;
  border-radius: var(--r-btn); background: none; color: var(--text-soft); cursor: pointer; }
.menu-btn:hover, .menu-close:hover { background: var(--btn); color: var(--text); }
.menu-btn:focus-visible, .menu-close:focus-visible { outline-offset: -2px; }   /* not clipped at the screen's top edge */
.menu-scrim { position: fixed; inset: 0; z-index: 9; background: var(--scrim); opacity: 0; visibility: hidden;
  transition: opacity .18s ease, visibility 0s .18s; }
.menu { position: fixed; z-index: 10; top: 0; right: 0; bottom: 0; width: min(260px, 85vw);
  padding: env(safe-area-inset-top, 0px) 16px 16px; background: var(--surface); border-radius: var(--r) 0 0 var(--r);
  box-shadow: var(--shadow); transform: translateX(100%); visibility: hidden;
  transition: transform .2s ease, visibility 0s .2s; }
.menu-close { margin: 0 -10px 8px auto; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.menu a { display: flex; align-items: center; height: 44px; padding: 0 12px; border-radius: var(--r-btn);
  color: var(--text-soft); text-decoration: none; font-size: 15px; }
.menu a:hover { background: var(--btn); color: var(--text); }
/* current page: weight, full text colour and a 2px bar, not colour alone */
.menu a[aria-current] { color: var(--text); font-weight: 500; box-shadow: inset 2px 0 0 var(--text); border-radius: 0 var(--r-btn) var(--r-btn) 0; }
.menu-open .menu-scrim { opacity: 1; visibility: visible; transition: opacity .18s ease; }
.menu-open .menu { transform: none; visibility: visible; transition: transform .2s ease; }
@media (min-width: 900px) {
  /* dropdown: hung under the button (menu.js sets --menu-top/--menu-right); the scrim only catches outside clicks */
  .menu-scrim { background: none; }
  .menu-close { display: none; }
  .menu { top: var(--menu-top, 56px); right: var(--menu-right, 16px); bottom: auto; width: 200px; padding: 6px;
    border-radius: var(--r); box-shadow: var(--shadow), 0 0 0 1px var(--line); transform: translateY(-4px); opacity: 0;
    transition: transform .15s ease, opacity .15s ease, visibility 0s .15s; }
  .menu-open .menu { transform: none; opacity: 1; transition: transform .15s ease, opacity .15s ease; }
  .menu a { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .menu, .menu-scrim, .menu-open .menu, .menu-open .menu-scrim { transition: none; } }

/* ---------- people: one quiet column; title, count, menu and search share one sticky bar, group headings pin under it ---------- */
main.people { display: block; width: 100%; max-width: 592px; min-height: 0; margin: 0 auto; padding: 0 16px 48px; --bar-h: 96px; }
.people .bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 2; background: var(--bg); padding-bottom: 8px; }
.people .top { max-width: none; height: 44px; margin: 0; gap: 10px; align-items: center; }
.people .top h1 { margin: 0; font-size: 16px; font-weight: 500; color: var(--text); }
.people .total { margin-right: auto; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.people .top .menu-btn { margin: 0 -10px 0 0; }
.search { position: relative; display: block; }
.search input { width: 100%; height: 44px; padding: 0 12px 0 36px; border: 0; border-radius: var(--r-btn);
  background: var(--btn); font-size: 16px; }   /* 16px: iOS does not zoom on focus */
.search input::placeholder { color: var(--text-dim); }
.search svg { position: absolute; left: 12px; top: 14px; color: var(--text-dim); pointer-events: none; }
.search kbd { position: absolute; right: 10px; top: 12px; margin: 0; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center;
  line-height: 1; color: var(--text-dim); border-radius: 3px; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.search input:focus ~ kbd, .search input:not(:placeholder-shown) ~ kbd { display: none; }
@media (hover: none), (max-width: 599px) { .search kbd { display: none; } }
.none-found { margin: 0; text-align: center; color: var(--text-soft); font-size: 15px; line-height: 1.5; }
.none-found:not(:empty) { padding: 48px 0; }
.none-found b { font-weight: 500; color: var(--text); }
.people h2 { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--bar-h)); z-index: 1; margin: 0; padding: 20px 0 8px;
  background: var(--bg); display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-soft); }
.people h2::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.people h2.c-unset::before { background: none; box-shadow: inset 0 0 0 1px var(--text-dim); }
.people h2 .n { color: var(--text-dim); font-weight: 400; font-variant-numeric: tabular-nums; }
.c-strong { --c: var(--strong); } .c-dispersive { --c: var(--dispersive); } .c-weak { --c: var(--weak); } .c-decoupled { --c: var(--text-dim); }
.people ul { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.people li .ph { position: relative; flex: none; width: 40px; border-radius: 50%; font-size: 14px; }
.people li .ph.photo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); } /* dark photos keep an edge */
.people li .t { min-width: 0; line-height: 1.3; }
.people li .nm { font-size: 15px; font-weight: 500; }
.people li .in { font-size: 13px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people .decoupled .nm, .people .decoupled .in { color: var(--text-dim); font-weight: 400; }
.people .decoupled .ph { filter: grayscale(1); opacity: .7; }

/* ---------- stats: one quiet column of surface blocks, like a settings page; same top row and menu as People ---------- */
main.stats { display: block; width: 100%; max-width: 592px; min-height: 0; margin: 0 auto; padding: 0 16px 64px; }
.stats .top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 2; background: var(--bg); max-width: none; height: 52px;
  margin: 0; gap: 10px; align-items: center; }
.stats .top h1 { margin: 0 auto 0 0; font-size: 16px; font-weight: 500; color: var(--text); }
.stats .top .menu-btn { margin: 0 -10px 0 0; }
.stats section { margin-top: 20px; }
.stats h2 { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--text-soft); }
.stats .block { background: var(--surface); border-radius: var(--r); padding: 0 16px; }
.stats .foot { font-size: 13px; color: var(--text-dim); margin: 8px 0 0; line-height: 1.4; }
.stats .empty-line { margin: 0; font-size: 14px; color: var(--text-dim); line-height: 1.4; }
.stats .big, .stats .row .v, .stats .ret td, .stats .cap, .stats output { font-variant-numeric: tabular-nums; }

/* today: two figures */
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; margin-top: 4px; }
.summary > div { background: var(--surface); padding: 14px 16px; min-width: 0; }
.summary .big { font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.summary .lbl { font-size: 13px; color: var(--text-soft); margin-top: 2px; }

/* 30-day bars: square tops with a 1px radius; past days --text-dim, today --text */
.stats .chart { padding: 14px 16px 12px; }
.chart .cap { font-size: 13px; color: var(--text-soft); margin-bottom: 10px; line-height: 1.4; }
.chart .cap b { color: var(--text); font-weight: 500; }
.bars { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; align-items: end; height: 96px; border-bottom: 1px solid var(--line); }
.bars i { display: block; background: var(--text-dim); border-radius: 1px 1px 0 0; }
.bars i.zero { background: none; }
.bars i.is-today { background: var(--text); }
.axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); margin-top: 6px; }

/* rows */
.stats .row { display: flex; align-items: center; gap: 10px; min-height: 48px; border-top: 1px solid var(--line); }
.stats .row:first-child { border-top: 0; }
.stats .row .v { margin-left: auto; font-weight: 500; white-space: nowrap; }
.stats .row .v small { font-weight: 400; color: var(--text-dim); font-size: 13px; }

/* people learned: coupling swatch, learned / total, meter */
.stats .sw { width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
.stats .c-unset { --c: var(--text-dim); }
.stats .c-unset .sw { background: none; box-shadow: inset 0 0 0 1px var(--text-dim); }
.meter { width: 72px; height: 4px; background: var(--line); border-radius: 1px; overflow: hidden; flex: none; }
.meter i { display: block; height: 100%; background: var(--c); }

/* retention: a small table with column headers */
.ret { width: 100%; border-collapse: collapse; }
.ret th { font-size: 13px; font-weight: 400; color: var(--text-dim); text-align: right; padding: 12px 0 6px 12px; white-space: nowrap; }
.ret th:first-child { text-align: left; padding-left: 0; }
.ret td { border-top: 1px solid var(--line); height: 48px; padding: 6px 0 6px 12px; text-align: right; white-space: nowrap; }
.ret td:first-child { text-align: left; padding-left: 0; white-space: normal; line-height: 1.3; }
.ret .ex { font-weight: 500; }
.ret .exn { color: var(--text-soft); font-size: 13px; margin-left: 4px; }
.ret td.pc { font-weight: 500; }
.ret td.n { color: var(--text-dim); font-size: 13px; }
.ret td.none { color: var(--text-dim); font-weight: 400; }

/* leeches */
.stats .leech { align-items: flex-start; padding: 10px 0; }
.stats .leech .ph { position: relative; flex: none; width: 40px; border-radius: 50%; font-size: 14px; }
.stats .leech .ph.photo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); }
.stats .who { flex: 1; min-width: 0; line-height: 1.35; }
.stats .who .nm { font-weight: 500; }
.stats .who .in, .stats .who .ex2 { font-size: 13px; color: var(--text-soft); }
.stats .leech .v { font-size: 13px; font-weight: 400; color: var(--text-soft); padding-top: 1px; }
.stats .leech .v b { font-weight: 500; color: var(--text); font-size: 15px; }

/* settings: label + helper, and a − value + stepper */
.stats .set { padding: 10px 0; }
.stats .set .lab { min-width: 0; line-height: 1.35; }
.stats .set .lab small { display: block; font-size: 13px; color: var(--text-dim); }
.stepper { margin-left: auto; flex: none; display: inline-flex; align-items: center; border-radius: var(--r-btn); box-shadow: inset 0 0 0 1px var(--line); }
.stepper button { width: 44px; height: 44px; border: 0; background: none; border-radius: var(--r-btn); cursor: pointer; color: var(--text-soft); font-size: 18px; }
.stepper button:hover:not(:disabled) { background: var(--btn); color: var(--text); }
.stepper button:disabled { color: var(--text-dim); cursor: default; }
.stepper output { min-width: 48px; text-align: center; font-weight: 500; font-size: 15px; white-space: nowrap; }
