/* westerm site — tokens follow the app's own palette (src/styles.css) */
:root {
  --bg: #0d0f12;
  --bg-2: #101318;
  --surface: #14171c;
  --surface-2: #1a1e25;
  --border: #252a32;
  --border-strong: #343b46;
  --text: #d7dce3;
  --text-strong: #f3f5f8;
  --text-muted: #8b94a1;
  --text-faint: #5d6672;
  --accent: #6aa9ff;
  --accent-soft: rgba(106, 169, 255, 0.14);
  --browser: #58d0a8;
  --editor: #a78bfa;
  --ssh: #f0a35e;
  --ok: #4fc27a;
  --bad: #ef6b6b;
  --warn: #e5b454;
  --pink: #f07fba;
  --agent-claude: #e08a65;
  --agent-gemini: #3186ff;
  --term-bg: #111418;
  /* Drawn terminals and app screens: dark here, light in the light block below */
  --t-bg: #0d0f12; --t-chrome: #161a20; --t-surface: #14171c; --t-surface-2: #1a1e25; --t-field: #1f242c;
  --t-border: #252a32; --t-border-strong: #343b46; --t-line: #3a404a; --t-seg-on: #343b46;
  --t-text: #d7dce3; --t-strong: #f3f5f8; --t-muted: #8b94a1; --t-faint: #5d6672; --t-term: #1e1e1e;
  --t-blue: #6aa9ff; --t-cyan: #58d0a8; --t-purple: #a78bfa; --t-orange: #f0a35e; --t-pink: #f07fba;
  --t-green: #4fc27a; --t-yellow: #e5b454; --t-claude: #e08a65; --t-gemini: #3186ff; --t-add: #a6e3b0;
  --t-add-bg: rgba(79, 194, 122, 0.12); --t-blue-soft: rgba(106, 169, 255, 0.14); --t-yellow-soft: rgba(229, 180, 84, 0.16);
  --t-pink-soft: rgba(240, 127, 186, 0.14); --t-hover: rgba(255, 255, 255, 0.07); --t-knob: #d7dce3; --t-on-badge: #062218;
  --t-card-shadow: 0 28px 70px -18px rgba(0, 0, 0, 0.75);
  --on-accent: #06131f;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.65);
  --glow-a: rgba(106, 169, 255, 0.20);
  --glow-b: rgba(88, 208, 168, 0.12);
  --radius: 12px;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard", "Apple SD Gothic Neo", "Hiragino Sans",
    "PingFang SC", "Malgun Gothic", "Microsoft YaHei", "Noto Sans CJK KR", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7f9;
    --bg-2: #eef0f3;
    --surface: #ffffff;
    --surface-2: #f2f4f7;
    --border: #e1e4e9;
    --border-strong: #c9ced6;
    --text: #2a2f36;
    --text-strong: #111418;
    --text-muted: #5b6470;
    --text-faint: #8a929d;
    --accent: #2f6fde;
    --accent-soft: rgba(47, 111, 222, 0.10);
    --browser: #11906a;
    --editor: #7c4ddb;
    --ssh: #c26a1a;
    --ok: #1f9653;
    --bad: #d64545;
    --warn: #a87708;
    --pink: #c2417f;
    --agent-claude: #c2603d;
    --agent-gemini: #165fd6;
    --on-accent: #ffffff;
    --term-bg: #fafafa;
    --t-bg: #eef0f3; --t-chrome: #e3e6ea; --t-surface: #f7f8fa; --t-surface-2: #e8ebef; --t-field: #ffffff;
    --t-border: #d9dde3; --t-border-strong: #c3c9d2; --t-line: #c9ced6; --t-seg-on: #ffffff;
    --t-text: #383a42; --t-strong: #1f2329; --t-muted: #5b6470; --t-faint: #8a929d; --t-term: #fafafa;
    --t-blue: #4078f2; --t-cyan: #11906a; --t-purple: #7c4ddb; --t-orange: #c26a1a; --t-pink: #c2407f;
    --t-green: #3e9a3d; --t-yellow: #c18401; --t-claude: #c2603d; --t-gemini: #165fd6; --t-add: #2f7a3b;
    --t-add-bg: rgba(80, 161, 79, 0.14); --t-blue-soft: rgba(64, 120, 242, 0.12); --t-yellow-soft: rgba(193, 132, 1, 0.14);
    --t-pink-soft: rgba(194, 64, 127, 0.12); --t-hover: rgba(17, 20, 24, 0.06); --t-knob: #ffffff; --t-on-badge: #ffffff;
    --t-card-shadow: 0 28px 70px -24px rgba(31, 35, 41, 0.28);
    --shadow: 0 24px 60px -24px rgba(17, 20, 24, 0.28);
    --glow-a: rgba(47, 111, 222, 0.12);
    --glow-b: rgba(17, 144, 106, 0.08);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Korean breaks lines between words, not inside them. */
html:lang(ko) body { word-break: keep-all; overflow-wrap: break-word; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, kbd { font-family: var(--font-mono); font-size: 0.88em; }
:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.08em 0.36em;
  white-space: nowrap;
}
kbd {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.05em 0.4em;
}
h1, h2, h3 { color: var(--text-strong); margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; max-width: 22ch; }
h3 { font-size: 17px; line-height: 1.35; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 12px; }

.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.c-accent { color: var(--accent); }
.c-browser { color: var(--browser); }
.c-editor { color: var(--editor); }
.c-ssh { color: var(--ssh); }
.c-ok { color: var(--ok); }
.c-warn { color: var(--warn); }
.c-pink { color: var(--pink); }
.c-ws { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-strong);
  font: 600 15px/1 var(--font-ui);
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .15s, opacity .15s;
}
.btn:hover { text-decoration: none; border-color: var(--text-faint); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn-sm .ico { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn-primary:hover { background: var(--accent); border-color: transparent; filter: brightness(1.08); }
.btn-ghost { background: transparent; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-row { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-strong); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--text-strong); text-decoration: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { position: relative; display: inline-flex; align-items: center; color: var(--text-muted); }
.lang .ico { position: absolute; left: 10px; width: 15px; height: 15px; pointer-events: none; }
.lang select {
  appearance: none; -webkit-appearance: none;
  height: 34px; padding: 0 12px 0 32px;
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 8px;
  font: 500 13px var(--font-ui); cursor: pointer;
}
.lang select:hover { border-color: var(--text-faint); }
.lang option { background: var(--surface); color: var(--text); }

/* Hero */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero-glow {
  position: absolute; left: 50%; top: 360px; width: 1400px; height: 900px; transform: translateX(-50%); pointer-events: none;
  background:
    radial-gradient(closest-side at 50% 45%, var(--glow-a), transparent 75%),
    radial-gradient(500px 300px at 50% 0%, var(--glow-b), transparent 70%);
}
.hero-center { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-center > .hero-copy { width: 100%; min-width: 0; }
.hero-center .eyebrow { justify-content: center; }
.hero-center .lead { margin-left: auto; margin-right: auto; max-width: 36em; }
.hero-center .installer { margin-left: auto; margin-right: auto; width: 100%; max-width: 620px; text-align: left; }
.hero-center .installer .tabs { justify-content: center; }
.hero-center .app-panel { justify-content: center; }
.hero-center .run-hint { text-align: center; }

/* westerm at work — a drawn copy of the UI on main. It is laid out at
   1120 × 640 and scaled to the column by main.js. It follows the page theme, as the app does. */
.wk-fit { position: relative; width: 100%; max-width: 1120px; height: 640px; margin: 56px auto 0; }
.wk {
  position: absolute; left: 0; top: 0; width: 1120px; height: 640px; transform-origin: 0 0;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 12px; border: 1px solid var(--t-border-strong); background: var(--t-bg); color: var(--t-text);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.02);
  font: 12px/1.4 var(--font-ui); text-align: left; user-select: none;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .wk { box-shadow: 0 40px 100px -30px rgba(17, 20, 24, 0.4); } }
.wk svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wk .c-sh { color: var(--t-blue); } .wk .c-br { color: var(--t-cyan); } .wk .c-ed { color: var(--t-purple); } .wk .c-ssh { color: var(--t-orange); } .wk .c-docs { color: var(--t-pink); }
.wk-chrome { flex: none; height: 36px; display: flex; align-items: center; padding: 0 14px; background: var(--t-chrome); border-bottom: 1px solid var(--t-border); }
.wk-lights { display: flex; gap: 7px; }
.wk-lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.wk-lights i:nth-child(2) { background: #febc2e; }
.wk-lights i:nth-child(3) { background: #28c840; }
.wk-url { margin: 0 auto; transform: translateX(-30px); width: 320px; height: 22px; border-radius: 6px; background: var(--t-field); color: var(--t-muted); font: 11.5px var(--font-mono); display: grid; place-items: center; }
.wk-app { flex: 1; display: flex; min-height: 0; }
.wk-act { width: 44px; flex: none; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 8px 0; background: var(--t-surface); border-right: 1px solid var(--t-border); }
.wk-grp { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wk-act span { position: relative; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: var(--t-muted); }
.wk-act span.on { background: var(--t-field); }
.wk-act sup { position: absolute; top: 1px; right: 0; min-width: 13px; height: 13px; border-radius: 7px; background: var(--t-border-strong); color: var(--t-text); font: 600 8.5px/13px var(--font-ui); text-align: center; }
.wk-act sup.s-br { background: var(--t-cyan); } .wk-act sup.s-ed { background: var(--t-purple); } .wk-act sup.s-ssh { background: var(--t-orange); } .wk-act sup.s-docs { background: var(--t-pink); }
.wk-act sup[class] { color: var(--t-on-badge); }
.wk-agbtn i { display: none; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--t-yellow); box-shadow: 0 0 0 2px var(--t-surface); }
.wk-agbtn.waiting i { display: block; animation: status-pulse .6s ease-in-out infinite alternate; }
.wk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wk-tabs { flex: none; height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border-bottom: 1px solid var(--t-border); }
.wk-wsbtn { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--t-blue-soft); color: var(--t-blue); }
.wk-wsbtn svg { width: 14px; height: 14px; }
.wk-tab { position: relative; height: 26px; padding: 0 10px; display: flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 6px; color: var(--t-muted); }
.wk-tab .n { color: var(--t-faint); font-size: 10.5px; }
.wk-tab.on { background: var(--t-surface-2); border-color: var(--t-border); color: var(--t-text); }
.wk-tab.on::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: -1px; height: 2px; border-radius: 1px; background: var(--t-blue); }
.wk-plus { padding: 0 6px; color: var(--t-faint); font-size: 16px; }
.wk-right { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--t-faint); font-size: 11px; }
.wk-right b { font-weight: 500; color: var(--t-muted); border: 1px solid var(--t-border); border-radius: 5px; padding: 1px 6px; }
.wk-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.12fr 1fr; grid-template-rows: 1.4fr 1fr; gap: 8px; padding: 8px; }
.wk-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--t-border); border-radius: 8px; background: var(--t-term); }
.wk-pane.focused { border-color: var(--t-border-strong); box-shadow: 0 0 0 1px var(--t-blue-soft); }
.wk-ph { flex: none; height: 28px; display: flex; align-items: center; gap: 7px; padding: 0 8px 0 6px; white-space: nowrap; background: var(--t-surface); border-bottom: 1px solid var(--t-border); }
.wk-ph svg { width: 13px; height: 13px; }
.wk-ph .grip { color: var(--t-line); font-size: 10px; }
.wk-ph .tt { color: var(--t-text); font-weight: 500; }
.wk-ph .k { color: var(--t-faint); font-size: 11px; }
.wk-ph .pid { color: var(--t-faint); font: 10.5px var(--font-mono); }
.wk-ph .sd { width: 6px; height: 6px; border-radius: 50%; background: var(--t-green); }
.wk-ph .ic { margin-left: auto; display: flex; gap: 8px; color: var(--t-faint); }
.wk-ph .ic svg { width: 12px; height: 12px; }
.wk-body { position: relative; flex: 1; min-height: 0; overflow: hidden; font: 11.5px/1.6 var(--font-mono); color: var(--t-text); }
.wk-log { padding: 8px 10px; }
.wk-log > div { white-space: pre; min-height: 1.6em; }
.wk-log > div.new { animation: ln-in .25s ease-out; }
.wk .gr { color: var(--t-green); } .wk .mu { color: var(--t-muted); } .wk .dm { color: var(--t-faint); } .wk .cy { color: var(--t-cyan); } .wk .yl { color: var(--t-yellow); } .wk .bl { color: var(--t-blue); }
.wk .pl { display: inline-flex; margin-right: 8px; vertical-align: 1px; }
.wk .pl span { padding: 0 6px; font-size: 10.5px; line-height: 16px; }
.wk .pl .a { background: var(--t-orange); color: var(--t-on-badge); border-radius: 8px 0 0 8px; }
.wk .pl .b { background: var(--t-line); }
.wk .pl .c { background: var(--t-green); color: var(--t-on-badge); border-radius: 0 8px 8px 0; }
/* AI mark: the color names the agent, the ring shows its state (as in the app) */
.wk-mark { position: relative; flex: none; display: grid; place-items: center; width: 19px; height: 19px; margin: -3px; border-radius: 50%; color: var(--t-claude); }
.wk-mark svg { width: 11px; height: 11px; }
.wk-mark::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--t-border-strong); border-radius: 50%; }
.wk-mark.working::after { border-color: var(--t-blue); border-right-color: transparent; animation: agent-turn .9s linear infinite; }
.wk-mark.waiting::after { border-color: var(--t-yellow); animation: status-pulse .6s ease-in-out infinite alternate; }
.wk-mark.done::after { border-color: var(--t-green); }
.wk-tabag { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.wk-tabag.idle { display: none; }
.wk-tabag.waiting { background: var(--t-yellow); animation: status-pulse .6s ease-in-out infinite alternate; }
.wk-tabag.done { background: var(--t-green); }
.wk-tabag.working { width: 9px; height: 9px; border: 2px solid var(--t-blue); border-right-color: transparent; animation: agent-turn .8s linear infinite; }
@keyframes agent-turn { to { transform: rotate(360deg); } }
@keyframes status-pulse { to { opacity: .3; } }
/* Claude Code in a shell */
.wk-cc { display: flex; flex-direction: column; padding-bottom: 8px; }
.wk-cc .wk-log { flex: 1; min-height: 0; overflow: hidden; }
.wk .cc { color: var(--t-claude); } .wk .you { color: var(--t-muted); } .wk-log b { font-weight: 600; }
.wk .add { color: var(--t-add); background: var(--t-add-bg); }
.wk-ccstat { flex: none; padding: 2px 10px 5px; color: var(--t-claude); white-space: pre; }
.wk-ccstat .spin { display: inline-block; width: 1.2em; }
.wk-ccin { flex: none; height: 26px; margin: 0 10px; padding: 0 10px; display: flex; align-items: center; border: 1px solid var(--t-line); border-radius: 6px; }
.wk-ccask { flex: none; margin: 0 10px; padding: 6px 10px; border: 1px solid var(--t-yellow); border-radius: 6px; }
.wk-ccask .q { color: var(--t-strong); }
.wk-ccask .o { color: var(--t-muted); white-space: pre; }
.wk-ccask .o.on { color: var(--t-blue); }
/* docs pane */
.wk-docs { display: flex; flex-direction: column; font: 11px/1.4 var(--font-ui); }
.wk-dtool { flex: none; height: 26px; display: flex; align-items: center; gap: 10px; padding: 0 8px; background: var(--t-surface); border-bottom: 1px solid var(--t-border); }
.wk-dtool .root { display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 0 7px 0 5px; border: 1px solid var(--t-border-strong); border-radius: 5px; color: var(--t-muted); font-size: 10.5px; }
.wk-dtool .root svg { width: 11px; height: 11px; }
.wk-dtool .follow { display: inline-flex; align-items: center; gap: 6px; color: var(--t-muted); font-size: 10.5px; }
.wk-dtool .follow i { position: relative; width: 22px; height: 12px; border-radius: 6px; background: var(--t-pink); }
.wk-dtool .follow i::after { content: ""; position: absolute; top: 2px; left: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--t-knob); }
.wk-dmain { flex: 1; min-height: 0; display: grid; grid-template-columns: 136px minmax(0, 1fr); }
.wk-dtree { padding: 5px 0; overflow: hidden; background: var(--t-surface); border-right: 1px solid var(--t-border); }
.wk-dtree .srch { display: flex; align-items: center; gap: 5px; height: 20px; margin: 0 6px 4px; padding: 0 6px; border: 1px solid var(--t-border); border-radius: 5px; background: var(--t-bg); color: var(--t-faint); font-size: 10px; }
.wk-dtree .srch svg { width: 10px; height: 10px; }
.wk-dtree .row { height: 20px; display: flex; align-items: center; gap: 5px; padding: 0 8px 0 10px; color: var(--t-muted); white-space: nowrap; }
.wk-dtree .row.i1 { padding-left: 22px; }
.wk-dtree .row.folder { color: var(--t-text); }
.wk-dtree .row.on { background: var(--t-pink-soft); color: var(--t-text); box-shadow: inset 2px 0 0 var(--t-pink); }
.wk-dtree .cnt { margin-left: auto; color: var(--t-faint); font-size: 9.5px; }
.wk-ddoc { min-width: 0; display: flex; flex-direction: column; }
.wk-dbar { flex: none; height: 28px; display: flex; align-items: center; gap: 7px; padding: 0 8px; border-bottom: 1px solid var(--t-border); white-space: nowrap; }
.wk-dbar b { color: var(--t-text); font-weight: 600; }
.wk-dbar .st { color: var(--t-faint); font-size: 10px; }
.wk-dbar .st.dirty { color: var(--t-yellow); }
.wk-dbar .modes { margin-left: auto; display: flex; padding: 2px; border: 1px solid var(--t-border); border-radius: 6px; background: var(--t-surface-2); }
.wk-dbar .modes span { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 4px; color: var(--t-muted); font-size: 10px; }
.wk-dbar .modes svg { width: 10px; height: 10px; }
.wk-dbar .modes .on { background: var(--t-seg-on); color: var(--t-text); }
.wk-dmd { flex: 1; min-height: 0; overflow: hidden; padding: 8px 12px; color: var(--t-text); }
.wk-dmd h4 { margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--t-border); color: var(--t-strong); font-size: 13px; }
.wk-dmd ul { margin: 0; padding: 0; list-style: none; }
.wk-dmd li { display: flex; align-items: center; gap: 7px; height: 19px; white-space: nowrap; }
.wk-dmd li::before { content: ""; flex: none; width: 10px; height: 10px; display: grid; place-items: center; border: 1px solid var(--t-faint); border-radius: 3px; color: var(--t-on-badge); font-size: 8px; font-weight: 800; line-height: 1; }
.wk-dmd li.done { color: var(--t-muted); }
.wk-dmd li.done::before { content: "✓"; background: var(--t-pink); border-color: var(--t-pink); }
.wk-dmd li.tick { animation: ln-in .3s ease-out; }
.wk-dstat { flex: none; height: 20px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; border-top: 1px solid var(--t-border); color: var(--t-faint); font-size: 9.5px; }
/* terminal-browser */
.wk-br { display: flex; flex-direction: column; }
.wk-brbar { flex: none; height: 26px; display: flex; align-items: center; gap: 8px; padding: 0 8px; border-bottom: 1px solid var(--t-border); color: var(--t-muted); font-size: 10.5px; }
.wk-brbar span { flex: 1; padding: 2px 8px; border-radius: 4px; background: var(--t-field); color: var(--t-text); }
.wk-page { flex: 1; display: flex; flex-direction: column; padding: 14px 16px; overflow: hidden; background: #f6f7f9; color: #1f2329; font-family: var(--font-ui); }
.wk-page .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.wk-page .top b { font-size: 13px; }
.wk-page .top span { padding: 3px 8px; border-radius: 5px; background: #2f6fde; color: #fff; font-size: 10px; }
.wk-page .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.wk-page .kpis div { padding: 8px; border: 1px solid #e1e4e9; border-radius: 7px; background: #fff; }
.wk-page small { display: block; font-size: 9px; color: #5b6470; }
.wk-page strong { font-size: 15px; }
.wk-page .chart { flex: 1; min-height: 92px; display: flex; align-items: flex-end; gap: 5px; padding: 8px; border: 1px solid #e1e4e9; border-radius: 7px; background: #fff; }
.wk-page .chart i { flex: 1; border-radius: 2px 2px 0 0; background: #2f6fde; opacity: .85; transition: height .5s ease; }

/* AI agents: the ring legend next to a drawn pane after a reboot */
.agents-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 56px; align-items: center; }
.rings { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rings li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); min-width: 0; }
.rings li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rings strong { color: var(--text-strong); font-size: 14.5px; }
.rings li span:not(.ag-mark) { color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.ag-mark { position: relative; flex: none; width: 30px; height: 30px; margin-top: 1px; display: grid; place-items: center; border-radius: 50%; color: var(--agent-claude); }
.ag-mark .ico { width: 15px; height: 15px; }
.ag-mark::after { content: ""; position: absolute; inset: 0; border: 2.5px solid var(--border-strong); border-radius: 50%; }
.ag-mark.working::after { border-color: var(--accent); border-right-color: transparent; animation: agent-turn .9s linear infinite; }
.ag-mark.waiting::after { border-color: var(--warn); animation: status-pulse .6s ease-in-out infinite alternate; }
.ag-mark.done::after { border-color: var(--ok); }
.resume-cmds { margin: 22px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; align-items: baseline; }
.resume-cmds dt { display: flex; align-items: center; gap: 8px; color: var(--text-strong); font-weight: 600; font-size: 14px; white-space: nowrap; }
/* Agent logos: the same marks as the drawn agents sidebar */
.ag-logo { flex: none; width: 18px; height: 18px; display: grid; place-items: center; }
.ag-logo .ico { width: 16px; height: 16px; }
.ag-logo.claude { color: var(--agent-claude); }
.ag-logo.codex { color: var(--text-strong); }
.ag-logo.gemini { color: var(--agent-gemini); }
.ag-logo.claude .ico, .ag-logo.gemini .ico { fill: currentColor; stroke: none; }
.resume-cmds dd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.resume-cmds dd span { color: var(--text-muted); font-size: 13.5px; }
.agents-note { margin-top: 18px; color: var(--text-muted); font-size: 13.5px; }
.note p b { color: var(--text-strong); font-weight: 600; }
.ag-shot { position: relative; min-width: 0; padding-bottom: 196px; }
.ag-pane { overflow: hidden; border: 1px solid var(--t-border-strong); border-radius: 12px; background: var(--t-term); color: var(--t-text); box-shadow: var(--shadow); }
.ag-ph { height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 8px; overflow: hidden; white-space: nowrap; background: var(--t-surface); border-bottom: 1px solid var(--t-border); font-size: 12.5px; }
.ag-ph .grip { color: var(--t-line); font-size: 11px; }
.ag-ph .wk-mark svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ag-ph .tt { color: var(--t-text); font-weight: 500; }
.ag-ph .k { color: var(--t-faint); font-size: 11.5px; }
.ag-ph .pid { color: var(--t-faint); font: 11px var(--font-mono); }
.ag-restored { height: 18px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--t-yellow-soft); color: var(--t-yellow); font-size: 10.5px; font-weight: 600; }
.ag-term { padding: 12px 14px 96px; font: 12.5px/1.6 var(--font-mono); }
.ag-term > div { min-height: 1.6em; overflow: hidden; white-space: pre; text-overflow: ellipsis; }
.ag-term > div.rn, .ag-term > div.wrapl { white-space: pre-wrap; overflow-wrap: anywhere; }
.ag-term .old { opacity: .5; }
.ag-term .rn { color: var(--t-yellow); }
.ag-term .you { color: var(--t-muted); }
.ag-term .cc { color: var(--t-claude); } .ag-term .gr { color: var(--t-green); } .ag-term .dm { color: var(--t-faint); }
.ag-term .p-dir { color: var(--t-blue); } .ag-term .p-sym { color: var(--t-green); }
.ag-card {
  position: absolute; right: -14px; bottom: 0; width: 336px; max-width: calc(100% + 14px);
  display: flex; flex-direction: column; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--t-border-strong); border-radius: 12px; background: var(--t-surface); color: var(--t-text);
  box-shadow: var(--t-card-shadow); font-size: 12px; line-height: 1.5;
}
.ag-card code { padding: 0; border: 0; background: none; font: 11.5px var(--font-mono); white-space: normal; }
.ag-card-head { display: flex; align-items: center; gap: 6px; }
.ag-card-head strong { color: var(--t-claude); font-size: 13px; font-weight: 600; }
.ag-card-head .state { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--t-blue-soft); color: var(--t-blue); font-size: 11px; font-weight: 600; white-space: nowrap; }
.ag-card-rows { margin: 0; padding-top: 10px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; border-top: 1px solid var(--t-border); }
.ag-card-rows dt { color: var(--t-faint); }
.ag-card-rows dd { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.ag-card .copy-l { flex: none; color: var(--t-blue); font-size: 11px; }
.ag-card-resume { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--t-border); }
.ag-card-resume p { color: var(--t-muted); }
.cmdbox { display: flex; align-items: flex-start; gap: 8px; padding: 5px 8px; border: 1px solid var(--t-border); border-radius: 6px; background: var(--t-bg); }
.cmdbox code { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ag-card-check { display: flex; align-items: center; gap: 8px; }
.ag-card-check .box { flex: none; width: 14px; height: 14px; display: grid; place-items: center; border-radius: 3px; background: var(--t-blue); color: var(--t-on-badge); }
.ag-card-check svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }

/* Agents sidebar, drawn after the app's agents panel (src/components/AgentPanel.tsx) */
.as-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; margin-top: 96px; }
.as-shot { display: flex; justify-content: center; min-width: 0; }
.as-win { display: flex; width: 100%; max-width: 410px; overflow: hidden; border: 1px solid var(--t-border-strong); border-radius: 12px; background: var(--t-surface); color: var(--t-text); box-shadow: var(--shadow); font: 12.5px/1.4 var(--font-ui); text-align: left; user-select: none; }
.as-win svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.as-act { flex: none; width: 44px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; border-right: 1px solid var(--t-border); }
.as-act span { position: relative; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: var(--t-muted); }
.as-act span.on { background: var(--t-surface-2); color: var(--t-text); }
.as-act i { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--t-yellow); box-shadow: 0 0 0 2px var(--t-surface-2); animation: status-pulse .6s ease-in-out infinite alternate; }
.as-panel { flex: 1; min-width: 0; padding-bottom: 10px; }
.as-ws { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 10px; border-bottom: 1px solid var(--t-border); }
.as-wsbtn { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: var(--t-blue-soft); color: var(--t-blue); }
.as-win .as-wsbtn svg { width: 13px; height: 13px; }
.as-ws b { font-weight: 600; color: var(--t-strong); }
.as-win .as-down { width: 12px; height: 12px; transform: rotate(90deg); color: var(--t-faint); }
.as-else { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--t-yellow); font-size: 11px; font-weight: 500; white-space: nowrap; }
.as-else i, .as-frow .dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--t-yellow); }
.as-head { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 14px; color: var(--t-muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.as-head .n { flex: 1; }
.as-head .ags { font-weight: 500; letter-spacing: 0; text-transform: none; }
.as-tree, .as-tree ul { list-style: none; margin: 0; padding: 0; }
.as-tree { padding: 0 6px; }
.as-folder + .as-folder { margin-top: 4px; }
.as-frow { display: flex; align-items: flex-start; gap: 6px; padding: 5px 6px; border-radius: 6px; }
.as-win .chev { width: 13px; height: 13px; margin-top: 2px; color: var(--t-faint); }
.as-win .chev.open { transform: rotate(90deg); }
.as-frow .fold { margin-top: 1px; color: var(--t-muted); }
.as-frow .fold.busy { color: var(--t-blue); }
.as-ftext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.as-ftext .nm { line-height: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.as-ftext .par { color: var(--t-muted); }
.as-ftext b { font-weight: 600; color: var(--t-strong); }
.as-ftext .meta { display: flex; align-items: center; gap: 4px; color: var(--t-muted); font-size: 11px; line-height: 15px; white-space: nowrap; }
.as-win .as-ftext .meta svg { width: 11px; height: 11px; }
.as-frow .dot { margin: 0 2px; }
.as-count { flex: none; min-width: 18px; height: 18px; margin-top: 1px; padding: 0 5px; border-radius: 9px; background: var(--t-surface-2); color: var(--t-muted); font-size: 11px; line-height: 18px; text-align: center; }
.as-folder > ul { padding-left: 25px; }
.as-agent { display: flex; align-items: flex-start; gap: 8px; padding: 6px 6px 6px 0; }
.as-agent .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.as-agent .ln { display: flex; align-items: center; gap: 6px; line-height: 16px; }
.as-agent .lb { flex: 1; min-width: 0; }
.as-agent.done .lb { color: var(--t-muted); }
.as-agent .nt { color: var(--t-muted); font-size: 12px; line-height: 16px; }
.as-win .tm { flex: none; color: var(--t-muted); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.as-agent.waiting .tm { color: var(--t-yellow); }
.as-agent .st { flex: none; width: 12px; height: 16px; display: grid; place-items: center; }
.as-agent .st::before { content: ""; border-radius: 50%; }
.as-agent .st.waiting::before { width: 7px; height: 7px; background: var(--t-yellow); box-shadow: 0 0 0 3px var(--t-yellow-soft); animation: as-halo 1.1s ease-in-out infinite alternate; }
@keyframes as-halo { to { box-shadow: 0 0 0 1px var(--t-yellow-soft); } }
.as-agent .st.working::before { width: 10px; height: 10px; border: 1.5px solid var(--t-blue-soft); border-top-color: var(--t-blue); animation: agent-turn .9s linear infinite; }
.as-agent .st.done { color: var(--t-green); }
.as-agent .st.done::before { display: none; }
.as-win .as-agent .st svg { width: 12px; height: 12px; stroke-width: 2.5; }
.as-win .logo { flex: none; width: 16px; height: 16px; display: grid; place-items: center; }
.as-win .logo.claude { color: var(--t-claude); }
.as-win .logo.codex { color: var(--t-text); }
.as-win .logo.gemini { color: var(--t-gemini); }
.as-win .logo.claude svg, .as-win .logo.gemini svg { fill: currentColor; stroke: none; }
.as-win .logo.sm svg { width: 13px; height: 13px; }
.as-ptoggle { display: flex; align-items: center; gap: 6px; height: 26px; padding-left: 4px; color: var(--t-muted); font-size: 12px; }
.as-win .as-ptoggle .chev { width: 12px; height: 12px; margin-top: 0; }
.as-prow { display: flex; flex-direction: column; gap: 2px; padding: 4px 4px 4px 12px; border-radius: 6px; font-size: 12px; }
.as-prow.hover { background: var(--t-surface-2); }
.as-prow .pl, .as-prow .pm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.as-prow .pl { line-height: 18px; }
.as-prow .pt { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.as-prow .pm { justify-content: space-between; padding-left: 21px; }
.as-resume { padding: 1px 8px; border: 1px solid var(--t-border-strong); border-radius: 5px; color: var(--t-text); font-size: 11px; font-weight: 500; }
.as-prow.hover .as-resume { border-color: var(--t-blue); color: var(--t-blue); }
.as-none { display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 0 0 4px; color: var(--t-faint); font-size: 12px; white-space: nowrap; }
.as-none .tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.as-start { display: flex; align-items: center; gap: 2px; }
.as-start .lab { margin-right: 4px; font-size: 11px; }
.as-win .as-start .logo { width: 24px; height: 24px; border-radius: 6px; }
.as-win .as-start .logo:first-of-type { background: var(--t-surface-2); }
.as-copy { min-width: 0; }
.as-copy .section-lead { margin-top: 14px; }
.as-points { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.as-points li { display: flex; align-items: flex-start; gap: 12px; color: var(--text-muted); font-size: 15px; }
.as-points .ico { margin-top: 3px; }
.as-points b { color: var(--text-strong); font-weight: 600; }

/* Survive: demo next to the three cases */
.survive-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; margin-top: 40px; align-items: start; }
.survive-list { display: flex; flex-direction: column; gap: 12px; }
.card.s-card { flex-direction: row; gap: 16px; padding: 18px 20px; }
.s-card .card-ico { flex: none; }
.s-card > div:last-child { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.s-card .result { margin-top: 6px; padding-top: 10px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font: 600 13px/1 var(--font-mono); letter-spacing: 0.02em; margin-bottom: 22px; }
.pill {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font: 600 12px/1 var(--font-mono);
}
.pill:hover { text-decoration: none; filter: brightness(1.1); }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 750; }
.grad {
  background: linear-gradient(92deg, var(--accent) 0%, var(--browser) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin-top: 22px; font-size: 18px; line-height: 1.6; color: var(--text-muted); max-width: 34em; }

/* Installer */
.installer { margin-top: 32px; max-width: 560px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.tabs-center { justify-content: center; margin-bottom: 18px; }
.tabs [role="tab"] {
  height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--text-muted);
  font: 500 13px var(--font-ui); cursor: pointer;
}
.tabs [role="tab"]:hover { color: var(--text-strong); }
.tabs [role="tab"][aria-selected="true"] { background: var(--surface-2); border-color: var(--border); color: var(--text-strong); }
.cmd {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  background: var(--term-bg); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 6px 6px 6px 14px;
  font: 13.5px/1.5 var(--font-mono); color: var(--text-strong);
}
.cmd-prompt { color: var(--ok); user-select: none; flex: none; }
.cmd code {
  flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 6px 0;
  background: none; border: 0; font-size: inherit; scrollbar-width: none;
}
.cmd code::-webkit-scrollbar { display: none; }
.copy {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 7px; border: 1px solid transparent; background: transparent; color: #8b94a1; cursor: pointer;
}
.copy:hover { background: rgba(255, 255, 255, 0.07); color: #e8ebef; }
.copy.is-done { color: var(--ok); }
.copy .ico { width: 16px; height: 16px; }
.app-panel { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 48px; }
.app-dl { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.app-dl .ext { color: var(--text-muted); font-weight: 500; }
.app-dl .btn-primary .ext { color: inherit; opacity: .78; }
.tab-note { display: block; margin-top: 10px; text-align: center; }
.run-hint { margin-top: 16px; font-size: 14px; color: var(--text-muted); }

/* Demo window */
.demo { min-width: 0; }
.win {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: var(--shadow);
}
.win-bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.dots { display: inline-flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.url {
  flex: 1; max-width: 300px; margin: 0 auto; transform: translateX(-30px);
  height: 24px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; background: var(--surface-2); color: var(--text-muted);
  font: 12px var(--font-mono);
}
.win-tabs { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-bottom: 1px solid var(--border); background: var(--surface); }
.ws-chip { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.ws-chip .ico { width: 13px; height: 13px; }
.win-tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px;
  font-size: 12.5px; color: var(--text-strong);
}
.win-tab .ico { width: 13px; height: 13px; color: var(--accent); }
.win-tab.is-active::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.badge {
  height: 20px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 999px;
  background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn);
  font: 600 11px var(--font-ui);
}
.badge[hidden] { display: none; }
.pane-head { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; font-size: 12px; color: var(--text-muted); background: var(--bg-2); border-bottom: 1px solid var(--border); }
.pane-head .ico { width: 13px; height: 13px; }
.pid { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }
.term {
  height: 272px; padding: 12px 14px; overflow: hidden;
  background: var(--term-bg); color: var(--t-text);
  font: 13px/1.6 var(--font-mono);
}
.term .ln { white-space: pre; overflow: hidden; text-overflow: ellipsis; min-height: 1.6em; }
.term .ln.new { animation: ln-in .25s ease-out; }
.term .ln.saved { opacity: .55; }
.term .ln.notice { color: var(--t-yellow); white-space: normal; }
.term .p-dir { color: var(--t-blue); }
.term .p-sym { color: var(--t-green); }
.caret { display: inline-block; width: .6em; height: 1.15em; vertical-align: -0.2em; margin-left: 2px; background: var(--t-text); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes ln-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.overlay {
  position: absolute; inset: 38px 0 0; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; padding: 24px;
}
.ov-closed { background: var(--bg-2); }
.ov-stopped { inset: 0; background: var(--t-bg); color: var(--t-text); align-items: stretch; justify-content: center; }
.ov-reboot { inset: 0; background: #000; }
.ov-reboot .ov-title { color: #8b94a1; font: 500 14px var(--font-mono); }
.demo[data-state="closed"] .ov-closed,
.demo[data-state="stopped"] .ov-stopped,
.demo[data-state="rebooting"] .ov-reboot { display: flex; animation: fade .25s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.demo[data-state="closed"] .win-tabs,
.demo[data-state="closed"] .pane-head { visibility: hidden; }
.demo[data-state="closed"] .url { color: var(--text-faint); }
.ov-card { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 320px; }
.ov-title { font-weight: 650; font-size: 18px; color: var(--text-strong); }
.ov-sub { font: 13px var(--font-mono); color: var(--ok); }
.ov-foot { font-size: 12.5px; color: var(--text-muted); }
.ov-stopped .ov-foot { color: #8b94a1; text-align: left; padding-left: 4px; }
.ov-progress { width: 180px; height: 3px; border-radius: 3px; background: var(--border); overflow: hidden; }
.ov-progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.demo[data-state="closed"] .ov-progress span { animation: progress 2.6s linear forwards; }
@keyframes progress { to { width: 100%; } }
.term-like { font: 13px/1.7 var(--font-mono); text-align: left; padding: 0 4px; }
.c-dim { color: #5d6672; }

.demo-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.demo-caption { margin-top: 12px; min-height: 3.2em; font-size: 14px; color: var(--text-muted); }

/* Sections */
.section { padding: 96px 0; border-top: 1px solid var(--border); }
.section-tight { padding-top: 88px; }
.kicker { font: 600 13px/1 var(--font-mono); color: var(--accent); letter-spacing: 0.02em; margin-bottom: 14px; }
.section-lead { margin-top: 16px; font-size: 17px; color: var(--text-muted); max-width: 40em; }
#look .kicker, #look h2, #look .section-lead { text-align: center; margin-left: auto; margin-right: auto; }

.cards { display: grid; gap: 16px; margin-top: 40px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card p { color: var(--text-muted); font-size: 15px; }
.card-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.card-ico .ico { width: 20px; height: 20px; }
.card .result { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border); display: flex; align-items: center; gap: 8px; font: 500 13px var(--font-ui); color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 20%, transparent); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 20%, transparent); }
.dot.na { background: var(--text-faint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-faint) 20%, transparent); }

/* Compared: a terminal app, tmux, and westerm, one row per situation */
.cmp-wrap { margin-top: 40px; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.cmp col.case { width: 18%; }
.cmp th, .cmp td { padding: 16px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); white-space: normal; background: none; }
.cmp thead th { padding-top: 18px; padding-bottom: 14px; color: var(--text-strong); font-size: 15.5px; font-weight: 650; vertical-align: bottom; }
.cmp thead th small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 12.5px; font-weight: 500; }
.cmp tbody th { color: var(--text-strong); font-size: 15px; font-weight: 600; }
.cmp tbody th .ico { width: 16px; height: 16px; margin: 0 8px 0 0; vertical-align: -3px; color: var(--text-muted); }
.cmp td { color: var(--text-muted); font-size: 14.5px; line-height: 1.5; }
.cmp .cm { display: flex; align-items: flex-start; gap: 10px; }
.cmp .cm .dot { margin-top: 7px; }
.cmp .wt { background: var(--accent-soft); }
.cmp td.wt { color: var(--text-strong); }
.cmp thead .wt { border-radius: 10px 10px 0 0; }
.cmp tbody tr:last-child .wt { border-radius: 0 0 10px 10px; }
.cmp tbody tr:last-child > * { border-bottom: 0; }
.cmp-brand { display: inline-flex; align-items: center; gap: 8px; }
.cmp-brand img { border-radius: 5px; }
.cmp .cm-l { display: none; }
.cmp-note { margin-top: 16px; color: var(--text-muted); font-size: 13.5px; }

.feat { padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 60%, var(--bg))); min-width: 0; }
.feat .ico { width: 22px; height: 22px; margin-bottom: 14px; }
.feat h3 { margin-bottom: 8px; font-size: 16px; }
.feat p { color: var(--text-muted); font-size: 14.5px; line-height: 1.55; }

/* Media */
.media { margin-top: 36px; }
.frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--border-strong); background: #000; box-shadow: var(--shadow); max-width: 1040px; margin: 0 auto; }
.frame video { width: 100%; }

/* How */
.how-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.note { margin-top: 28px; display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.note .ico { width: 22px; height: 22px; margin-top: 2px; }
.note strong { color: var(--text-strong); font-size: 15px; }
.note p { margin-top: 4px; color: var(--text-muted); font-size: 14.5px; }
.stack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: stretch; }
.node { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.node > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.node strong { color: var(--text-strong); font-size: 15px; }
.node span { color: var(--text-muted); font-size: 13.5px; }
.node-key { border-color: color-mix(in srgb, var(--editor) 55%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--editor) 10%, transparent); }
.node-tag { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font: 700 13px var(--font-mono); }
.node .node-fate { flex: none; font: 500 12px var(--font-mono); color: var(--text-faint); white-space: nowrap; }
.node .node-fate.keep { color: var(--editor); }
.edge { align-self: center; position: relative; padding: 14px 0 14px 18px; font: 12px var(--font-mono); color: var(--text-faint); }
.edge::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; border-left: 2px dashed var(--border-strong); }

/* Install */
.install-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.install-grid h3 { display: flex; align-items: center; gap: 10px; }
.install-grid .btn { align-self: flex-start; margin-top: 4px; }
.install-grid .card-wide { grid-column: 1 / -1; }
.card p.small { font-size: 13.5px; }
.card .small-label { font: 600 12px var(--font-mono); color: var(--text-faint); margin-bottom: -4px; }
.cmds { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 18px; align-items: baseline; }
.cmds dt { margin: 0; }
.cmds dd { margin: 0; color: var(--text-muted); font-size: 14.5px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-muted); font-weight: 600; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td code { font-size: 12.5px; }
td a:hover { text-decoration: none; }
td a:hover code { border-color: var(--accent); }
.more-docs { margin-top: 24px; }
.more-docs a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.more-docs .ico { width: 16px; height: 16px; }

/* CTA */
.cta { padding: 96px 0; border-top: 1px solid var(--border); background: radial-gradient(600px 260px at 50% 0%, var(--glow-a), transparent 70%); }
.cta-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.cta-inner img { border-radius: 16px; box-shadow: var(--shadow); }
.cta h2 { max-width: 20ch; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 40px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text-strong); }
.footer-brand img { border-radius: 5px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-left: auto; }
.footer-links a { color: var(--text-muted); font-size: 14px; }
.footer-links a:hover { color: var(--text-strong); text-decoration: none; }
.footer-note { flex-basis: 100%; }

/* Responsive */
@media (max-width: 980px) {
  .survive-grid, .how-grid, .agents-grid, .as-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .as-grid { margin-top: 72px; }
  .as-copy { order: -1; }
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
}
@media (max-width: 760px) {
  .cards-3, .install-grid { grid-template-columns: minmax(0, 1fr); }
  .cmp-wrap { padding: 0; border: 0; background: none; }
  .cmp, .cmp tbody, .cmp tr, .cmp th, .cmp td { display: block; }
  .cmp thead, .cmp colgroup { display: none; }
  .cmp tr { margin-bottom: 12px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
  .cmp tbody th { padding: 14px 16px 4px; border: 0; }
  .cmp td { padding: 8px 16px; border: 0; }
  .cmp td.wt { margin-top: 6px; padding: 10px 16px 12px; border-radius: 0 !important; }
  .cmp .cm-l { display: block; margin-bottom: 2px; color: var(--text-faint); font: 600 11.5px var(--font-mono); }
  .cmp td.wt .cm-l { color: var(--accent); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 48px 0 64px; }
  .wk-fit { margin-top: 40px; }
  .lead { font-size: 16.5px; }
  .section, .cta { padding: 72px 0; }
  .cards-4 { grid-template-columns: minmax(0, 1fr); }
  .rings { grid-template-columns: minmax(0, 1fr); }
  .ag-shot { padding-bottom: 0; }
  .ag-term { padding-bottom: 32px; font-size: 11.5px; }
  .ag-card { position: relative; right: auto; bottom: auto; width: auto; max-width: none; margin: -18px 10px 0; }
  .hero .tabs { gap: 0; }
  .hero .tabs [role="tab"] { padding: 0 6px; font-size: 12.5px; }
  .gh-link span { display: none; }
  .gh-link { width: 34px; padding: 0; }
  .term { height: 236px; font-size: 12px; }
  .url { transform: none; }
  .cmds { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cmds dd { margin-bottom: 10px; }
  .node { flex-wrap: wrap; }
  .footer-links { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wk-mark.working::after, .wk-tabag.working { border-right-color: #6aa9ff; }
  .ag-mark.working::after { border-right-color: var(--accent); }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
