/*
 * Cleo website. The palette and shapes are the desktop app's (ui/src/styles/tokens.css):
 * linen chrome, paper canvas, charcoal ink, one sage highlight; flat panes split by hairlines.
 * Layout: a centred opening over the app window, then left-aligned bands divided by hairlines.
 */
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI Variable Display", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);

  --linen: #f7f7f6;
  --paper: #ffffff;
  --surface: #f4f4f3;
  --hover: #efefed;
  --active: #e8e8e5;
  --line: rgba(24, 24, 27, 0.09);
  --line-strong: rgba(24, 24, 27, 0.16);
  --ink: #27272a;
  --ink-soft: #4b4b4f;
  --muted: #6b6b70;
  --quiet: #87878d;
  --accent: #2b2b2f;
  --accent-hover: #414146;
  --accent-ink: #ffffff;
  --accent-soft: rgba(43, 43, 47, 0.08);
  --control: rgba(24, 24, 27, 0.06);
  --control-hover: rgba(24, 24, 27, 0.1);
  --thumb: #ffffff;
  --green: #4f9d2d;
  --ok: #4c9163;
  --warn: #b0842f;
  --purple: #7b72c0;
  --purple-soft: rgba(139, 130, 204, 0.14);
  --add-ink: #2f6b45;
  --add-bg: rgba(90, 160, 112, 0.14);
  --del-ink: #a9443f;
  --del-bg: rgba(208, 107, 102, 0.12);
  --glow: rgba(216, 233, 184, 0.7);
  --nav: rgba(247, 247, 246, 0.74);
  --mark-plate: #2b2b2f;
  --mark-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath d='M701.5 322.5A268 268 0 1 0 701.5 701.5' fill='none' stroke='%23f4f4f2' stroke-width='120' stroke-linecap='round'/%3E%3Ccircle cx='712' cy='512' r='68' fill='%23f4f4f2'/%3E%3C/svg%3E");
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.05);
  --shadow-popup: 0 8px 28px rgba(24, 24, 27, 0.1), 0 1px 2px rgba(24, 24, 27, 0.06), 0 0 0 1px rgba(24, 24, 27, 0.05);
  --shadow-window: 0 0 0 1px rgba(24, 24, 27, 0.1), 0 2px 6px rgba(24, 24, 27, 0.06), 0 36px 80px -24px rgba(24, 24, 27, 0.34);
  --shadow-icon: drop-shadow(0 12px 20px rgba(24, 24, 27, 0.2)) drop-shadow(0 2px 4px rgba(24, 24, 27, 0.16));
}

@media (prefers-color-scheme: dark) {
  :root {
    --linen: #111113;
    --paper: #161618;
    --surface: #1d1d20;
    --hover: #242428;
    --active: #2c2c31;
    --line: rgba(236, 236, 234, 0.09);
    --line-strong: rgba(236, 236, 234, 0.17);
    --ink: #ececea;
    --ink-soft: #cfcfcd;
    --muted: #a2a2a8;
    --quiet: #7f7f86;
    --accent: #e6e6e3;
    --accent-hover: #ffffff;
    --accent-ink: #1b1b1e;
    --accent-soft: rgba(236, 236, 234, 0.1);
    --control: rgba(236, 236, 234, 0.09);
    --control-hover: rgba(236, 236, 234, 0.15);
    --thumb: #3a3a40;
    --green: #9fd65e;
    --ok: #88bf97;
    --warn: #d6ad5c;
    --purple: #aba4dc;
    --purple-soft: rgba(171, 164, 220, 0.16);
    --add-ink: #9ccfab;
    --add-bg: rgba(136, 191, 151, 0.13);
    --del-ink: #e59b95;
    --del-bg: rgba(222, 142, 136, 0.12);
    --glow: rgba(191, 213, 154, 0.13);
    --nav: rgba(17, 17, 19, 0.72);
    --mark-plate: #e2e2e0;
    --mark-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath d='M701.5 322.5A268 268 0 1 0 701.5 701.5' fill='none' stroke='%231f1f22' stroke-width='120' stroke-linecap='round'/%3E%3Ccircle cx='712' cy='512' r='68' fill='%231f1f22'/%3E%3C/svg%3E");
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-popup: 0 10px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(236, 236, 234, 0.09);
    --shadow-window: 0 0 0 1px rgba(236, 236, 234, 0.13), 0 40px 90px -20px rgba(0, 0, 0, 0.8);
    --shadow-icon: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 1px rgba(236, 236, 234, 0.35));
  }
}

*,
*::before,
*::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 68px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--linen);
  font: 400 17px/1.5 var(--font);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { border: 0; padding: 0; color: inherit; background: none; font: inherit; cursor: pointer; }
svg { display: block; }
.sprite { position: absolute; }
.mono { font-family: var(--mono); }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 48px, 1080px); margin-inline: auto; }
.i { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.mark { flex: none; display: inline-block; width: 22px; height: 22px; border-radius: 23%; background: var(--mark-glyph) center / 100% 100% no-repeat, var(--mark-plate); }

/* ----- Buttons ----- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  color: var(--ink);
  background: var(--control);
  font-size: 15px;
  font-weight: 590;
  white-space: nowrap;
  transition: background 0.16s var(--ease), transform 0.16s var(--ease);
}
.button:hover { background: var(--control-hover); }
.button:active { transform: scale(0.98); }
.button.primary { color: var(--accent-ink); background: var(--accent); }
.button.primary:hover { background: var(--accent-hover); }
.button.large { height: 50px; padding: 0 24px; border-radius: 13px; font-size: 17px; }
.button.compact { height: 30px; padding: 0 13px; border-radius: 8px; font-size: 13px; }

/* ----- Navigation: a toolbar material over the page ----- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--nav);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.nav-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 52px; }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 30px; font-size: 13px; color: var(--ink-soft); }
.nav-links a { transition: color 0.16s; }
.nav-links a:hover { color: var(--ink); }
.nav-end { justify-self: end; display: flex; align-items: center; gap: 10px; }
.nav-language { height: 30px; padding: 0 9px; border-radius: 8px; color: var(--ink-soft); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; transition: background 0.16s, color 0.16s; }
.nav-language:hover { color: var(--ink); background: var(--control); }

/* ----- Opening ----- */
.hero { padding: 56px 0 108px; overflow-x: clip; }
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-icon { width: 72px; height: 72px; filter: var(--shadow-icon); }
h1 {
  margin-top: 26px;
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
:lang(zh-CN) h1 { font-weight: 600; letter-spacing: -0.01em; line-height: 1.14; }
.lede { max-width: 40em; margin-top: 16px; color: var(--muted); font-size: clamp(17px, 1.9vw, 21px); line-height: 1.5; text-wrap: balance; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.cta-meta { min-height: 20px; margin-top: 14px; color: var(--quiet); font-size: 13px; }
.cta-meta a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.cta-meta a:hover { color: var(--ink); }

.stage { position: relative; width: min(100% - 32px, 1136px); margin: 48px auto 0; }
.stage::before {
  content: "";
  position: absolute;
  inset: -90px -10% 22%;
  z-index: 0;
  background: radial-gradient(50% 50% at 50% 50%, var(--glow), transparent 100%);
  pointer-events: none;
}

/* Segmented control */
.segmented {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 420px);
  margin: 0 auto 22px;
  padding: 2px;
  border-radius: 10px;
  background: var(--control);
}
.segmented button { position: relative; z-index: 1; height: 30px; border-radius: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 500; transition: color 0.16s; }
.segmented button:hover,
.segmented button[aria-selected="true"] { color: var(--ink); }
.segmented-thumb {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((100% - 4px) / 4);
  border-radius: 8px;
  background: var(--thumb);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  transform: translateX(calc(var(--index, 0) * 100%));
  transition: transform 0.3s var(--ease);
}

/* ----- The app window ----- */
.window {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow-window);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  cursor: default;
}
.titlebar { position: relative; display: flex; align-items: center; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--linen); }
.lights { display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.14); }
.lights i:nth-child(1) { background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.titlebar-name { position: absolute; left: 50%; transform: translateX(-50%); color: var(--muted); font-weight: 600; }
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); height: 568px; }

.sidebar { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 8px; overflow: hidden; border-right: 1px solid var(--line); background: var(--linen); }
.side-group { display: grid; gap: 1px; }
.side-row { display: flex; align-items: center; gap: 9px; width: 100%; height: 30px; padding: 0 8px; border-radius: 6px; color: var(--ink); text-align: left; white-space: nowrap; }
.side-row > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.side-row small { flex: none; color: var(--quiet); font-size: 10.5px; }
.side-row .count { padding: 0 6px; border-radius: 5px; color: var(--muted); background: var(--active); font-size: 11px; }
.side-row .i { color: var(--ink-soft); }
button.side-row { transition: background 0.14s; }
button.side-row:hover { background: var(--hover); }
button.side-row.on { background: var(--active); }
.side-row.project { font-weight: 550; }
.side-row.thread { padding-left: 26px; }
.side-row.child { padding-left: 34px; color: var(--ink-soft); font-size: 12px; }
.side-row.child .i { width: 12px; height: 12px; color: var(--quiet); }
.side-row.flush { padding-left: 8px; }
.side-label { display: flex; align-items: center; gap: 6px; height: 26px; margin-top: 12px; padding: 0 8px; color: var(--quiet); font-size: 11px; font-weight: 600; }
.side-label .i { width: 12px; height: 12px; }
.side-label small { font-size: 11px; font-weight: 500; }
.side-foot { margin: auto -8px 0; padding: 8px 8px 0; border-top: 1px solid var(--line); }
.running-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 1.8s ease-in-out infinite; }

.scenes { min-width: 0; background: var(--paper); }
.scene { display: grid; grid-template-rows: minmax(0, 1fr); height: 100%; min-width: 0; animation: scene 0.28s var(--ease); }
.scene-code { grid-template-columns: minmax(0, 1fr) 316px; }
.scene-workflows { grid-template-columns: minmax(0, 1fr) 248px; }

.conversation { display: grid; grid-template: auto minmax(0, 1fr) auto / minmax(0, 1fr); min-width: 0; }
.pane-head { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.dim { color: var(--quiet); }
.crumb { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); white-space: nowrap; }
.crumb .i { width: 13px; height: 13px; color: var(--quiet); }
.crumb strong { min-width: 0; overflow: hidden; color: var(--ink); font-weight: 600; text-overflow: ellipsis; }
.branch { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.branch .i { width: 13px; height: 13px; }

.timeline { display: flex; flex-direction: column; gap: 16px; min-height: 0; padding: 22px 30px 0; overflow: hidden; }
.bubble { align-self: flex-end; max-width: 82%; padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.worked { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.worked strong { color: var(--ink-soft); font-weight: 500; }
.worked span { overflow: hidden; text-overflow: ellipsis; }
.worked .i { width: 14px; height: 14px; }
.reply { display: grid; gap: 6px; line-height: 1.65; }
.reply-meta { display: flex; align-items: center; gap: 8px; line-height: 1.3; }
.reply-meta .mark { width: 18px; height: 18px; }
.reply-meta strong { font-weight: 600; }
.reply-meta time { color: var(--quiet); font-size: 12px; }
.reply ol { padding-left: 20px; list-style: decimal; }
.subtasks { padding-top: 10px; border-top: 1px solid var(--line); }
.subtasks-head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.subtasks-head .i { width: 14px; height: 14px; }
.subtask { display: flex; align-items: center; gap: 9px; height: 30px; white-space: nowrap; }
.subtask > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.subtask small { color: var(--muted); font-size: 12px; }
.subtask .i { width: 15px; height: 15px; }
.i.ok { color: var(--ok); }
.i.spin { color: var(--ink-soft); animation: spin 1s linear infinite; }
.changed { display: flex; align-items: center; gap: 8px; }
.changed .i { color: var(--muted); }
.add { color: var(--add-ink); }
.del { color: var(--del-ink); }
.changed .mono { font-size: 12px; }

.composer { margin: 16px 20px 18px; padding: 12px 14px 10px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-sm); }
.composer-input { margin-bottom: 14px; color: var(--quiet); font-size: 14px; }
.composer-bar { display: flex; align-items: center; gap: 14px; color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; }
.pick { display: inline-flex; align-items: center; gap: 4px; }
.pick .i { width: 13px; height: 13px; color: var(--quiet); }
.pick .i:first-child { width: 14px; height: 14px; color: var(--ink-soft); }
.meter { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--muted); font-size: 11px; }
.meter svg { width: 16px; height: 16px; transform: rotate(-90deg); }
.meter circle { fill: none; stroke: var(--line-strong); stroke-width: 2.5; }
.meter circle + circle { stroke: var(--ink-soft); stroke-linecap: round; }
.send { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--accent-ink); background: var(--accent); }

.inspector { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-left: 1px solid var(--line); }
.inspector .pane-head { gap: 4px; padding: 0 10px; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; color: var(--muted); white-space: nowrap; }
.tab.on { color: var(--ink); background: var(--active); }
.tab small { color: var(--muted); font-size: 11px; }
.review { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.review .branch { flex: 1; }
.mini-button { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 12px; white-space: nowrap; }
.mini-button.off { color: var(--quiet); border-color: var(--line); }
.mini-button.primary { padding: 5px 12px; border-color: transparent; color: var(--accent-ink); background: var(--accent); }
.mini-button .i { width: 12px; height: 12px; }
.files { padding: 6px; border-bottom: 1px solid var(--line); }
.files li { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border-radius: 6px; white-space: nowrap; }
.files li.on { background: var(--active); }
.files b { width: 10px; color: var(--warn); font-size: 11px; font-weight: 600; }
.files li:nth-child(3) b { color: var(--ok); }
.files li > span:first-of-type { font-size: 12.5px; font-weight: 600; }
.files small { flex: 1; min-width: 0; overflow: hidden; color: var(--quiet); font-size: 11.5px; text-overflow: ellipsis; }
.files .mono { font-size: 11px; }
.diff-path { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 11.5px; }
.diff-path .i { width: 14px; height: 14px; color: var(--muted); }
.diff { padding: 6px 0; overflow: hidden; font-size: 11px; line-height: 1.75; white-space: normal; }
.diff span { display: block; padding: 0 14px; color: var(--ink-soft); white-space: pre; }
.diff .hunk { color: var(--quiet); }
.diff .add { color: var(--add-ink); background: var(--add-bg); }
.diff .del { color: var(--del-ink); background: var(--del-bg); }

.page { min-width: 0; padding: 30px 44px 0; overflow: hidden; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-head h2 { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.search { display: inline-flex; align-items: center; gap: 8px; width: 232px; height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--quiet); }
.page-tabs { display: flex; gap: 4px; margin: 10px 0 0 -9px; padding-bottom: 16px; border-bottom: 1px solid var(--line); overflow: hidden; }
.list-head { display: flex; align-items: center; gap: 8px; padding: 16px 0 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.list-head .i { width: 14px; height: 14px; }
.memories li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.kind { padding: 2px 7px; border-radius: 5px; color: var(--purple); background: var(--purple-soft); font-size: 11px; white-space: nowrap; }
.memories strong { font-size: 14px; font-weight: 600; }
.memories p { margin: 4px 0 6px; color: var(--ink-soft); }
.memories small,
.memories time { color: var(--quiet); font-size: 12px; white-space: nowrap; }

.canvas { display: grid; grid-template: auto minmax(0, 1fr) / minmax(0, 1fr); min-width: 0; }
.canvas .page-head { height: 56px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.canvas .page-head h2 { font-size: 15px; letter-spacing: 0; }
.graph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background: radial-gradient(var(--line-strong) 1px, transparent 1.4px) 0 0 / 20px 20px, var(--surface);
}
.graph > * { position: relative; }
.graph > * + *::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; height: 26px; margin-bottom: 1px; background: var(--muted); }
.terminal { padding: 3px 13px; border-radius: 999px; color: var(--muted); background: var(--active); font-size: 11px; }
.node { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 204px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow-sm); }
.node strong { font-weight: 600; }
.node small { color: var(--muted); font-size: 11.5px; }
.node.selected { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.loop { position: absolute; left: 100%; bottom: 50%; width: 40px; height: 68px; border: 1px dashed var(--muted); border-left: 0; border-radius: 0 12px 12px 0; }
.loop::after { content: ""; position: absolute; top: -4px; left: 0; border: 4px solid transparent; border-left-width: 0; border-right-color: var(--muted); }
.loop-label { position: absolute; left: calc(100% + 50px); bottom: calc(50% + 24px); color: var(--muted); font-size: 11px; font-style: normal; white-space: nowrap; }
.step dl { padding: 4px 16px; }
.step dt { margin-top: 14px; color: var(--quiet); font-size: 11px; }
.step dd { margin-top: 3px; }

/* ----- Features: panes split by hairlines ----- */
.features { padding: 108px 0 112px; border-top: 1px solid var(--line); background: var(--paper); }
.section-title { max-width: 18em; font-size: clamp(28px, 3.8vw, 44px); font-weight: 650; line-height: 1.12; letter-spacing: -0.028em; text-wrap: balance; }
:lang(zh-CN) .section-title { font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 52px; border-block: 1px solid var(--line); background: var(--line); }
.cell { min-width: 0; padding: 28px 28px 34px; background: var(--paper); }
.cell:nth-child(3n + 1) { padding-left: 0; }
.cell:nth-child(3n) { padding-right: 0; }
.cell h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.cell > p { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.art { display: grid; place-items: center; height: 168px; margin-bottom: 24px; overflow: hidden; border-radius: 10px; background: var(--surface); font-size: 12.5px; line-height: 1.4; cursor: default; }

.menu { width: 184px; padding: 5px; border-radius: 9px; background: var(--paper); box-shadow: var(--shadow-popup); }
.menu p { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 10px; border-radius: 6px; color: var(--ink); font-size: 13px; }
.menu p.on { background: var(--active); }
.menu .i { width: 14px; height: 14px; }

.route { position: relative; display: flex; align-items: center; gap: 36px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); background: var(--paper); font-size: 12px; white-space: nowrap; }
.chip.strong { font-weight: 600; }
.chip.strong::after { content: ""; position: absolute; left: 100%; top: 50%; width: 18px; height: 1px; margin-left: 1px; background: var(--muted); }
.chip .i { width: 13px; height: 13px; }
.branches { position: relative; display: grid; gap: 14px; }
.branches::before { content: ""; position: absolute; top: 15px; bottom: 15px; right: 100%; width: 18px; border: 1px solid var(--muted); border-right: 0; border-radius: 8px 0 0 8px; }

.doc { width: 232px; padding: 10px 13px 9px; overflow: hidden; border-radius: 9px; color: var(--ink-soft); background: var(--paper); box-shadow: var(--shadow-popup); font-size: 11px; line-height: 1.85; white-space: nowrap; }
.doc p { overflow: hidden; text-overflow: ellipsis; }
.doc-name,
.doc .commit { display: flex; align-items: center; gap: 6px; color: var(--quiet); }
.doc .i { width: 12px; height: 12px; }
.doc .add { margin: 0 -13px; padding: 0 13px; background: var(--add-bg); }
.doc .commit { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); }

.browser { width: 218px; overflow: hidden; border-radius: 9px; background: var(--paper); box-shadow: var(--shadow-popup); }
.browser-bar { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.browser-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.browser-bar span { margin-left: 8px; color: var(--muted); font-size: 10.5px; }
.browser-page { position: relative; display: grid; align-content: start; gap: 8px; height: 92px; padding: 14px; }
.browser-page b { height: 7px; border-radius: 4px; background: var(--active); }
.browser-page b:nth-child(1) { width: 62%; }
.browser-page b:nth-child(2) { width: 88%; }
.browser-page b:nth-child(3) { width: 46%; }
.primary-block { width: 62px; height: 20px; margin-top: 3px; border-radius: 5px; background: var(--accent); }
.cursor { position: absolute; left: 58px; top: 66px; width: 17px; height: 17px; color: var(--paper); fill: var(--ink); stroke-width: 1.5; animation: point 3.2s var(--ease) infinite; }

.flow { display: grid; justify-items: center; gap: 14px; }
.box { position: relative; width: 92px; height: 24px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); }
.box + .box::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; height: 14px; margin-bottom: 1px; background: var(--muted); }
.box.back::after { content: ""; position: absolute; left: 100%; bottom: 50%; width: 20px; height: 38px; border: 1px dashed var(--muted); border-left: 0; border-radius: 0 9px 9px 0; }

.tree { display: grid; width: 216px; color: var(--ink); font-size: 12px; }
.tree li { display: flex; align-items: center; gap: 8px; height: 28px; }
.tree li + li { padding-left: 22px; }
.tree .i { width: 14px; height: 14px; color: var(--muted); }
.tree small { margin-left: auto; color: var(--quiet); font-size: 11px; }

/* ----- Download: the release on the left, one row per system on the right ----- */
.download { padding: 60px 0 64px; border-top: 1px solid var(--line); }
.download-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: 24px 56px; }
.download-title { font-size: clamp(26px, 3vw, 34px); font-weight: 650; line-height: 1.15; letter-spacing: -0.025em; }
:lang(zh-CN) .download-title { font-weight: 600; letter-spacing: -0.01em; }
.release { margin-top: 6px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.release:empty { display: none; }
.download-more { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 22px; font-size: 14px; }
.download-more a { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-soft); transition: color 0.16s; }
.download-more a:hover { color: var(--ink); }
.download-more .i { width: 14px; height: 14px; color: var(--quiet); }
.platforms li { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; }
.platforms li:first-child { margin-top: -8px; }
.platforms li + li { border-top: 1px solid var(--line); }
.os { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.installers { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 26px; }
.get { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; color: var(--ink-soft); font-size: 15px; transition: color 0.16s; }
.get .i { width: 15px; height: 15px; color: var(--quiet); transition: color 0.16s, transform 0.2s var(--ease); }
.get:hover,
.get.current { color: var(--ink); }
.get:hover .i,
.get.current .i { color: var(--ink); }
.get:hover .i { transform: translateY(2px); }
.get.current { font-weight: 600; }

/* ----- Footer ----- */
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 26px 0 34px; }
.footer p { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 600; }
.footer .mark { width: 18px; height: 18px; }
.footer small { margin-left: 6px; color: var(--quiet); font-size: 12px; font-weight: 400; }
.footer nav { display: flex; gap: 24px; }
.footer a { transition: color 0.16s; }
.footer a:hover { color: var(--ink); }

/* ----- Motion ----- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes scene { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes point { 0%, 18% { transform: translate(64px, -34px); } 46%, 100% { transform: none; } }
.hero-copy > * { animation: rise 0.7s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.05s; }
.hero-copy > :nth-child(3) { animation-delay: 0.1s; }
.hero-copy > :nth-child(4),
.hero-copy > :nth-child(5) { animation-delay: 0.15s; }
.stage { animation: rise 0.9s 0.2s var(--ease) both; }

/* ----- Narrower windows ----- */
@media (max-width: 1040px) {
  .scene-code,
  .scene-workflows { grid-template-columns: minmax(0, 1fr); }
  .inspector { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell:nth-child(n) { padding-inline: 28px; }
  .cell:nth-child(2n + 1) { padding-left: 0; }
  .cell:nth-child(2n) { padding-right: 0; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { width: min(100% - 40px, 1080px); }
  .nav-links { display: none; }
  .nav-row { grid-template-columns: 1fr auto; }
  .hero { padding: 52px 0 72px; }
  .hero-icon { width: 68px; height: 68px; }
  .stage { margin-top: 48px; }
  .app { grid-template-columns: minmax(0, 1fr); height: 500px; }
  .sidebar,
  .wide-only,
  .search { display: none; }
  .timeline { padding: 18px 16px 0; }
  .composer { margin: 14px 12px 12px; }
  .page { padding: 22px 18px 0; }
  .memories li { grid-template-columns: minmax(0, 1fr) auto; }
  .memories .kind { display: none; }
  .loop-label { display: none; }
  .features { padding: 72px 0; }
  .download { padding: 44px 0 48px; }
  .download-row { grid-template-columns: minmax(0, 1fr); }
  .platforms li:first-child { margin-top: 0; }
  .grid { grid-template-columns: minmax(0, 1fr); margin-top: 36px; }
  .cell:nth-child(n) { padding: 26px 0 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { animation: none !important; transition: none !important; }
}
