/* Tally on the desktop (Brief 18). The phone's type and rules on a dark ground: ink page, paper text, one blue, one red. */
@font-face { font-family: "Chivo"; src: url("/fonts/Chivo[wght].ttf") format("truetype"); font-weight: 100 900; }
@font-face { font-family: "Chivo Mono"; src: url("/fonts/ChivoMono[wght].ttf") format("truetype"); font-weight: 100 900; }

:root {
  --ink: #141414; --paper: #f7f7f4; --hair: #3a3a37; --muted: #8f8f89; --faint: #5a5a56; --raised: #1c1c1b; --track: #2a2a28;
  --blue: oklch(0.75 0.14 250); --red: oklch(0.7 0.18 25); --onblue: #141414; --onbtn: #f7f7f4; --window: #0e0e0d;
  --interac: #1a1a19; --hover: #1f1f1d; --next: #b5b5af;
  --h1: #2a2a28; --h2: #4a4a47; --h3: #8a8a85; --h4: #f7f7f4;
  --sans: "Chivo", "Helvetica Neue", Arial, sans-serif; --mono: "Chivo Mono", "SF Mono", Menlo, monospace;
}
/* Brief 22: the light palette. The variable names keep their dark-era meaning: --ink is the page ground and --paper is the
   text and filled-control colour, so in light they swap values. SYSTEM follows the Mac; data-theme (set from the stored
   choice) overrides it either way. The sign-in screen keeps the dark values in both modes. */
:root[data-theme="light"] {
  --ink: #f7f7f4; --paper: #141414; --hair: #d9d9d4; --muted: #6b6b66; --faint: #b5b5af; --raised: #efefea; --track: #e6e6e1;
  --blue: oklch(0.55 0.18 250); --red: oklch(0.6 0.2 25); --onblue: #ffffff; --onbtn: #ffffff; --window: #e9e9e4;
  --interac: #f1f1ed; --hover: #ececE7; --next: #55554f;
  --h1: #e6e6e1; --h2: #c4c4be; --h3: #8a8a85; --h4: #141414;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ink: #f7f7f4; --paper: #141414; --hair: #d9d9d4; --muted: #6b6b66; --faint: #b5b5af; --raised: #efefea; --track: #e6e6e1;
    --blue: oklch(0.55 0.18 250); --red: oklch(0.6 0.2 25); --onblue: #ffffff; --onbtn: #ffffff; --window: #e9e9e4;
    --interac: #f1f1ed; --hover: #ececE7; --next: #55554f;
    --h1: #e6e6e1; --h2: #c4c4be; --h3: #8a8a85; --h4: #141414;
  }
}
.login, .gate {
  --ink: #141414; --paper: #f7f7f4; --hair: #3a3a37; --muted: #8f8f89; --faint: #5a5a56; --raised: #1c1c1b; --track: #2a2a28;
  --blue: oklch(0.75 0.14 250); --red: oklch(0.7 0.18 25); --onblue: #141414; --onbtn: #f7f7f4;
}
html { background: var(--window); }
* { box-sizing: border-box; margin: 0; padding: 0; }
/* Brief 18 §1: the page never scrolls; only the region under the top bar does. */
html, body { height: 100%; overflow: hidden; }
body { background: var(--ink); color: var(--paper); font: 13px/1.4 var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; background: none; border: 0; border-radius: 0; }
button { cursor: pointer; text-align: left; }
button:disabled { opacity: .35; cursor: default; }
input:focus { outline: none; }
input::placeholder { color: var(--faint); }
b { font-weight: 700; }
.mono { font-family: var(--mono); font-size: 11px; }
.mono.small, .small { font-size: 10px; }
.mono.tiny { font-size: 9px; letter-spacing: .1em; }
.mono.big { font-size: 22px; font-weight: 500; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.blue { color: var(--blue); }
.red { color: var(--red); }
.right { text-align: right; }
.struck { text-decoration: line-through; color: var(--faint); }
.underline { text-decoration: underline; }
.eyebrow { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 3px; }
.line { font-size: 13px; line-height: 1.5; color: var(--paper); }
.coach { font-size: 13px; line-height: 1.5; color: var(--muted); }
.hr { height: 1px; background: var(--hair); }
.hr.ink { background: var(--paper); }
.pad { padding: 12px 0; }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }

/* Frame */
.app { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
.top { flex: none; height: 52px; display: flex; align-items: center; gap: 28px; padding: 0 20px; border-bottom: 1px solid var(--paper); }
.wordmark { font-family: var(--sans); font-weight: 700; font-size: 18px; letter-spacing: -.01em; white-space: nowrap; }
.wordmark.big { font-size: 34px; }
.tabs { display: flex; gap: 22px; height: 100%; white-space: nowrap; }
.tab { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; color: var(--muted); height: 100%; display: flex; align-items: center; border-bottom: 2px solid transparent; padding-top: 2px; }
.tab.on { color: var(--paper); border-bottom-color: var(--paper); }
.readouts { margin-left: auto; display: flex; align-items: center; gap: 22px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); white-space: nowrap; min-width: 0; }
.readouts [hidden] { display: none; }
.demochip { background: var(--paper); color: var(--ink); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; padding: 5px 9px; }
.content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 32px clamp(20px, 3vw, 48px) 44px; }

/* Brief 18 §2: the rail system. */
.tabrow { display: flex; flex-wrap: wrap; gap: 34px 48px; align-items: flex-start; }
.rail { flex: 0 0 360px; display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.pane { flex: 999 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.today .pane.habits { flex: 2 1 340px; }
.today .pane.list { flex: 1 1 300px; }
.railhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; min-height: 30px; }
.railhead .eyebrow { white-space: nowrap; padding-top: 2px; }
.railtitle { font-family: var(--mono); font-size: 11px; color: var(--paper); margin-top: 3px; }
.steppers { display: flex; gap: 6px; }
.step { width: 30px; height: 30px; border: 1px solid var(--paper); font-family: var(--mono); font-size: 14px; display: flex; align-items: center; justify-content: center; }
.step:disabled { border-color: var(--hair); opacity: 1; color: var(--faint); }
.hero { font-family: var(--mono); font-weight: 500; font-size: 132px; line-height: .9; letter-spacing: -.06em; margin-top: 10px; white-space: nowrap; }
.hero .denom { color: var(--faint); }
.hero.stake.red { color: var(--red); }
.hero.money { font-size: 72px; letter-spacing: -.05em; }
.sub { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 12px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.stat .statv { font-family: var(--mono); font-weight: 500; font-size: 26px; line-height: 1; margin-top: 8px; letter-spacing: -.02em; }
.stat .statv.small { font-size: 14px; margin-top: 12px; }
.stat .unit { font-size: 12px; color: var(--muted); letter-spacing: 0; }
.stat .statsub { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.stat.wide { grid-column: 1 / -1; }
.statline { font-size: 13px; margin-top: 6px; line-height: 1.4; }
.panetitle { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 30px; }
.panetitle h2 { font-family: var(--sans); font-weight: 700; font-size: 22px; letter-spacing: -.01em; white-space: nowrap; }
.grouphead { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--hair); }
.grouphead.bare { border: 0; padding-bottom: 6px; }
.grouphead.rule { border-top: 1px solid var(--paper); border-bottom: 0; padding: 8px 0; }
.grouphead.top { margin-top: 10px; }
.grouphead .hint { margin: 0; font-family: var(--mono); font-size: 10px; }
.block { display: flex; flex-direction: column; gap: 10px; }

/* Rows */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.row.last { border-bottom: 0; }
.rowmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.name { font-size: 16px; font-weight: 500; line-height: 1.2; }
.name.muted { color: var(--muted); }
.subline { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.subline.strong { color: var(--paper); }
.xptag { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .04em; margin-left: 6px; color: var(--paper); }
.xptag.blue { color: var(--blue); }
.xptag.muted { color: var(--faint); }
.box { width: 22px; height: 22px; flex: none; border: 1.5px solid var(--paper); border-radius: 2px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; font-family: var(--mono); }
.box.done { background: var(--paper); color: var(--ink); }
.box.passed { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--faint) 4px 5px); border-color: var(--faint); }
.box.partial { font-size: 10px; }
.box.bonusOpen { border-style: dashed; border-color: var(--muted); }
.box.bonusDone { background: var(--blue); border-color: var(--blue); color: var(--onblue); }
.weekcol { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.pass { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; padding: 6px 10px; border: 1px solid var(--paper); }
.pass.on { background: var(--paper); color: var(--ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chips.wrap { gap: 6px; }
.chip { font-family: var(--mono); font-size: 11px; padding: 6px 10px; border: 1px solid var(--paper); white-space: nowrap; }
.chip.small { font-size: 10px; padding: 5px 8px; letter-spacing: .06em; }
.chip.on { background: var(--paper); color: var(--ink); }
.chip.blue.on { background: var(--blue); border-color: var(--blue); color: var(--onblue); }
.chip.dim { border-color: var(--hair); color: var(--muted); }
.chip.undo { border-color: var(--hair); color: var(--muted); }
.chip.red.on { background: var(--red); border-color: var(--red); color: var(--onblue); }
.bar { background: var(--track); width: 100%; position: relative; }
.bar i { display: block; height: 100%; background: var(--paper); }
.bar i.blue { background: var(--blue); }
.row.qty { flex-direction: column; align-items: stretch; gap: 10px; }
.qhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.row.list { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
.rowtop { display: flex; align-items: center; gap: 14px; padding: 14px 0; }
.caret { font-family: var(--mono); font-size: 16px; color: var(--muted); width: 16px; text-align: center; transition: transform .15s; display: inline-block; }
.caret.open { transform: rotate(90deg); }
.items { display: flex; flex-direction: column; padding-bottom: 6px; }
.item { display: flex; align-items: center; gap: 12px; padding: 9px 0 9px 36px; border-top: 1px solid var(--track); }
.ibox { width: 18px; height: 18px; border: 1.5px solid var(--paper); border-radius: 2px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.item.on .ibox { background: var(--paper); color: var(--ink); }
.ilabel { flex: 1; font-size: 13px; }
.item.on .ilabel { color: var(--muted); text-decoration: line-through; }
.idose { font-family: var(--mono); font-size: 10px; color: var(--faint); white-space: nowrap; }
.strip { display: block; width: 100%; background: var(--paper); color: var(--ink); padding: 12px 14px; }
.stripk { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; opacity: .65; }
.stript { font-size: 15px; font-weight: 500; margin-top: 4px; }
.strips { font-family: var(--mono); font-size: 11px; opacity: .75; margin-top: 3px; }
.mono.pad { padding: 8px 0; }
[draggable] .handle, [draggable] { cursor: default; }
.lifted { opacity: .5; }
.over { box-shadow: inset 0 2px 0 var(--blue); }
.handle { width: 22px; flex: none; display: flex; flex-direction: column; gap: 3px; align-items: center; cursor: grab; }
.handle i { display: block; width: 14px; height: 1px; background: var(--faint); }

/* List pane */
.upblock { border: 1px solid var(--paper); padding: 14px 16px 10px; }
.addrow { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.addrow input { flex: 1; font-size: 15px; font-weight: 500; }
button.addrow { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; padding: 14px 0; width: 100%; }
.arrow { width: 22px; height: 22px; border: 1px solid var(--hair); border-radius: 2px; font-family: var(--mono); font-size: 11px; color: var(--muted); display: flex; align-items: center; justify-content: center; flex: none; }
.arrow.off { opacity: .45; }
.duechip { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .06em; color: var(--blue); border: 1px solid var(--blue); padding: 3px 6px; white-space: nowrap; }
.duechip.solid { background: var(--blue); color: var(--onblue); }
.row.done .name { color: var(--faint); text-decoration: line-through; }
.todoform { flex-direction: column; align-items: stretch; gap: 12px; }
.field { width: 100%; font-size: 16px; font-weight: 500; padding: 4px 0 8px; border-bottom: 1px solid var(--paper); }
.field.mono { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.field.big { font-size: 20px; }
.field.short { width: 110px; flex: none; }
.field.mono.big { font-size: 24px; }
.datefield { font-family: var(--mono); font-size: 12px; padding: 6px 8px; border: 1px solid var(--hair); color: var(--paper); color-scheme: dark; }
.formline { display: flex; align-items: center; gap: 14px; }
.formline.col { flex-direction: column; align-items: stretch; gap: 6px; }
.fieldlabel { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.fieldlabel.short { flex: 0 0 90px; }
.primary { background: var(--paper); color: var(--ink); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; padding: 12px 22px; text-align: center; white-space: nowrap; }
.primary.small { padding: 8px 14px; font-size: 10px; }
.primary.wide { width: 100%; padding: 15px; }
.ghost { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); padding: 8px 0; }
.ghost.small { font-size: 10px; }
.ghost.red { color: var(--red); text-decoration: underline; }
.outline { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .1em; padding: 7px 10px; border: 1px solid var(--paper); white-space: nowrap; }
.outline.wide { width: 100%; display: flex; justify-content: space-between; padding: 14px 16px; border-color: var(--hair); }
.outline.wide.red { color: var(--red); justify-content: center; }
.link { font-family: var(--mono); font-size: 11px; font-weight: 500; text-decoration: underline; color: var(--paper); }
.link.back { font-size: 11px; color: var(--muted); text-decoration: none; }
.link.wide { width: 100%; text-align: center; padding: 12px 0; font-size: 10px; letter-spacing: .08em; text-decoration: none; }
.eyebrow.link { text-decoration: none; }
.x { width: 28px; height: 28px; flex: none; border: 1px solid var(--hair); font-family: var(--mono); font-size: 14px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.x.small { width: 22px; height: 22px; font-size: 12px; }
.seg { display: inline-flex; border: 1px solid var(--paper); }
.seg button { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; padding: 7px 9px; color: var(--paper); white-space: nowrap; }
.seg button.on { background: var(--paper); color: var(--ink); }
.seg.red button.on { background: var(--red); color: var(--onblue); }
.stepper { display: inline-flex; border: 1px solid var(--paper); align-items: center; }
.stepper button { width: 36px; height: 36px; font-family: var(--mono); font-size: 16px; text-align: center; }
.stepper span { width: 36px; text-align: center; font-family: var(--mono); font-size: 16px; }
.sqtoggle { width: 26px; height: 26px; border: 1.5px solid var(--paper); border-radius: 2px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.sqtoggle.on { background: var(--paper); color: var(--ink); }
.form { border: 1px solid var(--paper); padding: 18px; display: flex; flex-direction: column; gap: 0; }
.form .fieldlabel { margin-bottom: 16px; }
.form .formrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--hair); }
.form .formrow > div:first-child { flex: 1; min-width: 0; }
.form .items.form { border: 0; padding: 6px 0; border-top: 1px solid var(--hair); gap: 10px; }
.form .items .formline { padding: 4px 0; }
.form .primary { margin-top: 18px; align-self: flex-start; }
.form > .eyebrow { margin-bottom: 14px; }
.form .formline { padding: 12px 0; border-top: 1px solid var(--hair); }

/* Week */
.switch { display: block; width: 100%; padding-bottom: 8px; border-bottom: 2px solid var(--hair); }
.switch.on { border-bottom-color: var(--paper); }
.herosw { border-bottom: 0; }
.swhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.swtag { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--muted); min-width: 54px; text-align: right; white-space: nowrap; }
.swtag.on { color: var(--paper); font-weight: 500; }
.table { display: flex; flex-direction: column; }
.trow { display: grid; grid-template-columns: minmax(90px, 150px) minmax(160px, 1fr) minmax(0, 260px) 48px; gap: 20px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hair); min-height: 39px; }
.trow.head { padding: 6px 0; border-bottom-color: var(--paper); min-height: 0; }
.trow.head .cells span { font-family: var(--mono); font-size: 10px; text-align: center; color: var(--paper); }
.trow.foot { border-bottom: 0; padding-top: 12px; }
.trow.foot .tname { font-weight: 500; }
.tname { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sizechip { display: inline-block; font-family: var(--mono); font-size: 9px; border: 1px solid var(--hair); color: var(--muted); padding: 1px 4px; margin-left: 6px; vertical-align: middle; }
.cells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cell { display: block; height: 24px; background: var(--track); position: relative; }
.cell.fill { background: var(--paper); }
.cell.blue { background: var(--blue); }
.cell.dashed { background: none; border: 1px dashed var(--hair); }
.cell.dashed.dim { border-color: var(--track); }
.cell.today { background: none; border: 1.5px solid var(--paper); }
.cell.passed { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--faint) 4px 5px); }
.cell.part::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--f) * 100%); background: var(--paper); }
.tworking { font-size: 10px; line-height: 1.3; }
.tvalue { text-align: right; font-size: 11px; }
.pdays { display: flex; flex-direction: column; gap: 6px; }
.pday { display: flex; gap: 12px; font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.pday .mono { width: 34px; flex: none; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.tile { background: var(--ink); padding: 12px 10px; }
.tile.blue { background: oklch(0.55 0.18 250); color: #ffffff; }  /* Brief 22: deep blue with white text in both modes, like LOG A PAYMENT */
.tile.blue .eyebrow, .tile.blue .hint { color: #ffffff; opacity: .75; }
.tilev { font-family: var(--mono); font-weight: 500; font-size: 24px; margin-top: 6px; }
.tiles.small .tilev { font-size: 20px; }
.tiles.small .hint { font-size: 10px; }
.wbars { display: flex; gap: 5px; align-items: flex-end; height: 110px; border-bottom: 1px solid var(--paper); padding-bottom: 0; }
.wbar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.wbar i { display: block; background: var(--h2); width: 100%; }
.wbar i.blue { background: var(--blue); }
.wbar span { position: absolute; top: 100%; margin-top: 5px; width: 100%; text-align: center; font-family: var(--mono); font-size: 9px; color: var(--muted); }
.block:has(.wbars) { padding-bottom: 18px; }
/* One grid for the whole map, so every column lines up down all seven rows. Flex rows drifted a fraction per
   cell, and a dashed cell added its 1px border on top of its flex length, so a row with future days ran 2px narrow. */
.heat { display: grid; grid-template-columns: 24px repeat(12, minmax(0, 1fr)); gap: 3px; align-items: center; }
.hrow { display: contents; }
.hrow .mono { width: 24px; }
.hrow i { height: 14px; display: block; min-width: 0; }
.hrow i.dashed { border: 1px dashed var(--hair); }
.h1 { background: var(--h1); } .h2 { background: var(--h2); } .h3 { background: var(--h3); } .h4 { background: var(--h4); }
.legend { display: flex; gap: 6px; align-items: center; }
.legend i { width: 14px; height: 14px; display: block; }
.crow { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hair); }
.crow .name { width: 70px; flex: none; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow .bar { flex: 1; }
.crow .mono { width: 40px; text-align: right; flex: none; }
.crow .mono.muted { width: 76px; font-size: 10px; }

/* Stakes */
.srow { display: grid; grid-template-columns: 106px minmax(0, 1fr) auto 28px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.srow.suggest { width: 100%; grid-template-columns: 22px minmax(0, 1fr) auto; }
.ticks { display: flex; gap: 6px; }
.ticks .box { width: 18px; height: 18px; font-size: 10px; }
.scol { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.prow { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.prow .mono.muted:first-child { width: 64px; flex: none; }
.prow.pay .name { flex: 1; font-size: 14px; }

/* Money */
.pace { margin-top: 14px; }
.pacebar { height: 10px; background: var(--track); position: relative; }
.pacebar i { display: block; height: 100%; background: var(--paper); }
.pacebar b { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--blue); margin-left: -1px; }
.pacelabels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; }
.committed { display: flex; flex-direction: column; gap: 10px; }
/* Brief 21 §1: the Interac block, the Money rail's only boxed block. */
.interac { border: 1px solid var(--hair); background: var(--interac); padding: 16px; display: flex; flex-direction: column; }
.interac .chead { padding-bottom: 14px; }
.ixtight { font-family: var(--mono); font-weight: 500; font-size: 16px; margin-top: 8px; line-height: 1; letter-spacing: .02em; }
.ixrow { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--hair); }
.ixhead { display: flex; justify-content: space-between; align-items: baseline; }
.ixleft { font-size: 13px; }
.bar.ixused i { background: var(--red); }
.ixnote { font-size: 12px; line-height: 1.5; color: var(--paper); opacity: .8; padding-top: 12px; border-top: 1px solid var(--hair); }
.chead { display: flex; justify-content: space-between; align-items: flex-end; }
.cval { font-family: var(--mono); font-weight: 500; font-size: 34px; letter-spacing: -.02em; margin-top: 8px; line-height: 1; }
.cfreed { font-family: var(--mono); font-weight: 500; font-size: 20px; margin-top: 8px; line-height: 1; }
.right { text-align: right; }
.segments { display: flex; gap: 1px; height: 10px; }
.segments i { display: block; background: var(--hair); }
.segments i.blue { background: var(--blue); }
.segments i.empty { background: var(--track); }
.arow { display: flex; flex-direction: column; gap: 8px; padding: 13px 0; border-bottom: 1px solid var(--hair); width: 100%; }
.arow.first { border-top: 1px solid var(--paper); }
.ahead { display: flex; align-items: baseline; gap: 8px; }
.ahead .name { flex: 1; }
.afoot { display: flex; justify-content: space-between; gap: 8px; }
.afoot .mono { font-size: 10px; }
.pbhead { display: flex; justify-content: space-between; align-items: flex-end; }
.payback { display: flex; flex-direction: column; gap: 14px; }
.foot { display: flex; gap: 32px; padding-top: 22px; border-top: 1px solid var(--hair); flex-wrap: wrap; }
.footcol { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.plan { display: flex; gap: 22px; }
.plan label { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.plan .datefield { border: 0; border-bottom: 1px solid var(--paper); padding: 4px 0 8px; font-size: 14px; }

/* You */
.xpbar { margin-top: 12px; }
.badgesblock { display: flex; flex-direction: column; gap: 12px; }
.strip2 { display: flex; flex-direction: column; gap: 6px; }
.bgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.bgrid > i { background: var(--ink); }
.btile { background: var(--raised); color: var(--muted); padding: 12px 12px 0; display: flex; flex-direction: column; gap: 5px; min-height: 118px; position: relative; text-align: left; }
.btile.earned { background: var(--ink); color: var(--paper); box-shadow: inset 0 2px 0 var(--blue); }
.btile .glyph { font-family: var(--mono); font-weight: 500; font-size: 20px; color: var(--faint); }
.btile.earned .glyph { color: var(--blue); }
.btile .bname { font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btile .bsub { font-family: var(--mono); font-size: 9px; line-height: 1.3; opacity: .7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.btile .btag { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .07em; height: 11px; margin-top: auto; }
.btile.earned .btag { color: var(--blue); }
.btile .btrack { margin-top: 8px; }
.hgroup { display: flex; flex-direction: column; }
.habitrow { padding: 12px 0; }
.youfoot { display: flex; flex-direction: column; gap: 24px; padding-top: 24px; border-top: 1px solid var(--hair); }
.scrow { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); align-items: flex-start; }
.scrow .mono { width: 64px; flex: none; padding-top: 2px; }
.sctext { font-size: 13px; line-height: 1.6; }
.inchip { font-family: var(--mono); font-size: 12px; padding: 0 4px; border: 1px solid var(--hair); }
.inchip.blue { color: var(--blue); border-color: var(--blue); }
.demoblock { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--paper); }

/* Guide */
.guide { max-width: 720px; gap: 28px; }
.prose { font-size: 13px; line-height: 1.6; }
.gsection { display: flex; gap: 16px; }
.gnum { font-family: var(--mono); font-size: 44px; color: var(--hair); width: 64px; flex: none; line-height: 1; }
.gbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.gbody h3 { font-size: 20px; font-weight: 700; }
.formula { font-family: var(--mono); font-size: 13px; padding: 12px; background: var(--raised); white-space: pre; }
.gr { display: grid; grid-template-columns: minmax(0, 1fr) 80px 64px; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hair); align-items: baseline; font-size: 13px; }
.gr.head { padding: 8px 0; }
.gr.two { grid-template-columns: minmax(0, 1fr) auto; }
.gr.three { grid-template-columns: 96px minmax(0, 1fr) auto; align-items: flex-start; line-height: 1.5; }
.gr.def { grid-template-columns: 84px minmax(0, 1fr); }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
.lvl { background: var(--raised); padding: 10px; display: flex; flex-direction: column; gap: 4px; }

/* Panels and cards (Brief 18 §8) */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 20; display: flex; align-items: center; justify-content: center; }
.scrim.side { justify-content: flex-end; align-items: stretch; }   /* never ".right": that is the text-align utility, and the panel inherited it (found 22 Sep) */
.panel { width: 100%; max-width: 480px; height: 100%; background: var(--ink); border-left: 1px solid var(--paper); display: flex; flex-direction: column; overflow: hidden; }
.panelhead { flex: none; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--hair); }
.panelhead h2 { font-size: 22px; font-weight: 700; }
.panelbody { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 24px 40px; display: flex; flex-direction: column; gap: 22px; }
.amountline { display: flex; align-items: baseline; gap: 8px; border-bottom: 1px solid var(--paper); padding-bottom: 8px; margin: 10px 0 12px; }
.amountline .big { font-size: 32px; }
.amount { font-family: var(--mono); font-size: 40px; width: 100%; }

.pbox { border: 1px solid var(--paper); padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.balance { display: flex; flex-direction: column; gap: 8px; }
.sixgrid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--paper); }
.six { padding: 14px 10px 12px 14px; border-bottom: 1px solid var(--hair); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.six:nth-child(odd) { border-right: 1px solid var(--hair); }
.six:nth-last-child(-n+2) { border-bottom: 0; }
.sixv { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.editline { display: flex; align-items: baseline; gap: 8px; }
.editline .field { padding: 2px 0; border-bottom-width: 1px; }
.timeline { display: flex; flex-direction: column; }
.tlrow { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); align-items: flex-start; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--paper); flex: none; margin-top: 6px; }
.dot.next { background: var(--blue); }
.dot.scheduled { width: 7px; height: 7px; background: none; border: 1px solid var(--hair); margin-top: 7px; }
.tlrow .name { font-size: 15px; }
.notif { background: var(--paper); color: var(--ink); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.notif .mono.tiny { opacity: .6; }
.notif .name { font-size: 15px; }
.card { width: min(420px, 92vw); background: var(--ink); border: 1px solid var(--paper); display: flex; flex-direction: column; }
.card.badge { width: min(386px, 92vw); }
.cardhead { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--hair); }
.cardbody { padding: 22px 16px; display: flex; flex-direction: column; gap: 10px; }
.cardbody h3 { font-size: 20px; font-weight: 700; }
.cardbody p { font-size: 13px; line-height: 1.5; color: var(--muted); }
.cardbody.centre { align-items: center; text-align: center; padding: 34px 22px 26px; gap: 14px; }
.cardbody.centre .bar { width: 100%; }
.bigglyph { width: 120px; height: 120px; border: 1.5px solid var(--faint); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 500; font-size: 44px; color: var(--faint); }
.bigglyph.earned { border-color: var(--blue); color: var(--blue); }
.cardfoot { display: flex; justify-content: flex-end; gap: 22px; padding: 12px 16px 16px; }
.cardfoot.split { padding: 0; border-top: 1px solid var(--hair); }
.cardfoot.split .ghost { flex: 1; text-align: center; padding: 14px; color: var(--paper); font-weight: 500; }
.cardfoot.split .ghost + .ghost { border-left: 1px solid var(--hair); }
.danger { background: var(--red); color: var(--onblue); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; padding: 10px 18px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--paper); color: var(--ink); font-family: var(--mono); font-size: 11px; padding: 10px 16px; z-index: 30; white-space: nowrap; }

/* Sign-in */
.gate { height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 40px; }
.gatebox { max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
.gatetext { font-size: 15px; line-height: 1.5; }
.gatesub { font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* Week cells as the capture draws them: dashed boxes for what is not done, a solid outline for today. */
.cell.empty { background: none; border: 1px dashed var(--hair); }
.hero.stake.red { color: var(--paper); }

/* Brief 19 §1: the login screen. Ink, a wall of squares at 50% fading to solid ink behind the type. */
.login { position: relative; height: 100dvh; background: var(--ink); color: var(--paper); overflow: hidden; }
.login .wall { position: absolute; left: 28px; right: 28px; top: 24px; height: 62%; display: grid; grid-auto-rows: 1fr; gap: 4px; opacity: .5; }
.login .wall i { display: block; }
.login .fade { position: absolute; left: 0; right: 0; top: 0; height: 68%; background: linear-gradient(to bottom, rgba(20,20,20,0) 45%, var(--ink) 100%); }
.logintext { position: absolute; left: 28px; right: 28px; bottom: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.logintext .wordmark.blue { color: var(--blue); font-size: 18px; font-weight: 700; }
.logintext h1 { margin: 6px 0 0; font-size: 34px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.logintext .mono { font-size: 11px; letter-spacing: .04em; }
.logintext .primary.paper { margin-top: 14px; background: var(--paper); color: var(--ink); border: 0; padding: 12px 16px; font-size: 10px; letter-spacing: .1em; }

/* Brief 19 §5: the account pane. */
.accountpane .panetitle { align-items: flex-start; }
.accountpane .panetitle .kicker { margin-top: 6px; }
.accountpane .controls { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.accountpane .controls .primary, .accountpane .controls .outline { padding: 9px 12px; font-size: 10px; letter-spacing: .08em; }
.outline { background: none; color: var(--paper); border: 1px solid var(--paper); font-family: var(--mono); font-weight: 500; white-space: nowrap; }
.ledger { display: flex; flex-direction: column; }
.lrow { display: grid; grid-template-columns: 92px minmax(0,1fr) 92px 104px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 11px; }
.lrow.head { padding: 6px 0; }
.lrow .what { font-family: var(--sans); font-size: 13px; }
.lrow.paid .what { color: var(--paper); }
.lrow.next { color: var(--next); } .lrow.next .what { color: var(--next); }
.lrow.scheduled { color: var(--muted); } .lrow.scheduled .what { color: var(--muted); }
.lrow .right { text-align: right; }
.lmore { padding: 12px 0 0; letter-spacing: .08em; }
.rail .link.eyebrow { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-align: left; }
.rail .link.eyebrow:hover { color: var(--paper); }

/* Brief 20. §1 the one blue button in the app; §4 the shared sub-page header; §6 hover on anything that opens. */
.primary.blue { background: oklch(0.55 0.18 250); color: var(--onbtn); transition: background 120ms; }
.primary.blue:hover:not(:disabled) { background: oklch(0.62 0.18 250); }
.panetitle .controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.subhead { display: flex; flex-direction: column; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--paper); }
.subhead .subrow { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.subhead h2 { font-family: var(--sans); font-weight: 700; font-size: 30px; letter-spacing: -.02em; }
.subhead .back { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .1em; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; align-self: flex-start; transition: color 120ms; }
.subhead .back:hover { color: var(--paper); }
.accountpane .panetitle { margin-top: 18px; }
.glance { margin-top: 4px; }
.openrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; background: none; border: 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: 14px 10px; color: var(--paper); cursor: pointer; transition: background 120ms, color 120ms; }
.openrow:hover { background: var(--paper); color: var(--ink); }
.openrow:hover .eyebrow { color: var(--ink); }
.arow { transition: background 120ms, box-shadow 120ms; }
.arow:hover { background: var(--hover); box-shadow: 0 0 0 10px var(--hover); }
.link.allbadges { transition: color 120ms; }
.link.allbadges:hover { color: var(--blue); }
.srow { transition: opacity 120ms; }
.srow:hover { opacity: .72; }
.scoringrow .pane.guide { flex: 1 1 100%; max-width: 860px; }   /* Brief 20 §3: the page is the width, in an 860 column */
.glance .scrow .mono { width: 74px; }
.glance .sctext { font-size: 14px; }
/* Brief 21 §2–§3: the Interac switch in HOW IT IS PAID, and the payment sheet's warning. */
.ixswitch { align-items: center; }
.ixname { font-weight: 500; letter-spacing: .06em; color: var(--paper); margin-bottom: 4px; }
.ixwarn { line-height: 1.5; }
/* Brief 21 §4: HOW LONG TO SEND at the foot of the Interac box. */
.ixplan { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--hair); }
.ixplan .formline { display: flex; align-items: flex-end; gap: 10px; }
.ixplanline { font-size: 13px; line-height: 1.5; color: var(--paper); }
.ixsched { display: flex; flex-direction: column; }
.ixtr { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.ixmore { align-self: flex-start; }
.ixplan .outline.muted { border-color: var(--hair); color: var(--muted); padding: 12px 22px; font-size: 11px; letter-spacing: .08em; }

/* Brief 22: the APPEARANCE row on You. */
.appearance { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--paper); }
.appearance .eyebrow { font-size: 10px; }

/* habit form TIME row */
.stepper.mins span { min-width: 64px; white-space: nowrap; text-align: center; }
