/* Dense log grid first, charts second. Neutral surfaces, no decoration. */
:root {
  --bg: #faf9f8;
  --surface: #ffffff;
  --fg: #1a1a1a;
  --fg-dim: #6b6b6b;
  --fg-faint: #999999;
  --line: #e0dfdd;
  --line-strong: #c8c7c4;
  --accent: #2563eb;
  --muted-bg: #f3f2f1;
  --ghost: #b0afac;
  --warn: #b45309;
  --series-1: #3274d9;
  /* Validated for colourblind separation in both themes; see the data-viz notes
     in docs. Order matters: adjacent slots are the pairs that must stay apart. */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
  --s4: #eda100; --s5: #e87ba4; --s6: #008300;
  --up: #37872d;
  --down: #c4162a;
  color-scheme: light;
}
/* Three states: no attribute follows the OS, an explicit choice overrides it both
   ways. The dark values appear twice because CSS has no way to name a block and
   apply it from two selectors; they must stay in step. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1a19;
    --surface: #242423;
    --fg: #f0efed;
    --fg-dim: #a3a3a0;
    --fg-faint: #787875;
    --line: #353533;
    --line-strong: #4a4a47;
    --accent: #7ba3f5;
    --muted-bg: #2d2d2b;
    --ghost: #63635f;
    --warn: #e9b871;
    --series-1: #5794f2;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70;
    --s4: #c98500; --s5: #d55181; --s6: #008300;
    --up: #73bf69;
    --down: #f2495c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #1a1a19;
    --surface: #242423;
    --fg: #f0efed;
    --fg-dim: #a3a3a0;
    --fg-faint: #787875;
    --line: #353533;
    --line-strong: #4a4a47;
    --accent: #7ba3f5;
    --muted-bg: #2d2d2b;
    --ghost: #63635f;
    --warn: #e9b871;
    --series-1: #5794f2;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70;
    --s4: #c98500; --s5: #d55181; --s6: #008300;
    --up: #73bf69;
    --down: #f2495c;
    color-scheme: dark;
}

* { box-sizing: border-box; }
/* A display rule on a class beats [hidden]'s default display:none, so pin it.
   Without this, .modes stays visible on the read-only share page. */
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  padding: 24px 16px calc(40px + env(safe-area-inset-bottom, 0px));
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 900px; margin: 0 auto; }

h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 14px; }
h2 {
  font-size: 16px; font-weight: 600; margin: 30px 0 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line-strong);
}
h3 { font-size: 13.5px; font-weight: 600; margin: 20px 0 6px; }
h3 .faint { font-weight: 400; color: var(--fg-faint); }
.note { color: var(--fg-dim); font-size: 13px; margin: 10px 0 0; max-width: 66ch; }
.note strong { color: var(--fg); font-weight: 600; }

/* mode switch */
.modes { display: flex; margin-bottom: 14px; }
.modes button {
  border-radius: 0; border: 1px solid var(--line-strong); margin-left: -1px;
  font-weight: 500; padding: 8px 16px;
}
.modes button:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.modes button:last-child { border-radius: 0 6px 6px 0; }
.modes button[aria-pressed="true"] {
  background: var(--fg); color: var(--bg); border-color: var(--fg); position: relative; z-index: 1;
}
.modes button[aria-pressed="true"]:hover { background: var(--fg); }

/* toolbars */
.bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 7px; padding: 10px 12px; margin-bottom: 12px;
}
.bar.footer { margin-top: 12px; margin-bottom: 0; }
.bar label { font-size: 12px; color: var(--fg-dim); }
.bar .spacer { flex: 1 1 auto; }
button, select, input[type="date"], input[type="number"] {
  font: inherit; color: var(--fg); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 5px;
  padding: 6px 9px; min-height: 36px;
}
input.narrow { width: 90px; }
button { cursor: pointer; }
button:hover { background: var(--muted-bg); }
button[disabled] { opacity: 0.5; cursor: default; }
button.primary {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500;
}
button.primary:hover:not([disabled]) { filter: brightness(1.08); }
button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.status { font-size: 13px; color: var(--fg-dim); }

/* the grid */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; }
thead th {
  background: var(--muted-bg); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--fg-dim); white-space: nowrap;
}
.num { text-align: right; font-variant-numeric: tabular-nums; }
#grid { min-width: 560px; }
#grid td.ex { font-weight: 500; white-space: nowrap; }
#grid td.tgt { color: var(--fg-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
#grid td.cell { padding: 0; width: 60px; }
#grid td.cell input {
  width: 100%; border: 0; background: transparent; font: inherit; color: var(--fg);
  text-align: right; padding: 8px; min-height: 0; border-radius: 0;
  font-variant-numeric: tabular-nums;
}
#grid td.cell input::placeholder { color: var(--ghost); }
#grid td.cell:focus-within { outline: 2px solid var(--series-1); outline-offset: -2px; }
#grid td.cell.off { background: var(--muted-bg); }
#grid td.vol { color: var(--fg-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
#grid tfoot td { background: var(--muted-bg); font-weight: 600; }
.swap {
  font: inherit; font-size: 11px; padding: 2px 6px; min-height: 0;
  border-radius: 4px; color: var(--accent); border-color: var(--line-strong);
  margin-left: 6px; background: transparent;
}

/* charts */
.inline-prog {
  border: 1px solid var(--line); border-left: 3px solid var(--series-1);
  border-radius: 0 7px 7px 0; padding: 12px 14px; margin-bottom: 12px; background: var(--surface);
}
.inline-prog .ihead {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fg-dim);
}
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 20px; margin-top: 10px; }
.charts.pair { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.facet { margin: 0; min-width: 0; }
.facet figcaption { font-size: 12.5px; font-weight: 500; }
.facet .trend { color: var(--fg-faint); font-weight: 400; font-size: 11.5px; }
.facet svg, .barchart svg { width: 100%; height: auto; display: block; }
.facet.none {
  border: 1px dashed var(--line-strong); border-radius: 6px; padding: 10px;
  font-size: 12px; color: var(--fg-dim); display: flex; flex-direction: column; gap: 2px;
}
.facet.none b { font-size: 12.5px; font-weight: 500; color: var(--fg); }
.barchart { margin-top: 10px; }
.line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.area { fill: var(--series-1); opacity: 0.1; stroke: none; }
.pt { fill: var(--surface); stroke: var(--series-1); stroke-width: 2; }
.pt-last { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.axis { stroke: var(--line-strong); stroke-width: 1; }
.grid { stroke: var(--line); stroke-width: 1; }
.bar { fill: var(--series-1); }
.val { fill: var(--fg); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; text-anchor: start; }
.val.end-first { text-anchor: end; fill: var(--fg-dim); font-weight: 500; }
.tick { fill: var(--fg-faint); font-size: 10px; text-anchor: middle; }
.barval { fill: var(--fg); font-size: 12px; font-weight: 600; text-anchor: middle; font-variant-numeric: tabular-nums; }
.xlab { fill: var(--fg-dim); font-size: 11px; text-anchor: middle; }
.ylab { fill: var(--fg-faint); font-size: 10px; text-anchor: end; font-variant-numeric: tabular-nums; }

/* body composition */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; margin: 12px 0; }
.metric {
  background: var(--surface); border: 1px solid var(--line); border-radius: 7px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.mlabel { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fg-dim); }
.metric b { font-size: 26px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric b .unit { font-size: 14px; font-weight: 400; color: var(--fg-dim); }
.mcap { font-size: 12px; color: var(--fg-dim); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* header menu */
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.menu-wrap { position: relative; }
.dots {
  min-height: 34px; padding: 2px 10px; font-size: 18px; line-height: 1;
  border-radius: 6px; color: var(--fg-dim);
}
.menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 10;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 7px; padding: 4px; min-width: 170px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.menu button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; border-radius: 5px; min-height: 0;
}
.menu button:hover { background: var(--muted-bg); }

/* share admin */
.newlink {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 0 7px 7px 0;
  padding: 12px 14px; margin-bottom: 12px;
}
.linkrow { display: flex; gap: 8px; margin-top: 6px; }
.linkrow input {
  flex: 1 1 auto; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
}
.sharerow {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.sharerow .who { font-weight: 500; }
.sharerow .when { color: var(--fg-dim); font-size: 12.5px; }
.sharerow .idfrag {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px;
  color: var(--fg-faint);
}
.sharerow .spacer { flex: 1 1 auto; }

/* ---- dashboard panels ---------------------------------------------------- */
.charts { grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr)); gap: 14px; }
.charts.pair { grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr)); }

.panel {
  margin: 0; min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px 6px;
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; padding-bottom: 4px;
}
.panel-title {
  font-size: 13px; font-weight: 500; color: var(--fg-dim);
  letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.panel-trend { font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.panel-trend.up { color: var(--up); }
.panel-trend.down { color: var(--down); }
.panel-trend.flat { color: var(--fg-faint); }
.panel-body { position: relative; }
.panel-body svg { width: 100%; height: auto; display: block; overflow: visible; }
.panel-legend {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--fg-dim); padding-top: 2px;
}
.g-key {
  width: 10px; height: 3px; border-radius: 2px; background: var(--series-1); display: inline-block;
}
.panel.empty { display: flex; flex-direction: column; }
.panel-empty {
  font-size: 12px; color: var(--fg-faint); padding: 20px 0 22px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: 3px; margin-top: 4px;
}

.g-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.g-axis { stroke: var(--line-strong); stroke-width: 1; }
.g-ylab, .g-xlab {
  fill: var(--fg-faint); font-size: 11px; font-variant-numeric: tabular-nums;
}
.g-ylab { text-anchor: end; }
.g-line {
  fill: none; stroke: var(--series-1); stroke-width: 2;
  stroke-linejoin: round; stroke-linecap: round;
}
.g-stop-a { stop-color: var(--series-1); stop-opacity: 0.28; }
.g-stop-b { stop-color: var(--series-1); stop-opacity: 0.02; }
.g-dot { fill: var(--series-1); opacity: 0; }
.g-dot.on { opacity: 1; stroke: var(--surface); stroke-width: 2; }
.g-cross { stroke: var(--fg-faint); stroke-width: 1; stroke-dasharray: 2 3; }
.g-tip {
  position: absolute; transform: translate(-50%, calc(-100% - 10px));
  background: var(--fg); color: var(--bg);
  border-radius: 3px; padding: 4px 7px; font-size: 11px; line-height: 1.35;
  pointer-events: none; white-space: nowrap; z-index: 5;
  display: flex; flex-direction: column;
}
.g-tip b { font-variant-numeric: tabular-nums; font-weight: 600; }
.g-tip span { opacity: 0.7; }

/* combined multi-series panel */
.panel.wide { grid-column: 1 / -1; }
.multi-legend {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  padding-top: 8px; font-size: 12px;
}
.multi-legend .item { display: flex; align-items: center; gap: 6px; min-width: 0; }
.multi-legend .k { width: 11px; height: 3px; border-radius: 2px; flex: 0 0 auto; }
.multi-legend .n { color: var(--fg-dim); white-space: nowrap; }
.multi-legend .v { font-variant-numeric: tabular-nums; font-weight: 600; }
.g-tip .tipgrid {
  display: grid; grid-template-columns: auto auto; gap: 1px 10px; margin-top: 3px;
}
.g-tip .tipgrid span { opacity: 0.85; }
.g-tip .tipgrid b { justify-self: end; }
.chartmode { display: flex; }
.chartmode button {
  border-radius: 0; margin-left: -1px; padding: 6px 12px; font-size: 13px; min-height: 32px;
}
.chartmode button:first-child { border-radius: 5px 0 0 5px; margin-left: 0; }
.chartmode button:last-child { border-radius: 0 5px 5px 0; }
.chartmode button[aria-pressed="true"] {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}
.chartmode button[aria-pressed="true"]:hover { background: var(--fg); }

.g-mdot { stroke: var(--surface); stroke-width: 1.5; }

/* a set that fell short of its rep target */
#grid td.cell.short { position: relative; }
#grid td.cell.short::after {
  content: ""; position: absolute; top: 0; right: 0;
  border-top: 7px solid var(--warn); border-left: 7px solid transparent;
}
#grid td.cell.short input { color: var(--warn); }

/* one-tap reps for a set that fell short */
.repbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-left: 3px solid var(--warn); border-radius: 0 7px 7px 0;
  padding: 8px 12px; margin-top: 10px;
}
.replabel { font-size: 12.5px; color: var(--fg-dim); }
.replabel b { color: var(--fg); font-weight: 600; }
.repchips { display: flex; gap: 6px; flex-wrap: wrap; }
.repchips button {
  min-height: 40px; min-width: 46px; padding: 6px 10px;
  font-variant-numeric: tabular-nums; font-size: 15px;
}
.repchips button.hit { border-color: var(--fg-dim); }
.repchips button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.repchips button.on:hover { background: var(--fg); }

.opt { color: var(--fg-faint); font-weight: 400; font-size: 11.5px; }
.prog-head:first-child { margin-top: 6px; }

.g-level { stroke: var(--series-1); stroke-width: 2; stroke-dasharray: 5 4; opacity: 0.75; }
.panel .g-dot { opacity: 0; }
.panel svg:has(.g-level) .g-dot { opacity: 1; stroke: var(--surface); stroke-width: 2; }

/* appearance control inside the menu */
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--fg-faint); padding: 2px 10px 4px;
}
.themeset { display: flex; padding: 0 4px 2px; }
.themeset button {
  flex: 1 1 0; text-align: center; border: 1px solid var(--line-strong);
  border-radius: 0; margin-left: -1px; padding: 6px 4px; font-size: 12.5px;
  min-height: 34px; background: var(--surface);
}
.themeset button:first-child { border-radius: 5px 0 0 5px; margin-left: 0; }
.themeset button:last-child { border-radius: 0 5px 5px 0; }
.themeset button[aria-pressed="true"] {
  background: var(--fg); color: var(--bg); border-color: var(--fg); position: relative; z-index: 1;
}
.themeset button[aria-pressed="true"]:hover { background: var(--fg); }

/* a set you did not do */
#grid td.cell.skipped input { color: var(--fg-faint); }
#grid td.cell.skipped { background: repeating-linear-gradient(
  -45deg, transparent, transparent 4px, var(--muted-bg) 4px, var(--muted-bg) 8px); }

/* rep bar: the two one-tap actions sit apart from the numbers */
.repchips button.act { min-width: 0; padding: 6px 12px; font-size: 13px; }
.repchips button.act + button:not(.act) { margin-left: 8px; }

/* isolating one series in the grouped chart */
.multi-legend .item {
  background: transparent; border: 1px solid transparent; border-radius: 5px;
  padding: 3px 7px; min-height: 0; cursor: pointer; font: inherit; font-size: 12px;
}
.multi-legend .item:hover { background: var(--muted-bg); }
.multi-legend .item[aria-pressed="true"] { border-color: var(--line-strong); background: var(--muted-bg); }
.g-series { transition: opacity 120ms ease; }
.g-series.dim { opacity: 0.12; }
@media (prefers-reduced-motion: reduce) { .g-series { transition: none; } }

/* the dialog shell, used by the save confirmation */
.demo {
  position: fixed; inset: 0; z-index: 40; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}
.demo-card {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 12px; max-width: min(92vw, 460px); display: flex; flex-direction: column; gap: 8px;
}

.btn-link {
  display: inline-block; margin-top: 16px; padding: 11px 18px; border-radius: 8px;
  background: var(--accent); color: var(--bg); text-decoration: none;
  font-weight: 600; font-size: 15px;
}
.btn-link:hover { filter: brightness(1.06); }

/* ---- picking a programme, first run ------------------------------------- */
.start-h { margin: 18px 0 4px; font-size: 20px; }
.tpl-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.tpl {
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  padding: 14px 16px;
}
.tpl-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tpl-name { font-size: 16px; font-weight: 600; }
.tpl-size { color: var(--fg-dim); font-size: 13px; }
.tpl p { margin: 6px 0 12px; color: var(--fg-dim); font-size: 14px; max-width: 58ch; }
.tpl-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.tpl-preview { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.tpl-w { margin: 0 0 10px; }
.tpl-w h4 { margin: 0 0 4px; font-size: 13px; }
.tpl-w ul { margin: 0; padding-left: 18px; color: var(--fg-dim); font-size: 13px; }
.tpl-w li { margin: 1px 0; }
.tpl-w .sub { opacity: 0.75; }

/* ---- the programme editor ----------------------------------------------- */
.wk {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); margin-bottom: 8px;
}
.wk input[type="text"] { flex: 1 1 140px; min-width: 0; }
.wk .wk-n {
  color: var(--fg-dim); font-size: 12px; font-weight: 600; white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.wk-acts { display: flex; gap: 6px; margin-left: auto; }
#slotTable { width: 100%; border-collapse: collapse; }
#slotTable th, #slotTable td { padding: 5px 6px; border-bottom: 1px solid var(--line); }
#slotTable th {
  text-align: left; font-size: 11px; letter-spacing: 0.04em; color: var(--fg-dim);
  text-transform: uppercase; font-weight: 600;
}
#slotTable select { max-width: 190px; }
#slotTable .n { width: 64px; }
#slotTable .sub td { background: var(--muted-bg); }
#slotTable .subtag { color: var(--fg-dim); font-size: 11px; }

/* ---- account ------------------------------------------------------------- */
.acct { display: flex; gap: 10px; margin: 14px 0 0; font-size: 14px; }
.acct dt { color: var(--fg-dim); }
.acct dd { margin: 0; }
.acct-h { margin: 22px 0 2px; font-size: 15px; }
/* --down is the system's existing red, defined in both themes; a new --danger
   token would be the same colour under a second name. */
.note.warn { color: var(--down); }
button.danger { color: var(--down); border-color: currentColor; }
#feedbackBody {
  width: 100%; margin-top: 10px; padding: 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  font: inherit; resize: vertical;
}

/* confirming a save: the same card as a demo, saying what is about to be written */
.confirm-card { gap: 4px; max-width: min(92vw, 360px); padding: 16px; }
.confirm-detail { color: var(--fg-dim); font-size: 13px; }
.confirm-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* a label and its input stay together when the bar wraps */
.field { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.field label { white-space: nowrap; }

/* a word on saving */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  background: var(--fg); color: var(--bg);
  padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22); max-width: calc(100vw - 32px);
  text-align: center;
}
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: toast-in 180ms ease-out; }
  @keyframes toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(6px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
  }
}

/* ---- the owner's numbers page ------------------------------------------- */
.backlink { color: var(--fg-dim); font-size: 14px; }
.adm-h { margin: 26px 0 2px; font-size: 16px; }
.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px; margin-top: 16px;
}
.tile {
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  padding: 12px 14px;
}
.tile-v { font-size: 26px; font-weight: 600; line-height: 1.1; }
.tile-l { color: var(--fg-dim); font-size: 13px; margin-top: 2px; }
.tile-s { color: var(--fg-faint); font-size: 12px; margin-top: 1px; }
.adm-chart {
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  padding: 10px 12px; margin-top: 10px;
}
.adm-chart h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
.adm-chart svg { width: 100%; height: auto; display: block; }
.adm-row {
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  padding: 9px 12px; margin-top: 8px; font-size: 14px;
}
.adm-fb {
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  padding: 10px 12px; margin-top: 8px;
}
.adm-fb-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.adm-kind { font-size: 12px; font-weight: 600; }
.adm-who { color: var(--fg-faint); font-size: 12px; }
.adm-fb p { margin: 5px 0 0; font-size: 14px; white-space: pre-wrap; }

/* ---- stretches: a checklist, not a log ---------------------------------- */
.st {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); margin-bottom: 8px; cursor: pointer;
}
.st input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.st-name { font-size: 15px; }
.st-hold { color: var(--fg-dim); font-size: 13px; margin-left: auto; white-space: nowrap; }
.st.done .st-name { color: var(--fg-dim); text-decoration: line-through; }
#stretchTable { width: 100%; border-collapse: collapse; }
#stretchTable th, #stretchTable td { padding: 5px 6px; border-bottom: 1px solid var(--line); }
#stretchTable th {
  text-align: left; font-size: 11px; letter-spacing: 0.04em; color: var(--fg-dim);
  text-transform: uppercase; font-weight: 600;
}
#stretchTable .n { width: 64px; }

/* ---- the trial banner and the health-data opt-in ------------------------ */
.banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 12px 0 0; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--muted-bg); font-size: 14px;
}
.banner.urgent { border-color: var(--warn); }
.banner.locked { border-color: var(--down); }
.banner-act {
  margin-left: auto; color: var(--bg); background: var(--accent);
  padding: 6px 12px; border-radius: 6px; text-decoration: none; font-weight: 600;
}
.consent {
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  padding: 12px 14px; margin-top: 12px;
}
.consent .note { margin-top: 0; max-width: 60ch; }

/* ---- the landing page and the policy pages ------------------------------ */
.site { max-width: 760px; }
.site-head { display: flex; align-items: baseline; justify-content: space-between; }
.site-signin { color: var(--fg-dim); font-size: 14px; }
.hero { margin: 40px 0 36px; }
.hero-h { font-size: 38px; line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
.hero-sub { font-size: 19px; color: var(--fg-dim); margin: 10px 0 0; }
.hero-points { list-style: none; padding: 0; margin: 20px 0 0; display: flex; gap: 20px;
  flex-wrap: wrap; font-size: 15px; }
.hero-points li::before { content: "—"; color: var(--fg-faint); margin-right: 7px; }
.hero-terms { font-size: 15px; color: var(--fg-dim); margin: 14px 0 0; }
.hero-cta {
  display: inline-block; background: var(--accent); color: var(--bg);
  padding: 13px 22px; border-radius: 8px; text-decoration: none;
  font-weight: 600; font-size: 16px;
}
.shot { margin: 8px 0 36px; }
.shot .ghosted { color: var(--ghost); }
.site-foot {
  display: flex; gap: 18px; flex-wrap: wrap; padding: 20px 0 40px;
  border-top: 1px solid var(--line); font-size: 14px;
}
.site-foot a { color: var(--fg-dim); }
.crumb { margin: 18px 0 0; font-size: 14px; }
.prose h1 { margin: 6px 0 0; }
.prose h2 { margin: 30px 0 6px; font-size: 17px; }
.prose p, .prose li { max-width: 68ch; line-height: 1.55; }
.prose-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.prose-table th, .prose-table td {
  text-align: left; vertical-align: top; padding: 7px 10px 7px 0;
  border-bottom: 1px solid var(--line);
}
.prose-table th { color: var(--fg-dim); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.04em; }
