/* Startiup Idea Computer. Base = the approved v2 mockup (_ref/design-v2/index.html) verbatim;
   additions for real behaviour are at the bottom. */
/* Layout: the whole site is one phosphor terminal. Header, screen, info and footer all live on the same tube; a power switch boots it. Deliberately single dark look. */
/* One master size: 16px on laptops and phones, then grows with the screen (about 1.8x at 2560x1440, 2.7x at 4K),
   capped by the screen height too, so wide-but-short (ultra-wide) monitors do not get oversized.
   Everything else is in rem, so the whole computer scales together. [ - ] [ + ] set --zoom. */
html{font-size:calc(clamp(16px, min(calc(1.143vw - 0.457px), 2vh), 44px) * var(--zoom, 1))}
:root{
  --screen:#061209;         /* tube ground, the whole page */
  --void:#020503;           /* switched-off tube */
  --phos:#4BFF84;           /* phosphor green */
  --phos-dim:#2FA858;       /* secondary text */
  --rgb:75,255,132;          /* --phos as r,g,b, for glows and tints */
  --tint:30,90,50;           /* tube glow behind the glass */
  --deep:3,8,5;              /* darkest tone of the tube */
  --phos-faint:rgba(var(--rgb),.14);
  --rule:rgba(var(--rgb),.22);
  --glass:rgba(var(--deep),.8);
  --err:var(--phos);          /* messages stay in the tube colour: the tube has no other colour */
  --term:"VT323","Courier New",ui-monospace,monospace;
  color-scheme:dark;
}
/* Tube colour: green (default), orange (amber phosphor) or monochrome (white phosphor). Set on <html data-tube>. */
html[data-tube="amber"]{--screen:#110800;--void:#050300;--phos:#FFB000;--phos-dim:#F0A500;--rgb:255,176,0;--tint:110,70,0;--deep:8,5,0}
/* IBM amber (P3) phosphor: #FFB000 with a warm 6px bloom; secondary text is bright amber, not brown. */
html[data-tube="amber"] body{text-shadow:0 0 0.375rem rgba(var(--rgb),.6),0 0 1px rgba(var(--rgb),.9)}
html[data-tube="mono"]{--screen:#0B0B0B;--void:#030303;--phos:#F2F2F2;--phos-dim:#DADADA;--rgb:242,242,242;--tint:70,70,70;--deep:5,5,5}
/* Paper-white phosphor: bright text with a soft bloom, the same white everywhere (secondary text is not grey). */
html[data-tube="mono"] body{text-shadow:0 0 0.375rem rgba(var(--rgb),.55),0 0 1px rgba(var(--rgb),.9)}

*{box-sizing:border-box;border-radius:0}
html,body{height:100%}
body{margin:0;background:var(--screen);color:var(--phos);font:1.3125rem/1.25 var(--term);text-shadow:0 0 0.3125rem rgba(var(--rgb),.5),0 0 1px rgba(var(--rgb),.9);overflow-x:hidden}
button,input{font:inherit;color:inherit;text-shadow:inherit}
a{color:inherit}
::selection{background:var(--phos);color:var(--void)}
:focus-visible{outline:1px dashed var(--phos);outline-offset:0.1875rem}
/* The computer writes in capitals. The logo and anything the user typed keep their own case (.u = user text). */
#tube,.modal,.power,#cookieNote{text-transform:uppercase}
/* Browsers stop buttons inheriting text style: make them follow the capitals too. */
#tube button,.modal button,.power button,#cookieNote button{text-transform:inherit}
.logo,input,textarea,.u,#vwUrl{text-transform:none}
input::placeholder,textarea::placeholder{text-transform:uppercase}

/* tube effects, fixed over the whole page */
body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:40;background:repeating-linear-gradient(to bottom,rgba(0,0,0,0) 0,rgba(0,0,0,0) 0.125rem,rgba(0,0,0,.24) 0.1875rem)}
body::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:41;background:radial-gradient(ellipse at 50% 40%,rgba(var(--tint),.18) 0%,rgba(0,0,0,0) 55%,rgba(0,0,0,.55) 100%)}
@media (prefers-reduced-motion:no-preference){#tube{animation:flick 7s infinite steps(1)}}
@keyframes flick{0%,100%{opacity:1}47%{opacity:.965}48%{opacity:1}83%{opacity:.985}}
#tube.on{animation:crtOn 1.1s cubic-bezier(.2,.7,.2,1) both}
#tube.flash{animation:crtFlash .9s cubic-bezier(.2,.7,.2,1) both}
#tube.off{animation:crtOff .75s cubic-bezier(.5,0,.8,.4) both}
@keyframes crtOff{0%{transform:none;filter:none;opacity:1}35%{transform:scale(1,.004);filter:brightness(6);opacity:1}70%{transform:scale(.01,.004);filter:brightness(9);opacity:1}100%{transform:scale(0,0);opacity:0}}
@keyframes crtOn{0%{transform:scale(.2,.002);filter:brightness(8)}30%{transform:scale(1,.003);filter:brightness(7)}62%{transform:scale(1,1.02);filter:brightness(2.4)}100%{transform:none;filter:none}}
@keyframes crtFlash{0%{filter:brightness(1)}12%{filter:brightness(5)}30%{transform:scale(1,.003);filter:brightness(7)}52%{transform:scale(.15,.002);filter:brightness(8)}62%{transform:scale(1,.003);filter:brightness(6)}82%{transform:scale(1,1.02);filter:brightness(2)}100%{transform:none;filter:none}}
.pre{visibility:hidden}

/* power switch */
.power{position:fixed;inset:0;z-index:50;background:var(--void);display:flex;align-items:center;justify-content:center;padding:1.5rem;text-align:center}
.power .inner{display:grid;gap:1.125rem;justify-items:center;max-width:34ch;transition:opacity 1.2s ease}
.power.dark .inner{opacity:0;pointer-events:none}
.power .dim{color:var(--phos-dim)}
.led{display:inline-block;width:0.625rem;height:0.625rem;background:#3B1A06;box-shadow:0 0 0 1px #5a2b0b;vertical-align:middle;margin-right:0.5rem}
.switch{background:none;border:1px solid var(--phos);padding:0.75rem 1.375rem;font-size:1.75rem;cursor:pointer}
.switch:hover,.switch:focus-visible{background:var(--phos);color:var(--void);text-shadow:none;outline:none}
.quiet{background:none;border:0;color:var(--phos-dim);cursor:pointer;text-decoration:underline;text-underline-offset:0.25rem;font-size:1.125rem}

/* header bar, part of the terminal */
.bar{display:flex;align-items:center;justify-content:space-between;gap:0.625rem 1.125rem;padding-inline:clamp(1rem,3vw,2rem);padding-block:0.875rem;border-bottom:1px dashed var(--rule);flex-wrap:wrap}
.logo{font-size:1.75rem;white-space:nowrap;text-decoration:none;letter-spacing:.02em}
/* start/i/up wordmark, as the brand logo: dimmer slashes, and the i drawn in the background colour on a solid block
   of the theme colour (green, white or amber). Steady, never blinking. */
.logo .sl{color:var(--phos-dim)}
.logo .li{display:inline-block;background:var(--phos);color:var(--void);text-shadow:none;padding:0 .12em;margin:0 .04em;box-shadow:0 0 0.375rem rgba(var(--rgb),.8)}
#logoTxt .hid{visibility:hidden}
nav.grp{display:flex;align-items:center;gap:0.25rem 0.875rem;flex-wrap:wrap}
.tb{background:none;border:0;padding:0 0.25rem;cursor:pointer;text-decoration:none;white-space:nowrap;display:inline-block}
.tb:hover,.tb:focus-visible{background:var(--phos);color:var(--void);text-shadow:none;outline:none}
.tb.inv{background:var(--phos);color:var(--void);text-shadow:none}
.tb.inv:hover{background:var(--phos-dim)}
/* Screen colour: three standard buttons, the current one lit (landing, account, sleeping page). */
.themes{display:inline-flex;flex-wrap:wrap;gap:0.25rem 0.5rem;align-items:baseline}
.tb[aria-pressed="true"]{background:var(--phos);color:var(--void);text-shadow:none}
.tubes{display:inline-flex;align-items:baseline;gap:0.25rem 0.75rem;flex-wrap:wrap;font-size:1rem;color:var(--phos-dim)}
.tubes button{background:none;border:0;padding:0 0.125rem;color:inherit;font:inherit;text-shadow:inherit;cursor:pointer}
.tubes button[aria-pressed="true"]{color:var(--phos);text-decoration:underline;text-underline-offset:0.25rem}
.tubes button:hover,.tubes button:focus-visible,.tubes button[aria-pressed="true"]:hover{background:var(--phos);color:var(--void);text-shadow:none;outline:none}
/* small screens: the header items fold into a [ ≡ ] menu that opens as a list */
.menu-btn{display:none;font-size:1.5rem}
@media (max-width:900px){
  .menu-btn{display:inline-block}
  .bar:not(.open) nav.grp{display:none}
  .bar.open nav.grp{flex-direction:column;align-items:stretch;flex-basis:100%;gap:0;border-top:1px dashed var(--rule)}
  .bar.open nav.grp > *{padding:0.625rem 0.25rem;border-bottom:1px dashed var(--rule);text-align:left;white-space:normal}
  .bar.open nav.grp > :last-child{border-bottom:0}
  .bar.open .who{max-width:none}
  .bar.open .credits{border:0;border-bottom:1px dashed var(--rule)}
  .bar.open .zoom{gap:1.5rem}
  .bar.open .zoom .tb{padding:0 0.25rem}
}
.who{color:var(--phos-dim);max-width:34vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.credits{border:1px solid var(--phos);padding:0 0.375rem;font-variant-numeric:tabular-nums}
body:not(.app) .app-only{display:none}
body.app .land-only{display:none}

/* the screen */
.stage{position:relative;height:min(72vh,43.75rem);min-height:32.5rem}
body.app .stage{height:calc(100vh - 4rem);min-height:26.25rem}
/* The page's own scrollbar matches the computer's: thin, phosphor thumb on the screen colour. */
html{scrollbar-width:thin;scrollbar-color:var(--phos-dim) var(--screen)}
.scroll{position:absolute;inset:0;overflow-y:auto;padding:1.5rem clamp(1rem,4vw,2.75rem) 2.5rem;scrollbar-width:thin;scrollbar-color:var(--phos-dim) transparent;cursor:text}
#out{max-width:76ch;white-space:pre-wrap;word-break:break-word;font-size:clamp(1.25rem,2.2vw,1.5625rem)}
.ln{min-height:1.25em}
.dim{color:var(--phos-dim)}
.inv{background:var(--phos);color:var(--void);text-shadow:none;padding:0 0.375rem;display:inline-block}
.cur{display:inline-block;width:.55em;height:1em;background:var(--phos);vertical-align:-.12em;margin-left:0.125rem;box-shadow:0 0 0.375rem rgba(var(--rgb),.8)}
@media (prefers-reduced-motion:no-preference){.cur{animation:blink 1.05s steps(1) infinite}}
@keyframes blink{50%{opacity:0}}
.tbtns{display:flex;gap:0.875rem;flex-wrap:wrap;margin-top:0.375rem}
#ti{position:absolute;left:0;bottom:0;width:1px;height:1px;opacity:0;border:0;padding:0;font-size:1rem}

/* overlay over the attract screen */
.overlay{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;padding:1rem;background:rgba(var(--deep),.45);backdrop-filter:blur(1.5px);-webkit-backdrop-filter:blur(1.5px)}
.card{width:min(35rem,100%);background:var(--glass);border:1px solid var(--phos);padding:clamp(1.25rem,4vw,2rem);box-shadow:0 0 1.5rem rgba(var(--rgb),.12)}
.eyebrow{color:var(--phos-dim);margin:0 0 0.625rem}
.card h1{font-size:clamp(2.125rem,5vw,3rem);line-height:1;margin:0 0 0.875rem;font-weight:400;text-wrap:balance}
.card p{margin:0 0 0.75rem}
.card form{display:flex;gap:0.625rem;margin-top:1rem;flex-wrap:wrap;align-items:stretch}
.card input[type=email]{flex:1 1 13.75rem;min-width:0;background:transparent;border:1px solid var(--phos);padding:0.5rem 0.75rem;color:var(--phos)}
.card input::placeholder{color:var(--phos-dim);opacity:.8}
.card .tb.inv{padding:0.5rem 0.875rem}
.fine{color:var(--phos-dim);font-size:1.125rem;margin:0.75rem 0 0}
.err{color:var(--err);font-size:1.125rem;margin:0.5rem 0 0}
.row{display:flex;gap:0.625rem 1.125rem;flex-wrap:wrap;margin-top:0.875rem}

/* info, landing only */
.info{max-width:68.75rem;margin:0 auto;padding-inline:clamp(1rem,3vw,2rem);padding-block:2.5rem 1.5rem;display:grid;gap:2.75rem}
.info h2{font-size:2rem;font-weight:400;margin:0 0 0.875rem}
.steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px dashed var(--rule)}
@media (max-width:760px){.steps{grid-template-columns:minmax(0,1fr)}}
.steps div{padding:1rem 1.125rem;border-right:1px dashed var(--rule)}
.steps div:last-child{border-right:0}
@media (max-width:760px){.steps div{border-right:0;border-bottom:1px dashed var(--rule)}.steps div:last-child{border-bottom:0}}
.steps b{display:block;font-weight:400;font-size:1.5rem}
.steps span{color:var(--phos-dim)}
.two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem}
@media (max-width:760px){.two{grid-template-columns:minmax(0,1fr)}}
.list{margin:0;padding-left:0;list-style:none;display:grid;gap:0.375rem}
.list li::before{content:"> ";color:var(--phos-dim)}
.big{font-size:4rem;line-height:1;font-variant-numeric:tabular-nums}
.faq{border-top:1px dashed var(--rule)}
.faq div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr);gap:1.25rem;padding:0.75rem 0;border-bottom:1px dashed var(--rule)}
@media (max-width:640px){.faq div{grid-template-columns:minmax(0,1fr);gap:0.125rem}}
.faq span{color:var(--phos-dim)}
.foot{border-top:1px dashed var(--rule);padding-inline:clamp(1rem,3vw,2rem);padding-block:1rem;display:flex;justify-content:space-between;gap:0.75rem;flex-wrap:wrap;color:var(--phos-dim);font-size:1.125rem}
.foot nav{display:flex;gap:0.875rem;flex-wrap:wrap}
.mock-tag{border:1px dashed var(--phos-dim);padding:0 0.375rem}

/* buy credits */
.modal{position:fixed;inset:0;z-index:45;background:rgba(0,0,0,.65);display:flex;align-items:center;justify-content:center;padding:1rem}
.modal h2{font-size:2.125rem;font-weight:400;margin:0 0 0.5rem}
.packs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0.625rem;margin:1rem 0 0.25rem}
@media (max-width:560px){.packs{grid-template-columns:repeat(2,minmax(0,1fr))}}
.custom{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem 0.75rem;margin:0.875rem 0 0.25rem}
.custom label{color:var(--phos-dim)}
.custom input{width:9rem;background:transparent;border:1px solid var(--phos);padding:0.375rem 0.625rem;color:var(--phos);font:inherit;text-shadow:inherit}
.custom input::placeholder{color:var(--phos-dim);opacity:.8}
.custom .fine{flex-basis:100%;margin:0}
.pack{background:none;border:1px solid var(--phos);padding:0.75rem 0.5rem;cursor:pointer;text-align:center}
.pack:hover,.pack:focus-visible{background:var(--phos-faint);outline:none}
.pack b{display:block;font-weight:400;font-size:2.125rem;line-height:1}
.pack span{display:block;color:var(--phos-dim);font-size:1.125rem;white-space:nowrap}
.x{float:right;background:none;border:0;cursor:pointer;color:var(--phos-dim)}

/* ---------- additions for the real site (not in the v2 mockup) ---------- */
[hidden]{display:none!important}
/* Account screen lives inside the same tube, swapped with the computer output. */
#acctView{max-width:96ch;white-space:pre-wrap;word-break:break-word;font-size:clamp(1.25rem,2.2vw,1.5625rem)}
.arow{display:flex;flex-wrap:wrap;gap:0 1.125rem;align-items:baseline}
.arow .nm{min-width:14ch;text-align:left}
.arow .st{min-width:10ch}
.arow .xt{min-width:22ch}
/* Account: one dossier per idea */
.dossier{border:1px solid var(--phos-dim);margin:0 0 1.25rem;max-width:80ch;box-shadow:0 0 0.75rem rgba(var(--rgb),.08)}
.dhead{display:flex;justify-content:space-between;gap:1rem;align-items:baseline;background:var(--phos);color:var(--void);text-shadow:none;padding:0.125rem 0.875rem}
.dhead .dstate{opacity:.75}
.dbody{padding:0.625rem 0.875rem 0.75rem}
.kv{display:flex;gap:0;min-height:1.25em}
.kv .k{color:var(--phos-dim);white-space:pre;flex:none}
.kv > span:last-child{min-width:0;overflow-wrap:anywhere}
.dacts{margin-top:0.625rem}
@media (max-width:560px){.kv{flex-direction:column}.kv .k{white-space:normal}}
.confirm .ein{flex:1 1 16rem;min-width:0;max-width:32rem;background:transparent;border:1px solid var(--phos);padding:0.375rem 0.625rem;color:var(--phos);font:inherit;text-shadow:inherit}
.confirm .ein::placeholder{color:var(--phos-dim);opacity:.8}
.confirm{border:1px dashed var(--rule);padding:0.5rem 0.75rem;margin:0.25rem 0 0.625rem;max-width:76ch}
.tb[disabled]{opacity:.45;cursor:default;background:none;color:var(--phos)}
.tb[aria-current=true]{background:var(--phos);color:var(--void);text-shadow:none}
/* Stripe's embedded Checkout opens inside the buy-credits card (Stripe draws its own form). */
.modal .card{max-height:calc(100vh - 2rem);overflow:auto}
#checkoutMount{min-height:7.5rem;margin:0.625rem 0 0.25rem}
#payBtn[disabled]{opacity:.5;cursor:default}
.pack[aria-busy=true]{opacity:.6;cursor:progress}
/* The power switch is only for signed-in users (the server sends <body class="app"> for them).
   Signed-out visitors never see it: their computer boots by itself, silently. */
/* The switch shows for signed-in users and demo mode, and after any sign-out (body.after-out). */
body:not(.app):not(.demo):not(.after-out) .power{display:none}

/* ---------- demo mode ---------- */
body:not(.demo) .demo-only{display:none}
body.demo .land-only{display:none}
body.demo .stage{height:calc(100vh - 4rem);min-height:26.25rem}
#demoView{max-width:96ch;white-space:pre-wrap;word-break:break-word;font-size:clamp(1.25rem,2.2vw,1.5625rem)}
.drow{display:grid;grid-template-columns:minmax(10ch,max-content) minmax(0,1fr) max-content;gap:0.125rem 1.125rem;align-items:baseline;padding:0.375rem 0;border-bottom:1px dashed var(--rule)}
@media (max-width:640px){.drow{grid-template-columns:minmax(0,1fr) max-content}.drow .dsc{grid-column:1 / -1;grid-row:2}}
/* the prototype viewer sits inside the tube; the terminal shows around its edges */
.viewer{position:absolute;inset:clamp(0.5rem,2.5vw,1.75rem);z-index:6;display:flex;flex-direction:column;border:1px solid var(--phos);background:var(--void);box-shadow:0 0 0 0.375rem rgba(var(--deep),.55),0 0 2.125rem rgba(var(--rgb),.22)}
.vbar{display:flex;flex-wrap:wrap;gap:0.25rem 0.875rem;align-items:center;padding:0.375rem 0.625rem;border-bottom:1px dashed var(--rule)}
.vbar .vsp{flex:1}
.viewer iframe{flex:1;width:100%;border:0;background:#fff;min-height:0}
.viewer.doc iframe{background:var(--screen)}

/* Normal arrow over the screen (the computer has its own blinking block cursor; the I-beam looked odd).
   Text can still be selected and copied with the arrow. Buttons and links keep the pointer hand. */
.scroll{cursor:default}
.tb,.pack,.switch,.quiet,a{cursor:pointer}

/* cookie notice: a strip at the foot of the tube, under the payment modal and the power screen */
.cookie{position:fixed;left:0;right:0;bottom:0;z-index:44;display:flex;gap:0.5rem 1.125rem;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:0.625rem clamp(1rem,3vw,2rem);background:var(--void);border-top:1px dashed var(--rule);font-size:1.125rem}
.cookie .cbtns{display:flex;gap:0.75rem;align-items:center}
.cookie .tb.inv{padding:0.125rem 0.625rem}
.fine a{color:inherit}

/* help menu (inside the tube, like the account screen) */
#helpView{max-width:80ch;white-space:pre-wrap;word-break:break-word;font-size:clamp(1.25rem,2.2vw,1.5625rem)}
#helpView .inv{background:var(--phos);color:var(--void);text-shadow:none;display:inline-block;padding:0 0.375rem}
.hrow{display:flex;flex-wrap:wrap;gap:0.25rem 1.125rem;align-items:baseline}
/* [ - ] [ + ] text size */
.zoom{display:inline-flex;gap:0.125rem}
.zoom .tb:disabled{opacity:.35;cursor:default;background:none;color:var(--phos)}
