/* The Atlas core stylesheet.

   The design language is Lambourne House's, carried over deliberately and
   almost unchanged: spruce green and linen, Instrument Serif, soft cards,
   a sidebar that becomes a tab bar. The keeper's call, Aug 19 — the Utopian
   Scholastic atlas (vellum, gilt, plates, the 3D void) is retired whole.
   It lives on at tag v1-dusk-void if it is ever wanted again.

   What follows is Lambourne's stylesheet with the Atlas's own additions at
   the end: the ledger, the city pins, and the hero. Everything else is
   shared on purpose, so the two projects read as one hand.
*/
:root {
  color-scheme: light;
  --paper: #faf7f0;
  --card: #fffefa;
  --ink: #23201a;
  --muted: #5f584a;
  --line: #e6dfd1;
  --pine: #2c3a2a;
  --pine-lift: #33432f;   /* the chrome catching light */
  --pine-deep: #24301f;   /* the chrome in shadow */
  --pine-soft: #3a4a37;
  --pine-ink: #f2efe6;
  --leaf: #4c6e46;
  --leaf-soft: #e9efe3;
  --amber: #94660f;
  --amber-soft: #f7edda;
  --clay-soft: #f3e7e0;
  /* the paper surfaces a room is furnished with */
  --note: var(--note);
  --note-warm: var(--note-warm);
  --bench: var(--bench);
  --map: var(--map);
  --paper-ruled: var(--paper-ruled);
  --ground: #1b231a;
  --gilt: #e4cd8e;
  --pine-ink-rgb: 242 239 230; --leaf-rgb: 76 110 70; --pine-rgb: 44 58 42; --amber-rgb: 148 102 15; --ink-rgb: 35 32 26; --ground-rgb: 27 35 26;
  --radius: 22px;
  --tile: 14px;
  /* The prose measure, and the vertical scale everything on a page
     step is spaced by. Both exist so the page has one answer to "how
     wide" and "how far apart" instead of one answer per element. */
  --measure: 68ch;
  --step: 28px;
  --step-lg: 44px;
  --step-sm: 10px;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input, textarea { font: inherit; }
p, h3, blockquote { text-wrap: pretty; }

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

/* ============ gate ============ */
.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--pine);
}

.gate-card {
  width: min(420px, 100%);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 34px 30px;
  text-align: left;
}

.gate-card h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  margin: 4px 0 10px;
  letter-spacing: -0.01em;
}

.gate-sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }

.gate-row { display: flex; gap: 10px; }

.gate-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  background: var(--card);
}

.gate-row button {
  border: 0;
  border-radius: 12px;
  padding: 11px 22px;
  background: var(--pine);
  color: var(--pine-ink);
  font-weight: 600;
  cursor: pointer;
}

.gate-error { color: #a04b3a; font-size: 13px; margin: 12px 0 0; }

/* ============ shell ============ */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  padding: 16px;
  gap: 16px;
}

.sidebar {
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  padding: 20px 16px;
  background: var(--pine);
  color: var(--pine-ink);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.1;
  margin-bottom: 26px;
  padding: 4px 6px;
}

.brand-mark {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--pine-soft);
  color: var(--pine-ink);
  display: grid;
  place-items: center;
}

.brand-mark svg { width: 26px; height: 26px; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }

.nav-section {
  margin: 13px 12px 2px;
  padding-top: 10px;
  border-top: 1px solid rgb(var(--pine-ink-rgb) / 0.15);
  color: rgb(var(--pine-ink-rgb) / 0.46);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.side-nav a {
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--pine-ink);
  opacity: 0.78;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.side-nav a:hover { opacity: 1; background: var(--pine-soft); }
.side-nav a.is-current { opacity: 1; background: var(--pine-soft); font-weight: 600; }

.nav-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--amber);
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
}

.side-foot {
  margin-top: auto;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.55;
  padding: 0 6px;
}

/* ============ workspace ============ */
.workspace { min-width: 0; padding: 10px 26px 80px; max-width: 780px; }

.workspace-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

.workspace-head .eyebrow { margin: 0; }

.head-tools { display: flex; align-items: center; gap: 10px; }

.clock-chip {
  font-size: 12px;
  font-weight: 600;
  background: var(--leaf-soft);
  color: var(--leaf);
  border-radius: 999px;
  padding: 5px 14px;
  white-space: nowrap;
}

.help-btn {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pine);
  color: var(--pine-ink);
  display: grid;
  place-items: center;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
}

.help-btn:hover { background: var(--pine-soft); }

/* ============ hero ============ */
.hero {
  background: var(--pine);
  color: var(--pine-ink);
  border-radius: var(--radius);
  padding: clamp(26px, 5vw, 44px) clamp(22px, 5vw, 40px);
  margin: 0 0 36px;
}

.hero-eyebrow { color: var(--pine-ink); opacity: 0.55; }

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 6vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 6px 0 14px;
  text-wrap: balance;
}

.hero-sub {
  font-size: 15px;
  line-height: 1.65;
  opacity: 0.82;
  max-width: 52ch;
  margin: 0 0 18px;
}

.hero-cues { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-cues a {
  font-size: 13px;
  font-weight: 600;
  color: var(--pine-ink);
  text-decoration: none;
  border-radius: 999px;
  padding: 9px 18px;
  white-space: nowrap;
}

.hero-cues a:first-child { background: var(--leaf); border: 1px solid var(--leaf); }
.hero-cues a:first-child:hover { filter: brightness(1.12); }

.hero-cues a + a { background: transparent; border: 1px solid rgb(var(--pine-ink-rgb) / 0.6); }
.hero-cues a + a:hover { background: rgb(var(--pine-ink-rgb) / 0.14); }

.view { display: none; }
.view.is-active { display: block; }

.story-eyebrow { color: var(--leaf); }

.chapter-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  text-wrap: balance;
}

.story p {
  font-size: 16px;
  line-height: 1.7;
  max-width: 62ch;
  margin: 0 0 16px;
}

.story a { color: var(--leaf); text-decoration-color: rgba(88, 123, 82, 0.4); }

.section-eyebrow { margin: 34px 0 14px; }

.soft-note { color: var(--muted); font-size: 14px; max-width: 60ch; margin: 26px 0 0; }
.soft-note a { color: var(--leaf); }

/* ============ arrangement ============ */
.aspiration {
  font-family: var(--serif);
  font-size: clamp(21px, 3vw, 26px);
  line-height: 1.45;
  margin: 26px 0;
  padding: 22px 26px;
  background: var(--leaf-soft);
  border-radius: var(--radius);
  color: var(--ink);
  text-wrap: balance;
}

.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 16px 20px;
  font-size: 14px;
  max-width: 62ch;
  margin: 0 0 8px;
}

.callout--pending {
  background: var(--amber-soft);
  border-color: transparent;
  margin-top: 22px;
}

.callout--pending a { color: var(--amber); font-weight: 600; }

.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.role-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 18px 20px;
}

.role-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  margin: 2px 0 8px;
}

.role-card .eyebrow { color: var(--leaf); }
.role-body { font-size: 14px; margin: 0 0 10px; }

.role-how {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.chain-card {
  margin: 22px 0 8px;
  background: var(--pine);
  color: var(--pine-ink);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.chain-card .eyebrow { color: var(--pine-ink); opacity: 0.6; }

.chain {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.chain-node {
  font-family: var(--serif);
  font-size: 20px;
  background: var(--pine-soft);
  border-radius: 999px;
  padding: 6px 18px;
}

.chain-arrow { opacity: 0.5; }
.chain-note { font-size: 14px; opacity: 0.9; margin: 6px 0 0; max-width: 52ch; }

.loop-svg {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 8px auto 6px;
  color: var(--pine-ink);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.stat span { font-size: 12px; color: var(--muted); line-height: 1.4; }

.date-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.date-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.date-card strong { font-family: var(--serif); font-weight: 400; font-size: 21px; }
.date-card span { font-size: 12px; line-height: 1.4; }
.date-card em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--leaf); }
.date-card.is-past { opacity: 0.55; }
.date-card.is-past em { color: var(--muted); }

/* ============ timeline ============ */
.timeline { display: flex; flex-direction: column; }

.beat {
  padding: 20px 2px;
  border-bottom: 1px solid var(--line);
  max-width: 62ch;
}

.beat:last-child { border-bottom: 0; }

.beat-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.beat-n {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--muted);
}

.beat-when {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--leaf);
}

.beat h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 8px 0 6px; }
.beat p { font-size: 14px; color: var(--muted); margin: 0; }
.beat--done h3 { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--muted); }
.beat--done { opacity: 0.72; }

/* ============ tags ============ */
.tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.tag--money { background: var(--leaf-soft); color: var(--leaf); }
.tag--agreement { background: var(--amber-soft); color: var(--amber); }
.tag--logistics { background: var(--clay-soft); color: #8c5a45; }
.tag--expectations { background: #e8e4f2; color: #6b5e93; }
.tag--waiting { background: var(--amber-soft); color: var(--amber); }
.tag--done { background: var(--line); color: var(--muted); }
.tag--now { background: var(--leaf); color: #fff; }

/* ============ money ============ */
.money-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

.money-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 18px 20px;
}

.money-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.money-line strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.money-total { border-bottom: 0; }
.money-total strong { color: var(--leaf); }
.money-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

/* ============ expectations ============ */
.expect-list { display: flex; flex-direction: column; gap: 12px; }

.expect {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 16px 20px;
  max-width: 640px;
}

.expect--pending { background: var(--amber-soft); border-color: transparent; }

.expect-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.expect h3 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin: 0; }
.expect-source { font-size: 11px; color: var(--muted); white-space: nowrap; letter-spacing: 0.06em; text-transform: uppercase; }
.expect p { font-size: 14px; margin: 8px 0 0; }

/* ============ the work ============ */
.work-level { color: var(--leaf); margin: 30px 0 12px; }
.work-list > .work-level:first-child { margin-top: 4px; }

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.work-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 14px 18px;
}

.work-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  margin: 0 0 4px;
}

.work-items { list-style: none; margin: 0; padding: 0; }

.work-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
  line-height: 1.5;
}

.work-item:last-child { border-bottom: 0; padding-bottom: 2px; }

.tag--handy { background: var(--leaf-soft); color: var(--leaf); flex: none; }

/* ============ still open ============ */
.open-list { display: flex; flex-direction: column; gap: 12px; }

.open-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 16px 20px;
  max-width: 640px;
}

.open-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.open-item h3 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin: 0; }
.open-item p { font-size: 15px; color: var(--ink); line-height: 1.6; margin: 8px 0 0; }

/* ============ agreement ============ */
.draft-banner {
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--tile);
  padding: 12px 18px;
  margin: 0 0 20px;
}

.agree-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.agree-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 15px 18px;
}

.agree-card .eyebrow { color: var(--leaf); }
.agree-card p:not(.eyebrow) { font-size: 13px; margin: 0; }
.agree-card a { color: var(--amber); font-weight: 600; }

/* ============ reference ============ */
.contact-list { display: flex; flex-direction: column; gap: 10px; }

.contact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 6px 16px;
  align-items: baseline;
  max-width: 640px;
}

.contact strong { font-family: var(--serif); font-weight: 400; font-size: 18px; }
.contact span { font-size: 14px; color: var(--ink); }
.contact em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--leaf); white-space: nowrap; }

.doc-list { display: flex; flex-direction: column; gap: 10px; }

.doc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 14px 18px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 640px;
}

.doc:hover { border-color: var(--leaf); }
.doc strong { font-size: 14px; }
.doc span { font-size: 12px; color: var(--muted); }

.ref-notes p {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.65;
  max-width: 62ch;
  margin: 0 0 12px;
}

/* ============ form furniture (shared by the entry forms) ============ */
.ask-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.ask-hint { font-size: 12px; color: var(--muted); }

.ask-actions button {
  border: 0;
  border-radius: 999px;
  padding: 9px 26px;
  background: var(--pine);
  color: var(--pine-ink);
  font-weight: 600;
  cursor: pointer;
}

.asked-item {
  background: var(--leaf-soft);
  border-radius: var(--tile);
  padding: 12px 16px;
  margin-bottom: 10px;
  max-width: 640px;
}

.asked-item p { margin: 0; font-size: 14px; }
.asked-item em { font-style: normal; font-size: 12px; color: var(--muted); }

.answer-list .empty-note { color: var(--muted); font-size: 14px; max-width: 56ch; }

.answer {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 16px 20px;
  margin-bottom: 12px;
  max-width: 640px;
}

.answer h3 { font-family: var(--serif); font-weight: 400; font-size: 20px; margin: 0 0 8px; }
.answer p { font-size: 14px; margin: 0 0 8px; }
.answer em { font-style: normal; font-size: 12px; color: var(--muted); }

/* ============ bottom tab bar ============ */
.tab-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--pine);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  align-items: flex-start;
}

.tab-bar a {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--pine-ink);
  opacity: 0.55;
  padding: 2px 0;
}

.tab-bar a.is-current { opacity: 1; }

.tab-bar svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-bar span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tab-bar a.is-current span { font-weight: 700; }

.tab-badge {
  position: absolute;
  top: -3px;
  right: calc(50% - 20px);
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  background: var(--amber);
  color: #fff;
  border-radius: 999px;
  padding: 1px 5px;
  line-height: 1.3;
}

/* ============ mobile ============ */
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    /* auto row for the bar, rest to the page — otherwise stretch hands
       short pages' leftover height to the sidebar row (the giant green
       header the keeper found on Ask). */
    grid-template-rows: auto 1fr;
    align-content: start;
    padding: 0;
    gap: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: auto;
    min-width: 0;
    border-radius: 0;
    padding: 10px 16px;
    flex-direction: row;
    align-items: center;
  }

  .brand { margin-bottom: 0; font-size: 16px; }
  .brand br { display: none; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand-mark svg { width: 21px; height: 21px; }

  .side-nav, .side-foot { display: none; }

  .tab-bar { display: flex; }

  .workspace { padding: 18px 18px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .workspace-head { padding: 2px 0 14px; margin-bottom: 22px; flex-wrap: wrap; }

  .role-grid, .stat-strip, .date-strip, .money-cards, .agree-grid { grid-template-columns: 1fr 1fr; }
  .role-grid, .money-cards, .agree-grid, .work-grid { grid-template-columns: 1fr; }

  .contact { grid-template-columns: 1fr; gap: 2px; }
  .contact em { white-space: normal; }
}

@media (max-width: 480px) {
  .stat-strip, .date-strip { grid-template-columns: 1fr 1fr; }
  .chain-node { font-size: 17px; padding: 5px 14px; }
}

/* ============ hero photo ============ */
.hero--photo {
  background:
    rgb(var(--pine-rgb) / 0.78),
    url("assets/house-front.jpg") center 62% / cover no-repeat;
}

.hero--photo .hero-title,
.hero--photo .hero-sub,
.hero--photo .hero-eyebrow { text-shadow: 0 1px 14px rgb(var(--ground-rgb) / 0.45); }

.hero--photo .hero-sub { opacity: 0.92; }

/* The greeting hero has no cue buttons under it, so .hero-sub's
   18px cue-spacing margin became a dead band stacked on top of the
   hero's own 44px padding — a hand-width of empty photo under every
   greeting. Any header block now ends flush with its padding, whatever
   its last line happens to be. */
.hero > :last-child,
.wk-head > :last-child,
.gate-card > :last-child { margin-bottom: 0; }

/* ============ fix-the-record ============ */
.fix-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgb(var(--ink-rgb) / 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.modal {
  width: min(460px, 100%);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
}

.modal h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  margin: 2px 0 8px;
}

.modal-body { font-size: 14px; color: var(--muted); margin: 0 0 14px; }

.modal textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--tile);
  background: var(--card);
  padding: 12px 14px;
  resize: vertical;
  min-height: 90px;
  outline: none;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: none;
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}

.btn-solid {
  border: 0;
  background: var(--pine);
  color: var(--pine-ink);
  border-radius: 999px;
  padding: 9px 22px;
  cursor: pointer;
  font-weight: 600;
}

/* ============ still-open filters ============ */
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.fchip {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.fchip .n { font-size: 11px; opacity: 0.7; margin-left: 4px; }

.fchip.is-on {
  background: var(--pine);
  border-color: var(--pine);
  color: var(--pine-ink);
}

/* ============ accessibility ============ */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 2px;
  border-radius: 4px;
}

.modal-alt { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.modal-alt .fix-link { color: var(--leaf); font-size: 13px; }
.modal-status { margin: 12px 0 0; font-size: 13px; font-weight: 600; color: var(--leaf); }

/* hero cues stay side by side on mobile */
@media (max-width: 900px) {
  .hero-cues { flex-wrap: nowrap; }
  .hero-cues a {
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 9px 8px;
  }
}

/* keyboard open: get the tab bar out of the way of the field being typed in */
body.is-typing .tab-bar { display: none !important; }
body.is-typing .workspace { padding-bottom: 24px; }

/* ============ mobile header + hero cue fixes ============ */
@media (max-width: 900px) {
  .workspace-head {
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 4px 0 14px;
  }

  .workspace-head .eyebrow {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 10px;
    letter-spacing: 0.1em;
    overflow: clip;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .head-tools { flex: none; gap: 8px; }

  .clock-chip {
    font-size: 11px;
    padding: 5px 11px;
    max-width: 46vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 380px) {
  .hero-cues a { font-size: 12px; padding: 8px 6px; }
  .hero-cues { gap: 8px; }
}

/* ============ this week (the front door) ============ */
.wk-head { margin-bottom: 6px; }

.wk-sub {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 6px 0 0;
}

.wk-ask-title { margin: 0; }
.wk-ask-when { margin: 8px 0 0; font-size: 14px; }

.wk-coming { display: flex; flex-direction: column; }

.wk-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.wk-row:last-child { border-bottom: 0; }

.wk-row strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  white-space: nowrap;
}

.wk-row span { color: var(--muted); }

.wk-new { display: flex; flex-direction: column; gap: 8px; }

.wk-new-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 10px;
  align-items: center;
  background: var(--card, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  color: inherit;
  text-decoration: none;
}

.wk-new-link:hover { background: var(--leaf-soft); }
.wk-new-link strong { font-weight: 600; }
.wk-new-link span { grid-column: 1; color: var(--muted); font-size: 12px; }
.wk-new-link em { grid-column: 2; grid-row: 1 / span 2; font-style: normal; color: var(--leaf); font-weight: 600; }

.dispatch-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  background:
    var(--pine);
  color: var(--pine-ink);
  border: 1px solid rgb(var(--pine-ink-rgb) / 0.12);
  border-radius: var(--radius);
}

.dispatch-dial {
  min-width: 0;
  padding: 16px 17px 15px;
  border-left: 1px solid rgb(var(--pine-ink-rgb) / 0.13);
}
.dispatch-dial:first-child { border-left: 0; }
.dispatch-dial strong {
  display: block;
  font-family: var(--serif);
  font-size: var(--dial);
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.dispatch-dial span {
  display: block;
  margin-top: 5px;
  color: rgb(var(--pine-ink-rgb) / 0.62);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.wk-ask-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.field-notes {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.field-note-links { display: flex; flex-wrap: wrap; gap: 7px; }
.field-note-links a {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.field-note-links a:hover { border-color: var(--leaf); color: var(--leaf); }
.field-notes > p:last-child { margin: 12px 0 0; font-size: 12px; }

/* ============ the value card (money) ============ */
.value-card {
  background: var(--leaf-soft);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 22px 0 18px;
}

.value-card .eyebrow { color: var(--leaf); }

.value-line {
  font-family: var(--serif);
  font-size: 27px;
  margin: 4px 0 10px;
}

.value-line s {
  color: var(--muted);
  text-decoration-thickness: 1.5px;
}

.value-arrow { color: var(--leaf); margin: 0 4px; }
.value-line strong { font-weight: 400; color: var(--leaf); }

.value-body { font-size: 14px; margin: 0; max-width: 60ch; }

@media (max-width: 480px) {
  .wk-row { grid-template-columns: 76px 1fr; gap: 10px; }
  .value-line { font-size: 22px; }
  #view-week .hero { padding: 23px 21px; margin-bottom: 26px; }
  #view-week .hero-title { font-size: 35px; }
  #view-week .hero-sub { font-size: 14px; line-height: 1.5; }
  .dispatch-strip { grid-template-columns: 1fr 1fr; }
  .dispatch-dial:nth-child(3) { border-left: 0; }
  .dispatch-dial:nth-child(n+3) { border-top: 1px solid rgb(var(--pine-ink-rgb) / 0.13); }
}

/* ============ who: tap your name ============ */
.who-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.who-btn {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 10px;
  font-family: var(--serif);
  font-size: 20px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.who-btn:hover { background: var(--leaf-soft); border-color: var(--leaf); }

.who-nevermind {
  display: block;
  margin: 16px auto 0;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.who-chip {
  background: var(--leaf-soft);
  color: var(--leaf);
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.who-chip:hover { filter: brightness(0.96); }


/* ============ breadcrumb home ============ */
.crumb {
  font-size: 13px;
  font-weight: 600;
  color: var(--leaf);
  text-decoration: none;
  white-space: nowrap;
}

.crumb:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============ timeline: done is done ============ */
.beat--compact {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  opacity: 0.6;
}

.beat--compact .beat-check {
  color: var(--leaf);
  font-weight: 700;
  font-size: 13px;
}

.beat--compact .beat-when {
  font-size: 12px;
  padding: 0;
}

.beat--compact h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 16px;
  margin: 0;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--muted);
}

/* ============ expectations: titles stack cleanly ============ */
@media (max-width: 600px) {
  .expect-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .expect h3 { font-size: 19px; }
}

/* ============ requests waiting ============ */
.req-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }

.req-card {
  background: var(--amber-soft);
  border-radius: var(--tile);
  padding: 14px 18px;
}

.req-summary { font-size: 14px; font-weight: 600; margin: 0 0 4px; }

.req-meta { font-size: 12px; color: var(--muted); margin: 0; }

.req-actions { display: flex; gap: 8px; margin-top: 10px; }

.req-actions button {
  border: 0;
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.req-approve { background: var(--leaf); color: #fff; }
.req-approve:hover { filter: brightness(1.08); }

.req-decline { background: transparent; border: 1px solid var(--line) !important; color: var(--muted); }
.req-decline:hover { background: var(--card); }

/* ============ the center home button ============ */
.tab-bar a.tab-home { opacity: 1; }

.tab-home-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--leaf);
  display: grid;
  place-items: center;
  margin-top: -20px;
  border: 3px solid var(--paper);
  box-shadow: 0 2px 10px rgb(var(--ground-rgb) / 0.35);
}

.tab-bar .tab-home-btn svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  stroke-width: 2;
}

.tab-home.is-current .tab-home-btn { filter: brightness(1.15); }

.tab-home span:last-child {
  font-size: 10px;
  font-weight: 700;
}

/* ============ requests waiting banner (This Week, admins) ============ */
.req-banner {
  display: block;
  background: var(--amber-soft);
  color: var(--amber);
  border-radius: var(--tile);
  padding: 13px 18px;
  margin: 0 0 22px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.req-banner:hover { filter: brightness(0.97); }

/* ============ who's opened it (admin devices only) ============ */
.seen-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 16px 18px;
  margin: 0 0 22px;
}

.seen-card .eyebrow { margin: 0 0 10px; }

.seen-list { display: grid; gap: 8px; }

.seen-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
}

.seen-row span { color: var(--muted); font-size: 13px; text-align: right; }
.seen-row--never span { color: var(--amber); font-weight: 700; }

/* ============ your requests: outcomes ============ */
.req-card--applied { background: var(--leaf-soft); }
.req-card--declined { background: var(--card); border: 1px solid var(--line); }

.mine-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 9px;
  margin-right: 6px;
}

.mine-status--pending { background: var(--amber); color: #fff; }
.mine-status--applied { background: var(--leaf); color: #fff; }
.mine-status--declined { background: var(--line); color: var(--muted); }

/* ============================================================
   NEW FRAME additions — the two surfaces Lambourne has no
   equivalent for: the ledger, and the city pins. Built out of
   the same parts as everything above (cards, tags, chips) so
   they read as the same hand, not as bolted-on features.
   ============================================================ */

/* ---- the fill card: how full the week is ---- */
.fill-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.fill-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.fill-head strong {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
  font-weight: 400;
}

.fill-head span { font-size: 13px; color: var(--muted); }
.fill-head b { color: var(--leaf); }

.fill-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--leaf-soft);
  overflow: hidden;
}

.fill-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--leaf);
  transition: width 0.5s ease;
}

/* ---- the ledger ---- */
.ledger-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 22px; }

#view-coming .ledger-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  background:
    var(--pine);
  color: var(--pine-ink);
  border: 1px solid rgb(var(--pine-ink-rgb) / 0.13);
  border-radius: var(--radius);
}
#view-coming .ledger-row { box-shadow: none; }

.ledger-board-head,
.ledger-row {
  display: grid;
  grid-template-columns: 42px minmax(110px, 0.9fr) minmax(120px, 1fr) minmax(90px, 0.8fr) auto;
  gap: 12px;
  align-items: center;
}

.ledger-board-head {
  padding: 9px 14px;
  background: rgba(0,0,0,0.12);
  color: rgb(var(--pine-ink-rgb) / 0.46);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ledger-row {
  background: transparent;
  border: 0;
  border-top: 1px solid rgb(var(--pine-ink-rgb) / 0.13);
  border-radius: 0;
  padding: 14px;
  box-shadow: none;
}

.ledger-index {
  font-family: var(--serif);
  font-size: 17px;
  color: rgb(var(--pine-ink-rgb) / 0.42);
  font-variant-numeric: tabular-nums;
}

.ledger-person { min-width: 0; }
.ledger-person h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
}

.ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ledger-head h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  margin: 0;
}

.ledger-when { margin: 0; font-size: 13px; color: rgb(var(--pine-ink-rgb) / 0.78); }
.ledger-note { margin: 2px 0 0; font-size: 12px; color: rgb(var(--pine-ink-rgb) / 0.52); }
#view-coming .ledger-row .tag { background: rgb(var(--pine-ink-rgb) / 0.1); color: var(--pine-ink); }

@media (max-width: 600px) {
  .ledger-board-head { display: none; }
  .ledger-row {
    grid-template-columns: 34px 1fr auto;
    gap: 7px 10px;
    align-items: start;
  }
  .ledger-index { grid-row: 1 / span 3; }
  .ledger-when { grid-column: 2 / -1; }
  .ledger-leave { margin-top: -4px; }
  .ledger-leave::before { content: attr(data-prefix) " "; color: rgb(var(--pine-ink-rgb) / 0.45); }
  #view-coming .ledger-row .tag { grid-column: 3; grid-row: 1; }
}

/* ---- the city pins ---- */
.pin-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }

.pin {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 14px 16px;
}

.pin h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  margin: 0;
}

.pin p { margin: 6px 0 0; font-size: 14px; }
.pin-meta { font-size: 12px; color: var(--muted); }
.pin-meta a { color: var(--leaf); }

/* ---- entry forms: the ledger and the city both sign the same way ---- */
.entry-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 22px;
}

.entry-form .eyebrow { margin-bottom: 14px; }

.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; min-width: 0; }

.field {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 13px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
}

.field textarea { resize: vertical; }

.entry-form .ask-actions { margin-top: 4px; }

.entry-form button {
  border: 0;
  border-radius: 12px;
  padding: 10px 22px;
  background: var(--pine);
  color: var(--pine-ink);
  font-weight: 600;
  cursor: pointer;
}

.entry-form button:disabled { opacity: 0.55; cursor: default; }

/* the ledger's own tags reuse the tag palette above */
.tag--waiting { }

@media (max-width: 480px) {
  .field-row { flex-direction: column; gap: 0; }
  .fill-head { flex-direction: column; gap: 2px; align-items: flex-start; }
}

/* Still Open's own topics. The palette is the one above — amber for
   anything time-pressured, leaf for beds, clay for the build. */
.tag--dates { background: var(--amber-soft); color: var(--amber); }
.tag--lodging { background: var(--leaf-soft); color: var(--leaf); }
.tag--build { background: var(--clay-soft); color: #8c5a45; }

/* ============================================================
   THE DOOR — who's this, and onboarding.
   ============================================================ */

/* The two lines in a name button were running together — the button
   never said how to stack them. */
.who-btn { display: block; text-align: left; line-height: 1.25; }
.who-btn strong { display: block; font-weight: 400; }
.who-btn span {
  display: block;
  margin-top: 2px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.who-btn:hover span { color: var(--leaf); }

/* Typing your name is the main path now; the roster is the shortcut. */
.who-name label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
}

.who-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.who-or::before, .who-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.onboard-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 18px;
}

.onboard-actions button[type="submit"] {
  border: 0;
  border-radius: 12px;
  padding: 13px 22px;
  background: var(--pine);
  color: var(--pine-ink);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.onboard-actions button[type="submit"]:disabled { opacity: 0.6; cursor: default; }
.onboard-actions .who-nevermind { margin: 0 auto; }

/* The liaisons' unlock, kept small and out of the way in Reference. */
.keeper-strip {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.keeper-inline { margin-top: 10px; max-width: 340px; }
.keeper-on { font-size: 13px; color: var(--leaf); margin: 0; }


/* ============================================================
   THE ASK CARD — every viewport. The one thing the page asks of
   you, with the deadline promoted out of grey metadata.
   ============================================================ */

.wk-ask-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}

.wk-ask-head {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.wk-ask-body { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink); }

.wk-ask-when { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

.callout--pending { padding: 20px 22px; }

/* ---- This Week's vertical rhythm, every viewport ---- */
#view-week > * { margin-top: var(--step); }
#view-week > *:first-child { margin-top: 0; }
#view-week .wk-head { margin-top: var(--step-lg); margin-bottom: 0; }
#view-week .wk-head + .story { margin-top: var(--step-sm); }
#view-week .soft-note { margin-top: var(--step-lg); }
#view-week .req-banner[hidden], #view-week .seen-card[hidden] { margin-top: 0; }
.wk-head .story-eyebrow { margin-bottom: 6px; }
.wk-head .chapter-title { margin: 0 0 8px; }
.wk-head .wk-sub { margin: 0; }

/* The rail exists only on the desk. */
.context-rail { display: none; }

/* ============================================================
   DESKTOP — sixth cut: THE SHEET.

   Five desktop attempts died the same death from opposite directions:
   centered columns left un-owned margins, spanning layouts left
   un-anchored content. The constant in everything the keeper approved —
   Lambourne's desktop, this site's mobile — is that the design is ONE
   OBJECT: a pine structure and a paper surface with a definite edge.

   So the desk stops fighting the viewport and becomes one object too.
   A deep-pine ground; on it, a single sheet that fills the window —
   pine sidebar fused to the left edge, paper canvas on the right. The
   window NEVER scrolls; the canvas pane scrolls inside itself when a
   page runs long. Margins stop existing as a concept: what surrounds
   the sheet is ground, and ground is supposed to be there.

   The rail is gone. Its jobs moved home: the countdown lives at the
   bottom of the sidebar, the ledger count and open count were already
   nav badges, and This Week keeps its own coming/new panels.
   ============================================================ */

.masthead { display: none; }
.side-count { display: none; }

@media (min-width: 1160px) {

  :root { --ground: #1b231a; }

  html, body { height: 100%; overflow: hidden; }
  body {
    background: var(--ground);
  }

  /* ---- the sheet ---- */
  .app-shell {
    display: flex;
    /* the mobile grid's gap:16px survives into flex and, with the
       shell now transparent, showed as a dark ground stripe between
       the wing and the canvas */
    gap: 0;
    /* No height math at all. 100vh/100dvh minus margins kept losing to
       some part of the keeper's real environment — dock, zoom, chrome — and
       every loss showed up as the bottom corners running off-screen.
       Fixed + inset pins the sheet 22px from every edge of the actual
       window, by definition, with nothing to get the arithmetic wrong. */
    position: fixed;
    inset: 22px;
    /* THE actual root cause of every "cut-off corner" report: the
       mobile base sets min-height: 100vh, and min-height beats a
       constrained height — so the sheet was always exactly one bottom
       margin taller than the window, on every machine, in every
       version. The dock was never the culprit. */
    min-height: 0;
    height: auto;
    padding: 0;
    /* transparent, not paper: the shell's own background was peeking
       through the antialiased arc where its rounded clip meets the
       wing's rounded corner — the white slivers the keeper saw at top-left
       and bottom-left. The children paint every pixel; the shell only
       clips and shadows. */
    background: transparent;
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    overflow: clip;
  }

  .tab-bar { display: none; }
  .context-rail { display: none; }

  /* ---- the pine wing ---- */
  .sidebar {
    position: static;
    height: auto;
    width: 252px;
    flex: none;
    /* the wing rounds its own left corners rather than trusting the
       sheet's overflow clip — the keeper could see the top-left rounded and
       the bottom-left square */
    border-radius: 24px 0 0 24px;
    padding: 26px 18px 22px;
    display: flex;
    flex-direction: column;
    background:
      var(--pine);
  }

  .brand { font-size: 24px; margin-bottom: 32px; }
  .brand-mark { width: 46px; height: 46px; border-radius: 13px; }
  .brand-mark svg { width: 30px; height: 30px; }
  .side-nav { gap: 3px; }
  .side-nav a { font-size: 14px; padding: 9px 12px; }

  .side-count {
    display: block;
    margin-top: auto;
    padding: 16px 14px;
    background:
      var(--pine-soft);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    color: var(--pine-ink);
  }
  .side-count-n {
    display: block;
    font-family: var(--serif);
    font-size: 40px;
    line-height: 1;
  }
  .side-count-sub {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    opacity: 0.75;
    line-height: 1.4;
  }

  .side-foot { margin-top: 14px; }

  /* ---- the paper canvas: the pane that scrolls ---- */
  .workspace {
    flex: 1;
    min-width: 0;
    max-width: none;
    height: 100%;
    overflow-y: auto;
    padding: 30px 44px 44px;
    border-radius: 0 24px 24px 0;
    background: var(--paper);
    scrollbar-width: thin;
    scrollbar-color: rgb(var(--pine-rgb) / 0.35) transparent;
  }
  /* the scrollbar stops short of the rounded corners instead of
     running square through them */
  .workspace::-webkit-scrollbar { width: 10px; }
  .workspace::-webkit-scrollbar-track { background: transparent; margin: 26px 0; }
  .workspace::-webkit-scrollbar-thumb {
    background: rgb(var(--pine-rgb) / 0.3);
    border-radius: 999px;
    border: 3px solid var(--paper);
  }
  .workspace::-webkit-scrollbar-thumb:hover { background: rgb(var(--pine-rgb) / 0.5); }

  .workspace-head {
    display: flex;
    padding: 0 0 18px;
    margin-bottom: 26px;
  }
  .crumb { display: none; }

  /* no width cap on views: the pane's own padding is the frame, and
     every page composes to its full width — prose alone stays measured
     at 66ch inside its column */
  .view { max-width: none; }
  .view > .story p, .soft-note { max-width: 66ch; }
  .chapter-title { font-size: 46px; margin: 2px 0 14px; }

  /* ---- This Week: the hero is a box — mobile's pine card at desk
     scale — and the page runs two columns beneath it so the ask sits
     beside the prose instead of above dead space. ---- */
  #view-week.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    grid-template-areas:
      "greet greet"
      "banner banner"
      "seen  seen"
      "head  ask"
      "lead  ask"
      "stats ask"
      "tail  tail"
      "notes notes";
    column-gap: 24px;
    align-content: start;
  }
  #view-week .hero {
    grid-area: greet;
    padding: 32px 36px;
  }
  #view-week .hero-title { font-size: 44px; }
  #view-week .req-banner { grid-area: banner; }
  #view-week .seen-card { grid-area: seen; }
  #view-week .wk-head { grid-area: head; margin-top: var(--step); }
  #view-week .wk-head .chapter-title { display: none; }
  #view-week .story { grid-area: lead; margin-top: var(--step-sm); margin-bottom: 0; }
  #view-week .dispatch-strip { grid-area: stats; margin-top: var(--step); align-self: end; }
  #view-week #weekAsk { grid-area: ask; margin-top: var(--step); align-self: start; }
  #view-week .field-notes { grid-area: notes; margin-top: var(--step); }

  /* coming/new: two proper panels across the full sheet */
  #view-week .wk-tail {
    grid-area: tail;
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 16px;
    margin-top: var(--step);
  }
  #view-week .wk-tail > div {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
  }
  #view-week .wk-tail .section-eyebrow { margin: 0 0 10px; }

  /* ---- The Gathering: two-column intro, full-width board ----
     The wrappers dissolve (display: contents) so the grid can seat the
     prose left and the anchor-status callout right — no page opens
     onto an empty right half. */
  #view-gathering.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    column-gap: 24px;
    align-content: start;
  }
  #view-gathering .sheet-left, #view-gathering .sheet-right { display: contents; }
  #view-gathering > .patch-slot { grid-column: 1 / -1; grid-row: 1; }
  #view-gathering > .story-eyebrow { grid-column: 1 / -1; grid-row: 2; }
  #view-gathering > .chapter-title { grid-column: 1 / -1; grid-row: 3; }
  #view-gathering .story { grid-column: 1; grid-row: 4; }
  #view-gathering .aspiration { grid-column: 1; grid-row: 5; margin: 14px 0 0; }
  #view-gathering .callout { grid-column: 2; grid-row: 4 / span 2; align-self: start; margin: 0; }
  #view-gathering .sheet-right .section-eyebrow { grid-column: 1 / -1; grid-row: 6; margin-top: var(--step); }
  #view-gathering .role-grid { grid-column: 1 / -1; grid-row: 7; grid-template-columns: 1fr 1fr; gap: 14px; }
  #view-gathering .soft-note { grid-column: 1 / -1; grid-row: 8; margin-top: 16px; }
  #view-gathering .sheet-right .role-grid + .section-eyebrow { grid-row: 9; margin-top: var(--step); }
  #view-gathering .date-strip {
    grid-column: 1 / -1;
    grid-row: 10;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
  }
  #view-gathering .story p { max-width: 66ch; }

  /* ---- People / Places: list beside the form ---- */
  #view-coming.is-active,
  #view-city.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    /* the trailing 1fr row absorbs the height the tall sticky form
       forces on its spanned rows — without it the slack lands mid-grid
       and opens a hole between the intro and the list */
    grid-template-rows: auto auto auto auto auto auto 1fr;
    grid-template-areas:
      "eyebrow eyebrow"
      "title   title"
      "story   form"
      "desk    form"
      "meta    form"
      "list    form"
      "hint    form";
    column-gap: 24px;
    align-content: start;
  }
  #view-city .checkin-desk { grid-area: desk; margin: 0 0 18px; }
  #view-coming .ledger-list, #view-city .pin-list { align-self: start; }
  #view-coming > .story-eyebrow, #view-city > .story-eyebrow { grid-area: eyebrow; }
  #view-coming > .chapter-title, #view-city > .chapter-title { grid-area: title; }
  #view-coming .story, #view-city .story { grid-area: story; }
  #view-coming .fill-card { grid-area: meta; }
  #view-city .filter-row { grid-area: meta; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  #view-city .fchip { flex: none; }
  #view-city .pin-list .soft-note { grid-column: 1 / -1; margin: 4px 0 0; }
  #view-coming .ledger-list .soft-note { grid-column: 1 / -1; margin: 4px 0 0; }
  #view-coming .ledger-list, #view-city .pin-list { grid-area: list; margin-bottom: 0; }
  #view-city .soft-note { grid-area: hint; }
  #view-coming .entry-form, #view-city .entry-form {
    grid-area: form;
    margin-top: 0;
    position: sticky;
    top: 0;
    align-self: start;
  }
  .entry-form button { white-space: nowrap; min-width: 96px; }
  .ledger-list, .pin-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }

  /* ---- Timeline: the departure board in one panel ---- */
  /* the single-column board left half the panel empty on the right;
     the schedule reads down one column then over, like a printed
     season card */
  #view-timeline .timeline {
    /* display:block, or the columns silently never happen — the base
       .timeline is a flex column, and flex containers ignore `columns`
       while still REPORTING a column-count. Same trap as the reading
       views, re-sprung here. */
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 34px;
    max-width: none;
    columns: 2 440px;
    column-gap: 60px;
    column-rule: 1px solid var(--line);
  }
  .timeline .beat, .timeline .beat--compact { break-inside: avoid; }
  .timeline .beat { position: relative; padding: 14px 0 14px 112px; max-width: none; border-bottom: 1px solid var(--line); }
  .timeline .beat:last-child { border-bottom: 0; }
  .beat-n { display: none; }
  .beat-head { margin: 0; }
  .timeline .beat-when { position: absolute; left: 0; top: 15px; width: 96px; font-family: var(--serif); font-size: 17px; color: var(--ink); }
  .timeline .beat h3 { margin: 0 0 4px; }
  .timeline .beat p { margin: 0; max-width: 60ch; }
  .timeline .beat--compact { display: block; padding: 9px 0 9px 112px; }
  .timeline .beat--compact .beat-check { position: absolute; left: 0; top: 10px; }
  .timeline .beat--compact .beat-when { left: 22px; top: 11px; width: 74px; font-size: 14px; color: var(--muted); }
  .timeline .beat--compact h3 { display: inline; font-size: 15px; color: var(--muted); }

  /* ---- the rest: aligned grids of the same cards ---- */
  #view-staying .stay-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  #view-staying .callout { max-width: none; }

  #view-expectations .expect-list,
  #view-open .open-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
  }

  #view-reference .contact-list,
  #view-reference .doc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  #view-reference .ref-notes {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 22px;
    columns: 2 300px;
    column-gap: 44px;
  }
  #view-reference .ref-notes p { break-inside: avoid; font-size: 13px; margin: 0 0 12px; }
  #view-reference .keeper-strip { max-width: none; }
}

/* A short desktop cannot hold both sidebar summaries without making the
   fixed shell itself scroll. Keep the actionable next-date and ledger blocks;
   the countdown already owns the Now hero and can yield here. */
@media (min-width: 1160px) and (max-height: 780px) {
  .side-count,
  .side-foot { display: none !important; }
  .brand { margin-bottom: 20px; }
}

@media (min-width: 1480px) {
  .app-shell { inset: 26px; }
  .sidebar { width: 264px; }
  .workspace { padding: 34px 56px 56px; }
  #view-expectations .expect-list,
  #view-open .open-list,
  .ledger-list, .pin-list { grid-template-columns: 1fr 1fr 1fr; }
}

/* ============================================================
   DEPTH PASS — every viewport. The surfaces stop being flat fills:
   pine catches light from above, amber warms toward its lower edge,
   cards lift a hair off the paper. All of it stays inside the
   existing palette — gradients between neighbors of colors the page
   already owns, never new hues.
   ============================================================ */

/* the pine hero — light falling on the card's top-left, mobile and desk */
.hero {
  background:
    var(--pine);
}

/* the ask card and its amber family warm downward */
.callout {
  background: var(--amber-soft);
}
.callout--pending {
  background: var(--amber-soft);
}

/* the aspiration quote's leaf wash */
.aspiration {
  background: var(--leaf-soft);
}

/* solid pine controls catch the same top light */
.gate-row button,
.entry-form button,
.onboard-actions button[type="submit"],
.req-approve,
#askSend {
  background: var(--pine);
}
.gate-row button:hover,
.entry-form button:hover,
.onboard-actions button[type="submit"]:hover,
#askSend:hover {
  background: var(--pine-soft);
}

/* the ledger's fill runs light-to-leaf like a level filling */
.fill-bar span {
  background: var(--leaf);
}

/* cards lift a hair off the paper — shadow as depth, not decoration */
.fill-card, .ledger-row, .pin, .role-card, .expect, .open-item,
.contact, .doc, .entry-form, .seen-card,
.wk-coming, .wk-new {
  box-shadow: 0 1px 2px rgb(var(--ink-rgb) / 0.04), 0 6px 18px rgb(var(--ink-rgb) / 0.05);
}

/* the gate cards on their pine field */
.gate {
  background:
    var(--pine);
}
.gate-card { box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35); }

@media (min-width: 1160px) {
  /* desktop-only surfaces that don't exist on mobile */
  #view-timeline .timeline,
  #view-reference .ref-notes,
  #view-week .wk-tail > div {
    box-shadow: 0 1px 2px rgb(var(--ink-rgb) / 0.04), 0 6px 18px rgb(var(--ink-rgb) / 0.05);
  }
  .side-nav a.is-current {
    background: var(--pine-soft);
  }
}

/* ============================================================
   The hero earns its width, and the wing earns its height.
   ============================================================ */

/* mobile never sees the lockup or the wing extras */
.hero-lockup { display: none; }
.side-extras { display: none; }

@media (min-width: 1160px) {
  #view-week .hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
  }
  #view-week .hero-main { min-width: 0; }

  .hero-lockup {
    display: flex;
    flex-direction: column;
    flex: none;
    text-align: right;
    padding-left: 36px;
    border-left: 1px solid rgb(var(--pine-ink-rgb) / 0.18);
  }
  .hl-dates {
    font-family: var(--serif);
    font-size: 44px;
    line-height: 1;
    letter-spacing: -0.01em;
  }
  .hl-place { margin-top: 8px; font-size: 13px; opacity: 0.85; }
  .hl-event { margin-top: 2px; font-size: 12px; opacity: 0.6; }

  /* the wing's quiet middle: up-next and the ledger, above the count */
  .side-extras {
    display: block;
    margin-top: auto;
    padding: 0 6px;
  }
  .side-count { margin-top: 14px; }

  .side-block {
    padding: 12px 0 14px;
    border-top: 1px solid rgb(var(--pine-ink-rgb) / 0.14);
    color: var(--pine-ink);
  }
  .side-block-eyebrow {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.55;
    margin-bottom: 5px;
  }
  .side-block-date {
    display: block;
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 400;
  }
  .side-block-label { display: block; font-size: 12px; opacity: 0.75; line-height: 1.4; margin-top: 2px; }

  .side-signed-row { display: block; font-size: 12px; opacity: 0.85; }
  .side-signed-row strong { font-family: var(--serif); font-size: 19px; font-weight: 400; margin-right: 2px; }
  .side-bar {
    display: block;
    height: 5px;
    margin-top: 8px;
    border-radius: 999px;
    background: rgb(var(--pine-ink-rgb) / 0.16);
    overflow: hidden;
  }
  .side-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--leaf);
    transition: width 0.5s ease;
  }
}

/* Every gate is a true modal at every size. This was desktop-only,
   which put the desk's who-picker behind the fixed sheet — and then the
   mobile tour below the entire page in normal flow: two different
   invisible-modal bugs from one scoped rule. */
.gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  overflow-y: auto;
}

/* ============================================================
   THE SAY-BAR — UK26 v5's pattern in this house's palette.
   A rail you can say anything into; messages rise above it; the
   proposals it produces render on the page they would change.
   Liaison-only (JS gates it on the keeper word).
   ============================================================ */

/* iOS paints the home-indicator zone with the document root's
   background — paper, which showed as a pale strip under the pine tab
   bar. The root is pine on mobile (both ends of the page are pine), and
   the desk overrides it to ground. */
html { background: var(--pine); }
@media (min-width: 1160px) { html { background: var(--ground, #1b231a); } }

#bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 240;
  padding: 22px 14px calc(var(--tabbar-h, 62px) + 12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgb(var(--ink-rgb) / 0.28) 30%, rgb(var(--ink-rgb) / 0));
  pointer-events: none;
}
#bar > * { max-width: 640px; margin: 0 auto; pointer-events: auto; }
#bar[hidden] { display: none; }

.bar-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  background: rgb(var(--ground-rgb) / 0.92);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgb(var(--pine-ink-rgb) / 0.16);
  border-radius: 26px;
  box-shadow: 0 12px 36px rgba(23, 23, 23, 0.35);
}

#say {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  outline: none;
  padding: 9px 8px;
  color: var(--pine-ink);
  font-size: 16px; /* under 16px, iOS zooms the page on focus */
}
#say::placeholder { color: rgb(var(--pine-ink-rgb) / 0.5); }

.bar-send {
  flex: none;
  border: 0;
  border-radius: 18px;
  padding: 9px 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: var(--gilt);
  color: #4a3a10;
}
.bar-send:disabled { background: rgb(var(--pine-ink-rgb) / 0.2); color: var(--pine-ink); }

.bar-count {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 17px;
  background: var(--amber);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

/* messages rise out of the rail and dissolve upward */
#stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  max-height: 46vh;
  overflow-y: auto;
  scrollbar-width: none;
}
#stack::-webkit-scrollbar { display: none; }

.msg {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
}
@keyframes msg-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg.mine { align-self: flex-end; background: var(--pine); color: var(--pine-ink); }
.msg.theirs {
  align-self: flex-start;
  background: rgba(255, 254, 250, 0.96);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(23, 23, 23, 0.12);
}
.msg .msg-did {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--leaf);
  font-weight: 600;
}

#thinking { display: flex; gap: 5px; padding: 0 10px 10px; }
#thinking span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pine-ink); opacity: 0.4;
  animation: blink 1.1s infinite;
}
#thinking span:nth-child(2) { animation-delay: 0.18s; }
#thinking span:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.22; } 30% { opacity: 0.9; } }

/* the page recedes while the bar holds focus */
#scrim {
  position: fixed;
  inset: 0;
  z-index: 230;
  opacity: 0;
  pointer-events: none;
  background: rgba(23, 23, 23, 0.34);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  transition: opacity 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
}
#scrim[hidden] { display: none; }
body.chatting #scrim {
  opacity: 1;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ---- proposals, rendered where they'd land ---- */
.patch-slot { display: flex; flex-direction: column; gap: 10px; }
.patch-slot:not(:empty) { margin-bottom: 18px; }

.patch {
  background: var(--amber-soft);
  border: 1px solid var(--amber);
  border-radius: var(--tile);
  padding: 14px 16px;
  box-shadow: 0 6px 20px rgb(var(--amber-rgb) / 0.10);
}
.patch-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.patch-flag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}
.patch-meta { font-size: 12px; color: var(--muted); }
.patch-say { margin: 0; font-size: 14px; }
.patch-acts { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.patch-yes, .patch-no {
  border: 0;
  border-radius: 10px;
  padding: 8px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.patch-yes { background: var(--pine); color: var(--pine-ink); }
.patch-no { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.patch-go { font-size: 13px; font-weight: 600; color: var(--leaf); text-decoration: none; align-self: center; }

/* the summon seal: desktop's door to the conversation. Hidden on
   phones (the bar is resident there) and while the chat is open. */
#barSummon { display: none; }

/* the panel header only exists on the desk — phones keep the bare bar */
.bar-head { display: none; }

@media (min-width: 1160px) {
  /* the bar is summoned, not resident (the keeper, Aug 21): the seal opens
     it as a proper panel — its own ground, a head, the conversation,
     the input row — anchored where the seal was. Scrim, Esc, or the
     × put it away. Inset 44px so neither seal nor panel sits on the
     workspace pane's scrollbar. */
  #bar { display: none; }
  body.chatting #bar {
    display: flex;
    flex-direction: column;
    left: auto;
    right: 44px;
    bottom: 32px;
    width: min(430px, calc(100vw - 380px));
    padding: 10px 14px 14px;
    background: rgb(var(--ground-rgb) / 0.96);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    backdrop-filter: blur(18px) saturate(1.15);
    border: 1px solid rgb(var(--pine-ink-rgb) / 0.16);
    border-radius: 22px;
    box-shadow: 0 24px 64px rgba(23, 23, 23, 0.45);
    pointer-events: auto;
  }
  #bar > * { max-width: none; margin: 0; }

  .bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 4px 10px;
  }
  .bar-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgb(var(--pine-ink-rgb) / 0.55);
  }
  .bar-close {
    border: 0;
    background: none;
    color: rgb(var(--pine-ink-rgb) / 0.55);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
  }
  @media (hover: hover) { .bar-close:hover { color: var(--pine-ink); } }

  #stack { max-height: 52vh; margin-bottom: 10px; }
  #stack:empty { margin-bottom: 0; }

  /* the input row reads as a row of the panel, not a second pill */
  .bar-row {
    background: rgb(var(--pine-ink-rgb) / 0.07);
    border-color: rgb(var(--pine-ink-rgb) / 0.12);
    box-shadow: none;
  }

  /* the page steps back a little — not into a fog */
  body.chatting #scrim {
    background: rgba(23, 23, 23, 0.22);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }

  #barSummon {
    position: fixed;
    right: 44px;
    bottom: 32px;
    z-index: 235;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 1px solid rgb(var(--pine-ink-rgb) / 0.2);
    border-radius: 50%;
    background: var(--pine);
    color: var(--pine-ink);
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(23, 23, 23, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  #barSummon:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(23, 23, 23, 0.35); }
  #barSummon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  #barSummon[hidden], body.chatting #barSummon { display: none; }
  .summon-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--amber);
    color: #fff;
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
  }

  /* the canvas keeps its last content clear of the corner seal */
  .workspace { padding-bottom: 96px; }
}

/* ============================================================
   PRODUCTION — the co-organizer's section. TOUR — the first-run walk.
   MIC — the Hub's voice input, compacted into the rail.
   ============================================================ */

.prod-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }

.prod-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgb(var(--ink-rgb) / 0.04), 0 6px 18px rgb(var(--ink-rgb) / 0.05);
}

.prod-check {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 2px solid var(--leaf);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 12px;
  line-height: 1;
}
.prod-item.is-done .prod-check { background: var(--leaf); color: #fff; }
.prod-item.is-done .prod-text { text-decoration: line-through; color: var(--muted); }

.prod-main { min-width: 0; flex: 1; }
.prod-text { font-size: 15px; }
.prod-meta { margin-top: 3px; font-size: 12px; color: var(--muted); }
.prod-meta a { color: var(--leaf); }
.prod-who {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--leaf);
  background: var(--leaf-soft);
  border-radius: 999px;
  padding: 3px 10px;
  margin-top: 2px;
}

@media (min-width: 1160px) {
  #view-production.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-template-rows: auto auto auto auto auto 1fr;
    grid-template-areas:
      "slot    slot"
      "eyebrow eyebrow"
      "title   title"
      "story   form"
      "meta    form"
      "list    form";
    column-gap: 24px;
    align-content: start;
  }
  #view-production .patch-slot { grid-area: slot; }
  #view-production > .story-eyebrow { grid-area: eyebrow; }
  #view-production > .chapter-title { grid-area: title; }
  #view-production .story { grid-area: story; }
  #view-production .filter-row { grid-area: meta; display: flex; flex-wrap: wrap; gap: 8px; }
  #view-production .prod-list { grid-area: list; align-self: start; }
  #view-production .soft-note { display: none; }
  #view-production .entry-form { grid-area: form; margin-top: 0; position: sticky; top: 0; align-self: start; }
}

/* ---- the liaison tips card on This Week ---- */
.admin-tips {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgb(var(--ink-rgb) / 0.04), 0 6px 18px rgb(var(--ink-rgb) / 0.05);
}
.admin-tips .eyebrow { margin-bottom: 10px; }
.tip-row { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.tip-row b { display: block; font-weight: 600; margin-bottom: 1px; }
.tip-row span { color: var(--muted); }
.tips-replay {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--leaf);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
@media (min-width: 1160px) {
  #view-week .admin-tips { grid-area: seen; }
  #view-week .seen-card { grid-area: banner; }
}

/* ---- the ? ---- */
.help-btn {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.help-btn:hover { color: var(--ink); border-color: var(--ink); }
.mast-help {
  background: var(--pine-soft);
  border-color: rgb(var(--pine-ink-rgb) / 0.2);
  color: var(--pine-ink);
}
.mast-help:hover { background: var(--leaf); color: var(--pine-ink); border-color: transparent; }

/* ---- the tour card ---- */
#tourGate { z-index: 320; }
.tour-card h1 { font-size: 30px; }
.tour-acts { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.tour-next {
  border: 0;
  border-radius: 12px;
  padding: 13px 22px;
  background: var(--pine);
  color: var(--pine-ink);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.tour-acts .who-nevermind { margin: 0 auto; }

/* ---- the mic ---- */
.bar-mic {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgb(var(--pine-ink-rgb) / 0.18);
  background: rgb(var(--pine-ink-rgb) / 0.1);
  color: var(--pine-ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.bar-mic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (hover: hover) { .bar-mic:hover { background: rgb(var(--pine-ink-rgb) / 0.2); } }
.bar-mic.listening {
  background: var(--amber);
  border-color: transparent;
  animation: mic-pulse 1.4s ease infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgb(var(--amber-rgb) / 0.5); }
  50% { box-shadow: 0 0 0 7px rgb(var(--amber-rgb) / 0); }
}

/* the stack shows while you're in the conversation and hides — held,
   not cleared — when you tap away */
#stack { display: none; }
body.chatting #stack { display: flex; }

/* the waveform sits where the words will land */
#sayWave {
  display: block;
  width: 100%;
  height: 22px;
  margin: 0 0 6px;
  border-radius: 8px;
  background: rgba(228, 205, 142, 0.08);
}
#sayWave[hidden] { display: none; }
body.recording #say { color: #e4cd8e; }

/* UK26's duck: the bar steps back while you scroll */
#bar { transition: transform 0.25s ease, opacity 0.25s ease; }
body.ducked #bar { transform: translateY(14px); opacity: 0.45; }
body.ducked #stack { opacity: 0; }

@media (max-width: 1159px) {
  /* while the conversation is open the tabs step aside and the bar
     settles into their space (UK26's move) — and when the keyboard is
     up, the wash collapses so there's no dead band above it */
  .tab-bar { transition: transform 0.25s ease; }
  body.chatting .tab-bar, body.kb .tab-bar { transform: translateY(110%); }
  body.chatting #bar { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  body.kb #bar {
    padding-top: 12px;
    padding-bottom: 10px;
    background: linear-gradient(to top, rgb(var(--ink-rgb) / 0.35) 60%, rgb(var(--ink-rgb) / 0));
  }
}

/* ============================================================
   The chat's finish: the fade instead of the hard break, copy on
   every message, approvals in the stack, the log, and the bar
   keeping out of the page's way.
   ============================================================ */

/* messages dissolve INTO the page halfway up — a gradient mask, not a
   hard clip (the "artifacting" was the stack's square top edge) */
#stack {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 26%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 26%);
  padding-top: 40px;
}

.msg { position: relative; }
.msg .msg-copy {
  position: absolute;
  bottom: -16px;
  border: 0;
  background: none;
  padding: 2px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(var(--pine-ink-rgb) / 0.6);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.msg.mine .msg-copy { right: 4px; }
.msg.theirs .msg-copy { left: 4px; color: var(--muted); }
@media (hover: hover) { .msg:hover .msg-copy { opacity: 1; } }
.msg:active .msg-copy { opacity: 1; }
@media (hover: none) { .msg .msg-copy { opacity: 0.7; } }
#stack { row-gap: 20px; }

/* the ask card: approval inside the conversation */
.msg.ask {
  align-self: flex-start;
  max-width: 92%;
  background: var(--amber-soft);
  border: 1px solid var(--amber);
  color: var(--ink);
}
.msg.ask .ask-flag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 5px;
}
.msg.ask .ask-sum { margin: 0; font-size: 14px; }
.msg.ask .ask-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.msg.ask.is-done { opacity: 0.75; }
.msg.ask .ask-done { font-size: 12px; font-weight: 700; color: var(--leaf); }

/* the log — a quiet ledger, not a stack of cards. Rows are hairline-
   separated lines; the status is a small word, not a badge. */
.log-list { display: flex; flex-direction: column; }
.log-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 2px;
  border-top: 1px solid var(--line);
}
.log-row:first-child { border-top: 0; }
.log-chip {
  flex: none;
  width: 62px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.log-row--applied .log-chip { color: var(--leaf); }
.log-row--declined .log-chip { color: var(--muted); }
.log-body { min-width: 0; flex: 1; }
.log-sum { display: block; font-size: 12px; color: var(--ink); opacity: 0.85; }
.log-meta { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.log-go { flex: none; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 12px; }

/* the bar never covers the page's last element — the page grows a
   bottom porch instead, so the chat "sits at the bottom" when you
   arrive there */
@media (max-width: 1159px) {
  body.has-bar .workspace { padding-bottom: calc(200px + env(safe-area-inset-bottom, 0px)); }
  /* the ducked bar slides BEHIND the tab bar, never over the This Week
     button — the tabs outrank it */
  .tab-bar { z-index: 250; }
  body.ducked #bar { transform: translateY(26px); opacity: 0.35; }
}
@media (min-width: 1160px) {
  body.has-bar .workspace { padding-bottom: 150px; }
}

/* ============================================================
   STRICTLY BETTER — ONE MOUTH, ONE DOOR.
   The wireless is summoned on every viewport. It no longer occupies
   the phone's reading surface when nobody is using it.
   ============================================================ */
#bar { display: none; }
body.chatting #bar { display: flex; flex-direction: column; }

.bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 10px;
}
.bar-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(var(--pine-ink-rgb) / 0.55);
}
.bar-close {
  border: 0;
  background: none;
  color: rgb(var(--pine-ink-rgb) / 0.55);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.bar-close:hover { color: var(--pine-ink); }

#barSummon {
  position: fixed;
  right: 18px;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  z-index: 235;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgb(var(--pine-ink-rgb) / 0.2);
  border-radius: 50%;
  background: var(--pine);
  color: var(--pine-ink);
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(23, 23, 23, 0.3);
}
#barSummon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#barSummon[hidden], body.chatting #barSummon { display: none; }

@media (max-width: 1159px) {
  #barSummon { top: 9px; bottom: auto; }
  body.chatting #bar {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding: 10px 12px 12px;
    background: rgb(var(--ground-rgb) / 0.97);
    border: 1px solid rgb(var(--pine-ink-rgb) / 0.16);
    border-radius: 20px;
    box-shadow: 0 22px 60px rgba(23, 23, 23, 0.45);
    pointer-events: auto;
  }
  #bar > * { width: 100%; max-width: none; margin: 0; }
  #stack { max-height: 48vh; }
  .bar-row { box-shadow: none; background: rgb(var(--pine-ink-rgb) / 0.07); }
  body.has-bar .workspace { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
  body.ducked #barSummon { opacity: 0.55; }
}

@media (min-width: 1160px) {
  #barSummon { right: 44px; bottom: 32px; width: 54px; height: 54px; }
}

/* ============================================================
   STRICTLY BETTER II — ROOMS WITH DIFFERENT PHYSICS.
   People watches overlaps; Places is a map desk; Making is a shared
   workbench; Still Open is an evidence wall.
   ============================================================ */

/* ---- People: honest overlap signals from rough text ---- */
.overlap-signals {
  padding: 13px 16px;
  border: 1px dashed rgb(var(--leaf-rgb) / 0.38);
  border-radius: var(--tile);
  background: rgba(233, 239, 227, 0.45);
}
.overlap-signals .eyebrow { color: var(--leaf); margin-bottom: 4px; }
.overlap-row { display: flex; align-items: baseline; gap: 12px; padding: 4px 0; }
.overlap-row strong { font-family: var(--serif); font-size: 18px; font-weight: 400; }
.overlap-row span { font-size: 13px; color: var(--ink); }
.overlap-empty, .overlap-note { margin: 0; font-size: 12px; color: var(--muted); }

/* ---- Places: the map desk ---- */
#view-city .pin-list {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  min-height: 330px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgb(var(--pine-rgb) / 0.18);
  border-radius: var(--radius);
  background-color: var(--map);
  background-image:
    linear-gradient(rgb(var(--pine-rgb) / 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--pine-rgb) / 0.075) 1px, transparent 1px),
    radial-gradient(circle at 18% 23%, transparent 0 18px, rgb(var(--leaf-rgb) / 0.11) 19px 20px, transparent 21px),
    radial-gradient(circle at 76% 68%, transparent 0 34px, rgb(var(--leaf-rgb) / 0.10) 35px 36px, transparent 37px);
  background-size: 28px 28px, 28px 28px, auto, auto;
}
#view-city .pin-list.is-empty { display: grid; place-items: center; }
.map-desk-label {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgb(var(--pine-rgb) / 0.22);
  color: rgb(var(--pine-rgb) / 0.62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
#view-city .pin {
  position: relative;
  align-self: start;
  max-width: none;
  padding: 20px 18px 16px;
  border: 0;
  border-radius: 3px;
  background: var(--note);
  box-shadow: 0 10px 22px rgb(var(--pine-rgb) / 0.15), 0 1px 1px rgb(var(--pine-rgb) / 0.16);
  transform: rotate(-0.45deg);
}
#view-city .pin:nth-of-type(odd) { transform: rotate(0.55deg) translateY(5px); }
.map-pin-n {
  position: absolute;
  top: -11px;
  left: 16px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 5px;
  background: var(--pine);
  color: var(--pine-ink);
  font-family: var(--serif);
  font-size: 13px;
  transform: rotate(-45deg);
}
.map-pin-n > span { transform: rotate(45deg); }
#view-city .pin .open-head { padding-left: 20px; }
#view-city .pin-note { line-height: 1.5; }
.map-empty { max-width: 330px; text-align: center; color: var(--pine); }
.map-empty h3 { margin: 3px 0 8px; font-family: var(--serif); font-size: 27px; font-weight: 400; }
.map-empty > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.map-crosshair {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(var(--pine-rgb) / 0.35);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 30px;
  color: rgb(var(--pine-rgb) / 0.55);
}

/* ---- Making: one shared workbench, owner lanes ---- */
.workbench-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border-radius: var(--tile);
  background: var(--pine);
  color: var(--pine-ink);
}
.workbench-stat { padding: 13px 15px; border-left: 1px solid rgb(var(--pine-ink-rgb) / 0.13); }
.workbench-stat:first-child { border-left: 0; }
.workbench-stat strong { display: block; font-family: var(--serif); font-size: var(--dial); font-weight: 400; line-height: 1; }
.workbench-stat span { display: block; margin-top: 4px; font-size: 10px; color: rgb(var(--pine-ink-rgb) / 0.58); }
#view-production .prod-list {
  gap: 16px;
  padding: 18px;
  border: 1px solid rgb(var(--amber-rgb) / 0.17);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(90deg, transparent 0 47px, rgb(var(--amber-rgb) / 0.055) 48px),
    var(--bench);
}
.prod-lane { overflow: hidden; border: 1px solid rgb(var(--amber-rgb) / 0.18); border-radius: 4px; background: var(--note); }
.prod-lane-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 13px;
  border-bottom: 1px solid rgb(var(--amber-rgb) / 0.15);
  background: rgb(var(--amber-rgb) / 0.07);
}
.prod-lane-head h3 { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 400; }
.prod-lane-head span { color: var(--amber); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.prod-lane-body { padding: 0 13px; }
#view-production .prod-item {
  margin: 0;
  padding: 12px 0;
  border: 0;
  border-top: 1px dashed rgb(var(--amber-rgb) / 0.2);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#view-production .prod-item:first-child { border-top: 0; }
.workbench-empty { padding: 36px 24px; text-align: center; }
.workbench-empty h3 { margin: 3px auto 8px; max-width: 420px; font-family: var(--serif); font-size: 27px; font-weight: 400; }
.workbench-empty > p:last-child { margin: 0; font-size: 13px; color: var(--muted); }

/* ---- Still Open: the evidence wall ---- */
.open-status {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--tile);
}
.open-status-item { padding: 10px 13px; border-left: 1px solid var(--line); }
.open-status-item:first-child { border-left: 0; }
.open-status-item strong { font-family: var(--serif); font-size: var(--dial); font-weight: 400; }
.open-status-item span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
#view-open .open-list {
  padding: 24px;
  border-radius: var(--radius);
  background-color: var(--pine);
  background-image: radial-gradient(rgb(var(--pine-ink-rgb) / 0.1) 0.8px, transparent 0.8px);
  background-size: 18px 18px;
}
#view-open .open-item {
  position: relative;
  max-width: none;
  padding: 17px 18px 16px;
  border: 0;
  border-radius: 3px;
  background: var(--note);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}
#view-open .open-item:nth-child(3n+1) { transform: rotate(-0.35deg); }
#view-open .open-item:nth-child(3n+2) { transform: rotate(0.4deg); }
.open-mark { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.open-index { font-family: var(--serif); font-size: 15px; color: var(--muted); }
.open-flag { color: var(--amber); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.open-action {
  display: inline-block;
  margin-top: 13px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--leaf);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

@media (min-width: 1160px) {
  #view-coming.is-active {
    grid-template-rows: auto auto auto auto auto auto 1fr;
    grid-template-areas:
      "eyebrow eyebrow"
      "title   title"
      "story   form"
      "meta    form"
      "signal  form"
      "list    form"
      "hint    form";
  }
  #view-coming .overlap-signals { grid-area: signal; margin: 0 0 16px; }

  #view-production.is-active {
    grid-template-rows: auto auto auto auto auto auto 1fr;
    grid-template-areas:
      "slot    slot"
      "eyebrow eyebrow"
      "title   title"
      "story   form"
      "status  form"
      "meta    form"
      "list    form";
  }
  #view-production .workbench-status { grid-area: status; margin: 0 0 12px; }
}

@media (max-width: 600px) {
  #view-city .pin-list { grid-template-columns: 1fr; min-height: 300px; padding: 20px; }
  .map-desk-label { grid-column: 1; }
  .workbench-status { margin: 18px 0 14px; }
  #view-production .prod-list { padding: 12px; }
  .open-status { grid-template-columns: 1fr 1fr; }
  .open-status-item:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .open-status-item:nth-child(4) { border-top: 1px solid var(--line); }
  #view-open .open-list { display: grid; grid-template-columns: 1fr; padding: 18px; }
}

/* ============================================================
   THE ARRIVAL — the Hub's onboarding lesson, in this house.
   Do one real thing first; teach beside the product afterward.
   ============================================================ */

:root { --ease-out: cubic-bezier(.2, .82, .24, 1); --dial: 26px; }

/* The reported empty state: paper-muted ink was inheriting onto pine. */
#view-coming .ledger-list.is-empty {
  min-height: 84px;
  justify-content: center;
}
#view-coming .ledger-empty {
  margin: 0;
  padding: 20px 22px;
  color: rgb(var(--pine-ink-rgb) / 0.74);
  font-size: 14px;
  line-height: 1.55;
}

/* Rooms arrive with a small settle, never a theatrical slide. */
@supports not (animation-timing-function: linear(0, 1)) { .view.is-active { animation: view-arrive .42s var(--ease-out) both; } }
@keyframes view-arrive {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

.gate:not([hidden]) .gate-card { animation: gate-arrive .5s var(--ease-out) both; }
@keyframes gate-arrive {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.onboard-gate {
  z-index: 340;
  overflow: clip;
  background:
    rgb(var(--ground-rgb) / .91);
  -webkit-backdrop-filter: blur(18px) saturate(110%);
  backdrop-filter: blur(18px) saturate(110%);
  transition: opacity .5s ease;
}
.onboard-gate::before,
.onboard-gate::after {
  content: "";
  position: absolute;
  width: min(68vw, 780px);
  aspect-ratio: 1;
  border: 1px solid rgb(var(--pine-ink-rgb) / .08);
  border-radius: 50%;
  pointer-events: none;
}
.onboard-gate::before { left: -28vw; top: -46vw; }
.onboard-gate::after { right: -34vw; bottom: -52vw; }
.onboard-gate.is-leaving { opacity: 0; pointer-events: none; }

body.onboarding .app-shell {
  opacity: .18;
  transform: scale(.988);
  filter: blur(2px);
  transition: opacity .6s ease, transform .7s var(--ease-out), filter .6s ease;
}

.arrival-card {
  position: relative;
  width: min(560px, 100%);
  min-height: 520px;
  padding: 34px 38px 30px;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .26);
}
.arrival-card::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -76px;
  width: 180px;
  height: 180px;
  border: 1px solid rgb(var(--leaf-rgb) / .16);
  border-radius: 50%;
}
.onboard-meter {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 31px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
}
.onboard-track {
  display: block;
  height: 2px;
  overflow: hidden;
  background: var(--line);
}
.onboard-track span {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--leaf);
  transition: width .65s var(--ease-out);
}
.onboard-mark {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid rgb(var(--pine-rgb) / .28);
  border-radius: 12px;
  color: var(--pine);
}
.onboard-mark::before,
.onboard-mark::after {
  content: "";
  position: absolute;
  background: rgb(var(--pine-rgb) / .22);
}
.onboard-mark::before { width: 1px; height: 62px; }
.onboard-mark::after { width: 62px; height: 1px; }
.onboard-mark span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pine);
  box-shadow: 0 0 0 7px var(--paper);
}
.arrival-card > .eyebrow { color: var(--leaf); }
.arrival-card h1 {
  max-width: 12ch;
  font-size: clamp(36px, 6vw, 49px);
  line-height: 1.02;
  text-wrap: balance;
}
.arrival-card .gate-sub { max-width: 46ch; font-size: 15px; }

.onboard-frame {
  min-height: 122px;
  margin-top: 24px;
  opacity: 0;
  transform: translateY(10px);
}
.onboard-frame.is-entering {
  opacity: 1;
  transform: none;
  transition: opacity .42s ease, transform .5s var(--ease-out);
}
.onboard-field { display: block; }
.onboard-field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.onboard-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 15px 16px;
  background: var(--card);
  color: var(--ink);
  font-size: 17px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.onboard-field input:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 4px rgb(var(--leaf-rgb) / .1);
  transform: translateY(-1px);
}

.onboard-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.onboard-choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.onboard-choices label {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.onboard-choices label:hover { transform: translateY(-1px); border-color: rgb(var(--leaf-rgb) / .38); }
.onboard-choice-dot {
  width: 11px;
  height: 11px;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.onboard-choices input:checked + label {
  border-color: var(--leaf);
  background: var(--leaf-soft);
  color: var(--leaf);
}
.onboard-choices input:checked + label .onboard-choice-dot {
  border-color: var(--leaf);
  background: var(--leaf);
  box-shadow: inset 0 0 0 3px var(--leaf-soft);
}
.onboard-choices input:focus-visible + label {
  outline: 2px solid var(--leaf);
  outline-offset: 2px;
}

.arrival-card .onboard-actions {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  gap: 9px;
  margin-top: 25px;
}
.arrival-card .onboard-actions button { min-height: 46px; }
.arrival-card .onboard-actions button[type="submit"] {
  margin: 0;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.arrival-card .onboard-actions button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgb(var(--pine-rgb) / .18);
}
.onboard-back {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 18px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}
.onboard-back[hidden] + #onboardSubmit { grid-column: 1 / -1; }
.arrival-card .onboard-actions .who-nevermind {
  grid-column: 1 / -1;
  min-height: 30px;
  margin: 0 auto;
}
.onboard-error { margin: 15px 0 0; }

.onboard-receipt {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  margin-top: 26px;
  border-radius: var(--tile);
  background: var(--pine);
  color: var(--pine-ink);
  animation: receipt-arrive .55s var(--ease-out) both;
}
.onboard-receipt span { min-width: 0; padding: 16px; border-left: 1px solid rgb(var(--pine-ink-rgb) / .13); }
.onboard-receipt span:first-child { border-left: 0; }
.onboard-receipt small {
  display: block;
  margin-bottom: 6px;
  color: rgb(var(--pine-ink-rgb) / .52);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.onboard-receipt strong { display: block; overflow: hidden; font-family: var(--serif); font-size: 18px; font-weight: 400; text-overflow: ellipsis; }
@keyframes receipt-arrive {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.ledger-row.is-new { animation: row-filed 1.2s var(--ease-out) both; }
@keyframes row-filed {
  0% { opacity: 0; transform: translateY(12px); background: rgba(196, 154, 43, .32); }
  48% { opacity: 1; transform: none; background: rgba(196, 154, 43, .18); }
  100% { background: transparent; }
}

/* Returning liaisons get a threshold moment, not an automatic manual. */
.arrival-gate {
  position: fixed;
  inset: 0;
  z-index: 360;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--pine);
  color: var(--pine-ink);
  cursor: default;
  opacity: 0;
  transition: opacity .7s ease;
}
.arrival-gate[hidden] { display: none; }
.arrival-gate.is-ready { opacity: 1; }
.arrival-gate.is-leaving { opacity: 0; pointer-events: none; }
.arrival-gate::before,
.arrival-gate::after {
  content: "";
  position: absolute;
  width: min(72vw, 820px);
  aspect-ratio: 1;
  border: 1px solid rgb(var(--pine-ink-rgb) / .1);
  border-radius: 50%;
  transform: scale(.72);
  opacity: 0;
  transition: transform 2.6s var(--ease-out), opacity 1.2s ease;
}
.arrival-gate::after { width: min(48vw, 540px); }
.arrival-gate.is-ready::before,
.arrival-gate.is-ready::after { transform: scale(1); opacity: 1; }
.arrival-beat { position: relative; z-index: 1; max-width: 760px; padding: 32px; text-align: center; }
.arrival-symbol {
  position: relative;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin: 0 auto 28px;
  border: 1px solid rgb(var(--pine-ink-rgb) / .34);
  border-radius: 13px;
  opacity: 0;
  transform: scale(.8) rotate(-5deg);
  transition: opacity .8s ease .1s, transform 1s var(--ease-out) .1s;
}
.arrival-symbol span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.arrival-gate.is-ready .arrival-symbol { opacity: 1; transform: none; }
.arrival-hello,
.arrival-line {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  text-wrap: balance;
}
.arrival-hello {
  font-size: clamp(42px, 7vw, 72px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .8s ease .2s, transform 1s var(--ease-out) .2s;
}
.arrival-gate.is-ready .arrival-hello { opacity: 1; transform: none; }
.arrival-line {
  max-width: 30ch;
  margin: 12px auto 0;
  color: rgb(var(--pine-ink-rgb) / .62);
  font-size: clamp(19px, 3vw, 27px);
  opacity: 0;
  transform: translateY(9px);
  transition: opacity .8s ease, transform .9s var(--ease-out);
}
.arrival-gate.show-line .arrival-line { opacity: 1; transform: none; }
.arrival-skip {
  position: absolute;
  right: 22px;
  bottom: 20px;
  z-index: 2;
  border: 1px solid rgb(var(--pine-ink-rgb) / .2);
  border-radius: 999px;
  padding: 9px 14px;
  background: transparent;
  color: rgb(var(--pine-ink-rgb) / .62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.arrival-skip:hover { color: var(--pine-ink); border-color: rgb(var(--pine-ink-rgb) / .5); }

/* The room names the state of its connection instead of silently turning
   an unavailable vault into a convincing row of zeroes. */
.signal-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 250, .76);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.signal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgb(var(--amber-rgb) / .09);
}
.signal-status.is-loading .signal-dot { animation: signal-breathe 1.2s ease-in-out infinite alternate; }
.signal-status.is-live { color: var(--leaf); border-color: rgb(var(--leaf-rgb) / .24); background: var(--leaf-soft); }
.signal-status.is-live .signal-dot { background: var(--leaf); box-shadow: 0 0 0 3px rgb(var(--leaf-rgb) / .11); }
.signal-status.is-partial { color: var(--amber); background: var(--amber-soft); border-color: rgb(var(--amber-rgb) / .2); }
.signal-status.is-offline { color: #8d493b; background: var(--clay-soft); border-color: rgba(141, 73, 59, .2); }
.signal-status.is-offline .signal-dot { background: #a04b3a; box-shadow: 0 0 0 3px rgba(160, 75, 58, .1); }
@keyframes signal-breathe { to { opacity: .32; transform: scale(.72); } }

/* Every direct human mutation answers in place. Browser alerts break the
   room; these receipts stay attached to the hand that made the change. */
.form-status {
  margin: 5px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.form-status.is-working { color: var(--amber); border-color: rgb(var(--amber-rgb) / .2); background: var(--amber-soft); }
.form-status.is-success { color: var(--leaf); border-color: rgb(var(--leaf-rgb) / .2); background: var(--leaf-soft); animation: receipt-arrive .4s var(--ease-out) both; }
.form-status.is-warning { color: var(--amber); border-color: rgb(var(--amber-rgb) / .2); background: var(--amber-soft); }
.form-status.is-error { color: #8d493b; border-color: rgba(141, 73, 59, .2); background: var(--clay-soft); }
.pin.is-new,
.prod-item.is-new { animation: mark-arrive 1.2s var(--ease-out) both; }
@keyframes mark-arrive {
  0% { opacity: 0; transform: translateY(10px); box-shadow: 0 0 0 0 rgba(196, 154, 43, .28); }
  50% { opacity: 1; transform: none; box-shadow: 0 0 0 5px rgba(196, 154, 43, .14); }
  100% { box-shadow: none; }
}

/* The commercial and creative lineage lives in Reference, not in the
   cohort's daily path. It explains portability without turning the room
   into a pitch deck. */
.portable-note {
  position: relative;
  overflow: hidden;
  margin-top: 34px;
  padding: 24px;
  border-radius: var(--radius);
  background:
    var(--pine);
  color: var(--pine-ink);
}
.portable-note::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -92px;
  width: 210px;
  height: 210px;
  border: 1px solid rgb(var(--pine-ink-rgb) / .11);
  border-radius: 50%;
}
.portable-note .eyebrow { color: rgb(var(--pine-ink-rgb) / .58); }
.portable-note h2 {
  position: relative;
  z-index: 1;
  max-width: 16ch;
  margin: 4px 0 10px;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 400;
  line-height: 1.05;
}
.portable-note > p:not(.eyebrow):not(.practice-line) { max-width: 58ch; color: rgb(var(--pine-ink-rgb) / .75); }
.portable-layers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid rgb(var(--pine-ink-rgb) / .14);
  border-radius: 12px;
}
.portable-layers span { padding: 13px 14px; border-left: 1px solid rgb(var(--pine-ink-rgb) / .14); font-size: 12px; color: rgb(var(--pine-ink-rgb) / .68); }
.portable-layers span:first-child { border-left: 0; }
.portable-layers b { display: block; margin-bottom: 3px; color: var(--pine-ink); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.practice-line { margin: 18px 0 0; color: rgb(var(--pine-ink-rgb) / .52); font-size: 12px; }

@media (max-width: 600px) {
  .onboard-gate { align-items: flex-end; padding: 12px; }
  .arrival-card { min-height: 0; max-height: calc(100dvh - 24px); overflow-y: auto; padding: 24px 20px 18px; border-radius: 20px; }
  .onboard-meter { margin-bottom: 22px; }
  .onboard-mark { width: 38px; height: 38px; margin-bottom: 15px; }
  .arrival-card h1 { max-width: 13ch; font-size: 37px; }
  .arrival-card .gate-sub { font-size: 14px; }
  .onboard-frame { min-height: 106px; margin-top: 18px; }
  .onboard-choices { grid-template-columns: 1fr; gap: 7px; }
  .onboard-choices label { min-height: 48px; }
  .arrival-card .onboard-actions { margin-top: 18px; }
  .onboard-receipt { grid-template-columns: 1fr; }
  .onboard-receipt span { padding: 11px 14px; border-left: 0; border-top: 1px solid rgb(var(--pine-ink-rgb) / .13); }
  .onboard-receipt span:first-child { border-top: 0; }
  .arrival-skip { right: 50%; transform: translateX(50%); bottom: 18px; }
  .signal-status { gap: 5px; padding: 5px 8px; font-size: 10px; }
  .portable-note { padding: 21px 18px; }
  .portable-layers { grid-template-columns: 1fr; }
  .portable-layers span { border-left: 0; border-top: 1px solid rgb(var(--pine-ink-rgb) / .14); }
  .portable-layers span:first-child { border-top: 0; }
}

@media (max-width: 340px) {
  .signal-label { display: none; }
  .signal-status { width: 30px; justify-content: center; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   THE CREW'S BUILD — Sep 23 2026.
   Five rooms, the seal, a page behind every name, the calendar, the
   line of who's around, needs and offers on one bench, marks and
   feedback in the wireless. Same paper, same pine; new furniture.
   ============================================================ */

/* ---- the tab bar: four rooms and a hole for the seal ---- */
.tab-bar { align-items: flex-end; padding-top: 6px; }
.tab-seal-slot {
  flex: 0 0 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 2px;
  color: var(--pine-ink);
  opacity: 0.55;
}
.tab-seal-slot > span { font-size: 10px; font-weight: 600; letter-spacing: 0.02em; }
body.at-home .tab-seal-slot { opacity: 1; }
body.at-home .tab-seal-slot > span { font-weight: 700; }

/* ---- the seal ---- */
#barSummon.seal {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  top: auto;
  right: auto;
  transform: translateX(-50%);
  z-index: 260;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background:
    var(--leaf);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 26px rgb(var(--ground-rgb) / 0.4), 0 0 0 1px rgb(var(--pine-rgb) / 0.35);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s ease, opacity 0.25s ease;
}
#barSummon.seal svg { width: 30px; height: 30px; stroke-width: 2.1; }
#barSummon.seal:active { transform: translateX(-50%) scale(0.94); }
#barSummon.seal:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
body.at-home #barSummon.seal { box-shadow: 0 10px 26px rgb(var(--ground-rgb) / 0.4), 0 0 0 1px rgb(var(--pine-rgb) / 0.35), 0 0 0 6px rgb(var(--leaf-rgb) / 0.18); }
#barSummon.seal[hidden], body.chatting #barSummon.seal { display: none; }
body.ducked #barSummon.seal { opacity: 0.85; }
body.kb #barSummon.seal { display: none; }

#barSummon .summon-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--paper);
}
#barSummon .summon-count[hidden] { display: none; }

.seal-hint {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  animation: hint-in .4s var(--ease-out) both;
}
.seal-hint::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--ink);
}
.seal-hint[hidden] { display: none; }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 1159px) {
  #barSummon.seal { top: auto; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
  body.has-bar .workspace { padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 1160px) {
  #barSummon.seal { left: auto; right: 44px; bottom: 34px; transform: none; width: 60px; height: 60px; }
  #barSummon.seal:active { transform: scale(0.94); }
  .seal-hint { left: auto; right: 0; transform: none; }
  .seal-hint::after { left: auto; right: 22px; transform: none; }
  @keyframes hint-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ---- the who chip is a door now, not a switch ---- */
a.who-chip { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
a.who-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.55; }
a.who-chip.is-current { background: var(--leaf); color: #fff; }

/* ---- Now: the line of who's around ---- */
.now-strip {
  margin: 0 0 22px;
  padding: 12px 14px 12px;
  border-radius: var(--tile);
  background: var(--leaf-soft);
  border: 1px solid rgb(var(--leaf-rgb) / 0.28);
}
.now-strip .eyebrow { color: var(--leaf); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.now-strip .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 4px rgb(var(--leaf-rgb) / 0.18); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgb(var(--leaf-rgb) / 0.2); } 50% { box-shadow: 0 0 0 7px rgb(var(--leaf-rgb) / 0.06); } }
.now-strip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.now-chip {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 0 8px;
  align-items: baseline;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgb(var(--leaf-rgb) / 0.25);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}
.now-chip strong { font-weight: 700; }
.now-chip span { color: var(--ink); }
.now-chip em { grid-column: 1 / -1; font-style: normal; font-size: 11px; color: var(--muted); }
.now-chip:hover { border-color: var(--leaf); }
.now-chip--more { display: inline-flex; align-items: center; color: var(--leaf); font-weight: 700; }

/* ---- Now: the feed ---- */
.wk-feed { display: flex; flex-direction: column; }
.feed-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}
.feed-row:last-child { border-bottom: 0; }
.feed-row strong { font-weight: 700; white-space: nowrap; }
.feed-row span { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-row em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.feed-row:hover span { color: var(--ink); }
.feed-empty { margin: 0; font-size: 13px; color: var(--muted); }
.wk-row--plan span { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; color: var(--ink); }
.wk-row-plan {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--leaf);
  text-decoration: none;
  padding: 1px 7px;
  border: 1px solid rgb(var(--leaf-rgb) / 0.4);
  border-radius: 999px;
}
.principle-line {
  margin: 30px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.6;
  max-width: 62ch;
}
.principle-line strong { font-family: var(--serif); font-weight: 400; font-size: 22px; display: block; margin-bottom: 4px; }
#view-week .wk-tail { display: grid; grid-template-columns: 1fr; gap: 22px; margin-top: 30px; }
#view-week .wk-tail .section-eyebrow { margin: 0 0 10px; }
@media (min-width: 1160px) {
  #view-week .principle-line { grid-area: notes; margin-top: var(--step); }
  #view-week .field-notes { grid-row: 9; grid-column: 1 / -1; }
  #view-week.is-active {
    grid-template-areas:
      "greet greet"
      "banner banner"
      "seen  seen"
      "strip strip"
      "head  ask"
      "lead  ask"
      "stats ask"
      "tail  tail"
      "notes notes";
  }
  #view-week .now-strip { grid-area: strip; margin: 18px 0 0; }
}

/* ---- People: the row that's you, and who's staying after ---- */
.ledger-person h3 small {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgb(var(--pine-ink-rgb) / 0.14);
  color: var(--pine-ink);
}
#view-coming .ledger-row.is-me { background: rgba(255,255,255,0.05); }
.overlap-row--after { margin-top: 6px; padding-top: 8px; border-top: 1px dashed rgb(var(--leaf-rgb) / 0.3); }
.overlap-row--after strong { font-size: 15px; color: var(--leaf); }

/* ---- Places: the check-in desk ---- */
.checkin-desk {
  margin: 0 0 20px;
  border: 1px solid rgb(var(--leaf-rgb) / 0.3);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.checkin-strip { padding: 14px 16px 6px; }
.checkin-strip .eyebrow { color: var(--leaf); display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.checkin-strip .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); animation: pulse 1.8s ease-in-out infinite; }
.checkin-strip.is-empty { padding-bottom: 12px; }
.checkin-empty { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); max-width: 58ch; }
.checkin-empty strong { color: var(--ink); }
.checkin-row-live {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.checkin-row-live:first-of-type { border-top: 0; }
.checkin-row-live strong { font-weight: 700; font-size: 14px; }
.checkin-body { min-width: 0; display: flex; flex-direction: column; }
.checkin-where { font-size: 14px; }
.checkin-until { font-size: 12px; color: var(--muted); }
.checkin-row-live.is-me { background: rgb(var(--leaf-rgb) / 0.06); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.checkin-left, .me-act {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.checkin-left:hover, .me-act:hover { border-color: var(--leaf); color: var(--leaf); }
.me-act--quiet { border-color: transparent; background: none; color: var(--muted); padding: 2px 6px; }
.checkin-form { padding: 12px 16px 14px; border-top: 1px dashed var(--line); background: transparent; }
.checkin-form .eyebrow { color: var(--leaf); margin-bottom: 8px; }
.checkin-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 8px; }
.checkin-row--tail { margin-bottom: 0; }
.checkin-row input, .checkin-row select {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  min-width: 0;
}
.checkin-row select { font-size: 13px; }
.checkin-row button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--leaf);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.checkin-form .form-status { margin: 8px 0 0; }

/* ---- Plans: the calendar ---- */
.plan-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border-radius: var(--tile);
  background: var(--pine);
  color: var(--pine-ink);
  margin-bottom: 16px;
}
.plan-stat { padding: 13px 15px; border-left: 1px solid rgb(var(--pine-ink-rgb) / 0.13); }
.plan-stat:first-child { border-left: 0; }
.plan-stat strong { display: block; font-family: var(--serif); font-size: var(--dial); font-weight: 400; line-height: 1; }
.plan-stat span { display: block; margin-top: 4px; font-size: 10px; color: rgb(var(--pine-ink-rgb) / 0.58); }

.day-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 10px;
  margin: 0 0 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-chip {
  position: relative;
  flex: 0 0 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 4px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}
.day-chip span { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.day-chip strong { font-family: var(--serif); font-size: 21px; font-weight: 400; color: var(--ink); line-height: 1.1; }
.day-chip em {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--leaf);
  color: #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
}
.day-chip.is-on { background: var(--pine); border-color: var(--pine); color: rgb(var(--pine-ink-rgb) / 0.7); }
.day-chip.is-on strong { color: var(--pine-ink); }
.day-chip--anchor { border-style: double; border-width: 3px; border-color: rgb(var(--amber-rgb) / 0.45); }
.day-chip--anchor span { color: var(--amber); }
.day-chip--all, .day-chip--shelf { flex-basis: 58px; }
.day-chip--shelf strong { font-size: 15px; padding-top: 4px; }
.day-chip--all strong { font-size: 15px; padding-top: 4px; }
.day-chip:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgb(var(--pine-rgb) / 0.16);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(180deg, transparent 0 31px, rgb(var(--pine-rgb) / 0.06) 31px 32px),
    var(--paper-ruled);
}
.plan-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 2px 4px;
  border-bottom: 1px solid rgb(var(--pine-rgb) / 0.28);
  margin-top: 8px;
}
.plan-day-head:first-child { margin-top: 0; }
.plan-day-head strong { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.plan-day-head span { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.plan-day-head.is-anchor strong { color: var(--amber); }
.plan-day-head.is-anchor span { color: var(--amber); }
.plan-day-head--shelf { margin-top: 22px; border-bottom-style: dashed; }

.plan-card {
  position: relative;
  padding: 16px 18px 14px;
  border-radius: 3px;
  background: var(--note);
  box-shadow: 0 8px 20px rgb(var(--pine-rgb) / 0.12), 0 1px 1px rgb(var(--pine-rgb) / 0.14);
}
.plan-card--idea { background: var(--note-warm); transform: rotate(-0.3deg); }
.plan-card--idea:nth-child(even) { transform: rotate(0.35deg); }
.plan-card.is-new { animation: mark-land .7s var(--ease-out) both; }
@keyframes mark-land { from { transform: translateY(-6px) scale(0.985); box-shadow: 0 0 0 6px rgb(var(--amber-rgb) / 0.18); } to { transform: none; } }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.plan-kind { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--leaf); }
.plan-card--idea .plan-kind { color: var(--amber); }
.plan-by { font-size: 11px; color: var(--muted); }
.plan-card h3 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 400; line-height: 1.15; }
.plan-meta { margin: 6px 0 0; font-size: 13px; color: var(--ink); font-weight: 600; }
.plan-meta a { color: var(--leaf); }
.plan-note { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink); }
.plan-in { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 12px; }
.plan-in-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--leaf); margin-right: 3px; }
.plan-in-label--none { color: var(--muted); }
.plan-in-name { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--leaf-soft); color: var(--leaf); }
.plan-in-name.is-me { background: var(--leaf); color: #fff; }
.plan-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.plan-join {
  border: 1px solid var(--leaf);
  background: var(--card);
  color: var(--leaf);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.plan-join.is-on { background: var(--leaf); color: #fff; }
.plan-join:disabled { opacity: 0.6; }
.plan-date-btn, .plan-remove {
  border: 0;
  background: none;
  color: var(--amber);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 2px;
}
.plan-remove { color: var(--muted); margin-left: auto; font-weight: 600; }
.plan-remove:hover { color: #8c5a45; }
.plan-date-inline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.plan-date-inline input { border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font: inherit; font-size: 13px; background: var(--card); min-width: 0; }
.plan-date-inline input[type="text"] { flex: 1 1 120px; }
.plan-date-inline button { border: 0; border-radius: 999px; padding: 7px 14px; background: var(--amber); color: #fff; font-weight: 700; cursor: pointer; }
.plan-empty { padding: 26px 20px; text-align: center; }
.plan-empty h3 { margin: 4px auto 8px; max-width: 420px; font-family: var(--serif); font-size: 26px; font-weight: 400; }
.plan-empty p:last-of-type { margin: 0; font-size: 13px; color: var(--muted); }
.plan-empty .eyebrow { color: var(--leaf); }
.plan-empty-go { margin-top: 14px; border: 0; background: none; color: var(--leaf); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.plan-empty--shelf { padding: 18px; }
.plan-empty--shelf h3 { font-size: 22px; }
.field-opt { font-weight: 400; color: var(--muted); font-size: 11px; margin-left: 4px; text-transform: none; letter-spacing: 0; }
@media (min-width: 1160px) {
  #view-plans.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-template-rows: auto auto auto auto auto auto 1fr;
    grid-template-areas:
      "slot    slot"
      "eyebrow eyebrow"
      "title   title"
      "story   form"
      "status  form"
      "strip   form"
      "list    form"
      "hint    form";
    column-gap: 24px;
    align-content: start;
  }
  #view-plans .patch-slot { grid-area: slot; }
  #view-plans > .story-eyebrow { grid-area: eyebrow; }
  #view-plans > .chapter-title { grid-area: title; }
  #view-plans .story { grid-area: story; }
  #view-plans .plan-status { grid-area: status; margin: 0 0 12px; }
  #view-plans .day-strip { grid-area: strip; }
  #view-plans .plan-list { grid-area: list; align-self: start; }
  #view-plans .soft-note { grid-area: hint; }
  #view-plans .entry-form { grid-area: form; margin-top: 0; position: sticky; top: 0; align-self: start; }
  .plan-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .plan-day-head { grid-column: 1 / -1; }
  .plan-empty { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .plan-list { padding: 12px; }
  .plan-status { margin: 18px 0 14px; }
}

/* ---- Making: two benches, need and have ---- */
.kind-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper);
}
.kind-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.kind-switch label {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: background .15s ease, color .15s ease;
}
.kind-switch input:checked + label { background: var(--pine); color: var(--pine-ink); }
.kind-switch input:focus-visible + label { outline: 2px solid var(--amber); outline-offset: -2px; }
.bench { display: flex; flex-direction: column; gap: 12px; }
.bench + .bench { margin-top: 6px; }
.bench-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 2px 6px;
  border-bottom: 2px solid rgb(var(--amber-rgb) / 0.35);
}
.bench-head strong { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.bench-head span { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }
.bench--have .bench-head { border-bottom-color: rgb(var(--leaf-rgb) / 0.4); }
.bench--have .bench-head span { color: var(--leaf); }
.bench--have .prod-lane { border-color: rgb(var(--leaf-rgb) / 0.25); }
.bench--have .prod-lane-head { background: rgb(var(--leaf-rgb) / 0.07); border-bottom-color: rgb(var(--leaf-rgb) / 0.18); }
.bench--have .prod-lane-head span { color: var(--leaf); }
.prod-kind {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--leaf);
  padding: 1px 7px;
  border: 1px solid rgb(var(--leaf-rgb) / 0.4);
  border-radius: 999px;
}
.prod-item--have .prod-check { border-color: var(--leaf); }
.prod-remove { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; padding: 0; }
.prod-remove:hover { color: #8c5a45; }
.prod-lane-head h3 small {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgb(var(--amber-rgb) / 0.12);
  color: var(--amber);
}

/* ---- the keep button, everywhere something can be kept ---- */
.keep-btn {
  border: 0;
  background: none;
  padding: 0 2px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  vertical-align: baseline;
}
.keep-btn::before { content: "☐ "; font-size: 11px; }
.keep-btn.is-kept { color: var(--leaf); }
.keep-btn.is-kept::before { content: "☑ "; }
.keep-btn:hover { color: var(--leaf); }
.plan-acts .keep-btn { padding: 4px 6px; }

/* ---- your page ---- */
.me-tally {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  overflow: hidden;
  border-radius: var(--tile);
  background: var(--pine);
  color: var(--pine-ink);
  margin: 0 0 18px;
}
.me-dial { padding: 13px 12px; border-left: 1px solid rgb(var(--pine-ink-rgb) / 0.13); min-width: 0; }
.me-dial:first-child { border-left: 0; }
.me-dial strong { display: block; font-family: var(--serif); font-size: var(--dial); font-weight: 400; line-height: 1; }
.me-dial span { display: block; margin-top: 4px; font-size: 10px; color: rgb(var(--pine-ink-rgb) / 0.6); line-height: 1.3; }
.me-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  margin-bottom: 14px;
}
.me-card > .eyebrow { margin-bottom: 10px; }
.me-row-card { background: var(--leaf-soft); border-color: rgb(var(--leaf-rgb) / 0.3); }
.me-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.me-row .field { margin: 0; }
.me-row-note { grid-column: 1 / -1; }
.me-row .form-status { grid-column: 1 / -1; margin: 0; }
.me-row-acts { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed rgb(var(--leaf-rgb) / 0.3); }
.me-row-acts button { border: 0; border-radius: 999px; padding: 9px 20px; background: var(--pine); color: var(--pine-ink); font-weight: 700; cursor: pointer; }
.me-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
.me-grid .me-card { margin: 0; }
.me-list { display: flex; flex-direction: column; }
.me-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.me-item:first-child { border-top: 0; }
.me-item strong { font-weight: 600; grid-column: 1; }
.me-item span { grid-column: 1; font-size: 12px; color: var(--muted); }
.me-item .me-go, .me-item .me-act { grid-column: 2; grid-row: 1 / span 2; }
.me-item .me-act + .me-go { grid-column: 3; }
.me-item:has(.me-act + .me-go) { grid-template-columns: 1fr auto auto; }
.me-go { color: var(--leaf); text-decoration: none; font-weight: 700; padding: 4px 6px; }
.me-item--empty { display: block; color: var(--muted); font-size: 13px; }
.me-item--empty a { color: var(--leaf); }
.me-item.is-done strong { text-decoration: line-through; color: var(--muted); }
.me-item.is-live strong { color: var(--leaf); }
.me-note strong { font-weight: 500; white-space: pre-wrap; }
.me-notebook { background: var(--note-warm); border-color: rgb(var(--amber-rgb) / 0.25); }
.note-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  font: inherit;
  font-size: 14px;
  background: var(--card);
  color: var(--ink);
  resize: vertical;
  min-height: 56px;
}
.note-acts { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.note-acts button { border: 0; border-radius: 999px; padding: 8px 18px; background: var(--pine); color: var(--pine-ink); font-weight: 700; cursor: pointer; }
.note-form .form-status { margin-top: 6px; }
.note-form { padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px dashed rgb(var(--amber-rgb) / 0.3); }
.me-switch-line { margin-top: 10px; }
#view-me .feed-row { grid-template-columns: auto 1fr auto; }
@media (min-width: 760px) {
  .me-grid { grid-template-columns: repeat(3, 1fr); }
  .me-row { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 1160px) {
  #view-me.is-active { max-width: 1040px; }
}
@media (max-width: 480px) {
  .me-tally { grid-template-columns: repeat(3, 1fr); }
  .me-dial:nth-child(4), .me-dial:nth-child(5) { border-top: 1px solid rgb(var(--pine-ink-rgb) / 0.13); }
  .me-dial:nth-child(4) { border-left: 0; }
  .me-row { grid-template-columns: 1fr; }
}

/* ---- the log: feedback from the crew ---- */
.feedback-list { display: flex; flex-direction: column; gap: 10px; }
.fb-row {
  position: relative;
  padding: 12px 14px;
  border-radius: 3px;
  background: var(--note-warm);
  box-shadow: 0 6px 16px rgb(var(--pine-rgb) / 0.08);
}
.fb-meta { margin: 0 0 3px; font-size: 11px; color: var(--muted); }
.fb-want { margin: 0; font-size: 15px; line-height: 1.5; }
.fb-said { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.fb-row .me-act { position: absolute; top: 10px; right: 10px; }

/* ---- the wireless: marks and filings ---- */
.msg.ask.mark { background: var(--leaf-soft); border-color: var(--leaf); }
.msg.ask.mark .ask-flag { color: var(--leaf); }
.msg.ask.filed { background: var(--card); border-color: var(--line); }
.msg.ask.filed .ask-flag { color: var(--amber); }
.msg.ask.filed .ask-sum { font-size: 13px; color: var(--muted); }
.ask-done--err { color: #8c5a45; }

/* ---- onboarding: the wider receipt row ---- */
.onboard-receipt .receipt-wide { grid-column: 1 / -1; }

/* ---- reduced motion: nothing pulses, nothing lands ---- */
@media (prefers-reduced-motion: reduce) {
  .now-strip .eyebrow::before, .checkin-strip .eyebrow::before { animation: none; }
  .plan-card.is-new { animation: none; }
  .seal-hint { animation: none; }
  .plan-card--idea, .plan-card--idea:nth-child(even) { transform: none; }
}

/* narrow phones: the check-in desk stacks so the place gets the width */
@media (max-width: 480px) {
  .checkin-row { grid-template-columns: 1fr; }
  .checkin-row--tail { grid-template-columns: 1fr auto; }
}

/* long labels wrap the action row instead of running out of the form */
.ask-actions { flex-wrap: wrap; }
.ask-actions button { margin-left: auto; max-width: 100%; white-space: normal; text-align: center; }

/* numbers read down a column line up (departure-board discipline) */
.ledger-when, .checkin-until, .plan-meta, .feed-row em, .me-item span, .dispatch-dial strong,
.workbench-stat strong, .plan-stat strong, .me-dial strong, .open-status-item strong,
.day-chip strong, .wk-row strong, .side-count-n, .rail-count-n { font-variant-numeric: tabular-nums; }

/* ============================================================
   MOTION — Sep 24. One spring (k=170, c=22, m=1) for everything that
   arrives or answers a tap. The JS samples the same curve; this is the
   CSS-side copy for the few things CSS owns.
   ============================================================ */
:root {
  --spring: linear(0.0, 0.0171, 0.0614, 0.1236, 0.1969, 0.2756, 0.3558, 0.4343, 0.5091, 0.5788, 0.6427, 0.7001, 0.7512, 0.796, 0.8348, 0.8681, 0.8963, 0.92, 0.9396, 0.9556, 0.9686, 0.9789, 0.9871, 0.9933, 0.9981, 1.0015, 1.0039, 1.0056, 1.0066, 1.007, 1.0072, 1.007, 1.0067, 1.0063, 1.0057, 1.0052, 1.0046, 1.004, 1.0035, 1.003, 1.0025, 1.0021, 1.0018, 1.0014, 1.0012, 1.0009, 1.0007, 1.0006, 1.0004);
}
@supports (animation-timing-function: linear(0, 1)) {
  .gate:not([hidden]) .gate-card { animation: gate-arrive .72s var(--spring) both; }
  .ledger-row.is-new { animation-timing-function: var(--spring); }
  .pin.is-new, .prod-item.is-new, .plan-card.is-new { animation-timing-function: var(--spring); }
  .onboard-track span { transition-timing-function: var(--spring); }
  .plan-join, .checkin-left, .me-act, .keep-btn, .fchip, .day-chip { transition: transform .32s var(--spring), background .18s ease, color .18s ease, border-color .18s ease; }
  .plan-join:active, .checkin-left:active, .me-act:active, .fchip:active, .day-chip:active { transform: scale(.94); }
  .who-btn, .onboard-choices label { transition: transform .32s var(--spring), background .18s ease, border-color .18s ease, color .18s ease; }
  .who-btn:active, .onboard-choices label:active { transform: scale(.97); }
}

/* the seal: a tap sends one ring out; the press is on the glyph, so the
   centring transform underneath is never touched */
#barSummon.seal { overflow: visible; }
#barSummon.seal::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgb(var(--leaf-rgb) / 0.7);
  opacity: 0;
  pointer-events: none;
}
#barSummon.seal.is-rippling::after { animation: seal-ring .7s var(--ease-out) both; }
@keyframes seal-ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }
#barSummon.seal svg { transition: transform .32s var(--spring, var(--ease-out)); }
#barSummon.seal:active svg { transform: scale(.86); }

/* the crosshair fills when the marks are filed */
.arrival-card .onboard-mark::before, .arrival-card .onboard-mark::after { transition: background .5s ease, transform .7s var(--spring, var(--ease-out)); }
.arrival-card.is-filed .onboard-mark { border-color: var(--leaf); color: var(--leaf); }
.arrival-card.is-filed .onboard-mark::before, .arrival-card.is-filed .onboard-mark::after { background: var(--leaf); }
.arrival-card.is-filed .onboard-mark::before { transform: scaleY(1.25); }
.arrival-card.is-filed .onboard-mark::after { transform: scaleX(1.25); }
.arrival-card.is-filed .onboard-mark span { background: var(--leaf); }

/* the mic has three states, and each one says what it is */
.bar-mic { transition: background .18s ease, box-shadow .18s ease, color .18s ease; }
.bar-mic.recording {
  background: #b7412f;
  color: #fff;
  box-shadow: 0 0 0 0 rgba(183,65,47,0.55);
  animation: rec-pulse 1.4s ease-out infinite;
}
.bar-mic.recording svg rect { fill: currentColor; }
@keyframes rec-pulse { 0% { box-shadow: 0 0 0 0 rgba(183,65,47,0.55); } 70% { box-shadow: 0 0 0 10px rgba(183,65,47,0); } 100% { box-shadow: 0 0 0 0 rgba(183,65,47,0); } }
.bar-mic.working { opacity: .55; cursor: progress; animation: blink 1.1s infinite; }
.bar-mic:disabled { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  #barSummon.seal.is-rippling::after, .bar-mic.recording, .bar-mic.working { animation: none; }
  .plan-join, .checkin-left, .me-act, .keep-btn, .fchip, .day-chip, .who-btn, .onboard-choices label, #barSummon.seal svg { transition: none; }
}

/* the wave rides above the words; the row wraps to make room */
.bar-row { flex-wrap: wrap; }
.bar-row > #sayWave { order: -1; flex: 1 0 100%; }
/* the reply points at a room */
.msg-go {
  display: inline-block;
  margin: 8px 0 0;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgb(var(--leaf-rgb) / 0.5);
  color: var(--leaf);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
@media (hover: hover) { .msg-go:hover { background: var(--leaf-soft); } }

/* the say box: one line that grows, newest words always in view */
#say {
  display: block;
  flex: 1 1 120px;
  min-width: 0;
  resize: none;
  height: 42px;
  max-height: 130px;
  line-height: 22px;
  padding: 10px 12px;
  overflow-y: hidden;
  font: inherit;
  font-size: 16px;
  scrollbar-width: thin;
}
#say::-webkit-scrollbar { width: 6px; }
#say::-webkit-scrollbar-thumb { background: rgb(var(--pine-ink-rgb) / 0.25); border-radius: 999px; }
.bar-row { align-items: flex-end; }
.bar-mic, .bar-send, .bar-count { align-self: flex-end; margin-bottom: 3px; }
#send:disabled { opacity: .55; cursor: progress; }

/* ============================================================
   THE WIRELESS, reviewed against the keeper's phone (Sep 24 evening).
   ============================================================ */
/* 1. No backdrop blur on a phone: WebKit mirrors the page at the blur's
      edge when the keyboard rises, and it showed through the keyboard
      toolbar as upside-down text. A plain dimming layer does the job. */
@media (max-width: 1159px) {
  #scrim, body.chatting #scrim { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(23, 23, 23, 0.42); }
  .bar-row, body.chatting #bar { -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.chatting #bar { background: var(--ground); }
}
/* 2. The rail reads as one instrument: mic, words, send, on one baseline;
      the wave is a hairline strip inside the rail, not a second bar. */
.bar-row { padding: 6px 6px 6px 6px; gap: 6px; }
#sayWave { height: 16px; margin: 4px 6px 2px; border-radius: 6px; background: transparent; opacity: .9; }
#say { padding: 10px 10px; }
#say::placeholder { color: rgb(var(--pine-ink-rgb) / 0.42); }
body.recording #say::placeholder { color: rgba(228, 205, 142, 0.75); }
.bar-send { transition: background .18s ease, color .18s ease, opacity .18s ease; }
.bar-send.has-text, body.recording .bar-send { background: #e4cd8e; color: var(--pine); }
/* 3. The stack: a touch bigger on a phone, quieter chrome. */
@media (max-width: 1159px) {
  .msg { font-size: 15px; line-height: 1.5; max-width: 88%; }
  .msg .msg-copy { opacity: 0; }
  .msg:active .msg-copy { opacity: .8; }
  #stack { row-gap: 14px; }
}
.msg.theirs.room { background: var(--leaf-soft); border-color: rgb(var(--leaf-rgb) / 0.35); color: var(--ink); }
.msg .msg-copy[hidden] { display: none; }
/* 4. The keyboard: the rail rides the visual viewport (JS), the stack yields height. */
body.kb #stack { max-height: 34vh; }

/* ============================================================
   QA PASS 1 — structure, measured (Sep 24 night).
   ============================================================ */
/* People: the overlap watch breathes before the board on every width */
.overlap-signals { margin: 0 0 16px; }

/* Now on a desk: every block has a named seat; nothing auto-places into
   another's row (the liaison desk was landing on top of who's-opened-it,
   and the principle on top of the field notes) */
@media (min-width: 1160px) {
  #view-week.is-active {
    grid-template-areas:
      "greet  greet"
      "banner banner"
      "tips   tips"
      "seen   seen"
      "strip  strip"
      "head   ask"
      "lead   ask"
      "stats  ask"
      "tail   tail"
      "notes  notes"
      "fnotes fnotes";
  }
  #view-week .req-banner { grid-area: banner; }
  #view-week .admin-tips { grid-area: tips; }
  #view-week .seen-card { grid-area: seen; }
  #view-week .now-strip { grid-area: strip; }
  #view-week .principle-line { grid-area: notes; margin-top: var(--step); }
  #view-week .field-notes { grid-area: fnotes; margin-top: var(--step); }
}

/* the bench ring: 26px to look at, 44px to hit */
.prod-check { position: relative; width: 26px; height: 26px; }
.prod-check::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; }

/* orphans: paragraphs set pretty, headings balanced (progressive) */
p, .plan-note, .role-body, .role-how, .fb-want, .fb-said, .me-item strong, .ask-hint, .field-hint, .checkin-empty, .ledger-empty { text-wrap: pretty; }
h1, h2, h3, .plan-card h3, .wk-ask-head, .map-empty h3, .workbench-empty h3, .plan-empty h3 { text-wrap: balance; }

/* the chat owns the touch while it's open: the stack scrolls, the page
   does not (scroll chaining contained; the dim layer takes no gestures) */
body.chatting { overflow: hidden; }
#stack { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body.chatting #scrim { touch-action: none; }
@media (max-width: 1159px) {
  body.chatting .workspace, body.chatting .app-shell { overflow: hidden; }
}
/* every tappable thing in the chat answers on the first touch */
.msg-go, .patch-yes, .patch-no, .patch-go, .bar-mic, .bar-send, .bar-close, .msg-copy { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* iOS + keyboard: the visible window slides past the layout viewport's
   bottom; the dim layer covers three screens' worth so no strip of page
   ever shows between the rail and the keyboard */
#scrim { top: -100vh; bottom: -100vh; left: 0; right: 0; height: auto; }
/* chips in the chat: a real tap target, answered on the first touch */
.msg-go { min-height: 36px; display: inline-flex; align-items: center; padding: 6px 14px; }
.msg.ask .patch-yes, .msg.ask .patch-no { min-height: 36px; }

/* the phone's seal hint is the slot label itself, never a bubble over content */
.tab-seal-slot > span.is-hinting { color: #e4cd8e; font-weight: 700; white-space: nowrap; animation: hint-blink 1.2s ease-in-out 3; }
@keyframes hint-blink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (max-width: 1159px) { .seal-hint { display: none; } .tab-seal-slot { flex-basis: 96px; } }

/* ============================================================
   LOOKS — the reader's own choice of colours, type, and size.
   Chosen on your page, remembered on this device, applied before
   the first paint by a two-line script in the head.
   ============================================================ */
html[data-theme="linen"] {
  --paper: #f7f2ea; --card: #fffcf7; --ink: #2a241c; --muted: #6a6052; --line: #e6dccd;
  --pine: #4a3b2c; --pine-soft: #5b4a39; --pine-ink: #f6efe4;
  --leaf: #8a6a3a; --leaf-soft: #f0e7d8; --amber: #a3611c; --amber-soft: #f6e8d2; --clay-soft: #f3e4dc;
  --note: #fffdf8; --note-warm: #fff9ef; --bench: #f1e7d6; --map: #ece6d8; --paper-ruled: #f4efe6; --ground: #2a2118; --gilt: #e8cf98;
  --pine-ink-rgb: 246 239 228; --leaf-rgb: 138 106 58; --pine-rgb: 74 59 44; --amber-rgb: 163 97 28; --ink-rgb: 42 36 28; --ground-rgb: 42 33 24;
}
html[data-theme="sea"] {
  --paper: #f3f6f6; --card: #ffffff; --ink: #1c2628; --muted: #5b6b6e; --line: #dbe4e4;
  --pine: #1f3a44; --pine-soft: #2b4c58; --pine-ink: #eef4f5;
  --leaf: #2f7a7a; --leaf-soft: #e3f0ef; --amber: #b06a1e; --amber-soft: #f7ead6; --clay-soft: #eee6e2;
  --note: #fdfefe; --note-warm: #fbfaf3; --bench: #e9eeea; --map: #e2ebe9; --paper-ruled: #eef3f2; --ground: #10222a; --gilt: #d9c58a;
  --pine-ink-rgb: 238 244 245; --leaf-rgb: 47 122 122; --pine-rgb: 31 58 68; --amber-rgb: 176 106 30; --ink-rgb: 28 38 40; --ground-rgb: 16 34 42;
}
html[data-theme="plum"] {
  --paper: #f6f2f6; --card: #fffcff; --ink: #261c26; --muted: #6a5c6a; --line: #e6dbe6;
  --pine: #3b2740; --pine-soft: #4d3452; --pine-ink: #f4ecf4;
  --leaf: #7a4f8a; --leaf-soft: #efe4f2; --amber: #a56a1a; --amber-soft: #f6e9d3; --clay-soft: #f2e4e4;
  --note: #fffdfe; --note-warm: #fdf8f2; --bench: #efe6ee; --map: #e9e2ea; --paper-ruled: #f2edf2; --ground: #221526; --gilt: #e2cb95;
  --pine-ink-rgb: 244 236 244; --leaf-rgb: 122 79 138; --pine-rgb: 59 39 64; --amber-rgb: 165 106 26; --ink-rgb: 38 28 38; --ground-rgb: 34 21 38;
}
html[data-theme="dusk"] {
  color-scheme: dark;
  --paper: #171d16; --card: #1f2720; --ink: #ece7da; --muted: #a9a695; --line: #2f382e;
  --pine: #0f140f; --pine-soft: #1b231a; --pine-ink: #f2efe6;
  --leaf: #8fbf82; --leaf-soft: #24301f; --amber: #dfae4b; --amber-soft: #3a2f14; --clay-soft: #3a2a24;
  --note: #232b22; --note-warm: #272c21; --bench: #222a1f; --map: #1d251d; --paper-ruled: #1b221a; --ground: #090c08; --gilt: #e4cd8e;
  --pine-ink-rgb: 242 239 230; --leaf-rgb: 143 191 130; --pine-rgb: 236 231 218; --amber-rgb: 223 174 75; --ink-rgb: 236 231 218; --ground-rgb: 9 12 8;
}
html[data-theme="dusk"] body { background: var(--paper); }
html[data-theme="dusk"] .callout { background: var(--amber-soft); border-color: rgba(223,174,75,0.25); color: var(--ink); }
html[data-theme="dusk"] .msg.theirs { background: var(--card); border-color: var(--line); color: var(--ink); }
html[data-theme="dusk"] .msg.ask { background: var(--amber-soft); border-color: rgba(223,174,75,0.4); color: var(--ink); }
html[data-theme="dusk"] .msg.ask.mark { background: var(--leaf-soft); border-color: rgba(143,191,130,0.4); }
html[data-theme="dusk"] .msg.theirs.room { background: var(--leaf-soft); color: var(--ink); }
html[data-theme="dusk"] .now-strip, html[data-theme="dusk"] .overlap-signals, html[data-theme="dusk"] .me-row-card { background: var(--leaf-soft); border-color: rgba(143,191,130,0.3); }
html[data-theme="dusk"] .now-chip { background: var(--card); color: var(--ink); }
html[data-theme="dusk"] .plan-card, html[data-theme="dusk"] .fb-row, html[data-theme="dusk"] #view-city .pin, html[data-theme="dusk"] #view-open .open-item, html[data-theme="dusk"] .prod-lane { box-shadow: 0 8px 20px rgba(0,0,0,0.35); }
html[data-theme="dusk"] .keeper-strip input, html[data-theme="dusk"] .entry-form input, html[data-theme="dusk"] .entry-form select, html[data-theme="dusk"] .entry-form textarea, html[data-theme="dusk"] .checkin-row input, html[data-theme="dusk"] .checkin-row select, html[data-theme="dusk"] .note-form textarea, html[data-theme="dusk"] .onboard-field input, html[data-theme="dusk"] .gate-row input { background: var(--card); color: var(--ink); border-color: var(--line); }
html[data-theme="dusk"] .seal-hint { background: var(--card); color: var(--ink); }
html[data-theme="dusk"] .seal-hint::after { border-top-color: var(--card); }
html[data-theme="dusk"] .gate-card, html[data-theme="dusk"] .tour-card, html[data-theme="dusk"] .modal { background: var(--card); color: var(--ink); }

/* type pairings: the display face is --serif; the body face is --sans */
html[data-font="bookish"] { --serif: "Fraunces", "Iowan Old Style", Georgia, serif; }
html[data-font="modern"] { --serif: "Space Grotesk", "Helvetica Neue", Arial, sans-serif; --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
html[data-font="modern"] .chapter-title, html[data-font="modern"] h1, html[data-font="modern"] h2, html[data-font="modern"] h3 { letter-spacing: -0.02em; }
html[data-font="typewriter"] { --serif: "Courier Prime", "Courier New", monospace; --sans: "Courier Prime", "Courier New", monospace; }
html[data-font="typewriter"] .chapter-title { font-size: clamp(30px, 5vw, 42px); letter-spacing: 0; }

/* the appearance card on your page */
.look-rows { display: grid; gap: 14px; }
.look-row { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: start; }
.look-row > span:first-child { padding-top: 8px; font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.look-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.look-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 8px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .32s var(--spring, var(--ease-out));
}
.look-chip:active { transform: scale(.96); }
.look-chip.is-on { border-color: var(--leaf); background: var(--leaf-soft); color: var(--leaf); }
.look-chip:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.look-swatch { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.12); background: linear-gradient(135deg, var(--sw-a) 0 50%, var(--sw-b) 50% 100%); box-shadow: inset 0 0 0 3px var(--sw-c); }
.look-chip--font { font-family: var(--chip-font, inherit); font-weight: 500; font-size: 15px; padding: 6px 13px; }
.look-chip--size { padding: 6px 12px; min-width: 44px; justify-content: center; }
.look-chip--size b { font-family: var(--serif); font-weight: 400; line-height: 1; }
.look-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 480px) { .look-row { grid-template-columns: 1fr; gap: 6px; } .look-row > span:first-child { padding-top: 0; } }

/* while recording, the mic is a stop square (the keeper's own note through the chat) */
.bar-mic.recording svg { display: none; }
.bar-mic.recording::after { content: ""; width: 12px; height: 12px; border-radius: 2px; background: #fff; }
/* the log: the activity journal, for keepers */
.act-list { display: flex; flex-direction: column; }
.act-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.act-row:first-child { border-top: 0; }
.act-row strong { font-weight: 700; white-space: nowrap; }
.act-row span { color: var(--muted); min-width: 0; }
.act-row em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ============================================================
   CATEGORIES, MONTHS, RECEIPTS — added when the core was generalized
   (Oct 2026). A category is a colour on a plan card and a chip in the
   filter row; an instance names them in its seed. The month strip
   replaces the day strip when the range runs past three weeks.
   Receipts are a card on your page and a ledger in The Log.
   ============================================================ */
.plan-cats { margin: 0 0 14px; }
.plan-cat-chip {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.plan-cat-chip.is-on { border-color: var(--leaf); background: var(--leaf-soft); color: var(--leaf); }
.plan-cat-chip:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.plan-cat {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: var(--leaf-soft); color: var(--leaf);
}
/* up to six category hues; an instance's skin may override by id */
.plan-card--cat-1 .plan-cat, .plan-cat-chip--1.is-on { background: var(--cat-1-soft, var(--leaf-soft)); color: var(--cat-1, var(--leaf)); border-color: var(--cat-1, var(--leaf)); }
.plan-card--cat-2 .plan-cat, .plan-cat-chip--2.is-on { background: var(--cat-2-soft, var(--amber-soft)); color: var(--cat-2, var(--amber)); border-color: var(--cat-2, var(--amber)); }
.plan-card--cat-3 .plan-cat, .plan-cat-chip--3.is-on { background: var(--cat-3-soft, var(--clay-soft)); color: var(--cat-3, var(--ink)); border-color: var(--cat-3, var(--ink)); }
.plan-card--cat-4 .plan-cat, .plan-cat-chip--4.is-on { background: var(--cat-4-soft, var(--map)); color: var(--cat-4, var(--pine)); border-color: var(--cat-4, var(--pine)); }
.plan-card--cat-5 .plan-cat, .plan-cat-chip--5.is-on { background: var(--cat-5-soft, var(--bench)); color: var(--cat-5, var(--muted)); border-color: var(--cat-5, var(--muted)); }
.plan-card--cat-6 .plan-cat, .plan-cat-chip--6.is-on { background: var(--cat-6-soft, var(--note-warm)); color: var(--cat-6, var(--amber)); border-color: var(--cat-6, var(--amber)); }
.plan-card[class*="plan-card--cat-"] { border-left: 0; }
.plan-day-head--sub { margin-top: 18px; }
.plan-subscribe { margin-top: 8px; }

.receipt-form { display: grid; gap: 10px; margin: 10px 0 14px; }
.receipt-sums { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.receipt-sums .plan-stat { min-width: 120px; }
#receiptList .log-chip { min-width: 72px; text-align: right; font-variant-numeric: tabular-nums; }

/* ============================================================
   THE MONTH — a long program's calendar is a real grid: seven columns,
   a cell per day, a lamp for each thing on it. Tap a day to go into it.
   ============================================================ */
.day-strip.month-grid { display: block; overflow: visible; padding: 0; margin: 0 0 18px; }
.mg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.mg-head strong { font-family: var(--serif); font-weight: 400; font-size: 24px; }
.mg-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--ink); font: inherit; cursor: pointer; }
.mg-arrow:disabled { opacity: .3; cursor: default; }
.mg-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mg-dow { font-size: 12px; color: var(--muted); text-align: left; padding: 0 0 4px 6px; }
.mg-day { position: relative; aspect-ratio: 1 / 1; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; text-align: left; padding: 6px 8px; display: flex; flex-direction: column; justify-content: space-between; transition: border-color .18s ease-out, background .18s ease-out, transform .18s ease-out; }
.mg-day:active { transform: scale(.96); }
.mg-day b { font-weight: 400; font-size: 14px; font-variant-numeric: tabular-nums; }
.mg-day span { display: flex; gap: 3px; min-height: 6px; }
.mg-day i { width: 6px; height: 6px; border-radius: 2px; display: block; }
.mg-day.is-today { border-color: var(--ink); }
.mg-day.is-anchor { border-color: var(--leaf); }
.mg-day.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mg-day:disabled { opacity: .28; cursor: default; }
.mg-day:focus-visible, .mg-arrow:focus-visible, .mg-shelf:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.mg-shelf { margin-top: 12px; min-height: 44px; border: 0; background: none; color: var(--leaf); font: inherit; cursor: pointer; padding: 0; }
.mg-shelf.is-on { text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 1160px) { .mg-day { aspect-ratio: 5 / 3; } }

/* ============================================================
   GOING INTO THINGS (flow: "into"). A room shows the thing. Its form
   waits behind the room's key; a person's row opens their page. One
   layer for both: a sheet from the bottom on a phone, a panel from the
   right on a desk.
   ============================================================ */
body.flow-into .view form.entry-form,
body.flow-into .view .checkin-form { display: none; }
body.flow-into .view .sheet-right:empty { display: none; }
.layer { position: fixed; inset: 0; z-index: 400; }
.layer[hidden] { display: none; }
.layer-scrim { position: absolute; inset: 0; background: rgb(var(--ground-rgb) / 0.55); opacity: 0; transition: opacity .2s ease-out; }
.layer-card { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh; overflow-y: auto; background: var(--paper); color: var(--ink); border-radius: 18px 18px 0 0; border-top: 1px solid var(--line); padding: 14px 18px calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.layer.is-in .layer-scrim { opacity: 1; }
.layer.is-in .layer-card { transform: none; }
.layer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.layer-head h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.1; margin: 0; }
.layer-x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: 22px; line-height: 1; cursor: pointer; flex: none; }
.layer-body > form { display: grid !important; margin: 0; border: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; }
.layer-body .checkin-form { display: block !important; }
.layer-also { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; border: 0; background: none; color: var(--leaf); font: inherit; cursor: pointer; padding: 0; text-decoration: none; }
@media (min-width: 900px) {
  .layer-card { left: auto; top: 0; bottom: 0; width: min(440px, 92vw); max-height: none; border-radius: 0; border-top: 0; border-left: 1px solid var(--line); padding: 26px 26px 30px; transform: translateX(100%); }
}
body.layer-open { overflow: hidden; }

/* the room's key: a pill above the seal that says what it does here */
.room-key { position: fixed; z-index: 21; left: 50%; transform: translateX(-50%); bottom: calc(104px + env(safe-area-inset-bottom, 0px)); min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--pine); color: var(--pine-ink); font: inherit; cursor: pointer; white-space: nowrap; box-shadow: 0 8px 22px rgba(0,0,0,.28); transition: transform .18s ease-out, box-shadow .18s ease-out; }
.room-key[hidden] { display: none; }
.room-key:active { transform: translateX(-50%) translateY(2px); box-shadow: 0 3px 8px rgba(0,0,0,.28); }
.room-key .rk-verb { opacity: .7; margin-right: 4px; }
body.chatting .room-key, body.layer-open .room-key { display: none; }
@media (min-width: 1160px) {
  .room-key { left: auto; right: 112px; bottom: 34px; transform: none; }
  .room-key:active { transform: translateY(2px); }
}

/* a row you can go into */
.ledger-row.is-door { cursor: pointer; transition: border-color .18s ease-out, transform .18s ease-out; }
.ledger-row.is-door:active { transform: scale(.985); }
.person-here { color: var(--leaf); margin: 0 0 10px; }
.person-facts { display: grid; gap: 10px; margin: 0 0 16px; }
.person-fact small { display: block; color: var(--muted); font-size: 12px; }
.person-fact span { font-size: 18px; }
.person-list { display: grid; margin: 4px 0 16px; }
.person-item { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.person-item:first-child { border-top: 0; }
.person-item span { color: var(--muted); font-size: 14px; }

/* a lamp that just landed on the month */
@keyframes lamp-land { 0% { transform: scale(0) translateY(-10px); opacity: 0; } 60% { transform: scale(1.6); opacity: 1; } 100% { transform: scale(1); } }
.mg-day i.is-new { animation: lamp-land .5s cubic-bezier(.2,.8,.2,1) both; }
@media (prefers-reduced-motion: reduce) { .mg-day i.is-new { animation: none; } .layer-card, .layer-scrim { transition: none; } }

/* ============================================================
   NOW, COMPACT (flow: "into"). One screen: the date, this week, what's
   next, three acts, the doors. Everything else on the old Now stands down.
   ============================================================ */
body.flow-into #view-week > *:not(#nowCompact):not(.patch-slot):not(#weekRequests) { display: none !important; }
.now-compact { display: grid; gap: 18px; }
.nc-date { margin: 0; font-size: 14px; color: var(--muted); }
.nc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.nc-day { display: grid; justify-items: center; gap: 6px; min-height: 76px; padding: 6px 0; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; cursor: pointer; transition: transform .18s ease-out, background .18s ease-out; }
.nc-day:active { transform: scale(.94); }
.nc-day span { font-size: 13px; color: var(--muted); }
.nc-day b { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; }
.nc-day.is-today b { background: var(--ink); color: var(--paper); }
.nc-day em { display: flex; gap: 3px; min-height: 6px; font-style: normal; }
.nc-day em i, .nc-row i { width: 6px; height: 6px; border-radius: 2px; display: inline-block; }
.nc-kick { margin: 0 0 -8px; font-size: 13px; color: var(--muted); }
.nc-rows { display: grid; }
.nc-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; align-items: baseline; min-height: 48px; padding: 10px 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.nc-row:first-child { border-top: 0; }
.nc-row b { font-weight: 400; color: var(--leaf); font-variant-numeric: tabular-nums; }
.nc-row span { min-width: 0; }
.nc-row i { margin-right: 8px; vertical-align: 2px; }
.nc-none { margin: 0; padding: 10px 0; color: var(--muted); }
.nc-acts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.nc-act { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--ink); font: inherit; cursor: pointer; white-space: nowrap; transition: transform .18s ease-out, border-color .18s ease-out; }
.nc-act:active { transform: translateY(2px); border-color: var(--leaf); }
.nc-act .rk-verb { opacity: .7; margin-right: 4px; }
.nc-doors { display: flex; flex-wrap: wrap; gap: 4px 22px; padding-top: 10px; border-top: 1px solid var(--line); }
.nc-door { min-height: 44px; display: inline-flex; align-items: center; border: 0; background: none; padding: 0; color: var(--leaf); font: inherit; text-decoration: none; cursor: pointer; }
@media (min-width: 1160px) { .now-compact { max-width: 760px; } .nc-day b { font-size: 26px; width: 42px; height: 42px; } }

/* the room's key lives in the title row; the room is never covered */
.chapter-title.has-key { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chapter-title .room-key { position: static; transform: none; box-shadow: none; font-size: 17px; font-family: inherit; letter-spacing: 0; line-height: 1.2; }
.chapter-title .room-key:active { transform: translateY(2px); }
body.flow-into #view-me > .story { display: none; }
body.flow-into .plan-cats { margin: 4px 0 16px; }
@media (max-width: 1159px) { body.flow-into .workspace { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); } }
.nc-acts { flex-wrap: nowrap; gap: 6px; }
.nc-act { padding: 0 12px; flex: 1 1 auto; }
@media (max-width: 360px) { .nc-acts { flex-wrap: wrap; } }
body.flow-into .workspace-head { margin-bottom: 10px; }
.now-compact { gap: 14px; }
.nc-day { min-height: 66px; }

/* Now, compact, on a desk: the old two-column grid stands down; the week runs the full
   width, what's next takes the left, the acts and doors the right. Nothing sits in half a room. */
.nc-main, .nc-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
@media (min-width: 1160px) {
  body.flow-into #view-week.is-active { display: block; }
  body.flow-into .now-compact { max-width: none; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); column-gap: 56px; row-gap: 22px; }
  body.flow-into .nc-date, body.flow-into .nc-week { grid-column: 1 / -1; }
  body.flow-into .nc-week { gap: 10px; padding-bottom: 22px; }
  body.flow-into .nc-day { min-height: 104px; justify-items: start; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
  body.flow-into .nc-day b { font-size: 32px; width: auto; height: auto; padding: 2px 8px; margin-left: -8px; }
  body.flow-into .nc-acts { flex-direction: column; align-items: stretch; }
  body.flow-into .nc-act { min-height: 52px; text-align: left; padding: 0 18px; }
  body.flow-into .nc-doors { flex-direction: column; gap: 0; }
  body.flow-into .side-extras, body.flow-into .side-count { display: none !important; }
}

/* Going into things, on a desk: the forms live in the layer, so no room keeps a column
   for them. Lists and the map take the full room; the calendar puts the month on the
   left and the chosen day's list on the right. */
@media (min-width: 1160px) {
  body.flow-into #view-coming.is-active,
  body.flow-into #view-city.is-active,
  body.flow-into #view-production.is-active { display: block; }
  body.flow-into #view-plans.is-active {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "slot  slot"
      "title title"
      "strip list"
      "cats  list"
      "hint  list";
    column-gap: 40px;
  }
  body.flow-into #view-plans .plan-cats { grid-area: cats; align-self: start; }
  body.flow-into #view-plans .plan-list { grid-template-columns: 1fr; }
  body.flow-into #view-plans .soft-note { align-self: start; }
}
