/* ============================================================
   Lirelle — Bank window design system
   Warm-coal palette, system fonts, airy spacing.
   All values are AppKit-translatable (solid fills, hairlines,
   no web-only effects beyond simple shadow/opacity).
   ============================================================ */

:root {
  /* Brand tokens (locked) */
  --bg:          #0A0808;  /* window background — warm coal     */
  --card:        #141210;  /* cards / sidebar / list rows       */
  --card-hover:  #1B1814;  /* hover state                       */
  --border:      #1F1C18;  /* hairline border                   */
  --text:        #EFEAE4;  /* primary text — cream              */
  --ink:         #888F8A;  /* secondary text / labels           */
  --gold:        #EBB638;  /* accent — highlight / links        */
  --orange:      #FF9B50;  /* active recording / hot            */
  --red:         #EF5350;  /* recording / failure               */

  /* Derived */
  --ink-dim:     #5C615E;  /* tertiary / disabled               */
  --hairline:    #17140F;  /* divider between rows (softer)     */
  --sel-fill:    #1B1814;  /* selected row — soft lifted coal   */
  --gold-soft:   rgba(235,182,56,0.12);
  --gold-tint:   rgba(235,182,56,0.10);
  --red-soft:    rgba(239,83,80,0.14);
  --orange-soft: rgba(255,155,80,0.14);
  --green:       #6FBF73;
  --green-soft:  rgba(111,191,115,0.14);

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "Source Code Pro", Menlo, monospace;

  /* Rhythm */
  --pad: 28px;
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============================================================
   WINDOW CHROME
   ============================================================ */
.lumo-window {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.4);
  width: 100%;
  height: 100%;
  min-width: 0;
}

.titlebar {
  height: 40px;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  -webkit-app-region: drag;
}
.traffic { display: flex; gap: 8px; align-items: center; }
.traffic i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.traffic .r { background: #FF5F57; }
.traffic .y { background: #FEBC2E; }
.traffic .g { background: #28C840; }

.body-row {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  min-width: 0;
}

/* ============================================================
   APP SIDEBAR (left nav)
   ============================================================ */
.sidebar {
  flex: 0 1 240px;
  width: 240px;
  min-width: 208px;
  display: flex;
  flex-direction: column;
  padding: 4px 16px 18px;
  border-right: 1px solid var(--border);
  background: var(--bg);
  min-height: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 10px 22px;
}
.brand .orb {
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #FFD980 0%, #EBB638 42%, #B4791C 100%);
  box-shadow: 0 0 18px rgba(235,182,56,0.35);
  flex: 0 0 auto;
}
.brand .wordmark {
  font-size: 16px; font-weight: 600; letter-spacing: 1.5px;
  color: var(--text);
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  height: 38px; padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer; position: relative;
  font-size: 14px; font-weight: 500;
  -webkit-app-region: no-drag;
  transition: background 120ms ease, color 120ms ease;
}
.nav-item .ico { color: var(--ink); flex: 0 0 auto; transition: color 120ms ease; }
.nav-item:hover { background: var(--card); color: var(--text); }
.nav-item:hover .ico { color: var(--text); }
.nav-item.active { color: var(--text); background: var(--card); }
.nav-item.active .ico { color: var(--gold); }
.nav-item.active::before {
  content: ""; position: absolute; left: -16px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0;
  background: var(--gold);
}
.nav-item.disabled { color: var(--ink-dim); cursor: default; }
.nav-item.disabled:hover { background: transparent; color: var(--ink-dim); }
.nav-item .label { flex: 1 1 auto; }
.nav-item .count {
  font-family: var(--mono); font-size: 11px; color: var(--ink-dim);
  background: var(--card); padding: 1px 7px; border-radius: 10px;
}
.nav-item.active .count { color: var(--ink); background: rgba(255,255,255,0.05); }
.nav-item .soon {
  font-size: 10px; font-family: var(--mono); letter-spacing: 0.5px;
  color: var(--ink-dim); text-transform: uppercase;
}

.nav-section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--ink-dim);
  padding: 22px 12px 8px;
}
.sidebar-spacer { flex: 1 1 auto; }

.sidebar-hint {
  margin-top: 18px; padding: 12px;
  border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 11px; line-height: 1.7;
  color: var(--ink-dim);
}
.sidebar-hint kbd {
  font-family: var(--mono); color: var(--ink);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px;
}

/* ============================================================
   MEETINGS — LIST COLUMN
   ============================================================ */
.list-col {
  flex: 0 1 320px;
  width: 320px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  min-height: 0;
}

/* Record header (calm, Direction A) */
.record-head {
  padding: var(--pad) var(--pad) 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.record-head .rh-top { display: flex; flex-direction: column; gap: 6px; }
.record-head .rh-status {
  font-size: 19px; font-weight: 600; letter-spacing: -0.2px;
  color: var(--text); display: flex; align-items: center; gap: 9px;
}
.record-head .rh-status.rec { color: var(--red); }
.record-head .rh-status .timer { font-family: var(--mono); font-weight: 500; }
.record-head .rh-help {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.65;
  color: var(--ink); max-width: 30ch;
}

.rec-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 0 rgba(239,83,80,0.5);
  animation: recpulse 1.6s ease-out infinite;
  flex: 0 0 auto;
}
@keyframes recpulse {
  0%   { box-shadow: 0 0 0 0 rgba(239,83,80,0.45); }
  70%  { box-shadow: 0 0 0 8px rgba(239,83,80,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,83,80,0); }
}
@media (prefers-reduced-motion: reduce) {
  .rec-dot { animation: none; }
}

/* Buttons */
.btn {
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  border: none; cursor: pointer; border-radius: var(--radius-sm);
  height: 40px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: filter 120ms ease, background 120ms ease;
  -webkit-app-region: no-drag; white-space: nowrap;
}
.btn-primary { background: var(--gold); color: #1A1206; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-stop { background: var(--red); color: #2A0B0A; }
.btn-stop:hover { filter: brightness(1.06); }
.btn-ghost {
  background: var(--card); color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--card-hover); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.full { width: 100%; }

/* Search */
.search {
  margin: 0 var(--pad) 6px;
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; color: var(--ink);
}
.search input {
  flex: 1 1 auto; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 13.5px; font-family: var(--font);
}
.search input::placeholder { color: var(--ink); }

.list-scroll { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding: 8px 0 14px; }

.list-group-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--ink-dim);
  padding: 16px var(--pad) 8px;
}

/* List rows — borderless, hairline dividers, airy */
.mrow {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 15px var(--pad);
  cursor: pointer; position: relative;
  border-bottom: 1px solid var(--hairline);
  transition: background 110ms ease;
}
.mrow:hover { background: var(--card); }
.mrow .mrow-dot {
  width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto;
  background: var(--ink-dim);
}
.mrow-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mrow-title {
  font-size: 14.5px; font-weight: 600; color: var(--text);
  letter-spacing: -0.1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mrow-meta {
  font-family: var(--mono); font-size: 11px; color: var(--ink);
  display: flex; align-items: center; gap: 7px; flex-wrap: nowrap;
}
.mrow-meta span, .detail-meta > span { white-space: nowrap; }
.mrow-preview {
  font-size: 12.5px; line-height: 1.5; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Selected states (data-sel on .lumo-window) */
[data-sel="fill"] .mrow.sel { background: var(--sel-fill); }
[data-sel="fill"] .mrow.sel .mrow-title { color: var(--text); }

[data-sel="bar"] .mrow.sel { background: transparent; }
[data-sel="bar"] .mrow.sel::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--gold);
}
[data-sel="bar"] .mrow.sel .mrow-title { color: var(--gold); }

[data-sel="tint"] .mrow.sel { background: var(--gold-tint); }
[data-sel="tint"] .mrow.sel .mrow-title { color: var(--text); }

/* Status badge (pill) */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.8px;
  text-transform: uppercase; font-weight: 500;
  padding: 3px 8px; border-radius: 6px;
  white-space: nowrap;
}
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.badge.summary { color: var(--gold); background: var(--gold-soft); }
.badge.summary .bdot { background: var(--gold); }
.badge.transcript { color: var(--green); background: var(--green-soft); }
.badge.transcript .bdot { background: var(--green); }
.badge.recording { color: var(--red); background: var(--red-soft); }
.badge.transcribing { color: var(--orange); background: var(--orange-soft); }
.badge.transcribing .bdot { background: var(--orange); }
.badge.failed { color: var(--red); background: var(--red-soft); }
.badge.failed .bdot { background: var(--red); }

/* status dot color for row leading dot */
.mrow-dot.summary { background: var(--gold); }
.mrow-dot.transcript { background: var(--green); }
.mrow-dot.recording { background: var(--red); }
.mrow-dot.transcribing { background: var(--orange); }
.mrow-dot.failed { background: var(--red); }

/* ============================================================
   DETAIL COLUMN
   ============================================================ */
.detail-col {
  flex: 1 1 420px; min-width: 0;
  container-type: inline-size;
  display: flex; flex-direction: column;
  background: var(--bg);
}

/* top action toolbar */
.detail-toolbar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 4px;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--border);
  min-height: 60px;
}
.crumbs {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink);
}
.crumbs .sep { color: var(--ink-dim); }
.crumbs .here { color: var(--text); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 11px; border-radius: 7px;
  color: var(--ink); cursor: pointer; font-size: 12.5px; font-weight: 500;
  background: transparent; border: none; white-space: nowrap; flex: 0 0 auto;
  transition: background 110ms ease, color 110ms ease;
}
.tool-btn:hover { background: var(--card); color: var(--text); }
.tool-btn.icon-only { width: 32px; padding: 0; justify-content: center; }

/* collapse text labels when the detail pane is cramped */
@container (max-width: 440px) {
  .tool-btn .lbl { display: none; }
  .tool-btn { width: 32px; padding: 0; justify-content: center; }
}

.detail-scroll { flex: 1 1 auto; overflow-y: auto; min-height: 0; }

/* reading wrapper — Stage direction centers + caps width */
.reading {
  padding: 36px var(--pad) 64px;
}
[data-dir="stage"] .reading {
  max-width: 760px; margin: 0 auto; padding: 48px 40px 80px;
}

.detail-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.detail-title {
  font-size: 28px; font-weight: 700; letter-spacing: -0.5px;
  line-height: 1.15; color: var(--text);
}
[data-dir="stage"] .detail-title { font-size: 34px; }
.detail-meta {
  font-family: var(--mono); font-size: 12px; color: var(--ink);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.detail-meta .dot { color: var(--ink-dim); }

/* tabs — segmented pill */
.tabs {
  display: inline-flex; gap: 3px; padding: 3px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 9px; margin: 22px 0 26px;
}
.tab {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.3px;
  padding: 7px 16px; border-radius: 6px; cursor: pointer;
  color: var(--ink); background: transparent; border: none;
  transition: background 110ms ease, color 110ms ease;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--card-hover);
  box-shadow: inset 0 0 0 1px var(--border); }

/* ============================================================
   MARKDOWN CONTENT
   ============================================================ */
.md { color: var(--text); font-size: 15px; line-height: 1.75; }
[data-dir="stage"] .md { font-size: 16px; line-height: 1.8; }
.md h2 {
  font-size: 21px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--text); margin: 36px 0 14px; line-height: 1.25;
}
.md h2:first-child { margin-top: 0; }
.md h3 {
  font-size: 17px; font-weight: 600; color: var(--text);
  margin: 28px 0 10px;
}
.md p { margin: 0 0 16px; color: var(--text); }
.md p.lead { color: var(--ink); }
.md strong { font-weight: 700; color: var(--text); }
.md em { font-style: italic; }
.md a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(235,182,56,0.4); }
.md a:hover { border-bottom-color: var(--gold); }
.md code {
  font-family: var(--mono); font-size: 0.85em; color: var(--orange);
  background: var(--card); padding: 2px 6px; border-radius: 5px;
  border: 1px solid var(--border);
}
.md ul { list-style: none; margin: 0 0 18px; padding: 0; }
.md ul li {
  position: relative; padding-left: 22px; margin-bottom: 9px;
  color: var(--text);
}
.md ul li::before {
  content: ""; position: absolute; left: 4px; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}
.md hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.md blockquote {
  border-left: 3px solid var(--gold);
  background: var(--gold-tint);
  padding: 16px 20px; border-radius: 0 8px 8px 0;
  margin: 0 0 22px; color: var(--text); font-style: italic;
}

/* checkbox action items */
.md .task {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 14px; border-radius: 9px;
  background: var(--card); border: 1px solid var(--border);
  margin-bottom: 8px; cursor: pointer;
  transition: background 110ms ease;
}
.md .task:hover { background: var(--card-hover); }
.md .task .box {
  /* margin-top tuned to .txt's first line cap-height so the box sits
     visually centred with the FIRST text line — not the column's mid.
     With flex-start the box starts at the row's top; .txt has implicit
     leading above its cap, which makes a 1px nudge look too high. */
  width: 18px; height: 18px; border-radius: 5px; flex: 0 0 auto; margin-top: 4px;
  border: 1.5px solid var(--ink); display: flex; align-items: center; justify-content: center;
  color: var(--bg); transition: background 110ms, border-color 110ms;
}
.md .task.done .box { background: var(--gold); border-color: var(--gold); }
.md .task .txt { color: var(--text); }
.md .task.done .txt { color: var(--ink); text-decoration: line-through; }

/* transcript turns */
.turn { display: flex; gap: 16px; margin-bottom: 22px; }
.turn .ts {
  font-family: var(--mono); font-size: 12px; color: var(--gold);
  flex: 0 0 52px; padding-top: 2px; cursor: pointer;
}
.turn .ts:hover { text-decoration: underline; }
.turn .speech { flex: 1 1 auto; min-width: 0; }
.turn .who { font-weight: 600; font-size: 13px; color: var(--text); margin-bottom: 3px; }
.turn .said { color: var(--ink); font-size: 14.5px; line-height: 1.7; }
[data-dir="stage"] .turn .said { color: var(--text); }

/* ============================================================
   EMPTY / FAILED / FINALISING states (detail)
   ============================================================ */
.placeholder {
  flex: 1 1 auto; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 40px; gap: 18px;
}
.placeholder .ph-orb {
  width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #2A241B 0%, #18140E 70%);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.placeholder h3 { font-size: 18px; font-weight: 600; color: var(--text); }
.placeholder p {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
  color: var(--ink); max-width: 38ch;
}
.placeholder.failed .ph-orb { color: var(--red); border-color: rgba(239,83,80,0.3); }

.finalising-bar {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0;
  font-family: var(--mono); font-size: 12.5px; color: var(--orange);
}
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--orange);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.progress-track {
  height: 4px; background: var(--card); border-radius: 4px; overflow: hidden;
  margin: 14px 0 4px; max-width: 320px;
}
.progress-fill { height: 100%; background: var(--orange); border-radius: 4px; }

/* live transcript while recording */
.live-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px;
  background: var(--red-soft); border: 1px solid rgba(239,83,80,0.25);
  color: var(--red); font-size: 13px; font-weight: 600;
  margin-bottom: 28px;
}

/* scrollbars */
.list-scroll::-webkit-scrollbar, .detail-scroll::-webkit-scrollbar { width: 10px; }
.list-scroll::-webkit-scrollbar-thumb, .detail-scroll::-webkit-scrollbar-thumb {
  background: var(--border); border-radius: 6px; border: 3px solid transparent;
  background-clip: content-box;
}
.list-scroll::-webkit-scrollbar-thumb:hover, .detail-scroll::-webkit-scrollbar-thumb:hover {
  background: #2A2620; background-clip: content-box;
}

/* ============================================================
   GENERIC SECTIONS (Transcripts / Account / Settings)
   ============================================================ */
.sec-wrap { padding: 36px var(--pad) 64px; max-width: 720px; }
[data-dir="stage"] .sec-wrap { margin: 0 auto; }
.sec-title { font-size: 26px; font-weight: 700; letter-spacing: -0.4px; margin-bottom: 6px; }
.sec-sub { font-family: var(--mono); font-size: 12.5px; color: var(--ink); margin-bottom: 30px; }

.seg {
  display: inline-flex; gap: 3px; padding: 3px;
  background: var(--card); border: 1px solid var(--border); border-radius: 9px;
}
.seg button {
  font-size: 12.5px; font-weight: 600; padding: 7px 14px; border-radius: 6px;
  background: transparent; border: none; color: var(--ink); cursor: pointer;
}
.seg button.on { color: var(--text); background: var(--card-hover); box-shadow: inset 0 0 0 1px var(--border); }

.tcard {
  padding: 20px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--border); margin-bottom: 12px;
}
.tcard:hover { background: var(--card-hover); }
.tcard .tc-text { font-size: 14.5px; line-height: 1.65; color: var(--text); margin-bottom: 14px; }
.tcard .tc-foot { display: flex; align-items: center; gap: 16px; }
.tcard .tc-date { font-family: var(--mono); font-size: 11px; color: var(--ink); }
.tcard .tc-actions { margin-left: auto; display: flex; gap: 4px; }

.field-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.field-row .fr-label { font-size: 14px; font-weight: 500; color: var(--text); }
.field-row .fr-desc { font-family: var(--mono); font-size: 11.5px; color: var(--ink); margin-top: 3px; }

.acct-head { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; }
.acct-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 32% 30%, #FFD980 0%, #EBB638 42%, #B4791C 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; color: #2A1C06;
}
.plan-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 6px; font-weight: 600;
  color: var(--gold); background: var(--gold-soft);
}
.device-row {
  display: flex; align-items: center; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.device-row .dv-ico {
  width: 38px; height: 38px; border-radius: 9px; background: var(--card);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--ink); flex: 0 0 auto;
}

/* ============================================================
   ONBOARDING & PERMISSIONS  (Flow A / B / C)
   New tokens added below; everything else reuses existing vars.
   ------------------------------------------------------------
   ADDED TOKENS (diff for review):
     --card-08   hairline used on perm rows  rgba(255,255,255,.08)
     --gold-ring focus ring for inputs
   ============================================================ */
:root {
  --card-08:   rgba(255,255,255,0.08);
  --gold-ring: rgba(235,182,56,0.32);
}

/* --- full-window onboarding canvas (replaces sidebar layout) --- */
.onb {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  padding: 0 56px 26px;
  background: var(--bg);
}

/* top chrome row: small moon orb (left) + step indicator (right) */
.onb-chrome {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 2px 0;
  height: 30px;
}
.onb-chrome .onb-mark {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #FFD980 0%, #EBB638 42%, #B4791C 100%);
  box-shadow: 0 0 12px rgba(235,182,56,0.30);
}
.lumo-step-indicator {
  font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px;
  color: var(--ink-dim); white-space: nowrap;
}
.lumo-step-indicator b { color: var(--ink); font-weight: 500; }

/* centered content column */
.onb-scroll { flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.onb-col {
  width: 100%; max-width: 600px; margin: 0 auto;
  padding: 18px 0 8px;
  display: flex; flex-direction: column;
}

.onb-head { display: flex; flex-direction: column; gap: 13px; margin-bottom: 20px; }
.onb-title {
  font-size: 30px; font-weight: 700; letter-spacing: -0.6px;
  line-height: 1.12; color: var(--text);
}
.onb-lead {
  font-family: var(--font); font-size: 14.5px; line-height: 1.6;
  color: var(--ink); max-width: 60ch;
}
.onb-lead b, .onb-lead strong { color: var(--text); font-weight: 600; }
.onb-lead em { color: var(--gold); font-style: normal; }

/* --- permission rows --- */
.lumo-perm-list { display: flex; flex-direction: column; gap: 9px; }
.lumo-perm-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 15px 18px;
  background: var(--card);
  border: 1px solid var(--card-08);
  border-radius: 12px;
  transition: border-color 140ms ease, background 140ms ease;
}
.lumo-perm-row:hover { background: var(--card-hover); }
.lumo-perm-row .pr-ico {
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.lumo-perm-row.is-granted .pr-ico { color: var(--gold); border-color: rgba(235,182,56,0.30); }
.lumo-perm-row.is-denied  .pr-ico { color: var(--red);  border-color: rgba(239,83,80,0.30); }

.lumo-perm-row .pr-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 1px; }
.lumo-perm-row .pr-titlerow { display: flex; align-items: center; gap: 10px; }
.lumo-perm-row .pr-title { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.1px; }

/* status dot — three states */
.pr-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; transition: background 200ms ease, box-shadow 200ms ease; }
.pr-dot.granted { background: var(--gold);    box-shadow: 0 0 0 3px var(--gold-soft); }
.pr-dot.pending { background: var(--ink-dim); }
.pr-dot.denied  { background: var(--red);     box-shadow: 0 0 0 3px var(--red-soft); }

.pr-badge {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.7px; text-transform: uppercase;
  color: var(--ink-dim); background: var(--bg); white-space: nowrap;
  border: 1px solid var(--border); border-radius: 5px;
  padding: 2px 7px;
}
.lumo-perm-row .pr-why {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.55;
  color: var(--ink-dim); max-width: 58ch;
}

/* right-side action / state */
.lumo-perm-row .pr-action { flex: 0 0 auto; align-self: center; display: flex; align-items: center; }
.pr-granted-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.4px;
  color: var(--gold);
}

/* small ghost button (Open Settings) */
.btn-sm { height: 32px; padding: 0 13px; font-size: 12.5px; font-weight: 600; border-radius: 7px; }

/* --- footer (waiting text / continue / skip) --- */
.onb-foot {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding-top: 14px; margin-top: 14px;
  border-top: 1px solid var(--border);
}
.onb-foot .foot-status {
  font-family: var(--mono); font-size: 12px; color: var(--ink-dim);
  display: flex; align-items: center; gap: 9px;
}
.onb-foot .foot-spacer { flex: 1 1 auto; }
.onb-link {
  font-family: var(--mono); font-size: 12px; color: var(--ink-dim);
  text-decoration: none; cursor: pointer; transition: color 120ms ease;
  -webkit-app-region: no-drag;
}
.onb-link:hover { color: var(--ink); }

/* tiny waiting pulse next to "waiting…" */
.wait-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ink-dim);
  animation: waitpulse 1.6s ease-in-out infinite;
}
@keyframes waitpulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wait-dot { animation: none; } }

/* --- centered hero layout (Welcome / Done) --- */
.onb-col.center {
  min-height: 100%;
  justify-content: center; align-items: center; text-align: center;
  padding: 24px 0 40px; gap: 0;
}
.onb-orb-lg {
  width: 92px; height: 92px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 32% 28%, #FFE9B8 0%, #FFD980 20%, #EBB638 52%, #B4791C 100%);
  box-shadow: 0 0 64px rgba(235,182,56,0.34), inset 0 -8px 18px rgba(120,78,16,0.45);
}
.onb-wordmark {
  font-size: 23px; font-weight: 600; letter-spacing: 5px; color: var(--text);
}
.onb-tagline {
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.4px; color: var(--gold);
}
.onb-para {
  font-family: var(--font); font-size: 15px; line-height: 1.62; color: var(--ink);
  max-width: 54ch;
}
.onb-para b, .onb-para strong { color: var(--text); font-weight: 600; }
.onb-cta-row { display: flex; flex-direction: column; align-items: center; gap: 16px; }

/* --- progress bar (A2; reusable for Sparkle update) --- */
.lumo-progress-bar {
  height: 8px; width: 100%;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden;
}
.lumo-progress-bar > i {
  display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #C8901F 0%, #EBB638 70%, #FFD980 100%);
  box-shadow: 0 0 12px rgba(235,182,56,0.35);
  transition: width 260ms ease;
}
.progress-meta {
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  font-family: var(--mono); font-size: 12px; color: var(--ink);
  margin-bottom: 10px;
}
.progress-meta > span { flex: 0 0 auto; }
.progress-meta .pm-file { color: var(--text); }
.progress-meta .pm-sep { color: var(--ink-dim); }
.progress-meta .pm-pct { color: var(--gold); margin-left: auto; }
.progress-status {
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-dim);
  margin-top: 12px; display: flex; align-items: center; gap: 9px;
}

/* detected-hardware row (mono, .tcard family) */
.hw-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 13px; color: var(--text);
  margin: 24px 0;
}
.hw-row .hw-ico {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--ink);
}
.hw-row .hw-label { display: block; font-size: 10.5px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 3px; }
.hw-row .hw-spec { color: var(--text); white-space: nowrap; }
.hw-row .hw-sep { color: var(--ink-dim); margin: 0 7px; }

/* --- text field (A4 email) --- */
.lumo-field {
  width: 100%; height: 50px; padding: 0 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: var(--mono); font-size: 14px; letter-spacing: 0.3px;
  outline: none; transition: border-color 120ms ease, box-shadow 120ms ease;
}
.lumo-field::placeholder { color: var(--ink-dim); }
.lumo-field:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-ring); }

/* --- OTP 6-cell code input (A4) --- */
.lumo-otp-cells { display: flex; gap: 10px; }
.lumo-otp-cells .otp {
  flex: 1 1 0; height: 64px; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--mono); font-size: 26px; font-weight: 600; color: var(--text);
  transition: border-color 120ms ease, box-shadow 120ms ease, color 120ms ease;
}
.lumo-otp-cells .otp.empty { color: var(--ink-dim); }
.lumo-otp-cells .otp.active {
  border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-ring); color: var(--text);
}

/* --- keyboard key glyph (A5 tour; reusable for shortcut hints) --- */
.lumo-kbd-key {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 11px;
  background: var(--card); border: 1px solid var(--border);
  border-bottom-width: 2px; border-radius: 8px;
  font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--ink);
}
.lumo-kbd-key.glow {
  color: #1A1206; background: var(--gold); border-color: #C8901F;
  box-shadow: 0 0 26px rgba(235,182,56,0.45);
}
.lumo-kbd-key small { font-size: 9px; letter-spacing: 0.4px; opacity: 0.8; margin-left: 4px; font-weight: 500; }

/* --- tour cards (A5) --- */
.tour-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tour-card {
  background: var(--card); border: 1px solid var(--card-08); border-radius: 14px;
  padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 15px;
}
.tour-kbd {
  height: 104px; border-radius: 11px; position: relative;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; gap: 7px;
  overflow: hidden;
}
.tour-card h3 { font-size: 16px; font-weight: 600; color: var(--text); letter-spacing: -0.2px; }
.tour-card p { font-family: var(--mono); font-size: 11.5px; line-height: 1.65; color: var(--ink); }

/* floating dictation capsule used in tour visuals */
.cap {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 999px;
  background: var(--card-hover); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 10.5px; color: var(--text);
}
.cap .wave { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.cap .wave i { width: 2.5px; border-radius: 2px; background: var(--gold); }
.cap .vad { font-size: 8.5px; letter-spacing: 0.6px; color: var(--gold); background: var(--gold-soft); padding: 1px 5px; border-radius: 4px; }

/* pulse rings (tour card 2) */
.pulse-ring {
  position: absolute; border-radius: 50%; border: 1.5px solid var(--gold);
  animation: pulsering 2s ease-out infinite;
}
@keyframes pulsering { 0% { transform: scale(0.6); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse-ring { animation: none; opacity: 0.3; } }

/* --- success tick (A4 success disk / A6 done card) --- */
.tick-disk {
  width: 76px; height: 76px; border-radius: 50%; flex: 0 0 auto;
  background: var(--gold); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 44px rgba(235,182,56,0.5);
}
.tick-card {
  width: 100px; height: 100px; border-radius: 26px; flex: 0 0 auto;
  background: var(--card); border: 1px solid rgba(235,182,56,0.32); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 70px rgba(235,182,56,0.26);
}
.tick-draw path {
  stroke-dasharray: 32; stroke-dashoffset: 0;
  animation: tickdraw 460ms cubic-bezier(.6,.1,.3,1) 200ms;
}
@keyframes tickdraw { from { stroke-dashoffset: 32; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .tick-draw path { animation: none; } }

/* A4 sub-state visibility (data-state on .lumo-window) */
[data-state="email"]   .when-code,
[data-state="email"]   .when-success,
[data-state="code"]    .when-email,
[data-state="code"]    .when-success,
[data-state="success"] .when-email,
[data-state="success"] .when-code { display: none !important; }
