/* ephemeral-ui — every colour, radius and font below comes from the active host theme (--h-*). */
:root {
  --h-bg: #fcfcfc; --h-fg: #18181b; --h-card: #fff; --h-card-solid: #fff; --h-muted: #fafafa; --h-mutedFg: #71717a; --h-accent: #f4f4f5;
  --h-border: #e4e4e7; --h-input: #d4d4d8; --h-primary: #1b4ed8; --h-primaryFg: #fff; --h-radius: 8px; --h-radius-lg: 12px;
  --h-font: -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", system-ui, sans-serif; --h-mono: ui-monospace, Menlo, monospace;
  --h-density: 1;
  --serif: "Instrument Serif", Georgia, serif;
  --k1: #ff4d6d; --k2: #f5a524; --k3: #22c55e; --k4: #3b82f6; --k5: #a78bfa;
  --soft: color-mix(in srgb, var(--h-fg) 5%, transparent);
  --soft2: color-mix(in srgb, var(--h-fg) 9%, transparent);
  --pad: calc(16px * var(--h-density));
  --r: var(--h-radius); --rl: var(--h-radius-lg);
  --e-out: cubic-bezier(.16,1,.3,1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--h-bg); color: var(--h-fg); font: 15px/1.5 var(--h-font); -webkit-font-smoothing: antialiased; transition: background-color .4s, color .4s; overflow-x: hidden; }
a { color: inherit; }
code, kbd, pre { font-family: var(--h-mono); }
button { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--h-primary) 30%, transparent); }
.grow { flex: 1; }
.dim { color: var(--h-mutedFg); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.right { text-align: right; }
.kicker { font: 500 11.5px/1 var(--h-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--h-mutedFg); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- top bar ---------- */
header.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--h-bg) 82%, transparent); backdrop-filter: blur(16px) saturate(1.3); border-bottom: 1px solid var(--h-border); }
.bar { max-width: 1480px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 18px; }
.wm { display: inline-flex; align-items: center; gap: 0; text-decoration: none; font: 600 16px/1 var(--h-mono); letter-spacing: -.02em; }
.wm span:last-child { color: var(--h-mutedFg); }
.wm-card { margin-right: 9px; width: 22px; height: 16px; border-radius: calc(var(--r) * .6); background: var(--h-fg); position: relative; display: inline-block; overflow: hidden; }
.wm-card i { position: absolute; left: 4px; height: 2.5px; border-radius: 2px; background: var(--h-bg); }
.wm-card i:first-child { top: 4px; width: 8px; animation: wmA 3.2s var(--e-out) infinite; }
.wm-card i:last-child { top: 9px; width: 12px; opacity: .55; animation: wmB 3.2s var(--e-out) infinite; }
@keyframes wmA { 0%, 100% { width: 8px; } 50% { width: 12px; } }
@keyframes wmB { 0%, 100% { width: 12px; } 50% { width: 6px; } }
.wm.small { font-size: 14px; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 6px 11px; border-radius: 999px; text-decoration: none; color: var(--h-mutedFg); font-size: 13.5px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--h-fg); background: var(--soft); }
.search { display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--h-border); background: var(--h-card); border-radius: var(--r); padding: 6px 8px 6px 12px; color: var(--h-mutedFg); cursor: pointer; font-size: 13px; transition: border-color .2s, transform .2s; }
.search:hover { border-color: var(--h-input); color: var(--h-fg); }
.search b { color: var(--h-fg); font-weight: 600; }
kbd { font-size: 11px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--h-border); background: var(--h-muted); color: var(--h-mutedFg); }
.hostpick { display: inline-flex; padding: 3px; gap: 2px; border-radius: calc(var(--r) + 3px); background: var(--soft); }
.hostpick button { border: 0; background: transparent; padding: 5px 11px; border-radius: var(--r); cursor: pointer; font-size: 13px; color: var(--h-mutedFg); transition: background .25s, color .25s, box-shadow .25s; }
.hostpick button[aria-pressed="true"] { background: var(--h-card-solid); color: var(--h-fg); box-shadow: 0 1px 2px rgb(0 0 0 / .12), 0 0 0 1px var(--h-border); }
.icon-btn { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--h-border); background: var(--h-card); cursor: pointer; display: grid; place-items: center; padding: 0; transition: transform .4s var(--e-out); }
.icon-btn:hover { transform: rotate(180deg); }

/* ---------- buttons, chips, segments ---------- */
.eu-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--h-border); background: var(--h-card-solid); color: var(--h-fg); padding: calc(7px * var(--h-density)) calc(13px * var(--h-density)); border-radius: var(--r); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; overflow: hidden; transition: transform .18s var(--e-out), background .2s, border-color .2s, box-shadow .2s; user-select: none; -webkit-user-select: none; touch-action: none; }
.eu-btn:hover { border-color: var(--h-input); }
.eu-btn:active { transform: scale(.97); }
.eu-btn:disabled { opacity: .55; cursor: default; }
.eu-btn.primary { background: var(--h-primary); color: var(--h-primary-ink); border-color: transparent; box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 1px 2px rgb(0 0 0 / .15); }
.eu-card .eu-btn.primary { background: var(--a); color: var(--a-ink, #fff); }
.eu-btn.ghost { background: transparent; border-color: transparent; color: var(--h-mutedFg); }
.eu-btn.ghost:hover { background: var(--soft); color: var(--h-fg); }
.eu-btn.lg { padding: 11px 18px; font-size: 14.5px; }
.eu-btn.sm { padding: 4px 9px; font-size: 12px; }
.eu-btn.hold .fill { position: absolute; inset: 0; background: rgb(255 255 255 / .28); transform-origin: left; transform: scaleX(0); pointer-events: none; }
.eu-btn.hold .lbl { position: relative; }
.eu-btn.hold.holding { transform: scale(.985); }
.eu-btn.hold.done { background: var(--h-success); color: #fff; }
.eu-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--h-fg); border: 1px solid transparent; white-space: nowrap; }
.eu-chip.ghost { background: transparent; border-color: var(--h-border); color: var(--h-mutedFg); }
.eu-chip.strong { background: color-mix(in srgb, var(--a) 14%, transparent); color: var(--a); font-weight: 600; }
.eu-chip.btn { cursor: pointer; transition: background .2s, transform .15s; }
.eu-chip.btn:hover { background: var(--soft2); }
.eu-chip.btn:active { transform: scale(.95); }
.eu-chip.btn.on { background: var(--a); color: #fff; }
.eu-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.eu-seg { position: relative; display: inline-flex; background: var(--soft); border-radius: calc(var(--r) + 2px); padding: 3px; gap: 0; }
.eu-seg button { position: relative; z-index: 1; border: 0; background: transparent; padding: 4px 10px; font-size: 12px; color: var(--h-mutedFg); cursor: pointer; border-radius: var(--r); white-space: nowrap; transition: color .2s; }
.eu-seg button[aria-selected="true"], .eu-seg button[aria-pressed="true"] { color: var(--h-fg); }
.eu-seg .ind { position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: var(--r); background: var(--h-card-solid); box-shadow: 0 1px 2px rgb(0 0 0 / .12), 0 0 0 1px var(--h-border); }
.eu-seg.mini button[aria-pressed="true"] { background: var(--h-card-solid); box-shadow: 0 0 0 1px var(--h-border); }
.eu-hint { color: var(--h-mutedFg); font-size: 12px; }
.eu-switch { width: 34px; height: 20px; border-radius: 999px; border: 0; background: var(--soft2); position: relative; cursor: pointer; transition: background .25s; flex: none; }
.eu-switch i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .3); transition: transform .35s cubic-bezier(.3,1.5,.5,1); }
.eu-switch[aria-checked="true"] { background: var(--a, var(--h-primary)); }
.eu-switch[aria-checked="true"] i { transform: translateX(14px); }

/* ---------- icons and avatars ---------- */
.eu-ico { --s: 28px; width: var(--s); height: var(--s); flex: none; border-radius: max(4px, calc(var(--s) * .26)); background: var(--tile); color: var(--tile-ink); display: inline-grid; place-items: center; position: relative; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08), inset 0 1px 0 rgb(255 255 255 / .2); font: 650 calc(var(--s) * .4)/1 var(--h-font); letter-spacing: -.02em; overflow: hidden; }
[data-host="hermes"] .eu-ico { border-radius: max(2px, calc(var(--s) * .12)); }
.eu-ico.neutral { background: var(--soft2); color: var(--h-fg); box-shadow: inset 0 0 0 1px var(--h-border); }
.eu-ico .mark { width: 58%; height: 58%; fill: currentColor; display: none; }
.eu-ico .mono { display: block; }
[data-logos="on"] .eu-ico .mark { display: block; }
[data-logos="on"] .eu-ico:has(.mark) .mono { display: none; }
.eu-av { --hue: 210; width: 26px; height: 26px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font: 600 10.5px/1 var(--h-font); color: hsl(var(--hue) 55% 25%); background: hsl(var(--hue) 70% 86%); box-shadow: 0 0 0 2px var(--h-card-solid); }
[data-scheme="dark"] .eu-av { color: hsl(var(--hue) 80% 85%); background: hsl(var(--hue) 35% 28%); }
.eu-avs { display: inline-flex; }
.eu-avs .eu-av + .eu-av { margin-left: -7px; }
.eu-spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; z-index: 5; }

/* ---------- hero ---------- */
.hero { --sx: 70%; --sy: 30%; position: relative; max-width: 1480px; margin: 0 auto; padding: 56px 24px 40px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: 48px; align-items: center; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(circle, color-mix(in srgb, var(--h-fg) 22%, transparent) 1px, transparent 1.4px); background-size: 22px 22px; mask-image: radial-gradient(420px circle at var(--sx) var(--sy), #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(420px circle at var(--sx) var(--sy), #000 0%, transparent 70%); }
.hero h1 { font: 400 clamp(54px, 7vw, 104px)/.92 var(--serif); letter-spacing: -.03em; margin: 18px 0 22px; }
.hero h1 em { color: var(--h-primary); font-style: italic; }
[data-host="hermes"] .hero h1 em { color: var(--h-fg); text-decoration: underline; text-decoration-color: var(--h-primary); text-underline-offset: 10px; text-decoration-thickness: 3px; }
.lead { font-size: 17px; max-width: 54ch; margin: 0 0 12px; }
.lead.dim { color: var(--h-mutedFg); font-size: 15px; }
.cta { display: flex; gap: 10px; margin: 26px 0 26px; flex-wrap: wrap; }
#hostctl .scn { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
#hostctl .scn button { border: 1px solid var(--h-border); background: transparent; border-radius: 999px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; color: var(--h-mutedFg); transition: all .25s; }
#hostctl .scn button[aria-pressed="true"] { background: var(--h-fg); color: var(--h-bg); border-color: var(--h-fg); }
#hostctl .state::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--h-success); margin-right: 7px; vertical-align: 1px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--h-success) 60%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }

/* host window */
.hero-win { perspective: 1600px; }
.win { height: 600px; border-radius: calc(var(--rl) + 4px); background: var(--h-bg); border: 1px solid var(--h-border); box-shadow: 0 40px 80px -30px rgb(0 0 0 / .35), 0 12px 24px -12px rgb(0 0 0 / .18); overflow: hidden; display: flex; flex-direction: column; transform: rotateY(-4deg) rotateX(2deg); transition: transform .8s var(--e-out), border-radius .4s; }
.win:hover { transform: none; }
[data-host="hermes"] .win { border-radius: 6px; }
.titlebar { height: 34px; flex: none; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid var(--h-border); background: var(--h-sidebar); }
.titlebar i { width: 11px; height: 11px; border-radius: 50%; background: var(--soft2); }
.titlebar i:nth-child(1) { background: #ff5f57; } .titlebar i:nth-child(2) { background: #febc2e; } .titlebar i:nth-child(3) { background: #28c840; }
.titlebar .wt { margin-left: 10px; font: 11.5px var(--h-mono); color: var(--h-mutedFg); }
.cols { flex: 1; display: grid; grid-template-columns: 210px 1fr; min-height: 0; }
.side { background: var(--h-sidebar); border-right: 1px solid var(--h-sidebarBorder); padding: 12px 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.side-top { display: flex; align-items: center; gap: 8px; padding: 2px 6px 8px; }
.brandmark { width: 18px; height: 18px; border-radius: 5px; background: var(--h-fg); }
[data-host="hermes"] .brandmark { border-radius: 2px; background: var(--h-primary); }
.side-sec { font-size: 11px; color: var(--h-mutedFg); padding: 6px 8px 2px; text-transform: uppercase; letter-spacing: .08em; }
.threads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.threads li { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--r); font-size: 12.5px; color: var(--h-mutedFg); white-space: nowrap; }
.threads li span { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.threads li.on { background: var(--h-card-solid); color: var(--h-fg); box-shadow: 0 0 0 1px var(--h-border); }
[data-scheme="dark"] .threads li.on { background: var(--h-accent); box-shadow: none; }
.threads time { font-size: 10.5px; opacity: .7; }
.threads .st { width: 6px; height: 6px; border-radius: 50%; background: var(--soft2); flex: none; }
.threads .st.live { background: var(--h-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-primary) 25%, transparent); }
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.chat-top { height: 42px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--h-border); font-size: 13px; }
.scroll { flex: 1; overflow-y: auto; padding: 18px 20px 130px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.turn.user { align-self: flex-end; max-width: 80%; }
.turn.user .bub { background: var(--h-message); border: 1px solid var(--h-messageBorder, transparent); border-radius: calc(var(--rl) + 2px); padding: 9px 13px; font-size: 13.5px; }
[data-host="hermes"] .turn.user .bub { border-radius: var(--rl); }
.turn.agent { display: flex; flex-direction: column; gap: 8px; max-width: 520px; width: 100%; }
.tool { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--h-mutedFg); padding: 3px 0; }
.tool b { color: var(--h-fg); font-weight: 500; }
.tool .spin { width: 12px; height: 12px; border-radius: 50%; border: 1.6px solid var(--soft2); border-top-color: var(--h-fg); animation: spin .7s linear infinite; flex: none; }
.tool.done .spin { animation: none; border-color: var(--h-success); background: var(--h-success); position: relative; }
.tool.done .spin::after { content: ""; position: absolute; left: 3px; top: 1.2px; width: 2.6px; height: 5px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.cardslot { display: flex; }
.cardslot .eu-card { width: 100%; }
.cardslot .eu-card.gone { width: auto; }
.reply { margin: 4px 0 0; font-size: 13.5px; line-height: 1.55; }
.composer { position: absolute; left: 16px; right: 16px; bottom: 14px; border: 1px solid var(--h-border); background: var(--h-card-solid); border-radius: calc(var(--rl) + 4px); padding: 10px 12px 8px; box-shadow: var(--h-shadow); }
[data-host="hermes"] .composer { background: color-mix(in srgb, var(--h-card-solid) 72%, transparent); backdrop-filter: blur(18px) saturate(1.4); border-radius: var(--rl); border-color: color-mix(in srgb, currentColor 8%, transparent); }
.inp { min-height: 22px; font-size: 13.5px; position: relative; }
.inp .ph { color: var(--h-mutedFg); position: absolute; }
.inp.typing .ph, .inp:has(.typed:not(:empty)) .ph { display: none; }
.inp .caret, .eu-reply .caret, .qfield .caret { display: inline-block; width: 1.5px; height: 15px; background: var(--h-fg); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
.inp:not(.typing) .caret { opacity: 0; }
@keyframes blink { 50% { opacity: 0; } }
.crow { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.send { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--h-primary); color: var(--h-primary-ink); cursor: pointer; }
[data-host="hermes"] .send { border-radius: 3px; }
.orb { width: 20px; height: 20px; border-radius: 50%; background: conic-gradient(from 0deg, var(--k4), var(--k5), var(--k1), var(--k2), var(--k4)); filter: blur(.4px) saturate(.4); opacity: .35; transition: opacity .4s, filter .4s, transform .4s; }
.orb.on { opacity: 1; filter: blur(.4px) saturate(1.2); animation: spin 1.4s linear infinite; transform: scale(1.1); box-shadow: 0 0 14px color-mix(in srgb, var(--k5) 60%, transparent); }
.kbd { font: 11px var(--h-mono); color: var(--h-mutedFg); }

/* ---------- band ---------- */
.band { max-width: 1480px; margin: 0 auto; padding: 22px 24px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--h-border); border-bottom: 1px solid var(--h-border); }
.band div { display: flex; align-items: baseline; gap: 10px; }
.band b { font: 400 44px/1 var(--serif); letter-spacing: -.02em; }
.band span { color: var(--h-mutedFg); font-size: 13px; }

/* ---------- sections ---------- */
.sec { max-width: 1480px; margin: 0 auto; padding: 84px 24px 20px; }
.sechead { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 26px; flex-wrap: wrap; }
.sechead h2 { font: 400 clamp(36px, 4vw, 56px)/1 var(--serif); letter-spacing: -.02em; margin: 12px 0 12px; }
.sechead p { max-width: 70ch; margin: 0; }
.kitbar { display: flex; align-items: center; gap: 12px; }
.qbox { display: flex; align-items: center; gap: 8px; border: 1px solid var(--h-border); background: var(--h-card-solid); border-radius: var(--r); padding: 0 12px; height: 40px; width: min(380px, 80vw); transition: border-color .2s, box-shadow .2s; }
.qbox:focus-within { border-color: var(--h-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-primary) 20%, transparent); }
.qbox input { border: 0; outline: 0; background: transparent; flex: 1; font: inherit; color: inherit; }
.cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.cat { border: 1px solid var(--h-border); background: transparent; border-radius: 999px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; color: var(--h-mutedFg); display: inline-flex; gap: 6px; align-items: center; transition: all .2s; }
.cat em { font-style: normal; font-size: 11px; opacity: .7; }
.cat:hover { color: var(--h-fg); border-color: var(--h-input); }
.cat[aria-pressed="true"] { background: var(--h-fg); color: var(--h-bg); border-color: var(--h-fg); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile { --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg; position: relative; text-align: left; border: 1px solid var(--h-border); background: var(--h-card-solid); border-radius: var(--rl); padding: 16px 14px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; overflow: hidden; transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .35s var(--e-out), border-color .2s, box-shadow .3s; opacity: 0; translate: 0 14px; }
.tile.in { opacity: 1; translate: 0 0; transition: transform .35s var(--e-out), border-color .2s, box-shadow .3s, opacity .5s var(--d) ease, translate .7s var(--d) var(--e-out); }
.tile[hidden] { display: none; }
.tile:hover { border-color: color-mix(in srgb, var(--tile-c, var(--h-fg)) 40%, var(--h-border)); box-shadow: 0 18px 40px -22px rgb(0 0 0 / .35); }
.tile .glow { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(240px circle at var(--mx) var(--my), color-mix(in srgb, var(--tile-c, var(--h-primary)) 16%, transparent), transparent 60%); }
.tile:hover .glow { opacity: 1; }
.tile .eu-ico { margin-bottom: 10px; transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
.tile:hover .eu-ico { transform: translateY(-2px) rotate(-4deg) scale(1.06); }
.tile .tn { font-weight: 600; font-size: 14.5px; }
.tile .tc { font-size: 12px; color: var(--h-mutedFg); }
.kks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.kk { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; background: var(--soft); color: var(--h-mutedFg); }

/* ---------- card shell ---------- */
.eu-card { --a: var(--h-primary); --a-ink: #fff; position: relative; background: var(--h-card-solid); color: var(--h-fg); border: 1px solid var(--h-border); border-radius: var(--rl); box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px -16px rgb(0 0 0 / .25); font-family: var(--h-font); overflow: hidden; isolation: isolate; transition: border-color .3s, box-shadow .3s; }
[data-host="hermes"] .eu-card { border-color: color-mix(in srgb, currentColor 9%, transparent); box-shadow: var(--h-shadow); }
[data-brand="mono"] .eu-card {
  --a: var(--h-primary) !important;
  --a-ink: var(--h-primary-ink, var(--h-primaryFg)) !important;
}
[data-brand="mono"] .eu-card[data-app] .eu-h .eu-ico {
  background: var(--soft2); color: var(--h-fg); box-shadow: inset 0 0 0 1px var(--h-border); border-color: var(--h-border);
}
[data-brand="mono"] .eu-card[data-app] .eu-h .eu-ico .mark { display: none; }
[data-brand="mono"] .eu-card[data-app] .eu-h .eu-ico .mono { display: block; color: inherit; }
[data-brand="full"] .eu-card .eu-h { background: linear-gradient(180deg, color-mix(in srgb, var(--a-raw) 22%, transparent), transparent); }
[data-brand="full"] .eu-card { border-top: 3px solid var(--a-raw); }
.eu-card.ok { border-color: color-mix(in srgb, var(--h-success) 45%, var(--h-border)); }
.eu-card.hot { border-color: color-mix(in srgb, var(--h-danger) 50%, var(--h-border)); }
.eu-h { display: flex; align-items: center; gap: 10px; padding: calc(12px * var(--h-density)) var(--pad) calc(8px * var(--h-density)); }
.eu-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.eu-t b { font-size: 13.5px; font-weight: 600; }
.eu-verb { font-size: 12px; color: var(--h-mutedFg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eu-status { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--a) 13%, transparent); color: var(--a); white-space: nowrap; }
.eu-card.ok .eu-status { background: color-mix(in srgb, var(--h-success) 16%, transparent); color: var(--h-successFg); }
.eu-card.hot .eu-status { background: color-mix(in srgb, var(--h-danger) 16%, transparent); color: var(--h-dangerFg); }
.eu-ttl { width: 22px; height: 22px; border: 0; background: transparent; padding: 2px; cursor: pointer; flex: none; color: var(--h-mutedFg); }
.eu-ttl svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.eu-ttl circle { fill: none; stroke-width: 2; }
.eu-ttl .trk { stroke: var(--soft2); }
.eu-ttl .run { stroke: var(--a); stroke-dasharray: 100; stroke-dashoffset: 0; stroke-linecap: round; }
.eu-card.pinned .eu-ttl .run { stroke: var(--h-fg); }
.eu-card.pinned .eu-ttl::after { content: "📌"; position: absolute; font-size: 9px; margin: -18px 0 0 10px; }
.eu-b { padding: 2px var(--pad) calc(12px * var(--h-density)); font-size: 13px; }
.eu-f { display: flex; gap: 6px; padding: calc(10px * var(--h-density)) var(--pad); border-top: 1px solid var(--h-border); background: color-mix(in srgb, var(--h-muted) 50%, transparent); flex-wrap: wrap; }
.eu-card.gone { display: inline-flex; align-items: center; padding: 0 12px; border-radius: 17px; overflow: hidden; background: var(--soft); border-color: transparent; box-shadow: none; }
.eu-chip-left { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; white-space: nowrap; color: var(--h-mutedFg); }
.eu-chip-left::after { content: "✓"; color: var(--h-success); font-weight: 700; }
.eu-list { list-style: none; margin: 0; padding: 0; }
.big { font: 600 26px/1.1 var(--h-font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.spark-ico { color: var(--a); }
mark { background: linear-gradient(color-mix(in srgb, var(--a) 28%, transparent), color-mix(in srgb, var(--a) 28%, transparent)) no-repeat; background-size: 100% 100%; color: inherit; border-radius: 3px; padding: 0 2px; }
.eu-hint + .eu-hint { margin-left: 4px; }
p.eu-hint { margin: 8px 0 0; }

/* inbox */
.inbox li { display: flex; gap: 10px; padding: 9px 8px; margin: 0 -8px; border-radius: var(--r); cursor: grab; touch-action: pan-y; user-select: none; position: relative; transition: background .2s; }
.inbox li:hover { background: var(--soft); }
.inbox li.swiping { background: color-mix(in srgb, var(--h-danger) 10%, var(--h-card-solid)); z-index: 2; }
.inbox .row1 { display: flex; justify-content: space-between; font-size: 12.5px; }
.inbox time { color: var(--h-mutedFg); font-size: 11.5px; }
.inbox .subj { font-size: 13px; }
.inbox li.unread .subj, .inbox li.unread b { font-weight: 650; }
.inbox li.unread::before { content: ""; position: absolute; left: -2px; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--a); }
.inbox .snip { font-size: 12px; color: var(--h-mutedFg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.inbox .grow { min-width: 0; }
.inbox li.hit { background: color-mix(in srgb, var(--a) 7%, transparent); }
/* thread */
.thread .subj.big { font-size: 17px; margin-bottom: 8px; }
.thread .from { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--h-mutedFg); }
.thread .from b { color: var(--h-fg); }
.thread .sum { display: flex; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: var(--r); background: color-mix(in srgb, var(--a) 8%, transparent); border: 1px solid color-mix(in srgb, var(--a) 20%, transparent); }
.thread .sum p { margin: 2px 0 0; font-size: 12.5px; }
.bodytxt { color: var(--h-mutedFg); font-size: 12.5px; margin: 10px 0 0; }
.eu-reply { display: none; margin-top: 10px; padding: 9px 11px; border-radius: var(--r); border: 1px dashed var(--h-input); font-size: 13px; }
.eu-reply.on { display: block; }
/* approve */
.approve .who { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.agent-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--a); flex: none; }
.scope { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--h-border); font-size: 13px; }
.approve .row { margin-top: 10px; }
/* chat */
.chan { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; }
.chatlog { display: flex; flex-direction: column; gap: 10px; max-height: 230px; overflow-y: auto; scrollbar-width: none; }
.msg { display: flex; gap: 9px; }
.msg p { margin: 1px 0 0; }
.msg .row1 { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.msg time { font-size: 11px; color: var(--h-mutedFg); }
.msg.mine { justify-content: flex-end; }
.msg.mine p { background: var(--a); color: #fff; padding: 6px 11px; border-radius: 14px 14px 4px 14px; }
.dots { display: inline-flex; gap: 3px; align-items: center; padding: 8px 10px; background: var(--soft); border-radius: 12px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--h-mutedFg); animation: dot 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
/* notify */
.nstack { position: relative; height: 92px; cursor: pointer; transition: height .5s var(--e-out); }
.nstack .note { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--rl); background: var(--h-card-solid); border: 1px solid var(--h-border); box-shadow: 0 6px 16px -10px rgb(0 0 0 / .3); transform: translateY(calc(var(--i) * 9px)) scale(calc(1 - var(--i) * .05)); z-index: calc(10 - var(--i)); touch-action: pan-y; }
.nstack .note .grow { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.nstack .note span { font-size: 12px; color: var(--h-mutedFg); }
.nstack .note time { font-size: 11px; color: var(--h-mutedFg); }
.nstack.open { height: auto; cursor: default; display: flex; flex-direction: column; gap: 8px; }
.nstack.open .note { position: relative; transform: none; }
.nstack:not(.open) .note:nth-child(n+2) > * { opacity: 0; }
/* slots */
.slotgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 10px; user-select: none; touch-action: none; }
.slotgrid .col { display: grid; grid-template-rows: auto repeat(var(--rows), 8px); gap: 2px; }
.slotgrid .dh { font-size: 11px; color: var(--h-mutedFg); text-align: center; margin-bottom: 3px; }
.slotgrid i { border-radius: 2px; background: color-mix(in srgb, var(--h-success) 11%, transparent); cursor: crosshair; transition: background .15s; }
.slotgrid i.busy { background: var(--soft2); cursor: not-allowed; background-image: repeating-linear-gradient(135deg, transparent 0 3px, var(--soft) 3px 5px); }
.slotgrid i.sel { background: var(--a); box-shadow: 0 0 0 1px var(--a); }
.slotgrid i:not(.busy):hover { background: color-mix(in srgb, var(--h-success) 28%, transparent); }
.pick { font-size: 13px; font-variant-numeric: tabular-nums; }
/* kanban */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kcol { background: var(--soft); border-radius: var(--r); padding: 7px; min-height: 140px; display: flex; flex-direction: column; gap: 6px; }
.kh { font-size: 11.5px; font-weight: 600; display: flex; justify-content: space-between; color: var(--h-mutedFg); padding: 0 2px 2px; }
.kh em { font-style: normal; }
.kcard { background: var(--h-card-solid); border: 1px solid var(--h-border); border-radius: calc(var(--r) - 1px); padding: 7px 8px; font-size: 11.5px; display: flex; flex-direction: column; gap: 4px; cursor: grab; touch-action: none; user-select: none; position: relative; }
.kcard .eu-av { width: 18px; height: 18px; font-size: 8px; align-self: flex-end; margin-top: -16px; }
.kcard .kid { font: 10px var(--h-mono); color: var(--h-mutedFg); }
.kcard.drag { cursor: grabbing; z-index: 20; box-shadow: 0 16px 30px -10px rgb(0 0 0 / .35); scale: 1.04; }
/* triage */
.issue { display: flex; gap: 9px; align-items: flex-start; }
.dot.open { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--h-success); margin-top: 3px; flex: none; position: relative; }
.dot.open::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--h-success); }
.labels { min-height: 26px; }
.lab { background: color-mix(in srgb, var(--lc) 18%, transparent); color: color-mix(in srgb, var(--lc) 75%, var(--h-fg)); border-color: color-mix(in srgb, var(--lc) 40%, transparent); font-weight: 600; }
.asg { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.asg .slot { display: inline-flex; align-items: center; gap: 6px; min-width: 26px; min-height: 26px; border-radius: 50%; }
.asg .slot:empty { border: 1.5px dashed var(--h-input); }
.why { font-size: 12px; color: var(--h-mutedFg); margin: 10px 0 0; }
.triage .row.between { margin-top: 8px; }
/* file */
.file { display: grid; grid-template-columns: 120px 1fr; gap: 14px; }
.pv { position: relative; perspective: 600px; }
.page { aspect-ratio: 3/4; border-radius: 4px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 8px 18px -10px rgb(0 0 0 / .35); padding: 12px 10px; display: flex; flex-direction: column; gap: 5px; }
.page i { display: block; height: 4px; border-radius: 2px; background: #e5e5e5; }
.page .ttl { height: 7px; width: 60%; background: #c8c8c8; margin-bottom: 4px; }
.page .hit { background: #d6d6d6; }
.pg { position: absolute; bottom: -18px; left: 0; font-size: 10.5px; color: var(--h-mutedFg); }
.meta { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--h-mutedFg); min-width: 0; }
.meta b { color: var(--h-fg); font-size: 13.5px; }
.bul { margin: 8px 0 0; padding-left: 16px; color: var(--h-fg); font-size: 12px; }
/* graph */
.graph { width: 100%; height: 190px; touch-action: none; overflow: visible; }
.graph line { stroke: var(--h-input); stroke-width: 1.2; transition: stroke .2s, opacity .2s; }
.graph .nd circle { fill: var(--h-card-solid); stroke: var(--a); stroke-width: 2; cursor: grab; transition: fill .2s; }
.graph .nd.root circle { fill: var(--a); }
.graph text { font-size: 9px; fill: var(--h-mutedFg); text-anchor: middle; pointer-events: none; font-family: var(--h-font); }
.graph.hl line:not(.on) { opacity: .2; } .graph.hl line.on { stroke: var(--a); stroke-width: 1.8; }
.graph.hl .nd:not(.on) { opacity: .35; } .graph .nd { transition: opacity .2s; }
/* search */
.qfield { display: flex; align-items: center; gap: 8px; border: 1px solid var(--h-border); border-radius: var(--r); padding: 7px 10px; margin-bottom: 8px; font-size: 13px; }
.qfield .mg { color: var(--h-mutedFg); }
.results li { display: flex; flex-direction: column; padding: 8px; margin: 0 -8px; border-radius: var(--r); cursor: pointer; transition: background .15s, transform .2s var(--e-out); }
.results li:hover, .results li:focus { background: var(--soft); transform: translateX(3px); outline: none; }
.results li b { font-weight: 600; font-size: 13px; }
.results li span { font-size: 12px; color: var(--h-mutedFg); }
/* feed */
.feed .row { margin-bottom: 8px; }
.ptxt { margin: 0 0 10px; min-height: 40px; font-size: 13.5px; }
.pmedia { height: 92px; border-radius: 10px; background: radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--a) 70%, #fff), transparent 55%), radial-gradient(circle at 80% 70%, color-mix(in srgb, var(--k5) 70%, transparent), transparent 55%), var(--soft2); clip-path: inset(0 100% 0 0 round 10px); }
.stats { margin: 10px 0 0 !important; gap: 6px !important; }
.heart { border: 0; background: transparent; font-size: 18px; color: var(--h-mutedFg); cursor: pointer; position: relative; }
.heart.on { color: #f43f5e; }
/* frames */
.canvas { position: relative; height: 170px; border-radius: var(--r); background-color: var(--soft); background-image: radial-gradient(circle, var(--soft2) 1px, transparent 1.2px); background-size: 12px 12px; display: flex; align-items: center; justify-content: center; gap: 12px; overflow: hidden; }
.frame { width: 70px; height: 120px; border-radius: 6px; background: var(--h-card-solid); box-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 6px 14px -8px rgb(0 0 0 / .3); position: relative; padding: 18px 7px 7px; display: flex; flex-direction: column; gap: 6px; }
.frame .fn { position: absolute; top: -14px; left: 0; font-size: 9.5px; color: var(--h-mutedFg); }
.frame i { display: block; border-radius: 3px; background: var(--soft2); }
.frame .b1 { height: 34px; } .frame .b2 { height: 8px; width: 70%; } .frame .b3 { height: 18px; margin-top: auto; background: var(--a); }
.fcur { position: absolute; display: flex; align-items: flex-start; gap: 2px; pointer-events: none; z-index: 3; }
.fcur svg { width: 13px; height: 13px; fill: hsl(var(--hue) 80% 55%); }
.fcur span { font-size: 9.5px; color: #fff; background: hsl(var(--hue) 80% 50%); padding: 1px 5px; border-radius: 4px; margin-top: 9px; }
.cpin { position: absolute; left: 55%; top: 46%; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: var(--a); color: #fff; border: 2px solid #fff; font-size: 10px; font-weight: 700; cursor: pointer; opacity: 0; z-index: 4; }
.cpin.on { opacity: 1; }
.cpin .bub { position: absolute; left: 26px; top: -6px; width: 150px; text-align: left; font-weight: 500; background: var(--h-card-solid); color: var(--h-fg); border: 1px solid var(--h-border); border-radius: 8px; padding: 6px 8px; font-size: 11px; box-shadow: 0 8px 20px -10px rgb(0 0 0 / .35); opacity: 0; transform: translateY(4px); transition: all .25s var(--e-out); pointer-events: none; }
.cpin:hover .bub, .cpin:focus .bub { opacity: 1; transform: none; }
/* sign */
.signwrap { display: grid; grid-template-columns: 1fr 130px; gap: 12px; }
.docv { height: 170px; overflow: hidden; border-radius: 6px; background: var(--soft); padding: 10px; }
.doc { --z: 1; background: #fff; border-radius: 3px; padding: 12px; height: 100%; display: flex; flex-direction: column; gap: 6px; transform: scale(var(--z)); transform-origin: 50% 90%; transition: transform .8s var(--e-out); box-shadow: 0 2px 8px rgb(0 0 0 / .12); }
.doc .ln { display: block; height: 4px; border-radius: 2px; background: #e4e4e4; }
.sigbox { margin-top: auto; border-bottom: 1.5px solid #9a9a9a; position: relative; height: 34px; }
.sigbox span { position: absolute; left: 0; bottom: -14px; font-size: 8px; color: #999; }
.sigbox .sigsvg, .sigbox svg { display: block; width: 100%; height: 100%; }
.ptr { display: block; line-height: 0; }
.sig { fill: none; stroke: #1d3fb8; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.doc.zsig .sigbox { background: color-mix(in srgb, var(--a) 12%, transparent); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--h-mutedFg); }
.steps li i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10.5px; border: 1.5px solid var(--h-input); transition: all .3s; }
.steps li.cur { color: var(--h-fg); font-weight: 600; } .steps li.cur i { border-color: var(--a); color: var(--a); }
.steps li.ok i { background: var(--a); border-color: var(--a); color: #fff; font-size: 0; } .steps li.ok i::after { content: "✓"; font-size: 10px; }
/* context */
.cgrid { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; margin: 10px 0; }
.cgrid i { aspect-ratio: 1; border-radius: 2px; background: var(--c); transition: opacity .2s; }
.cgrid i.free { background: var(--soft); }
.cgrid.f i:not(.free) { opacity: .2; }
.cgrid.f0 i[data-p="0"], .cgrid.f1 i[data-p="1"], .cgrid.f2 i[data-p="2"], .cgrid.f3 i[data-p="3"], .cgrid.f4 i[data-p="4"] { opacity: 1; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; font-size: 12px; }
.legend li { display: flex; align-items: center; gap: 7px; cursor: default; border-radius: 4px; padding: 1px 3px; } .legend li:hover { background: var(--soft); }
.legend li i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.legend em { margin-left: auto; font-style: normal; color: var(--h-mutedFg); font-variant-numeric: tabular-nums; }
/* receipt + boarding: the slot printer */
.payhead { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.slot { position: relative; }
.slot .mouth { height: 8px; border-radius: 4px; background: linear-gradient(var(--h-fg), color-mix(in srgb, var(--h-fg) 70%, transparent)); opacity: .85; position: relative; z-index: 2; }
.slot .feed { height: 0; overflow: hidden; margin: -4px 10px 0; position: relative; z-index: 1; }
.paper { background: #fffdf8; color: #222; padding: 12px 14px 16px; font: 11.5px/1.6 var(--h-mono); box-shadow: inset 0 10px 10px -10px rgb(0 0 0 / .35); mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 10px 51% repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 5px) no-repeat; }
.paper .pm { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.paper .li { display: flex; justify-content: space-between; }
.paper .tot { border-top: 1px dashed #aaa; margin-top: 4px; padding-top: 4px; font-weight: 700; }
.barcode { height: 22px; margin: 8px 0 4px; background: repeating-linear-gradient(90deg, #222 0 2px, transparent 2px 3px, #222 3px 4px, transparent 4px 7px, #222 7px 10px, transparent 10px 11px); }
.paper .eu-hint { color: #777; font-size: 10px; }
.slot:not(.on) .mouth { opacity: .25; }
.pass-slot .feed { height: auto; }
.pass { background: linear-gradient(160deg, #fff, #f4f6fb); color: #111; border-radius: 0 0 10px 10px; padding: 12px 14px; box-shadow: inset 0 10px 10px -10px rgb(0 0 0 / .35); font-size: 11.5px; }
.pass .pr1 { display: flex; align-items: center; gap: 6px; }
.pass .pr1 .eu-hint { margin-left: auto; color: #777; }
.pass .pr2 { display: flex; align-items: center; justify-content: space-between; margin: 10px 0; }
.pass .iata { font: 700 28px/1 var(--h-font); letter-spacing: -.02em; display: block; }
.pass .plane { font-size: 18px; color: var(--a); }
.pass .pr3 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pass .pr3 span { display: block; color: #888; font-size: 10px; } .pass .pr3 b { font-size: 13px; }
.perf { border-top: 2px dashed #ccc; margin: 10px -14px 0; }
/* metric */
.metric .eu-seg { align-self: flex-start; }
.delta { font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 6px; }
.delta.up { color: var(--h-successFg); background: color-mix(in srgb, var(--h-success) 14%, transparent); }
.sparkwrap { position: relative; margin-top: 12px; color: var(--a); cursor: crosshair; }
.spark { width: 100%; height: 80px; display: block; overflow: visible; }
.spark .line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.spark .line.bad { stroke: var(--h-danger); }
.spark .zone { fill: color-mix(in srgb, var(--h-danger) 10%, transparent); }
.spark .hdot, .spark .cross { opacity: 0; } .spark .cross { stroke: var(--h-input); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.spark .hdot { fill: var(--h-card-solid); stroke: currentColor; stroke-width: 2; vector-effect: non-scaling-stroke; }
.sparkwrap.hov .hdot, .sparkwrap.hov .cross { opacity: 1; }
.tip { position: absolute; top: -26px; transform: translateX(-50%); font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--h-fg); color: var(--h-bg); opacity: 0; pointer-events: none; white-space: nowrap; transition: opacity .15s; font-variant-numeric: tabular-nums; }
.sparkwrap.hov .tip { opacity: 1; }
/* track */
.trk { margin-top: 16px; }
.rail { position: relative; height: 4px; border-radius: 2px; background: var(--soft2); margin: 18px 6px 10px; }
.rail .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--a); }
.rail .veh { position: absolute; top: -22px; transform: translateX(-50%) scaleX(-1); font-size: 18px; }
.trk ol { list-style: none; display: flex; justify-content: space-between; margin: 0; padding: 0; font-size: 10.5px; color: var(--h-mutedFg); }
.trk li { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 20%; text-align: center; }
.trk li i { width: 9px; height: 9px; border-radius: 50%; background: var(--soft2); }
.trk li.ok { color: var(--h-fg); } .trk li.ok i { background: var(--a); }
/* crm */
.pipe { position: relative; list-style: none; display: flex; padding: 3px; margin: 12px 0; border-radius: 999px; background: var(--soft); }
.pipe li { position: relative; z-index: 1; flex: 1; text-align: center; font-size: 11px; padding: 5px 2px; color: var(--h-mutedFg); transition: color .3s; }
.pipe li.past { color: var(--h-fg); }
.pipe li.cur { color: #fff; font-weight: 600; }
.pipe .ind { position: absolute; top: 3px; bottom: 3px; left: 0; border-radius: 999px; background: var(--a); box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--a) 60%, transparent); }
/* ride */
.fromto { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: var(--r); background: var(--soft); margin-bottom: 10px; font-size: 12.5px; }
.fromto i { display: inline-block; width: 8px; height: 8px; margin-right: 8px; }
.fromto .o { border-radius: 50%; background: var(--h-fg); } .fromto .d { background: var(--h-fg); }
.rides { position: relative; list-style: none; margin: 0; padding: 0; }
.rides li { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r); cursor: pointer; }
.rides li .grow { display: flex; flex-direction: column; line-height: 1.3; }
.rides .car { font-size: 22px; filter: grayscale(1) contrast(1.2); transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
.rides li.on .car { transform: translateX(4px) scale(1.12); filter: none; }
.rsel { position: absolute; left: 0; right: 0; top: 0; border-radius: var(--r); border: 2px solid var(--h-fg); background: var(--soft); }
/* route map */
.mapbox { position: relative; border-radius: var(--r); overflow: hidden; height: 170px; margin-bottom: 10px; }
.map { width: 100%; height: 100%; display: block; }
.map .land { fill: #f2efe9; } [data-scheme="dark"] .map .land { fill: #1d2025; }
.map .water { fill: #a9d8ea; } [data-scheme="dark"] .map .water { fill: #18324a; }
.map .park { fill: #c7ecd1; } [data-scheme="dark"] .map .park { fill: #1b3527; }
.map .streets line { stroke: #fff; stroke-width: 3.5; } [data-scheme="dark"] .map .streets line { stroke: #2c3138; }
.map .route { fill: none; stroke: var(--a); stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 1px 1px rgb(0 0 0 / .25)); }
.map .route.alt { stroke: color-mix(in srgb, var(--a) 35%, #9aa); stroke-width: 4; opacity: .7; }
.map .pin circle { fill: var(--h-fg); } .map .pin.b circle:first-child { fill: var(--a); } .map .pin .in { fill: #fff; }
.carDot { fill: #fff; stroke: var(--a); stroke-width: 3; }
.eta { position: absolute; left: 10px; top: 10px; background: var(--h-card-solid); padding: 4px 10px; border-radius: 999px; font-size: 12px; box-shadow: 0 4px 12px -6px rgb(0 0 0 / .4); }
/* player */
.player { display: flex; gap: 14px; align-items: center; }
.art { --hue: 200; width: 86px; height: 86px; border-radius: 10px; flex: none; background: radial-gradient(circle at 30% 30%, hsl(var(--hue) 90% 70%), transparent 60%), radial-gradient(circle at 70% 70%, hsl(calc(var(--hue) + 80) 90% 55%), transparent 60%), hsl(calc(var(--hue) + 160) 60% 30%); box-shadow: 0 10px 20px -10px rgb(0 0 0 / .5); }
.player .grow { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.bars { display: flex; gap: 2px; align-items: flex-end; height: 26px; margin: 6px 0; }
.bars i { flex: 1; height: var(--hgt); background: var(--a); border-radius: 1px; transform-origin: bottom; animation: bar .9s var(--d) ease-in-out infinite alternate; }
.paused .bars i { animation-play-state: paused; }
@keyframes bar { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.pp { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 0; background: var(--h-fg); position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 3px; }
.pp i { width: 3px; height: 10px; background: var(--h-bg); border-radius: 1px; transition: all .25s; }
.pp:not(.on) i:first-child { width: 0; height: 0; background: transparent; border-left: 9px solid var(--h-bg); border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.pp:not(.on) i:last-child { width: 0; }
.scrub { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--a) var(--v), var(--soft2) var(--v)); }
.scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--h-fg); }
.scrub::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--h-fg); }
/* workout */
.workout { display: flex; gap: 16px; align-items: center; }
.rings { width: 112px; height: 112px; transform: rotate(-90deg); flex: none; }
.rings circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.rings .bg { stroke: color-mix(in srgb, var(--c) 18%, transparent); }
.rings .fg { stroke: var(--c); stroke-dasharray: 100; stroke-dashoffset: 100; }
.wstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wstats b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.splits { display: flex; gap: 4px; align-items: flex-end; height: 40px; margin-top: 10px; }
.splits i { flex: 1; height: var(--h); border-radius: 3px 3px 1px 1px; background: color-mix(in srgb, var(--a) 70%, transparent); }
/* home */
.home { display: flex; gap: 16px; align-items: center; }
.kn { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.knob { --v: .5; width: 92px; height: 92px; border-radius: 50%; position: relative; cursor: grab; touch-action: none; background: conic-gradient(from -135deg, var(--a) calc(var(--v) * 270deg), var(--soft2) 0 270deg, transparent 0); display: grid; place-items: center; box-shadow: 0 0 calc(var(--v) * 34px) color-mix(in srgb, var(--a) calc(var(--v) * 70%), transparent); transition: box-shadow .2s; }
.knob .cap { width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--h-card-solid) 60%, #fff), var(--h-card-solid) 60%); box-shadow: 0 6px 14px -4px rgb(0 0 0 / .35), inset 0 1px 0 rgb(255 255 255 / .5); position: relative; transform: rotate(calc(-135deg + var(--v) * 270deg)); }
.knob .tick { position: absolute; left: 50%; top: 7px; width: 3px; height: 12px; margin-left: -1.5px; border-radius: 2px; background: var(--a); }
.knob:focus-visible { outline: 2px solid var(--a); outline-offset: 4px; }
.home .grow .scope:first-child { border-top: 0; }
/* merge (after @pitus_) */
.cgraph { list-style: none; margin: 12px 0; padding: 0 0 0 4px; position: relative; }
.cgraph li { position: relative; display: flex; align-items: center; gap: 10px; padding: 5px 0 5px 34px; font-size: 12.5px; }
.cgraph li .msg { flex: 1; }
.cgraph li::before { content: ""; position: absolute; top: 0; bottom: 0; left: 8px; width: 2px; background: var(--h-input); }
.cgraph li.feat::after { content: ""; position: absolute; top: 0; bottom: 0; left: 22px; width: 2px; background: #8250df; transition: opacity .6s, transform .6s var(--e-out); }
.cgraph li .node { position: absolute; left: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--h-card-solid); border: 2px solid var(--h-mutedFg); z-index: 1; }
.cgraph li.feat .node { left: 18px; border-color: #8250df; transition: left .6s var(--e-out); }
.cgraph li.merge-row .node { border-color: #8250df; background: #8250df; }
.cgraph.folded li.feat .node { left: 4px; }
.cgraph.folded li.feat::after { opacity: 0; transform: translateX(-14px); }
.prstate { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; color: #fff; transition: background .4s; }
.prstate.open { background: #1f883d; } .prstate.merged { background: #8250df; }
.prstate.ready { background: #1f883d; } .prstate.conflict { background: #bf8700; } .prstate.closed { background: #cf222e; }
.chk.fail i { background: #cf222e; } .chk.fail { border-color: color-mix(in srgb, #cf222e 45%, transparent); } .chk.skip { opacity: .7; } .chk.skip i { background: none; border: 1.5px solid var(--h-mutedFg); box-sizing: border-box; }
.conflict { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r); background: color-mix(in srgb, var(--h-warning) 14%, transparent); border: 1px solid color-mix(in srgb, var(--h-warning) 40%, transparent); font-size: 12px; overflow: hidden; }
.checks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; opacity: .4; transition: opacity .4s; }
.checks.on { opacity: 1; }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--h-border); }
.chk i { width: 8px; height: 8px; border-radius: 50%; background: var(--h-input); }
.chk.run i { background: var(--h-warning); animation: pulse 1s infinite; } .chk.ok i { background: #1f883d; } .chk.ok { border-color: color-mix(in srgb, #1f883d 40%, transparent); }
/* ci */
.gantt { list-style: none; margin: 4px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.gantt li { display: grid; grid-template-columns: 88px 1fr 34px; gap: 8px; align-items: center; font-size: 11.5px; }
.gantt .jn { font-family: var(--h-mono); color: var(--h-mutedFg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt .lane { position: relative; height: 10px; background: var(--soft); border-radius: 3px; }
.gantt .bar { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--h-success); transform-origin: left; }
.gantt .bar.bad { background: var(--h-danger); }
.gantt .bar.rerun { background: repeating-linear-gradient(45deg, var(--h-success) 0 6px, color-mix(in srgb, var(--h-success) 60%, transparent) 6px 12px); background-size: 17px 17px; animation: barber .6s linear infinite; }
@keyframes barber { to { background-position: 17px 0; } }
.gantt .dur { text-align: right; }
.fdiff { margin: 0; padding: 8px 10px; border-radius: var(--r); background: var(--soft); font-size: 11.5px; overflow: auto; }
.fdiff .del { color: var(--h-dangerFg); background: color-mix(in srgb, var(--h-danger) 12%, transparent); } .fdiff .add { color: var(--h-successFg); background: color-mix(in srgb, var(--h-success) 12%, transparent); }
/* deploy */
.stg { list-style: none; display: flex; gap: 6px; margin: 0 0 8px; padding: 0; font-size: 11.5px; }
.stg li { padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--h-mutedFg); }
.stg li.cur { background: color-mix(in srgb, var(--h-warning) 20%, transparent); color: var(--h-fg); }
.stg li.ok { background: color-mix(in srgb, var(--h-success) 18%, transparent); color: var(--h-successFg); }
.prog { height: 4px; border-radius: 2px; background: var(--soft2); overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--a); transition: width .35s var(--e-out); }
.log { height: 104px; overflow: hidden; margin: 8px 0; padding: 8px 10px; border-radius: var(--r); background: #0d0f12; color: #c9d1d9; font-size: 11px; line-height: 1.55; }
.url { display: inline-block; font: 12px var(--h-mono); color: var(--a); opacity: 0; text-decoration: none; }
.url.on { opacity: 1; }
/* incident */
.alert { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--h-danger); animation: pulseR 1.2s infinite; }
.eu-card.ok .pulse { background: var(--h-success); animation: none; }
@keyframes pulseR { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--h-danger) 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.tl { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.tl time { font-family: var(--h-mono); color: var(--h-mutedFg); margin-right: 8px; }
/* migrate */
.mig { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mig li { display: grid; grid-template-columns: 74px 1fr 70px 80px; align-items: center; gap: 8px; font-size: 12px; }
.mig .tn { font-family: var(--h-mono); }
.mig .cnt { text-align: right; font-variant-numeric: tabular-nums; }
.mig li.cur .tn::before { content: "▸ "; color: var(--a); }
.mig li.ok .tn::before { content: "✓ "; color: var(--h-success); }
.timer { font: 12px var(--h-mono); color: var(--h-mutedFg); font-variant-numeric: tabular-nums; }

/* ---------- kinds gallery ---------- */
.kindgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 18px; align-items: start; }
.kcell { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.eu-card { min-width: 0; }
.kcol, .kanban > * { min-width: 0; }
.wm { white-space: nowrap; }
.kl { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.kl code { font-size: 11px; color: var(--h-mutedFg); }
.kl .replay { margin-left: auto; border: 0; background: transparent; cursor: pointer; color: var(--h-mutedFg); font-size: 15px; transition: transform .5s var(--e-out); }
.kl .replay:hover { transform: rotate(-200deg); color: var(--h-fg); }

/* ---------- theme engine ---------- */
.engine { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.ctl { display: flex; flex-direction: column; gap: 18px; }
.pgroup { margin-bottom: 12px; }
.prow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.preset { border: 1px solid var(--h-border); background: var(--h-card-solid); border-radius: var(--r); padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; width: 104px; transition: transform .25s var(--e-out), border-color .2s, box-shadow .2s; }
.preset:hover { transform: translateY(-2px); }
.preset[aria-pressed="true"] { border-color: var(--h-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-primary) 22%, transparent); }
.preset .mini { height: 54px; border-radius: var(--pr); background: var(--pb); position: relative; overflow: hidden; border: 1px solid color-mix(in srgb, var(--pf) 12%, transparent); }
.preset .mini .s { position: absolute; left: 0; top: 0; bottom: 0; width: 28%; background: var(--ps); }
.preset .mini .c { position: absolute; left: 36%; right: 8%; top: 10px; height: 22px; border-radius: var(--pr); background: var(--pc); border: 1px solid color-mix(in srgb, var(--pf) 12%, transparent); }
.preset .mini .p { position: absolute; left: 36%; top: 38px; width: 26px; height: 8px; border-radius: 4px; background: var(--pp); }
.preset .pn { font-size: 11.5px; text-align: left; color: var(--h-fg); }
.ctlgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 16px; border: 1px solid var(--h-border); border-radius: var(--rl); background: var(--h-card-solid); }
.ctlgrid label, .ctlgrid > div { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 500; }
.ctlgrid .wide { grid-column: 1 / -1; }
.ctlgrid .lbl { font-size: 12.5px; }
.ctlgrid input[type="range"] { accent-color: var(--h-primary); width: 100%; }
.ctlgrid input[type="color"] { width: 100%; height: 32px; border: 1px solid var(--h-border); border-radius: var(--r); background: transparent; padding: 2px; cursor: pointer; }
.ctlgrid select { height: 34px; border-radius: var(--r); border: 1px solid var(--h-border); background: var(--h-bg); color: var(--h-fg); padding: 0 8px; font: inherit; }
.tok pre { margin: 8px 0 0; max-height: 220px; overflow: auto; font-size: 11.5px; padding: 12px 14px; border-radius: var(--rl); background: var(--soft); border: 1px solid var(--h-border); }
.pvwrap { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 10px; }
.themepv { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: calc(var(--rl) + 4px); background: var(--h-sidebar); border: 1px solid var(--h-border); }

/* ---------- flows ---------- */
.flowbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.flowbar .eu-seg { flex-wrap: wrap; }
.flowcv { position: relative; height: 380px; border-radius: calc(var(--rl) + 4px); border: 1px solid var(--h-border); background-color: var(--h-sidebar); background-image: radial-gradient(circle, var(--soft2) 1px, transparent 1.3px); background-size: 20px 20px; overflow: hidden; }
#flowsvg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cable-shadow { fill: none; stroke: rgb(0 0 0 / .12); stroke-width: 7; filter: blur(3px); transform: translateY(4px); }
.cable { fill: none; stroke: var(--h-input); stroke-width: 3; stroke-linecap: round; }
.cable-flow { fill: none; stroke: var(--h-primary); stroke-width: 3; stroke-linecap: round; stroke-dasharray: .02 .06; animation: flowdash 1.4s linear infinite; opacity: .8; }
@keyframes flowdash { to { stroke-dashoffset: -.08; } }
.packet { fill: var(--h-primary); filter: drop-shadow(0 0 6px var(--h-primary)); }
.fnode { position: absolute; left: 0; top: 0; width: 230px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--rl); background: var(--h-card-solid); border: 1px solid var(--h-border); box-shadow: 0 10px 26px -14px rgb(0 0 0 / .35); cursor: grab; touch-action: none; user-select: none; transition: box-shadow .25s, border-color .3s, scale .25s var(--e-out); }
.fnode > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.fnode b { font-size: 13.5px; }
.fnode .st { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fnode.drag { cursor: grabbing; scale: 1.04; box-shadow: 0 24px 40px -16px rgb(0 0 0 / .45); z-index: 5; }
.fnode.run { border-color: var(--a); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a) 25%, transparent), 0 10px 26px -14px rgb(0 0 0 / .35); }
.fnode.ok { border-color: color-mix(in srgb, var(--h-success) 60%, var(--h-border)); }
.fnode.ok b::after { content: " ✓"; color: var(--h-success); }
.port { position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--h-card-solid); border: 2px solid var(--h-input); }
.port.in { left: -6px; } .port.out { right: -6px; }

/* ---------- spec ---------- */
.specgrid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; }
.code { margin: 0; padding: 18px 20px; border-radius: var(--rl); background: #0d0f12; color: #c9d1d9; font-size: 12.5px; line-height: 1.6; overflow: auto; max-height: 520px; min-height: 280px; }
.code .k { color: #7ee0ff; } .code .s { color: #b5f0a0; } .code .n { color: #ffb86c; }
.adapters h3 { font: 400 26px/1 var(--serif); margin: 0 0 12px; }
.adapters ul { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.adapters ul li { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--h-border); border-radius: var(--r); background: var(--h-card-solid); font-size: 13px; }
.adapters ul li span { color: var(--h-mutedFg); font-size: 12.5px; }
.rules { margin: 0 0 14px; padding-left: 18px; color: var(--h-mutedFg); font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- footer ---------- */
.foot { max-width: 1480px; margin: 90px auto 0; padding: 30px 24px 60px; border-top: 1px solid var(--h-border); display: grid; grid-template-columns: 1fr 1.4fr; gap: 30px; }
.srcs { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--h-mutedFg); }
.srcs b { color: var(--h-fg); }

/* ---------- drawer ---------- */
#drawer { position: fixed; inset: 0; z-index: 50; }
#drawer .scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .35); backdrop-filter: blur(3px); }
#drawer .panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(520px, 100vw); background: var(--h-bg); border-left: 1px solid var(--h-border); box-shadow: -30px 0 60px -30px rgb(0 0 0 / .4); display: flex; flex-direction: column; }
.dhead { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--h-border); }
.dhead h3 { margin: 0; font: 400 30px/1 var(--serif); }
.dhead .x { margin-left: auto; border: 0; background: var(--soft); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.dbody { flex: 1; overflow-y: auto; padding: 18px 22px 40px; display: flex; flex-direction: column; gap: 22px; }
.dk { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 13px; font-weight: 500; }
.dk span { flex: 1; }
body.drawer-open { overflow: hidden; }

/* ---------- palette ---------- */
#palette { border: 0; padding: 0; background: transparent; max-width: none; width: min(640px, 94vw); margin-top: 12vh; }
#palette::backdrop { background: rgb(0 0 0 / .35); backdrop-filter: blur(4px); }
.pbox { background: var(--h-card-solid); color: var(--h-fg); border: 1px solid var(--h-border); border-radius: calc(var(--rl) + 4px); box-shadow: 0 40px 80px -20px rgb(0 0 0 / .5); overflow: hidden; }
.pin { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--h-border); }
.pin input { flex: 1; border: 0; outline: 0; background: transparent; font: 16px var(--h-font); color: inherit; }
#pres { list-style: none; margin: 0; padding: 6px; max-height: 56vh; overflow-y: auto; }
#pres li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); cursor: pointer; font-size: 13.5px; }
#pres li.on { background: var(--soft2); }
#pres li em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--h-mutedFg); }
#pres .pt { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--soft); font-size: 11px; font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .win { transform: none; height: 560px; }
  .engine, .specgrid { grid-template-columns: 1fr; }
  .pvwrap { position: static; }
  .band { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
}
@media (max-width: 720px) {
  .nav, .search { display: none; }
  .search { padding: 6px 8px; } .search kbd { border: 0; background: transparent; }
  .hostpick button { padding: 4px 8px; font-size: 12px; white-space: nowrap; }
  .triage .row.between { flex-wrap: wrap; }
  .win { height: 600px; }
  .bar { padding: 10px 14px; gap: 10px; }
  .cols { grid-template-columns: 1fr; }
  .side { display: none; }
  .hero, .sec { padding-left: 14px; padding-right: 14px; }
  .kindgrid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .band { grid-template-columns: repeat(2, 1fr); }
  .foot { grid-template-columns: 1fr; }
  .file, .signwrap { grid-template-columns: 1fr; }
  .ctlgrid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .tile { opacity: 1; translate: none; }
}

.icon-btn svg { width: 16px; height: 16px; }

/* ---- agent loop (js/loop.js): handoff lines, undo, why, outcome states ---- */
.lp-strip { display: flex; flex-direction: column; gap: 4px; padding: 0 var(--pad) calc(10px * var(--h-density)); font-size: 12.5px; line-height: 1.4; }
.lp-strip:empty { display: none; }
.lp-line { position: relative; display: flex; align-items: baseline; gap: 8px; min-width: 0; padding: 5px 9px; border-radius: calc(var(--r) + 2px); background: var(--soft); overflow: hidden; }
.lp-line .lp-txt { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.lp-who { flex: none; font-weight: 600; font-size: 11px; letter-spacing: .02em; color: var(--h-mutedFg); display: inline-flex; align-items: center; gap: 4px; }
.lp-line.you { background: var(--soft2); }
.lp-line.you .lp-who { color: var(--a); }
.lp-line.agent .lp-who { color: var(--h-fg); }
.lp-spark { color: var(--a); font-size: 11px; }
.lp-dots { display: inline-flex; gap: 3px; align-self: center; }
.lp-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--h-mutedFg); animation: lp-dot 1s infinite ease-in-out; }
.lp-dots i:nth-child(2) { animation-delay: .15s; } .lp-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes lp-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.lp-line.local { color: var(--h-fg); }
.lp-line.local.settled, .lp-line.undone { color: var(--h-mutedFg); }
.lp-undo { flex: none; border: 0; background: none; color: var(--a); font: 600 12px var(--h-font); cursor: pointer; padding: 0 2px; }
.lp-undo:hover { text-decoration: underline; }
.lp-undo:focus-visible, .lp-why:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; border-radius: 4px; }
.lp-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--a); opacity: .5; transform-origin: left; }
.lp-why-wrap { display: contents; }
.lp-why { border: 0; background: none; padding: 0; color: var(--h-mutedFg); font: 500 12px var(--h-font); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.lp-why:hover, .lp-why[aria-expanded="true"] { color: var(--h-fg); }
.lp-why-body { flex-basis: 100%; margin: 6px 0 0; padding: 7px 10px; border-radius: var(--r); background: var(--soft); font-size: 12.5px; line-height: 1.45; }
.lp-why-body[hidden] { display: none; }
.lp-sel { outline: 2px solid var(--a); outline-offset: -2px; background: color-mix(in srgb, var(--a) 9%, transparent) !important; }
.eu-card [tabindex]:focus-visible, .eu-card li:focus-visible { outline: 2px solid var(--a); outline-offset: -2px; }
.eu-card.denied { border-color: color-mix(in srgb, var(--h-mutedFg) 45%, var(--h-border)); }
.eu-card.denied .eu-b { opacity: .62; }
.eu-card.paused .eu-status { background: color-mix(in srgb, var(--h-warning) 18%, transparent); color: var(--h-warning); }
.lp-reveal { overflow: hidden; }
.lp-reveal[hidden] { display: none; }
.lp-pre { margin: 8px 0 0; padding: 8px 10px; border-radius: var(--r); background: var(--soft); font: 11.5px/1.55 var(--h-mono, ui-monospace, monospace); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow: auto; }
.lp-pre .add { color: var(--h-success); } .lp-pre .del { color: var(--h-danger); } .lp-pre .dim { color: var(--h-mutedFg); }
.lp-inline { display: flex; gap: 6px; margin-top: 8px; }
.lp-inline input { flex: 1; min-width: 0; border: 1px solid var(--h-border); background: var(--h-card-solid); color: var(--h-fg); border-radius: var(--r); padding: 6px 9px; font: 13px var(--h-font); }
.lp-inline input:focus { outline: 2px solid var(--a); outline-offset: -1px; border-color: transparent; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.graph .nd.pick circle { fill: var(--a); stroke-width: 3; }
.graph .nd:focus-visible { outline: none; } .graph .nd:focus-visible circle { stroke-width: 4; }
.cgrid.pinf i[data-p="2"] { box-shadow: inset 0 0 0 1.5px var(--h-fg); }
.legend li.pinned::after { content: "📌"; font-size: 10px; margin-left: 2px; }
.legend li[role="button"] { cursor: pointer; }
.ptxt.editing { outline: 1px dashed var(--h-input); outline-offset: 4px; border-radius: 4px; }
.eu-reply.editable [contenteditable="true"] { outline: none; }
.eu-reply.editable { border-style: solid; border-color: color-mix(in srgb, var(--a) 45%, var(--h-border)); }
.qfield .q-in { flex: 1; min-width: 0; border: 0; background: none; color: var(--h-fg); font: inherit; outline: none; }
.results li.empty { cursor: default; } .results li.empty:hover { transform: none; }
.inbox li { cursor: pointer; }
.chatlog + .eu-chips + .lp-inline input { font-size: 12.5px; }
.eu-btn.hold.ghosty { background: transparent; color: var(--h-fg); border-color: var(--h-border); box-shadow: none; }
.eu-btn.hold.ghosty .fill { background: color-mix(in srgb, var(--h-danger) 30%, transparent); }
.eu-btn.hold.ghosty.done { background: var(--h-success); color: #fff; border-color: transparent; }
.trk.live .veh { animation: lp-bob 1.2s ease-in-out infinite; }
@keyframes lp-bob { 50% { transform: translateX(-50%) translateY(-3px) scaleX(-1); } }
.sparkwrap { cursor: crosshair; }
.spark .thr { stroke: var(--h-warning); stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.rc-lines { display: grid; gap: 2px; margin: 8px 0 4px; font-size: 12.5px; }
.rc-li { display: flex; justify-content: space-between; padding: 3px 8px; border-radius: 6px; color: var(--h-mutedFg); }
.rc-li span:last-child { color: var(--h-fg); font-variant-numeric: tabular-nums; }
.rc-li.odd { background: color-mix(in srgb, var(--h-warning) 12%, transparent); color: var(--h-fg); }
.rc-note { display: flex; flex-wrap: wrap; margin: 2px 0 8px; }
.rc-lines[hidden], .rc-note[hidden] { display: none; }
.rt-step { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding: 8px 10px; border-radius: var(--r); background: color-mix(in srgb, var(--a) 12%, transparent); }
.rt-step[hidden] { display: none; }
.crm-log { margin: 8px 0 0; }
.ap-effect { margin: 2px 0 8px; min-height: 1.4em; }
.approve .who { flex-wrap: wrap; }
.approve .who .lp-why { margin-left: auto; }
.mig li { grid-template-columns: minmax(92px, auto) 1fr 70px 80px; }
.mig .tn { white-space: nowrap; }
.gl-pill { border: 0; cursor: pointer; }
.gl-pill[hidden] { display: none; }
.bd-sh.sel path { stroke-width: 3; filter: drop-shadow(0 0 3px rgb(47 128 237 / .7)); }
.bd-sv[data-mode="Select"] { cursor: default; } .bd-sv[data-mode="Hand"] { cursor: grab; } .bd-sv[data-mode="Text"], .bd-sv[data-mode="Sticky note"] { cursor: text; }
.bd-tx.mine { font-weight: 600; }

/* ---- host matrix (#hosts) and its frames (host-frame.html): simulated agent hosts ---- */
.hm-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px; align-items: start; }
.hm-cell { margin: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--h-border); border-radius: calc(var(--rl) + 4px); background: var(--h-card-solid); min-width: 0; }
.hm-cap { display: flex; flex-direction: column; gap: 6px; }
.hm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-chip { font: 500 11px/1 var(--h-mono); padding: 4px 7px; border-radius: 999px; background: var(--soft); color: var(--h-mutedFg); white-space: nowrap; }
.hm-chip.sim { background: color-mix(in srgb, var(--h-warning, #fe9a00) 18%, transparent); color: var(--h-fg); }
.hm-chip.tier { color: var(--h-fg); }
.hm-chip.rc.ok { background: color-mix(in srgb, var(--h-success, #00bc7d) 16%, transparent); color: var(--h-fg); }
.hm-surf { margin: 0; font-size: 12px; }
.hm-frame { width: 100%; height: 360px; border: 0; border-radius: var(--rl); display: block; background: var(--soft); }
.hm-bridge { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hm-log { margin: 0; max-height: 150px; overflow: auto; font-size: 11px; line-height: 1.4; padding: 8px 10px; border-radius: var(--r); background: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.hm-text { margin: 0; font-size: 12px; }
.hf-body { background: var(--h-bg); overflow: hidden; }
#hf { padding: 12px; }
.hf-turn { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.hf-tag { align-self: flex-start; font: 500 11px/1 var(--h-mono); color: var(--h-mutedFg); padding: 4px 8px; border-radius: var(--r); background: var(--h-muted); border: 1px solid var(--h-border); }
[data-host="tern"] .hf-tag { border-style: dashed; }
[data-host="o8"] .hf-tag, [data-host="claude"] .hf-tag, [data-host="chatgpt"] .hf-tag, [data-host="codex"] .hf-tag { border-radius: 999px; }
.hostpick { min-width: 0; flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
.search { white-space: nowrap; flex: none; }
@media (max-width: 1600px) { .search > span { display: none; } }
.hostpick::-webkit-scrollbar { display: none; }
.hostpick button { white-space: nowrap; flex: none; }
