/* PAI · cinematic prototype. Local only, never deployed.
   Motion vocabulary borrowed from the live homepage (theme/assets/js/home-alt-gsap.js,
   css/home-alt.css): ignition hairline, letterbox opening from a slit, words rising from
   behind a clipped edge, frosted glass warmed before content lands, spotlight, grain,
   sliding chip ink. Palette and type from theme.json; contour tiers from draft K. */

:root {
  --ink: #111515;
  --ink-2: #172021;
  --paper: #faf9f7;
  --subtle: #f0ede8;
  --edge: #ddd8d1;
  --teal: #2c5f6e;
  --teal-2: #3d7a8c;
  --teal-soft: #a8c5cc;
  --amber: #f3c66b;
  --warm: #d98a6c;
  --muted: #6b6560;
  --on-ink: rgba(250, 249, 247, .92);
  --on-ink-2: rgba(250, 249, 247, .56);
  --glass: rgba(26, 34, 34, .82);
  --glass-edge: rgba(250, 249, 247, .13);
  --serif: Fraunces, Georgia, serif;
  --sans: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --expo-out: cubic-bezier(.16, 1, .3, 1);
  --speed: 1;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { height: 100vh; height: 100dvh; }
body { font-family: var(--sans); background: #0b0e0e; color: var(--on-ink); display: flex; flex-direction: column; overflow: hidden; }

/* ---------- prototype chrome ---------- */
.bar { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; align-items: center; padding: .5rem .9rem; background: #050707; font-size: .8rem; color: var(--paper); border-bottom: 1px solid rgba(250,249,247,.08); }
.bar-group { display: flex; align-items: center; gap: .4rem; }
.bar-label { opacity: .55; }
.bar button, .bar select { font: inherit; padding: .3rem .65rem; border-radius: 999px; cursor: pointer; border: 1px solid rgba(250,249,247,.3); background: transparent; color: var(--paper); }
.bar select { border-radius: .5rem; background: #1b1f1f; }
.bar button[aria-pressed="true"] { background: var(--paper); color: #111; border-color: var(--paper); }
.bar-link { color: var(--teal-soft); text-decoration: none; }
.bar-link:hover { text-decoration: underline; }
.bar-clock { margin-left: auto; font-variant-numeric: tabular-nums; opacity: .6; }
.strip { flex: 0 0 2.4rem; display: flex; align-items: center; gap: .75rem; padding: 0 .9rem; background: #050707; border-top: 1px solid rgba(250,249,247,.08); font-size: .72rem; color: var(--on-ink-2); overflow: hidden; }
.strip ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: .55rem; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.strip li { padding: .12rem .45rem; border: 1px solid rgba(250,249,247,.14); border-radius: 999px; font-variant-numeric: tabular-nums; }
.strip li b { color: var(--paper); font-weight: 600; }

/* ---------- stage and shell ---------- */
.stage { position: relative; flex: 1; min-height: 0; padding: 16px; }
.shell {
  position: relative; height: 100%; display: grid; grid-template-columns: 1fr 460px; /* pane left, chat right (2026-09-29); phones: one column */
  border-radius: 14px; overflow: hidden; background: radial-gradient(120% 90% at 80% 10%, var(--ink-2), var(--ink) 60%);
  box-shadow: 0 40px 100px rgba(0,0,0,.5), 0 12px 32px rgba(0,0,0,.35);
}
.topo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.spot {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(ellipse 380px 300px at var(--mx, 50%) var(--my, 50%), rgba(250,249,247,.09), transparent 60%);
}
.shell:hover .spot { opacity: 1; }
.frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
.frame path { fill: none; stroke: rgba(250,249,247,.17); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.frame path.lit { stroke: rgba(168,197,204,.5); }

/* ignition hairline (homepage .home-alt-slit) */
.hslit {
  position: absolute; left: 16px; right: 16px; top: 50%; height: 2px; margin-top: -1px; z-index: 6; opacity: 0; transform: scaleX(0);
  background: linear-gradient(90deg, rgba(44,95,110,0) 0%, rgba(44,95,110,.85) 20%, rgba(250,249,247,.95) 50%, rgba(44,95,110,.85) 80%, rgba(44,95,110,0) 100%);
  box-shadow: 0 0 18px rgba(44,95,110,.6); pointer-events: none;
}

/* ---------- chat column ---------- */
.chat { position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 0; }
.chat-head { padding: 22px 26px 16px; }
.chat-title { margin: 0; font: 600 1.35rem/1.2 var(--serif); letter-spacing: -.01em; color: var(--paper); }
.chat-sub { margin: .35rem 0 0; font-size: .76rem; color: var(--on-ink-2); }
.thread { flex: 1; min-height: 0; overflow-y: auto; -webkit-mask-image: linear-gradient(transparent, #000 28px); mask-image: linear-gradient(transparent, #000 28px); padding: 14px 22px 10px; display: flex; flex-direction: column; gap: .9rem; scrollbar-width: thin; scrollbar-color: rgba(250,249,247,.15) transparent; }

/* masked word rise (homepage .home-alt-line / .home-alt-word) */
.mw { display: inline-block; overflow: hidden; overflow: clip; vertical-align: bottom; padding-bottom: .14em; margin-bottom: -.14em; }
.mw-i { display: inline-block; will-change: transform; }

.turn { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.abubble {
  position: relative; max-width: 90%; padding: .7rem .95rem; border-radius: 14px 14px 14px 4px;
  background: var(--glass); border: 1px solid var(--glass-edge);
  color: var(--on-ink); font-size: .93rem; line-height: 1.62; white-space: pre-wrap;
}
.abubble.thinking { min-width: 70px; box-shadow: 0 0 0 1px rgba(168,197,204,.18), 0 10px 30px -12px rgba(61,122,140,.7); animation: breathe calc(2.2s * var(--speed)) ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 1px rgba(168,197,204,.38), 0 12px 36px -10px rgba(61,122,140,.95); } }
.dots { display: inline-flex; gap: 6px; padding: 3px 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-soft); animation: dot calc(1.2s * var(--speed)) ease-in-out infinite; }
.dots i:nth-child(2) { background: var(--paper); animation-delay: calc(.15s * var(--speed)); }
.dots i:nth-child(3) { background: var(--amber); animation-delay: calc(.3s * var(--speed)); }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0) scale(.8); opacity: .45; } 30% { transform: translateY(-5px) scale(1.1); opacity: 1; } }

.ububble {
  align-self: flex-end; max-width: 85%; padding: .6rem .95rem; border-radius: 14px 14px 4px 14px;
  background: var(--teal); color: var(--paper); font-size: .93rem; line-height: 1.55; white-space: pre-wrap;
  box-shadow: 0 10px 24px -14px rgba(0,0,0,.8);
}
.ghost { position: fixed; z-index: 30; margin: 0; pointer-events: none; }

/* the streaming tail */
.orb { display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; vertical-align: middle;
  background: radial-gradient(circle, var(--paper), var(--amber) 60%, transparent 70%); box-shadow: 0 0 12px 3px rgba(243,198,107,.55);
  animation: orb calc(.9s * var(--speed)) ease-in-out infinite; }
@keyframes orb { 50% { transform: scale(.6); opacity: .6; } }

/* step trail -> "worked for" disclosure */
.trail { display: flex; flex-direction: column; gap: .32rem; font-size: .8rem; color: var(--on-ink-2); padding-left: .15rem; }
.step { display: flex; align-items: center; gap: .5rem; }
.step .ico { width: 14px; height: 14px; flex: 0 0 auto; }
.step .ico svg { width: 14px; height: 14px; display: block; overflow: visible; }
.step .ring { fill: none; stroke: var(--teal-soft); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 21 35; transform-origin: 7px 7px; transform-box: view-box; }
.step.run .ring { animation: spin calc(.9s * var(--speed)) linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.step .tick, .step .cross { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.step .tick { stroke: var(--teal-soft); }
.step .cross { stroke: var(--warm); }
.step.done .ring, .step.fail .ring { opacity: 0; transition: opacity .2s; }
.step.done .tick, .step.fail .cross { stroke-dashoffset: 0; transition: stroke-dashoffset calc(.4s * var(--speed)) var(--expo-out); }
.step.run .txt {
  background: linear-gradient(90deg, rgba(250,249,247,.45), var(--paper) 45%, rgba(250,249,247,.45) 60%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer-text calc(1.6s * var(--speed)) linear infinite;
}
@keyframes shimmer-text { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.step.none .ico { opacity: 0; }
.step.done .txt { color: var(--on-ink-2); }
.step.fail .txt { color: var(--warm); }
.worked { display: inline-flex; align-items: center; gap: .4rem; padding: .1rem 0; border: 0; background: none; color: var(--on-ink-2); font: inherit; font-size: .78rem; cursor: pointer; }
.worked:hover { color: var(--paper); }
.worked svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .3s var(--expo-out); }
.trail.open .worked svg { transform: rotate(90deg); }
.trail .steps { display: flex; flex-direction: column; gap: .32rem; overflow: hidden; }
.trail.collapsed .steps { display: none; }
.trail.collapsed.open .steps { display: flex; padding-left: 1rem; border-left: 1px solid var(--glass-edge); margin-left: .25rem; }

/* handshake card */
.card-chip {
  display: flex; align-items: center; gap: .7rem; padding: .5rem .8rem .5rem .5rem; border-radius: 12px; text-decoration: none;
  position: relative; overflow: hidden; color: var(--on-ink);
  background: var(--glass); border: 1px solid rgba(168,197,204,.28);
  box-shadow: 0 14px 34px -16px rgba(61,122,140,.9);
}
.card-chip .th { width: 50px; height: 38px; border-radius: 7px; flex: 0 0 auto; position: relative; overflow: hidden; }
.th--case { background: linear-gradient(135deg, #1f3f48, #2c5f6e 60%, #a8c5cc); }
.th--brief { background: linear-gradient(90deg, #e6e1d9 0 28%, transparent 28% 36%, #e6e1d9 36% 64%, transparent 64% 72%, #e6e1d9 72%) center / 82% 62% no-repeat, var(--paper); }
.th--artifact { background: repeating-linear-gradient(45deg, #e9e3da 0 6px, #f6f2ec 6px 12px); }
.card-chip.pending .th::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%); transform: translateX(-110%); animation: sheen calc(1.1s * var(--speed)) ease-in-out infinite; }
@keyframes sheen { to { transform: translateX(110%); } }
.card-chip .tx { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.card-chip .pp { font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-ink-2); }
.card-chip .ti { font-weight: 600; font-size: .88rem; }
.card-chip .tk { width: 18px; height: 18px; margin-left: .3rem; flex: 0 0 auto; }
.card-chip .tk path { fill: none; stroke: var(--teal-soft); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.card-chip.ready .tk path { stroke-dashoffset: 0; transition: stroke-dashoffset calc(.45s * var(--speed)) var(--expo-out) calc(.1s * var(--speed)); }
.card-chip .bar-line { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; overflow: hidden; }
.card-chip .bar-line::before { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--teal-soft), var(--amber), transparent); }
.card-chip.pending .bar-line::before { animation: runbar calc(1.1s * var(--speed)) cubic-bezier(.5,0,.5,1) infinite; }
@keyframes runbar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.card-chip.ready .bar-line::before { width: 100%; background: linear-gradient(90deg, var(--teal-2), var(--amber)); transform: none; transition: width .3s; }
.card-chip.fail { border-color: rgba(217,138,108,.55); box-shadow: 0 14px 34px -16px rgba(217,138,108,.7); }
.card-chip.fail .bar-line::before { width: 100%; background: var(--warm); animation: none; }
.card-chip.fail .ti::after { content: " · try again"; font-weight: 400; color: var(--warm); }
.card-chip.fail .tk { display: none; }

/* message actions */
.acts { display: flex; gap: .25rem; margin-top: -.2rem; }
.acts button { width: 28px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--on-ink-2); cursor: pointer; }
.acts button:hover { background: var(--glass); color: var(--paper); }
.acts svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* pills + sliding ink (homepage .work-hub__chip-ink) */
.pills { position: relative; display: flex; flex-wrap: wrap; gap: .45rem; padding: 2px 22px 12px; min-height: 12px; }
.pill {
  position: relative; z-index: 1; padding: .42rem .9rem; border-radius: 999px; font: inherit; font-size: .82rem; cursor: pointer; text-align: left;
  color: var(--on-ink); background: rgba(26,34,34,.85); border: 1px solid rgba(250,249,247,.16); transition: color .2s, border-color .2s;
}
.pill:hover { border-color: transparent; color: var(--paper); }
.pill-ink {
  position: absolute; top: 0; left: 0; z-index: 0; width: 0; height: 0; opacity: 0; border-radius: 999px; pointer-events: none;
  border: 1px solid rgba(168,197,204,.7); background: rgba(44,95,110,.45); box-shadow: 0 0 20px -4px rgba(61,122,140,.9);
  transition: transform .42s var(--expo-out), width .42s var(--expo-out), height .42s var(--expo-out), opacity .25s;
}

/* composer */
.composer { padding: 8px 22px 22px; }
.cfield { position: relative; display: flex; align-items: center; min-height: 48px; padding: 0 56px 0 20px; border-radius: 24px; background: rgba(22,29,29,.9); }
.ctext { font-size: .93rem; color: var(--paper); white-space: nowrap; overflow: hidden; }
.caret { width: 1.5px; height: 1.15em; margin-left: 1px; background: var(--teal-soft); opacity: 0; }
.caret.on { opacity: 1; animation: blink calc(1.05s * var(--speed)) steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cph { position: absolute; left: 20px; font-size: .93rem; color: var(--on-ink-2); pointer-events: none; }
.send { position: absolute; right: 7px; top: 50%; width: 34px; height: 34px; margin-top: -17px; border: 0; border-radius: 50%; background: var(--teal); color: var(--paper); cursor: pointer; display: grid; place-items: center; transition: background .3s, transform .3s var(--expo-out); }
.send svg { position: absolute; width: 18px; height: 18px; transition: transform .4s var(--expo-out), opacity .25s; }
.send .i-send path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.send .i-stop rect { fill: currentColor; }
.send .i-stop { opacity: 0; transform: scale(.3) rotate(-90deg); }
.send.stop { background: rgba(250,249,247,.12); }
.send.stop .i-send { opacity: 0; transform: translateY(-8px) scale(.5); }
.send.stop .i-stop { opacity: 1; transform: none; }
.send.stop::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 60%, var(--teal-soft) 85%, var(--amber)); -webkit-mask: radial-gradient(circle, transparent 17px, #000 18px); mask: radial-gradient(circle, transparent 17px, #000 18px); animation: spin calc(1.1s * var(--speed)) linear infinite; }
.send.pop { transform: scale(.88); }

/* ---------- pane column ---------- */
.pane-col { position: relative; z-index: 2; min-width: 0; }
.pane-idle { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.pane-idle span { font: italic 400 1rem var(--serif); color: var(--on-ink-2); letter-spacing: .01em; }
.vslit {
  position: absolute; top: 12px; bottom: 12px; left: 50%; width: 2px; margin-left: -1px; z-index: 5; opacity: 0; transform: scaleY(0); pointer-events: none;
  background: linear-gradient(180deg, rgba(44,95,110,0), rgba(44,95,110,.85) 20%, rgba(250,249,247,.95) 50%, rgba(44,95,110,.85) 80%, rgba(44,95,110,0));
  box-shadow: 0 0 18px rgba(61,122,140,.8);
}
.vslit.warm { background: linear-gradient(180deg, rgba(217,138,108,0), rgba(217,138,108,.9) 20%, #ffe3d4 50%, rgba(217,138,108,.9) 80%, rgba(217,138,108,0)); box-shadow: 0 0 20px rgba(217,138,108,.8); }
.pane {
  position: absolute; top: 12px; right: 0; bottom: 12px; left: 12px; z-index: 4; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 11px; background: var(--paper); color: #1a1a1a; box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(250,249,247,.08);
}
.pane-head { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1.1rem; border-bottom: 1px solid var(--edge); }
.pane-head .pp { display: block; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pane-head .pt { display: block; font: 600 1.02rem var(--serif); margin-top: .1rem; }
.pane-x { border: 0; background: transparent; font-size: 1.2rem; color: var(--muted); cursor: pointer; }
.pane-body { position: relative; flex: 1; min-height: 0; }
.phw { position: absolute; inset: 0; padding: 1.6rem 2.2rem; background: var(--paper); z-index: 2; pointer-events: none; }
.ph { border-radius: 6px; background: linear-gradient(100deg, var(--subtle) 30%, #fdfbf8 50%, var(--subtle) 70%); background-size: 250% 100%; animation: ph calc(1.4s * var(--speed)) linear infinite; }
@keyframes ph { from { background-position: 130% 0; } to { background-position: -30% 0; } }
.ph-hero { height: 190px; border-radius: 10px; margin-bottom: 1.3rem; }
.ph-title { height: 24px; width: 58%; margin-bottom: 1rem; }
.ph-line { height: 11px; margin-bottom: .6rem; }
.w90 { width: 90%; } .w80 { width: 80%; } .w60 { width: 60%; }
.ph-h2 { height: 16px; width: 42%; margin: 1.4rem 0 .8rem; }
.ph-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.ph-card { height: 230px; border-radius: 10px; }
.ph-frame { height: 55%; border-radius: 10px; margin: 1rem 0; }
.scanline { position: absolute; left: 0; right: 0; height: 120px; top: -120px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(168,197,204,.18) 70%, rgba(61,122,140,.45) 97%, transparent);
  animation: scan calc(1.4s * var(--speed)) cubic-bezier(.5,0,.5,1) infinite; }
@keyframes scan { to { top: 100%; } }

.page { position: absolute; inset: 0; overflow-y: auto; padding: 1.6rem 2.2rem 3rem; font-size: .95rem; line-height: 1.65; color: #2b2925; }
.page .hero { height: 190px; border-radius: 10px; margin-bottom: 1.3rem; display: flex; align-items: flex-end; padding: 1rem 1.25rem; color: var(--paper); font: 600 1.2rem var(--serif);
  background: linear-gradient(135deg, #16323a, #2c5f6e 55%, #a8c5cc); background-size: 140% 140%; }
.page h1 { font: 600 1.55rem/1.25 var(--serif); letter-spacing: -.01em; margin: 0 0 .8rem; color: #1a1a1a; }
.page h2 { font: 600 1.08rem/1.35 var(--serif); margin: 1.6rem 0 .5rem; padding-left: .7rem; border-left: 3px solid transparent; color: #1a1a1a;
  background-image: linear-gradient(transparent 58%, rgba(243,198,107,.6) 58%); background-repeat: no-repeat; background-size: 0% 100%; }
.page p { margin: 0 0 .75rem; }
.page .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.page .card { border: 1px solid var(--edge); border-radius: 10px; padding: 1rem; background: #fff; min-height: 230px; }
.page .card .k { font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.page .card .t { font: 600 1rem/1.3 var(--serif); margin: .3rem 0 .55rem; color: #1a1a1a; }
.page .frame-art { height: 55%; min-height: 260px; border-radius: 10px; margin: 1rem 0; background: repeating-linear-gradient(45deg, #eee9e1 0 12px, #f6f2ec 12px 24px); }
.page .target { animation: marker calc(.9s * var(--speed)) cubic-bezier(.2,.7,.2,1) forwards; border-left-color: var(--amber); box-shadow: -8px 0 16px -8px var(--amber); }
.hl { background-image: linear-gradient(transparent 52%, rgba(243,198,107,.75) 52%); background-repeat: no-repeat; background-size: 0% 100%; animation: marker calc(.9s * var(--speed)) cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes marker { to { background-size: 100% 100%; } }

/* error card */
.err { position: absolute; left: 50%; top: 50%; z-index: 6; width: 280px; margin: -60px 0 0 -140px; padding: 1.1rem 1.2rem; border-radius: 14px;
  background: rgba(20,24,24,.94); border: 1px solid rgba(217,138,108,.4);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.8); color: var(--on-ink); font-size: .9rem; }
.err p { margin: 0 0 .8rem; }
.err button { font: inherit; font-size: .82rem; padding: .4rem .95rem; border-radius: 999px; border: 1px solid rgba(250,249,247,.25); background: rgba(250,249,247,.06); color: var(--paper); cursor: pointer; }
.err button:hover { border-color: var(--teal-soft); }

/* beam */
.beam { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.beam svg { width: 100%; height: 100%; overflow: visible; }

/* ---------- reduced motion: states stay, travel goes ---------- */
body.rm .dots i, body.rm .abubble.thinking, body.rm .orb, body.rm .step.run .ring, body.rm .step.run .txt,
body.rm .card-chip.pending .th::after, body.rm .card-chip.pending .bar-line::before, body.rm .send.stop::before,
body.rm .ph, body.rm .scanline, body.rm .caret.on { animation: none !important; }
body.rm .step.run .txt { color: var(--paper); background: none; }
body.rm .scanline { display: none; }
body.rm .page .target, body.rm .hl { animation-timing-function: steps(1, start); }
body.rm .pill-ink, body.rm .send svg { transition: none; }

/* ================= phones ================= */
@media (hover: none) { .spot { display: none; } .pills.doors .pill:hover { transform: none; } }
@media (max-width: 760px) {
  .bar { flex-wrap: nowrap; overflow-x: auto; gap: .4rem; padding: .4rem .6rem; font-size: .72rem; scrollbar-width: none; }
  .bar::-webkit-scrollbar { display: none; }
  .bar-group { flex: 0 0 auto; }
  .bar select { max-width: 11rem; }
  .bar-label, .bar-clock { display: none; }
  .bar-link { flex: 0 0 auto; white-space: nowrap; }
  .stage { padding: 0; }
  .shell { grid-template-columns: 1fr; border-radius: 0; }
  .chat-head { padding: 16px 18px 10px; }
  .chat-title { font-size: 1.15rem; }
  .thread { padding: 10px 14px 8px; }
  .abubble, .ububble { max-width: 92%; font-size: .95rem; }
  .pills { padding: 2px 14px 10px; }
  .composer { padding: 6px 14px calc(12px + env(safe-area-inset-bottom)); }
  .ctext, .cph { font-size: 1rem; }   /* 16px: iOS does not zoom a 16px field on focus */
  .send { width: 38px; height: 38px; margin-top: -19px; }
  .pane-col { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
  .pane-col.open { pointer-events: auto; }
  .pane-idle { display: none; }
  .pane { top: 10px; right: 0; bottom: 0; left: 0; border-radius: 14px 14px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.6); }
  .pane-x { width: 44px; height: 44px; font-size: 1.5rem; margin-right: -10px; }
  .page { padding: 1.2rem 1.2rem calc(2rem + env(safe-area-inset-bottom)); }
  .page .cards { grid-template-columns: 1fr; }
  .page .card { min-height: 0; }
  .phw { padding: 1.2rem; }
  .ph-cards { grid-template-columns: 1fr; }
  .ph-card { height: 120px; }
  .ph-hero, .page .hero { height: 150px; }
  .vslit { top: var(--hit, 50%); bottom: auto; left: 12px; right: 12px; width: auto; height: 2px; margin: -1px 0 0 0; transform: scaleX(0); transform-origin: 50% 50%;
    background: linear-gradient(90deg, rgba(44,95,110,0), rgba(44,95,110,.85) 20%, rgba(250,249,247,.95) 50%, rgba(44,95,110,.85) 80%, rgba(44,95,110,0)); }
  .vslit.warm { background: linear-gradient(90deg, rgba(217,138,108,0), rgba(217,138,108,.9) 20%, #ffe3d4 50%, rgba(217,138,108,.9) 80%, rgba(217,138,108,0)); }
  .err { position: fixed; width: min(300px, calc(100vw - 32px)); margin: -60px 0 0 calc(min(300px, calc(100vw - 32px)) / -2); }
  .strip { flex-basis: 2rem; }
}

/* embedded preview (homepage feature prototype): the product only */
body.embed .bar, body.embed .strip { display: none; }
body.embed .stage { padding: 0; }
body.embed .shell { border-radius: 0; box-shadow: none; }

/* seam: embedded directly under the homepage hero, no frame of its own at the top */
body.seam .shell { border-radius: 0; box-shadow: none; }
body.seam .shell::before { display: none; }
body.seam .frame .f-outer { opacity: 0; }

/* a real page in the pane (through PAI's page proxy) */
.page.page--real { padding: 0; overflow: hidden; }
.page.page--real iframe.real-page { display: block; width: 100%; height: 100%; border: 0; background: #faf9f7; }

/* PAI on production's homepage ground. Local only, never deployed.
   Values read from feedback-loupe.com on 2026-09-27 (computed styles, not guesses):
   claim Fraunces 300 with the stake italic in #a8dce8; console glass rgba(10,14,16,.62)
   under blur(16px), 1px rgba(250,249,247,.16), radius 12px, the two-layer drop shadow;
   backdrop #0e1a1f with the Horizon field; doors = index numeral, label, caps meta. */

body[data-ground="horizon"] .topo { display: none; }
body[data-ground="horizon"] .grain { opacity: .35; mix-blend-mode: soft-light; z-index: 1; }

#work-hero-backdrop { position: absolute; inset: 0; z-index: 0; background: #0e1a1f; overflow: hidden; }
#work-hero-backdrop .hdk-wave, #work-hero-backdrop .hdk-dots { display: none; }
#work-hero-backdrop .hdk-field { position: absolute; inset: 0; display: block; }
.scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(6,11,13,.78) 0, rgba(6,11,13,.55) 420px, rgba(6,11,13,.1) 62%, transparent 80%); }
/* the teal-to-sand hairline production draws along the top of the band */
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .shell::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 7;
  background: linear-gradient(90deg, #2c5f6e, #5c8d8f 45%, #b9a27a); opacity: .9; pointer-events: none; }
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .shell { background: #0e1a1f; border-radius: 12px; }

/* type: the claim register */
.chat-eyebrow { margin: 0 0 .9rem; font-size: .78rem; color: var(--paper); font-weight: 600; letter-spacing: .01em; }
.chat-eyebrow span { color: var(--on-ink-2); font-weight: 400; }
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .chat-title { font: 300 2.35rem/1.08 var(--serif); letter-spacing: -.015em; }
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .chat-title em { font-style: italic; color: #a8dce8; }
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .chat-title em .mw-i { color: #a8dce8; }
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .chat-head { padding: 26px 28px 16px; }
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .chat-sub { font-size: .82rem; color: rgba(250,249,247,.62); max-width: 34ch; }

/* console glass, exactly the homepage console */
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .abubble,
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .card-chip,
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .cfield,
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .err,
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .pills.doors {
  background: rgba(10,14,16,.62);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(250,249,247,.16);
  box-shadow: 0 40px 100px rgba(0,0,0,.42), 0 12px 32px rgba(0,0,0,.28), inset 0 0 0 1px rgba(250,249,247,.06);
}
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .abubble { border-radius: 12px 12px 12px 4px; box-shadow: 0 12px 32px rgba(0,0,0,.28), inset 0 0 0 1px rgba(250,249,247,.06); }
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .card-chip { border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.28), inset 0 0 0 1px rgba(250,249,247,.06); }
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .ububble { background: rgba(44,95,110,.92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: 12px 12px 4px 12px; }

/* suggestions as the homepage's discipline doors, stacked inside one console */
.pills.doors { margin: 0 22px 12px; padding: 8px; border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.pills.doors .pill {
  display: grid; grid-template-columns: 2.4rem 1fr; align-items: baseline; gap: .6rem; width: 100%;
  padding: .7rem .9rem; border-radius: 8px; border: 1px solid transparent; background: rgba(250,249,247,.035);
  -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--paper); font-size: .92rem; transition: color .2s, transform .3s var(--expo-out);
}
.pills.doors .pill:hover { transform: scale(1.015); }
.pills.doors .di { font: 300 1.45rem/1 var(--serif); color: rgba(250,249,247,.42); }
.pills.doors .dl { line-height: 1.35; }
.pills.doors .pill.pill--plain { grid-template-columns: 1fr; }
.pills.doors .pill-ink { border-radius: 8px; background: rgba(44,95,110,.4); border-color: rgba(168,220,232,.45); }

/* the reading pane in the catalog's register */
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .pane { border-radius: 10px; }
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .page h1 { font: 400 1.7rem/1.2 var(--serif); letter-spacing: -.01em; }
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .page .hero { border-top: 3px solid #2c5f6e; border-radius: 4px; }

/* the composer's edge is the drawn frame stroke, so the box itself carries no border */
body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .cfield { border-color: transparent; }

@media (max-width: 760px) {
  body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .shell { border-radius: 0; }
  body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .chat-head { padding: 18px 18px 10px; }
  body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .chat-title { font-size: 1.9rem; }
  body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .chat-sub { font-size: .76rem; }
  .chat-eyebrow { margin-bottom: .6rem; }
  .scrim { background: linear-gradient(180deg, rgba(6,11,13,.72) 0, rgba(6,11,13,.35) 40%, rgba(6,11,13,.55) 100%); }
  .pills.doors { margin: 0 14px 10px; padding: 6px; gap: 4px; }
  .pills.doors .pill { padding: .6rem .75rem; grid-template-columns: 2rem 1fr; font-size: .92rem; }
  .pills.doors .di { font-size: 1.2rem; }
}

/* ---------- model switching over one tool contract ---------- */
.cmeta { position: relative; display: flex; align-items: center; gap: .6rem; margin: 0 4px 8px; min-height: 26px; }
.model-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .28rem .6rem .28rem .5rem; border-radius: 999px; cursor: pointer;
  font: 600 .74rem "Source Sans 3", system-ui, sans-serif; color: var(--paper);
  background: rgba(10,14,16,.62); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(250,249,247,.16); }
.model-chip:hover { border-color: rgba(168,220,232,.45); }
.model-chip.fixed { cursor: default; opacity: .8; }
.model-chip.fixed .mc-caret { display: none; }
.mc-dot { width: 7px; height: 7px; border-radius: 50%; background: #a8dce8; box-shadow: 0 0 8px rgba(168,220,232,.8); }
.mc-name { display: inline; white-space: nowrap; }   /* inline, so the spaces between masked words survive */
.mc-caret { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .3s var(--expo-out); }
.model-chip[aria-expanded="true"] .mc-caret { transform: rotate(180deg); }
.tools { display: inline-flex; gap: 4px; }
.tool { width: 6px; height: 6px; border-radius: 2px; background: rgba(250,249,247,.22); }
.tool.ok { animation: tool-ok calc(.7s * var(--speed)) ease forwards; }
@keyframes tool-ok { 0% { background: rgba(250,249,247,.22); transform: scale(1); } 35% { background: #a8dce8; transform: scale(1.6); box-shadow: 0 0 8px rgba(168,220,232,.9); } 100% { background: rgba(168,220,232,.55); transform: scale(1); } }
.tool.fire { animation: tool-fire calc(1.2s * var(--speed)) ease forwards; }
@keyframes tool-fire { 0% { background: #f3c66b; transform: scale(1.8); box-shadow: 0 0 12px rgba(243,198,107,.95); } 100% { background: rgba(168,220,232,.55); transform: scale(1); } }
.tools-label { font: 500 .7rem ui-monospace, "SF Mono", Menlo, monospace; color: rgba(250,249,247,.55); opacity: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tools-label.show { animation: tl-show calc(2.4s * var(--speed)) ease forwards; }
@keyframes tl-show { 0% { opacity: 0; transform: translateY(4px); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
.model-pop { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 20; width: 300px; padding: .5rem; border-radius: 12px;
  background: rgba(10,14,16,.92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(250,249,247,.16);
  box-shadow: 0 30px 70px rgba(0,0,0,.55); }
.mp-h { margin: .2rem .5rem .4rem; font: 600 .66rem "Source Sans 3", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: rgba(250,249,247,.5); }
.mp-g { margin: .5rem .5rem .2rem; font: 600 .64rem "Source Sans 3", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: rgba(168,220,232,.7); }
.mp-o { width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: .6rem; align-items: center; text-align: left;
  padding: .5rem .6rem; border: 0; border-radius: 8px; background: transparent; color: var(--paper); cursor: pointer; font: inherit; }
.mp-o:hover { background: rgba(44,95,110,.35); }
.mp-o[aria-selected="true"] { background: rgba(44,95,110,.5); box-shadow: inset 0 0 0 1px rgba(168,220,232,.4); }
.mp-n { font-weight: 600; font-size: .86rem; }
.mp-note { grid-column: 1; font-size: .72rem; color: rgba(250,249,247,.5); }
.mp-t { grid-column: 2; grid-row: 1 / span 2; font: 500 .68rem ui-monospace, Menlo, monospace; color: #a8dce8; padding: .15rem .4rem; border-radius: 999px; border: 1px solid rgba(168,220,232,.35); }
.mp-f { margin: .6rem .5rem .3rem; font-size: .74rem; line-height: 1.45; color: rgba(250,249,247,.6); }
.step .tt { font: 500 .68rem ui-monospace, Menlo, monospace; color: #a8dce8; padding: .05rem .35rem; border-radius: 4px; background: rgba(44,95,110,.35); }
.acts .by { align-self: center; margin-right: .35rem; font: 500 .68rem ui-monospace, Menlo, monospace; color: rgba(250,249,247,.45); }
.sysline { display: flex; align-items: center; gap: .5rem; align-self: center; font-size: .76rem; color: rgba(250,249,247,.6); padding: .2rem .6rem; }
.sl-dot { width: 6px; height: 6px; border-radius: 50%; background: #a8dce8; box-shadow: 0 0 8px rgba(168,220,232,.8); }

/* ---------- public visitors: the summary is open, the full case is for invited readers ---------- */
.page .lock-band { margin: 0 0 1.2rem; padding: .9rem 1rem; border-radius: 8px; background: #0e1a1f; color: #faf9f7; border-top: 3px solid #2c5f6e; }
.page .lock-band .lk { display: block; font: 600 .66rem "Source Sans 3", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #a8dce8; margin-bottom: .35rem; }
.page .lock-band p { margin: 0 0 .7rem; color: rgba(250,249,247,.8); font-size: .9rem; }
.page .lock-band button { font: 600 .78rem "Source Sans 3", sans-serif; padding: .45rem .95rem; border-radius: 999px; border: 1px solid rgba(168,220,232,.5); background: transparent; color: #faf9f7; cursor: pointer; }

body.rm .tool.ok, body.rm .tool.fire { animation-duration: 1ms; }
@media (max-width: 760px) { .model-pop { width: min(300px, calc(100vw - 28px)); } .tools-label { display: none; } }

/* the ground beneath: no Horizon backdrop, the canvas draws the underground */
body[data-ground="underground"] #work-hero-backdrop { display: none; }
body[data-ground="underground"] .topo { display: block; }
body[data-ground="underground"] .grain { opacity: .3; mix-blend-mode: soft-light; }
body[data-ground="underground"] .scrim { background: linear-gradient(90deg, rgba(5,9,11,.55) 0, rgba(5,9,11,.3) 420px, transparent 70%); }
body[data-ground="underground"] .pane-idle span { color: rgba(168,220,232,.55); }

/* ---------- one ground, the window as glass (underground and host) ----------
   The ground is drawn once, behind everything. The chat column is a frosted slab standing on it; the
   pane, until a page opens, is a clear view down into it. On the homepage (ground=host) the page draws
   that ground and this window is transparent over it. */
body:is([data-ground="underground"], [data-ground="host"]) .chat {
  margin: 14px 14px 14px 0; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, rgba(8,14,17,.78), rgba(8,14,17,.86));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(250,249,247,.12); box-shadow: 0 30px 70px rgba(0,0,0,.45), inset 0 0 0 1px rgba(250,249,247,.04);
}
body:is([data-ground="underground"], [data-ground="host"]) .scrim { display: none; }
body:is([data-ground="underground"], [data-ground="host"]) .frame .f-div,
body:is([data-ground="underground"], [data-ground="host"]) .frame .f-outer { opacity: 0; }
body:is([data-ground="underground"], [data-ground="host"]) .abubble { background: rgba(250,249,247,.045); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
body:is([data-ground="underground"], [data-ground="host"]) .card-chip { background: rgba(250,249,247,.05); -webkit-backdrop-filter: none; backdrop-filter: none; }
body:is([data-ground="underground"], [data-ground="host"]) .pills.doors { background: rgba(250,249,247,.03); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
body:is([data-ground="underground"], [data-ground="host"]) .pane-idle span { color: rgba(168,220,232,.6); }
/* host: transparent over the page's ground */
html:has(body[data-ground="host"]), body[data-ground="host"] { background: transparent; }
body[data-ground="host"] .stage, body[data-ground="host"] .shell { background: transparent !important; box-shadow: none; }
body[data-ground="host"] .topo, body[data-ground="host"] .grain, body[data-ground="host"] #work-hero-backdrop { display: none; }
body[data-ground="host"] .shell::before { display: none; }
@media (max-width: 760px) {
  body:is([data-ground="underground"], [data-ground="host"]) .chat { margin: 0; border-radius: 0; border: 0; }
}

/* host (the homepage): the window's edges are the console's edges — the pane starts at its left edge,
   the slab ends at its right edge, no inset of their own; the 14px gap sits between them */
body[data-ground="host"] .chat { margin: 0; }
body[data-ground="host"] .pane { top: 0; right: 14px; bottom: 0; left: 0; }
body[data-ground="host"] .vslit { top: 0; bottom: 0; }

/* Homepage window (?head=min): the header shrinks to the title alone, one line. */
body.head-min .chat-eyebrow, body.head-min .chat-sub { display: none; }
body.head-min:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .chat-head { padding: 16px 24px 10px; }
body.head-min:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .chat-title { font-size: 1.35rem; line-height: 1.2; }

/* Homepage frame: the pane waits as frosted glass (painted by the page behind this frame, see Ground.glass),
   holding what is ready to open. The white page still opens over it. */
body.glass-idle .pane-idle { top: 0; right: 14px; bottom: 0; left: 0; display: block; place-items: initial; padding: 40px 44px; }
body.glass-idle .pane-idle span { font: inherit; font-style: normal; letter-spacing: 0; color: inherit; }
body.glass-idle .gi { max-width: 440px; }
body.glass-idle .gi-sheet { width: 92px; height: 116px; border-radius: 6px; margin-bottom: 26px; padding: 14px 12px; display: grid; align-content: start; gap: 7px;
  background: rgba(250,249,247,.10); box-shadow: inset 0 0 0 1px rgba(250,249,247,.18), 0 10px 30px rgba(0,0,0,.25); }
body.glass-idle .gi-sheet i { display: block; height: 5px; border-radius: 3px; background: rgba(250,249,247,.22); }
body.glass-idle .gi-sheet i:nth-child(1) { width: 70%; height: 8px; background: rgba(250,249,247,.34); margin-bottom: 4px; }
body.glass-idle .gi-sheet i:nth-child(3) { width: 86%; } body.glass-idle .gi-sheet i:nth-child(4) { width: 60%; } body.glass-idle .gi-sheet i:nth-child(5) { width: 78%; }
body.glass-idle .gi-sheet i { animation: gi-shim 2.8s ease-in-out infinite; } body.glass-idle .gi-sheet i:nth-child(2n) { animation-delay: .4s; }
@keyframes gi-shim { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
body.glass-idle .gi-lede { margin: 0; font: italic 400 1.45rem/1.2 var(--serif); color: rgba(250,249,247,.94); }
body.glass-idle .gi-sub { margin: .5rem 0 0; font-size: .86rem; line-height: 1.45; color: rgba(250,249,247,.66); max-width: 34ch; }
body.glass-idle .gi-label { margin: 1.9rem 0 .6rem; font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(250,249,247,.62); }
body.glass-idle .gi-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(250,249,247,.14); }
body.glass-idle .gi-list li { display: grid; grid-template-columns: 1fr; column-gap: .4rem; padding: .7rem .5rem; border-bottom: 1px solid rgba(250,249,247,.14);
  transition: background .5s cubic-bezier(.16,1,.3,1); border-radius: 4px; }
body.glass-idle .pane-idle .gi-n { font: 400 .8rem var(--serif); color: rgba(250,249,247,.62); padding-top: .1rem; }
body.glass-idle .pane-idle .gi-name { font-size: .95rem; color: rgba(250,249,247,.9); }
body.glass-idle .pane-idle .gi-path { grid-column: 1; font: .72rem ui-monospace, SFMono-Regular, Menlo, monospace; color: rgba(168,220,232,.6); margin-top: .15rem; }
body.glass-idle .gi-list li.on { background: rgba(250,249,247,.08); }
body.glass-idle .pane-idle .gi-list li.on .gi-n { color: #e8b04b; }
body.glass-idle .gi-foot { margin: 1.1rem 0 0; font-size: .78rem; color: rgba(250,249,247,.5); }
@media (prefers-reduced-motion: reduce) { body.glass-idle .gi-sheet i { animation: none; } }
@media (max-width: 760px) { body.glass-idle .pane-idle { display: none; } }
/* the brief reader's waiting pane: the brief's headline and its three pieces, each one a way in */
body.glass-brief .pane-idle { pointer-events: auto; overflow-y: auto; }
/* no glass behind it off the homepage: give the list its own ground so it reads over the lines */
body.glass-brief:not([data-ground="host"]) .gi--brief { background: rgba(9,16,20,.82); border: 1px solid rgba(250,249,247,.1); border-radius: 14px; padding: 28px 30px 24px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body.glass-idle .gi--brief { max-width: 560px; }
body.glass-idle .gi--brief .gi-label { margin-top: 0; }
body.glass-idle .gi--brief .gi-lede { font-size: 1.7rem; line-height: 1.18; max-width: 22ch; }
body.glass-idle .gi-bw { list-style: none; margin: 1.6rem 0 0; padding: 0; border-top: 1px solid rgba(250,249,247,.14); }
body.glass-idle .gi-bw button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 1fr; column-gap: .4rem; padding: 1rem .6rem;
  border-bottom: 1px solid rgba(250,249,247,.14); cursor: pointer; border-radius: 6px; transition: background .25s; }
body.glass-idle .gi-bw button:hover, body.glass-idle .gi-bw button:focus-visible { background: rgba(250,249,247,.07); }
body.glass-idle .gi-bw button:focus-visible { outline: 2px solid rgba(168,220,232,.7); outline-offset: -2px; }
body.glass-idle .pane-idle .gi-bw .gi-n { font: 400 .9rem var(--serif); color: rgba(250,249,247,.62); padding-top: .15rem; }
body.glass-idle .pane-idle .gi-bt { display: grid; gap: .3rem; }
body.glass-idle .pane-idle .gi-bk { font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(168,220,232,.75); }
body.glass-idle .pane-idle .gi-bh { font: 400 1.12rem/1.3 var(--serif); color: rgba(250,249,247,.95); }
body.glass-idle .pane-idle .gi-bd { font-size: .86rem; line-height: 1.45; color: rgba(250,249,247,.66); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.glass-idle .pane-idle .gi-bo { font-size: .8rem; font-weight: 600; color: rgba(168,220,232,.85); margin-top: .1rem; }
/* with the brief's plates: the video beside each piece, three still fit the window's height */
body.glass-idle .gi--brief:has(.gi-bw--media) { max-width: 800px; }
body.glass-idle .gi-bw--media button { grid-template-columns: minmax(150px, 230px) 1fr; column-gap: 1rem; align-items: start; padding: .85rem .6rem; }
body.glass-idle .pane-idle .gi-bv { display: block; aspect-ratio: 1440 / 844; border-radius: 6px; overflow: hidden; background: #0a1418; border: 1px solid rgba(250,249,247,.12); }
body.glass-idle .pane-idle .gi-bv video, body.glass-idle .pane-idle .gi-bv img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.glass-idle .gi-bw--media .gi-bh { font-size: 1.02rem; }
body.glass-idle .gi--brief:has(.gi-bw--media) .gi-lede { font-size: 1.45rem; max-width: 30ch; }
body.glass-idle .gi--brief .gi-foot { max-width: 46ch; line-height: 1.45; }

/* The open pane's header, in the waiting pane's language: dark frosted glass over the page, the item's number
   in amber, its name, the real path it opened in mono, the other items as numbered tabs. */
body:is([data-ground="underground"], [data-ground="host"]) .pane-head {
  position: relative; z-index: 3; gap: 1rem; padding: 14px 18px 14px 22px; border-bottom: 1px solid rgba(250,249,247,.12);
  background: linear-gradient(160deg, rgba(20,30,37,.94), rgba(12,19,25,.96)); color: #faf9f7;
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.ph-main { display: flex; align-items: flex-start; gap: .8rem; min-width: 0; flex: 1; }
.ph-txt { display: flex; flex-direction: column; min-width: 0; }
.ph-n { font: 400 1.5rem/1 var(--serif); color: #e8b04b; padding-top: .15rem; }
body:is([data-ground="underground"], [data-ground="host"]) .pane-head .pp { font-size: .64rem; font-weight: 600; letter-spacing: .12em; color: rgba(250,249,247,.5); }
body:is([data-ground="underground"], [data-ground="host"]) .pane-head .pt { font: 500 1.08rem/1.25 var(--serif); color: rgba(250,249,247,.95); margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-path { font: .7rem ui-monospace, SFMono-Regular, Menlo, monospace; color: rgba(168,220,232,.65); margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-tabs { display: flex; gap: .3rem; flex: none; }
.ph-tabs:empty { display: none; }
.ph-tab { min-width: 2.1rem; height: 1.9rem; padding: 0 .45rem; border-radius: 6px; border: 1px solid rgba(250,249,247,.16); background: rgba(250,249,247,.04);
  font: 400 .8rem var(--serif); color: rgba(250,249,247,.55); cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.ph-tab:hover { background: rgba(250,249,247,.1); color: #faf9f7; }
.ph-tab.on { background: rgba(250,249,247,.12); border-color: rgba(232,176,75,.55); color: #e8b04b; cursor: default; }
.ph-tab:focus-visible { outline: 2px solid #a8dce8; outline-offset: 2px; }
body:is([data-ground="underground"], [data-ground="host"]) .pane-x { color: rgba(250,249,247,.6); width: 2rem; height: 2rem; border-radius: 6px; flex: none; }
body:is([data-ground="underground"], [data-ground="host"]) .pane-x:hover { background: rgba(250,249,247,.1); color: #faf9f7; }
@media (max-width: 760px) { .ph-tabs { display: none; } .ph-n { font-size: 1.2rem; } }

/* Live on interaction: a real field over the composer once the reader starts the conversation. */
.c-input { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; color: #faf9f7; font: inherit; font-size: .95rem; padding: 0 3.6rem 0 1.2rem; outline: none; caret-color: #e8b04b; z-index: 2; }
body.live .caret { display: none; }

/* Principle cards in the thread (public demonstration): boundary kept, confirmation waited for, source read. */
.tcard { margin: .6rem 0 0; max-width: 88%; padding: .75rem .9rem; border-radius: 12px; background: rgba(250,249,247,.05); border: 1px solid rgba(250,249,247,.14); color: rgba(250,249,247,.88); font-size: .88rem; line-height: 1.45; }
.tcard p { margin: .25rem 0 0; }
.tc-k { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(168,220,232,.75); }
.tc-a { display: inline-block; margin-top: .45rem; color: #a8dce8; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(168,220,232,.35); }
.tc-a:hover { color: #faf9f7; border-bottom-color: #faf9f7; }
.tcard--boundary { border-color: rgba(232,176,75,.35); }
.tcard--boundary .tc-k { color: #e8b04b; }
.tcard--cite { display: flex; align-items: baseline; gap: .6rem; padding: .55rem .8rem; }
.tcard--cite .tc-a { margin-top: 0; }
.tcard--confirm ul { margin: .45rem 0 .2rem; padding-left: 1.1rem; }
.tcard--confirm li { margin: .15rem 0; }
.tc-row { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.tc-row button { font: 600 .82rem "Source Sans 3", system-ui, sans-serif; border-radius: 999px; padding: .4rem .9rem; border: 1px solid rgba(250,249,247,.22); background: transparent; color: #faf9f7; cursor: pointer; }
.tc-yes[disabled] { opacity: .5; cursor: not-allowed; }
.tc-yes small { margin-left: .45rem; font-weight: 400; font-size: .72rem; color: rgba(250,249,247,.7); }
.tc-no.chosen { background: rgba(250,249,247,.14); border-color: rgba(250,249,247,.5); }
.tc-wait { font-size: .78rem; color: #e8b04b; }
.tcard--confirm.done .tc-wait { color: rgba(250,249,247,.7); }
.step.queued { opacity: .5; }
.step.queued .ring { stroke-dasharray: 2 3; }

/* Suggestions that have faded out leave the layout, so the conversation keeps its height. */
.pills[hidden] { display: none !important; }
/* Full screen on the PAI page: the page's own close button sits top right, over the chat now; its header makes room. */
body.host-expanded .chat-head { padding-right: 72px !important; }

/* Short screens (a laptop window, full screen on a small display): the conversation keeps the height.
   The header shrinks to the title, suggestions tighten, and on very short screens they sit in one row. */
@media (max-height: 760px) and (min-width: 761px) {
  body .chat-eyebrow, body .chat-sub { display: none; }
  body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .chat-head { padding: 14px 22px 8px; }
  body:is([data-ground="horizon"], [data-ground="underground"], [data-ground="host"]) .chat-title { font-size: 1.4rem; line-height: 1.2; }
  .pills.doors { margin-bottom: 8px; padding: 5px; gap: 4px; }
  .pills.doors .pill { padding: .45rem .7rem; font-size: .88rem; }
  .pills.doors .di { font-size: 1.05rem; }
}
@media (max-height: 560px) and (min-width: 761px) {
  .pills.doors { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .pills.doors .pill { flex: 0 0 auto; max-width: 260px; }
  .pills.doors .di { display: none; }
  .pills.doors .pill { grid-template-columns: 1fr; }
}

/* Request access, in the reading pane (public homepage). */
.access { max-width: 560px; margin: 0 auto; padding: 2.2rem 2rem 2.4rem; color: #1a1f24; font-family: "Source Sans 3", system-ui, sans-serif; }
.access-k { margin: 0; font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #2c5f6e; }
#page .access .access-t { margin: 0; padding: 0; font: 400 1.9rem/1.15 var(--serif); letter-spacing: -.01em; color: #1a1f24; text-indent: 0; }
#page .access .access-t::before { content: none; }
.access-p { margin: .9rem 0 0; font-size: 1rem; line-height: 1.55; color: #3d464d; }
.access-f { margin-top: 1.4rem; display: grid; gap: .9rem; }
.access-f label { display: grid; gap: .35rem; font-size: .82rem; font-weight: 600; color: #3d464d; }
.access-f input { font: 400 1rem "Source Sans 3", system-ui, sans-serif; padding: .7rem .8rem; border: 1px solid #c9d1d6; border-radius: 8px; background: #fff; color: #1a1f24; }
.access-f input:focus { outline: 2px solid #2c5f6e; outline-offset: 1px; border-color: #2c5f6e; }
.access-f input.bad { border-color: #b3261e; }
.access-f button { justify-self: start; margin-top: .2rem; font: 600 .95rem "Source Sans 3", system-ui, sans-serif; padding: .7rem 1.3rem; border: 0; border-radius: 999px; background: #1a1f24; color: #faf9f7; cursor: pointer; }
.access-f button[disabled] { opacity: .6; cursor: default; }
.access-f button:focus-visible { outline: 2px solid #2c5f6e; outline-offset: 3px; }
.access-m { margin: 0; min-height: 1.2em; font-size: .88rem; color: #b3261e; }
.access-done { margin: 0; font-size: 1rem; line-height: 1.55; color: #1a1f24; padding: 1rem 1.1rem; border-radius: 10px; background: #edf6f4; border: 1px solid #c5e0da; }
.access-s { margin: 1.2rem 0 0; font-size: .86rem; line-height: 1.5; color: #5b6670; }
.access-s a { color: #2c5f6e; font-weight: 600; }
#page .access .access-p { margin: .9rem 0 0; }
#page .access .access-s { margin: 1.2rem 0 0; }

/* Public waiting pane: what the assistant can do here, and the way in. */
body.glass-public .pane-idle { pointer-events: auto; }
body.glass-idle .pane-idle .gi--public { max-width: 460px; }
body.glass-idle .pane-idle .gi-pr { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .15rem; }
body.glass-idle .pane-idle .gi-pr li { display: flex; align-items: center; gap: .65rem; padding: .42rem .55rem; border-radius: 7px; font-size: 1rem; line-height: 1.35; color: rgba(250,249,247,.62); transition: color .4s, background .4s; }
body.glass-idle .pane-idle .gi-dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(250,249,247,.4); flex: none; transition: background .4s, border-color .4s, box-shadow .4s; }
body.glass-idle .pane-idle .gi-pr li.seen { color: rgba(250,249,247,.85); }
body.glass-idle .pane-idle .gi-pr li.seen .gi-dot { background: rgba(168,220,232,.55); border-color: transparent; }
body.glass-idle .pane-idle .gi-pr li.on { color: #faf9f7; background: rgba(250,249,247,.07); }
body.glass-idle .pane-idle .gi-pr li.on .gi-dot { background: #e8b04b; border-color: transparent; box-shadow: 0 0 10px rgba(232,176,75,.7); }
body.glass-idle .pane-idle .gi--public .gi-sub { margin-top: 1.1rem; max-width: 40ch; }
body.glass-idle .pane-idle .gi-actions { display: flex; align-items: center; gap: 1.1rem; margin-top: 1.3rem; flex-wrap: wrap; }
body.glass-idle .pane-idle .gi-btn { font: 600 .92rem "Source Sans 3", system-ui, sans-serif; padding: .62rem 1.15rem; border-radius: 999px; border: 0; background: #faf9f7; color: #0e1a1f; cursor: pointer; }
body.glass-idle .pane-idle .gi-btn:hover { background: #fff; }
body.glass-idle .pane-idle .gi-link { font: 600 .92rem "Source Sans 3", system-ui, sans-serif; padding: .2rem 0; border: 0; border-bottom: 1px solid rgba(168,220,232,.4); background: none; color: #a8dce8; cursor: pointer; }
body.glass-idle .pane-idle .gi-link:hover { color: #faf9f7; border-bottom-color: #faf9f7; }
body.glass-idle .pane-idle .gi-btn:focus-visible, body.glass-idle .pane-idle .gi-link:focus-visible { outline: 2px solid #a8dce8; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { body.glass-idle .pane-idle .gi-pr li, body.glass-idle .pane-idle .gi-dot { transition: none; } }

/* The work, in the waiting pane (homepage). Public: beside the principles; logged in: the whole list. */
body.glass-idle .pane-idle .gi-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.4rem; align-items: start; }
body.glass-idle .pane-idle .gi-cols .gi { max-width: none; }
body.glass-idle .pane-idle .gi-work { list-style: none; margin: .2rem 0 0; padding: 0; border-top: 1px solid rgba(250,249,247,.14); }
body.glass-idle .pane-idle .gi-work li { border-bottom: 1px solid rgba(250,249,247,.14); }
body.glass-idle .pane-idle .gi-w { display: grid; grid-template-columns: 1fr; column-gap: .4rem; width: 100%; text-align: left; padding: .62rem .5rem; border: 0; border-radius: 4px; background: none; color: inherit; cursor: pointer; font: inherit; transition: background .3s; }
body.glass-idle .pane-idle .gi-w:hover, body.glass-idle .pane-idle .gi-w:focus-visible { background: rgba(250,249,247,.08); outline: none; }
body.glass-idle .pane-idle .gi-w:focus-visible { box-shadow: inset 0 0 0 2px #a8dce8; }
body.glass-idle .pane-idle .gi-wk { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(168,220,232,.7); }
body.glass-idle .pane-idle .gi-wt { display: block; margin-top: .15rem; font-size: .92rem; line-height: 1.35; color: rgba(250,249,247,.9); }
body.glass-idle.live .pane-idle, body.glass-public .pane-idle { pointer-events: auto; }

.tc-btn { border: 0; border-bottom: 1px solid rgba(168,220,232,.35); background: none; padding: 0; cursor: pointer; font: inherit; font-weight: 600; }

/* The pane's close: × on wide screens; on phones, where an open page covers the conversation, it says where it goes. */
.pane-x .px-back { display: none; }
@media (max-width: 760px) {
  body .pane-x, body:is([data-ground="underground"], [data-ground="host"]) .pane-x { width: auto; height: 2.25rem; padding: 0 .7rem; margin-right: 0; border-radius: 999px;
    border: 1px solid color-mix(in srgb, currentColor 35%, transparent); font: 600 .78rem/1 var(--sans, system-ui); letter-spacing: .01em; white-space: nowrap; }
  .pane-x .px-back { display: inline; }
  .pane-x .px-x { display: none; }
}

/* Public waiting pane: the principles and the work sit in the middle of the glass, not on its top edge. */
@media (min-width: 761px) {   /* phones keep the waiting pane hidden; the chat is the whole window there */
  body.glass-public .pane-idle { display: flex; flex-direction: column; justify-content: safe center; }
  body.glass-public .pane-idle .gi-cols { width: 100%; }
}

/* The portfolio password, in the access pane: one field and Unlock, above the request form. */
.access-pw { margin-top: 1.4rem; padding: 1rem 1.1rem; border-radius: 10px; background: #f1f3f2; border: 1px solid #dde3e1; }
.access-pw label { display: grid; gap: .45rem; font-size: .82rem; font-weight: 600; color: #3d464d; }
.access-row { display: flex; gap: .5rem; }
.access-pw input { flex: 1; min-width: 0; font: 400 1rem "Source Sans 3", system-ui, sans-serif; padding: .65rem .8rem; border: 1px solid #c9d1d6; border-radius: 8px; background: #fff; color: #1a1f24; }
.access-pw input:focus { outline: 2px solid #2c5f6e; outline-offset: 1px; border-color: #2c5f6e; }
.access-pw button { font: 600 .95rem "Source Sans 3", system-ui, sans-serif; padding: .65rem 1.2rem; border: 0; border-radius: 999px; background: #2c5f6e; color: #faf9f7; cursor: pointer; }
.access-pw button[disabled] { opacity: .6; cursor: default; }
.access-pw .access-m { margin-top: .4rem; }
#page .access .access-or { margin: 1.4rem 0 0; font-size: .95rem; line-height: 1.5; color: #3d464d; }

/* Public waiting pane: what this is (one project), above the principles. */
body.glass-idle .pane-idle .gi-lead { margin: 0; font-size: 1rem; line-height: 1.5; color: rgba(250,249,247,.88); max-width: 42ch; }
body.glass-idle .pane-idle .gi-label--sub { margin-top: 1.3rem; }

/* Phones, logged out: what the waiting pane offers, as a row under the greeting, and its list as a sheet. */
.pub-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .7rem 0 0; }
.pub-row button { font: 600 .86rem "Source Sans 3", system-ui, sans-serif; padding: .5rem .85rem; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(168,220,232,.35); background: rgba(250,249,247,.06); color: #dfeff3; }
.pub-row button:first-child { background: #faf9f7; color: #1a1f24; border-color: transparent; }
.pub-index-l { list-style: none; margin: 1.1rem 0 0; padding: 0; border-top: 1px solid #dde3e1; }
.pub-index-l button { display: grid; grid-template-columns: 1fr; gap: .3rem; width: 100%; text-align: left; padding: .8rem .2rem; border: 0; border-bottom: 1px solid #dde3e1; background: none; cursor: pointer; font: inherit; color: #1a1f24; }
.pub-index-l .pi-n { font: 400 .95rem var(--serif); color: #8a949b; }
.pub-index-l .pi-k { display: block; font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #2c5f6e; }
.pub-index-l .pi-t { display: block; font-size: 1rem; line-height: 1.35; }

/* An app that draws itself after its page loads (the live app, Storybook): a line while it draws. */
.app-wait { position: absolute; right: .8rem; top: .8rem; z-index: 3; padding: .45rem .9rem; border-radius: 999px;
  background: rgba(26,31,36,.86); color: #faf9f7; font: 600 .8rem "Source Sans 3", system-ui, sans-serif; pointer-events: none; transition: opacity .45s; }
.app-wait.gone { opacity: 0; }

/* The free summary came back for a full write-up (access expired on this browser): say so, take the password. */
.page.page--real.page--lapsed { display: flex; flex-direction: column; }
.page--lapsed iframe.real-page { flex: 1; height: auto; min-height: 0; }
.lapsed { flex: none; padding: .9rem 1.1rem 1rem; background: #f1f3f2; border-bottom: 1px solid #dde3e1; color: #1a1f24; }
.lapsed-t { margin: 0 0 .6rem; font: 400 .95rem/1.45 "Source Sans 3", system-ui, sans-serif; }
.lapsed .access-pw { margin: 0; padding: 0; background: none; border: 0; }

/* A console door's chapter in the thread: which discipline, which artifact, as it loads. */
.sysline--chapter { align-self: flex-start; margin-top: .4rem; padding: .25rem .7rem; border-radius: 999px; border: 1px solid rgba(232,176,75,.35);
  background: rgba(232,176,75,.08); color: #f0d49a; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.sysline--chapter .sl-dot { background: #e8b04b; box-shadow: 0 0 8px rgba(232,176,75,.6); }

/* UX review 2026-09-28 (item 6): the principles as one compact lit row under the actions */
body.glass-idle .pane-idle .gi-pr--line { display: flex; flex-wrap: wrap; gap: .3rem .35rem; }
body.glass-idle .pane-idle .gi-pr--line li { padding: .22rem .6rem .22rem .5rem; gap: .4rem; font-size: .8rem; border: 1px solid rgba(250,249,247,.12); border-radius: 999px; }
body.glass-idle .pane-idle .gi--public .gi-actions { margin-top: 1.4rem; }
body.glass-idle .pane-idle .gi--guide-home .gi-actions { margin-top: .7rem; }
body.glass-idle .pane-idle .gi--guide-home .gi-guide-top .gi-lead { font-size: .98rem; line-height: 1.45; }
body.glass-idle .pane-idle .gi--guide-home .gi-sub { margin-top: .5rem; }
.pub-row.brief-back a { font: 600 .86rem "Source Sans 3", system-ui, sans-serif; color: #a8dce8; text-decoration: none; border-bottom: 1px solid rgba(168,220,232,.4); padding: .15rem 0; }
.pub-row.brief-back a:hover, .pub-row.brief-back a:focus-visible { color: #faf9f7; border-bottom-color: #faf9f7; }

/* ?pane=solid (the PAI write-up, author 2026-09-29): the panel waits on a solid dark surface instead of the ground
   imagery; the idle line and the open animation (slit, beam, sheet) are unchanged. Desktop only: on phones the pane
   is a sheet over the chat. Same inset as the page sheet, so a page opens exactly over it. */
@media (min-width: 761px) {
  body[data-pane="solid"] .pane-col::before { content: ""; position: absolute; top: 12px; right: 0; bottom: 12px; left: 12px; z-index: 0;
    border-radius: 11px; background: #0c1519; border: 1px solid rgba(250,249,247,.08); }
  body[data-pane="solid"]:is([data-ground="underground"], [data-ground="host"]) .pane-col::before { top: 14px; bottom: 14px; left: 0; right: 14px; }
  body[data-pane="solid"] .pane-idle { z-index: 1; }
}

/* Waiting pane, skimmable (author 2026-09-29): the six pieces grouped by stage, two titles a row. */
body.glass-idle .gi--skim { max-width: 760px; }
body.glass-idle .gi--skim .gi-sub { max-width: 48ch; margin-top: .45rem; }
body.glass-idle .pane-idle .gi-groups { margin-top: 1.6rem; border-top: 1px solid rgba(250,249,247,.14); padding: 0; list-style: none; }
body.glass-idle .pane-idle .gi-g { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .8rem; align-items: start; padding: .85rem 0; border-bottom: 1px solid rgba(250,249,247,.14); }
body.glass-idle .pane-idle .gi-gk { margin: .45rem 0 0; display: flex; gap: .55rem; align-items: baseline; font: 600 .66rem/1.2 var(--sans, system-ui); letter-spacing: .12em; text-transform: uppercase; color: rgba(168,220,232,.8); }
body.glass-idle .pane-idle .gi-gk span { font: 400 .95rem var(--serif); letter-spacing: 0; color: rgba(250,249,247,.5); }
body.glass-idle .pane-idle .gi-gt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .9rem; }
body.glass-idle .pane-idle .gi-t { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; width: 100%; text-align: left; padding: .45rem .55rem; border: 0; border-radius: 6px; background: none; color: rgba(250,249,247,.9);
  font: 400 .93rem/1.35 var(--sans, system-ui); cursor: pointer; transition: background .25s, color .25s; }
body.glass-idle .pane-idle .gi-t span { opacity: 0; color: #a8dce8; transition: opacity .25s, transform .25s; transform: translateX(-4px); }
body.glass-idle .pane-idle .gi-t:hover, body.glass-idle .pane-idle .gi-t:focus-visible { background: rgba(250,249,247,.06); color: #fff; outline: none; }
body.glass-idle .pane-idle .gi-t:hover span, body.glass-idle .pane-idle .gi-t:focus-visible span { opacity: 1; transform: none; }
body.glass-idle .pane-idle .gi-t:focus-visible { box-shadow: 0 0 0 2px #a8dce8; }
@media (max-width: 1100px) { body.glass-idle .pane-idle .gi-gt { grid-template-columns: 1fr; } body.glass-idle .pane-idle .gi-g { grid-template-columns: 6rem minmax(0, 1fr); } }

/* The send / voice button sits above the text input that spans the field: clicking it starts voice, not typing
   (2026-09-30: the input covered it, so a click on the orb focused the box instead). */
.cfield .send { z-index: 3; }

/* Guide on a phone: the panel covers the chat, so the answer runs as a caption over the page (2026-09-30) */
.pane-caption { display: none; }
@media (max-width: 760px) {
  .pane-caption { display: block; position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; max-height: 38%; overflow-y: auto;
    padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom)); background: rgba(10,18,22,.95); color: #faf9f7;
    border-top: 1px solid rgba(250,249,247,.14); box-shadow: 0 -12px 28px rgba(0,0,0,.25); }
  .pane-caption__t { margin: 0; font: 400 .95rem/1.5 "Source Sans 3", system-ui, sans-serif; }
  .pane-caption__row { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .6rem; }
  .pane-caption__row button { all: unset; cursor: pointer; font: 600 .85rem "Source Sans 3", system-ui, sans-serif; padding: .45rem .9rem; border-radius: 999px; border: 1px solid rgba(250,249,247,.3); }
  .pane-caption__reply { background: #2c5f6e; border-color: #2c5f6e !important; }
  .pane-caption--min { max-height: 3.2rem; overflow: hidden; }
  .pane-caption--min .pane-caption__t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Guide homepage resting pane (2026-09-30): text at the top, the double diamond filling the rest */
body.glass-idle .pane-idle .gi--guide-home { display: block; max-width: none; }
body.glass-idle .pane-idle .gi--guide-home .gi-guide-top { max-width: 460px; }
/* the approach page runs at 60% so the diagram and the artifact rail under it (about 700px on the page) both fit */

body.glass-idle .pane-idle .gi--guide-home .gi-head { margin: 0 0 .55rem; font-family: var(--serif, "Source Serif 4", Georgia, serif); font-weight: 300; font-size: 1.7rem; line-height: 1.15; color: rgba(250,249,247,.96); }
body.glass-idle .pane-idle .gi-asks { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; max-width: 620px; }
body.glass-idle .pane-idle .gi-ask { font: 400 .9rem "Source Sans 3", system-ui, sans-serif; padding: .5rem .9rem; border-radius: 999px; border: 1px solid rgba(250,249,247,.18); background: rgba(250,249,247,.04); color: rgba(250,249,247,.88); cursor: pointer; text-align: left; }
body.glass-idle .pane-idle .gi-ask span { color: #a8dce8; }
body.glass-idle .pane-idle .gi-ask:hover, body.glass-idle .pane-idle .gi-ask:focus-visible { border-color: #a8dce8; background: rgba(168,220,232,.08); color: #faf9f7; }
body.glass-idle .pane-idle .gi-ask:focus-visible { outline: 2px solid #a8dce8; outline-offset: 3px; }
body.glass-idle .pane-idle .gi--guide-home > .gi-actions { margin-top: 1.3rem; }
/* the pane is as tall as the window beside it; the short guide content sits in its middle, not at its top (2026-10-05) */
body.glass-idle .pane-idle:has(> .gi--guide-home) { display: flex; flex-direction: column; justify-content: safe center; }
/* 2026-10-08: the :has() rule above outranks the phone rule that hides the resting pane (line ~194), so on phones the
   guide pane drew over the chat's own pills (author's iPhone screenshot). On a phone the chat is the whole window. */
@media (max-width: 760px) { body.glass-idle .pane-idle:has(> .gi--guide-home) { display: none; } }
body.glass-idle .pane-idle a.gi-ask { text-decoration: none; display: inline-block; }

/* The brief's pieces fit the pane, no scrolling (author 2026-10-01): the list takes the height left under the lede,
   each row gets a third of it, and the clip is sized by its row (container units), so three always show at once. */
body.glass-brief .pane-idle { overflow: hidden; }
body.glass-brief .pane-idle .gi--brief:has(.gi-bw--media) { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; }
body.glass-brief .pane-idle .gi--brief:has(.gi-bw--media) .gi-bw { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin-top: 1.1rem; }
body.glass-brief .pane-idle .gi-bw--media li { flex: 1 1 0; min-height: 0; display: flex; container-type: size; }
body.glass-brief .pane-idle .gi-bw--media button { flex: 1 1 auto; min-height: 0; align-items: center; grid-template-columns: auto minmax(0, 1fr); padding: .5rem .6rem; }
body.glass-brief .pane-idle .gi-bw--media .gi-bv { height: calc(100cqh - 1.1rem); max-height: 200px; width: auto; max-width: 230px; aspect-ratio: 1440 / 844; }
body.glass-brief .pane-idle .gi-bw--media .gi-bt { min-width: 0; }
body.glass-brief .pane-idle .gi-bw--media .gi-bk,
body.glass-brief .pane-idle .gi-bw--media .gi-bh { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@container (max-height: 150px) { body.glass-brief .pane-idle .gi-bw--media .gi-bd { display: none; } }
@container (max-height: 118px) { body.glass-brief .pane-idle .gi-bw--media .gi-bk { display: none; } }
/* A narrow pane (a small or zoomed window) gave the thumbnail its 230px and left the copy "I built the..."
   (author 2026-10-02): under 600px of row the thumbnail goes and the words get the width. */
@container (max-width: 600px) {
  body.glass-brief .pane-idle .gi-bw--media .gi-bv { display: none; }
  body.glass-brief .pane-idle .gi-bw--media button { grid-template-columns: minmax(0, 1fr); }
  body.glass-brief .pane-idle .gi-bw--media .gi-bh { -webkit-line-clamp: 3; }
}
body.glass-brief .pane-idle .gi--brief:has(.gi-bw--media) .gi-foot { flex: 0 0 auto; margin-top: .7rem; }

/* Was this reply useful? Thumbs in the actions row of live answers; a thumbs-down opens one optional line
   (author 2026-10-02: "PAI should capture feedback in chat sessions"). Outline icons, like Copy and Ask again. */
.acts .fb { display: inline-flex; align-items: center; gap: .25rem; margin-left: .35rem; padding-left: .45rem; border-left: 1px solid rgba(250,249,247,.14); }
.acts .fb-t { font-size: .74rem; color: rgba(250,249,247,.62); align-self: center; }
.acts .fb-f { display: inline-flex; align-items: center; gap: .35rem; }
.acts .fb-f input { width: min(240px, 52vw); height: 26px; padding: 0 .55rem; border-radius: 7px; border: 1px solid rgba(250,249,247,.22); background: rgba(250,249,247,.06); color: var(--paper, #faf9f7); font: inherit; font-size: .78rem; }
.acts .fb-f input::placeholder { color: rgba(250,249,247,.5); }
.acts .fb-f button { width: auto; padding: 0 .6rem; font-size: .74rem; font-weight: 600; color: var(--paper, #faf9f7); background: rgba(250,249,247,.1); }

/* PAI voice, one button. Local prototype, never deployed. */

/* the one button: Send · Stop · Voice */
.send .i-voice { opacity: 0; transform: scale(.4); }
.send .i-voice path { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.send.voice { background: linear-gradient(135deg, #2c5f6e, #3d7a8c); box-shadow: 0 0 0 1px rgba(168,220,232,.35), 0 0 18px rgba(168,220,232,.35); }
.send.voice .i-send { opacity: 0; transform: translateY(6px) scale(.5); }
.send.voice .i-voice { opacity: 1; transform: none; }
.send.voice .i-voice path { transform-origin: center; transform-box: fill-box; animation: bars calc(1.4s * var(--speed)) ease-in-out infinite; }
.send.voice .i-voice path:nth-child(2) { animation-delay: .12s; } .send.voice .i-voice path:nth-child(3) { animation-delay: .24s; }
.send.voice .i-voice path:nth-child(4) { animation-delay: .36s; } .send.voice .i-voice path:nth-child(5) { animation-delay: .48s; }
@keyframes bars { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }

/* the dock: one slim row above the composer (author 2026-10-01: not as tall, the words live in the chat and the
   field). The composer and the pills stay live, so a question can be typed while the voice is on. */
.voice-dock {
  position: relative; z-index: 12; display: flex; flex-direction: row; align-items: center; gap: 12px;
  margin: 0; padding: 8px 12px 6px 10px; border-radius: 24px 24px 0 0;
  background: rgba(22,29,29,.9); border: 0; border-bottom: 1px solid rgba(250,249,247,.08);
}
/* the dock and the field are one component: the dock is the field's top edge, the field keeps the bottom corners */
.chat.voice-on .composer .cfield { border-radius: 0 0 24px 24px; }
/* the composer's drawn outline traces the pill; it steps back while the dock reshapes it */
.frame .f-comp { transition: opacity .3s; }
.shell.voice-on .frame .f-comp { opacity: 0; }

/* the orb: size, glow and rings follow --lvl (0..1) — your voice while listening, the reply while speaking */
.vd-orb { --lvl: 0; position: relative; flex: none; width: 48px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.vd-orb:focus-visible { outline: 2px solid #a8dce8; outline-offset: 6px; }
.vd-core, .vd-ring { position: absolute; inset: 10px; border-radius: 50%; }
.vd-core {
  background: radial-gradient(circle at 36% 30%, #eefafd 0, #a8dce8 26%, #3d7a8c 58%, #0e1a1f 100%);
  transform: scale(calc(1 + .16 * var(--lvl)));
  box-shadow: 0 0 calc(18px + 46px * var(--lvl)) rgba(168,220,232, calc(.3 + .5 * var(--lvl))), inset 0 -8px 18px rgba(14,26,31,.55);
  transition: background .5s;
}
.vd-ring { border: 1.5px solid rgba(168,220,232,.55); transform: scale(calc(1 + var(--k) * var(--lvl))); opacity: calc(.12 + .7 * var(--lvl)); }
.vd-ring.r1 { --k: .45; } .vd-ring.r2 { --k: .85; border-color: rgba(168,220,232,.3); } .vd-ring.r3 { --k: 1.25; border-color: rgba(243,198,107,.28); }

.voice-dock[data-state="connecting"] .vd-core { animation: orb-in calc(.7s * var(--speed)) cubic-bezier(.34,1.56,.64,1) both; }
@keyframes orb-in { from { transform: scale(0); opacity: 0; } to { opacity: 1; } }
.voice-dock[data-state="connecting"] .vd-ring { animation: ring-out calc(1.1s * var(--speed)) cubic-bezier(.16,1,.3,1) infinite; }
.voice-dock[data-state="connecting"] .r2 { animation-delay: .18s; } .voice-dock[data-state="connecting"] .r3 { animation-delay: .36s; }
@keyframes ring-out { from { transform: scale(.9); opacity: .7; } to { transform: scale(1.9); opacity: 0; } }
.voice-dock[data-state="listening"] .vd-core { animation: breathe-orb calc(2.6s * var(--speed)) ease-in-out infinite; }
@keyframes breathe-orb { 50% { filter: brightness(1.12); } }
.voice-dock[data-state="thinking"] .vd-core::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(250,249,247,.75) 70%, transparent 85%); mix-blend-mode: screen;
  animation: swirl calc(1.1s * var(--speed)) linear infinite;
}
.voice-dock[data-state="thinking"] .r1 { border-style: dashed; animation: swirl calc(3s * var(--speed)) linear infinite; opacity: .6; }
@keyframes swirl { to { transform: rotate(360deg); } }
.voice-dock[data-state="speaking"] .vd-core { background: radial-gradient(circle at 36% 30%, #fff6e0 0, #f3c66b 22%, #a8dce8 48%, #2c5f6e 78%, #0e1a1f 100%); }
.voice-dock[data-state="idle"] .vd-core { filter: saturate(.5) brightness(.8); }
.vd-orb.barge .vd-core { animation: barge calc(.45s * var(--speed)) ease-out; }
@keyframes barge { 0% { box-shadow: 0 0 0 0 rgba(243,198,107,.9); } 100% { box-shadow: 0 0 0 26px rgba(243,198,107,0); } }

.vd-row { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.vd-state { font: 600 .7rem "Source Sans 3", system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: rgba(250,249,247,.62); text-align: left; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: #faf9f7;
  background: rgba(250,249,247,.06); border: 1px solid rgba(250,249,247,.16); }
.vd-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vd-btn:hover { border-color: rgba(168,220,232,.5); }
.vd-btn[aria-pressed="true"] { background: rgba(217,138,108,.25); border-color: rgba(217,138,108,.6); }
.vd-end { background: rgba(217,138,108,.18); border-color: rgba(217,138,108,.45); }

body.rm .vd-core, body.rm .vd-ring, body.rm .send.voice .i-voice path { animation: none !important; }
body.rm .vd-ring { transform: none; }
body.rm .vd-core { transform: none; }
@media (max-width: 760px) {
  .pane-col.open { pointer-events: none; }
  .pane-col.open .pane, .pane-col.open .err { pointer-events: auto; }
  .shell.voice-on .pane { bottom: calc(var(--dock-h, 170px) + 20px + env(safe-area-inset-bottom)); border-radius: 14px; }
}
.vd-debug { position: fixed; left: 12px; bottom: 56px; z-index: 99999; margin: 0; padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,.82); color: #a8dce8; font: 11px/1.45 ui-monospace, Menlo, monospace; pointer-events: none; white-space: pre; }
/* Back to the brief when /ask/ is its own tab: the site's lightbox close (round, hairline, x turns on hover) with a label
   that says where it goes (author 2026-10-02). */
.chat-head { position: relative; }
.brief-close { position: absolute; top: 18px; right: 18px; display: inline-flex; align-items: center; gap: .6rem; text-decoration: none;
  color: rgba(250,249,247,.82); font: 500 .82rem/1 var(--sans, system-ui); }
.brief-close__x { width: 2.5rem; height: 2.5rem; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 1px solid rgba(250,249,247,.2); background: rgba(250,249,247,.08); color: #faf9f7; transition: background-color .15s, border-color .15s, transform .25s; }
.brief-close:hover, .brief-close:focus-visible { color: #faf9f7; outline: none; }
.brief-close:hover .brief-close__x, .brief-close:focus-visible .brief-close__x { background: rgba(250,249,247,.16); border-color: rgba(250,249,247,.45); }
.brief-close:focus-visible .brief-close__x { box-shadow: 0 0 0 2px #a8dce8; }
@media (prefers-reduced-motion: no-preference) { .brief-close:hover .brief-close__x { transform: rotate(90deg); } }
@media (max-width: 760px) { .brief-close { top: 12px; right: 12px; } .brief-close__label { display: none; } }

