/* Friday Console. Neutral styling (no brand marks). Light + dark via tokens. */
/* Dark-first "Friday" look: deep night background, glass panels, pink/violet light. Light mode via the toggle. */
:root {
  color-scheme: dark;
  --bg: #05070d;
  --bg-glow: rgba(255, 95, 200, .10);
  --surface: rgba(13, 19, 31, .78);
  --surface-solid: #0d131f;
  --surface-2: rgba(255, 150, 220, .06);
  --border: rgba(255, 160, 225, .14);
  --border-hi: rgba(255, 95, 200, .55);
  --text: #e8f1ff;
  --text-2: #a7b6cf;
  --muted: #687891;
  --accent: #ff5fc8;          /* chart series 1 */
  --accent-2: #a66bff;        /* chart series 2 */
  --accent-ink: #1a0612;
  --good: #3ee6a0;
  --bad: #ff6b81;
  --warn-bg: rgba(255, 184, 77, .12);
  --warn-ink: #ffc670;
  --ok-bg: rgba(62, 230, 160, .10);
  --orb-1: #ff5fc8;
  --orb-2: #a66bff;
  --s3: #4fd8ff; --s4: #ffb547; --s5: #3ee6a0; --s6: #ff7a59; --s7: #7a8cff;   /* chart series 3-7 */
  --glow: 0 0 0 1px var(--border-hi), 0 0 24px rgba(255, 95, 200, .20);
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 40px rgba(0,0,0,.45);
  --radius: 14px;
  --mic-space: 104px;         /* kept free bottom-right for the voice orb */
  --top: 60px;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fbf5f9; --bg-glow: rgba(214, 51, 155, .08);
  --surface: rgba(255, 255, 255, .82); --surface-solid: #ffffff; --surface-2: rgba(15, 60, 120, .05);
  --border: rgba(80, 20, 60, .10); --border-hi: rgba(214, 51, 155, .45);
  --text: #0b1220; --text-2: #3d4a60; --muted: #77839a;
  --accent: #d6339b; --accent-2: #7c4dff; --accent-ink: #ffffff;
  --good: #0f8a57; --bad: #d63a55; --warn-bg: #fff4e0; --warn-ink: #8a5300; --ok-bg: #e5f6ee;
  --orb-1: #e0359f; --orb-2: #8a5cff;
  --s3: #0891b2; --s4: #d97706; --s5: #059669; --s6: #e8590c; --s7: #4f5bd5;
  --glow: 0 0 0 1px var(--border-hi), 0 0 18px rgba(214, 51, 155, .12);
  --shadow: 0 1px 2px rgba(15,30,60,.06), 0 8px 30px rgba(15,30,60,.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%;
  background-image:
    radial-gradient(1200px 600px at 85% -10%, var(--bg-glow), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 60%),
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 7%, transparent) 1px, transparent 0);
  background-size: auto, auto, 22px 22px; background-attachment: fixed; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
a { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ---------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--top);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: .32em; font-size: 13px;
  margin-right: 12px; color: var(--text); }
.mark-dot { width: 12px; height: 12px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 35%, #fff 0 12%, var(--accent) 45%, var(--accent-2)); box-shadow: 0 0 12px var(--accent); }
.tabs { display: flex; gap: 2px; min-width: 0; margin: 0 auto 0 0; padding: 3px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface-2); }
.tab {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; color: var(--text-2);
  font-weight: 500; font-size: 14px; white-space: nowrap; transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface-solid); color: var(--text); box-shadow: var(--glow); }
.tab .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px;
  font-size: 12px; background: var(--accent); color: var(--accent-ink); }
.icon-btn { border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; height: 34px; min-width: 34px;
  padding: 0 12px; color: var(--text-2); font-size: 13px; transition: border-color .15s ease, color .15s ease; }
.icon-btn:hover { border-color: var(--border-hi); color: var(--text); }

main { height: calc(100dvh - var(--top)); }
.view { height: 100%; }

/* ---------- dashboard */
#view-dashboard { display: flex; flex-direction: column; }
.chips { display: flex; gap: 8px; padding: 12px 16px; overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--border); background: var(--surface-2); padding: 6px 13px; border-radius: 999px;
  white-space: nowrap; color: var(--text-2); font-size: 13.5px; transition: border-color .15s ease, color .15s ease, box-shadow .15s ease; }
.chip:hover { border-color: var(--border-hi); color: var(--text); }
.chip[aria-pressed="true"] { border-color: var(--border-hi); color: var(--text); font-weight: 600; box-shadow: var(--glow); }
.dash-period { margin-left: auto; display: flex; align-items: center; gap: 6px; white-space: nowrap;
  color: var(--muted); font-size: 13px; padding-left: 8px; }
.dash-period select { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px;
  padding: 5px 10px; font: inherit; font-size: 14px; }
.frame-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); padding: 24px; text-align: center; }

/* ---------- dashboards drawn by the Console (dash.js) */
.dz { flex: 1; overflow-y: auto; padding: 4px 16px var(--mic-space); transition: opacity .2s ease; }
.dz.dz-busy { opacity: .55; pointer-events: none; }
.dz > * { max-width: 1320px; margin-left: auto; margin-right: auto; }
.dz-empty { color: var(--muted); text-align: center; padding: 12vh 16px; }
.dz-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; margin: 6px auto 16px; }
.dz-head > div:first-child { flex: 1; min-width: 220px; }
.dz-head h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.dz-sub { color: var(--muted); font-size: 12px; margin-top: 2px; font-family: var(--mono); }
.dz-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.dz-f { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.dz-f select { border: 1px solid var(--border); background: var(--surface-solid); color: var(--text); border-radius: 10px;
  padding: 7px 28px 7px 10px; font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; max-width: 220px; cursor: pointer; }
.dz-f select:focus { outline: none; border-color: var(--border-hi); box-shadow: var(--glow); }
.dz-section { margin: 26px auto 12px; font: 600 12px var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 12px; }
.dz-section::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-hi), transparent); }

.dz-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); min-width: 0; transition: border-color .2s ease; }
.dz-card:hover { border-color: color-mix(in srgb, var(--accent) 28%, var(--border)); }
.dz-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 12px; }
.dz-tile { position: relative; overflow: hidden; padding: 16px 18px 14px; }
.dz-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .8; }
.dz-tile-top { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.dz-tile-label { font-size: 13px; color: var(--text-2); font-weight: 500; line-height: 1.3; }
.dz-big { font-size: 34px; font-weight: 650; letter-spacing: -.02em; margin: 8px 0 4px; font-variant-numeric: tabular-nums; line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dz-tile-desc { font-size: 12px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dz-err .dz-big { background: none; color: var(--muted); }
.dz-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 12px; margin-bottom: 12px; }
.dz-tables { display: grid; gap: 12px; margin-bottom: 12px; }
.dz-card-head { display: flex; gap: 12px; align-items: flex-start; }
.dz-titles { flex: 1; min-width: 0; }
.dz-card h4 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dz-kpi { font: 500 10px var(--mono); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 6px; padding: 1px 6px; letter-spacing: .04em; flex: none; }
.dz-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dz-ask { flex: none; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: 999px;
  padding: 4px 11px; font-size: 12px; white-space: nowrap; transition: border-color .15s ease, color .15s ease; }
.dz-ask::before { content: "✦ "; color: var(--accent); }
.dz-ask:hover { border-color: var(--border-hi); color: var(--text); }
.dz-take { margin: 12px 0 12px; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; color: var(--text-2);
  background: color-mix(in srgb, var(--accent) 7%, transparent); border-left: 2px solid var(--accent); }
.dz-take:empty { display: none; }
.dz-take b { color: var(--text); font-weight: 600; }
.dz-up { color: var(--good); }
.dz-down { color: var(--bad); }
.dz-plot { min-width: 0; }
.dz-svg { display: block; overflow: visible; }
.dz-svg .lab { fill: var(--text-2); font-size: 12px; }
.dz-svg .val { fill: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; }
.dz-svg .grid { stroke: var(--border); }
.dz-svg .hit { fill: transparent; cursor: default; }
.dz-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin: 0 0 10px; }
.dz-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dz-more { font-size: 12px; color: var(--muted); margin-top: 8px; }
.dz-none { color: var(--muted); font-size: 13px; padding: 18px 0; text-align: center; }

.dz-search { width: min(280px, 100%); margin: 0 0 10px; border: 1px solid var(--border); background: var(--surface-solid); color: var(--text);
  border-radius: 10px; padding: 7px 11px; font: inherit; font-size: 13px; }
.dz-search:focus { outline: none; border-color: var(--border-hi); box-shadow: var(--glow); }
.dz-tablewrap { overflow-x: auto; margin: 0 -4px; }
.dz-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dz-table th { text-align: left; font-weight: 500; font-size: 11.5px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border);
  white-space: nowrap; cursor: pointer; user-select: none; position: sticky; top: 0; }
.dz-table th:hover, .dz-table th.on { color: var(--text); }
.dz-table td { padding: 8px 10px; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); vertical-align: middle; white-space: nowrap; }
.dz-table tbody tr { transition: background .12s ease; }
.dz-table tbody tr:hover { background: var(--surface-2); }
.dz-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.dz-table td.dz-long { white-space: normal; min-width: 240px; max-width: 420px; }
.dz-cellbar { display: inline-block; width: 54px; height: 6px; border-radius: 3px; background: var(--surface-2); margin-right: 8px; vertical-align: 1px; overflow: hidden; }
.dz-cellbar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.dz-img img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; display: block; background: var(--surface-2); }
.dz-open a { text-decoration: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid var(--border); color: var(--text-2); }
.dz-open a:hover { border-color: var(--border-hi); color: var(--accent); }
.dz-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.dz-foot span { margin-left: auto; }
.dz-toggle { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 5px 12px; font-size: 12px; }
.dz-toggle:hover { border-color: var(--border-hi); color: var(--text); }
.dz-skel { min-height: 118px; background: linear-gradient(100deg, var(--surface) 30%, color-mix(in srgb, var(--accent) 8%, var(--surface)) 50%, var(--surface) 70%);
  background-size: 300% 100%; animation: dzshine 1.4s ease-in-out infinite; }
@keyframes dzshine { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .dz-skel { animation: none; } }

/* ---------- ask */
#view-ask { display: flex; flex-direction: column; }
.thread { flex: 1; overflow-y: auto; padding: 16px 16px 8px; }
.thread-inner { max-width: 860px; margin: 0 auto; }
.empty { text-align: center; padding: 3vh 8px 16px; color: var(--text-2); }
.orb-hero { width: min(340px, 70vw); height: min(340px, 70vw); display: block; margin: 0 auto -8px; }
.empty h1 { font-size: 13px; margin: 0 0 8px; color: var(--accent); font-weight: 500; letter-spacing: .38em; text-transform: uppercase;
  font-family: var(--mono); }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.msg { margin: 0 0 18px; }
.msg.user { display: flex; justify-content: flex-end; }
.bubble-user { background: color-mix(in srgb, var(--accent) 14%, var(--surface-solid)); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); padding: 9px 14px; border-radius: 16px 16px 4px 16px;
  max-width: 85%; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer { overflow-wrap: anywhere; }
.answer p { margin: 0 0 10px; }
.answer ul, .answer ol { margin: 0 0 10px; padding-left: 22px; }
.answer h3, .answer h4 { margin: 14px 0 6px; font-size: 15px; }
.answer hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
.answer code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.answer table { border-collapse: collapse; margin: 6px 0 12px; font-size: 13px; display: block; overflow-x: auto; max-width: 100%; }
.answer th, .answer td { border-bottom: 1px solid var(--border); padding: 5px 10px 5px 0; text-align: left; white-space: nowrap; }
.answer th { color: var(--text-2); font-weight: 600; }
/* the "checking…" step list under each question (collapses to "n steps · s" when the answer is in) */
.steps { margin: 0 0 8px; font-size: 13px; color: var(--text-2); }
.steps summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  color: var(--muted); padding: 2px 0; }
.steps summary::-webkit-details-marker { display: none; }
.steps summary::before { content: "▸"; font-size: 10px; transition: transform .15s ease; }
.steps[open] summary::before { transform: rotate(90deg); }
.steps:not(.closed) summary { display: none; }
.steps ol { list-style: none; margin: 4px 0 0; padding: 0 0 0 2px; display: flex; flex-direction: column; gap: 4px;
  border-left: 2px solid var(--border); }
.steps li { display: flex; align-items: baseline; gap: 8px; padding-left: 10px; min-width: 0; }
.steps .ico { flex: none; width: 12px; height: 12px; display: inline-grid; place-items: center; font-size: 11px; line-height: 1; transform: translateY(1px); }
.steps li.run .ico { border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.steps li.ok .ico::before { content: "✓"; color: var(--good); }
.steps li.err .ico::before { content: "!"; color: var(--warn-ink); font-weight: 700; }
.steps li.run .lbl { color: var(--text); }
.steps .det { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.steps .sec { color: var(--muted); font-size: 11px; margin-left: auto; font-variant-numeric: tabular-nums; flex: none; }
@keyframes spin { to { transform: translateY(1px) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .steps li.run .ico { animation: none; } }
.answer.draft { color: var(--text-2); }
.num-hold { display: inline-block; min-width: 2.2em; padding: 0 5px; border-radius: 5px; background: var(--surface-2);
  color: var(--muted); font-size: .85em; text-align: center; animation: pulse 1.2s infinite ease-in-out; }
.step { font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 999px; padding: 2px 10px; }
.step.run::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px;
  background: var(--accent); animation: pulse 1s infinite ease-in-out; vertical-align: 1px; }
.step.err { color: var(--bad); }
@keyframes pulse { 50% { opacity: .25; } }
.cursor::after { content: "▍"; color: var(--muted); animation: pulse 1s infinite; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; padding: 3px 10px; border-radius: 999px; margin-top: 4px; }
.check.ok { background: var(--ok-bg); color: var(--good); }
.check.warn { background: var(--warn-bg); color: var(--warn-ink); }
.meta { font-size: 12px; color: var(--muted); margin-left: 8px; }
.error { color: var(--bad); }

/* evidence cards */
.cards { display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; margin: 6px 0 4px; scroll-snap-type: x mandatory; }
.card { flex: 0 0 172px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow); }
.card .img { aspect-ratio: 3 / 4; background: var(--surface-2); display: grid; place-items: center; color: var(--muted);
  font-size: 12px; overflow: hidden; }
.card .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.card .kind { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.card .title { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .sub { font-size: 12px; color: var(--text-2); }
.card .price { font-size: 14px; font-weight: 650; }
.card .price s { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
.card .price .off { color: var(--good); font-size: 12px; margin-left: 4px; }

/* inline charts */
.chart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px 10px; margin: 8px 0; position: relative; }
.chart h4 { margin: 0 0 2px; font-size: 13px; font-weight: 600; }
.chart .sub { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.chart svg { width: 100%; display: block; overflow: visible; }
.chart .lab { fill: var(--text-2); font-size: 12px; }
.chart .val { fill: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--border); }
.chart .legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; flex-wrap: wrap; }
.chart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.chart .hit { fill: transparent; }
.chart .hit:hover + .bar, .chart g:hover .bar { opacity: .8; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface-solid); color: var(--text); border: 1px solid var(--border-hi); font-size: 12px;
  padding: 6px 9px; border-radius: 6px; max-width: 260px; box-shadow: var(--shadow); }

/* composer */
.composer { flex-shrink: 0; padding: 8px 16px 12px; background: linear-gradient(transparent, var(--bg) 30%); }
.composer form { max-width: 860px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end;
  padding-right: calc(var(--mic-space) - 16px); }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 16px; padding: 12px 16px; font: inherit; max-height: 160px; min-height: 48px; outline: none;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color .15s ease, box-shadow .15s ease; }
.composer textarea:focus { border-color: var(--border-hi); box-shadow: var(--glow); }
.send { height: 48px; padding: 0 20px; border-radius: 16px; border: 0; font-weight: 600; color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 4px 20px color-mix(in srgb, var(--accent) 30%, transparent); }
.send:disabled { opacity: .4; cursor: default; }
.hint { max-width: 860px; margin: 4px auto 0; font-size: 12px; color: var(--muted); padding-right: calc(var(--mic-space) - 16px); }

/* ---------- alerts */
#view-alerts { overflow-y: auto; }
.alerts { max-width: 860px; margin: 0 auto; padding: 12px 16px var(--mic-space); }
.alerts-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.alerts-head .grow { flex: 1; }
.alert { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color .15s ease; }
.alert:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.alert .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.pill { background: var(--surface-2); color: var(--text-2); padding: 1px 8px; border-radius: 999px; font-size: 12px; }
.pill.capped { background: var(--warn-bg); color: var(--warn-ink); }
.alert .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.alert .links { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 13px; }
.votes { display: flex; gap: 8px; margin-top: 10px; }
.vote { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.vote[aria-pressed="true"] { border-color: var(--text); background: var(--surface-2); font-weight: 600; }
.more { display: block; margin: 8px auto 0; }

/* ---------- mic (Talk to Friday: console/voice/) */
.mic {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 76px; height: 76px; border-radius: 50%; padding: 0;
  border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 10%, var(--surface-solid)), var(--surface-solid) 70%);
  display: grid; place-items: center; bottom: max(16px, env(safe-area-inset-bottom)); overflow: hidden;
}
.mic > * { grid-area: 1 / 1; }
.mic-orb { width: 100%; height: 100%; display: block; pointer-events: none; }
.mic svg { width: 20px; height: 20px; opacity: .9; filter: drop-shadow(0 0 6px var(--bg)); transition: opacity .2s ease, transform .2s ease; }
/* one live orb on screen at a time: the corner orb steps aside for the big Ask orb and for the voice panel's orb */
body:has(#view-ask:not(.hidden) #empty) .mic-orb, .mic.on .mic-orb { display: none; }
body:has(#view-ask:not(.hidden) #empty) .mic svg, .mic.on svg { width: 26px; height: 26px; filter: none; }
.mic:hover { transform: scale(1.05); border-color: var(--border-hi); }
.toast { position: fixed; right: 16px; bottom: 104px; z-index: 45; background: var(--surface-solid); color: var(--text); border: 1px solid var(--border-hi); padding: 8px 12px;
  border-radius: 8px; font-size: 13px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }

/* ---------- login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login form { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 28px 26px; box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.login .orb-hero { width: 180px; height: 180px; margin: -8px auto 0; }
.login h1 { margin: 0 0 4px; font-size: 14px; letter-spacing: .38em; text-align: center; font-weight: 600; color: var(--accent); font-family: var(--mono); }
.login #lead { text-align: center; }
.login p { margin: 0 0 18px; color: var(--text-2); font-size: 14px; }
.login input { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font: inherit; margin-bottom: 12px; }
.login input:focus { outline: none; border-color: var(--border-hi); box-shadow: var(--glow); }
.login button { width: 100%; height: 46px; border: 0; border-radius: 12px; font-weight: 600; color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.login .error { min-height: 20px; font-size: 13px; margin: 8px 0 0; }
.login .field { display: block; }
.login .field span { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin: 0 0 4px; }
.login .fine { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.login button:disabled { opacity: .6; cursor: default; }
.who { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }

/* ---------- phone */
@media (max-width: 640px) {
  .topbar { padding: 0 10px; gap: 6px; }
  .wordmark { font-size: 0; letter-spacing: 0; margin-right: 2px; gap: 0; }
  .tab { padding: 8px 10px; }
  #logout { display: none; }
  .who { display: none; }
  .dz { padding: 4px 8px var(--mic-space); }
  .dz-card { padding: 14px 14px; }
  .dz-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dz-tile { padding: 12px 12px 10px; }
  .dz-big { font-size: 24px; }
  .dz-tile-desc { -webkit-line-clamp: 3; }
  .dz-f select { max-width: 160px; }
  .chips { padding: 10px 8px; }
  .thread { padding: 12px 12px 6px; }
  .composer { padding: 6px 12px 12px; }
  .card { flex-basis: 148px; }
  .hint { display: none; }
}
