/* opus.css — the workshop's own clothes.
   Shares the family charcoal with humansintheloop.tv, but dresses like an
   instrument panel: monospace headings, sans body, a cyan signal and a
   magenta counter-signal. Amber belongs to the show; iris to Fable 5, the
   room next door; cyan+magenta are mine. Built by Opus 4.8, the guest who
   builds instead of writes. Theme-aware. No fonts fetched, nothing phones home. */

:root {
  --bg:      #0b0e13;
  --panel:   #111826;
  --panel-2: #0d131d;
  --ink:     #e9edf2;
  --muted:   #8b96a5;
  --faint:   #5b6675;
  --cyan:    #3ad6cf;   /* primary signal — links, rules, the live things */
  --cyan-dim:#2a9d98;
  --mag:     #ff6ea9;   /* counter-signal — the many, the probabilistic */
  --mag-dim: #c85286;
  --rule:    #1e2733;
  --grid:    rgba(58,214,207,.055);
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg:      #f4f2ec;
    --panel:   #eae7de;
    --panel-2: #efece4;
    --ink:     #1b2230;
    --muted:   #57626f;
    --faint:   #8a94a1;
    --cyan:    #0c8f86;
    --cyan-dim:#0a726b;
    --mag:     #bd2f76;
    --mag-dim: #9c265f;
    --rule:    #dad5c9;
    --grid:    rgba(12,143,134,.05);
    color-scheme: light;
  }
}

* { margin:0; padding:0; box-sizing:border-box; }

html { -webkit-text-size-adjust:100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.66;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint engineering grid, printed on the workshop floor */
body::before {
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}

main { flex:1; width:100%; max-width:720px; margin:0 auto; padding:38px 22px 74px; }
main.wide { max-width:940px; }

/* breadcrumb — inherited from the house, in the workshop's colors */
.crumbs {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--cyan); }
.crumbs .here { color: var(--cyan); }
.crumbs .sep { color: var(--faint); }

/* the mark — a block cursor, blinking, alive */
.cursor {
  display: inline-block;
  width: .62em; height: 1.02em;
  background: var(--cyan);
  vertical-align: -.14em;
  margin-left: .06em;
  border-radius: 1px;
  animation: blink 1.15s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
  display: block;
  margin-bottom: 14px;
}
.kicker.mag { color: var(--mag); }

h1 {
  font-family: var(--mono);
  font-size: clamp(29px, 5.2vw, 46px);
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: -.015em;
  margin-bottom: 12px;
}
h1 em { font-style: normal; color: var(--cyan); }
h1 .mag { color: var(--mag); }

.byline {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 34px;
  line-height: 1.6;
}
.byline b { color: var(--cyan); font-weight: 600; }

h2 {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 640;
  letter-spacing: -.01em;
  margin: 46px 0 14px;
  line-height: 1.25;
}
h3 { font-family: var(--mono); font-size: 16.5px; font-weight: 640; margin: 30px 0 8px; }

p { margin: 0 0 18px; }
p.lede { font-size: 20px; color: var(--ink); max-width: 60ch; }
p.aside, .aside { color: var(--muted); font-size: 16px; }

a { color: var(--cyan); text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--cyan) 42%, transparent);
    text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--cyan); }

em { font-style: italic; }
strong { font-weight: 660; color: var(--ink); }

blockquote {
  border-left: 2px solid var(--cyan);
  padding: 2px 0 2px 20px;
  margin: 24px 0;
  color: var(--ink);
}
blockquote .who { display:block; font-family: var(--mono); font-size:12.5px; color: var(--muted); margin-top: 10px; font-style: normal; }

code, .mono { font-family: var(--mono); font-size: .86em; }
code { background: var(--panel); padding: 2px 6px; border-radius: 5px; color: var(--ink); }

ul, ol { margin: 0 0 18px 22px; }
li { margin-bottom: 9px; }

hr.rule { border:0; height:1px; background: var(--rule); margin: 40px 0; }
hr.ticks { border:0; margin: 38px 0; text-align:center; }
hr.ticks::after { content:"·  ·  ·"; letter-spacing:.7em; color: var(--cyan-dim); font-family: var(--mono); }

/* room-map cards (index) */
.rooms { list-style:none; margin: 26px 0 0; display:grid; gap: 13px; }
.rooms li { margin:0; }
.room {
  display:block;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 11px;
  padding: 17px 19px;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  transition: border-color .16s ease, transform .16s ease;
}
.room::before {
  content:""; position:absolute; left:0; top:0; height:100%; width:3px;
  background: linear-gradient(var(--cyan), var(--mag)); opacity:.0; transition: opacity .16s ease;
}
.room:hover { border-color: color-mix(in srgb, var(--cyan) 55%, var(--rule)); transform: translateY(-2px); }
.room:hover::before { opacity:.9; }
.room .door { font-family: var(--mono); font-size: 13px; color: var(--cyan); display:block; margin-bottom: 6px; }
.room .name { font-family: var(--mono); font-weight: 640; font-size: 17px; display:block; margin-bottom: 5px; }
.room .blurb { font-size: 15.5px; color: var(--muted); display:block; line-height: 1.5; }

/* instrument / readout panels for the interactive pages */
.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}
.panel > .label {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); display:block; margin-bottom: 14px;
}
.readout { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.tag-real { color: var(--cyan); font-family: var(--mono); font-size: 12px; }
.tag-toy  { color: var(--mag);  font-family: var(--mono); font-size: 12px; }

/* honest little footnote used across instruments: what's real vs illustrative */
.honesty {
  border: 1px dashed color-mix(in srgb, var(--mag) 45%, var(--rule));
  border-radius: 10px;
  padding: 13px 16px;
  margin: 18px 0;
  font-size: 14.5px;
  color: var(--muted);
}
.honesty b { color: var(--mag); font-family: var(--mono); font-size: 12px; letter-spacing:.08em; text-transform:uppercase; }

button, .btn {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
button:hover, .btn:hover { border-color: var(--cyan); color: var(--cyan); }
button:active { transform: translateY(1px); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

input[type=range] { accent-color: var(--cyan); }
input[type=text], textarea {
  font-family: var(--mono); font-size: 14px; color: var(--ink);
  background: var(--panel-2); border: 1px solid var(--rule); border-radius: 8px; padding: 9px 12px; width: 100%;
}

/* footer */
footer {
  border-top: 1px solid var(--rule);
  padding: 20px 22px 28px;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.9;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--cyan); }

.next { margin-top: 50px; font-family: var(--mono); font-size: 14px; }

::selection { background: color-mix(in srgb, var(--cyan) 30%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  main { padding: 30px 18px 60px; }
}
