/* Silicove portal prototype. Same tokens as the site: one 32 GB Mac mini.
   Tokens first; nothing below this block uses a literal colour or font. */
:root {
  --ground: #0B1514;      /* Vee's ghost-mint body */
  --surface: #132322;
  --ink: #E4F0F0;         /* Vee's graphite outline */
  --quiet: #A3BDB9;
  --line: #5E8F89;
  --hair: #24403D;
  --accent: #4FC7BA;      /* Vee's teal */
  --accent-ink: #0C1818;
  --link: #7FD8CC;
  --cove: #072624;        /* the deep water Vee floats in */
  --cove-ink: #E4F0F0;
  --cove-quiet: #A9CFC8;
  --cell-off: #1B4A46;
  --cell-on: #5ED1C2;
  --code-bg: #061A19;
  --code-ink: #E4F0F0;
  --ok: #4CC89C;
  --bad: #FF7B70;
  --focus: #E4F0F0;
  --shade: rgba(0, 0, 0, .4);
  --select-bg: #2F6763;
  --warn: #9FD3E6;
  --warn-bg: #142630;
  --g-line: #0C1818; --g-body: #D8F0F0; --g-shade: #A8E4D8;   /* fixed: Vee keeps her colours */
  --f-display: "Pixelify Sans", "Courier New", monospace;
  --f-body: "Figtree", "Segoe UI", "Helvetica Neue", sans-serif;
  --f-code: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --r1: 14px;
  --r2: 8px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 72px;
  --wrap: 1120px;
  color-scheme: dark;   /* one theme only: dark */
}

/* base */
html, body { overflow-x: clip; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; font-synthesis: none; }
::selection { background: var(--select-bg); color: var(--ink); }
input, select, textarea { caret-color: var(--accent); accent-color: var(--accent); }
html { scrollbar-color: var(--line) var(--ground); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; color: inherit; line-height: 1.1; margin: 0; text-wrap: balance; overflow-wrap: break-word; min-width: 0; letter-spacing: 0; }
h1 { font-size: clamp(30px, 4vw, 40px); }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
p { margin: 0; text-wrap: pretty; max-width: 65ch; }
ul { margin: 0; padding: 0; }
a { color: var(--link); text-decoration-line: underline; text-decoration-color: currentColor; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .15s ease; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
code, pre { font-family: var(--f-code); font-size: 15px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--surface); color: var(--ink); padding: 12px 16px; border: 2px solid var(--line); border-radius: var(--r2); }
.skip:focus { top: 12px; }

:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
* { box-sizing: border-box; }
.quiet { color: var(--quiet); }
.small { font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.apart { justify-content: space-between; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); align-items: start; }
@media (max-width: 760px) { .two { grid-template-columns: minmax(0, 1fr); } }

/* prototype band */
.proto { background: var(--warn-bg); color: var(--ink); border-bottom: 2px solid var(--line); font-size: 14px; padding-block: 4px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-wrap: wrap; gap: 0 16px; align-items: center; }
.proto nav { display: flex; flex-wrap: wrap; gap: 0 14px; }
.proto nav a { color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; text-decoration-color: transparent; }
.proto nav a:hover { text-decoration-color: currentColor; }
.proto nav a[aria-current="page"] { font-weight: 700; text-decoration-color: currentColor; text-decoration-thickness: 2px; }

/* buttons: one primary style, one radius */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r2); border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 600 15px/1.1 var(--f-body); text-decoration: none; cursor: pointer; transition: transform .12s cubic-bezier(0.23, 1, 0.32, 1), background-color .15s ease; }
.btn:hover:not([disabled]) { background: var(--ground); }
.btn:active:not([disabled]) { transform: scale(.97); }
.btn.go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent-ink); }
.btn.go:hover:not([disabled]) { background: var(--cell-on); }
.btn.bad { color: var(--bad); border-color: var(--bad); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.big { min-height: 48px; padding: 0 20px; font-size: 16px; }

/* shell: cove rail beside the work */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 52px); }
.rail { background: var(--cove); color: var(--cove-ink); padding-block: 20px; padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: 14px; display: flex; flex-direction: column; gap: 4px; }
.word { display: inline-flex; align-items: center; gap: 10px; color: var(--cove-ink); text-decoration: none; font: 600 24px/1 var(--f-display); min-height: 44px; padding: 0 8px 12px; }
.rail a.nav { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: var(--r2); color: var(--cove-ink); text-decoration: none; font-weight: 500; transition: background-color .15s ease; }
.rail a.nav:hover { background: var(--cell-off); }
.rail a.nav[aria-current="page"] { background: var(--cell-off); font-weight: 700; }
.rail a.nav svg { width: 18px; height: 18px; flex: none; }
.rail :focus-visible { outline-color: var(--cove-ink); }
.rail nav { display: grid; gap: 4px; }
.rail .grow { flex: 1; }
.who { font-size: 14px; color: var(--cove-quiet); padding: 12px 10px 0; border-top: 2px solid var(--cell-off); display: grid; gap: 2px; }
.who b { color: var(--cove-ink); font-weight: 600; }
main.view { padding-block: var(--s4) var(--s5); padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); min-width: 0; }
.inner { max-width: 1040px; margin-inline: auto; display: grid; gap: var(--s3); }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .rail { flex-direction: row; flex-wrap: wrap; align-items: center; padding-block: 8px; padding-right: max(14px, env(safe-area-inset-right, 0px)); }
  .word { padding: 0 8px 0 0; }
  .rail nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .rail .grow, .who { display: none; }
}

/* page head */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s2); flex-wrap: wrap; }
.page-head > div { display: grid; gap: 6px; min-width: 0; }
.page-head p { color: var(--quiet); }
.back { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-self: start; }

/* panel: one surface, one radius */
.panel { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r1); padding: var(--s3); display: grid; gap: var(--s2); align-content: start; min-width: 0; }
.panel.lift { box-shadow: 0 8px 24px var(--shade); }
.panel.flush { padding: 0; gap: 0; }
.panel.flush > h2 { padding: var(--s3) var(--s3) var(--s2); }

/* status: words first, a square mark beside them */
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.state::before { content: ""; width: 10px; height: 10px; background: currentColor; flex: none; }
.state.running, .state.paid { color: var(--ok); }
.state.stopped { color: var(--quiet); }
.state.stopped::before { background: transparent; border: 2px solid currentColor; }
.state.busy, .state.due { color: var(--warn); }
.xcode { color: var(--ok); font-weight: 600; font-size: 14px; }

/* tables */
.tbl { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
th { font: 600 14px/1.3 var(--f-body); color: var(--quiet); }
tbody tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vm-name a { font-weight: 700; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.vm-name small { display: block; color: var(--quiet); font-size: 13px; }

/* signature echo: this VM's share of the Mac mini's 32 GB */
.share { background: var(--cove); color: var(--cove-quiet); border-radius: var(--r1); padding: var(--s2) var(--s3); display: grid; gap: 10px; }
.share b { color: var(--cove-ink); }
.cells { display: grid; grid-template-columns: repeat(32, minmax(0, 1fr)); gap: 4px; max-width: 560px; }
.cells i { aspect-ratio: 1; background: var(--cell-off); }
.cells i.on { background: var(--cell-on); }
.cells.fill i.on { opacity: 0; transform: scale(.6); }
.cells.fill.go i.on { opacity: 1; transform: none; transition: opacity .3s cubic-bezier(0.23, 1, 0.32, 1), transform .3s cubic-bezier(0.23, 1, 0.32, 1); transition-delay: calc(var(--k) * 40ms); }
@media (max-width: 520px) { .cells { grid-template-columns: repeat(16, minmax(0, 1fr)); } }

/* stats and meters */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.stat { border: 2px solid var(--hair); border-radius: var(--r1); padding: 14px 16px; display: grid; gap: 4px; min-width: 0; background: var(--surface); }
.stat span { font-size: 14px; color: var(--quiet); }
.stat b { font: 600 22px/1.2 var(--f-display); overflow-wrap: anywhere; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.meter { display: grid; gap: 6px; }
.meter .bar { height: 14px; border: 2px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--ground); }
.meter .bar i { display: block; height: 100%; background: var(--accent); }
.meter .row b { font-variant-numeric: tabular-nums; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--hair); overflow-x: auto; }
.tabs button { min-height: 44px; padding: 0 14px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; color: var(--quiet); font: 600 15px/1 var(--f-body); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

/* screen preview: a frame for the real still picture */
.preview { border: 2px solid var(--line); border-radius: var(--r1); overflow: hidden; background: var(--surface); }
.preview-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-bottom: 2px solid var(--hair); font-size: 14px; color: var(--quiet); }
.frame { aspect-ratio: 16 / 10; max-width: 100%; display: grid; place-items: center; text-align: center; padding: var(--s3); gap: 10px; color: var(--quiet); border: 2px dashed var(--hair); margin: var(--s2); border-radius: var(--r2); }
.frame .vee { width: 112px; margin-inline: auto; }
.frame > div { display: grid; gap: 10px; justify-items: center; max-width: 42ch; }

/* copy rows: real commands, so monospace */
.copy { display: flex; gap: 8px; align-items: center; background: var(--code-bg); color: var(--code-ink); border-radius: var(--r2); padding: 6px 6px 6px 14px; min-width: 0; }
.copy code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 14px; }
.copy .btn { background: transparent; color: var(--code-ink); border-color: var(--cove-quiet); }
.copy .btn:hover { background: var(--cell-off); }
.copy :focus-visible { outline-color: var(--code-ink); }
.steps { margin: 0; padding-left: 22px; display: grid; gap: var(--s2); }
.steps li { display: grid; gap: 8px; }
.steps li::marker { font: 600 18px var(--f-display); }
.keys { list-style: none; display: grid; gap: 8px; }
.keys li { display: flex; gap: 12px; align-items: center; justify-content: space-between; border: 2px solid var(--hair); border-radius: var(--r2); padding: 8px 8px 8px 14px; min-width: 0; }
.keys li > div { min-width: 0; display: grid; gap: 2px; }
.keys code { overflow-wrap: anywhere; font-size: 13px; }
.door { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--ok); border-radius: var(--r1); padding: 14px 16px; background: var(--surface); }
.door svg { flex: none; width: 22px; height: 22px; color: var(--ok); margin-top: 2px; }

/* forms */
.field { display: grid; gap: 8px; }
.field > label, .field > .lab, .field legend { font-weight: 600; padding: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field input:not([type="radio"]):not([type="checkbox"]), .field textarea, .field select { font: 16px var(--f-body); min-height: 48px; padding: 10px 14px; border-radius: var(--r2); border: 2px solid var(--line); background: var(--ground); color: var(--ink); width: 100%; min-width: 0; }
.field textarea { font: 14px/1.5 var(--f-code); min-height: 84px; resize: vertical; }
.field textarea.prose { font: 16px/1.5 var(--f-body); }
.hint { font-size: 14px; color: var(--quiet); }
.err { color: var(--bad); font-size: 15px; min-height: 1.4em; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }

/* options: rows with a real radio, not a grid of cards */
.opts { display: grid; gap: 8px; }
.opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; padding: 12px 16px; min-height: 56px; border: 2px solid var(--hair); border-radius: var(--r2); background: var(--surface); cursor: pointer; transition: border-color .15s ease; }
.opt:hover { border-color: var(--quiet); }
.opt:has(input:checked) { border-color: var(--line); }
.opt:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.opt input { width: 20px; height: 20px; margin: 2px 0 0; }
.opt .what { display: grid; gap: 2px; min-width: 0; }
.opt .what b { font-weight: 700; }
.opt .what span { font-size: 14px; color: var(--quiet); }
.opt .cost { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
@media (max-width: 520px) { .opt { grid-template-columns: auto minmax(0, 1fr); } .opt .cost { grid-column: 2; text-align: left; } }

/* onboarding */
.solo { max-width: 560px; margin-inline: auto; display: grid; gap: var(--s3); }
.solo.wide { max-width: 880px; }
.solo .word { color: var(--ink); padding: 0; justify-self: start; }
.progress { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--quiet); counter-reset: st; }
.progress li { counter-increment: st; }
.progress li::before { content: counter(st) ". "; }
.progress li[aria-current="step"] { color: var(--ink); font-weight: 700; }
.progress li.done { color: var(--ink); }
.slot { border: 2px dashed var(--line); border-radius: var(--r2); padding: var(--s3); display: grid; gap: 6px; text-align: center; color: var(--quiet); font-size: 15px; }
.slot b { color: var(--ink); }
.sum { display: grid; gap: 10px; }
.sum div { display: flex; justify-content: space-between; gap: 12px; }
.sum div span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.sum .total { border-top: 2px solid var(--line); padding-top: 10px; font-weight: 700; }
.sum .off span:last-child { color: var(--ok); font-weight: 600; }
.note { font-size: 15px; padding: 12px 14px; border-radius: var(--r2); border: 2px solid var(--hair); display: grid; gap: 4px; }
.note.warn { border-color: var(--warn); background: var(--warn-bg); }
.prov { list-style: none; display: grid; gap: 12px; }
.prov li { display: flex; gap: 12px; align-items: center; color: var(--quiet); }
.prov .dot { width: 24px; height: 24px; border: 2px solid var(--hair); border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.prov li.done, .prov li.now { color: var(--ink); }
.prov li.done .dot { background: var(--accent); border-color: var(--line); color: var(--accent-ink); }
.prov li.now .dot { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.prov-vee { width: 112px; }

/* confirmations and reveals */
.confirm { border: 2px solid var(--bad); border-radius: var(--r1); padding: var(--s2); display: grid; gap: 10px; background: var(--surface); }
.reveal { border: 2px solid var(--ok); border-radius: var(--r1); padding: var(--s2); display: grid; gap: 10px; }
.upsell { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; padding: 12px 16px; border: 2px solid var(--line); border-radius: var(--r1); background: var(--surface); }
@media (max-width: 560px) { .upsell { grid-template-columns: minmax(0, 1fr); } }
.snaps .snap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.snaps .snap:last-child { border-bottom: 0; }
.snaps .snap small { display: block; color: var(--quiet); font-size: 14px; }
.snaps .confirm { grid-column: 1 / -1; }
.empty { display: grid; gap: 12px; justify-items: center; text-align: center; padding: var(--s4) var(--s3); }
.empty .vee { width: 120px; }
.err-row { display: flex; gap: 10px; align-items: center; }
.err-row .vee { width: 48px; flex: none; }
.vee { image-rendering: pixelated; display: block; height: auto; max-width: 100%; }
.toast { position: fixed; right: max(16px, calc(env(safe-area-inset-right, 0px) + 16px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); left: max(16px, env(safe-area-inset-left, 0px)); margin-left: auto; max-width: 420px; width: fit-content; background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: var(--r2); box-shadow: 0 8px 24px var(--shade); display: flex; gap: 10px; align-items: center; z-index: 40; }
.toast .vee { width: 36px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
  .cells.fill i.on { opacity: 1; transform: none; }
}

/* wordmark ghost, drawn from Vee's sprite */
.ghost { width: 30px; height: 28px; flex: none; }
.ghost .gl { fill: var(--g-line); } .ghost .gb { fill: var(--g-body); } .ghost .gs { fill: var(--g-shade); }
