/* Friday Console (main page: Home, Ask Friday, Watch views). Chat 82 (25 Nov 2026): one look with every other Console
   page - the design tokens live in shell.css (--f-*, light + dark); the names below are the Console's older token names,
   now pointing at them, so dash.js / insights / brands / pilot / research / exam / details / voice styles follow along.
   The galaxy + Friday's face stay: the galaxy is the stage of the "Talk to Friday" view, the face is the voice button. */
:root {
  --bg: var(--f-bg);
  --bg-glow: transparent;
  --surface: var(--f-surface);
  --surface-solid: var(--f-surface);
  --surface-2: var(--f-surface-2);
  --border: var(--f-line);
  --border-hi: var(--f-line-2);
  --text: var(--f-ink);
  --text-2: var(--f-ink-2);
  --muted: var(--f-muted);
  --accent: var(--f-accent);          /* chart series 1 */
  --accent-2: var(--f-accent-2);      /* chart series 2 */
  --accent-ink: var(--f-accent-ink);
  --good: var(--f-good);
  --bad: var(--f-bad);
  --warn-bg: var(--f-warn-soft);
  --warn-ink: var(--f-warn);
  --ok-bg: var(--f-good-soft);
  --orb-1: #a8ecff;                   /* the galaxy keeps its own light */
  --orb-2: #4f8dff;
  --s3: #a27b3f; --s4: #6b7f4e; --s5: #8d5a7e; --s6: #c27a3a; --s7: #5a6190;   /* chart series 3-7: warm, distinct */
  --glow: 0 0 0 1px var(--f-line-2);
  --shadow: var(--f-shadow-2);
  --radius: 14px;
  --mic-space: 104px;                 /* kept free bottom-right for the voice face */
  --top: 0px;
  --mono: var(--f-mono);
  font-family: var(--f-font);
}
:root[data-theme="dark"] { --s3: #d5b074; --s4: #a8bb83; --s5: #c99abd; --s6: #e8a065; --s7: #9aa2d6; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--f-bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
/* the galaxy: only behind the "Talk to Friday" stage (orb.js draws it), in light and dark */
canvas.space-bg { position: fixed; inset: 0; width: 100vw; height: 100dvh; z-index: 0; pointer-events: none; display: none;
  mix-blend-mode: normal; filter: none; -webkit-mask-image: none; mask-image: none; opacity: 1; }
body:has(#view-friday:not(.hidden)) canvas.space-bg { display: block; }
body:has(#view-friday:not(.hidden)) { background: #000; }
main { position: relative; z-index: 1; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
a { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }
#f-tools-src { display: none; }

/* ---------- small controls shared by the views */
.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-hi); background: var(--surface); border-radius: 999px; height: 34px; min-width: 34px;
  padding: 0 14px; color: var(--text-2); font-size: 13px; transition: border-color .15s ease, color .15s ease; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.icon-btn:hover { border-color: var(--text-2); color: var(--text); }

main { height: 100dvh; }
.view { height: 100%; }
@media (max-width: 899.98px) { main { height: calc(100dvh - var(--f-bnav) - var(--f-safe-b)); } }

/* ---------- page header of each view (eyebrow = the area, title, one line on what it is) */
.f-head { max-width: 1320px; margin: 0 auto; padding: 30px 24px 6px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; }
.f-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.f-head .f-title { margin-bottom: 4px; }
.f-head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.f-head.narrow { max-width: 908px; }
@media (max-width: 640px) { .f-head { padding: 20px 16px 4px; } }

/* ---------- dashboards */
#view-dashboard { display: flex; flex-direction: column; overflow: hidden; }
.chips { display: flex; gap: 8px; padding: 12px 24px; overflow-x: auto; scrollbar-width: none; flex-shrink: 0; max-width: 1320px; width: 100%; margin: 0 auto; }
.chips::-webkit-scrollbar { display: none; }
#dash-chips { flex-wrap: wrap; }
.chip { border: 1px solid var(--border-hi); background: var(--surface); padding: 6px 14px; border-radius: 999px;
  white-space: nowrap; color: var(--text-2); font-size: 13.5px; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.chip:hover { border-color: var(--text-2); color: var(--text); }
.chip[aria-pressed="true"] { border-color: var(--f-ink); background: var(--f-ink); color: var(--f-bg); font-weight: 600; }
.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-hi); 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; }

.dz { flex: 1; overflow-y: auto; padding: 4px 24px 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: 600 26px/1.15 var(--f-display); letter-spacing: -.005em; }
.dz-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.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: .08em; }
.dz-f select { border: 1px solid var(--border-hi); background: var(--surface); 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(--accent); box-shadow: var(--f-focus); }
.dz-section { margin: 28px auto 12px; font: 600 11px var(--f-font); letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 12px; }
.dz-section::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.dz-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; min-width: 0;
  box-shadow: var(--f-shadow-1); transition: border-color .2s ease; }
.dz-card:hover { border-color: var(--border-hi); }
.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-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: 600 40px/1.05 var(--f-display); letter-spacing: -.01em; margin: 8px 0 4px; font-variant-numeric: lining-nums tabular-nums; color: var(--text); }
.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 { 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(--muted); border: 1px solid var(--border); 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-hi); background: var(--surface); 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(--accent); color: var(--text); }
.dz-take { margin: 12px 0; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; color: var(--text-2);
  background: var(--f-accent-soft); 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-hi); background: var(--surface); color: var(--text);
  border-radius: 10px; padding: 7px 11px; font: inherit; font-size: 13px; }
.dz-search:focus { outline: none; border-color: var(--accent); box-shadow: var(--f-focus); }
.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; background: var(--surface); }
.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) 70%, 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: 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(--accent); 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-hi); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 5px 12px; font-size: 12px; }
.dz-toggle:hover { border-color: var(--text-2); color: var(--text); }
.dz-skel { min-height: 118px; background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 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; } }

/* ---------- Chat (Ask) */
#view-ask { display: flex; flex-direction: column; }
.thread { flex: 1; overflow-y: auto; padding: 16px 24px 8px; }
.thread-inner { max-width: 860px; margin: 0 auto; }
.empty { text-align: center; padding: 14vh 8px 16px; color: var(--text-2); }
.empty h1 { font: 600 clamp(30px, 4vw, 44px)/1.1 var(--f-display); margin: 0 0 10px; color: var(--text); letter-spacing: -.005em; text-transform: none; }
.empty .f-eyebrow { display: block; margin-bottom: 10px; }
.orb-hero { width: min(680px, 62vh, 94vw); height: min(680px, 62vh, 94vw); display: block; margin: -3vh auto -34px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.msg { margin: 0 0 18px; }
.msg.user { display: flex; justify-content: flex-end; }
.bubble-user { background: var(--f-ink); color: var(--f-bg); padding: 9px 15px; border-radius: 18px 18px 4px 18px;
  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; }
.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; box-shadow: var(--f-shadow-1); }
.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: .06em; 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(--f-ink); color: var(--f-bg); font-size: 12px;
  padding: 6px 9px; border-radius: 6px; max-width: 260px; box-shadow: var(--shadow); }

/* composer */
.composer { flex-shrink: 0; padding: 8px 24px 14px; background: linear-gradient(transparent, var(--f-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-hi); background: var(--surface); color: var(--text);
  border-radius: 18px; padding: 12px 16px; font: inherit; max-height: 160px; min-height: 48px; outline: none; box-shadow: var(--f-shadow-1);
  transition: border-color .15s ease, box-shadow .15s ease; }
.composer textarea:focus { border-color: var(--accent); box-shadow: var(--f-focus); }
.send { height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font-weight: 600; color: var(--f-bg); background: var(--f-ink); }
.send:hover { background: color-mix(in srgb, var(--f-ink) 86%, var(--f-accent)); }
.send:disabled { opacity: .4; cursor: default; }
.hint { max-width: 860px; margin: 6px auto 0; font-size: 12px; color: var(--muted); padding-right: calc(var(--mic-space) - 16px); }

/* ---------- lists: alerts, insights, brand reports, research, exam, pilot (their own CSS files add the rest) */
#view-alerts, #view-insights, #view-brands, #view-research, #view-exam, #view-pilot, #view-home, #view-honest { overflow-y: auto; }
.alerts { max-width: 908px; margin: 0 auto; padding: 12px 24px var(--mic-space); }
.alerts-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.alerts-head .grow { flex: 1; font-weight: 600; }
.al-search { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.al-search input, .al-search select { border: 1px solid var(--border-hi); background: var(--surface); color: var(--text); border-radius: 10px;
  padding: 8px 12px; font: inherit; font-size: 14px; min-height: 38px; }
.al-search input[type=search] { flex: 1 1 260px; min-width: 0; }
.al-search select { max-width: 220px; }
.al-search label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.al-search input:focus, .al-search select:focus { outline: none; border-color: var(--accent); box-shadow: var(--f-focus); }
.al-count { margin: 0 0 10px; min-height: 0; }
.al-count:empty { display: none; }
.alert { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
  box-shadow: var(--f-shadow-1); transition: border-color .15s ease; }
.alert:hover { border-color: var(--border-hi); }
.alert .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.pill { background: var(--surface-2); color: var(--text-2); padding: 1px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border); }
.pill.capped { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.alert .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.alert .links { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 13px; }
.votes { display: flex; gap: 8px; margin-top: 10px; }
.vote { border: 1px solid var(--border-hi); 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; }
select.in-filter, #exam-domain, #br-brand, #br-week { border: 1px solid var(--border-hi); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; }
.muted { color: var(--muted); }

/* ---------- Talk to Friday: the galaxy stage (dark in both themes; tap anywhere to talk) */
#view-friday { overflow: hidden; position: relative; color-scheme: dark; }
.fv { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 16px 7vh; pointer-events: none; }
.fv-stage { position: absolute; inset: 0; border: 0; padding: 0; background: none; cursor: pointer; line-height: 0; pointer-events: auto; }
.fv-name, .fv-status, .fv-hint { position: relative; }
.fv-name { font: 600 22px/1 var(--f-font); letter-spacing: .6em; margin-right: -.6em; color: #fff; text-shadow: 0 0 18px rgba(255, 255, 255, .45); }
.fv-status { font: 500 12px var(--mono); letter-spacing: .45em; margin: 12px -.45em 0 0; color: rgba(255, 255, 255, .75); }
.fv-hint { font-size: 12px; color: rgba(255, 255, 255, .5); margin-top: 10px; }
.fv-hint .hint-wake { display: none; }
:root[data-wake="listening"] .fv-hint .hint-wake, :root[data-wake="paused"] .fv-hint .hint-wake { display: inline; }
:root[data-wake="listening"] .fv-hint .hint-tap, :root[data-wake="paused"] .fv-hint .hint-tap { display: none; }
.fv-type { position: relative; pointer-events: auto; margin-top: 18px; color: rgba(255, 255, 255, .7); font-size: 13px; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; padding: 6px 14px; }
.fv-type:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
/* wake word + snap switches (wake.js / snap.js); they live in the sidebar foot / the phone "More" sheet */
.wake-btn { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; height: 32px; padding: 0 12px; font-size: 12.5px; }
.snap-sel { height: 32px; padding: 0 8px; font: inherit; font-size: 12.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border-hi); border-radius: 999px; cursor: pointer; }
.wake-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.wake-btn[aria-pressed="true"] { color: var(--text); border-color: var(--accent); }
:root[data-wake="listening"] .wake-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: wakepulse 1.8s ease-in-out infinite; }
:root[data-wake="paused"] .wake-dot { background: var(--good); }
:root[data-wake="loading"] .wake-dot { background: var(--accent-2); animation: wakepulse .8s ease-in-out infinite; }
:root[data-wake="blocked"] .wake-dot, :root[data-wake="error"] .wake-dot { background: var(--bad); }
@keyframes wakepulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .wake-dot { animation: none !important; } }
canvas[data-orb] { mix-blend-mode: screen; -webkit-mask-image: radial-gradient(closest-side, #000 86%, transparent 100%); mask-image: radial-gradient(closest-side, #000 86%, transparent 100%); }
:root[data-theme="light"] canvas[data-orb]:not(.space-bg) { mix-blend-mode: multiply; filter: invert(1) hue-rotate(180deg); }
canvas.space-bg { -webkit-mask-image: none; mask-image: none; mix-blend-mode: normal; }

/* ---------- Friday's face: the voice button (console/voice/) - bottom right on a laptop, in the phone bar on a phone */
.mic {
  position: fixed; right: 18px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 40; width: 72px; height: 72px; border-radius: 50%; padding: 0;
  border: 1px solid var(--border-hi); color: var(--text); box-shadow: 0 0 0 1px var(--f-line-2), 0 10px 30px rgba(0, 0, 0, .25);
  display: grid; place-items: center; overflow: hidden; background: #000;
}
.mic > * { grid-area: 1 / 1; }
.mic-orb { width: 100%; height: 100%; display: block; pointer-events: none; }
.mic svg { display: none; }
.mic-face { width: 100%; height: 100%; display: block; object-fit: cover; transform: scale(1.75); pointer-events: none; user-select: none;
  filter: brightness(1.15) contrast(1.1); transition: transform .15s ease, filter .15s ease; }
.mic.speaking .mic-face { transform: scale(calc(1.75 + var(--lvl, 0) * .25 + .08)); filter: brightness(1.6) contrast(1.15) drop-shadow(0 0 6px #fff); }
.mic.speaking { box-shadow: 0 0 0 2px rgba(255, 255, 255, .35), 0 0 28px rgba(255, 255, 255, .35); }
body:has(#view-friday:not(.hidden)) .mic { display: none; }   /* the Talk view: tap the galaxy or say "Friday" instead */
.mic:hover { transform: scale(1.05); }
@media (max-width: 899.98px) {
  .mic { right: auto; left: 50%; bottom: calc(var(--f-safe-b) + 18px); width: 56px; height: 56px; margin-left: -28px;
    box-shadow: 0 0 0 3px var(--f-surface), 0 6px 18px rgba(0, 0, 0, .28); }
  .mic:hover { transform: none; }
  body:has(#view-friday:not(.hidden)) .mic { display: grid; }   /* on a phone it stays in the bar */
  html .vdock { bottom: calc(var(--f-bnav) + var(--f-safe-b) + 14px); }
  :root { --mic-space: 16px; }
}
.toast { position: fixed; right: 16px; bottom: 104px; z-index: 45; background: var(--f-ink); color: var(--f-bg); padding: 8px 12px;
  border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
@media (max-width: 899.98px) { .toast { bottom: calc(var(--f-bnav) + var(--f-safe-b) + 16px); right: 12px; left: 12px; } }

/* ---------- login (login.html) */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; background: var(--f-bg); }
.login form { width: 100%; max-width: 380px; background: var(--f-surface); border: 1px solid var(--f-line); border-radius: 22px; padding: 30px 28px; box-shadow: var(--f-shadow-2); }
.login .login-face { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; margin: 0 auto 14px; background: #000; box-shadow: 0 0 0 1px var(--f-line-2), 0 8px 24px rgba(0, 0, 0, .2); }
.login .login-face img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.75); display: block; filter: brightness(1.15) contrast(1.1); }
.login h1 { margin: 0 0 2px; font: 600 13px var(--f-font); letter-spacing: .38em; text-align: center; color: var(--f-ink); margin-right: -.38em; }
.login .login-sub { text-align: center; font: italic 500 19px var(--f-display); color: var(--f-ink-2); margin: 0 0 14px; }
.login #lead { text-align: center; }
.login p { margin: 0 0 18px; color: var(--text-2); font-size: 14px; }
.login input:not([type=checkbox]) { width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--f-line-2); background: var(--f-bg);
  color: var(--text); font: inherit; margin-bottom: 12px; }
.login input:focus { outline: none; border-color: var(--accent); box-shadow: var(--f-focus); }
.login input[type=checkbox] { accent-color: var(--f-accent); }
.login button { width: 100%; height: 46px; border: 0; border-radius: 999px; font-weight: 600; color: var(--f-bg); background: var(--f-ink); }
.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); text-align: center; }
.login button:disabled { opacity: .6; cursor: default; }

/* ---------- phone */
@media (max-width: 640px) {
  .dz { padding: 4px 12px 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: 30px; }
  .dz-tile-desc { -webkit-line-clamp: 3; }
  .dz-f select { max-width: calc(50vw - 28px); }
  .chips { padding: 10px 12px; }
  .thread { padding: 12px 14px 6px; }
  .composer { padding: 6px 12px 10px; }
  .composer form { padding-right: 0; }
  .card { flex-basis: 148px; }
  .hint { display: none; }
  .alerts { padding: 8px 14px 24px; }
  .empty { padding-top: 8vh; }
}

/* chat 73: Friday as an app - install chip, tap-to-talk screen, reminder pop-ups, remember-me */
.install-chip { font: 600 12px/1 var(--f-font); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--f-line-2);
  background: var(--f-accent); color: var(--f-accent-ink); cursor: pointer; white-space: nowrap; }
.install-chip.quiet { background: transparent; color: inherit; }
.install-chip.floating { position: fixed; right: 16px; bottom: 96px; z-index: 60; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
@media (max-width: 899.98px) { .install-chip.floating { bottom: calc(var(--f-bnav) + var(--f-safe-b) + 14px); } }
#tap-to-talk { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; background: rgba(16,14,10,.94); color: #f3ece1; text-align: center; padding: 16px; cursor: pointer; }
#tap-to-talk .ttt-orb { width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #ffe9cf, #e08a52 62%, #7a3f1f);
  box-shadow: 0 0 60px rgba(224,138,82,.55); animation: ttt 1.6s ease-in-out infinite; }
#tap-to-talk .ttt-text { font: 600 22px/1.2 var(--f-font); }
#tap-to-talk .ttt-sub { font-size: 13px; opacity: .7; }
@keyframes ttt { 50% { transform: scale(1.06); } }
.assist-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 150; max-width: min(560px, calc(100vw - 32px));
  background: var(--f-surface); color: var(--f-ink); border: 1px solid var(--f-line-2); border-radius: 14px;
  padding: 12px 40px 12px 14px; box-shadow: var(--f-shadow-2); font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
@media (max-width: 899.98px) { .assist-toast { bottom: calc(var(--f-bnav) + var(--f-safe-b) + 14px); } }
.assist-toast + .assist-toast { bottom: 96px; }
.assist-toast button { position: absolute; top: 8px; right: 8px; border: 0; background: transparent; color: inherit; font-size: 14px; cursor: pointer; }
.login .remember { display: flex; gap: 8px; align-items: center; font-size: 13px; margin: 4px 0 12px; color: var(--text-2); }

/* chat 82 (review 2): one left edge on a laptop - views start 48 px from the sidebar like every other page (chat stays centred) */
@media (min-width: 900px) {
  .f-head, .f-head.narrow { margin-left: 0; padding-left: 48px; }
  .alerts { margin-left: 0; padding-left: 48px; }
  .chips { margin-left: 0; padding-left: 48px; }
  .dz { padding-left: 48px; }
  .dz > * { margin-left: 0; }
  /* Home has its own big "Talk to Friday" face: no second floating face there */
  body:has(#view-home:not(.hidden)) .mic:not(.on):not(.live):not(.speaking) { display: none; }
}
/* the voice stage on a phone: the bar goes dark with the galaxy */
@media (max-width: 899.98px) {
  body:has(#view-friday:not(.hidden)) .f-bnav { background: rgba(0, 0, 0, .72); border-top-color: rgba(255, 255, 255, .08); }
  body:has(#view-friday:not(.hidden)) .f-bn { color: rgba(255, 255, 255, .6); }
  body:has(#view-friday:not(.hidden)) .mic { box-shadow: 0 0 0 3px rgba(255, 255, 255, .25), 0 6px 18px rgba(0, 0, 0, .5); }
}
.dz-big { font: 600 34px/1.05 var(--f-font); letter-spacing: -.025em; }
