/* Homepage: workspace playground, beta access requests. Light only. */
:root {
  color-scheme: light;
  --bg: #f6f9fa;
  --ink: #183e43;
  --muted: #577579;
  --accent: #126d70;
  --soft-accent: #57868a;
  --line: #d5e3e4;
  --paper: #ffffff;
  --tint: #e8f1ef;
  --tint-line: #bad4d0;
  --chip-on: #e4efef;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* One content width for every section: 1120px up to a 1440px viewport, then
     growing with the screen so large and 4K displays get a wider page. */
  --page: clamp(1120px, 74vw, 1600px);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 40px; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
img { max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; }
a { color: inherit; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--sans); font-weight: 500; letter-spacing: -.065em; }
h1 { font-size: clamp(48px, 6vw, 88px); line-height: 1.09; }
h1 em { font-style: normal; color: var(--soft-accent); }
h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.15; }
p { line-height: 1.8; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 12px; background: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.no-script { padding: 20px; text-align: center; font-size: 13px; color: var(--muted); }

.header { max-width: var(--page); margin: auto; display: flex; align-items: center; justify-content: space-between; padding: 32px 40px; }
.header > a { display: flex; }
.header img { display: block; width: 75px; height: auto; }
.header nav { display: flex; align-items: center; gap: 24px; }
.header nav a { font-size: 12px; color: var(--muted); letter-spacing: .015em; text-decoration: none; }
.header nav a:hover { color: var(--accent); }

/* Hero: the workspace and beta access */
.hero { position: relative; min-height: min(calc(100svh - 175px), 860px); max-width: 1400px; margin: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 70px 24px 105px; }
.hero-phrase { white-space: nowrap; }
.hero-description { margin-top: 24px; max-width: 760px; font-size: 17px; line-height: 1.7; color: var(--muted); }
.hero .cta { margin-top: 30px; }
.hero-note { margin-top: 18px; font-size: 11px; line-height: 1.7; color: var(--muted); }
.cta { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 32px; padding: 15px 23px; border-radius: 30px; background: var(--accent); color: #fff; font-size: 13px; line-height: 1.4; font-weight: 500; min-height: 48px; transition: transform .2s, box-shadow .2s; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 5px 16px #00000012; }
.story-link { position: absolute; bottom: 27px; text-decoration: none; color: var(--muted); font-size: 11px; display: flex; gap: 22px; align-items: center; }
.hero .cta, .story-link { transition: opacity .5s, transform .2s; }

/* Try it: the playground takes the place of the video */
.play { max-width: var(--page); margin: 0 auto; padding: 85px 40px; border-top: 1px solid var(--line); scroll-margin-top: 30px; }
.inside-section, .beta-section, .faq-section { max-width: var(--page); margin: 0 auto; border-top: 1px solid var(--line); }
.detail-heading { margin-bottom: 30px; }
.detail-heading h2 { font-size: clamp(34px, 4vw, 48px); text-wrap: balance; }
.detail-heading > p { margin-top: 14px; font-size: 14px; color: var(--muted); }
/* The playground's title row carries the link that swaps it for the demo video. */
.play-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; align-items: last baseline; gap: 14px 32px; margin-bottom: 30px; }
.play-head .detail-heading { margin-bottom: 0; }
.demo-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 500; line-height: 1.5; cursor: pointer; white-space: nowrap; }
.demo-toggle > span { align-self: baseline; }
.demo-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.demo-toggle .demo-watch path { fill: currentColor; stroke: none; }
.demo-toggle[aria-expanded="true"] .demo-watch, .demo-toggle[aria-expanded="false"] .demo-try { display: none; }
.demo-toggle:hover > span { text-decoration: underline; text-underline-offset: 3px; }
.demo-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.demo iframe { display: block; width: min(100%, calc((100svh - 160px) * 16 / 9)); aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #0b0d10; box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 22px 60px rgba(24, 62, 67, .18); }
/* The pane list beside the window: icon and name, a check when open */
.play-body { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 22px; align-items: start; }
.play-main { min-width: 0; }
/* Pulled left by the rows' padding: labels and icons line up with the title, hover hangs in the margin. */
.picker { display: flex; flex-direction: column; gap: 18px; margin-left: -10px; }
.pk-group { display: flex; flex-direction: column; gap: 2px; }
.pk-label { margin: 0 0 4px; padding: 0 10px; font-size: 12px; font-weight: 500; line-height: 1.4; color: var(--muted); }
.pk { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.3; text-align: left; transition: background .2s, color .2s; }
.pk svg { flex: none; width: 15px; height: 15px; color: var(--muted); }
.pk:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); color: var(--ink); }
.pk[aria-pressed="true"] { color: var(--ink); }
.pk[aria-pressed="true"] svg { color: var(--accent); }
.pk[aria-pressed="true"]::after { content: "✓"; margin-left: auto; font-size: 12px; color: var(--accent); }
.pk-new { margin-left: 5px; color: var(--accent); font-size: 9px; font-weight: 500; }
.pk-kind { display: none; }
.pk-help { margin: 2px 10px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

/* The playground mirrors the app's canvas: a transparent strip over the
   background art, cards with 30px headers, a dock of folded chips on the right. */
.vw {
  --app-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --app-ease: cubic-bezier(.3, .8, .3, 1);
  /* Theme colours come from the selected background's portable theme (vupai
     web/themes/<name>/theme.json); "simple" is the fallback. Slates derive from
     --solid exactly as canvas.css does. */
  --solid: #ffffff;
  --ink: #1d1d1f;
  --dim: #6f6f75;
  --dim2: #5e5e63;
  --app-line: #d2d2d7;
  --focus: #0071e3;
  --accent: #0071e3;
  --veil: transparent;
  --term-bg: #17181d;
  --term-line: #2e3038;
  --term-ink: #d6d8e0;
  --term-head-ink: #ced2dd;
  --lift: #000000;
  --sink: #ffffff;
  --n-done: #1c7a3e;
  --blue: #0071e3;
  --green: #34c759;
  --red: #ff3b30;
  --slate: color-mix(in srgb, var(--solid) 94%, var(--lift));
  --slate-head: color-mix(in srgb, var(--solid) 89%, var(--lift));
  --slate-deep: color-mix(in srgb, var(--solid) 97%, var(--sink));
  --slate-line: var(--app-line);
  --slate-ink: var(--ink);
  --slate-dim: var(--dim2);
  --dots: rgba(29, 29, 31, .09);
  --amber: #d8a03d;
  --git-mod: #2f6fd6;
  --git-add: #1a8f4c;
  --add: #14682c;
  --del: #9b1f19;
  --k: #8250df;
  --s: #0a7d53;
  --f: #0550ae;
  --t: #b35900;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f7;
  box-shadow: 0 34px 70px -40px rgba(24, 62, 67, .38), 0 10px 26px -18px rgba(24, 62, 67, .22);
}
.vw[data-mode="dark"] {
  --solid: #232329;
  --ink: #f5f5f7;
  --dim: #8e8e96;
  --dim2: #a3a3ab;
  --app-line: #3a3a42;
  --focus: #5b87cc;
  --accent: #f5f5f7;
  --lift: #ffffff;
  --sink: #000000;
  --n-done: #4cd471;
  --dots: rgba(255, 255, 255, .07);
  --git-mod: #6aa6ff;
  --git-add: #4ade80;
  --add: #9fe3b0;
  --del: #ff9d96;
  --k: #d2a8ff;
  --s: #7ee2b8;
  --f: #79c0ff;
  --t: #ffa657;
  background: #1a1a1e;
  border-color: #1f3038;
}
/* Each background sets the whole token set in both modes, so a light rule
   never leaks into dark. Snow dunes is the app's "seascape" theme id. */
.vw[data-bg="snow-dunes"] { --solid: #fafafb; --ink: #161618; --dim: #66666c; --dim2: #535359; --app-line: #c9c9cd; --focus: #0071e3; --accent: #0071e3; --veil: #c4cbcc; --term-bg: #101012; --term-line: #2b2b30; --term-head-ink: #cdcdd3; --term-ink: #dadade; }
.vw[data-bg="snow-dunes"][data-mode="dark"] { --solid: #1b1b1e; --ink: #ececee; --dim: #85858c; --dim2: #9c9ca3; --app-line: #37373c; --focus: #5b87cc; --accent: #f5f5f7; --veil: #122538; }
.vw[data-bg="wave"] { --solid: #ffffff; --ink: #171a21; --dim: #656d7d; --dim2: #555d6d; --app-line: #ccd2de; --focus: #2f6ea8; --accent: #0071e3; --veil: #d0c8ba; --term-bg: #12151b; --term-line: #2b303b; --term-head-ink: #c3cbd9; --term-ink: #ccd4e2; }
.vw[data-bg="wave"][data-mode="dark"] { --solid: #1e2128; --ink: #eef1f6; --dim: #868e9e; --dim2: #9aa2b2; --app-line: #343945; --focus: #7fb0dc; --accent: #f5f5f7; --veil: #121c28; }
.vw:is([data-bg="forest"], [data-bg="sintra"]) { --solid: #fafcf8; --ink: #16200f; --dim: #65735f; --dim2: #4f5d49; --app-line: #cbd6c5; --focus: #2f7a45; --accent: #0071e3; --veil: #dfd8ce; --term-bg: #111610; --term-line: #2a332a; --term-head-ink: #c6d1c1; --term-ink: #d3ddcd; }
.vw:is([data-bg="forest"], [data-bg="sintra"])[data-mode="dark"] { --solid: #1e241c; --ink: #ecf2e6; --dim: #849080; --dim2: #9aa695; --app-line: #333c30; --focus: #7cc98d; --accent: #f5f5f7; --veil: #1a1b1b; }
.vw[data-bg="sintra"] { --veil: #b5a37e; }
.vw[data-bg="sintra"][data-mode="dark"] { --veil: #142632; }
.vw[data-bg="cherry-blossom"] { --solid: #fffdfc; --ink: #2c1622; --dim: #7e5d67; --dim2: #6f4f5a; --app-line: #ebd4d1; --focus: #e34d7c; --accent: #e34d7c; --veil: #ddcad0; --term-bg: #120a19; --term-line: #342344; --term-head-ink: #d3c3d4; --term-ink: #e0d2e0; }
.vw[data-bg="cherry-blossom"][data-mode="dark"] { --solid: #261a31; --ink: #f6ecf4; --dim: #a189ab; --dim2: #b8a3c0; --app-line: #43305a; --focus: #ff5d8f; --accent: #ff5d8f; --veil: #201722; }
.vw[data-bg="astro"] { --solid: #fbf6ec; --ink: #292e2c; --dim: #6b685d; --dim2: #5b584d; --app-line: #d6cbb9; --focus: #a44821; --accent: #a44821; --veil: #e6ddd0; --term-bg: #0c1112; --term-line: #3a423f; --term-head-ink: #d9cfbd; --term-ink: #e7dece; }
.vw[data-bg="astro"][data-mode="dark"] { --solid: #1d2323; --ink: #f2ede4; --dim: #aaa697; --dim2: #beb9a9; --app-line: #444740; --focus: #ee9b69; --accent: #ee9b69; --veil: #111515; }
.pg { position: relative; isolation: isolate; aspect-ratio: 16 / 10; overflow: hidden; font-family: var(--app-sans); }
.art { position: absolute; inset: 0; background: center 60% / cover no-repeat; }
/* The theme's veil keeps chrome readable over the brightest artwork, at the app's 22%. */
.art::after { content: ""; position: absolute; inset: 0; background: var(--veil); opacity: .22; }
.dots { position: absolute; inset: 0; background: radial-gradient(var(--dots) 1px, transparent 1.3px) 0 0 / 22px 22px; pointer-events: none; }
.empty { position: absolute; inset: 0; display: grid; place-items: center; font: 500 12px/1.5 var(--mono); color: var(--ink); opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.empty span { padding: 8px 14px; border-radius: 8px; background: color-mix(in srgb, var(--slate) 85%, transparent); }
.pg.is-empty .empty { opacity: 1; }

/* The strip: traffic lights, the centred status cluster, the corner tools */
.strip { position: absolute; inset: 0 0 auto 0; z-index: 5; height: 26px; display: flex; align-items: center; padding: 0 10px 0 12px; color: var(--ink); }
.lights { display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.status { position: absolute; left: 50%; top: 0; height: 100%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.ws { display: flex; align-items: center; gap: 4px; color: var(--dim); font-size: 11px; }
.ws svg { width: 13px; height: 13px; }
.proj { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.gitchip { display: flex; align-items: center; gap: 5px; font: 500 11px var(--mono); color: var(--dim2); }
.gitchip .fork { width: 9px; height: 11px; color: var(--dim); }
.gitchip b { color: var(--ink); font-weight: 600; }
.gitchip .dirty { color: var(--red); display: inline-flex; align-items: center; gap: 3px; }
.gitchip .dirty::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tbtn { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: transparent; color: var(--dim); padding: 0; }
.tbtn svg { width: 14px; height: 14px; }
button.tbtn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 9%, transparent); }
.tbtn[aria-pressed="true"] { color: var(--focus); }
.khint { font-size: 11px; font-weight: 500; color: var(--dim); padding: 3px 5px; border-radius: 5px; background: transparent; }
.khint:hover, .play-clock:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 9%, transparent); }
.play-clock { margin-left: 12px; padding: 2px 5px; border-radius: 5px; background: transparent; color: var(--dim2); font-size: 11px; font-variant-numeric: tabular-nums; }
.play-countdown { color: var(--ink); font-size: 10px; font-variant-numeric: tabular-nums; }
.play-menu { position: absolute; z-index: 30; top: 33px; width: min(285px, calc(100% - 24px)); padding: 14px; border-radius: 12px; color: var(--slate-ink); background: color-mix(in srgb, var(--slate-deep) 97%, transparent); box-shadow: 0 12px 35px #0002; font-size: 12px; max-height: calc(100% - 45px); overflow: auto; }
.clock-menu { left: 12px; }
.command-menu { right: 12px; }
.play-menu-title { font-size: 12px; font-weight: 600; }
.play-menu button { color: inherit; border-radius: 6px; background: transparent; font: inherit; }
.command-menu > button { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; padding: 9px 5px; }
.command-menu > button svg { width: 14px; height: 14px; flex: none; }
.command-menu > button kbd, .command-menu > button > span:last-child { margin-left: auto; }
.command-menu > button:hover, .focus-choice button[aria-pressed="true"], .focus-presets button:hover { background: color-mix(in srgb, var(--slate-ink) 8%, transparent); }
.play-menu-head { display: flex; align-items: center; justify-content: space-between; }
.play-menu-head button { font-size: 20px; padding: 0 5px; }
.play-date { font-size: 11px; color: var(--slate-dim); margin: 3px 0 12px; }
.focus-choice { display: flex; gap: 5px; margin-bottom: 12px; }
.focus-choice button { flex: 1; padding: 6px; }
.focus-duration { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--slate-dim); }
.focus-duration input { width: 62px; padding: 5px; border: 1px solid var(--slate-line); border-radius: 5px; color: var(--slate-ink); background: var(--slate-deep); }
.focus-presets { display: flex; gap: 5px; margin-top: 8px; }
.focus-presets button { flex: 1; padding: 4px; font-size: 11px; }
.focus-readout { margin: 12px 0; font: 500 23px/1.3 var(--app-sans); font-variant-numeric: tabular-nums; }
.focus-actions { display: flex; gap: 5px; }
.focus-actions button { padding: 6px 8px; background: color-mix(in srgb, var(--slate-ink) 8%, transparent); }
.focus-actions button:disabled { opacity: .4; cursor: default; }
.play-menu-note { margin-top: 12px; color: var(--slate-dim); font-size: 10px; line-height: 1.5; }
.pg.flow .play-clock { margin-left: 7px; }
.pg.flow .status { gap: 5px; }
.pg.flow .gitchip { display: none; }
.pg.flow .play-countdown { max-width: 66px; overflow: hidden; white-space: nowrap; }
.pg.flow .play-menu { max-height: 405px; }

/* Cards */
/* Glass panes, as in the app: canvas.css --pane-filter and an 83% --pane-fade. */
.pg { --glass: 83%; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .pg { --glass: 100%; } }
@media (prefers-reduced-transparency: reduce) { .pg { --glass: 100%; } }
.tcard { position: absolute; z-index: 1; box-sizing: border-box; display: flex; flex-direction: column; background: color-mix(in srgb, var(--term-bg) var(--glass, 100%), transparent); -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15); border: 1px solid var(--term-line); border-radius: 12px; overflow: hidden; isolation: isolate; box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 14px 36px rgba(0, 0, 0, .16); transition: left .45s var(--app-ease), top .45s var(--app-ease), width .45s var(--app-ease), height .45s var(--app-ease), border-color .2s, box-shadow .2s, opacity .22s ease, transform .35s var(--app-ease), background .3s; }
.tcard.folding { z-index: 25; transition-duration: .42s; transition-timing-function: cubic-bezier(.3, 1.18, .36, 1); }
.tcard.focus { border-color: color-mix(in srgb, var(--focus) 55%, var(--app-line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--focus) 28%, transparent), 0 0 8px color-mix(in srgb, var(--focus) 12%, transparent), 0 14px 36px rgba(0, 0, 0, .16); }
.tcard.zoomed { z-index: 30; }
.tcard.entering { opacity: 0; transform: scale(.94); }
.tcard.leaving { opacity: 0; transform: scale(.96); }
.tcard.clipped { opacity: 0; pointer-events: none; }
/* Unified headers, the app default: the header shares the body ground with no divider. */
.thead { flex: none; height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; background: transparent; border-bottom: 1px solid transparent; font: 600 11.5px var(--app-sans); color: var(--term-head-ink); white-space: nowrap; user-select: none; }
.sdot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #6e6e73; opacity: .72; }
.sdot.slogo { box-sizing: border-box; width: 17px; height: 17px; display: grid; place-items: center; background: transparent; border: 1.5px solid #6e6e73; opacity: 1; }
.sdot.slogo svg { width: 10px; height: 10px; display: block; }
/* As in canvas.css: blue ring for a Squad member, a soft pulse while the agent works. */
.sdot.slogo.member { border-color: var(--blue); }
.tcard.busy .sdot { --pulse: 110, 110, 115; animation: softpulse 1.8s infinite; }
.tcard.busy .sdot.member { --pulse: 0, 113, 227; }
@keyframes softpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--pulse), .45); } 50% { box-shadow: 0 0 0 5px rgba(var(--pulse), 0); } }
.role { flex: none; font: 600 9px var(--app-sans); color: #c4a8ef; border: 1px solid #4a3d66; border-radius: 6px; padding: 1.5px 7px; letter-spacing: .6px; }
.manager-badge { flex: none; white-space: nowrap; font: 600 9px var(--app-sans); color: var(--sp-ink, var(--term-head-ink)); padding: 2px 5px; border-radius: 5px; background: color-mix(in srgb, var(--focus) 15%, transparent); }
.manager-badge[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .tcard.busy .sdot { animation: none; } }
.nm { flex: none; }
.pttl, .vmeta { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 400; color: #8b8e9c; }
.prog { flex: none; font: 500 9px var(--mono); letter-spacing: .6px; color: hsl(var(--prog-h, 225) 22% 62%); border: 1px solid hsl(var(--prog-h, 225) 20% 30%); border-radius: 6px; padding: 1.5px 7px; }
.tctl { margin-left: auto; flex: none; display: flex; align-items: center; gap: 2px; }
.ctl { flex: none; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 6px; background: transparent; color: #8b8fa0; }
button.ctl:hover { color: #eceef4; background: rgba(255, 255, 255, .08); }
.ci { width: 13px; height: 13px; display: block; }
.tnow { display: none; padding: 4px 12px 0; font: 11.5px var(--app-sans); color: #8b90a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbody { flex: 1; min-height: 0; overflow: hidden; padding: 10px 6px 10px 12px; background: transparent; color: var(--term-ink); font: 400 11px/1.65 var(--mono); }
.term .ok, .term .b.ok { color: #7fd48b; }
.term .dim { color: #8b91a0; }
.cursor { display: inline-block; width: 7px; height: 13px; vertical-align: -2px; background: #d6d8e0; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Folded: header and one quiet line, docked on the right */
.tcard.min .tbody, .tcard.min .bbar, .tcard.min .detach, .tcard.min .zm, .tcard.min .vmeta, .tcard.min .pttl { display: none; }
.tcard.min .tnow { display: block; }
.tcard.term.min.haslogo .tnow { padding-left: 39px; }
.tcard.term.min:not(.haslogo) .tnow { padding-left: 28px; }
.tcard.min .thead { border-bottom-color: rgba(255, 255, 255, .04); }
/* Narrower chips on smaller canvases: the name may truncate and the program tag goes first. */
.tcard.min .nm { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pg.dock-narrow .tcard.min .prog { display: none; }

/* Views: utility panes on the slate ground, a tinted square for a mark */
.tcard.view { background: color-mix(in srgb, var(--slate) var(--glass, 100%), transparent); border-color: var(--slate-line); }
.tcard.view .thead { background: transparent; color: var(--slate-ink); border-bottom-color: transparent; }
.tcard.view .vmeta { font: 400 11px var(--mono); color: var(--slate-dim); }
.tcard.view .ctl { color: var(--slate-dim); }
.tcard.view button.ctl:hover { color: var(--slate-ink); background: color-mix(in srgb, var(--slate-ink) 10%, transparent); }
.tcard.view .tbody { background: transparent; color: var(--slate-ink); padding: 10px 12px; }
.tcard.view .tnow { padding-left: 38px; font: 500 10.5px var(--mono); color: var(--slate-dim); }
.tcard.view.min .thead { gap: 6px; padding: 0 6px 0 10px; }
.tcard.view.min .tctl { opacity: .45; transition: opacity .16s ease; }
.tcard.view.min:hover .tctl, .tcard.view.min:focus-within .tctl { opacity: 1; }
.tcard.board { --view-accent: var(--green); }
.tcard.read { --view-accent: #4f7fd0; }
/* Tab groups: panes sharing one tile when there is no room to split */
.tcard.tile-tab-hidden { display: none !important; }
.tile-tabs { flex: none; display: flex; gap: 4px; padding: 3px 8px; overflow-x: auto; border-bottom: 1px solid var(--slate-line); }
.term .tile-tabs { border-bottom-color: var(--term-line); }
.tile-tabs button { flex: none; padding: 4px 8px; border-radius: 4px; background: transparent; color: var(--slate-ink); font: 11px var(--app-sans); }
.term .tile-tabs button { color: var(--term-head-ink); }
.tile-tabs button[aria-selected="true"] { background: color-mix(in srgb, var(--focus) 18%, transparent); }
/* As in the app, a tile compressed below 340px drops its icon and subtitle to keep its controls reachable. */
.tcard.tile-compact:not(.min):not(.zoomed) > .thead { gap: 4px; padding-inline: 7px; }
.tcard.tile-compact:not(.min):not(.zoomed) > .thead > :is(.sdot, .vicon, .pttl, .vmeta) { display: none; }
.tcard.tile-compact:not(.min):not(.zoomed) > .thead > .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tcard.tile-compact:not(.min):not(.zoomed) > .thead .tctl { gap: 1px; }
.tcard.tile-compact:not(.min):not(.zoomed) > .thead .ctl { width: 18px; }
/* Detached: out of the tiling, floating above it, moved by its header */
.tcard.tile-floating { z-index: 26; box-shadow: 0 12px 32px #0005; }
.tcard.tile-floating.focus { box-shadow: 0 0 0 1px color-mix(in srgb, var(--focus) 28%, transparent), 0 0 8px color-mix(in srgb, var(--focus) 12%, transparent), 0 12px 32px #0005; }
.tcard.tile-floating .thead { cursor: move; }
.tcard.tile-floating .ctl.detach, .tcard.view.tile-floating .ctl.detach { color: var(--focus); }
/* Header drags, as in the app: the travelling pane thins over a drop target, the target
   gets a dashed outline and a wash names the swap. Only opacity transitions while dragging. */
.pg:not(.flow) .tcard:not(.min, .zoomed, .ed) > .thead { touch-action: none; }
.pg:not(.flow) .tcard:not(.min, .zoomed, .ed, .tile-floating, .dragging) > .thead { cursor: grab; }
.tcard.dragging { z-index: 30; transition: opacity .18s ease; }
/* While the playground itself resizes (Expand), panes follow it frame by frame. */
.pg.tracking .tcard { transition: none !important; }
.tcard.dragging:not(.tile-floating) > .thead { cursor: grabbing; }
.tcard.dragging.dropping { opacity: .45; }
.tcard.swaptarget { outline: 2px dashed var(--focus); outline-offset: 3px; }
.splitghost { position: absolute; z-index: 8; pointer-events: none; border-radius: 12px; opacity: 0; background: color-mix(in srgb, var(--focus) 5%, transparent); transition: opacity .14s ease; }
.splitghost.show { opacity: 1; }
.splitghost .sgtag { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 2px 8px; border-radius: 6px; font: 600 10px var(--app-sans); letter-spacing: .05em; white-space: nowrap; color: color-mix(in srgb, var(--focus) 70%, var(--ink)); background: var(--slate); }
.vicon { flex: none; width: 18px; height: 18px; box-sizing: border-box; display: grid; place-items: center; color: var(--view-accent, var(--slate-dim)); background: color-mix(in srgb, currentColor 10%, transparent); border: 1px solid color-mix(in srgb, currentColor 38%, transparent); border-radius: 6px; }
.vicon svg { width: 12px; height: 12px; display: block; }

/* Editor: a fixed column at the left edge. The tree is slate; the code
   surface follows the terminals. It widens when a file opens. */
.tcard.ed .tbody { padding: 0; }
.edwrap { display: flex; height: 100%; min-height: 0; }
.edtree { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: transparent; container-type: inline-size; }
.edwrap.open .edtree { flex: none; width: 232px; border-right: 1px solid var(--slate-line); }
.edtbar { flex: none; display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--slate-line); }
.edfilter { flex: 1 1 72px; width: 72px; min-width: 0; box-sizing: border-box; padding: 5px 9px; border: 1px solid var(--slate-line); border-radius: 7px; background: color-mix(in srgb, var(--slate-deep) 60%, transparent); color: var(--slate-ink); font: 400 12px var(--app-sans); outline: none; }
.edfilter:focus { border-color: var(--focus); }
.edfilter::placeholder { color: var(--slate-dim); }
.edbtn { flex: none; width: 25px; box-sizing: border-box; display: grid; place-items: center; border: 1px solid var(--slate-line); border-radius: 7px; color: var(--slate-dim); font: 400 13px var(--app-sans); }
.edbtn svg { width: 13px; height: 13px; }
.edbtn.on { color: var(--slate-ink); border-color: color-mix(in srgb, var(--focus) 45%, var(--slate-line)); background: color-mix(in srgb, var(--focus) 12%, transparent); }
/* A narrow editor column keeps the filter usable by dropping the last two tree tools. */
@container (max-width: 230px) { .edtbar > .edbtn:nth-last-child(-n+2) { display: none; } }
.edrows { flex: 1; min-height: 0; overflow: auto; padding: 6px 6px 10px; }
.edrow { display: flex; align-items: center; gap: 6px; padding: 2.5px 7px 2.5px calc(7px + var(--depth, 0) * 14px); border-radius: 6px; cursor: pointer; color: var(--slate-dim); white-space: nowrap; user-select: none; }
.edrow:hover { background: color-mix(in srgb, var(--slate-ink) 6%, transparent); color: var(--slate-ink); }
.edrow.sel { background: color-mix(in srgb, var(--focus) 18%, transparent); color: var(--slate-ink); }
.edrow:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.edtw { flex: none; width: 12px; text-align: center; font: 400 9px var(--app-sans); color: var(--slate-dim); transition: transform .12s ease; }
.edtw.open { transform: rotate(90deg); }
.edchip { flex: none; width: 26px; height: 16px; display: grid; place-items: center; border-radius: 4px; background: color-mix(in srgb, var(--slate-dim) 14%, transparent); color: var(--slate-dim); font: 700 7.5px var(--mono); letter-spacing: .4px; }
.edchip.dir { background: transparent; }
.edchip.dir::before { content: ""; width: 7px; height: 7px; border-radius: 1.5px; background: var(--amber); }
.edchip.x-tsx, .edchip.x-ts { background: color-mix(in srgb, #3b82f6 16%, transparent); color: #3b7de8; }
.edchip.x-css { background: color-mix(in srgb, #0ea5b7 15%, transparent); color: #0e98a8; }
.edchip.x-md { background: color-mix(in srgb, #22a05a 15%, transparent); color: #1f9d55; }
.ednm { font: 400 12.5px var(--app-sans); overflow: hidden; text-overflow: ellipsis; }
.edrow.dir .ednm { font-weight: 550; color: var(--slate-ink); }
.edbadge { margin-left: auto; flex: none; font: 600 9.5px var(--mono); }
.edrow.git-modified .ednm, .edrow.git-modified .edbadge { color: var(--git-mod); }
.edrow.git-added .ednm, .edrow.git-added .edbadge { color: var(--git-add); }
.edmain { display: none; flex: 1; min-width: 0; flex-direction: column; background: var(--term-bg); }
.edwrap.open .edmain { display: flex; }
.edtop { flex: none; height: 30px; display: flex; align-items: flex-end; padding: 0 6px; background: color-mix(in srgb, var(--slate-head) 60%, transparent); border-bottom: 1px solid var(--slate-line); }
.edtabs { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 2px; overflow: hidden; }
.edtab { display: inline-flex; align-items: center; gap: 6px; height: 25px; padding: 0 5px 0 10px; border-radius: 7px 7px 0 0; color: var(--slate-dim); font: 500 11.5px var(--app-sans); white-space: nowrap; cursor: pointer; }
.edtab[aria-selected="true"] { background: var(--term-bg); color: #e6e8ee; }
.edtabx { width: 17px; height: 17px; padding: 0; border-radius: 4px; background: transparent; color: inherit; font-size: 9px; opacity: .65; }
.edtabx:hover { opacity: 1; background: rgba(127, 127, 127, .22); }
.edmount { flex: 1; min-height: 0; overflow: hidden; padding: 10px 12px; color: var(--term-ink); font: 400 11px/1.65 var(--mono); }
.edmount div { white-space: pre; }
.edmount .ln { display: inline-block; width: 2ch; margin-right: 1.6ch; text-align: right; color: #5d6170; }
.edmount .k { color: #d2a8ff; }
.edmount .s { color: #7ee2b8; }
.edmount .f { color: #79c0ff; }
.edmount .tg { color: #ffa657; }
.edmount .c { color: #7a7f8e; }
.edsbar { flex: none; display: flex; justify-content: space-between; gap: 10px; padding: 4px 10px; border-top: 1px solid var(--slate-line); background: transparent; color: var(--slate-dim); font: 500 10.5px var(--app-sans); white-space: nowrap; }
.edr { display: flex; gap: 10px; }

/* Agent screens */
.cc .you, .cx .you { color: #9a9dab; }
.cc .b { color: #eceef3; }
.cc .spin { color: #d97757; }
.cc .sub { color: #8b8e9c; padding-left: 2ch; }
.cc .ccin { margin-top: 8px; padding: 3px 8px; border: 1px solid #3a3d48; border-radius: 6px; color: #eceef3; }
.cx .cxbox { display: flex; flex-direction: column; margin-bottom: 10px; padding: 6px 10px; border: 1px solid #3a3d48; border-radius: 4px; }
.cx .cxin { margin-top: 10px; padding: 5px 8px; border-radius: 3px; background: #23252d; }
.oc .you { margin-bottom: 4px; padding-left: 8px; border-left: 2px solid #5fb3d4; color: #eceef3; }
.oc .ocin { margin-top: 10px; padding: 4px 8px; border-left: 2px solid #fab283; background: #23252d; }
.oc .ocbar { display: flex; gap: 8px; margin-top: 6px; font-size: 10px; color: #c7cad4; white-space: nowrap; }
.oc .ocbar b { font-weight: 500; color: #fab283; }
.pt .you { margin-bottom: 4px; padding: 2px 8px; background: #2a2d36; color: #eceef3; }
.pt .ptin { margin-top: 10px; padding: 3px 0; border-block: 1px solid #3a3d48; }
.pt .ptbar { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 10px; color: #8b91a0; white-space: nowrap; overflow: hidden; }

/* Utility pane contents */
.code div { white-space: pre; }
.code .ln { display: inline-block; width: 2ch; margin-right: 1.4ch; text-align: right; color: var(--slate-dim); opacity: .6; }
.k { color: var(--k); }
.s { color: var(--s); }
.f { color: var(--f); }
.tg { color: var(--t); }
.shop { height: 100%; display: flex; flex-direction: column; background: #f4f4ec; color: #2f4535; font-family: var(--app-sans); padding: 12px 14px 8px; }
.shop-nav { display: flex; justify-content: space-between; font-size: 10px; }
.shop-nav b { font-size: 11px; }
.shop-nav span { color: #6c7a62; }
.shop-hero { text-align: center; margin-top: 12px; }
.shop-hero small { font-size: 7px; letter-spacing: .18em; color: #6d7d5c; }
.shop-hero h4 { margin: 4px 0 0; font: 400 clamp(16px, 2.2vw, 28px)/1.1 Georgia, serif; letter-spacing: -.02em; }
.shop-hero p { margin: 4px 0 0; font-size: 9px; line-height: 1.5; color: #7b8671; }
.shop-row { margin-top: auto; display: flex; justify-content: space-around; align-items: end; }
.shop-row svg { width: 22%; max-width: 58px; height: auto; }
.tcard.web .tbody { padding: 0; }
.db table { width: 100%; border-collapse: collapse; font: 400 10.5px/1.5 var(--mono); font-variant-numeric: tabular-nums; }
.db th { text-align: left; font-weight: 500; color: var(--slate-dim); padding: 3px 6px 3px 0; border-bottom: 1px solid var(--slate-line); }
.db td { padding: 3px 6px 3px 0; border-bottom: 1px solid var(--slate-line); }
.db .n { text-align: right; }
.db .q { color: var(--slate-dim); margin: 0 0 6px; line-height: 1.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.git .row { display: flex; gap: 8px; white-space: nowrap; }
.git .row span:first-child { width: 12px; color: var(--slate-dim); }
.git .row b { font-weight: 400; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.git .plus { color: var(--add); }
.git .minus { color: var(--del); }
.git .sum { color: var(--slate-dim); margin-bottom: 6px; }
.md h5 { margin: 0 0 6px; font: 600 14px/1.3 var(--app-sans); }
.md div { white-space: nowrap; }
.md .box { display: inline-block; width: 10px; height: 10px; margin-right: 7px; vertical-align: -1px; border: 1px solid var(--slate-dim); border-radius: 3px; }
.md .done .box { background: #4f7fd0; border-color: #4f7fd0; }
.md .done { color: var(--slate-dim); text-decoration: line-through; }
.eq { display: flex; align-items: end; gap: 3px; height: 30px; margin: 8px 0; }
.eq i { flex: 1; max-width: 6px; height: 30%; border-radius: 2px; background: #5eead4; animation: eq 1.5s ease-in-out infinite; }
.eq i:nth-child(2n) { animation-duration: 1.2s; }
.eq i:nth-child(3n) { animation-duration: 1.8s; animation-delay: -.5s; }
@keyframes eq { 0%, 100% { height: 25%; } 30% { height: 92%; } 60% { height: 46%; } }

/* Draw: the send bar over white paper, like the board */
.bbar { flex: none; display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: color-mix(in srgb, var(--slate-head) 60%, transparent); border-bottom: 1px solid var(--slate-line); font: 500 11px var(--app-sans); color: var(--slate-dim); white-space: nowrap; }
.blist, .bto { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; color: var(--slate-ink); font-weight: 600; }
.blist .bcount { color: var(--slate-dim); font-weight: 500; }
.bcaret { width: 0; height: 0; margin-left: 1px; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 4px solid var(--slate-dim); }
.bstat { flex: 1; }
.bsave { padding: 3px 10px; border: 1px solid var(--slate-line); border-radius: 6px; background: var(--slate-deep); color: var(--slate-ink); opacity: .45; }
.bsend { padding: 4px 12px; border-radius: 6px; background: var(--blue); color: #fff; font: 600 11px var(--app-sans); }
.bsend:hover { filter: brightness(1.1); }
.tcard.board .tbody { position: relative; padding: 0; background: #fff; }
.xtools { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 1px; padding: 4px; border-radius: 9px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .04); }
.xtools i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: #1b1b1f; }
.xtools i.on { background: #e0dfff; color: #1e1a4d; }
.xtools svg { width: 14px; height: 14px; }
.sketch { position: absolute; left: 50%; top: 58%; width: min(92%, 380px); height: auto; transform: translate(-50%, -50%); }

/* The dock's two marks: the hide control, and the rail it leaves behind */
.dockctl { position: absolute; z-index: 6; display: flex; }
.dockctl button { width: 22px; height: 22px; padding: 0; border-radius: 6px; background: transparent; color: var(--dim); font: 500 12px var(--app-sans); }
.dockctl button:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 9%, transparent); }
.dockrail { position: absolute; z-index: 6; width: 30px; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 7px 0 10px; border-radius: 13px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--dim); }
.dockrail:hover { background: color-mix(in srgb, var(--ink) 11%, transparent); color: var(--ink); }
.railglyph { font: 500 12px/14px var(--app-sans); }
.raildots { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.raildot { width: 16px; height: 16px; display: grid; place-items: center; }
.raildot svg { width: 13px; height: 13px; display: block; }
.raildot.plain::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 32%, transparent); }

/* Narrow screens: one column, folded chips below the open panes */
.pg.flow { aspect-ratio: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 10px 12px; }
.pg.flow .strip { position: relative; flex: none; margin: 0 -10px; }
.pg.flow .ws, .pg.flow .lights { display: none; }
.pg.flow .tcard { position: relative; left: auto !important; top: auto !important; width: auto !important; height: 172px !important; }
.pg.flow .tcard.min { height: 56px !important; }
.pg.flow .zm, .pg.flow .detach { display: none; }
.pg.flow .ed .edwrap.open .edtree { display: none; }
.pg.flow .empty { position: static; min-height: 120px; }
.pg.flow:not(.is-empty) .empty { display: none; }
.pg.flow .bsave, .pg.flow .blabel { display: none; }

.under { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; margin-top: 16px; }
.say { font-size: 14px; color: var(--ink); min-height: 1.8em; }
.looks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.mode { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 30px; background: var(--paper); }
.mode button { background: transparent; font-size: 11px; font-weight: 500; color: var(--muted); padding: 5px 11px; border-radius: 30px; }
.mode button[aria-pressed="true"] { background: var(--chip-on); color: var(--accent); }
.bgs { display: flex; align-items: center; gap: 7px; }
.bgs-label { font-size: 11px; color: var(--muted); min-width: 10ch; text-align: right; }
.sw { position: relative; width: 44px; height: 28px; padding: 0; border-radius: 7px; border: 1px solid var(--line); overflow: hidden; background: var(--paper); }
.sw span { position: absolute; inset: 0; background: center / cover no-repeat; }
.sw .d { clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.sw[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.play-note { margin-top: 14px; font-size: 10px; line-height: 1.6; color: var(--muted); }
.also { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 48px; margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--line); }
/* A scaled port of canvas/session-pane.css and session-context.css. A Session pane is a
   terminal card (.term, for its process controls) on the theme's --solid surface. */
.sr-only, .session-compose .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.tcard.session-card {
  --sp-bg: var(--solid);
  --sp-ink: var(--ink);
  --sp-line: color-mix(in srgb, var(--sp-ink) 11%, transparent);
  --sp-muted: color-mix(in srgb, var(--sp-ink) 64%, var(--sp-bg));
  --sp-raised: color-mix(in srgb, var(--sp-ink) 4%, var(--sp-bg));
  --sp-paper: color-mix(in srgb, var(--sp-bg) 30%, white);
  --sp-shadow: #0000000a;
  --sp-rec: #e5484d;
  --sp-voice: #0a7cff;
  --sp-voice-ink: #ffffff;
  --sp-gutter: clamp(16px, 5cqw, 40px);
  background: color-mix(in srgb, var(--sp-bg) var(--glass, 100%), transparent);
  border-color: var(--app-line);
  color: var(--sp-ink);
}
.vw[data-mode="dark"] .tcard.session-card { --sp-paper: color-mix(in srgb, var(--sp-ink) 7%, var(--sp-bg)); --sp-shadow: #00000030; --sp-rec: #ff6369; --sp-voice: #6cb4ff; --sp-voice-ink: #0b1220; }
.tcard.session-card .thead, .tcard.session-card .nm { color: var(--sp-ink); }
.tcard.session-card .sdot.slogo:not([style]) { color: var(--sp-ink); }
.tcard.session-card :is(.pttl, .vmeta) { color: var(--sp-muted); font: 400 11.5px var(--app-sans); }
.tcard.session-card .ctl { color: var(--sp-muted); }
.tcard.session-card button.ctl:hover { color: var(--sp-ink); background: color-mix(in srgb, var(--sp-ink) 10%, transparent); }
.tcard.session-card .tnow { color: var(--sp-muted); }
.tcard.session-card .session-body { display: flex; flex-direction: column; padding: 0; color: var(--sp-ink); font: 12px/1.7 var(--app-sans); container-type: size; }
.session-card :where(button) { font: inherit; color: inherit; }
/* sp-meta: History on the left, the plan on the right while the agent has one */
.session-toolbar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; padding: 7px 18px 0; color: var(--sp-muted); font-size: 10px; }
.session-toolbar button { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 3px 6px; border-radius: 6px; background: transparent; color: var(--sp-muted); font-size: 10px; white-space: nowrap; }
.session-toolbar button:first-child { margin-left: -6px; }
.session-toolbar button:last-child { margin-right: -6px; }
.session-toolbar button > svg { width: 12px; height: 12px; flex: none; }
.session-toolbar button:hover, .session-toolbar button[aria-expanded="true"] { color: var(--sp-ink); background: color-mix(in srgb, var(--sp-ink) 5%, transparent); }
.plan-ring { display: inline-flex; width: 11px; height: 11px; flex: none; }
.plan-ring svg { width: 100%; height: 100%; fill: none; stroke-width: 2.6; }
.plan-ring .t { stroke: color-mix(in srgb, currentColor 30%, transparent); }
.plan-ring .f { stroke: var(--accent); transform: rotate(-90deg); transform-origin: 10px 10px; stroke-linecap: round; }
.plan-fraction { font-variant-numeric: tabular-nums; }
.session-workspace { flex: 1; display: flex; min-height: 0; }
.session-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; container-type: inline-size; }
.session-history { flex: 0 0 160px; padding: 12px 10px 10px 16px; border-right: 1px solid var(--sp-line); overflow: auto; font-size: 10px; animation: rail-in 200ms ease-out both; }
@keyframes rail-in { from { opacity: 0; transform: translateX(-6px); } }
.session-history-tabs { display: flex; gap: 11px; }
.session-history button { color: var(--sp-muted); background: transparent; border-radius: 4px; }
.session-history-tabs button { padding: 3px 0; border-radius: 0; border-bottom: 1px solid transparent; font-size: 9.5px; }
.session-history-tabs button[aria-pressed="true"] { color: var(--sp-ink); border-bottom-color: var(--sp-muted); }
.session-history-label { margin: 12px 5px 5px; color: var(--sp-muted); font-size: 9px; }
.session-history-row { position: relative; padding: 6px 5px; border-radius: 5px; }
.session-history-row:first-of-type::before { content: ""; position: absolute; left: 0; top: 9px; width: 2px; height: 15px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 55%, var(--sp-muted)); opacity: .7; }
.session-history-row span { display: block; color: var(--sp-ink); }
.session-history-row small { display: block; color: var(--sp-muted); font-size: 9px; }
.session-history-row button { margin-top: 4px; padding: 2px 5px; color: var(--focus); }
.session-prompt-recall { display: block; width: 100%; padding: 6px 5px; text-align: left; }
.session-history button:hover { color: var(--sp-ink); background: color-mix(in srgb, var(--sp-ink) 4%, transparent); }
/* The plan panel mirrors History on the right: progress, then each step's state. */
.session-plan { flex: 0 0 188px; min-height: 0; overflow: auto; padding: 12px 14px 10px 10px; border-left: 1px solid var(--sp-line); font-size: 10px; line-height: 1.5; animation: plan-in 200ms ease-out both; }
@keyframes plan-in { from { opacity: 0; transform: translateX(6px); } }
.plan-head { display: flex; align-items: center; gap: 6px; margin: 0 0 7px 4px; }
.plan-title { font-weight: 600; color: var(--sp-ink); }
.plan-count { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sp-muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.plan-close { display: grid; place-items: center; width: 20px; height: 20px; margin: -3px -4px -3px auto; padding: 0; border-radius: 5px; background: transparent; color: var(--sp-muted); }
.plan-close:hover { color: var(--sp-ink); }
.plan-close svg { width: 11px; height: 11px; }
.plan-bar { height: 2px; margin: 0 4px 8px; border-radius: 2px; background: var(--sp-line); overflow: hidden; }
.plan-bar i { display: block; height: 100%; border-radius: inherit; background: color-mix(in srgb, var(--accent) 75%, var(--sp-muted)); }
.plan-list { margin: 0; padding: 0; list-style: none; }
.plan-entry { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 7px; padding: 5px; margin-bottom: 1px; border-radius: 5px; color: color-mix(in srgb, var(--sp-ink) 82%, var(--sp-bg)); }
.plan-entry[data-status="completed"] { color: var(--sp-muted); }
.plan-entry[data-status="in_progress"] { color: var(--sp-ink); font-weight: 600; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.plan-mark { box-sizing: border-box; display: grid; place-items: center; width: 12px; height: 12px; margin-top: 2px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--sp-ink) 32%, transparent); }
.plan-entry[data-status="completed"] .plan-mark { border: 0; background: color-mix(in srgb, var(--accent) 18%, transparent); color: color-mix(in srgb, var(--accent) 80%, var(--sp-ink)); }
.plan-mark svg { width: 8px; height: 8px; stroke-width: 3; }
.session-card .session-icon svg { stroke-width: 1.7; }
.plan-entry[data-status="in_progress"] .plan-mark { border-color: color-mix(in srgb, var(--accent) 30%, transparent); border-top-color: var(--accent); animation: session-turn 2.4s linear infinite; }
.plan-entry[data-status="in_progress"] .plan-mark::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
/* Narrow, the plan drops above the conversation (session-pane.css does the same). */
@container (max-width: 600px) {
  .session-workspace:has(> .session-plan:not([hidden])) { flex-direction: column; }
  .session-workspace > .session-plan { order: -1; flex: 0 0 auto; max-height: 38%; padding: 10px 18px 6px; border-left: 0; border-bottom: 1px solid var(--sp-line); animation-name: plan-drop; }
  .session-workspace > .session-history { flex-basis: 130px; }
}
@keyframes plan-drop { from { opacity: 0; transform: translateY(-4px); } }
.session-card.tile-compact .session-workspace, .pg.flow .session-workspace { flex-direction: column; }
.session-card.tile-compact :is(.session-history, .session-plan), .pg.flow :is(.session-history, .session-plan) { flex: 0 0 auto; max-height: 130px; border: 0; border-bottom: 1px solid var(--sp-line); }
.session-card.tile-compact .session-plan, .pg.flow .session-plan { order: -1; }
/* Transcript */
.session-thread { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 20px var(--sp-gutter) 8px; scrollbar-width: thin; scrollbar-color: var(--sp-line) transparent; }
.session-user { width: fit-content; max-width: 85%; margin: 4px 0 12px auto; padding: 8px 14px; border-radius: 16px; background: var(--sp-raised); }
.session-reply p { margin: 0 0 12px; }
.session-tool { color: var(--sp-muted); font-size: 11px; }
.session-tool summary, .session-step-row { display: flex; align-items: center; gap: 7px; min-height: 24px; padding: 3px 5px; border-radius: 5px; list-style: none; }
.session-tool summary { cursor: pointer; }
.session-tool summary::-webkit-details-marker { display: none; }
.session-tool summary:hover { background: var(--sp-raised); color: var(--sp-ink); }
.session-tool summary svg, .session-step-row svg { width: 12px; height: 12px; flex: none; }
.session-step { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.session-object { color: var(--sp-ink); font: 10.5px var(--mono); }
.session-meta { flex: none; margin-left: auto; font-size: 9.5px; font-variant-numeric: tabular-nums; }
.session-meta.ok { color: var(--n-done); }
.session-chevron { transform: rotate(-90deg); transition: transform 120ms; }
.session-tool[open] .session-chevron { transform: none; }
.session-tool pre { margin: 3px 5px 8px 24px; padding: 8px 10px; border: 1px solid var(--sp-line); border-radius: 8px; background: var(--sp-raised); color: var(--sp-ink); white-space: pre-wrap; overflow-wrap: anywhere; font: 10px/1.6 var(--mono); }
.session-code { position: relative; padding-top: 22px; }
.session-code > button { position: absolute; right: 8px; top: 0; padding: 2px 5px; color: var(--sp-muted); background: transparent; border-radius: 4px; font: 9px var(--app-sans); }
.session-file-note { margin: 6px 5px; color: var(--sp-muted); font-size: 10px; }
.session-file-link { padding: 0; color: var(--focus); font: 10px var(--mono); background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.session-activity { display: flex; align-items: center; gap: 9px; color: var(--sp-muted); margin: 12px 0 20px; font-size: 11.5px; }
.session-activity svg { width: 16px; height: 16px; flex: none; color: var(--accent); animation: session-turn 9s linear infinite; }
@keyframes session-turn { to { transform: rotate(360deg); } }
/* A new conversation: the harness, a greeting for the time of day, one quiet line. */
.session-empty { min-height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; max-width: 330px; margin: auto; padding: 12px 0 36px; animation: welcome-in 560ms cubic-bezier(.2, .7, .2, 1) both; }
@keyframes welcome-in { from { opacity: 0; transform: translateY(9px); } }
.session-identity { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 16px; font-weight: 500; letter-spacing: -.3px; }
.session-emblem { display: inline-flex; width: 24px; height: 24px; }
.session-emblem svg { width: 100%; height: 100%; }
.session-empty h3 { margin: 0 0 10px; font-size: clamp(18px, 3.5cqw, 26px); font-weight: 500; line-height: 1.25; letter-spacing: -.8px; }
.session-empty p { max-width: 260px; margin: 0; color: var(--sp-muted); font-size: 11.5px; line-height: 1.8; }
@container (max-height: 300px) { .session-empty p { display: none; } .session-identity { margin-bottom: 8px; } }
/* Composer */
.session-compose { flex: none; margin: 10px var(--sp-gutter) 0; padding: 13px 11px 8px; background: var(--sp-paper); border: 1px solid color-mix(in srgb, var(--sp-ink) 15%, transparent); border-radius: 19px; box-shadow: 0 4px 19px var(--sp-shadow), 0 1px 2px var(--sp-shadow); transition: border-color 140ms, box-shadow 140ms; }
.session-compose:focus-within { border-color: color-mix(in srgb, var(--sp-ink) 27%, transparent); box-shadow: 0 5px 21px var(--sp-shadow); }
.session-compose textarea { display: block; width: 100%; min-height: 36px; padding: 0 5px; resize: none; border: 0; outline: none; background: transparent; color: var(--sp-ink); font: inherit; }
.session-compose textarea::placeholder { color: var(--sp-muted); }
/* Illustrated Session panes show the composer without one. */
.session-placeholder { display: block; min-height: 36px; padding: 0 5px; color: var(--sp-muted); }
.session-compose-bar { display: flex; align-items: center; gap: 5px; min-width: 0; margin-top: 10px; }
.session-icon { display: grid; place-items: center; width: 27px; height: 27px; flex: none; padding: 0; border-radius: 50%; background: transparent; color: var(--sp-muted); }
.session-icon svg { width: 16px; height: 16px; }
button.session-icon:hover { color: var(--sp-ink); background: color-mix(in srgb, var(--sp-ink) 10%, var(--sp-paper)); }
.session-model { display: inline-flex; align-items: center; gap: 5px; min-width: 0; margin-left: auto; padding: 0 5px; overflow: hidden; font-size: 10.5px; white-space: nowrap; }
.session-model-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.session-effort { color: var(--sp-muted); }
.session-model svg { width: 10px; height: 10px; flex: none; }
.session-mic-picker { display: grid; place-items: center; flex: none; width: 15px; margin-right: -5px; color: var(--sp-muted); }
.session-mic-picker svg { width: 10px; height: 10px; }
.session-send { display: grid; place-items: center; flex: none; width: 27px; height: 27px; padding: 0; border-radius: 50%; background: var(--sp-ink); color: var(--sp-paper); }
.session-send svg { width: 16px; height: 16px; }
.session-send.is-idle { opacity: .2; }
.session-divider { flex: none; width: 1px; height: 16px; margin: 0 2px; background: var(--sp-line); }
.session-divider[hidden], .session-compose-bar [hidden] { display: none; }
/* Dictation: a live dot, the timer and a waveform between + and the model; ✕ and ✓ take the mic's place. */
.session-voice { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 7px; height: 27px; padding: 0 6px 0 3px; color: var(--sp-muted); font-size: 10px; }
.voice-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--sp-rec); animation: rec-pulse 1.6s ease-out infinite; }
@keyframes rec-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sp-rec) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }
.voice-time { flex: none; min-width: 26px; color: var(--sp-ink); font: 500 10px/1 var(--mono); font-variant-numeric: tabular-nums; }
.voice-text:empty { display: none; }
.session-voice[data-state="transcribing"] .voice-text { background: linear-gradient(90deg, var(--sp-muted) 0%, var(--sp-ink) 45%, var(--sp-muted) 90%) 0 0 / 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: voice-text 1.8s linear infinite; }
@keyframes voice-text { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.session-voice[data-state="transcribing"] :is(.voice-dot, .voice-wave) { display: none; }
.voice-wave { flex: 1 1 auto; min-width: 20px; height: 21px; display: flex; align-items: center; justify-content: flex-end; gap: 2px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%); mask-image: linear-gradient(90deg, transparent 0, #000 14%); }
.voice-wave i { flex: none; width: 2.5px; height: 100%; border-radius: 2px; background: var(--sp-voice); transform: scaleY(.08); }
.session-voice-cancel { box-shadow: inset 0 0 0 1px var(--sp-line); }
.session-voice-done, button.session-voice-done:hover { background: var(--sp-voice); color: var(--sp-voice-ink); }
.session-voice-done:hover { filter: brightness(1.08); }
.session-hint { flex: none; margin: 7px 16px 12px; color: var(--sp-muted); font-size: 9px; line-height: 1.5; text-align: center; opacity: .8; }
/* The context meter replaces the hint in the composer's footer, as in the app. */
.session-context { position: relative; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; margin: 4px calc(var(--sp-gutter) + 5px) 9px; color: var(--sp-muted); font-variant-numeric: tabular-nums; --context: #52785a; }
.vw[data-mode="dark"] .session-context { --context: #a4c597; }
.session-context > button { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 2px 3px; margin-left: -3px; border-radius: 6px; background: transparent; color: var(--sp-muted); font-size: 9px; white-space: nowrap; }
.session-context > button:hover { color: var(--sp-ink); }
.session-context svg { width: 13px; height: 13px; flex: none; overflow: visible; fill: none; stroke-width: 1.8; }
.session-context svg circle:first-child { stroke: color-mix(in srgb, var(--sp-ink) 14%, var(--sp-bg)); }
.session-context .context-progress { stroke: var(--context); transform: rotate(-90deg); transform-origin: 10px 10px; stroke-linecap: round; }
.context-count { font-size: 9px; white-space: nowrap; }
.session-context-static { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; white-space: nowrap; }
@container (max-width: 400px) { .session-compose-bar :is(.session-effort, .session-mic-picker) { display: none; } }
@container (max-width: 300px) { .context-count { display: none; } .session-compose-bar:has(> .session-voice:not([hidden])) .session-model { display: none; } }
.session-history-mark { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; }
.session-history-mark svg { width: 12px; height: 12px; }
.session-context-detail { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 8; width: min(240px, 100%); padding: 12px 13px; border: 1px solid var(--sp-line); border-radius: 12px; color: var(--sp-ink); background: var(--sp-paper); box-shadow: 0 8px 25px var(--sp-shadow); font-size: 10px; }
.session-context-detail strong { display: block; font-weight: 500; }
.session-context-detail b { display: block; margin-top: 8px; font-size: 20px; font-weight: 500; letter-spacing: -.5px; line-height: 1.2; }
.session-context-detail p { margin-top: 5px; color: var(--sp-muted); font-size: 9.5px; line-height: 1.5; }
.session-context-detail p:last-child { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--sp-line); }
.session-card.tile-compact { --sp-gutter: 12px; }
.session-waiting { display: flex; flex-direction: column; align-items: flex-end; max-width: 85%; margin: 4px 0 12px auto; }
.session-caption { display: flex; align-items: center; gap: 4px; margin: 0 6px 5px; color: var(--sp-muted); font-size: 9.5px; white-space: nowrap; }
.session-caption svg { width: 11px; height: 11px; flex: none; }
.session-caption strong { font-weight: 600; letter-spacing: .01em; }
.session-caption span::before { content: "·"; margin-right: 4px; }
.session-bubble { max-width: 100%; padding: 8px 14px; border: 1px dashed color-mix(in srgb, var(--sp-ink) 24%, transparent); border-radius: 16px; color: color-mix(in srgb, var(--sp-ink) 80%, var(--sp-bg)); white-space: pre-wrap; overflow-wrap: anywhere; }
.session-waiting[data-kind="steer"] .session-caption { color: color-mix(in srgb, var(--accent) 80%, var(--sp-ink)); }
.session-waiting[data-kind="steer"] .session-caption svg { animation: session-wait 2.4s ease-in-out infinite; }
@keyframes session-wait { 50% { opacity: .35; } }
.session-waiting[data-kind="steer"] .session-bubble { border-color: color-mix(in srgb, var(--accent) 50%, var(--sp-line)); }
.session-waiting button { margin-top: 3px; padding: 2px 6px; border-radius: 6px; background: transparent; color: var(--sp-muted); font-size: 9.5px; }
.session-card :is(button, summary, .session-thread):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.session-card.tile-compact :is(.session-effort, .session-icon:not(.session-voice-cancel, .session-voice-done), .session-mic-picker) { display: none; }
.tcard.session-card.min .session-body { display: none; }
.pg.flow .tcard.session-card:not(.min) { height: 490px !important; }
@media (prefers-reduced-motion: reduce) { .session-card :is(.session-history, .session-plan, .session-empty, .voice-dot, .plan-mark) { animation: none !important; } }

/* Retro, the app's default style (canvas/retro.css): monospace everywhere, small radii,
   square logo tiles and bracketed program tags. Artwork owns the backdrop, so no texture. */
.vw[data-skin="retro"] { --app-sans: var(--mono); }
.vw[data-skin="retro"] .dots { display: none; }
.vw[data-skin="retro"] .tcard { border-radius: 6px; }
.vw[data-skin="retro"] :is(.sdot:not(.vicon), .raildot.plain::before) { border-radius: 1px; }
.vw[data-skin="retro"] :is(.role, .manager-badge, .ctl, .tbtn, .khint, .play-clock) { border-radius: 4px; }
.vw[data-skin="retro"] .tcard .prog { border: 0; padding-inline: 0; color: var(--term-head-ink); opacity: .7; letter-spacing: 0; }
.vw[data-skin="retro"] .tcard .prog::before { content: "["; }
.vw[data-skin="retro"] .tcard .prog::after { content: "]"; }
.vw[data-skin="retro"] .tcard.session-card .session-body { font-size: 11px; }
.vw[data-skin="retro"] .session-card :is(.session-compose, .session-user, .session-bubble, .session-context-detail) { border-radius: 8px; }
.vw[data-skin="retro"] .session-card .session-compose { box-shadow: none; }
.vw[data-skin="retro"] .session-card :is(button, .session-icon, .session-send) { border-radius: 4px; }
.vw[data-skin="retro"] .session-empty h3 { letter-spacing: -.4px; }
.vw[data-skin="retro"] .strip { font-size: 11px; }
.vw[data-skin="retro"] .proj { font-size: 11.5px; }

@media (max-width: 1000px) { .also { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.also-link { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.also-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.also h3 { font-size: 13px; font-weight: 500; }
.also p { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.7; }
.also kbd { font: 500 11px/1 var(--sans); padding: 2px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--paper); color: var(--ink); }

/* Familiar tools */
.inside-section { padding: 70px 40px 85px; }
.compat-row { display: grid; grid-template-columns: 220px 1fr; gap: 35px; padding: 29px 0; border-bottom: 1px solid var(--line); }
.compat-row:last-child { border-bottom: 0; padding-bottom: 0; }
.compat-row h3 { font-size: 13px; font-weight: 500; }
.compat-row > div p { font-size: 11px; color: var(--muted); margin-top: 9px; line-height: 1.7; }
.simple-compat { display: flex; flex-wrap: wrap; align-content: start; gap: 24px 27px; list-style: none; padding: 0; margin: 0; }
.simple-compat li { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1.5; }
.simple-compat svg { flex-shrink: 0; width: 17px; height: 17px; color: var(--muted); }
.compat-glyph { fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.simple-compat a { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.simple-compat a:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* Beta access: a short signup beside the invitation. */
.beta-section { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 64px; padding: 70px 40px 80px; }
.beta-section .detail-heading { max-width: 480px; margin-bottom: 18px; }
.beta-section .beta-label { margin: 0 0 16px; color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.beta-note { max-width: 440px; font-size: 13px; color: var(--muted); }
.beta-platform { margin-top: 18px; font-size: 11px; color: var(--accent); }
.beta-signup { min-width: 0; padding-top: 35px; }
.beta-form { position: relative; margin: 0; }
.beta-form label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 500; }
.beta-form input[type=email] { display: block; width: 100%; min-height: 52px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; }
.beta-form input::placeholder { color: var(--muted); opacity: .8; }
.beta-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.beta-form input[aria-invalid="true"] { border-color: #a43f36; }
.beta-form .cta { width: 100%; margin-top: 12px; }
.beta-form .cta:disabled { transform: none; box-shadow: none; }
.beta-privacy { margin-top: 16px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.beta-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.beta-status { margin-top: 16px; padding: 12px 14px; border-radius: 8px; background: var(--tint); font-size: 12px; line-height: 1.7; }
.beta-status[data-state="error"] { color: #903f36; background: #fbefed; }
.beta-email { margin-top: 24px; font-size: 12px; color: var(--muted); }
.beta-email a { color: var(--accent); white-space: nowrap; }
.beta-success { padding: 24px; background: var(--tint); border: 1px solid var(--tint-line); border-radius: 12px; }
.beta-check { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 14px; border-radius: 50%; background: var(--accent); color: white; }
.beta-success h3 { font-size: 24px; font-weight: 500; letter-spacing: -.035em; }
.beta-success h3:focus { outline: none; }
.beta-success p { margin-top: 12px; font-size: 13px; color: var(--muted); }
.beta-edit { margin-top: 20px; padding: 0; background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; font: inherit; font-size: 12px; }
@media (max-width: 850px) {
  .beta-section { grid-template-columns: 1fr; gap: 28px; }
  .beta-signup { width: 100%; max-width: 480px; padding-top: 0; }
}

.faq-section { padding: 70px 40px 80px; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; cursor: pointer; font-size: 16px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); transition: color .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary:focus-visible { outline-offset: 4px; }
.pm { position: relative; flex: none; width: 13px; height: 13px; color: var(--muted); }
.pm::before, .pm::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; border-radius: 1px; background: currentColor; transition: transform .3s var(--ease); }
.pm::after { transform: rotate(90deg); }
.faq details[open] .pm::after { transform: rotate(0deg); }
.faq summary:hover .pm, .faq details[open] .pm { color: var(--accent); }
.faq details p { margin: -4px 0 26px; font-size: 14px; line-height: 1.8; color: var(--muted); animation: reveal .35s var(--ease); }
.faq details a { color: var(--accent); }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.footer { max-width: var(--page); margin: auto; border-top: 1px solid var(--line); padding: 28px 40px 35px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; font-size: 10px; color: var(--muted); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* Dialog foundation */
dialog { width: calc(100% - 36px); max-width: 460px; padding: 45px 35px 30px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); max-height: calc(100svh - 40px); overflow: auto; }
dialog::backdrop { background: #142a2866; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
dialog h2 { font-size: 35px; margin: 0 0 20px; text-wrap: balance; }
dialog > p { font-size: 14px; color: var(--muted); }
/* Shortcut guide: three columns of topics with a filter, laid out like the app's own guide. */
#shortcuts { width: min(1000px, calc(100% - 36px)); max-width: none; max-height: calc(100svh - 48px); padding: 0; border-radius: 14px; overflow: hidden; }
#shortcuts[open] { display: flex; flex-direction: column; }
.sg-header { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 30px 32px 20px; }
.sg-header h2 { margin: 0; font-size: 30px; }
.sg-header p { margin-top: 8px; font-size: 13px; color: var(--muted); }
.sg-close { flex: none; padding: 0 4px; font-size: 25px; line-height: 1; background: transparent; color: var(--muted); }
.sg-search-wrap { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 32px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.sg-search-wrap:focus-within { border-color: var(--accent); }
.sg-search { flex: 1; min-width: 0; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 13px; }
.sg-search::placeholder { color: var(--muted); }
.sg-body { min-height: 0; overflow: auto; padding: 24px 32px; }
.sg-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.sg-column + .sg-column { border-left: 1px solid var(--line); padding-left: 24px; }
.sg-topic + .sg-topic { margin-top: 22px; }
.sg-topic h3 { margin: 0 0 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.sg-topic dl { margin: 0; }
.sg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; }
.sg-row dt { font-size: 12.5px; line-height: 1.4; }
.sg-row dd { flex: none; margin: 0; }
.sg kbd { display: inline-block; white-space: nowrap; padding: 3px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--paper); color: var(--ink); font: 500 11px/1 var(--sans); }
.sg-empty { margin: 26px 0; text-align: center; color: var(--muted); }
.sg-footer { flex: none; display: flex; align-items: center; gap: 18px; padding: 14px 32px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.sg-escape { margin-left: auto; }
.sg-escape kbd { margin-right: 5px; }
@media (max-width: 850px) {
  .sg-columns { grid-template-columns: 1fr; gap: 22px; }
  .sg-column + .sg-column { border-left: 0; padding-left: 0; padding-top: 22px; border-top: 1px solid var(--line); }
  .sg-header { padding: 24px 22px 18px; }
  .sg-search-wrap { margin: 0 22px; }
  .sg-body { padding: 22px; }
  .sg-footer { padding: 12px 22px; }
  .sg-escape { display: none; }
}
form { margin-top: 25px; }
form label { display: block; font-size: 12px; margin-bottom: 9px; }
button:disabled { cursor: default; opacity: .7; }

/* Typing entrance */
.tl { visibility: hidden; }
.tl.on { visibility: visible; }
.intro-skip { position: fixed; right: 25px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--bg); color: var(--muted); padding: 8px; font-size: 11px; z-index: 10; }
.intro, .intro body { overflow: hidden; }
.intro .header, .intro .hero > :not(h1), .intro main > :not(.hero) { visibility: hidden; }
.intro h1[data-type]:not(.split) { visibility: hidden; }
.intro-done .header, .intro-done .hero > :not(h1), .intro-done main > :not(.hero) { animation: arrive .65s ease both; }
.intro-done .hero .cta { animation-delay: 60ms; }
.intro-done .hero-note { animation-delay: 120ms; }
.intro-done .story-link, .intro-done main > :not(.hero) { animation-delay: 180ms; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .header { padding: 25px 20px; }
  .header img { width: 68px; }
  .header nav { gap: 16px; }
  .header nav a { font-size: 11px; }
  .hero { min-height: min(calc(100svh - 150px), 700px); padding: 65px 22px 110px; }
  h1 { font-size: clamp(39px, 9.5vw, 60px); }
  .hero-description { font-size: 15px; margin-top: 20px; }
  .hero .cta { margin-top: 26px; }
  .story-link { bottom: 33px; }
  .play { padding: 60px 20px; }
  .play-body { grid-template-columns: 1fr; gap: 16px; }
  .picker { gap: 12px; margin-left: 0; }
  .pk-group { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
  .pk-label { width: 100%; margin: 0; padding: 0; }
  .pk-help { margin: 0; font-size: 11px; }
  .pk { width: auto; padding: 6px 11px; border: 1px solid var(--line); border-radius: 30px; font-size: 12px; }
  .pk[aria-pressed="true"] { border-color: var(--accent); background: var(--chip-on); }
  .pk[aria-pressed="true"]::after { margin-left: 2px; font-size: 11px; }
  .detail-heading h2 { font-size: 34px; }
  .under { flex-direction: column; align-items: stretch; }
  .bgs { flex-wrap: wrap; }
  .bgs-label { text-align: left; min-width: 0; }
  .also { grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
  .inside-section { padding: 60px 20px; }
  .beta-section, .faq-section { padding: 60px 20px; }
  .faq summary { font-size: 15px; padding: 19px 0; }
  .compat-row { grid-template-columns: 1fr; gap: 22px; padding: 28px 0; }
  .compat-row > div p { max-width: none; margin-top: 7px; }
  .simple-compat { gap: 19px 23px; }
  .simple-compat li { font-size: 11px; }
  .footer { padding: 24px 20px; font-size: 9px; }
  dialog { padding: 40px 25px 25px; }
}
/* Large and 4K screens: the header joins the shared width and type steps up a little. */
@media (min-width: 1700px) {
  .header { padding-block: 36px; }
  .header img { width: 84px; }
  .header nav a { font-size: 13px; }
  h1 { font-size: clamp(88px, 5.2vw, 124px); }
  .hero .cta { font-size: 14px; padding: 16px 26px; }
  .story-link, .hero-note { font-size: 12px; }
  .detail-heading h2 { font-size: clamp(48px, 2.9vw, 64px); }
  .detail-heading > p, .demo-toggle { font-size: 15.5px; }
  .play-body { grid-template-columns: 184px minmax(0, 1fr); gap: 26px; }
  .pk { font-size: 14px; }
  .say { font-size: 15px; }
  .also h3, .compat-row h3 { font-size: 14px; }
  .also p, .also-link { font-size: 14px; }
  .compat-row { grid-template-columns: 260px 1fr; }
  .compat-row > div p { font-size: 12px; }
  .simple-compat li { font-size: 13px; }
  .faq summary { font-size: 17px; padding: 24px 0; }
  .faq details p { font-size: 15px; }
  .footer { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Orchestration: the same pane grammar on a fixed stage. The manager Session pane holds the
   left; helpers open in a column beside it the way the app tiles new panes, fading in. */
.orch-grid { position: absolute; inset: 42px 16px 16px; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--c2, 1fr)); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) minmax(0, var(--r3, 1fr)); column-gap: var(--cg, 14px); transition: grid-template-columns .5s var(--app-ease), grid-template-rows .5s var(--app-ease), column-gap .5s var(--app-ease); }
.orch[data-beat="0"] .orch-grid { --c2: 0fr; --cg: 0px; --r3: 0fr; }
.orch[data-beat="1"] .orch-grid { --r3: 0fr; }
.orch-grid > .tcard { position: relative; left: auto; top: auto; width: auto; height: auto; min-width: 0; min-height: 0; }
.orch-manager { grid-column: 1; grid-row: 1 / -1; }
.orch-helper { grid-column: 2; transition: opacity .35s ease, transform .35s var(--app-ease), margin .5s var(--app-ease), border-color .2s, box-shadow .2s; }
.orch-helper + .orch-helper { margin-top: 14px; }
.orch-helper[data-later] { opacity: 0; transform: scale(.96); pointer-events: none; }
.orch[data-beat="1"] .orch-helper:last-child, .orch[data-beat="0"] .orch-helper + .orch-helper { margin-top: 0; }
.orch-helper .tbody { padding: 8px 8px 8px 12px; font-size: 10.5px; }
.orch-screen { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.orch-screen > * { flex: none; }
.orch-screen .cxbox { margin-bottom: 6px; padding: 4px 8px; }
.orch-screen :is(.cxin, .ocin, .ccin) { margin-top: 6px; }
.orch-thread { padding-top: 16px; scroll-behavior: auto; }
.orch-thread .session-user { max-width: 92%; }
.orch .session-step-row .session-object { overflow: hidden; text-overflow: ellipsis; }
.orch .manager-badge { color: var(--sp-ink); }
.orch .tctl .ctl { cursor: default; }
@media (prefers-reduced-motion: reduce) { .orch-grid, .orch-helper { transition: none; } }
/* Narrow: the manager on top, then each helper below it. */
@media (max-width: 640px), (max-height: 500px) and (pointer: coarse) {
  .orch-pg { display: flex; flex-direction: column; aspect-ratio: auto; }
  .orch-pg .strip { position: relative; flex: none; }
  .orch-pg .strip .lights { display: none; }
  .orch-grid { position: relative; inset: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 10px 12px; }
  .orch-grid > .orch-manager { height: 440px; }
  .orch-grid > .orch-helper { max-height: 230px; }
  .orch-helper + .orch-helper, .orch[data-beat] .orch-helper:last-child { margin-top: 0; }
  .orch-helper[data-later] { display: none; }
}
