/* ============================================================================
   PILOT · PER-THEME SIGNATURES  — the "love": each system's motifs layered on the
   shared components, scoped by [data-theme]. Always on (part of the identity).
   Heavy/animated bits (blur, scanline, ticker scroll, pulses) are gated behind
   :not([data-effects="off"]) so users / low-end devices can calm them.
   ============================================================================ */

/* ══════════════════════════ MISSION DECK ══════════════════════════════════ */
/* corner brackets on named instruments · bronze warm hallmark · cyan HUD       */
[data-theme="mission"]{--bronze:#e8b96a}
[data-theme="mission"][data-mode="light"]{--bronze:#7a5f1d}

[data-theme="mission"] .card:not(.kpi),
[data-theme="mission"] .tile,
[data-theme="mission"] .prose,
[data-theme="mission"] .proc-detail,
[data-theme="mission"] .inspector,
[data-theme="mission"] .wiki-side,
[data-theme="mission"] .column{position:relative}
[data-theme="mission"] .card:not(.kpi)::before,[data-theme="mission"] .card:not(.kpi)::after,
[data-theme="mission"] .tile::before,[data-theme="mission"] .tile::after,
[data-theme="mission"] .prose::before,[data-theme="mission"] .prose::after,
[data-theme="mission"] .proc-detail::before,[data-theme="mission"] .proc-detail::after,
[data-theme="mission"] .inspector::before,[data-theme="mission"] .inspector::after,
[data-theme="mission"] .wiki-side::before,[data-theme="mission"] .wiki-side::after,
[data-theme="mission"] .column::before,[data-theme="mission"] .column::after{
  content:"";position:absolute;width:11px;height:11px;pointer-events:none;
  border:1.5px solid color-mix(in srgb,var(--brand) 55%,transparent);opacity:.75;transition:.2s}
[data-theme="mission"] .card:not(.kpi)::before,[data-theme="mission"] .tile::before,[data-theme="mission"] .prose::before,
[data-theme="mission"] .proc-detail::before,[data-theme="mission"] .inspector::before,[data-theme="mission"] .wiki-side::before,
[data-theme="mission"] .column::before{top:7px;left:7px;border-right:0;border-bottom:0}
[data-theme="mission"] .card:not(.kpi)::after,[data-theme="mission"] .tile::after,[data-theme="mission"] .prose::after,
[data-theme="mission"] .proc-detail::after,[data-theme="mission"] .inspector::after,[data-theme="mission"] .wiki-side::after,
[data-theme="mission"] .column::after{bottom:7px;right:7px;border-left:0;border-top:0}
[data-theme="mission"] .tile:hover::before,[data-theme="mission"] .tile:hover::after{opacity:1;box-shadow:0 0 8px -1px var(--brand)}
/* bronze = the scarce warm human signal: hallmark + eyebrows + voice send */
[data-theme="mission"] .brandmark .dot{background:var(--bronze);box-shadow:none;border-radius:2px;position:relative}
[data-theme="mission"] .eyebrow::before{content:"";width:14px;height:1px;background:var(--bronze)}
[data-theme="mission"] .composer .send{background:var(--bronze);color:#0b1016}
[data-theme="mission"] .ticker-line{border-left-color:var(--bronze)}
[data-theme="mission"] .ticker-line .caret{background:var(--bronze)}

/* ═════════════════════════════ NEON NIHON ═════════════════════════════════ */
/* wet-black night city · neon tubes on active · scanlines · stacked kana       */
[data-theme="neon"] .kana{display:inline;font-family:var(--font-mono);font-size:.72em;letter-spacing:.28em;color:var(--fg-faint);margin-left:.5em}
[data-theme="neon"] h1.title .kana,[data-theme="neon"] .lp h1 .kana{display:block;font-size:13px;margin:6px 0 0}
/* neon-tube glow on the single live/active element */
[data-theme="neon"] .navitem[aria-current="true"],
[data-theme="neon"] .anav-item[aria-current="true"],
[data-theme="neon"] .tab[aria-selected="true"],
[data-theme="neon"] .chip.brand,
[data-theme="neon"] .lens.live,
[data-theme="neon"] .navlink[aria-current="page"]{
  box-shadow:inset 0 0 12px color-mix(in srgb,var(--brand) 18%,transparent),0 0 10px color-mix(in srgb,var(--brand) 25%,transparent)}
[data-theme="neon"] .kpi.live .v,[data-theme="neon"] .bubble.ai em{text-shadow:0 0 8px color-mix(in srgb,var(--brand) 55%,transparent),0 0 18px color-mix(in srgb,var(--brand) 28%,transparent)}
[data-theme="neon"] .brandmark .dot{box-shadow:0 0 10px color-mix(in srgb,var(--brand) 60%,transparent)}
/* scanline overlay (city CRT) */
[data-theme="neon"]:not([data-effects="off"]) .main::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:8;
  background:repeating-linear-gradient(0deg,rgba(255,255,255,.035) 0 1px,transparent 1px 3px);mix-blend-mode:overlay}
/* urban wash behind the deck */
[data-theme="neon"] body{background:
  radial-gradient(45% 35% at 12% 0%,color-mix(in srgb,var(--brand) 14%,transparent),transparent 70%),
  radial-gradient(40% 30% at 100% 8%,color-mix(in srgb,#35f0ff 10%,transparent),transparent 70%),var(--bg)}

/* ════════════════════════════ TRADING FLOOR ══════════════════════════════ */
/* ticker tape · F-key dock · keyline density · flat, monospace                 */
[data-theme="trading"] .fkey{display:inline}
[data-theme="trading"] .ticker{display:flex}
.ticker{grid-area:top;align-items:center;height:24px;background:var(--surface-2);border-bottom:1px solid var(--line-strong);
  overflow:hidden;white-space:nowrap;font-family:var(--font-mono);font-size:11px;position:relative}
.ticker .tk-tag{background:var(--brand);color:var(--brand-on);font-weight:700;padding:0 10px;height:100%;display:inline-flex;align-items:center;letter-spacing:.14em;position:absolute;left:0;top:0;z-index:2}
.ticker .tk-track{display:inline-flex;gap:0;padding-left:120px;animation:tk 40s linear infinite}
[data-effects="off"] .ticker .tk-track{animation:none}
@keyframes tk{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.ticker .tk{padding:0 16px;border-right:1px solid var(--line);color:var(--fg-muted)}
.ticker .tk b{color:var(--fg)}.ticker .tk .up{color:var(--ok)}.ticker .tk .dn{color:var(--danger)}
/* when trading, the ticker sits between topbar and content: adjust shell rows */
[data-theme="trading"] .app{grid-template-rows:auto 24px 1fr;grid-template-areas:"top top" "tick tick" "nav main"}
[data-theme="trading"] .ticker{grid-area:tick}
/* keyline density — flat cards fenced by lines, not shadows */
[data-theme="trading"] .card,[data-theme="trading"] .tile,[data-theme="trading"] .column,
[data-theme="trading"] .proc-detail,[data-theme="trading"] .inspector,[data-theme="trading"] .prose,
[data-theme="trading"] .wiki-side,[data-theme="trading"] .admin-nav,[data-theme="trading"] .proc-list{box-shadow:none}
[data-theme="trading"] .kpis{gap:1px;background:var(--line-strong);border:1px solid var(--line-strong)}
[data-theme="trading"] .kpis .kpi{box-shadow:none;border:0}
[data-theme="trading"] .num,[data-theme="trading"] .kpi .v{font-feature-settings:"tnum" 1}
/* flash-on-update hook */
@keyframes flash{0%{background:color-mix(in srgb,var(--brand) 26%,transparent)}100%{background:transparent}}
[data-theme="trading"] .flash{animation:flash 1.4s ease-out}

/* ═════════════════════════════ AURORA GLASS ══════════════════════════════ */
/* frosted panes + blur + top light-catch · aurora ground · single glow blob    */
[data-theme="aurora"] body{background:linear-gradient(160deg,#0f1626,#0c2230) fixed}
[data-theme="aurora"][data-mode="light"] body{background:linear-gradient(160deg,#eef1f6,#e6f6ff) fixed}
[data-theme="aurora"]:not([data-effects="off"]) body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:0;
  background:
   radial-gradient(40% 34% at 16% -4%,color-mix(in srgb,var(--brand) 26%,transparent),transparent 70%),
   radial-gradient(38% 30% at 98% 4%,color-mix(in srgb,#9b7cff 20%,transparent),transparent 70%)}
[data-theme="aurora"] .app{position:relative;z-index:1;background:transparent}
[data-theme="aurora"] .topbar,[data-theme="aurora"] .nav{background:color-mix(in srgb,var(--surface) 62%,transparent)}
[data-theme="aurora"]:not([data-effects="off"]) .topbar,
[data-theme="aurora"]:not([data-effects="off"]) .nav,
[data-theme="aurora"]:not([data-effects="off"]) .card,
[data-theme="aurora"]:not([data-effects="off"]) .tile,
[data-theme="aurora"]:not([data-effects="off"]) .wiki-side,
[data-theme="aurora"]:not([data-effects="off"]) .prose,
[data-theme="aurora"]:not([data-effects="off"]) .proc-list,
[data-theme="aurora"]:not([data-effects="off"]) .proc-detail,
[data-theme="aurora"]:not([data-effects="off"]) .admin-nav,
[data-theme="aurora"]:not([data-effects="off"]) .column,
[data-theme="aurora"]:not([data-effects="off"]) .inspector,
[data-theme="aurora"]:not([data-effects="off"]) .canvas{
  background:color-mix(in srgb,var(--surface) 60%,transparent);
  -webkit-backdrop-filter:blur(20px) saturate(1.4);backdrop-filter:blur(20px) saturate(1.4)}
/* top light-catch — the luminosity signature (border OR glow, never both) */
[data-theme="aurora"] .card,[data-theme="aurora"] .tile,[data-theme="aurora"] .prose,
[data-theme="aurora"] .proc-detail,[data-theme="aurora"] .inspector,[data-theme="aurora"] .column,
[data-theme="aurora"] .wiki-side{position:relative;isolation:isolate}
[data-theme="aurora"] .card::before,[data-theme="aurora"] .tile::before,[data-theme="aurora"] .prose::before,
[data-theme="aurora"] .proc-detail::before,[data-theme="aurora"] .inspector::before,[data-theme="aurora"] .column::before,
[data-theme="aurora"] .wiki-side::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:-1;
  background:linear-gradient(180deg,rgba(255,255,255,.22),transparent 42%);
  -webkit-mask-image:linear-gradient(180deg,#000,transparent 34%);mask-image:linear-gradient(180deg,#000,transparent 34%);opacity:.6}
/* the ONE glow: behind the landing hero + the processing prompt */
[data-theme="aurora"] .lp,[data-theme="aurora"] .ticker-line{position:relative}
[data-theme="aurora"] .lp::before{content:"";position:absolute;top:-40px;left:50%;transform:translateX(-50%);width:min(520px,80%);height:280px;
  border-radius:50%;background:radial-gradient(closest-side,color-mix(in srgb,var(--brand) 45%,transparent),transparent 72%);
  filter:blur(46px);z-index:-1;pointer-events:none}

/* motif hooks hidden by default (see app.css) reveal handled per-theme above.  */
