/**
 * Cinema overrides — applies when [data-theme="cinema"] is active.
 *
 * Port of notamy.app structural patterns (the *how*, not just the *what*).
 * design-tokens.css [data-theme="cinema"] block already swaps colors + fonts.
 * This file adds: grain overlay, Ken Burns animation, glass utility classes,
 * eyebrow pattern, hero typography, pill button, sticky glass header,
 * orange focus ring, dark scrollbar, orange selection.
 *
 * Loaded LAST so it wins surface-specific rules authored against paper.
 */

/* Ensure body itself picks up the new tokens (foundations.css already does
   this via var() — explicit here to guard against any later reset). */
[data-theme="cinema"] body {
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
}

/* ============================================================
   GRAIN TEXTURE — fractal noise SVG, fixed overlay (notamy 1:1)
   ============================================================ */
[data-theme="cinema"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ============================================================
   KEN BURNS — slow zoom for hero video (30s loop)
   ============================================================ */
@keyframes hero-kenburns {
  0%   { transform: scale(1.0); }
  50%  { transform: scale(1.06); }
  100% { transform: scale(1.0); }
}
[data-theme="cinema"] .hero-video-kenburns,
[data-theme="cinema"] [data-kenburns] {
  animation: hero-kenburns 30s ease-in-out infinite;
}

/* ============================================================
   GLASS UTILITIES — frosted, backdrop-filter
   ============================================================ */

[data-theme="cinema"] .glass-nav {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-default);
}

[data-theme="cinema"] .glass-card {
  background: rgba(19, 19, 19, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
}

[data-theme="cinema"] .glass-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 9999px;
  padding: 0.875rem 1.25rem;
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color 150ms ease, background 150ms ease;
}
[data-theme="cinema"] .glass-input::placeholder { color: var(--text-tertiary); }
[data-theme="cinema"] .glass-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="cinema"] .glass-pill {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 9999px;
  padding: 0.375rem 0.75rem;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

[data-theme="cinema"] .glass-overlay {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ============================================================
   TYPOGRAPHY — eyebrow, hero, italic subtitle, lead
   ============================================================ */

[data-theme="cinema"] .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-tertiary);
  margin: 0 0 1rem;
  display: block;
}

[data-theme="cinema"] .hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.0;
  margin: 0 0 1.5rem;
  color: var(--text-primary);
}

[data-theme="cinema"] .hero-subtitle {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  color: var(--text-secondary);
  line-height: 1.35;
  margin-top: 1rem;
}

[data-theme="cinema"] .lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 42rem;
}

/* ============================================================
   PILL BUTTON — white-on-black universal CTA (notamy 1:1)
   ============================================================ */

[data-theme="cinema"] .btn-pill,
[data-theme="cinema"] .btn-cinema {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
  text-decoration: none;
  white-space: nowrap;
}
[data-theme="cinema"] .btn-pill:hover,
[data-theme="cinema"] .btn-cinema:hover {
  background: rgba(255, 255, 255, 0.9);
}
[data-theme="cinema"] .btn-pill:active,
[data-theme="cinema"] .btn-cinema:active {
  transform: translateY(1px);
}
[data-theme="cinema"] .btn-pill:disabled,
[data-theme="cinema"] .btn-cinema:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Ghost variant — secondary outline */
[data-theme="cinema"] .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}
[data-theme="cinema"] .btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

/* ============================================================
   CARDS — rounded-2xl border surface (notamy "How it works" style)
   ============================================================ */

[data-theme="cinema"] .card-cinema {
  padding: 2rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
[data-theme="cinema"] .card-cinema:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Card number — orange accent, mono light, large */
[data-theme="cinema"] .card-cinema__num {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 3rem;
  color: var(--accent-primary);
  line-height: 1;
  margin: 0 0 1rem;
}

/* ============================================================
   STICKY HEADER — Studio-style glass blur (notamy StudioHeader.tsx)
   ============================================================ */

[data-theme="cinema"] .header-sticky {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-default);
  padding-top: max(0.75rem, env(safe-area-inset-top));
}

/* ============================================================
   FOCUS RING — orange glow (matches --shadow-focus)
   ============================================================ */

[data-theme="cinema"] :focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* ============================================================
   SCROLLBAR — thin dark
   ============================================================ */

[data-theme="cinema"] ::-webkit-scrollbar { width: 10px; height: 10px; }
[data-theme="cinema"] ::-webkit-scrollbar-track { background: var(--bg-canvas); }
[data-theme="cinema"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
}
[data-theme="cinema"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   SELECTION — orange highlight
   ============================================================ */

[data-theme="cinema"] ::selection {
  background: rgba(100, 210, 255, 0.3);
  color: var(--text-primary);
}

/* ============================================================
   ASK ARGUS HERO — port of notamy WaitlistForm pill-glass pattern
   ("your@email.com" cinematic input). Overrides the existing
   Perplexity-style box in ui-components.css with the notamy
   1:1 pill + backdrop-blur + white-on-black mini button.
   ============================================================ */

[data-theme="cinema"] .today-ask-argus__input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  border-radius: 9999px;
  color: var(--text-tertiary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 64px;
  padding: 0 10px 0 26px;
  box-shadow: none;
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
[data-theme="cinema"] .today-ask-argus__input:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
  transform: none;
}
[data-theme="cinema"] .today-ask-argus__input:focus-visible,
[data-theme="cinema"] .today-ask-argus__input:focus-within {
  outline: none;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

[data-theme="cinema"] .today-ask-argus__placeholder {
  color: var(--text-tertiary);
  font-family: var(--font-body);
}

/* ⏎ enter affordance → notamy-style mini white pill (button-in-input) */
[data-theme="cinema"] .today-ask-argus__cmd {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: #ffffff;
  color: #000000;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  flex-shrink: 0;
  transition: background 150ms ease, transform 150ms ease;
}
[data-theme="cinema"] .today-ask-argus__input:hover .today-ask-argus__cmd {
  background: rgba(255, 255, 255, 0.9);
}
[data-theme="cinema"] .today-ask-argus__input:active .today-ask-argus__cmd {
  transform: translateY(1px);
}

/* Chips — glass pill notamy (white/5 backdrop-blur, hover white/8) */
[data-theme="cinema"] .today-ask-argus__chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  letter-spacing: -0.005em;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
[data-theme="cinema"] .today-ask-argus__chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
  color: var(--text-primary);
  transform: translateY(-1px);
}
[data-theme="cinema"] .today-ask-argus__chip:focus-visible {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}

/* Title gradient — white→muted on dark canvas */
[data-theme="cinema"] .today-ask-argus__title {
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.65) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Sub copy — muted on dark */
[data-theme="cinema"] .today-ask-argus__sub {
  color: var(--text-tertiary);
}

/* Scroll affordance "↓ today's intelligence" — bump contrast on dark */
[data-theme="cinema"] .today-ask-argus::after {
  color: var(--text-tertiary);
  opacity: 0.7;
}

/* ============================================================
   ARGUS PANEL INPUT (#argus-input-form) — the REAL chat input
   that owns the Today screen ("Ask Argus anything…"). Port of
   notamy WaitlistForm pattern: glass pill container + transparent
   input + white-on-black send pill + ghost mic.
   ============================================================ */

/* Form container — pill glass wrapper */
[data-theme="cinema"] .argus-panel__input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 9999px !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.375rem 0.5rem 0.375rem 1.5rem !important;
  box-shadow: none !important;
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  margin: 0 auto;
  max-width: 760px;
  width: calc(100% - 2rem);
}
[data-theme="cinema"] .argus-panel__input:hover {
  border-color: rgba(255, 255, 255, 0.28) !important;
  background: rgba(255, 255, 255, 0.07) !important;
}
[data-theme="cinema"] .argus-panel__input:focus-within {
  border-color: rgba(255, 255, 255, 0.32) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12) !important;
}

/* Input field — transparent, lets the glass container shine through */
[data-theme="cinema"] .argus-panel__input-field {
  flex: 1 1 auto;
  background: transparent !important;
  border: none !important;
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  line-height: 1.5;
  padding: 0.625rem 0.25rem !important;
  outline: none !important;
  box-shadow: none !important;
}
[data-theme="cinema"] .argus-panel__input-field::placeholder {
  color: var(--text-tertiary) !important;
  opacity: 1;
}
[data-theme="cinema"] .argus-panel__input-field:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Mic button — ghost icon-only circle */
[data-theme="cinema"] .argus-panel__input-btn--mic {
  width: 40px;
  height: 40px;
  border-radius: 9999px !important;
  background: transparent !important;
  color: var(--text-tertiary) !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
  flex-shrink: 0;
}
[data-theme="cinema"] .argus-panel__input-btn--mic:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text-primary) !important;
}
[data-theme="cinema"] .argus-panel__input-btn--mic[aria-pressed="true"] {
  background: rgba(100, 210, 255, 0.18) !important;
  color: var(--accent-primary) !important;
}

/* Clear / new-chat button — left of the input, neutral like the mic (opposite the send) */
[data-theme="cinema"] .argus-panel__input-btn--clear {
  width: 40px;
  height: 40px;
  border-radius: 9999px !important;
  background: transparent !important;
  color: var(--text-tertiary) !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
  flex-shrink: 0;
}
[data-theme="cinema"] .argus-panel__input-btn--clear:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text-primary) !important;
}

/* Send button — white pill mini-button (notamy WaitlistForm arrow) */
[data-theme="cinema"] .argus-panel__input-btn--send {
  width: 44px;
  height: 44px;
  border-radius: 9999px !important;
  background: #ffffff !important;
  color: #000000 !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
  flex-shrink: 0;
}
[data-theme="cinema"] .argus-panel__input-btn--send:hover {
  background: rgba(255, 255, 255, 0.9) !important;
}
[data-theme="cinema"] .argus-panel__input-btn--send:active {
  transform: translateY(1px);
}
[data-theme="cinema"] .argus-panel__input-btn--send svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   ARGUS WELCOME (above the chat input on first paint) —
   port hero typography: "What would you like to know?" becomes
   a centered notamy-style H1 with the gradient text-clip + the
   chips become glass-pills.
   ============================================================ */

[data-theme="cinema"] .argus-welcome h3 {
  font-family: var(--font-display) !important;
  font-size: clamp(2rem, 4vw, 3rem) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.05 !important;
  color: var(--text-primary) !important;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.65) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 1rem !important;
}

[data-theme="cinema"] .argus-welcome p {
  font-family: var(--font-body) !important;
  font-size: 0.9375rem !important;
  color: var(--text-tertiary) !important;
  line-height: 1.55 !important;
  max-width: 480px;
  margin: 0 auto 1.5rem !important;
}

[data-theme="cinema"] .argus-welcome__chip {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-default) !important;
  color: var(--text-secondary) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 9999px !important;
  font-family: var(--font-body) !important;
  font-size: 0.8125rem !important;
  padding: 0.5rem 0.875rem !important;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
[data-theme="cinema"] .argus-welcome__chip:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--border-strong) !important;
  color: var(--text-primary) !important;
  transform: translateY(-1px);
}

/* ============================================================
   ARGUS CHAT (secondary input bar at #argus-input-bar) — same
   pattern as #argus-input-form. Stylistic parity across all
   Argus surfaces.
   ============================================================ */

[data-theme="cinema"] .argus-chat__input-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 9999px !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.375rem 0.5rem 0.375rem 1.5rem !important;
  box-shadow: none !important;
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
[data-theme="cinema"] .argus-chat__input-bar:focus-within {
  border-color: rgba(255, 255, 255, 0.32) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12) !important;
}
[data-theme="cinema"] .argus-chat__input {
  flex: 1 1 auto;
  background: transparent !important;
  border: none !important;
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  padding: 0.625rem 0.25rem !important;
  outline: none !important;
}
[data-theme="cinema"] .argus-chat__input::placeholder {
  color: var(--text-tertiary) !important;
}
[data-theme="cinema"] .argus-chat__send {
  padding: 0.625rem 1.25rem !important;
  border-radius: 9999px !important;
  background: #ffffff !important;
  color: #000000 !important;
  border: none !important;
  font-family: var(--font-body) !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  cursor: pointer;
  transition: background 150ms ease;
}
[data-theme="cinema"] .argus-chat__send:hover {
  background: rgba(255, 255, 255, 0.9) !important;
}

/* ============================================================
   NAVBAR — top header glass (notamy StudioHeader pattern)
   Selectors prefixed with [data-theme="cinema"] #app-shell to
   beat the existing #app-shell shell.css rules without !important.
   ============================================================ */

[data-theme="cinema"] #app-shell > .navbar {
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-default);
}

/* Brand indicator dot — pulsing cinema orange, replaces the
   inert paper-claret indicator from ui-components. */
[data-theme="cinema"] #app-shell .navbar-brand .cp-brand-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(100, 210, 255, 0.28);
  animation: brand-dot-pulse 2.4s ease-in-out infinite;
  margin-right: 0.625rem;
  vertical-align: middle;
  flex-shrink: 0;
}
@keyframes brand-dot-pulse {
  0%, 100% { opacity: 1;    transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.25); }
}

[data-theme="cinema"] #app-shell .navbar-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

[data-theme="cinema"] #app-shell .navbar-brand .cp-brand-text {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}

/* Wordmark — Geist semibold, kept uppercase (institutional brand) */
[data-theme="cinema"] #app-shell .navbar-brand .cp-brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-transform: uppercase;
}

/* Tag — mono eyebrow, only visible <1025px (desktop hides per shell.css) */
[data-theme="cinema"] #app-shell .navbar-brand .cp-brand-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-top: 0.125rem;
}

/* Desktop: keep wordmark sized but apply Geist + new tracking */
@media (min-width: 1025px) {
  [data-theme="cinema"] #app-shell > .navbar > .navbar-content > .navbar-brand .cp-brand-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-primary);
  }
}

/* Navbar actions — Argus toggle button reads as glass-pill */
[data-theme="cinema"] #app-shell .argus-panel-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-default);
  border-radius: 9999px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
[data-theme="cinema"] #app-shell .argus-panel-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
[data-theme="cinema"] #app-shell .argus-panel-toggle-btn .argus-panel-toggle-btn__kbd {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
[data-theme="cinema"] #app-shell .argus-panel-toggle-btn kbd {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  color: var(--text-tertiary);
}

/* ============================================================
   SIDEBAR — glass column + cinema icon tiles
   ============================================================ */

[data-theme="cinema"] #app-shell .sidebar {
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-right: 1px solid var(--border-default);
}

/* Icon tiles — ghost default, glass on hover, white/8 + orange ring on active */
[data-theme="cinema"] #app-shell .sidebar-item {
  background: transparent;
  color: var(--text-tertiary);
  border: 1px solid transparent;
  transition:
    background 0.16s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.16s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.16s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.16s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="cinema"] #app-shell .sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-default);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
[data-theme="cinema"] #app-shell .sidebar-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-primary);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 0 0 1px rgba(100, 210, 255, 0.18),
    0 4px 12px -4px rgba(100, 210, 255, 0.25);
}

/* Consistent hover micro-interaction for the non-hero sidebar icons — a subtle lift +
   icon pop on hover and a press on click, in the SAME spirit/easing as the Globe centre
   tile (which keeps its own bigger lift). Excludes .sidebar-new-chat--center so the hero
   stays untouched. */
[data-theme="cinema"] #app-shell .sidebar-item:not(.sidebar-new-chat--center) {
  transition:
    background 0.16s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.16s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.16s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.16s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="cinema"] #app-shell .sidebar-item:not(.sidebar-new-chat--center):hover {
  transform: translateY(-1px);
}
[data-theme="cinema"] #app-shell .sidebar-item:not(.sidebar-new-chat--center):active {
  transform: translateY(0) scale(0.96);
}
[data-theme="cinema"] #app-shell .sidebar-item:not(.sidebar-new-chat--center) svg {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="cinema"] #app-shell .sidebar-item:not(.sidebar-new-chat--center):hover svg {
  transform: scale(1.12);
}

/* Icons inherit color from item state */
[data-theme="cinema"] #app-shell .sidebar-icon { color: inherit; }
[data-theme="cinema"] #app-shell .sidebar-item svg,
[data-theme="cinema"] #app-shell .sidebar-new-chat svg {
  stroke: currentColor;
}

/* Label (visible <1025px) — Geist body */
[data-theme="cinema"] #app-shell .sidebar-label {
  font-family: var(--font-body);
  font-weight: 500;
  color: inherit;
}

/* + New chat — orange-tinted glass pill (replaces solid claret tile) */
[data-theme="cinema"] #app-shell .sidebar-new-chat {
  background: rgba(100, 210, 255, 0.14);
  color: var(--accent-primary);
  border: 1px solid rgba(100, 210, 255, 0.32);
  box-shadow:
    0 0 0 1px rgba(100, 210, 255, 0.08),
    0 6px 18px -6px rgba(100, 210, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
[data-theme="cinema"] #app-shell .sidebar-new-chat:hover {
  background: rgba(100, 210, 255, 0.22);
  border-color: var(--accent-primary);
  color: var(--text-primary);
  box-shadow:
    0 0 0 1px rgba(100, 210, 255, 0.32),
    0 10px 24px -6px rgba(100, 210, 255, 0.5);
}
[data-theme="cinema"] #app-shell .sidebar-new-chat:active {
  background: rgba(100, 210, 255, 0.3);
}

/* Tooltip on hover (sidebar icon-only mode) — adopt cinema palette */
[data-theme="cinema"] #app-shell .sidebar-item::after,
[data-theme="cinema"] #app-shell .sidebar-new-chat::after {
  background: rgba(28, 28, 28, 0.95);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-body);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
}

/* Sidebar section labels (visible <1025px) — eyebrow mono */
[data-theme="cinema"] #app-shell .sidebar-section__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ============================================================
   USER MENU DROPDOWN — bundles profile + language + sign-out
   Replaces 3 separate header controls. Pattern: Vercel / Linear.
   ============================================================ */

/* Sign-in button (anonymous state) — glass pill */
[data-theme="cinema"] #app-shell .auth-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-default);
  border-radius: 9999px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
[data-theme="cinema"] #app-shell .auth-login-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* User-menu container — positioning anchor for the absolute panel */
[data-theme="cinema"] #app-shell .user-menu {
  position: relative;
}

/* Trigger — photo + name + chevron, glass pill */
[data-theme="cinema"] #app-shell .user-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.625rem 0.25rem 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-default);
  border-radius: 9999px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 150ms ease, border-color 150ms ease;
}
[data-theme="cinema"] #app-shell .user-menu__trigger:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-strong);
}
[data-theme="cinema"] #app-shell .user-menu__trigger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
}

[data-theme="cinema"] #app-shell .user-menu__photo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
[data-theme="cinema"] #app-shell .user-menu__name {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="cinema"] #app-shell .user-menu__chev {
  color: var(--text-tertiary);
  transition: transform 200ms ease;
  flex-shrink: 0;
}
[data-theme="cinema"] #app-shell .user-menu__trigger[aria-expanded="true"] .user-menu__chev {
  transform: rotate(180deg);
}

/* Dropdown panel — absolute, glass-elevated */
[data-theme="cinema"] #app-shell .user-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 0.5rem;
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 48px -12px rgba(0, 0, 0, 0.7),
    0 8px 16px -8px rgba(0, 0, 0, 0.5);
  z-index: var(--z-dropdown);
  animation: user-menu-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="cinema"] #app-shell .user-menu__panel[hidden] {
  display: none;
}
@keyframes user-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Menu items — link + buttons */
[data-theme="cinema"] #app-shell .user-menu__item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
[data-theme="cinema"] #app-shell .user-menu__item:hover {
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="cinema"] #app-shell .user-menu__item svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}
[data-theme="cinema"] #app-shell .user-menu__item:hover svg {
  color: var(--text-primary);
}
[data-theme="cinema"] #app-shell .user-menu__item--danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}
[data-theme="cinema"] #app-shell .user-menu__item--danger:hover svg {
  color: #fca5a5;
}

/* Divider */
[data-theme="cinema"] #app-shell .user-menu__divider {
  height: 1px;
  background: var(--border-default);
  margin: 0.375rem 0;
}

/* Language section */
[data-theme="cinema"] #app-shell .user-menu__section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
}
[data-theme="cinema"] #app-shell .user-menu__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Lang select — styled native */
[data-theme="cinema"] #app-shell .user-menu__lang {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  padding: 0.375rem 1.75rem 0.375rem 0.625rem;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 4.5l3 3 3-3'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 12px 12px;
}
[data-theme="cinema"] #app-shell .user-menu__lang:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
}
[data-theme="cinema"] #app-shell .user-menu__lang:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}
[data-theme="cinema"] #app-shell .user-menu__lang option {
  background: #1c1c1c;
  color: var(--text-primary);
}

/* ============================================================
   ARGUS SCROLL FAB — WhatsApp/Telegram pattern. Floating chevron
   that smart-flips direction based on scroll position.
   ============================================================ */

[data-theme="cinema"] .argus-scroll-fab {
  position: absolute;
  right: 14px;
  bottom: 84px; /* sits above the input form */
  /* Identical to the Election Watch ‹ › strip arrows (.ew-arrow): same size, border,
     background, colour and glow — one consistent navigation affordance across the app. */
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 50%;
  background: rgba(10, 13, 20, 0.95);
  color: var(--accent, #f59e0b);
  border: 2px solid var(--accent, #f59e0b);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(245, 158, 11, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  pointer-events: none;
  transition:
    opacity 220ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
    background 160ms ease,
    border-color 160ms ease;
  z-index: 5;
}
[data-theme="cinema"] .argus-scroll-fab[data-visible="true"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
[data-theme="cinema"] .argus-scroll-fab:hover {
  background: var(--accent, #f59e0b);
  border-color: var(--accent, #f59e0b);
  color: #0a0d16;
}
[data-theme="cinema"] .argus-scroll-fab:active {
  transform: translateY(0) scale(0.94);
  transition-duration: 90ms;
}
[data-theme="cinema"] .argus-scroll-fab__icon {
  width: 30px;
  height: 30px;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="cinema"] .argus-scroll-fab[data-direction="up"] .argus-scroll-fab__icon {
  transform: rotate(180deg);
}

@media (max-width: 768px) {
  [data-theme="cinema"] .argus-scroll-fab {
    right: 12px;
    /* Smaller on mobile (tighter viewport, thumb reach matters). */
    width: 42px;
    height: 42px;
    /* Mobile stack from bottom up: mobile-bottom-nav (~76px) +
       sticky Ask Argus input (~62px) + safe-area inset. FAB must
       clear ALL of them so it sits visibly above the input field. */
    bottom: calc(150px + env(safe-area-inset-bottom, 0px));
  }
}

/* ============================================================
   TEMPLATE CHIPS (CONOPS / Contingency Plan) — same size as regular
   welcome chips, only differentiator is an orange ghost border so
   users can tell they're "template" deliverables (prefill flow)
   rather than question prompts (auto-submit flow).
   ============================================================ */

[data-theme="cinema"] .argus-welcome__chip--product {
  border-color: rgba(100, 210, 255, 0.55) !important;
  color: var(--accent-primary) !important;
}
[data-theme="cinema"] .argus-welcome__chip--product:hover {
  border-color: var(--accent-primary) !important;
  background: rgba(100, 210, 255, 0.08) !important;
  color: var(--accent-primary) !important;
}

/* ============================================================
   SIDEBAR CENTER + NEW CHAT — Instagram/TikTok pattern. The "+ New chat"
   button sits in the THIRD position of 5 (Argus · Countries · + ·
   My briefs · Settings) and visually anchors the sidebar with
   filled orange + soft glow + slight scale.
   ============================================================ */

[data-theme="cinema"] #app-shell .sidebar-section--center {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
  position: relative;
}

@media (min-width: 1025px) {
  [data-theme="cinema"] #app-shell .sidebar-new-chat--center {
    width: 52px !important;
    height: 52px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #7ddcff 0%, #64d2ff 100%) !important;
    color: var(--accent-on, #04222e) !important;
    border: none !important;
    box-shadow:
      0 0 0 4px rgba(100, 210, 255, 0.12),
      0 8px 24px -6px rgba(100, 210, 255, 0.55),
      0 2px 4px rgba(0, 0, 0, 0.2) !important;
    transition:
      transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
      box-shadow 200ms ease,
      background 200ms ease !important;
  }
  [data-theme="cinema"] #app-shell .sidebar-new-chat--center:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow:
      0 0 0 5px rgba(100, 210, 255, 0.20),
      0 14px 32px -6px rgba(100, 210, 255, 0.75),
      0 4px 8px rgba(0, 0, 0, 0.25) !important;
  }
  [data-theme="cinema"] #app-shell .sidebar-new-chat--center:active {
    transform: translateY(0) scale(0.98);
  }
  [data-theme="cinema"] #app-shell .sidebar-new-chat--center svg {
    width: 22px !important;
    height: 22px !important;
    stroke: var(--accent-on, #04222e) !important;
  }
  [data-theme="cinema"] #app-shell .sidebar-new-chat__label {
    display: none;
  }

  /* ── Equalize spacing between ALL sidebar icons ──────────────
     Default ui-components rules push --bottom (Settings) to the
     very bottom with margin-top:auto AND insert 24px+border between
     every section. On the icon-only desktop sidebar that creates a
     huge dead band above Settings + an inconsistent gap before
     My Briefs. Override so every icon is exactly 10px apart
     (matches the per-item margin: 5px auto in shell.css). ── */
  [data-theme="cinema"] #app-shell .sidebar-section + .sidebar-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
  }
  [data-theme="cinema"] #app-shell .sidebar-section--bottom {
    margin-top: 0 !important;
    padding-bottom: 0 !important;
  }
  /* Empty spacer section (News/Analysis/Markets removed) — collapse
     completely so it doesn't contribute height between center and
     workspace. */
  [data-theme="cinema"] #app-shell .sidebar-section--spacer {
    display: none !important;
  }
  /* Recent (hidden by default on icon-only) — make sure it doesn't
     reserve space when revealed. Already handled by display:none
     in shell.css line 470, but keep margin reset for completeness. */
  [data-theme="cinema"] #app-shell .sidebar-section--recent {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
  }
  /* Sidebar nav: ensure column doesn't stretch (otherwise auto-pad
     reappears). Items now sit naturally one under the other. */
  [data-theme="cinema"] #app-shell .sidebar-nav {
    justify-content: flex-start;
  }
  /* Tighten the --center section padding to match item spacing so
     the + chat sits at the same 10px rhythm as the icons above/below. */
  [data-theme="cinema"] #app-shell .sidebar-section--center {
    padding: 0 !important;
  }
}

/* ============================================================
   MOBILE BOTTOM NAV — Instagram/TikTok 5-icon with raised + at center.
   The center "+" is filled orange, larger, lifted above the bar with
   a glow halo. Other 4 items are standard ghost icons.
   ============================================================ */

[data-theme="cinema"] .mobile-bottom-nav {
  background: rgba(10, 10, 10, 0.92) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border-default) !important;
}

[data-theme="cinema"] .bottom-nav-item {
  color: var(--text-tertiary);
  transition: color 150ms ease, transform 150ms ease;
}
[data-theme="cinema"] .bottom-nav-item:hover,
[data-theme="cinema"] .bottom-nav-item.active {
  color: var(--text-primary);
}
[data-theme="cinema"] .bottom-nav-item.active svg {
  filter: drop-shadow(0 0 6px rgba(100, 210, 255, 0.5));
}

/* Center + button — the hero affordance */
[data-theme="cinema"] .bottom-nav-item--create {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #7ddcff 0%, #64d2ff 100%) !important;
  color: var(--accent-on, #04222e) !important;
  border: 3px solid rgba(10, 10, 10, 0.92) !important;
  box-shadow:
    0 0 0 1px rgba(100, 210, 255, 0.6),
    0 8px 24px -4px rgba(100, 210, 255, 0.7),
    0 4px 12px rgba(0, 0, 0, 0.35);
  margin-top: -16px;  /* raise above the nav bar — Instagram pattern */
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms ease;
}
[data-theme="cinema"] .bottom-nav-item--create:active {
  transform: scale(0.93);
}
[data-theme="cinema"] .bottom-nav-item--create svg {
  width: 24px !important;
  height: 24px !important;
  stroke: var(--accent-on, #04222e) !important;
  filter: none !important;
}
/* Subtle outer pulse so the hero button gently breathes (catches the eye
   without being distracting). 4s ease, infinite. */
@keyframes mobile-create-pulse {
  0%, 100% { box-shadow:
    0 0 0 1px rgba(100, 210, 255, 0.6),
    0 8px 24px -4px rgba(100, 210, 255, 0.7),
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 0 0 0 rgba(100, 210, 255, 0.35); }
  60% { box-shadow:
    0 0 0 1px rgba(100, 210, 255, 0.6),
    0 8px 24px -4px rgba(100, 210, 255, 0.7),
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 0 0 14px rgba(100, 210, 255, 0); }
}
[data-theme="cinema"] .bottom-nav-item--create {
  animation: mobile-create-pulse 4s ease-out infinite;
}

/* ============================================================
   MOBILE — Argus input bar visible + sticky above mobile-bottom-nav
   (issue: on <=768px the panel was scroll-down hidden; users couldn't
   chat without scrolling to the bottom of the page).
   ============================================================ */
@media (max-width: 768px) {
  [data-theme="cinema"] #app-shell .argus-panel > #argus-input-form,
  [data-theme="cinema"] #app-shell .argus-panel > form.argus-panel__input {
    position: fixed !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.625rem 0.875rem calc(0.625rem + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid var(--border-default);
    border-radius: 0 !important;
    z-index: 100;
    box-shadow: 0 -8px 24px -8px rgba(0, 0, 0, 0.4);
  }
  /* Reset the floating-pill look on mobile — sticky bar wants square corners
     edge-to-edge for thumb reach. */
  [data-theme="cinema"] #app-shell .argus-panel > form.argus-panel__input {
    box-shadow: 0 -8px 24px -8px rgba(0, 0, 0, 0.4) !important;
  }
  /* The pill inside still has rounded corners */
  [data-theme="cinema"] #app-shell .argus-panel form.argus-panel__input .argus-panel__input-field {
    flex: 1 1 auto;
  }
  /* Push the thread up so messages aren't hidden behind the sticky input */
  [data-theme="cinema"] #app-shell .argus-panel__thread {
    padding-bottom: 96px !important;
  }
  /* Hide the floater widget on mobile — sticky input occupies the bottom-right
     already; floater would overlap. Users access videos via inline cards in
     the chat thread itself. */
  [data-theme="cinema"] .argus-video-floater {
    display: none !important;
  }
}

/* ============================================================
   CRISIS VIDEO CARD — YouTube thumbnail embed (Argus get_crisis_video)
   Rendered inline within an Argus bubble via [VIDEO:id|title|channel] marker
   that argus-video.js post-processes. Click expands to youtube-nocookie iframe.
   ============================================================ */

[data-theme="cinema"] .crisis-video-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 0.875rem;
  width: 100%;
  max-width: 480px;
  margin: 0.75rem 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}
[data-theme="cinema"] .crisis-video-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 8px 20px -8px rgba(0, 0, 0, 0.5);
}
[data-theme="cinema"] .crisis-video-card:focus-visible {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}
[data-theme="cinema"] .crisis-video-card:active {
  transform: translateY(0);
}

[data-theme="cinema"] .crisis-video-card__thumb {
  position: relative;
  width: 168px;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
[data-theme="cinema"] .crisis-video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
[data-theme="cinema"] .crisis-video-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.4) 100%);
  transition: background 180ms ease;
}
[data-theme="cinema"] .crisis-video-card__play svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  transition: transform 180ms ease;
}
[data-theme="cinema"] .crisis-video-card:hover .crisis-video-card__play {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(100, 210, 255, 0.35) 100%);
}
[data-theme="cinema"] .crisis-video-card:hover .crisis-video-card__play svg {
  transform: scale(1.1);
}
[data-theme="cinema"] .crisis-video-card__source {
  position: absolute;
  bottom: 0.375rem;
  right: 0.375rem;
  padding: 0.125rem 0.4375rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
}

[data-theme="cinema"] .crisis-video-card__meta {
  padding: 0.625rem 0.875rem 0.625rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
[data-theme="cinema"] .crisis-video-card__title {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.375rem;
}
[data-theme="cinema"] .crisis-video-card__channel {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Expanded inline iframe — replaces the card in-place when clicked */
[data-theme="cinema"] .crisis-video-embed {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  margin: 0.75rem 0;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-default);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.55);
  animation: video-embed-in 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="cinema"] .crisis-video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
@keyframes video-embed-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* Mobile — stack thumb above meta */
@media (max-width: 520px) {
  [data-theme="cinema"] .crisis-video-card {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  [data-theme="cinema"] .crisis-video-card__thumb {
    width: 100%;
  }
  [data-theme="cinema"] .crisis-video-card__meta {
    padding: 0.625rem 0.875rem 0.75rem;
  }
}

/* ============================================================
   ARGUS VIDEO FLOATER — bottom-right floating glass widget that
   surfaces YouTube clips related to the current conversation.
   Renders after every Argus response when a topic is detected.
   Click → modal carousel with iframe player. (argus-video-floater.js)
   ============================================================ */

[data-theme="cinema"] .argus-video-floater {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  width: 116px;
  height: 116px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 16px 36px -10px rgba(0, 0, 0, 0.65);
  transition: transform 180ms ease, box-shadow 220ms ease, border-color 180ms ease;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--text-primary);
}
[data-theme="cinema"] .argus-video-floater[hidden] { display: none; }
[data-theme="cinema"] .argus-video-floater:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 20px 44px -12px rgba(0, 0, 0, 0.7);
}
[data-theme="cinema"] .argus-video-floater:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

[data-theme="cinema"] .argus-video-floater__thumb {
  position: relative;
  flex: 1 1 auto;
  background: #000;
  overflow: hidden;
}
[data-theme="cinema"] .argus-video-floater__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
[data-theme="cinema"] .argus-video-floater__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(100, 210, 255, 0.3) 100%);
}
[data-theme="cinema"] .argus-video-floater__play svg {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

[data-theme="cinema"] .argus-video-floater__badge {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.375rem 0;
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
[data-theme="cinema"] .argus-video-floater__count {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}
[data-theme="cinema"] .argus-video-floater__label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* Pulse animation — applied for 6s after the widget appears to
   catch the eye, then removed. Three concentric orange ring
   pulses, soft and slow (no aggressive flashing). */
@keyframes argus-floater-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(100, 210, 255, 0.55),
                     0 0 0 1px rgba(100, 210, 255, 0.18),
                     0 16px 36px -10px rgba(0, 0, 0, 0.65); }
  70%  { box-shadow: 0 0 0 16px rgba(100, 210, 255, 0),
                     0 0 0 1px rgba(100, 210, 255, 0.18),
                     0 16px 36px -10px rgba(0, 0, 0, 0.65); }
  100% { box-shadow: 0 0 0 0   rgba(100, 210, 255, 0),
                     0 0 0 1px rgba(100, 210, 255, 0.18),
                     0 16px 36px -10px rgba(0, 0, 0, 0.65); }
}
[data-theme="cinema"] .argus-video-floater--pulse {
  animation: argus-floater-pulse 2s ease-out infinite;
}

/* ============================================================
   FLOATER MODAL — glass overlay with 16:9 iframe + thumbnail strip
   ============================================================ */

[data-theme="cinema"] .argus-video-floater-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
[data-theme="cinema"] .argus-video-floater-modal[hidden] { display: none; }

[data-theme="cinema"] .argus-video-floater-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  cursor: pointer;
  animation: modal-fade-in 200ms ease;
}
@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

[data-theme="cinema"] .argus-video-floater-modal__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 880px;
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 32px 64px -16px rgba(0, 0, 0, 0.7),
    0 0 80px -16px rgba(100, 210, 255, 0.18);
  overflow: hidden;
  animation: modal-card-in 240ms cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-body);
  color: var(--text-primary);
}
@keyframes modal-card-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

[data-theme="cinema"] .argus-video-floater-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-default);
}
[data-theme="cinema"] .argus-video-floater-modal__title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
[data-theme="cinema"] .argus-video-floater-modal__close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
[data-theme="cinema"] .argus-video-floater-modal__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--border-default);
}

[data-theme="cinema"] .argus-video-floater-modal__player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
[data-theme="cinema"] .argus-video-floater-modal__iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

[data-theme="cinema"] .argus-video-floater-modal__meta {
  padding: 0.875rem 1.25rem 0.625rem;
}
[data-theme="cinema"] .argus-video-floater-modal__vtitle {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
[data-theme="cinema"] .argus-video-floater-modal__channel {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

[data-theme="cinema"] .argus-video-floater-modal__nav {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1.25rem 1rem;
}
[data-theme="cinema"] .argus-video-floater-modal__prev,
[data-theme="cinema"] .argus-video-floater-modal__next {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-default);
  border-radius: 9999px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}
[data-theme="cinema"] .argus-video-floater-modal__prev:hover,
[data-theme="cinema"] .argus-video-floater-modal__next:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
}

[data-theme="cinema"] .argus-video-floater-modal__strip {
  display: flex;
  gap: 0.5rem;
  flex: 1 1 auto;
  overflow-x: auto;
}
[data-theme="cinema"] .argus-video-floater-modal__strip::-webkit-scrollbar { height: 4px; }
[data-theme="cinema"] .argus-video-floater-modal__thumb {
  width: 104px;
  height: 58px;
  flex-shrink: 0;
  padding: 0;
  background: #000;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 150ms ease, border-color 150ms ease, transform 150ms ease;
}
[data-theme="cinema"] .argus-video-floater-modal__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
[data-theme="cinema"] .argus-video-floater-modal__thumb:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}
[data-theme="cinema"] .argus-video-floater-modal__thumb.is-active {
  opacity: 1;
  border-color: var(--accent-primary);
}

@media (max-width: 600px) {
  [data-theme="cinema"] .argus-video-floater {
    width: 96px;
    height: 96px;
    bottom: 16px;
    right: 16px;
    border-radius: 14px;
  }
  [data-theme="cinema"] .argus-video-floater__play svg { width: 22px; height: 22px; }
}

/* ── Accessibility: honour the OS "reduce motion" setting ──────────────────
   The cinema layer had ZERO reduced-motion coverage — a perpetually
   ken-burns-panning hero + 2.4s pulsing brand dots with no opt-out reads as
   a gimmick to a professional (and is a genuine a11y gap). Kill infinite
   animations and collapse transitions to near-instant; the UI stays fully
   functional, just still. State-change feedback survives as an instant swap. */
@media (prefers-reduced-motion: reduce) {
  [data-theme="cinema"] *,
  [data-theme="cinema"] *::before,
  [data-theme="cinema"] *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
