/* ── components.css — Frayth "Signal" component system. ──────────────────────
 * Premium near-black, single-accent. Light DOM + prefixed classes. Every rule
 * reads from tokens.css; no raw hex. One primary action per screen.
 * ──────────────────────────────────────────────────────────────────────────── */

/* ══ App frame — slim rail + workspace ══════════════════════════════════ */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; align-self: start; height: 100vh; z-index: 30;
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--sp-5) var(--sp-3); background: var(--panel);
  border-right: 1px solid var(--hair);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 10px var(--sp-5); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  object-fit: cover; box-shadow: var(--glow);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); letter-spacing: -0.02em; }
/* Rotating brand motto — cycles catchy one-liners under the wordmark, with a
   little breathing room above the secondary workspace label. */
.brand-motto { font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em; margin: 3px 0 4px; min-height: 1.15em;
  background: linear-gradient(100deg, var(--signal), var(--signal-tint)); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 1; transition: opacity 0.4s ease; }
.brand-motto.swap { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .brand-motto { transition: none; } }
.brand-tag { font-size: 10.5px; color: var(--t2); letter-spacing: 0.04em; margin-top: -1px; }

.navlink {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--r-md); color: var(--t1); font-weight: 500; font-size: var(--fs-md);
  position: relative; transition: background var(--dur) var(--ease), color var(--dur);
}
.navlink:hover { background: var(--surface); color: var(--t0); }
.navlink[aria-current="page"] { background: var(--surface-2); color: var(--t0); }
.navlink[aria-current="page"]::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 3px; background: var(--signal); box-shadow: 0 0 10px var(--signal-glow);
}
/* Default icon size. Every ICON.* svg carries class="ico"; base.css makes svgs
   display:block so without an explicit size an icon balloons to fill its box.
   Container-specific rules below (.navlink .ico, .btn .ico, …) override by
   specificity; anything unscoped gets this sane 16px default. */
.ico { width: 16px; height: 16px; flex: 0 0 auto; }
.check-ico .ico { width: 56%; height: 56%; }
.navlink .ico { width: 19px; height: 19px; opacity: 0.92; flex: 0 0 auto; }
.navlink-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--signal); color: var(--signal-ink); font-size: 11px; font-weight: 700;
  display: grid; place-items: center; font-family: var(--font-mono);
}
.rail-spacer { flex: 1; }
.rail-divider { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--t3); font-weight: 700; padding: 12px 12px 5px; }
@media (max-width: 900px) { .rail-divider { display: none; } }

.workspace { min-width: 0; padding: var(--sp-6) var(--sp-7) var(--sp-8); max-width: 1400px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.head h1 { font-size: var(--fs-3xl); }
.head p { color: var(--t2); margin-top: 6px; font-size: var(--fs-md); max-width: 60ch; }

/* ══ Cards & panels ═════════════════════════════════════════════════════ */
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); }
.card.pad { padding: var(--sp-5); }
.card.hover { transition: border-color var(--dur), transform var(--dur) var(--ease); cursor: pointer; }
.card.hover:hover { border-color: var(--hair-2); transform: translateY(-2px); }
.panel { background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-lg); }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); letter-spacing: -0.02em; }

/* ══ Buttons — exactly one primary (Signal) per screen ══════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 11px 18px; border-radius: var(--r-md); font-weight: 600; font-size: var(--fs-md);
  background: var(--surface-2); color: var(--t0); border: 1px solid var(--hair-2);
  transition: transform var(--dur) var(--ease), background var(--dur), filter var(--dur), box-shadow var(--dur);
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary { background: var(--signal); color: var(--signal-ink); border-color: transparent; font-weight: 700; box-shadow: var(--glow); }
.btn--primary:hover { background: var(--signal-hi); }
.btn--danger { background: var(--stop); color: var(--stop-ink); border-color: transparent; font-weight: 700; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--t1); }
.btn--ghost:hover { background: var(--surface); color: var(--t0); }
.btn--sm { padding: 7px 12px; font-size: var(--fs-sm); }
.btn--lg { padding: 15px 24px; font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.btn .ico { width: 17px; height: 17px; }

/* ══ Pills / badges ═════════════════════════════════════════════════════ */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 600; background: var(--surface-2); color: var(--t1);
  white-space: nowrap; border: 1px solid var(--hair);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--signal { background: var(--signal-soft); color: var(--signal); border-color: transparent; }
.pill--ok   { background: var(--ok-soft);   color: var(--ok);   border-color: transparent; }
.pill--stop { background: var(--stop-soft); color: var(--stop); border-color: transparent; }
.pill--info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.pill--flat::before { display: none; }
.pill--flat { color: var(--t2); }

/* ══ Trust score chip & gates ═══════════════════════════════════════════ */
.score { display: inline-flex; align-items: baseline; gap: 3px; font-family: var(--font-mono); font-weight: 700; }
.score-num { font-size: var(--fs-xl); line-height: 1; }
.score-max { font-size: var(--fs-xs); color: var(--t3); }
.score--hi  { color: var(--score-hi); }
.score--mid { color: var(--score-mid); }
.score--lo  { color: var(--score-lo); }

.gates { display: flex; gap: 6px; flex-wrap: wrap; }
.gate { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: 600; background: var(--surface-2); border: 1px solid var(--hair); }
.gate--pass { color: var(--ok); } .gate--pass .dot { background: var(--ok); }
.gate--fail { color: var(--stop); background: var(--stop-soft); border-color: transparent; } .gate--fail .dot { background: var(--stop); }
.gate--flag { color: var(--signal); } .gate--flag .dot { background: var(--signal); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* ══ Component meter (trust breakdown) ══════════════════════════════════ */
.meter { display: grid; grid-template-columns: 152px 1fr 56px; align-items: center; gap: 12px; padding: 7px 0; }
.meter-label { font-size: var(--fs-sm); color: var(--t1); }
.meter-track { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: var(--signal); transition: width 1s var(--ease); }
.meter-val { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--t2); text-align: right; }
.meter-note { font-size: var(--fs-xs); color: var(--t3); margin: -3px 0 7px 164px; }

/* ══ Command home — prioritized action queue (ambient status, beats a notif list) ══ */
.cmd-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); margin-bottom: var(--sp-6); }
.cmd-stat { padding: var(--sp-4) var(--sp-5); }
.cmd-stat .eyebrow { margin-bottom: 8px; }
.cmd-stat-val { font-family: var(--font-mono); font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; }
.cmd-stat-sub { font-size: var(--fs-xs); color: var(--t2); margin-top: 2px; }

.queue { display: flex; flex-direction: column; border: 1px solid var(--hair); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.q-row {
  display: grid; grid-template-columns: 3px 34px 1fr auto; align-items: center; gap: var(--sp-4);
  padding: 16px 20px 16px 0; border-bottom: 1px solid var(--hair);
  transition: background var(--dur); opacity: 0; transform: translateY(6px); animation: qin .4s var(--ease) forwards;
}
@keyframes qin { to { opacity: 1; transform: none; } }
.q-row:last-child { border-bottom: 0; }
.q-row:hover { background: var(--surface-2); }
.q-rail { align-self: stretch; background: var(--t3); }
.q-row[data-sev="stop"] .q-rail { background: var(--stop); }
.q-row[data-sev="attn"] .q-rail { background: var(--signal); }
.q-row[data-sev="info"] .q-rail { background: var(--info); }
.q-ico { width: 34px; height: 34px; display: grid; place-items: center; color: var(--t2); }
.q-row[data-sev="stop"] .q-ico { color: var(--stop); }
.q-row[data-sev="attn"] .q-ico { color: var(--signal); }
.q-body { min-width: 0; }
.q-kicker { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--t2); font-weight: 600; }
.q-title { font-size: var(--fs-lg); font-weight: 600; margin: 2px 0; }
.q-detail { font-size: var(--fs-sm); color: var(--t2); }
.q-action { padding-right: 20px; }

/* ══ Kanban ═════════════════════════════════════════════════════════════ */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: 244px; gap: var(--sp-3); overflow-x: auto; padding-bottom: var(--sp-3); }
.col { background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-lg); display: flex; flex-direction: column; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--hair); font-size: 10.5px; font-weight: 600; color: var(--t2); text-transform: uppercase; letter-spacing: 0.1em; }
.col-count { font-family: var(--font-mono); color: var(--t3); }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.tile { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-md); padding: 13px; cursor: pointer; transition: border-color var(--dur), transform var(--dur) var(--ease); }
.tile:hover { transform: translateY(-2px); border-color: var(--hair-2); }
.tile-id { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--t2); }
.tile-lane { font-weight: 600; margin: 5px 0 9px; font-size: var(--fs-md); }
.tile-foot { display: flex; align-items: center; justify-content: space-between; }

/* ══ Tables ═════════════════════════════════════════════════════════════ */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--t2); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--hair); }
.table td { padding: 14px; border-bottom: 1px solid var(--hair); font-size: var(--fs-md); }
.table tbody tr { transition: background var(--dur); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr[data-clickable] { cursor: pointer; }

/* ══ Map hero + bottom sheet (the signature) ════════════════════════════ */
.map-hero { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--hair); background: var(--bg-sunk); min-height: 460px; }
load-map, .map-canvas { display: block; width: 100%; height: 460px; background: var(--bg-sunk); }
load-map.tall, .map-canvas.tall { height: 560px; }
.map-controls { position: absolute; top: 14px; right: 14px; z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.map-ctl { width: 40px; height: 40px; border-radius: 11px; background: rgba(18,20,24,0.86); backdrop-filter: blur(10px); border: 1px solid var(--hair-2); display: grid; place-items: center; color: var(--t0); box-shadow: var(--shadow-2); }
.map-ctl:hover { background: var(--surface-3); }
.map-badge { position: absolute; top: 14px; left: 14px; z-index: 500; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-pill); background: rgba(18,20,24,0.86); backdrop-filter: blur(10px); border: 1px solid var(--hair-2); font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--shadow-2); }
.map-badge .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: livepulse 2s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(72,212,148,0.5); } 70% { box-shadow: 0 0 0 8px rgba(72,212,148,0); } 100% { box-shadow: 0 0 0 0 rgba(72,212,148,0); } }
.sheet { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 500; background: rgba(16,18,22,0.92); backdrop-filter: blur(16px); border: 1px solid var(--hair-2); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-3); display: flex; align-items: center; gap: 16px; }
.sheet-seq { width: 34px; height: 34px; border-radius: 10px; background: var(--signal); color: var(--signal-ink); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; flex: 0 0 auto; }
.sheet-body { min-width: 0; flex: 1; }
.sheet-kicker { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--t2); font-weight: 600; }
.sheet-title { font-weight: 600; font-size: var(--fs-md); margin: 1px 0; }
.sheet-meta { font-size: var(--fs-sm); color: var(--t2); }
.sheet-dwell { text-align: right; flex: 0 0 auto; }

/* Leaflet dark overrides — kill the default chrome, premium the attribution */
.leaflet-container { background: var(--bg-sunk) !important; font-family: var(--font) !important; }
.leaflet-control-zoom, .leaflet-control-attribution a { display: none !important; }
.leaflet-control-attribution { background: rgba(8,9,10,0.6) !important; color: var(--t3) !important; font-size: 9px !important; padding: 1px 6px !important; border-radius: 6px 0 0 0 !important; }
.leaflet-tile { filter: saturate(0.9) brightness(0.92); }
.veh-marker { width: 16px; height: 16px; }
.veh-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--info); border: 2px solid #fff; box-shadow: 0 0 0 4px var(--info-soft), 0 0 14px var(--info); }
.stop-pin { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50% 50% 50% 2px; transform: rotate(45deg); box-shadow: var(--shadow-2); border: 2px solid rgba(0,0,0,0.4); }
.stop-pin span { transform: rotate(-45deg); font-family: var(--font-mono); font-weight: 700; font-size: 12px; }
.stop-pin--pick { background: var(--ok); color: var(--ok-ink); }
.stop-pin--drop { background: var(--signal); color: var(--signal-ink); }

/* ══ Settlement / billing ═══════════════════════════════════════════════ */
.flow { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.flow-step { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--t2); font-size: var(--fs-sm); font-weight: 600; border: 1px solid var(--hair); }
.flow-step--done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.flow-step--cur { background: var(--signal); color: var(--signal-ink); border-color: transparent; font-weight: 700; }
.flow-arw { color: var(--t3); }
.check { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--hair); }
.check[data-state="accepted"] { border-color: var(--ok-soft); }
.check[data-state="rejected"] { border-color: var(--stop-soft); }
.check-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; }
.gauge { height: 12px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.gauge-fill { height: 100%; background: linear-gradient(90deg, var(--ok), var(--signal) 68%, var(--stop)); transition: width 1s var(--ease); }
.bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end; }
.bar-col { text-align: center; }
.bar-track { height: 110px; display: flex; align-items: flex-end; justify-content: center; }
.bar { width: 48px; border-radius: 8px 8px 0 0; transition: height .9s var(--ease); }

/* ══ Timeline ═══════════════════════════════════════════════════════════ */
.tl { display: flex; flex-direction: column; }
.tl-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; padding: 9px 0; }
.tl-dot { position: relative; }
.tl-dot::before { content: ""; position: absolute; left: 6px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 8px var(--signal-glow); }
.tl-dot::after { content: ""; position: absolute; left: 9px; top: 14px; bottom: -14px; width: 2px; background: var(--hair); }
.tl-row:last-child .tl-dot::after { display: none; }
.tl-time { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--t3); white-space: nowrap; }

/* ══ Forms ══════════════════════════════════════════════════════════════ */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: var(--sp-4); }
.label { font-size: var(--fs-sm); color: var(--t2); font-weight: 500; }
.input, .select {
  background: var(--surface-3); border: 1px solid var(--hair-2); border-radius: var(--r-md);
  padding: 12px 14px; color: var(--t0); font-size: var(--fs-md); width: 100%; transition: border-color var(--dur), box-shadow var(--dur);
}
.input:focus, .select:focus { border-color: var(--signal); outline: none; box-shadow: 0 0 0 3px var(--signal-soft); }
.input::placeholder { color: var(--t3); }

/* ══ Address search + Book form ═════════════════════════════════════════ */
addr-search { display: block; }
.addr-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--t3); pointer-events: none; }
.addr-ico .ico { width: 16px; height: 16px; }
.addr-check { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--ok); }
.addr-check .ico { width: 16px; height: 16px; }
.addr-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; background: var(--surface-3); border: 1px solid var(--hair-2); border-radius: var(--r-md); box-shadow: var(--shadow-3); overflow: hidden; max-height: 300px; overflow-y: auto; }
.addr-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--hair); transition: background var(--dur); }
.addr-item:last-child { border-bottom: 0; }
.addr-item:hover { background: var(--surface-2); }
.addr-item-ico { color: var(--signal); margin-top: 2px; } .addr-item-ico .ico { width: 15px; height: 15px; }
.addr-item-name { font-weight: 600; font-size: var(--fs-md); }
.addr-item-sub { font-size: var(--fs-xs); color: var(--t2); }

.form-section { margin-bottom: var(--sp-5); }
.form-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-4); }
.form-section-n { width: 24px; height: 24px; border-radius: 7px; background: var(--surface-3); color: var(--t2); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; font-size: 12px; }
.acc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.acc { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--hair); cursor: pointer; font-size: var(--fs-sm); user-select: none; transition: border-color var(--dur), background var(--dur); }
.acc input { accent-color: var(--signal); width: 15px; height: 15px; }
.acc:has(input:checked) { border-color: var(--signal); background: var(--signal-soft); color: var(--t0); }
.toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: var(--fs-sm); }
.toggle input { accent-color: var(--signal); width: 16px; height: 16px; }
.dims { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--hair); font-size: var(--fs-sm); }
.summary-row .k { color: var(--t2); } .summary-row .v { font-weight: 600; }
.rail-sticky { position: sticky; top: var(--sp-5); }

/* ══ Utilities ══════════════════════════════════════════════════════════ */
.row { display: flex; align-items: center; gap: var(--sp-3); }
.col-f { display: flex; flex-direction: column; gap: var(--sp-3); }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.stat-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--t2); }
.stat-val { font-size: var(--fs-2xl); font-weight: 700; font-family: var(--font-mono); margin-top: 5px; letter-spacing: -0.02em; }
.empty { text-align: center; padding: var(--sp-8) var(--sp-4); color: var(--t2); }
.empty-mark { font-size: 44px; margin-bottom: var(--sp-3); opacity: 0.5; }
.spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--signal); animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Slide-over panel (ui.js slideover) — resolve-in-place without leaving the list */
.so-back { position: fixed; inset: 0; z-index: 2500; background: rgba(0,0,0,0); transition: background .24s ease; display: flex; justify-content: flex-end; }
.so-back.is-open { background: rgba(0,0,0,0.45); }
.so-panel { width: min(460px, 94vw); height: 100%; overflow-y: auto; background: var(--panel); border-left: 1px solid var(--hair-2); box-shadow: var(--shadow-3); transform: translateX(100%); transition: transform .26s var(--ease); padding: var(--sp-5); }
.so-back.is-open .so-panel { transform: translateX(0); }
.so-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.so-nav { display: flex; align-items: center; gap: 6px; }
.so-kicker { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--t2); margin-bottom: 4px; }
.so-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--t2); margin: var(--sp-4) 0 8px; }

/* Shared retryable error card (ui.js mount/errorCard) — replaces per-view raw error strings */
.load-error { text-align: center; padding: var(--sp-7) var(--sp-4); display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); color: var(--t2); }
.load-error-mark { color: var(--stop); opacity: 0.85; }
.load-error-mark .ico { width: 38px; height: 38px; }
.load-error-msg { font-size: 14px; max-width: 340px; line-height: 1.5; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--hair-2); border-radius: var(--r-md); padding: 13px 20px; box-shadow: var(--shadow-3); z-index: 3000; opacity: 0; transition: opacity .3s, transform .3s; font-weight: 500; }
.toast--stop { border-color: var(--stop); } .toast--ok { border-color: var(--ok); } .toast--signal { border-color: var(--signal); }

/* Nav footer */
.demo-box { display: flex; flex-direction: column; gap: 6px; padding: 12px; margin: 0 2px 10px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--hair); }
.demo-box .btn { justify-content: flex-start; width: 100%; }
.whoami { display: flex; align-items: center; gap: 11px; padding: 10px; border-top: 1px solid var(--hair); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--signal-soft); color: var(--signal); font-weight: 700; font-family: var(--font-display); }
.who-name { font-size: var(--fs-sm); font-weight: 600; }
.who-role { font-size: var(--fs-xs); text-transform: capitalize; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; overflow-x: auto; align-items: center; }
  .workspace { padding: var(--sp-4); }
  .grid-3, .grid-2, .cmd-strip { grid-template-columns: 1fr; }
}
