/* Room (dialogue-at-scale) — a single conversation you step into. Direct
   replies, no argument machinery. */

.room-screen {
  gap: var(--space-5);
}

.room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: var(--space-6);
  align-items: start;
}

.room-main {
  display: grid;
  gap: var(--space-5);
  min-width: 0;
  /* Fills the column — so widening the page (wide mode) widens the writing. */
}

.lane-room-chrome {
  display: grid;
  gap: var(--space-5);
}

body.is-focus .lane-room-chrome {
  display: contents;
}

@media (max-width: 720px) {
  .room-layout {
    grid-template-columns: 1fr;
  }
  /* Rail moves above the feed and reads as a strip on narrow screens. */
  .room-toc {
    order: -1;
  }
}

.room-head {
  display: grid;
  gap: var(--space-2);
}

.room-eyebrow {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* A flagged sentence under the lens: dimmed so it recedes into clean reading,
   un-dimmed on hover/focus as its why-popover opens (reusing .fallacy-popover).
   Overrides the shared .fallacy-anchor's highlight background — the room dims
   rather than spotlights. */
.room-fallacy {
  background: transparent;
  opacity: 0.35;
  transition: opacity 0.15s ease;
}

.room-fallacy:hover,
.room-fallacy:focus-visible,
.room-fallacy:focus-within {
  opacity: 1;
}

.room-title-row {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.room-claim {
  min-width: 0;
  max-width: 620px;
  margin: 0;
  font-family: var(--font-reading);
  font-size: 1.4rem;
  line-height: 1.25;
}

/* The room bookmark sits directly beside Room Read so the two read as a pair —
   same bordered pill, tucked tight against it with a hairline seam between. */
.lane-head-bookmark {
  width: auto;
  height: 32px;
  padding: 0 var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.lane-head-bookmark .bookmark-glyph svg {
  width: 16px;
  height: 16px;
}

.lane-head-bookmark:hover,
.lane-head-bookmark:focus-visible {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.lane-head-bookmark.is-active {
  color: var(--clay);
  border-color: color-mix(in srgb, var(--clay) 45%, transparent);
  background: color-mix(in srgb, var(--clay) 7%, transparent);
}

/* Room Read + the bookmark read as one control: a bordered, panel-filled box
   split into two cells by a hairline seam. */
.lane-read-pair {
  display: contents;
}

@media (min-width: 901px) {
  .lane-read-pair {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    overflow: hidden;
  }

  /* Inside the box the cells drop their own frames; the seam is a single
     border-left on the bookmark. */
  .lane-read-pair .lane-room-read-btn,
  .lane-read-pair .lane-head-bookmark {
    border: 0;
    border-radius: 0;
  }

  .lane-read-pair .lane-room-read-btn {
    padding-right: calc(var(--space-2) - 2px);
  }

  .lane-read-pair .lane-head-bookmark {
    border-left: 1px solid var(--line);
  }

  .lane-read-pair .lane-room-read-btn.is-open {
    background: transparent;
  }

  .lane-read-pair .lane-head-bookmark.is-active {
    background: transparent;
  }

  /* State rides the cell fill and ink, never the seam. */
  .lane-read-pair .lane-room-read-btn:hover,
  .lane-read-pair .lane-room-read-btn:focus-visible,
  .lane-read-pair .lane-head-bookmark:hover,
  .lane-read-pair .lane-head-bookmark:focus-visible,
  .lane-read-pair .lane-head-bookmark.is-active {
    border-color: var(--line);
  }
}

/* Room Read: the header button (where the catch-up button once lived) and
   the panel it opens — goal + criteria (set at creation, permanent) and
   Crux's daily summary. */
.lane-room-read-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-1);
  height: 32px;
  padding: 0 var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: 600 0.75rem var(--font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.lane-room-read-btn:hover,
.lane-room-read-btn:focus-visible {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  outline: 0;
}

.lane-room-read-btn.is-open {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

@media (max-width: 900px) {
  .lane-room-chrome {
    display: contents;
  }

  .lane-read-pair {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    overflow: hidden;
  }

  .lane-read-pair .lane-sheet-chip-read,
  .lane-read-pair .lane-head-bookmark {
    height: auto;
    border: 0;
    border-radius: 0;
  }

  .lane-read-pair .lane-head-bookmark {
    width: 32px;
    padding: 0;
    place-items: center;
    border-left: 1px solid var(--line);
    background: transparent;
  }

  .lane-read-pair .lane-head-bookmark .bookmark-glyph {
    justify-self: center;
  }

  .lane-read-pair .lane-head-bookmark:hover,
  .lane-read-pair .lane-head-bookmark:focus-visible,
  .lane-read-pair .lane-head-bookmark.is-active {
    border-color: var(--line);
    background: transparent;
  }

  .lane-room-read-btn {
    display: none;
  }

  .lane-head .lane-sheet-chip-nav,
  .lane-head .lane-sheet-chip-unresolved {
    background: var(--panel);
  }
}

body.is-focus .lane-room-read-btn {
  display: none;
}

/* Room Read modal — the desktop button opens the charter in the shared modal
   chrome; the inner panel drops its own frame so it reads as one clean card. */
.lane-room-read-modal {
  width: min(560px, 100%);
}

.lane-room-read-modal .lane-room-read-modal-body {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  gap: var(--space-4);
}

.lane-head-tools {
  display: flex;
  flex: 0 0 auto;
  /* Push the tools to the far right of the title row, off the claim. */
  margin-left: auto;
  margin-top: calc((1.4rem * 1.25 - 32px) / 2);
  gap: var(--space-2);
  align-items: center;
}

@media (min-width: 901px) {
  .lane-head-tools {
    /* Align the desktop Room Read pair with the side rail cards. */
    margin-top: calc((1.4rem * 1.25 - 32px) / 2 - 33px);
  }
}

/* The header chips — map (the family column), Room Read, and ○ + count (the
   unresolved rail). Each chip appears when its surface folds into the header:
   Room Read + ○ at ≤900px, map at ≤720px, and all three in focus mode. Chrome
   icons, not primitives — they don't join the species colors. */
.lane-sheet-chip {
  display: none;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: 600 0.75rem var(--font-ui);
  cursor: pointer;
}

.lane-sheet-chip svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lane-sheet-chip:hover,
.lane-sheet-chip:focus-visible,
.lane-sheet-chip.is-open {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  outline: 0;
}

.lane-sheet-chip.is-open {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.lane-sheet-chip-read {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Only while a sheet is open, the chips rise above its backdrop — so the open
   chip can close and the sibling can switch in one tap. Elevated always,
   they'd paint over the sticky topbar when the header scrolls under it. */
.lane-head-tools.is-sheet-open .lane-sheet-chip {
  position: relative;
  z-index: 42;
}

@media (max-width: 900px) {
  .lane-sheet-chip-read,
  .lane-sheet-chip-unresolved {
    display: inline-flex;
  }
}

.lane-sheet-chip-count {
  font-weight: 700;
}

.lane-sheet-chip-count.is-live {
  color: var(--urgent);
}

@media (max-width: 720px) {
  .lane-sheet-chip-nav {
    display: inline-flex;
  }
}

/* Focus mode: reading only. The family column folds into the map chip; the
   unresolved rail folds into the ○ chip but drops its count — the doors stay,
   the red doesn't follow you into the reading view. */
body.is-focus .lane-sheet-chip-nav {
  display: inline-flex;
}

body.is-focus .lane-sheet-chip-read {
  display: inline-flex;
}

body.is-focus .lane-sheet-chip-unresolved {
  display: inline-flex;
}

/* The bottom sheet a chip opens — one chrome, three fillings. */
.lane-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--ink) 28%, transparent);
}

.lane-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  max-height: 72vh;
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: var(--space-4);
  align-content: start;
  padding: var(--space-5) var(--space-4);
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: var(--shadow);
  font-family: var(--font-ui);
  animation: lane-sheet-in 0.18s ease-out;
}

@keyframes lane-sheet-in {
  from {
    transform: translateY(14px);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lane-sheet {
    animation: none;
  }
}

/* If the viewport grows past both collapse points with a sheet open, the
   columns are back and the sheet has no job — unless focus mode has the
   columns folded at any width, where the sheets stay the door. */
@media (min-width: 901px) {
  body:not(.is-focus) .lane-sheet,
  body:not(.is-focus) .lane-sheet-backdrop {
    display: none;
  }
}

.lane-room-read {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--soft) 55%, transparent);
}

.lane-read-section {
  display: grid;
  gap: var(--space-1);
}

.lane-read-title {
  margin: 0;
  font: 700 0.68rem var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lane-read-body {
  margin: 0;
  font-family: var(--font-reading);
  font-size: 0.9rem;
  line-height: var(--line-reading);
}

.lane-read-criteria {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: var(--space-1);
  font-family: var(--font-reading);
  font-size: 0.9rem;
  line-height: var(--line-reading);
}

.lane-read-meta {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.room-head-meta {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

.room-feed {
  display: grid;
  gap: var(--space-3);
}

.room-post {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.room-post-opening {
  border-left: 3px solid var(--accent);
}

.room-post-head {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.person-avatar {
  --avatar-base: var(--muted);
  --avatar-bg: color-mix(in srgb, var(--avatar-base) 12%, var(--panel));
  --avatar-ink: color-mix(in srgb, var(--avatar-base) 76%, var(--ink));
  display: inline-grid;
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--avatar-ink) 18%, transparent);
  border-radius: 50%;
  background: var(--avatar-bg);
  color: var(--avatar-ink);
  font: 700 0.7rem var(--font-ui);
  line-height: 1;
}

.person-avatar[data-avatar-tone="1"] {
  --avatar-base: var(--green);
}

.person-avatar[data-avatar-tone="2"] {
  --avatar-base: var(--accent);
}

.person-avatar[data-avatar-tone="3"] {
  --avatar-base: var(--clay);
}

.person-avatar[data-avatar-tone="4"] {
  --avatar-base: color-mix(in srgb, var(--accent) 62%, var(--green));
}

.person-avatar[data-avatar-tone="5"] {
  --avatar-base: color-mix(in srgb, var(--clay) 70%, var(--green));
}

.person-avatar[data-avatar-tone="6"] {
  --avatar-base: color-mix(in srgb, var(--accent) 48%, var(--clay));
}

.person-avatar.is-crux-logo {
  --avatar-base: var(--muted);
  font-family: var(--font-mono);
  font-weight: 600;
}

.room-post-author {
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 600;
}

.room-post-time {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
}

.room-post-body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-reading);
  font-size: 1rem;
  line-height: 1.5;
}

.room-post-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

/* Nested replies indent one step, with a thread line to show they hang off the
   post above. Deep chains compound the indent — kept shallow by the column. */
.room-replies {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-1);
  padding-left: var(--space-4);
  border-left: 2px solid var(--line);
}

/* Direct-reply composer. */
.room-composer {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.room-composer-input {
  width: 100%;
  min-height: 3rem;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--color-paper);
  color: var(--ink);
  font-family: var(--font-reading);
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
}

.room-composer-input:focus {
  border-color: var(--accent);
  outline: none;
}

.room-composer-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: flex-end;
}

/* Inline reply — opens right under the post you clicked Reply on. */
.room-inline-reply {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--page-edge);
}

.room-reply-cancel-btn {
  padding: var(--space-2) var(--space-3);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  cursor: pointer;
}

.room-reply-cancel-btn:hover,
.room-reply-cancel-btn:focus-visible {
  color: var(--ink);
}

/* Optional "Get feedback" — quieter than the filled Reply: an outlined,
   secondary affordance so refining reads as offered, not required. */
.room-reply-feedback-btn {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.room-reply-feedback-btn:hover,
.room-reply-feedback-btn:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

.room-reply-feedback-btn:disabled {
  cursor: default;
  opacity: 0.6;
}

/* Private refine output under the composer. Grid mirrors .discuss-feedback but
   scoped to the room composer's tighter rhythm. */
.room-reply-feedback {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.room-reply-feedback-note {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.room-reply-feedback-item {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--soft);
}

.room-reply-feedback-tag {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.room-reply-feedback-item p {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-reading);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* A ToC jump flashes the post/reply it landed on, then fades on its own —
   long enough to catch the eye, gone before it becomes clutter. */
.room-post.is-focused,
.room-reply.is-focused {
  border-radius: var(--radius-md);
  animation: room-focus-flash 2.2s ease-out;
}

@keyframes room-focus-flash {
  0%,
  20% {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    background: var(--mark);
  }
  100% {
    outline: 2px solid transparent;
    outline-offset: 3px;
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .room-post.is-focused,
  .room-reply.is-focused {
    animation: none;
  }
}

.room-composer-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--color-on-accent);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.room-composer-submit-icon {
  position: relative;
  top: 0.22em;
}

.room-composer-submit:hover,
.room-composer-submit:focus-visible {
  background: var(--accent-dark);
}

.room-composer-submit:disabled {
  opacity: 0.58;
  cursor: default;
}

.room-composer-submit:disabled:hover {
  background: var(--accent);
}

/* Verb buttons — Reply (on a post) vs Go deeper (on a leaf) --------- */
.room-reply-btn,
.room-go-deeper {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.room-reply-btn:hover,
.room-reply-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* Reply-in-new-room — quiet, like Reply; the label carries the meaning. */
.room-go-deeper:hover,
.room-go-deeper:focus-visible {
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* Once a reply spawned a room, its verb becomes this quiet pointer. */
.room-moved-link {
  padding: var(--space-1) var(--space-2);
  border: 0;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  cursor: pointer;
}

.room-moved-link:hover,
.room-moved-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Leaf replies — lighter than posts, no border card ---------------- */
.room-reply {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-2) 0;
}

.room-reply + .room-reply {
  border-top: 1px solid var(--line);
  padding-top: var(--space-3);
}

/* Reply-target banner in the composer ------------------------------ */
.room-reply-target {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

.room-reply-target strong {
  color: var(--ink);
}

.room-reply-cancel {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.room-reply-cancel:hover,
.room-reply-cancel:focus-visible {
  color: var(--ink);
}

/* Table of contents rail — Open Tensions / Forks ------------------- */
.room-toc {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--page-edge);
  position: sticky;
  top: calc(var(--topbar-height) + var(--space-6));
}

.room-toc-group {
  display: grid;
  gap: var(--space-2);
}

/* The "Open Tensions" heading shares its row with the lens filter control. */
.room-toc-head {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: space-between;
}

.room-toc-title {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Lens filter — the descending-lines icon right of "Open Tensions" opens a
   dropdown holding "Dim fallacies". Mirrors the charter's filter menu. */
.room-filter-control {
  position: relative;
  flex-shrink: 0;
}

.room-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.room-filter-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.room-filter-button:hover,
.room-filter-button:focus-visible {
  color: var(--ink);
  border-color: var(--line);
  outline: 0;
}

.room-filter-button.is-active {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--soft);
}

.room-filter-menu {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  z-index: 5;
  min-width: 160px;
  padding: var(--space-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.room-filter-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

.room-filter-item:hover,
.room-filter-item:focus-visible {
  background: var(--soft);
  color: var(--ink);
  outline: 0;
}

.room-filter-item.is-active {
  color: var(--ink);
}

/* The checkbox — an empty box when off, an accent box with a check when on. */
.room-filter-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: transparent;
  font-size: 0.7rem;
  line-height: 1;
}

.room-filter-item.is-active .room-filter-check {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--color-on-accent);
}

.room-toc-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.room-toc-open,
.room-toc-moved {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.room-toc-open:hover,
.room-toc-open:focus-visible,
.room-toc-moved:hover,
.room-toc-moved:focus-visible {
  color: var(--accent-dark);
}

.room-toc-open {
  padding-left: var(--space-3);
  text-indent: calc(-1 * var(--space-3));
}

.room-toc-open::before {
  margin-right: var(--space-1);
  color: var(--accent);
  content: "○";
}

.room-toc-moved::before {
  margin-right: var(--space-1);
  color: var(--accent);
  content: "";
}

.room-toc-room {
  color: var(--muted);
  font-size: 0.78rem;
}

.room-toc-empty {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-style: italic;
}

/* ── Lane room — the v8 linear thread (docs/crux-v8-direction.md) ──────────
   Reads as a normal chat; structure renders as quiet inline rows (folds,
   proposals, markers, decisions) and the rail indexes them. */

/* Three columns: family (where rooms come from) · the lane · structure rail
   (what this room knows about itself). Both side columns sit on soft panels,
   lifted off the paper, with clear air between them and the lane. */
.lane-screen .room-layout {
  --lane-page-pad: var(--space-4);
  --lane-family-col: 210px;
  --lane-rail-col: 200px;
  --lane-layout-gap: var(--space-5);
  --lane-composer-left: calc((100vw - min(var(--content-width), 100vw)) / 2 + var(--lane-page-pad) + var(--lane-family-col) + var(--lane-layout-gap));
  --lane-composer-width: calc(min(var(--content-width), 100vw) - var(--lane-page-pad) - var(--lane-page-pad) - var(--lane-family-col) - var(--lane-rail-col) - var(--lane-layout-gap) - var(--lane-layout-gap));
  grid-template-columns: 210px minmax(0, 1fr) 200px;
  gap: var(--space-5);
}

body.is-wide .lane-screen .room-layout {
  --lane-page-pad: clamp(var(--space-4), 3vw, calc(var(--space-5) + var(--space-4)));
}

.lane-screen .room-main {
  padding-bottom: 11rem;
}

/* ── The family column — navigation, not structure ───────────────────────── */

.lane-family {
  --lane-family-icon-col: 1rem;
  --lane-family-card-gap: var(--space-2);
  --lane-family-card-pad: var(--space-2);
  --lane-family-card-bleed: var(--lane-family-card-pad);
  display: grid;
  gap: var(--space-4);
  align-content: start;
  position: sticky;
  top: calc(var(--topbar-height) + var(--space-6));
  max-height: calc(100vh - var(--topbar-height) - var(--space-6) - var(--space-3));
  overflow: auto;
  overscroll-behavior: contain;
  font-family: var(--font-ui);
  padding: var(--space-4);
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(22, 22, 29, 0.04), 0 10px 28px rgba(22, 22, 29, 0.06);
}

/* These sit after the base .lane-family/.room-layout rules — same specificity,
   so source order is what makes the narrow-screen overrides win. The columns
   collapse in stages: unresolved first (into the ○ chip), then the family
   column (into the map chip). Focus mode is the same fold at any width. */
@media (max-width: 900px) {
  .lane-screen .room-layout {
    --lane-composer-width: calc(min(var(--content-width), 100vw) - var(--lane-page-pad) - var(--lane-page-pad) - var(--lane-family-col) - var(--lane-layout-gap));
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .lane-screen .lane-rail {
    display: none;
  }
}

@media (max-width: 720px) {
  .lane-screen .room-layout {
    --lane-composer-left: calc((100vw - min(var(--content-width), 100vw)) / 2 + var(--lane-page-pad));
    --lane-composer-width: calc(min(var(--content-width), 100vw) - var(--lane-page-pad) - var(--lane-page-pad));
    grid-template-columns: 1fr;
  }
  .lane-family {
    display: none;
  }
}

body.is-focus .lane-screen .room-layout {
  --lane-composer-left: calc((100vw - min(var(--content-width), 100vw)) / 2 + var(--lane-page-pad));
  --lane-composer-width: calc(min(var(--content-width), 100vw) - var(--lane-page-pad) - var(--lane-page-pad));
  grid-template-columns: 1fr;
}

body.is-focus .lane-family,
body.is-focus .lane-screen .lane-rail {
  display: none;
}

/* The space — the rail's quietest level: name only, a door up, visibly
   subordinate to the topic card under it. */
.lane-family-space {
  justify-self: start;
  margin-bottom: calc(-1 * var(--space-2));
  padding: 0;
  border: 0;
  background: transparent;
  /* Same voice as the rail's group headings ("Rooms", "Still unopened"). */
  font: 700 0.72rem var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.lane-family-space:hover,
.lane-family-space:focus-visible {
  color: var(--accent);
}

/* The topic card is the same object on a topic page and in one of its rooms, so
   it is styled once here and must not drift: the same width column, the same
   padding, and the mark on the title's *first* line rather than the vertical
   centre of a wrapped block — otherwise the icon jumps as you toggle between
   the two pages. */
.lane-family-source {
  margin-left: calc(-1 * var(--lane-family-card-bleed));
  margin-right: calc(-1 * var(--lane-family-card-bleed));
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Hover and focus light the card; playing deliberately does not. An expanded
   player is sixteen-by-nine of moving picture inside the card — putting an
   accent ring around that too was saying the same thing twice, and the blue
   read as an alert rather than as "this is the one playing". */
.lane-family-source:has(.lane-family-source-main:hover),
.lane-family-source:has(.lane-family-source-main:focus-visible) {
  border-color: var(--accent);
}

.lane-family-source-main {
  display: grid;
  grid-template-columns: var(--lane-family-icon-col) minmax(0, 1fr);
  align-items: flex-start;
  column-gap: var(--lane-family-card-gap);
  width: 100%;
  padding: var(--lane-family-card-pad);
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

/* The time sits under the title on the same 2px gap the room and fork cards give
   their metadata (.lane-family-room), so the three cards in the panel breathe
   alike instead of the source one standing apart. */
.lane-family-source.has-source-time .lane-family-source-main {
  padding-bottom: 2px;
}

/* Source icon rests in the page's own cream/tan family; the brand red only
   wakes up when the card is hovered. Each mark is nudged so its centre lands on
   the title's first line (0.82rem × 1.35), whatever its own height — same trick
   as the room header's context row. */
.lane-family-source .play-link {
  justify-self: center;
  width: 1rem;
  height: calc(1rem * 0.7);
  margin-bottom: 0;
  margin-top: calc((0.82rem * 1.35 - (1rem * 0.7)) / 2);
  color: var(--line);
  transition: color 0.15s ease;
}

.lane-family-source .play-link-generic {
  width: 1rem;
  height: 1rem;
  margin-top: calc((0.82rem * 1.35 - 1rem) / 2 + 2px);
}

.lane-family-source:has(.lane-family-source-main:hover) .play-link,
.lane-family-source:has(.lane-family-source-main:focus-visible) .play-link,
.lane-family-source.is-playing .play-link {
  color: var(--color-youtube);
}

.topic-family .lane-family-source-main {
  cursor: default;
}

/* The topic rail's title block is you-are-here, not a door, so hovering it lights
   nothing up — playing or not, since playing no longer colours the border. */
.topic-family .lane-family-source:has(.lane-family-source-main:hover),
.topic-family .lane-family-source:has(.lane-family-source-main:focus-visible) {
  border-color: var(--line);
}

.topic-family .lane-family-source:not(.is-playing):has(.lane-family-source-main:hover) .play-link,
.topic-family .lane-family-source:not(.is-playing):has(.lane-family-source-main:focus-visible) .play-link {
  color: var(--line);
}

.lane-family-source-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lane-family-source-title {
  font: 600 0.82rem var(--font-ui);
  line-height: 1.35;
  color: var(--ink);
}

/* A grid, so the time is a block-level child. As an inline-flex button it sat on
   a line box and collected that box's half-leading above and below it — six
   stray pixels the room and fork cards never paid, which is what made this card
   read looser than its neighbours. */
.lane-family-source-time-slot {
  display: grid;
  justify-items: start;
  box-sizing: border-box;
  padding: 0 var(--lane-family-card-pad) var(--lane-family-card-pad) calc(var(--lane-family-card-pad) + var(--lane-family-icon-col) + var(--lane-family-card-gap));
}

/* The room's source moment (e.g. 21:13) — where in the video this room lives.
   Sits below the source title, quiet and tabular so it reads as a
   timestamp rather than competing with the title. */
.lane-family-source-ts {
  display: block;
  justify-self: start;
  border: 0;
  background: transparent;
  padding: 0;
  font: 600 0.7rem var(--font-ui);
  line-height: 1.2;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.lane-family-source-ts-spacer {
  visibility: hidden;
}

/* A time label that plays wears the transport with it — ▶ before the cue, ⏸
   while that cue is what's playing. Shared by both rails: the room's cued moment
   and the topic's 0:00. */
.lane-family-source-play {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.lane-family-source-play-glyph {
  display: inline-grid;
  width: 9px;
  height: 9px;
  place-items: center;
}

.lane-family-source-play-glyph svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

button.lane-family-source-ts {
  cursor: pointer;
}

button.lane-family-source-ts:hover,
button.lane-family-source-ts:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.lane-family-source-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.lane-family-source-player {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--paper);
}

.lane-family-source-collapse {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
  display: inline-grid;
  place-items: center;
  width: var(--space-5);
  height: var(--space-5);
  padding: 0;
  border: 1px solid rgba(22, 22, 29, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 244, 0.92);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.lane-family-source-collapse:hover,
.lane-family-source-collapse:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.lane-family-group {
  display: grid;
  gap: var(--space-2);
}

.lane-family-section-body {
  display: none;
  gap: var(--space-2);
}

.lane-family-section-body.is-open,
.lane-family-section-body.is-preview-open {
  display: grid;
}

/* Forked Rooms / Bookmarks headings are toggles: the heading is the whole
   affordance, caret says which way. */
.lane-family-heading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.lane-family-heading .room-toc-title {
  flex: 1 1 auto;
  margin: 0;
}

.lane-family-heading:hover,
.lane-family-heading:focus-visible {
  color: var(--ink);
  outline: 0;
}

.lane-family-heading:hover .room-toc-title,
.lane-family-heading:focus-visible .room-toc-title {
  color: var(--ink);
}

.lane-family-room {
  display: grid;
  grid-template-columns: var(--lane-family-icon-col) minmax(0, 1fr);
  gap: 2px;
  column-gap: var(--lane-family-card-gap);
  align-items: start;
  margin-left: calc(-1 * var(--lane-family-card-bleed));
  margin-right: calc(-1 * var(--lane-family-card-bleed));
  box-sizing: border-box;
  text-align: left;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius-md);
  padding: var(--lane-family-card-pad);
  cursor: pointer;
}

.lane-family-room:hover {
  border-color: var(--accent);
}

.lane-family-room.is-here {
  background: var(--panel);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  cursor: default;
}

.lane-family-room-title {
  display: block;
  font: 600 0.8rem var(--font-ui);
  line-height: 1.35;
  color: var(--ink);
}

.lane-family-room-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lane-family-room-icon {
  display: grid;
  place-items: center;
  justify-self: center;
  width: var(--lane-family-icon-col);
  height: 1rem;
  margin-top: calc((0.8rem * 1.35 - 1rem) / 2 + 2px);
}

.lane-family-room-icon {
  color: var(--muted);
}

.lane-family-room-icon .primitive-icon,
.lane-family-room-icon svg {
  display: block;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lane-family-room.is-here .lane-family-room-icon {
  color: var(--accent);
}

/* One line, always: the meta is priority-ordered (unvisited · new · people)
   and ellipsizes from the right — the tail is what gets sacrificed. */
.lane-family-room-meta {
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lane-family-here {
  font: 700 0.68rem var(--font-ui);
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.lane-family-room.is-fork {
  margin-left: calc(-1 * var(--lane-family-card-bleed));
}

/* Away-ness, quietly: a fork you haven't stepped into yet. Muted, not
   accent — accent is reserved for "you are here", the room you're in. */
.lane-family-unvisited {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.62rem;
  color: var(--muted);
}

/* Bookmarks — this room's notable parts, each a jump into the lane. Quieter
   than room cards: no border, just glyph + summary. */
.lane-bookmark {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  column-gap: var(--space-2);
  align-items: start;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: var(--space-1) 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.lane-bookmark .lane-structure-mark {
  margin-top: calc((0.8rem * 1.28 - 1rem) / 2);
}

.lane-bookmark:hover,
.lane-bookmark:focus-visible {
  background: var(--soft);
}

.lane-bookmark-label {
  display: block;
  margin-top: -0.06rem;
  font-size: 0.8rem;
  line-height: 1.25;
  color: var(--ink);
}

.lane-bookmark-status {
  margin-right: var(--space-1);
  color: var(--muted);
  font: 700 0.62rem var(--font-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lane-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  min-height: calc((0.8rem * var(--line-ui)) + (2 * var(--space-1)) + 2px);
}

.lane-head-row .room-eyebrow {
  margin: 0;
}

/* One light line per day, derived from the messages' local time. The label
   interrupts the hairline, quiet and centered. */
.lane-day {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--muted);
}

.lane-day::before,
.lane-day::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.lane-day-label {
  flex: 0 0 auto;
  font: 600 0.68rem var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* The opening post — Crux's first message, a post like any other. */
.lane-author.is-crux {
  color: var(--green);
}

.lane-msg-opening .lane-opening-question {
  font-style: italic;
}

/* The lane itself — tighter than the pair feed; chat density. */
.lane-feed {
  display: grid;
  gap: var(--space-3);
}

.lane-msg {
  position: relative;
  display: grid;
  gap: 2px;
  padding: var(--space-2) var(--space-3) var(--space-2) 0;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.lane-msg.is-reply-target {
  isolation: isolate;
}

.lane-msg.is-reply-target::before {
  content: "";
  position: absolute;
  inset: 0 0 0 calc(-1 * var(--space-2));
  z-index: -1;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.lane-msg-reply {
  padding-right: 0;
  border-radius: var(--radius-sm);
}

.lane-thread {
  display: grid;
  gap: var(--space-1);
}

.lane-msg-head {
  --lane-msg-head-height: 1.55rem;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.lane-author {
  display: inline-flex;
  align-items: center;
  min-height: var(--lane-msg-head-height);
  font: 700 0.85rem var(--font-ui);
  line-height: 1;
}

.lane-author.is-you {
  color: var(--accent);
}

.lane-time {
  display: inline-flex;
  align-items: center;
  min-height: var(--lane-msg-head-height);
  font-size: 0.72rem;
  line-height: 1;
  color: var(--muted);
}

.lane-edited {
  display: inline-flex;
  align-items: center;
  min-height: var(--lane-msg-head-height);
  line-height: 1;
}

/* A button: tapping jumps to (and flashes) the message this one replies to. */
.lane-replying {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 0.72rem;
  color: var(--accent);
  cursor: pointer;
}

.lane-replying:hover {
  text-decoration: underline;
}

.lane-challenge-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--clay);
}

.lane-challenge-mark .lane-structure-mark {
  color: inherit;
}

.lane-challenge-open {
  cursor: pointer;
}

.lane-challenge-open:hover,
.lane-challenge-open:focus-visible {
  color: var(--accent);
  outline: 0;
}

.lane-msg-body {
  margin: 0;
  font-family: var(--font-reading);
  font-size: 0.95rem;
  line-height: var(--line-reading);
  text-wrap: pretty;
}

.lane-msg-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.lane-replies {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  margin-left: var(--space-4);
}

/* The indent rail is the fold-back: it draws the thread's left line and is
   a button — a wider hit target than the 2px it shows. The expand is the
   avatar-stack chip, which only exists while the thread is folded. */
.lane-replies-rail {
  width: calc(var(--space-2) + 2px);
  padding: 0;
  border: 0;
  border-left: 2px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  background: transparent;
  cursor: pointer;
}

.lane-replies-rail:hover,
.lane-replies-rail:focus-visible {
  border-left-color: var(--accent);
}

.lane-replies-body {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
}

/* The mark on an auto-linked retro reply — Crux set the ↩; hover says so.
   For the involved authors it's a button that opens the undo menu. */
.lane-retro-linked-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: 700 0.62rem var(--font-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

button.lane-retro-linked-mark {
  cursor: pointer;
}

button.lane-retro-linked-mark:hover,
button.lane-retro-linked-mark:focus-visible {
  color: var(--accent-dark);
  outline: 0;
}

.lane-retro-linked-mark .lane-structure-mark {
  color: inherit;
}

.lane-replies-toggle {
  display: inline-flex;
  gap: var(--space-1);
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 0.75rem var(--font-ui);
  text-align: left;
  cursor: pointer;
}

.lane-replies-toggle:hover,
.lane-replies-toggle:focus-visible {
  color: var(--accent);
  outline: 0;
}

.lane-replies-toggle-copy {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lane-reply-latest-avatar {
  width: 1.3rem;
  height: 1.3rem;
  font-size: 0.6rem;
}

.lane-reply-avatar-stack {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
}

.lane-reply-avatar-stack .lane-reply-latest-avatar + .lane-reply-latest-avatar,
.lane-reply-avatar-more {
  margin-left: -0.34rem;
}

.lane-reply-avatar-more {
  display: inline-grid;
  width: 1.3rem;
  height: 1.3rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted);
  font: 700 0.58rem var(--font-ui);
}

/* Reply appears on hover/focus without shifting. */
@media (hover: hover) and (pointer: fine) {
  .lane-msg .lane-reply-btn {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
  }

  .lane-msg:hover .lane-reply-btn,
  .lane-msg:focus-within .lane-reply-btn {
    opacity: 1;
    pointer-events: auto;
  }
}

.lane-reply-btn,
.lane-quiet-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border: none;
  background: transparent;
  color: var(--muted);
  font: 600 0.75rem var(--font-ui);
  padding: 0;
  cursor: pointer;
}

.lane-reply-btn {
  margin-left: var(--space-2);
}

.lane-reply-btn-icon {
  position: relative;
  top: 0.16em;
}

.lane-reply-btn:hover,
.lane-quiet-btn:hover {
  color: var(--accent);
}

/* The chip menu — challenges (jump / reply / dismiss, yours alone) and
   retro-reply asks share it. */
.lane-chip-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--lane-msg-head-height);
}

.lane-msg-head .lane-chip-control .lane-structure-mark {
  transform: translateY(0.14rem);
}

.lane-msg-head .lane-chip-control .lane-challenge-mark .lane-structure-mark {
  transform: none;
}

.lane-chip-menu {
  position: absolute;
  top: calc(100% + var(--space-1));
  left: 0;
  z-index: 30;
  display: grid;
  min-width: 200px;
  padding: var(--space-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.lane-chip-item {
  display: flex;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font: 600 0.8rem var(--font-ui);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.lane-chip-item:hover,
.lane-chip-item:focus-visible {
  background: var(--soft);
  outline: 0;
}

/* The ask's context line inside a chip menu (who noticed what, the tally). */
.lane-chip-note {
  margin: 0;
  padding: var(--space-1) var(--space-3) var(--space-2);
  max-width: 240px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
  white-space: normal;
}

/* Primitive icons are monochrome SVGs in source and inherit color here.
   Structural marks stay neutral; surrounding controls carry color only when
   there is an active/current state. */
.lane-structure-mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: var(--muted);
  font: 700 0.85rem var(--font-ui);
  line-height: 1;
}

.lane-structure-mark .primitive-icon,
.lane-structure-mark svg {
  display: block;
  width: 1rem;
  height: 1rem;
}

.lane-structure-mark svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lane-structure-mark-decision svg {
  stroke-width: 1.9;
}

.lane-structure-mark-main,
.lane-structure-mark-retro,
.lane-structure-mark-drift,
.lane-structure-mark-kickoff,
.lane-structure-mark-fork {
  color: var(--muted);
}

.lane-structure-mark-decision {
  color: var(--green);
}

.lane-structure-mark-definition {
  color: var(--green);
}

.lane-structure-mark-unanswered {
  color: var(--muted);
}

.lane-structure-mark-challenge {
  color: var(--clay);
}

/* The seam: the one structural row in the lane — one grammar for collapsed
   and forked alike: glyph first, then the line, flush with the lane's
   content, no hairlines. Only the glyph and affordance change. */
.lane-seam {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-width: 0;
  padding: var(--space-1) 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

button.lane-seam:hover,
button.lane-seam:focus-visible {
  color: var(--ink);
}

/* Top-aligned, with the primitive mark and avatars centered against the first text
   line — so when the summary expands to multiple lines nothing already on
   screen moves; new lines just appear below. */
.lane-seam-fold {
  align-items: flex-start;
}

.lane-seam-fold .lane-fold-people {
  margin-top: calc((0.95rem * var(--line-reading) - 1.35rem) / 2);
}

.lane-seam-fold .lane-structure-mark {
  margin-top: calc((0.95rem * var(--line-reading) - 1rem) / 2);
}

/* Fold: a seam holding the collapse residue — one-line summary + expand. */
.lane-fold {
  display: grid;
  gap: var(--space-2);
}

.lane-fold-summary {
  font-family: var(--font-reading);
  font-size: 0.95rem;
  line-height: var(--line-reading);
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Expanded, the summary is the strand's heading — show all of it, wrapping
   below instead of ellipsing. */
.lane-fold.is-open .lane-fold-summary {
  white-space: normal;
  overflow: visible;
}

.lane-fold-people {
  display: flex;
  flex: none;
  align-items: center;
}

.lane-fold-people .lane-fold-avatar {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.62rem;
}

.lane-fold-people .lane-fold-avatar + .lane-fold-avatar {
  margin-left: -0.4rem;
}

.lane-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
  color: inherit;
}

.lane-caret::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.08rem) rotate(45deg);
}

.lane-caret.is-open::before {
  transform: translateY(0.08rem) rotate(225deg);
}

.lane-fold-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  margin-left: var(--space-4);
}

/* The fold's left line. As a button it's also the fold-back — same contract
   as the reply rail one level down; as a span (the static preview) it's just
   the line. A wider hit target than the 2px it shows. */
.lane-fold-rail {
  width: calc(var(--space-3) + 2px);
  padding: 0;
  border: 0;
  border-left: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: transparent;
}

button.lane-fold-rail {
  cursor: pointer;
}

button.lane-fold-rail:hover,
button.lane-fold-rail:focus-visible {
  border-left-color: var(--accent);
  outline: 0;
}

.lane-fold-body-inner {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

/* Note above, verbs below — the decision bar's grammar at lane weight, so a
   record's foot and a decision's bar read as the same species. */
.lane-fold-foot {
  display: grid;
  gap: var(--space-2);
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0 var(--space-3);
}

.lane-msg.is-inline-previewed,
.lane-fold.is-inline-previewed,
.lane-drift-placement-preview.is-inline-previewed,
.lane-msg.is-drift-preview-source,
.lane-fold.is-drift-preview-source {
  outline: 2px solid color-mix(in srgb, var(--accent) 28%, transparent);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  transition:
    opacity 0.18s ease,
    background-color 0.18s ease,
    outline-color 0.18s ease;
}

.app-shell.is-previewing-drift-replacement .lane-feed .lane-msg.is-drift-preview-source,
.app-shell.is-previewing-drift-replacement .lane-feed .lane-fold.is-drift-preview-source {
  opacity: 0;
  pointer-events: none;
}

.app-shell.is-previewing-shown-drift.is-previewing-drift-leave .lane-feed .lane-msg.is-inline-previewed,
.app-shell.is-previewing-shown-drift.is-previewing-drift-leave .lane-feed .lane-fold.is-inline-previewed {
  outline-color: transparent;
  background: transparent;
}

.lane-proposal-note {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Verb weight: the proposal's verbs are peers — both outlined (a filled slab
   overpowers the lane); dismiss stays a bare link. */
.lane-agree-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border: 1px solid color-mix(in srgb, var(--ink) 42%, transparent);
  background: transparent;
  color: var(--ink);
  font: 600 0.8rem var(--font-ui);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.lane-agree-btn:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

/* Marker: where a strand forked out — the lane keeps the door (a seam). It
   keeps its hairline: a fork is a cut in the lane. The row reads like its
   siblings — title, then the fork mark — and the whole line routes to
   the room. */

/* Decision point — a live room call, bordered like a challenged point. */
.lane-decision {
  border: 1px solid color-mix(in srgb, var(--green) 34%, transparent);
  background: transparent;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: grid;
  gap: var(--space-2);
}

.lane-decision-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.lane-decision-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--muted);
  font: 600 0.75rem var(--font-ui);
}

.lane-decision-meta {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--muted);
}

.lane-decision-question {
  margin: 0;
  font: 600 0.92rem var(--font-ui);
  line-height: 1.4;
}

.lane-decision-why {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

.lane-decision-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.lane-drift-options {
  align-items: end;
}

.lane-drift-choice {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.lane-drift-tally-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 var(--space-2);
  min-height: 1.35rem;
}

.lane-decision-option {
  border: 1px solid var(--line);
  background: var(--panel);
  font: 600 0.8rem var(--font-ui);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--ink);
  min-width: 0;
  display: grid;
  justify-items: start;
  align-content: start;
  gap: var(--space-1);
  text-align: left;
}

.lane-decision-option-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}

.lane-decision-option.is-active {
  border-color: var(--green);
  color: var(--green);
  background: color-mix(in srgb, var(--green) 10%, transparent);
}

.lane-reference-toggle {
  margin-left: auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 700 0.66rem var(--font-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem var(--space-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.lane-reference-toggle:hover,
.lane-reference-toggle:focus-visible,
.lane-reference-toggle.is-active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  outline: 0;
}

@media (max-width: 560px) {
  .lane-decision-options {
    grid-template-columns: 1fr;
  }
}

.lane-drift-voter {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.54rem;
  box-shadow: 0 0 0 2px var(--panel);
}

.lane-drift-voter + .lane-drift-voter {
  margin-left: -0.35rem;
}

.lane-drift-vote-zero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px dashed var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
}

.lane-pill-mark {
  display: inline-block;
  width: 1rem;
  height: 0.48rem;
  border: 1.5px solid currentColor;
  border-radius: var(--radius-pill);
  transform: rotate(-18deg);
}

.lane-drift-placement-preview {
  display: none;
  gap: var(--space-1);
  padding: var(--space-2);
  border: 1px dashed color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.lane-drift-placement-preview.is-drift-preview-active {
  display: grid;
  animation: lane-drift-preview-in 0.18s ease-out both;
}

.lane-drift-decision {
  position: relative;
}

.lane-drift-decision > .lane-drift-placement-pill.is-drift-preview-active {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + var(--space-2));
  z-index: 2;
}

@keyframes lane-drift-preview-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lane-drift-placement-fork {
  padding: var(--space-1);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  cursor: default;
}

.lane-drift-preview-kicker {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.lane-drift-preview-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.lane-drift-preview-room,
.lane-drift-preview-seam {
  pointer-events: none;
}

.lane-drift-preview-room {
  background: var(--panel);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  cursor: default;
}

.lane-drift-preview-seam {
  cursor: default;
  color: var(--ink);
}

/* A drift decision is structure-species: accent border, accent-active votes.
   Same card grammar as a decision point — drift IS a decision. */
.lane-drift-decision {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.lane-drift-decision .lane-decision-option.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.lane-decision-foot {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.lane-drift-fork-form {
  display: grid;
  gap: var(--space-1);
  padding-top: var(--space-1);
  border-top: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}

.lane-drift-fork-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.lane-drift-fork-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.lane-drift-fork-input {
  flex: 1 1 220px;
  min-width: 0;
  padding: var(--space-1) var(--space-2);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-reading);
  font-size: 0.9rem;
}

.lane-drift-fork-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* The composer — people just post. Pinned to the viewport bottom while the
   lane scrolls, like any chat. */
.lane-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-2);
  gap: var(--space-2);
  align-items: end;
  position: fixed;
  left: max(var(--space-2), var(--lane-composer-left));
  bottom: 0;
  z-index: 35;
  width: min(var(--lane-composer-width), calc(100vw - var(--space-2) - var(--space-2)));
  isolation: isolate;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding-block: var(--space-2) calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
}

.lane-composer::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--space-3));
  z-index: -1;
  background: var(--paper);
}

.lane-composer-row {
  display: contents;
}

/* Chat input that grows with the text — natively via field-sizing, with the
   data-autogrow JS as fallback. Floor of two lines, capped so it never eats
   the lane. */
.lane-composer-row .room-composer-input {
  grid-column: 1;
  flex: 1;
  min-height: calc(2lh + 2 * var(--space-1) + 2px);
  height: auto;
  field-sizing: content;
  max-height: 9rem;
  resize: none;
  overflow-y: auto;
  padding: var(--space-1) var(--space-3);
  background: var(--panel);
  font-size: 0.95rem;
}

.lane-composer-row .room-composer-submit {
  grid-column: 2;
  padding-block: var(--space-1);
}

.lane-composer-target {
  grid-column: 1 / -1;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
}

.lane-composer-target::before {
  content: "";
  position: absolute;
  inset: 0 0 0 calc(-1 * var(--space-2));
  z-index: -1;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.lane-composer-target-label {
  flex: 0 1 auto;
  min-width: 0;
  font: 500 0.85rem var(--font-ui);
  color: var(--muted);
}

.lane-composer-target-clear {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
}

.lane-empty {
  margin: 0;
  padding: var(--space-4) var(--space-3);
  font-style: italic;
  color: var(--muted);
}

/* Flash targets in the lane (jump from the rail or a bookmark). */
.lane-msg.is-focused,
.lane-fold.is-focused,
.lane-decision.is-focused,
.lane-marker.is-focused {
  border-radius: var(--radius-md);
  animation: room-focus-flash 2.2s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .lane-msg.is-focused,
  .lane-fold.is-focused,
  .lane-decision.is-focused,
  .lane-marker.is-focused {
    animation: none;
  }
}

/* ── The rail: unresolved, in three collapsed categories ────────────────── */

/* The rail mirrors the family column: the same soft panel, the same
   collapsible-heading grammar (plain uppercase heading + caret — outlines
   belong to cards, not headings). */
.lane-rail {
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  background: var(--panel);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(22, 22, 29, 0.04), 0 10px 28px rgba(22, 22, 29, 0.06);
}

.lane-rail .room-toc-group {
  gap: var(--space-4);
}

.lane-rail-group {
  display: grid;
  gap: var(--space-2);
}

.lane-rail-group + .lane-rail-group {
  margin-top: 0;
}

/* A category header: name · count · caret. Collapsed by default; an empty
   category stays listed with a quiet zero (no caret — nothing to open).
   Same anatomy as the family column's Forked rooms / Bookmarks headings. */
.lane-rail-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0.9rem 1rem;
  align-items: center;
  column-gap: var(--space-2);
  width: 100%;
  height: 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  line-height: 1;
  text-align: left;
  cursor: pointer;
}

.lane-rail-heading:disabled {
  opacity: 1;
  cursor: default;
}

.lane-rail-heading:not(:disabled):hover,
.lane-rail-heading:focus-visible {
  color: var(--ink);
  outline: 0;
}

.lane-rail-heading-label {
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lane-rail-heading-count {
  display: inline-flex;
  width: 1rem;
  height: 0.9rem;
  align-items: center;
  justify-content: center;
  font: 700 0.72rem var(--font-ui);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* No banner word, no total — the three live counts are the rail's whole
   signal, so they wear the urgent red; a zero stays quiet. */
.lane-rail-heading-count.is-live {
  color: var(--urgent);
}

.lane-caret-placeholder {
  visibility: hidden;
}

.lane-rail-list {
  gap: var(--space-1);
  padding-left: 0;
}

/* Rail entries — cards cut from the same cloth as the family column. */
.lane-rail-item {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  cursor: pointer;
}

.lane-rail-item.is-compact {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: var(--space-2);
}

.lane-rail-item:hover,
.lane-rail-item:focus-visible {
  border-color: var(--accent);
}

.lane-rail-label {
  font: 600 0.8rem var(--font-ui);
  line-height: 1.35;
  color: var(--ink);
}

.lane-rail-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font: 600 0.62rem var(--font-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lane-rail-item.is-compact .lane-rail-status {
  padding-top: 0.08rem;
}

.lane-rail-status .lane-structure-mark {
  font-size: 0.7rem;
  color: inherit;
}

.lane-rail-status .lane-structure-mark-decision {
  font-size: 0.58rem;
}

.lane-rail-status .lane-structure-mark-definition {
  font-size: 0.7rem;
}

.lane-rail-status-unanswered .lane-structure-mark {
  margin-left: -0.25rem;
}

/* Rail entries stay mostly neutral; only explicit challenge/decision states
   keep status color. */
.lane-rail-status-drift { color: var(--muted); }
.lane-rail-status-retro { color: var(--muted); }
.lane-rail-status-unanswered { color: var(--muted); }
.lane-rail-status-definition { color: var(--green); }
.lane-rail-status-decision { color: var(--green); }
.lane-rail-status-challenge { color: var(--clay); }

/* A challenge entry carries its ✕ — yours alone to see, yours alone to
   dismiss. The row is a grid so the entry keeps its full hit area. */
.lane-rail-dismissable {
  position: relative;
}

.lane-rail-dismissable .lane-rail-item {
  padding-right: var(--space-5);
}

.lane-rail-dismiss {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 0.72rem var(--font-ui);
  line-height: 1;
  padding: var(--space-1);
  cursor: pointer;
}

.lane-rail-dismiss:hover,
.lane-rail-dismiss:focus-visible {
  color: var(--clay);
}

/* ── 7/17 room changes ────────────────────────────────────────────────────── */

/* Room-family signifier: the node mark rides the eyebrow. */
.room-eyebrow .lane-structure-mark {
  margin-right: var(--space-1);
  font-size: 0.8rem;
}

/* Room Read: owner line, and the live summary set off from the fixed facts. */
.lane-read-owner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.lane-read-live {
  border-top: 1px solid var(--line);
  padding-top: var(--space-3);
}

.lane-read-refresh {
  margin-bottom: var(--space-1);
}

/* "(edited)" — the quiet record of an in-window edit. */
.lane-edited {
  color: var(--muted);
  font-size: 0.72rem;
}

/* Edit-in-place: the body swaps for a compact composer. */
.lane-edit-form {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.lane-edit-actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

/* Crux filed a post under a drift strand: the mark says so; the author's
   light undo shows only when the message is hovered (always on touch). */
.lane-routed-control {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.lane-routed-mark .lane-structure-mark {
  font-size: 0.85rem;
}

.lane-routed-undo {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 0.72rem var(--font-ui);
  padding: 0;
  cursor: pointer;
}

.lane-routed-undo:hover,
.lane-routed-undo:focus-visible {
  color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .lane-msg .lane-routed-undo {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
  }

  .lane-msg:hover .lane-routed-undo,
  .lane-msg:focus-within .lane-routed-undo {
    opacity: 1;
    pointer-events: auto;
  }
}

.lane-fold-head {
  display: grid;
  min-width: 0;
}

.lane-fold-head .lane-seam {
  min-width: 0;
}

.lane-fold-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: var(--lane-fold-reply-offset, calc(1rem + var(--space-2)));
  margin-top: calc(-1 * var(--space-1));
}

.lane-fold-reply {
  margin-left: 0;
  white-space: nowrap;
}

.lane-fold-reply:hover,
.lane-fold-reply:focus-visible {
  color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .lane-fold .lane-fold-reply {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
  }

  .lane-fold:hover .lane-fold-reply,
  .lane-fold:focus-within .lane-fold-reply {
    opacity: 1;
    pointer-events: auto;
  }
}

.lane-composer-target-strand {
  flex: 1 1 auto;
  font: 600 0.8rem var(--font-ui);
  line-height: 1.35;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

/* The routed-post blink: twice, then rest. Rides seams, bookmarks, drift
   cards, and the rail when the ○ chip points at it. */
.is-attention-flash {
  animation: lane-attention 0.55s ease-in-out 2;
}

@keyframes lane-attention {
  50% {
    background-color: color-mix(in srgb, var(--accent) 16%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-attention-flash {
    animation: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
  }
}

/* ── Room-name scroll: the room title gets out of the way ─────────────────
   Standard/wide desktop reveal the full room header on scroll-up. Focus mode
   uses the floating room-name pill on desktop. Mobile still lets the app
   header scroll away below. Class toggles only — no re-render (see main.js). */

@media (min-width: 901px) {
  body.is-lane-pill:not(.is-focus) .lane-room-chrome {
    --lane-head-reveal-top: calc(var(--topbar-height) + var(--space-5) - var(--space-1));
    position: sticky;
    top: var(--lane-head-reveal-top);
    z-index: 35;
    isolation: isolate;
    padding-block: var(--space-3);
    margin-block: calc(-1 * var(--space-3));
    background: var(--paper);
    transform: translateY(calc(-100% - var(--lane-head-reveal-top)));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  body.is-lane-pill:not(.is-focus) .lane-room-chrome::before {
    content: "";
    position: absolute;
    top: calc(-1 * (var(--lane-head-reveal-top) - var(--topbar-height)));
    right: calc(-1 * var(--space-3));
    bottom: 0;
    left: calc(-1 * var(--space-3));
    z-index: -1;
    background: var(--paper);
  }

  body.is-lane-pill:not(.is-focus).is-scroll-up .lane-room-chrome {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
}

body.is-lane-pill.is-focus .lane-head {
  position: sticky;
  top: var(--space-2);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  /* Grid item: without this the nowrap title sets the min size and the
     pill (chips included) runs past the viewport. */
  min-width: 0;
  max-width: 100%;
  padding: var(--space-1) var(--space-3);
  background: var(--paper);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  transform: translateY(calc(-100% - var(--space-3)));
  opacity: 0;
  pointer-events: none;
  transition: top 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

body.is-lane-pill.is-focus.is-scroll-up .lane-head {
  top: calc(var(--topbar-height) + var(--space-2));
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

body.is-lane-pill.is-focus .lane-head .room-eyebrow {
  display: none;
}

body.is-lane-pill.is-focus .lane-head .lane-head-row {
  display: none;
}

body.is-lane-pill.is-focus .lane-head .room-title-row {
  order: -1;
  flex: 1 1 auto;
  min-width: 0;
}

body.is-lane-pill.is-focus .lane-head .room-claim {
  font-size: 0.92rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .topbar {
    transition: transform 0.18s ease;
  }

  body.is-lane-pill .topbar {
    transform: translateY(-100%);
  }

  body.is-lane-pill.is-scroll-up .topbar {
    transform: none;
  }

  body.is-lane-pill .lane-head {
    position: sticky;
    top: var(--space-2);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    max-width: 100%;
    padding: var(--space-1) var(--space-3);
    background: var(--paper);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow);
    transform: translateY(calc(-100% - var(--space-3)));
    opacity: 0;
    pointer-events: none;
    transition: top 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
  }

  body.is-lane-pill.is-scroll-up .lane-head {
    top: calc(var(--topbar-height) + var(--space-2));
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  body.is-lane-pill .lane-head .room-eyebrow {
    display: none;
  }

  body.is-lane-pill .lane-head .lane-head-row {
    display: none;
  }

  body.is-lane-pill .lane-head .room-title-row {
    order: -1;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
  }

  body.is-lane-pill .lane-head .room-claim {
    font-size: 0.92rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: translateY(2px);
  }

  body.is-lane-pill .lane-head .lane-sheet-chip-nav,
  body.is-lane-pill .lane-head .lane-sheet-chip-unresolved {
    background: var(--panel);
  }
}

@media (max-width: 720px) {
  .room-title-row {
    flex-wrap: wrap;
  }

  .room-title-row .lane-head-tools {
    flex-basis: 100%;
    margin-left: 0;
    margin-top: 0;
  }

  body.is-lane-pill .room-title-row .lane-head-tools {
    flex-basis: auto;
    margin-left: 0;
    margin-top: calc((1.4rem * 1.25 - 32px) / 2);
  }
}
