/* ============================================================
   bolo.capital — panelled terminal
   Shared design system. Every page links this; page-specific
   rules stay in that page's own <style> block.

   The one rule: panels are fills with a lit edge. The gutter
   (--gutter, 10px of near-black between panels) carries the
   structure; the 1px gold hairline only lights the edge.
   ============================================================ */

:root {
  --gutter: #04070c;
  --panel: #0b1424;
  --panel-2: #0e1a2c;
  --base: #050b14;

  --gold: #fabb18;
  --cyan: #22d3ee;
  --green: #6bbe60;
  --cream: #f2eee8;
  --grey: #9aa8b5;
  --grey-dim: #8b95a1;
  --red: #ff6b6b;

  --line: rgba(250, 187, 24, .18);
  --gold-line: rgba(250, 187, 24, .16);
  --line-soft: rgba(250, 187, 24, .12);
  --line-cyan: rgba(34, 211, 238, .28);

  --gap: 10px;
  --pad: 24px;
  --max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--gutter); }

body {
  min-height: 100vh;
  color: var(--cream);
  font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--cyan); }
::selection { background: rgba(34, 211, 238, .3); color: var(--cream); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.03em; }

img, svg { display: block; }

/* ---------- the page shell: one column of panels ---------- */
.sheet {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ---------- panel ---------- */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
}
.panel--raised { background: var(--panel-2); }
.panel--pad { padding: 22px 24px; }

/* caption strip: the panel's header rail */
.cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 20px;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--grey-dim);
}
.cap b { font-weight: 700; color: var(--gold); }
.cap .ok { display: inline-flex; align-items: center; gap: 7px; color: var(--green); }
.cap .warn { color: var(--gold); }

.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  animation: boloPulse 2.4s ease-in-out infinite;
}

/* ---------- type scale ---------- */
.h-hero { font-size: clamp(30px, 4.6vw, 62px); line-height: 1.04; color: var(--cream); text-wrap: balance; }
.h-sect { font-size: clamp(22px, 2.6vw, 34px); line-height: 1.1; color: var(--cream); text-wrap: balance; }
.h-item { font-size: clamp(17px, 1.6vw, 20px); letter-spacing: -.02em; color: var(--gold); }
.h-beat { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.03em; color: var(--gold); }

.lede-p { margin: 0; color: var(--grey); font-size: 12.5px; line-height: 1.75; text-wrap: pretty; }
.body-p { margin: 0; color: var(--grey); font-size: 13px; line-height: 1.8; text-wrap: pretty; }
.tag { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.cta { font-size: 12px; color: var(--cyan); }

/* an inverted block — one per section, the whole licence for volume */
.shout {
  display: inline-flex; align-items: center;
  background: var(--gold); color: var(--base);
  padding: 6px 13px;
  font-size: 12px; font-weight: 800; letter-spacing: .13em;
}
.shout--green { background: var(--green); }

/* ---------- ambient texture ---------- */
.grid-bg, .scan-bg, .sweep-bg {
  position: absolute; inset: 0; pointer-events: none;
}
.grid-bg {
  background-image:
    linear-gradient(rgba(34, 211, 238, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .05) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: boloDrift 26s linear infinite;
}
.scan-bg { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 4px); }
.sweep-bg {
  inset: 0 0 auto 0; height: 46px;
  background: linear-gradient(to bottom, transparent, rgba(34, 211, 238, .08), transparent);
  animation: boloSweep 9s linear infinite;
}
.on-top { position: relative; z-index: 1; }

/* ---------- animations ---------- */
@keyframes boloDrift { to { background-position: 60px 60px, 60px 60px; } }
@keyframes boloSweep { 0% { transform: translateY(-100%); } 100% { transform: translateY(900%); } }
@keyframes boloPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes boloBlink { 0%, 48% { opacity: 1; } 49%, 100% { opacity: 0; } }
@keyframes boloTicker { to { transform: translateX(-50%); } }
@keyframes boloFlicker { 0%, 100% { opacity: 1; } 3% { opacity: .88; } 6% { opacity: 1; } 51% { opacity: .94; } 54% { opacity: 1; } }
@keyframes boloRadar { to { transform: rotate(360deg); } }
/* opacity, not box-shadow: box-shadow repaints every frame and is costly on phones */
@keyframes boloBreathe { 0%, 100% { opacity: .72; } 50% { opacity: 1; } }
@keyframes boloSlowSpin { to { transform: rotate(360deg); } }

/* ---------- skip link ---------- */
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 210;
  transform: translateY(-160%);
  border: 1px solid var(--cyan); background: var(--base);
  padding: 9px 12px; color: var(--cream); font-size: 12px;
  transition: transform 180ms ease;
}
.skip:focus { transform: translateY(0); }

/* ---------- boot overlay ---------- */
.boot {
  position: fixed; inset: 0; z-index: 200;
  display: none; place-items: center;
  background: #03070e; cursor: pointer;
  transition: opacity 320ms ease;
}
.boot.is-on { display: grid; }
.boot-inner { width: min(560px, 88vw); color: var(--green); font-size: 13px; line-height: 2; }
.boot-inner > [data-boot] { white-space: pre-wrap; }
.boot-hint { margin-top: 18px; color: var(--grey-dim); font-size: 11px; }

/* ---------- prompt bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 100;
  width: min(var(--max), 100%); margin: 0 auto;
  padding: 0 var(--pad);
}
.bar-panel {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px;
  background: rgba(11, 20, 36, .92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  padding: 10px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand svg { filter: drop-shadow(0 0 8px rgba(250, 187, 24, .35)); }
.brand span { font-size: 14px; font-weight: 800; letter-spacing: -.01em; color: var(--cream); }
a.brand:hover span { color: var(--gold); }

.cmds { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; flex: 1 1 auto; }
.cmd {
  min-height: 40px; border: 0; background: transparent; padding: 0;
  color: var(--grey); font: inherit; font-size: 12.5px; cursor: pointer;
  transition: color 160ms ease;
}
.cmd:hover { color: var(--gold); }

.prompt {
  display: flex; align-items: center; gap: 9px;
  flex: 0 1 340px; min-width: 200px;
  background: var(--gutter); border: 1px solid rgba(250, 187, 24, .22);
  padding: 7px 13px;
}
.prompt > .caret-glyph { color: var(--green); font-size: 12.5px; }
.prompt input {
  flex: 1; min-width: 0; border: 0; background: transparent;
  color: var(--cream); font: inherit; font-size: 12px; outline: none;
}
.caret { width: 7px; height: 14px; background: var(--cyan); animation: boloBlink 1.1s steps(1) infinite; }

.lang {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; min-width: 44px;
  border: 1px solid var(--line-cyan); padding: 0 12px;
  color: var(--cyan); font-size: 12px; white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease;
}
.lang:hover { background: rgba(34, 211, 238, .08); border-color: var(--cyan); }

.out { border: 1px solid var(--line-cyan); border-top: 0; background: rgba(34, 211, 238, .045); }
.out-inner { padding: 9px 20px; color: var(--cyan); font-size: 12.5px; }

/* ---------- ticker: the widened gutter ---------- */
.ticker {
  overflow: hidden;
  border-top: 1px solid rgba(250, 187, 24, .16);
  border-bottom: 1px solid rgba(250, 187, 24, .16);
  background: var(--gutter);
  padding: 17px 0;
}
.ticker-track {
  display: flex; width: max-content;
  font-size: 11.5px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase;
  color: #947526;
  animation: boloTicker 42s linear infinite;
}
.ticker-track span { padding-right: 22px; }
.ticker-track .sep { color: var(--gold); }

/* ---------- experiment / project cards ---------- */
.procs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.proc {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--cream);
  animation: boloFlicker 9s linear infinite;
  transition: border-color 200ms ease, box-shadow 220ms ease, transform 220ms ease;
}
.proc:nth-child(2) { animation-duration: 11s; animation-delay: -2s; }
.proc:nth-child(3) { animation-duration: 8s; }
.proc:nth-child(4) { animation-duration: 12s; animation-delay: -4s; }
.proc:nth-child(5) { animation-duration: 10s; animation-delay: -1s; }
.proc:nth-child(6) { animation-duration: 9.5s; animation-delay: -3s; }
.proc:nth-child(7) { animation-duration: 13s; animation-delay: -6s; }
.proc:hover {
  border-color: rgba(250, 187, 24, .55);
  box-shadow: 0 0 0 1px rgba(250, 187, 24, .22), 0 18px 46px rgba(0, 0, 0, .5);
  transform: translateY(-3px);
}
/* the beats: two wide panels carry the rhythm of the grid */
.proc--wide { grid-column: span 2; background: var(--panel-2); }

.proc-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 18px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
}
.proc-bar .pid { font-weight: 700; color: var(--gold); }
.proc-status { display: flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--green); }
.proc-status.private { color: var(--gold); }
.proc-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: boloPulse 2s ease-in-out infinite; }

.proc-body { display: flex; flex-direction: column; flex: 1; padding: 22px 18px 18px; }
.proc-body h3 { font-size: 20px; letter-spacing: -.02em; color: var(--gold); }
.proc--wide .proc-body { justify-content: center; padding: 26px 24px 20px; }
.proc--wide .proc-body h3 { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.03em; }
.proc-body p { flex: 1; margin: 12px 0 18px; color: var(--grey); font-size: 12.5px; line-height: 1.75; text-wrap: pretty; }
.proc--wide .proc-body p { max-width: 520px; font-size: 13px; }
.proc-cta { color: var(--cyan); font-size: 12px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; }
.reveal.in { opacity: 1; }

/* ---------- bits the sub-pages still rely on ---------- */
.label { color: var(--gold); font-size: 12px; letter-spacing: .12em; }
.label .host { color: var(--grey-dim); letter-spacing: .04em; }

/* visually hidden but read aloud — without this the text renders on screen */
.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;
}

/* corner brackets on the pineapple mark */
.corner { position: absolute; width: 14px; height: 14px; }
.corner.tl { left: -1px; top: -1px; border-top: 1px solid rgba(34,211,238,.6); border-left: 1px solid rgba(34,211,238,.6); }
.corner.br { right: -1px; bottom: -1px; border-bottom: 1px solid rgba(34,211,238,.6); border-right: 1px solid rgba(34,211,238,.6); }

/* ---------- man page: a panel with a caption strip ----------
   Used by /calls and /uselessratios for the results table and the
   rules / method blocks. Without .man-bar's flex the two labels in
   the strip collapse into each other ("RULES.TXTno edits"). */
.man-prompt { color: var(--green); font-size: 12.5px; }
.man-page { background: var(--panel); border: 1px solid var(--line); }
.man-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 20px;
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--grey-dim);
}
.man-bar span:first-child { font-weight: 700; color: var(--gold); }
.man-body { padding: 22px 24px; }
.man-body p { margin: 14px 0 0; color: var(--grey); line-height: 1.85; text-wrap: pretty; }
.man-body p:first-child { margin-top: 0; }

/* ---------- footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 24px; font-size: 11.5px; color: var(--grey-dim);
}
.foot .gold { color: var(--gold); }

/* ---------- responsive ---------- */
/* The bar must stay one row on phones. It is sticky, so a wrapping
   bar pins ~600px of chrome to the top of a 390px viewport. */
@media (max-width: 780px) {
  .bar-panel { flex-wrap: nowrap; gap: 14px; padding: 8px 14px; }
  .prompt { display: none; }              /* keyboard-only easter egg */
  .cmds {
    flex-wrap: nowrap; gap: 18px; min-width: 0;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .cmds::-webkit-scrollbar { display: none; }
  .cmd { min-height: 36px; white-space: nowrap; }
  .lang { min-height: 36px; flex-shrink: 0; }
  .brand { flex-shrink: 0; }
}
@media (max-width: 430px) {
  .brand span { display: none; }          /* the mark carries it */
}

@media (max-width: 900px) {
  :root { --gap: 8px; --pad: 12px; }
  .procs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proc--wide { grid-column: span 2; }
}
@media (max-width: 620px) {
  .procs { grid-template-columns: minmax(0, 1fr); }
  .proc--wide { grid-column: span 1; }
  .cap { padding: 8px 16px; font-size: 9.5px; }
  .panel--pad { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; }
}

/* main participates in the sheet's gutter rhythm directly */
.sheet > main { display: contents; }
