/**
 * Shell Layout — Top-industry pattern (Linear / ChatGPT / Notion)
 * ─────────────────────────────────────────────────────────────────
 * Single source of truth for the application shell:
 *   #app-shell  flex column           — viewport-bound, no page scroll
 *     navbar     flex-shrink: 0       — fixed at top
 *     .app-layout  grid (side · main) — fills remaining viewport
 *       .sidebar       grid-area: side, scrolls internally
 *       .main-content  grid-area: main, scrolls internally
 *       .argus-panel   grid-area: main, thread scrolls internally
 *
 * Loaded LAST so it wins the cascade over legacy fixed/sticky rules
 * in style.css, ui-components.css, foundations.css, and today-chat.css.
 *
 * Rules of the road inside this file:
 *   – No magic numbers; reference --nav-height / --sidebar-width.
 *   – No !important except where overriding legacy author rules
 *     that themselves use !important (today-chat.css cleanup pending).
 *   – No position: sticky on shell chrome — the grid IS the layout.
 *   – Internal scrolling regions get overscroll-behavior: contain so
 *     reaching their edge does not bubble to the page.
 */

/* ──────────────────────────────────────────────────────────────────
   1) HTML & body — viewport-bound, no page scroll
   ────────────────────────────────────────────────────────────────── */
html, body {
  height: 100%;
  margin: 0;
}

body {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

/* ──────────────────────────────────────────────────────────────────
   2) #app-shell — flex column: navbar on top, layout fills rest
   ────────────────────────────────────────────────────────────────── */
#app-shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ──────────────────────────────────────────────────────────────────
   3) Navbar — flex child, fixed height. No more position: sticky.
   ────────────────────────────────────────────────────────────────── */
#app-shell > .navbar {
  position: static;
  flex-shrink: 0;
  height: var(--nav-height);
  z-index: var(--z-sticky);
}

/* ──────────────────────────────────────────────────────────────────
   4) .app-layout — grid: sidebar | main. Fills remaining viewport.
   ────────────────────────────────────────────────────────────────── */
#app-shell > .app-layout {
  flex: 1 1 auto;
  min-height: 0;          /* enable children to shrink/scroll inside */
  display: flex;          /* row: sidebar + main column */
  flex-direction: row;
  align-items: stretch;   /* children fill height */
  /* Reset legacy reservations from ui-components.css that assumed a
     fixed 380px Argus panel on the right. */
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ──────────────────────────────────────────────────────────────────
   5) Sidebar — grid-area: side. Scrolls internally.
   ────────────────────────────────────────────────────────────────── */
#app-shell .sidebar {
  position: static;
  top: auto;
  flex: 0 0 var(--sidebar-width);
  width: var(--sidebar-width);
  min-width: 0;
  height: auto;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--border-subtle);
  scrollbar-gutter: stable;
}

/* ──────────────────────────────────────────────────────────────────
   6) Main content — grid-area: main. Scrolls internally on every
      section other than Today (where Argus replaces it).
   ────────────────────────────────────────────────────────────────── */
#app-shell .main-content {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  max-width: none;
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/* ──────────────────────────────────────────────────────────────────
   7) Argus chat panel — grid-area: main on Today. Reset all the
      legacy fixed positioning. Thread scrolls internally; head and
      input bar are flex-shrink:0 (already set in ui-components.css).
   ────────────────────────────────────────────────────────────────── */
#app-shell .argus-panel {
  flex: 1 1 0;
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  inset: auto;
  width: auto;
  min-width: 0;
  max-width: none;
  /* Kill the legacy ui-components.css rule at @media (769-1279) that
     sets transform: translateX(100%) — that legacy slid the panel
     off-screen to the right unless JS toggled .is-mobile-overlay.
     With shell.css owning the layout, the panel is always in-flow
     in the main grid area on Today, so transform must be reset. */
  transform: none;
  box-shadow: none;
  z-index: auto;
  /* No explicit height — the panel is a grid item with default
     align-self: stretch, so it fills the grid row track which is
     itself 1fr of .app-layout (= flex-1 inside #app-shell flex
     column = viewport - navbar). Forcing height: 100% or calc(dvh)
     produced edge-cases (Chrome cached dvh across fullscreen ↔
     window, Safari computed 100% inconsistently). Stretch is the
     reliable primitive. */
  min-height: 0;
  border-left: none;
  /* Inner layout: 3-row grid (head · thread · input). Far more
     reliable than flex column — no sub-pixel drift, no flex-basis
     edge cases, the auto rows shrink to content, the 1fr row eats
     the rest, the input row is guaranteed visible at bottom. */
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

#app-shell .argus-panel > .argus-panel__head    { grid-row: 1; }
#app-shell .argus-panel > .argus-panel__thread  { grid-row: 2; }
#app-shell .argus-panel > #argus-input-form,
#app-shell .argus-panel > form.argus-panel__input { grid-row: 3; }

#app-shell .argus-panel__thread {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ──────────────────────────────────────────────────────────────────
   8) Section visibility — Today shows Argus and hides main; every
      other section shows main and hides Argus.
   ────────────────────────────────────────────────────────────────── */
body[data-section="overview"] #app-shell .main-content {
  display: none;
}
body:not([data-section="overview"]) #app-shell .argus-panel {
  display: none;
}

/* The page footer belongs to landing-style pages; in a viewport-bound
   chat shell it has no place. Move "Contact / © 2026" to /settings or
   the user menu. Hidden everywhere here. */
#app-shell > .app-footer {
  display: none;
}

/* The legacy navbar "Argus" toggle popped/closed a floating right
   panel. With Argus promoted to the main column on Today and absent
   on every other section, the toggle is a no-op. Argus is accessed
   via the sidebar nav. Hide it globally. */
#argus-panel-toggle-btn {
  display: none;
}

/* ──────────────────────────────────────────────────────────────────
   9) Mobile / tablet — drawer pattern (≤ 1024px)
      Sidebar pulls out of the layout grid, becomes a fixed drawer
      below the navbar; main / argus take the full width.
   ────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  #app-shell .sidebar {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    bottom: 0;
    flex: 0 0 auto;
    width: var(--sidebar-mobile);
    z-index: var(--z-fixed);
    background: var(--bg-canvas, var(--bg-primary));
    border-right: 1px solid var(--border-subtle);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }

  #app-shell .sidebar.open {
    transform: translateX(0);
  }
}

/* iPhone safe-area: respect the home-indicator inset so the input
   bar / sidebar bottom sit above it. Uses max() so we keep the
   existing padding on devices without a safe-area inset (env() = 0). */
@supports (padding: max(0px)) {
  #app-shell .argus-panel__input {
    padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
  }
  #app-shell .sidebar {
    padding-bottom: max(var(--space-md), env(safe-area-inset-bottom));
  }
}

/* Reduced motion — disable the drawer slide transition. */
@media (prefers-reduced-motion: reduce) {
  #app-shell .sidebar {
    transition: none;
  }
}

/* ══════════════════════════════════════════════════════════════════
   PAPER GRADIENT BACKGROUND — warm halos, soft, matches the
   reference (peach top-left + mint top-right + cream base).
   The pseudo is fixed and pointer-events:none, so it doesn't
   intercept clicks. z-index:0 keeps it behind app content
   (#app-shell creates its own stacking context with z-index:auto).
   ══════════════════════════════════════════════════════════════════ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    /* MINT primary — dominant top-right, very large + saturated */
    radial-gradient(
      90vmin 80vmin at 90% 20%,
      oklch(80% 0.16 170 / 0.95) 0%,
      oklch(80% 0.16 170 / 0.55) 30%,
      oklch(80% 0.16 170 / 0.20) 55%,
      transparent 80%
    ),
    /* MINT secondary — bottom-center sweep, sustains green everywhere */
    radial-gradient(
      90vmin 65vmin at 60% 100%,
      oklch(83% 0.14 165 / 0.70) 0%,
      oklch(83% 0.14 165 / 0.28) 40%,
      transparent 75%
    ),
    /* peach — small accent top-left only */
    radial-gradient(
      40vmin 32vmin at 6% 14%,
      oklch(82% 0.12 60 / 0.40) 0%,
      oklch(82% 0.12 60 / 0.10) 45%,
      transparent 75%
    ),
    /* mint-tinted base (instead of pure cream) so the green carries
       through the un-haloed regions too */
    color-mix(in oklab, var(--bg-canvas) 70%, oklch(85% 0.08 170));
}

#app-shell {
  position: relative;
  z-index: 1;          /* sit above the gradient pseudo */
  background: transparent;
}

/* Navbar — vibrancy bar (macOS / Arc Browser pattern). Lightly
   translucent + strong blur so the warm halos bleed through but
   the bar still reads as a stable header anchor. */
#app-shell > .navbar {
  background: color-mix(in oklab, var(--bg-canvas) 62%, transparent);
  backdrop-filter: blur(20px) saturate(1.20);
  -webkit-backdrop-filter: blur(20px) saturate(1.20);
  border-bottom: none;
  padding: 0 var(--space-4);
}

/* Sidebar — slightly more solid than the navbar (78% canvas) so the
   icon column reads as a stable rail; still translucent enough that
   the green atmosphere flows through it. No border-right — the blur
   creates the separation. */
#app-shell .sidebar {
  background: color-mix(in oklab, var(--bg-canvas) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.10);
  -webkit-backdrop-filter: blur(18px) saturate(1.10);
  border-right: none;
}

#app-shell .main-content {
  background: transparent;
}

/* Argus panel — mint preponderant inside the chat surface, so green
   carries through the thread itself. Peach kept as a small accent. */
#app-shell .argus-panel {
  background:
    /* MINT — top-right, large */
    radial-gradient(
      70vmin 55vmin at 85% 15%,
      oklch(80% 0.16 170 / 0.55) 0%,
      oklch(80% 0.16 170 / 0.18) 40%,
      transparent 75%
    ),
    /* MINT secondary — bottom-right, near the input */
    radial-gradient(
      60vmin 45vmin at 88% 88%,
      oklch(83% 0.14 165 / 0.45) 0%,
      oklch(83% 0.14 165 / 0.14) 42%,
      transparent 75%
    ),
    /* peach — small accent, top-left */
    radial-gradient(
      35vmin 28vmin at 10% 20%,
      oklch(82% 0.12 60 / 0.22) 0%,
      oklch(82% 0.12 60 / 0.06) 40%,
      transparent 70%
    ),
    transparent;
}

/* Kill the cyberpunk neon vertical bar before the brand logo.
   Origin: ui-components.css line 10039 — `.navbar-brand.cp-brand::before`
   draws a 3px tall teal-cyan bar with a 16px box-shadow neon glow.
   Out of palette for paper. */
#app-shell .navbar-brand.cp-brand::before {
  display: none;
}
#app-shell .navbar-brand.cp-brand {
  padding-left: 0;
}

/* Navbar content was max-width:1440px centered, which on wide viewports
   pushed the ARGUS logo away from the left edge — it then floated in
   the middle, misaligned with the sidebar. Make it edge-to-edge so the
   logo sits flush-left in the viewport, aligned with the sidebar gutter. */
#app-shell > .navbar > .navbar-content {
  max-width: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Logo: dot + "ARGUS" wordmark, flush left, compact. The lengthy
   "CRISIS INTELLIGENCE · 2027" tagline below the wordmark is hidden
   on desktop — top-industry navbars carry brand-only, never tagline. */
#app-shell > .navbar > .navbar-content > .navbar-brand {
  flex-shrink: 0;
  padding: 0 var(--space-3);
  min-height: var(--nav-height);
}

@media (min-width: 1025px) {
  #app-shell > .navbar > .navbar-content > .navbar-brand .cp-brand-tag {
    display: none;
  }
  #app-shell > .navbar > .navbar-content > .navbar-brand .cp-brand-name {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    font-weight: 700;
  }
}

/* Right-side actions get their own padding from the right edge. */
#app-shell > .navbar > .navbar-content > .navbar-actions {
  padding-right: var(--space-4);
  margin-left: auto;
}

/* ══════════════════════════════════════════════════════════════════
   ARGUS CHAT — keep the original Perplexity-grade input box from
   ui-components.css (visible border, soft shadow, bg-canvas) so the
   composer reads as a clear affordance against the cream canvas.
   We don't override its background — that's what made the bar
   invisible in v=2..v=5. The head stays transparent (just the title
   row), no border line — atmosphere comes from the warm gradient.
   ══════════════════════════════════════════════════════════════════ */
#app-shell .argus-panel .argus-panel__head {
  background: transparent;
  border-bottom: none;
}

/* ══════════════════════════════════════════════════════════════════
   SIDEBAR — compact icon-only at every desktop zoom (Linear / Slack
   pattern). Labels and Recent are intentionally hidden so each row
   is a single 40×40 hit target, all icons centered.
   On hover, the icon-only row keeps its tooltip (browser title) for
   discoverability; future enhancement: custom hover tooltip.
   ══════════════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {
  /* Center every interactive row in the 64px column */
  #app-shell .sidebar-nav,
  #app-shell .sidebar-footer {
    padding-left: 0;
    padding-right: 0;
  }

  /* — Institutional chunky tile: 48×48, radius 14, no bounce.
       Pattern: Linear / Vercel / Anthropic Console / Bloomberg Terminal. */
  #app-shell .sidebar-item,
  #app-shell .sidebar-new-chat {
    width: 48px;
    height: 48px;
    padding: 0;
    margin: 5px auto;
    justify-content: center;
    border-left: none;
    border-radius: 14px;
    gap: 0;
    /* Standard Material/iOS easing — no overshoot, no spring. */
    transition:
      background 0.16s cubic-bezier(0.4, 0, 0.2, 1),
      color 0.16s cubic-bezier(0.4, 0, 0.2, 1),
      box-shadow 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Default — crisp warm charcoal icon */
  #app-shell .sidebar-item { color: var(--text-primary); }

  /* Hover — soft tile, no transform (no lift, no scale). Color stays
     constant; only background appears. Cleaner, more focused. */
  #app-shell .sidebar-item:hover {
    background: color-mix(in oklab, var(--text-primary) 7%, transparent);
    color: var(--text-primary);
  }

  /* Active — filled claret tile, subtle ring */
  #app-shell .sidebar-item.active {
    background: color-mix(in oklab, var(--accent-primary) 14%, transparent);
    color: var(--accent-primary);
    border-left: none;
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent-primary) 18%, transparent);
  }

  /* Icons — exact viewBox-matched container (24px for a 24-viewBox
     SVG), 22px SVG inside, stroke 1.75 (Linear/Vercel standard),
     rounded caps for clean termination. */
  #app-shell .sidebar-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  #app-shell .sidebar-item svg,
  #app-shell .sidebar-new-chat svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    shape-rendering: geometricPrecision;
  }

  /* Hide labels and section headers — icon-only mode */
  #app-shell .sidebar-label,
  #app-shell .sidebar-new-chat__label,
  #app-shell .sidebar-section__label,
  #app-shell .sidebar-section--recent {
    display: none;
  }

  /* + New chat — primary affordance, solid claret tile + soft glow.
     Hover = brightness shift + shadow lift; no rotation, no overshoot. */
  #app-shell .sidebar-new-chat {
    background: var(--accent-primary);
    color: white;
    box-shadow:
      0 1px 2px rgb(0 0 0 / 0.08),
      0 6px 18px -6px color-mix(in oklab, var(--accent-primary) 40%, transparent);
  }
  #app-shell .sidebar-new-chat:hover {
    background: color-mix(in oklab, var(--accent-primary) 92%, white);
    box-shadow:
      0 2px 4px rgb(0 0 0 / 0.10),
      0 10px 24px -6px color-mix(in oklab, var(--accent-primary) 50%, transparent);
  }
  #app-shell .sidebar-new-chat:active {
    background: color-mix(in oklab, var(--accent-primary) 88%, black);
    transition-duration: 0.08s;
  }

  /* Sidebar footer: hide the brand block (version + tagline). */
  #app-shell .sidebar-brand {
    display: none;
  }

  /* Sidebar tooltip on hover — reads aria-label attribute, fades in
     after 350ms hover (no instant flash on quick mouseover). Pattern
     used by Slack / Linear icon-only sidebars. */
  #app-shell .sidebar-item,
  #app-shell .sidebar-new-chat {
    position: relative;
  }
  #app-shell .sidebar-item::after,
  #app-shell .sidebar-new-chat::after {
    content: attr(aria-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: color-mix(in oklab, var(--text-primary) 92%, black);
    color: var(--bg-canvas);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition:
      opacity 0.18s ease 0s,
      transform 0.18s ease 0s;
    box-shadow: 0 4px 14px -4px rgb(0 0 0 / 0.25);
    z-index: var(--z-tooltip);
  }
  #app-shell .sidebar-item:hover::after,
  #app-shell .sidebar-new-chat:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    transition-delay: 0.35s;
  }
}

/* ══════════════════════════════════════════════════════════════════
   CHAT THREAD — top-industry readability (Claude.ai / ChatGPT).
   Cap content to a comfortable line length, center it, give it
   air. Welcome state (chips), individual messages, sources panels
   all sit inside this column.
   ══════════════════════════════════════════════════════════════════ */
#app-shell .argus-panel__thread {
  /* Padding: vertical breath, horizontal min-gutter. */
  padding-left: clamp(var(--space-3), 4vw, var(--space-6));
  padding-right: clamp(var(--space-3), 4vw, var(--space-6));
}

#app-shell .argus-panel__thread > * {
  width: 100%;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Cap the input bar to the same column as the thread (top industry:
   composer width matches reading column). The input bar sits centered
   in the panel by auto margins; its outer margin from ui-components.css
   becomes its visual gutter. */
#app-shell .argus-panel form.argus-panel__input {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  width: calc(100% - 2 * clamp(var(--space-3), 4vw, var(--space-6)));
}

/* ══════════════════════════════════════════════════════════════════
   NEON CYBERPUNK RESIDUALS — kill the green glow on the brand
   indicator so the navbar reads as paper, not 2077 trader terminal.
   ══════════════════════════════════════════════════════════════════ */
#app-shell .cp-brand-indicator {
  background: var(--accent-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent-primary) 18%, transparent);
  animation: none;
}

/* Mobile bottom nav — push the entire app-layout up by the height of
   .mobile-bottom-nav (which is position:fixed bottom:0 and stacks
   above the layout). The nav height includes env(safe-area-inset-bottom)
   on iPhones with home-indicator, so we add it to keep the chat bar
   visible above the home indicator + nav stack. */
@media (max-width: 768px) {
  #app-shell > .app-layout {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
}

/* ════════════════════════════════════════════════════════════════════════
   ROLE ONBOARDING — first-time pick, fades in on top of the app shell
   ════════════════════════════════════════════════════════════════════════ */
.role-onboard {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 500);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.role-onboard[hidden] { display: none; }

.role-onboard__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--bg-canvas) 65%, transparent);
  backdrop-filter: blur(20px) saturate(1.10);
  -webkit-backdrop-filter: blur(20px) saturate(1.10);
}

.role-onboard__card {
  position: relative;
  max-width: 580px;
  width: 100%;
  padding: clamp(28px, 4vw, 48px);
  background: color-mix(in oklab, var(--bg-canvas) 88%, white);
  border: 1px solid color-mix(in oklab, var(--text-primary) 8%, transparent);
  border-radius: 20px;
  box-shadow:
    0 4px 8px rgb(26 24 21 / 0.06),
    0 24px 64px -16px rgb(26 24 21 / 0.18);
  text-align: center;
  animation: role-onboard-in 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes role-onboard-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.role-onboard__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: var(--space-3);
}

.role-onboard__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
}

.role-onboard__sub {
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 440px;
  margin: 0 auto var(--space-5);
}

.role-onboard__roles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
@media (max-width: 540px) {
  .role-onboard__roles { grid-template-columns: 1fr; }
}

.role-onboard__role {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px 20px;
  background: color-mix(in oklab, var(--bg-canvas) 60%, white);
  border: 1.5px solid color-mix(in oklab, var(--text-primary) 10%, transparent);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}
.role-onboard__role:hover {
  border-color: color-mix(in oklab, var(--accent-primary) 38%, transparent);
  background: color-mix(in oklab, var(--accent-primary) 5%, var(--bg-canvas));
  box-shadow: 0 6px 18px -8px color-mix(in oklab, var(--accent-primary) 35%, transparent);
}

.role-onboard__role-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklab, var(--accent-primary) 10%, transparent);
  color: var(--accent-primary);
  border-radius: 10px;
  margin-bottom: 4px;
}

.role-onboard__role-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.role-onboard__role-tag {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  letter-spacing: 0.01em;
}

.role-onboard__skip {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.16s ease, background 0.16s ease;
}
.role-onboard__skip:hover {
  color: var(--text-primary);
  background: color-mix(in oklab, var(--text-primary) 5%, transparent);
}

/* ════════════════════════════════════════════════════════════════════════
   SPECIALIST PROGRESS CHIPS — visible during multi-specialist streaming
   ("Calling Market analysis..." → "✓ Market analysis"). Backend emits
   tool_call / tool_result SSE events as it runs each specialist (Wave-B
   specialist streaming). Visual: paper pill, claret pulse for running,
   teal check for done, amber for error.
   ════════════════════════════════════════════════════════════════════════ */
#app-shell .argus-msg__specialists {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  animation: spec-strip-in 0.18s ease-out;
}
@keyframes spec-strip-in {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}

#app-shell .argus-specialist-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  background: color-mix(in oklab, var(--bg-canvas) 60%, white);
  border: 1px solid color-mix(in oklab, var(--text-primary) 8%, transparent);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

/* Running — claret pulse dot, slightly elevated */
#app-shell .argus-specialist-chip[data-status="running"] {
  background: color-mix(in oklab, var(--accent-primary) 7%, var(--bg-canvas));
  border-color: color-mix(in oklab, var(--accent-primary) 22%, transparent);
  color: var(--accent-primary);
}
#app-shell .argus-specialist-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  animation: spec-dot-pulse 1.2s ease-in-out infinite;
}
@keyframes spec-dot-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(0.7); opacity: 0.55; }
}

/* Done — teal check, faded */
#app-shell .argus-specialist-chip[data-status="done"] {
  background: color-mix(in oklab, var(--accent-teal, #0D7680) 6%, var(--bg-canvas));
  border-color: color-mix(in oklab, var(--accent-teal, #0D7680) 22%, transparent);
  color: var(--accent-teal, #0D7680);
}
#app-shell .argus-specialist-chip__check {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-teal, #0D7680);
  color: white;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

/* Error — amber dot, kept subtle so it doesn't alarm during best-effort */
#app-shell .argus-specialist-chip[data-status="error"] {
  background: color-mix(in oklab, var(--severity-warning) 7%, var(--bg-canvas));
  border-color: color-mix(in oklab, var(--severity-warning) 25%, transparent);
  color: var(--severity-warning);
}
#app-shell .argus-specialist-chip__dot--error {
  background: var(--severity-warning);
  animation: none;
}

/* Reduced motion — disable the pulse */
@media (prefers-reduced-motion: reduce) {
  #app-shell .argus-specialist-chip__dot {
    animation: none;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   VOICE PERMISSION MODAL — shown when the browser blocks the mic.
   Visual steps to recover, not a transient toast.
   ════════════════════════════════════════════════════════════════════════ */
.voice-permission-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 500);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.voice-permission-modal[hidden] { display: none; }
.voice-permission-modal__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--bg-canvas) 50%, transparent);
  backdrop-filter: blur(20px) saturate(1.10);
  -webkit-backdrop-filter: blur(20px) saturate(1.10);
}
.voice-permission-modal__card {
  position: relative;
  max-width: 480px;
  width: 100%;
  padding: clamp(24px, 4vw, 40px);
  background: color-mix(in oklab, var(--bg-canvas) 88%, white);
  border: 1px solid color-mix(in oklab, var(--text-primary) 8%, transparent);
  border-radius: 18px;
  box-shadow:
    0 4px 8px rgb(26 24 21 / 0.06),
    0 24px 64px -16px rgb(26 24 21 / 0.18);
  animation: role-onboard-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.voice-permission-modal__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
}
.voice-permission-modal__sub {
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 var(--space-3);
}
.voice-permission-modal__steps {
  margin: 0 0 var(--space-4);
  padding-left: 22px;
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 0.94rem;
}
.voice-permission-modal__steps li::marker { color: var(--accent-primary); font-weight: 700; }
.voice-permission-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.voice-permission-modal__btn {
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--text-primary) 14%, transparent);
  color: var(--text-primary);
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.voice-permission-modal__btn:hover {
  background: color-mix(in oklab, var(--text-primary) 5%, transparent);
}
.voice-permission-modal__btn--primary {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}
.voice-permission-modal__btn--primary:hover {
  background: color-mix(in oklab, var(--accent-primary) 92%, white);
}

/* Print — restore page scroll so the user can print a thread. */
@media print {
  body, #app-shell {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  body::before { display: none; }
  #app-shell > .navbar,
  #app-shell .sidebar {
    display: none;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   ARGUS CHAT UX — 2026-2027 grade
   Reference patterns: Perplexity, Linear, Code Vibe, ChatGPT, Claude.ai
   Welcome airy / message cards with subtle shadow / avatar gradient with
   glow ring / pill input with focus ring / send button gradient claret /
   smooth fade-in on append / pulsing typing indicator / chip suggestions
   that lift on hover.
   ════════════════════════════════════════════════════════════════════════ */

/* — Welcome state — big, airy, centered (ChatGPT new chat pattern) — */
#app-shell .argus-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(420px, 55vh);
  padding: clamp(24px, 6vh, 64px) 24px;
  gap: var(--space-3);
  text-align: center;
}
#app-shell .argus-welcome h3 {
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  color: var(--text-primary);
}
#app-shell .argus-welcome p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.55;
  margin: 0 0 var(--space-2);
}
#app-shell .argus-welcome__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-2);
}
#app-shell .argus-welcome__chip {
  background: color-mix(in oklab, var(--bg-canvas) 70%, white);
  border: 1px solid color-mix(in oklab, var(--text-primary) 12%, transparent);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.875rem;
  padding: 9px 18px;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
#app-shell .argus-welcome__chip:hover {
  background: color-mix(in oklab, var(--accent-primary) 8%, var(--bg-canvas));
  border-color: color-mix(in oklab, var(--accent-primary) 32%, transparent);
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -8px color-mix(in oklab, var(--accent-primary) 35%, transparent);
}

/* — Message row — generous gap, fade-in on append — */
@keyframes argus-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
#app-shell .argus-msg {
  gap: 12px;
  margin: 20px 0;
  align-items: flex-start;
  animation: argus-msg-in 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
  #app-shell .argus-msg { animation: none; }
}

/* — Avatars — circle with gradient + glow ring — */
#app-shell .argus-msg__avatar {
  width: 32px;
  height: 32px;
  font-size: 0.82rem;
  font-weight: 600;
  background: linear-gradient(135deg,
              var(--accent-primary),
              color-mix(in oklab, var(--accent-primary) 75%, black));
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--accent-primary) 35%, transparent),
    0 4px 14px -4px color-mix(in oklab, var(--accent-primary) 32%, transparent);
}
#app-shell .argus-msg--user .argus-msg__avatar {
  background: linear-gradient(135deg,
              var(--text-primary),
              color-mix(in oklab, var(--text-primary) 70%, white));
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--text-primary) 14%, transparent),
    0 4px 12px -4px color-mix(in oklab, var(--text-primary) 25%, transparent);
}

/* — Bubbles — paper card with soft shadow, slightly opaque so they
   stay legible over the warm halos behind them — */
#app-shell .argus-msg__body {
  background: color-mix(in oklab, var(--bg-canvas) 30%, white);
  border: 1px solid color-mix(in oklab, var(--text-primary) 8%, transparent);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow:
    0 1px 2px rgb(26 24 21 / 0.04),
    0 8px 24px -12px rgb(26 24 21 / 0.08);
  backdrop-filter: blur(8px) saturate(1.05);
  -webkit-backdrop-filter: blur(8px) saturate(1.05);
}
#app-shell .argus-msg--user .argus-msg__body {
  background: color-mix(in oklab, var(--accent-primary) 6%, var(--bg-canvas));
  border-color: color-mix(in oklab, var(--accent-primary) 16%, transparent);
}

/* — Pending / typing indicator — pulsing dots — */
@keyframes argus-typing {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30%           { opacity: 1;    transform: translateY(-2px); }
}
#app-shell .argus-msg--pending .argus-msg__body {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 10px 6px;
}
#app-shell .argus-msg--pending .argus-msg__text {
  display: inline-flex;
  gap: 5px;
}
#app-shell .argus-msg--pending .argus-msg__text::before,
#app-shell .argus-msg--pending .argus-msg__text::after,
#app-shell .argus-msg--pending .argus-msg__text {
  font-size: 0;
}
#app-shell .argus-msg--pending .argus-msg__text {
  position: relative;
  width: 32px;
  height: 8px;
}
#app-shell .argus-msg--pending .argus-msg__text::before,
#app-shell .argus-msg--pending .argus-msg__text::after {
  content: '';
  position: absolute;
  top: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
  animation: argus-typing 1.4s infinite ease-in-out;
}
#app-shell .argus-msg--pending .argus-msg__text::before { left: 0;  animation-delay: 0s; }
#app-shell .argus-msg--pending .argus-msg__text::after  { left: 12px; animation-delay: 0.2s; }
/* third dot via box-shadow trick on ::after */
#app-shell .argus-msg--pending .argus-msg__text::after {
  box-shadow: 12px 0 0 var(--text-tertiary);
}

/* — Source citation chips — inline, subtle, claret on hover — */
#app-shell .argus-msg__source-chip {
  border-radius: 999px;
  background: color-mix(in oklab, var(--text-primary) 5%, transparent);
  border: 1px solid color-mix(in oklab, var(--text-primary) 8%, transparent);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
#app-shell .argus-msg__source-chip:hover {
  background: color-mix(in oklab, var(--accent-primary) 10%, transparent);
  border-color: color-mix(in oklab, var(--accent-primary) 30%, transparent);
  color: var(--accent-primary);
}

/* — Input composer — pill with focus glow, gradient send, blur backdrop
   so it floats clearly over the mint halo behind — */
#app-shell .argus-panel__input,
#app-shell form.argus-panel__input {
  margin: 16px clamp(16px, 4vw, 32px) 18px;
  border-radius: 18px;
  border: 1.5px solid color-mix(in oklab, var(--text-primary) 12%, transparent);
  background: color-mix(in oklab, var(--bg-canvas) 35%, white);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  box-shadow:
    0 1px 2px rgb(26 24 21 / 0.04),
    0 8px 28px -12px rgb(26 24 21 / 0.10);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
#app-shell .argus-panel__input:focus-within {
  border-color: color-mix(in oklab, var(--accent-primary) 38%, transparent);
  box-shadow:
    0 0 0 4px color-mix(in oklab, var(--accent-primary) 12%, transparent),
    0 8px 24px -8px rgb(26 24 21 / 0.10);
}

#app-shell .argus-panel__input-field {
  font-size: 0.95rem;
}

/* — Composer buttons (mic + send) — 2026-2027 grade — */
#app-shell .argus-panel__input-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--bg-canvas) 80%, white);
  border: 1px solid color-mix(in oklab, var(--text-primary) 12%, transparent);
  color: color-mix(in oklab, var(--text-primary) 55%, transparent);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
#app-shell .argus-panel__input-btn:hover {
  background: color-mix(in oklab, var(--accent-primary) 8%, var(--bg-canvas));
  border-color: color-mix(in oklab, var(--accent-primary) 32%, transparent);
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px -4px color-mix(in oklab, var(--accent-primary) 30%, transparent);
}
#app-shell .argus-panel__input-btn svg {
  width: 16px;
  height: 16px;
}

/* — Mic — base same as input-btn; when active (recording) pulse claret — */
@keyframes argus-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--severity-alert) 40%, transparent); }
  50%      { box-shadow: 0 0 0 10px color-mix(in oklab, var(--severity-alert) 0%, transparent); }
}
#app-shell .argus-panel__input-btn--mic.is-active {
  background: linear-gradient(135deg,
              var(--severity-alert, var(--accent-primary)),
              color-mix(in oklab, var(--severity-alert, var(--accent-primary)) 78%, black));
  color: white;
  border-color: transparent;
  animation: argus-mic-pulse 1.6s ease-in-out infinite;
}

/* — Send — primary affordance, gradient claret, lift on hover — */
#app-shell .argus-panel__input-btn--send {
  background: linear-gradient(135deg,
              var(--accent-primary),
              color-mix(in oklab, var(--accent-primary) 78%, black));
  border-color: transparent;
  color: white;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.06),
    0 4px 14px -4px color-mix(in oklab, var(--accent-primary) 42%, transparent);
}
#app-shell .argus-panel__input-btn--send:hover {
  background: linear-gradient(135deg,
              var(--accent-primary),
              color-mix(in oklab, var(--accent-primary) 70%, black));
  border-color: transparent;
  color: white;
  transform: translateY(-1px) scale(1.04);
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.08),
    0 8px 22px -4px color-mix(in oklab, var(--accent-primary) 55%, transparent);
}
#app-shell .argus-panel__input-btn--send:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.08s;
}

/* — Thread max readable width: 760 px (chat reading column) — */
#app-shell .argus-panel__thread > .argus-msg,
#app-shell .argus-panel__thread > .argus-welcome {
  width: 100%;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* ════════════════════════════════════════════════════════════════════════
   CROSS-SECTION GLASS COHERENCE
   Argus chat (Today) sets the visual language: paper warm + halos +
   glass cards with backdrop-filter blur. Without these rules the other
   sections (Countries / News / Analysis / Markets) read as a different
   product because their cards are flat-paper instead of frosted-glass.
   These rules elevate every card surface to the same glass aesthetic.
   ════════════════════════════════════════════════════════════════════════ */

/* Main content padding — generous, with reading column max-width so
   tables and grids don't span 1800px on ultra-wide displays. */
#app-shell .main-content {
  padding: clamp(20px, 2.4vw, 36px) clamp(20px, 3vw, 48px);
}
#app-shell .main-content > .content-section.active {
  max-width: 1280px;
  margin: 0 auto;
}

/* Section header — replace the hard border-bottom with a subtle one
   (mostly atmosphere does the separation) and align typography. */
#app-shell .section-header-bar {
  border-bottom: 1px solid color-mix(in oklab, var(--text-primary) 6%, transparent);
  padding-block: var(--space-4) var(--space-3);
}

/* Glass card unification — applies to .glass-card / .editorial-card /
   .stats-banner / .markets-headline and the data table containers.
   Subtle border, soft shadow, backdrop-filter so the warm halos bleed
   through. The bg uses color-mix instead of --bg-surface so the card
   stays semi-translucent (90% paper) even after design-tokens edits. */
#app-shell .glass-card,
#app-shell .editorial-card,
#app-shell .stats-banner,
#app-shell .markets-headline,
#app-shell .ranking-table-container,
#app-shell .data-table-wrap,
#app-shell .news-card,
#app-shell .top-crisis-card,
#app-shell .my-briefs__list,
#app-shell .coming-soon-card {
  background: color-mix(in oklab, var(--bg-canvas) 78%, white);
  border: 1px solid color-mix(in oklab, var(--text-primary) 7%, transparent);
  border-radius: 16px;
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  box-shadow:
    0 1px 2px rgb(26 24 21 / 0.03),
    0 8px 24px -12px rgb(26 24 21 / 0.08);
}

/* Hover lift — institutional, subtle, no spring */
#app-shell .editorial-card:hover,
#app-shell .top-crisis-card:hover,
#app-shell .news-card:hover {
  border-color: color-mix(in oklab, var(--text-primary) 14%, transparent);
  box-shadow:
    0 1px 2px rgb(26 24 21 / 0.04),
    0 14px 32px -10px rgb(26 24 21 / 0.12);
}

/* Tabs — pill-row, paper-tinted, claret active. */
#app-shell .tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  background: color-mix(in oklab, var(--bg-canvas) 60%, white);
  border: 1px solid color-mix(in oklab, var(--text-primary) 7%, transparent);
  border-radius: 12px;
  margin-bottom: var(--space-4);
  width: fit-content;
}
#app-shell .tab-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
#app-shell .tab-btn:hover {
  background: color-mix(in oklab, var(--text-primary) 5%, transparent);
  color: var(--text-primary);
}
#app-shell .tab-btn.active {
  background: var(--bg-canvas);
  color: var(--accent-primary);
  box-shadow: 0 1px 2px rgb(26 24 21 / 0.06);
}

/* Search input — translucent paper coherent. (Removed wrap on
   .news-source-tabs / .news-dropdowns — those are bare flex
   containers, wrapping them in pills was visually wrong.) */
#app-shell .rankings-search {
  background: color-mix(in oklab, var(--bg-canvas) 75%, white);
  border: 1px solid color-mix(in oklab, var(--text-primary) 7%, transparent);
  border-radius: 12px;
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
}

/* News source tabs (All / Media / ReliefWeb) — paper pills.
   Was background:transparent which on a bright halo edge read as
   pure white. Explicit paper bg fixes this. */
#app-shell .news-source-tab {
  background: color-mix(in oklab, var(--bg-canvas) 65%, white);
  border: 1px solid color-mix(in oklab, var(--text-primary) 8%, transparent);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
}
#app-shell .news-source-tab:hover {
  background: color-mix(in oklab, var(--text-primary) 5%, var(--bg-canvas));
  color: var(--text-primary);
  border-color: color-mix(in oklab, var(--text-primary) 18%, transparent);
}
#app-shell .news-source-tab.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* Form selects (region / topic / dim filters) — paper pill, custom
   chevron via SVG background to override the native white-bg select.
   `appearance: none` strips the OS chrome; we draw a chevron manually. */
#app-shell .form-select,
#app-shell .pill-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: color-mix(in oklab, var(--bg-canvas) 65%, white);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231A1815' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1px solid color-mix(in oklab, var(--text-primary) 10%, transparent);
  border-radius: 10px;
  padding: 8px 36px 8px 14px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
#app-shell .form-select:hover,
#app-shell .pill-select:hover {
  border-color: color-mix(in oklab, var(--text-primary) 22%, transparent);
}
#app-shell .form-select:focus,
#app-shell .pill-select:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--accent-primary) 38%, transparent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent-primary) 12%, transparent);
}
/* The browser-native dropdown menu (the popup of <option>s) is
   OS-controlled and styles inconsistently — best we can do is set
   option bg/text so it at least shows paper-tinted on Chrome. */
#app-shell .form-select option,
#app-shell .pill-select option {
  background: var(--bg-canvas);
  color: var(--text-primary);
}

/* Inline buttons (Generate / Run analysis / Refresh) — claret accent
   on action; ghost variant for secondary. */
#app-shell .inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
#app-shell .inline-btn:hover {
  background: color-mix(in oklab, var(--accent-primary) 92%, white);
  box-shadow: 0 4px 14px -4px color-mix(in oklab, var(--accent-primary) 38%, transparent);
}
#app-shell .inline-btn--ghost {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid color-mix(in oklab, var(--accent-primary) 22%, transparent);
}
#app-shell .inline-btn--ghost:hover {
  background: color-mix(in oklab, var(--accent-primary) 8%, transparent);
}

/* "Ask Argus" micro-CTA on every editorial card — subtle until hover. */
#app-shell .editorial-card__ask {
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--text-primary) 10%, transparent);
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.16s ease;
}
#app-shell .editorial-card__ask:hover {
  background: color-mix(in oklab, var(--accent-primary) 8%, transparent);
  border-color: color-mix(in oklab, var(--accent-primary) 28%, transparent);
  color: var(--accent-primary);
}

/* Live badge in News section — was cyberpunk neon green with text-shadow
   glow (illegible on warm cream). Paper-palette replacement: filled
   teal pill with subtle pulsing dot. */
#app-shell .content-section[data-section="news-feed"] .section-header-bar .badge,
#app-shell .content-section[data-section="market-signals"] .section-header-bar .badge {
  background: color-mix(in oklab, var(--accent-teal, #0D7680) 12%, var(--bg-canvas));
  color: var(--accent-teal, #0D7680);
  border: 1px solid color-mix(in oklab, var(--accent-teal, #0D7680) 35%, transparent);
  padding: 4px 12px 4px 22px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border-radius: 999px;
  text-shadow: none;
  position: relative;
}
#app-shell .content-section[data-section="news-feed"] .section-header-bar .badge::before,
#app-shell .content-section[data-section="market-signals"] .section-header-bar .badge::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--accent-teal, #0D7680);
  border-radius: 50%;
  box-shadow: none;
  animation: argus-live-pulse 2s ease-in-out infinite;
}
@keyframes argus-live-pulse {
  0%, 100% { opacity: 1;   transform: translateY(-50%) scale(1); }
  50%      { opacity: 0.5; transform: translateY(-50%) scale(0.85); }
}

/* Coming-soon section — center, friendly, claret-accent eyebrow */
#app-shell .coming-soon-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(60vh, 480px);
  padding: var(--space-5);
}
#app-shell .coming-soon-card {
  max-width: 540px;
  text-align: center;
  padding: clamp(24px, 4vw, 48px);
}
#app-shell .coming-soon-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: var(--space-3);
}
#app-shell .coming-soon-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-3);
}
#app-shell .coming-soon-body {
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 var(--space-4);
}
#app-shell .coming-soon-meta {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  font-style: italic;
}
