/* The Gathering Atlas — New Frame, NYC, November 2026.

   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. Mike'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 New Frame'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-soft: #3a4a37;
  --pine-ink: #f2efe6;
  --leaf: #4c6e46;
  --leaf-soft: #e9efe3;
  --amber: #94660f;
  --amber-soft: #f7edda;
  --clay-soft: #f3e7e0;
  --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: 14.5px; 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: 13.5px; 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; }

.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: 15.5px;
  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: 13.5px;
  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 rgba(242, 239, 230, 0.6); }
.hero-cues a + a:hover { background: rgba(242, 239, 230, 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: 16.5px;
  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: 14.5px;
  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: 11.5px; 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: 11.5px;
  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: 14.5px; 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: 10.5px;
  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: 14.5px;
}

.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: 12.5px; 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: 14.5px; 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: 12.5px;
  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: 13.5px; 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: 13.5px; 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: 14.5px; }
.doc span { font-size: 12.5px; color: var(--muted); }

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

/* ============ ask ============ */
.ask-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  max-width: 640px;
}

.ask-form textarea {
  width: 100%;
  border: 0;
  resize: vertical;
  background: transparent;
  outline: none;
  font-size: 15px;
  min-height: 64px;
}

.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: 12.5px; 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: 14.5px; }
.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: 14.5px; 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: 9.5px;
  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: 9px;
  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 Mike 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:
    linear-gradient(100deg, rgba(38, 58, 36, 0.84) 0%, rgba(44, 74, 42, 0.55) 55%, rgba(52, 88, 48, 0.32) 100%),
    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 rgba(23, 32, 21, 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: rgba(35, 32, 26, 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);
}

/* ============ ask answers ============ */
.ask-answer {
  background: var(--leaf-soft);
  border-radius: var(--tile);
  padding: 16px 20px;
  margin: 14px 0 4px;
  max-width: 640px;
}

.ask-answer .eyebrow { color: var(--leaf); }
.ask-answer p { font-size: 14.5px; margin: 4px 0 12px; }

.ask-answer .aa-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.aa-go {
  display: inline-block;
  background: var(--pine);
  color: var(--pine-ink);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.aa-quiet {
  background: none;
  border: 0;
  padding: 8px 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ask-answer--stuck { background: var(--amber-soft); }
.ask-answer--stuck .eyebrow { color: var(--amber); }

/* ============ 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;
}

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

.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: 13.5px; 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: 12.5px;
    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: hidden;
    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: 11.5px; 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: 14.5px;
}

.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: block;
  background: var(--card, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14.5px;
  color: inherit;
  text-decoration: none;
}

.wk-new-link:hover { background: var(--leaf-soft); }
.wk-new-link em { font-style: normal; color: var(--leaf); font-weight: 600; }

/* ============ 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: 14.5px; margin: 0; max-width: 60ch; }

@media (max-width: 480px) {
  .wk-row { grid-template-columns: 76px 1fr; gap: 10px; }
  .value-line { font-size: 22px; }
}

/* ============ 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: 13.5px;
  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: 16.5px;
  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; }
}

/* ============ the chat: the house answers ============ */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 48vh;
  overflow-y: auto;
  padding: 4px 2px 12px;
  margin-bottom: 6px;
}

.bubble {
  max-width: 52ch;
  padding: 10px 15px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.55;
}

.bubble--me {
  align-self: flex-end;
  background: var(--pine);
  color: var(--pine-ink);
  border-bottom-right-radius: 5px;
}

.bubble--house {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}

.bubble--typing { color: var(--muted); letter-spacing: 2px; }

/* ============ 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: 14.5px; font-weight: 600; margin: 0 0 4px; }

.req-meta { font-size: 12.5px; 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 rgba(23, 32, 21, 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: 9.5px;
  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: 14.5px;
  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: 14.5px;
}

.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: 13.5px; 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: 8px; margin-bottom: 22px; }

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

.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: 4px 0 0; font-size: 14px; color: var(--ink); }
.ledger-note { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }

/* ---- 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: 12.5px; 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: 12.5px;
  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: 12.5px;
  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: 12.5px;
  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: 15.5px; line-height: 1.55; color: var(--ink); }

.wk-ask-when { margin: 10px 0 0; font-size: 13.5px; 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 Mike 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:
      radial-gradient(120% 90% at 20% -10%, #263323 0%, transparent 55%),
      radial-gradient(100% 80% at 90% 110%, #10150f 0%, transparent 60%),
      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 Mike'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 Mike 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: hidden;
  }

  .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 — Mike 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:
      radial-gradient(140% 60% at 30% -5%, rgba(255, 255, 255, 0.07) 0%, transparent 55%),
      linear-gradient(178deg, #33432f 0%, var(--pine) 46%, #24301f 100%);
  }

  .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:
      linear-gradient(160deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.02) 60%),
      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:
      radial-gradient(90% 40% at 50% -8%, #fffefa 0%, transparent 60%),
      var(--paper);
    scrollbar-width: thin;
    scrollbar-color: rgba(44, 58, 42, 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: rgba(44, 58, 42, 0.3);
    border-radius: 999px;
    border: 3px solid var(--paper);
  }
  .workspace::-webkit-scrollbar-thumb:hover { background: rgba(44, 58, 42, 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, .beyond-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"
      "note  ask"
      "tail  tail";
    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 #weekAsk { grid-area: ask; margin-top: var(--step); align-self: start; }
  #view-week .soft-note { grid-area: note; margin-top: var(--step); align-self: end; }

  /* coming/new: two proper panels across the full sheet */
  #view-week .wk-tail {
    grid-area: tail;
    display: grid;
    grid-template-columns: 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 unconfirmed-date 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 > .story-eyebrow, #view-gathering > .chapter-title { grid-column: 1 / -1; }
  #view-gathering .story { grid-column: 1; grid-row: 3; }
  #view-gathering .aspiration { grid-column: 1; grid-row: 4; margin: 14px 0 0; }
  #view-gathering .callout { grid-column: 2; grid-row: 3 / span 2; align-self: start; margin: 0; }
  #view-gathering .soft-note { grid-column: 1 / -1; grid-row: 7; margin-top: 16px; }
  #view-gathering .sheet-right .section-eyebrow { grid-column: 1 / -1; grid-row: 5; margin-top: var(--step); }
  #view-gathering .role-grid { grid-column: 1 / -1; grid-row: 6; grid-template-columns: 1fr 1fr; gap: 14px; }
  #view-gathering .sheet-right .role-grid + .section-eyebrow { grid-row: 8; margin-top: var(--step); }
  #view-gathering .date-strip {
    grid-column: 1 / -1;
    grid-row: 9;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
  }
  #view-gathering .story p { max-width: 66ch; }

  /* ---- Who's Coming / The City: 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 1fr;
    grid-template-areas:
      "eyebrow eyebrow"
      "title   title"
      "story   form"
      "meta    form"
      "list    form"
      "hint    form";
    column-gap: 24px;
    align-content: start;
  }
  #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: 13.5px; margin: 0 0 12px; }
  #view-reference .keeper-strip { max-width: none; }
}

@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:
    radial-gradient(130% 120% at 12% -10%, #3d5038 0%, transparent 55%),
    linear-gradient(170deg, var(--pine) 30%, #253123 100%);
}

/* the ask card and its amber family warm downward */
.callout {
  background: linear-gradient(168deg, #fdf6e6 0%, var(--amber-soft) 55%, #f2e3c4 100%);
}
.callout--pending {
  background: linear-gradient(168deg, #fdf6e6 0%, var(--amber-soft) 55%, #f0dfbc 100%);
}

/* the aspiration quote's leaf wash */
.aspiration {
  background: linear-gradient(165deg, #eef3e8 0%, var(--leaf-soft) 60%, #e0e9d8 100%);
}

/* solid pine controls catch the same top light */
.gate-row button,
.entry-form button,
.onboard-actions button[type="submit"],
.req-approve,
#askSend {
  background: linear-gradient(180deg, #35452f 0%, var(--pine) 70%, #26332a 100%);
}
.gate-row button:hover,
.entry-form button:hover,
.onboard-actions button[type="submit"]:hover,
#askSend:hover {
  background: linear-gradient(180deg, #3c4d35 0%, #33432f 70%, #2c3a2a 100%);
}

/* the ledger's fill runs light-to-leaf like a level filling */
.fill-bar span {
  background: linear-gradient(90deg, #6d9162 0%, var(--leaf) 100%);
}

/* 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 rgba(35, 32, 26, 0.04), 0 6px 18px rgba(35, 32, 26, 0.05);
}

/* the gate cards on their pine field */
.gate {
  background:
    radial-gradient(120% 80% at 30% -10%, #35452f 0%, transparent 55%),
    linear-gradient(175deg, var(--pine) 0%, #212c20 100%);
}
.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 rgba(35, 32, 26, 0.04), 0 6px 18px rgba(35, 32, 26, 0.05);
  }
  .side-nav a.is-current {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.04) 100%), 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 rgba(242, 239, 230, 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: 13.5px; opacity: 0.85; }
  .hl-event { margin-top: 2px; font-size: 12.5px; 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 rgba(242, 239, 230, 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: rgba(242, 239, 230, 0.16);
    overflow: hidden;
  }
  .side-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8fae85 0%, #6d9162 100%);
    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, rgba(35, 32, 26, 0.28) 30%, rgba(35, 32, 26, 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: rgba(27, 35, 26, 0.92);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(242, 239, 230, 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: rgba(242, 239, 230, 0.5); }

.bar-send {
  flex: none;
  border: 0;
  border-radius: 18px;
  padding: 9px 18px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(180deg, #f0dfae 0%, #e4cd8e 100%);
  color: #4a3a10;
}
.bar-send:disabled { background: rgba(242, 239, 230, 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: 800;
  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: 14.5px;
  line-height: 1.45;
  animation: msg-rise 0.3s ease;
}
@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: linear-gradient(168deg, #fdf6e6 0%, var(--amber-soft) 70%);
  border: 1px solid var(--amber);
  border-radius: var(--tile);
  padding: 14px 16px;
  box-shadow: 0 6px 20px rgba(148, 102, 15, 0.10);
}
.patch-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.patch-flag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}
.patch-meta { font-size: 12px; color: var(--muted); }
.patch-say { margin: 0; font-size: 14.5px; }
.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: linear-gradient(180deg, #35452f, 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; }

@media (min-width: 1160px) {
  /* the bar floats over the canvas, clear of the wing */
  #bar {
    left: calc(22px + 252px);
    right: 22px;
    bottom: 22px;
    padding: 26px 24px 18px;
    background: linear-gradient(to top, rgba(250, 247, 240, 0.92) 40%, rgba(250, 247, 240, 0));
    border-radius: 0 0 24px 0;
  }
  body.chatting #bar { background: linear-gradient(to top, rgba(23, 23, 23, 0.5) 40%, rgba(23, 23, 23, 0)); }
  /* the canvas keeps its last content clear of the rail */
  .workspace { padding-bottom: 110px; }
}
@media (min-width: 1480px) {
  #bar { left: calc(26px + 264px); right: 26px; bottom: 26px; }
}

/* ============================================================
   PRODUCTION — Rebeca's section. TOUR — the first-run walk.
   MIC — Strangeland'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 rgba(35, 32, 26, 0.04), 0 6px 18px rgba(35, 32, 26, 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: 12.5px; color: var(--muted); }
.prod-meta a { color: var(--leaf); }
.prod-who {
  flex: none;
  font-size: 10.5px;
  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 rgba(35, 32, 26, 0.04), 0 6px 18px rgba(35, 32, 26, 0.05);
}
.admin-tips .eyebrow { margin-bottom: 10px; }
.tip-row { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.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: rgba(242, 239, 230, 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: linear-gradient(180deg, #35452f 0%, var(--pine) 70%, #26332a 100%);
  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 rgba(242, 239, 230, 0.18);
  background: rgba(242, 239, 230, 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; }
.bar-mic:hover { background: rgba(242, 239, 230, 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 rgba(148, 102, 15, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(148, 102, 15, 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 { flex: 1; min-width: 0; height: 36px; }

/* 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, rgba(35, 32, 26, 0.35) 60%, rgba(35, 32, 26, 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: rgba(242, 239, 230, 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); }
.msg:hover .msg-copy, .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: linear-gradient(168deg, #fdf6e6 0%, var(--amber-soft) 70%);
  border: 1px solid var(--amber);
  color: var(--ink);
}
.msg.ask .ask-flag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  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: 12.5px; font-weight: 700; color: var(--leaf); }

/* the log */
.log-list { display: flex; flex-direction: column; gap: 8px; }
.log-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--tile);
}
.log-chip {
  flex: none;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 9px;
  margin-top: 1px;
}
.log-row--applied .log-chip { background: var(--leaf-soft); color: var(--leaf); }
.log-row--declined .log-chip { background: var(--line); color: var(--muted); }
.log-body { min-width: 0; flex: 1; }
.log-sum { display: block; font-size: 13.5px; }
.log-meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.log-go { flex: none; color: var(--leaf); text-decoration: none; font-weight: 700; }

/* 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; }
}
