@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300..700&family=Geist+Mono:wght@400..600&display=swap');
/* Keystone — generated from tokens.json */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --ground: #0b0b0c;
  --ground-2: #111113;
  --surface: #161618;
  --surface-2: #1f1f22;
  --surface-3: #2a2a2e;
  --hover: #333338;
  --hairline: #ffffff17;
  --line: #ffffff24;
  --line-strong: #75747a;
  --ink: #f3f2ee;
  --ink-2: #bdbcb6;
  --ink-3: #95948e;
  --ink-4: #6e6d69;
  --primary: var(--ink);
  --on-primary: #0b0b0c;
  --focus: #8ab4ff;
  --info: #9cc2ff;
  --info-soft: #9cc2ff24;
  --ok: #7ddba0;
  --ok-soft: #7ddba024;
  --ask: #f5cf62;
  --ask-soft: #f5cf6226;
  --bad: #f4a9a4;
  --bad-soft: #f4a9a424;
  --live: #ff6b61;
  --bot-chief: #f3f2ee;
  --bot-chief-eye: #0b0b0c;
  --bot-eye: #ffffff;
  --bot-blue: #1083fd;
  --bot-pink: #ff2e9a;
  --bot-orange: #ff6a0d;
  --bot-green: #00c972;
  --bot-violet: #8a63f7;
  --bot-teal: #00b3a1;
  --bot-blue-deep: #062b5c;
  --bot-pink-deep: #4f0f2d;
  --bot-orange-deep: #4e1f00;
  --bot-green-deep: #003f22;
  --bot-violet-deep: #24175a;
  --bot-teal-deep: #003b35;
  --on-deep: #f6f5f2;
  --spectrum-1: #f27db6;
  --spectrum-2: #f6a15e;
  --spectrum-3: #6fd69f;
  --spectrum-4: #6fa9ff;
  --spectrum-5: #a98cfa;
  --epc-a: #008054;
  --epc-b: #19b459;
  --epc-c: #8dce46;
  --epc-d: #ffd500;
  --epc-e: #fcaa65;
  --epc-f: #ef8023;
  --epc-g: #e9153b;
  --epc-ink: #0b0b0c;
  --scrim: #000000a6;
  --shadow-float: 0 10px 30px #00000099;
  --shadow-window: 0 40px 100px #000000b3;
}
[data-theme="light"] {
  color-scheme: light;
  --ground: #f6f5f2;
  --ground-2: #efeee9;
  --surface: #ffffff;
  --surface-2: #f0efeb;
  --surface-3: #e5e3de;
  --hover: #dad8d2;
  --hairline: #0b0b0c14;
  --line: #0b0b0c1f;
  --line-strong: #8c8a83;
  --ink: #0b0b0c;
  --ink-2: #45443f;
  --ink-3: #63625c;
  --ink-4: #8c8a83;
  --primary: var(--ink);
  --on-primary: #ffffff;
  --focus: #0b57d0;
  --info: #0b57d0;
  --info-soft: #0b57d014;
  --ok: #0f7a41;
  --ok-soft: #0f7a4114;
  --ask: #8a5800;
  --ask-soft: #8a580017;
  --bad: #b3261e;
  --bad-soft: #b3261e14;
  --live: #d93025;
  --bot-chief: #0b0b0c;
  --bot-chief-eye: #ffffff;
  --scrim: #0b0b0c59;
  --shadow-float: 0 10px 30px #0b0b0c24;
  --shadow-window: 0 30px 80px #0b0b0c2e;
}
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --ease-out: cubic-bezier(.2,.8,.2,1);
  --ease-spring: cubic-bezier(.3,1.6,.5,1);
  --ease-glance: cubic-bezier(.65,0,.35,1);
  --ease-exit: cubic-bezier(.7,0,.2,1);
  --dur-tap: 160ms;
  --dur-flip: 320ms;
  --dur-ack: 420ms;
  --dur-reveal: 480ms;
  --dur-relay: 1800ms;
  --dur-loop: 16000ms;
  --font-sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.display { font-family: var(--font-sans); font-size: 64px; line-height: 1.0; font-weight: 500; letter-spacing: -0.035em; }
.h1 { font-family: var(--font-sans); font-size: 44px; line-height: 1.05; font-weight: 500; letter-spacing: -0.03em; }
.h2 { font-family: var(--font-sans); font-size: 30px; line-height: 1.12; font-weight: 500; letter-spacing: -0.02em; }
.h3 { font-family: var(--font-sans); font-size: 20px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
.lead { font-family: var(--font-sans); font-size: 19px; line-height: 1.5; font-weight: 400; }
.body { font-family: var(--font-sans); font-size: 16px; line-height: 1.55; font-weight: 400; }
.small { font-family: var(--font-sans); font-size: 14px; line-height: 1.45; font-weight: 400; }
.caption { font-family: var(--font-sans); font-size: 12.5px; line-height: 1.4; font-weight: 500; }
.bignum { font-family: var(--font-sans); font-size: 72px; line-height: 0.95; font-weight: 300; letter-spacing: -0.045em; }
.figure { font-family: var(--font-sans); font-size: 22px; line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; }
.mono { font-family: var(--font-mono); font-size: 13px; line-height: 1.45; font-weight: 400; }
.mono-sm { font-family: var(--font-mono); font-size: 11.5px; line-height: 1.4; font-weight: 500; }
.label { font-family: var(--font-sans); font-size: 11px; line-height: 1.3; font-weight: 600; letter-spacing: 0.08em; }

/* Keystone components. Every colour, space, radius, easing and duration is a token from tokens.json.
   Class prefix: k-. Load tokens.css first, then this file, then bundle.js (window.Keystone). */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .display, .h1, .h2, .h3 { text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.k-num { font-variant-numeric: tabular-nums; }
.k-turn { color: var(--ink-4); }
.k-muted { color: var(--ink-2); }
.k-meta { color: var(--ink-3); font-size: 14px; }
.k-label { font-size: 11px; line-height: 1.3; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.k-monotext { font-family: var(--font-mono); font-size: 13px; }
.k-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.k-stack { display: flex; flex-direction: column; gap: var(--space-4); }
.k-pad { padding: var(--space-5); }
.k-grow { flex: 1 1 auto; min-width: 0; }
.k-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--hairline); padding: var(--space-5); min-width: 0; }
.k-card--flat { background: var(--surface-2); box-shadow: none; }
.k-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.k-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 40px; padding: 0 18px; border: 0; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--ink); font-weight: 500; font-size: 15px; line-height: 1; cursor: pointer; white-space: nowrap; text-decoration: none; transition: transform var(--dur-tap) var(--ease-out), background-color var(--dur-tap) var(--ease-out), width var(--dur-reveal) var(--ease-out); }
.k-btn:hover { background: var(--surface-3); }
.k-btn:active, .k-btn.is-press { transform: scale(.96); }
.k-btn--primary { background: var(--primary); color: var(--on-primary); }
.k-btn--primary:hover { background: var(--primary); transform: translateY(-1px); }
.k-btn--ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.k-btn--ghost:hover { background: var(--surface-2); }
.k-btn--text { background: transparent; padding: 0 10px; color: var(--ink-2); }
.k-btn--text:hover { background: var(--surface-2); color: var(--ink); }
.k-btn--sm { height: 32px; padding: 0 14px; font-size: 13.5px; }
.k-btn--lg { height: 52px; padding: 0 26px; font-size: 17px; }
.k-btn .k-arr { display: inline-block; transition: transform var(--dur-flip) var(--ease-out); }
.k-btn:hover .k-arr { transform: translateX(3px); }
.k-btn svg { width: 18px; height: 18px; flex: none; }
.k-btn[disabled] { opacity: .45; pointer-events: none; }
.k-btn, .k-iconbtn, .k-seg button, .k-suggest button { font-family: var(--font-sans); }
/* approve morph: the pill becomes a check circle */
.k-btn.is-done { width: 40px !important; padding: 0; gap: 0; }
.k-btn.is-done > :not(.k-check) { display: none; }
.k-check { display: none; }
.k-btn.is-done .k-check { display: block; width: 20px; height: 20px; }
.k-check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: k-draw .42s var(--ease-out) .08s forwards; }
@keyframes k-draw { to { stroke-dashoffset: 0; } }
.k-iconbtn { width: 40px; height: 40px; border-radius: var(--radius-pill); border: 0; display: inline-grid; place-items: center; background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color var(--dur-tap) var(--ease-out), transform var(--dur-tap) var(--ease-out); }
.k-iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.k-iconbtn:active { transform: scale(.94); }
.k-iconbtn svg { width: 20px; height: 20px; }
/* the voice button: Grok Bot's round ink button with a level meter */
.k-voice { width: 44px; height: 44px; border-radius: var(--radius-pill); border: 0; background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; gap: 3px; cursor: pointer; flex: none; }
.k-voice i { width: 3px; height: 8px; border-radius: 2px; background: currentColor; transition: height var(--dur-tap) var(--ease-out); }
.k-voice i:nth-child(2), .k-voice i:nth-child(4) { height: 14px; }
.k-voice i:nth-child(3) { height: 18px; }
.k-voice.is-live i { animation: k-level .9s var(--ease-glance) infinite alternate; }
.k-voice.is-live i:nth-child(2) { animation-delay: -.3s; } .k-voice.is-live i:nth-child(3) { animation-delay: -.6s; } .k-voice.is-live i:nth-child(4) { animation-delay: -.15s; } .k-voice.is-live i:nth-child(5) { animation-delay: -.45s; }
@keyframes k-level { from { height: 5px; } to { height: 20px; } }

/* ---------- chips, marks, tags, honesty ---------- */
.k-chip { display: inline-flex; align-items: center; gap: var(--space-1); height: 24px; padding: 0 10px; border-radius: var(--radius-xs); background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 500; line-height: 1; white-space: nowrap; }
.k-chip--ok { background: var(--ok-soft); color: var(--ok); }
.k-chip--ask { background: var(--ask-soft); color: var(--ask); }
.k-chip--bad { background: var(--bad-soft); color: var(--bad); }
.k-chip--info { background: var(--info-soft); color: var(--info); }
.k-chip .k-bot { --size: 16px; margin-left: -4px; }
.k-mk { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; line-height: 1; flex: none; }
.k-mk--ok { background: var(--ok-soft); color: var(--ok); }
.k-mk--ask { background: var(--ask-soft); color: var(--ask); }
.k-mk--bad { background: var(--bad-soft); color: var(--bad); }
.k-mk.is-pop { animation: k-pop-in .45s var(--ease-spring) both; }
@keyframes k-pop-in { from { transform: scale(.4); opacity: 0; } }
.k-tool { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-3); font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.k-honest { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.k-honest::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.k-honest--synthetic { box-shadow: none; background-image: linear-gradient(90deg, var(--line-strong) 50%, transparent 0), linear-gradient(90deg, var(--line-strong) 50%, transparent 0), linear-gradient(0deg, var(--line-strong) 50%, transparent 0), linear-gradient(0deg, var(--line-strong) 50%, transparent 0); background-size: 8px 1px, 8px 1px, 1px 8px, 1px 8px; background-position: 0 0, 0 100%, 0 0, 100% 0; background-repeat: repeat-x, repeat-x, repeat-y, repeat-y; }
.k-honest--public::before { background: var(--info); }
.k-honest--simulated::before { background: var(--ask); }
.k-live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; color: var(--live); }
.k-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: k-pulse 1.6s var(--ease-out) infinite; }
@keyframes k-pulse { 0% { box-shadow: 0 0 0 0 var(--live); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

/* ---------- the bot avatar ---------- */
.k-bot { --size: 40px; --c: var(--bot-blue); --eye: var(--bot-eye); position: relative; display: inline-block; flex: none; width: var(--size); height: var(--size); vertical-align: middle; }
.k-bot[data-color="chief"] { --c: var(--bot-chief); --eye: var(--bot-chief-eye); }
.k-bot[data-color="blue"] { --c: var(--bot-blue); }
.k-bot[data-color="pink"] { --c: var(--bot-pink); }
.k-bot[data-color="orange"] { --c: var(--bot-orange); }
.k-bot[data-color="green"] { --c: var(--bot-green); }
.k-bot[data-color="violet"] { --c: var(--bot-violet); }
.k-bot[data-color="teal"] { --c: var(--bot-teal); }
.k-bot > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.k-bot .k-b-all { transform-box: view-box; transform-origin: 50px 56px; }
.k-bot .k-b-wrap { transform-box: view-box; transform-origin: 50px 56px; }
.k-bot .k-b-bob { transform-box: view-box; transform-origin: 50px 92px; }
.k-bot .k-b-body { fill: var(--c); }
.k-bot .k-b-look { transition: transform .3s var(--ease-glance); }
.k-bot .k-b-eyes { transform-box: fill-box; transform-origin: center; transition: transform .35s var(--ease-spring); }
.k-bot .k-b-eye { --tilt: -22deg; --sy: 1; transform-box: fill-box; transform-origin: center; transform: rotate(var(--tilt)) scaleY(var(--sy)); transition: transform .22s var(--ease-out); }
.k-bot .k-b-eye rect { fill: var(--eye); }
.k-bot .k-b-eye.is-blink { --sy: .1; transition-duration: .09s; }
.k-bot .k-b-dots circle { fill: var(--ink-3); opacity: 0; transform-box: fill-box; transform-origin: center; }
.k-bot .k-b-comet { fill: none; stroke-width: 7; stroke-linecap: round; opacity: 0; transform-box: view-box; transform-origin: 50px 56px; }
.k-bot .k-b-bar { fill: var(--c); transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); }
.k-bot .k-b-spark { fill: var(--c); opacity: 0; transform-box: view-box; transform-origin: 50px 56px; }
.k-bot .k-b-spark:nth-child(2n) { fill: var(--spectrum-4); }
.k-bot .k-b-spark:nth-child(3n) { fill: var(--spectrum-1); }
.k-bot .k-b-halo { fill: none; stroke: var(--ask); stroke-width: 3; opacity: 0; transform-box: view-box; transform-origin: 50px 56px; }
/* idle: calm and slightly curious, a slow breath; JS moves the eyes */
.k-bot[data-state="idle"] .k-b-bob { animation: k-breathe 4.8s ease-in-out infinite; }
@keyframes k-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, .982); } }
/* ack: a hop when work arrives (class added for one beat) */
.k-bot.k-bot.is-ack .k-b-bob { animation: k-hop var(--dur-ack) var(--ease-spring); }
.k-bot.k-bot.is-ack .k-b-eyes { transform: scale(1.25); }
@keyframes k-hop { 0% { transform: scale(1, 1); } 25% { transform: translateY(1px) scale(1.08, .9); } 55% { transform: translateY(-14px) scale(.95, 1.06); } 100% { transform: none; } }
/* working: kicks into gear, eyes wide and up, a rock */
.k-bot[data-state="working"] .k-b-bob { animation: k-rock .85s ease-in-out infinite alternate; }
.k-bot[data-state="working"] .k-b-eyes { transform: scale(1.18); }
@keyframes k-rock { from { transform: rotate(-4deg); } to { transform: rotate(4deg) translateY(-2px); } }
/* waiting on a person: eyes drift, a slow lean, an amber halo */
.k-bot[data-state="waiting"] .k-b-bob { animation: k-lean 3.2s ease-in-out infinite; }
.k-bot[data-state="waiting"] .k-b-eyes { transform: scale(.9); }
.k-bot[data-state="waiting"] .k-b-halo { animation: k-halo 2.4s var(--ease-out) infinite; }
@keyframes k-lean { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes k-halo { 0% { opacity: .9; transform: scale(.92); } 80%, 100% { opacity: 0; transform: scale(1.22); } }
/* thinking: the bot folds into its own three dots, a spectrum trail circles */
.k-bot[data-state="thinking"] .k-b-wrap { animation: k-fold .42s var(--ease-out) forwards; }
.k-bot[data-state="thinking"] .k-b-eyes { transform: scale(0); }
.k-bot[data-state="thinking"] .k-b-dots circle { animation: k-dot 1.1s ease-in-out .3s infinite; }
.k-bot[data-state="thinking"] .k-b-dots circle:last-child { animation-delay: .66s; }
.k-bot[data-state="thinking"] .k-b-bob { animation: k-dot-body 1.1s ease-in-out .48s infinite; }
.k-bot[data-state="thinking"] .k-b-comet { opacity: 1; animation: k-orbit 1.15s linear infinite; }
@keyframes k-fold { to { transform: scale(.17); } }
@keyframes k-dot { 0%, 55%, 100% { opacity: .6; transform: translateY(0); } 25% { opacity: 1; transform: translateY(-5px); } }
@keyframes k-dot-body { 0%, 55%, 100% { transform: translateY(0); } 25% { transform: translateY(-30px); } }
@keyframes k-orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* blocked: spins down into the dot of a "!", then wiggles until someone helps */
.k-bot[data-state="blocked"] .k-b-wrap { transform-origin: 50px 80px; animation: k-spin-out .62s cubic-bezier(.5,0,.75,0) forwards; }
.k-bot[data-state="blocked"] .k-b-eyes { transform: scale(0); transition-delay: .3s; }
.k-bot[data-state="blocked"] .k-b-bar { animation: k-bar-in .5s var(--ease-spring) .58s forwards; }
.k-bot[data-state="blocked"] .k-b-all { animation: k-wiggle 2.6s ease-in-out 1.2s infinite; }
@keyframes k-spin-out { to { transform: rotate(540deg) scale(.2); } }
@keyframes k-bar-in { to { transform: scaleY(1); } }
@keyframes k-wiggle { 0%, 30%, 100% { transform: rotate(0); } 6% { transform: rotate(-9deg); } 12% { transform: rotate(8deg); } 18% { transform: rotate(-5deg); } 24% { transform: rotate(3deg); } }
/* done: pops back with happy eyes and a few sparks */
.k-bot[data-state="done"] .k-b-wrap { animation: k-done-pop .7s var(--ease-spring) both; }
.k-bot[data-state="done"] .k-b-eye { --tilt: 0deg; --sy: .42; }
.k-bot[data-state="done"] .k-b-spark { animation: k-spark .8s var(--ease-out) .18s both; }
@keyframes k-done-pop { 0% { transform: scale(.25); } 60% { transform: scale(1.09); } 100% { transform: scale(1); } }
@keyframes k-spark { 0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-58px) scale(1); } }
/* the current action, revealed on hover or focus (progressive disclosure) */
.k-bot[data-say]:not([data-say=""]) { cursor: default; }
.k-bot .k-b-say { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); opacity: 0; pointer-events: none; z-index: 5; max-width: 240px; width: max-content; padding: 6px 10px; border-radius: var(--radius-xs); background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow-float); font-size: 12.5px; font-weight: 500; line-height: 1.35; transition: opacity var(--dur-tap) var(--ease-out), transform var(--dur-tap) var(--ease-out); }
.k-bot:hover .k-b-say, .k-bot:focus-visible .k-b-say { opacity: 1; transform: translate(-50%, 0); }

/* ---------- shimmer status line ---------- */
.k-say { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 14px; color: var(--ink-2); min-height: 20px; }
.k-say__text { display: inline-block; }
.k-say.is-working .k-say__text { color: transparent; background: linear-gradient(90deg, var(--ink-3) 0%, var(--ink-3) 40%, var(--ink) 50%, var(--ink-3) 60%, var(--ink-3) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; animation: k-shimmer 1.8s linear infinite; }
@keyframes k-shimmer { from { background-position: 100% 0; } to { background-position: 0% 0; } }
.k-flip { display: inline-block; animation: k-flip var(--dur-flip) var(--ease-out); }
@keyframes k-flip { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } }
.k-caret::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: currentColor; animation: k-caret 1s steps(1) infinite; }
@keyframes k-caret { 50% { opacity: 0; } }

/* ---------- roster ---------- */
.k-roster { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2); background: var(--ground-2); border-radius: var(--radius-lg); }
.k-roster__item { display: flex; align-items: center; gap: var(--space-3); padding: 10px var(--space-3); border: 0; border-radius: var(--radius-md); background: transparent; text-align: left; cursor: pointer; transition: background-color var(--dur-tap) var(--ease-out); min-width: 0; width: 100%; }
.k-roster__item:hover { background: var(--surface-2); }
.k-roster__item[aria-current="true"] { background: var(--surface-2); }
.k-roster__item .k-bot { --size: 36px; }
.k-roster__name { display: block; font-size: 15px; font-weight: 500; color: var(--ink); }
.k-roster__sub { display: block; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-roster__item .k-badge { margin-left: auto; }
.k-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--primary); color: var(--on-primary); font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }

/* ---------- thread ---------- */
.k-thread { display: flex; flex-direction: column; gap: var(--space-3); }
.k-msg { max-width: 82%; padding: 12px 16px; border-radius: var(--radius-lg); background: var(--surface-2); color: var(--ink); font-size: 15.5px; line-height: 1.5; animation: k-rise var(--dur-reveal) var(--ease-out) both; }
.k-msg--me { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 6px; }
.k-msg--bot { align-self: flex-start; border-bottom-left-radius: 6px; }
.k-msg ul { margin: 6px 0 0; padding-left: 18px; }
.k-msg .k-cite { vertical-align: 1px; }
.k-from { display: flex; align-items: center; gap: var(--space-2); font-size: 13px; color: var(--ink-3); }
.k-from .k-bot { --size: 22px; }
.k-from b { color: var(--ink); font-weight: 500; }
.k-event { display: flex; align-items: center; gap: var(--space-2); padding: 6px 4px; font-size: 13.5px; color: var(--ink-3); animation: k-rise var(--dur-reveal) var(--ease-out) both; }
.k-event svg { width: 16px; height: 16px; flex: none; }
.k-event b { color: var(--ink-2); font-weight: 500; }
.k-event a { margin-left: auto; color: var(--info); text-decoration: none; font-weight: 500; }
@keyframes k-rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }

/* ---------- ask bar ---------- */
.k-ask { display: flex; align-items: center; gap: var(--space-2); }
.k-ask__field { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--space-1); height: 48px; padding: 0 6px 0 4px; border-radius: var(--radius-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--dur-tap) var(--ease-out); }
.k-ask__field:focus-within { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.k-ask__field input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15.5px; outline: none; }
.k-ask__field input::placeholder { color: var(--ink-3); }
.k-suggest { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.k-suggest button { height: 32px; padding: 0 14px; border-radius: var(--radius-pill); border: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 13.5px; cursor: pointer; transition: background-color var(--dur-tap) var(--ease-out), transform var(--dur-tap) var(--ease-out); }
.k-suggest button:hover { background: var(--surface-2); color: var(--ink); }
.k-suggest button:active { transform: scale(.96); }

/* ---------- action feed ---------- */
.k-feed { position: relative; height: 168px; overflow: hidden; border-radius: var(--radius-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28%, #000 100%); mask-image: linear-gradient(180deg, transparent 0, #000 28%, #000 100%); }
.k-feed__list { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: var(--space-2) var(--space-4); }
.k-feed__row { display: flex; align-items: baseline; gap: var(--space-3); padding: 5px 0; font-size: 14px; color: var(--ink-2); animation: k-rise .4s var(--ease-out) both; }
.k-feed__row b { font-weight: 500; color: var(--ink); }
.k-feed__row span { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.k-feed__row.is-now b { color: transparent; background: linear-gradient(90deg, var(--ink-3) 40%, var(--ink) 50%, var(--ink-3) 60%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; animation: k-shimmer 1.8s linear infinite; }

/* ---------- handoff relay ---------- */
.k-relay { position: relative; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: var(--space-3); padding-top: 8px; }
.k-relay__track { position: absolute; left: 12.5%; right: 12.5%; top: 36px; height: 2px; background-image: linear-gradient(90deg, var(--line-strong) 50%, transparent 0); background-size: 8px 2px; }
.k-relay[style*="--n:3"] .k-relay__track, .k-relay[style*="--n: 3"] .k-relay__track { left: 16.6%; right: 16.6%; }
.k-relay[style*="--n:5"] .k-relay__track, .k-relay[style*="--n: 5"] .k-relay__track { left: 10%; right: 10%; }
.k-relay__node { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; min-width: 0; }
.k-relay__node .k-bot { --size: 56px; }
.k-relay__node b { font-size: 14px; font-weight: 500; }
.k-relay__node .k-tool { margin-top: -2px; }
.k-relay__node small { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; min-height: 2.7em; }
.k-relay__node.is-on small { color: var(--ink-2); }
.k-fly { position: fixed; z-index: 50; left: 0; top: 0; pointer-events: none; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow-float); font-size: 12.5px; font-weight: 500; white-space: nowrap; will-change: transform; }
.k-fly--cite { background: var(--info-soft); color: var(--info); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-family: var(--font-mono); font-size: 12px; }

/* ---------- routine ---------- */
.k-routine { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-2) var(--space-3); align-items: center; }
.k-routine__clock { width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); }
.k-routine__clock svg { width: 22px; height: 22px; }
.k-routine__clock .k-hand { transform-box: view-box; transform-origin: 12px 12px; transition: transform .9s var(--ease-out); }
.k-routine.is-on .k-routine__clock .k-hand { transform: rotate(360deg); }
.k-routine__name { font-weight: 500; }
.k-routine__when { display: block; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); }
.k-routine__last { grid-column: 2 / 4; display: flex; align-items: center; gap: var(--space-2); font-size: 13.5px; color: var(--ink-3); }
.k-routine:not(.is-on) .k-routine__name { color: var(--ink-3); }
.k-switch { position: relative; width: 44px; height: 26px; border-radius: var(--radius-pill); border: 0; padding: 0; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong); cursor: pointer; transition: background-color var(--dur-flip) var(--ease-out), box-shadow var(--dur-flip) var(--ease-out); }
.k-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink-2); transition: transform var(--dur-flip) var(--ease-spring), background-color var(--dur-flip) var(--ease-out); }
.k-switch[aria-checked="true"] { background: var(--primary); box-shadow: none; }
.k-switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--on-primary); }

/* ---------- approval & learning ---------- */
.k-approve { display: grid; gap: var(--space-4); padding: var(--space-5); border-radius: var(--radius-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); overflow: hidden; transition: opacity var(--dur-reveal) var(--ease-exit), transform var(--dur-reveal) var(--ease-exit), max-height var(--dur-reveal) var(--ease-exit), padding var(--dur-reveal) var(--ease-exit), margin var(--dur-reveal) var(--ease-exit); max-height: 900px; }
.k-approve__head { display: flex; align-items: center; gap: var(--space-3); }
.k-approve__head .k-bot { --size: 36px; }
.k-approve__head small { display: block; color: var(--ink-3); font-size: 13px; }
.k-approve__head b { font-weight: 500; }
.k-approve__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.k-approve__actions .k-btn--primary { margin-left: auto; }
.k-approve.is-gone { opacity: 0; transform: translateY(-8px) scale(.98); max-height: 0; padding-top: 0; padding-bottom: 0; margin: 0; }
.k-diff { display: grid; gap: 2px; border-radius: var(--radius-sm); overflow: hidden; font-size: 14px; }
.k-diff > div { display: flex; gap: var(--space-3); align-items: baseline; padding: 8px 12px; background: var(--surface-2); }
.k-diff > div::before { font-family: var(--font-mono); font-weight: 600; width: 10px; flex: none; }
.k-diff .k-del { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--bad); }
.k-diff .k-del::before { content: "−"; color: var(--bad); }
.k-diff .k-add::before { content: "+"; color: var(--ok); }
.k-diff .k-add { color: var(--ink); }
.k-diff span { margin-left: auto; }
.k-learn { display: flex; gap: var(--space-3); align-items: flex-start; }
.k-learn__icon { width: 32px; height: 32px; border-radius: var(--radius-pill); background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.k-learn__icon svg { width: 18px; height: 18px; }
.k-count-bump { display: inline-block; animation: k-bump .5s var(--ease-spring); }
@keyframes k-bump { 40% { transform: translateY(-6px) scale(1.2); } }

/* ---------- toast ---------- */
.k-toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: var(--space-2); align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.k-toast { position: relative; display: flex; align-items: center; gap: var(--space-3); min-height: 48px; padding: 6px 6px 6px 16px; border-radius: var(--radius-md); background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow-float); font-size: 14.5px; pointer-events: auto; overflow: hidden; animation: k-toast-in .42s var(--ease-spring) both; }
.k-toast .k-mk { flex: none; }
.k-toast button { height: 36px; padding: 0 14px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--info); font-weight: 600; cursor: pointer; }
.k-toast button:hover { background: var(--surface-2); }
.k-toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--line-strong); transform-origin: left; animation: k-timer var(--ms, 5000ms) linear forwards; }
.k-toast.is-out { animation: k-toast-out .3s var(--ease-exit) forwards; }
@keyframes k-toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes k-toast-out { to { opacity: 0; transform: translateY(10px); } }
@keyframes k-timer { to { transform: scaleX(0); } }

/* ---------- takeover ---------- */
.k-takeover { display: grid; gap: var(--space-4); padding: var(--space-5); border-radius: var(--radius-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline), 0 0 0 1px var(--ask-soft); }
.k-takeover__screen { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--radius-sm); background: var(--ground-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: transform var(--dur-reveal) var(--ease-out), box-shadow var(--dur-reveal) var(--ease-out); }
.k-takeover.is-yours .k-takeover__screen { box-shadow: inset 0 0 0 2px var(--focus); }
.k-takeover__bar { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; background: var(--surface-2); font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); }
.k-takeover__bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.k-takeover__bar span { margin-left: 6px; }
.k-takeover__page { padding: 10px 12px; display: grid; gap: 6px; }
.k-takeover__page i { display: block; height: 6px; border-radius: 3px; background: var(--surface-3); }
.k-takeover__smudge { position: absolute; left: 34%; top: 46%; width: 36%; height: 30%; border-radius: 40%; background: var(--ask-soft); filter: blur(6px); }
.k-cursor { position: absolute; width: 14px; height: 14px; left: 30%; top: 40%; transition: left .9s var(--ease-glance), top .9s var(--ease-glance); }
.k-cursor svg { width: 14px; height: 14px; display: block; }
.k-cursor path { fill: var(--ink); stroke: var(--ground); stroke-width: 1.5; }

/* ---------- citation & source peek ---------- */
.k-cite { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border: 0; border-radius: var(--radius-xs); background: var(--info-soft); color: var(--info); font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; line-height: 1; cursor: pointer; white-space: nowrap; vertical-align: middle; transition: transform var(--dur-tap) var(--ease-out); }
.k-cite svg { width: 12px; height: 12px; }
.k-cite:hover { transform: translateY(-1px); }
.k-cite__pop { position: absolute; z-index: 20; left: 0; top: calc(100% + 8px); display: none; width: 300px; max-width: 80vw; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow-float); font-family: var(--font-sans); font-size: 13.5px; font-weight: 400; line-height: 1.5; white-space: normal; text-align: left; animation: k-cite-in var(--dur-tap) var(--ease-out); }
.k-cite.is-right .k-cite__pop { left: auto; right: 0; }
.k-cite__pop small { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); }
.k-cite:hover .k-cite__pop, .k-cite:focus-visible .k-cite__pop, .k-cite.is-open .k-cite__pop { display: block; }
@keyframes k-cite-in { from { opacity: 0; transform: translateY(-4px); } }
.k-hl { background-image: linear-gradient(var(--info-soft), var(--info-soft)); background-repeat: no-repeat; background-size: 0% 100%; border-radius: 3px; padding: 0 2px; margin: 0 -2px; transition: background-size .7s var(--ease-glance); color: inherit; }
.k-hl.is-on { background-size: 100% 100%; color: var(--ink); }
.k-doc { position: relative; padding: var(--space-4) var(--space-5); border-radius: var(--radius-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); font-size: 13px; line-height: 1.65; color: var(--ink-3); min-width: 0; }
.k-doc__head { display: flex; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.k-doc p + p { margin-top: 8px; }
.k-doc b { color: var(--ink-2); font-weight: 600; }
.k-field { display: grid; gap: 4px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--surface-2); min-width: 0; }
.k-field small { font-size: 12px; color: var(--ink-3); }
.k-field__val { font-size: 17px; font-weight: 500; min-height: 26px; display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.k-field.is-landed { animation: k-land .5s var(--ease-spring); }
@keyframes k-land { 30% { transform: scale(1.03); box-shadow: 0 0 0 2px var(--info-soft); } }

/* ---------- extraction table & rent roll ---------- */
.k-tablewrap { overflow-x: auto; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--hairline); background: var(--surface); }
.k-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.k-table th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.k-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.k-table tr:last-child td { border-bottom: 0; }
.k-table td.k-r, .k-table th.k-r { text-align: right; white-space: nowrap; }
.k-table td:first-child { white-space: nowrap; }
.k-table .k-why { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.k-table tr.is-ask td { background: var(--ask-soft); }
.k-table tr.is-new td { animation: k-row-in 1.6s var(--ease-out) both; }
@keyframes k-row-in { 0% { background: var(--info-soft); opacity: 0; transform: translateY(-6px); } 20% { opacity: 1; transform: none; } 100% { background: transparent; } }
.k-raw { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-strong); margin-right: 6px; }

/* ---------- trace (provenance) ---------- */
.k-trace { position: relative; display: grid; gap: var(--space-4); padding-left: 28px; }
.k-trace::before { content: ""; position: absolute; left: 11px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.k-trace__line { position: absolute; left: 11px; top: 10px; width: 2px; height: calc(100% - 20px); background: var(--info); transform-origin: top; transform: scaleY(0); transition: transform 1.2s var(--ease-glance); }
.k-trace.is-on .k-trace__line { transform: scaleY(1); }
.k-trace__step { position: relative; display: grid; gap: 4px; opacity: .35; transition: opacity var(--dur-flip) var(--ease-out); }
.k-trace.is-on .k-trace__step { opacity: 1; }
.k-trace.is-on .k-trace__step:nth-child(3) { transition-delay: .25s; } .k-trace.is-on .k-trace__step:nth-child(4) { transition-delay: .5s; } .k-trace.is-on .k-trace__step:nth-child(5) { transition-delay: .75s; } .k-trace.is-on .k-trace__step:nth-child(6) { transition-delay: 1s; }
.k-trace__step::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--info); }
.k-trace__step.is-claim::before { background: var(--info); }
.k-trace__step .k-row { gap: 6px; }
.k-trace__step b { font-weight: 500; }
.k-trace__step small { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.k-trace__step .k-bot { --size: 20px; }

/* ---------- metrics ---------- */
.k-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2px; border-radius: var(--radius-xl); overflow: hidden; }
.k-metric { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-6); background: var(--surface); min-width: 0; }
.k-metric__val { font-size: 56px; line-height: .95; font-weight: 300; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-metric__val.is-bad { color: var(--bad); }
.k-metric__val.is-ok { color: var(--ok); }
.k-metric__label { font-size: 14px; color: var(--ink-2); }
.k-metric__how { font-size: 12.5px; color: var(--ink-3); }
.k-metric .k-row { gap: 6px; }

/* ---------- property card + EPC ---------- */
.k-prop { display: grid; grid-template-columns: 112px 1fr; gap: var(--space-5); align-items: start; }
.k-prop__art { aspect-ratio: 1; max-width: 100%; border-radius: var(--radius-md); background: var(--surface-2); display: flex; align-items: flex-end; justify-content: center; padding: 14px 0 0; overflow: hidden; }
.k-tower { display: flex; flex-direction: column-reverse; gap: 3px; width: 54%; }
.k-tower i { height: 9px; border-radius: 2px; background: var(--surface-3); position: relative; }
.k-tower i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--c, var(--bot-blue)); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out); }
.k-tower i.is-on::after { transform: scaleX(1); }
.k-tower i.is-flag::after { background: var(--ask); transform: scaleX(1); }
.k-tower b { height: 10px; margin: 0 auto -1px; width: 0; border-left: 30px solid transparent; border-right: 30px solid transparent; border-bottom: 10px solid var(--surface-3); }
.k-prop__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }
.k-occ { display: flex; gap: 2px; height: 8px; margin-top: var(--space-3); border-radius: 4px; overflow: hidden; }
.k-occ i { flex: 1; background: var(--ok); }
.k-occ i.is-ask { background: var(--ask); }
.k-occ i.is-bad { background: var(--bad); }
.k-occ i.is-void { background: var(--surface-3); }
.k-epc { display: grid; gap: 3px; font-size: 12px; font-weight: 700; color: var(--epc-ink); }
.k-epc__band { position: relative; display: flex; align-items: center; height: 18px; padding-left: 8px; border-radius: 0 9px 9px 0; width: var(--w); transform-origin: left; animation: k-grow .6s var(--ease-out) both; }
.k-epc__band:nth-child(1) { --w: 34%; background: var(--epc-a); animation-delay: 0s; } .k-epc__band:nth-child(2) { --w: 44%; background: var(--epc-b); animation-delay: .05s; } .k-epc__band:nth-child(3) { --w: 54%; background: var(--epc-c); animation-delay: .1s; } .k-epc__band:nth-child(4) { --w: 64%; background: var(--epc-d); animation-delay: .15s; } .k-epc__band:nth-child(5) { --w: 74%; background: var(--epc-e); animation-delay: .2s; } .k-epc__band:nth-child(6) { --w: 84%; background: var(--epc-f); animation-delay: .25s; } .k-epc__band:nth-child(7) { --w: 94%; background: var(--epc-g); animation-delay: .3s; }
.k-epc__band em { position: absolute; left: calc(100% + 8px); font-style: normal; font-family: var(--font-mono); font-weight: 500; font-size: 11.5px; color: var(--ink); white-space: nowrap; opacity: 0; animation: k-fade .4s var(--ease-out) .7s forwards; }
.k-epc__band.is-min { box-shadow: 0 2px 0 -0px var(--ink); }
@keyframes k-grow { from { transform: scaleX(0); } }
@keyframes k-fade { to { opacity: 1; } }
.k-epc-mini { display: inline-flex; align-items: center; height: 22px; padding: 0 12px 0 8px; font-size: 12.5px; font-weight: 700; color: var(--epc-ink); clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%); }
.k-epc-mini[data-band="A"] { background: var(--epc-a); } .k-epc-mini[data-band="B"] { background: var(--epc-b); } .k-epc-mini[data-band="C"] { background: var(--epc-c); } .k-epc-mini[data-band="D"] { background: var(--epc-d); } .k-epc-mini[data-band="E"] { background: var(--epc-e); } .k-epc-mini[data-band="F"] { background: var(--epc-f); } .k-epc-mini[data-band="G"] { background: var(--epc-g); }

/* ---------- compliance ---------- */
.k-comply { display: grid; }
.k-comply__row { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.k-comply__row:last-child { border-bottom: 0; }
.k-comply__row b { display: block; font-weight: 500; font-size: 15px; }
.k-comply__row small { display: block; font-size: 13px; color: var(--ink-3); }
.k-comply__due { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); text-align: right; white-space: nowrap; }
.k-comply__row.is-bad .k-comply__due { color: var(--bad); }
.k-comply__row.is-ask .k-comply__due { color: var(--ask); }
.k-comply__row.is-bad .k-mk { animation: k-pulse-bad 2s var(--ease-out) infinite; }
@keyframes k-pulse-bad { 0% { box-shadow: 0 0 0 0 var(--bad-soft); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.k-comply__row.is-fixed { animation: k-sweep 1.1s var(--ease-glance); }
@keyframes k-sweep { 0% { background: linear-gradient(90deg, transparent 0%, var(--ok-soft) 0%, transparent 0%); } 50% { background: linear-gradient(90deg, transparent 0%, var(--ok-soft) 50%, transparent 100%); } 100% { background: transparent; } }

/* ---------- maintenance ticket ---------- */
.k-ticket { display: grid; gap: var(--space-4); }
.k-ticket__msg { padding: 12px 16px; border-radius: var(--radius-lg); border-bottom-left-radius: 6px; background: var(--surface-2); font-size: 15px; max-width: 520px; }
.k-ticket__msg small { display: block; margin-bottom: 4px; font-size: 12.5px; color: var(--ink-3); }
.k-ticket__tags { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.k-ticket__tags .k-chip { animation: k-pop-in .4s var(--ease-spring) both; }
.k-ticket__tags .k-chip:nth-child(2) { animation-delay: .12s; } .k-ticket__tags .k-chip:nth-child(3) { animation-delay: .24s; } .k-ticket__tags .k-chip:nth-child(4) { animation-delay: .36s; }
.k-sla { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--ask); }
.k-sla svg { width: 16px; height: 16px; }
.k-sla circle.k-sla__fg { stroke: var(--ask); stroke-dasharray: 100; transform-box: view-box; transform-origin: 12px 12px; transform: rotate(-90deg); transition: stroke-dashoffset 1s linear; }

/* ---------- covenant meter ---------- */
.k-meter { display: grid; gap: var(--space-2); }
.k-meter__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.k-meter__val { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.k-meter__bar { position: relative; height: 10px; margin-top: 18px; border-radius: 5px; background: var(--surface-3); }
.k-meter__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--ok); width: var(--v, 0%); transition: width 1s var(--ease-out), background-color var(--dur-flip) var(--ease-out); }
.k-meter.is-ask .k-meter__fill { background: var(--ask); }
.k-meter.is-bad .k-meter__fill { background: var(--bad); }
.k-meter__line { position: absolute; top: -5px; bottom: -5px; width: 2px; left: var(--t); background: var(--ink); border-radius: 1px; }
.k-meter__line::after { content: attr(data-label); position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.k-meter__foot { font-size: 13px; color: var(--ink-3); }

/* ---------- map ---------- */
.k-map { position: relative; aspect-ratio: 16 / 10; max-width: 100%; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); overflow: hidden; }
.k-map svg.k-map__base { position: absolute; inset: 0; width: 100%; height: 100%; }
.k-map__grid { stroke: var(--line); stroke-width: 1; }
.k-map__river { fill: none; stroke: var(--info-soft); stroke-width: 18; stroke-linecap: round; }
.k-map__label { fill: var(--ink-3); font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; }
.k-pin { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; padding: 0; background: none; cursor: pointer; animation: k-pin-drop .6s var(--ease-spring) both; animation-delay: var(--d, 0s); }
.k-pin .k-bot { --size: 26px; }
.k-pin__label { padding: 3px 8px; border-radius: var(--radius-pill); background: var(--surface-3); color: var(--ink); font-size: 12px; font-weight: 500; white-space: nowrap; box-shadow: var(--shadow-float); opacity: 0; transform: translateY(4px); transition: opacity var(--dur-tap) var(--ease-out), transform var(--dur-tap) var(--ease-out); }
.k-pin:hover .k-pin__label, .k-pin:focus-visible .k-pin__label, .k-pin.is-sel .k-pin__label { opacity: 1; transform: none; }
.k-pin::after { content: ""; position: absolute; bottom: -4px; left: 50%; width: 22px; height: 8px; margin-left: -11px; border-radius: 50%; border: 2px solid var(--info); opacity: 0; }
.k-pin.is-sel::after { animation: k-ripple 1.6s var(--ease-out) infinite; }
@keyframes k-pin-drop { 0% { opacity: 0; transform: translate(-50%, -160%); } 60% { opacity: 1; transform: translate(-50%, -94%); } 100% { transform: translate(-50%, -100%); } }
@keyframes k-ripple { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.4); } }

/* ---------- loader: topping out ---------- */
.k-loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); background: var(--ground); transition: transform .65s var(--ease-exit); }
.k-loader--inline { position: relative; inset: auto; min-height: 340px; border-radius: var(--radius-lg); }
.k-loader.is-gone { transform: translateY(-100%); }
.k-loader--inline.is-gone { transform: none; opacity: .0; transition: opacity .5s var(--ease-exit); }
.k-loader__box { display: grid; grid-template-columns: auto minmax(0, 300px); gap: 40px; align-items: end; }
.k-loader__tower { position: relative; width: 120px; display: flex; flex-direction: column-reverse; gap: 4px; }
.k-loader__tower i { position: relative; height: 22px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.k-loader__tower i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--spectrum-1), var(--spectrum-2), var(--spectrum-3), var(--spectrum-4), var(--spectrum-5)); background-size: 500% 100%; background-position: calc(var(--k) * 25%) 0; transform: scaleX(var(--f, 0)); transform-origin: left; transition: transform .25s linear; }
.k-loader__cap { position: absolute; left: 50%; top: -30px; width: 44px; height: 26px; margin-left: -22px; background: var(--ink); clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%); opacity: 0; transform: translateY(-40px); transition: transform .5s var(--ease-spring), opacity .2s; }
.k-loader.is-ready .k-loader__cap { opacity: 1; transform: none; }
.k-loader__tag { position: absolute; right: -54px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: var(--ink-2); transition: bottom .25s linear; }
.k-loader__steps { display: grid; gap: 8px; min-width: 0; }
.k-loader__done { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--ink-3); animation: k-rise .4s var(--ease-out) both; min-width: 0; }
.k-loader__done em { margin-left: auto; font-style: normal; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.k-loader__now { font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -.02em; min-height: 58px; }
.k-loader.is-ready .k-loader__now { color: var(--ok); }

/* ---------- title card (video and stage) ----------
   Desktop (761px and up): a 16:9 duotone, sized in container units so it records at any size.
   Mobile (760px and below): a portrait card, colour field on top, words below, sized in px. */
.k-titlecard { position: relative; display: grid; overflow: hidden; color: var(--on-deep); font-family: var(--font-sans); }
.k-titlecard__face { position: relative; background: var(--c, var(--bot-blue)); overflow: hidden; }
.k-titlecard__face .k-bot { position: absolute; }
.k-titlecard__words { background: var(--deep, var(--bot-blue-deep)); color: var(--on-deep); display: flex; flex-direction: column; justify-content: center; }
.k-tc-meta { font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase; opacity: .72; }
.k-tc-title { margin: 0; font-weight: 500; letter-spacing: -.03em; white-space: pre-line; }
.k-tc-sub { margin: 0; opacity: .8; }
.k-tc-cta { display: flex; align-items: center; }
.k-tc-qr { display: grid; place-items: center; background: var(--on-deep); color: var(--deep, var(--bot-blue-deep)); font-family: var(--font-mono); flex: none; }
.k-tc-url { font-family: var(--font-mono); }
.k-tc-url.k-caret::after { background: var(--on-deep); }
.k-titlecard[data-color="pink"] { --c: var(--bot-pink); --deep: var(--bot-pink-deep); }
.k-titlecard[data-color="orange"] { --c: var(--bot-orange); --deep: var(--bot-orange-deep); }
.k-titlecard[data-color="green"] { --c: var(--bot-green); --deep: var(--bot-green-deep); }
.k-titlecard[data-color="violet"] { --c: var(--bot-violet); --deep: var(--bot-violet-deep); }
.k-titlecard[data-color="teal"] { --c: var(--bot-teal); --deep: var(--bot-teal-deep); }
.k-titlecard .k-bot .k-b-body { fill: var(--bot-eye); opacity: 0; }
.k-titlecard .k-bot .k-b-spark { fill: var(--bot-eye); }
/* the words land one after another, on every load and every replay */
.k-titlecard__words > * { animation: k-tc-in .8s var(--ease-out) both; }
.k-titlecard__words > *:nth-child(1) { animation-delay: .15s; }
.k-titlecard__words > *:nth-child(2) { animation-delay: .35s; }
.k-titlecard__words > *:nth-child(3) { animation-delay: .6s; }
.k-titlecard__words > *:nth-child(4) { animation-delay: .8s; }
@keyframes k-tc-in { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } }
.k-titlecard__face { animation: k-tc-field 1s var(--ease-out) both; }
@keyframes k-tc-field { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

@media (min-width: 761px) {
  .k-titlecard { grid-template-columns: 1fr 1fr; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--radius-xl); container-type: inline-size; }
  .k-titlecard__face .k-bot { --size: 92cqw; left: -24cqw; top: 6cqw; }
  .k-titlecard__words { gap: 2.2cqw; padding: 0 5cqw; }
  .k-tc-meta { font-size: 1.25cqw; }
  .k-tc-title { font-size: 5.4cqw; line-height: 1.03; }
  .k-tc-sub { font-size: 1.7cqw; }
  .k-tc-cta { gap: 2cqw; }
  .k-tc-qr { width: 9cqw; height: 9cqw; border-radius: 1cqw; font-size: .9cqw; }
  .k-tc-url { font-size: 1.9cqw; }
}
@media (max-width: 760px) {
  .k-titlecard { grid-template-columns: 1fr; grid-template-rows: minmax(0, 44fr) minmax(0, 56fr); min-height: 100vh; min-height: 100svh; border-radius: 0; }
  .k-titlecard__face .k-bot { --size: 150vw !important; left: -34vw; top: 4vw; }
  .k-titlecard__words { justify-content: flex-start; gap: 16px; padding: 32px 24px calc(32px + env(safe-area-inset-bottom, 0px)); }
  .k-tc-meta { font-size: 11px; }
  .k-tc-title { font-size: 36px; line-height: 1.06; }
  .k-tc-sub { font-size: 15px; line-height: 1.45; }
  .k-tc-cta { gap: 14px; margin-top: 8px; }
  .k-tc-qr { width: 76px; height: 76px; border-radius: 10px; font-size: 11px; }
  .k-tc-url { font-size: 16px; }
  @keyframes k-tc-field { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
}

/* ---------- scroll reveal ---------- */
.k-reveal { transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out), filter var(--dur-reveal) var(--ease-out); }
.k-reveal.is-pre { opacity: 0; transform: translateY(28px); filter: blur(8px); }

/* ---------- app shell: roster, conversation, evidence ----------
   Three ranges that never overlap: shared parts (any width), desktop and tablet (761px and up),
   mobile (760px and below). A change in one range cannot move the other. */

/* shared: colour, type and the inside of each part */
.k-app { position: relative; background: var(--ground); color: var(--ink); font-family: var(--font-sans); }
.k-side__brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.k-side__brand .k-bot { --size: 28px; }
.k-side__section { display: flex; flex-direction: column; gap: 6px; }
.k-app__side .k-roster { background: transparent; padding: 0; }
.k-me { width: 32px; height: 32px; border-radius: var(--radius-pill); background: var(--surface-3); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; flex: none; }
.k-side__foot small { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.3; }
.k-side__foot b { display: block; font-size: 14px; font-weight: 500; line-height: 1.3; }
.k-rrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius-md); }
.k-rrow > svg, .k-rrow > [data-k-icon] svg { width: 18px; height: 18px; color: var(--ink-3); justify-self: center; }
.k-rrow b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-rrow small { grid-column: 2; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-rrow .k-switch { grid-row: 1 / 3; grid-column: 3; }
.k-switch--sm { width: 36px; height: 22px; }
.k-switch--sm::after { width: 16px; height: 16px; }
.k-switch--sm[aria-checked="true"]::after { transform: translateX(14px); }
.k-app__main { display: flex; flex-direction: column; min-width: 0; }
.k-chathead { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 6px; border-radius: var(--radius-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); min-width: 0; max-width: 100%; }
.k-chathead .k-bot { --size: 32px; }
.k-chathead b { font-weight: 500; font-size: 15px; white-space: nowrap; }
.k-chathead .k-say { font-size: 13px; white-space: nowrap; overflow: hidden; min-width: 0; }
.k-chathead .k-say__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-daterule { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--ink-3); }
.k-daterule::before, .k-daterule::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.k-msgrow { display: grid; gap: 12px; align-items: start; animation: k-rise var(--dur-reveal) var(--ease-out) both; }
.k-msgrow__who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 22px; font-size: 13.5px; color: var(--ink-3); }
.k-msgrow__who b { color: var(--ink); font-weight: 500; font-size: 14.5px; }
.k-msgrow__body { margin-top: 6px; display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.6; color: var(--ink); }
.k-msgrow__body p { margin: 0; }
.k-msgrow__body .k-approve { padding: var(--space-4); border-radius: var(--radius-lg); }
.k-handrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-radius: var(--radius-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); font-size: 13.5px; color: var(--ink-3); }
.k-handrow .k-bot { --size: 20px; }
.k-handrow b { color: var(--ink-2); font-weight: 500; }
.k-handrow svg.k-hand-arrow { width: 14px; height: 14px; color: var(--ink-3); }
.k-handrow a { margin-left: auto; color: var(--info); text-decoration: none; font-weight: 500; }
.k-app__dock { display: flex; flex-direction: column; gap: 10px; }
.k-app__dock .k-fine { font-size: 12px; color: var(--ink-3); text-align: center; }
.k-app__aside { display: flex; flex-direction: column; gap: 14px; background: var(--ground-2); }
.k-panelhead { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.k-panelhead b { font-size: 15px; font-weight: 600; margin-right: auto; }
.k-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hairline); }
.k-seg button { height: 30px; padding: 0 14px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink-3); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background-color var(--dur-tap) var(--ease-out), color var(--dur-tap) var(--ease-out); }
.k-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px #00000033, inset 0 0 0 1px var(--hairline); }
.k-seg--fill { display: flex; }
.k-seg--fill button { flex: 1; }
.k-tabpanel { display: flex; flex-direction: column; gap: 12px; animation: k-rise .3s var(--ease-out) both; }
.k-tabpanel.is-off { display: none; }
.k-app__scrim { display: none; }

/* desktop and tablet: 761px and up */
@media (min-width: 761px) {
  .k-app { --side: 268px; --aside: 392px; display: grid; grid-template-columns: var(--side) minmax(0, 1fr) var(--aside); height: 100vh; height: 100dvh; overflow: hidden; }
  .k-app__side { display: flex; flex-direction: column; gap: 22px; min-height: 0; overflow-y: auto; padding: 14px 12px; background: var(--ground-2); border-right: 1px solid var(--line); }
  .k-side__brand { padding: 4px 8px; }
  .k-side__section > .k-label { padding: 0 10px; }
  .k-app__side .k-roster__item { padding: 8px 10px; }
  .k-app__side .k-roster__item .k-bot { --size: 32px; }
  .k-side__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid var(--line); }
  .k-side__foot .k-seg { flex: 1 1 100%; }
  .k-side__foot .k-seg button { flex: 1; }
  .k-app__main { min-height: 0; }
  .k-app__head { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
  .k-app__headend { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 8px; }
  .k-app__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .k-app__col { max-width: 760px; margin: 0 auto; padding: 24px 28px 16px; display: flex; flex-direction: column; gap: 18px; }
  .k-msgrow { grid-template-columns: 32px minmax(0, 1fr); }
  .k-msgrow > .k-bot { --size: 32px; margin-top: 2px; }
  .k-app__dock { flex: none; width: 100%; max-width: 816px; margin: 0 auto; padding: 10px 28px 18px; }
  .k-app__aside { min-height: 0; overflow-y: auto; padding: 16px 18px 24px; border-left: 1px solid var(--line); }
}
@media (min-width: 1181px) {
  .k-app__evbtn, .k-panelhead .k-iconbtn { display: none; }
}
@media (min-width: 761px) and (max-width: 1180px) {
  .k-app { grid-template-columns: var(--side) minmax(0, 1fr); }
  .k-app__aside { position: absolute; z-index: 30; top: 0; right: 0; bottom: 0; width: min(var(--aside), 92vw); box-shadow: var(--shadow-window); transform: translateX(105%); transition: transform var(--dur-reveal) var(--ease-out); }
  .k-app.is-evidence .k-app__aside { transform: none; }
  .k-app.is-evidence .k-app__scrim { display: block; position: absolute; inset: 0; z-index: 29; background: var(--scrim); animation: k-fade var(--dur-flip) var(--ease-out) both; }
}

/* mobile: 760px and below */
@media (max-width: 760px) {
  .k-app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  .k-app__side { display: flex; flex-direction: column; gap: 10px; padding: 10px 0 8px; border-bottom: 1px solid var(--line); background: var(--ground-2); }
  .k-side__brand { padding: 4px 16px; }
  .k-app__side > .k-btn { margin: 0 12px !important; }
  .k-side__section.is-routines, .k-side__foot, .k-side__section > .k-label { display: none; }
  .k-app__side .k-roster { flex-direction: row; gap: 4px; overflow-x: auto; padding: 0 12px 2px; scrollbar-width: none; }
  .k-app__side .k-roster::-webkit-scrollbar { display: none; }
  .k-app__side .k-roster__item { position: relative; flex-direction: column; gap: 4px; width: 76px; flex: none; padding: 6px 4px; text-align: center; }
  .k-app__side .k-roster__item .k-bot { --size: 40px; }
  .k-app__side .k-roster__item .k-grow { width: 100%; }
  .k-app__side .k-roster__name { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .k-app__side .k-roster__sub { display: none; }
  .k-app__side .k-roster__item .k-badge { position: absolute; top: 2px; right: 10px; margin: 0; }
  .k-app__head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; background: var(--ground); border-bottom: 1px solid var(--line); }
  .k-chathead { flex: 0 1 auto; padding-right: 12px; }
  .k-app__headend { margin-left: auto; flex: none; display: flex; align-items: center; gap: 8px; }
  .k-app__headend .k-honest { display: none; }
  .k-app__col { padding: 20px 16px 8px; display: flex; flex-direction: column; gap: 20px; }
  .k-msgrow { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  .k-msgrow > .k-bot { --size: 28px; margin-top: 2px; }
  .k-msgrow__body { font-size: 15.5px; }
  .k-app__dock { position: sticky; bottom: 0; z-index: 5; padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--ground); box-shadow: 0 -1px 0 var(--line); }
  .k-app__dock .k-suggest { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .k-app__dock .k-suggest::-webkit-scrollbar { display: none; }
  .k-app__dock .k-suggest button { flex: none; }
  .k-app__dock .k-fine { display: none; }
  .k-app__aside { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; max-height: 86vh; max-height: 86dvh; overflow-y: auto; padding: 10px 16px calc(24px + env(safe-area-inset-bottom, 0px)); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-window); transform: translateY(105%); transition: transform var(--dur-reveal) var(--ease-out); }
  .k-app__aside::before { content: ""; align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); flex: none; }
  .k-app.is-evidence .k-app__aside { transform: none; }
  .k-app.is-evidence .k-app__scrim { display: block; position: fixed; inset: 0; z-index: 29; background: var(--scrim); animation: k-fade var(--dur-flip) var(--ease-out) both; }
}

/* ---------- mobile type steps (760px and below; desktop sizes come from tokens) ---------- */
@media (max-width: 760px) {
  .display { font-size: 40px; line-height: 1.04; }
  .h1 { font-size: 30px; line-height: 1.12; }
  .h2 { font-size: 24px; }
  .h3 { font-size: 18px; }
  .lead { font-size: 17px; }
  .bignum { font-size: 52px; }
  h1, h2, h3, .display, .h1, .h2, .h3 { text-wrap: pretty; }
  .k-btn--sm, .k-suggest button, .k-seg button { height: 44px; }
  .k-cite { height: 24px; padding: 0 8px; }
  .k-cite::before, .k-switch::before { content: ""; position: absolute; inset: -10px -4px; }
}

/* ---------- touch: no sticky hover after a tap ---------- */
@media (hover: none) {
  .k-btn:hover { background: var(--surface-2); }
  .k-btn--primary:hover { background: var(--primary); transform: none; }
  .k-btn--ghost:hover, .k-btn--text:hover { background: transparent; }
  .k-btn:hover .k-arr { transform: none; }
  .k-roster__item:hover { background: transparent; }
  .k-roster__item[aria-current="true"]:hover { background: var(--surface-2); }
  .k-suggest button:hover { background: transparent; color: var(--ink-2); }
  .k-cite:hover { transform: none; }
}

/* ---------- motion policy ----------
   Keystone plays its motion on every device, including when the OS asks for reduced motion (the house choice:
   the motion is the product's status language). To honour the OS setting instead, put data-k-motion="system"
   on <html>: every loop then stops on its final frame, which still reads. */
@media (prefers-reduced-motion: reduce) {
  :root[data-k-motion="system"] *, :root[data-k-motion="system"] *::before, :root[data-k-motion="system"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- phones ---------- */
@media (max-width: 560px) {
  .k-prop { grid-template-columns: 1fr; }
  .k-prop__art { max-width: 140px; }
  .k-relay { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .k-relay__track { display: none; }
  .k-loader__box { grid-template-columns: 1fr; justify-items: center; gap: 28px; }
  .k-loader__tag { right: -50px; }
  .k-metric__val { font-size: 44px; }
  .k-msg { max-width: 92%; }
  .k-approve__actions .k-btn--primary { margin-left: 0; }
}
