/* Chorus app pages: the same paper, ink and flat inks as the landing page.
   Black on paper is the base. Blue, yellow and red appear as flat inks for state, never as a single accent. */

@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/InterTight-VF.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Reddit Mono"; src: url("/assets/fonts/RedditMono-VF.ttf") format("truetype"); font-weight: 200 900; font-display: swap; }

:root {
  --paper: #F0EFEA;
  --ink: #161616;
  --blue: #3B6FD0;
  --yellow: #EFC66B;
  --red: #D8492F;
  --bg: var(--paper);
  --bg-deep: #E7E6E0;
  --panel: #F7F6F2;
  --panel-2: #FFFFFF;
  --line: rgba(22, 22, 22, 0.14);
  --line-strong: rgba(22, 22, 22, 0.34);
  --text: var(--ink);
  --muted: rgba(22, 22, 22, 0.72);
  --faint: rgba(22, 22, 22, 0.6);
  --brass: var(--ink);            /* the accent is ink: primary buttons, the current page, emphasis */
  --brass-bright: #000000;
  --brass-soft: rgba(22, 22, 22, 0.06);
  --mint: #2B5DC0;                /* live and ok: the brand blue, a shade darker so small type stays readable */
  --periwinkle: #2B5DC0;
  --rose: var(--ink);
  --coral: #C23B22;               /* error and stop: the brand red, a shade darker for small type */
  --serif: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: var(--sans);            /* one typeface on these pages; small labels are plain sentence case, not mono capitals */
  --code: "Reddit Mono", ui-monospace, Menlo, monospace;   /* wallet addresses only */
  --rail: clamp(340px, 25vw, 392px);
  color-scheme: light;
}

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

[hidden] { display: none !important; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  background-image: none;
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 75%);
}

::selection { background: var(--ink); color: var(--paper); }

a { color: var(--brass); }

button, textarea, input { font: inherit; color: inherit; }

button { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -80px;
  z-index: 200;
  background: var(--brass);
  color: var(--bg);
  padding: 9px 14px;
  font: 12px/1 var(--sans);
  border-radius: 2px;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1800px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px clamp(18px, 3vw, 48px) 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- Header ---------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 2px 13px 2px 13px;
  background: linear-gradient(145deg, rgba(231, 180, 92, 0.1), rgba(255, 255, 255, 0.02));
}

.wordmark {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 2.2vw, 36px);
  line-height: 0.95;
  letter-spacing: -0.028em;
}

.brand-copy { min-width: 0; }

.brand-sub {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
  min-width: 0;
}

.pitch {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
  max-width: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: baseline;
  gap: 13px;
  flex-wrap: wrap;
  font: 9.5px/1.2 var(--mono);
}
.site-nav a {
  color: var(--faint);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] {
  color: var(--brass);
  box-shadow: inset 0 -1px 0 rgba(231, 180, 92, 0.55);
}

.head-rail {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.5vw, 24px);
  flex-wrap: wrap;
  min-width: 0;
}

.model-badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.model-label {
  font: 9.5px/1 var(--mono);
  color: var(--faint);
}
.model-name {
  font: 10.5px/1.3 var(--mono);
  color: var(--text);
  white-space: nowrap;
}

.head-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.head-stat-label {
  font: 9px/1.2 var(--mono);
  color: var(--faint);
  white-space: nowrap;
}
.head-stat-value {
  font: 14px/1.1 var(--mono);
  color: var(--text);
  white-space: nowrap;
}

.slice-counter {
  font: 10.5px/1.2 var(--mono);
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.head-rail > .slice-counter {
  flex: 0 0 100%;
  text-align: right;
}
.slice-counter[data-state="open"] { color: var(--text); }
.slice-counter[data-state="complete"] { color: var(--mint); }

.wallet {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}
.wallet-btn {
  padding: 7px 11px;
  border: 1px solid rgba(231, 180, 92, 0.42);
  border-radius: 99px;
  background: var(--brass-soft);
  color: var(--brass-bright);
  font: 600 10px/1 var(--sans);
  cursor: pointer;
  white-space: nowrap;
}
.wallet-btn:hover { background: rgba(231, 180, 92, 0.22); }
.wallet-btn:disabled { opacity: 0.5; cursor: wait; }
.wallet-session {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px 5px 9px;
  border: 1px solid rgba(111, 227, 180, 0.27);
  border-radius: 99px;
  background: rgba(111, 227, 180, 0.045);
  font: 9px/1 var(--mono);
  white-space: nowrap;
}
.wallet-address { color: var(--text); }
.wallet-badge {
  padding: 2px 4px;
  border: 1px solid rgba(111, 227, 180, 0.34);
  border-radius: 99px;
  color: var(--mint);
  font: 7.5px/1 var(--mono);
}
.wallet-badge.is-free {
  border-color: var(--line-strong);
  color: var(--muted);
}
.wallet-balance { color: var(--brass); font-variant-numeric: tabular-nums; }
.wallet-out {
  border: 0;
  background: none;
  padding: 0 1px;
  color: var(--faint);
  font: 13px/1 var(--sans);
  cursor: pointer;
}
.wallet-out:hover { color: var(--coral); }

.conn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font: 10px/1 var(--mono);
  color: var(--muted);
  white-space: nowrap;
  background: transparent;
}
.conn-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px rgba(231, 180, 92, 0.12);
}
.conn[data-state="open"] { color: var(--mint); border-color: rgba(111, 227, 180, 0.3); }
.conn[data-state="open"] .conn-dot { background: var(--mint); box-shadow: 0 0 0 3px rgba(111, 227, 180, 0.13); }
.conn[data-state="connecting"] .conn-dot { animation: dotPulse 1.4s ease-in-out infinite; }
.conn[data-state="closed"],
.conn[data-state="error"] { color: var(--coral); border-color: rgba(255, 127, 111, 0.32); }
.conn[data-state="closed"] .conn-dot,
.conn[data-state="error"] .conn-dot { background: var(--coral); box-shadow: 0 0 0 3px rgba(255, 127, 111, 0.12); }

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Layout ---------- */

.layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail);
  gap: clamp(16px, 1.8vw, 28px);
  align-items: stretch;
}

.main-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
}

/* ---------- Hero / pipeline ---------- */

.hero {
  position: relative;
  flex: 0 0 auto;
  padding: 15px 18px 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background:
    var(--panel);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(231, 180, 92, 0.6) 32%, rgba(231, 180, 92, 0.12) 78%, transparent);
}

.hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 1.55vw, 26px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.018em;
}
.hero-sub {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  font: 10px/1 var(--mono);
  color: var(--muted);
  white-space: nowrap;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--faint);
}
.hero-status[data-state="idle"] .status-dot { background: var(--faint); }
.hero-status[data-state="generating"] { color: var(--mint); border-color: rgba(111, 227, 180, 0.3); }
.hero-status[data-state="generating"] .status-dot { background: var(--mint); box-shadow: 0 0 0 3px rgba(111, 227, 180, 0.12); animation: dotPulse 1.3s ease-in-out infinite; }
.hero-status[data-state="prefill"] { color: var(--brass); border-color: rgba(231, 180, 92, 0.34); }
.hero-status[data-state="prefill"] .status-dot { background: var(--brass); animation: dotPulse 1.1s ease-in-out infinite; }
.hero-status[data-state="done"] { color: var(--mint); border-color: rgba(111, 227, 180, 0.3); }
.hero-status[data-state="done"] .status-dot { background: var(--mint); }
.hero-status[data-state="error"] { color: var(--coral); border-color: rgba(255, 127, 111, 0.34); }
.hero-status[data-state="error"] .status-dot { background: var(--coral); }
.prefill-status {
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--brass);
}

.flow-wrap {
  margin-top: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.flow-wrap::-webkit-scrollbar { height: 6px; }
.flow-wrap::-webkit-scrollbar-thumb { background: var(--line-strong); }

.flow {
  display: flex;
  align-items: stretch;
  min-width: 690px;
  min-height: 98px;
}

.stage {
  --c: var(--brass);
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 9px 7px 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--c);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.stage.is-hot {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--c) 10%, var(--panel));
  border-color: color-mix(in srgb, var(--c) 52%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent);
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
.stage-role {
  font: 9px/1 var(--mono);
  color: var(--c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stage-badge {
  flex: 0 0 auto;
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font: 8px/1.2 var(--mono);
  color: var(--muted);
  white-space: nowrap;
}
.stage-name {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.22;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.44em;
}
.stage-range {
  font: 9.5px/1 var(--mono);
  color: var(--muted);
}
.stage-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
}
.stage-hop {
  font: 9.5px/1 var(--mono);
  color: var(--c);
  font-variant-numeric: tabular-nums;
}
.stage-foot-label {
  font: 8px/1 var(--mono);
  color: var(--faint);
  white-space: nowrap;
}

.link {
  align-self: center;
  flex: 0 0 24px;
  width: 24px;
  height: 1px;
  position: relative;
  background: var(--line-strong);
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
.link::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -2.5px;
  width: 5px; height: 5px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  transform: rotate(45deg);
  transition: border-color 0.16s ease;
}
.link.is-hot {
  background: var(--brass);
  box-shadow: 0 0 8px rgba(231, 180, 92, 0.65);
}
.link.is-hot::after { border-color: var(--brass); }

.prefill {
  margin-top: 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.prefill-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font: 9.5px/1 var(--mono);
  color: var(--brass);
}
.prefill-track {
  height: 4px;
  background: rgba(231, 180, 92, 0.12);
  border-radius: 99px;
  overflow: hidden;
}
.prefill-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(231, 180, 92, 0.25), var(--brass));
  box-shadow: 0 0 12px rgba(231, 180, 92, 0.5);
  transition: width 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.strip-block { margin-top: 10px; }

.strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}
.strip-title {
  font: 9px/1 var(--mono);
  color: var(--faint);
  white-space: nowrap;
}
.strip-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  font: 8.5px/1 var(--mono);
  color: var(--muted);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.legend-dot {
  width: 7px; height: 7px;
  border-radius: 1px;
  background: var(--c);
}
.legend-item.is-loading .legend-dot {
  background: transparent;
  border: 1px solid var(--c);
}
.legend-progress { color: var(--c); }

.layer-strip {
  display: grid;
  grid-template-columns: repeat(var(--cells, 24), minmax(0, 1fr));
  gap: 2px;
  height: clamp(34px, 4.4vh, 46px);
}

.cell {
  --c: var(--brass);
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--c) 24%, var(--line));
  border-radius: 1px;
  background: color-mix(in srgb, var(--c) 12%, var(--panel));
  transition: background 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.cell.is-fallback {
  background-color: rgba(231, 180, 92, 0.045);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(231, 180, 92, 0.2) 0 1px,
    transparent 1px 5px
  );
}
.cell.is-empty {
  background: rgba(255, 255, 255, 0.025);
  border-style: dashed;
  border-color: var(--line);
}
.cell-num {
  position: absolute;
  left: 3px;
  bottom: 2px;
  font: 7.5px/1 var(--mono);
  color: rgba(237, 244, 236, 0.4);
  pointer-events: none;
}
.cell-load {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--c);
  box-shadow: 0 0 6px var(--c);
  transition: width 0.25s ease;
}
.cell.is-preloaded { box-shadow: inset 0 0 0 1px rgba(231, 180, 92, 0.5); }
.cell.is-coordinator { opacity: 0.58; }
.cell.is-assigned {
  border-color: color-mix(in srgb, var(--c) 52%, transparent);
  background: color-mix(in srgb, var(--c) 16%, var(--panel));
}
.cell.is-loaded {
  border-color: color-mix(in srgb, var(--c) 76%, transparent);
  background: color-mix(in srgb, var(--c) 43%, var(--panel));
}
.cell.is-current {
  box-shadow: inset 0 0 0 1px var(--c), 0 0 9px -2px var(--c);
}
.worker-strip.is-paused .cell { opacity: 0.5; filter: saturate(0.4); }
.cell.is-live {
  filter: brightness(1.75);
  box-shadow: 0 0 10px -1px var(--c);
  z-index: 1;
}
.cell.is-live .cell-num { color: var(--text); }

.strip-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  font: 8.5px/1.3 var(--mono);
  color: var(--faint);
}
.strip-hint { text-align: right; }

/* Self-healing notice */
.heal-banner {
  position: relative;
  z-index: 2;
  width: auto;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 127, 111, 0.48);
  border-left: 3px solid var(--coral);
  border-radius: 2px;
  background: var(--panel);
  animation: healIn 0.3s ease both, healGlow 1.6s ease 0.3s 2;
}
.heal-mark {
  flex: 0 0 auto;
  width: 27px; height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 127, 111, 0.42);
  border-radius: 50%;
  color: var(--coral);
  font-size: 14px;
}
.heal-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.heal-label { font: 9px/1 var(--mono); color: var(--coral); }
#healText { font-size: 12.5px; line-height: 1.4; color: var(--text); }
.heal-close {
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
}
.heal-close:hover { color: var(--text); }

@keyframes healIn {
  from { opacity: 0; transform: translateY(-4px); }
}
@keyframes healGlow {
  50% { border-color: var(--red); background: color-mix(in srgb, var(--red) 12%, var(--panel)); }
}

/* ---------- Chat ---------- */

.chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 10px;
  border-bottom: 1px solid var(--line);
}
.chat-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.1;
}
.chat-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.ghost-btn {
  align-self: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: none;
  color: var(--muted);
  font: 9.5px/1 var(--mono);
  cursor: pointer;
}
.ghost-btn:hover { color: var(--text); border-color: var(--line-strong); }
.ghost-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.messages {
  flex: 1;
  min-height: 150px;
  overflow-y: auto;
  padding: 14px 18px 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.messages::-webkit-scrollbar { width: 7px; }
.messages::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.messages:has(.empty:not([hidden])) {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.empty {
  max-width: 660px;
  margin: 0 auto;
}
.empty-kicker {
  margin: 0 0 7px;
  font: 9.5px/1 var(--mono);
  color: var(--brass);
}
.empty-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.022em;
}
.empty-copy {
  max-width: 54ch;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font: 11px/1 var(--sans);
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.chip::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brass);
  opacity: 0.8;
}
.chip:hover { border-color: var(--brass); background: var(--brass-soft); }
.chip:disabled { opacity: 0.4; cursor: not-allowed; }

.turn {
  max-width: 80ch;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--line);
}
.turn:last-child { border-bottom: 0; padding-bottom: 8px; }
.turn-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.turn-who { font: 9.5px/1 var(--mono); color: var(--brass); }
.turn-model,
.turn-meta { font: 9px/1 var(--mono); color: var(--faint); }
.turn-meta { margin-left: auto; text-align: right; }

.turn-user {
  margin-left: auto;
  max-width: 68ch;
}
.turn-user .turn-head { justify-content: flex-end; }
.turn-user .turn-who { color: var(--muted); }
.turn-user .turn-body {
  padding: 8px 12px;
  border-left: 2px solid rgba(231, 180, 92, 0.5);
  background: rgba(231, 180, 92, 0.065);
  color: #dceade;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.turn-assistant .turn-body {
  padding-left: 12px;
  border-left: 1px solid rgba(231, 180, 92, 0.22);
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.64;
  letter-spacing: 0.002em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.turn-body p { margin: 0 0 0.65em; }
.turn-body p:last-child { margin-bottom: 0; }
.turn-body ul {
  margin: 0.15em 0 0.75em;
  padding-left: 1.1em;
}
.turn-body li { margin: 0.15em 0; }
.turn-body code {
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.055);
  font-family: var(--mono);
  font-size: 0.78em;
  overflow-wrap: anywhere;
}
.turn-body strong { color: var(--text); font-weight: 600; }
.turn:not(.is-streaming) .turn-body:empty { display: none; }
.turn-body.is-denied {
  padding: 7px 10px;
  border-left-color: rgba(255, 127, 111, 0.35);
  background: rgba(255, 127, 111, 0.035);
  color: var(--coral);
  font: 9.5px/1.5 var(--mono);
}

.chat-access {
  --ac: var(--brass);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: center;
  gap: 4px 7px;
  max-width: 56%;
  margin-left: auto;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--ac) 30%, var(--line));
  border-left: 2px solid var(--ac);
  border-radius: 2px;
  background: color-mix(in srgb, var(--ac) 6%, var(--panel));
  color: var(--muted);
  font: 8.5px/1.35 var(--mono);
}
.chat-access[data-kind="free"] { --ac: var(--mint); }
.chat-access[data-kind="open"] { --ac: var(--periwinkle); }
.chat-access[data-kind="denied"] { --ac: var(--coral); }
.access-label { color: var(--ac); font-weight: 600; white-space: nowrap; }
.access-detail { color: var(--text); }
.access-wallet {
  padding: 3px 6px;
  border: 1px solid rgba(231, 180, 92, 0.45);
  border-radius: 2px;
  background: var(--brass-soft);
  color: var(--brass-bright);
  font: 8px/1 var(--mono);
  cursor: pointer;
}
.access-wallet:hover { background: rgba(231, 180, 92, 0.22); }

.draft {
  margin: 10px 0 2px;
  padding: 8px 10px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.018);
}
.draft-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--faint);
  font: 8.5px/1 var(--mono);
}
.draft-title { color: var(--brass); }
.draft-meta { color: var(--muted); }
.draft-pieces {
  color: var(--text);
  font: 12px/1.8 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.draft-mask {
  display: inline-block;
  width: 10px;
  height: 1.02em;
  margin: 0 1px;
  border: 1px solid rgba(231, 180, 92, 0.13);
  border-radius: 1px;
  background: rgba(231, 180, 92, 0.07);
  vertical-align: -0.14em;
}
.draft-piece { color: var(--text); }
.draft-piece.is-changed { animation: pieceIn 0.35s ease; }
@keyframes pieceIn {
  0% { background: var(--yellow); color: var(--ink); }
  100% { background: transparent; }
}
.draft-pieces.is-live::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 1em;
  margin-left: 3px;
  background: var(--brass);
  vertical-align: -0.15em;
  animation: blink 1.05s steps(2, start) infinite;
}

.turn.is-streaming .turn-body::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1.02em;
  margin-left: 3px;
  vertical-align: -0.15em;
  background: var(--brass);
  animation: blink 1.05s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.turn.has-draft .turn-body::after { display: none; }

.scroll-tail { height: 64px; }

.thinking {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  font: 10px/1.4 var(--mono);
  color: var(--muted);
}
.thinking::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brass);
  animation: dotPulse 1s ease-in-out infinite;
}

.tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 3px 0 11px;
}
.tool-card {
  --kind-c: var(--brass);
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--panel-2);
  overflow: hidden;
}
.tool-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--kind-c);
}
.tool-card[data-kind="error"] { --kind-c: var(--coral); }
.tool-card[data-kind="wallet"] { --kind-c: var(--periwinkle); }
.tool-card[data-kind="tx"] { --kind-c: var(--mint); }
.tool-card[data-kind="token"] { --kind-c: var(--brass); }
.tool-card[data-kind="account"] { --kind-c: var(--rose); }

.tool-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}
.tool-kind {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid color-mix(in srgb, var(--kind-c) 45%, transparent);
  border-radius: 2px;
  color: var(--kind-c);
  font: 8px/1.2 var(--mono);
}
.tool-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px 9px;
}
.tool-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2px 16px;
  margin: 0;
}
.tool-field {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0;
  border-bottom: 1px dotted rgba(219, 239, 228, 0.1);
}
.tool-field dt {
  font: 9px/1.5 var(--mono);
  color: var(--faint);
  white-space: nowrap;
}
.tool-field dd {
  margin: 0;
  font: 10px/1.5 var(--mono);
  color: var(--text);
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.tool-flags { display: flex; flex-wrap: wrap; gap: 5px; }
.flag {
  --fc: var(--muted);
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--fc) 40%, transparent);
  border-radius: 99px;
  color: var(--fc);
  background: color-mix(in srgb, var(--fc) 9%, transparent);
  font: 9px/1.2 var(--mono);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.flag-high { --fc: var(--coral); }
.flag-medium { --fc: var(--brass); }
.flag-low { --fc: #b7c6bc; }
.flag-ok { --fc: var(--mint); }
.flag-info { --fc: var(--periwinkle); }
.tool-links { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-links a {
  color: var(--brass);
  font: 9px/1.3 var(--mono);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.tool-links a:hover { color: var(--brass-bright); }

.turn-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  font: 9px/1.4 var(--mono);
  color: var(--faint);
}
.turn-status .status-ok { color: var(--mint); }
.turn-status.is-error { color: var(--coral); }

.logged-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font: 9px/1.4 var(--mono);
}
.logged-note code { color: var(--muted); font: inherit; }
.logged-note.is-deleted { color: var(--mint); }
.logged-note.is-error { color: var(--coral); }
.logged-delete {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brass);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.logged-delete:hover { color: var(--brass-bright); }
.logged-delete:disabled { color: var(--faint); cursor: wait; }

.queue-note {
  margin: 0 18px 7px;
  padding: 7px 10px;
  border: 1px solid rgba(231, 180, 92, 0.3);
  background: rgba(231, 180, 92, 0.06);
  color: var(--brass);
  font: 9.5px/1.4 var(--mono);
}

.lend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 8px 18px 0;
}
.lend-hint {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}
.lend-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: none;
  color: var(--muted);
  font: 600 10.5px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.lend-btn:hover { color: var(--text); border-color: var(--line-strong); }
.lend-btn .lend-ext { font-size: 11px; }
.lend-btn.is-primary {
  border-color: var(--brass);
  background: var(--brass);
  color: var(--bg);
}
.lend-btn.is-primary:hover {
  background: var(--brass-bright);
  border-color: var(--brass-bright);
  color: var(--bg);
}

.composer {
  padding: 9px 18px 11px;
  border-top: 1px solid var(--line);
  background: transparent;
}
.composer textarea {
  display: block;
  width: 100%;
  min-height: 40px;
  max-height: 132px;
  padding: 9px 11px;
  resize: none;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  font: 13.5px/1.45 var(--sans);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.composer textarea:focus {
  border-color: rgba(231, 180, 92, 0.7);
  box-shadow: 0 0 0 3px rgba(231, 180, 92, 0.09);
}
.composer textarea::placeholder { color: var(--faint); }
.composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
}
.composer-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.optin {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font: 9.5px/1.3 var(--sans);
  cursor: pointer;
  white-space: nowrap;
}
.optin input {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin: 0;
  accent-color: var(--brass);
}
.optin em { color: var(--faint); font-style: normal; }
.composer-hint { font: 9px/1.3 var(--mono); color: var(--faint); }
.composer-actions { display: flex; gap: 7px; }
.send-btn,
.stop-btn {
  padding: 8px 15px;
  border-radius: 2px;
  font: 11px/1 var(--sans);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.send-btn {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--bg);
}
.send-btn:hover { background: var(--brass-bright); border-color: var(--brass-bright); }
.send-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.stop-btn {
  background: transparent;
  border-color: rgba(255, 127, 111, 0.45);
  color: var(--coral);
}
.stop-btn:hover { background: rgba(255, 127, 111, 0.08); }

/* ---------- Rail ---------- */

.rail {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-left: clamp(14px, 1.5vw, 22px);
  border-left: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.rail::-webkit-scrollbar { width: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.rail-sec {
  padding: 0 0 14px;
  margin-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.rail-sec:first-child { padding-top: 2px; }
.rail-sec:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 4px; }
.join-sec { margin-top: auto; }

.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}
.rail-head h2 {
  margin: 0;
  color: var(--muted);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.01em;
}
.rail-tag {
  font: 8.5px/1 var(--mono);
  color: var(--faint);
  text-align: right;
}
.stats-sec .rail-tag { color: var(--brass); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stat-value {
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1;
  letter-spacing: -0.022em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-value.is-live { color: var(--brass-bright); }
.stat-label {
  color: var(--faint);
  font: 8.5px/1.25 var(--mono);
}

.stat-grid-secondary {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.stat-grid-secondary .stat-value {
  color: var(--muted);
  font-family: var(--mono);
  font-size: clamp(16px, 1.35vw, 21px);
  letter-spacing: -0.02em;
}
.stat-grid-secondary .stat-label { font-size: 8px; }

.privacy-sec {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(231, 180, 92, 0.17);
  border-radius: 3px;
  background: rgba(231, 180, 92, 0.045);
  margin-bottom: 13px;
}
.privacy-mark { flex: 0 0 auto; color: var(--brass); margin-top: 1px; }
.privacy-sec p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.privacy-sec strong { color: var(--text); font-weight: 600; }

.leaderboard { display: flex; flex-direction: column; }
.lb-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px 52px;
  gap: 8px;
  padding: 0 3px 5px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font: 8px/1 var(--mono);
}
.lb-head span:nth-child(n+2) { text-align: right; }
.lb-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px 52px;
  gap: 8px;
  align-items: center;
  padding: 7px 3px;
  border-bottom: 1px solid rgba(219, 239, 228, 0.06);
}
.lb-row:last-child { border-bottom: 0; }
.lb-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-size: 11px;
}
.lb-dot {
  flex: 0 0 auto;
  width: 7px; height: 7px;
  border-radius: 1px;
  background: var(--c);
}
.lb-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-role {
  --lr: var(--faint);
  flex: 0 0 auto;
  padding: 2px 4px;
  border: 1px solid color-mix(in srgb, var(--lr) 42%, transparent);
  border-radius: 99px;
  color: var(--lr);
  font: 7.5px/1 var(--mono);
}
.lb-role[data-role="primary"] { --lr: var(--brass); }
.lb-role[data-role="spare"] { --lr: var(--periwinkle); }
.lb-role[data-role="idle"] { --lr: var(--faint); }
.lb-meta {
  display: block;
  padding-left: 14px;
  color: var(--faint);
  font: 8px/1.5 var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-fwd,
.lb-credits {
  text-align: right;
  color: var(--muted);
  font: 9.5px/1 var(--mono);
  font-variant-numeric: tabular-nums;
}
.lb-credits { color: var(--brass); }
.lb-load { color: var(--c); }
.pods {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
}
.pods[hidden] { display: none; }
.pods-label {
  margin-right: 2px;
  color: var(--faint);
  font: 8px/1 var(--mono);
}
.pod-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font: 8px/1 var(--mono);
}
.pod-chip strong { color: var(--text); font-weight: 500; }
.pod-chip span { color: var(--brass); }
.rail-note {
  margin: 8px 0 0;
  color: var(--faint);
  font: 8.5px/1.45 var(--mono);
}
.rail-empty { margin: 0; color: var(--faint); font-size: 11px; }

.join-copy {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.join-links { display: flex; flex-direction: column; gap: 6px; }
.join-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.018);
  text-decoration: none;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.join-link:hover { border-color: rgba(231, 180, 92, 0.55); background: rgba(231, 180, 92, 0.06); }
.join-link-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 10.5px;
}
.join-link-label span { color: var(--brass); font: 8px/1 var(--mono); }
.join-link-url {
  color: var(--faint);
  font: 8.5px/1.4 var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font: 8.5px/1.4 var(--mono);
}

/* ---------- Worker node page ---------- */

.page-worker .shell { gap: 16px; }

.worker-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: clamp(18px, 2.4vw, 34px);
  align-items: stretch;
}

.worker-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.worker-intro { padding: 2px 0 0; }
.worker-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 11px;
  color: var(--brass);
  font: 9.5px/1 var(--mono);
}
.worker-kicker::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px rgba(231, 180, 92, 0.12);
}
.worker-title {
  max-width: 18ch;
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(34px, 3.9vw, 56px);
  font-weight: 500;
  line-height: 0.99;
  letter-spacing: -0.03em;
}
.worker-title .layer-range {
  color: var(--brass);
  white-space: nowrap;
}
.worker-lede {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.worker-lede strong { color: var(--text); font-weight: 600; }

.seat {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
}
.seat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.seat-head h2 {
  margin: 0;
  color: var(--muted);
  font: 500 10px/1 var(--mono);
}
.assign-state { color: var(--brass); font: 9px/1 var(--mono); }
.assign-state[data-state="ready"] { color: var(--mint); }
.assign-state[data-state="error"] { color: var(--coral); }

.worker-strip { height: clamp(38px, 5vh, 54px); }

.seat-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  color: var(--faint);
  font: 8.5px/1.3 var(--mono);
}

.load-line {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}
.load-line-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font: 9px/1 var(--mono);
}
.load-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.load-fill {
  width: 0;
  height: 100%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(111, 227, 180, 0.45);
  transition: width 0.22s ease;
}

.worker-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.worker-stats .stat-value { font-size: clamp(22px, 2.3vw, 32px); }

.worker-loop {
  flex: 1;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 6px 0 8px;
}
.loop-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.loop-head h2 {
  margin: 0;
  color: var(--muted);
  font: 500 10px/1 var(--mono);
}
.loop-head > span { color: var(--faint); font: 8.5px/1 var(--mono); }
.loop-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr) 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.loop-step {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.015);
}
.loop-step.is-here {
  border-left-color: var(--mint);
  background: rgba(111, 227, 180, 0.045);
}
.loop-tag { color: var(--faint); font: 8px/1 var(--mono); }
.loop-step.is-here .loop-tag { color: var(--mint); }
.loop-title {
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.loop-sub { color: var(--muted); font: 8.5px/1.4 var(--mono); }
.loop-arrow {
  position: relative;
  height: 1px;
  background: var(--line-strong);
}
.loop-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -2.5px;
  width: 5px; height: 5px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  transform: rotate(45deg);
}

.worker-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 2px;
}
.pause-btn {
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  font: 11px/1 var(--sans);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}
.pause-btn:hover { border-color: var(--brass); color: var(--brass); }
.pause-btn[data-paused="true"] {
  border-color: var(--brass);
  background: var(--brass);
  color: var(--bg);
}
.action-note { color: var(--faint); font: 9px/1.5 var(--mono); }

.worker-side {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.heat-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
}
.heat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.heat-head h2 {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.012em;
}
.heat-head p { margin: 0; color: var(--faint); font: 8.5px/1.4 var(--mono); }
.heat-meta {
  flex: 0 0 auto;
  color: var(--brass);
  font: 8.5px/1.4 var(--mono);
  text-align: right;
  white-space: nowrap;
}

#heat {
  display: block;
  width: 100%;
  flex: 1 1 0;
  height: auto;
  min-height: clamp(220px, 30vh, 380px);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #04100d;
}
.heat-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: var(--faint);
  font: 8px/1 var(--mono);
}
.heat-scale {
  flex: 1;
  height: 5px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--blue), var(--paper) 50%, var(--red));
}
.heat-copy {
  margin: 9px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}
.heat-copy strong { color: var(--text); font-weight: 600; }

.node-card {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.015);
}
.node-card h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font: 500 10px/1 var(--mono);
}
.node-rows { display: flex; flex-direction: column; gap: 0; }
.node-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px dotted rgba(219, 239, 228, 0.1);
  font-size: 10.5px;
}
.node-row:last-child { border-bottom: 0; padding-bottom: 0; }
.node-row span:first-child { color: var(--faint); }
.node-row span:last-child { color: var(--text); font-family: var(--mono); font-size: 9.5px; text-align: right; }
.node-value-ok { color: var(--mint) !important; }
.node-value-warn { color: var(--brass) !important; }
.node-value-error { color: var(--coral) !important; }

.worker-settings {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.settings-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.settings-head h2 { margin: 0; }
.settings-state {
  color: var(--faint);
  font: 8px/1 var(--mono);
}
.settings-state[data-state="ok"] { color: var(--mint); }
.settings-state[data-state="error"] { color: var(--coral); }
.settings-label {
  margin-top: 3px;
  color: var(--faint);
  font: 8px/1.2 var(--mono);
}
.settings-input,
.settings-select {
  width: 100%;
  padding: 5px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: 9px/1.3 var(--mono);
  outline: none;
}
.settings-input:focus,
.settings-select:focus { border-color: rgba(231, 180, 92, 0.7); }
.settings-input::placeholder { color: var(--faint); }
.settings-hint {
  min-height: 12px;
  margin: 0;
  color: var(--faint);
  font: 7.5px/1.35 var(--mono);
}
.settings-hint.is-ok { color: var(--mint); }
.settings-hint.is-error { color: var(--coral); }
.settings-region {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.settings-region .settings-label { flex: 1; margin: 0; }
.settings-select { width: auto; min-width: 88px; }
.settings-note {
  margin: 2px 0 0;
  color: var(--faint);
  font: 7.5px/1.35 var(--mono);
}

.backend-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(111, 227, 180, 0.3);
  border-radius: 99px;
  color: var(--mint);
  font: 9.5px/1 var(--mono);
  white-space: nowrap;
}
.backend-badge[data-backend="wasm"] {
  border-color: rgba(231, 180, 92, 0.34);
  color: var(--brass);
}
.backend-badge::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.worker-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font: 10px/1 var(--mono);
  white-space: nowrap;
}
.worker-status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--faint);
}
.worker-status[data-state="computing"],
.worker-status[data-state="ready"] { color: var(--mint); border-color: rgba(111, 227, 180, 0.3); }
.worker-status[data-state="computing"]::before,
.worker-status[data-state="ready"]::before { background: var(--mint); }
.worker-status[data-state="computing"]::before { animation: dotPulse 1.2s ease-in-out infinite; }
.worker-status[data-state="idle"],
.worker-status[data-state="loading"],
.worker-status[data-state="connecting"],
.worker-status[data-state="starting"] { color: var(--brass); border-color: rgba(231, 180, 92, 0.3); }
.worker-status[data-state="idle"]::before,
.worker-status[data-state="loading"]::before,
.worker-status[data-state="connecting"]::before,
.worker-status[data-state="starting"]::before { background: var(--brass); animation: dotPulse 1.1s ease-in-out infinite; }
.worker-status[data-state="error"],
.worker-status[data-state="disconnected"] { color: var(--coral); border-color: rgba(255, 127, 111, 0.3); }
.worker-status[data-state="error"]::before,
.worker-status[data-state="disconnected"]::before { background: var(--coral); }

/* ---------- Responsive ---------- */

@media (min-width: 1121px) {
  .shell {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  .layout { overflow: hidden; }
}

@media (max-width: 1320px) {
  .head-rail { gap: 11px; }
  .model-badge { padding-left: 12px; }
  .head-stat-label { font-size: 8.5px; }
}

@media (max-width: 1180px) {
  .head-rail .head-stat { display: none; }
  .head-rail .model-badge { padding-left: 0; border-left: 0; }
}

@media (max-width: 1120px) {
  .shell { height: auto; overflow: visible; }
  .pitch { white-space: normal; max-width: 46ch; }
  .layout {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }
  .main-col { min-height: 0; }
  .chat { min-height: 540px; }
  .rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    align-content: start;
    align-items: start;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    overflow: visible;
  }
  .join-sec { margin-top: 0; }
  .worker-layout {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }
  .worker-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .heat-card { min-height: 0; }
  #heat { height: clamp(240px, 38vh, 380px); }
}

@media (max-width: 900px) {
  .head-rail .model-badge { display: none; }
  .flow { min-width: 650px; }
  .empty-title { font-size: 27px; }
}

@media (max-width: 760px) {
  .shell { padding: 12px 14px 10px; gap: 11px; }
  .site-head { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  .brand-mark { width: 40px; height: 40px; }
  .pitch { font-size: 11.5px; max-width: 32ch; }
  .head-rail { width: 100%; justify-content: space-between; gap: 8px; }
  .hero { padding: 12px 12px 10px; }
  .hero-head { flex-direction: column; gap: 7px; }
  .hero-status { align-self: flex-start; }
  .flow { min-width: 610px; min-height: 92px; }
  .strip-legend { display: none; }
  .layer-strip { gap: 1px; height: 32px; }
  .cell-num { font-size: 6.5px; left: 2px; }
  .chat-head, .messages, .composer { padding-left: 12px; padding-right: 12px; }
  .lend-bar { padding-left: 12px; padding-right: 12px; }
  .chat-head { flex-wrap: wrap; }
  .chat-access { order: 3; max-width: 100%; margin-left: 0; width: 100%; }
  .composer-row { flex-wrap: wrap; align-items: flex-end; }
  .composer-actions { margin-left: auto; }
  .optin { white-space: normal; }
  .composer-hint { display: none; }
  .turn-assistant .turn-body { font-size: 15px; }
  .rail { grid-template-columns: minmax(0, 1fr); }
  .worker-side { grid-template-columns: minmax(0, 1fr); }
  .worker-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .worker-title { font-size: clamp(32px, 9vw, 44px); }
  .worker-loop { flex: none; min-height: 0; }
  .loop-steps { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .loop-arrow { display: none; }
  .worker-actions { flex-wrap: wrap; }
  .foot { gap: 6px 14px; }
  .heal-banner { bottom: 12px; }
}

@media (max-width: 430px) {
  .head-rail .conn { order: -1; }
  .stat-grid { gap: 5px; }
  .stat-value { font-size: 23px; }
  .empty { margin-top: 4px; }
  .empty-title { font-size: 24px; }
  .chips { gap: 6px; }
  .chip { font-size: 10.5px; padding: 7px 9px; }
  .tool-field { flex-direction: column; gap: 0; }
  .tool-field dd { text-align: left; }
}

@media (min-width: 1121px) and (max-height: 820px) {
  .shell { gap: 11px; padding-top: 12px; }
  .site-head { padding-bottom: 10px; }
  .hero { padding: 12px 15px 10px; }
  .flow { min-height: 90px; }
  .stage { padding: 7px 8px 6px 10px; gap: 4px; }
  .stage-name { font-size: 11.5px; min-height: 2.2em; }
  .layer-strip { height: 34px; }
  .chat-head { padding: 10px 16px 8px; }
  .messages { padding-top: 11px; }
  .composer { padding: 8px 16px 9px; }
  .empty { margin-top: 6px; }
  .rail-sec { padding-bottom: 11px; margin-bottom: 10px; }
  #heat { min-height: 180px; }
}

@media (min-width: 1600px) {
  .hero-title { font-size: 28px; }
  .stage-name { font-size: 13px; }
  .stage-role { font-size: 9.5px; }
  .stage-badge { font-size: 8.5px; }
  .stage-range { font-size: 10px; }
  .stage-hop { font-size: 10px; }
  .chat-copy h2 { font-size: 22px; }
  .chat-copy p { font-size: 12px; }
  .empty-title { font-size: 42px; }
  .empty-copy { font-size: 14px; }
  .turn-assistant .turn-body { font-size: 17px; }
  .turn-user .turn-body { font-size: 14.5px; }
  .tool-field dt { font-size: 9.5px; }
  .tool-field dd { font-size: 11px; }
  .flag { font-size: 9.5px; }
  .stat-value { font-size: 34px; }
  .lb-name { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .stage.is-hot { transform: none; }
}

/* ==================================================================================================
   Brand layer. The rules above are the app's own layout. This block puts the Chorus look on it: the ink
   bar from the landing page, one typeface in sentence case, ink buttons, plain fields, and status said
   in words. No capitals-and-tracking labels, no pills, no dots, no strips of readings.
   ================================================================================================== */

body { font: 400 16px/1.45 var(--sans); }
body::before { display: none; }
h1, h2, h3 { font-family: var(--sans); font-weight: 500; letter-spacing: -0.02em; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.shell { padding-top: 0; gap: 22px; }

/* header: the ink bar that hangs from the top of the landing page, and nothing else */
.site-head { display: block; padding: 0; border: 0; }
.site-head .bar {
  --text: var(--paper); --muted: rgba(240, 239, 234, 0.74); --faint: rgba(240, 239, 234, 0.62);
  --line: rgba(240, 239, 234, 0.22); --line-strong: rgba(240, 239, 234, 0.42);
  --brass: var(--paper); --brass-bright: #FFFFFF; --brass-soft: rgba(240, 239, 234, 0.1);
  --mint: #A9C3F4; --coral: #F2907C; --bg: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px 24px;
  min-height: 60px;
  margin: 0 calc(-1 * clamp(6px, 1.2vw, 20px));
  padding: 8px clamp(14px, 2vw, 30px);
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 12px 12px;
}
.site-head .brand { display: block; justify-self: start; }
.site-head .brand img { display: block; height: 22px; width: auto; }
.site-head .site-nav { display: flex; align-items: center; flex-wrap: nowrap; gap: clamp(18px, 3vw, 44px); font: 500 15px/1.2 var(--sans); letter-spacing: 0; }
.site-head .site-nav a { color: var(--paper); opacity: 0.7; text-decoration: none; box-shadow: none; white-space: nowrap; }
.site-head .site-nav a:hover { opacity: 1; color: var(--paper); }
.site-head .site-nav a[aria-current="page"] { opacity: 1; color: var(--paper); box-shadow: none; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }
.site-head .bar-end { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; grid-column: 3; }
@media (max-width: 820px) {
  .site-head .bar { grid-template-columns: minmax(0, 1fr) auto; padding-top: 14px; padding-bottom: 12px; }
  .site-head .site-nav { grid-column: 1 / -1; grid-row: 2; gap: 22px; overflow-x: auto; padding-bottom: 2px; }
  .site-head .bar-end { grid-column: 2; grid-row: 1; }
}

/* type: one face, sentence case, nothing under 13px */
.cell-num { font-size: 9px; }
.wallet-badge, .lb-role, .settings-hint, .settings-note, .stage-badge, .stage-foot-label, .access-wallet, .tool-kind,
.lb-head, .lb-meta, .pods-label, .pod-chip, .join-link-label span, .loop-tag, .heat-legend, .settings-state,
.settings-label, .stat-grid-secondary .stat-label, .strip-legend, .strip-foot, .chat-access, .draft-head, .rail-tag,
.stat-label, .rail-note, .join-link-url, .foot, .seat-foot, .loop-head > span, .loop-sub, .heat-head p, .heat-meta,
.head-stat-label, .model-label, .wallet-session, .stage-role, .strip-title, .heal-label, .turn-model, .turn-meta,
.tool-field dt, .flag, .tool-links a, .turn-status, .logged-note, .composer-hint, .assign-state, .load-line-head,
.action-note, .stage-range, .stage-hop, .prefill-head, .turn-who, .turn-body.is-denied, .queue-note, .lb-fwd,
.lb-credits, .backend-badge, .node-row span:last-child, .conn, .hero-status, .thinking, .tool-field dd, .worker-status,
.model-name, .slice-counter, .optin { font-size: 13px; line-height: 1.4; letter-spacing: 0; text-transform: none; }
.join-link-label, .heat-copy, .node-row, .tool-title, .privacy-sec p, .lb-name, .rail-empty, .join-copy,
.draft-pieces { font-size: 14.5px; line-height: 1.45; }
.chat-copy p, .lend-hint, .stage-name, .hero-sub, .empty-copy, #healText { font-size: 15px; line-height: 1.45; }
.rail-head h2, .seat-head h2, .loop-head h2, .node-card h2, .heat-head h2, .settings-head h2 { font: 500 17px/1.25 var(--sans); letter-spacing: -0.01em; color: var(--ink); }
.hero-title, .chat-copy h2, .worker-title, .empty-title { font-family: var(--sans); font-weight: 450; letter-spacing: -0.03em; }
.empty-title { font-size: clamp(26px, 2.4vw, 36px); }
.empty-kicker, .worker-kicker { display: none; }
.wallet-address, .join-link-url { font-family: var(--code); font-size: 12px; }

/* buttons: ink, and they flip on hover like the landing page's */
.send-btn, .stop-btn, .pause-btn, .lend-btn, .wallet-btn, .ghost-btn, .primary-btn, .action-btn, .mini-btn {
  border-radius: 5px; font: 500 15px/1 var(--sans); letter-spacing: 0; text-transform: none; box-shadow: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.send-btn, .lend-btn.is-primary, .primary-btn, .action-btn.primary, .wallet-btn {
  padding: 12px 18px; border: 1px solid var(--brass); background: var(--brass); color: var(--bg);
}
.site-head .bar .wallet-btn, .site-head .bar .primary-btn { padding: 9px 14px; color: var(--ink); }
.send-btn:hover, .lend-btn.is-primary:hover, .primary-btn:hover, .action-btn.primary:hover, .wallet-btn:hover {
  background: transparent; border-color: var(--brass); color: var(--brass);
}
.stop-btn, .pause-btn, .ghost-btn, .mini-btn, .action-btn:not(.primary), .lend-btn:not(.is-primary) {
  padding: 11px 16px; border: 1px solid var(--text); background: transparent; color: var(--text);
}
.stop-btn:hover, .pause-btn:hover, .ghost-btn:hover, .mini-btn:hover, .action-btn:not(.primary):hover, .lend-btn:not(.is-primary):hover {
  background: var(--text); color: var(--bg);
}
.pause-btn[data-paused="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.send-btn:disabled, .primary-btn:disabled, .action-btn:disabled, .mini-btn:disabled, .ghost-btn:disabled { opacity: 0.4; }
.lend-ext { display: none; }

/* fields */
.composer textarea, .settings-input, .settings-select {
  border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel-2); color: var(--ink);
  font-family: var(--sans); font-size: 15px;
}
.composer textarea:focus, .settings-input:focus, .settings-select:focus { border-color: var(--ink); box-shadow: none; outline: 2px solid var(--blue); outline-offset: 2px; }
.composer textarea::placeholder, .settings-input::placeholder { color: var(--faint); }
.settings-label { color: var(--muted); }

/* panels: paper cards with a hairline, no glow */
.hero, .chat, .seat, .heat-card, .node-card, .worker-loop, .tool-card, .heal-banner, .privacy-sec {
  border-radius: 8px; background: var(--panel); border: 1px solid var(--line); box-shadow: none;
}
.hero::before { display: none; }
.tool-card { background: var(--panel-2); }
.heal-banner { border-left: 3px solid var(--red); }
.chip { border-radius: 5px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font: 400 14.5px/1.2 var(--sans); }
.chip::before { display: none; }
.chip:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

/* status is said in words: no pills, no dots */
.conn, .hero-status, .worker-status, .backend-badge, .assign-state, .stage-badge, .flag, .pod-chip, .rail-tag,
.settings-state, .heat-meta, .wallet-badge, .wallet-session {
  padding: 0; border: 0; border-radius: 0; background: none; font-weight: 400;
}
.conn[data-state], .hero-status[data-state], .worker-status[data-state], .backend-badge[data-backend],
.assign-state[data-state], .slice-counter[data-state] { color: var(--muted); border: 0; }
.conn[data-state="closed"], .conn[data-state="error"], .worker-status[data-state="error"],
.worker-status[data-state="disconnected"] { color: var(--coral); }
.conn-dot, .status-dot { display: none; }
.worker-status::before, .backend-badge::before, .assign-state::before { content: none; display: none; }
.stage-role, .stage-hop, .legend-progress, .lb-load { color: var(--muted); }
.prefill-fill, .load-fill { background: var(--ink); box-shadow: none; border-radius: 0; }
.prefill-track, .load-track { border-radius: 0; background: var(--line); }
.stat-value { font-family: var(--sans); font-weight: 450; letter-spacing: -0.03em; }

/* the readings that used to sit in a strip under the header, as plain rows where they are useful */
.net-rows { display: grid; gap: 6px; margin: 0 0 8px; }
.net-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; font-size: 14.5px; }
.net-rows dt { color: var(--muted); }
.net-rows dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.tab-status { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.tab-status > * { font-size: 15px; }

/* one quiet line at the foot of the page */
.foot { display: block; padding: 4px 0 18px; border: 0; color: var(--muted); font: 400 13px/1.4 var(--sans); letter-spacing: 0; text-transform: none; }
.foot span + span { margin-left: 14px; }

/* code and on-chain values keep a fixed-width face: the one place it does real work */
.turn-body code, .draft-pieces, .tool-field dd { font-family: var(--code); }
.turn-body code { font-size: 0.88em; }
.draft-pieces { font-size: 13px; }

/* the pipeline cards, tightened so they keep their place on a laptop screen */
.flow { min-height: 0; }
.stage { gap: 4px; padding: 9px 11px 9px 12px; border-radius: 6px; background: var(--panel-2); }
.stage-name { min-height: 0; -webkit-line-clamp: 1; font-size: 15px; }
.stage-foot { padding-top: 0; border-top: 0; }

/* short screens scroll instead of squeezing: the lend page always, the chat page when the window is short */
.page-worker.is-gated .shell { height: auto; overflow: visible; }
@media (min-width: 1121px) and (max-height: 880px) {
  .page-chat .shell { height: auto; overflow: visible; }
  .page-chat .layout { overflow: visible; align-items: start; }
  .page-chat .chat { flex: none; height: max(480px, calc(100vh - 150px)); }
}

/* the lending view after Start */
.worker-title { margin: 0 0 12px; font-size: clamp(40px, 4.6vw, 68px); line-height: 0.98; }
.worker-lede { max-width: 58ch; color: var(--ink); font-size: 17px; line-height: 1.4; }
.tab-status .backend-badge { display: none; }
@media (min-width: 1121px) and (max-height: 760px) {
  .page-worker .shell { height: auto; overflow: visible; }
  .page-worker .worker-layout { overflow: visible; }
}

/* the conversation and the lists round it, checked with a running network */
.turn-user .turn-body { border-left: 2px solid var(--ink); background: var(--brass-soft); }
.turn-assistant .turn-body { border-left: 1px solid var(--line); }
.chat-access { padding: 0; border: 0; background: none; }
.access-label { color: var(--ink); }
.access-wallet { border: 1px solid var(--ink); border-radius: 5px; background: none; color: var(--ink); }
.access-wallet:hover { background: var(--ink); color: var(--paper); }
.lb-role { padding: 0; border: 0; border-radius: 0; background: none; color: var(--muted); }
.flag-low { --fc: var(--muted); }
.turn-user .turn-body { color: var(--ink); font-size: 16px; line-height: 1.5; }
.turn-assistant .turn-body { font-size: 16.5px; line-height: 1.55; }
.cell-num { color: var(--faint); }
#heat { background: var(--bg-deep); }
