/* Terminal theme for the archimedes 3D page. Loaded after the page's own <style>
   (tools/build_pc_pages.py injects it), so these variables and rules win.
   Keep public/assets/pc-terminal.css and private/assets/pc-terminal.css identical. */

@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/assets/fonts/vt323.woff2") format("woff2");   /* VT323, SIL Open Font License; latin subset, self-hosted */
}

:root {
  --bg: #020a04; --bg2: #04140a; --panel: #031009; --panel2: #072314;
  --line: #155c27; --line2: #1f8f3a;
  --fg: #5cff7a; --muted: #2fa84a; --dim: #1f7a36;
  --accent: #ffb000;  /* amber: primary actions, planned parts */
  --sel: #5cff7a;     /* selection = phosphor green */
  --ok: #5cff7a; --warn: #ffb000; --bad: #ff4d4d;
  --f-disp: 'VT323', ui-monospace, Consolas, monospace;
  --f-body: 'VT323', ui-monospace, Consolas, monospace;
  --f-mono: 'VT323', ui-monospace, Consolas, monospace;
  --glow: rgba(92, 255, 122, 0.45);
}

/* square corners everywhere (LED dots stay round) */
#app *, .modal * { border-radius: 0 !important; }
.dot { border-radius: 50% !important; }

body {
  font-size: 18px;
  line-height: 1.3;
  background: radial-gradient(ellipse at center, #04140a 0%, var(--bg) 70%) fixed;
  text-shadow: 0 0 4px var(--glow);
  -webkit-font-smoothing: none;
}
::selection { background: var(--fg); color: var(--bg); text-shadow: none; }

/* CRT scanlines + vignette, same as the rest of the site */
body::before, body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; }
body::before {
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,0.25) 3px, rgba(0,0,0,0) 4px);
}
body::after { background: radial-gradient(ellipse at center, rgba(0,0,0,0) 60%, rgba(0,0,0,0.55) 100%); }

/* breadcrumb back to the site: /root/projects/archimedes-3d */
.crumb { flex: 1 1 100%; font-size: 20px; color: var(--muted); }
.crumb::before { content: "/"; }
.crumb a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.crumb a::before { content: "<"; display: inline-block; text-decoration: none; }
.crumb a::after { content: ">"; display: inline-block; text-decoration: none; }
.crumb a:hover, .crumb a:focus-visible { background: var(--fg); color: var(--bg); text-shadow: none; outline: none; }
.crumb-tag { color: var(--warn); }
.crumb-tag::before { content: "["; } .crumb-tag::after { content: "]"; }

/* header */
.brand h1 { font-size: 40px; font-weight: normal; letter-spacing: 2px; }
.brand h1::after { content: "_"; animation: pc-blink 1s steps(1) infinite; }
.brand p { font-size: 17px; }
@keyframes pc-blink { 50% { opacity: 0; } }

/* buttons: terminal [ ] style */
.tbtn, .obtn, .lbtn { background: transparent; border: 1px solid var(--line2); font-size: 17px; text-shadow: inherit; }
.tbtn:hover, .obtn:hover, .lbtn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); text-shadow: none; }
.tbtn:hover kbd { color: var(--bg); border-color: var(--bg); }
.tbtn kbd { font-size: 14px; }
.tbtn[aria-pressed="true"] { background: rgba(92, 255, 122, 0.12); color: var(--fg); border-color: var(--fg); }
.tbtn.primary, .obtn.go { background: transparent; color: var(--accent); border-color: var(--accent); font-weight: normal; }
.tbtn.primary::before, .obtn.go::before { content: "[ "; }
.tbtn.primary::after, .obtn.go::after { content: " ]"; }
.tbtn.primary:hover, .obtn.go:hover { background: var(--accent); color: var(--bg); filter: none; }
.banner button { color: var(--bg); background: var(--accent); }

/* panels */
.rail, .inspector, .stage, .dialog { border-width: 2px; }
.eyebrow { font-size: 16px; color: var(--dim); letter-spacing: 0.08em; }
.eyebrow::before { content: "[ "; } .eyebrow::after { content: " ]"; }
.prow .nm { font-size: 17px; }
.prow .cat { font-size: 14px; }
.prow.on { background: rgba(92, 255, 122, 0.08); }
.periph .m { font-size: 16px; }
.stage { background: radial-gradient(120% 90% at 50% 30%, #0a2414 0%, #04120a 55%, #020a04 100%); }
.hint, .loading { font-size: 16px; }
.hint { background: rgba(2, 10, 4, 0.8); }
.tip { font-size: 16px; background: rgba(2, 10, 4, 0.92); }
.tip small { font-size: 14px; }
.toast { font-size: 17px; background: var(--panel2); }
.banner { font-size: 16px; background: rgba(255, 176, 0, 0.1); }

/* inspector */
.ihead h2 { font-size: 28px; font-weight: normal; }
.pill { font-size: 14px; }
.tab { font-size: 18px; }
.tab[aria-selected="true"] { color: var(--fg); }
h3 { font-size: 17px; font-weight: normal; color: var(--muted); }
h3::before { content: "> "; }
.tile .k { font-size: 14px; }
.tile .v { font-size: 22px; }
.tile .v small { font-size: 15px; }
table.spec { font-size: 17px; }
table.spec td:last-child { font-size: 17px; }
.flag { font-size: 13px; }
.box .t { font-size: 16px; }
.kv { font-size: 16px; }
.find b { font-size: 17px; font-weight: normal; }
.find p { font-size: 16px; }
.chk { font-size: 16px; }
.chk i { font-size: 14px; }
.mrow { font-size: 15px; }
.opt .nm { font-size: 18px; font-weight: normal; }
.opt .pr { font-size: 17px; }
.opt .pr small { font-size: 14px; }
.opt .why { font-size: 16px; }
.delta { font-size: 14px; }
.notes { font-size: 17px; }
.foot { font-size: 15px; }
.cost .big { font-size: 28px; }
.meter span { background: linear-gradient(90deg, var(--dim), var(--fg)); }

/* build sheet dialog */
.modal { background: rgba(0, 0, 0, 0.75); }
.dialog header h2 { font-size: 26px; font-weight: normal; }
table.grid { font-size: 16px; }
table.grid th { font-size: 14px; font-weight: normal; }
.x { color: var(--fg); background: transparent; }

@media (prefers-reduced-motion: reduce) {
  .brand h1::after { animation: none; }
}
