/* terminal.css — jwinkler.pro CLI persona */

:root {
  --bg: oklch(0.18 0.015 250);
  --bg-elev: oklch(0.21 0.018 250);
  --bg-deep: oklch(0.14 0.012 250);
  --fg: oklch(0.92 0.008 250);
  --fg-dim: oklch(0.68 0.012 250);
  --fg-mute: oklch(0.48 0.014 250);
  --rule: oklch(0.32 0.018 250 / 0.6);
  --accent: oklch(0.78 0.13 195);
  --accent-2: oklch(0.72 0.18 340);
  --warn: oklch(0.82 0.14 75);
  --ok: oklch(0.78 0.15 145);
  --selection: oklch(0.78 0.13 195 / 0.28);

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --type-speed: 22ms;

  --pad: clamp(14px, 2vw, 28px);
  --maxw: 1180px;
}

[data-theme="warm"] {
  --bg: oklch(0.96 0.012 80);
  --bg-elev: oklch(0.99 0.008 80);
  --bg-deep: oklch(0.92 0.014 80);
  --fg: oklch(0.22 0.012 50);
  --fg-dim: oklch(0.42 0.014 50);
  --fg-mute: oklch(0.62 0.012 50);
  --rule: oklch(0.78 0.014 50 / 0.7);
  --accent: oklch(0.55 0.15 30);
  --accent-2: oklch(0.48 0.14 250);
  --selection: oklch(0.55 0.15 30 / 0.22);
}
[data-theme="phosphor"] {
  --bg: #06080a;
  --bg-elev: #0a0e10;
  --bg-deep: #04060a;
  --fg: oklch(0.88 0.16 145);
  --fg-dim: oklch(0.68 0.18 145);
  --fg-mute: oklch(0.48 0.14 145);
  --rule: oklch(0.42 0.14 145 / 0.55);
  --accent: oklch(0.92 0.2 145);
  --accent-2: oklch(0.85 0.18 80);
  --selection: oklch(0.85 0.18 145 / 0.28);
}
[data-theme="brutalist"] {
  --bg: #ffffff;
  --bg-elev: #ffffff;
  --bg-deep: #f4f4f4;
  --fg: #000000;
  --fg-dim: #2a2a2a;
  --fg-mute: #6a6a6a;
  --rule: #000000;
  --accent: #000000;
  --accent-2: #000000;
  --selection: #000000;
}
[data-theme="brutalist"] ::selection { color: #fff; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01","ss02","calt","liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
body[data-crt="on"] { overflow-y: auto; overflow-x: hidden; }
body[data-crt="on"] html { overflow: visible; }
::selection { background: var(--selection); }

a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
a:hover { background: var(--selection); }

/* Ambient bg + scanlines */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(1200px 700px at 80% -10%, oklch(from var(--accent) l c h / 0.05), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, oklch(from var(--accent-2) l c h / 0.04), transparent 60%);
  pointer-events: none; z-index: 0;
}
body[data-scanlines="on"]::after {
  content: "";
  position: fixed; inset: 0;
  background: repeating-linear-gradient(to bottom,
    rgba(0,0,0,0.12) 0, rgba(0,0,0,0.12) 1px,
    transparent 1px, transparent 3px);
  mix-blend-mode: multiply;
  pointer-events: none; z-index: 9998; opacity: .55;
}

/* App shell — single screen */
.shell {
  position: relative; z-index: 1;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  gap: 10px;
  padding: var(--pad);
  max-width: var(--maxw);
  margin: 0 auto;
}

/* Title bar */
.titlebar {
  position: relative;
  z-index: 100;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--bg-elev);
  flex: 0 0 auto;
}
[data-theme="brutalist"] .titlebar { border-radius: 0; border-width: 2px; }

.dots { display: inline-flex; gap: 6px; }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: oklch(0.7 0.18 25); }
.dot.y { background: oklch(0.82 0.14 85); }
.dot.g { background: oklch(0.78 0.15 145); }
[data-theme="brutalist"] .dot { background: #000; border-radius: 0; }

.title-path { font-size: 15px; color: var(--fg-mute); letter-spacing: 0.02em; }

/* ─── Reboot button (centered in title bar) ─── */
.reboot-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: transparent;
  color: var(--fg-mute);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: color .12s, border-color .12s, background .12s;
  z-index: 5;
}
.reboot-btn:hover {
  color: oklch(0.55 0.21 25);
  border-color: oklch(0.55 0.21 25 / 0.55);
  background: oklch(0.55 0.21 25 / 0.06);
}
.reboot-btn:hover svg { animation: rebootSpin 0.6s ease; }
.reboot-btn svg { transition: transform .15s ease; flex-shrink: 0; }
@keyframes rebootSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}
[data-theme="brutalist"] .reboot-btn { border-radius: 0; border-width: 1.5px; }
@media (max-width: 600px) {
  .reboot-lbl { display: none; }
  .reboot-btn { padding: 4px 6px; }
}
.title-path .seg { color: var(--fg-dim); }
.title-path .acc { color: var(--accent); }
.title-meta {
  margin-left: auto;
  display: flex; gap: 14px;
  font-size: 14px; color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
}
.title-meta .pulse {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); margin-right: 6px; vertical-align: 0;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 oklch(from var(--ok) l c h / 0.55); }
  70%  { box-shadow: 0 0 0 8px oklch(from var(--ok) l c h / 0); }
  100% { box-shadow: 0 0 0 0 oklch(from var(--ok) l c h / 0); }
}

/* MENU button + popup */
.menu-wrap { position: relative; flex: 0 0 auto; }
.menu-btn {
  appearance: none;
  position: relative;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.16em;
  padding: 4px 8px 4px 10px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-left: 4px;
  transition: background .12s ease, color .12s ease;
}
.menu-btn:hover, .menu-btn[aria-expanded="true"] {
  background: var(--accent);
  color: var(--bg);
}
.menu-btn-icon { font-size: 11px; opacity: 0.8; }
[data-theme="brutalist"] .menu-btn { border-radius: 0; border-width: 1.5px; }

/* Back button — sits between dots and title-path */
.back-btn {
  appearance: none;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--fg-mute);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.14em;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-left: 2px;
  transition: border-color .12s, color .12s, background .12s, transform .08s;
}
.back-btn:hover:not(.disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: oklch(from var(--accent) l c h / 0.08);
}
.back-btn:active:not(.disabled) { transform: translateX(-1px); }
.back-btn.disabled { opacity: 0.3; cursor: not-allowed; }
.back-arr { font-size: 15.5px; line-height: 1; }
.back-lbl { font-size: 12.5px; }
[data-theme="brutalist"] .back-btn { border-radius: 0; border-width: 1.5px; }
@media (max-width: 480px) {
  .back-lbl { display: none; }
  .back-btn { padding: 3px 6px; }
}

/* Old-school dropdown */
.menu-pop-backdrop {
  position: fixed; inset: 0; z-index: 9998;
  background: transparent;
}
.menu-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 9999;
  min-width: 240px;
  background: var(--bg-elev);
  border: 1px solid var(--accent);
  box-shadow:
    4px 4px 0 0 oklch(0 0 0 / 0.4),
    inset 0 0 0 1px oklch(from var(--accent) l c h / 0.15);
  padding: 6px 0;
  font-size: 15px;
  display: none;
  pointer-events: none;
}
.menu-pop.open {
  display: block;
  pointer-events: auto;
  animation: menuPopIn .14s ease-out both;
}
@keyframes menuPopIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.menu-pop-h, .menu-pop-sep {
  padding: 4px 12px;
  color: var(--fg-mute);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  white-space: pre;
}
.menu-pop-sep { padding-top: 8px; }
.menu-pop-item {
  display: grid;
  grid-template-columns: 28px 1fr 16px;
  align-items: center;
  width: 100%;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--fg-dim);
  font: inherit;
  font-size: 15.5px;
  text-align: left;
  padding: 5px 12px;
  cursor: pointer;
}
.menu-pop-item:hover {
  background: var(--accent);
  color: var(--bg);
}
.menu-pop-item:hover .num,
.menu-pop-item:hover .arr { color: var(--bg); }
.menu-pop-item .num { color: var(--fg-mute); font-size: 12.5px; }
.menu-pop-item .lbl { color: var(--accent); }
.menu-pop-item:hover .lbl { color: var(--bg); }
.menu-pop-item .arr { color: var(--fg-mute); }
[data-theme="brutalist"] .menu-pop { border-radius: 0; border-width: 2px; box-shadow: 4px 4px 0 0 #000; }

/* Terminal panel */
.term-wrap { flex: 1 1 auto; min-height: 0; display: flex; }
.term {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-deep));
  padding: 18px clamp(16px, 2vw, 26px) 14px;
  min-height: 0;
  position: relative;
  isolation: isolate;
}
.term > * { position: relative; z-index: 2; }
[data-theme="brutalist"] .term { border-radius: 0; border-width: 2px; background: #fff; }

.content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  display: flex; flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: oklch(from var(--accent) l c h / 0.3) transparent;
}
.content::-webkit-scrollbar { width: 4px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: oklch(from var(--accent) l c h / 0.3); border-radius: 2px; }
.content::-webkit-scrollbar-thumb:hover { background: oklch(from var(--accent) l c h / 0.55); }

/* Bar = prompt input row, pinned at the bottom */
.bar { flex: 0 0 auto; padding-top: 10px; border-top: 1px dashed var(--rule); margin-top: 10px; }

/* ─── HOME SCREEN ─── */
.home {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center;
  gap: clamp(14px, 2.5vh, 28px);
  padding: 10px 4px;
}
.welcome-card {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--rule);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 16px;
  color: var(--fg-dim);
}
.welcome-card .asterisk { color: var(--accent); font-size: 17px; }
.welcome-card b { color: var(--fg); font-weight: 600; }
[data-theme="brutalist"] .welcome-card { border-radius: 0; border-width: 1.5px; }

.home-foot {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 4px;
}
.home-tag { color: var(--fg-mute); font-size: 15.5px; letter-spacing: 0.02em; }
.home-cta { color: var(--fg-dim); font-size: 16px; }
.home-cta .kbd {
  display: inline-block;
  border: 1px solid var(--rule);
  padding: 0 6px;
  border-radius: 4px;
  color: var(--accent);
  margin: 0 2px;
}

.home-quick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
  width: 100%;
  max-width: 1080px;
}
.home-link {
  appearance: none;
  display: grid;
  grid-template-columns: 28px max-content 1fr 16px;
  align-items: baseline;
  gap: 10px;
  background: transparent;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  color: var(--fg-dim);
  font: inherit;
  font-size: 15.5px;
  text-align: left;
  padding: 9px 12px;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.home-link:hover {
  background: oklch(from var(--accent) l c h / 0.08);
  border-color: var(--accent);
  color: var(--fg);
}
.home-link .hl-num { color: var(--fg-mute); font-size: 12.5px; letter-spacing: 0.1em; }
.home-link .hl-cmd { color: var(--accent); font-weight: 500; }
.home-link .hl-desc { color: var(--fg-mute); font-size: 14px; }
.home-link .hl-arr { color: var(--fg-mute); justify-self: end; }
.home-link:hover .hl-arr { color: var(--accent); transform: translateX(2px); transition: transform .12s ease, color .12s ease; }
[data-theme="brutalist"] .home-link { border-radius: 0; border-width: 1.5px; border-left-width: 3px; }

/* Big block-letter banner */
.big-banner {
  --cell: clamp(7px, 1.5vw, 14px);
  --gap: 0px;
  display: flex; flex-direction: column;
  gap: 0;
  filter: drop-shadow(0 0 18px oklch(from var(--accent) l c h / 0.18));
}
.big-row { display: flex; gap: 0; line-height: 0; }
.big-cell {
  width: var(--cell);
  height: var(--cell);
  display: inline-block;
  position: relative;
}
.big-cell.on {
  background: var(--accent);
  /* inner brick line */
  box-shadow:
    inset 0 -1px 0 0 oklch(from var(--accent) calc(l - 0.18) c h),
    inset 0 1px 0 0 oklch(from var(--accent) calc(l + 0.06) c h);
}
.big-cell.on::after {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px solid oklch(from var(--accent) calc(l - 0.22) c h / 0.55);
  pointer-events: none;
}
[data-theme="phosphor"] .big-cell.on::after { border-color: oklch(from var(--accent) calc(l - 0.35) c h / 0.65); }
[data-theme="brutalist"] .big-banner { filter: none; }
[data-theme="brutalist"] .big-cell.on { background: #000; box-shadow: none; }
[data-theme="brutalist"] .big-cell.on::after { border-color: #fff; }

/* ─── BOOT OVERLAY ─── */
.boot-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  animation: bootOverlayIn 0.25s ease both;
  cursor: default;
}
@keyframes bootOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.boot-center {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 16px;
  width: min(560px, 90vw);
  padding-bottom: 36px;
}
.boot-logo {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}
.boot-logo-j   { color: var(--fg); }
.boot-logo-dot { color: var(--accent); }
.boot-logo-pro { color: var(--accent); }
.boot-tagline  {
  font-size: 13px; color: var(--fg-mute);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-top: -6px;
}
.boot-bar-wrap {
  display: flex; align-items: center; gap: 8px;
  width: 100%; font-size: 15px;
}
.boot-bracket   { color: var(--fg-mute); flex-shrink: 0; }
.boot-rail      { flex: 1; }
.boot-pct-num   { color: var(--accent); font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; flex-shrink: 0; }
.boot-spinner   { color: var(--fg-mute); flex-shrink: 0; }
.boot-lines-wrap {
  width: 100%;
  min-height: 7em;
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: 2px;
}
.boot-line {
  color: var(--fg-dim);
  font-size: 15.5px;
  white-space: pre;
  animation: bootIn 0.18s ease both;
}
.boot-line-sm { font-size: 13.5px; }
.boot-ok { color: var(--ok); }
.boot-ready-badge {
  display: inline-block;
  color: var(--ok);
  font-weight: 600;
  letter-spacing: 0.06em;
  animation: readyPulse 0.8s ease-in-out infinite;
}
@keyframes readyPulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 6px oklch(from var(--ok) l c h / 0.6); }
  50%      { opacity: 0.55; text-shadow: 0 0 0 oklch(from var(--ok) l c h / 0); }
}
.boot-anykey {
  position: absolute;
  bottom: 32px;
  font-size: 13px;
  color: var(--accent-2);
  font-weight: 500;
  animation: anyKeyPop 1.6s ease forwards;
  pointer-events: none;
}
@keyframes anyKeyPop {
  0%   { opacity: 0; transform: translateY(6px); }
  18%  { opacity: 1; transform: translateY(0); }
  78%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-2px); }
}
@keyframes bootIn { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }

/* ─── tour-cmd / out — single block, scrolls if too tall ─── */
.tour-cmd, .cmd-output {
  flex: 1 1 auto;
  min-height: 0;
  display: flex; flex-direction: column;
  padding-top: 6px;
}
.entry-prompt { flex: 0 0 auto; }
.entry-out {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-top: 8px;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--fg-mute) transparent;
}
.entry-out::-webkit-scrollbar { width: 6px; }
.entry-out::-webkit-scrollbar-thumb { background: oklch(from var(--fg-mute) l c h / 0.5); border-radius: 3px; }

/* ─── Prompt ─── */
.prompt {
  display: inline-flex; align-items: baseline; gap: 0;
  color: var(--fg-dim); font-size: 16px;
  white-space: nowrap;
}
.prompt .who    { color: var(--accent); }
.prompt .at     { color: var(--fg-mute); }
.prompt .host   { color: var(--fg-dim); }
.prompt .colon  { color: var(--fg-mute); }
.prompt .path   { color: var(--accent-2); }
.prompt .sigil  { color: var(--fg); margin-right: 6px; }

.cmd { color: var(--fg); font-size: 16px; }

/* Cursor (caret) */
.cursor {
  display: inline-block;
  width: 0.6em; height: 1em;
  background: var(--accent);
  vertical-align: -0.13em;
  animation: blink 1.05s steps(1, end) infinite;
}
[data-cursor="bar"] .cursor       { width: 2px; }
[data-cursor="underscore"] .cursor{ height: 2px; vertical-align: -0.05em; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ─── Input row — caret follows typed text ─── */
.input-row {
  display: flex; align-items: baseline; gap: 0;
  font-size: 16px;
}
.input-shadow {
  position: relative;
  flex: 1 1 auto; min-width: 0;
  display: inline-flex; align-items: baseline;
}
.input-shadow .echo {
  color: var(--fg);
  white-space: pre;
}
.input-shadow .suggest {
  color: var(--fg-mute);
  opacity: 0.55;
  white-space: pre;
  pointer-events: none;
}
.input-shadow input {
  position: absolute; inset: 0;
  appearance: none; border: 0; outline: 0; background: transparent;
  color: transparent; caret-color: transparent;
  font: inherit; padding: 0;
}
.input-shadow .cursor { /* sits between echo and suggest */ }

/* skip button */
.skip-btn {
  appearance: none; border: 1px dashed var(--rule); background: transparent;
  color: var(--fg-mute); font: inherit; font-size: 15px;
  padding: 4px 10px; border-radius: 4px; cursor: pointer;
}
.skip-btn:hover { color: var(--fg); border-color: var(--fg-mute); }

/* Hint footer */
.hint {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 13px; color: var(--fg-mute);
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px dashed var(--rule);
}
.hint .k {
  border: 1px solid var(--rule);
  padding: 0 5px; border-radius: 3px;
  color: var(--fg-dim);
  margin-right: 4px;
}
.hint .acc { color: var(--accent); }
.hint-btn {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: color .12s ease;
}
.hint-btn:hover { color: var(--accent); }
.hint-btn:hover .k { border-color: var(--accent); color: var(--accent); }
.hint-btn:focus-visible { outline: 1px dashed var(--accent); outline-offset: 3px; }

/* ─── Output blocks (used by renderers) ─── */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 4px 0 4px 14px; }
.kv dt { color: var(--fg-mute); }
.kv dd { margin: 0; color: var(--fg); }
.kv dd .acc { color: var(--accent); }

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.tbl th, .tbl td {
  text-align: left;
  padding: 5px 12px 5px 0;
  border-bottom: 1px dashed var(--rule);
  vertical-align: top;
}
.tbl th { color: var(--fg-mute); font-weight: 500; font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.tbl td.num { font-variant-numeric: tabular-nums; color: var(--accent); }
.tbl td.tag { color: var(--accent-2); }
.tbl tr:last-child td { border-bottom: 0; }

.bullets { margin: 4px 0 4px 14px; padding: 0; list-style: none; }
.bullets li { position: relative; padding-left: 16px; color: var(--fg-dim); }
.bullets li::before {
  content: "›"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 600;
}
.bullets li b { color: var(--fg); font-weight: 500; }

.box {
  border: 1px solid var(--rule);
  padding: 10px 12px;
  margin: 8px 0;
  border-radius: 6px;
  background: oklch(from var(--bg) calc(l + 0.02) c h);
}
[data-theme="brutalist"] .box { border-radius: 0; border-width: 1.5px; background: #fff; }
.box .h { color: var(--fg); font-weight: 500; margin-bottom: 4px; }
.box .meta { color: var(--fg-mute); font-size: 14px; margin-bottom: 6px; }
.box .quote { color: var(--fg-dim); font-style: italic; }

.pill {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--fg-dim);
  margin: 0 4px 0 0;
  letter-spacing: 0.02em;
}
.pill.acc  { color: var(--accent);   border-color: oklch(from var(--accent) l c h / 0.5); }
.pill.acc2 { color: var(--accent-2); border-color: oklch(from var(--accent-2) l c h / 0.5); }
[data-theme="brutalist"] .pill { border-radius: 0; border-width: 1.5px; }

.metric {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr max-content;
  gap: 14px; align-items: baseline;
  padding: 4px 0;
  font-variant-numeric: tabular-nums;
}
.metric .lbl { color: var(--fg-mute); font-size: 14px; }
.metric .v    { color: var(--fg); font-weight: 600; white-space: nowrap; }

.ascii-bar    { display: block; white-space: nowrap; overflow: hidden; font-size: 14px; letter-spacing: 0; line-height: 1; }
.ascii-filled { color: var(--accent); }
.ascii-empty  { color: var(--fg-mute); opacity: 0.25; }
.ascii-pct    { color: var(--fg-mute); font-size: 12px; font-variant-numeric: tabular-nums; }

.help-grid {
  display: grid; grid-template-columns: max-content 1fr; gap: 3px 18px;
  margin: 6px 0 0 14px;
}
.help-grid .c { color: var(--accent); }
.help-grid .d { color: var(--fg-dim); }

.out { color: var(--fg-dim); white-space: pre-wrap; }
.out.indent { padding-left: 14px; }

.reveal { animation: reveal .35s ease both; opacity: 1; }
@keyframes reveal { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } }

/* ─── MOBILE DRAWER (removed) ─── */

/* ─── CRT BEZEL ─── */
body[data-crt="on"] {
  background:
    radial-gradient(ellipse at 50% 40%, oklch(from var(--bg) calc(l + 0.04) c h) 0%, var(--bg) 55%, oklch(from var(--bg) calc(l - 0.04) c h) 100%);
}
body[data-crt="on"] .shell {
  /* outer monitor housing */
  --bezel: oklch(0.28 0.015 250);
  --bezel-edge: oklch(0.18 0.012 250);
  --bezel-shine: oklch(0.42 0.015 250);
  max-width: min(1240px, 96vw);
  margin: clamp(20px, 3vh, 40px) auto clamp(40px, 6vh, 70px);
  padding: clamp(22px, 3vw, 38px) clamp(22px, 3vw, 38px) clamp(34px, 4vw, 52px);
  border-radius: 28px;
  background:
    linear-gradient(180deg, var(--bezel-shine), var(--bezel) 18%, var(--bezel) 82%, var(--bezel-edge));
  box-shadow:
    inset 0 1px 0 oklch(from var(--bezel) calc(l + 0.18) c h / 0.7),
    inset 0 -2px 0 oklch(from var(--bezel-edge) calc(l - 0.12) c h),
    inset 0 0 0 1px oklch(0 0 0 / 0.4),
    0 30px 60px -20px oklch(0 0 0 / 0.7),
    0 60px 80px -40px oklch(0 0 0 / 0.5);
  height: auto;
  min-height: calc(100dvh - 80px);
  position: relative;
}
[data-theme="warm"] body[data-crt="on"] .shell,
body[data-crt="on"][data-theme="warm"] .shell { /* fallback */ }
body[data-crt="on"][data-theme="warm"] .shell,
[data-theme="warm"] .shell { /* not used; keep cascade */ }

/* per-theme bezel tints */
[data-theme="warm"] ~ * { /* placeholder */ }

/* Scoped via :root [data-theme] on html element — body[data-crt][data-theme]  doesn't cascade.
   Instead use html[data-theme] body[data-crt] selector chain: */
html[data-theme="warm"] body[data-crt="on"] .shell {
  --bezel: oklch(0.78 0.02 70);
  --bezel-edge: oklch(0.62 0.02 60);
  --bezel-shine: oklch(0.88 0.02 80);
}
html[data-theme="phosphor"] body[data-crt="on"] .shell {
  --bezel: oklch(0.22 0.01 145);
  --bezel-edge: oklch(0.12 0.008 145);
  --bezel-shine: oklch(0.34 0.012 145);
}
html[data-theme="brutalist"] body[data-crt="on"] .shell {
  --bezel: #111;
  --bezel-edge: #000;
  --bezel-shine: #2a2a2a;
  border-radius: 0;
}

/* power LED */
body[data-crt="on"] .shell::before {
  content: "";
  position: absolute;
  right: 26px; bottom: 14px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), inset 0 0 2px oklch(from var(--accent) calc(l + 0.2) c h);
  animation: ledPulse 3s ease-in-out infinite;
}
@keyframes ledPulse {
  0%, 100% { opacity: 0.65; }
  50%      { opacity: 1; }
}
/* brand badge */
body[data-crt="on"] .shell::after {
  content: "JWINKLER • PRO-25";
  position: absolute;
  left: 50%; bottom: 12px;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: oklch(0 0 0 / 0.45);
  font-weight: 600;
}
html[data-theme="warm"] body[data-crt="on"] .shell::after { color: oklch(0.4 0.02 60 / 0.55); }
html[data-theme="phosphor"] body[data-crt="on"] .shell::after { color: oklch(0.5 0.05 145 / 0.55); }
html[data-theme="brutalist"] body[data-crt="on"] .shell::after { color: #888; }

/* CRT screen — give the term/titlebar a recessed, slightly curved look */
body[data-crt="on"] .titlebar,
body[data-crt="on"] .term {
  position: relative;
  isolation: isolate;
}
body[data-crt="on"] .term {
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 1px oklch(0 0 0 / 0.7),
    inset 0 0 24px oklch(0 0 0 / 0.55),
    inset 0 0 80px oklch(from var(--accent) l c h / 0.06),
    0 0 0 6px oklch(0 0 0 / 0.4);
}
body[data-crt="on"] .term::before {
  /* curved screen vignette */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 55%, oklch(0 0 0 / 0.35) 100%);
  pointer-events: none;
  z-index: 1;
}
body[data-crt="on"] .term::after {
  /* subtle glass highlight (top-left sweep) */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(115deg, oklch(1 0 0 / 0.04) 0%, oklch(1 0 0 / 0) 35%),
    repeating-linear-gradient(to bottom,
      oklch(0 0 0 / 0.04) 0, oklch(0 0 0 / 0.04) 1px,
      transparent 1px, transparent 3px);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 3;
}
html[data-theme="brutalist"] body[data-crt="on"] .term { border-radius: 0; }
html[data-theme="brutalist"] body[data-crt="on"] .term::after { background: none; }

body[data-crt="on"] .titlebar {
  border-radius: 14px 14px 0 0;
  margin-bottom: -2px;
  border-bottom: 0;
}
body[data-crt="on"] .term { border-top-left-radius: 0; border-top-right-radius: 0; }

/* CRT power-on flash — tiny scanline collapse */
body[data-crt="on"] .shell { animation: crtBoot 0.6s ease-out both; opacity: 1; }
@keyframes crtBoot {
  0%   { opacity: 0; transform: scaleY(0.01); filter: brightness(2); }
  35%  { opacity: 1; transform: scaleY(0.6); filter: brightness(1.4); }
  100% { opacity: 1; transform: scaleY(1); filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-crt="on"] .shell { animation: none; }
}

@media (max-width: 720px) {
  body[data-crt="on"] .shell {
    margin: 10px;
    padding: 14px 14px 26px;
    border-radius: 18px;
    min-height: calc(100dvh - 20px);
  }
  body[data-crt="on"] .shell::after { font-size: 9.5px; bottom: 8px; }
  body[data-crt="on"] .shell::before { right: 14px; bottom: 9px; }

  .titlebar { padding: 8px 10px; gap: 8px; flex-wrap: nowrap; }
  .title-meta { gap: 10px; font-size: 12.5px; }
  .title-meta span:nth-child(3) { display: none; }
  .title-path { font-size: 13px; }
  .title-path .seg:last-child { display: none; }
  .term { padding: 14px 14px 10px; }
  .hint { display: none; }
  .home { gap: 14px; padding: 4px 0; }
  .home-quick { grid-template-columns: 1fr; gap: 6px; max-width: 100%; }
  .big-banner { --cell: clamp(5px, 4.4vw, 11px); }
  .menu-pop {
    position: fixed;
    right: 10px; left: 10px;
    min-width: 0;
    top: calc(var(--pad) + 46px);
  }

  .welcome-card { font-size: 15px; padding: 6px 10px; }
  .home-tag { font-size: 14.5px; }
  .home-cta { font-size: 15px; }
}
@media (max-width: 480px) {
  .titlebar .dots { display: none; }
  .titlebar .title-path { font-size: 12.5px; }
  .titlebar .title-meta span:nth-child(2) { display: none; }
  .menu-btn { font-size: 12.5px; padding: 4px 6px 4px 8px; letter-spacing: 0.12em; }
  .big-banner { --cell: clamp(4px, 4.2vw, 9px); }
  .home-tag { font-size: 14px; }
}


/* ── publications ───────────────────────── */
.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 8px 0 0;
}
.pub {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  transition: border-color .12s, background .12s, transform .12s;
}
.pub:hover {
  border-color: var(--accent);
  background: oklch(from var(--accent) l c h / 0.05);
  transform: translateY(-1px);
}
.pub-cover {
  position: relative;
  width: 64px; height: 92px;
  background: linear-gradient(135deg,
    oklch(from var(--accent) calc(l - 0.15) c h) 0%,
    oklch(from var(--accent) calc(l - 0.05) c h) 100%);
  border-radius: 1px 4px 4px 1px;
  box-shadow:
    inset 1px 0 0 rgba(255,255,255,0.08),
    inset -1px 0 0 rgba(0,0,0,0.25),
    2px 2px 0 oklch(from var(--accent) calc(l - 0.25) c h),
    3px 3px 0 var(--rule);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 6px 6px 10px;
}
.pub-cover-spine {
  position: absolute;
  left: 4px; top: 0; bottom: 0;
  width: 2px;
  background: rgba(0,0,0,0.35);
}
.pub-cover-text {
  font-family: var(--font-display, var(--font-mono));
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
.pub-cover-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
  word-break: break-word;
}
.pub-cover-byline {
  font-size: 7px;
  opacity: 0.85;
  margin-top: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pub-cover-bars {
  font-size: 6px;
  color: rgba(255,255,255,0.5);
  letter-spacing: -0.5px;
  line-height: 1;
}
.pub-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pub-year { color: var(--accent); font-size: 13px; font-variant-numeric: tabular-nums; }
.pub-title { font-size: 15.5px; font-weight: 600; line-height: 1.25; color: var(--fg); }
.pub-sub { font-size: 14px; color: var(--fg-mute); line-height: 1.35; flex: 1; }
.pub-foot {
  font-size: 12.5px;
  color: var(--fg-mute);
  display: flex; gap: 6px; align-items: center;
  margin-top: 4px;
}
.pub-foot .dot { color: var(--rule); }

/* ── publications 2×2 image grid ─── */
.pub-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 0;
}
.pub2 {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  min-height: 0;
}
.pub2:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px oklch(from var(--accent) l c h / 0.12);
}
.pub2-img-wrap {
  width: 130px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pub2-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform .3s ease;
}
.pub2:hover .pub2-img { transform: scale(1.04); }
.pub2-img-fallback {
  font-size: 36px;
  color: var(--accent);
  opacity: 0.4;
}
.pub2-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 13px;
  flex: 1;
  min-width: 0;
}
.pub2-year {
  font-size: 12px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.pub2-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--fg);
}
.pub2-sub {
  font-size: 12.5px;
  color: var(--fg-mute);
  line-height: 1.35;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pub2-foot {
  font-size: 12px;
  color: var(--fg-mute);
  margin-top: 2px;
}
.pub-stars {
  display: flex;
  align-items: center;
  gap: 1px;
  font-size: 13px;
  margin-top: 2px;
  line-height: 1;
}
.stars-filled { color: oklch(0.82 0.16 75); }
.stars-half   { color: oklch(0.82 0.16 75); font-size: 11px; }
.stars-empty  { color: var(--fg-mute); opacity: 0.45; }
.stars-score  { font-size: 12px; color: var(--fg-dim); margin-left: 3px; }
.stars-count  { font-size: 11px; color: var(--fg-mute); }

/* ── links ───────────────────────── */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 4px 18px;
  margin: 4px 0 4px 14px;
}
.link-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  text-decoration: none;
  color: var(--fg);
  border-bottom: 1px dashed transparent;
}
.link-row:hover { border-bottom-color: var(--rule); }
.link-row:hover .link-arrow { color: var(--accent); transform: translateX(2px); }
.link-row:hover .link-v { color: var(--accent); }
.link-k {
  color: var(--fg-mute);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 70px;
  flex-shrink: 0;
}
.link-arrow {
  color: var(--rule);
  font-size: 14.5px;
  transition: color .12s, transform .12s;
}
.link-v {
  font-size: 15px;
  color: var(--fg);
  transition: color .12s;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* ── selfie ───────────────────────── */
.selfie {
  font-family: var(--font-mono);
  font-size: clamp(5px, 1vw, 8px);
  line-height: 1.0;
  letter-spacing: 0;
  color: var(--accent);
  text-shadow: 0 0 1px oklch(from var(--accent) l c h / 0.4);
  margin: 6px 0 4px 14px;
  white-space: pre;
  user-select: none;
}
.selfie-cap {
  margin: 6px 0 0 14px;
  font-size: 14.5px;
}
.selfie-cap .dim { color: var(--fg-mute); }

/* ── tree ───────────────────────── */
.tree {
  margin: 4px 0 4px 14px;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.55;
}
.tree-row { display: flex; gap: 14px; align-items: baseline; }
.tree-l {
  color: var(--accent);
  white-space: pre;
  flex-shrink: 0;
  min-width: 240px;
}
.tree-l:first-child { color: var(--fg); }
.tree-c { color: var(--fg-mute); font-size: 14px; }

/* ── rm easter egg ───────────────────────── */
.rm-art {
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 13.5px;
  margin: 6px 0 0 14px;
  white-space: pre;
  line-height: 1.25;
  text-shadow: 0 0 6px oklch(from var(--accent-2) l c h / 0.4);
}

/* ── fortune ───────────────────────── */
.fortune-wrap { padding: 4px 0; display: flex; flex-direction: column; gap: 18px; }
.cookie {
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1.0;
  text-shadow:
    0 0 2px var(--cookie-glow, currentColor),
    0 0 12px oklch(from var(--cookie-glow, currentColor) l c h / 0.35);
  margin: 0 0 0 14px;
  white-space: pre;
  user-select: none;
  animation: cookieIn 0.4s ease-out both;
}
@keyframes cookieIn {
  0%   { opacity: 0; transform: translateY(8px) scale(0.96); }
  100% { opacity: 1; transform: none; }
}
.fortune-box {
  position: relative;
  margin: 4px 0 0 14px;
  padding: 18px 24px 16px 56px;
  border-left: 3px solid var(--accent);
  background: oklch(from var(--accent) l c h / 0.04);
  max-width: 640px;
}
.fortune-q {
  position: absolute;
  left: 14px; top: 6px;
  font-family: var(--font-display, Georgia, serif);
  font-size: 56px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.45;
}
.fortune-text {
  font-size: 18px;
  line-height: 1.5;
  color: var(--fg);
}
.fortune-attr {
  margin-top: 10px;
  font-size: 13px;
  color: var(--fg-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* mobile pubs */
@media (max-width: 720px) {
  .pub-grid  { grid-template-columns: 1fr; }
  .pub-grid2 { grid-template-columns: 1fr; }
  .pub2-img-wrap { width: 100px; }
  .pub2-sub { -webkit-line-clamp: 2; }
  .links-grid { grid-template-columns: 1fr; margin-left: 0; }
  .tree-l { min-width: 180px; }
  .selfie { font-size: clamp(4.5px, 1.6vw, 7px); margin-left: 0; }
}


/* ─── Funny shell aliases ─── */
.shell-out, .shell-err, .shell-dim, .shell-hint {
  margin: 0 0 0 14px;
  padding: 0;
  font: inherit;
  font-size: 15.5px;
  white-space: pre-wrap;
  line-height: 1.55;
}
.shell-out  { color: var(--fg-dim); }
.shell-err  { color: var(--accent-2); }
.shell-dim  { color: var(--fg-mute); font-style: italic; }
.shell-hint { color: var(--accent); margin-top: 4px; }

/* ─── php bin/magento ─── */
.magento-ascii {
  margin: 4px 0 6px 14px;
  padding: 0;
  font: inherit;
  font-size: 11px;
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--accent);
  filter: drop-shadow(0 0 12px oklch(from var(--accent) l c h / 0.25));
  white-space: pre;
}
[data-theme="warm"]      .magento-ascii { color: oklch(0.55 0.18 30); }
[data-theme="brutalist"] .magento-ascii { color: #000; filter: none; }
.magento-cap {
  margin: 0 0 8px 14px;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.magento-cap .dim { color: var(--fg-mute); }
.magento-out {
  margin: 4px 0 0 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.magento-line {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  align-items: baseline;
  color: var(--fg-dim);
  font-size: 15px;
}
.magento-ok {
  color: oklch(0.78 0.15 145);
  font-weight: 500;
  letter-spacing: 0.02em;
}
[data-theme="brutalist"] .magento-ok { color: #000; }
.magento-note {
  margin-top: 6px;
  color: var(--fg-mute);
  font-size: 14px;
  font-style: italic;
}


/* ─── Magento sage / quip line ─── */
.magento-quip {
  margin-top: 8px;
  margin-left: 0;
  color: var(--fg-mute);
  font-size: 14px;
  font-style: italic;
  line-height: 1.55;
  border-left: 2px solid oklch(from var(--accent) l c h / 0.4);
  padding-left: 10px;
}
[data-theme="brutalist"] .magento-quip { border-left-color: #000; font-style: normal; }

/* ─── Contact gate (solve to reveal email) ─── */
.contact-gate {
  margin-left: 14px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  background: oklch(from var(--accent) l c h / 0.03);
  max-width: 520px;
}
[data-theme="brutalist"] .contact-gate { border-radius: 0; border-width: 1.5px; border-left-width: 3px; background: #fff; }

.cg-prompt {
  font-size: 14.5px;
  color: var(--fg-dim);
  margin-bottom: 10px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
}
.cg-tag { color: var(--accent-2); letter-spacing: 0.04em; font-size: 12.5px; }
.cg-eq { font-variant-numeric: tabular-nums; color: var(--fg); }
.cg-num { color: var(--accent); font-weight: 500; }
.cg-op  { color: var(--fg-mute); }
.cg-q   { color: var(--accent-2); }

.cg-form {
  display: flex; align-items: center; gap: 8px;
  font-size: 15.5px;
}
.cg-prefix { color: var(--accent); font-weight: 500; }
.cg-input {
  flex: 1;
  min-width: 0;
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--rule);
  color: var(--fg);
  font: inherit;
  font-size: 15.5px;
  padding: 4px 2px;
  outline: none;
  font-variant-numeric: tabular-nums;
}
.cg-input::placeholder { color: var(--fg-mute); opacity: 0.6; }
.cg-input:focus { border-bottom-color: var(--accent); }
.cg-btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.cg-btn:hover { background: var(--accent); color: var(--bg); }
[data-theme="brutalist"] .cg-btn { border-radius: 0; border-width: 1.5px; }

@keyframes cgShake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  40%      { transform: translateX(4px); }
  60%      { transform: translateX(-2px); }
  80%      { transform: translateX(2px); }
}
.cg-shake { animation: cgShake .38s ease-in-out; }

.cg-err {
  margin-top: 8px;
  color: var(--accent-2);
  font-size: 13.5px;
  font-style: italic;
}

.cg-solved { animation: reveal .4s ease both; }
.cg-ok {
  color: oklch(0.78 0.15 145);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
[data-theme="brutalist"] .cg-ok { color: #000; }
.cg-email-row {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.cg-elabel {
  color: var(--fg-mute);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cg-email {
  font-size: 16px;
  color: var(--accent);
  border-bottom: 1px dotted var(--accent);
}
.cg-copy {
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--fg-mute);
  font: inherit;
  font-size: 12.5px;
  padding: 3px 9px;
  border-radius: 3px;
  cursor: pointer;
  margin-left: auto;
  transition: all .12s ease;
}
.cg-copy:hover { color: var(--accent); border-color: var(--accent); }
.cg-copy[data-copied="1"]::after { content: " ✓"; color: oklch(0.78 0.15 145); }
[data-theme="brutalist"] .cg-copy { border-radius: 0; }


/* ─── Boot progress bar ─── */
.boot-bar {
  margin: 0 0 14px 0;
  display: flex; flex-direction: column; gap: 6px;
  max-width: 580px;
}
.bb-rail {
  position: relative;
  height: 14px;
  border: 1px solid var(--rule);
  background: oklch(from var(--accent) l c h / 0.05);
  padding: 2px;
  border-radius: 2px;
  overflow: hidden;
}
.bb-fill {
  position: relative;
  height: 100%;
  background: var(--accent);
  background-image: repeating-linear-gradient(
    90deg,
    oklch(from var(--accent) calc(l - 0.05) c h) 0,
    oklch(from var(--accent) calc(l - 0.05) c h) 10px,
    var(--accent) 10px,
    var(--accent) 20px
  );
  transition: width .22s cubic-bezier(.2,.8,.3,1);
  box-shadow: 0 0 12px oklch(from var(--accent) l c h / 0.4);
}
.bb-shimmer {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 32px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    oklch(from var(--accent) calc(l + 0.18) c h / 0.6) 50%,
    transparent 100%
  );
  animation: bbShimmer 1.1s linear infinite;
}
@keyframes bbShimmer {
  from { transform: translateX(-32px); }
  to   { transform: translateX(32px); }
}
.bb-meta {
  display: flex; gap: 14px; align-items: baseline;
  color: var(--fg-mute);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.bb-pct { color: var(--accent); font-weight: 500; min-width: 4ch; }
.bb-frac { color: var(--fg-dim); }
.bb-spinner {
  margin-left: auto;
  color: var(--accent-2);
  font-size: 16px;
  animation: bbSpin 0.6s steps(1, end) infinite;
}
@keyframes bbSpin { 50% { opacity: 0.5; } }

[data-theme="brutalist"] .bb-rail { border-radius: 0; border-width: 1.5px; }
[data-theme="brutalist"] .bb-fill { background: #000; box-shadow: none; }
[data-theme="brutalist"] .bb-shimmer { display: none; }

/* ─── "coming soon" placeholder block ─── */
.coming-soon {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 40px 20px;
  min-height: 200px;
}
.cs-glyph {
  font-size: clamp(38px, 7vw, 64px);
  color: var(--accent);
  line-height: 1;
  animation: csFloat 3.6s ease-in-out infinite;
  text-shadow: 0 0 24px oklch(from var(--accent) l c h / 0.35);
}
@keyframes csFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.cs-title {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0.01em;
}
.cs-sub {
  font-size: 14px;
  color: var(--fg-mute);
  max-width: 460px;
  line-height: 1.5;
}

/* ─── BETA ribbon ─── */
.beta-ribbon {
  position: fixed;
  bottom: 12px;
  left: 12px;
  z-index: 9500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: oklch(0.55 0.21 25);
  color: #fff;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 0;
  border-radius: 3px;
  box-shadow: 0 2px 12px oklch(0.55 0.21 25 / 0.4);
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.beta-ribbon:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px oklch(0.55 0.21 25 / 0.55);
}
.beta-ribbon:active { transform: translateY(0); }
.beta-ribbon .beta-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff;
  animation: betaPulse 1.4s ease-in-out infinite;
}
.beta-ribbon .beta-sub {
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.85;
  margin-left: 2px;
}
@keyframes betaPulse {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
  60%      { opacity: 0.5; box-shadow: 0 0 0 6px rgba(255,255,255,0); }
}
@media (max-width: 480px) {
  .beta-ribbon .beta-sub { display: none; }
}

/* BETA popup */
.beta-popup-backdrop {
  position: fixed; inset: 0; z-index: 9550;
  background: transparent;
}
.beta-popup {
  position: fixed;
  bottom: 52px;
  left: 12px;
  z-index: 9600;
  width: min(320px, 90vw);
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px oklch(0.55 0.21 25 / 0.15);
  font-family: var(--mono);
  animation: betaPopIn 0.18s ease both;
}
@keyframes betaPopIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.beta-popup-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px dashed var(--rule);
}
.beta-popup-tag {
  font-size: 11px; color: oklch(0.55 0.21 25);
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600;
}
.beta-popup-x {
  appearance: none; border: 0; background: transparent;
  color: var(--fg-mute); font: 16px/1 var(--mono); cursor: pointer;
  padding: 2px 6px; border-radius: 3px;
}
.beta-popup-x:hover { color: var(--fg); background: oklch(0.55 0.21 25 / 0.12); }
.beta-popup-body { padding: 12px 14px 14px; }
.beta-popup-title {
  font-size: 16px; font-weight: 700; color: var(--fg);
  font-style: italic; margin-bottom: 6px;
}
.beta-popup-text {
  font-size: 13.5px; color: var(--fg-dim); line-height: 1.4;
}
.beta-popup-sub {
  font-size: 12px; color: var(--fg-mute); margin-top: 8px;
}

/* ─── Claude credit ─── */
.claude-credit {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 9500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px 6px 9px;
  background: oklch(from var(--bg-elev) l c h / 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--rule);
  color: var(--fg-dim);
  font: 11.5px/1 var(--mono);
  letter-spacing: 0.02em;
  border-radius: 999px;
  text-decoration: none;
  user-select: none;
  transition: color .15s, border-color .15s, transform .12s;
}
.claude-credit:hover {
  color: var(--fg);
  border-color: oklch(0.72 0.16 60 / 0.6);
  transform: translateY(-1px);
  background: oklch(from var(--bg-elev) l c h / 0.95);
}
.claude-icon {
  width: 14px; height: 14px;
  color: oklch(0.72 0.16 60); /* Claude orange */
  flex-shrink: 0;
  animation: claudeSpin 18s linear infinite;
}
.claude-credit:hover .claude-icon { animation-duration: 4s; }
@keyframes claudeSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.claude-credit-text { white-space: nowrap; }
.claude-credit-text b { color: var(--fg); font-weight: 600; }
.claude-credit-sub {
  color: var(--fg-mute);
  margin-left: 4px;
}
@media (max-width: 600px) {
  .claude-credit-sub { display: none; }
  .claude-credit { padding: 6px 10px 6px 8px; font-size: 11px; }
}
@media (max-width: 380px) {
  .claude-credit-text { display: none; }
}
