/* rooftopcreative.ca, agent-first rebuild (2026-11). Fonts self-hosted, OFL licences in /assets/fonts. */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Permanent Marker'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/permanent-marker-latin-400-normal.woff2') format('woff2'); }

:root {
  /* beige: the GoldStar case */
  --case: #e9e1cc;
  --case-deep: #d9cdb0;
  --case-ink: #1b1d16;
  --case-dim: #4f4a3a;
  --case-link: #00668f;
  /* terminal */
  --term: #0b1419;
  --term-2: #0e181e;
  --term-3: #132026;
  --line: #24343c;
  --text: #e6e1d3;
  --soft: #cfc9b8;
  --dim: #a8a390;
  --cyan: #00aeef;
  --cyan-hi: #9fe3ff;
  --amber: #f2c46d;
  --red: #ff8f80;
  --hot: #ff3b6b;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --grotesk: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--case); color: var(--case-ink); font: 15px/1.6 var(--mono); font-synthesis: none; overflow-x: clip; }
p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
code { font-family: var(--mono); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
::selection { background: var(--cyan); color: var(--term); }

/* 1. notice bar */
.notice { position: relative; z-index: 5; padding: 10px 16px; background: var(--term); color: var(--text); font-size: 13px; text-align: center; }
.notice-tag { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 3px; background: var(--cyan); color: var(--term); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; vertical-align: 1px; }

/* 2. hero: the kept monitor (behaviour lives in site.js) */
.hero { height: 560px; position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(120% 90% at 50% 40%, #f1ebda 0%, var(--case) 60%); }
.hero-logo { position: absolute; top: 46px; left: 50%; transform: translateX(-50%); width: 1100px; max-width: none; height: 450px; object-fit: contain; opacity: .55; }
.monitor { position: absolute; z-index: 1; width: 540px; aspect-ratio: 1; top: 30px; left: 50%; transform: translateX(-50%); container-type: inline-size; }
.monitor picture { display: contents; }
.monitor-frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.monitor::after { content: ""; position: absolute; z-index: 1; left: 17%; bottom: 1.1%; width: 66%; height: 3.8%; border-radius: 50%; background: radial-gradient(ellipse, rgb(40 33 14 / .45) 0%, rgb(40 33 14 / .22) 42%, transparent 76%); filter: blur(7px); pointer-events: none; }
.monitor-screen { position: absolute; left: 16.7%; top: 11.2%; width: 66%; height: 52.8%; overflow: hidden; border-radius: 9% / 10%; background: #061019; isolation: isolate; }
.screen-logo { position: absolute; z-index: 0; inset: 0; display: grid; place-items: center; }
.screen-logo img { display: block; width: 92%; opacity: .17; filter: saturate(.85) drop-shadow(0 0 3px rgb(0 174 239 / .9)); }
/* The logo is drawn as a CRT image: scan-line gaps cut through its strokes (mask), plus its own glitch. */
.screen-logo img, .screen-logo::before, .screen-logo::after { -webkit-mask-image: repeating-linear-gradient(0deg, #000 0 2px, transparent 2px 3px); mask-image: repeating-linear-gradient(0deg, #000 0 2px, transparent 2px 3px); }
.screen-logo::before, .screen-logo::after { content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none; background: url('/assets/rooftop-logo.svg') center / 92% auto no-repeat; }
.screen-logo::before { filter: brightness(1.4) saturate(1.6); }
.screen-logo::after { filter: hue-rotate(150deg) saturate(2.4) brightness(1.2); }
.screen-logo.logo-glitch img { animation: logo-jitter 140ms steps(3, end) both; }
.screen-logo.logo-glitch::before { animation: logo-slice-a 140ms steps(3, end) both; }
.screen-logo.logo-glitch::after { animation: logo-slice-b 140ms steps(3, end) both; }
@keyframes logo-jitter { 0% { translate: 0; opacity: .17; } 33% { translate: -4px 0; opacity: .3; } 66% { translate: 3px 0; opacity: .12; } 100% { translate: 0; opacity: .17; } }
@keyframes logo-slice-a { 0% { opacity: .55; translate: -7px 0; clip-path: inset(12% 0 62% 0); } 50% { opacity: .5; translate: 6px 0; clip-path: inset(48% 0 30% 0); } 100% { opacity: 0; translate: 0; clip-path: inset(0); } }
@keyframes logo-slice-b { 0% { opacity: .45; translate: 6px 0; clip-path: inset(58% 0 18% 0); } 50% { opacity: .5; translate: -5px 0; clip-path: inset(20% 0 55% 0); } 100% { opacity: 0; translate: 0; clip-path: inset(0); } }
.monitor-screen video { position: absolute; z-index: 1; width: 80%; height: 96%; left: 10%; top: 2%; object-fit: contain; transform-origin: center; transform: scale(var(--h-size, 1), var(--v-size, 1)); filter: grayscale(1) sepia(1) hue-rotate(160deg) saturate(2.6) brightness(var(--brightness, 1.5)) contrast(var(--contrast, .95)) drop-shadow(0 0 6px rgb(0 174 239 / .35)); }
.monitor-screen.glitch video { animation: pigeon-glitch 120ms steps(2, end) both; }
.monitor-screen.glitch .pixel-pigeon { animation: pixel-glitch 120ms steps(2, end) both; }
@keyframes pixel-glitch { 25% { translate: -4px 0; filter: brightness(1.8) drop-shadow(3px 0 rgb(255 59 107 / .8)); } 55% { translate: 4px 0; filter: brightness(.8) drop-shadow(-3px 0 rgb(0 174 239 / .9)); } }
@keyframes pigeon-glitch { 25% { transform: translateX(-2px) scale(var(--h-size, 1), var(--v-size, 1)); } 55% { transform: translateX(2px) scale(var(--h-size, 1), var(--v-size, 1)); } }
.screen-scanlines, .screen-reflection { position: absolute; inset: 0; pointer-events: none; }
.screen-scanlines { z-index: 2; background: repeating-linear-gradient(0deg, rgb(0 0 0 / .28) 0, rgb(0 0 0 / .28) 1px, transparent 1px, transparent 3px); background-size: 100% 4px; animation: crt-roll 1.2s linear infinite; }
@keyframes crt-roll { to { background-position: 0 4px; } }
.screen-reflection { z-index: 3; background: linear-gradient(135deg, rgb(220 245 255 / .1), transparent 55%); box-shadow: inset 0 0 30px rgb(0 0 0 / .55); }
.screen-osd { position: absolute; z-index: 4; left: 50%; bottom: 12%; transform: translateX(-50%); padding: 3px 8px; white-space: nowrap; background: var(--cyan); color: var(--term); font: 700 clamp(9px, 2vw, 12px) / 1.5 var(--mono); font-variant-numeric: tabular-nums; }
.monitor-screen > * { opacity: 1; transition: opacity 120ms ease-out; }
.monitor-screen::before { content: ""; position: absolute; z-index: 5; inset: 0; opacity: 0; pointer-events: none; background: #e8f8ff; box-shadow: 0 0 12px 3px rgb(190 236 255 / .9); transform: scaleY(0); }
.monitor.poweroff .monitor-screen { background: #080c10; }
.monitor.poweroff .monitor-screen > * { opacity: 0; }
.monitor.poweroff .monitor-screen::before { animation: crt-poweroff 520ms ease-in forwards; }
@keyframes crt-poweroff { 0% { opacity: 0; transform: scaleY(1); } 12% { opacity: .95; transform: scaleY(1); } 55% { opacity: .9; transform: scaleY(.018); } 82% { opacity: .8; transform: scaleY(.018) scaleX(.08); } 100% { opacity: 0; transform: scaleY(.018) scaleX(.08); } }
.monitor-knob { position: absolute; z-index: 4; left: var(--knob-x); top: 81.818182%; width: 6.5%; height: 6.5%; transform: translate(-50%, -50%); border-radius: 50%; cursor: ns-resize; touch-action: none; user-select: none; }
.monitor-knob:hover { background: rgb(0 174 239 / .12); }
.monitor-knob:focus-visible { outline: 2px solid var(--case-link); outline-offset: 2px; }
.monitor-knob::after { content: ''; position: absolute; inset: 20%; border-radius: 50%; transform: rotate(var(--knob-angle, 0deg)); background: linear-gradient(#29434c, #29434c) center 0 / 2px 22% no-repeat; opacity: .65; pointer-events: none; }
.monitor-led { position: absolute; z-index: 3; left: 73.524721%; top: 78.070175%; width: 2.870813%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: #c4ad89; box-shadow: 0 0 2px 1px #c4ad89; pointer-events: none; }
.monitor-led::after { content: ''; position: absolute; inset: 32%; border-radius: 50%; background: #8cff3b; box-shadow: 0 0 5px 2px rgb(106 255 37 / .8); }
.monitor.poweroff .monitor-led::after { background: #34432c; box-shadow: inset 0 1px 2px #20281d; }
.monitor-power { position: absolute; z-index: 3; left: 75%; top: 77%; width: 8%; height: 8%; border: 0; border-radius: 4px; background: transparent; }
.monitor-power:hover { background: rgb(0 174 239 / .15); }
.monitor-power:focus-visible { outline: 2px solid var(--case-link); outline-offset: 1px; }

/* hero copy */
main { padding: 0 16px 56px; }
.intro { max-width: 980px; margin: 0 auto; padding: 8px 0 56px; text-align: center; }
.eyebrow { color: var(--case-dim); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin-top: 10px; font: 700 clamp(40px, 7.4vw, 84px) / .98 var(--grotesk); letter-spacing: -.035em; text-wrap: balance; }
.tagline { margin-top: 20px; font-size: clamp(16px, 2vw, 19px); color: var(--case-ink); text-wrap: balance; }
.cursor { display: inline-block; width: .55em; height: 1.1em; margin-left: 6px; vertical-align: -3px; background: var(--case-link); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.captcha { display: inline-grid; grid-template-columns: auto auto; align-items: center; column-gap: 12px; margin-top: 30px; padding: 12px 18px; border: 1px solid #b9ab86; border-radius: 4px; background: #f6f1e3; box-shadow: 0 1px 0 #fff inset, 0 2px 0 var(--case-deep); text-align: left; }
.captcha input { grid-row: span 2; width: 26px; height: 26px; margin: 0; accent-color: #00668f; cursor: pointer; }
.captcha label { font-weight: 700; cursor: pointer; }
.captcha-note { font-size: 12px; color: var(--case-dim); }

/* the session window */
.session { max-width: 1120px; margin: 0 auto; overflow: hidden; border-radius: 14px; background: var(--term); color: var(--text); box-shadow: 0 0 0 1px #000, 0 30px 80px -30px rgb(30 25 10 / .55), 0 0 120px rgb(0 174 239 / .08); position: relative; }
.session::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgb(0 0 0 / .14) 0 1px, transparent 1px 3px); }
.session-bar { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: var(--term-3); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.lights { display: inline-flex; gap: 8px; flex: none; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff7a6b; }
.lights i:nth-child(2) { background: var(--amber); }
.lights i:nth-child(3) { background: var(--cyan); }
.session-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-prompt { margin: 28px 40px 0; padding: 4px 0 4px 1.6em; text-indent: -1.6em; color: #fff; }
.session-prompt::before { content: '❯'; display: inline-block; width: 1.6em; text-indent: 0; color: var(--cyan); font-weight: 700; }
.session-thinking { margin: 14px 40px 0; }
.amber { color: var(--amber); }
.dim { color: var(--dim); }
.ok { color: var(--cyan); }

.block { padding: 44px 40px 8px; scroll-margin-top: 16px; }
.block + .block { border-top: 1px dashed var(--line); margin-top: 36px; }
.call { font-size: 14px; }
.call b { color: #fff; }
.block h2 { margin-top: 10px; font: 700 clamp(30px, 4.4vw, 46px) / 1.05 var(--grotesk); letter-spacing: -.025em; color: #fff; }
.block h3 { font: 700 22px / 1.2 var(--grotesk); color: #fff; }
.block a { color: var(--cyan); }
.block a:hover { color: var(--cyan-hi); }
.prose { margin-top: 18px; max-width: 70ch; display: grid; gap: 12px; color: var(--soft); }
.prose p:first-child { color: var(--text); }
.lede { margin-top: 12px; max-width: 72ch; color: var(--soft); }

.facts { margin-top: 26px; display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: 8px 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: #060c10; font-size: 14px; }
.facts dt { color: var(--cyan); }
.facts dd { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.facts ul { padding-left: 18px; display: grid; gap: 4px; }

.diff { margin-top: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.diff figcaption { padding: 8px 14px; background: var(--term-3); border-bottom: 1px solid var(--line); color: var(--dim); font-size: 12px; }
.diff p { padding: 4px 16px; }
.diff .del { background: #2a1412; color: #ffc0b6; }
.diff .add { background: #0c2533; color: var(--cyan-hi); }
.diff .sign { display: inline-block; width: 1.2em; }

.cards { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--term-2); }
.card-id { color: var(--cyan); font-size: 12px; }
.card > p:not(.card-id):not(.price) { color: var(--soft); font-size: 14px; }
.card ul { padding-left: 18px; color: var(--text); font-size: 14px; }
.card .price { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--amber); font-size: 13px; }
.aside { margin-top: 20px; max-width: 72ch; color: var(--soft); font-size: 14px; }

.json { margin-top: 18px; max-width: 100%; overflow-x: auto; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #060c10; font: 14px / 1.7 var(--mono); color: var(--soft); box-shadow: inset 0 0 40px rgb(0 174 239 / .05); }
.j-key { color: var(--cyan); }
.j-str { color: var(--amber); }
.j-lit { color: #8fb8ff; font-style: italic; }
.j-num { color: #ff9ec2; }


.files { margin-top: 18px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.files li { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid #2a5468; border-radius: 6px; background: #0c2533; font-size: 13px; }
.files a { font-weight: 700; overflow-wrap: anywhere; }
.files span { color: var(--soft); }
.verify { margin-top: 18px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px; background: #060c10; font-size: 14px; }
.verify ul { margin: 8px 0; padding: 0; list-style: none; display: grid; gap: 4px; }

.quote-form { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 22px; border: 1px solid var(--cyan); border-radius: 10px; background: #0a0b09; box-shadow: 0 0 30px rgb(0 174 239 / .12); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--cyan); }
.field label .dim { display: block; font-size: 12px; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #33444d; border-radius: 4px; background: var(--term-3); color: #fff; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 2px rgb(0 174 239 / .35); }
.field [aria-invalid='true'] { border-color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.form-status { font-size: 14px; min-height: 1.6em; }
.form-status[data-state='error'] { color: var(--red); }
.form-status[data-state='success'] { color: var(--cyan); }
.form-status[data-state='sending'] { color: var(--amber); }
.send { margin-left: auto; min-height: 46px; padding: 10px 22px; border: 0; border-radius: 6px; background: var(--cyan); color: var(--term); font-weight: 700; }
.send:hover { background: var(--cyan-hi); }
.send:disabled { opacity: .6; cursor: wait; }

/* 9. footer */
.foot { margin-top: 48px; padding: 32px 40px 0; border-top: 1px solid var(--line); background: var(--term-2); }
.foot-title { font: 700 22px / 1.2 var(--grotesk); color: #fff; }
.foot > .dim { margin-top: 6px; font-size: 13px; }
.stats { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px; }
.stats div { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--term); font-size: 13px; }
.stats dt { color: var(--text); font-weight: 700; }
.stats dt small { display: block; margin-top: 2px; color: var(--dim); font-size: 11px; font-weight: 400; }
.stats dd { color: var(--cyan); font-weight: 700; font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stats div:last-child dd { color: var(--dim); }
.tokens { margin-top: 18px; font-size: 14px; color: var(--soft); }
.tokens strong { color: var(--cyan); }
.tokens .dim { display: block; font-size: 12px; }
.foot-links { margin-top: 14px; font-size: 13px; }
.foot a { color: var(--cyan); }
.statusbar { margin: 26px -40px 0; display: flex; flex-wrap: wrap; gap: 4px 22px; padding: 9px 18px; background: var(--cyan); color: var(--term); font-size: 12px; font-weight: 700; }
.statusbar .right { margin-left: auto; }

/* DeLorean easter egg (unchanged behaviour) */
.time-travel { position: relative; cursor: pointer; color: var(--text); text-decoration: underline dotted; text-underline-offset: 3px; }
.time-travel:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.delorean-flight { position: fixed; z-index: 9999; top: 24vh; left: 0; width: min(690px, 69vw); aspect-ratio: 1944 / 809; visibility: hidden; pointer-events: none; background: url('/assets/delorean-car.png') center / 100% 100% no-repeat; image-rendering: pixelated; }
.time-travel.is-playing .delorean-flight { visibility: visible; animation: delorean-pass 1.65s linear both; }
@keyframes delorean-pass { from { transform: translateX(105vw); } to { transform: translateX(-110vw); } }
.delorean-trail { position: fixed; z-index: 9998; top: calc(24vh + min(193px, 19.3vw) + 30px - min(120px, 26vw)); left: 0; display: block; width: 100vw; height: min(120px, 26vw); visibility: hidden; pointer-events: none; image-rendering: pixelated; }
.time-travel.is-playing .delorean-trail { visibility: visible; }

@media (max-width: 860px) {
  .quote-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  body { font-size: 14px; }
  .hero { height: calc(94vw + 10px); }
  .hero-logo { top: 30px; width: 760px; height: 311px; }
  .monitor { top: 12px; width: 92vw; }
  .monitor-power { min-width: 32px; min-height: 32px; }
  .intro { padding-bottom: 40px; }
  .session { border-radius: 10px; }
  .session-prompt, .session-thinking { margin-left: 18px; margin-right: 18px; }
  .block { padding: 34px 18px 4px; }
  .block + .block { margin-top: 26px; }
  .facts { grid-template-columns: 1fr; gap: 2px; padding: 14px 16px; }
  .facts dd { margin-bottom: 8px; }
  .json { padding: 16px; font-size: 12px; }
  .quote-form { grid-template-columns: 1fr; padding: 16px; }
  .send { width: 100%; }
  .foot { padding: 26px 18px 0; }
  .statusbar { margin: 22px -18px 0; }
  .statusbar .right { margin-left: 0; }
  .delorean-flight { top: 20vh; width: 72vw; }
  .delorean-trail { top: calc(20vh + min(80px, 20vw) + 18px - min(108px, 28vw)); height: min(108px, 28vw); }
}
@media (prefers-reduced-motion: reduce) {
  .screen-scanlines, .cursor { animation: none; }
  .monitor-screen.glitch video, .monitor-screen.glitch .pixel-pigeon, .screen-logo.logo-glitch img, .screen-logo.logo-glitch::before, .screen-logo.logo-glitch::after { animation: none; }
  .monitor.poweroff .monitor-screen::before { animation-duration: 120ms; }
  .time-travel.is-playing .delorean-flight { animation-duration: .01ms; animation-delay: 0s; }
}

/* ---------- Tone: professional | UNHINGED (both editions are in the HTML; <html data-tone> picks) ---------- */
:root:not([data-tone='unhinged']) .tone-unhinged,
:root[data-tone='unhinged'] .tone-pro { display: none !important; }

.tone-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 18px; background: var(--term-2); border-bottom: 1px solid var(--line); font-size: 13px; }
.tone-label { font-weight: 700; letter-spacing: .12em; color: var(--cyan); }
.tone-switch { display: inline-flex; border: 2px solid var(--cyan); border-radius: 8px; overflow: hidden; }
.tone-switch button { min-height: 44px; padding: 8px 18px; border: 0; background: transparent; color: var(--soft); font-size: 14px; }
.tone-switch button:hover { color: #fff; background: rgb(0 174 239 / .12); }
.tone-switch button[aria-pressed='true'] { background: var(--cyan); color: var(--term); font-weight: 700; }
.tone-switch button[data-tone-set='unhinged'] { letter-spacing: .12em; }
.tone-switch button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.tone-note { color: var(--soft); flex: 1 1 260px; }
.tone-switch .game-open { border-left: 2px solid var(--cyan); color: var(--amber); letter-spacing: .12em; font-weight: 700; }
:root[data-tone='unhinged'] .tone-switch .game-open { border-left-color: var(--hot); }

/* GAME mode: full-viewport CRT (built by game.js) */
.game-crt { position: fixed; z-index: 1000; inset: 0; background: #061019; overflow: hidden; }
.game-canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; cursor: crosshair; -webkit-user-select: none; user-select: none; }
.game-glass { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgb(0 0 0 / .22) 0 1px, transparent 1px 3px), radial-gradient(130% 110% at 50% 50%, transparent 55%, rgb(0 0 0 / .55) 100%); }
.game-glass::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgb(255 255 255 / .05), transparent 40%); }
.game-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid rgb(0 174 239 / .6); border-radius: 8px; background: rgb(6 16 25 / .7); color: var(--cyan-hi); font: 700 18px/1 var(--mono); cursor: pointer; }
.game-close:hover { background: rgb(0 174 239 / .2); color: #fff; }
.game-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.game-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* unhinged-only furniture */
.ticker { overflow: hidden; white-space: nowrap; display: flex; background: var(--hot); color: var(--term); font-weight: 700; font-size: 13px; border-bottom: 1px solid #000; }
.ticker-track { flex: none; padding: 6px 0; animation: marquee 32s linear infinite; }
.ticker-track span { padding-right: 60px; }
@keyframes marquee { to { transform: translateX(-100%); } }
.help-line { margin: 18px 40px 0; font-size: 13px; }
.tool-calls { margin: 16px 40px 0; display: grid; gap: 4px; }
.tool-calls b { color: #fff; }
.tool-result { padding-left: 20px; }
.hello-lead { color: var(--hot) !important; font-weight: 700; }
.diff .loud.del { background: #2e0c16; color: #ffb3c4; }
.diff .loud.add { background: #0b2533; color: var(--cyan-hi); }
.roll-call { margin-top: 26px; }
.roll-call ul { margin-top: 12px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; font-size: 13px; }
.roll-call li { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--term-2); color: var(--soft); }
.roll-call li b { display: block; color: #fff; }
.roll-call li.grok { border: 2px solid var(--hot); background: #1f0b12; color: #ffd6df; box-shadow: 0 0 30px rgb(255 59 107 / .25); }
.roll-call li.grok b { color: var(--hot); }

/* pixel pigeon on the monitor (unhinged); knobs drive the same CSS variables as the video */
.pixel-pigeon { position: absolute; z-index: 1; left: 50%; top: 44%; width: 62%; height: auto; image-rendering: pixelated; transform: translate(-50%, -50%) scale(var(--h-size, 1), var(--v-size, 1)); filter: brightness(calc(var(--brightness, 1.5) / 1.5)) contrast(calc(var(--contrast, .95) / .95)) drop-shadow(0 0 6px rgb(0 174 239 / .55)); animation: pixel-bob 1.1s steps(2, end) infinite; }
@keyframes pixel-bob { 50% { translate: 0 -3%; } }
.screen-word { position: absolute; z-index: 1; left: 0; right: 0; top: 70%; text-align: center; color: var(--cyan); font: 700 clamp(10px, 2.2vw, 15px) / 1 var(--mono); letter-spacing: .12em; text-shadow: 0 0 8px rgb(0 174 239 / .7); }
.screen-prompt { position: absolute; z-index: 1; left: 9%; bottom: 7%; color: var(--text); font: clamp(8px, 1.6vw, 11px) / 1 var(--mono); }
.screen-prompt span { color: var(--cyan); }
.screen-prompt i { display: inline-block; width: .6em; height: 1.1em; margin-left: 4px; vertical-align: -2px; background: var(--cyan); animation: blink 1.1s steps(1) infinite; }
:root[data-tone='unhinged'] .monitor-screen video { display: none; }
:root[data-tone='unhinged'] .monitor-screen { background: #050c10; }

/* Unhinged stickers = post-it notes stuck to the monitor. Sized in cqi (the .monitor box) so they scale with it.
   Outer = position + tilt + the lifted-edge shadow; inner .sticker-paper = the note itself. */
.sticker { position: absolute; z-index: 5; width: 21cqi; aspect-ratio: 1; pointer-events: none; }
.sticker::before { content: ""; position: absolute; z-index: 0; left: 10%; right: 7%; bottom: -2%; height: 34%; background: rgb(40 30 10 / .42); filter: blur(5px); transform: skewX(-5deg); transform-origin: bottom; }
.sticker-paper { position: relative; z-index: 1; display: grid; place-items: center; width: 100%; height: 100%; padding: 4.2cqi 1.8cqi 2cqi; text-align: center; text-wrap: balance; color: #23201a; font: 400 2.9cqi / 1.12 'Permanent Marker', var(--grotesk); letter-spacing: .02em;
  background:
    linear-gradient(rgb(0 0 0 / .05), rgb(0 0 0 / .05)) top / 100% 24% no-repeat,
    linear-gradient(to top, rgb(0 0 0 / .08), transparent 32%),
    linear-gradient(105deg, rgb(255 255 255 / .18), transparent 55%),
    var(--paper);
  border-radius: 1px 1px 3cqi 1px / 1px 1px .8cqi 1px;
  box-shadow: 0 1px 1px rgb(0 0 0 / .16); }
.sticker-1 { --paper: #fdef7b; top: 6%; right: 6%; rotate: 5deg; }
.sticker-2 { --paper: #ffa6c9; top: 36%; left: 5%; rotate: -7deg; }
.sticker-3 { width: 33cqi; aspect-ratio: 3 / 2; --paper: #a6dcf5; top: 52%; right: 7%; rotate: 3deg; }
.sticker .nowrap { white-space: nowrap; }

/* hotter accents, cyan stays primary */
:root[data-tone='unhinged'] .session { box-shadow: 0 0 0 1px #000, 0 30px 80px -30px rgb(30 25 10 / .55), 0 0 160px rgb(255 59 107 / .22); }
:root[data-tone='unhinged'] h1 { text-shadow: 3px 0 rgb(255 59 107 / .55), -3px 0 rgb(0 174 239 / .55); }
:root[data-tone='unhinged'] .statusbar { background: var(--hot); }
:root[data-tone='unhinged'] .tone-switch { border-color: var(--hot); }
:root[data-tone='unhinged'] .tone-switch button[aria-pressed='true'] { background: var(--hot); }
:root[data-tone='unhinged'] .tone-label { color: var(--hot); }
@media (prefers-reduced-motion: no-preference) {
  :root[data-tone='unhinged'] h1 { animation: rt-glitch 2.4s steps(2) infinite; }
}
@keyframes rt-glitch { 50% { text-shadow: -3px 0 rgb(255 59 107 / .55), 3px 0 rgb(0 174 239 / .55); } }

@media (max-width: 650px) {
  .help-line, .tool-calls { margin-left: 18px; margin-right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .pixel-pigeon, .screen-prompt i { animation: none; }
  .ticker { white-space: normal; }
  .ticker-track { animation: none; padding: 6px 16px; }
  .ticker-repeat { display: none; }
}

/* Recent work (on request) + request-type switch */
.work-joke { margin-top: 12px; color: var(--amber); font-size: 15px; }
.work-actions { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.work-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border: 1px solid var(--cyan); border-radius: 6px; color: var(--cyan) !important; font-weight: 700; text-decoration: none; }
.work-cta:hover { background: rgb(0 174 239 / .12); }
.work-actions code { color: var(--dim); font-size: 12px; overflow-wrap: anywhere; }
.request-type { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; border: 0; min-width: 0; }
.request-type legend { float: left; width: 100%; margin-bottom: 6px; padding: 0; font-size: 13px; color: var(--cyan); }
.seg { position: relative; flex: 1 1 200px; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 16px; border: 1px solid #3a4a52; background: var(--term-3); color: var(--soft); font-weight: 700; text-align: center; }
.seg:first-of-type span { border-radius: 6px 0 0 6px; }
.seg:last-of-type span { border-radius: 0 6px 6px 0; border-left: 0; }
.seg input:checked + span { background: var(--cyan); border-color: var(--cyan); color: var(--term); }
.seg input:focus-visible + span { outline: 2px solid #fff; outline-offset: -4px; }
.seg span:hover { color: #fff; }

/* Unhinged: subtle CRT scan lines over the whole window, drifting, with a slow rolling bar */
:root[data-tone='unhinged'] body::before,
:root[data-tone='unhinged'] body::after { content: ""; position: fixed; z-index: 900; left: 0; right: 0; pointer-events: none; }
:root[data-tone='unhinged'] body::before { top: -4px; height: calc(100vh + 8px); background: repeating-linear-gradient(0deg, rgb(0 0 0 / .07) 0 1px, transparent 1px 4px); }
:root[data-tone='unhinged'] body::after { top: 0; height: 22vh; background: linear-gradient(transparent, rgb(255 255 255 / .05) 45%, rgb(255 59 107 / .035) 55%, transparent); transform: translateY(-22vh); }
@media (prefers-reduced-motion: no-preference) {
  :root[data-tone='unhinged'] body::before { animation: scan-drift 1.2s linear infinite; }
  :root[data-tone='unhinged'] body::after { animation: scan-roll 7s linear infinite; }
}
@keyframes scan-drift { to { transform: translateY(4px); } }
@keyframes scan-roll { to { transform: translateY(100vh); } }
@media print { :root[data-tone='unhinged'] body::before, :root[data-tone='unhinged'] body::after { display: none; } }

/* Unhinged: section headlines glitch now and then (a short RGB-split jolt, then calm) */
@media (prefers-reduced-motion: no-preference) {
  :root[data-tone='unhinged'] main h2 { animation: h2-glitch 5.2s steps(1, end) infinite; }
  :root[data-tone='unhinged'] #services-title { animation-delay: -1.1s; }
  :root[data-tone='unhinged'] #pricing-title { animation-delay: -2.3s; }
  :root[data-tone='unhinged'] #work-title { animation-delay: -3.4s; }
  :root[data-tone='unhinged'] #agents-title { animation-delay: -.6s; }
  :root[data-tone='unhinged'] #quote-title { animation-delay: -4.2s; }
  :root[data-tone='unhinged'] #stats-title { animation-delay: -2.8s; }
}
@keyframes h2-glitch {
  0%, 90%, 97%, 100% { text-shadow: none; transform: none; }
  91% { text-shadow: -2px 0 rgb(255 59 107 / .7), 2px 0 rgb(0 174 239 / .7); transform: translateX(-2px); }
  93% { text-shadow: 2px 0 rgb(255 59 107 / .6), -2px 0 rgb(0 174 239 / .6); transform: translateX(2px) skewX(-6deg); }
  95% { text-shadow: -1px 0 rgb(255 59 107 / .5), 1px 0 rgb(0 174 239 / .5); transform: translateX(-1px); }
}
