/* Type scale (px): text 12 · 13 · 14 · 16 · 18 · 20 (nothing under 12);
   display 24 · 28 · 40 · 52 · 62 (44 on narrow screens). Keep new sizes on this scale. */
/* Evelyn Smith — Robofolio-style prototype. Own CSS; structure and measurements follow the donor study (ДОНОР-ЗАМЕТКИ.md). */
:root {
  --fh: 'Space Grotesk', Inter, system-ui, sans-serif;
  --fb: Inter, system-ui, sans-serif;
  --fm: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: .16s; --t: .2s; --t-slow: .28s;
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
}
[data-theme='dark'] {
  --bg: #0d0b0a; --surface: #171413; --surface2: #241f1c; --fg: #faf6f1; --muted: #a79e96;
  --border: rgba(255, 255, 255, .10); --glass: rgba(23, 20, 19, .58); --pill: rgba(255, 255, 255, .06);
  --accent: #ff9b6b; --accent-ink: #1b0e07; --note: #ffd58a; --dot: rgba(255, 255, 255, .07); --shadow: rgba(0, 0, 0, .6); --ok-ink: #5fd39a;
  color-scheme: dark;
}
[data-theme='light'] {
  --bg: #fbf7f2; --surface: #ffffff; --surface2: #efe6dc; --fg: #17120f; --muted: #6b625a;
  --border: rgba(0, 0, 0, .10); --glass: rgba(255, 255, 255, .66); --pill: rgba(0, 0, 0, .05);
  --accent: #b8460f; --accent-ink: #ffffff; --note: #ffd9a8; --dot: rgba(0, 0, 0, .08); --shadow: rgba(60, 30, 10, .3); --ok-ink: #15633f;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--fb); font-size: 16px; line-height: 1.5;
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.2px); background-size: 26px 26px;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
/* theme switch: every surface changes colour in one move (main.js adds the class for the length of the move) */
:root.theming *, :root.theming *::before, :root.theming *::after { transition: background-color var(--t-slow) var(--ease), color var(--t-slow) var(--ease), border-color var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease), fill var(--t-slow) var(--ease), stroke var(--t-slow) var(--ease) !important; }
:root.theming .theme-knob { transition: transform var(--t-slow) var(--ease), background-color var(--t-slow) var(--ease), color var(--t-slow) var(--ease) !important; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 999px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: calc(100% - 32px); max-width: var(--wrap); margin-inline: auto; }
.label { font-family: var(--fm); font-size: 13px; color: var(--muted); }
.ph { font-family: var(--fm); font-size: .88em; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-bottom: 1px dashed var(--accent); padding: 0 .25em; border-radius: 3px; white-space: normal; }

/* ---------- header ---------- */
body::before {
  content: ''; position: fixed; left: 0; right: 0; top: 0; height: 24px;
  background: linear-gradient(to bottom, var(--bg) 70%, transparent);
  z-index: 28; pointer-events: none;
}
.hdr {
  position: sticky; top: 16px; z-index: 30; margin: 16px auto 0; width: calc(100% - 32px); max-width: var(--wrap);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 8px 16px; height: 68px;
  border-radius: 22px; border: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
}
.hdr-name { background: none; border: 0; padding: 11px 6px; font-family: var(--fm); font-size: 16px; font-weight: 500; letter-spacing: .3px; min-width: 132px; text-align: left; }
.hdr-nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--pill); border: 1px solid var(--border); }
.hdr-nav a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); padding: 0 22px; height: 40px; line-height: 40px; border-radius: 999px; transition: color var(--t) var(--ease), background-color var(--t) var(--ease); }
@media (hover: hover) { .hdr-nav a:hover { color: var(--fg); } }
.hdr-nav a.on { color: var(--fg); background: var(--surface2); }
.hdr-right { display: flex; align-items: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; font-size: 13px; font-weight: 500; height: 36px; padding: 0 16px; text-decoration: none; border: 1px solid var(--border); background: transparent; transition: transform var(--t) var(--ease), background-color var(--t) var(--ease), filter var(--t) var(--ease); }
@media (hover: hover) { .btn:hover { transform: translateY(-1px); background: var(--pill); } }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
@media (hover: hover) { .btn-accent:hover { background: var(--accent); filter: brightness(1.07); } }
.theme { width: 52px; height: 30px; border-radius: 999px; border: 1px solid var(--border); background: var(--pill); padding: 2px; position: relative; transition: transform var(--t) var(--ease); }
.theme-knob { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; transition: transform var(--t-slow) var(--ease); }
[data-theme='light'] .theme-knob { transform: translateX(22px); }
.i-sun { display: none; } [data-theme='light'] .i-sun { display: block; } [data-theme='light'] .i-moon { display: none; }
.burger { display: none; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--border); background: var(--pill); place-items: center; transition: transform var(--t) var(--ease); }
.menu { display: none; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: min(520px, calc(100% - 549px)) 1fr; grid-template-areas: 'text robot' 'ask robot'; grid-template-rows: auto 1fr; column-gap: 40px;
  padding-top: 28px; align-content: start;
}
.hero-text { grid-area: text; }
.hero-ask { grid-area: ask; padding-top: 22px; }
.status { font-family: var(--fm); font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); opacity: 0; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(3); opacity: 0; } }
h1 { font-family: var(--fh); font-weight: 600; font-size: 62px; line-height: 65px; letter-spacing: -2.1px; }
.sub { font-size: 18px; line-height: 27px; color: var(--muted); margin-top: 20px; max-width: 640px; }
.sub a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

.thread { display: flex; flex-direction: column; gap: 10px; }
.thread:empty { display: none; }
.thread ~ .ask { margin-top: 16px; } /* ~ not +: the greeting sits between the thread and the box */
.msg { max-width: 92%; padding: 10px 16px; border-radius: 16px; font-size: 14px; line-height: 21px; animation: rise .25s var(--ease); }
.greet { display: none; margin: 0; } /* empty state of the chat window, shown on the first screen only (see .first-screen) */
.msg.u { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.msg.b { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.msg.b a { color: var(--accent); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.ask { position: relative; display: flex; align-items: center; height: 60px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 60px -34px var(--shadow); transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.ask:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent), 0 30px 60px -34px var(--shadow); }
.ask input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; padding: 0 20px 0 24px; font: inherit; font-size: 16px; color: var(--fg); outline: none; }
.ask input::placeholder { color: var(--muted); }
.ask button { width: 44px; height: 44px; margin-right: 8px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; transition: transform var(--t) var(--ease); }
@media (hover: hover) { .ask button:hover { transform: scale(1.06); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; color: var(--muted); transition: color var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease); }
@media (hover: hover) { .chip:hover { color: var(--fg); border-color: var(--accent); transform: translateY(-1px); } }

/* agent team stage */
.team-stage { grid-area: robot; position: relative; align-self: start; width: 100%; min-width: 0; display: flex; flex-direction: column; }
.team-board { position: relative; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); padding: 10px 12px 12px; box-shadow: 0 30px 60px -40px var(--shadow); overflow: hidden; transition: opacity var(--t-slow) var(--ease); }
.team-board.fade { opacity: 0; }
.tb-head { display: flex; align-items: center; gap: 10px; font-family: var(--fm); font-size: 12px; min-height: 28px; }
.tb-es { position: relative; width: 12px; height: 12px; border-radius: 50%; background: #ff9466; flex: none; }
.tb-es.ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); opacity: 0; animation: ringp 1.2s var(--ease) infinite; }
@keyframes ringp { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(2.5); opacity: 0; } }
.tb-who { flex: none; white-space: nowrap; } /* the head keeps one line in every state: the brief next to it is the one that gives way */
.tb-who b { font-weight: 500; } .tb-who i { font-style: normal; color: var(--muted); }
.tb-brief { margin-left: auto; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tb-body { display: grid; grid-template-columns: 1fr 1.7fr 1.25fr; gap: 12px; margin-top: 8px; height: 186px; align-items: start; }
.tb-notes, .tb-make, .tb-feed { min-width: 0; position: relative; }
.tb-notelist { height: 158px; overflow: hidden; }
.tb-l { font: 12px var(--fm); color: var(--muted); margin: 0 0 4px; }
.tb-make .tb-l:nth-of-type(2) { margin-top: 8px; }
.tb-note { background: var(--note); color: #2a1a08; border-radius: 6px; padding: 5px 7px; margin-bottom: 7px; font: 12px/1.3 var(--fm); opacity: 0; transform: translate3d(0, 8px, 0) scale(.94) rotate(-1.5deg); transition: opacity .32s ease-out, transform .55s var(--spring); display: flex; flex-wrap: wrap; gap: 3px 5px; }
.tb-note:nth-child(2n) { transform: translate3d(0, 8px, 0) scale(.94) rotate(1.2deg); }
.tb-note.in { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(-1deg); } .tb-note.in:nth-child(2n) { transform: translate3d(0, 0, 0) scale(1) rotate(1deg); }
.tb-note span { background: rgba(255, 255, 255, .5); border-radius: 999px; padding: 0 6px; }
.tb-vis { position: relative; height: 100px; border-radius: 10px; overflow: hidden; background: var(--surface2); }
.tb-vis img { position: absolute; inset: 0; width: 100%; height: 100%; }
.tb-mask { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, 1fr); }
.tb-mask span { background: var(--surface2); transition: opacity .42s ease-out; }
.tb-mask span.gone { opacity: 0; }
.tb-ok { position: absolute; right: 6px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: #3fbf84; color: #06281a; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; opacity: 0; transform: scale(.9); transition: opacity var(--t-fast) ease-out, transform .52s var(--spring); }
.tb-ok.on { opacity: 1; transform: scale(1); }
.tb-cap { position: relative; height: 48px; border-radius: 8px; border: 1px solid var(--border); padding: 6px 30px 6px 10px; font: 600 14px/1.2 var(--fh); overflow: hidden; background: var(--bg); }
.tb-cap .tb-ok { top: 50%; margin-top: -10px; }
.tb-caret { display: inline-block; width: 2px; height: 1em; background: var(--accent); vertical-align: -2px; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tb-flag { position: absolute; right: 30px; top: 50%; margin-top: -9px; font: 500 12px/18px var(--fm); background: #c62d33; color: #fff; padding: 0 7px; border-radius: 999px; opacity: 0; transform: scale(.86); transition: opacity .22s ease-out, transform .42s var(--spring); }
.tb-flag.on { opacity: 1; transform: scale(1); }
.tb-cap.flagged .tb-text { text-decoration: underline wavy #e5484d; text-underline-offset: 3px; }
.tb-scan { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: #3fbf84; box-shadow: 0 0 10px 2px #3fbf84; opacity: 0; will-change: transform; transition: opacity .18s ease-out; }
.tb-cap.scanning .tb-scan { opacity: 1; }
.tb-stamp { position: absolute; left: 10px; top: 66px; transform: rotate(-8deg) scale(1.65); opacity: 0; border: 2px solid currentColor; color: var(--ok-ink); background: color-mix(in srgb, var(--surface) 94%, transparent); font: 700 12px var(--fm); text-transform: uppercase; letter-spacing: .08em; padding: 3px 9px; border-radius: 6px; transition: opacity .2s ease-out, transform .52s var(--spring); pointer-events: none; }
.tb-stamp.on { opacity: .96; transform: rotate(-8deg) scale(1); }
.tb-phone { border: 1px solid var(--border); border-radius: 14px; padding: 8px; background: var(--surface2); text-align: center; height: 162px; display: flex; flex-direction: column; justify-content: center; }
.tb-thumb { width: 38%; aspect-ratio: 1; margin: 0 auto 6px; border-radius: 8px; overflow: hidden; background: var(--bg); opacity: 0; transition: opacity var(--t) var(--ease); }
.tb-thumb.on { opacity: 1; }
.tb-thumb img { width: 100%; height: 100%; display: block; }
.tb-views { font: 12px var(--fm); color: var(--muted); } .tb-views b { font: 600 20px/1.1 var(--fh); color: var(--accent); letter-spacing: -.5px; margin-right: 4px; }
.tb-vnote { font: 12px/1.3 var(--fm); color: var(--muted); height: 48px; overflow: hidden; margin-top: 2px; opacity: 0; transition: opacity var(--t-slow) var(--ease); }
.tb-vnote.on { opacity: 1; }
.tb-fly { position: absolute; z-index: 5; border-radius: 10px; overflow: hidden; transform-origin: top left; pointer-events: none; box-shadow: 0 14px 30px -10px var(--shadow); }
.tb-fly img { width: 100%; height: 100%; display: block; }
.team-3d { position: relative; width: 100%; aspect-ratio: 3.4 / 1; margin-top: 88px; margin-bottom: 8px; outline-offset: 4px; } /* the 88 px above the robots leave room for a name tag and a speech bubble under the board */
.team-3d canvas { position: absolute; left: 0; top: 0; display: block; pointer-events: none; z-index: 12; }
.team-fb { display: none; width: 100%; height: 100%; }
.team-3d.fb .team-fb { display: block; }
.team-fb .fb-name { font: 500 12px var(--fm); fill: var(--fg); }
.team-fb .fb-agent { cursor: pointer; }
.tag { position: absolute; left: 0; top: 0; z-index: 14; width: max-content; max-width: 116px; padding: 2px 6px 3px; border-radius: 8px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 90%, transparent); font: 12px/1.25 var(--fm); text-align: center; color: var(--muted); box-shadow: inset 0 -2px 0 var(--c); pointer-events: none; will-change: transform; transition: border-color .22s ease-out, color .22s ease-out, opacity .16s ease-out; }
.tag b { color: var(--fg); font-weight: 500; }
.tag.on { border-color: var(--c); color: var(--fg); }
.tag.hl { border-color: var(--c); color: var(--fg); }
.tag.under { opacity: 0; }
.tb-linew { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; min-height: 24px; }
.tb-ev { flex: 1; min-width: 0; font: 12px var(--fm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-ev i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
.tb-ev b { color: var(--fg); font-weight: 500; }
.stage-meta { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.sound-btn { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: 12px var(--fm); transition: border-color var(--t) var(--ease), color var(--t) var(--ease), background-color var(--t) var(--ease), transform var(--t) var(--ease); }
@media (hover: hover) { .sound-btn:hover { color: var(--fg); border-color: var(--accent); } }
.sound-btn[hidden] { display: none; }
.sound-btn::before { content: ''; position: absolute; inset: -12px -6px; } /* click area at least 44x44 */
.sound-btn[aria-pressed='true'] { color: var(--fg); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.sound-btn .i-snd-off { display: none; }
.sound-btn.is-off .i-snd-on { display: none; }
.sound-btn.is-off .i-snd-off { display: block; }
.robot-hint { font-family: var(--fm); font-size: 12px; color: var(--muted); white-space: nowrap; }
.roster { list-style: none; margin: 4px 0 0; padding: 2px 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x proximity; }
.roster li { flex: none; scroll-snap-align: start; }
.roster li.lead { padding-right: 10px; margin-right: 2px; border-right: 1px solid var(--border); }
.roster li.lead button { border-color: color-mix(in srgb, var(--c) 55%, var(--border)); }
.roster button { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); text-align: left; transition: border-color var(--t) var(--ease), transform var(--t) var(--ease), color var(--t) var(--ease); }
.roster button i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.roster button .t { display: flex; flex-direction: column; font: 12px/1.2 var(--fm); }
.roster button b { font: 500 12px/1.2 var(--fb); color: var(--fg); }
.roster button.hl { border-color: var(--c); transform: translateY(-1px); color: var(--fg); }
@media (hover: hover) { .roster button:hover { border-color: var(--c); transform: translateY(-1px); color: var(--fg); } }
.robot-bubble { position: absolute; left: 0; top: 0; opacity: 0; z-index: 26; pointer-events: none; font-family: var(--fm); font-size: 13px; background: #fffaf4; color: #1a1410; padding: 7px 13px; border-radius: 14px; white-space: nowrap; box-shadow: 0 10px 30px -10px var(--shadow); will-change: transform, opacity; transition: opacity .22s ease-out; }
.robot-bubble::after { content: ''; position: absolute; left: calc(50% + var(--tail, 0px)); bottom: -5px; width: 10px; height: 10px; background: inherit; transform: translateX(-50%) rotate(45deg); }
.robot-bubble.on { opacity: 1; }
.team-stage:has(.team-3d.fb) .robot-bubble { left: 50%; top: 278px; bottom: auto; transform: translateX(-50%); }
.robot-zzz { position: absolute; left: 0; top: 0; font-family: var(--fm); color: var(--muted); display: none; z-index: 24; }
.robot-zzz.on { display: block; }
.robot-zzz span { position: absolute; font-size: 18px; opacity: 0; animation: zz 2.6s infinite; }
.robot-zzz span:nth-child(2) { animation-delay: .8s; font-size: 14px; } .robot-zzz span:nth-child(3) { animation-delay: 1.6s; font-size: 12px; }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 10px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -26px); } }
.msg .by { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font: 12px var(--fm); color: var(--muted); }
.msg .by i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.card.hl-card .card-img, .tile.hl-card { outline: 3px solid var(--accent); outline-offset: 3px; }
.row.hl-card { background: var(--pill); }

/* ---------- work ---------- */
.work { padding-top: 48px; }
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
h2 { font-family: var(--fh); font-weight: 600; font-size: 40px; line-height: 42px; letter-spacing: -1.4px; margin-top: 4px; }
h2.big { font-size: 52px; line-height: 54.6px; letter-spacing: -1.82px; }
.work-tools { display: flex; align-items: center; gap: 16px; }
.hint { font-family: var(--fm); font-size: 12px; color: var(--muted); }
.views { display: flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--pill); border: 1px solid var(--border); }
.views button { width: 36px; height: 32px; border-radius: 9px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; transition: background-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease); }
@media (hover: hover) { .views button:hover { color: var(--fg); } }
.views button[aria-pressed='true'] { background: var(--surface2); color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 24px; }
.grid.n4 { grid-template-columns: repeat(4, 1fr); gap: 36px 20px; }
.card { display: block; text-decoration: none; position: relative; }
.card-img { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--surface2); border: 1px solid var(--border); transition: transform var(--t) var(--ease); }
.card-img.light-bg { background: #ebebeb; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--t-slow) var(--ease); }
.card-img img.contain { object-fit: contain; padding: 10px; }
.card-img img.contain.bleed { padding: 0; }
@media (hover: hover) { .card:hover .card-img img { transform: scale(1.04); } }
.badge { position: absolute; right: 14px; top: 14px; z-index: 2; font-family: var(--fm); font-size: 12px; padding: 4px 11px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--fg); }
.view-pill { position: absolute; right: 14px; bottom: 14px; z-index: 2; height: 32px; padding: 0 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: var(--fm); font-size: 12px; display: flex; align-items: center; opacity: 0; transform: translateY(6px); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.card:focus-visible .view-pill { opacity: 1; transform: none; }
@media (hover: hover) { .card:hover .view-pill { opacity: 1; transform: none; } }
@media (hover: none) { .view-pill { opacity: 1; transform: none; height: 28px; padding: 0 12px; } }
.card-cap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; margin-top: 14px; }
.card-cap b { font-family: var(--fh); font-weight: 600; font-size: 20px; letter-spacing: -.7px; line-height: 26px; }
.card-cap i { font-style: normal; font-family: var(--fm); font-size: 12px; color: var(--muted); white-space: nowrap; }
.card-desc { font-size: 14px; line-height: 21px; color: var(--muted); margin-top: 6px; max-width: 460px; }
.card-role { font-size: 13px; line-height: 19px; color: var(--fg); margin-top: 6px; }
.card-res { font: 12px/18px var(--fm); color: var(--muted); margin-top: 4px; }

.list { border-top: 1px solid var(--border); }
.row { display: grid; grid-template-columns: 44px minmax(0, 300px) minmax(0, 1fr) auto 64px 28px; align-items: center; gap: 20px; padding: 22px 12px; border-bottom: 1px solid var(--border); text-decoration: none; transition: background-color var(--t) var(--ease); }
.row .n, .row b, .row .d { transition: transform var(--t) var(--ease); }
@media (hover: hover) { .row:hover { background: var(--pill); } .row:hover .n, .row:hover b, .row:hover .d { transform: translateX(8px); } }
.row .n { font-family: var(--fm); font-size: 12px; color: var(--accent); }
.row b { font-family: var(--fh); font-weight: 600; font-size: 20px; letter-spacing: -.5px; line-height: 26px; }
.row .d { font-size: 14px; color: var(--muted); }
.row .t, .row .y { font-family: var(--fm); font-size: 12px; color: var(--muted); }
.row .y { text-align: right; }

/* canvas: a vertical touch swipe scrolls the page (touch-action: pan-y); horizontal touch and the mouse pan the canvas and drag cards */
.board { position: relative; height: 640px; border-radius: 22px; border: 1px solid var(--border); background-color: var(--surface); background-image: radial-gradient(circle, var(--dot) 1.2px, transparent 1.4px); background-size: 24px 24px; overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.board.panning { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.tile { position: absolute; width: 270px; padding: 9px 9px 12px; border-radius: 18px; background: var(--bg); border: 1px solid var(--border); box-shadow: 0 24px 50px -28px var(--shadow); cursor: grab; text-decoration: none; display: block; transition: box-shadow var(--t) var(--ease); }
@media (hover: hover) { .tile:hover { box-shadow: 0 30px 60px -26px var(--shadow); } }
.tile.drag { cursor: grabbing; z-index: 40; box-shadow: 0 40px 70px -24px var(--shadow); }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 11px; display: block; pointer-events: none; background: var(--surface2); }
.tile img.contain { object-fit: contain; }
.tile p { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 10px; padding: 0 4px; font-family: var(--fh); font-weight: 600; font-size: 16px; letter-spacing: -.3px; line-height: 20px; }
.tile p i { font-style: normal; font-family: var(--fm); font-size: 12px; color: var(--muted); font-weight: 400; }
.dock { position: absolute; left: 14px; bottom: 14px; z-index: 50; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 14px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--border); font-family: var(--fm); font-size: 12px; cursor: default; }
.dock button { height: 30px; min-width: 30px; padding: 0 8px; border-radius: 9px; border: 0; background: none; color: var(--fg); font-family: var(--fm); font-size: 12px; display: grid; place-items: center; transition: transform var(--t) var(--ease); }
@media (hover: hover) { .dock button:hover { background: var(--pill); } }
.dock .pct { min-width: 46px; text-align: center; color: var(--muted); }
.dock .sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.dock .note-btn { display: flex; align-items: center; gap: 7px; color: var(--accent); }
.note { position: absolute; width: 190px; min-height: 140px; padding: 0 0 8px; background: var(--note); color: #1d140c; border-radius: 6px 6px 14px 6px; box-shadow: 0 18px 30px -14px var(--shadow); z-index: 30; cursor: default; animation: pop .3s var(--ease); }
@keyframes pop { from { transform: scale(.85) rotate(var(--r, 0deg)); opacity: 0; } }
.note-top { display: flex; justify-content: space-between; align-items: center; padding: 7px 8px 5px 12px; font-family: var(--fm); font-size: 12px; letter-spacing: .6px; text-transform: lowercase; cursor: grab; border-bottom: 1px solid rgba(0, 0, 0, .1); }
.note-top button { border: 0; background: none; font-size: 16px; line-height: 1; padding: 0 4px; color: inherit; opacity: .7; }
@media (hover: hover) { .note-top button:hover { opacity: 1; } }
.note textarea { width: 100%; height: 96px; border: 0; background: none; resize: none; padding: 8px 12px; font: 14px/1.35 var(--fb); color: inherit; outline: none; }
.note textarea::placeholder { color: rgba(29, 20, 12, .5); }

/* ---------- experience + AI example ---------- */
.experience { padding-top: 72px; }
.experience h2 { margin-top: 10px; }
.exp-summary { font-size: 16px; line-height: 24px; color: var(--muted); max-width: 34em; margin-top: 18px; }
.exp-list { list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid var(--border); }
.role { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.exp-when { font: 12px/22px var(--fm); color: var(--accent); }
.role-body { display: grid; grid-template-columns: minmax(0, 520px) 320px; gap: 28px 64px; align-items: start; }
.role h3 { font: 600 20px/26px var(--fh); letter-spacing: -.5px; }
.exp-org { font: 12px/18px var(--fm); color: var(--muted); margin: 2px 0 8px; max-width: none; }
.role-points { margin: 0; padding-left: 18px; font-size: 14px; line-height: 21px; color: var(--muted); }
.role-points li + li { margin-top: 4px; }
.xchips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; }
.xchips li { font: 12px/18px var(--fm); padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); }
.role-links { font: 12px/20px var(--fm); color: var(--muted); margin-top: 10px; display: flex; flex-wrap: wrap; gap: 12px 14px; }
.role-links a, .proj-list a { color: var(--accent); text-decoration: none; }
@media (hover: hover) { .role-links a:hover, .proj-list a:hover, .tool-groups a:hover { text-decoration: underline; } }
.rtiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rtile { padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.rtile b { display: block; font: 600 20px/26px var(--fh); letter-spacing: -.8px; color: var(--accent); white-space: nowrap; }
.rtile span { display: block; margin-top: 2px; font: 12px/16px var(--fm); color: var(--muted); }
.exp-note { font: 12px/18px var(--fm); color: var(--muted); margin-top: 12px; }
.exp-sub { font: 500 12px/18px var(--fm); color: var(--accent); margin: 22px 0 8px; letter-spacing: .02em; }
.proj-list, .edu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.proj-list > li, .edu-list > li { border: 1px solid var(--border); border-radius: 14px; padding: 9px 14px; background: var(--surface); }
.proj-list h4, .edu-list h4 { margin: 0; font: 600 16px/22px var(--fh); letter-spacing: -.3px; }
.proj-list p, .edu-list p { font-size: 13px; line-height: 19px; color: var(--muted); margin-top: 3px; }
.proj-list .exp-org, .edu-list .exp-org { margin: 2px 0 0; }
.proj-list a { display: inline-block; margin-top: 6px; font: 12px/18px var(--fm); }
.edu-list .exp-when { display: block; }
.exp-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; align-items: start; }
.tool-groups { list-style: none; margin: 0; padding: 0; }
.tool-groups > li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: start; padding: 5px 0; border-bottom: 1px solid var(--border); }
.tool-groups .xchips { margin: 0; }
.grp { font: 12px/22px var(--fm); color: var(--fg); display: inline-flex; align-items: center; gap: 7px; }
.tool-groups > li.ai { border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border)); border-radius: 12px; padding: 9px 10px; margin-bottom: 6px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.tool-groups > li.ai .grp { color: var(--accent); }
.tool-groups > li.ai .xchips li { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); color: var(--fg); }
.tool-groups a { color: inherit; text-decoration: none; }
.tool-groups.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.tool-groups.two > li.ai { grid-column: 1 / -1; }
.tool-note { font-size: 13px; line-height: 19px; color: var(--muted); margin-top: 6px; max-width: 60ch; }
.proof-map { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pcard { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: inset 0 2px 0 var(--c); }
.pcard-h { display: flex; align-items: center; gap: 7px; font: 12px/18px var(--fm); color: var(--fg); }
.pcard-h i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.pcard-h span { margin-left: auto; color: var(--muted); }
.pcard .xchips { margin: 0; }
.pcard-proof { font-size: 14px; line-height: 21px; color: var(--muted); }
.pcard-proof b { color: var(--fg); font-weight: 600; }
.pcard-foot { margin-top: auto; padding-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; font: 12px/18px var(--fm); }
.pcard-foot a { color: var(--accent); text-decoration: none; }
@media (hover: hover) { .pcard-foot a:hover { text-decoration: underline; } }
.ai-proof { padding-top: 72px; }
.ai-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.ai-clip, .ai-site { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--surface); color: inherit; text-decoration: none; }
.ai-clip img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.ai-clip-txt, .ai-site-txt { display: block; padding: 14px 18px 16px; }
.ai-clip-txt b, .ai-site-txt b { display: block; font: 500 13px/19px var(--fm); color: var(--accent); }
.ai-clip-txt span, .ai-site-txt span { display: block; margin-top: 6px; font-size: 16px; line-height: 24px; color: var(--muted); }
.ai-spec { margin: 0; flex: 1; display: grid; align-content: center; gap: 10px; padding: 22px 18px; aspect-ratio: 16 / 9; background-color: var(--surface2); background-image: radial-gradient(circle, var(--dot) 1.2px, transparent 1.4px); background-size: 24px 24px; }
.ai-spec > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
.ai-spec dt { font: 12px/20px var(--fm); color: var(--muted); }
.ai-spec dd { margin: 0; font: 500 14px/20px var(--fm); color: var(--fg); }
@media (hover: hover) { .ai-clip:hover .ai-clip-txt b { text-decoration: underline; } }
@media (max-width: 900px) { .ai-grid { grid-template-columns: 1fr; } .ai-spec { aspect-ratio: auto; } }
#ai-body { margin-top: 12px; }
#ai-body[hidden] { display: none; }
.ai-proof h2 { margin-top: 10px; }
.ai-tool { font: 12px var(--fm); color: var(--muted); margin-top: 14px; }
.ai-row { margin-top: 22px; max-width: 760px; }
.ai-row h3 { font: 500 12px var(--fm); color: var(--accent); margin-bottom: 6px; }
.ai-row p { font-size: 16px; line-height: 24px; white-space: pre-wrap; }

/* ---------- contact + footer ---------- */
.contact { padding: 72px 0 56px; }
.contact h2 { margin-top: 10px; }
.open { margin-top: 18px; color: var(--muted); max-width: 520px; }
.links { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 20px; font-size: 16px; }
.links span:first-child { font-family: var(--fm); font-size: 12px; color: var(--muted); display: inline-block; min-width: 78px; }
.links a { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 4px; }
@media (hover: hover) { .links a:hover { text-decoration-color: var(--accent); } }
.foot { padding: 24px 0 40px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--fm); font-size: 12px; color: var(--muted); }

/* ---------- case overlay ---------- */
.case { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; }
.case[hidden] { display: none; }
.case-back { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade var(--t) var(--ease); }
@keyframes fade { from { opacity: 0; } }
.case-panel { position: relative; width: calc(100% - 32px); max-width: var(--wrap); margin: 16px 0 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; display: flex; flex-direction: column; overflow: hidden; outline: none; animation: sheet var(--t-slow) var(--ease); box-shadow: 0 40px 100px -30px var(--shadow); }
@keyframes sheet { from { transform: translateY(28px); opacity: 0; } }
.case-top, .case-bot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); z-index: 3; }
.case-top { border-bottom: 1px solid var(--border); }
.case-bot { border-top: 1px solid var(--border); }
.case-count { font-family: var(--fm); font-size: 12px; color: var(--muted); }
.case-pn { display: flex; gap: 8px; }
.case-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.case-inner { width: min(904px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0 80px; }
.case-eyebrow { font-family: var(--fm); font-size: 13px; color: var(--accent); }
.case-inner h1 { margin-top: 14px; font-size: clamp(38px, 5.4vw, 64px); line-height: 1.05; letter-spacing: -.035em; overflow-wrap: anywhere; }
.case-lead { font-size: 20px; line-height: 30px; color: var(--muted); max-width: 700px; margin-top: 22px; }
.case-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); }
.case-meta dt { font-family: var(--fm); font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.case-meta dd { margin: 0; font-size: 16px; line-height: 24px; }
.case-hero { margin-top: 40px; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: var(--surface2); }
.case-hero img { width: 100%; display: block; max-height: 640px; object-fit: cover; }
.case-hero img.contain { object-fit: contain; padding: 18px; max-height: 560px; }
.case-hero img.contain.bleed { padding: 0; max-height: 680px; }
.sec { display: grid; grid-template-columns: 220px 1fr; gap: 48px; margin-top: 64px; }
.sec h2 { font-size: 24px; line-height: 1.2; letter-spacing: -.5px; margin: 0; }
.sec p { font-size: 18px; line-height: 28px; color: var(--muted); }
.sec p + p { margin-top: 14px; }
.sec ul { padding-left: 18px; margin: 14px 0 0; color: var(--muted); font-size: 18px; line-height: 28px; }
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 36px; }
.shots.one { grid-template-columns: 1fr; max-width: 420px; }
.shot { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: var(--surface2); }
.shot img { width: 100%; display: block; aspect-ratio: 1 / 1; object-fit: cover; }
.shot img.contain { object-fit: contain; padding: 10px; background: var(--surface2); }
.shot.dark { background: #0b0b0b; } .shot.dark img { background: #0b0b0b; object-fit: contain; padding: 14%; }
.shot.light { background: #fff; } .shot.light img { background: #fff; object-fit: contain; padding: 14%; }
.shot figcaption { padding: 10px 14px; font-family: var(--fm); font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); background: var(--surface); }
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 36px; }
.video { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: #ececec; min-width: 0; }
.video.wide { grid-column: 1 / -1; }
.video video { width: 100%; display: block; object-fit: contain; background: inherit; }
@media (max-width: 640px) { .videos { grid-template-columns: 1fr; } }
.video figcaption { padding: 10px 14px; font-family: var(--fm); font-size: 12px; color: var(--muted); background: var(--surface); }
.stats { margin-top: 22px; }
.stats h3 { font-family: var(--fm); font-weight: 400; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--bg); }
.stat b { display: block; font-family: var(--fh); font-size: 28px; line-height: 1; letter-spacing: -1px; color: var(--accent); }
.stat span { font-family: var(--fm); font-size: 12px; color: var(--muted); }
.stats .note-s { font-size: 13px !important; line-height: 20px !important; margin-top: 12px; border-left: 2px solid var(--border); padding-left: 12px; }
.dl { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- hit areas: controls under 44 px keep their look, an invisible ::before reaches 44 px (like .sound-btn) ---------- */
.btn, .chip, .roster button, .theme, .hdr-nav a, .views button, .role-links a, .proj-list a, .links a, .tool-groups a, .pcard-foot a { position: relative; }
.btn::before, .chip::before { content: ''; position: absolute; inset: -5px 0; } /* inset counts from the padding box, inside the 1 px border */
.roster button::before { content: ''; position: absolute; inset: -3px 0; }
.hdr-nav a::before { content: ''; position: absolute; inset: -2px 0; }
.theme::before { content: ''; position: absolute; inset: -8px -5px; }
.views button::before { content: ''; position: absolute; inset: -6px -1px; }
.role-links a::before, .proj-list a::before, .tool-groups a::before, .pcard-foot a::before { content: ''; position: absolute; inset: -14px -4px; }
.links a::before { content: ''; position: absolute; inset: -12px -4px; }

/* ---------- press feedback ---------- */
.btn, .chip, .roster button, .ask button, .views button, .theme, .sound-btn, .burger, .dock button, .hdr-name, .card, .row { -webkit-tap-highlight-color: transparent; }
.btn:active, .chip:active, .roster button:active, .sound-btn:active, .theme:active, .burger:active { transform: scale(.97); }
.ask button:active, .views button:active, .dock button:active { transform: scale(.94); }
.hdr-nav a:active { color: var(--fg); background: var(--pill); }
.card:active .card-img { transform: scale(.985); }
.row:active { background: var(--pill); }

/* ---------- responsive ---------- */
@media (max-width: 999px) {
  .hero { display: flex; flex-direction: column; padding-top: 10px; }
  .hero-text { order: 1; } .hero-ask { order: 2; padding-top: 14px; } .team-stage { order: 3; margin-top: 24px; }
  h1 { font-size: 40px; line-height: 43px; letter-spacing: -1.5px; }
  .sub { margin-top: 8px; font-size: 16px; line-height: 23px; }
  .team-3d { margin-top: 88px; margin-bottom: 8px; aspect-ratio: 3.8 / 1; }
}
@media (max-width: 1100px) {
  .grid.n4 { grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
}
/* desktop: compact Work heading and captions, so the heading and the top of the 4:3 covers show under the hero */
@media (min-width: 901px) {
  .work { padding-top: 14px; }
  .work-head { align-items: center; margin-bottom: 12px; }
  .work-head > div { display: flex; align-items: baseline; gap: 14px; }
  .work-head h2 { margin-top: 0; }
  .grid.n4 { gap: 20px 16px; }
  .grid.n4 .card-cap { margin-top: 9px; }
  .grid.n4 .card-cap b { font-size: 18px; line-height: 23px; letter-spacing: -.5px; }
  .grid.n4 .card-role { font-size: 13px; line-height: 18px; margin-top: 3px; }
  .grid.n4 .card-res { font-size: 12px; line-height: 17px; margin-top: 3px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .grid.n4 { grid-template-columns: repeat(4, 1fr); }
}
/* two-column hero from 1000px: the left column narrows (419px at 1000, 443px at 1024) so the right one keeps 509px; the title steps down to 52px to stay on three lines */
@media (min-width: 1000px) and (max-width: 1100px) {
  h1 { font-size: 52px; line-height: 55px; letter-spacing: -1.8px; }
}
/* right column under 600px (1000-1199): wider notes column so the longest note chip fits, tighter roster so all six agents show */
@media (min-width: 1000px) and (max-width: 1199px) {
  .tb-body { grid-template-columns: 1.2fr 1.6fr 1.1fr; }
  .roster { gap: 4px; }
  .roster button { padding: 0 10px 0 9px; }
  .tb-vnote { height: 64px; } .tb-thumb { width: 40%; } /* four lines of the views note fit, the thumbnail gives the room back */
}
/* desktop windows too short for a whole row of covers: the first screen ends where the hero ends; taller windows show the covers at once (84px = nav).
   Natural bottom of the row with captions: up to 1116px at 1000-1199 wide (limit 1124), 1151px from 1280 (limit 1159) */
@media (min-width: 1000px) and (max-width: 1199px) and (max-height: 1124px), (min-width: 1200px) and (max-height: 1159px) {
  .first-screen { display: flex; flex-direction: column; min-height: calc(100svh - 84px); }
  /* the hero fills the screen: text on top, question box and chips down to the roster's line, the scene takes the spare height (the robots keep their size) */
  .first-screen .hero { flex: 1 0 auto; padding-bottom: 20px; }
  /* the free height under the subtitle is a chat window styled like the board: greeting, answers (they scroll inside it), the box, the chips; its bottom sits on the roster's bottom */
  .first-screen .hero { grid-template-rows: auto minmax(0, 1fr); }
  .first-screen .hero-ask { display: flex; flex-direction: column; min-height: 0; margin-top: 32px; padding: 8px 10px 14px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: 0 30px 60px -40px var(--shadow); }
  .first-screen .hero-ask .ask { margin-top: auto; background: var(--bg); box-shadow: none; flex: none; }
  .first-screen .hero-ask .ask:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
  .first-screen .hero-ask .chips { flex: none; }
  .first-screen .thread { position: relative; flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .first-screen .thread:not(:empty) { margin-bottom: 8px; }
  /* text hidden above or below the window fades out at that edge (classes set in main.js) */
  .first-screen .thread.fade-up { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px); mask-image: linear-gradient(to bottom, transparent 0, #000 22px); }
  .first-screen .thread.fade-down { -webkit-mask-image: linear-gradient(to top, transparent 0, #000 22px); mask-image: linear-gradient(to top, transparent 0, #000 22px); }
  .first-screen .thread.fade-up.fade-down { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); }
  .first-screen .thread:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
  .first-screen .msg.b, .first-screen .greet { background: var(--bg); }
  .first-screen .greet { display: block; order: -1; align-self: flex-start; }
  .first-screen .thread:not(:empty) ~ .greet { display: none; }
  .first-screen .team-stage { min-height: calc(100svh - 84px - 28px - 20px); } /* = first screen minus nav and hero padding: fixed, so a long chat answer grows the left column only */
  .first-screen .team-3d { flex: 1 0 auto; }
}
@media (min-width: 1000px) and (max-height: 960px) {
  .sub { font-size: 16px; line-height: 24px; margin-top: 12px; }
}
/* short laptop windows: tighter space around the hero, board and robots keep their size, so the whole roster stays on the first screen */
@media (min-width: 1000px) and (max-height: 760px) {
  .hero { padding-top: 8px; }
  .first-screen .hero { padding-bottom: 10px; } /* low windows: the screen edge falls between the hero and Work, so the spacing gives the 10px back */
  .first-screen .team-stage { min-height: calc(100svh - 84px - 8px - 10px); }
  .team-3d { margin-top: 84px; }
}
@media (max-width: 900px) {
  .hdr { height: 64px; }
  .hdr-nav, .hdr-right .btn, .hdr-right .theme { display: none; }
  .burger { display: grid; }
  .menu { position: absolute; left: 0; right: 0; top: calc(100% + 8px); padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; flex-direction: column; box-shadow: 0 24px 60px -20px var(--shadow); }
  .menu:not([hidden]) { display: flex; }
  .menu a, .menu button { text-align: left; padding: 12px 14px; border-radius: 12px; border: 0; background: none; text-decoration: none; font-size: 16px; }
  .menu a:active, .menu button:active { background: var(--pill); }
  @media (hover: hover) { .menu a:hover, .menu button:hover { background: var(--pill); } }
  .hero { padding-top: 28px; }
  h1 { font-size: 44px; line-height: 47px; letter-spacing: -1.6px; }
  .work { padding-top: 56px; }
  .row { grid-template-columns: 36px minmax(0, 1fr) auto 28px; gap: 14px; }
  .row .d, .row .t { display: none; }
  .board { height: 560px; }
  .sec { grid-template-columns: 1fr; gap: 14px; margin-top: 44px; }
  .case-meta { grid-template-columns: repeat(2, 1fr); }
  h2.big { font-size: 44px; line-height: 46px; }
}
@media (max-width: 700px) {
  .roster button::before { inset: -5px 0; }
  .hero-ask { padding-top: 0; margin-top: 18px; }
  /* phone: the team comes first (under the subtitle), the board shrinks to a compact strip below it */
  .team-3d { aspect-ratio: 1.18 / 1; margin-top: 132px; margin-bottom: 24px; order: 1; }
  .tag { max-width: 152px; }
  .team-3d.fb { aspect-ratio: 2.6 / 1; margin-top: 48px; margin-bottom: 8px; }
  .team-stage:has(.team-3d.fb) .robot-bubble { top: 8px; }
  .tb-linew { order: 2; }
  .roster { order: 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; overflow-x: visible; padding-bottom: 0; }
  .roster li.lead { padding-right: 0; margin-right: 0; border-right: 0; }
  .roster { gap: 8px 6px; }
  .roster button { width: 100%; height: 36px; padding: 0 8px; gap: 6px; }
  .team-board { order: 4; margin-top: 10px; padding: 8px 10px 10px; }
  .tb-body { grid-template-columns: 1.35fr 1fr; gap: 10px; margin-top: 6px; height: auto; }
  .tb-notes { display: none; }
  .tb-vis { height: 58px; } .tb-stamp { top: 34px; }
  .tb-cap { height: 42px; }
  .tb-phone { padding: 6px; height: auto; } .tb-thumb { width: 30%; margin-bottom: 3px; } .tb-vnote { height: auto; min-height: 0; }
  .tb-linew .robot-hint { display: none; }
  .narrow .tag:not(.on) { display: none; }
  h1 { font-size: 52px; line-height: 55px; letter-spacing: -1.8px; }
}
@media (max-width: 1100px) {
  .role-body { grid-template-columns: 1fr; gap: 14px; }
  .rtiles { display: flex; flex-wrap: wrap; }
  .rtile { flex: 1 1 190px; }
  .rtile.wide { flex-basis: 100%; }
}
@media (max-width: 1100px) {
  .proof-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .exp-cols { grid-template-columns: 1fr; }
  .tool-groups.two { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .proof-map { grid-template-columns: 1fr; }
  .role { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 560px) {
  h1 { font-size: 44px; line-height: 46px; letter-spacing: -1.6px; }
  .sub { font-size: 16px; line-height: 24px; }
  .grid, .grid.n4 { grid-template-columns: 1fr; }
  .work-head { align-items: flex-start; }
  .work-tools { width: 100%; justify-content: space-between; }
  .hint { display: none; }
  .board { height: 520px; }
  .case-panel { width: 100%; margin: 0; border-radius: 0; border-width: 0; }
  .case-top .btn, .case-bot .btn { padding: 0 12px; }
  .case-count { display: none; }
  .case-bot { flex-wrap: nowrap; }
  .case-bot .long, .case-pn .lbl { display: none; }
  .case-inner { padding: 40px 0 56px; }
  .case-lead { font-size: 18px; line-height: 27px; }
  .sec p, .sec ul { font-size: 16px; line-height: 26px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: 1fr; }
  .foot { flex-direction: column; }
  .contact { padding-top: 72px; }
}
:root.reduced-motion { scroll-behavior: auto; }
:root.reduced-motion .case-scroll { scroll-behavior: auto; }
:root.reduced-motion .dot::after, :root.reduced-motion .tb-es.ring::after, :root.reduced-motion .tb-caret, :root.reduced-motion .robot-zzz span, :root.reduced-motion .msg, :root.reduced-motion .note, :root.reduced-motion .case-back, :root.reduced-motion .case-panel { animation: none; }
/* movement stops; colour, border and opacity changes stay (they are short and harmless) */
:root.reduced-motion .btn, :root.reduced-motion .chip, :root.reduced-motion .roster button, :root.reduced-motion .sound-btn, :root.reduced-motion .ask button, :root.reduced-motion .views button, :root.reduced-motion .theme, :root.reduced-motion .burger, :root.reduced-motion .dock button { transition-property: color, background-color, border-color, filter; }
:root.reduced-motion .card-img, :root.reduced-motion .card-img img, :root.reduced-motion .row .n, :root.reduced-motion .row b, :root.reduced-motion .row .d, :root.reduced-motion .theme-knob, :root.reduced-motion .tb-mask span, :root.reduced-motion .tb-scan { transition: none; }
:root.reduced-motion .tb-note, :root.reduced-motion .tb-ok, :root.reduced-motion .tb-flag, :root.reduced-motion .tb-stamp, :root.reduced-motion .view-pill { transition-property: opacity; }
@media (hover: hover) { :root.reduced-motion .row:hover .n, :root.reduced-motion .row:hover b, :root.reduced-motion .row:hover .d, :root.reduced-motion .card:hover .card-img img, :root.reduced-motion .btn:hover, :root.reduced-motion .chip:hover, :root.reduced-motion .roster button:hover, :root.reduced-motion .ask button:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .case-scroll { scroll-behavior: auto; }
  .dot::after, .tb-es.ring::after, .tb-caret, .robot-zzz span, .msg, .note, .case-back, .case-panel { animation: none; }
  /* movement stops; colour, border and opacity changes stay (they are short and harmless) */
  .btn, .chip, .roster button, .sound-btn, .ask button, .views button, .theme, .burger, .dock button { transition-property: color, background-color, border-color, filter; }
  .card-img, .card-img img, .row .n, .row b, .row .d, .theme-knob, .tb-mask span, .tb-scan { transition: none; }
  .tb-note, .tb-ok, .tb-flag, .tb-stamp, .view-pill { transition-property: opacity; }
  @media (hover: hover) { .row:hover .n, .row:hover b, .row:hover .d, .card:hover .card-img img, .btn:hover, .chip:hover, .roster button:hover, .ask button:hover { transform: none; } }
}
