/* Opsyn intro page: hero lockup, dot field and the product film. Colours come only from tokens. */

/* ── Hero ────────────────────────────────────────── */
.hero { position: relative; isolation: isolate; padding: 24px 0 0; overflow: clip; }
/* Head + film share one width; the film is sized so the whole stage fits one screen. */
.stage { width: min(1120px, 100% - 48px, (100svh - 236px) * 1.647); }
.hero-inner { position: relative; }
.dots {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
}
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 40px; width: 560px; height: 320px; translate: -50% 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent);
  pointer-events: none;
}

.hero-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.head-actions { display: flex; gap: 12px; flex: none; }
/* Combination C: icon, then the wordmark over the line. */
.lockup { display: flex; align-items: center; gap: 16px; transform-origin: 0 0; }
.lockup-icon { width: 72px; height: 72px; flex: none; filter: drop-shadow(0 12px 28px color-mix(in srgb, var(--accent) 22%, transparent)); }
.lockup-text { display: flex; flex-direction: column; gap: 6px; width: 168px; }
/* The line runs exactly as wide as the wordmark above it. */
.lockup-line { font-size: 12px; font-weight: 400; line-height: 1.3; color: var(--muted); white-space: nowrap; text-align: justify; text-align-last: justify; }
.li-spark { transform-origin: 172px 150px; }   /* the icon keeps its own colours in every palette */
.lockup-word { width: 168px; height: 53px; color: var(--text-strong); }
.lw { stroke: currentColor; }
.lw-s { stroke: var(--accent); }
.lw { transition: stroke var(--slow); }

/* Drawn in order: tile, chevron, spark, then the letters; the shared s last. */
@media (prefers-reduced-motion: no-preference) {
  .li-tile, .li-edge { animation: lk-fade 500ms ease-out both; }
  .li-chev { stroke-dasharray: 1; animation: lk-draw 520ms 260ms cubic-bezier(.6, 0, .3, 1) both; }
  .li-spark { animation: lk-pop 520ms 700ms cubic-bezier(.3, 1.5, .5, 1) both; }
  .lw { stroke-dasharray: 1; animation: lk-draw 420ms calc(900ms + var(--i) * 110ms) cubic-bezier(.6, 0, .3, 1) both; }
  .lw-s { animation: lk-draw 520ms 1500ms cubic-bezier(.6, 0, .3, 1) both, lk-glow 900ms 1900ms ease-out both; }
  .lockup-line { animation: lk-type 700ms 1900ms steps(13, end) both; }
  /* Intro: the lockup draws large in the middle of the screen, then settles top-left and the film comes in. */
  .lockup { transition: transform 900ms cubic-bezier(.65, 0, .25, 1); }
  .head-actions, .film { transition: opacity 700ms ease 500ms, transform 700ms ease 500ms; }
  .intro .lockup { transform: translate(var(--lx, 0), var(--ly, 0)) scale(var(--ls, 1.8)); }
  .intro:not(.lk-ready) .lockup { visibility: hidden; }
  .intro:not(.lk-ready) .lockup * { animation-play-state: paused; }
  .intro .head-actions, .intro .film { opacity: 0; transform: translateY(24px); transition: none; }
  .intro .top .brand { opacity: 0; }
}
@keyframes lk-fade { from { opacity: 0; transform: scale(.92); transform-origin: 128px 128px; } }
@keyframes lk-draw { 0% { stroke-dashoffset: 1; stroke-opacity: 0; } 1% { stroke-opacity: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes lk-pop { from { opacity: 0; transform: scale(.2) rotate(-60deg); } }
@keyframes lk-glow { 0% { filter: none; } 40% { filter: drop-shadow(0 0 6px var(--accent)); } 100% { filter: none; } }
@keyframes lk-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes lk-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }


/* ── Top bar star ────────────────────────────────── */
.star-nav {
  gap: 8px; margin-left: 4px;
  border: 1px solid var(--line); color: var(--text) !important;
}
.star-nav .gh { width: 16px; height: 16px; }
.star-count {
  padding-left: 8px; margin-left: 2px; border-left: 1px solid var(--line);
  font-variant-numeric: tabular-nums; color: var(--muted);
}
.star-icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
a:hover > .star-icon { fill: var(--warning); stroke: var(--warning); }

/* ── Film frame ──────────────────────────────────── */
.film { margin-top: 20px; text-align: left; }
.film-bar { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 12px; }
.film-tabs { display: flex; flex: 1; gap: 4px; min-width: 0; }
.film-tab {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 12px; overflow: hidden;
  border: 1px solid transparent; border-radius: var(--r-sm); background: transparent;
  color: var(--hint); font: 400 13px/1.3 var(--font-ui); text-align: left; cursor: pointer;
  transition: color var(--fast), background-color var(--fast), border-color var(--fast);
}
.film-tab:hover { color: var(--text); background: var(--hover); }
.film-tab .n { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-strong); font: 400 12px/1 var(--font-mono); }
.film-tab .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.film-tab .pg { position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.film-tab.past .pg { transform: scaleX(1); opacity: 0.35; }
.film-tab.on { color: var(--text-strong); background: var(--surface-raised); border-color: var(--line); }
.film-tab.on .n, .film-tab.past .n { border-color: var(--accent); color: var(--accent-text); }
.film-play {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer;
  transition: color var(--fast), background-color var(--fast);
}
.film-play:hover { color: var(--text-strong); background: var(--hover); }
.film-play svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.film-frame {
  position: relative; overflow: clip;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--glow-live), var(--shot-shadow);
  transition: background-color var(--slow), border-color var(--slow), box-shadow var(--slow);
}
.film-view { position: relative; overflow: clip; }
.film:not(.ready) .film-view { height: auto !important; }
.film-canvas {
  position: relative; width: 1120px; height: 680px; transform-origin: 0 0; transform: scale(var(--s, 1));
  transition: opacity 700ms ease, filter 700ms ease;
}
.film:not(.ready) .film-canvas { width: auto; height: auto; transform: none; }
.film-poster { width: 100%; height: auto; }

/* Ending: the app sinks back and the line comes forward. */
.film-end {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity 600ms ease;
}
.film-frame.is-end .film-canvas { opacity: 0.14; filter: blur(2px); }
.film-frame.is-end .film-end { opacity: 1; pointer-events: auto; }
.end-title { color: var(--text-strong); font-weight: 600; font-size: clamp(30px, 5vw, 60px); line-height: 1.14; letter-spacing: -0.02em; }
.film-end .lede { max-width: 620px; margin: 20px auto 0; color: var(--muted); font-size: 17px; text-wrap: pretty; }
@media (prefers-reduced-motion: no-preference) {
  .film-frame.is-end .film-end > * { animation: lk-rise 600ms ease-out both; }
  .film-frame.is-end .film-end > :nth-child(2) { animation-delay: 250ms; }
  .film-frame.is-end .film-end > :nth-child(3) { animation-delay: 450ms; }
  .film-frame.is-end .film-end > :nth-child(4) { animation-delay: 600ms; }
}
.replay {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; min-height: 36px; padding: 0 12px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); font: 400 13px/1 var(--font-ui); cursor: pointer;
}
.replay:hover { color: var(--text-strong); background: var(--hover); }
.replay svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Scenes ──────────────────────────────────────── */
/* contain: paint keeps moving pieces (the flying dot) from scrolling the page. */
.scene { position: absolute; inset: 0; contain: paint; opacity: 0; transform: scale(.985); transition: opacity 400ms ease, transform 400ms ease; }
.scene.in { opacity: 1; transform: none; }
.scene.leaving { opacity: 0; transform: scale(1.01); }
.film-canvas, .film-canvas * { --fs: 13px; }
.scene { font: 400 13px/1.55 var(--font-ui); color: var(--text); }
.scene .ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.scene .muted { color: var(--hint); }
.scene b { color: var(--text-strong); font-weight: 600; }
.scene code, .scene pre { font-family: var(--font-mono); }
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.dot.idle { background: var(--line-strong); }
.dot.run { background: var(--accent); animation: f-breathe 1.2s ease-in-out infinite; }
.dot.live { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: f-breathe 2.4s ease-in-out infinite; }
.dot.ok { background: var(--success); }
@keyframes f-breathe { 50% { opacity: .45; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--muted); font-size: 12px; line-height: 22px; white-space: nowrap; }
.chip .ico { width: 13px; height: 13px; }
.chip.warn { border-color: transparent; background: var(--warning-soft); color: var(--warning); }
.chip.ok { border-color: transparent; background: var(--success-soft); color: var(--success); }

/* App window */
.win { position: absolute; inset: 0; display: flex; background: var(--bg); transition: background-color var(--slow); }
.w-rail { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; background: var(--bg-deep); border-right: 1px solid var(--line); }
.w-mark svg { width: 30px; height: 30px; display: block; margin-bottom: 12px; }
.w-nav { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 52px; padding: 8px 0; border-radius: var(--r-md); color: var(--muted); font-size: 12px; }
.w-nav .ico { width: 20px; height: 20px; }
.w-nav.on { background: var(--accent-soft); color: var(--accent-text); }
.w-set { margin-top: auto; }
.w-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.w-top { flex: none; display: flex; align-items: center; height: 48px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.w-word { width: 50px; height: 16px; color: var(--text-strong); }
.w-search { display: flex; align-items: center; gap: 8px; width: 340px; height: 32px; margin: 0 auto; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-inset); color: var(--hint); font-size: 13px; }
.w-search kbd { margin-left: auto; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 4px; font: 400 12px/18px var(--font-ui); }
.w-body { flex: 1; min-height: 0; position: relative; }
.win.compact .w-rail { width: 56px; }
.win.compact .w-nav { width: 44px; font-size: 0; gap: 0; }
.win.compact .w-search { display: none; }

/* Terminal */
.term { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--terminal-bg); }
.t-tabs { flex: none; display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.t-tab { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 16px; border-radius: var(--r-sm) var(--r-sm) 0 0; color: var(--muted); }
.t-tab.on { background: var(--terminal-bg); color: var(--text-strong); box-shadow: inset 0 2px 0 var(--accent); }
.t-ask { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.t-body { flex: 1; min-height: 0; overflow: hidden; padding: 14px 20px; font: 400 13px/22px var(--font-mono); color: var(--terminal-text); white-space: pre-wrap; }
.t-line.sub { color: var(--terminal-muted); padding-left: 16px; }
.t-line.say { color: var(--text-strong); }
.t-line .hp { color: var(--hl-prompt); font-weight: 600; }
.t-line .cwd { color: var(--hl-cwd); }
.t-line .ty.ask { color: var(--accent-text); }
.t-line .tc { color: var(--hl-command); }
.t-line .net { color: var(--hl-cwd); }
.t-line .err { color: var(--danger); }
.t-line .warn { color: var(--hl-warning); }
.t-line .ok { color: var(--hl-success); }
.t-line .tree { color: var(--terminal-muted); }
.t-line .muted { color: var(--terminal-muted); }
.bul { color: var(--text-strong); }
.bul.run { color: var(--accent); animation: f-breathe .9s ease-in-out infinite; }
.bul.wait { color: var(--warning); animation: f-breathe 1.6s ease-in-out infinite; }
.caret { display: inline-block; width: 8px; height: 16px; margin-left: 1px; vertical-align: -3px; background: var(--terminal-text); animation: f-blink 1s steps(1) infinite; }
@keyframes f-blink { 50% { opacity: 0; } }
.t-status { flex: none; display: flex; align-items: center; gap: 20px; height: 32px; padding: 0 20px; border-top: 1px solid var(--line); background: var(--bg); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.t-status span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.t-status .grow { flex: 1; }

/* Assistant */
.ai { position: absolute; inset: 0; display: flex; }
.a-list { flex: none; width: 232px; padding: 12px; border-right: 1px solid var(--line); background: var(--bg); }
.a-list-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 8px; color: var(--text-strong); font-weight: 600; }
.a-plus { color: var(--muted); font-size: 18px; }
.a-group { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 0 8px; color: var(--hint); font-size: 12px; }
.a-group .ico { width: 13px; height: 13px; }
.a-item { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 8px; border-radius: var(--r-sm); color: var(--text); }
.a-item span { margin-left: auto; color: var(--hint); font-size: 12px; }
.a-item.on { background: var(--surface-raised); color: var(--text-strong); }
.a-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.a-main.solo { position: absolute; inset: 0; }
.a-head { flex: none; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.a-head b { font-size: 15px; margin-right: 4px; white-space: nowrap; }
.a-scroll { flex: 1; min-height: 0; overflow: hidden; padding: 16px 48px 24px; display: flex; flex-direction: column; gap: 10px; }
.a-main.solo .a-scroll { padding: 16px 24px 24px; }
.a-user { align-self: flex-end; max-width: 78%; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-raised); color: var(--text-strong); }
.a-user.agent { border-color: color-mix(in srgb, var(--info) 35%, var(--line)); }
.a-from { display: block; color: var(--info); font-size: 12px; }
.a-who { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--muted); font-size: 12px; }
.a-who svg { width: 20px; height: 20px; }
.a-say { color: var(--text-strong); }
.a-step { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.a-st { display: grid; place-items: center; width: 16px; height: 16px; color: var(--success); }
.a-step.run .a-st { border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: f-spin .8s linear infinite; }
.a-step.run .a-st .ico { display: none; }
@keyframes f-spin { to { transform: rotate(360deg); } }
.a-meta { color: var(--hint); font-size: 12px; }
.a-out { margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--terminal-bg); color: var(--terminal-text); font-size: 12px; line-height: 20px; }
.a-out .ok { color: var(--hl-success); }
.a-out .muted { color: var(--terminal-muted); }
.a-input { flex: none; display: flex; align-items: center; gap: 8px; margin: 0 48px 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); color: var(--hint); }
.a-input .grow { flex: 1; min-width: 0; }
.a-input .grow.typing { color: var(--text-strong); }
.a-input [data-badges] { display: flex; gap: 6px; }

.lanes { display: grid; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-gradient); }
.lane { display: grid; grid-template-columns: 96px 1fr 140px; align-items: center; gap: 12px; padding: 6px 8px; }
.lane-n { display: inline-flex; align-items: center; gap: 8px; color: var(--text-strong); font-weight: 600; }
.lane-t { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.lane-bar { height: 4px; border-radius: 2px; background: var(--data-track); overflow: hidden; }
.lane-bar i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 900ms ease; }

.card { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-gradient); box-shadow: var(--edge-highlight); }
.card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--text-strong); font-weight: 600; }
.card-h .ico { width: 15px; height: 15px; }
.card p + p { margin-top: 4px; }
.card code { padding: 0 5px; border-radius: 4px; background: var(--surface-raised); font-size: 12px; }
.card.plan { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card.plan ol { margin: 0; padding-left: 20px; display: grid; gap: 2px; }
.card.plan li::marker { color: var(--accent-text); font-family: var(--font-mono); font-size: 12px; }
.keep { margin-top: 8px !important; color: var(--hint); font-size: 12px; }
.card-f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.btn-s { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: var(--r-sm); color: var(--muted); transition: transform 120ms ease, background-color var(--fast), color var(--fast); }
.btn-s.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-s.pressed { transform: scale(.94); }
.btn-s.done { background: var(--accent-soft); color: var(--accent-text); }
.card.concern { border-color: color-mix(in srgb, var(--warning) 50%, var(--line)); }
.card.concern .card-h { color: var(--warning); }
.card.scope p b { display: inline-block; width: 64px; color: var(--hint); font-weight: 400; font-size: 12px; }
.card.approve { border-color: color-mix(in srgb, var(--warning) 50%, var(--line)); transition: border-color var(--slow); }
.card.approve .card-h { color: var(--warning); font-weight: 400; }
.card.approve .card-h b { color: var(--text-strong); }
.card.approve.allowed { border-color: color-mix(in srgb, var(--success) 45%, var(--line)); }
.card.approve.allowed .card-h { color: var(--success); }
.card-hosts { display: flex; gap: 6px; }
.card pre { margin: 8px 0 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--terminal-bg); color: var(--terminal-text); font-size: 12px; }
.card.done { border-color: color-mix(in srgb, var(--success) 45%, var(--line)); }
.card.done .card-h { color: var(--success); }
.chip.state { margin-left: auto; }

.cursor { position: absolute; left: 0; top: 0; z-index: 5; width: 22px; height: 22px; opacity: 0; transform: translate(900px, 640px); transition: transform 800ms cubic-bezier(.5, 0, .2, 1), opacity 200ms; pointer-events: none; }
.cursor.on { opacity: 1; }
.cursor svg { width: 22px; height: 22px; fill: var(--text-strong); stroke: var(--bg); stroke-width: 1.5; stroke-linejoin: round; }

/* Agent chapter: an editor with Claude Code in its terminal, Opsyn in the dock */
.desk { background: var(--bg-deep); }
.ed { position: absolute; left: 0; right: 0; top: 0; bottom: 56px; display: flex; flex-direction: column; background: var(--bg); }
.ed-top { flex: none; display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 16px; border-bottom: 1px solid var(--line); font-size: 12px; }
.ed-name { color: var(--text-strong); font-weight: 600; }
.ed-body { flex: 1; min-height: 0; display: flex; }
.ed-tree { flex: none; width: 176px; padding: 10px 8px; border-right: 1px solid var(--line); background: var(--bg-deep); font: 400 12px/22px var(--font-mono); color: var(--muted); }
.ed-tree p { padding: 0 8px; border-radius: 4px; white-space: nowrap; }
.ed-tree p.on { background: var(--surface-raised); color: var(--text-strong); }
.ed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ed-tabs { flex: none; display: flex; height: 32px; border-bottom: 1px solid var(--line); font-size: 12px; }
.ed-tabs span { display: flex; align-items: center; padding: 0 16px; color: var(--muted); }
.ed-tabs span.on { color: var(--text-strong); background: var(--terminal-bg); box-shadow: inset 0 -2px 0 var(--info); }
.ed-code { flex: none; height: 200px; margin: 0; padding: 10px 0; overflow: hidden; background: var(--terminal-bg); font: 400 12px/20px var(--font-mono); color: var(--terminal-text); }
.cl { display: block; padding: 0 16px; white-space: pre; animation: f-fade 200ms ease-out; }
.cl.add { background: color-mix(in srgb, var(--success) 10%, transparent); color: var(--hl-success); }
.cl.del { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.ed-term { flex: 1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line-strong); background: var(--terminal-bg); }
.ed-term-tabs { flex: none; display: flex; gap: 16px; padding: 6px 16px; font-size: 12px; color: var(--muted); }
.ed-term-tabs .on { color: var(--text-strong); }
.cc-body { flex: 1; min-height: 0; overflow: hidden; padding: 4px 16px 8px; display: flex; flex-direction: column; gap: 4px; font: 400 12.5px/1.6 var(--font-mono); color: var(--terminal-text); }
.cc-l .hp { color: var(--info); }
.cc-l .ty { color: var(--text-strong); }
.cc-l .muted { color: var(--terminal-muted); }
.cc-l .ok { color: var(--hl-success); }
.cc-l .tree { color: var(--terminal-muted); }
.cc-l .tool { color: var(--terminal-muted); }
.cc-l .note { color: var(--warning); font-weight: 600; }
.cc-l .think { color: var(--info); }
.cc-l .thought { color: var(--terminal-muted); font-style: italic; }
.cc-status { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.cc-status code { padding: 0 6px; border-radius: 4px; background: var(--surface-raised); color: var(--accent-text); font-size: 12px; }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: f-spin .9s linear infinite; }

.dock { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg-deep) 80%, var(--bg)); }
.dock .grow:first-child { flex: 1; }
.dock .grow:nth-last-child(2) { flex: 1; }
.dock-app { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--surface-raised); }
.dock-app > svg { width: 22px; height: 22px; fill: none; stroke: var(--info); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dock-app.op > svg { width: 40px; height: 40px; stroke: none; }
.dock-app .run { position: absolute; bottom: -7px; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
.dock-app .ring { position: absolute; inset: -4px; border-radius: 14px; border: 2px solid transparent; }
.dock-app.busy .ring { border-color: var(--accent) transparent transparent transparent; animation: f-spin 1s linear infinite; }
.dock-app .badge { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--warning); border: 2px solid var(--bg-deep); transform: scale(0); transition: transform 200ms; }
.dock-app.ask .badge { transform: scale(1); }
.dock-app.ask { animation: f-nudge 600ms ease-in-out 2; }
.dock-app.done .badge { transform: scale(1); background: var(--success); }
@keyframes f-nudge { 30% { transform: translateY(-6px); } 60% { transform: translateY(0); } }
.fly { position: absolute; left: -5px; top: -5px; z-index: 6; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px 2px var(--accent); transition: transform 600ms cubic-bezier(.5, 0, .3, 1); pointer-events: none; }
.fly.back { background: var(--warning); box-shadow: 0 0 12px 2px var(--warning); }

.ow { position: absolute; left: 150px; right: 150px; top: 20px; bottom: 72px; z-index: 3; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: 0 30px 80px -20px #000000cc; transform-origin: 54% 112%; transform: scale(.06); opacity: 0; transition: transform 380ms cubic-bezier(.3, .8, .3, 1), opacity 260ms; }
.ow.open { transform: none; opacity: 1; }
.ow .win { position: absolute; inset: 0; }
.card.approve.denied { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.card.approve.denied .card-h { color: var(--danger); }
.card .muted { margin-top: 4px; font-size: 12px; }
.solo-badge { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; height: 28px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 600; }

/* Hosts: same layout as the app's hosts page. */
.hosts { position: absolute; inset: 0; padding: 20px 24px; overflow: hidden; }
.h-head { display: flex; align-items: center; gap: 10px; }
.h-head b { font-size: 22px; }
.h-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); }
.h-tools .ico { width: 16px; height: 16px; }
.h-tools .seg { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-inset); }
.h-tools .seg i { display: grid; place-items: center; width: 34px; height: 26px; border-radius: 4px; }
.h-tools .seg i.on { background: var(--surface-raised); color: var(--text-strong); }
.h-tools .tb { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-raised); }
.h-tools .add { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.h-tabs { display: flex; gap: 24px; margin-top: 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.h-tabs span { padding: 8px 2px; }
.h-tabs span.on { color: var(--text-strong); font-weight: 600; box-shadow: inset 0 -2px var(--accent); }
.h-tabs b { margin-left: 4px; font-weight: 400; color: var(--hint); }
.h-tabs .on b { color: var(--accent-text); }
.h-group { margin: 16px 0 8px; color: var(--hint); font-size: 12px; }
.h-group span { margin-left: 4px; }
.h-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hc { padding: 14px 16px 10px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: var(--r-md); background: var(--panel-gradient); box-shadow: var(--glow-live); transition: border-color var(--slow), background-color var(--slow), box-shadow var(--slow); }
.hc-top { display: flex; align-items: center; gap: 8px; }
.hc-top b { font-size: 15px; white-space: nowrap; }
.hc-top .os { margin-left: auto; }
.chip.danger { border-color: transparent; background: var(--danger-soft); color: var(--danger); }
.hc-sub { margin: 2px 0 0 16px; color: var(--hint); font: 400 12px/1.4 var(--font-mono); }
.hc-cpu { position: relative; display: grid; grid-template-columns: 1fr auto; margin-top: 12px; padding: 10px 12px 0; border-radius: var(--r-sm); background: var(--surface-inset); font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.hc-cpu .c b { margin-left: 6px; font-size: 22px; font-weight: 600; color: var(--text-strong); }
.hc-cpu .l { text-align: right; line-height: 1.5; }
.hc-cpu small { font-size: 12px; color: var(--hint); }
.hc-cpu svg { grid-column: 1 / -1; width: 100%; height: 40px; margin-top: -10px; }
.hc-cpu .base { stroke: var(--line-strong); stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.hc-cpu .line { fill: none; stroke: var(--data-cpu); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.hc-cpu .area { fill: color-mix(in srgb, var(--data-cpu) 16%, transparent); }
.hc-cpu .tip { fill: var(--data-cpu); }
.hc-rings { display: flex; align-items: center; gap: 18px; margin-top: 12px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ring { display: inline-flex; align-items: center; gap: 8px; }
.ring > span { display: grid; line-height: 1.35; }
.ring b { font-size: 12px; color: var(--text-strong); }
.ring svg { width: 28px; height: 28px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; transition: stroke-dasharray 600ms ease; }
.ring .tr { stroke: var(--data-track); }
.ring.mem .fg { stroke: var(--data-mem); }
.ring.disk .fg { stroke: var(--data-disk); }
.hc-rings .net { margin-left: auto; text-align: right; line-height: 1.5; }
.hc-act { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--hint); }
.hc-act .ico { width: 15px; height: 15px; }
.hc-act .sp { flex: 1; }
.pal-chip { position: absolute; left: 50%; bottom: 20px; translate: -50% 0; z-index: 4; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-raised); color: var(--text-strong); font-weight: 600; opacity: 0; transform: translateY(-6px); transition: opacity 300ms, transform 300ms, background-color var(--slow); }
.pal-chip.on { opacity: 1; transform: none; }
.pal-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transition: background-color var(--slow); }

.scene [hidden] { display: none !important; }
.scene .mono { font-family: var(--font-mono); }
.scene .grow { flex: 1; }
.chip.new, .lane.new { animation: f-pop 500ms ease-out; }
.chip.new { border-color: var(--accent); color: var(--accent-text); }
@keyframes f-pop { from { opacity: 0; transform: translateY(6px); } }

/* New conversation */
.compose { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 64px 48px; }
.compose-t { display: flex; align-items: center; gap: 12px; color: var(--text-strong); font-size: 22px; font-weight: 600; }
.compose-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-text); }
.compose-mark .ico { width: 20px; height: 20px; }
.compose-hint { margin-top: 8px; color: var(--hint); }
.composer-big { width: 100%; max-width: 620px; margin-top: 24px; padding: 14px 14px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--edge-highlight); }
.cb-text { min-height: 72px; color: var(--text-strong); font-size: 14px; }
.cb-text .caret { height: 16px; background: var(--accent); }
.cb-bar { display: flex; align-items: center; gap: 8px; }
.btn-s.ghost { gap: 6px; border: 1px solid var(--line); }
.btn-s.ghost.set { border-color: var(--accent); color: var(--accent-text); }
.btn-s.icon { width: 30px; padding: 0; justify-content: center; font-size: 18px; }
.sugs { display: flex; gap: 8px; margin-top: 16px; }

/* Host picker dialog */
.dlg { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: color-mix(in srgb, var(--bg-deep) 62%, transparent); animation: f-fade 200ms ease-out; }
.dlg.out { opacity: 0; transition: opacity 200ms; }
@keyframes f-fade { from { opacity: 0; } }
.dlg-box { width: 400px; padding: 18px 20px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--panel); box-shadow: 0 24px 60px -20px #000000aa; animation: f-pop 220ms ease-out; }
.dlg-t { color: var(--text-strong); font-size: 15px; font-weight: 600; }
.dlg-hint { margin: 4px 0 8px; color: var(--hint); font-size: 12px; }
.dlg-g { margin: 10px 0 2px; color: var(--hint); font-size: 12px; }
.dlg-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-sm); }
.dlg-row .mono { margin-left: auto; color: var(--hint); font-size: 12px; }
.ck { display: grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--line-strong); border-radius: 4px; color: transparent; transition: background-color 150ms, border-color 150ms, color 150ms; }
.ck .ico { width: 13px; height: 13px; stroke-width: 3; }
.dlg-row.on { background: var(--accent-soft); }
.dlg-row.on .ck { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Compact host card bars */

/* ── Trust strip, star CTA, thanks ───────────────── */
.trust ul { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px; color: var(--muted); font-size: 14px; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.star-cta { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; max-width: 760px; margin: 24px auto 0; padding: 16px 20px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); color: var(--muted); font-size: 15px; text-align: left; }
.star-cta p { flex: 1; min-width: 240px; }

.thanks {
  position: fixed; left: 50%; bottom: 24px; z-index: 20; translate: -50% 0;
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); padding: 10px 10px 10px 18px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface-raised); color: var(--text-strong);
  box-shadow: 0 20px 60px -20px #000000aa; font-size: 14px;
}
.thanks[hidden] { display: none; }
.thanks .btn { min-height: 36px; padding: 0 14px; }
@media (prefers-reduced-motion: no-preference) { .thanks { animation: lk-rise 300ms ease-out; } }

/* Palette changes ease across the page. */
body, .top, .btn, .shot, .agents, .safety, .dl, .msg { transition-property: background-color, border-color, color; transition-duration: var(--slow); }
.btn { transition-property: background-color, border-color, color, transform; }

@media (max-width: 760px) {
  .stage { width: min(1120px, 100% - 32px); }
  .hero-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .lockup-icon { width: 60px; height: 60px; }
  .lockup-text { width: 150px; }
  .lockup-word { width: 150px; height: 47px; }
  .film-tab .t { display: none; }
  .film-tab { flex: none; justify-content: center; padding: 0; width: 44px; }
  .film-tabs { justify-content: center; }
  /* The line moves below the film when the frame is too small to hold it. */
  .film-end { position: static; opacity: 1; pointer-events: auto; padding: 24px 0 0; }
  /* The head already carries the line and the buttons; below the film only the description stays. */
  .film-end .end-title { display: none; }
  .film-end .lede { margin-top: 0; font-size: 15px; }
  .film-frame { overflow: visible; height: auto; border: 0; box-shadow: none; background: transparent; }
  .film-view { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
  .film-frame.is-end .film-canvas { opacity: 1; filter: none; }
  .top-nav a.star-nav { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  .film-canvas *, .film-canvas *::before { animation: none !important; }
}

/* The top bar's logo steps aside while the hero lockup is on screen. */
.top .brand { transition: opacity 300ms ease; }
.top .star-nav { transition: opacity 300ms ease, visibility 300ms; }
.lockup-on .top .brand { opacity: 0; pointer-events: none; }
/* So does its Star: the hero has its own download and Star beside the lockup. */
.lockup-on .top .star-nav { opacity: 0; visibility: hidden; }

/* The icon keeps its brand mint, except while the film shows another palette: then it takes that palette's accent. */
svg path[stroke="#7fe0c6"] { transition: stroke var(--slow); }
svg path[fill="#d2f8ee"] { transition: fill var(--slow); }
:root[data-palette] svg path[stroke="#7fe0c6"] { stroke: var(--icon-chev); }
:root[data-palette] svg path[fill="#d2f8ee"] { fill: var(--icon-spark); }
:root[data-palette="clay"] { --icon-chev: #d97757; --icon-spark: #f6dccf; }
:root[data-palette="graphite"] { --icon-chev: #9aa5ff; --icon-spark: #e2e5ff; }
:root[data-palette="moss"] { --icon-chev: #b8e06a; --icon-spark: #ebf6d3; }

/* Theme button: shows the moon in light mode and the sun in dark mode. */
.theme-btn { display: inline-grid; place-items: center; width: 40px; padding: 0 !important; }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-moon { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .i-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-btn .i-moon { display: block; }
}
