/* SIT website. Tokens mirror the app (frontend/src/themes): one accent, ink overlays for hierarchy,
   hairline borders, and a per-style corner cap. Dark is the base; light and the style families override. */

:root {
  --bg: #131418;
  --ink: 255 255 255;
  --text-1: #edf0f5;
  --accent: #7aa2f7;
  --on-accent: #0e1424;
  --cap: 2px;
  --pane-lift: 3%;

  --green: #6cc996;
  --amber: #d9b26a;
  --red: #ec7a7a;
  --violet: #a78bfa;
  --lane-0: #1aa5c4;
  --lane-1: #8b6cf6;
  --lane-2: #e0508f;
  --lane-3: #e58a3a;
  --lane-4: #3fae74;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 4px 14px rgba(0, 0, 0, 0.3);

  --text-2: color-mix(in srgb, var(--text-1) 84%, var(--bg));
  --text-3: color-mix(in srgb, var(--text-1) 72%, var(--bg));
  --text-4: color-mix(in srgb, var(--text-1) 52%, var(--bg));
  --line: rgb(var(--ink) / 0.08);
  --line-2: rgb(var(--ink) / 0.15);
  --panel: rgb(var(--ink) / 0.025);
  --card: rgb(var(--ink) / 0.045);
  --hover: rgb(var(--ink) / 0.07);
  --selected: rgb(var(--ink) / 0.1);
  --pane: color-mix(in srgb, var(--bg), rgb(var(--ink)) var(--pane-lift));
  --accent-bg: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 40%, transparent);

  --r-sm: min(4px, var(--cap));
  --r-md: min(6px, var(--cap));
  --r-lg: min(10px, var(--cap));
  --r-xl: min(14px, var(--cap));

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --page: 1180px;
  --gutter: 24px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f2f3f6;
  --ink: 0 0 0;
  --text-1: #1a1d24;
  --accent: #2563eb;
  --on-accent: #ffffff;
  --pane-lift: 0%;
  --pane: color-mix(in srgb, var(--bg) 30%, #ffffff);
  --green: #1a7f37;
  --amber: #9a6700;
  --red: #cf3a3a;
  --violet: #6d4be0;
  --lane-0: #0b88a8;
  --lane-1: #6d4be0;
  --lane-2: #c92a74;
  --lane-3: #c96a1a;
  --lane-4: #1f8a4c;
  --line: rgb(var(--ink) / 0.1);
  --line-2: rgb(var(--ink) / 0.18);
  --shadow: 0 30px 80px rgba(30, 36, 50, 0.18), 0 4px 14px rgba(30, 36, 50, 0.1);
  color-scheme: light;
}

/* Style families: the same values the app ships (themes/families/*.css, styles/62-classic-sheets.css) */
:root[data-family="one"] { --bg: #282c34; --text-1: #dcdfe4; --accent: #61afef; --cap: 3px; }
:root[data-family="one"][data-theme="light"] { --bg: #fafafa; --text-1: #2a2c33; --accent: #3469dc; }
:root[data-family="catppuccin"] { --bg: #1e1e2e; --text-1: #cdd6f4; --accent: #cba6f7; --cap: 8px; }
:root[data-family="catppuccin"][data-theme="light"] { --bg: #eff1f5; --text-1: #4c4f69; --accent: #8839ef; }
:root[data-family="dracula"] { --bg: #282a36; --text-1: #f8f8f2; --accent: #bd93f9; --cap: 6px; }
:root[data-family="dracula"][data-theme="light"] { --bg: #fffbeb; --text-1: #1f1f1f; --accent: #644ac9; }
:root[data-family="nord"] { --bg: #2e3440; --text-1: #eceff4; --accent: #88c0d0; --cap: 4px; }
:root[data-family="nord"][data-theme="light"] { --bg: #eceff4; --text-1: #2e3440; --accent: #4f72a0; }
:root[data-family="github"] { --bg: #0d1117; --text-1: #f0f6fc; --accent: #4493f8; --cap: 6px; }
:root[data-family="github"][data-theme="light"] { --bg: #ffffff; --text-1: #1f2328; --accent: #0969da; --pane: #f6f8fa; }
:root[data-family="islands"] { --bg: #131416; --text-1: #dfe1e5; --accent: #548af7; --cap: 12px; }
:root[data-family="islands"][data-theme="light"] { --bg: #ebecf0; --text-1: #1e1f22; --accent: #2f6ae6; }
:root[data-family="sumi"] { --bg: #161513; --text-1: #ede7da; --accent: #e8694a; --on-accent: #1d0c06; --cap: 2px; }
:root[data-family="sumi"][data-theme="light"] { --bg: #f0eadd; --text-1: #211e19; --accent: #b23c25; --on-accent: #ffffff; }
:root[data-family="aurora"] { --bg: #0c0e1b; --text-1: #e9ecfb; --accent: #4fe0b8; --on-accent: #03241a; --cap: 8px; }
:root[data-family="aurora"][data-theme="light"] { --bg: #e9ebf7; --text-1: #161a2e; --accent: #077260; --on-accent: #ffffff; }
:root[data-family="cyberpunk"] { --bg: #0a0914; --text-1: #eeeaff; --accent: #ff4fa8; --on-accent: #24001a; --cap: 0px; }
:root[data-family="cyberpunk"][data-theme="light"] { --bg: #eceaf4; --text-1: #140f2a; --accent: #b80f72; --on-accent: #ffffff; }

/* ── Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
code, kbd { font-family: var(--mono); font-size: 0.86em; }
p code, li code { padding: 1px 5px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--text-1); }
svg { display: block; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }

.wrap { width: 100%; max-width: calc(var(--page) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Backdrop ─────────────────────────────────────────────────────────
   The app is a sheet of glass over the desktop. A browser has no desktop to show, so the page brings its own:
   slow light in the lane colours, and a canvas of lanes drawn the way the commit graph draws them. */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg i {
  position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) var(--aura, 26%), transparent), transparent);
  animation: float 28s ease-in-out infinite alternate; will-change: transform;
}
.bg i:nth-child(1) { --c: var(--accent); top: -30vmax; left: -18vmax; }
.bg i:nth-child(2) { --c: var(--lane-0); top: 4vh; right: -34vmax; animation-duration: 36s; animation-delay: -12s; }
.bg i:nth-child(3) { --c: var(--lane-1); bottom: -38vmax; left: 18vw; animation-duration: 44s; animation-delay: -20s; }
:root[data-theme="light"] .bg { --aura: 30%; }
@keyframes float {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(9vmax, 6vmax, 0) scale(1.18); }
  100% { transform: translate3d(-6vmax, 12vmax, 0) scale(0.92); }
}
.bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Glass: surfaces let the backdrop through, blurred, as the app's window does with the desktop */
.win, .pillars, .tile, .dl-card, .facts {
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
}
.win { background: color-mix(in srgb, var(--pane) 74%, transparent); box-shadow: var(--shadow), inset 0 1px 0 rgb(var(--ink) / 0.06); }
.pillars, .tile, .dl-card, .facts { background: color-mix(in srgb, var(--bg) 52%, transparent); box-shadow: inset 0 1px 0 rgb(var(--ink) / 0.05); }
.tile .win { background: color-mix(in srgb, var(--pane) 60%, transparent); -webkit-backdrop-filter: none; backdrop-filter: none; }

.lede, .hero-meta, .sec-head p, .copy > p, .ticks li, .hint, .fact-note, .principles p, .dl-foot, .theme-row {
  text-shadow: 0 0 10px var(--bg), 0 0 3px var(--bg);
}

/* ── Header ───────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 28px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-1); font-weight: 700; letter-spacing: 0.08em; }
.brand img { width: 26px; height: 26px; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { padding: 6px 10px; border-radius: var(--r-md); color: var(--text-3); font-size: 14px; transition: color 0.12s, background-color 0.12s; }
.nav a:hover { color: var(--text-1); background: var(--hover); }
.tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; min-width: 32px; padding: 0 8px;
  border: 1px solid transparent; border-radius: var(--r-md); background: none;
  color: var(--text-3); font: 600 12px var(--font); letter-spacing: 0.04em; cursor: pointer;
  transition: color 0.12s, background-color 0.12s, border-color 0.12s;
}
.icon-btn:hover { color: var(--text-1); background: var(--hover); }
.lang { position: relative; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 168px; padding: 4px;
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--bg) 92%, rgb(var(--ink))); box-shadow: 0 12px 32px rgb(0 0 0 / 0.38);
}
.lang-menu button {
  display: flex; align-items: center; width: 100%; padding: 7px 10px; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--text-2); font: 14px var(--font); text-align: left; cursor: pointer;
}
.lang-menu button:hover { background: var(--hover); color: var(--text-1); }
.lang-menu button[aria-current="true"] { background: var(--accent-bg); color: var(--text-1); font-weight: 600; }
.lang-menu small { margin-left: auto; font: 500 10.5px var(--mono); color: var(--text-4); letter-spacing: 0.06em; }
:root[data-theme="light"] .only-dark, :root:not([data-theme="light"]) .only-light { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--card); color: var(--text-1);
  font: 600 15px var(--font); cursor: pointer; white-space: nowrap;
  transition: background-color 0.12s, border-color 0.12s, transform 0.12s var(--ease), box-shadow 0.2s;
}
.btn:hover { background: var(--hover); border-color: color-mix(in srgb, var(--text-1) 30%, transparent); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text-1)); box-shadow: 0 6px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { position: relative; padding: 68px 0 0; }
.hero .win.in { transition: transform 0.35s var(--ease), opacity 0.7s var(--ease); }
.hero-copy { max-width: 860px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px;
  border: 1px solid var(--accent-line); border-radius: 999px; background: var(--accent-bg);
  color: var(--text-1); font: 500 12px var(--mono); letter-spacing: 0.02em;
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
h1 {
  margin: 22px 0 20px; color: var(--text-1);
  font-size: clamp(36px, 5.4vw, 62px); line-height: 1.08; font-weight: 700; letter-spacing: -0.025em; text-wrap: balance;
}
h1 em { font-style: normal; color: var(--accent); white-space: nowrap; }
:root[lang^="zh"] h1, :root[lang="ja"] h1 { letter-spacing: -0.01em; line-height: 1.2; }
.lede { max-width: 700px; font-size: clamp(16px, 1.5vw, 19px); color: var(--text-2); text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 18px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--text-3); }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .ic { width: 14px; height: 14px; }

/* ── App window mock ──────────────────────────────────────────────── */
.win {
  border: 1px solid var(--line-2); border-radius: min(10px, max(var(--cap), 6px));
  background: var(--pane); box-shadow: var(--shadow);
  overflow: hidden; font-size: 12px; line-height: 1.4; color: var(--text-2);
  user-select: none; -webkit-user-select: none;
}
.hero .win { margin-top: 48px; }
.w-tabs { display: flex; align-items: center; gap: 2px; height: 36px; padding: 0 8px; background: rgb(var(--ink) / 0.03); border-bottom: 1px solid var(--line); }
.w-tab { display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: var(--r-md) var(--r-md) 0 0; color: var(--text-4); white-space: nowrap; }
.w-tab.on { background: var(--selected); color: var(--text-1); }
.w-tab .ic { width: 13px; height: 13px; }
.badge { padding: 1px 6px; border: 1px solid var(--accent-line); border-radius: var(--r-sm); background: var(--accent-bg); color: var(--accent); font: 600 10.5px var(--mono); }
.w-lights { display: none; gap: 8px; padding: 0 12px 0 6px; }
.w-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 0.5px rgb(0 0 0 / 0.22); }
.w-lights i:nth-child(2) { background: #febc2e; }
.w-lights i:nth-child(3) { background: #28c840; }
:root[data-os="mac"] .w-lights { display: flex; }
:root[data-os="mac"] .w-ctl { display: none; }
:root[data-os="mac"] .win { border-radius: 10px; }
:root[data-os="mac"] .tile .win { border-radius: 10px 10px 0 0; }
.w-ctl { display: flex; gap: 18px; margin-left: auto; padding-right: 8px; color: var(--text-4); }
.w-ctl i { width: 10px; height: 10px; border: 1px solid currentColor; }
.w-ctl i:first-child { height: 1px; border-width: 1px 0 0; align-self: center; }
.w-ctl i:last-child { border: 0; background: linear-gradient(45deg, transparent 46%, currentColor 46% 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, currentColor 46% 54%, transparent 54%); }

.w-bar { display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 14px; border-bottom: 1px solid var(--line); background: rgb(var(--ink) / 0.015); }
.w-crumb { display: flex; align-items: center; gap: 6px; color: var(--text-4); white-space: nowrap; }
.w-crumb b { color: var(--text-1); font-weight: 600; }
.w-acts { display: flex; gap: 2px; margin: 0 auto; }
.w-act { display: grid; justify-items: center; gap: 2px; width: 50px; padding: 4px 0; border-radius: var(--r-md); color: var(--text-3); font-size: 10.5px; }
.w-act.on { background: var(--selected); color: var(--text-1); }
.w-act.dim { color: var(--text-4); opacity: 0.6; }
.w-profile { display: flex; align-items: center; gap: 7px; padding: 3px 10px 3px 4px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); white-space: nowrap; }
.av { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font: 700 9px var(--font); flex: none; }

.w-body { display: grid; grid-template-columns: 210px minmax(0, 1fr) 270px; height: 372px; }
.w-side { border-right: 1px solid var(--line); background: var(--panel); padding: 8px 0; overflow: hidden; }
.w-sec { display: flex; align-items: center; gap: 7px; padding: 8px 14px 5px; color: var(--text-3); font-weight: 700; font-size: 11px; letter-spacing: 0.04em; }
.w-sec span { margin-left: auto; color: var(--text-4); font-weight: 500; }
.w-sec .ic, .w-item .ic { width: 13px; height: 13px; }
.w-item { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 14px 0 24px; color: var(--text-2); white-space: nowrap; border-left: 2px solid transparent; }
.w-item.on { background: var(--selected); border-left-color: var(--accent); color: var(--text-1); font-weight: 600; }
.w-item .ic { color: var(--text-4); }
.w-item small { margin-left: auto; padding: 0 5px; border-radius: var(--r-sm); background: var(--hover); color: var(--text-3); font: 600 10px var(--font); }
.w-item u { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.w-rule { height: 1px; margin: 7px 0; background: var(--line); }

.w-graph { position: relative; overflow: hidden; }
.w-graph { --gx: 148px; }
.g-head, .g-row { display: grid; grid-template-columns: 148px 100px minmax(0, 1fr) 96px 62px; align-items: center; }
.g-head { height: 28px; border-bottom: 1px solid var(--line); color: var(--text-3); font-size: 11px; font-weight: 600; }
.g-head span { padding-left: 12px; border-left: 1px solid var(--line); }
.g-head span:first-child { border: 0; }
.g-rows { position: relative; }
.g-row {
  --band: 7%;
  height: 30px; white-space: nowrap; cursor: pointer; outline-offset: -2px;
  /* The app's row band: the lane colour, from the commit's node to the right edge */
  background: linear-gradient(90deg, transparent calc(var(--gx) + var(--x)), color-mix(in srgb, var(--c) var(--band), transparent) 0);
  transition: --band 0.12s;
}
.g-row:hover { --band: 13%; }
.g-row.sel { --band: 24%; }
.g-row.wip { --band: 30%; font-style: italic; color: var(--text-2); }
.g-row.wip.sel { --band: 42%; }
.g-row > * { overflow: hidden; text-overflow: ellipsis; }
.g-refs { display: flex; gap: 4px; padding-left: 10px; }
.ref { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border: 1px solid var(--c, var(--line-2)); border-radius: var(--r-sm); background: color-mix(in srgb, var(--c, transparent) 12%, transparent); color: var(--text-1); font: 600 10.5px var(--font); }
.ref .ic { width: 10px; height: 10px; }
.g-msg { grid-column: 3; padding-left: 12px; color: var(--text-1); }
.g-msg mark { margin-right: 7px; padding: 1px 6px; border-radius: var(--r-sm); background: var(--lane-0); color: #fff; font: 700 9.5px var(--font); letter-spacing: 0.04em; }
.g-row.sel .g-msg { font-weight: 600; }
.g-who { padding-left: 12px; color: var(--text-3); }
.g-sha { padding-left: 12px; color: var(--text-4); font: 11px var(--mono); }
.g-svg { position: absolute; left: var(--gx); top: 0; width: 100px; height: 300px; pointer-events: none; overflow: visible; }
.ref-lines path { stroke-width: 1.5; opacity: 0.55; }
.g-ring { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0.9; transition: cx 0.3s var(--ease), cy 0.3s var(--ease); animation: ring 2.4s ease-in-out infinite; }
@keyframes ring { 50% { opacity: 0.35; } }
.g-svg path { fill: none; stroke-width: 2; }
.g-svg text { fill: #fff; font: 700 8px var(--font); text-anchor: middle; dominant-baseline: central; }
.g-svg .cut { fill: var(--pane); }
.lane { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s var(--ease) 0.25s forwards; }
.lane:nth-of-type(2) { animation-delay: 0.55s; }
.lane:nth-of-type(3) { animation-delay: 0.8s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.wip-ring { animation: spin 14s linear infinite; transform-origin: 28px 15px; }
@keyframes spin { to { transform: rotate(360deg); } }

.w-detail { border-left: 1px solid var(--line); background: var(--panel); padding: 12px; overflow: hidden; }
.d-view { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.d-view[hidden] { display: none; }
.d-meta { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.d-meta code { margin-left: auto; padding: 1px 6px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text-3); font-size: 10.5px; }
.d-stat { margin-left: auto; font: 10.5px var(--mono); }
.d-stat .p, .f .p { color: var(--green); } .d-stat .m, .f .m { color: var(--red); }
.f .n { margin-left: auto; font-size: 10.5px; }
.w-detail h4 span { white-space: normal; line-height: 1.35; }
.w-detail h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; color: var(--text-1); font-size: 13px; }
.w-detail h4 i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.box { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.box-h { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--text-1); font-weight: 600; font-size: 11.5px; }
.box-h em { padding: 0 6px; border-radius: 999px; background: var(--hover); color: var(--text-3); font-style: normal; font-weight: 600; font-size: 10.5px; }
.box-h b { margin-left: auto; padding: 2px 8px; border: 1px solid var(--accent-line); border-radius: var(--r-sm); color: var(--accent); font-size: 10.5px; }
.box-h b.plain { border-color: var(--line-2); color: var(--text-2); }
.f { display: flex; align-items: center; gap: 8px; padding: 5px 10px; font: 11px var(--mono); color: var(--text-1); white-space: nowrap; }
.f::before { content: ""; width: 9px; height: 9px; border: 1.5px solid var(--amber); border-radius: 3px; flex: none; }
.f.add::before { border-color: var(--green); }
.f.del::before { border-color: var(--red); }
.f span { color: var(--text-4); }
.w-commit { margin-top: auto; display: grid; gap: 8px; }
.w-input { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgb(0 0 0 / 0.14); color: var(--text-4); }
:root[data-theme="light"] .w-input { background: rgb(255 255 255 / 0.7); }
.w-go { display: flex; align-items: center; justify-content: center; gap: 6px; height: 30px; border: 1px solid var(--accent-line); border-radius: var(--r-md); background: var(--accent-bg); color: var(--accent); font-weight: 700; }

.w-status { display: flex; align-items: center; gap: 16px; height: 26px; padding: 0 12px; border-top: 1px solid var(--line); background: rgb(var(--ink) / 0.03); color: var(--text-4); font-size: 11px; white-space: nowrap; }
.w-status .sp { margin-left: auto; }
.meter { display: inline-flex; align-items: center; gap: 6px; }
.meter i { width: 26px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--c) var(--v), var(--line-2) 0); }

.hint { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--text-4); }
.hint .ic { width: 15px; height: 15px; color: var(--accent); animation: nudge 2.6s var(--ease) infinite; }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-3px) rotate(-8deg); } }

/* Pointer glow on cards */
.glow { position: relative; overflow: hidden; }
.glow::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c, var(--accent)) 13%, transparent), transparent 70%);
}
.glow:hover::after { opacity: 1; }
.pillar .ic { transition: transform 0.4s var(--ease); }
.pillar:hover .ic { transform: translateY(-2px) scale(1.12); }

.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 70; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.nav a.active { color: var(--text-1); background: var(--selected); }

/* ── Sections ─────────────────────────────────────────────────────── */
section { padding: 112px 0 0; }
.sec-head { max-width: 760px; margin-bottom: 48px; }
h2 { margin: 14px 0 16px; color: var(--text-1); font-size: clamp(28px, 3.4vw, 42px); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
:root[lang^="zh"] h2, :root[lang="ja"] h2 { letter-spacing: 0; line-height: 1.3; }
.sec-head p { font-size: 17px; color: var(--text-3); text-wrap: pretty; }
h2 .ver { color: var(--accent); font-weight: 600; }
h3 { color: var(--text-1); font-size: 18px; line-height: 1.35; font-weight: 650; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--panel); margin-top: 88px; }
.pillar { padding: 32px 30px 34px; border-left: 1px solid var(--line); }
.pillar:first-child { border-left: 0; }
.pillar .num { font: 500 12px var(--mono); color: var(--text-4); letter-spacing: 0.08em; }
.pillar h3 { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; font-size: 20px; }
.pillar h3 .ic { width: 20px; height: 20px; color: var(--c); }
.pillar p { font-size: 15px; color: var(--text-3); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: center; }
.split.flip > .copy { order: 2; }
.copy h2 { font-size: clamp(26px, 3vw, 36px); }
.copy > p { font-size: 17px; color: var(--text-3); margin-bottom: 26px; }
.ticks { display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 26px; font-size: 15px; color: var(--text-3); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 10px; height: 5px; border: solid var(--accent); border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); }
.ticks strong { color: var(--text-1); font-weight: 600; }

.agents { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 26px; }
.chip { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text-2); font-size: 12.5px; white-space: nowrap; }

/* ── Feature mocks ────────────────────────────────────────────────── */
.mock { position: relative; }
.mock::before { content: ""; position: absolute; inset: 10% -4% -6%; z-index: -1; background: radial-gradient(closest-side, color-mix(in srgb, var(--glow, var(--accent)) 16%, transparent), transparent); filter: blur(20px); }
.w-head { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-bottom: 1px solid var(--line); background: rgb(var(--ink) / 0.03); color: var(--text-2); white-space: nowrap; }
.w-head .ic { width: 13px; height: 13px; color: var(--text-4); }
.w-head .r { margin-left: auto; display: flex; gap: 6px; align-items: center; color: var(--text-4); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; font-size: 10.5px; }
.seg span { padding: 2px 8px; }
.seg .on { background: var(--selected); color: var(--text-1); font-weight: 600; }

.code { font: 11.5px/22px var(--mono); padding: 6px 0; overflow: hidden; tab-size: 2; -moz-tab-size: 2; }
.ln { display: grid; grid-template-columns: 34px 34px 18px minmax(0, 1fr); white-space: pre; color: var(--text-2); }
.ln > i { font-style: normal; text-align: right; padding-right: 8px; color: var(--text-4); }
.ln > b { text-align: center; font-weight: 400; color: var(--text-4); }
.ln.a { background: color-mix(in srgb, var(--green) 13%, transparent); }
.ln.a > b { color: var(--green); }
.ln.d { background: color-mix(in srgb, var(--red) 13%, transparent); }
.ln.d > b { color: var(--red); }
.ln.a, .ln.d { cursor: pointer; }
.ln.a:hover, .ln.d:hover { filter: brightness(1.25); }
.ln.staged { opacity: 0.45; cursor: default; }
.ln.staged > b { color: var(--accent); }
.ln.pick { box-shadow: inset 2px 0 0 var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.ln.hunk { background: var(--accent-bg); color: var(--text-3); grid-template-columns: 86px minmax(0, 1fr) auto; }
.ln.hunk em { font-style: normal; margin-right: 10px; padding: 0 8px; border: 1px solid var(--accent-line); border-radius: var(--r-sm); color: var(--accent); font: 600 10.5px/18px var(--font); align-self: center; }
.k { color: var(--lane-1); } .s { color: var(--green); } .fn { color: var(--accent); } .cm { color: var(--text-4); }
.float-bar { position: absolute; right: 16px; bottom: 14px; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: color-mix(in srgb, var(--pane) 92%, rgb(var(--ink))); box-shadow: 0 10px 30px rgb(0 0 0 / 0.35); color: var(--text-2); font-size: 11.5px; }
.float-bar b { cursor: pointer; transition: transform 0.12s, opacity 0.12s; }
.float-bar b:active { transform: scale(0.96); }
.float-bar.none b { opacity: 0.4; pointer-events: none; }
.float-bar b { padding: 3px 10px; border-radius: var(--r-sm); background: var(--accent); color: var(--on-accent); font-size: 11px; }

/* remote */
.hosts { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0; padding: 22px 20px 18px; }
.host { padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.host h5 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--text-1); font-size: 12.5px; }
.host h5 .ic { color: var(--accent); }
.host p { display: flex; flex-wrap: wrap; gap: 5px; }
.host p span { padding: 1px 7px; border: 1px solid var(--line); border-radius: var(--r-sm); font: 10.5px var(--mono); color: var(--text-3); }
.wire { position: relative; width: 92px; height: 1px; background: var(--line-2); }
.wire::before { content: "SSH"; position: absolute; left: 50%; top: -22px; transform: translateX(-50%); font: 600 10px var(--mono); letter-spacing: 0.1em; color: var(--text-4); }
.wire::after { content: ""; position: absolute; top: -2px; left: 0; width: 18px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--accent)); animation: flow 2.2s linear infinite; }
@keyframes flow { from { transform: translateX(0); opacity: 0; } 15%, 85% { opacity: 1; } to { transform: translateX(74px); opacity: 0; } }
.log { margin: 0 20px 20px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: rgb(0 0 0 / 0.2); font: 11.5px/21px var(--mono); color: var(--text-3); white-space: pre; overflow: hidden; }
:root[data-theme="light"] .log, :root[data-theme="light"] .term { background: rgb(var(--ink) / 0.035); }
.rv .ll { opacity: 0; }
.rv.in .ll { animation: arrive 0.45s var(--ease) forwards; animation-delay: calc(var(--i) * 0.38s + 0.4s); }
@keyframes arrive { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.ll { display: inline-block; }
.log .ok { color: var(--green); } .log b { color: var(--text-1); font-weight: 500; }

/* terminal */
.t-tabs { display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.t-tab { display: flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid transparent; border-radius: var(--r-sm); color: var(--text-4); font: 600 11px var(--mono); }
.t-tab.on { border-color: var(--accent-line); background: var(--accent-bg); color: var(--text-1); }
.t-tab i { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--green)); }
.t-tab i.busy { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
/* Remote: two computers take turns on the same session */
.devices { display: grid; gap: 10px; }
.dev { animation: dev 8s var(--ease) infinite; }
.dev + .dev { animation-delay: -4s; }
@keyframes dev {
  0%, 44% { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-bg); opacity: 1; }
  50%, 94% { border-color: var(--line); box-shadow: none; opacity: 0.5; }
  100% { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-bg); opacity: 1; }
}

/* Paste: a file from the clipboard lands at the prompt */
.t-hint { margin-left: auto; display: flex; gap: 3px; }
.t-hint kbd { padding: 0 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; color: var(--text-3); font-size: 10px; line-height: 16px; }
.paste-body { position: relative; }
.paste-body .term { height: 214px; white-space: pre-wrap; word-break: break-word; }
.term .hl { padding: 0 3px; border-radius: 3px; background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.clip {
  position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px;
  border: 1px solid var(--line-2); border-radius: var(--r-lg); background: color-mix(in srgb, var(--pane) 92%, rgb(var(--ink))); box-shadow: 0 14px 34px rgb(0 0 0 / 0.35);
  opacity: 0; transform: translateY(-10px) scale(0.96); transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
}
.clip.show { opacity: 1; transform: none; }
.clip.go { opacity: 0; transform: translate(-60px, 40px) scale(0.6); transition-duration: 0.45s; }
.clip-meta { display: grid; line-height: 1.35; }
.clip-meta b { color: var(--text-1); font-size: 12px; font-weight: 600; }
.clip-meta small { color: var(--text-4); font-size: 11px; }
.clip-thumb { position: relative; display: grid; gap: 3px; align-content: start; width: 42px; height: 32px; padding: 5px; border-radius: 5px; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 45%, transparent), color-mix(in srgb, var(--lane-2) 40%, transparent)); }
.clip-thumb i { height: 3px; border-radius: 2px; background: rgb(255 255 255 / 0.7); }
.clip-thumb i:nth-child(2) { width: 70%; } .clip-thumb i:nth-child(3) { width: 45%; }
.clip-thumb[data-kind="log"] { background: rgb(var(--ink) / 0.1); }
.clip-thumb[data-kind="log"] i { background: var(--text-3); height: 2px; }
.clip-thumb[data-kind="pdf"] { background: color-mix(in srgb, var(--red) 70%, transparent); }
.clip-thumb[data-kind="pdf"] i { display: none; }
.clip-thumb[data-kind="pdf"]::after { content: "PDF"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 700 10px var(--mono); }
.no-js .clip { opacity: 1; transform: none; }

/* Release number: a quiet placeholder until the latest release is known */
.v-wait [data-version] { color: transparent !important; border-radius: 4px; background: linear-gradient(90deg, rgb(var(--ink) / 0.08) 25%, rgb(var(--ink) / 0.2) 50%, rgb(var(--ink) / 0.08) 75%) 0 0 / 300% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
[data-version].v-new { animation: arrive 0.4s var(--ease); }

.panes { display: grid; grid-template-columns: 1fr 1fr; height: 268px; }
.term { padding: 12px 14px; background: rgb(0 0 0 / 0.22); font: 11.5px/20px var(--mono); color: var(--text-2); white-space: pre; overflow: hidden; }
.term + .term { border-left: 1px solid var(--line); }
.term .p { color: var(--green); } .term .d { color: var(--text-4); } .term .y { color: var(--amber); } .term .b { color: var(--accent); } .term .r { color: var(--red); }
.caret { display: inline-block; width: 7px; height: 14px; vertical-align: -2px; background: var(--text-1); animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* workbench */
.wb { display: grid; grid-template-columns: 178px minmax(0, 1fr); height: 356px; }
.dock { border-right: 1px solid var(--line); background: var(--panel); padding: 10px 0; }
.dock-h { display: flex; align-items: center; gap: 7px; padding: 6px 12px; color: var(--text-1); font-weight: 700; }
.dock-h i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.dock-h small { margin-left: auto; padding: 0 5px; border-radius: var(--r-sm); background: var(--hover); color: var(--text-3); font-size: 10px; font-weight: 600; }
.agent { display: flex; align-items: center; gap: 8px; height: 30px; white-space: nowrap; }
.agent .lg { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); font: 700 10px var(--mono); }
.agent small { margin-left: auto; color: var(--text-4); font: 600 10.5px var(--mono); }
.run { margin: 2px 8px 6px 20px; padding: 6px 9px; border-left: 2px solid var(--accent); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--selected); color: var(--text-1); font-size: 11px; overflow: hidden; }
.run span { display: block; color: var(--text-4); font-size: 10.5px; }
.cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px; overflow: hidden; }
.col-h { display: flex; align-items: center; gap: 7px; padding: 2px 4px 9px; margin-bottom: 9px; border-bottom: 1px solid var(--line); color: var(--text-1); font-weight: 700; white-space: nowrap; }
.col-h i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.col-h span { margin-left: auto; color: var(--text-4); font-weight: 500; }
.card { position: relative; margin-bottom: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.card b { display: block; color: var(--text-1); font-size: 11.5px; line-height: 1.35; }
.card p { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.tag { padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--text-3)) 16%, transparent); color: var(--c, var(--text-3)); font-size: 10px; line-height: 16px; }
.card .strip { display: flex; gap: 8px; margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); font: 10.5px var(--mono); color: var(--text-4); white-space: nowrap; overflow: hidden; }
.card .strip .p { color: var(--green); } .card .strip .m { color: var(--red); }
.card.need { border-color: color-mix(in srgb, var(--violet) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 12%, transparent); }
.card.need::after { content: ""; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 3px var(--pane); animation: pulse 1.6s ease-in-out infinite; }
.q { margin-top: 7px; padding: 5px 7px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--violet) 14%, transparent); color: var(--text-2); font-size: 10.5px; line-height: 1.4; }

#col-ready .card { cursor: grab; transition: transform 0.2s var(--ease), border-color 0.12s, box-shadow 0.2s, opacity 0.2s; }
#col-ready .card:hover { transform: translateY(-2px); border-color: var(--accent-line); box-shadow: 0 8px 20px rgb(0 0 0 / 0.25); }
.card.lifted { opacity: 0.3; }
.card.ghost { position: fixed; z-index: 90; margin: 0; pointer-events: none; transform: rotate(-3deg) scale(1.03); border-color: var(--accent); box-shadow: 0 18px 40px rgb(0 0 0 / 0.45); background: color-mix(in srgb, var(--pane) 92%, rgb(var(--ink))); font-size: 12px; line-height: 1.4; cursor: grabbing; }
.card.pop { animation: pop 0.45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(0.92) translateY(-8px); } }
.agent { border: 1px dashed transparent; border-radius: var(--r-md); margin: 0 6px; padding: 0 6px 0 14px; transition: background-color 0.12s, border-color 0.12s; }
.wb.dragging .agent { border-color: var(--line-2); }
.wb.dragging .agent.drop, .agent.drop { border-color: var(--accent); background: var(--accent-bg); color: var(--text-1); }
.agent.full { animation: shake 0.4s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.run { animation: pop 0.4s var(--ease); }
.strip .live { color: var(--accent); }
.strip .live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.toast { position: absolute; right: 14px; bottom: 14px; z-index: 5; max-width: 300px; padding: 9px 12px; border: 1px solid var(--line-2); border-left: 3px solid var(--green); border-radius: var(--r-md); background: color-mix(in srgb, var(--pane) 90%, rgb(var(--ink))); box-shadow: 0 12px 30px rgb(0 0 0 / 0.4); color: var(--text-1); }
.toast.warn { border-left-color: var(--amber); }
.win:has(.toast) { position: relative; }
@media (min-width: 721px) { #col-ready .card { touch-action: none; } }

/* duo cards: sftp + monitor */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tile { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--panel); overflow: hidden; }
.tile-copy { padding: 30px 30px 26px; }
.tile-copy h3 { margin: 12px 0 10px; font-size: 22px; }
.tile-copy p { font-size: 15px; color: var(--text-3); }
.tile .win { margin: auto 30px 0; border-bottom: 0; border-radius: min(10px, max(var(--cap), 6px)) min(10px, max(var(--cap), 6px)) 0 0; box-shadow: none; }
.fp { display: grid; grid-template-columns: 1fr 1fr; }
.fp > div + div { border-left: 1px solid var(--line); }
.fp-h { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--text-1); font-weight: 600; }
.fp-h .ic { width: 13px; height: 13px; color: var(--accent); }
.fr { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 12px; white-space: nowrap; }
.fr .ic { width: 13px; height: 13px; color: var(--text-4); }
.fr span { margin-left: auto; color: var(--text-4); font-size: 11px; }
.fr.on { background: var(--accent-bg); box-shadow: inset 2px 0 0 var(--accent); color: var(--text-1); }
.fr.ghost { border: 1px dashed var(--accent-line); margin: 3px 8px; padding: 0 4px; border-radius: var(--r-sm); color: var(--text-3); }
.xfer { padding: 10px 12px 14px; border-top: 1px solid var(--line); }
.xfer p { display: flex; gap: 8px; font-size: 11px; color: var(--text-3); margin-bottom: 7px; }
.xfer p b { color: var(--text-1); } .xfer p span { margin-left: auto; font-family: var(--mono); }
.prog { height: 3px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.prog i { display: block; height: 100%; width: 68%; background: var(--green); animation: load 3.6s var(--ease) infinite; }
@keyframes load { from { width: 6%; } 70%, to { width: 100%; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.stat { padding: 10px 12px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat small { display: block; color: var(--text-4); font-size: 10.5px; }
.stat b { display: block; margin-top: 2px; color: var(--text-1); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.stat b span { margin-left: 2px; color: var(--text-4); font-size: 10.5px; font-weight: 500; }
.chart { display: block; width: 100%; height: 132px; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.stat b span:first-child { margin: 0; color: inherit; font-size: inherit; font-weight: inherit; font-variant-numeric: tabular-nums; }
.chart .l1 { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.chart .l2 { fill: none; stroke: var(--amber); stroke-width: 1.6; }
.chart .a1 { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.chart .a2 { fill: color-mix(in srgb, var(--amber) 12%, transparent); }

/* themes */
.styles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.sw {
  --b: #131418; --t: #edf0f5; --a: #7aa2f7; --c: 2px;
  display: grid; gap: 10px; padding: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); color: var(--text-2);
  font: 600 13px var(--font); transition: border-color 0.12s, background-color 0.12s, transform 0.2s var(--ease);
}
.sw:hover { border-color: var(--line-2); background: var(--card); transform: translateY(-2px); }
.sw[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-bg); color: var(--text-1); }
.sw .pv { display: grid; grid-template-columns: 24% 1fr; height: 62px; border-radius: min(8px, max(var(--c), 2px)); background: var(--b); border: 1px solid rgb(127 127 127 / 0.22); overflow: hidden; }
.sw .pv::before { content: ""; background: color-mix(in srgb, var(--t) 7%, var(--b)); }
.sw .pv i { display: grid; align-content: center; gap: 6px; padding: 0 10px; }
.sw .pv i::before, .sw .pv i::after { content: ""; height: 5px; border-radius: var(--c); }
.sw .pv i::before { width: 58%; background: var(--a); }
.sw .pv i::after { width: 86%; background: color-mix(in srgb, var(--t) 45%, var(--b)); box-shadow: 0 11px 0 color-mix(in srgb, var(--t) 22%, var(--b)); margin-bottom: 11px; }
.sw span { display: flex; align-items: center; gap: 6px; }
.sw small { margin-left: auto; font: 500 10px var(--mono); color: var(--text-4); letter-spacing: 0.04em; }
.theme-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-3); }
.theme-row .langs { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-row b { color: var(--text-1); font-weight: 600; }

/* engineering */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--panel); }
.fact { padding: 28px 30px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; }
.fact b { display: block; color: var(--text-1); font-size: clamp(34px, 4vw, 48px); line-height: 1; font-weight: 700; letter-spacing: -0.03em; }
.fact b i { font-style: normal; font-variant-numeric: tabular-nums; }
.fact b span { margin-left: 4px; font-size: 0.42em; font-weight: 600; letter-spacing: 0; color: var(--accent); }
.fact p { margin-top: 12px; font-size: 14px; color: var(--text-3); }
.fact-note { margin-top: 12px; font-size: 13px; color: var(--text-4); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 48px; margin-top: 56px; }
.principles h3 { font-size: 16px; margin-bottom: 8px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.principles p { font-size: 14.5px; color: var(--text-3); }

/* download */
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dl-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--panel); }
.dl-card h3 { display: flex; align-items: center; gap: 12px; font-size: 22px; }
.dl-card h3 .ic { width: 24px; height: 24px; stroke: none; fill: currentColor; }
.dl-card > p { margin: 8px 0 22px; font-size: 14.5px; color: var(--text-3); }
.dl-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dl-btns .btn { height: auto; padding: 12px 16px; display: grid; justify-content: stretch; justify-items: start; gap: 2px; text-align: left; white-space: normal; }
.dl-btns .btn small { font: 500 12px var(--mono); opacity: 0.72; }
details { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 14px; color: var(--text-3); }
summary { cursor: pointer; color: var(--text-2); font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; width: 6px; height: 6px; border: solid var(--text-4); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform 0.2s var(--ease); }
details[open] summary::before { transform: rotate(45deg); }
details ol { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; }
details pre { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); font: 12px var(--mono); color: var(--text-1); overflow-x: auto; }
.dl-foot { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 24px; font-size: 14px; color: var(--text-3); }
.dl-foot a, .foot a { color: var(--text-1); border-bottom: 1px solid var(--line-2); }
.dl-foot a:hover, .foot a:hover { border-color: var(--accent); color: var(--accent); }

.foot { margin-top: 120px; padding: 36px 0 48px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-4); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.foot .brand { font-size: 14px; }
.foot .r { margin-left: auto; display: flex; gap: 20px; }

/* reveal */
.rv { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.no-js .rv { opacity: 1; transform: none; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .w-body { grid-template-columns: 190px minmax(0, 1fr); }
  .w-detail { display: none; }
  .styles { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 920px) {
  .nav { display: none; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.flip > .copy { order: 0; }
  .pillars, .facts { grid-template-columns: 1fr; }
  .pillar, .fact { border-left: 0; border-top: 1px solid var(--line); }
  .pillar:first-child, .fact:first-child { border-top: 0; }
  .duo, .dl { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr 1fr; }
  section { padding-top: 88px; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .hero { padding-top: 56px; }
  .w-body { grid-template-columns: minmax(0, 1fr); }
  .w-side, .w-acts, .w-profile, .w-ctl, .hide-s { display: none; }
  .w-graph { --gx: 0px; }
  .g-head, .g-row { grid-template-columns: 0 100px minmax(0, 1fr) 0 0; }
  .ref-lines { display: none; }
  .g-refs, .g-who, .g-sha, .g-head span:not(:nth-child(3)) { visibility: hidden; padding: 0; }
  .wb { grid-template-columns: minmax(0, 1fr); }
  .dock { display: none; }
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols > :nth-child(n + 3) { display: none; }
  .panes { grid-template-columns: 1fr; }
  .term + .term { display: none; }
  .hosts { grid-template-columns: 1fr; gap: 26px; }
  .wire { width: 1px; height: 26px; margin: 0 auto; }
  .wire::before { left: 14px; top: 6px; transform: none; }
  .wire::after { display: none; }
  .clip { right: 10px; top: 10px; }
  .styles { grid-template-columns: repeat(2, 1fr); }
  .principles, .dl-btns { grid-template-columns: 1fr; }
  .tile-copy, .dl-card { padding: 22px 20px; }
  .tile .win { margin: auto 20px 0; }
  .pillar, .fact { padding: 24px 20px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(n + 3) { display: none; }
  .foot .r { margin-left: 0; }
  .tools .btn { padding: 0 10px; }
  .tools .btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .lane { stroke-dashoffset: 0; }
  .rv { opacity: 1; transform: none; }
  .bg i { animation: none; }
  .clip { opacity: 1; transform: none; }
}

/* Style change: the new look spreads from the click */
@property --band { syntax: "<percentage>"; inherits: true; initial-value: 7%; }
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: spread 0.55s var(--ease); }
@keyframes spread { from { clip-path: circle(0 at var(--vx, 50%) var(--vy, 50%)); } to { clip-path: circle(150% at var(--vx, 50%) var(--vy, 50%)); } }
