/* Monochrome surveillance console: condensed display type, mono UI, serif prose, CCTV screens stay dark in both themes. */
:root {
  --bg: #0a0a0a;
  --bg-2: #101010;
  --surface: #121212;
  --surface-2: #171717;
  --line: rgba(231, 229, 223, .12);
  --line-2: rgba(231, 229, 223, .24);
  --fg: #e7e5df;
  --fg-2: #a9a7a1;
  --fg-3: #8a8882;
  --accent: #e7e5df;
  --accent-ink: #0a0a0a;
  --accent-soft: rgba(231, 229, 223, .07);
  --accent-line: rgba(231, 229, 223, .42);
  --rec: #ff3b30;
  --ok: #34c77b;
  --warn: #e3b341;
  --err: #ff6b5e;
  --hatch: rgba(231, 229, 223, .07);
  --grain: .06;
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .85);
  --overlay: rgba(0, 0, 0, .74);
  --press: rgba(255, 255, 255, .05);
  --pdf-bg: #0d0d0d;
  --paper: #ffffff;
  --cam-bg: #0b0b0b;
  --cam-fg: #e7e5df;
  --cam-dim: rgba(231, 229, 223, .5);
  --cam-line: rgba(231, 229, 223, .18);
  --term-bg: #0b0b0b;
  --term-bar: #121212;
  --term-line: rgba(231, 229, 223, .14);
  --term-fg: #e2e0da;
  --term-fg-2: #a3a19b;
  --term-dim: #8b8984;
  --term-accent: #f2f0ea;
  --term-ok: #34c77b;
  --term-err: #ff6b5e;
  --term-warn: #e3b341;
  --term-dot: #1d1d1d;
  --term-dot-line: #3a3a3a;
  --term-hover: rgba(255, 255, 255, .05);
  --term-active: rgba(255, 255, 255, .08);
  --term-focus-bg: rgba(255, 255, 255, .03);
  --term-link-line: rgba(231, 229, 223, .4);
  --term-ph: #8b8984;
  --term-shadow: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #e8e7e2;
    --bg-2: #e0dfd9;
    --surface: #efeee9;
    --surface-2: #f4f3ef;
    --line: rgba(13, 13, 13, .14);
    --line-2: rgba(13, 13, 13, .28);
    --fg: #0d0d0d;
    --fg-2: #3f3e3a;
    --fg-3: #5b5a55;
    --accent: #0d0d0d;
    --accent-ink: #efeee9;
    --accent-soft: rgba(13, 13, 13, .06);
    --accent-line: rgba(13, 13, 13, .42);
    --rec: #c8102e;
    --ok: #13773d;
    --warn: #8a5a00;
    --err: #b42318;
    --hatch: rgba(13, 13, 13, .08);
    --grain: .09;
    --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .35);
    --overlay: rgba(20, 20, 20, .45);
    --press: rgba(0, 0, 0, .05);
    --pdf-bg: #d9d8d2;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #e8e7e2;
  --bg-2: #e0dfd9;
  --surface: #efeee9;
  --surface-2: #f4f3ef;
  --line: rgba(13, 13, 13, .14);
  --line-2: rgba(13, 13, 13, .28);
  --fg: #0d0d0d;
  --fg-2: #3f3e3a;
  --fg-3: #5b5a55;
  --accent: #0d0d0d;
  --accent-ink: #efeee9;
  --accent-soft: rgba(13, 13, 13, .06);
  --accent-line: rgba(13, 13, 13, .42);
  --rec: #c8102e;
  --ok: #13773d;
  --warn: #8a5a00;
  --err: #b42318;
  --hatch: rgba(13, 13, 13, .08);
  --grain: .09;
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .35);
  --overlay: rgba(20, 20, 20, .45);
  --press: rgba(0, 0, 0, .05);
  --pdf-bg: #d9d8d2;
  color-scheme: light;
}
:root {
  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --sans: var(--mono);
  --r-sm: 2px;
  --r: 3px;
  --hdr: 80px;
  --gut: 32px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* the scrollbar's room stays reserved: nothing shifts sideways when the intro or a dialog hides it */
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 14px/1.6 var(--mono); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
[hidden] { display: none !important; }
body.is-locked { overflow: hidden; }
body.is-locked .hdr *, body.is-locked main *, body.is-locked main *::before, body.is-locked main *::after { animation-play-state: paused !important; }
body::after {
  content: ""; position: fixed; inset: 0; z-index: 400; pointer-events: none; opacity: var(--grain);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after {
  transition: background-color .32s ease, color .32s ease, border-color .32s ease, fill .32s ease, stroke .32s ease !important;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, pre, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
svg { display: block; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
::selection { background: var(--fg); color: var(--bg); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nw { white-space: nowrap; }
.skip {
  position: fixed; left: 16px; top: calc(env(safe-area-inset-top, 0px) + 10px); z-index: 500;
  padding: 10px 14px; background: var(--fg); color: var(--bg); font: 500 13px/1.2 var(--mono);
  transform: translateY(-180%); transition: transform .15s ease;
}
.skip:focus { transform: none; }
.lbl { font: 400 11px/1.45 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
kbd, .kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  font: 500 11px/1 var(--mono); color: var(--fg-3);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 2px;
  background: var(--bg-2);
}
.hatch { background: repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 9px); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); position: relative; flex-shrink: 0; }
.dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--ok); opacity: 0; animation: ping 2.4s cubic-bezier(.2, .6, .3, 1) .4s 3; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 80%, 100% { transform: scale(1.7); opacity: 0; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  font: 500 13px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-ghost { border-color: var(--line-2); color: var(--fg); background: transparent; }
.btn-sm { height: 38px; padding: 0 13px; font-size: 12px; gap: 8px; }
.btn:active, .icon-btn:active, .f-btn:active, .t-btn:active, .tag:active, .sk-go:active, .h-cmd:active, .q-b:active { transform: translateY(1px); }
.btn.is-done { border-color: var(--ok); color: var(--ok); }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--fg-2); background: transparent;
  transition: color .15s ease, border-color .15s ease, transform .1s ease;
}
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60;
  display: flex; height: var(--hdr);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.hdr.is-compact { box-shadow: 0 14px 30px -26px rgba(0, 0, 0, .9); }
.hdr > * { border-right: 1px solid var(--line); }
.hdr > *:last-child { border-right: 0; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--fg); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; border: 0 !important; }
.h-logo { width: var(--hdr); flex-shrink: 0; display: grid; place-items: center; color: var(--fg); }
.h-logo svg { width: 38px; height: 38px; transition: transform .6s var(--ease); }
.h-rot { width: 190px; flex-shrink: 0; display: flex; align-items: center; padding: 0 22px; overflow: hidden; }
.rot-win { height: calc(3 * 15px); overflow: hidden; }
.rot-list { animation: rot 15s steps(1) infinite; }
.rot-list li { height: 15px; font: 500 10px/15px var(--mono); letter-spacing: .22em; color: var(--fg-3); }
@keyframes rot {
  0% { transform: translateY(0); } 20% { transform: translateY(-15px); } 40% { transform: translateY(-30px); }
  60% { transform: translateY(-45px); } 80% { transform: translateY(-60px); }
}
.nav-panel { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: clamp(18px, 3vw, 46px); }
.nav-panel a {
  position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font: 500 13px/1 var(--mono); letter-spacing: .38em; text-transform: uppercase; color: var(--fg-3);
  transition: color .2s ease;
}
.nav-panel a.is-active { color: var(--fg); }
.nav-panel a.is-active::before { content: ""; width: 6px; height: 6px; background: var(--fg); }
.nav-i { display: none; }
.h-icons { display: flex; flex-direction: column; flex-shrink: 0; }
.h-icons a { flex: 1; width: 52px; display: grid; place-items: center; color: var(--fg-3); transition: color .15s ease; }
.h-icons a + a { border-top: 1px solid var(--line); }
.h-icons svg { width: 16px; height: 16px; }
.theme-btn { width: 58px; flex-shrink: 0; display: grid; place-items: center; color: var(--fg-2); }
.theme-btn svg { width: 19px; height: 19px; transition: transform .35s var(--ease); }
.theme-btn[data-mode="dark"] .i-moon, .theme-btn[data-mode="light"] .i-sun { display: none; }
.theme-btn.spin svg { transform: rotate(90deg); }
.h-status { display: flex; flex-direction: column; flex-shrink: 0; min-width: 0; }
.h-status > * { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 20px; font: 400 12px/1 var(--mono); letter-spacing: .04em; color: var(--fg-2); white-space: nowrap; }
.h-status > * + * { border-top: 1px solid var(--line); }
.h-status b { font-weight: 600; color: var(--fg); }
.h-status a { color: var(--fg); font-weight: 600; }
.h-cmd { width: var(--hdr); flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--fg); }
.h-cmd-k { font: 600 17px/1 var(--mono); letter-spacing: .02em; }
.h-cmd-l { font: 400 9px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--fg-3); }
.menu-btn { display: none; width: 58px; flex-shrink: 0; place-items: center; color: var(--fg); }
.menu-btn svg { width: 20px; height: 20px; }
.menu-btn[aria-expanded="true"] .i-burger, .menu-btn[aria-expanded="false"] .i-close { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; border-bottom: 1px solid var(--line); }
.hero-vis { position: relative; height: clamp(380px, 66vh, 720px); overflow: hidden; }
.hero-vis canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-tag { position: absolute; z-index: 1; padding: 4px 7px; background: var(--bg); font: 400 10.5px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); pointer-events: none; }
.hero-tag.tl { left: calc(var(--gut) - 7px); top: 18px; }
.hero-tag.tr { right: calc(var(--gut) - 7px); top: 18px; text-align: right; }
.hero-tag.bl { left: calc(var(--gut) - 7px); bottom: 14px; }
.hero-tag.br { right: calc(var(--gut) - 7px); bottom: 14px; text-align: right; }
.strip { position: relative; height: 26px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; font: 400 10px/24px var(--mono); letter-spacing: .14em; color: var(--fg-3); user-select: none; }
.strip + .strip { border-top: 0; }
.strip-in { display: inline-block; padding-left: 16px; animation: marquee 90s linear infinite; }
.strip.rev .strip-in { animation-direction: reverse; animation-duration: 120s; }
@keyframes marquee { to { transform: translateX(-50%); } }
.hero-name {
  overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: .16em;
  padding: 26px var(--gut) 20px;
  font: 800 clamp(62px, 13.6vw, 228px)/.8 var(--display); letter-spacing: .005em; text-transform: uppercase;
  color: var(--fg);
}
.hero-name .mark { display: grid; place-items: center; }
.hero-name .mark svg { width: .42em; height: .42em; }
.hero-meta { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto; border-top: 1px solid var(--line); }
.hm { padding: 18px 22px; border-right: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.hm:last-child { border-right: 0; }
.hm-role { font: 700 22px/1.05 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.hm-sub { font-size: 12.5px; color: var(--fg-2); }
.hm-status { flex-direction: row; align-items: center; gap: 12px; font-size: 12.5px; color: var(--fg); }
.hm-loc { flex-direction: row; align-items: center; gap: 10px; font-size: 12.5px; color: var(--fg-2); }
.hm-loc svg { width: 15px; height: 15px; }
.hm-cta { flex-direction: row; align-items: center; gap: 10px; padding: 14px 18px; }

/* ---------- section heads ---------- */
.sh { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 64px var(--gut) 18px; border-bottom: 1px solid var(--line); }
.sh-t { font: 800 clamp(52px, 8vw, 118px)/.82 var(--display); text-transform: uppercase; letter-spacing: .005em; }
.sh-t .n { display: block; margin-bottom: clamp(18px, 2.4vw, 32px); font: 400 11px/1 var(--mono); letter-spacing: .2em; color: var(--fg-3); }
.sh-m { text-align: right; max-width: 34ch; }
.sh-m b { color: var(--fg); font-weight: 600; }
section[id] { scroll-margin-top: var(--hdr); }

/* ---------- about: perspective room ---------- */
.room { position: relative; padding: clamp(70px, 9vw, 130px) var(--gut); overflow: hidden; border-bottom: 1px solid var(--line); }
.room-cv { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.room-panel { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; border: 1px solid var(--line-2); background: var(--bg); }
.room-h { display: flex; justify-content: center; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.room-b { padding: clamp(32px, 5vw, 64px) clamp(22px, 5vw, 64px) clamp(28px, 4vw, 48px); }
.about-t p { font: 400 clamp(22px, 2.4vw, 31px)/1.32 var(--serif); color: var(--fg); text-wrap: pretty; }
.about-t p + p { margin-top: .75em; }
.about-t strong { font-weight: 400; font-style: italic; }
.reco { margin-top: clamp(28px, 4vw, 44px); padding-top: clamp(24px, 3vw, 34px); border-top: 1px solid var(--line); }
.reco-q { font: italic 400 clamp(19px, 1.9vw, 24px)/1.4 var(--serif); color: var(--fg-2); }
.reco-c { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin-top: 20px; }
.reco-who b { display: block; font: 600 13px/1.3 var(--mono); color: var(--fg); letter-spacing: .02em; }
.reco-acts { display: flex; flex-wrap: wrap; gap: 10px; }
/* ---------- stack: ascii globe + groups ---------- */
.stack { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); border-bottom: 1px solid var(--line); }
.globe { position: relative; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.globe-h, .globe-f { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; }
.globe-h { border-bottom: 1px solid var(--line); }
.globe-f { border-top: 1px solid var(--line); margin-top: auto; }
.globe-pre { flex: 1; display: grid; place-items: center; padding: 18px 8px; overflow: hidden; min-height: 360px; }
.globe-pre pre { font: 500 11px/1 var(--mono); letter-spacing: 0; color: var(--fg); white-space: pre; user-select: none; }
.groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grp { padding: 24px 24px 22px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 0; }
.grp:nth-child(2n) { border-right: 0; }
.grp:last-child { grid-column: 1 / -1; border-bottom: 0; border-right: 0; }
.grp-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grp-t { font: 700 26px/1 var(--display); letter-spacing: .03em; text-transform: uppercase; }
.grp-l li { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 13.5px; }
.grp-l li:first-child { border-top: 0; }
.grp-l em { font-style: normal; font-size: 11.5px; color: var(--fg-3); }
.sk-go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); font: 400 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); transition: color .15s ease, border-color .15s ease; }
.sk-go svg { width: 12px; height: 12px; }
.grp-note { margin-top: 12px; font-size: 11.5px; color: var(--fg-3); }

/* ---------- statement ---------- */
.stmt { position: relative; height: clamp(300px, 46vw, 620px); perspective: 900px; perspective-origin: 50% 0%; overflow: hidden; border-bottom: 1px solid var(--line); }
.stmt-floor { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 140%; transform-origin: 50% 100%; transform: rotateX(72deg);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px; pointer-events: none; }
.stmt-t { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; transform-origin: 50% 100%;
  transform: rotateX(var(--rx, 34deg)) translateY(var(--ty, 0px)); will-change: transform;
  font: 900 clamp(76px, 15.5vw, 250px)/.8 var(--display); text-transform: uppercase; color: var(--fg); text-align: center; }
.stmt-t span:last-child { color: transparent; -webkit-text-stroke: 1.5px var(--fg); }
.survey { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; padding: 12px var(--gut); border-bottom: 1px solid var(--line); font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.survey b { color: var(--fg); font-weight: 600; }
.survey .rec { color: var(--rec); display: inline-flex; align-items: center; gap: 8px; }
.survey .rec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rec); animation: blinkRec 1.2s steps(1) infinite; }
.survey .end { margin-left: auto; }
@keyframes blinkRec { 50% { opacity: .2; } }

/* ---------- projects: filters + CCTV wall ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 18px var(--gut); border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; border: 1px solid var(--line-2); }
.f-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); transition: color .15s ease, background-color .15s ease; }
.f-btn + .f-btn { border-left: 1px solid var(--line-2); }
.f-btn[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.f-n { font-size: 10.5px; opacity: .8; font-variant-numeric: tabular-nums; }
.f-btn.is-zero:not([aria-pressed="true"]) { opacity: .45; }
.psearch { position: relative; flex: 1 1 260px; max-width: 420px; margin-left: auto; display: flex; align-items: center; }
.psearch > svg { position: absolute; left: 12px; width: 15px; height: 15px; color: var(--fg-3); pointer-events: none; }
.psearch input { width: 100%; height: 40px; padding: 0 64px 0 36px; border: 1px solid var(--line-2); border-radius: 0; background: transparent; color: var(--fg); font: 400 13px/1 var(--mono); outline: none; }
.psearch input::placeholder { color: var(--fg-3); }
.psearch input:focus-visible { border-color: var(--fg); }
.psearch input::-webkit-search-cancel-button { display: none; }
.psearch kbd { position: absolute; right: 10px; }
.psearch-x { position: absolute; right: 4px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--fg-3); }
.psearch-x svg { width: 14px; height: 14px; }
.fstate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px var(--gut); border-bottom: 1px solid var(--line); min-height: 46px; }
.fstate b { color: var(--fg); font-weight: 600; }
.tagchip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 4px 0 10px; border: 1px solid var(--fg); font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.tagchip button { width: 24px; height: 24px; display: grid; place-items: center; }
.tagchip svg { width: 12px; height: 12px; }
.freset { font: 400 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.empty { margin: 28px var(--gut); padding: 48px 20px; border: 1px dashed var(--line-2); text-align: center; display: grid; justify-items: center; gap: 16px; color: var(--fg-2); }
.wall { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 18px; padding: 26px var(--gut) clamp(56px, 7vw, 96px); }
.cam { grid-column: span 4; position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); background: var(--surface); transition: border-color .2s ease, transform .2s var(--ease); }
.cam[data-size="xl"] { grid-column: span 8; grid-row: span 2; }
.cam-scr { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; background: var(--cam-bg); overflow: hidden; border-bottom: 1px solid var(--line); cursor: pointer; }
.cam[data-size="xl"] .cam-scr { aspect-ratio: auto; flex: 1; min-height: 340px; }
.cam-scr canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.cam-scr::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%); }
.cam-hud { position: absolute; z-index: 2; font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cam-fg); text-shadow: 0 0 6px rgba(0, 0, 0, .9); pointer-events: none; }
.cam-hud.tl { left: 12px; top: 11px; color: var(--rec); display: flex; align-items: center; gap: 6px; }
.cam-hud.tl::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blinkRec 1.2s steps(1) infinite; }
.cam-hud.tr { right: 12px; top: 11px; }
.cam-hud.bl { left: 12px; bottom: 10px; font-weight: 500; color: var(--cam-dim); font-variant-numeric: tabular-nums; }
.cam-hud.br { right: 12px; bottom: 10px; }
.cam-body { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.cam-meta { display: flex; justify-content: space-between; gap: 10px; }
.cam-t { font: 700 24px/1.02 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.cam[data-size="xl"] .cam-t { font-size: clamp(30px, 3vw, 44px); }
.cam-open { text-align: left; }
.cam-d { font-size: 12.5px; line-height: 1.55; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cam[data-size="xl"] .cam-d { -webkit-line-clamp: 4; font-size: 13.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); font: 400 10.5px/1 var(--mono); letter-spacing: .06em; color: var(--fg-3); transition: color .15s ease, border-color .15s ease; }
.tag.is-on { color: var(--fg); border-color: var(--fg); }
.cam-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: auto; padding-top: 4px; }
.p-link { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg); }
.p-link svg { width: 12px; height: 12px; }
.p-none { font: 400 11px/28px var(--mono); color: var(--fg-3); }
.cam.flash { animation: camFlash 1.6s ease; }
@keyframes camFlash { 0%, 40% { border-color: var(--fg); box-shadow: 0 0 0 3px var(--accent-soft); } 100% { box-shadow: none; } }
.cam-void { grid-column: span 4; border: 1px dashed var(--line-2); display: grid; place-items: center; min-height: 220px; color: var(--fg-3); text-align: center; font: 500 11px/1.6 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.wall.is-filtered .cam-void { display: none; }

/* ---------- timeline ---------- */
.log li { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 8px 32px; align-items: baseline; padding: 22px var(--gut); border-bottom: 1px solid var(--line); }
.log-d { font: 500 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.log h3 { font: 700 clamp(24px, 2.6vw, 34px)/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.log p { margin-top: 8px; font-size: 13px; color: var(--fg-2); max-width: 70ch; }
.log-k { display: flex; align-items: center; gap: 14px; justify-self: end; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 9px; border: 1px solid var(--line-2); font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); white-space: nowrap; }
.chip-on { border-color: var(--fg); color: var(--fg); }
.dot-warn { background: var(--warn); }
.dot-warn::after { border-color: var(--warn); }
.log-go { display: inline-flex; align-items: center; gap: 6px; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); min-height: 32px; white-space: nowrap; }
.log-go svg { width: 13px; height: 13px; }


/* ---------- faq ---------- */
.faq { max-width: 980px; margin: 0 auto; padding: 18px var(--gut) clamp(56px, 7vw, 96px); }
.q { border-bottom: 1px solid var(--line); }
.q-b { width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr) 28px; align-items: center; gap: 12px; min-height: 76px; padding: 14px 6px; text-align: left; }
.q-n { align-self: start; padding-top: 7px; font: 400 10.5px/1 var(--mono); letter-spacing: .1em; color: var(--fg-3); }
.q-t { font: 600 clamp(20px, 2.2vw, 28px)/1.05 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--fg-2); transition: color .15s ease; }
.q-i { position: relative; width: 16px; height: 16px; justify-self: end; }
.q-i::before, .q-i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--fg-2); transition: transform .25s var(--ease); }
.q-i::after { transform: rotate(90deg); }
.q-b[aria-expanded="true"] .q-t { color: var(--fg); }
.q-b[aria-expanded="true"] .q-i::after { transform: rotate(0deg); }
.q-a { padding: 0 34px 26px 70px; font-size: 13.5px; line-height: 1.7; color: var(--fg-2); max-width: 82ch; }
.q-a p + p { margin-top: 8px; }
.q-a a, .q-a button.lnk { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- contact + footer ---------- */
.ct { position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.ct-top { display: flex; justify-content: space-between; gap: 24px; padding: 26px var(--gut) 0; position: relative; z-index: 2; }
.ct-top ul { display: grid; gap: 2px; }
.ct-top a, .ct-top li { font: 400 11.5px/1.7 var(--mono); letter-spacing: .06em; color: var(--fg-3); }
.ct-top a:hover { color: var(--fg); }
.ct-r { text-align: right; }
.ct-art { position: relative; z-index: 1; display: grid; place-items: center; padding: 10px 8px 0; min-height: 420px; }
.ct-art pre { font: 500 10px/1 var(--mono); color: var(--fg); white-space: pre; user-select: none; }
.ct-big { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px 24px; padding: 0 var(--gut) 26px; }
.ct-big button, .ct-big a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font: 800 clamp(30px, 4.4vw, 64px)/.9 var(--display); text-transform: uppercase; letter-spacing: .01em; color: var(--fg); }
.ct-big svg { width: .55em; height: .55em; transition: transform .2s var(--ease); }
.ct-h { position: relative; z-index: 2; padding: 0 var(--gut) 8px; }
.glitch { position: relative; height: 150px; margin-top: 18px; }
.glitch canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding: 16px var(--gut) calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); position: relative; z-index: 2; background: var(--bg); }
.foot-c { font: 400 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.foot-m { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.foot-keys, .foot-top { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font: 400 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.foot-top svg { width: 13px; height: 13px; }

/* ---------- overlays ---------- */
.ovl { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: calc(env(safe-area-inset-top, 0px) + 11vh) 16px 16px; background: var(--overlay); font-family: var(--mono); font-size: 14px; line-height: 1.55; color: var(--fg); animation: fadeIn .16s ease; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
.dlg { width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-lg); overflow: hidden; animation: popIn .18s var(--ease); }
.pal { max-width: 640px; max-height: min(580px, 78vh); display: flex; flex-direction: column; }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 0 12px 0 16px; height: 58px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.pal-in > svg { width: 17px; height: 17px; color: var(--fg-3); }
.pal-in input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--fg); font: 400 15px/1 var(--mono); outline: none; }
.pal-in input::placeholder { color: var(--fg-3); }
.pal-x { height: 30px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 2px; font: 500 11px/1 var(--mono); color: var(--fg-3); }
.pal-list { flex: 1; overflow-y: auto; padding: 6px 8px 8px; overscroll-behavior: contain; scrollbar-width: thin; }
.pal-gh { padding: 12px 10px 6px; font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.pal-opt { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 46px; padding: 6px 10px; cursor: pointer; color: var(--fg); }
.pal-opt[aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--fg); }
.pal-oi { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--fg-3); }
.pal-opt[aria-selected="true"] .pal-oi { color: var(--fg); border-color: var(--accent-line); }
.pal-oi svg { width: 15px; height: 15px; }
.pal-ot { display: block; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-os { display: block; font-size: 11px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-ok { font-size: 11px; color: var(--fg-3); white-space: nowrap; }
.pal-empty { padding: 28px 16px; text-align: center; color: var(--fg-2); }
.pal-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface-2); flex-shrink: 0; }
.pal-foot span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fg-3); }
.ovl-pdf { align-items: center; padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px 16px; }
.pdf { max-width: 1000px; height: min(94vh, 1180px); display: flex; flex-direction: column; }
.pdf-bar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-shrink: 0; }
.pdf-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pdf-title b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-title span { font-size: 11px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-ctrls { display: flex; align-items: center; gap: 4px; }
.pdf-grp { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); background: var(--bg-2); }
.pdf-grp .icon-btn { width: 34px; height: 34px; border-color: transparent; }
.pdf-grp .icon-btn:disabled { opacity: .35; cursor: default; }
.pdf-n { min-width: 58px; text-align: center; font: 500 12px/1 var(--mono); color: var(--fg-2); font-variant-numeric: tabular-nums; }
.pdf-dl { height: 38px; }
.pdf-body { position: relative; flex: 1; overflow: auto; background: var(--pdf-bg); padding: 24px; overscroll-behavior: contain; }
.pdf-body canvas { display: block; margin: 0 auto; background: var(--paper); box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .45); }
.pdf-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px; text-align: center; color: var(--fg-2); }
.pdf-state b { color: var(--fg); font-weight: 600; }
.spinner { width: 24px; height: 24px; border: 2px solid var(--line-2); border-top-color: var(--fg); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.keys { max-width: 440px; }
.keys-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.keys-h h2 { font: 700 20px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.keys-l { padding: 8px 18px 14px; }
.keys-l div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); color: var(--fg-2); }
.keys-l div:last-child { border-bottom: 0; }
.keys-l span:last-child { display: inline-flex; gap: 4px; }
.mailg { max-width: 540px; }
.mailg-b { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.mailg-desc { font-size: 13.5px; line-height: 1.6; color: var(--fg-2); }
.mailg-hold { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-items: center; width: 100%; min-height: 72px; padding: 12px 16px; text-align: left; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg); cursor: pointer; transition: border-color .15s ease, background-color .15s ease; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.nav-spacer { display: none; }
.mailg-hold[data-state="holding"] { border-color: var(--fg); background: var(--accent-soft); }
.mailg-hold[data-state="busy"] { border-color: var(--accent-line); cursor: progress; }
.mailg-hold[data-state="ok"] { border-color: var(--ok); cursor: default; }
.mailg-ring { grid-row: 1 / span 2; position: relative; width: 40px; height: 40px; display: grid; place-items: center; }
.mailg-ring > svg:first-child { position: absolute; inset: 0; width: 40px; height: 40px; transform: rotate(-90deg); }
.mailg-ring circle { fill: none; stroke-width: 3; }
.mailg-ring-bg { stroke: var(--line-2); }
.mailg-ring-fg { stroke: var(--fg); stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 94.25; }
.mailg-ok { width: 18px; height: 18px; color: var(--ok); opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .2s var(--ease); }
.mailg-hold[data-state="busy"] .mailg-ring-fg { animation: ringPulse 1s ease-in-out infinite; }
.mailg-hold[data-state="ok"] .mailg-ring-fg { stroke: var(--ok); stroke-dashoffset: 0; }
.mailg-hold[data-state="ok"] .mailg-ok { opacity: 1; transform: none; }
@keyframes ringPulse { 50% { opacity: .45; } }
.mailg-cl { font: 700 20px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.mailg-tech { grid-column: 2; }
.mailg-prog { height: 2px; background: var(--line); overflow: hidden; }
.mailg-prog span { display: block; height: 100%; width: 0; background: var(--fg); transition: width .12s linear; }
.mailg-status { min-height: 1.4em; font-variant-numeric: tabular-nums; }
.mailg-status.is-err { color: var(--warn); }
.mailg-res { border: 1px solid var(--line-2); background: var(--bg-2); }
.mail-addr { display: flex; align-items: center; gap: 12px; padding: 18px 18px 4px; font: 500 20px/1.3 var(--mono); overflow-wrap: anywhere; }
.mail-addr span:last-child { user-select: all; -webkit-user-select: all; min-width: 0; }
.mail-p { color: var(--fg-3); }
.mail-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 18px 18px; }
.pm { max-width: 980px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); position: relative; }
.ovl-pm { align-items: center; padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px 16px; }
.pm-scr { position: relative; min-height: 420px; background: var(--cam-bg); border-right: 1px solid var(--line); overflow: hidden; }
.pm-scr canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.pm-scr::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%); }
.pm-b { padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 14px; max-height: min(86vh, 760px); overflow-y: auto; }
.pm-b h2 { font: 800 clamp(30px, 3.4vw, 46px)/.95 var(--display); text-transform: uppercase; letter-spacing: .01em; padding-right: 36px; }
.pm-desc { font-size: 13.5px; line-height: 1.7; color: var(--fg-2); }
.pm-spec { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12.5px; }
.pm-spec dt { font: 400 10.5px/1.7 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.pm-spec dd { color: var(--fg); }
.pm-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.pm-x { position: absolute; top: 12px; right: 12px; z-index: 3; background: var(--surface); }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); z-index: 150; display: inline-flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 11px 16px 11px 13px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-lg); font: 500 13px/1.4 var(--mono); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s var(--ease); }
.toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 16px; height: 16px; color: var(--ok); }
.toast.is-warn svg { color: var(--warn); }

/* ---------- intro: the star draws itself, then opens like an aperture onto the 3D hero ---------- */
html.is-intro, html.is-intro body { overflow: hidden; }
.intro { display: none; }
html.is-intro .intro, .intro.is-out { display: block; }
.intro { position: fixed; inset: 0; z-index: 450; pointer-events: none; --star: min(360px, 60vw); }
/* the curtain carries a star-shaped hole, empty until the reveal: then it sits exactly where the
   filled star was, and the whole curtain (star included) scales up from the centre, the hole first */
.intro-bg {
  position: absolute; inset: 0; background: var(--bg); pointer-events: auto; transform-origin: 50% 50%;
  transition: transform 1s cubic-bezier(.5, 0, .8, .3);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><path d='M20 1C21.4 13.6 26.4 18.6 39 20C26.4 21.4 21.4 26.4 20 39C18.6 26.4 13.6 21.4 1 20C13.6 18.6 18.6 13.6 20 1Z'/></svg>"), linear-gradient(#000 0 0); -webkit-mask-position: center, 0 0; -webkit-mask-size: 0 0, 100% 100%; -webkit-mask-repeat: no-repeat; -webkit-mask-composite: xor;
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><path d='M20 1C21.4 13.6 26.4 18.6 39 20C26.4 21.4 21.4 26.4 20 39C18.6 26.4 13.6 21.4 1 20C13.6 18.6 18.6 13.6 20 1Z'/></svg>"), linear-gradient(#000 0 0); mask-position: center, 0 0; mask-size: 0 0, 100% 100%; mask-repeat: no-repeat; mask-composite: exclude;
}
.intro.is-through .intro-bg { pointer-events: none; }
.intro.is-out .intro-bg { transform: scale(var(--open, 24)); -webkit-mask-size: var(--star) var(--star), 100% 100%; mask-size: var(--star) var(--star), 100% 100%; }
.intro-mark { position: absolute; left: 50%; top: 50%; width: var(--star); height: var(--star); margin: calc(var(--star) / -2) 0 0 calc(var(--star) / -2); color: var(--fg); transition: opacity .55s ease; }
.intro-mark .d { fill: none; stroke: currentColor; stroke-width: .28; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: introDraw .85s var(--ease) forwards; }
.intro-mark .c { fill: currentColor; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.7); animation: introPop .4s .75s var(--ease) forwards; }
/* the fill gives way to the hole at once; the outline rides the edge of the hole, then fades */
.intro.is-out .intro-mark .c { visibility: hidden; }
.intro.is-mark-out .intro-mark { opacity: 0; }
@keyframes introDraw { to { stroke-dashoffset: 0; } }
@keyframes introPop { to { opacity: 1; transform: scale(1); } }
.intro-log { position: absolute; left: var(--gut); bottom: 24px; font: 400 11px/1.75 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); transition: opacity .25s ease; }
.intro-log b { color: var(--fg); font-weight: 500; }
.intro-pct { position: absolute; right: var(--gut); bottom: 18px; font: 800 clamp(48px, 7vw, 96px)/.8 var(--display); color: var(--fg); font-variant-numeric: tabular-nums; transition: opacity .25s ease; }
.intro-skip { position: absolute; right: var(--gut); top: calc(env(safe-area-inset-top, 0px) + 20px); font: 400 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); }
.intro.is-line .intro-log, .intro.is-line .intro-pct, .intro.is-line .intro-skip { opacity: 0; }
.hdr { transition: box-shadow .2s ease, transform .8s var(--ease) .35s; }
html.is-intro .hdr { transform: translateY(-101%); }
/* the canvas comes closer, not its host: the 3D sizes itself from the host's box */
#hero-canvas { transition: transform 1.8s cubic-bezier(.2, .7, .2, 1); }
html.is-intro #hero-canvas { transform: scale(.9); }
.hero-name > span { display: inline-grid; transition: transform 1s var(--ease) .1s, opacity .6s ease .1s; }
.hero-name > span:nth-child(2) { transition-delay: .22s; }
.hero-name > span:nth-child(3) { transition-delay: .3s; }
html.is-intro .hero-name > span { transform: translateY(60%); opacity: 0; }
.hero-meta, .hero .strip { transition: opacity .7s ease .55s; }
html.is-intro .hero-meta, html.is-intro .hero .strip { opacity: 0; }

/* ---------- liaison: two ASCII hands plug a network cable, driven by scroll ---------- */
.link, .flux { display: none; }
html.has-gl .link, html.has-gl .flux { display: block; }
.link { position: relative; height: 240vh; border-bottom: 1px solid var(--line); }
.link-stage { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--hdr)); height: calc(100vh - var(--hdr)); overflow: hidden; }
.link-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.link-win { position: absolute; left: 50%; top: 50%; width: min(560px, 74vw); height: min(380px, 56vh); transform: translate(-50%, -50%); border: 1px solid var(--fg); pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; }
.link-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 10px; border-bottom: 1px solid var(--fg); background: var(--bg); font: 500 10.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg); }
.link-bar b { font-weight: 600; color: var(--fg-3); }
.link-bar b.is-up { color: var(--ok); }
.link-log { padding: 8px 12px; font: 400 11px/1.6 var(--mono); color: var(--fg-2); white-space: pre-wrap; background: color-mix(in srgb, var(--bg) 82%, transparent); width: max-content; max-width: 100%; border-top: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
.link-tag { position: absolute; z-index: 1; padding: 4px 7px; background: var(--bg); font: 400 10.5px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); }
.link-tag.tl { left: calc(var(--gut) - 7px); top: 18px; }
.link-tag.br { right: calc(var(--gut) - 7px); bottom: 14px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- flux: the 20 feeds on a 3D helix, the camera descends with the scroll ---------- */
.flux { position: relative; height: 340vh; border-bottom: 1px solid var(--line); }
.flux-stage { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--hdr)); height: calc(100vh - var(--hdr)); overflow: hidden;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 120px 120px; background-position: center center; }
.flux-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.flux-stage canvas.is-hot { cursor: pointer; }
.flux-hud { position: absolute; z-index: 2; left: var(--gut); bottom: 22px; display: grid; justify-items: start; gap: 10px; max-width: min(560px, 62%); padding: 14px 16px; background: color-mix(in srgb, var(--bg) 86%, transparent); border: 1px solid var(--line-2); }
.flux-hud h3 { font: 800 clamp(28px, 3.4vw, 50px)/.92 var(--display); text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; }
.flux-nav { position: absolute; z-index: 2; top: 50%; width: 48px; height: 48px; margin-top: -24px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; background: var(--bg); color: var(--fg); }
.flux-nav svg { width: 18px; height: 18px; }
.flux-nav.prev { left: var(--gut); }
.flux-nav.next { right: var(--gut); }
.flux-pos { position: absolute; z-index: 2; right: var(--gut); bottom: 26px; text-align: right; }
.flux-pos b { display: block; font: 800 clamp(40px, 5vw, 72px)/.85 var(--display); color: var(--fg); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.flux-sub { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 40px var(--gut) 0; }
.flux-sub h3 { font: 800 clamp(30px, 3.6vw, 52px)/.9 var(--display); text-transform: uppercase; }
@media (max-width: 640px) {
  .link { height: 200vh; }
  .link-win { width: 84vw; height: 40vh; }
  .flux { height: 280vh; }
  .flux-hud { left: var(--gut); right: var(--gut); max-width: none; bottom: 16px; }
  .flux-nav { top: 16px; margin-top: 0; width: 42px; height: 42px; }
  .flux-nav.next { right: auto; left: calc(var(--gut) + 52px); }
  .flux-pos { top: 16px; bottom: auto; }
  .flux-sub { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (hover: hover) { .flux-nav:hover { border-color: var(--fg); } }
@media (prefers-reduced-motion: reduce) { .intro, .intro.is-out { display: none; } }

/* ---------- hover ---------- */
@media (hover: hover) {
  .nav-panel a:hover, .h-icons a:hover, .theme-btn:hover { color: var(--fg); }
  .h-logo:hover svg { transform: rotate(45deg) scale(.9); }
  .h-cmd:hover { background: var(--accent-soft); }
  .icon-btn:hover { color: var(--fg); border-color: var(--line-2); }
  .btn-primary:hover { background: color-mix(in srgb, var(--fg) 82%, var(--bg)); }
  .btn-ghost:hover { border-color: var(--fg); }
  .sk-go:hover { color: var(--fg); border-color: var(--fg); }
  .f-btn:not([aria-pressed="true"]):hover { color: var(--fg); background: var(--accent-soft); }
  .tag:hover { color: var(--fg); border-color: var(--line-2); }
  .cam:hover { border-color: var(--line-2); transform: translateY(-2px); }
  .cam-open:hover, .p-link:hover, .log-go:hover { text-decoration: underline; text-underline-offset: 4px; }
  .q-b:hover .q-t { color: var(--fg); }
  .ct-big button:hover svg, .ct-big a:hover svg { transform: translate(4px, -4px); }
  .foot-keys:hover, .foot-top:hover, .freset:hover { color: var(--fg); }
  .pal-x:hover { color: var(--fg); }
}

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .h-status { display: none; }
}
@media (max-width: 1080px) {
  .h-rot { display: none; }
  .hero-meta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hm:nth-child(2) { border-right: 0; }
  .hm:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stack { grid-template-columns: minmax(0, 1fr); }
  .globe { border-right: 0; border-bottom: 1px solid var(--line); }
  .wall { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cam, .cam-void { grid-column: span 3; }
  .cam[data-size="xl"] { grid-column: span 6; grid-row: span 1; }
  .cam[data-size="xl"] .cam-scr { aspect-ratio: 16 / 9; flex: none; min-height: 0; }
  .pm { grid-template-columns: minmax(0, 1fr); max-height: 92vh; overflow-y: auto; }
  .pm-scr { min-height: 0; aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid var(--line); }
  .pm-b { max-height: none; overflow: visible; }
}
@media (max-width: 960px) {
  :root { --hdr: 60px; --gut: 20px; }
  .h-icons { display: none; }
  .menu-btn { display: grid; }
  .h-cmd { width: 64px; }
  .h-cmd-k { font-size: 13px; white-space: nowrap; }
  .h-cmd-l { display: none; }
  .h-logo svg { width: 30px; height: 30px; }
  .hdr .nav-spacer { display: block; flex: 1; border-right: 1px solid var(--line); }
  .nav-panel {
    display: none; position: fixed; left: 0; right: 0; top: var(--menu-top, 60px); z-index: 70;
    flex-direction: column; align-items: stretch; gap: 0; padding: 6px var(--gut) 16px;
    max-height: calc(100dvh - var(--menu-top, 60px)); overflow-y: auto;
    background: var(--bg); border-bottom: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
  }
  .nav-panel.is-open { display: flex; animation: popIn .18s var(--ease); }
  .nav-panel a { min-height: 58px; font: 800 30px/1 var(--display); letter-spacing: .04em; color: var(--fg); border-bottom: 1px solid var(--line); gap: 14px; }
  .nav-panel a:last-child { border-bottom: 0; }
  .nav-panel a.is-active::before { width: 8px; height: 8px; }
  .nav-i { display: inline; font: 400 11px/1 var(--mono); letter-spacing: .1em; color: var(--fg-3); width: 24px; }
  .log li { grid-template-columns: minmax(0, 1fr) auto; }
  .log-d { grid-column: 1 / -1; }
  .ct-art { min-height: 340px; }
}
@media (max-width: 640px) {
  :root { --gut: 16px; }
  .hero-vis { height: 360px; }
  .hero-tag.tr, .hero-tag.bl { display: none; }
  .hero-name { padding: 20px var(--gut) 16px; gap: .12em; font-size: clamp(52px, 17.5vw, 120px); }
  .hero-meta { grid-template-columns: minmax(0, 1fr); }
  .hm { border-right: 0; border-bottom: 1px solid var(--line); padding: 14px var(--gut); }
  .hm:last-child { border-bottom: 0; }
  .hm-cta .btn { flex: 1 1 0; height: 50px; }
  .sh { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 48px; }
  .sh-m { text-align: left; }
  .room { padding: 48px var(--gut); }
  .reco-acts .btn { flex: 1 1 100%; height: 48px; }
  .groups { grid-template-columns: minmax(0, 1fr); }
  .grp { border-right: 0; }
  .globe-pre { min-height: 260px; }
  .globe-pre pre { font-size: 7.4px; }
  .stmt-floor { background-size: 48px 48px; }
  .survey { gap: 8px 16px; font-size: 10px; }
  .survey .end { margin-left: 0; }
  .filters { flex-direction: column; align-items: stretch; }
  .seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .f-btn { justify-content: center; height: 44px; padding: 0 4px; letter-spacing: .06em; font-size: 11px; gap: 4px; }
  .psearch { max-width: none; margin-left: 0; flex-basis: auto; }
  .psearch input { height: 48px; font-size: 16px; }
  .psearch kbd { display: none; }
  .wall { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cam, .cam[data-size="xl"], .cam-void { grid-column: 1 / -1; }
  .cam-void { display: none; }
  .tag { height: 32px; }
  .log li { padding: 18px var(--gut); gap: 6px 14px; }
  .log-k { justify-self: start; grid-column: 1 / -1; }
  .log-go { min-height: 44px; }
  .q-b { grid-template-columns: 34px minmax(0, 1fr) 22px; min-height: 64px; }
  .q-a { padding: 0 8px 22px 46px; }
  .ct-top { flex-direction: column; gap: 14px; }
  .ct-r { text-align: left; }
  .ct-art { min-height: 260px; }
  .ct-art pre { font-size: 6.2px; }
  .ct-big { flex-direction: column; align-items: flex-start; }
  .glitch { height: 110px; }
  .foot-m { margin-left: 0; }
  .foot-keys { display: none; }
  .ovl-pal { padding: 0; align-items: stretch; }
  .pal { max-width: none; max-height: none; height: 100dvh; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top, 0px); }
  .pal-foot { display: none; }
  .ovl-pdf, .ovl-pm { padding: 0; }
  .pdf { max-width: none; height: 100dvh; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top, 0px); }
  .pdf-bar { flex-wrap: wrap; padding: 8px 8px 8px 14px; row-gap: 8px; }
  .pdf-ctrls { order: 3; flex: 1 1 100%; justify-content: space-between; }
  .pdf-dl .s-lbl { display: none; }
  .pdf-body { padding: 10px; }
  .pm { height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .pm-b { padding: 22px var(--gut) 24px; }
  .pm-acts .btn { flex: 1 1 100%; height: 48px; }
  .mail-addr { font-size: 16px; }
  .mailg-actions .btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .stmt-t { transform: none; }
}

/* ---------- assembled extras ---------- */
.pm-spec div { display: contents; }
.pm .tags li { display: contents; }
.pm-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.pm-nav button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.pm-nav button:disabled { opacity: .35; cursor: default; }
.pm-nav svg { width: 13px; height: 13px; }
.pm-pos { font: 500 11px/1 var(--mono); letter-spacing: .12em; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.globe-pre { cursor: grab; touch-action: pan-y; }
.globe-pre.is-drag { cursor: grabbing; }
@media (hover: hover) { .pm-nav button:not(:disabled):hover { color: var(--fg); } }
@media (max-width: 640px) { .pm-nav button { font-size: 10px; letter-spacing: .08em; } }

/* ---------- feature: i18n ---------- */
.lang-btn { width: 64px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 3px; font: 600 11.5px/1 var(--mono); letter-spacing: .06em; color: var(--fg-3); }
.lang-btn .l-sep { opacity: .5; }
html[lang="fr"] .lang-btn .l-fr, html[lang="en"] .lang-btn .l-en { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
html.i18n-pending body > :not(.intro) { visibility: hidden; }
@media (hover: hover) { .lang-btn:hover { color: var(--fg-2); background: var(--accent-soft); } }
@media (max-width: 960px) { .lang-btn { width: 54px; } }
/* the language button takes room from the nav: keep each link on one line */
.nav-panel a { white-space: nowrap; }
@media (min-width: 961px) and (max-width: 1520px) {
  .nav-panel { gap: clamp(12px, 1.8vw, 26px); }
  .nav-panel a { letter-spacing: .24em; }
}
/* ---------- feature: plan ---------- */
/* architecture plan on the dossier screen (stage-k8s, labo-ctf): drag to turn on wide screens */
.pm-scr.is-plan canvas { cursor: grab; touch-action: pan-y; }
.pm-scr.is-plan.is-drag canvas { cursor: grabbing; }
@media (max-width: 640px) { .pm-scr.is-plan canvas { cursor: default; } }

/* ---------- feature: hero ---------- */
.hero-vis.is-hot { cursor: pointer; }
.hero-tag.bl { max-width: calc(100% - 2 * var(--gut) - 230px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: color .15s ease; }
.hero-tag.bl.is-hot { color: var(--fg); }
.hero-tag.bl.is-hot::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px; vertical-align: 1px; border: 1px solid currentColor; }
@media (prefers-reduced-motion: reduce) { .hero-tag.bl { transition: none; } }

/* ---------- feature: stack ---------- */
.globe-pre pre { color: var(--fg-2); }
.globe-pre .stk-on, .globe-pre .stk-tx { color: var(--fg); }
.globe-pre .stk-dim { color: var(--fg-3); opacity: .55; }
.globe-pre .stk-hot { color: var(--rec); }
/* the layer name changes every few seconds: keep the footer height fixed */
.globe-f { row-gap: 4px; }
.globe-f > span { white-space: nowrap; }
.globe-f > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#globe-deg { flex: none; color: var(--fg); text-align: right; margin-left: auto; }
.grp { transition: background-color .25s ease; }
.grp.is-lit { background: var(--accent-soft); }
.grp.is-lit .grp-h .lbl { color: var(--fg); }
@media (max-width: 640px) {
  .globe-pre { padding: 14px 4px; }
  .globe-pre pre { font-size: 9px; }
  .globe-f { flex-wrap: wrap; }
  #globe-deg { flex-basis: 100%; text-align: left; margin-left: 0; }
}

/* ---------- feature: ring ---------- */
.ct-art > pre, .ct-art > .ring { grid-area: 1 / 1; }
.ct-art .ring { position: relative; z-index: 1; pointer-events: none; user-select: none; }
.ct-art .ring[hidden] { display: none; }
.ring span { position: absolute; left: 0; top: 0; padding: 1px 1px 0; background: var(--bg); font: 500 11.5px/1 var(--mono); color: var(--fg-2); white-space: pre; transform-origin: 50% 50%; transition: opacity .2s linear; }
.ring span.is-b { color: var(--fg-3); opacity: .5; }
.ring span.is-h { opacity: 0; }
.ring span[data-k="k"] { color: var(--fg-3); }
.ring span[data-k="z"] { color: var(--ok); }
.ring span[data-k="n"] { color: var(--fg-3); }
.ring-cap { grid-area: 2 / 1; max-width: 86ch; margin: 14px auto 24px; padding: 0 8px; text-align: center; font: 400 11px/1.6 var(--mono); letter-spacing: .04em; color: var(--fg-3); }
.ring-cap[hidden] { display: none; }
.ring-k { margin-right: 6px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
.ring-k::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--fg-3); vertical-align: 1px; }
.ring-cap.is-ok .ring-k::before { background: var(--ok); }
@media (max-width: 640px) {
  .ring span { font-size: 10px; }
  .ring-cap { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .ring span { transition: none; }
}

/* ---------- feature: tilt ---------- */
/* only the feed tilts inside the fixed screen window; HUD shifts in 2D, whole pixels */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  /* flat feeds keep transform: none (no idle compositing layers); none <-> tilt still interpolates */
  .cam-scr .cam-cv { transform-origin: 50% 50%; transition: transform .25s var(--ease); }
  .cam-scr.is-tilt .cam-cv { transform: perspective(var(--tp, 1400px)) rotateX(calc(var(--ty, 0) * var(--ta, 3deg) * -1)) rotateY(calc(var(--tx, 0) * var(--ta, 3deg))) scale(var(--ts, 1.02)); }
  .cam-scr .cam-hud { transition: transform .25s var(--ease); }
  .cam-scr.is-tilt .cam-hud { transform: translate(var(--hx, 0px), var(--hy, 0px)); }
  .cam-scr::after { content: ""; position: absolute; left: -50%; top: -50%; width: 200%; height: 200%; z-index: 1; pointer-events: none; opacity: 0;
    background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--cam-fg) 6%, transparent) 0, transparent 22%);
    transform: translate(calc(var(--tx, 0) * 25%), calc(var(--ty, 0) * 25%)); transition: opacity .25s ease, transform .25s var(--ease); }
  .cam-scr.is-tilt::after { opacity: 1; }
}
/* ---------- i18n: chrome ---------- */
/* 1241–1400 px: with the status block visible, the nav links overflowed onto the icons (in both languages) */
@media (min-width: 1241px) and (max-width: 1400px) {
  .nav-panel { gap: 12px; }
  .nav-panel a { letter-spacing: .12em; }
  .h-status > * { padding: 0 14px; font-size: 11px; }
}

/* ---------- i18n: hero ---------- */
/* English quote: the translation note sits after it, small and upright */
.reco-tr { display: block; margin-top: 10px; font: 400 11px/1.4 var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
/* PDF buttons: "PDF, in French" goes under the label, so the buttons keep their width */
.btn-note { display: block; margin-top: 4px; font-size: 9.5px; font-weight: 400; letter-spacing: .12em; opacity: .7; }

/* ---------- i18n: mid ---------- */
/* "& networks" is wider than "& réseaux": on phones the outlined word would touch the edges at the 76px floor */
@media (max-width: 640px) {
  html[lang="en"] .stmt-t { font-size: 17.5vw; }
}

/* ---------- cleanup ---------- */
.f-n { opacity: 1; }

/* ---------- mobile + search ---------- */
.cam-void { order: 99; }
.cam-void.tab-only { display: none; }
@media (min-width: 641px) and (max-width: 1080px) { .cam-void.tab-only { display: grid; } }
.wall.is-filtered .cam-void.tab-only { display: none; }
.h-cmd-ico { display: none; width: 20px; height: 20px; }
@media (hover: none), (pointer: coarse) {
  .h-cmd-k { display: none; }
  .h-cmd-ico { display: block; }
  .intro-skip .sk-click { display: none; }
}
.intro-skip .sk-tap { display: none; }
@media (hover: none), (pointer: coarse) { .intro-skip .sk-tap { display: inline; } }
.nav-spacer .sp-rec, .nav-spacer .sp-time { display: none; }
@media (max-width: 960px) {
  .hdr .nav-spacer { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-width: 0; overflow: hidden; font: 500 10.5px/1 var(--mono); letter-spacing: .14em; color: var(--fg-3); white-space: nowrap; }
  .nav-spacer .sp-rec { display: inline-flex; align-items: center; gap: 6px; color: var(--rec); }
  .nav-spacer .sp-rec::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blinkRec 1.2s steps(1) infinite; }
  .nav-spacer .sp-time { display: inline; font-variant-numeric: tabular-nums; }
}
@media (max-width: 420px) { .nav-spacer .sp-rec-l { display: none; } .hdr .nav-spacer { padding: 0 10px; gap: 6px; } }
.empty-try { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font: 400 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.empty-try:empty { display: none; }
.empty-try button { height: 30px; padding: 0 10px; border: 1px solid var(--line-2); font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: none; color: var(--fg); }
@media (hover: hover) { .empty-try button:hover { border-color: var(--fg); } }
@media (max-width: 640px) {
  .pm { grid-template-rows: auto auto; align-content: start; }
  .pm-scr .cam-hud.tr { right: 62px; }
}
.psearch kbd.is-enter { right: 40px; }
@media (hover: none), (pointer: coarse) { .psearch kbd.is-enter { display: none; } }

/* ---------- hover: a tag lights the projects that use it ---------- */
.wall .cam { transition: border-color .2s ease, transform .2s var(--ease), opacity .3s ease; }
.wall.is-tagging .cam:not(.is-lit), .wall.is-tagging .cam-void { opacity: .28; }
.wall.is-tagging .cam.is-lit { border-color: var(--accent-line); }
.wall.is-tagging .tag.is-match { color: var(--bg); background: var(--fg); border-color: var(--fg); }

/* ---------- hover: PTZ, the feed zooms towards the pointer under a focus reticle ---------- */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cam-scr .cam-cv { transform-origin: var(--zx, 50%) var(--zy, 50%); transition: transform .45s var(--ease), transform-origin .3s ease-out; }
  .cam-scr.is-tilt .cam-cv { transform: perspective(var(--tp, 1400px)) rotateX(calc(var(--ty, 0) * var(--ta, 3deg) * -1)) rotateY(calc(var(--tx, 0) * var(--ta, 3deg))) scale(calc(var(--ts, 1.02) * 1.2)); }
  .cam-scr.is-tilt { cursor: none; }
  .ptz {
    position: absolute; z-index: 3; left: var(--zx, 50%); top: var(--zy, 50%); width: 62px; height: 42px; pointer-events: none;
    color: var(--cam-fg); opacity: 0; transform: translate(-50%, -50%) scale(1.5); transition: opacity .2s ease, transform .35s var(--ease);
    background:
      linear-gradient(currentColor 0 0) 0 0 / 12px 1px, linear-gradient(currentColor 0 0) 0 0 / 1px 10px,
      linear-gradient(currentColor 0 0) 100% 0 / 12px 1px, linear-gradient(currentColor 0 0) 100% 0 / 1px 10px,
      linear-gradient(currentColor 0 0) 0 100% / 12px 1px, linear-gradient(currentColor 0 0) 0 100% / 1px 10px,
      linear-gradient(currentColor 0 0) 100% 100% / 12px 1px, linear-gradient(currentColor 0 0) 100% 100% / 1px 10px;
    background-repeat: no-repeat; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .9));
  }
  .ptz::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1px 0 0 -1px; background: var(--rec); }
  .ptz b { position: absolute; left: calc(100% + 8px); top: calc(100% + 6px); font: 600 9.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
  .ptz.is-l b { left: auto; right: calc(100% + 8px); }
  .ptz.is-u b { top: auto; bottom: calc(100% + 6px); }
  .cam-scr.is-tilt .ptz { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ---------- hover: the background list floats the project's feed next to the pointer ---------- */
.log li.has-peek { cursor: pointer; transition: background-color .2s ease; }
.log-go svg { transition: transform .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .log li.has-peek:hover { background: var(--accent-soft); }
  .log li.has-peek:hover .log-go { color: var(--fg); }
  .log li.has-peek:hover .log-go svg { transform: translateX(3px); }
}
.peek { position: fixed; left: 0; top: 0; z-index: 55; width: 300px; pointer-events: none; opacity: 0; transition: opacity .2s ease; will-change: transform; }
.peek.is-on { opacity: 1; }
.peek-scr { position: relative; height: 188px; background: var(--cam-bg); border: 1px solid rgba(231, 229, 223, .28); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); overflow: hidden; clip-path: inset(0 0 100% 0); transition: clip-path .4s var(--ease); }
.peek.is-on .peek-scr { clip-path: inset(0); }
.peek-scr canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.peek-scr::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px); }
.peek-h { position: absolute; z-index: 2; font: 600 9.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cam-fg); text-shadow: 0 0 6px rgba(0, 0, 0, .9); }
.peek-h.tl { left: 10px; top: 9px; color: var(--rec); display: flex; align-items: center; gap: 6px; }
.peek-h.tl::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blinkRec 1.2s steps(1) infinite; }
.peek-h.tr { right: 10px; top: 9px; }
.peek-h.br { right: 10px; bottom: 8px; }
@media (hover: none), (pointer: coarse) { .peek { display: none; } }

/* ---------- palette: list + live preview of the selected entry ---------- */
.pal-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.pal-body .pal-list { min-height: 0; }
.pal-pv { display: none; }
#pal-count { margin-left: auto; }
#pal-count::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--rec); animation: blinkRec 1.2s steps(1) infinite; }
@media (min-width: 861px) {
  .pal { max-width: 1000px; height: min(620px, 80vh); max-height: none; }
  .pal-body { grid-template-columns: minmax(0, 1fr) 400px; }
  .pal-pv { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-left: 1px solid var(--line); background: var(--bg-2); }
}
.pal-scr { flex-shrink: 0; }
.pal-scr canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.pal-ov { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--cam-fg); pointer-events: none; text-shadow: 0 0 18px rgba(0, 0, 0, .9); }
.pal-ov b { font: 900 96px/.8 var(--display); letter-spacing: .01em; }
.pal-ov svg { width: 56px; height: 56px; filter: drop-shadow(0 0 12px rgba(0, 0, 0, .9)); }
.pal-ov span { padding: 6px 10px; background: rgba(11, 11, 11, .82); border: 1px solid var(--cam-line); font: 600 10.5px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--cam-fg); }
.pal-pv-b { display: grid; gap: 10px; align-content: start; padding: 18px 20px 20px; overflow: hidden; }
.pal-pv-t { font: 800 30px/.95 var(--display); letter-spacing: .01em; text-transform: uppercase; color: var(--fg); }
.pal-pv-d { font-size: 12.5px; line-height: 1.55; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.pal-pv .tag { display: inline-flex; align-items: center; }
