/* Sereo — the ledger, in CSS.
 *
 * The design system's one structural idea: no cards. Content is type on stone
 * held by baseline rules and a strong time column, like a printed programme
 * rather than a stack of panels. Gold is rationed to exactly two jobs — what
 * is active, and what changed — which is why almost nothing here is gold.
 *
 * Everything colour and type comes from tokens.css. The few literal values
 * left are ones that are not part of the palette: shadow alphas, and the
 * translucent washes the day ledger computes per hour.
 *
 * Radii: --r-sm and nothing else. A ledger rarely rounds.
 */

*, *::before, *::after { box-sizing: border-box; }

/* `hidden` is how this client shows and hides everything — the gate, the
 * three views, both modals. The browser's own `[hidden] { display: none }`
 * lives in the UA stylesheet, so ANY author rule that sets `display` on the
 * same element beats it: `.gate { display: grid }` left the sign-in form
 * painted over the app, and `.view { display: block }` showed all three
 * sections at once. This one rule is what makes `node.hidden = true` mean
 * what it says, wherever it is used.
 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--ground);
  color: var(--marble);
  font-family: var(--grotesque);
  font-size: var(--t-15);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brass-dim); color: var(--bone); }

button { font: inherit; color: inherit; }

/* ——— fields ———
 *
 * One treatment for everything you can type into, because there were six.
 * The worst was `.form-input`, which had no rule at all: the editor's "What is
 * it?" box and every control in Settings rendered in the browser's own white
 * chrome, in the middle of a page that is otherwise unbroken dark.
 *
 * The idiom is the inset ring, which is already how this interface bounds a
 * surface — a pick row, an arrival mark and the ledger's tick are all
 * `inset 0 0 0 1px`. Drawn that way a field reads as inlaid into the page
 * rather than dropped onto it, and the ring costs no layout: it can brighten
 * on focus without moving the text under it by a pixel, which a border cannot.
 *
 * `color-scheme` is the one declaration here doing something other than
 * colour. It is what makes a native date, time or number picker's own chrome
 * legible, and it belongs on the element selector rather than on a class: the
 * two inline date fields had it, the eleven controls in Settings did not, and
 * every spinner on that page opened white. */
input, select, textarea { font-family: var(--grotesque); color-scheme: dark; }

/* Boxed — a field that is a place to type, wherever it appears. */
.form-input, .form-select {
  background: var(--ground); color: var(--marble);
  border: none; border-radius: 0;
  box-shadow: inset 0 0 0 1px var(--line-quiet);
  padding: 12px 12px; font-size: var(--t-15);
  transition: box-shadow 0.16s;
}
.form-input::placeholder { color: var(--stone); }
.form-input:focus, .form-select:focus {
  outline: none; box-shadow: inset 0 0 0 1px var(--brass-rule);
}
.form-input:disabled, .form-select:disabled {
  color: var(--stone); box-shadow: inset 0 0 0 1px var(--line-faint);
}
/* A select is a field that opens rather than one you type into, so it keeps
   the pointer and its own caret. Everything else about it is the same field. */
.form-select { cursor: pointer; max-width: 100%; }
textarea.form-input { width: 100%; resize: vertical; }

/* Three modifiers and no more. `narrow` is a value with a known width — a
   latitude, a clock time; `tall` is the same field given room to be a
   paragraph; `serif` is the one box people write whole sentences into. */
.form-input.narrow { width: 122px; }
.form-input.tall { min-height: 96px; }
.form-input.serif { font-family: var(--serif); font-size: var(--t-17); line-height: 1.5; }

/* Inline — a field inside a data rail, where a box would be a second border
   around a row that already has one. Chromeless until focused, and then it
   says so with a rule under the text rather than around it. */
.led-label-input, .led-date-input, .cal-date {
  background: none; border: none; outline: none;
}
.led-label-input:focus, .led-date-input:focus, .cal-date:focus {
  box-shadow: inset 0 -1px 0 var(--brass-rule);
}
.led-label-input::placeholder, .led-date-input::placeholder { color: var(--stone); }

/* Which question the date column is answering — "due" while a milestone is
   open, "met" once it is done. It changed silently before, and reads as the
   product having moved a date it had in fact held (ADR-0064). */
.led-date-cell { display: inline-flex; align-items: baseline; gap: 4px; }
.led-date-what {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone);
}

/* Note — the one-line "What's holding it?" field, which appears in the callout
   and again in the ledger rail. It was two classes, at two sizes, in two
   faces, asking the same question. */
.field-note {
  display: block; width: 100%; min-width: 0;
  font-family: var(--serif); font-size: var(--t-12);
  color: var(--bone); background: var(--sink);
  border: none; border-radius: var(--r-sm); outline: none;
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 4px 8px; transition: box-shadow 0.16s;
}
.field-note::placeholder { color: var(--stone); }
.field-note:focus { box-shadow: inset 0 0 0 1px var(--brass-rule); }

/* ——— shared type ——— */

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--t-40);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--bone);
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--t-28);
  line-height: 1;
  margin: 0;
}

.lede {
  font-family: var(--serif);
  font-size: var(--t-21);
  line-height: 1.5;
  color: var(--marble-dim);
  margin: 20px 0 0;
  max-width: 48ch;
  text-wrap: pretty;
}
.lede.small { font-size: var(--t-15); margin: 10px 0 0; max-width: 62ch; }

.eyebrow {
  font-family: var(--grotesque);
  font-size: var(--t-12);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone);
}
.eyebrow.gold { color: var(--brass); }

.hint {
  font-family: var(--grotesque);
  font-size: var(--t-12);
  letter-spacing: 0.04em;
  color: var(--stone);
  margin: 0;
}
.hint.gold { color: var(--brass); }

.notice {
  font-family: var(--grotesque);
  font-size: var(--t-12);
  letter-spacing: 0.04em;
  color: var(--brass-bright);
  background: rgba(199, 162, 78, 0.08);
  box-shadow: inset 0 0 0 1px var(--brass-rule);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  margin: 0 0 12px;
}
.notice.small { font-size: var(--t-12); padding: 4px 8px; }

.empty {
  font-family: var(--serif);
  font-style: italic;
  color: var(--stone);
  padding: 64px 32px;
  text-align: center;
}

.rule-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 18px;
}
.rule-head .rule { flex: 1; height: 1px; background: var(--line-faint); }
.rule-head.strong { padding-bottom: 8px; border-bottom: 1px solid var(--brass-rule); }

/* A day that was rebuilt after a break says so above everything else. */
.day-band {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin: 0 0 20px;
  border-left: 2px solid var(--brass);
  background: var(--surface);
}
.day-band .lede { margin: 0; max-width: 62ch; }

/* The milestone-reached nudge (ADR-0116): a day-band that opens a short form
   when the answer is "not yet". Column, so the ask and the form stack. */
/* The milestone question, over the day (ADR-0170). */
.modal.panel-milestone { width: 520px; padding: var(--s-6); margin-top: 12vh; box-sizing: border-box; }
.nudge-ask, .nudge-form { display: flex; flex-direction: column; gap: var(--s-3); }
.nudge-ask .actions { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center;
                      margin-top: var(--s-3); }
.milestone-q { font-family: var(--serif); font-size: var(--t-28); line-height: 1.2;
               color: var(--bone); margin: 0; text-wrap: balance; }
.milestone-q strong { font-weight: 500; }
.milestone-ctx { font-size: var(--t-15); color: var(--marble-dim); margin: 0; }
.milestone-later { margin-left: auto; }
.nudge-form .form-input { max-width: 62ch; }
.nudge-adjust { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.nudge-move { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.aside-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--t-15);
  line-height: 1.5;
  color: var(--marble-dim);
  margin: 20px 0 0;
  max-width: 56ch;
}

/* ——— buttons ——— */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: var(--t-13);
  border: none;
  border-radius: var(--r-sm);
  padding: 12px 16px;
  cursor: pointer;
  background: var(--brass);
  color: var(--on-brass);
  box-shadow: inset 0 1px 0 rgba(255, 246, 220, 0.3);
  transition: filter 0.16s, box-shadow 0.16s, color 0.16s;
}
.btn:hover:not(:disabled) { filter: brightness(1.07); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.secondary {
  background: none;
  color: var(--marble-dim);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn.secondary:hover:not(:disabled) {
  box-shadow: inset 0 0 0 1px var(--stone-quiet);
  color: var(--marble);
}
.btn.ghost {
  background: none;
  color: var(--stone);
  box-shadow: none;
  padding-left: 8px;
  padding-right: 8px;
}
.btn.ghost:hover:not(:disabled) { color: var(--marble); }
.btn.small { font-size: var(--t-12); padding: 8px 12px; gap: 4px; }
.btn.chosen { box-shadow: inset 0 0 0 1px var(--brass-rule); color: var(--brass-bright); }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border: none; background: none; padding: 0;
  cursor: pointer;
  color: var(--stone);
  transition: color 0.16s;
}
.icon-button:hover { color: var(--bone); }

.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.icon { flex: 0 0 auto; display: block; }

/* ——— the masthead ——— */

.shell { min-height: 100vh; }

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--chrome);
  position: sticky;
  top: 0;
  z-index: 6;
}
.masthead-left { display: flex; align-items: center; gap: 24px; }
.masthead-right {
  display: flex;
  align-items: center;
  height: 34px;
  font-family: var(--grotesque);
  font-size: var(--t-12);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.masthead-rule { width: 1px; height: 22px; background: var(--line); display: block; }
.masthead-tick { width: 1px; height: 16px; background: var(--line-quiet); display: block; }

.wordmark { display: flex; align-items: center; gap: 12px; }
.wordmark .mark { flex: 0 0 auto; display: block; }
.wordmark-text {
  font-family: var(--serif);
  font-size: var(--t-28);
  font-weight: 500;
  line-height: 1;
}
.wordmark-e { color: var(--brass); }

.menu { display: flex; align-items: center; gap: 24px; height: 34px; }
.tab {
  display: flex;
  align-items: center;
  height: 34px;
  font-family: var(--grotesque);
  font-size: var(--t-15);
  font-weight: 500;
  line-height: 1;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--stone);
  box-shadow: inset 0 -2px 0 transparent;
  transition: color 0.16s, box-shadow 0.16s;
}
.tab:hover { color: var(--marble-mid); }
.tab[aria-current="page"] { color: var(--bone); box-shadow: inset 0 -2px 0 var(--brass); }
/* The menu is a path. Every crumb after the first wears its own chevron, so
   the separators come and go with the crumbs that are on the path — a
   separator element of its own would need hiding in step with its neighbour,
   which is two things to keep in step. */
.tab.crumb::before { content: "›"; color: var(--stone); margin-right: 12px;
                     font-family: var(--grotesque); font-size: var(--t-15); }
.tab { white-space: nowrap; }
/* The phone's two-line tab (name, then which one) and its account pieces.
   Drawn only under 560px; the desktop crumb is the single label. */
.tab-name, .tab-when, .account-initial, .menu-phone { display: none; }

.chrome-button {
  border: none;
  background: none;
  padding: 0 16px;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--stone);
  transition: color 0.16s;
}
.chrome-button:hover { color: var(--marble); }

/* The energy question, labelled as a question. Unlabelled it read as a
   statement about the person in front of the screen, in the same lettering as
   SETTINGS, and pressing it made the statement worse (ADR-0064). */
.chrome-energy { color: var(--stone); padding-left: 16px; }

.datestrip { display: inline-flex; align-items: center; gap: 2px; padding-right: 16px; }
/* These were two empty 20x22 buttons with no glyph, no content and no
   pseudo-element: the day could be stepped by anyone who guessed there was
   something there to click (ADR-0050). The arrow is the same one the masthead
   and the ledger use, mirrored for the back step, so the whole strip speaks
   one vocabulary. */
.stepper {
  width: 20px; height: 22px;
  border: none; background: none; padding: 0;
  cursor: pointer;
  color: var(--stone);
  display: flex; align-items: center; justify-content: center;
  transition: color 0.16s, opacity 0.16s;
}
.stepper:hover:not(:disabled) { color: var(--marble); }
.stepper.back .icon { transform: scaleX(-1); }
/* At the limit rather than gone: a control that vanishes takes the strip's
   width with it and the date shifts under the pointer. */
.stepper:disabled { opacity: 0.22; cursor: default; }
.datepick { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.datepick-dot { width: 5px; height: 5px; background: var(--brass-bright); display: block; }
/* One line, always: squeezed by a full masthead it broke "WED 11 NOV" in two. */
.datepick-label { color: var(--marble-mid); white-space: nowrap; }
.datepick input[type="date"] {
  position: absolute; inset: 0;
  opacity: 0;
  border: none;
  cursor: pointer;
  width: 100%;
}

.account { position: relative; padding-left: 16px; }
.menu-pop {
  position: absolute;
  right: 0;
  top: 34px;
  min-width: 200px;
  background: var(--chrome);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5), inset 0 0 0 1px var(--line-quiet);
  padding: 4px 0;
  z-index: 20;
}
.menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 8px 16px;
  cursor: pointer;
  font-family: var(--grotesque);
  font-size: var(--t-12);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone);
}
.menu-item:hover { color: var(--bone); background: rgba(199, 162, 78, 0.06); }

.banner {
  margin: 0;
  padding: 12px 32px;
  background: rgba(199, 162, 78, 0.1);
  box-shadow: inset 0 -1px 0 var(--brass-rule);
  color: var(--brass-bright);
  font-size: var(--t-13);
}
/* The unverified-address strip carries a control, which the error banner
   above it never does; so does the lapsed account's (ADR-0188). */
#verify-banner, #access-banner { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }

/* ——— page frame ——— */

.view { display: block; }
.page { max-width: 1100px; margin: 0 auto; padding: 32px 32px 64px; }
.lede-head { border-bottom: 2px solid var(--brass-rule); padding-bottom: 24px; }

/* ——— Today: nothing scheduled ——— */

.empty-head {
  border-top: 1px solid var(--brass-rule);
  padding: 32px 0 0;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}
.empty-lede { flex: 1; min-width: 0; }
.empty-lede .display { font-size: var(--t-40); }

.knows {
  flex: 0 0 320px;
  border-left: 1px solid var(--line-faint);
  padding-left: 32px;
}
.knows-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-ghost);
}
.knows-dot { width: 5px; height: 5px; flex: none; display: block; background: var(--stone); }
.knows-row.high .knows-dot { background: var(--brass); }
.knows-text { font-size: var(--t-13); line-height: 1.4; color: var(--marble-dim); }

.shape { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line-faint); }
.hourgrid { position: relative; padding-left: 64px; }
.hour-row { position: relative; height: 46px; }
.hour-label {
  position: absolute; left: -76px; top: -6px; width: 62px;
  text-align: right;
  font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone);
}
.hour-rule { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-faint); }
.hour-bar {
  position: absolute; left: 0; top: 5px; height: 34px;
  background: repeating-linear-gradient(135deg, var(--raised) 0 7px, var(--surface) 7px 14px);
}

/* ——— Today: the hero ——— */

.hero {
  padding: 8px 0 0;
  display: flex;
  gap: 32px;
  align-items: flex-start;
}
.hero.bare { display: block; }
/* The hero's countdown, task card and buttons are gone (ADR-0170): the day
   opens centred on the block you are in, which opens its own detail. */
.row-offer { font-size: var(--t-13); color: var(--marble-dim); margin: 0; max-width: 62ch; }
.row-offer .quiet-link { font-size: var(--t-13); color: var(--brass); }


/* ——— the ledger ——— */

.ledger-wrap { margin-top: 34px; }
.ledger-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.ledger-head-left { min-width: 0; }
.ledger-controls {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-top: 14px;
}
.control-tick { width: 1px; height: 20px; background: var(--line); display: block; margin: 0 4px; }
.now-time {
  font-family: var(--serif); font-size: var(--t-28); margin: 0;
  line-height: 1; white-space: nowrap; flex: 0 0 auto;
}
.sun-line {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--grotesque); font-size: var(--t-12); color: var(--marble-dim);
  white-space: nowrap;
}
.sun-line svg { color: var(--stone); }
.ledger-settings-wrap { position: relative; }
.ledger-settings {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 12px 8px 12px; cursor: pointer; background: none;
  font-family: var(--grotesque); font-size: var(--t-13); color: var(--stone);
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.ledger-settings:hover { color: var(--brass-bright); border-color: var(--brass-bright); }
.ledger-settings[aria-expanded="true"] {
  color: var(--brass-bright); border-color: var(--brass-dim);
  background: color-mix(in srgb, var(--brass) 12%, transparent);
}
.ledger-panel {
  position: absolute; left: 0; top: 46px; width: 334px; z-index: 40;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.55);
  padding: 12px 16px 4px;
  animation: bandRise 0.18s ease;
}
.switch {
  display: flex; align-items: flex-start; gap: 12px;
  width: 100%; text-align: left;
  border: none; border-top: 1px solid var(--line);
  padding: 12px 0; background: none; cursor: pointer;
}
.switch-track {
  width: 30px; height: 16px; flex: 0 0 auto; margin-top: 2px;
  border-radius: var(--r-sm); background: var(--raised); position: relative;
  transition: background 0.2s;
}
.switch.on .switch-track { background: var(--brass); }
.switch-knob {
  position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--stone);
  transition: left 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.2s;
}
.switch.on .switch-knob { left: 16px; background: var(--on-brass); }
.switch-body { min-width: 0; flex: 1; }
.switch-label { display: block; font-size: var(--t-15); line-height: 1.25; color: var(--marble-dim); }
.switch.on .switch-label { color: var(--marble); }
.switch-note { display: block; font-size: var(--t-12); line-height: 1.45; color: var(--stone); margin-top: 3px; }
.field-label {
  display: block;
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--stone); margin: 12px 0 8px;
}
/* In the panel it is a plain sentence rather than an eyebrow: it names a
   choice below it, not a section above it. */
.ledger-panel .field-label {
  font-family: inherit; font-size: var(--t-15);
  letter-spacing: normal; text-transform: none;
  color: var(--marble); margin: 0 0 9px;
}
.ledger-panel > .hint { margin: 9px 0 15px; }
.modes { display: flex; gap: 4px; }
.mode {
  flex: 1;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 4px; cursor: pointer; background: none;
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--marble-dim);
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}
.mode:hover { border-color: var(--brass-bright); }
.mode.on {
  border-color: var(--brass-dim); color: var(--brass-bright);
  background: color-mix(in srgb, var(--brass) 14%, transparent);
}

.legend { display: flex; gap: 12px; flex-wrap: wrap; }
.legend-item {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--grotesque); font-size: var(--t-13); color: var(--stone);
}
.swatch { width: 10px; height: 10px; border-radius: var(--r-sm); display: block; }

/* ——— the rail: one bar per stretch, as tall as the stretch is long ——— */

.band-track {
  display: grid; grid-template-columns: 26px minmax(0, 1fr);
  gap: 24px; margin-top: 24px; align-items: start;
}
.rail {
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 20px;
}
.rail-end {
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; color: var(--stone); text-align: center;
}
.rail-bar {
  width: 26px; display: block; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--sink); overflow: hidden; position: relative;
  cursor: pointer; transition: border-color 0.2s;
}
.rail-bar:hover { border-color: var(--brass-bright); }
.rail-bar.current { border-color: var(--brass); }
.rail-fill {
  position: absolute; left: 0; right: 0; top: 0; height: var(--fill);
  display: block;
  background: linear-gradient(180deg, rgba(223, 189, 105, 0.45), rgba(199, 162, 78, 0.7));
  transition: height 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.rail-bar.past .rail-fill { background: linear-gradient(180deg, var(--line), var(--raised)); }
.rail-mark {
  position: absolute; left: 0; right: 0; top: var(--fill);
  height: 2px; display: block; background: var(--brass-bright);
  animation: bandPulse 2.6s ease-in-out infinite;
}

@keyframes bandPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes bandRise { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ——— one stretch of the day ———
 *
 * The ground stops on the stretch's own solar edge and the hard rule at that
 * edge is drawn by the stretch BELOW, so a block hanging into it passes over
 * one continuous slab (ADR-0025). Nothing here may clip: the overhang is the
 * point.
 */

.bands { min-width: 0; }
.band {
  position: relative;
  border-left: 2px solid var(--line);
  overflow: visible;
}
.band.current { border-left-color: var(--brass); }
.band.past { border-left-color: var(--raised); }
.band + .band { border-top: 2px solid var(--sink); }
.band-spacer { height: var(--spacer); }

.band-head {
  position: relative;
  display: grid; grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px; align-items: center;
  padding: 8px 16px;
  /* Exactly HEAD_FULL / HEAD_TIGHT in ledger.js: the overhang arithmetic adds
     these up before the browser lays the rows out. The bracket used to give a
     tight head its height; with it gone the head collapsed to its 1px rule and
     every stretch under a hanging slab started under it (ADR-0170). */
  box-sizing: border-box; height: 42px;
}
.band-head.tight { padding: 0 16px; height: 22px; }
.band-gutter { display: flex; align-items: center; justify-content: flex-end; }
/* No brackets (ADR-0170): a stretch is marked by its rule and its light, and a
   third device on the same edge was framing for its own sake. */
.band-bracket { display: none; }
.band-line { display: flex; align-items: center; gap: 12px; }
.band-rule { flex: 1; height: 1px; display: block; background: var(--line-quiet); }
.band.current .band-rule { background: var(--brass-dim); }
.band-through {
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--on-brass);
  background: var(--brass);
  padding: 4px 8px; border-radius: var(--r-sm); white-space: nowrap;
}
/* Now can fall in a stretch's own preamble, before its first block: the header
   then carries the wash and the waterline so the tide never breaks. */
.band-head.wet::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(199, 162, 78, 0.1), rgba(199, 162, 78, 0.03)),
    linear-gradient(180deg, rgba(28, 26, 22, 0.2), rgba(28, 26, 22, 0.14));
}
.band-head.wet::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--brass-bright), rgba(223, 189, 105, 0.1));
}
.band-body { padding: 0 16px; }
/* An empty stretch is one line (ADR-0170): its name in the gutter's place, a
   hairline, and the way to put something there. */
.band.band-quiet .band-head { display: none; }
.band.band-quiet .band-blank { padding: 8px 0; }

.band-blank {
  display: grid; grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px; align-items: center; padding-bottom: 8px;
}
.blank-line { display: flex; align-items: center; gap: 12px; }
.blank-rule { flex: 1; height: 1px; display: block; background: var(--line-faint); }
.blank-note {
  font-family: var(--serif); font-style: italic; font-size: var(--t-15);
  color: var(--stone); white-space: nowrap;
}
.blank-add {
  width: 22px; height: 22px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 50%;
  background: none; cursor: pointer; color: var(--stone);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.16s, color 0.16s, transform 0.16s;
}
.blank-add:hover { border-color: var(--brass); color: var(--brass); transform: rotate(90deg); }

/* ——— one block ——— */

.row { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 16px; }
.row-gutter {
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-end;
  text-align: right;
  transition: transform 0.34s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.row-time {
  font-family: var(--grotesque); font-size: var(--t-12);
  font-variant-numeric: tabular-nums; margin: 0; line-height: 1;
  color: var(--marble-dim); white-space: nowrap;
}
.row-dur { font-family: var(--grotesque); font-size: var(--t-12); margin: 5px 0 0; color: var(--stone); }

.row-cell { position: relative; min-width: 0; }
/* The gap's share of the tide. The free time trailing a block is the cell's
   own padding, so this piece hangs off the face's bottom edge and reaches
   `--gap-spent` into it; the slab's share is the face's own ::before, in
   percent, so the two can never disagree about where the slab ends. */
.row-spent {
  position: absolute; left: 0; right: 0;
  top: calc(100% - var(--cell-pad, 0px)); height: var(--gap-spent, 0px);
  z-index: 4; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(199, 162, 78, 0.1), rgba(199, 162, 78, 0.03)),
    linear-gradient(180deg, rgba(28, 26, 22, 0.2), rgba(28, 26, 22, 0.14));
  transition: height 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.row-tide {
  position: absolute; left: 0; right: 0;
  top: calc(100% - var(--cell-pad, 0px) + var(--gap-spent, 0px));
  height: 1px; z-index: 5; display: var(--gap-tideline, none);
  pointer-events: none;
  background: linear-gradient(90deg, var(--brass-bright), rgba(223, 189, 105, 0.1));
  transition: top 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* The slab's share, anchored to the face's rendered box rather than to the
   hour's arithmetic: the why-drawer makes a face taller than its minutes,
   and a veil measured in duration pixels stopped midway up one unbroken
   slab, parking its waterline across a description (the reported glitch).
   Percent of the box it crosses, so it holds at any height. */
.row-face::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: var(--face-spent, 0px); z-index: 4; border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(199, 162, 78, 0.1), rgba(199, 162, 78, 0.03)),
    linear-gradient(180deg, rgba(28, 26, 22, 0.2), rgba(28, 26, 22, 0.14));
  transition: height 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.row-face::after {
  content: ""; position: absolute; left: 0; right: 0;
  top: var(--face-spent, 0px); height: 1px;
  z-index: 5; display: var(--face-tideline, none);
  pointer-events: none;
  background: linear-gradient(90deg, var(--brass-bright), rgba(223, 189, 105, 0.1));
  transition: top 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* A crossing block's slot is shorter than the slab it holds; the slab simply
   overhangs it and the stretch below opens far enough down to take it. */
.row-slot { position: relative; }
.row-arrival {
  position: absolute; left: -2px; right: -2px; top: -2px; bottom: -2px;
  z-index: 7; border-radius: var(--r-sm); pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--brass);
  opacity: 0; transition: opacity 0.7s ease-out;
}
.row-slot.arrived .row-arrival { opacity: 1; transition: opacity 0.14s ease-out; }

.row-face {
  position: relative;
  background: var(--face);
  border: 1px solid var(--key);
  border-left: var(--accent) solid var(--strip);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: center;
  transition: box-shadow 0.18s, border-color 0.18s, background 0.25s,
              min-height 0.3s, filter 0.18s, transform 0.18s;
}
.row-face.askable { cursor: pointer; }
.row-face:not(.ext):hover {
  filter: brightness(1.16) saturate(1.05);
  transform: translateX(2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(223, 189, 105, 0.3);
}
/* An imported hour is not yours to move, so it takes no hand — unless it is
   short enough that its own attribution is behind a click, in which case the
   pointer has to say so or the line is there and nobody finds it. */
.row-face.ext { cursor: default; }
.row-face.ext.askable { cursor: pointer; }

/* The header is a fixed box on every row, open or closed, so a title's first
   line box always starts at the same offset from the top of the slab and stays
   on the axis of the timestamp naming it. */
.row-head {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; flex: 0 0 auto; height: 55px; min-height: 0;
}
.row-head.compact { gap: 8px; padding: 8px 12px; height: 36px; }
.row-glyph {
  width: 28px; height: 28px; flex: 0 0 auto; border-radius: var(--r-sm);
  border: 1px solid var(--glyph-edge); background: var(--glyph-bg); color: var(--glyph);
  display: flex; align-items: center; justify-content: center;
}
.row-head.compact .row-glyph { width: 22px; height: 22px; }
.row-label {
  min-width: 0; flex: 1;
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
}
.row-head.compact .row-label { flex-direction: row; align-items: center; gap: 8px; }
.row-task {
  font-size: var(--t-15); line-height: 1.3; margin: 0; color: var(--marble);
  flex: 1 1 auto; min-width: 0;
}
/* On a short block the title, its tag and its hours share one line, so the
   title truncates rather than propping a fifteen-minute row open to two. */
.row-head.compact .row-task {
  font-size: var(--t-13); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.row-face.live .row-task { color: var(--bone); }
.row-face.past .row-task { color: var(--marble-dim); }
.row-task.done { text-decoration: line-through; text-decoration-color: var(--stone); color: var(--marble-dim); }
.row-meta { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; }
.row-head.compact .row-meta { flex: 0 1 auto; overflow: hidden; }
/* The time column already says when and how long; the range on the face
   said it a second time (ADR-0170). Kept for the live block only, where the
   end is the thing being counted down to. */
.row-range {
  font-family: var(--grotesque); font-size: var(--t-13);
  color: var(--marble-dim); white-space: nowrap; flex: 0 0 auto; display: none;
}
.row-face.live .row-range { color: var(--bone); display: inline; }
/* The goal an hour serves, as a plain word beside the task (ADR-0170). */
.row-tag {
  font-family: var(--grotesque); font-size: var(--t-13); color: var(--stone);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-tag.link {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--grotesque); font-size: var(--t-13);
  color: var(--stone); transition: color 0.16s;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-tag.link:hover { color: var(--brass-bright); }
.row-face.live .row-tag { color: var(--bone); }
.adapted {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass);
  animation: bandRise 0.26s ease both;
}
.row-live {
  display: inline-flex; align-items: center;
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--on-brass);
  background: var(--brass);
  padding: 2px 4px; border-radius: var(--r-sm);
}

/* One reveal for every block, open and close alike: a 0fr→1fr grid row animates
   the panel's real height, so nothing snaps between display states and the
   header simply gives back the space as it grows. */
.row-why {
  display: grid; grid-template-rows: 0fr; opacity: 0; flex: 0 0 auto;
  transition: grid-template-rows 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.22s ease;
}
.row-why.open { grid-template-rows: 1fr; opacity: 1; }
.row-why-clip { overflow: hidden; min-height: 0; }
.row-why-inner {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 16px 16px 16px 64px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(21, 19, 16, 0.3), transparent);
}
.row-why .why {
  font-family: var(--serif); font-style: italic;
  font-size: var(--t-15); line-height: 1.5;
  color: var(--marble-dim); margin: 0; max-width: 70ch;
}
.why-until {
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--marble-dim);
}

.risk {
  display: inline-flex; align-items: center;
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 4px; border-radius: var(--r-sm);
}
.risk.soon { background: color-mix(in srgb, var(--brass) 16%, transparent); color: var(--on-brass); }
.risk.late { color: var(--brass-bright); box-shadow: inset 0 0 0 1px var(--brass-bright); }

.tick {
  width: 19px; height: 19px; flex: 0 0 auto;
  padding: 0; border-radius: var(--r-sm);
  cursor: pointer;
  background: none;
  border: 1px solid var(--stone);
  color: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.22s, border-color 0.22s, color 0.22s, transform 0.18s;
}
.tick:hover { border-color: var(--brass-bright); transform: scale(1.12); }
.tick.on {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--on-brass);
}
.tick.hollow { visibility: hidden; }
.tick.locked { border-style: dashed; color: var(--stone); cursor: default; }

/* ——— Today: the closing bar ——— */

.closing { margin: 46px 0 0; padding-top: 24px; border-top: 1px solid var(--brass-rule); }
.closing-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  flex-wrap: wrap;
}
.closing-lede { min-width: 0; }
.closing-sentence {
  font-family: var(--serif); font-size: var(--t-28); line-height: 1.15;
  margin: 0; color: var(--bone); letter-spacing: -0.005em;
}

.reason { margin-top: 22px; }
.reason-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 0; border: none; background: none; cursor: pointer;
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone);
  transition: color 0.16s;
}
.reason-toggle:hover { color: var(--marble); }
.reason-dash { width: 14px; height: 1px; background: var(--stone-quiet); display: block; }
.reason-body {
  margin-top: 18px; padding-left: 24px;
  border-left: 1px solid var(--line-quiet); max-width: 74ch;
}
.reason-row { display: flex; gap: 16px; margin-top: 16px; }
.reason-when {
  font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone);
  width: 62px; flex: 0 0 auto; padding-top: 4px;
}
.reason-task { font-size: var(--t-15); line-height: 1.35; color: var(--marble); margin: 0; }
.reason-why {
  font-family: var(--serif); font-size: var(--t-15); line-height: 1.5;
  color: var(--stone); margin: 5px 0 0;
}
.reason-changes { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line-faint); }
.reason-change { font-size: var(--t-13); line-height: 1.5; color: var(--marble-dim); margin: 8px 0 0; }

.argue {
  margin-top: 26px; border: 1px solid var(--line);
  padding: 16px; background: var(--chrome);
}
.argue-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.chips {
  display: inline-flex; flex-wrap: wrap; align-items: stretch; max-width: 100%;
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.chip {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-left: 1px solid var(--line);
  padding: 12px 16px; cursor: pointer; background: none;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  color: var(--marble-dim); white-space: nowrap;
  transition: color 0.16s, background 0.16s, box-shadow 0.16s;
}
.chip:first-child { border-left: none; }
.chip:hover { color: var(--brass-bright); background: rgba(199, 162, 78, 0.07); }
.chip.on {
  color: var(--brass-bright);
  background: color-mix(in srgb, var(--brass) 14%, transparent);
  box-shadow: inset 0 -2px 0 var(--brass);
}
.argue-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.argue-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line);
}
.argue-foot .hint { margin: 0; }
.btn.small { padding: 8px 12px; font-size: var(--t-13); }
.argue-row .form-input { flex: 1; min-width: 0; }

/* ——— the day editor ——— */

.editor-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  padding-bottom: 16px; border-bottom: 1px solid var(--brass-rule);
  flex-wrap: wrap;
}
.editor-said { min-width: 0; }
.editor-title { display: flex; align-items: baseline; gap: 12px; }
.editor-head .actions { flex: 0 0 auto; margin-top: 0; }

/* One line, and always exactly one line high. What it says changes on every
   pointer frame, and a strip that collapsed when it had nothing to say would
   walk the whole canvas up and down under your hand. */
.editor-note-strip { height: 16px; margin-top: 16px; overflow: hidden; }
.editor-note {
  font-family: var(--grotesque); font-size: var(--t-12); line-height: 16px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--brass-bright); margin: 0;
}
.editor-note.live { color: var(--brass); }
.editor-note.live.blocked { color: var(--marble-dim); }

.editor-rules {
  margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--line-faint);
  display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap;
}
.editor-rules-label {
  cursor: pointer; list-style: none;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone); flex: 0 0 auto;
}
.editor-rules-text {
  font-family: var(--serif); font-size: var(--t-15); line-height: 1.6;
  color: var(--stone); margin: 0; max-width: 80ch; text-wrap: pretty;
}

/* ——— the canvas ——— */

.canvas-wrap { margin-top: 26px; padding-left: 64px; }
/* `isolation` seals the canvas's stacking world: block internals use
   z-index 3-7, and the masthead sits at 6 — without the seal an edge at 6
   painted OVER the sticky chrome on a tie (later DOM order wins), which is
   how scrolled rows drew across the header. `user-select` is the other
   half of dragging: a drag with selectable text under it runs the
   browser's native selection alongside the block move. */
.canvas { position: relative; touch-action: none; isolation: isolate;
          user-select: none; -webkit-user-select: none; }
.canvas-hour { position: absolute; left: 0; right: 0; height: 1px; background: var(--line-faint); }
.canvas-hour-label {
  position: absolute; left: -78px; width: 62px; text-align: right;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  color: var(--stone);
}

/* An empty stretch is a label between two dashed rules, never a box: a box
   that size reads as a block somebody forgot to fill in. */
.gap {
  position: absolute; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: none; background: none; padding: 0; cursor: pointer;
  color: var(--stone); transition: color 0.16s;
}
.gap:hover { color: var(--brass); }
.gap-rule {
  flex: 1; height: 1px; display: block;
  background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 9px);
}
.gap-label {
  display: flex; align-items: center; gap: 8px; white-space: nowrap; flex: 0 0 auto;
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* ——— a block ——— */

.eblock {
  position: absolute; left: 0; right: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 12px; overflow: hidden; cursor: grab;
  background: var(--line-ghost);
  border: 1px solid var(--line-raised);
  --accent: var(--stone-quiet);
  --title: var(--marble-mid);
  --tag-ink: var(--stone);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.eblock.goal {
  background: var(--surface); border-color: var(--line);
  --accent: var(--brass); --title: var(--bone); --tag-ink: var(--brass);
}
.eblock.rhythm {
  background: var(--track-lit); border-color: var(--line);
  --accent: var(--brass-edge); --title: var(--marble); --tag-ink: var(--stone);
}
.eblock.break {
  background: var(--ground); border-color: var(--line-quiet);
  --accent: var(--line); --title: var(--marble-dim); --tag-ink: var(--stone-dim);
}
/* Not yours to move, and drawn as ground rather than as a face. */
.eblock.busy {
  background: repeating-linear-gradient(135deg, var(--line-ghost) 0 6px, var(--sink) 6px 12px);
  border-color: var(--line-raised);
  --accent: var(--stone-faint); --title: var(--marble-dim); --tag-ink: var(--stone-dim);
}
.eblock.held { cursor: default; }

/* The left edge carries what has happened to the block: its kind, gold once
   you have moved it, dashed gold once you have pinned it to its hour. */
.eblock-spine {
  position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
  background: var(--accent); pointer-events: none; z-index: 4;
}
.eblock.edited .eblock-spine { width: 2px; background: var(--brass); }
.eblock.pinned .eblock-spine {
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--brass) 0 3px, transparent 3px 6px);
}

.eblock-line { display: flex; align-items: center; gap: 12px; min-width: 0; }
.spacer { flex: 1 1 auto; min-width: 0; }
.eblock-time {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.04em;
  color: var(--stone); flex: 0 0 auto; font-variant-numeric: tabular-nums;
}
.eblock.dragging .eblock-time { color: var(--brass-bright); }
.eblock-task {
  font-size: var(--t-13); line-height: 1.25; color: var(--title);
  flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eblock.tight .eblock-task { font-size: var(--t-12); }
.eblock.wide .eblock-task { font-size: var(--t-15); }
.eblock-edited {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass);
}
.eblock-tag {
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--tag-ink); flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eblock-dur {
  font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone); margin-top: 5px;
}

/* Hover is suppressed outright while something is in the air: a control that
   appears under a travelling pointer is a control nobody asked for. */
.canvas:not(.busy) .eblock:not(.held):hover { border-color: var(--stone-quiet); }
.canvas:not(.busy) .eblock:hover .block-pin,
.canvas:not(.busy) .eblock:hover .block-remove,
.canvas:not(.busy) .eblock:hover .block-talk { display: inline-flex; }
.eblock .block-pin.on { display: inline-flex; }

.eblock.dragging {
  cursor: grabbing;
  border-color: var(--brass);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.6), inset 0 0 0 1px var(--brass-dim);
  opacity: 0.97;
  transform: scale(1.006);
}
.eblock.dragging.bad {
  border-color: var(--stone);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.6);
}
/* The ground a held block is passing over stays visible, and stands down. */
.eblock.under { filter: brightness(0.7) saturate(0.85); }

/* A block with nowhere legal to go is hatched where it stands. The day does
   not shuffle around a move it is about to refuse. */
.eblock-wall {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: repeating-linear-gradient(135deg, var(--bone) 0 2px, transparent 2px 7px);
  box-shadow: inset 0 0 0 1px var(--bone);
  animation: wallPulse 1.1s ease-in-out infinite;
}
@keyframes wallPulse { 0%, 100% { opacity: 0.28; } 50% { opacity: 0.5; } }

.eblock-lit {
  position: absolute; left: 0; right: 0; height: 2px;
  background: var(--brass); pointer-events: none; z-index: 5;
}
.eblock-lit.top { top: 0; }
.eblock-lit.bottom { bottom: 0; }

.eblock-edge { position: absolute; left: 0; right: 0; height: 7px; cursor: ns-resize; z-index: 6; }
.eblock-edge.top { top: 0; }
.eblock-edge.bottom { bottom: 0; }

.block-pin, .block-remove, .block-talk {
  width: 20px; height: 20px; flex: 0 0 auto;
  display: none; align-items: center; justify-content: center;
  border: none; background: none; padding: 0; cursor: pointer;
  color: var(--stone); transition: color 0.16s;
}
.block-pin.on { color: var(--brass); }
.block-pin:hover { color: var(--brass-bright); }
.block-remove:hover { color: var(--bone); }
.block-talk:hover { color: var(--brass-bright); }
/* ——— the discuss chat (ADR-0069, to the drawn design) ———
 *
 * One presentation for every anchor — a block, the day, a report proposal.
 * A conversation, not a form: the user's words sit indented on their own
 * card, the planner answers in the serif voice under a short gold rule, and
 * a revision arrives as a code-authored trace card with the keep/revert
 * choice beneath it. Every colour is a token; the design's hexes map onto
 * them exactly. */
.panel-talk { width: 660px; max-width: 100%; display: flex; flex-direction: column; }
.chat-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 16px 24px 16px; border-bottom: 1px solid var(--line-faint);
}
.chat-title {
  margin: 0; font-family: var(--serif); font-size: var(--t-17); line-height: 1.35;
  color: var(--marble); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; min-width: 0;
}
.chat-meta {
  margin: 7px 0 0; font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.08em; color: var(--stone);
}
/* The thread scrolls, but a native bar down the panel's edge is browser
   chrome in the middle of a conversation. */
.chat-thread {
  padding: 32px 24px; display: flex; flex-direction: column; gap: 32px;
  max-height: 58vh; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none; -ms-overflow-style: none;
}
.chat-thread::-webkit-scrollbar { width: 0; height: 0; }
.chat-mine {
  margin: 0 0 0 64px; padding: 12px 16px; background: var(--line-ghost);
  border-left: 2px solid var(--stone-faint);
}
.chat-mine p {
  margin: 0; font-size: var(--t-15); line-height: 1.55; color: var(--marble);
  white-space: pre-line;
}
.chat-rule { display: block; width: 20px; height: 1px; background: var(--brass); margin-bottom: 13px; }
.chat-text {
  margin: 0; max-width: 54ch; font-family: var(--serif); font-size: var(--t-17);
  line-height: 1.7; color: var(--marble); text-wrap: pretty;
  /* A reply written as two thoughts is one message with a paragraph seam,
     not two bubbles under two gold rules. */
  white-space: pre-line;
}
.chat-caret {
  display: inline-block; width: 8px; height: 2px; margin-left: 3px;
  vertical-align: baseline; background: var(--brass);
  animation: caretBlink 0.9s steps(1, end) infinite;
}
@keyframes caretBlink { 0%, 45% { opacity: 1; } 55%, 100% { opacity: 0.12; } }
.chat-trace {
  margin: 20px auto 0 0; width: 348px; max-width: 100%;
  background: var(--ground); box-shadow: inset 0 0 0 1px var(--line-quiet);
  border-left: 2px solid var(--brass-edge);
}
.chat-trace.applied { border-left-color: var(--brass); }
.chat-trace-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-bottom: 1px solid var(--line-faint);
}
.chat-trace-head .icon { color: var(--brass); }
.chat-trace-name {
  flex: 1; font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass);
}
.chat-trace-count { font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.08em; color: var(--stone); }
.chat-trace-row { padding: 12px 12px; border-top: 1px solid var(--line-faint); }
.chat-trace-top { display: flex; align-items: baseline; gap: 8px; }
.chat-call {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--brass-edge);
}
.chat-task {
  flex: 1; min-width: 0; font-size: var(--t-13); line-height: 1.4; color: var(--bone);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-delta {
  display: flex; align-items: baseline; gap: 8px; margin-top: 5px;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.04em;
}
.chat-was { color: var(--stone); text-decoration: line-through; }
.chat-arrow { color: var(--stone); }
.chat-now { color: var(--brass-bright); }
.chat-note { margin-left: auto; color: var(--stone); }
.chat-actions { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-quiet); }
.chat-actions-row { display: flex; align-items: center; gap: 24px; }
.chat-act {
  font-weight: 600; font-size: var(--t-13); border: none; background: none;
  padding: 0; cursor: pointer;
}
.chat-act.keep { color: var(--brass); }
.chat-act.keep:hover { color: var(--brass-bright); }
.chat-act.leave { color: var(--stone); }
.chat-act.leave:hover { color: var(--marble); }
.chat-consequence {
  margin: 9px 0 0; font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; line-height: 1.7; color: var(--stone);
}
.chat-kept {
  margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line-quiet);
  display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap;
}
.chat-kept-mark {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--brass-bright);
}
.chat-failed { margin-top: 16px; display: flex; align-items: center; gap: 12px; }
.chat-failed-rule { display: block; width: 20px; height: 1px; background: var(--brass-rule); }
.chat-composer {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 12px 24px; border-top: 1px solid var(--line-quiet);
}
.chat-busy-line { flex: 1; font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em; color: var(--stone); }
.chat-input {
  flex: 1; min-width: 0; resize: none; height: 32px; font-family: var(--grotesque);
  font-size: var(--t-15); line-height: 1.6; padding: 4px 0;
  background: none; color: var(--marble); border: none; outline: none;
}
.chat-input::placeholder { color: var(--stone); }
.chat-propose {
  flex: 0 0 auto; font-weight: 600; font-size: var(--t-12); border: none;
  border-radius: var(--r-sm); padding: 8px 12px; background: none;
  color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass-rule);
  cursor: pointer;
}
.chat-send {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex: 0 0 auto; border: none;
  border-radius: var(--r-sm); cursor: default;
  background: none; color: var(--stone);
  box-shadow: inset 0 0 0 1px var(--line-quiet);
}
.chat-send.live {
  cursor: pointer; background: var(--brass); color: var(--on-brass);
  box-shadow: inset 0 1px 0 rgba(255, 246, 220, 0.3);
}
/* A settled day (W18): greyed and solid — the record, not the surface.
   Dimmed with a filter, never with opacity: a translucent band lets the
   stretch below bleed through a slab that overhangs the boundary, painting
   the ground's seam onto the middle of one unbroken block. brightness()
   dims the group and keeps it opaque — actually solid, as the line above
   promises. */
.page.settled { filter: saturate(0.55); }
.page.settled .band, .page.settled .hero { filter: brightness(0.82); }

/* The Reports tab's quiet dot (W15): a written issue is waiting. Up and to
   the RIGHT of the label — it used to sit on the last letter. */
.tab { position: relative; }
.tab.unread::after {
  content: ""; position: absolute; top: 1px; right: -10px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brass);
}
/* A report being written: the tab steps back and the wait shows beneath. */
.tab.working { color: var(--stone); }
.tab.working::after {
  content: "\00b7 \00b7 \00b7"; position: absolute;
  left: 50%; transform: translateX(-50%); bottom: -14px;
  font-size: var(--t-15); line-height: 1; letter-spacing: 1px;
  color: var(--brass); animation: tab-writing 1.4s ease-in-out infinite;
}
@keyframes tab-writing {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .tab.working::after { animation: none; opacity: 0.8; }
}
/* The wordmark is a button now (it goes to Goals), so it sheds the UA
   button dress and keeps the keyboard affordance the tabs have. */
button.wordmark {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; color: inherit;
}
button.wordmark:focus-visible {
  outline: 1px solid var(--brass); outline-offset: 4px; border-radius: var(--r-sm);
}
/* The day's own energy statement, in the closing section: the same strip
   the generate panel wears, ranged with the asides beneath the actions. */
.day-energy { margin: 18px 0 4px; }

/* Standing rules: the settings list and the reasoning citation. */
.standing-rules { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; }
.standing-rules .rule-words { flex: 1; min-width: 0; }
.standing-rules .rule-words .read { margin: 0; }
.reason-rules { margin: 12px 0 4px; }
.reason-rule {
  font-family: var(--serif); font-style: italic; font-size: var(--t-15);
  line-height: 1.5; color: var(--marble-dim); margin: 4px 0 0;
}

/* A decided proposal wears its record where the buttons were. */
.proposal-sealed {
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--stone); white-space: nowrap;
}

/* ——— filling a stretch ——— */

/* The form opens OVER the day rather than under it. Anchored below the gap it
   fills, everything the day then rearranged would come out from under the
   pointer that had just asked for it. */
.gapform {
  position: fixed; left: 50%; top: 120px; transform: translateX(-50%);
  width: 600px; max-width: calc(100% - 40px); z-index: 70;
  border: 1px solid var(--brass-rule); background: var(--chrome);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}
.form-head {
  display: flex; align-items: stretch; justify-content: space-between;
  border-bottom: 1px solid var(--line-raised);
}
.form-tabs { display: flex; align-items: stretch; }
.form-tab {
  border: none; padding: 12px 16px; cursor: pointer; background: none;
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone);
  transition: color 0.16s, background 0.16s;
}
.form-tab:hover { color: var(--bone); }
.form-tab.on {
  color: var(--brass-bright); background: var(--surface);
  box-shadow: inset 0 -2px 0 var(--brass);
}
.form-when {
  display: flex; align-items: center; padding: 0 16px; white-space: nowrap;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em; color: var(--stone);
}
.form-body { padding: 16px; }
.form-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gapform .form-input { flex: 1 1 180px; min-width: 0; }
.form-lengths { display: flex; align-items: stretch; border: 1px solid var(--line); flex: 0 0 auto; }
.form-len {
  border: none; border-left: 1px solid var(--line);
  padding: 8px 12px; cursor: pointer; background: none;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em; color: var(--stone);
  transition: background 0.16s, color 0.16s;
}
.form-len:first-child { border-left: none; }
.form-len:hover { color: var(--bone); }
.form-len.on { background: var(--brass); color: var(--on-brass); }
.form-cancel {
  flex: 0 0 auto; border: none; background: none; cursor: pointer;
  font-family: var(--grotesque); font-weight: 500; font-size: var(--t-13); padding: 12px 8px;
  color: var(--stone); transition: color 0.16s;
}
.form-cancel:hover { color: var(--marble); }

/* Without a goal behind it a block you write yourself is a chore forever, and
   no goal is any nearer for the hour you spent. */
.form-serves {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-quiet);
}
.form-serves-label {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone); flex: 0 0 auto;
}
/* Which milestone it lands under is the server's answer, not a control: a plan
   block carries no milestone of its own. */
.form-serves-node {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.04em;
  color: var(--stone); flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gapform .hint { margin-top: 12px; }

/* The panel is fixed at a fixed top, so a tab with a shorter body used to pull
   its own floor up under the pointer that had just switched to it. */
.gapform .form-body { min-height: 188px; }

/* A ranked answer says so twice — once in the tab and once here, in the
   advisor's own voice, above the list it is about. */
.picks-note {
  margin-top: 14px; padding: 12px 12px;
  box-shadow: inset 0 0 0 1px var(--brass-rule-dim);
  background: var(--sink);
}
.picks-note .eyebrow { margin: 0 0 5px; color: var(--brass); }
.picks-note p {
  margin: 0; font-family: var(--serif); font-size: var(--t-13);
  line-height: 1.45; color: var(--marble-dim); max-width: 66ch;
}
.pick-waiting {
  font-family: var(--serif); font-style: italic; font-size: var(--t-15);
  color: var(--stone-lit); margin: 16px 0 0;
  animation: pickWait 1.6s ease-in-out infinite;
}
@keyframes pickWait { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

.picks { display: flex; flex-direction: column; gap: 1px; margin-top: 14px; }
.pick {
  display: block; width: 100%; text-align: left;
  border: none; padding: 12px 12px; cursor: pointer; background: none;
  box-shadow: inset 0 0 0 1px var(--line-raised);
  transition: box-shadow 0.16s, background 0.16s;
}
.pick:hover { box-shadow: inset 0 0 0 1px var(--brass-rule); background: var(--surface); }
.pick-head { display: flex; align-items: baseline; gap: 12px; }
.pick-task { font-size: var(--t-15); color: var(--bone); }
.pick-len {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  color: var(--stone); flex: 0 0 auto;
}
.pick-tag {
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass);
  flex: 0 0 auto; white-space: nowrap;
}
/* Something the advisor thought of rather than something you track. It is not
   marked in gold: gold is what is active and what changed, and an hour that
   serves no goal is neither. */
.pick.open { box-shadow: inset 0 0 0 1px var(--line-quiet); }
.pick.open:hover { box-shadow: inset 0 0 0 1px var(--stone-faint); }
.pick-open {
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone);
  flex: 0 0 auto; white-space: nowrap;
}
.pick-why {
  font-family: var(--serif); font-size: var(--t-15); line-height: 1.45;
  color: var(--marble-dim); margin: 6px 0 0; max-width: 70ch; text-wrap: pretty;
}
.pick-empty {
  font-family: var(--serif); font-size: var(--t-15); line-height: 1.5;
  color: var(--stone); margin: 12px 0 0;
}

/* ——— before it goes ——— */

.sheet-host {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 13, 11, 0.76);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 64px 16px 16px;
  overflow-y: auto;
}
.sheet {
  width: 520px; max-width: 100%;
  background: var(--chrome);
  border: 1px solid var(--brass-rule);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  padding: 24px 24px 24px;
}
.sheet .eyebrow { display: block; margin: 0 0 12px; }
.sheet-title {
  font-family: var(--serif); font-weight: 500; font-size: var(--t-28);
  line-height: 1.1; margin: 0; color: var(--bone);
}
.sheet .lede.small { margin-top: 13px; max-width: none; }
.sheet-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-quiet);
}

/* ——— Goals: the year ——— */

/* The page's own light, top-left. It belongs to the whole page rather than to
   the instrument: painted on the stage it drew a lit rectangle with an edge
   the year visibly stopped at. */
.year-page {
  max-width: 1560px; margin: 0 auto; padding: 34px 20px 70px;
  background: radial-gradient(1500px 760px at 32% -10%,
                              var(--glow) 0%, transparent 68%);
}

/* The instrument keeps its authored 1260×830 coordinate space and is scaled
   to whatever room the window has. Nothing reflows: a seat, a leader elbow
   and a hit target all stay exactly where they were drawn relative to each
   other, at any size. */
.clock-fit { width: 100%; overflow: hidden; }
.clock-stage {
  position: relative; width: 1260px; height: 830px;
  transform-origin: top left;
}
.clock-head {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.clock-year {
  font-family: var(--serif); font-size: 30px; line-height: 1;
  letter-spacing: 0.04em; color: var(--marble-dim);
}
.clock-seam {
  font-family: var(--grotesque); font-size: 10.5px; letter-spacing: 0.06em;
  color: var(--stone); margin-top: 7px;
}
.clock-hint {
  font-family: var(--grotesque); font-size: 10px; letter-spacing: 0.06em;
  color: var(--brass); margin-top: 9px;
}

.clock-foot { display: flex; align-items: center; gap: 14px; padding-top: 6px; }
.clock-foot-text { font-family: var(--grotesque); font-size: 10px; color: var(--stone); }
.clock-reset {
  font-family: var(--grotesque); font-size: 9.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone); background: none;
  border: none; padding: 0; cursor: pointer; margin-left: auto;
  transition: color 0.16s;
}
.clock-reset:hover { color: var(--brass-bright); }

/* The face itself. Drawn at 580 and shown larger, from the top so the hub
   lands where the head leaves off. */
.dial-wrap {
  position: absolute; left: 50%; top: 78px;
  transform: translateX(-50%) scale(1.29); transform-origin: top center;
  width: 580px; height: 580px; touch-action: none;
}
/* The four hosts exist so each render pass can replace its own part without
   disturbing the wrapper the pointer maths measures. They must not be boxes. */
.face-host, .hub-host, .plate-host, .month-host { display: contents; }
.dial-face { display: block; overflow: visible; position: relative; z-index: 1; }
.dial-wrap:focus-visible { outline: 1px solid var(--brass-rule); outline-offset: 6px; }
.hz-grip { fill: transparent; cursor: grab; }
.hz-grip.on { cursor: grabbing; }

.month {
  position: absolute; transform: translate(-50%, -50%); z-index: 4;
  font-family: var(--grotesque); font-size: 10.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone); pointer-events: none;
}
.month.now { color: var(--brass-bright); }

/* Clean at rest: all the names fade in the moment the pointer reaches the
   dial, and step back the moment one rail has focus. */
.plate {
  position: absolute; transform: translate(-50%, -50%); z-index: 5;
  font-family: var(--grotesque); font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; white-space: nowrap; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: var(--r-sm);
  color: var(--stone); background: rgba(22, 20, 16, 0.72);
  transition: opacity 0.28s ease, color 0.16s, background 0.16s, box-shadow 0.16s;
}
/* Nine goals' worth of names in the same column (W-follow-up): smaller
   face, tighter padding, the ladder above does the spacing. */
.plate.small { font-size: 9px; letter-spacing: 0.06em; padding: 2px 6px; }
.plate.back { color: var(--stone); }
.plate.on {
  color: var(--brass-bright); background: rgba(22, 20, 16, 0.94);
  box-shadow: inset 0 0 0 1px var(--brass-rule);
}
.plate:hover { color: var(--brass-bright); background: rgba(22, 20, 16, 0.94); }

/* ——— the hub ——— */

.hub {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 206px; height: 206px; border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, var(--hub-crown), var(--ground));
  border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 5px; z-index: 3; text-align: center;
}
.hub-big { font-family: var(--serif); font-size: 31px; line-height: 1; color: var(--bone); }
.hub-sub {
  font-family: var(--grotesque); font-size: 9px; letter-spacing: 0.06em; color: var(--stone);
}
.hub-rule { width: 30px; height: 1px; background: var(--line); margin: 6px 0 4px; }
/* A real goal is a sentence, not the two words the instrument was drawn
   with, so both of these are clamped: text spilling out of the disc paints
   over the rails it is supposed to be describing. */
.hub-name {
  font-family: var(--serif); font-size: 16px; line-height: 1.2;
  color: var(--bone); max-width: 168px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden;
}
.hub-meta {
  font-family: var(--grotesque); font-size: 9px; letter-spacing: 0.04em;
  color: var(--stone); margin-top: 5px; max-width: 172px; line-height: 1.4;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden;
}
.hub-meta.lit { color: var(--brass-bright); }
.hub-hint {
  font-family: var(--grotesque); font-size: 9px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone); margin-top: 9px;
}

/* ——— the run-up register ——— */

/* The stretch between the last milestone and the next one, unrolled: where it
   began at the left, the milestone at the right, and today travelling
   between them. Every position is set from JS because it is a measurement,
   not a layout. */
.run { display: block; width: 134px; margin-top: 12px; }
.run-track { position: relative; display: block; height: 16px; }
.run-bar {
  position: absolute; left: 0; top: 7px; height: 3px;
  border-radius: var(--r-sm); background: var(--line-raised);
}
.run-start { position: absolute; left: 0; top: 3.5px; width: 1px; height: 10px;
             background: var(--stone-faint); }
.run-ring {
  position: absolute; top: 3px; transform: translateX(-50%);
  width: 11px; height: 11px; border-radius: 50%; background: var(--ground);
  box-shadow: inset 0 0 0 1.6px var(--brass);
}
.run-ring.late {
  box-shadow: inset 0 0 0 1.6px var(--brass), 0 0 0 3px rgba(199, 162, 78, 0.2);
}
.run-now {
  position: absolute; top: 0; transform: translateX(-50%);
  width: 1px; height: 18px; background: var(--bone); z-index: 2;
  pointer-events: none;
}
.run-now-cap {
  position: absolute; top: -3px; transform: translateX(-50%);
  width: 3.4px; height: 3.4px; border-radius: 50%; background: var(--bone);
  z-index: 2; pointer-events: none;
}
.run-bead {
  position: absolute; top: 8.5px; transform: translate(-50%, -50%);
  height: 18px; padding: 0; border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.run-dot {
  display: block; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ground); box-shadow: 0 0 0 1.4px var(--stone-quiet);
}
.run-bead.next .run-dot { box-shadow: 0 0 0 1.6px var(--bone); }
.run-bead.held .run-dot { width: 9px; height: 9px; box-shadow: 0 0 0 1.5px var(--marble-dim); }
.run-bead.logged .run-dot {
  width: 9px; height: 9px; background: var(--stone); box-shadow: 0 0 0 1px var(--stone-dim);
}
.run-bead.lit .run-dot { width: 12px; height: 12px; }
.run-bead.lit .run-dot { box-shadow: 0 0 0 1.4px var(--stone-quiet), 0 0 0 6px rgba(239, 234, 221, 0.16); }
.run-bead.lit.next .run-dot { box-shadow: 0 0 0 1.6px var(--bone), 0 0 0 6px rgba(239, 234, 221, 0.16); }
.run-bead.lit.held .run-dot { box-shadow: 0 0 0 1.5px var(--marble-dim), 0 0 0 6px rgba(239, 234, 221, 0.16); }
.run-bead.lit.logged .run-dot { box-shadow: 0 0 0 1px var(--stone-dim), 0 0 0 6px rgba(239, 234, 221, 0.16); }

/* Several steps on one seat, stacked like coins so the group reads as more
   than one before you count the tally. */
.run-bead.stack .run-dot { width: 9px; height: 9px; }
.run-bead.stack.lit .run-dot { width: 11px; height: 11px; }
.run-bead.stack.logged .run-dot {
  background: var(--stone);
  box-shadow: 0 0 0 1px var(--stone-dim), -3.5px 0 0 -1px var(--stone-dim),
              -6.5px 0 0 -2px var(--stone-faint);
}
.run-bead.stack.open .run-dot {
  box-shadow: 0 0 0 1.4px var(--stone), -4px 0 0 -1.2px var(--ground),
              -4px 0 0 -0.2px var(--stone-quiet), -7px 0 0 -2.2px var(--ground),
              -7px 0 0 -1.4px var(--stone-faint);
}
.run-bead.stack.open.next .run-dot {
  box-shadow: 0 0 0 1.6px var(--bone), -4px 0 0 -1.2px var(--ground),
              -4px 0 0 -0.2px var(--stone-quiet), -7px 0 0 -2.2px var(--ground),
              -7px 0 0 -1.4px var(--stone-faint);
}
/* A blocked step gets a bar straight through it — the same mark the track
   carries for a blocked milestone, at the size of a bead. */
.run-bar-through {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 2px; height: 15px; background: var(--marble-dim);
}
.run-bead.lit .run-bar-through { height: 18px; }
.run-count {
  position: absolute; left: 50%; top: 15.5px; transform: translateX(-50%);
  font-family: var(--grotesque); font-style: normal; font-size: var(--t-12);
  letter-spacing: 0.04em; color: var(--stone);
}
.run-brace {
  position: absolute; top: 14.5px; height: 4px; padding: 0; background: none;
  border: none; border-left: 1px solid var(--stone-faint);
  border-right: 1px solid var(--stone-faint);
  border-bottom: 1px solid var(--stone-faint); cursor: pointer;
}
.run-brace-label {
  position: absolute; top: -11px; font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; color: var(--stone); white-space: nowrap;
}
.run-caps {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  margin-top: 6px; font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone);
}
.run-cap-left { white-space: nowrap; }
.run-cap-right {
  color: var(--brass-edge); max-width: 92px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

/* ——— the leader line and the callout ——— */

.lead-host { display: contents; }
.lead {
  position: absolute; left: 0; top: 0; z-index: 6; overflow: visible;
  pointer-events: none;
}
.callout-host { display: contents; }
.callout {
  position: absolute; z-index: 7; width: 244px; padding: 15px 17px 16px;
  border-radius: var(--r-sm); background: rgba(18, 16, 13, 0.97);
  box-shadow: inset 0 0 0 1px var(--stone-faint), 0 14px 34px rgba(0, 0, 0, 0.55);
  transition: opacity 0.12s linear; will-change: transform, opacity;
}
/* A card that is only being hovered has no controls to reach, so it takes no
   pointer events either — otherwise it eats the hover that opened it. */
.callout.pinned { box-shadow: inset 0 0 0 1px var(--brass-rule), 0 14px 34px rgba(0, 0, 0, 0.55); }
/* A step belongs to the hub, so its card opens under it, narrower. */
.callout.step { width: 196px; padding: 12px 14px 13px; }

.cal-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.cal-date, .cal-date-text {
  font-family: var(--grotesque); font-size: var(--t-21); letter-spacing: 0.02em;
  color: var(--bone); line-height: 1.05;
}
.callout.step .cal-date, .callout.step .cal-date-text { font-size: 16px; }
.cal-date {
  width: auto; min-width: 172px;
  padding: 0 0 2px; border-bottom: 1px dotted var(--brass-rule);
  cursor: pointer;
}
.callout.step .cal-date { min-width: 146px; }
.cal-state {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone);
}
.cal-state.gold { color: var(--brass-bright); }
.cal-state.brass { color: var(--brass); }
.cal-state.bone { color: var(--bone); }
.cal-state.dim { color: var(--marble-dim); }
.cal-label {
  display: block; font-family: var(--serif); font-size: var(--t-17); line-height: 1.2;
  color: var(--bone); margin-top: 7px;
}
.callout.step .cal-label { font-size: 15px; margin-top: 6px; }
.cal-line {
  display: flex; align-items: baseline; gap: 4px; margin-top: 6px;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.04em;
}
.cal-drift {
  flex: 1 1 auto; min-width: 0; color: var(--stone); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.cal-index { flex: 0 0 auto; white-space: nowrap; color: var(--stone); letter-spacing: 0.06em; }
.cal-note {
  font-family: var(--serif); font-size: var(--t-13); line-height: 1.4;
  color: var(--stone-lit); margin: 9px 0 0; text-wrap: pretty;
}
.callout.step .cal-note { font-size: 12.5px; margin-top: 7px; }

.cal-ext {
  display: flex; align-items: baseline; gap: 8px; margin-top: 9px;
  padding-top: 8px; border-top: 1px solid var(--line-quiet);
}
.cal-ext-tag {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--marble-dim); white-space: nowrap;
  flex: none;
}
/* A block is the one thing that should stop the eye: set solid, not whispered. */
.cal-ext-tag.hard {
  font-size: var(--t-12); font-weight: 700; color: var(--ink);
  background: var(--bone); padding: 4px 4px 2px;
}
.cal-ext-text {
  font-family: var(--serif); font-size: var(--t-12); line-height: 1.35;
  color: var(--stone-lit); text-wrap: pretty;
  /* A flex item: without these one long word (a name with no spaces) holds
     it at its own width and it runs out past the card's edge. */
  min-width: 0; overflow-wrap: anywhere;
}

.cal-pick {
  display: flex; flex-direction: column; gap: 1px; margin-top: 11px;
  padding-top: 8px; border-top: 1px solid var(--line-raised);
  animation: panelIn 0.16s ease-out;
}
.cal-pick-head {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone); margin-bottom: 6px;
}
.cal-pick-one {
  text-align: left; font-family: var(--grotesque); font-weight: 500;
  font-size: var(--t-12); border: none; padding: 8px 8px; background: none;
  box-shadow: inset 0 0 0 1px var(--line); color: var(--bone); cursor: pointer;
  transition: color 0.16s, box-shadow 0.16s, background 0.16s;
}
.cal-pick-one:hover {
  color: var(--on-brass); background: var(--brass);
  box-shadow: inset 0 0 0 1px var(--brass);
}

.cal-actions {
  display: flex; align-items: stretch; gap: 8px; margin-top: 13px;
  padding-top: 12px; border-top: 1px solid var(--line-raised);
}
.callout.step .cal-actions { margin-top: 10px; padding-top: 9px; }
.cal-do {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  flex: 1 1 auto; font-family: var(--grotesque); font-weight: 600; font-size: var(--t-12);
  border: none; padding: 8px 12px; border-radius: var(--r-sm); cursor: pointer;
  background: var(--brass); color: var(--on-brass); transition: background 0.16s;
  white-space: nowrap;
}
.cal-do:hover { background: var(--brass-bright); }
.cal-icon {
  flex: 0 0 auto; width: 36px; display: flex; align-items: center;
  justify-content: center; border: none; border-radius: var(--r-sm);
  background: none; box-shadow: inset 0 0 0 1px var(--brass-rule-dim);
  color: var(--brass); cursor: pointer;
  transition: color 0.16s, box-shadow 0.16s;
}
.cal-icon:hover { color: var(--brass-bright); box-shadow: inset 0 0 0 1px var(--brass); }
.cal-icon.on { color: var(--bone); box-shadow: inset 0 0 0 1px var(--stone-quiet); }
.cal-owned { font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone); }

.cal-confirm {
  display: block; margin-top: 10px; padding: 8px 12px 12px;
  border-radius: var(--r-sm); background: rgba(199, 162, 78, 0.08);
  box-shadow: inset 0 0 0 1px var(--brass-rule);
  animation: panelIn 0.16s ease-out;
}
.cal-confirm-q {
  font-family: var(--serif); font-size: var(--t-13); line-height: 1.35;
  color: var(--bone); margin: 0; text-wrap: pretty;
}
.cal-confirm-row { display: flex; gap: 12px; margin-top: 9px; align-items: center; }
.cal-yes, .cal-no {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; border: none; padding: 0; background: none;
  cursor: pointer; transition: color 0.16s;
}
.cal-yes { color: var(--brass-bright); }
.cal-yes:hover { color: var(--brass-light); }
.cal-no { color: var(--stone); }
.cal-no:hover { color: var(--brass-bright); }

.cal-blk {
  display: block; margin-top: 10px; padding: 8px 8px 8px;
  border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--stone-faint);
  animation: panelIn 0.16s ease-out;
}

.cal-menu {
  display: flex; flex-direction: column; margin-top: 8px;
  box-shadow: inset 0 0 0 1px var(--line-raised); border-radius: var(--r-sm);
  animation: panelIn 0.16s ease-out;
}
.cal-menu-item {
  text-align: left; font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase; border: none;
  padding: 8px 8px; background: none; color: var(--stone); cursor: pointer;
  transition: color 0.16s, background 0.16s;
}
.cal-menu-item:hover { color: var(--bone); background: rgba(239, 234, 221, 0.04); }
.cal-menu-item.lit { color: var(--marble-dim); }
.cal-menu-item.talk { border-top: 1px solid var(--line-faint); }
.cal-menu-item.talk:hover { color: var(--brass-bright); background: rgba(199, 162, 78, 0.06); }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}

/* ——— the ledger ——— */

.ledger { width: 100%; border-top: 1px solid var(--line-quiet); padding-top: 24px; margin-top: 30px; }
.ledger-title {
  font-family: var(--serif); font-weight: 500; font-size: var(--t-28); line-height: 1;
  margin: 0 0 16px; color: var(--bone);
}
.led-head, .led-grid {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 124px 66px 96px 210px;
  gap: 8px; align-items: center;
}
.led-head {
  padding: 0 8px 8px 12px; border-bottom: 1px solid var(--line);
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone);
}
.led-row { border-top: 1px solid var(--line-faint); border-left: 2px solid transparent; }
.led-row.goal { border-top-color: var(--line); }
.led-row.goal.on { background: rgba(199, 162, 78, 0.05); border-left-color: var(--brass); }
.led-row.mark, .led-row.free { border-top-color: var(--line-faint); }
.led-row.step { border-top-color: var(--line-ghost); }
.led-row.pinned { background: rgba(199, 162, 78, 0.07); border-left-color: var(--brass); }
.led-grid { cursor: pointer; }
.led-grid.goal { min-height: 40px; padding: 0 8px 0 0; }
.led-grid.mark { min-height: 34px; padding: 0 8px 0 16px; }
.led-grid.free { min-height: 26px; padding: 0 8px 0 16px; cursor: default; }
.led-grid.step { min-height: 30px; padding: 0 8px 0 48px; }

.led-mark { display: flex; align-items: center; justify-content: center; }
.dot {
  width: 7px; height: 7px; border-radius: 50%; display: block;
  box-shadow: inset 0 0 0 1.5px var(--stone-quiet);
}
.dot.on { background: var(--brass); box-shadow: none; }
.dot.small { width: 5px; height: 5px; box-shadow: inset 0 0 0 1.2px var(--stone-faint); }
.dot.small.on { background: var(--brass-edge); box-shadow: none; }
.dot.held { box-shadow: inset 0 0 0 1.5px var(--stone-quiet); }

.led-item { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.led-fold-gap { flex: 0 0 46px; display: flex; align-items: center; align-self: center; }
.led-fold {
  display: flex; align-items: center; gap: 4px; font-family: var(--grotesque);
  font-size: var(--t-12); letter-spacing: 0.04em; border: none; padding: 4px 4px;
  margin-left: -6px; background: none; color: var(--marble-dim); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color 0.14s, box-shadow 0.14s;
}
.led-fold.open { color: var(--brass-bright); box-shadow: none; }
.led-fold:hover { color: var(--brass-bright); box-shadow: inset 0 0 0 1px var(--brass-rule); }
.led-caret { display: flex; line-height: 1; transition: transform 0.14s; }
.led-fold.open .led-caret { transform: rotate(90deg); }
.led-tag {
  flex: 0 0 auto; font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone);
}
.led-label {
  font-family: var(--grotesque); font-size: var(--t-13); font-weight: 500;
  color: var(--bone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.led-label.goal { font-family: var(--serif); font-size: var(--t-17); font-weight: 400; }
.led-label.locked { color: var(--marble-dim); }
.led-label-input {
  width: 100%; min-width: 0; font-family: var(--grotesque); font-size: var(--t-13);
  font-weight: 500; color: var(--bone); padding: 2px 0;
}
.led-label-input.step { font-size: var(--t-12); font-weight: 400; color: var(--marble-dim); }
.led-free-label {
  font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone);
}
.led-fixed {
  flex: 0 0 auto; font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink); background: var(--stone);
  padding: 2px 4px 1px;
}
.led-date, .led-date-input {
  font-family: var(--grotesque); font-size: var(--t-12); color: var(--brass-bright);
  min-width: 0;
}
.led-date { color: var(--marble-dim); }
.led-date.faint { color: var(--stone); }
.led-date-input {
  width: 100%; padding: 2px 0; cursor: pointer;
}
.led-date-input.done { color: var(--marble-dim); }
.led-date-input.step { font-size: var(--t-12); color: var(--stone-lit); }
.led-date-input:disabled { cursor: default; color: var(--stone); }
.led-drift {
  font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone);
  white-space: nowrap;
}
.led-drift.gold { color: var(--brass-bright); }
.led-drift.lit { color: var(--stone-lit); }
.led-drift.bone { color: var(--bone); }
.led-drift.faint { color: var(--stone); }
.led-state {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.led-state.gold { color: var(--brass-bright); }
.led-state.bone { color: var(--marble-dim); }
.led-state.dim { color: var(--stone); }
.led-state.quiet { color: var(--stone); }
.led-acts { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.led-act {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; border: none; padding: 4px 8px; background: none;
  box-shadow: inset 0 0 0 1px var(--line-quiet); color: var(--stone);
  cursor: pointer; transition: color 0.14s, box-shadow 0.14s;
}
.led-act:hover { color: var(--brass-bright); box-shadow: inset 0 0 0 1px var(--brass-rule); }
.led-act.strong { color: var(--bone); box-shadow: inset 0 0 0 1px var(--stone-quiet); }
.led-add {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; border: none; padding: 4px 8px; background: none;
  color: var(--stone); cursor: pointer; transition: color 0.14s;
}
.led-add:hover { color: var(--brass-bright); }

.led-blocked {
  display: flex; align-items: baseline; gap: 8px; padding: 0 8px 8px 0;
  margin-left: 18px;
}
.led-blocked-tag {
  font-family: var(--grotesque); font-size: var(--t-12); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink); background: var(--bone);
  padding: 2px 4px 1px; white-space: nowrap;
}
.led-blocked-text {
  font-family: var(--serif); font-size: var(--t-12); line-height: 1.35; color: var(--stone-lit);
}
.led-blkform {
  display: flex; align-items: center; gap: 8px; padding: 0 8px 8px 0; margin-left: 18px;
}
.led-blkform .field-note { flex: 1 1 auto; max-width: 420px; }
.led-confirm {
  display: flex; align-items: center; gap: 12px; padding: 0 8px 8px 0; margin-left: 18px;
}
.led-confirm-q { font-family: var(--grotesque); font-size: var(--t-12); color: var(--brass-bright); }
.led-yes {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; border: none; padding: 4px 8px;
  background: var(--brass); color: var(--on-brass); cursor: pointer;
}

/* ——— the blank year ——— */

.blank-year {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px; align-items: center; margin-top: 44px;
}
.need {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line-ghost);
}
.need-n { font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone); }
.need-title { font-family: var(--serif); font-size: var(--t-21); line-height: 1.25; color: var(--marble); margin: 0; }
.need-line {
  font-family: var(--serif); font-style: italic; font-size: var(--t-15); line-height: 1.5;
  color: var(--marble-dim); margin: 7px 0 0; max-width: 50ch;
}
/* The same instrument, drawn empty, so the page it becomes is recognisably
   the page you were already looking at. */
.blank-dial {
  position: relative; width: 320px; height: 320px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.blank-ring { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; }
.blank-ring.outer { width: 300px; height: 300px; border: 1px solid var(--line-faint); }
.blank-ring.mid {
  width: 228px; height: 228px;
  border: 6px dotted var(--line-ghost);
}
.blank-ring.inner {
  width: 174px; height: 174px;
  border: 6px dotted var(--line-ghost);
}
.blank-tick { position: absolute; width: 14px; height: 1px; background: var(--line); }
.blank-note {
  position: relative; font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 3px; color: var(--stone);
}

@media (max-width: 1100px) {
  .blank-year { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* ——— Review ——— */

.report { max-width: 1120px; margin: 0 auto; padding: 48px 32px 64px; }
.mast-rule {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  border-bottom: 1px solid var(--line); padding-bottom: 8px;
}
/* The two documents, side by side at the top, because the monthly used to be
   a line under the fold of the weekly and reachable no other way (ADR-0054). */
.mast-periods { display: inline-flex; gap: 12px; }
.mast-period {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone);
}
.mast-period:hover { color: var(--marble); }
.mast-period.on { color: var(--brass-bright); cursor: default; }
.mast-body { border-bottom: 2px solid var(--brass); padding: 24px 0 24px; }
.mast-body.big { border-bottom-width: 3px; }
.mast-title {
  font-family: var(--serif); font-weight: 500; font-size: var(--t-40);
  line-height: 1; margin: 0; letter-spacing: -0.015em; color: var(--bone);
}
.mast-body.big .mast-title { font-size: var(--t-40); }
.mast-body .eyebrow.gold { display: block; font-size: var(--t-12); margin-top: 14px; }
.mast-headline {
  font-family: var(--serif); font-size: var(--t-21); line-height: 1.4;
  color: var(--marble); margin: 16px 0 0; max-width: 44ch; text-wrap: pretty;
}

/* The counters. A tick a week over a block a month, both to the same scale:
   the blocks are as wide as the weeks they hold, so the two rows are one
   instrument read at two grains.
   Not `.rail`: that is the day ledger's sticky rail (ledger.js), and the
   report borrowing the name stuck the archive under the masthead, where
   every section scrolled beneath its labels. */
.archive { margin-top: 20px; }
.archive-weeks { display: flex; align-items: flex-end; gap: 4px; }
.archive-week {
  flex: 1; min-width: 3px; display: block;
  border: none; padding: 0; cursor: pointer;
  background: var(--stone-quiet); transition: background 0.16s;
}
.archive-week.written { background: var(--brass-dim); }
.archive-week.blank { background: var(--line-quiet); }
.archive-week.here { background: var(--brass-bright); }
.archive-week:disabled { cursor: default; }
.archive-week:hover:not(:disabled) { background: var(--brass-bright); }
.archive-ahead {
  flex: 0 0 24px; display: flex; align-items: center; justify-content: center;
  height: 20px; color: var(--stone);
  border: none; background: none; padding: 0;
}
/* The same chevron, but this one goes somewhere. */
.archive-ahead.back { color: var(--brass); cursor: pointer; }
.archive-ahead.back:hover { color: var(--brass-light); }
.archive-months { display: flex; gap: 4px; margin-top: 4px; }
.archive-month {
  border: none; background: none; cursor: pointer; padding: 8px 0 4px;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone);
  box-shadow: inset 0 0 0 1px var(--line-faint);
  transition: color 0.16s, background 0.16s;
}
.archive-month.blank { color: var(--stone); }
.archive-month:disabled { cursor: default; }
.archive-month:hover:not(:disabled) { color: var(--bone); }
.archive-month.here {
  color: var(--brass-bright); background: var(--track-lit);
  box-shadow: inset 0 0 0 1px var(--brass-rule);
}
.archive-note {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 11px;
}

.not-yet .mast-title { font-size: var(--t-40); }
.pend-block { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line-faint); }
.pend-block:first-of-type { border-top: none; }
.pend-units { display: flex; align-items: flex-end; gap: 4px; margin: 18px 0 0; }
.pend-unit { flex: 1; }
.pend-bar {
  display: block; background: none;
  box-shadow: inset 0 0 0 1px var(--line-quiet);
  transition: height 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pend-bar.part { background: var(--track-lit); box-shadow: inset 0 0 0 1px var(--brass-rule); }
.pend-bar.on { background: var(--brass); box-shadow: inset 0 0 0 1px var(--brass); }
.pend-foot-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 4px; margin-top: 8px;
}
.pend-label {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone);
}
.pend-label.on { color: var(--bone); }
.pend-note { font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone); }
.pend-block .read { margin-top: 22px; max-width: 56ch; }
.promise {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) 190px;
  gap: 24px; align-items: center; padding: 16px 0;
  border-bottom: 1px solid var(--line-ghost);
}
.promise-n { font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone); }
.promise-title { font-family: var(--serif); font-size: var(--t-21); line-height: 1.25; color: var(--sage); margin: 0; }
.promise-line { font-family: var(--serif); font-style: italic; font-size: var(--t-15); line-height: 1.5; color: var(--marble-dim); margin: 7px 0 0; max-width: 52ch; text-wrap: pretty; }
.promise-bars { display: flex; align-items: flex-end; gap: 4px; height: 34px; opacity: 0.34; }
.promise-bar { flex: 1; display: block; background: var(--line); }
.promise-bar.b2 { background: var(--brass-rule); }
.promise-bar.b3 { background: var(--brass-bright); }
.pend-foot {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--brass-rule);
}
.pend-arrives {
  margin-left: auto; font-family: var(--serif); font-size: var(--t-15); color: var(--stone);
}

.rsection { margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--line-faint); }
.read { font-family: var(--serif); font-size: var(--t-17); line-height: 1.55; color: var(--marble); margin: 0 0 16px; max-width: 62ch; text-wrap: pretty; }
.two-up {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px; align-items: center; margin-top: 20px;
}
.two-up.wide { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.key { display: flex; flex-direction: column; gap: 8px; }
.key-item {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone);
}
.key-box { width: 14px; height: 11px; display: block; background: var(--brass-dim); }
.key-box.added { background: var(--brass-bright); }
.key-box.stone, .key-box.kept { background: var(--stone); }
.key-box.gap { background: var(--sink); box-shadow: inset 0 0 0 1px var(--line-faint); }
.key-rule { width: 14px; height: 0; display: block; border-top: 2px dashed var(--bone); }
.key-rule.plan { border-top: 2px solid var(--brass); }
.key-rule.gold { border-top-color: var(--brass); }
.key-rule.solid { border-top: 2px solid var(--brass); }

.track { padding: 16px 0 16px; border-bottom: 1px solid var(--line-faint); }
.track-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.track-label { font-family: var(--serif); font-size: var(--t-17); color: var(--bone); }
.track-state { font-family: var(--grotesque); font-size: var(--t-12); color: var(--bone); }
.track-state.behind { color: var(--marble-dim); }
.track-bar {
  position: relative; height: 24px; margin: 20px 0 26px;
  background: var(--sink); box-shadow: inset 0 0 0 1px var(--line-faint);
}
.track-bar > span { position: absolute; top: 0; bottom: 0; display: block; }
.track-gap { background: rgba(10, 9, 8, 0.45); }
.track-gap.none { background: transparent; }
.track-done { background: var(--brass-dim); }
.track-added { background: var(--brass-bright); }
/* The mark and its caption stand outside the bar, so they have to outrank
   `.track-bar > span` above rather than merely follow it. */
.track-bar > .track-mark { width: 0; top: -6px; bottom: -6px; border-left: 2px dashed var(--bone); }
/* The PLAN line (ADR-0082): where the period's plans would have put you.
   Solid brass against the date line's dashed bone, so the two read apart at
   a glance; its caption hangs under the bar, the date line's above it, so
   the words never collide however close the marks stand. */
.track-bar > .track-mark.plan { border-left: 2px solid var(--brass); }
/* The caption belongs to the mark, so it moves with it and never wraps. */
.track-bar > .track-said {
  top: -20px; bottom: auto; white-space: nowrap;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--marble-dim);
}
.track-bar > .track-said.plan { top: auto; bottom: -20px; color: var(--brass); }
.track-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.track-key { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; }

.findings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 22px; }
.finding-label {
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass);
  margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-faint);
}
.finding.f0 .finding-label { color: var(--brass-bright); border-bottom-color: var(--brass-rule); }
.finding.f1 .finding-label { color: var(--marble-dim); }
.finding-line { font-family: var(--serif); font-size: var(--t-17); line-height: 1.55; color: var(--marble); margin: 0; text-wrap: pretty; }

.dow-chart { border-bottom: 1px solid var(--line); padding-bottom: 0; }
/* Aligned on the TOP of the columns, which is the only edge every column
   shares: the captions below differ in height from weekday to weekday, and
   a row aligned on its bottom stood each plot at its own baseline
   (ADR-0086). */
.dow-plot-row { display: flex; gap: 12px; align-items: flex-start; }
.dow { flex: 1; display: flex; flex-direction: column; }
.dow-pct { display: block; font-family: var(--grotesque); font-size: var(--t-12); text-align: center; color: var(--stone); margin-bottom: 7px; }
.dow-pct.thin, .dow-label.thin { color: var(--brass); }
.dow-plot { position: relative; display: block; height: 120px; }
.dow-bar { position: absolute; left: 0; right: 0; bottom: 0; background: var(--stone); display: block; }
.dow-bar.thin { background: var(--stone-quiet); }
/* Where the plan asked for that weekday, against how much of it came back. */
.dow-planned-line {
  position: absolute; left: -2px; right: -2px; height: 0;
  border-top: 2px dashed var(--brass); display: block; transition: opacity 0.3s ease;
}
.dow-label { display: block; font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.08em; text-transform: uppercase; text-align: center; color: var(--stone); margin-top: 8px; }
.dow-low { display: block; font-family: var(--grotesque); font-size: var(--t-12); text-align: center; color: var(--stone); margin-top: 4px; }
.dow-low.on { color: var(--brass-dim); }

.gh-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 104px; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-faint); }
.gh-label { font-family: var(--serif); font-size: var(--t-17); color: var(--bone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-bar { position: relative; height: 16px; }
.gh-bar > span { position: absolute; top: 0; bottom: 0; display: block; }
.gh-planned { left: 0; background: rgba(10, 9, 8, 0.42); box-shadow: inset 0 0 0 1px var(--line-faint); }
.gh-done { left: 0; background: var(--brass-dim); }
.gh-done.thin { background: var(--brass-rule); }
.gh-bar > .gh-mark { width: 0; top: -4px; bottom: -4px; border-left: 2px dashed var(--brass); }
.gh-row .hint { text-align: right; }

.split-bar { display: flex; height: 30px; box-shadow: inset 0 0 0 1px var(--line-faint); }
.split-piece { display: block; }
.split-piece.s0, .key-box.s0 { background: var(--brass-dim); }
.split-piece.s1, .key-box.s1 { background: var(--stone); }
.split-piece.s2, .key-box.s2 { background: var(--stone-quiet); }
.split-piece.s3, .key-box.s3 { background: var(--sink); box-shadow: inset 0 0 0 1px var(--line); }
.split-key { display: flex; gap: 8px 16px; flex-wrap: wrap; margin: 14px 0 16px; }

/* Nobody records why a block did not happen, so this column is whatever the
   user wrote on the day — and it is empty rather than invented. */
.causes { min-width: 0; }
.cause {
  display: grid; grid-template-columns: minmax(0, 1fr) 68px; gap: 12px;
  align-items: center; padding: 8px 0; border-top: 1px solid var(--line-faint);
}
.cause-note { font-size: var(--t-13); line-height: 1.4; color: var(--marble); }
.cause .hint { text-align: right; white-space: nowrap; }

.streak { display: grid; grid-template-columns: 170px minmax(0, 1fr) 150px; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-faint); }
.streak-label { font-family: var(--serif); font-size: var(--t-17); color: var(--bone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.streak-cells { display: flex; gap: 2px; }
.streak-cell { flex: 1; height: 15px; display: block; background: rgba(10, 9, 8, 0.5); }
.streak-cell.on { background: var(--brass-dim); }
.streak .hint { text-align: right; white-space: nowrap; }

/* Energy against what was scheduled (ADR-0086). The blocks are bars — what
   the day asked for, and how much of it came back, stacked on one floor —
   and the energy is the line above them. */
.eby-planned {
  position: absolute; left: 0; right: 0; bottom: 0; display: block;
  background: rgba(138, 130, 114, 0.16);
  box-shadow: inset 0 0 0 1px rgba(138, 130, 114, 0.4);
}
.eby-kept { position: absolute; left: 0; right: 0; bottom: 0; display: block;
            background: var(--stone); }
.eo-label.rebuilt { color: var(--brass-dim); box-shadow: inset 0 -2px 0 var(--brass-dim); }
.key-box.planned {
  background: rgba(138, 130, 114, 0.16);
  box-shadow: inset 0 0 0 1px rgba(138, 130, 114, 0.4);
}
.eyebrow.faint { color: var(--stone); margin-top: 12px; display: block; }

.eo-plot { position: relative; height: 150px; border-bottom: 1px solid var(--line-quiet); }
.eo-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 16px; }
.eo-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.eo-bar { background: rgba(138, 130, 114, 0.35); box-shadow: inset 0 0 0 1px rgba(138, 130, 114, 0.55); display: block; }
.eo-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.eo-line { stroke: var(--brass); }
.eo-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--brass); display: block; }
.eo-labels { display: flex; gap: 16px; margin-top: 9px; }
.eo-label { flex: 1; text-align: center; font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone); }

.proposals { border-top: 1px solid var(--brass-rule); }
.proposal-intro {
  font-family: var(--serif); font-size: var(--t-17); line-height: 1.65;
  color: var(--marble); margin: 0; max-width: 70ch;
  white-space: pre-line; text-wrap: pretty;
}
.proposal-aside {
  font-family: var(--grotesque); font-size: var(--t-12); line-height: 1.8;
  letter-spacing: 0.04em; color: var(--stone); margin: 0;
}
.proposal {
  display: grid; grid-template-columns: minmax(0, 1fr) 196px 232px;
  gap: 24px; align-items: center; padding: 16px 0;
  border-top: 1px solid var(--line-faint);
}
.proposal.passed { opacity: 0.6; }
.proposal.passed .proposal-title { color: var(--stone); }
.proposal-say { min-width: 0; }
.proposal-kind {
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass);
}
.proposal-title { font-family: var(--serif); font-size: var(--t-17); line-height: 1.4; color: var(--bone); margin: 4px 0 0; text-wrap: pretty; }
.proposal-why { font-family: var(--serif); font-size: var(--t-15); line-height: 1.5; color: var(--marble-dim); margin: 7px 0 0; max-width: 66ch; }
.proposal-effect { font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em; color: var(--stone); margin: 7px 0 0; }
.proposal.taken .proposal-effect { color: var(--brass-bright); }
.proposal-acts { display: flex; gap: 4px; }
.act {
  flex: 1; border: none; padding: 8px 4px; cursor: pointer;
  font-family: var(--grotesque); font-weight: 600; font-size: var(--t-12);
  background: none; color: var(--stone);
  box-shadow: inset 0 0 0 1px var(--line); transition: filter 0.16s, color 0.16s;
}
.act.yes { background: var(--brass); color: var(--on-brass); box-shadow: none; }
.act:hover { filter: brightness(1.07); }
.act.chosen { background: var(--surface); color: var(--bone); box-shadow: inset 0 0 0 1px var(--brass-rule); }
.act.yes.chosen { background: none; color: var(--brass-bright); }
.mini { position: relative; height: 22px; background: var(--sink); box-shadow: inset 0 0 0 1px var(--line-faint); }
.mini.quiet { opacity: 0.4; }
.mini.blank { background: none; box-shadow: none; }
.mini > span { position: absolute; top: 0; bottom: 0; display: block; }
.mini-gap { background: rgba(10, 9, 8, 0.45); }
.mini-done { background: var(--brass-dim); }
.mini-added { background: var(--brass-bright); }
.mini-gain { background: rgba(223, 189, 105, 0.25); box-shadow: inset 0 0 0 1px rgba(223, 189, 105, 0.5); }
.mini > .mini-mark { width: 0; top: -4px; bottom: -4px; border-left: 2px dashed var(--bone); }
.mini > .mini-mark-new { width: 2px; top: -3px; bottom: -3px; background: var(--brass-bright); }
/* Both marks carry their names in place (ADR-0082): the widget's meaning
   must survive with no pointer anywhere near it. */
.mini.tall { margin: 16px 0 14px; }
.mini > .mini-said {
  top: -15px; bottom: auto; white-space: nowrap;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--marble-dim);
}
.mini > .mini-said.new { top: auto; bottom: -15px; color: var(--brass-bright); }
.proposal-state { font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em; color: var(--stone); margin: 7px 0 0; }
.proposal-state.taken { color: var(--brass-bright); }
.proposal-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line-faint);
}
.next-issue {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  width: 100%; text-align: left; margin-top: 44px; padding: 16px 0 0;
  border: none; border-top: 1px solid var(--line-faint);
  background: none; cursor: pointer;
}
.next-say { display: flex; align-items: baseline; gap: 12px; }
.next-title { font-family: var(--serif); font-size: var(--t-21); color: var(--bone); }
.next-go { font-family: var(--grotesque); font-weight: 600; font-size: var(--t-12); color: var(--brass); }
.write-call { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--brass-rule); }

/* ——— modals ——— */

.modal-host { position: fixed; inset: 0; z-index: 24; }
.modal-veil {
  position: absolute; inset: 0;
  background: rgba(15, 13, 11, 0.76);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 16px; overflow-y: auto;
}
/* One modal anatomy (ADR-0170): a raised surface in front of the page, its
   elevation said by a lighter ground and one shadow, not a keyline. */
.modal {
  width: 820px; max-width: 100%;
  background: var(--surface);
  box-shadow: var(--shadow-modal);
}
.modal.panel-architect { width: 660px; padding-bottom: 16px; }
/* One left edge. The strata under the thread — the record, the draft
   summary, the preview, the foot — each kept a padding from the old form
   dress (0, 20px, 42px), so no two lines on the panel started at the same
   x. Everything ranges on the thread's own 28px. */
.panel-architect .arch-foot { padding: 12px 28px 0; }
.panel-architect .arch-summary, .panel-architect .notice,
.panel-architect .hint, .panel-architect .arch-done { margin-left: 28px; margin-right: 28px; }
.panel-architect .arch-summary { padding: 0; }
.panel-architect .arch-done { padding: 16px 0; }
.panel-architect .arch-preview { padding: 12px 28px; }
.panel-architect .chat-composer { margin: 12px -28px 0; }
/* The turn's record lives in the thread now, under the reply it is about,
   on the reply's own edge — quiet, like the day chat's trace card. */
.chat-thread .arch-work { padding: 0; margin: 14px 0 0; }
.chat-thread .arch-none { margin: 12px 0 0; }
/* Room to say a real thing: the answers this box is for are a paragraph,
   whatever the prompt above it asks for (the old .tall box's concern,
   carried into the chat dress). */
.panel-architect .chat-input { height: auto; min-height: 56px; }
/* The in-flight conflict (ADR-0074): a real sentence in the agent's serif
   voice on the thread's own edge — it names a goal and a milestone, and
   five wrapped lines of letter-spaced mono chip were unreadable. */
.panel-architect .conflict {
  font-family: var(--serif);
  font-size: var(--t-15);
  line-height: 1.55;
  color: var(--bone);
  margin: 10px 28px 0;
}
.panel-architect .modal-actions { margin: 22px 28px 0; }
/* Making an account: three fields and two buttons, so it is sized like the
   form it is rather than like the panels above. */
.modal.panel-account { width: 460px; }
.modal-form { padding: 16px 24px 24px; }
.modal-title {
  font-family: var(--serif); font-weight: 500; font-size: var(--t-28);
  line-height: 1.15; letter-spacing: -0.01em;
  margin: 0 0 24px; color: var(--bone);
}
.modal-form .form-input { width: 100%; }
.modal-form .field .hint { display: block; margin: 8px 0 0; }
.modal-form .field .notice { margin: 8px 0 0; }
.modal-form .quiet-link { margin-top: 8px; }
/* The first-run tour (ADR-0185, drawn in ADR-0195): a card at the corner of
   the page, not a modal over it, so the page behind stays usable and a step
   can send the person to the thing it talks about. On top of everything the
   page can draw — its own ring and tip (31), the Settings panel (24), the gap
   form (70) — so no ring, tip or animation ever paints over the card; only the
   "before it goes" sheet (80), a decision that has to be answered, sits in
   front. It can be picked up anywhere but a control and carried out of the
   way. The card is the design's (Tour.dc.html), class for class. */
.tour-host {
  position: fixed; right: var(--s-5); bottom: var(--s-5); z-index: 75;
  max-width: calc(100vw - 2 * var(--s-4));
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.tour-host :is(button, a) { cursor: pointer; }
.tour-host.tour-carried, .tour-host.tour-carried * { cursor: grabbing; }
.tour {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-modal);
  padding: var(--s-3) var(--s-4) var(--s-4);
  animation: gateFade 0.3s ease both;
}
/* Compact (the owner's call: the card was in the way): a step smaller on
   every line of type and of padding. A container, so the bar can tell when
   it is too narrow for its six names. */
.tour-card { width: 340px; max-width: 100%; box-sizing: border-box; position: relative;
             container-type: inline-size; }
/* The grip that sets the card's width, in the corner away from its anchor. */
.tour-grip {
  position: absolute; top: 3px; left: 3px; width: 14px; height: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--stone); opacity: 0.6; cursor: nwse-resize;
}
.tour-grip:hover, .tour-resizing .tour-grip { opacity: 1; color: var(--brass); }
.tour-grip.tour-grip-right { left: auto; right: 3px; cursor: nesw-resize; transform: scaleX(-1); }
.tour-host.tour-resizing, .tour-host.tour-resizing * { cursor: nwse-resize; }
/* Moved to the other corner when the control it rings would sit under it. */
.tour-host.tour-left { right: auto; left: var(--s-5); }
/* And to the top when both bottom corners would cover it. */
.tour-host.tour-top { bottom: auto; top: calc(62px + var(--s-4)); }
/* Room beneath the page's last control while the card is up, so whatever it
   rings can always be scrolled clear of it (ADR-0190). */
body.tour-on #shell { padding-bottom: 320px; }

/* One line, everything on the same centre: the eyebrow, the count and the
   control share a size and a line height. */
.tour-head { display: flex; align-items: center; justify-content: space-between;
             gap: var(--s-3); min-height: 20px; }
.tour-head-right { display: flex; align-items: center; gap: var(--s-3); }
.tour-head .eyebrow, .tour-head .tour-fold-title, .tour-count, .tour-head-act { margin: 0; line-height: 20px; }
.tour-head .tour-fold-title { flex: 1 1 auto; min-width: 0; white-space: nowrap;
                              overflow: hidden; text-overflow: ellipsis; }
.tour-fold-title { font-size: var(--t-13); color: var(--stone-lit); }
/* Above `.quiet-link`'s own size, which comes later in this file. */
.tour-head .tour-head-act { padding: 0; font-size: var(--t-12); }
.tour-count { font-size: var(--t-12); color: var(--stone); font-variant-numeric: tabular-nums; }
.tour.tour-folded { padding: var(--s-3) var(--s-4); }

/* The bar: a column a page, a segment a step. The step you are on holds
   still, lit and never filling, so the bar only ever moves forward. */
.tour-bar { display: flex; gap: var(--s-2); margin: var(--s-3) 0 6px; }
.tour-track { display: flex; gap: 3px; flex: var(--n) 1 0; }
.tour-seg { position: relative; flex: 1 1 0; height: 4px; border-radius: 2px;
            background: var(--line); overflow: hidden; }
.tour-seg::after { content: ""; position: absolute; inset: 0; transform-origin: left center;
                   transform: scaleX(0); background: var(--brass); }
.tour-seg.done::after { transform: scaleX(1); }
.tour-seg.skipped::after { transform: scaleX(1); background: var(--line-quiet); }
.tour-seg.fresh::after { animation: tourFill 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.tour-seg.on { background: var(--stone-dim); }
@keyframes tourFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tour-track.sweep .tour-seg::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, transparent, var(--bone), transparent);
  transform: translateX(-100%); animation: tourSweep 0.9s 0.55s ease-out both;
}
@keyframes tourSweep { to { transform: translateX(100%); } }
/* Each page's segments and its name are one column, so the column is never
   narrower than its name. */
.tour-cols { margin: var(--s-3) 0 14px; gap: 6px; }
.tour-col { flex: var(--n) 1 0; min-width: max-content; display: flex;
            flex-direction: column; gap: 6px; }
.tour-col .tour-track { flex: none; }
.tour-label { font-size: var(--t-12); letter-spacing: 0.04em; color: var(--stone);
              display: flex; align-items: center; gap: var(--s-1); white-space: nowrap; }
.tour-label.on { color: var(--marble); }
.tour-label.complete { color: var(--brass); }
/* Too narrow for six names: each name held its column at its own width and
   squeezed the steps of the short pages to specks (the owner's report). Only
   the page on the card is named, and every column keeps its share of steps;
   the last two pages' names hang to the left so they stay on the card. */
@container (max-width: 340px) {
  .tour-col { min-width: 0; }
  .tour-label { visibility: hidden; }
  .tour-label.on { visibility: visible; }
  .tour-col:nth-last-child(-n+2) .tour-label { align-self: flex-end; }
}

/* What the step before did, with a check that draws itself once. */
.tour-did { display: flex; align-items: center; gap: 6px; font-size: var(--t-12);
            line-height: 1.3; color: var(--brass); margin: 0 0 var(--s-3);
            animation: tourFade 0.3s ease-out both; }
.tour-did .tour-check { flex: 0 0 auto; }
.tour-page .tour-did { margin: 0 0 var(--s-4); padding-bottom: var(--s-3);
                       border-bottom: 1px solid var(--line); }
@keyframes tourFade { from { opacity: 0; } to { opacity: 1; } }
.tour-check path { stroke-dasharray: 16; stroke-dashoffset: 0;
                   animation: tourDraw 0.45s 0.1s ease-out backwards; }
@keyframes tourDraw { from { stroke-dashoffset: 16; } to { stroke-dashoffset: 0; } }
.tour-copy { animation: tourFade 0.35s ease-out both; }
.tour-copy.later { animation-delay: 0.1s; }

/* A page card opens a section, so it reads as a bigger moment than a step:
   a brass rule along its top, the page named in the serif. */
.tour-card.tour-page { border-top: 2px solid var(--brass); }
.tour-page-kicker { margin: 0 0 var(--s-1); line-height: 1.3; font-size: var(--t-12);
                    letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); }
.tour-page-title { margin: 0 0 var(--s-2); font-family: var(--serif); font-size: var(--t-21);
                   font-weight: 400; line-height: 1.15; color: var(--marble); }
.tour-page-body { margin: 0 0 var(--s-3); font-size: var(--t-13); line-height: 1.5;
                  color: var(--marble-mid); }
.tour-title {
  font-family: var(--serif); font-weight: 500; font-size: var(--t-17);
  line-height: 1.2; letter-spacing: -0.01em; margin: var(--s-2) 0 var(--s-2);
  color: var(--bone);
}
.tour-body { font-size: var(--t-13); line-height: 1.55; color: var(--stone-lit); margin: 0; }
.tour-note { font-size: var(--t-13); color: var(--stone); margin: var(--s-2) 0 0; }
.tour-off { font-size: var(--t-13); color: var(--stone); margin: var(--s-2) 0 var(--s-1); }
/* No control's words break: with too little room "End the tour" takes a
   line of its own above the rest (it broke into two lines, and so did
   "Tour section"). */
.tour-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: var(--s-2) var(--s-3); margin-top: var(--s-4);
}
.tour-foot button { white-space: nowrap; }
.tour-end-short { display: none; }
/* The footer of a page card (End the tour, Back, Skip, Tour section) fits on
   one line from a 330px card; below that, End. */
@container (max-width: 300px) {
  .tour-end-long { display: none; }
  .tour-end-short { display: inline; }
}
.tour-act { font-size: var(--t-13); }
.tour-moves { display: flex; align-items: center; gap: var(--s-4); margin-left: auto; }

/* Waiting on the planner: the card fills one thin line once, forward only,
   slowing as it goes, for as long as the work takes. */
.tour-wait { position: relative; height: 2px; margin: var(--s-1) 0 6px; border-radius: 1px;
             background: var(--line); overflow: hidden; }
.tour-wait span { position: absolute; inset: 0; transform-origin: left center;
                  background: var(--brass); animation: tourWait 40s cubic-bezier(0.1, 0.6, 0.3, 1) both; }
@keyframes tourWait { from { transform: scaleX(0); } to { transform: scaleX(0.96); } }

/* The end: one line a page, and how it went. */
.tour-summary { list-style: none; margin: 14px 0 0; padding: 0; }
.tour-summary li { display: flex; justify-content: space-between; padding: var(--s-2) 0;
                   border-top: 1px solid var(--line-quiet); font-size: var(--t-13); color: var(--marble); }
.tour-summary li:last-child { border-bottom: 1px solid var(--line-quiet); }
.tour-state { color: var(--brass); display: flex; align-items: center; gap: var(--s-1); }
.tour-state.skipped { color: var(--stone); }

/* The real control a step is about. A ring, never a veil: the page stays
   usable, and the person presses the thing itself (ADR-0190). The card's own
   Next is the one control ringed where it stands, with a pulse outwards. */
.tour .tour-target {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  animation: tourRing 1.8s ease-in-out infinite;
}
@keyframes tourRing {
  0%, 100% { outline-offset: 3px; }
  50% { outline-offset: 6px; }
}
/* The ring round a page control is the marks layer's, over the page and under
   the card: drawn on the control, an outline is painted in the page's order
   and the next row of the calendar covered it. `.tour-target` on a page node
   is only a mark. The ring is a border inside its own box, and `place` sets
   that box to the room free on each side of the control, so it reaches
   nowhere past that room: an outline pulsing outwards lay over the words
   beside a control, and drawn inside, over the control's own (the owner's
   reports). So it breathes in brightness, not in size, on the same slow beat. */
.tour-ring {
  box-sizing: border-box;
  border: 2px solid var(--brass);
  animation: tourBreathe 1.8s ease-in-out infinite;
}
/* Open on a side its control runs past the panel it scrolls in. */
.tour-ring.cut-top { border-top-color: transparent; }
.tour-ring.cut-right { border-right-color: transparent; }
.tour-ring.cut-bottom { border-bottom-color: transparent; }
.tour-ring.cut-left { border-left-color: transparent; }
@keyframes tourBreathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
/* A block's controls, held open for the step that shows them. */
.eblock.tour-show-ctl .block-pin, .eblock.tour-show-ctl .block-remove,
.eblock.tour-show-ctl .block-talk { display: inline-flex; }

/* The page layer: a ring for a place on the dial, the tip, the scroll prompt
   and the line after the end. Nothing in it but its own controls takes a
   pointer, so the page under it stays usable. */
/* Above the Settings panel (24) and the card over it (30), so a tip for a
   control inside Settings is not drawn behind the panel it points into. */
.tour-marks { position: fixed; inset: 0; z-index: 31; pointer-events: none; }
.tour-ring { position: fixed; border-radius: var(--r-sm); }
.tour-ring.round { border-radius: 50%; }
.tour-tip {
  position: fixed; width: 232px; box-sizing: border-box; margin: 0; padding: 10px var(--s-3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--shadow-modal); font-size: var(--t-13); line-height: 1.4; color: var(--marble);
  animation: gateRise 0.35s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.tour-scroll {
  position: fixed; left: 50%; transform: translateX(-50%); width: 240px; height: 36px;
  display: flex; align-items: center; justify-content: center; gap: var(--s-2);
  border: none; border-radius: var(--r-sm); background: var(--surface); color: var(--marble);
  font-family: var(--grotesque); font-size: var(--t-13); cursor: pointer;
  box-shadow: var(--shadow-modal); pointer-events: auto;
}
.tour-scroll svg { animation: tourNudge 1.4s ease-in-out infinite; }
@keyframes tourNudge { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
.tour-ended {
  position: fixed; left: var(--s-5); bottom: var(--s-5); display: flex; gap: var(--s-3);
  align-items: center; padding: var(--s-3) var(--s-4); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); font-size: var(--t-13);
  color: var(--stone); pointer-events: auto;
}
/* A rebuild that is not an entrance is drawn still (see `enteredAs` in
   walkthrough.js): the card does not fade again, and the step's words, its
   done line and its filled segment do not replay. */
.tour.tour-still { animation: none; }
.tour-settled :is(.tour-copy, .tour-did, .tour-check path),
.tour-settled .tour-seg.fresh::after,
.tour-settled .tour-track.sweep .tour-seg::before { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .tour, .tour-target, .tour-ring, .tour-seg.fresh::after, .tour-track.sweep .tour-seg::before, .tour-did,
  .tour-copy, .tour-check path, .tour-scroll svg, .tour-tip { animation: none; }
  .tour-wait span { animation: none; transform: scaleX(0.96); }
  .tour-check path { stroke-dashoffset: 0; }
}
/* The subscribe errand (ADR-0183): a sentence and a button, sized like the
   account form beside it. */
.modal.panel-subscribe { width: 460px; }
/* Used by the architect's failure state as well, which had no rule at all
   until this landed and laid its two buttons out on top of each other. */
.modal-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; margin-top: 26px;
}
.modal-actions .btn { justify-content: center; }
/* Arguing with a proposal — the talk-it-through shape (ADR-0083): one
   thread, one composer, and the record filed from the conversation. */
.discuss-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 16px 16px 16px; border-top: 1px solid var(--line-quiet);
}
.discuss-foot .hint { flex-basis: 100%; max-width: 58ch; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px; border-bottom: 1px solid var(--line-quiet);
}

.settings-body { display: grid; grid-template-columns: 184px minmax(0, 1fr); }
.settings-tabs { border-right: 1px solid var(--line-quiet); padding: 12px 0; }
.settings-tab {
  display: block; width: 100%; text-align: left;
  border: none; background: none; padding: 8px 16px; cursor: pointer;
  font-family: var(--grotesque); font-size: var(--t-15); color: var(--stone);
  box-shadow: inset 2px 0 0 transparent;
}
.settings-tab:hover { color: var(--marble-mid); }
.settings-tab.on { color: var(--bone); box-shadow: inset 2px 0 0 var(--brass); }
.settings-pane { padding: 16px 16px 24px; min-height: 380px; }

/* Connections as a list, one per row (ADR-0170): the same row anatomy as
   every other setting, not a grid of bordered cards. */
.tiles { display: flex; flex-direction: column; }
.tile {
  display: flex; flex-direction: column; gap: 4px;
  text-align: left; border: none; cursor: pointer;
  background: none; border-bottom: 1px solid var(--line-quiet);
  padding: var(--s-3) 0;
  transition: background 0.16s;
}
.tile:hover:not(:disabled) .tile-name { color: var(--bone); }
.tile.off { opacity: 0.5; cursor: default; }
.tile-head { display: flex; align-items: center; gap: 8px; }
.tile-dot { width: 6px; height: 6px; display: block; background: none; box-shadow: inset 0 0 0 1px var(--stone-faint); }
.tile-dot.on { background: var(--brass); box-shadow: inset 0 0 0 1px var(--brass); }
.tile-name { font-size: var(--t-15); color: var(--marble); flex: 1; }
.tile-state { font-family: var(--grotesque); font-size: var(--t-13); color: var(--stone); }
.tile.on .tile-state { color: var(--brass); }
.tile-line { font-family: var(--grotesque); font-size: var(--t-13); line-height: 1.5; color: var(--stone); }

.panel { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-faint); }
.panel-line { font-size: var(--t-13); line-height: 1.55; color: var(--marble-dim); margin: 0 0 10px; max-width: 66ch; }
.field-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gh-account { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line-ghost); }
.gh-login { font-size: var(--t-13); color: var(--marble); }
.gh-links { margin-top: 10px; }
.gh-link { display: flex; align-items: center; justify-content: space-between;
           gap: 12px; padding: 4px 0; }
.gh-link-form { display: flex; flex-direction: column; gap: 8px;
                margin-top: 14px; padding-top: 12px;
                border-top: 1px solid var(--line-ghost); }
.import-report { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-faint); }

/* Settings, redrawn (ADR-0193 and the copy audit): a serif title, sections
   under a small heading with a hairline between them, and one save bar at
   the foot that appears only after a change. */
.settings-head { padding: var(--s-5) var(--s-5) var(--s-4); }
.settings-title { margin: 0; font-family: var(--serif); font-weight: 400;
                  font-size: var(--t-21); color: var(--marble); }
.settings-sections { display: block; }
.settings-section { padding-top: var(--s-4); }
.settings-section + .settings-section { margin-top: var(--s-3); border-top: 1px solid var(--line-faint); }
.settings-section-title { margin: 0 0 var(--s-1); font-family: var(--grotesque); font-weight: 400;
                          font-size: var(--t-12); letter-spacing: 0.08em;
                          text-transform: uppercase; color: var(--stone); }
.settings-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 46ch; }
.settings-section .settings-row > .field-row { flex-wrap: nowrap; }
.settings-section .btn { white-space: nowrap; }
.settings-row.settings-row-stack { flex-direction: column; align-items: flex-start; gap: var(--s-2); }
.settings-section .settings-row:last-child { border-bottom: none; }
.settings-note { margin: var(--s-2) 0 0; }
.settings-token { display: flex; flex-direction: column; gap: var(--s-2); }
.settings-savebar {
  position: sticky; bottom: 0; display: flex; align-items: center;
  justify-content: space-between; gap: var(--s-4);
  padding: var(--s-3) var(--s-5); background: var(--surface);
  border-top: 1px solid var(--line);
}
.settings-save-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.settings-save-note { font-size: var(--t-13); color: var(--marble-dim); }
.settings-save-acts { display: flex; align-items: center; gap: var(--s-3); flex: 0 0 auto; }
.settings-rows { display: block; }
/* The subscription row before its first answer: its own height, empty. */
.settings-row-pending .field-row { min-height: 34px; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line-ghost);
}
.settings-row.tall { align-items: flex-start; flex-wrap: wrap; }
.settings-row.danger { border-bottom: none; margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--brass-rule); }
.settings-label { display: block; font-size: var(--t-15); color: var(--marble); }

/* Settings, pass two (the interactive board): a darker strip of tabs with a
   raised active tab, a serif title and lede over each pane, and a thin
   scrollbar that does not draw attention to itself. */
.settings-tabs { background: var(--sink); padding: var(--s-4) var(--s-3);
                 border-right-color: var(--line-faint); }
.settings-tab { padding: var(--s-2) var(--s-3); border-radius: var(--r); box-shadow: none; }
.settings-tab.on { background: var(--surface); color: var(--marble); box-shadow: inset 2px 0 0 var(--brass); }
.settings-pane { padding: var(--s-5) var(--s-5) var(--s-6);
                 scrollbar-width: thin; scrollbar-color: var(--line-raised) transparent; }
.settings-pane::-webkit-scrollbar { width: 6px; }
.settings-pane::-webkit-scrollbar-track { background: transparent; }
.settings-pane::-webkit-scrollbar-thumb { background: var(--line-raised); border-radius: var(--r); }
.settings-pane-title { margin: 0 0 var(--s-1); font-family: var(--serif); font-weight: 400;
                       font-size: var(--t-28); line-height: 1.15; color: var(--marble); }
.settings-pane-lede { margin: 0; font-family: var(--serif); font-size: var(--t-15); color: var(--marble-dim); }
.settings-pane-lede + .settings-sections > .settings-section:first-child { padding-top: var(--s-5); }

/* The calendar is the one connection that is live everywhere, so it gets
   a card: its icon on a raised tile, a brass dot when it is connected. */
.settings-card { display: flex; align-items: center; gap: var(--s-4);
                 padding: var(--s-4); margin-top: var(--s-2);
                 background: var(--sink); border-radius: var(--r); }
.settings-card > .settings-words { flex: 1 1 auto; max-width: none; }
.settings-card-icon { position: relative; flex: 0 0 auto; width: 48px; height: 48px;
                      display: inline-flex; align-items: center; justify-content: center;
                      background: var(--raised); border-radius: var(--r);
                      box-shadow: inset 0 0 0 1px var(--line), 0 6px 16px rgba(0, 0, 0, 0.35); }
.settings-card-icon img { display: block; }
.settings-card-dot { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px;
                     border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 3px var(--sink); }
.settings-soon { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
                 gap: var(--s-3) var(--s-5); padding-top: var(--s-2); }
.settings-soon-item { display: flex; flex-direction: column; gap: 2px;
                      padding-top: var(--s-3); border-top: 1px solid var(--line-ghost); }
.settings-soon-item .settings-label { color: var(--marble-dim); }
.settings-legal { margin: var(--s-6) 0 0; font-size: var(--t-12); color: var(--stone); }

/* A switch beside the time it governs: off greys the row and disables the
   time, so a time that will never be used does not look like a promise. */
.settings-switch { position: relative; flex: 0 0 auto; width: 36px; height: 20px; padding: 0;
                   border: none; border-radius: 10px; cursor: pointer;
                   background: var(--line); transition: background 0.16s; }
.settings-switch.on { background: var(--brass-dim); }
.settings-switch-knob { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px;
                        border-radius: 50%; background: var(--stone); transition: left 0.16s, background 0.16s; }
.settings-switch.on .settings-switch-knob { left: 19px; background: var(--bone); }
.settings-switch:focus-visible { outline: 1px solid var(--brass); outline-offset: 2px; }
.settings-switch-word { min-width: 3ch; }
.settings-row-off .settings-label { color: var(--stone); }
.settings-row-off .form-input { color: var(--stone); background: none; border-style: dashed; }

.settings-zone { width: 300px; }
.day-toggle-wide { white-space: nowrap; }
/* A time with its AM/PM and picker glyph needs more than the narrow field. */
.settings-row .form-input.narrow[type="time"] { width: 140px; }

/* Danger (ADR-0194): the one red, for an act that cannot be taken back or
   that hands somebody else the power to change things. Nothing else. */
.settings-scope { display: inline-flex; box-shadow: inset 0 0 0 1px var(--line);
                  border-radius: var(--r); overflow: hidden; }
.settings-scope-opt { border: none; background: none; height: 36px; padding: 0 var(--s-3);
                      font-family: var(--grotesque); font-size: var(--t-13); color: var(--stone);
                      cursor: pointer; white-space: nowrap; }
.settings-scope-opt + .settings-scope-opt { box-shadow: inset 1px 0 0 var(--line); }
.settings-scope-opt.on { color: var(--marble); background: var(--raised); }
.settings-scope-write.on { color: var(--danger); background: var(--danger-wash);
                           box-shadow: inset 0 0 0 1px var(--danger-rule); }
.settings-danger-note { margin: 0; font-size: var(--t-13); line-height: 1.45; color: var(--danger); }
.settings-section.settings-danger-zone { margin-top: var(--s-5); padding: var(--s-4) var(--s-4) var(--s-2);
                                         border: 1px solid var(--danger-rule); border-radius: var(--r);
                                         background: var(--danger-wash); }
.settings-danger-zone .settings-section-title { color: var(--danger); }
.settings-danger-zone .btn.ghost { border-color: var(--danger-rule); color: var(--danger); }

.arch-transcript { padding: 16px 16px; max-height: 46vh; overflow-y: auto; }
.arch-line { font-size: var(--t-15); line-height: 1.6; margin: 0 0 14px; max-width: 62ch; }
.arch-line.theirs { font-family: var(--serif); font-size: var(--t-17); color: var(--marble); }
.arch-line.mine { color: var(--marble-dim); padding-left: 16px; border-left: 1px solid var(--line-quiet); }
/* A turn takes seconds and the answer lands here, so the waiting does too —
   at the foot of the conversation rather than on a button at the other end of
   the panel. */
.arch-line.waiting {
  color: var(--stone-lit); font-style: italic;
  animation: archWait 1.6s ease-in-out infinite;
}
@keyframes archWait { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.arch-summary { font-family: var(--grotesque); font-size: var(--t-12); color: var(--brass); padding: 0 16px; margin: 0 0 6px; }

/* What the turn did, closed by default. The conversation's whole claim is
   that nothing reaches your goals until you agree, and this is the evidence
   for it — but it is evidence, not the reply, so it does not compete with
   the sentence above it. */
.arch-work { padding: 0 16px; margin: 0 0 10px; }
.arch-work summary {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone); cursor: pointer;
  padding: 4px 0; transition: color 0.16s;
}
.arch-work summary:hover { color: var(--brass); }
.arch-work[open] summary { color: var(--brass); }
.arch-thought {
  font-family: var(--serif); font-style: italic; font-size: var(--t-13);
  line-height: 1.5; color: var(--stone-lit); margin: 6px 0 0; max-width: 66ch;
}
.arch-calls { list-style: none; margin: 8px 0 0; padding: 0; }
.arch-calls li {
  font-size: var(--t-12); color: var(--marble-dim); padding: 4px 0 4px 12px;
  position: relative;
}
.arch-calls li::before {
  content: ""; position: absolute; left: 0; top: 10px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--brass-rule);
}
/* A refused call is information, not an error state — the guards turning one
   down is the protocol working. Stone, never red (the palette has none). */
.arch-calls li.failed { color: var(--stone); }
.arch-calls li.failed::before { background: none; box-shadow: inset 0 0 0 1px var(--stone-quiet); }
/* The same work, arriving (ADR-0032). No summary to open: it exists to be
   readable while there is nothing else to look at, and each round fades in as
   it lands so the pane reads as filling rather than jumping. */
.arch-live {
  margin: 0 0 18px; padding-left: 12px;
  border-left: 1px solid var(--line-quiet);
}
.arch-live .arch-calls li { animation: gateFade 0.4s ease both; }
/* The same control the day uses to hide its reasoning, in the same words. */
.arch-live .reason-toggle { margin-top: 10px; font-size: var(--t-12); }
.arch-live .reason-body {
  margin-top: 10px; padding-left: 12px; max-width: 66ch;
}
.arch-live .reason-body .arch-thought { margin-top: 10px; }
.arch-live .reason-body .arch-thought:first-child { margin-top: 0; }

.arch-preview { padding: 12px 16px; border-top: 1px solid var(--line-faint); }
.arch-foot { padding: 12px 16px 0; border-top: 1px solid var(--line-quiet); }
/* Room to say the whole thing. `rows` cannot win against `.tall`'s own
   min-height, and the answers this box is actually for — "the exam board sets
   that date, it cannot move, and everything before it has to fit" — are a
   paragraph, whatever the prompt above asks for. */
.arch-foot .form-input { min-height: 132px; line-height: 1.5; }
.arch-done { font-family: var(--serif); font-size: var(--t-17); color: var(--brass-bright); padding: 16px 16px; margin: 0; }

/* ——— the gate ——— */

/* The four motions the first pages use, and nothing else uses. They are
   deliberately short and all ease the same way: a page that arrives in
   several different rhythms reads as several different pages. Reduced motion
   turns every one of them off — see the media query at the foot of the file. */
@keyframes gateFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gateRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes gateWipe { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes gateDrop { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes gatePulse { 0%, 100% { opacity: 0.85; } 50% { opacity: 0.3; } }

.gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
  background: var(--sink);
  animation: gateFade 0.3s ease both;
}

.gate-claim {
  padding: 48px 48px;
  border-right: 1px solid var(--line-faint);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  background: radial-gradient(760px 460px at 18% 8%, var(--surface) 0%, var(--sink) 70%);
}
.gate-say { max-width: 34ch; }
.gate-statement {
  font-family: var(--serif); font-size: var(--t-40); line-height: 1.28;
  color: var(--bone); margin: 0; text-wrap: pretty;
}
.gate-wipe {
  display: block; width: 64px; height: 1px;
  background: var(--brass-rule); margin: 26px 0 20px;
  transform-origin: left;
  animation: gateWipe 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
}
.gate-aside {
  font-family: var(--serif); font-style: italic; font-size: var(--t-17);
  line-height: 1.55; color: var(--stone-lit); margin: 0; text-wrap: pretty;
}


.gate-form {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 64px;
}
.gate-form form {
  width: 100%; max-width: 400px;
  animation: gateRise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.gate-form .eyebrow { letter-spacing: 0.06em; margin: 0 0 12px; }
.gate-title {
  font-family: var(--serif); font-weight: 500; font-size: var(--t-28);
  line-height: 1.15; letter-spacing: -0.01em;
  margin: 0 0 30px; color: var(--bone);
}
/* The title carries the margin on the sign-in form, which has no lede. Where
   there is one, it takes over: two forms in the gate say what they are about
   to do before asking for anything, because "set a new password" and "sign
   out every device" are not the same promise. */
.gate-form .gate-title:has(+ .gate-lede) { margin-bottom: 12px; }
.gate-lede {
  font-family: var(--serif); font-size: var(--t-15); line-height: 1.5;
  color: var(--stone-lit); margin: 0 0 26px; max-width: 42ch;
}
.field { display: block; margin-bottom: 18px; }
.field .field-label { font-size: var(--t-12); color: var(--stone); margin: 0 0 8px; }
.gate-form .form-input { width: 100%; }
.gate-form .btn { width: 100%; justify-content: center; margin-top: 24px; }
/* The provider buttons, under the password form rather than above it: this
   deployment has always had passwords and the providers are an alternative,
   not a replacement (ADR-0052). */
.gate-providers { display: flex; flex-direction: column; gap: 8px; }
.gate-or {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone);
  text-align: center; margin: 20px 0 0;
}
.gate-form .btn.provider { width: 100%; justify-content: center; margin-top: 0; gap: 8px; }
/* Apple's own colours for Apple's button (their guidelines): bone with ink,
   the mark filled rather than stroked. */
.gate-form .btn.provider-apple {
  background: var(--bone); color: var(--ink); border-color: var(--bone);
}
.gate-form .btn.provider-apple:hover { background: var(--marble); border-color: var(--marble); }
.gate-form .btn.provider-apple .icon { fill: currentColor; stroke: none; }
.gate-help {
  font-size: var(--t-12); color: var(--stone); text-align: center; margin: 14px 0 0;
}
.gate-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 26px; padding-top: 16px;
  border-top: 1px solid var(--line-faint);
}
.hint.faint {
  font-size: var(--t-12); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--stone);
}

/* A word that acts. Not a .btn: these sit beside one and a second filled
   control would make the page ask two questions at once. */
.quiet-link {
  font-family: var(--grotesque); font-size: var(--t-15);
  border: none; background: none; padding: 0;
  cursor: pointer; color: var(--stone);
  transition: color 0.16s;
}
.quiet-link:hover:not(:disabled) { color: var(--brass); }
.quiet-link:disabled { cursor: default; }
.quiet-link.gold { color: var(--brass-bright); }
.quiet-link.mono {
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* ——— the first run ——— */

.setup {
  min-height: 100vh;
  background: var(--sink);
  color: var(--marble);
  animation: gateFade 0.3s ease both;
}

/* the handoff, and the week being built: one column, held in the middle */
.setup-mid {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 64px;
  background: radial-gradient(900px 520px at 50% 0%, var(--surface) 0%, var(--sink) 70%);
}
.setup-say { width: 100%; max-width: 620px; }
.setup-say.build { max-width: 540px; }
.setup-say .eyebrow { letter-spacing: 0.06em; margin: 0 0 16px; }
.setup-lead {
  font-family: var(--serif); font-size: var(--t-28); line-height: 1.32;
  color: var(--bone); margin: 0; text-wrap: pretty;
}
.setup-lead.small { font-size: var(--t-28); line-height: 1.25; margin-bottom: 34px; }
.setup-aside {
  font-family: var(--serif); font-style: italic; font-size: var(--t-17);
  line-height: 1.55; color: var(--stone-lit);
  margin: 22px 0 0; max-width: 52ch; text-wrap: pretty;
}
.setup-mid .actions { gap: 16px; margin-top: 34px; }
/* The generate-time answers on the empty day (W1). */
.gen-energy { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; }
.gen-note { max-width: 520px; margin-top: 12px; }
/* The build's live line (W7): a pulse that says working, words that say at
   what. Animated with opacity only — nothing here carries a control
   (ADR-0023 does not apply to a span nobody can press, but a layout shift
   under the buttons would move them mid-press). */
.gen-live { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.gen-pulse {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brass); animation: genPulse 1.2s ease-in-out infinite;
}
@keyframes genPulse {
  0%, 100% { opacity: 0.25; } 50% { opacity: 1; }
}
/* The starting-point menu (ADR-0068): each door is a button with the line
   that makes the choice legible under it. Doors stack full-width inside the
   actions row; the file door and the skip link flow on beneath them. */
.setup-menu { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.setup-door .setup-aside { margin: 8px 0 0; font-size: var(--t-15); }
.setup-say .eyebrow.fade { animation: gateFade 0.4s ease both; }
/* Each line arrives a beat after the one above it, so the page reads in the
   order it is meant to be read. The container itself does not move — the
   section already fades in, and two motions on one box read as a wobble. */
.steps .setup-lead { animation: gateRise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both; }
.steps .setup-aside { animation: gateRise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both; }
.steps .actions { animation: gateRise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.4s both; }

/* ——— the week being built ——— */

.build-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line-faint);
  opacity: 0.28;
  transition: opacity 0.4s ease;
}
.build-row.done, .build-row.live { opacity: 1; }
.build-dot {
  width: 9px; height: 9px; flex: none; display: block;
  background: none;
  box-shadow: inset 0 0 0 1px var(--line);
}
.build-row.done .build-dot { background: var(--brass); box-shadow: inset 0 0 0 1px var(--brass); }
.build-row.live .build-dot {
  box-shadow: inset 0 0 0 1px var(--brass-bright);
  animation: gatePulse 1.1s ease-in-out infinite;
}
.build-text {
  font-family: var(--serif); font-size: var(--t-17); line-height: 1.45;
  color: var(--stone);
}
.build-row.done .build-text, .build-row.live .build-text { color: var(--bone); }
.build-state {
  margin-left: auto;
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--stone);
  white-space: nowrap;
}
.build-bar { margin-top: 28px; height: 2px; background: var(--line-faint); }
.build-fill {
  display: block; height: 2px; width: 0;
  background: var(--brass);
  transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.setup-say.build .quiet-link { margin-top: 20px; }

/* ——— the conversation, and the year beside it ——— */

.setup-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
}

.convo {
  display: flex; flex-direction: column;
  min-width: 0; height: 100vh;
}
.convo-head {
  display: flex; align-items: baseline; gap: 16px;
  padding: 24px 48px 12px;
  border-bottom: 1px solid var(--line-faint);
}
.convo-head .hint {
  min-width: 0; flex: 0 1 auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.convo-head .quiet-link {
  margin-left: auto; flex: none;
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap;
}
.eyebrow.wide { letter-spacing: 0.06em; white-space: nowrap; }

.convo-thread {
  flex: 1; overflow-y: auto;
  padding: 32px 32px 24px 48px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-quiet) transparent;
  /* The top edge dissolves rather than cutting: a line half-clipped by a
     hard border reads as a rendering fault, not as scrolled-away text. */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, var(--ink) 26px);
  mask-image: linear-gradient(180deg, transparent 0, var(--ink) 26px);
}
.convo-thread::-webkit-scrollbar { width: 8px; }
.convo-thread::-webkit-scrollbar-track { background: transparent; }
.convo-thread::-webkit-scrollbar-thumb {
  background: var(--line-ghost); border: 2px solid var(--sink);
}
.convo-thread::-webkit-scrollbar-thumb:hover { background: var(--line); }

.said { margin: 0 0 26px; }
.said.theirs {
  font-family: var(--serif); font-size: var(--t-17); line-height: 1.5;
  color: var(--marble-dim); max-width: 54ch; text-wrap: pretty;
}
/* The line waiting for an answer is the loudest thing on the page, and the
   opening question is louder still — it is the only one asked into silence. */
.said.theirs.now { font-size: var(--t-21); color: var(--bone); }
.said.theirs.first.now { font-size: var(--t-28); max-width: 30ch; }
.said.mine { display: block; }
.said.mine .said-text {
  display: inline-block; max-width: 52ch;
  padding: 12px 16px; margin: 0;
  background: var(--line-ghost);
  box-shadow: inset 0 0 0 1px var(--line-quiet);
  font-family: var(--serif); font-size: var(--t-17); line-height: 1.5;
  color: var(--bone); text-wrap: pretty;
}

.rise { animation: gateRise 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rise-fast { animation: gateRise 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rise-slow { animation: gateRise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fade { animation: gateFade 0.3s ease both; }
.fade-late { animation: gateFade 0.5s ease 0.35s both; }

.thinking {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 26px;
}
.thinking-dot {
  width: 5px; height: 5px; display: block; background: var(--brass-dim);
  animation: gatePulse 1.1s ease-in-out infinite;
}

/* a goal reaching the year: the spine draws itself down as it lands */
.staged { position: relative; padding: 2px 0 32px 16px; }
.staged-spine {
  position: absolute; left: 0; top: 0; bottom: 30px; width: 2px;
  background: var(--brass);
  transform-origin: top;
  animation: gateDrop 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both;
}
.staged .eyebrow { margin: 0 0 10px; }
.staged-title {
  font-family: var(--serif); font-size: var(--t-21); line-height: 1.25;
  color: var(--bone); margin: 0;
}
/* what finishing it looks like: set beside the title, not among the facts,
   because it is the claim the title makes rather than one more detail. A
   single criterion reads as one line; several read as the list they are. */
.staged-criteria { margin: 9px 0 0; max-width: 52ch; }
.staged-criterion-key {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--brass); margin: 0 0 4px;
}
.staged-criterion-list { list-style: none; margin: 0; padding: 0; }
.staged-criterion-list li {
  font-family: var(--serif); font-size: var(--t-15); line-height: 1.45;
  color: var(--marble); padding-left: 12px; position: relative;
}
.staged-criterion-list li + li { margin-top: 3px; }
.staged-criterion-list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 5px; height: 5px; background: var(--brass-rule);
}
.staged-facts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.fact {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.04em;
  color: var(--marble-dim);
}
.fact-dot { width: 5px; height: 5px; display: block; flex: none; background: var(--stone); }
.fact.gold .fact-dot { background: var(--brass); }
.fact.bright .fact-dot { background: var(--brass-bright); }
.fact.rhythm .fact-dot { background: var(--cat-habit); }
.staged-line {
  font-family: var(--serif); font-style: italic; font-size: var(--t-15);
  line-height: 1.5; color: var(--stone-lit);
  margin: 12px 0 0; max-width: 52ch; text-wrap: pretty;
}
.staged.provisional .staged-spine { background: var(--brass-rule); }
.first-row { display: flex; gap: 12px; margin: 8px 0 0; align-items: baseline; }
.first-time {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.04em;
  color: var(--brass); white-space: nowrap; min-width: 11ch;
}
.first-task { font-family: var(--serif); font-size: var(--t-17); color: var(--marble); }

.convo-foot {
  padding: 16px 48px 24px;
  border-top: 1px solid var(--line-faint);
}
.replies { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.reply {
  border: none; padding: 8px 12px; cursor: pointer;
  font-family: var(--serif); font-size: var(--t-15);
  background: none; color: var(--marble-dim);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color 0.16s, box-shadow 0.16s;
}
.reply:hover { color: var(--bone); box-shadow: inset 0 0 0 1px var(--brass-rule); }
.convo-send { display: flex; align-items: flex-end; gap: 12px; }
.convo-send .form-input { flex: 1; resize: none; }
.convo-send .btn { padding: 12px 16px; }

.convo-year {
  height: 100vh;
  padding: 32px 48px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px;
  overflow: hidden;
}
.convo-year > .eyebrow { margin: 0; text-align: center; }

/* ——— the setup dial ——— */

.sclock { position: relative; width: 100%; max-width: 520px; }
.sclock-face { width: 100%; height: auto; display: block; overflow: visible; }
.sclock-months { position: absolute; inset: 0; pointer-events: none; }
.sclock-month {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--grotesque); font-size: 9.5px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--stone); white-space: nowrap;
}
.sclock-month.here { color: var(--brass-bright); }
.sclock-hub {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 60%; text-align: center; pointer-events: none;
}
.sclock-count {
  font-family: var(--serif); font-size: 24px; line-height: 1.2;
  color: var(--bone); margin: 0;
}
.sclock-sub {
  font-family: var(--grotesque); font-size: 9px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--stone); margin: 9px 0 0;
}
/* The detail reads in the hub, where the dial is already empty. Seating it
   outside needs a gutter the column does not have at every width, and
   seating it over the ring covers the very nodes being read. */
.sclock-card {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 39%; min-width: 150px; max-width: 196px;
  pointer-events: none; z-index: 5;
  background: var(--sink);
  box-shadow: inset 0 0 0 1px var(--line-faint), 0 12px 34px rgba(0, 0, 0, 0.6);
  padding: 12px 14px 13px;
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.sclock-card.leaving { opacity: 0; transform: translate(-50%, calc(-50% + 5px)); }
.sclock-card-rule { display: block; height: 1px; background: var(--brass-rule); margin: 0 0 9px; }
.sclock-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sclock-card-date {
  font-family: var(--grotesque); font-size: 13px; letter-spacing: 0.04em;
  color: var(--bone); line-height: 1.05;
}
.sclock-card-index {
  font-family: var(--grotesque); font-size: 8px; letter-spacing: 0.06em;
  color: var(--stone); white-space: nowrap;
}
.sclock-card-label {
  display: block; font-family: var(--serif); font-size: 16.5px;
  line-height: 1.2; color: var(--bone); margin-top: 7px; text-wrap: pretty;
}
.sclock-card-state {
  display: block; font-family: var(--grotesque); font-size: 8px;
  letter-spacing: 0.06em; text-transform: uppercase; margin-top: 9px;
}
/* On a goal's end node this carries its acceptance criteria, which are
   sentences rather than the one-line note it used to hold — a single
   ellipsised line cut the first one off mid-word. Three lines, then clamp. */
.sclock-card-note {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  font-family: var(--grotesque); font-size: 9px; line-height: 1.5;
  letter-spacing: 0.04em; color: var(--stone); margin-top: 4px;
  overflow: hidden;
}

/* ——— The week (ADR-0103, redrawn) ———
 *
 * Seven columns of what is on each day, under one line of why. The columns
 * arrive one after another (`dayIn`), which is the one flourish the design
 * spends here, and it is off under reduced motion. */

.week-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
             flex-wrap: wrap; }
.week-head-left { display: flex; align-items: baseline; gap: 16px; min-width: 0; flex-wrap: wrap; }
.week-title { font-family: var(--serif); font-size: var(--t-28); font-weight: 400; color: var(--bone);
              margin: 0; }
.week-kicker { font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
               text-transform: uppercase; color: var(--stone); }
.week-head .actions { margin: 0; }
.btn.small.on { color: var(--bone); border-color: var(--brass-rule); }

.week-why-block { display: flex; flex-direction: column; gap: 12px; padding: 12px 0 16px; }
.week-why-lead { display: flex; align-items: baseline; gap: 12px; }
.week-why-bar { width: 2px; height: 15px; background: var(--brass); flex: 0 0 2px; }
.week-why { color: var(--marble-dim); font-size: var(--t-12); line-height: 1.4; margin: 0;
            text-wrap: pretty; min-width: 0; }
.week-why.first { font-family: var(--serif); font-size: var(--t-15); color: var(--marble); flex: 1; }
.week-why.stale { color: var(--stone); font-style: italic; }
.week-why-toggle { background: none; border: none; padding: 0; font-family: var(--grotesque);
                   font-size: var(--t-12); letter-spacing: 0.06em; color: var(--brass); cursor: pointer;
                   white-space: nowrap; }
.week-why-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px;
                 padding-left: 16px; }
.week-why-row { display: flex; align-items: baseline; gap: 12px; padding: 8px 0;
                border-top: 1px solid var(--line-ghost); min-width: 0; }
.week-why-ink { width: 2px; align-self: stretch; background: var(--ink); flex: 0 0 2px; }
.week-why-where { font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone);
                  white-space: nowrap; text-transform: uppercase; }

.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
             border-top: 1px solid var(--brass-rule); }
@keyframes dayIn { from { opacity: 0; transform: translateY(-14px); }
                   to { opacity: 1; transform: translateY(0); } }
.week-day { display: flex; flex-direction: column; min-width: 0; min-height: 440px;
            border-right: 1px solid var(--line-ghost); }
/* `.arrive` is on the columns only the first time a week is drawn. */
.week-day.arrive { animation: dayIn 0.46s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.week-day.arrive:nth-child(1) { animation-delay: 60ms; }
.week-day.arrive:nth-child(2) { animation-delay: 112ms; }
.week-day.arrive:nth-child(3) { animation-delay: 164ms; }
.week-day.arrive:nth-child(4) { animation-delay: 216ms; }
.week-day.arrive:nth-child(5) { animation-delay: 268ms; }
.week-day.arrive:nth-child(6) { animation-delay: 320ms; }
.week-day.arrive:nth-child(7) { animation-delay: 372ms; }
/* Today is marked one way, everywhere: a brass rule across its top. */
.week-day.on { box-shadow: inset 0 2px 0 var(--brass); }
.week-day-head { padding: 12px 12px 12px; display: flex; align-items: baseline;
                 justify-content: space-between; gap: 8px; width: 100%; background: none;
                 border: none; text-align: left; font: inherit; color: inherit; }
button.week-day-head { cursor: pointer; }
button.week-day-head:hover .week-num { color: var(--bone); }
/* `.week-day-name` is the clickable element in the editor's header (a button
   for a past/today day), so it needs the same reset — without it the browser
   paints its default light button background and "WED" reads white-on-white. */
.week-day-name { display: flex; align-items: baseline; gap: 8px; min-width: 0;
                 background: none; border: none; padding: 0; text-align: left;
                 font: inherit; color: inherit; }
button.week-day-name { cursor: pointer; }
button.week-day-name:hover .week-num { color: var(--bone); }
.week-num { font-family: var(--grotesque); font-size: var(--t-21); color: var(--marble-dim); }
.week-date { font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
             text-transform: uppercase; color: var(--stone); white-space: nowrap; }
.week-day.past .week-num, .week-day.past .week-date { color: var(--stone); }
.week-day.on .week-num { color: var(--bone); }
.week-day.on .week-date { color: var(--marble-dim); }
.week-dot { width: 5px; height: 5px; border-radius: 99px; background: var(--brass-bright);
            flex: 0 0 auto; align-self: center; }
.week-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 0 12px 16px;
             min-width: 0; }
.week-intent { font-family: var(--serif); font-size: var(--t-13); color: var(--bone);
               line-height: 1.3; text-wrap: pretty; padding-bottom: 4px; }
.week-item { border-left: 2px solid var(--ink); padding: 2px 0 4px 8px; display: flex;
             flex-direction: column; gap: 4px; min-width: 0; }
/* The mark sits beside the text INSIDE the line; the item itself stacks its
   line, tags and (when selected) actions. A leftover `flex-direction: row` on
   `.week-item` from the read-only week laid the actions BESIDE the text and
   crushed it to one character per line (found by the first beta tester). */
.week-item-line { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.week-item-mark { font-family: var(--grotesque); font-size: var(--t-12); color: var(--brass);
                  flex: 0 0 auto; }
.week-item-high { border-left-color: var(--brass); }
.week-item-task { font-size: var(--t-12); line-height: 1.3; color: var(--marble); text-wrap: pretty;
                  overflow-wrap: anywhere; }
.week-state { color: var(--stone); font-size: var(--t-12); }
.week-day.off .week-state { color: var(--stone); font-style: italic; }
.week-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
             padding: 0 12px 12px; }
/* Effort is a readout of the day's blocks, not a set cap (ADR-0111). */
.week-effort { font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.08em;
               text-transform: uppercase; color: var(--stone); }
.week-effort.effort-normal { color: var(--marble-dim); }
.week-effort.effort-heavy { color: var(--brass); }

.week-amendments { margin: 26px 0 0; }
.week-amend { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto;
              gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-ghost); }
.week-amend-when { font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone); }
.week-amend-why { color: var(--bone); min-width: 0; }

.week-due { margin: 26px 0 0; }
.week-due-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto;
                gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-ghost); }
.week-due-date { font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone); }
.week-due-what { color: var(--bone); min-width: 0; }
.week-late { font-family: var(--grotesque); font-size: var(--t-12); text-transform: uppercase;
             letter-spacing: 0.06em; color: var(--brass); }

.week-shape, .week-feedback { margin: 18px 0 0; }
.week-headline { font-family: var(--serif); font-size: var(--t-21); color: var(--bone);
                 margin: 6px 0 8px; }
.week-talk { margin: 20px 0 0; }
.week-said { color: var(--marble-mid); margin: 6px 0; }
.week-heard { color: var(--stone); margin: 6px 0 14px; }
.week-heard.thinking { font-style: italic; }
.week-proposed { border-left: 2px solid var(--brass-dim); padding-left: 12px;
                 margin: 8px 0 16px; }
.week-ask { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line);
            border-radius: var(--r-sm); padding: 8px 12px; background: var(--sink); }
.week-ask:focus-within { border-color: var(--brass-rule); }
.week-ask-label { font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
                  color: var(--stone); flex: 0 0 auto; }
.week-ask-box { flex: 1; min-width: 0; background: none; border: none; padding: 4px 0;
                font: inherit; font-size: var(--t-12); color: var(--marble); outline: none; }
.week-ask-box::placeholder { color: var(--stone); }
.week-ask-send { background: none; border: none; padding: 0 2px; font-family: var(--grotesque);
                 font-size: var(--t-12); color: var(--brass); cursor: pointer; }
.week-ask-send:disabled { color: var(--stone); cursor: default; }
.week-chips { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.quiet-chip { background: none; border: 1px solid var(--line); border-radius: 99px;
              padding: 4px 12px; font-family: var(--grotesque); font-size: var(--t-12);
              color: var(--stone); cursor: pointer; transition: color 0.12s, border-color 0.12s; }
.quiet-chip:hover { border-color: var(--brass); color: var(--bone); }

@media (prefers-reduced-motion: reduce) {
  .week-day.arrive { animation: none; }
  .home-row, .home-cell, .home-arrow, .home-month { transition: none; }
}

/* ——— the goal inks ———
 *
 * Eight, assigned by the server (ADR-0145) — a goal's own, its habits wearing it: a goal
 * wears one ink on the month, the week and the legend because one place
 * decides it. All four are tokens the palette already has — the design's
 * quadruplet is brass, marble-dim, stone and brass-dim — so no colour enters
 * here, and the 12% fills are mixed from them rather than written down. */
.ink-0 { --ink: var(--brass); }
.ink-1 { --ink: var(--marble-dim); }
.ink-2 { --ink: var(--stone); }
.ink-3 { --ink: var(--brass-dim); }
/* Four more (ADR-0145: eight inks, a goal's own, its habits wear it) — the
 * category hues the palette already holds, so still no colour enters here. */
.ink-4 { --ink: var(--cat-habit); }
.ink-5 { --ink: var(--cat-leisure); }
.ink-6 { --ink: var(--cat-external); }
.ink-7 { --ink: var(--sage); }
/* A block that serves no goal is neutral, not the fourth goal's colour. */
.ink-none { --ink: var(--stone-dim); }
.swatch.fill { background: color-mix(in srgb, var(--ink) 14%, transparent);
               box-shadow: inset 0 0 0 1px var(--ink); }

/* ——— the band: your goals, and the months you have had ——— */

.home-band { display: flex; align-items: stretch; border-bottom: 1px solid var(--line-quiet);
            background: var(--ground); padding: 0 32px; }
.home-goals { display: flex; flex-direction: column; justify-content: center; gap: 4px;
             padding: 12px 16px 12px 0; margin-right: 20px; border: none;
             border-right: 1px solid var(--line-faint); background: none; cursor: pointer;
             text-align: left; min-width: 188px; font: inherit; color: inherit; }
.home-goals:hover { opacity: 0.82; }
.home-goals-line { font-family: var(--serif); font-size: var(--t-17); color: var(--marble); }
.home-goals-hint { font-size: var(--t-12); color: var(--brass); }
.home-goals.on .home-goals-hint { color: var(--stone); }
.home-months { flex: 1; display: flex; align-items: flex-end; gap: 4px; padding: 8px 0 8px;
              min-width: 0; overflow-x: auto; }
.home-month { flex: 0 1 84px; min-width: 44px; display: flex; flex-direction: column;
             align-items: center; gap: 4px; background: none; border: none; padding: 0;
             cursor: pointer; font: inherit; color: inherit; transition: opacity 0.16s; }
.home-month.done { opacity: 0.72; }
.home-month:hover, .home-month.on { opacity: 1; }
/* A month before the account existed: shown so the year reads as twelve,
   but nothing to open. Greyed, no pointer, and no hover lift. */
.home-month-off { opacity: 0.34; cursor: default; }
.home-month-off:hover { opacity: 0.34; }
/* Hours a month held, as a quiet column chart: the months read first, the
   bars second (ADR-0170). The current month is marked by its name, not by a
   brass slab louder than anything on the page. */
.home-bar-wrap { width: 100%; display: flex; align-items: flex-end; justify-content: center; height: 24px; }
.home-bar { width: 40%; display: block; border-radius: var(--r-sm); background: var(--stone-faint); }
.home-bar-now { background: var(--brass-dim); }
.home-bar-empty { background: var(--line-quiet); }
.home-mchip { display: flex; align-items: center; gap: 4px; padding: 2px 8px;
             border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px transparent; }
.home-month.on .home-mchip { background: var(--raised); box-shadow: inset 0 0 0 1px var(--brass-rule); }
.home-mname { font-family: var(--grotesque); font-size: var(--t-13); color: var(--stone); }
.home-month.done .home-mname { color: var(--stone); }
.home-month.on .home-mname { color: var(--bone); }
.home-mdone { display: flex; color: var(--stone); }

/* ——— the calendar (ADR-0104) ———
 *
 * A month is four cadence weeks from the signup day, so the rows are those
 * weeks and the column heads are whatever weekday the account's own week
 * starts on. The shape is the design's; the grid is the report's. */

.home-head { display: flex; align-items: flex-end; justify-content: space-between;
            gap: 16px; padding: 16px 32px 12px; }
.home-head-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.home-title-row { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.home-title { font-family: var(--serif); font-weight: 500; font-size: var(--t-28); line-height: 1;
             margin: 0; color: var(--bone); }
.home-review { display: flex; align-items: center; gap: 8px; }
.home-review .icon { color: var(--stone); }
.home-hint { font-size: var(--t-13); color: var(--stone); }
.home-start { padding: var(--s-2) var(--s-6) var(--s-5); }
.home-start .lede { margin-top: var(--s-2); }
.week-empty { margin: var(--s-4) 0 var(--s-5); }
.week-empty .lede { margin-top: var(--s-2); max-width: 60ch; }
.home-count { font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone);
             white-space: nowrap; }
.home-grid-head, .home-row { display: grid; grid-template-columns: 172px repeat(7, minmax(0, 1fr)); }
.home-grid-head { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-faint);
                 background: var(--surface); }
.home-grid-head span { padding: 8px 12px; font-family: var(--grotesque); font-size: var(--t-12);
                      letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone); }
.home-rows { display: flex; flex-direction: column; }
.home-row { border-bottom: 1px solid var(--line-ghost); min-height: 84px;
           transition: background 0.12s ease, opacity 0.16s ease; }
.home-row.current { min-height: 104px; }
.home-row.past { opacity: 0.78; }
.home-row.hot { background: var(--surface); opacity: 1; }
.home-gutter { display: flex; align-items: center; gap: 8px; padding: 4px 12px;
              border-right: 1px solid var(--line-faint); border-left: 3px solid var(--line-faint);
              min-width: 0; overflow: hidden; transition: background 0.12s ease; }
.home-row.current .home-gutter { background: var(--surface); border-left-color: var(--brass-rule); }
.home-row.hot .home-gutter { background: var(--line-raised); border-left-color: var(--brass); }
.home-week { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0;
            flex: 1; background: none; border: none; padding: 0; text-align: left;
            font: inherit; color: inherit; }
.home-wname { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.home-wnum { font-size: var(--t-15); color: var(--marble-dim); white-space: nowrap; }
.home-row.current .home-wnum { color: var(--marble); }
.home-row.hot .home-wnum { color: var(--bone); }
.home-cue { font-size: var(--t-12); color: var(--stone); white-space: nowrap; overflow: hidden;
           text-overflow: ellipsis; }
.home-row.hot .home-cue { color: var(--brass); }
.home-arrow { font-size: var(--t-15); color: var(--line); transition: transform 0.12s ease, color 0.12s; }
.home-row.hot .home-arrow { color: var(--brass); transform: translateX(3px); }
.home-report { display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
              width: 24px; height: 24px; border-radius: 99px; cursor: pointer;
              background: transparent; border: 1px solid var(--line); color: var(--stone);
              padding: 0; transition: background 0.12s ease, border-color 0.12s ease; }
.home-row.hot .home-report { background: var(--line-raised); border-color: var(--stone); color: var(--brass); }
.home-report:hover { border-color: var(--brass); }
/* A written edition to open: marked so it reads as "there is a report here",
   not just a control that might do nothing (B5). */
.home-report.on { border-color: var(--brass); color: var(--brass); }
/* Being written: present but not yet openable. */
.home-report.pending { cursor: default; color: var(--stone); opacity: 0.55; }
.home-cell { text-align: left; border: none; border-right: 1px solid var(--line-ghost);
            padding: 4px 8px; display: flex; flex-direction: column; justify-content: space-between;
            gap: 4px; min-width: 0; min-height: 0; overflow: hidden; font: inherit; color: inherit;
            background: transparent; box-shadow: inset 0 0 0 1px var(--line-ghost); cursor: pointer;
            transition: background 0.12s ease, opacity 0.16s ease; }
.home-cell.ahead { cursor: default; }
.home-cell.gone { opacity: 0.82; }
.home-row.hot .home-cell:not(.ahead) { background: var(--sink); }
.home-cell.today { box-shadow: inset 0 2px 0 var(--brass); }
.home-cell.hot { background: var(--raised) !important; box-shadow: inset 0 0 0 1px var(--brass); opacity: 1; }
.home-cell-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
/* A printed calendar's numerals (ADR-0170): the date is the cell's figure. */
.home-n { font-family: var(--serif); font-size: var(--t-21); line-height: 1; color: var(--marble-dim);
          font-variant-numeric: tabular-nums; }
.home-cell.gone .home-n { color: var(--stone); }
.home-cell.today .home-n { color: var(--brass); }
.home-cell.hot .home-n { color: var(--bone); }
.home-cell.ahead .home-n { color: var(--stone); }
.home-hrs { font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone); }
.home-cell.hot .home-hrs { color: var(--marble-dim); }
.home-meter { display: flex; flex: 0 0 6px; width: 100%; height: 6px; min-height: 6px;
             border-radius: var(--r-sm); overflow: hidden; background: var(--raised); }
.home-cell.gone .home-meter { background: var(--sink); }
.home-cell.ahead .home-meter { background: transparent; }
.home-seg { display: block; background: var(--ink); }
.home-cell.gone:not(.hot) .home-seg { background: color-mix(in srgb, var(--ink) 52%, var(--ground)); }
.home-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px;
            padding: 12px 32px; border-top: 1px solid var(--line-faint); background: var(--surface); }
.home-legend { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ——— pages that fill the window ———
   The calendar and the week were drawn at a fixed height, so on any screen
   taller than about 750px the bottom of the window was an empty floor (the
   owner's report). They take the window's height instead: the shell becomes a
   column while one of them is the view, and the room left over goes to the
   four week rows or the seven day columns. Each keeps its minimum, so a short
   window still scrolls. Not on a phone, whose layouts stack and scroll. */
@media (min-width: 701px) {
  .shell:has(> main > :is(#view-home, #view-week):not([hidden])) {
    display: flex; flex-direction: column;
  }
  /* No tour room below a page that fills the window. That room
     (body.tour-on #shell) is there so a control at the foot of a long page
     can scroll clear of the card; here it was 320px of empty floor under the
     calendar the moment the tour scrolled, which is the very thing this
     layout removed. The card is carried out of the way, or dodges. */
  body.tour-on .shell:has(> main > :is(#view-home, #view-week):not([hidden])) {
    padding-bottom: 0;
  }
  .shell:has(> main > :is(#view-home, #view-week):not([hidden])) > main {
    flex: 1 0 auto; display: flex; flex-direction: column;
  }
  :is(#view-home, #view-week):not([hidden]) { flex: 1 0 auto; display: flex; flex-direction: column; }
  #view-home > .cal { flex: 1 0 auto; display: flex; flex-direction: column; }
  #view-home .home-rows { flex: 1 0 auto; }
  #view-home .home-row { flex: 1 0 auto; }
  /* The week also takes the window's width, as the calendar does: seven
     columns squeezed into the middle third of a wide screen had room at
     both sides and none in the columns. */
  #view-week > .page.week { flex: 1 0 auto; display: flex; flex-direction: column;
                            width: 100%; max-width: none; box-sizing: border-box; }
  #view-week .week-cols { flex: 1 0 auto; display: flex; flex-direction: column; }
  #view-week .week-cols > .week-grid { flex: 1 0 auto; }
}
/* A tablet: seven columns need 760px and an 820px window less the page's
   32px sides left 756, so Tuesday sat behind a scrollbar. Narrower sides and
   a slightly smaller floor fit them down to a 768px window. And the masthead
   takes the phone's account button: at this width the path ran into Goals and
   the day's masthead ran off the screen. The address and Settings move into
   the account menu, as on a phone. */
@media (min-width: 561px) and (max-width: 1000px) {
  #view-week > .page.week { padding-left: var(--s-4); padding-right: var(--s-4); }
  #view-week .week-cols .week-grid { min-width: 700px;
                                     grid-template-columns: repeat(7, minmax(100px, 1fr)); }
}
@media (min-width: 561px) and (max-width: 1180px) {
  #settings-button, .masthead-rule, .masthead-tick, #account-email { display: none; }
  .menu-phone { display: block; }
  .account-initial { display: inline-flex; align-items: center; justify-content: center;
                     width: 32px; height: 32px; box-sizing: border-box; border-radius: 50%;
                     border: 1px solid var(--line); font-size: var(--t-13); color: var(--marble-dim);
                     letter-spacing: 0; }
  #account-button[aria-expanded="true"] .account-initial { border-color: var(--brass); color: var(--marble); }
  .menu-who.menu-phone { margin: 0; padding: var(--s-2) var(--s-4) var(--s-3);
                         font-size: var(--t-13); color: var(--stone); letter-spacing: 0;
                         text-transform: none; }
}
/* Tablets: the day's masthead (three crumbs and the day's stepper) is the
   widest one, and ran 43px off a 768px window; squeezed to fit, the stepper's
   date wrapped onto two lines against the last crumb. Narrower sides below
   860px, and the stepper takes a row of its own under the path, as it does on
   a phone. */
@media (min-width: 561px) and (max-width: 860px) {
  .masthead { padding: 0 var(--s-4); gap: 0 var(--s-4); }
  .masthead-left, .menu { gap: var(--s-3); }
}
/* Up to the compact masthead's edge (1180px; the full one needs about 1120
   on the day): at 861px the stepper's date still
   wrapped against the last crumb. */
@media (min-width: 561px) and (max-width: 1180px) {
  .masthead { height: auto; min-height: 62px; flex-wrap: wrap; }
  .masthead-left { margin-right: auto; min-height: 62px; }
  .masthead-right { display: contents; }
  #goals-button { order: 1; }
  .account { order: 2; }
  .datestrip { order: 3; width: 100%; height: 40px; padding: 0; justify-content: center;
               gap: var(--s-4); border-top: 1px solid var(--line-faint); }
  .datepick-label { white-space: nowrap; }
}

/* ——— narrow screens ——— */

@media (max-width: 1000px) {
  /* Twelve months do not fit beside the goals button; the strip scrolls in
     its own box and the page does not (a document that scrolls sideways is
     the phone tier's one hard rule). The grids scroll the same way. */
  .home-band { padding: 0 16px; }
  .home-goals { min-width: 150px; }
  .home-month { min-width: 40px; }
  .home-grid-head, .home-row { grid-template-columns: 132px repeat(7, minmax(56px, 1fr)); }
  #view-home, #view-month { overflow-x: auto; }
  .home-head, .home-foot { padding-left: 16px; padding-right: 16px; }
  .week-grid { grid-template-columns: repeat(7, minmax(120px, 1fr)); }
  #view-week { overflow-x: auto; }
  .week-why-more { grid-template-columns: minmax(0, 1fr); }
  .empty-head, .hero { flex-direction: column; gap: 24px; }
  .knows { flex: 1 1 auto; border-left: none; padding-left: 0; border-top: 1px solid var(--line-faint); padding-top: 16px; }
  .dial-stage, .blank-year, .settings-body { grid-template-columns: minmax(0, 1fr); }
  .gate { grid-template-columns: minmax(0, 1fr); }
  .gate-claim { border-right: none; border-bottom: 1px solid var(--line-faint); padding: 32px 24px; }
  .gate-form { padding: 32px 24px; }
  /* The year moves above the conversation rather than beside it, and stops
     being 100vh tall: two full-height panes stacked is two scroll traps. */
  .setup-split { grid-template-columns: minmax(0, 1fr); }
  .convo, .convo-year { height: auto; }
  .setup-split .convo-year { order: -1; padding: 24px 24px 16px; gap: 12px; border-bottom: 1px solid var(--line-faint); }
  .setup-split .sclock { max-width: 340px; }
  .convo-thread { max-height: 46vh; min-height: 180px; padding: 24px 24px; }
  .convo-head, .convo-foot { padding-left: 24px; padding-right: 24px; }
  .setup-mid { padding: 32px 24px; }
  .setup-lead { font-size: var(--t-28); }
  .settings-tabs { display: flex; border-right: none; border-bottom: 1px solid var(--line-quiet); overflow-x: auto; }
  .settings-tab { width: auto; white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; }
  .settings-tab.on { box-shadow: inset 0 -2px 0 var(--brass); background: none; }
  .settings-tabs { background: none; padding: 0 var(--s-4); }
  .settings-soon { grid-template-columns: minmax(0, 1fr); }
  .settings-card { flex-wrap: wrap; }
  .settings-zone { width: 100%; }

  /* The report's three-column rows are the only things on this page that
     cannot narrow: a proposal's actions have a floor and the mini track
     needs width to say anything. They stack rather than squeeze. */
  .two-up, .two-up.wide, .findings, .promise { grid-template-columns: minmax(0, 1fr); }
  .two-up, .two-up.wide { gap: 24px; }
  .proposal { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .promise-bars { display: none; }
  .pend-arrives { margin-left: 0; }
}

@media (max-width: 700px) {
  .masthead { height: auto; flex-wrap: wrap; gap: 8px; padding: 8px 16px; }
  /* The editor's four buttons took their full width and could not wrap, so
     the page grew to 533px and "Accept the day" went off the right edge —
     taking the bottom bar and the tour card with it. */
  .editor-head .actions { flex: 1 1 100%; min-width: 0; }
  .page, .year-page, .report { padding-left: 18px; padding-right: 18px; }
  .display { font-size: var(--t-40); }
  .mast-title, .mast-body.big .mast-title, .not-yet .mast-title { font-size: var(--t-40); }
  .streak, .gh-row { grid-template-columns: minmax(0, 1fr); }
  .streak .hint, .gh-row .hint, .cause .hint { text-align: left; }
  .mark { grid-template-columns: 19px minmax(0, 1fr); }
  .mark-state { grid-column: 2; }
}

/* A credential, shown once. Monospace because it will be copied into a
   config file, and wrapping because it is 50-odd characters in a narrow
   settings pane — a token clipped by overflow is a token half-copied. */
.token-value {
  display: block;
  font-family: var(--grotesque);
  font-size: var(--t-12);
  line-height: 1.5;
  color: var(--bone);
  background: var(--sink);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  margin: 10px 0 12px;
  word-break: break-all;
  user-select: all;
}
.token-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line-faint);
}
.token-name { flex: 1 1 auto; min-width: 0; color: var(--marble-mid); }

/* ---------------------------------------------------------------- phones
 *
 * The tier below the 700px one, which was the smallest until now: at 375px a
 * page laid out exactly as it did at 699px, and several of these rules are
 * about things that were simply never asked to fit (ADR-0096).
 *
 * Nothing here applies above 560px. The 700px and 1000px tiers are untouched,
 * so a desktop reader of this file can stop at the block above.
 */
@media (max-width: 560px) {
  /* Sign in first. The claim panel is the first row of a stacked gate, so on
     a phone the whole first screen was marketing and the form was below the
     fold — which is what "you can see the homepage before you log in" meant.
     `order` rather than a DOM change: the claim still reads first on a wide
     screen, where it sits beside the form rather than above it. */
  .gate-form { order: -1; }
  .gate-claim { padding: 24px 16px 32px; border-bottom: none; border-top: 1px solid var(--line-faint); }
  .gate-form { padding: 32px 16px 24px; }
  .gate-statement { font-size: var(--t-28); }

  /* One row at the top (the phone chrome board): the wordmark, Goals and
     the account button. Settings moves into the account menu, the address
     with it, and the day stepper takes a second row of its own on the one
     view that has it, above the day it steps. `display: contents` lets the
     two desktop groups hand their children to the masthead's own row. */
  .masthead { height: auto; min-height: 52px; flex-wrap: wrap; padding: 0 var(--s-4);
              gap: 0 var(--s-4); }
  .masthead-left, .masthead-right { display: contents; }
  .wordmark { order: 0; margin-right: auto; height: 52px; }
  .wordmark .mark { width: 28px; height: 28px; }
  .wordmark-text { font-size: var(--t-21); }
  #goals-button { order: 1; padding: var(--s-2) 0; font-size: var(--t-15);
                  letter-spacing: 0; text-transform: none; }
  #settings-button, .masthead-rule, .masthead-tick, #account-email { display: none; }
  .account { order: 2; padding-left: 0; }
  .account .chrome-button { padding: 0; }
  .account-initial { display: inline-flex; align-items: center; justify-content: center;
                     width: 32px; height: 32px; box-sizing: border-box; border-radius: 50%;
                     border: 1px solid var(--line); font-size: var(--t-13); color: var(--marble-dim);
                     letter-spacing: 0; }
  #account-button[aria-expanded="true"] .account-initial { border-color: var(--brass); color: var(--marble); }
  /* The phone chrome board's menu: 260 wide, clear of the edge, over a
     dimmed page. */
  .menu-pop { position: fixed; left: auto; right: var(--s-3); top: 60px;
              width: min(260px, calc(100vw - 24px)); padding: var(--s-2) 0;
              background: var(--surface); border: 1px solid var(--line);
              border-radius: var(--r); box-shadow: var(--shadow-modal); }
  .account:has(#account-menu:not([hidden]))::before {
    content: ""; position: fixed; inset: 52px 0 0 0; z-index: 19;
    background: var(--ground); opacity: 0.6; }
  .menu-phone { display: block; }
  .menu-who { margin: 0; padding: var(--s-2) var(--s-4) var(--s-3); font-size: var(--t-13);
              color: var(--stone); letter-spacing: 0; text-transform: none;
              border-bottom: 1px solid var(--line-faint); overflow-wrap: anywhere; }
  .menu-item { padding: var(--s-3) var(--s-4); font-size: var(--t-15); letter-spacing: 0;
               text-transform: none; }
  .datestrip { order: 3; width: 100%; height: 44px; padding: 0; justify-content: space-between;
               border-top: 1px solid var(--line-faint); }
  .stepper { width: 44px; height: 44px; }
  .datepick-label { white-space: nowrap; font-size: var(--t-17); letter-spacing: 0;
                    text-transform: none; color: var(--marble); }
  .datepick-dot { border-radius: 50%; width: 6px; height: 6px; background: var(--brass); }

  /* Thumb-reachable, and out of the way of a 62px masthead that now has two
     rows of its own. `position: fixed` inside the sticky masthead is safe
     because nothing between here and the root sets a transform, which would
     make it a containing block and drop the bar into the header. */
  .menu {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: auto;
    gap: 0;
    background: var(--chrome);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 8;
  }
  .tab {
    flex: 1 1 0;
    /* A flex item will not shrink below its own content width without this,
       whatever `flex-basis: 0` says. Four short labels happen to fit at
       390px — putting this back and running the phone suite still passes —
       so it is a rule against the next label, not a fix for this one. The
       failure it prevents is the one `test_every_tab_is_reachable_and_none_
       is_clipped` exists for, when "Reports" went off the right-hand edge. */
    min-width: 0;
    justify-content: center;
    height: 56px;
    flex-direction: column;
    gap: 2px;
    box-shadow: inset 0 2px 0 transparent;
  }
  .tab .tab-label { display: none; }
  .tab .tab-label.tab-also-name { display: block; font-size: var(--t-15); line-height: 1.2; font-weight: 400; }
  .tab .tab-name { display: block; font-size: var(--t-15); line-height: 1.2; font-weight: 400; }
  .tab .tab-when { display: block; font-size: var(--t-12); line-height: 1.2; font-weight: 400;
                   color: var(--stone); white-space: nowrap; font-variant-numeric: tabular-nums;
                   max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .tab[aria-current="page"] { box-shadow: inset 0 2px 0 var(--brass); }
  /* The first-run tour (ADR-0185) sits above that bar, full width, and never
     under the thumb. */
  .tour-host {
    left: var(--s-3); right: var(--s-3); width: auto; max-width: none;
    bottom: calc(56px + var(--s-3) + env(safe-area-inset-bottom, 0px));
  }
  .tour { padding: var(--s-3) var(--s-4) var(--s-4); }
  .tour-card { width: auto; }
  /* Settings is the whole screen on a phone and scrolls in its own pane, so
     the room the page keeps under the card has to be kept there too, or the
     pane's last section can never be scrolled clear of the card. */
  body.tour-on .settings-pane { padding-bottom: 360px; }
  .tour-cols { gap: var(--s-1); }
  .tour-label { letter-spacing: 0; }
  .tour-page-title { font-size: var(--t-21); margin-bottom: var(--s-2); }
  .tour-page-body { font-size: var(--t-13); margin-bottom: var(--s-3); }
  .tour-title { font-size: var(--t-17); }
  .tour-body { font-size: var(--t-13); }
  .tour-moves { gap: var(--s-4); }
  .tour-ended { left: var(--s-3); right: var(--s-3);
                bottom: calc(56px + var(--s-3) + env(safe-area-inset-bottom, 0px)); }
  /* Room for the bar, so the last row of any view is not under it. */
  main { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
  /* The chevrons are the desktop's; a bottom bar reads as a bar. */
  .tab.crumb::before { content: none; }

  .page, .year-page, .report { padding-left: 16px; padding-right: 16px; }

  /* Five columns do not fit a phone; the day becomes two rows. */
  .week-day { grid-template-columns: minmax(0, 1fr) auto auto;
              row-gap: 4px; padding: 12px; }
  .week-what { grid-column: 1; }
  .week-due-row { grid-template-columns: 74px minmax(0, 1fr); }

  /* A 168px date range plus three more columns is wider than a phone. The
     range keeps its own line and the rest wraps under it. */
  .home-row-when { grid-column: 1 / -1; }
  /* The calendar on a phone (the board): each week is a row you tap, over
     its seven days at equal width. The 172px gutter becomes the row's head,
     a day is its number and a bar, and the hours leave the cell. */
  #view-home, #view-month { overflow-x: visible; }
  .home-grid-head, .home-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .home-grid-head { gap: 4px; padding: var(--s-2) var(--s-4); }
  .home-grid-head span { padding: 0 0 0 4px; }
  .home-grid-head span:first-child { display: none; }
  .home-row, .home-row.current { min-height: 0; gap: 4px; padding: var(--s-3) var(--s-4); }
  .home-gutter, .home-row.current .home-gutter, .home-row.hot .home-gutter {
    grid-column: 1 / -1; padding: 0 0 var(--s-1); background: none; border-left: none; }
  .home-wname { flex-direction: row; align-items: baseline; gap: var(--s-2); }
  .home-cell { height: 44px; padding: 4px; border-right: none; border-radius: var(--r);
               background: var(--surface); display: flex; flex-direction: column;
               justify-content: space-between; }
  .home-hrs { display: none; }
  /* A ring that reaches the window's edge is held still, as the phone board
     draws it (the tour's "Four weeks at a glance"). */
  .tour-ring.tour-inset { animation: none; }
  /* The head (the phone chrome board): the range, then the count and Month
     review on one line, then the hint. The two wrappers hand their children
     to one grid so the order can be the board's. */
  .home-head { display: grid; grid-template-columns: minmax(0, 1fr) auto;
               grid-template-areas: "title title" "count review" "hint hint";
               align-items: baseline; gap: var(--s-1) var(--s-3); }
  .home-head-left, .home-title-row { display: contents; }
  .home-title { grid-area: title; white-space: nowrap; font-weight: 400; }
  .home-count { grid-area: count; font-size: var(--t-13); }
  .home-review { grid-area: review; white-space: nowrap; color: var(--brass); font-size: var(--t-13); }
  .home-review .icon { display: none; }
  .home-review::after { content: " →"; }
  .home-hint { grid-area: hint; margin-top: var(--s-1); line-height: 1.45; }
  /* The band: the goals line with its link on the right, and the last six
     months as names alone, right-aligned, the one on screen boxed. */
  .home-band { flex-direction: column; gap: var(--s-3); padding: var(--s-3) var(--s-4); }
  .home-goals { display: grid; grid-template-columns: minmax(0, 1fr) auto;
                grid-template-areas: "eyebrow eyebrow" "line hint"; align-items: end;
                min-width: 0; padding: 0; margin-right: 0; border-right: none; text-align: left; }
  .home-goals .eyebrow { grid-area: eyebrow; }
  .home-goals-line { grid-area: line; }
  .home-goals-hint { grid-area: hint; font-size: var(--t-13); white-space: nowrap; }
  .home-months { justify-content: flex-end; gap: var(--s-4); padding: 0; overflow: visible; }
  .home-month { flex: 0 0 auto; min-width: 0; }
  .home-month:not(:nth-last-child(-n+6)) { display: none; }
  .home-bar-wrap, .home-mdone { display: none; }
  .home-mchip { padding: 2px 6px; }
  .home-n { font-size: var(--t-15); }
  .home-meter { height: 3px; min-height: 3px; flex-basis: 3px; }
  .home-card { padding: 12px; }
  .home-date { width: 100%; }
  .home-pick { gap: 8px; }

  /* 16px + 124px + 66px + 96px + 210px and five gaps is a 562px minimum on a
     ~343px content box — the one rule guaranteed to overflow horizontally. */
  .led-head { display: none; }
  .led-grid { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 0; }

  /* The day on a phone (ADR-0170): with no hero above it the ledger is the
     first thing on the screen, and its desktop columns (a rail and a 116px
     gutter) left the tasks a word a line. One column of day, a narrow time
     gutter, and the reasoning without its desktop indent. */
  .band-track { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rail { display: none; }
  /* The report's archive stays off a phone, as it was while it borrowed
     `.rail`: eight month labels do not fit 343px. */
  .archive { display: none; }
  .row, .band-head, .band-blank { grid-template-columns: 56px minmax(0, 1fr); gap: var(--s-2); }
  .band-head, .band-body { padding-left: 0; padding-right: 0; }
  .row-why-inner { padding: var(--s-3); }
  .row-head { gap: var(--s-2); }
  .row-meta { display: none; }
  .blank-note { white-space: normal; }

  /* A modal on a phone is the screen, not a card floating on it. */
  .modal-veil { padding: 0; }
  .modal, .modal.panel-architect, .modal.panel-account, .modal.panel-settings {
    width: 100%; max-width: 100%; height: 100vh; max-height: 100vh;
    border-radius: 0; display: flex; flex-direction: column;
  }
  .modal.panel-milestone { margin-top: 0; padding: var(--s-5) var(--s-4); justify-content: center; }
  .milestone-later { margin-left: 0; flex-basis: 100%; text-align: left; padding: var(--s-2) 0; }
  /* The tab strip takes its own height and the pane takes the rest. Without
     the explicit rows, a grid stretched to a full-screen modal shares the
     height between them, which drew the selected tab as a 180px block. */
  .settings-body {
    min-height: 0; flex: 1 1 auto;
    grid-template-rows: auto minmax(0, 1fr); align-content: start;
  }
  .settings-tabs { flex: 0 0 auto; }
  .settings-pane { overflow-y: auto; }
  .settings-pane { min-height: 0; padding: 12px 16px 16px; }
  /* Both were positioned from the top with no bottom constraint, so their
     content ran off a short viewport with no way to reach it. */
  .sheet-host { padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
  .gapform {
    left: 12px; right: 12px; top: 12px; bottom: 12px;
    width: auto; max-width: none; transform: none;
    overflow-y: auto;
  }

  /* Read-only here. `.canvas` sets `touch-action: none` so it can drag blocks,
     which on a touch screen means a finger cannot scroll the day at all —
     every drag moves something. Until the editor has a gesture that tells
     dragging and scrolling apart, a phone gets the day and its tick boxes and
     not the canvas (ADR-0096). */
  .canvas-wrap { padding-left: 0; }
  .canvas { touch-action: pan-y; }

  /* Not fixed, just not overflowing: the dial is a 1260x830 stage scaled to
     fit, and at this width that is about 0.27 — every label under 3px. Goals
     is desktop-only for now and says so in the ADR. */
  .clock-fit { overflow-x: auto; }
}

/* A tap is not a hover, and a phone has no way to stop being one.
 *
 * All 59 `:hover` rules in this file apply unconditionally, so on a touch
 * screen the last thing tapped keeps its hover paint until something else is
 * tapped — which reads as a control stuck in a state nobody chose. Only the
 * controls where that is actually visible are reset here, back to their own
 * base values rather than to a guess.
 *
 * `(hover: none)` cannot match a mouse, so nothing in this block can reach
 * the desktop site. The remaining hover rules are cosmetic on touch and are
 * left for a later pass rather than mechanically rewritten now: moving all
 * fifty-nine into a media block would reorder the cascade, and that is a
 * change to desktop dressed up as a change to phones.
 */
@media (hover: none) {
  .editor-rules { display: none; }
  .tab:hover { color: var(--stone); }
  .chrome-button:hover { color: var(--stone); }
  .stepper:hover:not(:disabled) { color: var(--stone); }
  .gap:hover { color: var(--stone); }
  .rail-bar:hover { border-color: var(--line); }
  .tile:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--line); }
}

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

/* A report that has been answered is a document, so it prints as one. The
   reveal writes opacity and transform inline, and a section the printer never
   scrolled past would otherwise print blank. */
@media print {
  .masthead, .rail, .archive, .proposal-acts, .proposal-foot, .next-issue,
  .pend-foot, .write-call { display: none !important; }
  .report-mast, .rsection, .not-yet > div, .pend-block {
    opacity: 1 !important; transform: none !important;
  }
  .report { padding: 0; max-width: none; }
  .proposal { grid-template-columns: minmax(0, 1fr) 232px; }
}

/* A section that has nothing to report says so, in a quieter voice than one
   that does. */
.read.quiet { color: var(--stone); font-style: italic; }

/* ——— chores: what has to happen and is not a goal (ADR-0055) ——— */

.chores { margin-top: 34px; border-top: 1px solid var(--line-faint); padding-top: 16px; }
.chores-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.chore-list { list-style: none; margin: 0; padding: 0; }
.chore-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line-ghost);
  font-size: var(--t-15); color: var(--marble-mid);
}
.chore-row:last-child { border-bottom: 0; }
.chore-mark {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cat-chore); flex: none; transform: translateY(-2px);
}
.chore-label { flex: 1; }
.chore-mins, .chore-when {
  font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.chore-row.late .chore-when { color: var(--cat-chore); }
.chore-row.today .chore-when { color: var(--brass-bright); }
.chore-row.done { color: var(--stone); }
.chore-row.done .chore-label { text-decoration: line-through; }
.chore-row.done .chore-mark { background: var(--line-raised); }
/* Parked: quiet, and quiet in the same way `done` is. It is not struck
   through, because it is not finished — it is waiting, on purpose. */
/* The two questions nobody asked, in boxes, before the conversation
   (ADR-0061). */
.hours-row { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; }
.day-toggles { display: flex; gap: 4px; margin: 6px 0 4px; }
.day-toggle {
  background: none; cursor: pointer; padding: 4px 8px; border-radius: var(--r-sm);
  border: 1px solid var(--line); color: var(--stone);
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.08em;
  text-transform: uppercase;
}
.day-toggle:hover { color: var(--marble); }
.day-toggle.on {
  border-color: var(--brass); color: var(--brass-bright);
}

/* Standing hours nobody is available for — the rota, the protected window
   (ADR-0064). One line per window, above the row that adds one. */
.hours-off-list { display: grid; gap: 4px; margin: 4px 0 8px; }
.hours-off-list .field-row { align-items: baseline; gap: 8px; }

/* A job, a date and roughly how long — the fields that did not exist
   (ADR-0061). */
.job-form { display: grid; gap: 8px; padding: 8px 0 4px; }
.job-row { display: flex; gap: 8px; align-items: center; }
.job-row .form-input.narrow { flex: 0 0 auto; width: 140px; }
.chores-head .quiet-link { margin-left: auto; }

/* Arrived here from a block on the day, so the row says which one. */
.chore-row.seated { background: var(--line-ghost); }
.chore-row.parked { color: var(--stone); }
.chore-row.parked .chore-mark { background: var(--line-raised); }

/* A hero row the user has answered "didn't happen" on (ADR-0054). The ledger
   has always drawn one differently and the hero did not, so the button that
   says it looked dead. */
.hero-answered {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone); margin-top: 6px;
}
.btn.secondary.on { border-color: var(--brass); color: var(--brass-bright); }
.chore-pri {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--cat-chore);
  border: 1px solid var(--cat-chore); border-radius: var(--r-sm); padding: 1px 4px;
}
.chore-row.p-low { color: var(--stone); }
.chore-row.p-low .chore-mark { background: var(--line-raised); }
.chore-drop {
  background: none; border: 0; cursor: pointer; padding: 0 2px;
  font-family: var(--grotesque); font-size: var(--t-15); line-height: 1;
  color: var(--stone); opacity: 0; transition: opacity .15s ease;
}
.chore-row:hover .chore-drop, .chore-drop:focus-visible { opacity: 1; }
.chore-drop:hover { color: var(--marble); }
.arch-none {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone); margin-top: 6px;
}

/* ——— the legal footer (ADR-0073) ——— */
.gate-legal {
  display: flex; align-items: center; gap: 16px;
  margin-top: 26px; padding-top: 12px;
  border-top: 1px solid var(--line-faint);
}
.gate-legal a { text-decoration: none; }
.gate-copyright {
  margin-left: auto; font-family: var(--grotesque); font-size: var(--t-12);
  letter-spacing: 0.08em; color: var(--stone);
}
.terms-line { margin: 2px 0 0; }
.terms-line a { text-decoration: none; }

/* ——— The day talks back (ADR-0107) ——— */

/* What the week says today is for, drawn under the closing bar. The reasoning
   is the week's own words, quoted — dimmed when a premise it leaned on has
   moved, never hidden, because it still says what the week INTENDED. */
.day-week { margin: 22px 0 0; padding-top: 16px;
            border-top: 1px solid var(--line-faint); }
.day-week .aside-note { margin: 6px 0 0; }
.day-week .aside-note.stale { color: var(--stone); font-style: italic; }
.day-week .field-row { margin-top: 12px; align-items: baseline; }

/* One box. Which of the three things the words were is the server's call, so
   there is nothing here to choose between. */
.day-ask { margin: 22px 0 0; padding-top: 16px;
           border-top: 1px solid var(--line-faint); }
.day-ask .field-row { margin-top: 12px; }
.day-ask .week-said, .day-ask .week-heard { margin: 6px 0 0; }
.day-ask .week-proposed { margin-top: 14px; }

/* ——— the weekly editor (ADR-0113) ——— */
.week-status { color: var(--brass); margin: 8px 0 0; }
.week-note-row { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0 4px; }
.week-note-edit { flex: 1; min-width: 0; background: none; border: none; outline: none;
                  resize: none; overflow: hidden; font-family: var(--serif); font-size: var(--t-17);
                  line-height: 1.45; color: var(--marble); padding: 0 0 4px;
                  box-shadow: inset 0 -1px 0 transparent; }
.week-note-edit:focus { box-shadow: inset 0 -1px 0 var(--brass-rule); }
.week-note-edit::placeholder { color: var(--stone); }

/* Seven columns that scroll sideways rather than crushing on a narrow screen. */
.week-cols { overflow-x: auto; margin-top: 18px; }
.week-cols .week-grid { min-width: 760px; }
.week-day.drop { background: var(--raised); box-shadow: inset 0 0 0 1px var(--brass-rule); }

.week-day-head { justify-content: space-between; }
.week-day-tools { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.week-day-tool { width: 22px; height: 22px; display: inline-flex; align-items: center;
                 justify-content: center; border: none; background: none; padding: 0;
                 cursor: pointer; color: var(--stone); }
.week-day-tool:hover { color: var(--brass); }

.week-intent-input { width: 100%; background: none; border: none; outline: none; resize: none;
                     overflow: hidden; font-family: var(--serif); font-size: var(--t-13);
                     line-height: 1.3; color: var(--bone); padding: 0 0 4px;
                     box-shadow: inset 0 -1px 0 transparent; }
.week-intent-input:focus { box-shadow: inset 0 -1px 0 var(--brass-rule); }
.week-intent-input::placeholder { color: var(--stone); }

/* The editor is a manipulation surface, so a press-drag never begins a text
   selection (which used to highlight the whole page); the reply, reasoning and
   fields re-enable selection below. */
.page.week { -webkit-user-select: none; user-select: none; }
/* Reading text and the composer stay selectable; the fields INSIDE the drag
   grid (a day's intent, a block's inline edit) do not — they are still typed
   into, but mouse-selecting them was picking up the gold selection highlight
   and rendering the day's intent unreadable. */
.week-note-edit, .chat-input, .chat-text, .chat-mine, .week-why,
.week-log-what, .week-amend-why, .hint {
  -webkit-user-select: text; user-select: text; }

/* A block is grabbable and selectable now, not just a label. */
.week-item { cursor: grab; touch-action: none; }
.week-item:focus { outline: none; }
.week-item.sel { box-shadow: inset 0 0 0 1px var(--brass-rule); background: var(--sink); }
/* While lifted, the block is out of the way of the drop test, so the column
   beneath the cursor is found even when the block was sitting on top of it. */
.week-item.drag { opacity: 0.4; pointer-events: none; }
.week-item-line { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.week-item-tags { display: flex; gap: 8px; margin-top: 3px; }
.week-tag { font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
            text-transform: uppercase; color: var(--brass); }

.week-blk-actions { display: flex; align-items: center; gap: 0; margin-top: 3px; }
.week-blk-btn { width: 22px; height: 22px; display: inline-flex; align-items: center;
                justify-content: center; border: none; background: none; padding: 0;
                cursor: pointer; color: var(--stone); }
.week-blk-btn:hover { color: var(--bone); }
.week-blk-btn:disabled { color: var(--stone); cursor: default; }
.week-blk-glyph { font-family: var(--grotesque); font-size: var(--t-12); }
.week-blk-edit-row { display: flex; align-items: center; gap: 4px; }
.week-blk-edit { flex: 1; min-width: 0; background: var(--ground); color: var(--marble);
                 border: none; box-shadow: inset 0 0 0 1px var(--brass-rule); padding: 4px 8px;
                 font-family: var(--grotesque); font-size: var(--t-12); outline: none; }
.week-blk-done { border: none; background: var(--brass); color: var(--on-brass);
                 font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
                 text-transform: uppercase; padding: 4px 8px; cursor: pointer; }
.week-add { display: flex; flex-direction: column; gap: 4px;
            box-shadow: inset 0 0 0 1px var(--brass-rule); padding: 8px; }
.week-add-actions { display: flex; gap: 4px; }
.week-add-cancel { border: none; background: none; color: var(--stone); font-family: var(--grotesque);
                   font-size: var(--t-12); letter-spacing: 0.06em; text-transform: uppercase;
                   padding: 4px 4px; cursor: pointer; }
.week-add-btn { display: flex; align-items: center; gap: 8px; border: none; background: none;
                padding: 4px 0; cursor: pointer; color: var(--stone);
                font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
                text-transform: uppercase; }
.week-add-btn:hover { color: var(--brass); }

.week-ghost { position: fixed; z-index: 30; pointer-events: none; border-left: 2px solid var(--brass);
              background: var(--surface); box-shadow: 0 22px 48px var(--ink),
              inset 0 0 0 1px var(--brass-dim); padding: 8px 12px; max-width: 260px;
              font-size: var(--t-13); color: var(--bone); }

.week-lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
              gap: 48px; margin: 30px 0 0; }
.week-log-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px;
                align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line-ghost); }
.week-log-by { font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
               text-transform: uppercase; color: var(--stone); }
.week-log-what { color: var(--marble-dim); font-size: var(--t-13); min-width: 0; }
.week-help { margin: 30px 0 0; padding-top: 16px; border-top: 1px solid var(--line-faint); }

@media (max-width: 720px) {
  .week-lower { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
.week-talk-prompts { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 0 12px; }
.week-grid-ro .week-item { cursor: default; }
/* While any block is being dragged, nothing on the page is selectable — the
   one rule strong enough to beat the fields that re-enable selection. */
.wk-drag, .wk-drag * { -webkit-user-select: none !important; user-select: none !important; }
.wk-drag, .wk-drag * { cursor: grabbing !important; }
/* A past day is a record: its body is clearly faded so it reads as behind,
   and its blocks are not grabbable. */
.week-day.past .week-body { opacity: 0.5; }
.week-day.past .week-intent { color: var(--stone); }
.week-item.ro { cursor: default; }
/* Accept-the-week: a visible saving state, then a plain confirmation. */
.week-saving { display: flex; align-items: center; gap: 12px; margin-top: 22px;
               padding-top: 16px; border-top: 1px solid var(--line-quiet); }
.week-taken { text-align: center; }
.week-taken-mark { display: inline-flex; align-items: center; justify-content: center;
                   width: 44px; height: 44px; border-radius: 99px; margin: 0 auto 6px;
                   color: var(--on-brass); background: var(--brass); }
.week-taken .modal-actions { justify-content: center; }
/* Saved / unsaved state, and a Propose button that is dead without words. */
.week-unsaved { font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
                text-transform: uppercase; color: var(--on-brass); background: var(--brass);
                padding: 2px 8px; border-radius: var(--r-sm); }
.week-savedtag { font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
                 text-transform: uppercase; color: var(--stone); }
.chat-propose:disabled { color: var(--stone); box-shadow: inset 0 0 0 1px var(--line);
                         cursor: default; }
/* The report loading screen: a plain centered spinner (ADR-0082 waiting state). */
.report-loading { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.report-loading-line { max-width: 60ch; }
.report-spinner { width: 34px; height: 34px; border-radius: 50%;
                  border: 3px solid var(--line); border-top-color: var(--brass);
                  animation: reportSpin 0.85s linear infinite; }
@keyframes reportSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .report-spinner { animation: none; border-top-color: var(--brass); opacity: 0.7; }
}

/* ——— the hours Sereo never touches (docs/onboarding/never-hours-design.md) ———
   A 24-hour strip that is a picture of the rows under it, never a second
   editor: blocked is a faded hatch, open is the solid ground, and a gold
   brace names the open span. */
.never-editor { display: grid; gap: var(--s-2); margin: 14px 0 6px; max-width: 640px; }
/* The open time is the strip's solid filled ground — the substantial space a
   day is scheduled into. Blocked time is drawn over it as a faded cross-hatch,
   muted and clearly off. */
.never-strip {
  position: relative; height: 46px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--sink); overflow: hidden;
}
.never-span {
  position: absolute; top: 0; bottom: 0;
  background-color: var(--surface);
  background-image: repeating-linear-gradient(45deg,
    var(--line-quiet) 0, var(--line-quiet) 1px, transparent 1px, transparent 6px);
}
.never-span {
  display: flex; align-items: flex-start; padding: 3px 6px; box-sizing: border-box;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  color: var(--stone); white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
}
/* Some-days blocks keep a dashed outline so they read as conditional. */
.never-span.some { border: 1px dashed var(--line-quiet); }
/* A midnight-wrapping range is one band across the two edges: the seam sides
   carry no border so the right-edge and left-edge pieces read as continuous. */
.never-span.wrap-end { border-right: 0; }
.never-span.wrap-start { border-left: 0; }
.never-tick {
  position: absolute; bottom: 2px; z-index: 1; padding-left: 3px;
  font-family: var(--grotesque); font-size: var(--t-12); color: var(--stone-dim);
  border-left: 1px solid var(--line-faint);
}
/* The gold brace over the widest open span, and the sentence that names it. */
.never-brace-layer { position: relative; height: 30px; }
.never-brace-hold {
  position: absolute; bottom: 0; display: flex; flex-direction: column;
  align-items: center; gap: 2px; box-sizing: border-box;
}
.never-brace { display: block; width: 100%; height: 11px; overflow: visible; }
.never-brace path {
  fill: none; stroke: var(--brass-bright); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.never-brace-label {
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.04em;
  color: var(--brass); white-space: nowrap;
}
.never-key { display: flex; gap: var(--s-3); font-family: var(--grotesque);
             font-size: var(--t-12); letter-spacing: 0.08em; text-transform: uppercase;
             color: var(--stone); }
.never-key span::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px;
  vertical-align: -1px; border: 1px solid var(--line); border-radius: 2px;
}
.never-key-never::before {
  background-color: var(--surface);
  background-image: repeating-linear-gradient(45deg,
    var(--line-quiet) 0, var(--line-quiet) 1px, transparent 1px, transparent 3px);
}
.never-key-open::before { background: var(--sink); }
.never-rows { display: grid; gap: 6px; }
.never-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.never-row + .never-row { padding-top: 6px; border-top: 1px solid var(--line-faint); }
.never-row .day-toggles { margin: 0; flex-wrap: wrap; }
.never-word { font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.08em;
              text-transform: uppercase; color: var(--brass); }
.never-label { width: 17ch; min-width: 0; }
.never-time { width: auto; }
.never-arrow { color: var(--stone); }
.never-add { justify-self: start; }
.never-suggestion { margin: 4px 0 0; color: var(--brass); }
.never-field { display: grid; gap: var(--s-2); min-width: 0; }
.never-field > .btn { justify-self: start; }
.settings-row.never-section { display: grid; grid-template-columns: minmax(0, 1fr);
                              align-items: start; gap: var(--s-3); }
.never-section .never-editor { max-width: none; }
.plans-between { margin: 0 0 var(--s-2); font-size: var(--t-12); color: var(--stone); }
.band.band-never .blank-note { color: var(--stone-dim); font-style: italic; }
@media (max-width: 640px) {
  .never-label { flex: 1 1 100%; width: auto; }
  .never-strip { height: 42px; }
}

/* ——— the one chat (ADR-0192) ———
   Every agent conversation is drawn from these: the first run, both Goals
   panels, the day and week editors, the report proposal and the day's ask.
   A reply is one message under the brass rule, its record heads it, a
   decision is a card in the thread, and the composer only ever sends. */

/* Spacing between turns is the thread's, not the items': the work record
   sits close above the reply it belongs to. */
.chat-thread { gap: 0; }
.chat-thread > .hint { margin: 0 0 var(--s-6); }
.talk-msg, .talk-offer, .talk-offer-done, .talk-offer-closed,
.chat-thread > .chat-mine, .convo-thread > .said.mine { margin: 0 0 var(--s-6); }
.talk-work { margin: 0 0 var(--s-3); }
.talk-work .arch-work, .talk-work .arch-none,
.chat-thread .talk-work .arch-work, .chat-thread .talk-work .arch-none { margin: 0; padding: 0; }

.talk-msg .chat-text, .talk-msg .said.theirs {
  margin: 0 0 var(--s-3); max-width: 54ch;
  font-family: var(--serif); font-size: var(--t-17); line-height: 1.55;
  color: var(--marble-dim); text-wrap: pretty; white-space: pre-line;
}
.talk-msg .chat-text:last-child, .talk-msg .said.theirs:last-child { margin-bottom: 0; }
.talk-msg.latest .chat-text, .talk-msg.latest .said.theirs { color: var(--bone); }

/* The person's words: indented from the left, in a quiet well. No stripe —
   the system groups with space and a hairline. */
.chat-mine {
  margin-left: var(--s-8); padding: var(--s-3) var(--s-4); border-left: none;
  background: var(--line-ghost); box-shadow: inset 0 0 0 1px var(--line-quiet);
}
.chat-mine p {
  font-family: var(--serif); font-size: var(--t-17); line-height: 1.5;
  color: var(--bone);
}
.convo-thread > .said.mine { padding-left: var(--s-8); }

/* Only an arrival moves, once (chat.js `arrival`). */
.talk-arrive { animation: gateRise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.talk-arrive-1 { animation-delay: 0.45s; }
.talk-arrive-2 { animation-delay: 0.9s; }
.talk-arrive-3 { animation-delay: 1.35s; }
.staged-spine { animation: none; }
.staged.talk-arrive .staged-spine { animation: gateDrop 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
.staged.talk-arrive-1 .staged-spine { animation-delay: 0.6s; }
.staged.talk-arrive-2 .staged-spine { animation-delay: 1.05s; }

/* A decision. On the page ground in the first run, on the modal's ground in
   a panel, so it reads as a sheet laid on the conversation. */
.talk-offer {
  max-width: 60ch; padding: var(--s-5); border-radius: var(--r-sm);
  background: var(--surface);
}
.chat-thread .talk-offer, .chat-thread .talk-offer-done { max-width: none; background: var(--ground); }
.talk-offer .eyebrow { margin: 0 0 var(--s-2); }
.talk-offer-title {
  margin: 0 0 var(--s-4); font-family: var(--serif); font-size: var(--t-21);
  line-height: 1.25; color: var(--bone);
}
.talk-offer-list { list-style: none; margin: 0; padding: 0; }
.talk-offer-list li {
  display: flex; flex-direction: column; gap: var(--s-1);
  padding: var(--s-3) 0; border-top: 1px solid var(--line-quiet);
}
.talk-offer-list li:last-child { border-bottom: 1px solid var(--line-quiet); }
.talk-offer-name { font-family: var(--serif); font-size: var(--t-17); color: var(--marble); }
.talk-offer-meta { font-size: var(--t-13); color: var(--stone); font-variant-numeric: tabular-nums; }
.talk-offer-note { margin: var(--s-4) 0; font-size: var(--t-13); line-height: 1.5; color: var(--stone); max-width: 58ch; }
.talk-offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.talk-offer-done {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4);
  max-width: 60ch; padding: var(--s-4) var(--s-5); border-radius: var(--r-sm);
  background: var(--surface);
}
.talk-offer-mark { font-size: var(--t-13); color: var(--sage); }
.talk-offer-closed { font-size: var(--t-13); color: var(--stone); }

/* The composer: a field that grows, over a bar with the hint and send. */
.talk-compose {
  display: flex; flex-direction: column; gap: var(--s-1);
  width: 100%; box-sizing: border-box;
  padding: var(--s-4) var(--s-3) var(--s-3) var(--s-5);
  background: var(--sink); border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--line-quiet);
  transition: box-shadow 0.15s ease; cursor: text;
}
.talk-compose:focus-within { box-shadow: inset 0 0 0 1px var(--brass-dim); }
.talk-compose .talk-compose-input {
  display: block; flex: none; width: 100%; box-sizing: border-box;
  height: auto; min-height: 1.55em; max-height: calc(1.55em * 10);
  margin: 0; padding: 0 var(--s-2) 0 0; resize: none;
  border: none; outline: none; background: none;
  font-family: var(--serif); font-size: var(--t-17); line-height: 1.55;
  color: var(--bone); field-sizing: content; overflow-y: hidden;
}
.talk-compose .talk-compose-input.talk-compose-tall {
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-quiet) transparent;
}
.talk-compose .talk-compose-input::placeholder { color: var(--stone); }
.talk-compose .talk-compose-input:disabled { cursor: default; }
.talk-compose-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); min-height: 32px;
}
.talk-compose-hint { font-size: var(--t-12); color: var(--stone); }
.talk-send {
  flex: none; width: 32px; height: 32px; display: inline-flex;
  align-items: center; justify-content: center; border: none;
  border-radius: var(--r-sm); background: var(--line-ghost); color: var(--stone);
  box-shadow: none; cursor: default; transition: background 0.15s ease, color 0.15s ease;
}
.talk-send.live { background: var(--brass); color: var(--on-brass); cursor: pointer; }
.talk-send:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 2px; }
/* In a panel the composer sits in the panel's foot. */
.talk-foot { padding: var(--s-3) var(--s-6) var(--s-5); border-top: 1px solid var(--line-faint); }
.talk-foot .week-talk-prompts { padding: 0 0 var(--s-3); }
.talk-foot .notice, .talk-foot .hint { margin: 0 0 var(--s-3); }

@media (prefers-reduced-motion: reduce) {
  .talk-arrive, .staged.talk-arrive .staged-spine { animation: none; }
}
.convo-foot .convo-skip { display: block; margin-top: var(--s-3); }
.talk-foot .talk-discard { display: block; margin-top: var(--s-3); }
/* The day's ask box: in the schedule's own column, and pinned to the bottom
   of the window while the day is being reshaped (the owner's call). It used to
   sit outside the column, flush against both edges of the window, below a
   timeline that runs to midnight, where nobody found it without scrolling the
   whole day. Sticky in the Today view, so it rides the window's bottom edge
   until the end of the day comes up to meet it; the conversation scrolls
   inside it, so a long one never covers the schedule. Drawn like Settings'
   save bar: the surface, a hairline above. */
.day-ask-page {
  position: sticky; bottom: 0; z-index: 5;
  padding-top: var(--s-3); padding-bottom: var(--s-4);
  background: var(--ground); border-top: 1px solid var(--line);
}
.day-ask-page .day-ask { margin: 0; padding: 0; border-top: none; }
.day-ask-thread { margin: 0 0 var(--s-3); max-height: 38vh; overflow-y: auto;
                  scrollbar-width: thin; scrollbar-color: var(--line-quiet) transparent; }
.day-ask-thread:empty { display: none; }
/* On a phone, above the tab bar, which is fixed to the same edge. After the
   rule above on purpose: in the phone block earlier in the file it lost to it
   and the bar sat under the tabs. */
@media (max-width: 560px) {
  .day-ask-page { bottom: calc(56px + env(safe-area-inset-bottom, 0px));
                  padding-left: var(--s-4); padding-right: var(--s-4); }
}
.day-ask-thread .chat-mine { margin-bottom: var(--s-5); }
.day-ask-thread .talk-msg, .day-ask-thread .talk-offer,
.day-ask-thread .talk-offer-done { margin-bottom: var(--s-5); }
.day-ask-thread > .hint { margin: 0 0 var(--s-3); }

/* ——— the first run: a trace, then a reply (ADR-0197) ———
   One response under one brass rule: the work in quiet type, then the reply.
   The person's words on the right. A question waiting on them is a sheet over
   the composer that folds in place; the plan is the one card with weight. */
.tr-turn { margin: 0 0 var(--s-6); }
.tr-turn > .chat-rule { margin-bottom: var(--s-3); }
.tr { margin: 0 0 var(--s-4); display: flex; flex-direction: column; gap: var(--s-1); max-width: 60ch; }
.tr-think {
  margin: 0; font-family: var(--serif); font-style: italic; font-size: var(--t-13);
  line-height: 1.55; color: var(--stone); transition: color 0.6s ease;
}
.tr-live .tr-think { color: var(--stone-lit); }
.tr-fact, .tr-change {
  margin: 0; font-size: var(--t-12); line-height: 1.5; letter-spacing: 0.02em; color: var(--stone);
}
.tr-change { margin-top: 2px; }
.tr-pending { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-13); color: var(--stone); }
.tr-pending .thinking-dot { display: inline-block; }
.tr-more {
  align-self: flex-start; margin: 0; padding: 0; border: none; background: none; cursor: pointer;
  font-family: var(--grotesque); font-size: var(--t-12); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--stone);
}
.tr-more:hover { color: var(--marble); }
.tr-more:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 2px; }
.tr-reply .said.theirs { margin: 0 0 var(--s-3); font-size: var(--t-17); color: var(--marble-dim); max-width: 54ch; }
.tr-reply .said.theirs:last-child { margin-bottom: 0; }
.tr-reply.tr-latest .said.theirs { color: var(--bone); }
.convo-thread > .said.mine.tr-mine { display: flex; justify-content: flex-end; padding-left: 0; margin: 0 0 var(--s-6); }
.said.mine.tr-mine .said-text {
  max-width: 44ch; padding: var(--s-3) var(--s-4); background: var(--raised);
  box-shadow: none; border-radius: var(--r-sm); color: var(--bone);
}

/* sources, as chips; the page an answer came from stands out */
.tr-src { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s-2); margin: 2px 0; }
.tr-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tr-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; box-sizing: border-box;
  padding: 0 var(--s-2) 0 var(--s-1); border-radius: var(--r-sm); background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line-raised); font-family: var(--grotesque);
  font-style: normal; font-size: var(--t-12); letter-spacing: 0.02em; line-height: 1;
  color: var(--marble-dim); text-decoration: none; white-space: nowrap;
  transition: box-shadow 0.16s, color 0.16s;
}
.tr-chip:hover { color: var(--bone); box-shadow: inset 0 0 0 1px var(--brass-edge); }
.tr-chip:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 2px; }
.tr-fav {
  width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); background: var(--line); font-size: var(--t-12); font-weight: 600;
  line-height: 1; color: var(--bone);
}
.tr-chip-found { color: var(--bone); box-shadow: inset 0 0 0 1px var(--brass-dim); }
.tr-chip-found .tr-fav { background: var(--brass); color: var(--on-brass); }
.tr-think .tr-chip { margin: 0 2px; vertical-align: middle; transform: translateY(-1px); }
.tr-new { animation: gateRise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* while a question is open, the history steps back and the reply that asked stays lit */
.convo-thread .tr, .convo-thread .tr-reply, .convo-thread .said.mine,
.convo-thread .tr-turn > .chat-rule { transition: opacity 0.45s ease; }
.tr-asking .convo-thread .tr, .tr-asking .convo-thread .tr-reply,
.tr-asking .convo-thread .said.mine, .tr-asking .convo-thread .tr-turn > .chat-rule { opacity: 0.45; }
.tr-asking .convo-thread .tr-reply.tr-keep,
.tr-asking .convo-thread .tr-turn.tr-keep > .chat-rule { opacity: 1; }

/* the question sheet: one element the whole time it is open */
@keyframes trSheetIn { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes trSheetOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px) scale(0.985); } }
.tr-ask {
  position: relative; margin: 0 0 var(--s-4); background: var(--surface); border-radius: var(--r-sm);
  box-shadow: var(--shadow-modal), inset 0 0 0 1px var(--line-raised); overflow: hidden;
  transform-origin: 50% 100%; transition: box-shadow 0.38s ease;
}
.tr-ask.tr-ask-in { animation: trSheetIn 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.tr-ask.is-leaving { animation: trSheetOut 0.24s cubic-bezier(0.4, 0, 0.6, 1) both; pointer-events: none; }
.tr-ask.is-min { box-shadow: 0 8px 24px var(--ink), inset 0 0 0 1px var(--brass-edge); }
.tr-fold { display: grid; grid-template-rows: 1fr; opacity: 1;
  transition: grid-template-rows 0.38s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.28s ease; }
.tr-fold > .tr-fold-in { min-height: 0; overflow: hidden; }
.is-min .tr-fold { grid-template-rows: 0fr; opacity: 0; }
.tr-ask-top {
  display: flex; align-items: center; gap: var(--s-3); width: 100%; box-sizing: border-box; margin: 0;
  padding: 20px var(--s-5) var(--s-3); border: none; background: none; cursor: pointer;
  text-align: left; color: inherit; font: inherit; transition: padding 0.38s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.is-min .tr-ask-top { padding: var(--s-3) var(--s-4); }
.tr-ask-top:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: -2px; }
.tr-ask-mark { position: relative; flex: none; width: 20px; height: 6px; }
.tr-ask-mark .chat-rule, .tr-ask-mark .thinking-dot { position: absolute; top: 50%; margin: 0; transition: opacity 0.3s ease; }
.tr-ask-mark .chat-rule { left: 0; transform: translateY(-50%); }
.tr-ask-mark .thinking-dot { left: 6px; transform: translateY(-50%); opacity: 0; }
.is-min .tr-ask-mark .chat-rule { opacity: 0; }
.is-min .tr-ask-mark .thinking-dot { opacity: 1; }
.tr-ask-key { flex: none; font-size: var(--t-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass); }
.tr-ask-peek {
  min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--serif); font-size: var(--t-15); color: var(--marble);
  opacity: 0; transform: translateY(4px); transition: opacity 0.28s ease, transform 0.28s ease;
}
.is-min .tr-ask-peek { opacity: 1; transform: none; transition-delay: 0.12s; }
.tr-ask-how { flex: none; margin-left: auto; font-size: var(--t-12); color: var(--stone); transition: opacity 0.2s ease; }
.is-min .tr-ask-how { opacity: 0; }
.tr-ask-chev { flex: none; color: var(--stone); transition: transform 0.38s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.16s; }
.tr-ask-top:hover .tr-ask-chev { color: var(--brass-bright); }
.is-min .tr-ask-chev { transform: rotate(180deg); }
.tr-ask-q { margin: 0; padding: 0 var(--s-5) var(--s-4); font-family: var(--serif); font-size: var(--t-21); line-height: 1.3; color: var(--bone); max-width: 40ch; }
/* The answers scroll inside the sheet on a short screen, so the reply that
   asked stays readable above it and the box below stays on screen. */
.tr-ask-body {
  padding: var(--s-4) var(--s-5) 20px; background: var(--ground); border-top: 1px solid var(--line-raised);
  max-height: max(180px, calc(100vh - 440px)); overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line-quiet) transparent;
}
.tr-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); grid-template-columns: 1fr; }
.tr-opts.tr-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tr-opt {
  display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 52px; box-sizing: border-box;
  margin: 0; padding: var(--s-3) var(--s-4) var(--s-3) var(--s-3); border: none; cursor: pointer;
  text-align: left; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-raised);
  border-radius: var(--r-sm); font-family: var(--serif); font-size: var(--t-17); line-height: 1.35;
  color: var(--marble); transition: background 0.16s, color 0.16s, box-shadow 0.16s, transform 0.16s;
}
.tr-opt:hover { color: var(--bone); box-shadow: inset 0 0 0 1px var(--brass-edge); transform: translateY(-1px); }
.tr-opt:active { transform: none; }
.tr-opt:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 2px; }
.tr-opt-sub { display: block; margin-top: 2px; font-family: var(--grotesque); font-size: var(--t-13); line-height: 1.4; color: var(--stone-lit); }
.tr-opt:hover .tr-opt-sub, .tr-opt.on .tr-opt-sub { color: var(--marble-dim); }
.tr-badge {
  flex: none; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--grotesque);
  font-size: var(--t-12); font-weight: 600; color: var(--stone-lit); transition: background 0.16s, color 0.16s, box-shadow 0.16s;
}
.tr-opt:hover .tr-badge { background: var(--brass); color: var(--on-brass); box-shadow: none; }
.tr-badge svg { display: block; }
.tr-check svg { opacity: 0; }
.tr-opt.on { color: var(--bone); background: var(--line-raised); box-shadow: inset 0 0 0 1px var(--brass-dim); }
.tr-opt.on .tr-badge { background: var(--brass); color: var(--on-brass); box-shadow: none; }
.tr-opt.on .tr-check svg { opacity: 1; }
.tr-arrow { margin-left: auto; flex: none; color: var(--stone); transition: color 0.16s, transform 0.16s; }
.tr-opt:hover .tr-arrow { color: var(--brass-bright); transform: translateX(2px); }
.tr-opt.tr-else { background: none; box-shadow: inset 0 0 0 1px var(--line-quiet); color: var(--marble-dim); }
.tr-opt.tr-else:hover { box-shadow: inset 0 0 0 1px var(--line); color: var(--bone); }
.tr-else .tr-opt-sub { font-size: var(--t-12); color: var(--stone); }
.tr-else-li { grid-column: 1 / -1; }
.tr-ask-foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-4); padding: var(--s-3) var(--s-5); background: var(--ground); border-top: 1px solid var(--line-raised); }
.tr-ask-foot .hint { margin: 0; }

/* the plan: drawn in the dial's own terms, with the decision at its foot */
@keyframes plIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pl {
  margin: 0 0 var(--s-6); max-width: 640px; background: var(--surface); border-radius: var(--r-sm);
  box-shadow: 0 16px 48px var(--ink), inset 0 0 0 1px var(--line-raised), inset 0 1px 0 var(--brass-edge); overflow: hidden;
}
.pl.pl-in { animation: plIn 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
.pl-head { padding: 20px var(--s-5); }
.pl-top { display: flex; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-3); }
.pl-top .chat-rule { margin: 0; }
.pl-key { margin: 0; font-size: var(--t-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass); }
.pl-note { margin: 0 0 0 auto; font-size: var(--t-12); color: var(--stone); }
.pl-title { margin: 0; font-family: var(--serif); font-size: var(--t-28); line-height: 1.2; color: var(--bone); }
.pl-body { padding: 20px var(--s-5) var(--s-5); background: var(--ground); border-top: 1px solid var(--line-raised); border-bottom: 1px solid var(--line-raised); }
.pl-goal + .pl-goal { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--line-quiet); }
.pl-goal-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); margin: 0 0 var(--s-4); }
.pl-goal-name { margin: 0; font-family: var(--serif); font-size: var(--t-21); line-height: 1.25; color: var(--bone); }
.pl-goal-kind { flex: none; margin: 0; font-size: var(--t-12); color: var(--stone); }
.pl-track { position: relative; height: 22px; margin: 0 6px; }
.pl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--line); }
.pl-lit { position: absolute; left: 0; top: 10px; height: 2px; background: var(--rail-lit); }
.pl-today { position: absolute; left: -1px; top: 3px; width: 2px; height: 16px; background: var(--brass-bright); }
.pl-check {
  position: absolute; top: 6px; width: 10px; height: 10px; box-sizing: border-box; margin-left: -5px;
  border-radius: 50%; background: var(--sink); box-shadow: inset 0 0 0 1.5px var(--stone-quiet);
}
.pl-sleeve { position: absolute; right: -4px; top: 7px; width: 16px; height: 8px; background: var(--stone-warm); }
.pl-seal {
  position: absolute; right: -6px; top: 5px; width: 12px; height: 12px; box-sizing: border-box; border-radius: 50%;
  background: var(--sink); box-shadow: inset 0 0 0 1.6px var(--stone-warm), inset 0 0 0 4px var(--sink), inset 0 0 0 6px var(--stone-warm);
}
.pl-marks { position: relative; height: 40px; margin: 6px 0 0; }
.pl-mark { position: absolute; top: 0; left: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--t-12); line-height: 1.3; white-space: nowrap; }
.pl-mid { transform: translateX(-50%); align-items: center; }
.pl-end { left: auto; right: 0; align-items: flex-end; }
.pl-mark-when { color: var(--marble); font-variant-numeric: tabular-nums; }
.pl-mark-what { color: var(--stone); }
.pl-facts { margin-top: var(--s-3); }
.pl-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); padding: var(--s-4) var(--s-5); }
.pl-foot-note { flex: 1 1 180px; margin: 0; max-width: 34ch; font-size: var(--t-13); line-height: 1.45; color: var(--stone-lit); }
.pl-actions { display: flex; gap: var(--s-3); align-items: center; margin-left: auto; }
.pl-go { padding: var(--s-3) 20px; }

/* what is waiting its turn, under the dial */
.up-next { margin: 0; max-width: 34ch; text-align: center; font-size: var(--t-13); line-height: 1.5; color: var(--stone); }
.up-next-key { font-size: var(--t-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone-lit); margin-right: var(--s-2); }

@media (max-width: 720px) {
  /* The hint beside "Sereo asks" would push the fold control off the edge. */
  .tr-ask-how { display: none; }
  .tr-ask-chev { margin-left: auto; }
  .tr-ask-top { padding-left: var(--s-4); padding-right: var(--s-4); }
  .tr-ask-q, .tr-ask-body { padding-left: var(--s-4); padding-right: var(--s-4); }
  .tr-ask-foot, .pl-head, .pl-body, .pl-foot { padding-left: var(--s-4); padding-right: var(--s-4); }
  /* The rail's labels list under it: placed along it they run into each other. */
  .pl-marks { height: auto; display: flex; flex-direction: column; gap: var(--s-1); margin-top: var(--s-2); }
  .pl-mark, .pl-mid, .pl-end { position: static; transform: none; flex-direction: row; align-items: baseline; gap: var(--s-2); white-space: normal; }
  .convo-thread > .said.mine.tr-mine .said-text { max-width: 30ch; }
}

@media (prefers-reduced-motion: reduce) {
  .tr-ask, .tr-ask.tr-ask-in, .tr-ask.is-leaving, .pl.pl-in, .tr-new { animation: none; }
  .tr-fold, .tr-ask-peek, .tr-ask-chev, .tr-ask-top { transition: none; }
}

/* ——— from the full test run ———

   A view's one-line state — "Loading…", "That week could not be read." — is
   mounted straight into the view, with no page around it, and sat against the
   window's left edge under the header. */
:is(#view-home, #view-month, #view-week) > .hint { margin: 0; padding: var(--s-5) var(--s-6); }

@media (max-width: 1000px) {
  /* A 120px day column holds the date, the weekday and the day's tool only
     if nothing between them is wider than it has to be: at the desktop gaps
     the tool sat on top of the weekday's last letter. */
  .week-day-head { gap: var(--s-1); padding-left: var(--s-2); padding-right: var(--s-1); }
  .week-day-name { gap: var(--s-1); flex: 0 1 auto; }
}

@media (max-width: 560px) {
  :is(#view-home, #view-month, #view-week) > .hint { padding: var(--s-4); }
  /* Things a finger has to land on are at least 24px each way. */
  .week-day-tool, .led-fold { min-width: 24px; min-height: 24px; }
  .clock-reset, .reason-toggle, .quiet-link { min-height: 24px; }
  /* A settings row keeps its words readable and lets the controls drop
     under them: side by side, three export buttons left the sentence a
     column two words wide and pushed the row past the screen. */
  .settings-section .settings-row { flex-wrap: wrap; }
  .settings-section .settings-row > .settings-words { flex: 1 1 12rem; max-width: none; }
  .settings-section .settings-row > .field-row { flex-wrap: wrap; }
}

/* The whole header block of a calendar row opens its week, not only the
   words in it: the padding that used to sit around the button is the
   button's own, and it stands the full height of the row. */
.home-gutter { padding: 0; align-items: stretch; }
.home-week { padding: var(--s-1) var(--s-3); align-self: stretch; }
.home-gutter > .home-report { align-self: center; margin-right: var(--s-3); }

/* The crumb is a name over a smaller line: Month over its range, Week over
   its range, the weekday over its date. Left-aligned under its own name, so
   the path still reads across. Goals and Reports have no second line. */
.tab-label { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.tab-sub { font-size: var(--t-12); font-weight: 400; line-height: 1; color: var(--stone);
           font-variant-numeric: tabular-nums; }
.tab[aria-current="page"] .tab-sub { color: var(--marble-dim); }

/* What is typed sat about three pixels above the middle of its box: 19px
   of ground over the words and 25 under the hint line. Four more above
   puts the two within two pixels of each other, measured on the glyphs. */
.talk-compose .talk-compose-input { margin-top: var(--s-1); }

/* The day editor's standing note: what a drafted day is. Held to a reading
   measure so it wraps under the title, not across the buttons beside it. */
.editor-suggestion { margin: var(--s-2) 0 0; max-width: 62ch; }
/* And the title column gives way before the buttons do, so the note wraps
   beside them instead of pushing them onto a row of their own. */
.editor-head .editor-said { flex: 1 1 20rem; }

/* Settings is a panel of fixed height with its own scrolling pane, and the
   one Save sits at its foot. It used to be as tall as its contents inside a
   scrolling veil, with the bar stuck to the bottom of the window: the bar
   floated over the middle of the page with more settings showing under it. */
.settings-savebar { position: static; flex: 0 0 auto; }
@media (min-width: 561px) {
  .modal.panel-settings { display: flex; flex-direction: column;
                          max-height: calc(100vh - 2 * var(--s-7)); }
  .panel-settings .settings-body { flex: 1 1 auto; min-height: 0;
                                   grid-template-rows: minmax(0, 1fr); }
  .panel-settings .settings-pane { overflow-y: auto; min-height: 0; }
  .panel-settings .settings-tabs { overflow-y: auto; }
}
@media (min-width: 561px) and (max-width: 1000px) {
  /* One column here: the tabs take their own height, the pane the rest. */
  .panel-settings .settings-body { grid-template-rows: auto minmax(0, 1fr); }
}

/* Where you are: the field at a width a city fits in, and under it the
   device link on one line with what the field made of the answer. */
.place-field { display: flex; flex-direction: column; align-items: flex-start;
               gap: var(--s-2); flex: 0 1 320px; min-width: 0; }
.place-field .form-input { width: 100%; }
.place-field .quiet-link { white-space: nowrap; font-size: var(--t-13); }
.place-says { margin: 0; }

/* A stacked row's field takes the row: the standing-rules box was as wide as
   its placeholder's first words with the rest of the line left empty. */
.settings-row-stack > .field-row { width: 100%; }
.settings-row-stack > .field-row > .form-input { flex: 1 1 auto; min-width: 0; }

/* The callout's last line is the drift and "2/11 · the goal's name". The
   name was held to one line and ran out of the card when it was long; it
   wraps now, onto its own line when it has to. */
.cal-line { flex-wrap: wrap; }
.cal-index { flex: 0 1 auto; min-width: 0; white-space: normal; text-wrap: pretty; }

/* The city suggestions: a list that opens under the field as it is typed
   into. Over the rows beneath it, inside the pane's own scroll. */
.place-combo { position: relative; width: 100%; }
.place-list {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + var(--s-1));
  margin: 0; padding: var(--s-1) 0; list-style: none; max-height: 264px; overflow-y: auto;
  background: var(--raised); border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-modal);
}
.place-option { display: flex; align-items: baseline; gap: var(--s-2);
                padding: var(--s-2) var(--s-3); cursor: pointer; }
.place-option:hover, .place-option.on { background: var(--line-raised); }
.place-option-name { font-size: var(--t-15); color: var(--marble); white-space: nowrap; }
.place-option-where { font-size: var(--t-12); color: var(--stone); min-width: 0;
                      overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A provider's own mark on its sign-in button, beside the words. */
.gate-form .btn.provider .provider-mark { display: block; flex: 0 0 auto; }

/* A squeezed calendar gutter shortens the week's name; it does not let it
   run on under the arrow and the report button beside it. */
.home-wnum { overflow: hidden; text-overflow: ellipsis; }
.home-arrow { flex: 0 0 auto; }

/* Google's button in Google's dark theme (its branding guidelines): its
   fill, a one-pixel stroke inside the edge, its text colour, and its "G"
   twelve pixels in with ten between the mark and the words. The words stay
   in the house face. Hover keeps the theme: the guidelines give no other. */
.gate-form .btn.provider-google,
.gate-form .btn.provider-google:hover:not(:disabled) {
  background: var(--google-fill); color: var(--google-text);
  box-shadow: inset 0 0 0 1px var(--google-stroke);
}
.gate-form .btn.provider-google { gap: 10px; padding-left: var(--s-3); padding-right: var(--s-3); }

/* Help (ADR-0202): a small panel in the modal anatomy — a head, the two
   kinds, the words, what is sent with them, and the one button. */
.modal.panel-help { width: 520px; }
.help-body { display: flex; flex-direction: column; gap: var(--s-3);
             padding: var(--s-4) var(--s-5) var(--s-5); }
.help-body .form-input { width: 100%; }
.help-body .lede, .help-body .hint, .help-body .notice { margin: 0; }
.help-kinds { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.help-foot { display: flex; align-items: center; justify-content: space-between;
             gap: var(--s-3); flex-wrap: wrap; }
.help-foot > :last-child { margin-left: auto; }
.help-mail { display: flex; align-items: baseline; gap: var(--s-1); flex-wrap: wrap; }
