/* Nasalis Flow Studio — "Konsol" shell. Used only by lab.html.
   studio.css and index.html are untouched; the two shells run side by side. */

:root{
  color-scheme: dark;
  --bg:#07110f; --panel:#0c1a18; --sink:#050d0c; --line:#17302c; --line-2:#21443e;
  --text:#e6f2ef; --muted:#8aa9a3; --dim:#6d8a85; --faint:#52706b;
  --gold:#2fe3bf; --open:#7fd8c6; --rec:#e0556b;
  --serif:"Fraunces",Georgia,serif;
  --sans:"Geist",system-ui,-apple-system,sans-serif;
  --mono:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --top:46px;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{background:var(--bg);color:var(--text);font:13px/1.55 var(--sans);
  display:flex;flex-direction:column;overflow:hidden}
img{display:block;max-width:100%}
:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
[hidden]{display:none!important}
.skip{position:absolute;left:-9999px}
.skip:focus{left:8px;top:8px;z-index:9;background:var(--gold);color:#17130c;padding:8px 12px;border-radius:6px}
.eyebrow{font:400 10px/1 var(--mono);letter-spacing:.18em;text-transform:uppercase;color:var(--dim)}
.gold{color:var(--gold)}
.muted{color:var(--muted)}

/* ---------- top bar ---------- */
.top{flex:none;height:var(--top);display:flex;align-items:center;gap:16px;padding:0 14px;
  border-bottom:1px solid var(--line);background:var(--panel)}
.brand{display:flex;align-items:baseline;gap:8px;text-decoration:none;color:var(--text)}
.brand-name{font:400 15px/1 var(--serif)}
.brand-tag{font:400 9px/1 var(--mono);letter-spacing:.2em;color:var(--dim)}
.top-links{display:flex;gap:16px;margin-left:auto}
.top-links a{font:400 12px/1 var(--sans);color:var(--muted);text-decoration:none;transition:color .14s ease}
.top-links a:hover{color:var(--text)}
.btn{font:500 12px/1 var(--sans);display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:1px solid var(--line);border-radius:6px;padding:8px 13px;cursor:pointer;
  background:#1b1a17;color:var(--muted);text-decoration:none;
  transition:background .14s ease,color .14s ease,border-color .14s ease}
.btn:hover{color:var(--text);border-color:var(--line-2)}
.btn-gold{background:var(--gold);color:#17130c;border-color:var(--gold)}
.btn-gold:hover{background:#45ead0;color:#04120f}
.btn-light{background:#221f1a;color:var(--text);border-color:var(--line-2)}
.btn-ghost{background:transparent}

/* ---------- shell ---------- */
.shell{flex:1 1 auto;min-height:0;display:flex}

/* rail: every tool visible at once */
.rail{flex:none;width:178px;border-right:1px solid var(--line);background:var(--panel);
  display:flex;flex-direction:column;padding:10px 0;overflow-y:auto}
.rail>.eyebrow{padding:4px 14px 8px}
.tool-list{list-style:none;margin:0;padding:0}
@keyframes rise{from{opacity:0;transform:translateY(6px)}}
.tool-list li{animation:rise .45s cubic-bezier(.2,.7,.2,1) both}
.tool-list li:nth-child(1){animation-delay:.02s}
.tool-list li:nth-child(2){animation-delay:.06s}
.tool-list li:nth-child(3){animation-delay:.10s}
.tool-list li:nth-child(4){animation-delay:.14s}
.tool-list li:nth-child(5){animation-delay:.18s}
.tool-list li:nth-child(6){animation-delay:.22s}
.tool-list li:nth-child(7){animation-delay:.26s}
.tool-list li:nth-child(8){animation-delay:.30s}
.tool-list li:nth-child(9){animation-delay:.34s}
.tool-list li:nth-child(10){animation-delay:.38s}
.tool-list li:nth-child(n+11){animation-delay:.42s}
.tool-btn{position:relative;display:flex;align-items:center;gap:9px;width:100%;text-align:left;cursor:pointer;
  font:400 12px/1.25 var(--sans);color:var(--muted);background:none;border:0;padding:8px 14px;
  transition:background .12s ease,color .12s ease,padding-left .16s cubic-bezier(.4,.05,.2,1)}
.tool-btn:hover{background:#11231f;color:var(--text);padding-left:17px}
.tool-btn[aria-current="page"]{background:#11231f;color:var(--text);padding-left:14px}
@keyframes rail{from{transform:scaleY(0);opacity:0}}
.tool-btn[aria-current="page"]::before{content:"";position:absolute;left:0;top:5px;bottom:5px;width:2px;
  background:var(--gold);border-radius:2px;animation:rail .3s cubic-bezier(.2,.7,.2,1) both}
.tool-btn .num{flex:none;width:16px;font:400 10px/1 var(--mono);color:var(--faint)}
.tool-btn[aria-current="page"] .num{color:var(--gold)}
.tool-btn .label{flex:1;min-width:0}
.tool-btn .dot,.legend .dot{flex:none;width:6px;height:6px;border-radius:50%;display:inline-block}
.dot-open{background:var(--open)}
.dot-holder{background:var(--gold)}
@keyframes pulse{50%{opacity:.26}}
.tool-btn[aria-current="page"] .dot-open{animation:pulse 2.6s ease-in-out infinite}
.legend{margin:auto 14px 4px;font:400 10px/1.8 var(--mono);color:var(--faint)}
.legend .dot{margin-right:6px}

/* ---------- stage ---------- */
.stage{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;outline:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E")}
/* One line, one clear order: the name first, what it does next, the access note
   last and quiet. The rail already shows the number and the holder dot, so the
   meta no longer needs gold or wide tracking to be found. */
.head{flex:none;display:flex;align-items:center;gap:16px;padding:11px 16px;border-bottom:1px solid var(--line)}
.ttl{flex:1;min-width:0;display:flex;align-items:baseline;gap:13px}
.ttl h1{order:0;flex:none;margin:0;font:400 21px/1.25 var(--serif);letter-spacing:-.012em}
.ttl #toolDesc{order:1;flex:1 1 auto;margin:0;min-width:0;
  font-size:12.5px;line-height:1.5;color:var(--muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ttl #toolMeta{order:2;flex:none;color:var(--dim);font-size:9.5px;letter-spacing:.13em}
/* A two-part tool (Remix & Radio) turns its own title into the switch: both
   halves stay the title, the chosen one is lit, the other waits. */
.ttl h1 .titlepick{font:inherit;color:var(--dim);background:none;border:0;padding:0;
  cursor:pointer;transition:color .14s ease}
.ttl h1 .titlepick:hover{color:var(--muted)}
.ttl h1 .titlepick[aria-pressed="true"]{color:var(--text)}
.ttl h1 .titlesep{color:var(--line-2)}
.act{flex:none;display:flex;gap:8px}

/* the work holds the first screen; the reference sits one short scroll below it */
.scroll{flex:1 1 auto;min-height:0;overflow-y:auto}
.main{height:100%;min-height:430px;display:flex}
.frame{flex:1 1 auto;min-width:0;position:relative;background:var(--sink);overflow:auto}
@keyframes fade{from{opacity:0}}
.frame iframe{display:block;width:100%;border:0;background:var(--sink);
  animation:fade .22s ease both}
/* On a wide screen the frame decides the height, not the tool: studio.js sets
   an inline height from the tool's own content, and !important overrides it so
   the iframe is exactly as tall as the frame and 100vh inside a tool means
   "the screen it sits in". Only from 901px up, though — below that the frame
   has no height of its own to measure against, so height:100% collapses the
   iframe and leaves the rest of the frame showing as black. There the tool's
   reported height is the right answer and must be allowed to win. */
@media (min-width:901px){
  .frame iframe{height:100%!important}
}
.frame iframe[hidden]{display:none}
@keyframes breathe{50%{opacity:.45}}
.loading{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;
  color:var(--dim);font:400 12px/1 var(--mono);animation:breathe 1.6s ease-in-out infinite}
.lock,.soon{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:13px;text-align:center;padding:26px;background:rgba(11,11,10,.93)}
.lock p,.soon p{margin:0;max-width:46ch;color:var(--muted);font-size:13px}
.soon img{max-width:240px;border:1px solid var(--line);border-radius:6px}
.soon-text{display:flex;flex-direction:column;gap:9px;align-items:center}
.loading[hidden],.lock[hidden],.soon[hidden],.mine[hidden],.details[hidden]{display:none}

/* ---------- readouts: everything on one surface, no scrolling for the work ---------- */
.side{flex:none;width:234px;border-left:1px solid var(--line);display:flex;flex-direction:column;overflow-y:auto}
/* nothing to show (no wallet, no collection): give the width back to the work */
.side:not(:has(> :not([hidden]))){display:none}
.grp{padding:12px 14px;border-bottom:1px solid var(--line)}
.grp>.eyebrow{display:block;margin-bottom:9px}
.kv{display:flex;justify-content:space-between;gap:10px;
  font:400 11px/1.95 var(--mono);color:var(--muted);font-variant-numeric:tabular-nums}
.kv s{text-decoration:none;color:var(--faint)}
.kv b{font-weight:500;color:var(--text)}
.details{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px 26px;
  padding:20px 16px 28px;border-top:1px solid var(--line);background:var(--bg)}
@media (max-width:1100px){.details{grid-template-columns:repeat(2,minmax(0,1fr))}}
.d-col{padding:0}
.d-col>.eyebrow{display:block;margin-bottom:9px}
.details p,.details li{margin:0;font-size:12.5px;line-height:1.62;color:var(--text)}
.steps{margin:0;padding-left:15px;display:grid;gap:6px}
.mine-list{display:flex;flex-wrap:wrap;gap:6px}
.mine-list img{border-radius:4px}

/* ---------- transport: fed by the tool itself, not decoration ---------- */
.foot{flex:none;height:50px;display:flex;align-items:center;gap:14px;padding:0 16px;
  border-top:1px solid var(--line);background:var(--panel)}
.rec{flex:none;width:9px;height:9px;border-radius:50%;background:#16312c;transition:background .2s ease}
.foot[data-live="on"] .rec{background:var(--open);animation:pulse 2s ease-in-out infinite}
.foot[data-rec="on"] .rec{background:var(--rec);animation:pulse 1s ease-in-out infinite}
.time{flex:none;font:400 11px/1 var(--mono);color:var(--muted);font-variant-numeric:tabular-nums}
.foot[data-live="off"] .time{color:var(--faint)}
.track{position:relative;flex:none;width:180px;height:3px;background:#112a26;border-radius:2px;overflow:hidden}
.track i{position:absolute;left:0;top:0;bottom:0;width:0;background:var(--gold)}
.wave{flex:1;min-width:0;display:flex;align-items:flex-end;gap:2px;height:24px;overflow:hidden;
  opacity:.22;transition:opacity .25s ease}
.foot[data-live="on"] .wave{opacity:1}
@keyframes bob{to{transform:scaleY(1)}}
.wave i{flex:1;height:100%;background:var(--gold);opacity:.5;transform-origin:bottom;transform:scaleY(.14)}
.foot[data-live="on"] .wave i{animation:bob 1.1s ease-in-out infinite alternate}
.tmeta{flex:none;font:400 10px/1 var(--mono);letter-spacing:.1em;color:var(--dim);font-variant-numeric:tabular-nums}

/* ---------- narrow screens: the console stacks and the page may scroll ---------- */
@media (max-width:900px){
  html,body{height:auto}
  body{overflow:auto}
  .scroll{overflow:visible}
  .main{height:auto}
  .details{grid-template-columns:1fr;padding:16px 14px 22px}
  .shell{flex-direction:column}
  /* On a phone the rail becomes a strip you swipe sideways. Stacked as a
     list it is twelve rows tall, which pushes the tool itself off screen
     before you have even seen it. */
  .rail{width:100%;border-right:0;border-bottom:1px solid var(--line);
    position:sticky;top:0;z-index:5;background:var(--panel)}
  .rail>.eyebrow{display:none}
  .tool-list{display:flex;gap:8px;padding:9px 12px;overflow-x:auto;overflow-y:hidden;
    scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;
    scrollbar-width:none}
  .tool-list::-webkit-scrollbar{display:none}
  .tool-list li{flex:none;scroll-snap-align:center;animation:none}
  .tool-btn{width:auto;white-space:nowrap;gap:7px;padding:8px 11px;
    border:1px solid var(--line);border-radius:6px;background:var(--bg)}
  .tool-btn:hover{padding-left:11px;background:var(--bg)}
  .tool-btn[aria-current="page"]{padding-left:11px;color:var(--text);
    background:#11231f;border-color:var(--line-2)}
  .tool-btn[aria-current="page"]::before{display:none}
  .tool-btn .num{display:none}        /* the number is in the line below the strip */
  .tool-btn .label{flex:none}
  .legend{display:none}
  .main{flex-direction:column}
  .frame{min-height:420px;overflow:visible}   /* the tool sizes itself; no box inside a box */
  .side{width:100%;border-left:0;border-top:1px solid var(--line)}
  .ttl{flex-wrap:wrap}
  .ttl #toolDesc{white-space:normal;flex-basis:100%}
  .track{width:92px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}
