/* Konvene. A Viennese coffee house: marble white, bottle green, a little brass. */

/* Instrument Sans: SIL Open Font License 1.1, notice at the end of app.js */
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans-latin-wdth-normal.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-style: normal; font-display: swap; }

:root {
  --bg: #f3f3ef;
  --surface: #ffffff;
  --surface-2: #ecede8;
  --surface-3: #dfe1da;
  --line: rgba(16, 38, 31, 0.1);
  --line-2: rgba(16, 38, 31, 0.18);
  --ink: #10261f;
  --ink-2: #4a5c55;
  --ink-3: #7c8a84;
  --accent: #14523d;
  --accent-strong: #0f4231;
  --accent-soft: rgba(20, 82, 61, 0.1);
  --rec: #e5484d;
  --amber: #e0a93c;
  --brass: #e0a93c;
  --video: #0f1f1a;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 2px rgba(16, 38, 31, .04), 0 8px 24px -8px rgba(16, 38, 31, .12);
  --shadow-lg: 0 2px 6px rgba(16, 38, 31, .04), 0 24px 60px -20px rgba(16, 38, 31, .25);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.5; letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; font-feature-settings: "kern";
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
a { color: var(--ink); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
/* visually hidden but read aloud; pinned to the corner so it never adds height to the page */
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
/* the call fills the window exactly: nothing to scroll */
body[data-screen="call"] { overflow: hidden; }
.skiplink { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--ink); color: #fff; padding: .5rem 1rem; border-radius: 10px; font-weight: 500; }
.skiplink:focus { top: 1rem; }
svg { width: 20px; height: 20px; flex: none; }

/* ---------- brand, bars ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { margin: 0; display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.025em; }
.brand a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .55rem; }
.mark { width: 26px; height: 26px; flex: none; }
.quiet-link { color: var(--ink-2); text-decoration: none; font-size: .9rem; }
.quiet-link:hover { color: var(--ink); }

/* shared by the pre-join page and the call (restored from the old home section) */
.brand { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.mark { width: 28px; height: 28px; }
.brand.small { font-size: 1rem; }
.brand.small .mark { width: 22px; height: 22px; }
.pill-btn { display: inline-flex; align-items: center; gap: .5rem; height: 44px; padding: 0 1rem; border-radius: 999px; border: 1.5px solid rgba(242, 245, 242, .2); background: transparent; color: #f2f5f2; cursor: pointer; font-size: .9rem; font-weight: 500; }
.pill-btn:hover { background: rgba(242, 245, 242, .08); }
.pill-btn[aria-expanded="true"] { background: #f2f5f2; color: var(--ink); }
.pill-btn svg { width: 18px; height: 18px; }
.split.glass { background: rgba(242, 245, 242, .1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.split.glass .round, .split.glass .caret { color: #fff; }
.split.glass .round:hover, .split.glass .caret:hover { background: rgba(255, 255, 255, .14); }

/* ---------- buttons ---------- */
.btn {
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 44px; padding: 0 1.25rem; border-radius: 12px; font-weight: 500; font-size: .95rem;
  border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn.primary { color: #fff; background: var(--accent-strong); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 8px 20px -8px rgba(15, 66, 49, .45); }
.btn.primary:hover { background: #0b3528; }
.btn.primary:active { transform: translateY(1px); }
.btn.secondary { color: var(--ink); background: var(--surface); border-color: var(--line-2); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.wide { width: 100%; }

.round {
  position: relative; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  color: var(--ink); background: var(--surface-2); border: 0; cursor: pointer; transition: background .15s, color .15s, transform .15s;
}
.round:hover { background: var(--surface-3); }
.round.small { width: 36px; height: 36px; }
.round.small svg { width: 18px; height: 18px; }
.round.flat { background: transparent; }
.round.flat:hover { background: var(--surface-2); }
.round.solid { background: var(--ink); color: #fff; }
.round.solid:hover { background: #3a2c22; }
.round.off { background: var(--rec); color: #fff; }
.round.off:hover { background: #d63c41; }
.round[aria-pressed="true"]:not([data-toggle]), .round[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); }
.round.glass { background: rgba(20, 20, 22, .42); color: #fff; backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.round.glass:hover { background: rgba(20, 20, 22, .6); }
.round.glass.off { background: var(--rec); box-shadow: none; }
.round.glass[aria-expanded="true"] { background: #fff; color: var(--ink); }
.leave {
  height: 44px; padding: 0 1.1rem; border-radius: 999px; border: 0; cursor: pointer; margin-left: .25rem;
  color: #fff; background: var(--rec); display: inline-flex; align-items: center; justify-content: center; transition: background .15s;
}
.leave:hover { background: #d63c41; }
.leave svg { width: 24px; height: 24px; }
#rec-btn[aria-pressed="true"] { width: auto; padding: 0 .9rem 0 .7rem; color: #fff; background: var(--rec); }
#share-btn[aria-pressed="true"] { background: var(--accent); color: #fff; }
#hand-btn[aria-pressed="true"] { background: var(--amber); color: #1d1500; }
.rec-time { font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: .7rem; font-weight: 600; line-height: 18px; color: var(--ink-2); background: var(--surface-2); box-shadow: 0 0 0 2px var(--surface); }

/* ---------- form controls ---------- */
.field { display: grid; gap: .35rem; }
.field > span { font-size: .8rem; font-weight: 500; color: var(--ink-2); }
.select-wrap { position: relative; display: flex; align-items: center; }
.select-wrap svg { position: absolute; left: .7rem; width: 18px; height: 18px; color: var(--ink-2); pointer-events: none; }
.select-wrap::after { content: ""; position: absolute; right: .9rem; width: 7px; height: 7px; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3); transform: translateY(-2px) rotate(45deg); pointer-events: none; }
select {
  -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; height: 40px; padding: 0 2rem 0 2.35rem;
  font: inherit; font-size: .88rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
select:hover { border-color: rgba(16, 38, 31, .24); }
select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select:disabled { color: var(--ink-3); cursor: default; }
.meter { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin-top: .45rem; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .08s linear; }

/* ---------- tiles ---------- */
.tile { position: relative; border-radius: 16px; overflow: hidden; background: var(--video); aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.hero-tile { border-radius: 20px; box-shadow: var(--shadow-lg); }
.tile-media, .tile-media > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile-media video, .tile-media canvas { object-fit: cover; display: block; }
.tile.screen .tile-media video { object-fit: contain; }
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); pointer-events: none; transition: box-shadow .2s; }
.tile.speaking::after { box-shadow: inset 0 0 0 3px var(--brass); }
.mirror { transform: scaleX(-1); }
.placeholder { display: grid; place-items: center; background: #2c231d; }
.placeholder span { width: 34%; max-width: 110px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(1.4rem, 4vw, 2.6rem); font-weight: 600; color: #fff; background: #4a423a; }
.on-video { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 2; display: flex; gap: .6rem; }
.on-video .round { width: 48px; height: 48px; }
.cam-hint { position: absolute; inset: auto 1.5rem 5.5rem; z-index: 2; text-align: center; color: #fff; background: rgba(20, 20, 22, .6); backdrop-filter: blur(10px); padding: .6rem 1rem; border-radius: 12px; font-size: .9rem; }
.tile-name {
  position: absolute; left: .6rem; bottom: .6rem; margin: 0; display: flex; align-items: center; gap: .35rem; max-width: calc(100% - 1.2rem); z-index: 2;
  color: #fff; background: rgba(20, 20, 22, .5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: .22rem .6rem; border-radius: 8px; font-size: .8rem; font-weight: 500;
}
.tile-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted-icon { display: none; color: #ff8b8e; }
.muted-icon svg { width: 15px; height: 15px; }
.tile.mic-off .muted-icon { display: inline-flex; }
/* sound off on that device (a second device in a room already in the call) */
.quiet-icon { display: none; color: #ffd27a; }
.quiet-icon svg { width: 15px; height: 15px; }
.tile.quiet .quiet-icon { display: inline-flex; }
.tile.quiet .muted-icon { display: none; }
body.quiet [data-toggle="mic"] { opacity: .45; }
.hand-badge { position: absolute; left: .6rem; top: .6rem; z-index: 2; display: none; align-items: center; gap: .3rem; padding: .25rem .55rem .25rem .4rem; border-radius: 999px; background: var(--amber); color: #1d1500; font-size: .78rem; font-weight: 600; }
.hand-badge svg { width: 16px; height: 16px; }
.tile.hand .hand-badge { display: inline-flex; }
.tile-actions { position: absolute; right: .5rem; top: .5rem; z-index: 3; display: flex; gap: .35rem; opacity: 0; transition: opacity .15s; }
.tile:hover .tile-actions, .tile:focus-within .tile-actions { opacity: 1; }
.tile-actions .round { width: 34px; height: 34px; }
.tile-actions .round svg { width: 17px; height: 17px; }
.tile-actions .round[aria-pressed="true"] { background: #fff; color: var(--ink); }
.tile:fullscreen { border-radius: 0; }

/* ---------- call ---------- */
.call { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; transition: margin .3s var(--ease); }
body.panel-open .call { margin-right: min(380px, 100vw); }
.call-bar { padding: .8rem 1.25rem; display: grid; grid-template-columns: 1fr auto 1fr; }
.bar-mid { display: flex; align-items: center; gap: .6rem; }
.chip {
  font-size: .85rem; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; height: 32px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 .8rem; font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.chip:hover { color: var(--ink); }
.chip svg { width: 15px; height: 15px; }
.count { margin: 0; justify-self: end; color: var(--ink-2); font-size: .85rem; }
.rec-badge { margin: 0; display: inline-flex; align-items: center; gap: .45rem; height: 32px; font-size: .82rem; font-weight: 600; color: #b4232a; background: #fdecec; padding: 0 .8rem; border-radius: 999px; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.stage { min-height: 0; display: grid; place-items: center; padding: .25rem 1.25rem; }
.tiles { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 10px; justify-content: center; align-content: center; }
.tiles[data-n="1"] { grid-template-columns: minmax(0, min(100%, calc((100dvh - 170px) * 16 / 9))); }
.tiles[data-n="2"] { grid-template-columns: repeat(2, minmax(0, min(49.5%, calc((100dvh - 170px) * 16 / 9)))); }
.tiles[data-n="3"], .tiles[data-n="4"] { grid-template-columns: repeat(2, minmax(0, min(49.5%, calc((100dvh - 180px) / 2 * 16 / 9)))); }
.tiles[data-n="5"], .tiles[data-n="6"], .tiles[data-n="7"] { grid-template-columns: repeat(3, minmax(0, min(33%, calc((100dvh - 180px) / 2 * 16 / 9)))); }
/* spotlight: a pinned person or a shared screen, with everyone else in a strip */
.stage.has-spot { grid-template-columns: minmax(0, 1fr) 220px; gap: 10px; align-items: stretch; place-items: stretch; }
.spotlight { min-width: 0; min-height: 0; display: grid; place-items: center; }
.spotlight .tile { width: 100%; max-height: 100%; aspect-ratio: auto; height: 100%; box-shadow: var(--shadow-lg); }
.stage.has-spot .tiles { grid-template-columns: 1fr !important; align-content: center; overflow-y: auto; max-height: 100%; padding: 2px; }
.dock { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: .7rem 1.25rem 1rem; }
.dock-main { display: flex; align-items: center; gap: .45rem; padding: .45rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.dock-side { display: flex; gap: .25rem; }
.dock-side.right { justify-content: flex-end; }
.react-wrap { position: relative; }
.react-pop { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); display: flex; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-lg); z-index: 5; }
.react { font-size: 1.4rem; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; transition: transform .15s var(--ease), background .15s; }
.react:hover { background: var(--surface-2); transform: translateY(-2px) scale(1.08); }

/* ---------- side panels ---------- */
.side-panel, .fx-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); z-index: 40;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: -20px 0 60px -30px rgba(16, 38, 31, .25);
  display: flex; flex-direction: column; animation: slidein .25s var(--ease);
}
.fx-panel { width: min(400px, 100vw); overflow-y: auto; display: block; padding: 0 1.25rem 2rem; }
@keyframes slidein { from { transform: translateX(16px); opacity: 0; } }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0 .9rem; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.side-panel .panel-head { padding: 1rem 1rem .6rem 1.25rem; }
.panel-head h2 { font-size: 1.15rem; }
.panel-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 1.25rem 1.25rem; }
.note { color: var(--ink-3); font-size: .82rem; margin: .9rem 0 0; }
.note.top { margin: 0 0 .8rem; padding: .6rem .75rem; background: var(--surface-2); border-radius: 10px; }
.messages { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .9rem; }
.messages li { display: grid; gap: .15rem; }
.messages .meta { font-size: .78rem; color: var(--ink-3); }
.messages .meta strong { color: var(--ink); font-weight: 600; margin-right: .35rem; }
.messages .text { font-size: .92rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.messages li.mine .meta strong { color: var(--accent); }
.composer { display: flex; gap: .5rem; align-items: center; margin-top: .8rem; padding: .35rem .35rem .35rem .9rem; background: var(--surface-2); border-radius: 999px; }
.composer input { flex: 1; min-width: 0; font: inherit; font-size: .92rem; border: 0; background: transparent; color: var(--ink); height: 36px; }
.composer input:focus { outline: none; }
.composer:focus-within { box-shadow: 0 0 0 2px var(--accent-soft), inset 0 0 0 1px var(--accent); }
.people { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .25rem; }
.people li { display: flex; align-items: center; gap: .7rem; padding: .5rem .25rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .9rem; color: #fff; background: var(--accent-strong); flex: none; }
.people .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.people .who small { color: var(--ink-3); font-size: .8rem; margin-left: .3rem; }
.people .state { display: flex; gap: .3rem; color: var(--ink-3); }
.people .state svg { width: 18px; height: 18px; }
.people .state .hand { color: var(--amber); }
.people .state .off { color: var(--rec); }

/* ---------- effects drawer ---------- */
.fx-preview { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; position: relative; background: var(--video); }
.fx-preview canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.tabs { display: flex; gap: .25rem; margin: 1rem 0 1.1rem; padding: 3px; background: var(--surface-2); border-radius: 10px; overflow-x: auto; scrollbar-width: none; }
.tabs [role="tab"] { flex: 1; font-size: .85rem; font-weight: 500; cursor: pointer; padding: .45rem .6rem; border: 0; background: none; color: var(--ink-2); white-space: nowrap; border-radius: 8px; transition: color .15s, background .15s; }
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px rgba(16, 38, 31, .08); }
.opts { display: grid; gap: 14px 10px; }
.opts.wide { grid-template-columns: repeat(2, 1fr); }
.opts.faces { grid-template-columns: repeat(4, 1fr); gap: 16px 8px; }
.opt { color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer; display: grid; gap: .4rem; text-align: left; }
.opt-visual { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-3); transition: box-shadow .15s, transform .2s var(--ease); }
.opt:hover .opt-visual, .sig:hover .opt-visual { transform: translateY(-1px); }
.thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.thumb.live { opacity: 1; }
.opt-icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.5rem; color: var(--ink-2); }
.faces .opt { text-align: center; justify-items: center; }
.faces .opt-visual { width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--surface-2); }
.faces .opt-icon { font-size: 1.6rem; }
.opt-label { font-size: .8rem; }
.opt[aria-pressed="true"] .opt-visual, .sig[aria-pressed="true"] .opt-visual { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.opt[aria-pressed="true"] .opt-label, .sig[aria-pressed="true"] .opt-label { color: var(--ink); font-weight: 500; }
.slider { display: grid; grid-template-columns: 6rem 1fr; align-items: center; gap: 1rem; margin-top: 1.2rem; font-size: .88rem; color: var(--ink-2); }
.slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
.slider input::-webkit-slider-runnable-track { height: 4px; background: var(--surface-3); border-radius: 2px; }
.slider input::-moz-range-track { height: 4px; background: var(--surface-3); border-radius: 2px; }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line-2), 0 2px 6px rgba(16, 38, 31, .18); }
.slider input::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line-2), 0 2px 6px rgba(16, 38, 31, .18); }
.switch { display: flex; align-items: center; gap: .75rem; font-weight: 500; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 24px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16, 38, 31, .2); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.expr-list { list-style: none; padding: 0; margin: 1rem 0 1.4rem; }
.expr-list li { display: flex; align-items: center; gap: .8rem; padding: .65rem 0; border-top: 1px solid var(--line); }
.expr-list li:last-child { border-bottom: 1px solid var(--line); }
.ex-icon { font-size: 1.3rem; width: 2rem; text-align: center; }
.expr-list strong { display: block; font-weight: 500; font-size: .9rem; }
.expr-list strong + span { color: var(--ink-2); font-size: .82rem; }

dialog { background: var(--surface); color: var(--ink); border: 0; border-radius: 18px; padding: 1.6rem; max-width: 26rem; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(16, 38, 31, .35); backdrop-filter: blur(3px); }
dialog h2 { font-size: 1.25rem; margin-bottom: .6rem; }
dialog p { color: var(--ink-2); margin: .5rem 0; }
dialog .row { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.4rem; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; top: 1rem; transform: translateX(-50%); z-index: 80; font-size: .88rem; color: #fff; background: var(--ink); padding: .55rem 1rem; border-radius: 12px; box-shadow: var(--shadow-lg); max-width: calc(100vw - 2rem); animation: drop .25s var(--ease); }
@keyframes drop { from { transform: translate(-50%, -6px); opacity: 0; } }

/* ---------- text pages ---------- */
.doc { max-width: 40rem; margin: 0 auto; padding: 2rem 1.25rem 5rem; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3rem); letter-spacing: -0.04em; margin: 2.5rem 0 1rem; }
.doc h2 { font-size: 1.15rem; margin: 2.2rem 0 .4rem; }
.doc p { color: var(--ink-2); }
.doc p strong { color: var(--ink); font-weight: 600; }
.doc .lede { margin: 0 0 1rem; }
.doc .fine { margin-top: 3rem; font-size: .85rem; color: var(--ink-3); }

@media (max-width: 60rem) {
  .join-row { flex-direction: column; }
  .join-row input, .join-row .btn { flex: none; width: 100%; }
  .call-bar { grid-template-columns: auto 1fr; }
  .call-bar .count { display: none; }
  .bar-mid { justify-content: flex-end; }
  .tiles[data-n="2"] { grid-template-columns: 1fr; }
  .tiles[data-n="3"], .tiles[data-n="4"], .tiles[data-n="5"], .tiles[data-n="6"], .tiles[data-n="7"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage.has-spot { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .stage.has-spot .tiles { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: 132px; overflow-x: auto; overflow-y: hidden; justify-content: start; }
  .dock { grid-template-columns: 1fr; padding: .5rem .5rem .8rem; }
  .dock-side:not(.right) { display: none; }
  .dock-side.right { justify-content: center; }
  .dock-main { overflow-x: auto; max-width: 100%; justify-self: center; gap: .3rem; }
  .side-panel, .fx-panel { top: auto; width: 100vw; height: 72vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; animation: rise .25s var(--ease); }
  body.panel-open .call { margin-right: 0; }
}
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
/* phones: the call controls in two rows of five instead of one row that runs off the screen.
   Device choice stays one tap away under Devices, so the small arrows go. */
@media (max-width: 30rem) {
  .dock-main { display: grid; grid-template-columns: repeat(5, auto); justify-content: center; gap: .35rem; padding: .4rem; border-radius: 26px; overflow: visible; }
  .dock-main .caret { display: none; }
  .dock-main .round { width: 46px; height: 46px; }
  .dock-main .leave { height: 46px; margin-left: 0; padding: 0 .9rem; }
}
@media (min-width: 60.01rem) {
  body.fx-open .lobby { padding-right: 400px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.messages p { margin: 0; }

/* mic and camera: toggle plus a small arrow that opens a device menu */
.split { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 999px; transition: background .15s; }
.split .round { background: transparent; }
.split .round:hover { background: var(--surface-3); }
.split:has(.off) { background: var(--rec); color: #fff; }
.split:has(.off) .round, .split:has(.off) .caret { color: #fff; }
.split:has(.off) .round:hover, .split:has(.off) .caret:hover { background: rgba(255, 255, 255, .16); }
.caret { width: 26px; height: 44px; margin-right: -4px; padding: 0 0 0 4px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; border-radius: 999px 0 0 999px; display: inline-flex; align-items: center; justify-content: center; }
.caret:hover { color: var(--ink); background: var(--surface-3); }
.caret svg { width: 16px; height: 16px; transition: transform .15s; }
.caret[aria-expanded="true"] svg { transform: rotate(180deg); }
.dev-menu { position: fixed; z-index: 60; width: min(320px, calc(100vw - 1.5rem)); max-height: 60vh; overflow-y: auto; padding: .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); animation: pop .15s var(--ease); }
@keyframes pop { from { transform: translateY(4px); opacity: 0; } }
.dev-menu h3 { font-size: .75rem; font-weight: 500; color: var(--ink-3); margin: .45rem .6rem .25rem; letter-spacing: 0; }
.dev-menu h3:not(:first-child) { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.dev-menu button { width: 100%; display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: .88rem; text-align: left; cursor: pointer; }
.dev-menu button:hover, .dev-menu button:focus-visible { background: var(--surface-2); outline: none; }
.dev-menu button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-menu button svg { width: 18px; height: 18px; color: var(--accent); visibility: hidden; }
.dev-menu button[aria-checked="true"] svg { visibility: visible; }
.dev-menu button[aria-checked="true"] { font-weight: 500; }
.dev-menu .empty { margin: .4rem .6rem; font-size: .85rem; color: var(--ink-3); }

/* smart features */
.smart { display: grid; gap: 1.1rem; margin-bottom: 1.4rem; }
.smart .switch { align-items: flex-start; font-weight: 400; }
.smart .switch .track { margin-top: 2px; }
.smart strong { display: block; font-weight: 600; font-size: .93rem; }
.smart small { display: block; color: var(--ink-2); font-size: .83rem; margin-top: .1rem; }
kbd { font: inherit; font-size: .78rem; padding: .05rem .35rem; border-radius: 5px; background: var(--surface-2); box-shadow: inset 0 -1px 0 var(--line-2); }

/* focus ring on effect options sits on the picture, not around the label */
.opt:focus-visible, .sig:focus-visible { outline: none; }
.opt:focus-visible .opt-visual, .sig:focus-visible .opt-visual { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }

/* Face tab */
.fsec + .fsec { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.fsec h3 { margin: 0 0 .1rem; font-size: .92rem; font-weight: 600; color: var(--ink); }
.fsec .slider { margin-top: .55rem; grid-template-columns: 7rem 1fr; }
.fsec .opts.faces { margin-top: .8rem; }
.sw-row { display: grid; grid-template-columns: 7rem 1fr; align-items: center; gap: 1rem; margin-top: .8rem; font-size: .88rem; color: var(--ink-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .35), transparent 55%), var(--sw); box-shadow: inset 0 0 0 1px rgba(16, 38, 31, .12); transition: transform .15s var(--ease), box-shadow .15s; }
.sw:hover { transform: scale(1.08); }
.sw.none { background: linear-gradient(135deg, transparent 46%, var(--ink-3) 46%, var(--ink-3) 54%, transparent 54%), var(--surface-2); }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.sw:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }


/* code on document pages */
.doc code { font: .88em ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; color: var(--ink); }
.doc pre { margin: 1rem 0; padding: 1rem 1.2rem; background: #10261f; color: #f2f5f2; border-radius: 12px; overflow-x: auto; font: .88rem/1.7 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.doc pre code { background: none; padding: 0; color: inherit; font: inherit; }
.doc ol, .doc ul { color: var(--ink-2); padding-left: 1.3rem; }
.doc li { margin: .35rem 0; }
.doc li strong, .doc td strong { color: var(--ink); font-weight: 600; }
.doc h3 { font-size: 1rem; margin: 1.6rem 0 .3rem; }
.doc table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .9rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: .6rem .5rem; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.doc th { color: var(--ink); font-weight: 600; }
.doc td code { white-space: nowrap; }
.doc .deploy { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0; }
.doc .deploy .btn { text-decoration: none; }
.doc .toc { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 1.2rem 0 0; padding: 0; list-style: none; font-size: .92rem; }
.doc a { color: var(--accent); }
.doc .callout { margin: 1.2rem 0; padding: .9rem 1.1rem; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: .93rem; }


/* pre-join: check how you look and sound, then join */
.lobby { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; transition: padding .3s var(--ease); }
.lobby-bar { padding: 1rem clamp(1rem, 3vw, 2rem); }
.lobby-bar .brand { color: var(--ink); text-decoration: none; }
.lobby-cancel { color: var(--ink-2); font-size: .92rem; text-decoration: none; }
.lobby-cancel:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.lobby-main { width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(.5rem, 2vh, 1.5rem) clamp(1rem, 3vw, 2rem) 3rem; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.lobby-stage { position: relative; min-width: 0; }
.lobby-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #13241e; box-shadow: 0 30px 60px -32px rgba(16, 38, 31, .55), 0 0 0 1px rgba(16, 38, 31, .06); }
.lobby-preview > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lobby-controls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center; gap: .6rem; padding: 2.5rem 1rem 1rem; background: linear-gradient(to top, rgba(8, 21, 15, .55), transparent); }
.lobby-controls .split .round, .lobby-controls .caret { height: 48px; }
.lobby-controls .split .round { width: 48px; }
.lobby-controls .split.glass { backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); background: rgba(16, 26, 22, .45); }
.lobby-controls .split.glass:has(.off) { background: var(--rec); }
.lobby-controls .pill-btn { height: 48px; background: rgba(16, 26, 22, .45); border-color: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); }
.lobby-controls .pill-btn:hover { background: rgba(16, 26, 22, .65); }
.lobby-controls .pill-btn[aria-expanded="true"] { background: #fff; color: var(--ink); }
.lobby .cam-hint { position: static; margin: .9rem 0 0; background: rgba(229, 72, 77, .1); color: #a1262b; backdrop-filter: none; text-align: left; }
.lobby-side { min-width: 0; }
.lobby-side h1 { margin: 0; font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.02; font-stretch: 82%; font-weight: 650; letter-spacing: -0.015em; color: var(--ink); }
.lobby-sub { margin: .8rem 0 0; color: var(--ink-2); font-size: 1rem; line-height: 1.55; max-width: 26rem; }
.lobby-form { display: grid; gap: .5rem; margin-top: 1.6rem; }
.lobby-form label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.lobby-form input { font: inherit; font-size: 1rem; height: 52px; padding: 0 1rem; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
.lobby-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.lobby-form .btn { height: 54px; font-size: 1.02rem; margin-top: .35rem; }
.lobby-link { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .7rem; margin-top: 1.2rem; padding: .7rem .8rem .7rem 1rem; border-radius: 12px; background: var(--surface-2); font-size: .88rem; color: var(--ink-2); }
.lobby-link code { flex: 1; font: 600 .95rem ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); letter-spacing: .02em; }
.btn.small { height: 34px; padding: 0 .8rem; font-size: .85rem; border-radius: 9px; }
.lobby-side .devices { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: grid; gap: .9rem; }
@media (max-width: 60rem) {
  .lobby-main { grid-template-columns: 1fr; align-items: start; }
  .lobby-controls { gap: .45rem; padding: 2rem .6rem .7rem; }
  .lobby-controls .pill-btn { padding: 0 .85rem; }
}

/* the invite box is a search-style field (so password managers leave it alone); keep it looking plain */
#code-input { -webkit-appearance: none; appearance: none; }
#code-input::-webkit-search-cancel-button, #code-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }

.btn.danger { color: #fff; background: var(--rec); }
.btn.danger:hover { background: #d63c41; }

/* picture-in-picture window: the call's tiles and a small dock */
.pip-body { margin: 0; height: 100vh; overflow: hidden; background: var(--bg); }
.pip-wrap { height: 100vh; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.pip-wrap .stage { min-height: 0; padding: 6px; }
.pip-wrap .tile-actions { display: none; }
.pip-dock { display: flex; justify-content: center; padding: 6px 8px 8px; }
.pip-controls { display: flex; gap: 8px; align-items: center; }
.pip-controls .round, .pip-controls .leave { width: 40px; height: 40px; }
.pip-confirm { display: flex; align-items: center; gap: 8px; }
.pip-confirm p { margin: 0 .3rem 0 0; font-weight: 600; font-size: .9rem; }
[hidden] { display: none !important; }
/* what the page shows while the call is in the small window */
.pip-holder { display: grid; place-content: center; justify-items: center; gap: 1rem; text-align: center; color: var(--ink-2); padding: 2rem; }
.pip-holder p { margin: 0; font-size: 1.05rem; }

/* connection quality on a tile: three bars, shown only when it isn't good */
.tile .signal { position: absolute; right: 10px; bottom: 10px; z-index: 3; display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; padding: 4px 6px; border-radius: 8px; background: rgba(16, 26, 22, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tile .signal i { display: block; width: 3px; border-radius: 1px; background: rgba(255, 255, 255, .3); }
.tile .signal i:nth-child(1) { height: 5px; } .tile .signal i:nth-child(2) { height: 9px; } .tile .signal i:nth-child(3) { height: 13px; }
.tile .signal[data-tier="weak"] i:nth-child(-n+2) { background: var(--brass); }
.tile .signal[data-tier="poor"] i:nth-child(1), .tile .signal[data-tier="bad"] i:nth-child(1) { background: var(--rec); }
.tile-paused { display: none; position: absolute; inset: 0; z-index: 1; margin: 0; place-content: center; padding: 1rem; text-align: center; font-size: .9rem; color: #fff; background: rgba(16, 26, 22, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tile.video-paused .tile-paused { display: grid; }
.tile.video-paused .tile-name, .tile.video-paused .signal, .tile.video-paused .hand-badge { z-index: 4; }

/* ---------- who can get in: passcode and waiting room ---------- */
.lobby-sec { border: 0; margin: .6rem 0 0; padding: .9rem 1rem; display: grid; gap: .8rem; border-radius: 12px; background: var(--surface-2); }
.lobby-sec legend { float: left; width: 100%; padding: 0; margin-bottom: .1rem; font-size: .85rem; font-weight: 600; color: var(--ink); }
.lobby-sec .switch { align-items: flex-start; font-weight: 400; font-size: .92rem; }
.lobby-sec .switch .track { margin-top: 2px; }
.lobby-form .quiet-switch { align-items: flex-start; font-weight: 400; font-size: .92rem; color: var(--ink); margin-top: .6rem; padding: .9rem 1rem; border-radius: 12px; background: var(--surface-2); }
.quiet-switch .track { margin-top: 2px; }
.quiet-switch small, .lobby-sec .switch small, .door-box .switch small { display: block; color: var(--ink-3); font-size: .8rem; margin-top: .1rem; }
.pass-row { display: grid; gap: .5rem; margin-top: .4rem; }
.pass-row input { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; }
.lobby-note { margin: .3rem 0 0; padding: .6rem .8rem; border-radius: 10px; background: rgba(229, 72, 77, .1); color: #a1262b; font-size: .9rem; line-height: 1.45; }
.lobby-wait { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; align-items: center; margin-top: 1.6rem; padding: 1.1rem 1.2rem; border-radius: 14px; background: var(--surface-2); }
.lobby-wait strong { font-size: 1.05rem; color: var(--ink); }
.lobby-wait p { margin: .25rem 0 0; color: var(--ink-2); font-size: .92rem; line-height: 1.5; }
.lobby-wait .btn { grid-column: 1 / -1; justify-self: start; margin-top: .4rem; }
.wait-dots { display: inline-flex; gap: 5px; }
.wait-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: wait-dot 1.2s infinite ease-in-out; }
.wait-dots i:nth-child(2) { animation-delay: .15s; }
.wait-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes wait-dot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .wait-dots i { animation: none; opacity: .7; } }

.stage { position: relative; }
.knocks { position: absolute; top: .75rem; left: 50%; transform: translateX(-50%); z-index: 20; display: grid; gap: .5rem; width: min(420px, calc(100% - 1.5rem)); pointer-events: none; }
.knock { pointer-events: auto; display: flex; align-items: center; flex-wrap: wrap; gap: .6rem .8rem; padding: .75rem .8rem .75rem 1rem; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 40px -18px rgba(8, 21, 15, .55), 0 0 0 1px rgba(16, 38, 31, .08); animation: knock-in .25s var(--ease); }
.knock p { flex: 1; min-width: 9rem; margin: 0; font-size: .95rem; }
.knock-btns { display: flex; gap: .4rem; }
@keyframes knock-in { from { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .knock { animation: none; } }

.waiting-box { margin: 0 0 1rem; padding: .8rem .8rem .3rem; border-radius: 12px; background: var(--accent-soft); }
.waiting-box h3 { margin: 0 0 .3rem; font-size: .85rem; font-weight: 600; color: var(--ink); }
.people.waiting { margin: 0; }
.people.waiting li { flex-wrap: wrap; }
.door-box { display: grid; gap: .8rem; margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.door-box .switch { align-items: flex-start; font-weight: 400; font-size: .92rem; }
.door-box .switch .track { margin-top: 2px; }
.pass-line { margin: 0; font-size: .9rem; color: var(--ink-2); }
.pass-line code { margin-left: .4rem; font: 600 .95rem ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); letter-spacing: .04em; }
.door-box .btn { justify-self: start; }

/* ---------- live captions ---------- */
.captions { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 15; width: min(760px, calc(100% - 2rem)); display: grid; gap: .35rem; pointer-events: none; }
.cap { margin: 0; padding: .45rem .8rem; border-radius: 10px; background: rgba(8, 16, 13, .78); color: #fff; font-size: clamp(1rem, 1.6vw, 1.3rem); line-height: 1.4; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cap strong { margin-right: .5rem; color: #b8e3cf; font-weight: 600; }
#cc-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
/* phones and narrow windows stack the people, so captions sit under them instead of covering
   the bottom person's face and name */
@media (max-width: 60rem) {
  .stage { align-content: center; }
  .captions { position: static; transform: none; width: 100%; margin-top: .6rem; }
}
.field-hint { font-size: .78rem; color: var(--ink-3); }


/* ================= home =================
   Night pine, mist white and brass. The idea: two circles, you and them; the space where they
   overlap is the call, and it's lit only for the two of you. Bricolage Grotesque for headings,
   Instrument Sans for the rest. One orchestrated moment on load (the circles meet); the call
   window story loops while visible; everything else moves only when you act. */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
.home {
  --display: "Bricolage Grotesque", var(--sans);
  --night: #06110d; --night-2: #0a1813; --card: #0e1e18; --card-2: #13271f;
  --mist: #eef3ef; --mist-2: rgba(238, 243, 239, .7); --mist-3: rgba(238, 243, 239, .46);
  --hair: rgba(238, 243, 239, .1); --hair-2: rgba(238, 243, 239, .18);
  --gold: #f0b44c; --gold-2: #ffcf7a; --live: #3fc58a; --orb: #1b4636; --orb-2: #0c2119; --glow: #ffd98c;
  --leaf: #14523d; --bottle: #10261f;
  min-height: 100vh; overflow-x: clip; background: var(--night); color: var(--mist); font-size: 16px;
  color-scheme: dark;
}
.home ::selection { background: var(--gold); color: var(--night); }
.home :focus-visible { outline-color: var(--gold); }
.home .wrap { --gutter: clamp(1rem, 4vw, 2.5rem); position: relative; width: 100%; max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.home .ruled::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--hair); }
.home h1, .home h2 { font-family: var(--display); font-variation-settings: "opsz" 96; color: var(--mist); }
.home h2 { font-size: clamp(2.1rem, 3.8vw, 3.2rem); line-height: 1.04; font-weight: 700; letter-spacing: -0.032em; max-width: 17ch; text-wrap: balance; }
.home .section-lede { margin: 1rem 0 0; font-size: 1.1rem; line-height: 1.6; color: var(--mist-2); max-width: 36rem; }
.home a { color: var(--mist); text-underline-offset: 3px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--night) 60%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid transparent; transition: border-color .25s, background .25s; }
.nav.scrolled { border-bottom-color: var(--hair); background: color-mix(in srgb, var(--night) 82%, transparent); }
.nav-in { height: 70px; display: flex; align-items: center; gap: 2rem; }
.home .brand { color: var(--mist); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.28rem; letter-spacing: -0.035em; gap: .6rem; }
.home .brand .mark { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 1.8rem; margin: 0 auto; }
.nav-links a, .site-foot nav a { color: var(--mist-2); text-decoration: none; font-size: .93rem; font-weight: 500; transition: color .15s; }
.nav-links a:hover, .site-foot nav a:hover { color: var(--mist); }
.nav-end { display: flex; align-items: center; gap: .6rem; }
.nav-gh { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--mist-2); transition: background .15s, color .15s; }
.nav-gh:hover { background: var(--hair); color: var(--mist); }
.nav-gh svg { width: 20px; height: 20px; }

/* buttons */
.home .btn { border-radius: 999px; font-weight: 650; text-decoration: none; }
.home .btn.small { height: 40px; padding: 0 1.1rem; font-size: .9rem; }
.home .btn.big { height: 56px; padding: 0 2rem; font-size: 1.05rem; }
.home .btn.brass { background: var(--gold); color: var(--night); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 16px 40px -16px color-mix(in srgb, var(--gold) 70%, transparent); }
.home .btn.brass:hover { background: var(--gold-2); transform: translateY(-1px); }
.home .btn.brass:active { transform: none; }
.home .btn.light { background: var(--mist); color: var(--night); }
.home .btn.light:hover { background: #fff; }
.home .btn.ghost { color: var(--mist); border-color: var(--hair-2); background: transparent; }
.home .btn.ghost:hover { background: var(--hair); }

/* hero: the two circles meet behind the words */
.hero { position: relative; min-height: min(100svh, 980px); display: grid; align-content: start; padding-top: clamp(3rem, 10vh, 6.5rem); padding-bottom: 7rem; isolation: isolate; }
.orbs { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.orbs .s-orb { stop-color: var(--orb); }
.orbs .s-orb2 { stop-color: var(--orb-2); }
.orbs .s-night { stop-color: var(--night); }
.orbs .s-glow { stop-color: var(--glow); }
.orbs .s-gold { stop-color: var(--gold); }
.orbs .motes circle { fill: color-mix(in srgb, var(--glow) 80%, #fff); }
.orbs .orb-ring { fill: none; stroke: rgba(238, 243, 239, .3); stroke-width: 1.3; }
.orbs .ripples circle { fill: none; stroke: color-mix(in srgb, var(--gold) 30%, transparent); stroke-width: 1; transform-box: fill-box; transform-origin: center; opacity: 0; animation: ripple 9s cubic-bezier(.2, .6, .3, 1) infinite; }
.orbs .ripples circle:nth-child(2) { animation-delay: 3s; }
.orbs .ripples circle:nth-child(3) { animation-delay: 6s; }
@keyframes ripple { 0% { transform: scale(.9); opacity: 0; } 15% { opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }
.orbs .lens-g { opacity: 0; }
.orbs .motes circle { transform-box: fill-box; animation: mote 7s linear infinite; }
.orbs .motes circle:nth-child(2n) { animation-duration: 9s; animation-delay: -3s; }
.orbs .motes circle:nth-child(3n) { animation-duration: 11s; animation-delay: -6s; }
@keyframes mote { 0% { transform: translateY(40px); opacity: 0; } 20% { opacity: 1; } 80% { opacity: .8; } 100% { transform: translateY(-260px); opacity: 0; } }
.orb-label { font: 600 15px var(--sans); fill: rgba(238, 243, 239, .55); letter-spacing: .01em; }
.hero-copy { text-align: center; display: grid; justify-items: center; }
.pill { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1.6rem; padding: .4rem .9rem .4rem .75rem; border-radius: 999px; background: rgba(238, 243, 239, .06); box-shadow: inset 0 0 0 1px var(--hair-2); font-size: .86rem; font-weight: 500; color: var(--mist-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.live::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: var(--live); opacity: .35; animation: live 2.4s ease-out infinite; }
@keyframes live { 0% { transform: scale(.4); opacity: .5; } 100% { transform: scale(1.4); opacity: 0; } }
.hero h1 { font-size: clamp(3rem, 7.6vw, 6.8rem); line-height: .94; font-weight: 700; letter-spacing: -0.042em; max-width: 12ch; text-wrap: balance; text-shadow: 0 2px 40px color-mix(in srgb, var(--night) 60%, transparent); }
.hero .lede { margin: 1.6rem 0 0; font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.6; color: var(--mist-2); max-width: 36rem; }
.hero-cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .75rem; }
.code-form { display: flex; align-items: center; height: 56px; padding: 0 .4rem 0 1.2rem; border-radius: 999px; background: rgba(238, 243, 239, .07); box-shadow: inset 0 0 0 1px var(--hair-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: box-shadow .2s; }
.code-form:focus-within { box-shadow: inset 0 0 0 1.5px var(--gold); }
.code-form input { width: 14.5rem; min-width: 0; height: 100%; border: 0; background: none; color: var(--mist); font: inherit; font-size: .98rem; }
.code-form input::placeholder { color: var(--mist-3); }
.code-form input:focus { outline: none; }
.code-form input::-webkit-search-decoration, .code-form input::-webkit-search-cancel-button { -webkit-appearance: none; }
.code-form .join { height: 44px; padding: 0 1.15rem; border-radius: 999px; background: var(--mist); color: var(--night); font-weight: 650; }
.code-form .join:hover { background: #fff; }
.start-note { margin: 1.1rem 0 0; color: var(--mist-3); font-size: .9rem; }
.hero-foot { position: absolute; left: 0; right: 0; bottom: 2.2rem; margin: 0; text-align: center; font-size: .88rem; font-weight: 600; color: var(--gold); letter-spacing: .01em; }
/* the words arrive with the circles */
.hero-copy > * { animation: rise .9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* the call itself */
.showcase { padding-top: clamp(4rem, 10vh, 7rem); padding-bottom: clamp(4rem, 10vh, 7rem); background: radial-gradient(60% 50% at 50% 60%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 70%); }
.showcase h2, .showcase .section-lede { margin-left: auto; margin-right: auto; text-align: center; }
.showcase h2 { max-width: 22ch; }
.moments { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: center; max-width: 76rem; margin: clamp(2.5rem, 6vh, 4rem) auto 0; }
.m-steps { display: grid; gap: .5rem; }
.m-steps [role="tab"] { all: unset; box-sizing: border-box; display: grid; gap: .3rem; padding: 1.1rem 1.25rem 1.2rem; border-radius: 16px; cursor: pointer; color: var(--mist-3); box-shadow: inset 0 0 0 1px transparent; transition: background .3s var(--ease), box-shadow .3s var(--ease), color .3s var(--ease); }
.m-steps [role="tab"]:hover { color: var(--mist-2); }
.m-steps [role="tab"][aria-selected="true"] { background: var(--card); box-shadow: inset 0 0 0 1px var(--hair); color: var(--mist-2); }
.m-steps [role="tab"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.m-n { font-size: .78rem; font-weight: 600; letter-spacing: .06em; color: var(--gold); font-variant-numeric: tabular-nums; }
.m-steps strong { font-size: 1.08rem; font-weight: 600; color: var(--mist-2); }
.m-steps [aria-selected="true"] strong { color: var(--mist); }
.m-d { font-size: .95rem; line-height: 1.5; }
.m-bar { display: block; height: 2px; margin-top: .7rem; border-radius: 2px; background: var(--hair); overflow: hidden; }
.m-bar::after { content: ""; display: block; height: 100%; width: 0; background: var(--gold); }
[aria-selected="true"] .m-bar::after { width: 100%; }
.moments.playing [aria-selected="true"] .m-bar::after { width: 0; animation: m-fill var(--m-time, 6s) linear forwards; }
.moments.paused [aria-selected="true"] .m-bar::after { animation-play-state: paused; }
@keyframes m-fill { to { width: 100%; } }
.m-view { position: relative; display: grid; border-radius: 16px; overflow: hidden; background: #f3f3ef; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 60px 120px -40px rgba(0, 0, 0, .85), 0 0 100px -30px color-mix(in srgb, var(--gold) 30%, transparent); }
.m-shot { grid-area: 1 / 1; display: block; width: 100%; height: auto; opacity: 0; transform: scale(1.012); transition: opacity .6s var(--ease), transform .9s var(--ease); }
.m-shot.on { opacity: 1; transform: none; }
.m-note { margin: 1.6rem auto 0; max-width: 76rem; text-align: right; color: var(--mist-3); font-size: .84rem; }
.d-knock { position: absolute; left: 50%; top: 10px; z-index: 6; width: min(78%, 330px); display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .55rem .55rem .8rem; border-radius: 12px; background: #fff; color: #10261f; font-size: .74rem; box-shadow: 0 16px 32px -14px rgba(8, 21, 15, .55), 0 0 0 1px rgba(16, 38, 31, .08); transform: translate(-50%, -140%); opacity: 0; }
.d-knock p { margin: 0; }
.d-knock span { display: flex; gap: .3rem; flex: none; }
.d-knock i { font-style: normal; font-weight: 600; padding: .3rem .55rem; border-radius: 999px; font-size: .68rem; }
.d-knock .k-no { box-shadow: inset 0 0 0 1px rgba(16,38,31,.18); }
.d-knock .k-yes { background: var(--leaf); color: #fff; }
.scene { position: relative; display: grid; gap: .9rem; justify-items: center; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.chips span { padding: .3rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 600; color: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.chips span.on { background: #fff; color: #10261f; box-shadow: none; }
.waves { width: 100%; gap: 1.2rem; }
.wave-row { width: 100%; display: grid; grid-template-columns: 7rem 1fr; align-items: center; gap: 1rem; }
.wave-row p { margin: 0; color: rgba(255, 255, 255, .72); font-size: .85rem; font-weight: 600; }
.wave-row svg { width: 100%; height: 64px; overflow: visible; }
.wave-row path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.w-noisy { stroke: rgba(255, 255, 255, .5); }
.w-clean { stroke: #f0b44c; }
.door { width: min(100%, 380px); }
.pass { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: .7rem 1rem; border-radius: 12px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.pass p { margin: 0; color: rgba(255, 255, 255, .7); font-size: .85rem; font-weight: 600; }
.pass span { font: 600 1rem ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .12em; color: #fff; }
.d-knock.static { position: static; transform: none; opacity: 1; width: 100%; font-size: .85rem; padding: .7rem .7rem .7rem 1rem; }
.d-knock.static i { font-size: .78rem; padding: .4rem .7rem; }
.door-note { margin: 0; color: rgba(255, 255, 255, .65); font-size: .85rem; text-align: center; }
/* where your call goes */
.private { padding-top: clamp(4rem, 10vh, 6.5rem); padding-bottom: clamp(4rem, 10vh, 6.5rem); }
.private-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.lanes { margin: 0; display: grid; gap: .8rem; }
.lane { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--hair); }
.lane.is-us { background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 10%, transparent), color-mix(in srgb, var(--gold) 4%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 40%, transparent), 0 20px 50px -30px color-mix(in srgb, var(--gold) 45%, transparent); }
.lane-label { margin: 0; font-size: .9rem; font-weight: 600; color: var(--mist-3); }
.lane.is-us .lane-label { color: var(--mist); }
.lane-line { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.lane .node { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 600; background: var(--card-2); color: var(--mist-2); }
.lane.is-us .node { background: var(--mist); color: var(--night); }
.lane .wire { position: relative; flex: 1; min-width: 18px; height: 2px; background: repeating-linear-gradient(90deg, var(--hair-2) 0 6px, transparent 6px 11px); }
.lane.is-us .wire { height: 3px; border-radius: 2px; background: var(--gold); box-shadow: 0 0 14px color-mix(in srgb, var(--gold) 50%, transparent); }
.lane .hub { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .7rem; border-radius: 10px; background: var(--card-2); color: var(--mist-2); font-size: .78rem; font-weight: 600; }
.lane .hub svg { width: 16px; height: 16px; }
.wire-tag { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; font-size: .76rem; font-weight: 600; color: var(--gold); }
.wire-tag svg { width: 13px; height: 13px; }
.pk { position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; opacity: 0; }
.is-them .pk { background: var(--mist-2); box-shadow: none; }
.lanes.on .pk { animation: pk 2.4s linear infinite; }
.lanes.on .is-them .pk { animation-duration: 3.2s; }
.lanes.on .is-them .pk.late { animation-delay: 1.6s; }
.lanes.on .pk.d2 { animation-delay: .8s; }
.lanes.on .pk.d3 { animation-delay: 1.6s; }
@keyframes pk { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 50% { left: 100%; opacity: 1; } 55%, 100% { left: 100%; opacity: 0; } }
.facts { margin: clamp(3rem, 7vh, 4.5rem) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.2rem 2.6rem; }
.facts div, .source-points div { padding-top: 1rem; border-top: 1px solid var(--hair-2); }
.facts dt, .source-points dt { font-weight: 650; font-size: 1.02rem; color: var(--mist); margin-bottom: .35rem; }
.facts dd, .source-points dd { margin: 0; color: var(--mist-2); line-height: 1.55; font-size: .95rem; }
.fine-print { margin: 2.6rem 0 0; font-size: .88rem; color: var(--mist-3); max-width: 46rem; line-height: 1.55; }
.fine-print a { color: var(--mist-2); }

/* features: pick one, see it */
.features { padding-top: clamp(4rem, 10vh, 6.5rem); padding-bottom: clamp(4rem, 10vh, 6.5rem); }
.explorer { margin-top: clamp(2.2rem, 5vh, 3.2rem); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: stretch; }
.ex-tabs { display: grid; gap: .25rem; align-content: start; }
.ex-tabs button { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: grid; gap: .25rem; padding: .95rem 1.1rem .95rem 1.35rem; border-radius: 14px; transition: background .2s; }
.ex-tabs button::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 2px; background: var(--gold); transform: scaleY(0); transition: transform .3s var(--ease); }
.ex-tabs button:hover { background: rgba(238, 243, 239, .04); }
.ex-tabs button[aria-selected="true"] { background: var(--card); box-shadow: inset 0 0 0 1px var(--hair); }
.ex-tabs button[aria-selected="true"]::before { transform: none; }
.ex-tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ex-tabs strong { font-size: 1.02rem; font-weight: 650; color: var(--mist-2); transition: color .2s; }
.ex-tabs button[aria-selected="true"] strong { color: var(--mist); }
.ex-tabs span { font-size: .92rem; line-height: 1.5; color: var(--mist-2); display: none; }
.ex-tabs button[aria-selected="true"] span { display: block; animation: ex-in .35s var(--ease); }
.ex-view { position: relative; min-height: 360px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--hair); padding: clamp(1rem, 3vw, 2rem); display: grid; place-items: center; overflow: hidden; }
.ex-view::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 80% 0%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 70%); }
.ex-panel { position: relative; width: 100%; animation: ex-in .4s var(--ease); }
.ex-shot { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 60px -30px rgba(0, 0, 0, .7); }
@keyframes ex-in { from { opacity: 0; transform: translateY(6px); } }
.also { margin: 2.4rem 0 0; color: var(--mist-2); font-size: .98rem; line-height: 1.6; max-width: 44rem; }

/* open source */
.source { background: var(--night-2); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.source-in { padding-top: clamp(4rem, 10vh, 6.5rem); padding-bottom: clamp(4rem, 10vh, 6.5rem); }
.source-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.source-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.source-actions .btn { height: 48px; padding: 0 1.4rem; }
.term { margin: 0; border-radius: 16px; background: #030a07; box-shadow: 0 0 0 1px var(--hair), 0 30px 60px -30px rgba(0, 0, 0, .7); overflow: hidden; }
.term-bar { display: flex; gap: 7px; padding: 14px 16px 0; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(242, 245, 242, .16); }
.term pre { margin: 0; padding: 1.1rem 1.4rem 1.5rem; overflow-x: auto; font: 500 .9rem/1.85 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--mist); }
.term .p { color: var(--gold); user-select: none; }
.term .o { color: var(--mist-3); }
.source-points { margin: clamp(3rem, 7vh, 4rem) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 2.6rem; }
.demo-note { margin: 2.4rem 0 0; color: var(--mist-3); font-size: .9rem; }

/* questions */
.faq { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(2rem, 5vw, 4rem); padding-top: clamp(4rem, 10vh, 6.5rem); padding-bottom: clamp(3rem, 8vh, 5rem); }
.faq-list { border-top: 1px solid var(--hair-2); }
.faq details { border-bottom: 1px solid var(--hair-2); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 0; font-weight: 600; font-size: 1.04rem; color: var(--mist); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 1.8px solid var(--mist-2); border-bottom: 1.8px solid var(--mist-2); transform: translateY(-3px) rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
.faq details p { margin: 0 0 1.2rem; color: var(--mist-2); line-height: 1.6; max-width: 40rem; }
.faq details[open] p { animation: ex-in .3s var(--ease); }
.faq details a { color: var(--gold); }

/* closing */
.cta-band { position: relative; overflow: hidden; background: radial-gradient(50% 70% at 50% 100%, color-mix(in srgb, var(--gold) 20%, transparent), transparent 70%); }
.cta-in { display: grid; justify-items: center; text-align: center; padding-top: clamp(4rem, 10vh, 6.5rem); padding-bottom: clamp(4rem, 10vh, 6rem); }
.cta-mark { width: 56px; height: 56px; margin-bottom: 1.6rem; }
.cta-band h2 { max-width: none; font-size: clamp(2.4rem, 5vw, 4rem); }
.cta-band p { margin: .9rem 0 2rem; color: var(--mist-2); font-size: 1.08rem; }
.site-foot { display: flex; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; padding-top: 1.6rem; padding-bottom: 2.4rem; }
.site-foot p { flex: 1; min-width: 14rem; margin: 0; color: var(--mist-3); font-size: .88rem; }
.site-foot p a { color: var(--mist-2); }
.site-foot nav { display: flex; gap: 1.4rem; }
.home .brand.small { font-size: 1.1rem; }
.home .brand.small .mark { width: 24px; height: 24px; }

@media (max-width: 64rem) {
  .nav-links { display: none; }
  .nav-end { margin-left: auto; }
  .private-head, .source-head, .explorer, .faq, .moments { grid-template-columns: 1fr; }
  .m-view { order: -1; }
  .m-steps { gap: .25rem; }
  .m-steps [role="tab"] { grid-template-columns: auto 1fr; column-gap: .8rem; align-items: baseline; padding: .8rem 1rem .9rem; }
  .m-steps .m-d, .m-steps .m-bar { grid-column: 2; }
  .m-steps .m-d { display: none; }
  .m-steps [aria-selected="true"] .m-d { display: block; }
  .m-note { text-align: center; }
  .facts, .source-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .hero { min-height: 0; padding-bottom: 6rem; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 3.4rem); }
  .hero-cta { width: 100%; flex-direction: column; align-items: stretch; }
  .code-form input { width: auto; flex: 1; }
  .facts, .source-points { grid-template-columns: 1fr; gap: 1.5rem; }
  .lane { grid-template-columns: 1fr; gap: .7rem; padding: 1rem; }
  .lane .node { width: 40px; height: 40px; font-size: .72rem; }
  .wire-tag { font-size: .7rem; }
  .d-knock { width: 90%; font-size: .68rem; }
  .ex-view { min-height: 280px; }
  .wave-row { grid-template-columns: 1fr; gap: .3rem; }
  .nav-gh { display: none; }
  .orb-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .home *, .home *::before, .home *::after { animation: none !important; transition: none !important; }
  .orbs .lens-g { opacity: 1; }
}
