/* Atlas: Mission Control - the production Intelligence experience (owner's approved
 * reference: the mission prototype, static/proto/mission.{css,js}). Built from those exact files:
 * the evolution layer (Mission Deck around the original orbit, command dropdown, density) plus the
 * mission layer (entrance, Nova's comm link, live ticker, guided pulses, parallax, warp, flight).
 * Loads after app.css/trade.css. All animation is gated by prefers-reduced-motion. */

/* Atlas EVOLUTION PROTOTYPE overrides.
 * The canvas, orbit, holographic components and palette are the production ones (app.css);
 * this layer only reorganizes: a denser one-screen Mission Deck for Intelligence, a command
 * dropdown on the existing search bar, Nova docked as a companion strip, tighter HUD density. */


/* ---------- density: the same HUD language, less air ---------- */
body .hud-pad{padding:14px 16px}
body .view{padding:14px 18px 96px}
body .note{font-size:11.5px}
body .divider{margin:10px 0}

/* ---------- Mission Deck: Intelligence as one screen around the orbit ---------- */
body [data-view=intel]{overflow:hidden;padding:10px 16px 86px}
.deck{display:grid;grid-template-columns:296px minmax(0,1fr) 332px;gap:14px;height:100%;min-height:0}
.deck-rail{display:flex;flex-direction:column;gap:12px;overflow:auto;min-height:0;padding:2px;scrollbar-width:thin}
.deck-center{position:relative;min-width:0;border-radius:24px;overflow:hidden}
.deck-center .intel-orbit{position:absolute;inset:0}
.deck-chips{position:absolute;z-index:5;top:12px;left:50%;transform:translateX(-50%);display:flex;gap:8px;flex-wrap:wrap;justify-content:center;pointer-events:none}
.deck-chips .pill{background:rgba(5,18,23,.72);backdrop-filter:blur(8px)}

.surge-row .pill{background:rgba(5,18,23,.5)}
.rail-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:2px 4px 0}
.rail-h b{font-family:var(--display);font-size:12px;letter-spacing:.18em;font-weight:400}

/* ranked story list: the briefing, now living beside the orbit instead of replacing it */
.brief-list{display:flex;flex-direction:column;gap:4px;padding:8px}
.brief-row{display:flex;align-items:center;gap:10px;text-align:left;padding:7px 9px;border-radius:14px;border:1px solid transparent;background:none;transition:background .2s,border-color .2s}
.brief-row:hover{background:rgba(62,230,224,.07)}
.brief-row[aria-current="true"]{background:rgba(62,230,224,.1);border-color:var(--line-hi);box-shadow:0 0 18px rgba(62,230,224,.12)}
.brief-row .rank{width:16px;text-align:right;font-size:11px;color:var(--faint)}
.brief-row .bt{min-width:0;flex:1}
.brief-row .bt b{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brief-row .bt span{font-size:11px;color:var(--muted)}
.brief-row .chev{color:var(--faint);font-size:15px}

/* evidence stream, compact */
.ev-mini{display:flex;flex-direction:column;gap:2px;padding:8px}
.ev-mini button{display:flex;gap:9px;text-align:left;padding:7px 9px;border-radius:12px;align-items:flex-start;border:0;background:none}
.ev-mini button:hover{background:rgba(62,230,224,.07)}
.ev-mini img,.ev-mini .pav{width:24px;height:24px;border-radius:50%;flex:none;background:rgba(110,235,225,.15);object-fit:cover}
.ev-mini .et{min-width:0;font-size:12px;line-height:1.45}
.ev-mini .et b{font-size:12px}
.ev-mini .et p{margin:1px 0 0;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* dossier (right rail) */
.dossier-title{margin:0;font-family:var(--display);font-size:17px;letter-spacing:.05em;line-height:1.25;font-weight:400}
.dossier p.desc{margin:6px 0 0;font-size:12.5px;color:var(--muted);line-height:1.5;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.dossier p.desc.open{display:block}
.dossier .more,.mc-more{font-size:11.5px;color:var(--cyan);padding:2px 0;margin-top:2px;border:0;background:none}
.figrow{display:grid;grid-template-columns:1fr 1fr 1fr;gap:1px;background:var(--line);border-radius:14px;overflow:hidden;border:1px solid var(--line);margin-top:10px}
.figrow div{background:rgba(5,18,23,.8);padding:8px 10px}
.figrow .k{font-size:10.5px;display:block}
.figrow b{font-size:13.5px;font-weight:600}
.deck details{border:1px solid var(--line);border-radius:16px;background:var(--glass);backdrop-filter:blur(12px)}
.deck details>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;padding:11px 15px;font-size:12px;color:var(--muted)}
.deck details>summary::after{content:"+";font-size:15px;color:var(--cyan)}
.deck details[open]>summary::after{content:"–"}
.deck details>summary:hover{color:var(--text)}
.deck details .hud{border:0;background:none;backdrop-filter:none}
.deck details .hud-pad{padding:0 15px 13px}
.deck .ntl-wrap{padding:10px 14px 8px}
.deck .ntl-wrap canvas{height:120px}

/* ---------- command dropdown on the existing search bar ---------- */
.cmdpal{position:absolute;z-index:80;top:calc(100% + 8px);left:0;right:0;max-height:48vh;overflow:auto;padding:6px;display:none}
.cmdpal.on{display:block}
.cmdpal .group{font-size:10.5px;letter-spacing:.14em;color:var(--faint);padding:8px 10px 3px}
.cmdpal .crow{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:8px 10px;border-radius:12px;font-size:13px}
.cmdpal .crow[aria-selected="true"],.cmdpal .crow:hover{background:rgba(62,230,224,.12)}
.cmdpal .crow .k{margin-left:auto;flex:none}
.cmdpal kbd{font-size:10px;color:var(--faint);border:1px solid var(--line);border-radius:5px;padding:0 5px}

/* responsive: the deck stacks below 1120px, orbit stays the hero */
@media (max-width:1120px){
  body [data-view=intel]{overflow:auto}
  .deck{display:flex;flex-direction:column;height:auto}
  .deck-center{order:-1;min-height:480px}
  .deck-rail{overflow:visible}
}

/* the full Nova panel rises from the docked strip instead of the old corner badge */
body .nova-panel{right:auto;left:16px;bottom:calc(78px + env(safe-area-inset-bottom,0px))}
body.nova-sheet .nova-panel{right:auto}

/* Atlas MISSION CONTROL PROTOTYPE - the wow layer.
 * Loaded on top of app.css + evolution.css. The canvas, orbit, artwork and HUD language are the
 * production ones; this file adds the choreography: an entrance sequence, Nova's holographic comm
 * link, a live status ticker, guided-attention pulses, pointer parallax and warp transitions.
 * Every animation is disabled under prefers-reduced-motion. */

/* ---------- entrance choreography (body.arrive lasts ~2.6s; the page is interactive throughout) ---------- */
@media not (prefers-reduced-motion: reduce){
  body.arrive .deck-rail:not(.dossier){animation:mcFromL .8s cubic-bezier(.2,.8,.2,1) .45s backwards}
  body.arrive .dossier{animation:mcFromR .8s cubic-bezier(.2,.8,.2,1) .6s backwards}
  body.arrive .deck-center{animation:mcBloom 1.1s cubic-bezier(.25,.9,.25,1) .1s backwards}
  body.arrive .sat{animation:mcPop .55s cubic-bezier(.2,.9,.3,1.4) backwards}
  body.arrive .sat:nth-child(1){animation-delay:.9s}body.arrive .sat:nth-child(2){animation-delay:.97s}
  body.arrive .sat:nth-child(3){animation-delay:1.04s}body.arrive .sat:nth-child(4){animation-delay:1.11s}
  body.arrive .sat:nth-child(5){animation-delay:1.18s}body.arrive .sat:nth-child(6){animation-delay:1.25s}
  body.arrive .sat:nth-child(7){animation-delay:1.32s}body.arrive .sat:nth-child(8){animation-delay:1.39s}
  body.arrive .sat:nth-child(9){animation-delay:1.46s}body.arrive .sat:nth-child(10){animation-delay:1.53s}
  body.arrive .sat:nth-child(11){animation-delay:1.6s}body.arrive .sat:nth-child(12){animation-delay:1.67s}
  body.arrive .comm{animation:mcMaterialize 1s steps(12) 1.2s backwards}
  body.arrive .mc-ticker{animation:mcFromB .7s cubic-bezier(.2,.8,.2,1) .9s backwards}
}
@keyframes mcFromL{from{opacity:0;transform:translateX(-36px);filter:blur(5px)}to{opacity:1;transform:none;filter:none}}
@keyframes mcFromR{from{opacity:0;transform:translateX(36px);filter:blur(5px)}to{opacity:1;transform:none;filter:none}}
@keyframes mcFromB{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes mcBloom{from{opacity:0;transform:scale(1.06);filter:brightness(2.2) blur(8px)}60%{filter:brightness(1.25) blur(1px)}to{opacity:1;transform:none;filter:none}}
@keyframes mcPop{from{opacity:0;transform:scale(.3)}to{opacity:1}}
@keyframes mcMaterialize{from{opacity:0;filter:brightness(3)}to{opacity:1;filter:none}}

/* hero title: the top discovery announces itself, then hands the stage back */
.mc-hero{position:fixed;inset:0;z-index:55;display:grid;place-items:center;pointer-events:none;text-align:center}
.mc-hero .mh-k{font-size:12px;letter-spacing:.5em;color:var(--cyan);margin-bottom:12px;text-transform:uppercase}
.mc-hero .mh-t{font-family:var(--display);font-size:clamp(26px,4.6vw,54px);letter-spacing:.08em;color:var(--text);
  text-shadow:0 0 40px rgba(62,230,224,.55),0 0 120px rgba(62,230,224,.3)}
.mc-hero .mh-s{margin-top:12px;font-size:13px;color:var(--muted)}
.mc-hero{animation:mcHero 2.5s cubic-bezier(.3,.8,.3,1) forwards}
@keyframes mcHero{0%{opacity:0;transform:scale(1.12);filter:blur(10px)}14%{opacity:1;filter:none;transform:scale(1.02)}72%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.92);filter:blur(4px)}}
@media (prefers-reduced-motion: reduce){.mc-hero{display:none}}

/* ---------- Nova's holographic comm link ---------- */
body .nova-dock{display:none}            /* the comm display replaces the pill strip */
.comm{position:fixed;z-index:36;left:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));width:min(440px,calc(100vw - 32px));
  --glow:#3EE6E0;border-radius:18px;border:1px solid var(--line-hi);background:linear-gradient(165deg,rgba(8,30,36,.88),rgba(5,16,21,.92));
  backdrop-filter:blur(16px);box-shadow:0 18px 60px rgba(0,0,0,.55),inset 0 0 40px rgba(62,230,224,.05);overflow:hidden}
.comm .hc{position:absolute;width:12px;height:12px;border:1.5px solid var(--glow);opacity:.8;pointer-events:none}
.comm .hc.tl{top:5px;left:5px;border-right:0;border-bottom:0}.comm .hc.tr{top:5px;right:5px;border-left:0;border-bottom:0}
.comm .hc.bl{bottom:5px;left:5px;border-right:0;border-top:0}.comm .hc.br{bottom:5px;right:5px;border-left:0;border-top:0}
.comm-scan{position:absolute;inset:0;pointer-events:none;opacity:.5;
  background:repeating-linear-gradient(0deg,rgba(140,255,230,.045) 0 1px,transparent 1px 3px)}
@media not (prefers-reduced-motion: reduce){
  .comm-scan::after{content:"";position:absolute;left:0;right:0;height:46px;top:-50px;
    background:linear-gradient(180deg,transparent,rgba(140,255,230,.09),transparent);animation:mcScan 7s linear infinite}
}
@keyframes mcScan{to{transform:translateY(130vh)}}
.comm-head{display:flex;align-items:center;gap:8px;padding:9px 14px 7px;font-size:10.5px;letter-spacing:.22em;color:var(--cyan)}
.comm-head .dotl{width:7px;height:7px;border-radius:50%;background:var(--mint);box-shadow:0 0 10px var(--mint);animation:pulse 2s infinite}
.comm-head .ctx{margin-left:auto;letter-spacing:.04em;color:var(--muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46%}
.comm-body{display:flex;gap:12px;padding:2px 14px 12px;align-items:flex-start}
.comm-body>img{width:84px;height:84px;flex:none;border-radius:14px;object-fit:cover;object-position:50% 0;border:1px solid var(--line-hi);
  box-shadow:0 0 26px rgba(62,230,224,.3),inset 0 0 14px rgba(62,230,224,.12);background:rgba(6,22,28,.8)}
.comm-text{min-width:0;flex:1}
.meta-fit{color:var(--cyan);letter-spacing:.02em}
.hot-now{color:var(--mint);border-color:rgba(140,255,201,.45);gap:6px}
.comm-text p{margin:2px 0 0;font-size:12.5px;line-height:1.55;min-height:3.2em}
.comm-text p .caret{display:inline-block;width:7px;height:12px;background:var(--cyan);margin-left:2px;vertical-align:-1px;animation:pulse 1s infinite}
.comm-chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.comm-chips button{border:1px solid var(--line);background:none;border-radius:999px;padding:3px 11px;font-size:11.5px;color:var(--muted);transition:color .2s,border-color .2s,box-shadow .2s}
.comm-chips button:hover{color:var(--text);border-color:var(--line-hi);box-shadow:0 0 12px rgba(62,230,224,.22)}
.comm-foot{padding:0 14px 9px;font-size:10px;color:var(--faint)}
body .nova-panel{right:auto;left:16px;bottom:calc(150px + env(safe-area-inset-bottom,0px))}
/* keep the left rail's tail clickable above the comm display */
body .deck-rail:not(.dossier){padding-bottom:140px}
@media (max-width:1120px){.comm{width:min(380px,calc(100vw - 32px))}}
/* A modal window (Launch Bay, trade) owns the screen: the comm panel (z 36) would otherwise sit on top of it. */
body:has(.sheet.on[aria-modal="true"]) .comm{display:none}

/* ---------- live status ticker across the stage ---------- */
.mc-ticker{position:absolute;z-index:6;left:50%;bottom:12px;transform:translateX(-50%);display:flex;align-items:center;gap:14px;
  padding:7px 16px;border-radius:999px;border:1px solid var(--line);background:rgba(5,18,23,.74);backdrop-filter:blur(10px);
  font-size:11.5px;color:var(--muted);white-space:nowrap;max-width:calc(100% - 40px);overflow:hidden}
.mc-ticker .dotl{width:7px;height:7px;border-radius:50%;background:var(--mint);box-shadow:0 0 9px var(--mint);flex:none;animation:pulse 2s infinite}
.mc-ticker b{color:var(--text);font-weight:600}
.mc-ticker .sep{color:var(--faint)}

/* ---------- guided attention: Nova points, the interface answers ---------- */
.mc-guide{animation:mcGuide 1.1s ease-out 2}
@keyframes mcGuide{0%,100%{box-shadow:0 0 0 0 rgba(62,230,224,0)}35%{box-shadow:0 0 0 4px rgba(62,230,224,.35),0 0 34px rgba(62,230,224,.5)}}
.sat.mc-guide .orbm,.sat.mc-guide{filter:drop-shadow(0 0 18px rgba(62,230,224,.9))}
@media (prefers-reduced-motion: reduce){.mc-guide{animation:none;outline:2px solid var(--cyan);outline-offset:2px}}

/* ---------- depth: pointer parallax layers (transforms are set by JS; this only smooths them) ---------- */
.deck-center .banner{transition:transform .35s cubic-bezier(.2,.8,.2,1);will-change:transform}
.deck-center .intel-orbit{transition:transform .45s cubic-bezier(.2,.8,.2,1)}
@media (prefers-reduced-motion: reduce){.deck-center .banner,.deck-center .intel-orbit{transition:none}}

/* ---------- warp: moving between screens is one camera move, not a swap ---------- */
@media not (prefers-reduced-motion: reduce){
  #stage.mc-warp .view.active{animation:mcWarp .55s cubic-bezier(.25,.9,.25,1)}
}
@keyframes mcWarp{0%{opacity:0;transform:scale(1.05);filter:blur(7px) brightness(1.6)}60%{filter:blur(0) brightness(1.1)}100%{opacity:1;transform:none;filter:none}}

/* token flight: the investigated token's art travels to the investigation sheet */
.mc-flyer{position:fixed;z-index:65;pointer-events:none;border-radius:50%;overflow:hidden;
  box-shadow:0 0 30px rgba(62,230,224,.6);transition:all .55s cubic-bezier(.3,.9,.3,1)}
.mc-flyer img,.mc-flyer svg{width:100%;height:100%;object-fit:cover;display:block}

/* satellites breathe a little more on hover; selection feels physical */
.sat:hover .orbm,.sat:hover .stack{filter:drop-shadow(0 0 16px rgba(62,230,224,.7))}
.brief-row:hover .chev{color:var(--cyan)}

/* phones: Nova's comm link sits above the dock instead of covering it, and starts out of the way */
@media (max-width:760px){
  .comm{bottom:calc(84px + env(safe-area-inset-bottom,0px));width:calc(100vw - 24px)}
  body .nova-panel{left:12px;right:12px;width:auto;bottom:calc(240px + env(safe-area-inset-bottom,0px))}
  /* a phone has no room for the comm link on top of an open token panel, or next to the full Atlas panel */
  body.nova-sheet .comm,body.atlas-up .comm{display:none}
  /* nor over the Studio, where it covered the coin preview and the AI buttons (Atlas stays one tap away) */
  body:has([data-view=studio].active) .comm{display:none}

  /* 2026-10-15 mobile declutter (owner: "the whole app feels really crowded, especially intelligence").
   * The comm link becomes a slim strip: no portrait or footnote, two lines of text, one scrolling row of chips,
   * and a close button. While it shows, it stands in for the Atlas badge (its chips open the full panel). */
  .comm-body>img,.comm-foot{display:none}
  .comm-body{padding:0 12px 10px}
  .comm-head{padding:8px 10px 4px 12px}
  .comm-text p{min-height:0;font-size:12px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .comm-chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-top:6px}
  .comm-chips::-webkit-scrollbar{display:none}
  .comm-chips button{flex:none;white-space:nowrap}
  .comm-x{display:grid;place-items:center;flex:none;width:28px;height:28px;margin:-4px -4px -4px 0;border-radius:50%;border:0;background:none;color:var(--muted)}
  .comm-x svg{width:14px;height:14px}
  body.comm-off .comm{display:none}
  body:not(.comm-off):not(.nova-sheet):not(:has([data-view=studio].active)) .nova-badge{display:none}
  body:not(.comm-off) .view{padding-bottom:calc(200px + env(safe-area-inset-bottom,0px))}

  /* Intelligence in one column: orbit, short story list, the focused story, then the market lists */
  .deck-phone .deck-center{order:-2;min-height:440px}
  /* over the orbit: the follow/hottest and tier badges only, and no ticker on the story card (the feed pill says it) */
  .deck-phone .deck-chips>:nth-child(n+3){display:none}
  .deck-phone .mc-ticker{display:none}
  .deck-phone .dossier p.desc{-webkit-line-clamp:3}
  .deck-phone .deck-rail:not(.dossier):not(.deck-market){order:-1}
  .deck-phone .deck-rail:not(.dossier){padding-bottom:0}
  .deck-phone .dossier{order:0}
  .deck-phone .deck-market{order:1}
  .deck-phone .figrow{grid-template-columns:1fr 1fr 1fr}
  .deck-phone details.hud>summary{font-size:11px;letter-spacing:.14em}
  .deck-phone details.hud .ev-mini{padding-top:0}
  .mc-more{display:block;width:100%;text-align:center;padding:8px 0 4px}
  /* surging pills scroll sideways in one row instead of wrapping into a tall block */
  .deck-market .surge-row{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none}
  .deck-market .surge-row::-webkit-scrollbar{display:none}
  .deck-market .surge-row .pill{flex:none}
}
@media (min-width:761px){.comm-x{display:none}}
.paused-note{margin:2px 0 8px;padding:10px 12px;border-radius:14px;border:1px solid rgba(255,182,92,.4);background:rgba(255,182,92,.08);
  color:var(--muted);font-size:12px;line-height:1.5}
.paused-note b{color:var(--warn)}
