/* nuvola.run | Design #1: Retro 1987 Pixel Workstation (System 7 / HyperCard x Xerox Alto) */

:root {
  /* Light mode: 1987 Macintosh System 7 / Warm Paper Workstation */
  --stipple-a: #e6e3d8;
  --stipple-b: #d2cec0;
  --win-bg: #f7f5ee;
  --win-well: #ece8dc;
  --win-inset: #e2ddd0;
  --border: #111111;
  --rule: #bfb9aa;
  --shadow: #111111;
  --stripe: #111111;

  --ink: #111111;
  --ink-2: #3a3731;
  --mute: #666158;

  --red: #df3a19;
  --red-hi: #f04624;
  --red-lo: #b82b0f;

  --crt-bg: #131519;
  --crt-well: #0d0f12;
  --crt-head: #1c2026;
  --crt-line: #2d333d;
  --crt-ink: #f0f2f5;
  --crt-mute: #9aa2b1;
  --mint: #4ad287;
  --amber: #f0b34a;

  --bevel-hi: rgba(255, 255, 255, 0.72);
  --bevel-lo: rgba(17, 17, 17, 0.14);

  --px: "Silkscreen", ui-monospace, Menlo, monospace;
  --disp: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;
}

html[data-theme="dark"] {
  /* Dark mode: NeXTSTEP / Phosphor CRT Workstation */
  --stipple-a: #14161a;
  --stipple-b: #1d2128;
  --win-bg: #20242b;
  --win-well: #181b21;
  --win-inset: #13161b;
  --border: #07080a;
  --rule: #343a46;
  --shadow: #050608;
  --stripe: #4c5464;

  --ink: #f0f2f6;
  --ink-2: #c2c8d4;
  --mute: #8992a3;

  --red: #eb4926;
  --red-hi: #f65937;
  --red-lo: #c73416;

  --crt-bg: #0e1014;
  --crt-well: #090b0e;
  --crt-head: #171a20;
  --crt-line: #2b313c;
  --crt-ink: #f1f3f7;
  --crt-mute: #8e97a8;
  --mint: #52e093;
  --amber: #f2bc5a;

  --bevel-hi: rgba(255, 255, 255, 0.12);
  --bevel-lo: rgba(0, 0, 0, 0.45);
}

[x-cloak] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 48px; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--stipple-a);
  background-image:
    linear-gradient(45deg, var(--stipple-b) 25%, transparent 25%),
    linear-gradient(-45deg, var(--stipple-b) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--stipple-b) 75%),
    linear-gradient(-45deg, transparent 75%, var(--stipple-b) 75%);
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0;
  color: var(--ink);
  font-family: var(--disp);
  font-size: 15.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--win-well);
  border: 1px solid var(--rule);
  padding: 1px 5px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

a.inline-link {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  font-weight: 600;
}
a.inline-link:hover {
  background: var(--red);
  color: #ffffff;
  text-decoration: none;
}

/* =====================================================================
   SYSTEM 7 TOP MENU BAR
   ===================================================================== */
.mac-menubar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 0 14px;
  background: var(--win-bg);
  border-bottom: 2px solid var(--border);
  box-shadow: inset 0 1px 0 var(--bevel-hi);
  user-select: none;
}

.mb-left,
.mb-right {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.mb-apple {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 4px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--disp);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  border-right: 1px solid var(--rule);
  margin-right: 4px;
}
.mb-apple:hover {
  background: var(--ink);
  color: var(--win-bg);
}
.mb-apple:hover .mb-brand b {
  color: var(--win-bg);
  opacity: 0.78;
}
.mb-brand b {
  font-weight: 500;
  color: var(--mute);
}

.brand-logo {
  height: 17px;
  width: auto;
  display: block;
  flex: none;
  image-rendering: pixelated;
}

.mb-menus {
  display: flex;
  align-items: stretch;
}
.mb-item {
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--disp);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.mb-item:hover {
  background: var(--ink);
  color: var(--win-bg);
}

.mb-right {
  align-items: center;
  gap: 8px;
}

.mb-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  background: var(--win-well);
  border: 1.5px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.05em;
  color: var(--ink);
  white-space: nowrap;
}

.px-led {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--mint);
  border: 1px solid var(--border);
  flex: none;
}

.mb-clock {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 0 4px;
  white-space: nowrap;
}

.mb-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 7px;
  background: var(--win-well);
  color: var(--ink);
  border: 1.5px solid var(--border);
  box-shadow: inset 1px 1px 0 var(--bevel-hi);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.mb-theme-btn:hover {
  background: var(--ink);
  color: var(--win-bg);
}
.mb-theme-btn .ic-sun { display: none; }
.mb-theme-btn .ic-moon { display: block; }
html[data-theme="dark"] .mb-theme-btn .ic-sun { display: block; }
html[data-theme="dark"] .mb-theme-btn .ic-moon { display: none; }

.mb-cmd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  background: var(--red);
  color: #ffffff;
  border: 1.5px solid var(--border);
  box-shadow: 2px 2px 0 var(--shadow), inset 1px 1px 0 rgba(255, 255, 255, 0.35);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.mb-cmd:hover {
  background: var(--red-hi);
}
.mb-cmd:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--shadow);
}
.mb-cmd kbd {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 0 4px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.lang-switch {
  display: inline-flex;
  border: 1.5px solid var(--border);
  background: var(--win-well);
}
.lang-switch a {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink);
  padding: 3px 6px;
  border-right: 1px solid var(--border);
}
.lang-switch a:last-child { border-right: 0; }
.lang-switch a.on { background: var(--ink); color: var(--win-bg); }

/* =====================================================================
   DESKTOP WORKSPACE CONTAINER
   ===================================================================== */
.desktop {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 44px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.desktop-narrow {
  max-width: 920px;
}

/* =====================================================================
   CLASSIC MACINTOSH SYSTEM 7 WINDOW CHROME
   ===================================================================== */
.mac-win {
  background: var(--win-bg);
  border: 2px solid var(--border);
  box-shadow: 5px 5px 0 var(--shadow), inset 1px 1px 0 var(--bevel-hi);
  min-width: 0;
}

html[data-theme="dark"] .mac-win {
  border-color: #060709;
  box-shadow: 5px 5px 0 var(--shadow), inset 1px 1px 0 #3f4654, inset -1px -1px 0 #101216;
}
html[data-theme="dark"] .hc-card,
html[data-theme="dark"] .meter-controls,
html[data-theme="dark"] .models-block {
  border-color: #07080a;
  box-shadow: 4px 4px 0 var(--shadow), inset 1px 1px 0 #363c48;
}
html[data-theme="dark"] .mac-tabs,
html[data-theme="dark"] .mac-seg,
html[data-theme="dark"] .di-glyph,
html[data-theme="dark"] .di-label {
  border-color: #464e5e;
}

.win-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 8px;
  background: var(--win-bg);
  border-bottom: 2px solid var(--border);
  user-select: none;
}

.win-box {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
  background: var(--win-bg);
  border: 1.5px solid var(--border);
  box-shadow: inset 1px 1px 0 var(--bevel-hi);
}
html[data-theme="dark"] .win-box {
  border-color: #6b7485;
}
.win-zoom::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
}
html[data-theme="dark"] .win-zoom::after {
  border-color: #6b7485;
}

.win-stripes {
  flex: 1;
  height: 13px;
  min-width: 12px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--stripe) 0px,
    var(--stripe) 1px,
    transparent 1px,
    transparent 3px
  );
}

.win-title {
  font-family: var(--px);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink);
  padding: 1px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-infobar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  padding: 7px 18px 9px;
  background: var(--win-well);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 -2px 0 var(--win-bg), inset 0 -3px 0 var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.03em;
}
.win-infobar b {
  color: var(--ink);
  font-weight: 600;
}
.win-infobar b.hi-red {
  color: var(--red);
}

.win-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 18px;
  background: var(--win-well);
  border-bottom: 2px solid var(--border);
}
.wt-left,
.wt-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.wt-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.04em;
}

.win-body {
  padding: 26px 26px 28px;
}

.win-statusbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 18px;
  background: var(--win-well);
  border-top: 2px solid var(--border);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--mute);
  letter-spacing: 0.05em;
}

/* =====================================================================
   PIXEL STAMPS, HEADINGS & TACTILE BUTTONS
   ===================================================================== */
.px-stamp {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.07em;
  color: var(--win-bg);
  background: var(--ink);
  padding: 3px 7px;
  margin-bottom: 12px;
}
.win-toolbar .px-stamp {
  margin-bottom: 0;
}

.win-h2 {
  font-family: var(--disp);
  font-size: clamp(23px, 2.3vw, 29px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 12px;
}
.win-h2.inline {
  margin-bottom: 0;
  font-size: clamp(19px, 2vw, 24px);
}
.win-h2.lg {
  font-size: clamp(28px, 3vw, 38px);
}

.pane-copy {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.56;
  margin-bottom: 20px;
  max-width: 58ch;
}

/* Tactile System 7 / Keycap Buttons */
.mac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  background: var(--win-bg);
  color: var(--ink);
  border: 2px solid var(--border);
  box-shadow: 3px 3px 0 var(--shadow), inset 1px 1px 0 var(--bevel-hi);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.05s steps(2), box-shadow 0.05s steps(2), background 0.08s;
}
.mac-btn:hover {
  background: var(--win-well);
}
.mac-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow);
}
.mac-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.mac-btn.red {
  background: var(--red);
  color: #ffffff;
  box-shadow: 3px 3px 0 var(--shadow), inset 1px 1px 0 rgba(255, 255, 255, 0.35);
}
.mac-btn.red:hover {
  background: var(--red-hi);
}
.mac-btn.sm {
  padding: 7px 12px;
  font-size: 10px;
}
.mac-btn.xs {
  padding: 4px 9px;
  font-size: 9.5px;
  box-shadow: 2px 2px 0 var(--shadow);
}
.mac-btn.full {
  width: 100%;
  padding: 12px 16px;
}

.default-btn-ring {
  padding: 3px;
  border: 2px solid var(--border);
  background: var(--win-bg);
}

/* Segmented controls & Folder tabs */
.mac-tabs,
.mac-seg {
  display: inline-flex;
  border: 2px solid var(--border);
  background: var(--win-bg);
  box-shadow: 2px 2px 0 var(--shadow);
}
.mac-tabs button,
.mac-seg button {
  padding: 6px 11px;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-right: 1.5px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  white-space: nowrap;
}
.mac-tabs button:last-child,
.mac-seg button:last-child {
  border-right: 0;
}
.mac-tabs button:hover,
.mac-seg button:hover {
  background: var(--win-inset);
}
.mac-tabs button.on,
.mac-seg button.on {
  background: var(--ink);
  color: var(--win-bg);
}

/* =====================================================================
   SCENE 1: HERO WINDOW + FINDER DESKTOP ICONS
   ===================================================================== */
.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px;
  gap: 22px;
  align-items: start;
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 30px;
  align-items: center;
  padding: 32px 30px 34px;
}

.hero-h1 {
  font-family: var(--disp);
  font-size: clamp(34px, 4.1vw, 54px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 18px;
}

.hero-dot {
  color: var(--red);
  display: inline-block;
}
.hero-dot::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.78em;
  margin-left: 0.14em;
  vertical-align: -0.05em;
  background: var(--ink);
  animation: blink-block 1.05s steps(2, start) infinite;
}
@keyframes blink-block {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.manifesto {
  font-size: 16px;
  line-height: 1.56;
  color: var(--ink);
  margin-bottom: 10px;
  max-width: 48ch;
}
.manifesto.sub {
  color: var(--ink-2);
  font-size: 14.5px;
  margin-bottom: 0;
}

/* HyperCard Waitlist Panel */
.hc-card {
  background: var(--win-well);
  border: 2px solid var(--border);
  box-shadow: 4px 4px 0 var(--shadow);
}
.hc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 13px;
  background: var(--ink);
  color: var(--win-bg);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.hc-hint {
  opacity: 0.78;
}
.hc-body {
  padding: 16px;
}

.wl-controls {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.wl-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hc-card input[type="email"],
.hc-card input[type="text"] {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  background: var(--win-bg);
  color: var(--ink);
  border: 2px solid var(--border);
  box-shadow: inset 2px 2px 0 var(--bevel-lo);
  font-family: var(--mono);
  font-size: 13.5px;
  outline: none;
}
.hc-card input[type="email"]::placeholder,
.hc-card input[type="text"]::placeholder {
  color: var(--mute);
}
.hc-card input[type="email"]:focus,
.hc-card input[type="text"]:focus {
  outline: 2px solid var(--red);
  outline-offset: -2px;
}

.hc-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px dashed var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--mute);
}

.wl-err {
  margin-top: 10px;
  padding: 7px 10px;
  background: var(--red);
  color: #ffffff;
  border: 1.5px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.wl-ok {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--win-bg);
  border: 2px solid var(--border);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
}
.wl-ok-col {
  flex-direction: column;
  gap: 12px;
}
.wl-ok-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.ok-led {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  flex: none;
  background: var(--mint);
  border: 1.5px solid var(--border);
}

.wl-followup {
  width: 100%;
  padding-top: 10px;
  border-top: 1px dashed var(--rule);
}
.wl-fu-lbl {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--mute);
  letter-spacing: 0.06em;
}
.wl-fu-saved {
  color: var(--red);
  font-weight: 700;
}
.wl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wl-chip {
  padding: 5px 8px;
  background: var(--win-well);
  color: var(--ink);
  border: 1.5px solid var(--border);
  box-shadow: 2px 2px 0 var(--shadow);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.wl-chip:hover {
  background: var(--win-inset);
}
.wl-chip.on {
  background: var(--red);
  color: #ffffff;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--shadow);
}

/* Classic Finder Desktop Icons Rail */
.desk-icons {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 4px;
}
.desk-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.di-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--win-bg);
  border: 2px solid var(--border);
  box-shadow: 3px 3px 0 var(--shadow);
  transition: transform 0.05s steps(2), box-shadow 0.05s steps(2);
}
.di-glyph svg {
  display: block;
}
.di-label {
  display: inline-block;
  max-width: 136px;
  padding: 2px 6px;
  background: var(--win-bg);
  color: var(--ink);
  border: 1.5px solid var(--border);
  box-shadow: 2px 2px 0 var(--shadow);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
}
.desk-icon:hover .di-label {
  background: var(--ink);
  color: var(--win-bg);
}
.desk-icon:active .di-glyph {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow);
}

/* =====================================================================
   SCENE 2: INTERACTIVE PLAYGROUND (PLAYGROUND.EXEC)
   ===================================================================== */
.trig-sq {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #ffffff;
  border: 1px solid var(--border);
}
.trig-sq.live {
  background: var(--mint);
  animation: blink-block 0.45s steps(2, start) infinite;
}

.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.35fr);
  min-width: 0;
}

.console-left {
  display: flex;
  flex-direction: column;
  background: var(--win-bg);
  border-right: 2px solid var(--border);
  min-width: 0;
}

.console-right {
  display: flex;
  flex-direction: column;
  background: var(--crt-bg);
  color: var(--crt-ink);
  min-width: 0;
}

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 14px;
  background: var(--win-inset);
  border-bottom: 1.5px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.pane-head.dark {
  background: var(--crt-head);
  border-bottom: 1.5px solid var(--crt-line);
  color: var(--crt-mute);
}
.pane-head.dark span:last-child {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--crt-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-list {
  display: flex;
  flex-direction: column;
}

.preset-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: var(--win-bg);
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-left: 4px solid transparent;
  cursor: pointer;
}
.preset-item:hover {
  background: var(--win-well);
}
.preset-item.on {
  background: var(--ink);
  color: var(--win-bg);
  border-left-color: var(--red);
}

.pi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.pi-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.pi-doc {
  display: inline-block;
  width: 10px;
  height: 12px;
  flex: none;
  border: 1.5px solid currentColor;
  background: linear-gradient(to bottom, transparent 4px, currentColor 4px 5.5px, transparent 5.5px 7.5px, currentColor 7.5px 9px, transparent 9px);
}
.pi-file {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pi-size {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.72;
  white-space: nowrap;
}
.pi-sub {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.72;
  padding-left: 17px;
}

.endpoint-box {
  margin-top: auto;
  border-top: 2px solid var(--border);
  background: var(--win-well);
  padding: 12px 14px 14px;
}
.ep-head {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--mute);
  margin-bottom: 8px;
}
.ep-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dotted var(--rule);
  font-family: var(--mono);
  font-size: 11.5px;
}
.ep-row:last-child { border-bottom: 0; }
.ep-k {
  color: var(--mute);
  flex: none;
}
.ep-v {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}
.ep-v.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* CRT Right Pane */
.test-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.crt-well {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px 18px;
  flex: 1;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
}

.req-box,
.res-box {
  border: 1.5px solid var(--crt-line);
  background: var(--crt-well);
}

.req-head,
.res-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 6px 12px;
  background: var(--crt-head);
  border-bottom: 1px solid var(--crt-line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--crt-mute);
}
.res-fp {
  color: var(--mint);
  font-weight: 600;
}

.req-prompt {
  padding: 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: #d6dbe5;
}

.res-box {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.res-body {
  padding: 14px 12px 16px;
  flex: 1;
  min-height: 132px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.62;
  color: var(--crt-ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.res-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 8px 12px;
  background: var(--crt-head);
  border-top: 1px solid var(--crt-line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--crt-mute);
}
.res-foot b {
  color: var(--crt-ink);
  font-weight: 600;
}
.res-foot .cost-hi {
  color: var(--amber);
}

.crt-code {
  margin: 0;
  padding: 16px 18px;
  background: var(--crt-well);
  color: var(--crt-ink);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.62;
  overflow-x: auto;
  flex: 1;
}
.crt-code code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  overflow-wrap: normal;
  white-space: pre;
}

/* =====================================================================
   SCENE 3: SIDE-BY-SIDE WINDOWS (BURN_METER.CALC + CHECKPOINTS.DB)
   ===================================================================== */
.dual-windows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.calc-win,
.spec-win {
  display: flex;
  flex-direction: column;
}
.calc-win .win-body,
.spec-win .win-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Calculator Sliders & Bars */
.meter-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: var(--win-well);
  border: 2px solid var(--border);
  margin-bottom: 20px;
}

.mc-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mc-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.mc-row label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.mc-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  padding: 2px 7px;
  background: var(--win-bg);
  border: 1.5px solid var(--border);
}

.tier-row {
  padding-top: 8px;
  border-top: 1px dashed var(--rule);
}

/* Classic Retro Range Input */
.mac-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  background: repeating-linear-gradient(
    90deg,
    var(--win-bg) 0px,
    var(--win-bg) 4px,
    var(--win-inset) 4px,
    var(--win-inset) 8px
  );
  border: 1.5px solid var(--border);
  outline: none;
  cursor: pointer;
}
.mac-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 22px;
  background: var(--red);
  border: 2px solid var(--border);
  box-shadow: 2px 2px 0 var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, 0.35);
  cursor: pointer;
}
.mac-range::-moz-range-thumb {
  width: 18px;
  height: 22px;
  border-radius: 0;
  background: var(--red);
  border: 2px solid var(--border);
  box-shadow: 2px 2px 0 var(--shadow);
  cursor: pointer;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}
.bar-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-2);
}
.bar-num {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.bar-num.red {
  color: var(--red);
}
.bar-track {
  height: 18px;
  background: var(--win-well);
  border: 2px solid var(--border);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  transition: width 0.14s steps(8);
}
.fill-gpu {
  background: repeating-linear-gradient(
    -45deg,
    var(--ink) 0px,
    var(--ink) 2px,
    var(--win-well) 2px,
    var(--win-well) 6px
  );
  border-right: 2px solid var(--border);
}
.fill-nv {
  background: var(--red);
  min-width: 6px;
}

.meter-delta {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
  background: var(--crt-bg);
  color: var(--crt-ink);
  border: 2px solid var(--border);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.5);
}
.delta-big {
  font-family: var(--disp);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--mint);
  line-height: 1.15;
}
.delta-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--crt-mute);
}

/* Datasheet & Base Models (CHECKPOINTS.DB) */
.datasheet {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--border);
  margin-bottom: 20px;
}
.ds-row {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 10px 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.ds-row dt {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.05em;
  color: var(--mute);
  padding-top: 2px;
}
.ds-row dd {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.ds-row dd b {
  display: block;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 2px;
}

.models-block {
  margin-top: auto;
  border: 2px solid var(--border);
  background: var(--win-well);
}
.mb-head {
  padding: 7px 12px;
  background: var(--ink);
  color: var(--win-bg);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.model-list {
  display: flex;
  flex-direction: column;
}
.m-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
}
.m-row:last-child { border-bottom: 0; }

.m-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 3px 5px;
  background: var(--win-bg);
  border: 1.5px solid var(--border);
  font-family: var(--px);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink);
  flex: none;
}
.m-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.m-info b {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.m-info code {
  font-size: 11px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--mute);
  word-break: break-all;
}
.m-state {
  font-family: var(--px);
  font-size: 10px;
  font-weight: 400;
  padding: 2px 6px;
  background: var(--crt-bg);
  color: var(--mint);
  border: 1px solid var(--border);
  flex: none;
}

/* =====================================================================
   SCENE 4: API QUICKSTART WINDOW (QUICKSTART.SH)
   ===================================================================== */
.wire-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--crt-bg);
}
.wire-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 2px solid var(--border);
}
.wire-col:last-child {
  border-right: 0;
}

/* =====================================================================
   SCENE 5: BETA REQUEST DIALOG WINDOW (BETA_REQUEST.FORM)
   ===================================================================== */
.join-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: center;
}

.dialog-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.dialog-badge .px-stamp {
  margin-bottom: 0;
}
.dialog-logo {
  height: 30px;
  width: auto;
  display: block;
  image-rendering: pixelated;
}

/* =====================================================================
   PRIVACY WINDOW
   ===================================================================== */
.privacy-h1 {
  font-family: var(--disp);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin-bottom: 12px;
}
.privacy-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* =====================================================================
   DESKTOP BOTTOM COLOPHON BAR
   ===================================================================== */
.mac-colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 12px 20px;
  background: var(--win-bg);
  border-top: 2px solid var(--border);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--mute);
}
.mac-colophon b {
  color: var(--ink);
}
.mac-colophon a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mac-colophon a:hover {
  background: var(--ink);
  color: var(--win-bg);
  text-decoration: none;
}

/* =====================================================================
   RESPONSIVE BREAKPOINTS (ZERO OVERFLOW AT 390PX)
   ===================================================================== */
@media (max-width: 1020px) {
  .hero-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .desk-icons {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding-top: 0;
  }
  .hero-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .dual-windows {
    grid-template-columns: minmax(0, 1fr);
  }
  .console-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .console-left {
    border-right: 0;
    border-bottom: 2px solid var(--border);
  }
  .wire-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .wire-col {
    border-right: 0;
    border-bottom: 2px solid var(--border);
  }
  .wire-col:last-child {
    border-bottom: 0;
  }
  .join-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

@media (max-width: 760px) {
  .mb-menus,
  .mb-clock,
  .mb-status {
    display: none;
  }
  .mac-menubar {
    padding: 0 10px;
  }
  .mb-apple {
    border-right: 0;
    padding: 0 4px;
    margin-right: 0;
  }
  .mb-theme-lbl {
    display: none;
  }
  .mb-cmd kbd {
    display: none;
  }
  .desktop {
    padding: 16px 12px 30px;
    gap: 20px;
  }
  .mac-win {
    box-shadow: 4px 4px 0 var(--shadow);
  }
  .win-body,
  .hero-body {
    padding: 18px 14px 20px;
  }
  .win-infobar {
    padding: 7px 12px 9px;
    font-size: 10.5px;
    gap: 4px 12px;
  }
  .win-toolbar {
    padding: 10px 12px;
  }
  .wl-controls {
    flex-direction: column;
  }
  .wl-controls .mac-btn {
    width: 100%;
  }
  .ds-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .desk-icons {
    display: grid;
    grid-template-columns: 1.3fr 0.95fr 0.95fr;
    gap: 8px;
  }
  .di-glyph {
    width: 44px;
    height: 44px;
  }
  .di-glyph svg {
    width: 30px;
    height: 30px;
  }
  .di-label {
    font-size: 9px;
    letter-spacing: -0.02em;
    padding: 2px 5px;
    white-space: nowrap;
    max-width: 100%;
  }
  .win-title {
    font-size: 9.5px;
    padding: 1px 4px;
  }
  .crt-code {
    padding: 12px;
    font-size: 11.5px;
  }
  .mac-colophon {
    padding: 12px 14px;
    flex-direction: column;
    align-items: flex-start;
  }
}
