/* ───────── Tokens ───────── */
:root {
  --bg: #07070d;
  --bg-2: #0d0d17;
  --panel: #11111d;
  --line: rgb(255 255 255 / 8%);
  --line-2: rgb(255 255 255 / 14%);
  --fg: #eceaf6;
  --muted: #9a98ad;
  --dim: #6c6a80;
  --a1: #7c8cff;
  --a2: #b18cff;
  --green: #4ade80;
  --red: #ff7b7b;
  --amber: #f5c26b;
  --grad: linear-gradient(100deg, var(--a1), var(--a2));
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 22px;
  --max: 1200px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: 0.88em; padding: 0.1em 0.4em; border-radius: 6px; background: rgb(255 255 255 / 7%); }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
kbd {
  display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; padding: 0 0.4em;
  font-size: 0.78em; border-radius: 7px; border: 1px solid var(--line-2); border-bottom-width: 2px;
  background: rgb(255 255 255 / 5%); color: var(--fg);
}
::selection { background: rgb(124 140 255 / 40%); }

/* Film grain over everything, very faint */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(8) infinite;
}
@keyframes grain { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }

/* ───────── Nav ───────── */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(var(--max), calc(100% - 32px)); display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 10px 16px; border-radius: 16px; border: 1px solid var(--line);
  background: rgb(10 10 18 / 55%); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled { background: rgb(10 10 18 / 82%); border-color: var(--line-2); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; font-size: 17px; }
.nav nav { display: flex; align-items: center; gap: 6px; }
.nav nav a { padding: 7px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 500; transition: color 0.2s, background 0.2s; }
.nav nav a:hover { color: var(--fg); background: rgb(255 255 255 / 6%); }
.nav nav a.nav-cta { color: #0b0b14; background: var(--fg); }
.nav nav a.nav-cta:hover { background: #fff; color: #0b0b14; }

/* ───────── Hero ───────── */
.hero { position: relative; padding: 150px 16px 40px; text-align: center; }
.hero-glow {
  position: absolute; inset: -10% -20% auto; height: 900px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 45% at 50% 30%, rgb(124 140 255 / 28%), transparent 70%),
    radial-gradient(30% 35% at 70% 20%, rgb(177 140 255 / 22%), transparent 70%),
    radial-gradient(25% 30% at 25% 35%, rgb(74 222 128 / 10%), transparent 70%);
  filter: blur(10px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 26px; padding: 6px 14px;
  border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; color: var(--muted); background: rgb(255 255 255 / 3%);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgb(74 222 128 / 18%); }
h1 {
  margin: 0 auto; max-width: 15ch; font-size: clamp(44px, 8vw, 104px); line-height: 0.98; letter-spacing: -0.045em; font-weight: 700;
}
h1 em {
  display: inline-block; margin-top: 0.08em; font-size: 0.92em; letter-spacing: -0.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { max-width: 640px; margin: 28px auto 0; font-size: clamp(17px, 2vw, 20px); color: var(--muted); }
.cta-row { display: flex; justify-content: center; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 14px; font-weight: 600; font-size: 15px; transition: transform 0.2s, box-shadow 0.2s, background 0.2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: #0b0b14; background: var(--fg); box-shadow: 0 10px 40px -10px rgb(124 140 255 / 60%), inset 0 -2px 0 rgb(0 0 0 / 12%); }
.btn-primary:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 16px 50px -12px rgb(124 140 255 / 80%); }
.btn-ghost { color: var(--fg); border: 1px solid var(--line-2); background: rgb(255 255 255 / 3%); }
.btn-ghost:hover { background: rgb(255 255 255 / 7%); }
.fine { margin: 18px 0 0; font-size: 13px; color: var(--dim); }

/* ───────── Product replica ───────── */
.stage { position: relative; max-width: 1180px; margin: 70px auto 0; perspective: 2000px; }
.stage::before {
  content: ''; position: absolute; inset: 8% 6% -6%; z-index: -1; border-radius: 40px;
  background: var(--grad); filter: blur(80px); opacity: 0.35;
}
.window {
  /* Theme tokens (overridden per data-theme) */
  --wbg: #1a1b26; --wside: #16161e; --wfg: #c0caf5; --wmuted: #7780a8; --wborder: #2f334d; --whover: #24283b;
  --wacc: #7aa2f7; --won: #1a1b26; --wok: #9ece6a; --wwarn: #e0af68; --wfail: #f7768e;
  --sk: #bb9af7; --sf: #7aa2f7; --ss: #9ece6a; --sn: #ff9e64; --st: #2ac3de;
  --addbg: rgb(158 206 106 / 13%); --delbg: rgb(247 118 142 / 13%);

  display: grid; grid-template-columns: 250px 1fr; height: 640px; overflow: hidden; text-align: left;
  border-radius: 16px; background: var(--wbg); color: var(--wfg); font-size: 12.5px; line-height: 1.5;
  border: 1px solid rgb(255 255 255 / 10%);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 50%), 0 50px 120px -30px rgb(0 0 0 / 80%), 0 30px 60px -30px rgb(60 40 180 / 45%);
  transform: rotateX(8deg) scale(0.97); transform-origin: 50% 0; transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.1, 1), background 0.5s, color 0.5s;
}
.stage.in .window { transform: rotateX(0) scale(1); }
.window * { transition: background-color 0.5s, color 0.5s, border-color 0.5s; }
.window[data-theme='github-dark'] { --wbg: #0d1117; --wside: #161b22; --wfg: #e6edf3; --wmuted: #8d96a0; --wborder: #30363d; --whover: #21262d; --wacc: #4493f8; --won: #fff; --wok: #3fb950; --wwarn: #d29922; --wfail: #f85149; --sk: #ff7b72; --sf: #d2a8ff; --ss: #a5d6ff; --sn: #79c0ff; --st: #ffa657; --addbg: rgb(46 160 67 / 15%); --delbg: rgb(248 81 73 / 15%); }
.window[data-theme='dracula'] { --wbg: #282a36; --wside: #21222c; --wfg: #f8f8f2; --wmuted: #8b93b8; --wborder: #44475a; --whover: #343746; --wacc: #bd93f9; --won: #282a36; --wok: #50fa7b; --wwarn: #f1fa8c; --wfail: #ff5555; --sk: #ff79c6; --sf: #50fa7b; --ss: #f1fa8c; --sn: #bd93f9; --st: #8be9fd; --addbg: rgb(80 250 123 / 12%); --delbg: rgb(255 85 85 / 14%); }
.window[data-theme='nord'] { --wbg: #2e3440; --wside: #3b4252; --wfg: #eceff4; --wmuted: #a0a9ba; --wborder: #4c566a; --whover: #434c5e; --wacc: #88c0d0; --won: #2e3440; --wok: #a3be8c; --wwarn: #ebcb8b; --wfail: #bf616a; --sk: #81a1c1; --sf: #88c0d0; --ss: #a3be8c; --sn: #b48ead; --st: #8fbcbb; --addbg: rgb(163 190 140 / 15%); --delbg: rgb(191 97 106 / 18%); }
.window[data-theme='gruvbox'] { --wbg: #282828; --wside: #1d2021; --wfg: #ebdbb2; --wmuted: #a89984; --wborder: #3c3836; --whover: #32302f; --wacc: #83a598; --won: #1d2021; --wok: #b8bb26; --wwarn: #fabd2f; --wfail: #fb4934; --sk: #fb4934; --sf: #b8bb26; --ss: #b8bb26; --sn: #d3869b; --st: #fabd2f; --addbg: rgb(184 187 38 / 13%); --delbg: rgb(251 73 52 / 14%); }
.window[data-theme='solarized-light'] { --wbg: #fdf6e3; --wside: #f5eedb; --wfg: #586e75; --wmuted: #839496; --wborder: #e4dcc4; --whover: #eee8d5; --wacc: #268bd2; --won: #fff; --wok: #859900; --wwarn: #b58900; --wfail: #dc322f; --sk: #859900; --sf: #268bd2; --ss: #2aa198; --sn: #d33682; --st: #b58900; --addbg: rgb(133 153 0 / 13%); --delbg: rgb(220 50 47 / 11%); }
.window[data-theme='latte'] { --wbg: #eff1f5; --wside: #e6e9ef; --wfg: #4c4f69; --wmuted: #6c6f85; --wborder: #ccd0da; --whover: #dce0e8; --wacc: #1e66f5; --won: #fff; --wok: #40a02b; --wwarn: #c47a0e; --wfail: #d20f39; --sk: #8839ef; --sf: #1e66f5; --ss: #40a02b; --sn: #fe640b; --st: #df8e1d; --addbg: rgb(64 160 43 / 13%); --delbg: rgb(210 15 57 / 10%); }

.window .add { color: var(--wok); }
.window .del { color: var(--wfail); }
.w-side { background: var(--wside); border-right: 1px solid var(--wborder); padding: 12px 10px; overflow: hidden; }
.lights { display: flex; gap: 8px; padding: 2px 4px 16px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.w-repo { display: flex; gap: 9px; align-items: center; padding: 0 4px 14px; }
.w-repo small { display: block; color: var(--wmuted); font-size: 11px; line-height: 1.2; }
.w-repo b { font-size: 14px; }
.w-initial { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--wacc); color: var(--won); font-weight: 700; }
.w-sec { display: flex; justify-content: space-between; padding: 12px 6px 6px; color: var(--wmuted); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.w-pr { display: flex; gap: 9px; padding: 7px 8px; border-radius: 7px; margin: 1px 0; }
.w-pr.on { background: var(--whover); box-shadow: inset 2px 0 0 var(--wacc); }
.w-pr b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 185px; }
.w-pr small { color: var(--wmuted); font-size: 11px; }
.w-state { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--wacc); }
.w-state.ok { background: var(--wok); }
.w-state.warn { background: var(--wwarn); }

.w-main { display: flex; flex-direction: column; min-width: 0; }
.w-top { padding: 14px 18px 0; border-bottom: 1px solid var(--wborder); }
.w-title { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.w-badge { font-size: 11px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--wok); color: var(--wok); }
.w-num { color: var(--wmuted); }
.w-tabs { display: flex; align-items: center; gap: 4px; margin-top: 10px; }
.w-tabs > span:not(.w-spacer):not(.w-pill):not(.w-review) { padding: 6px 10px; border-bottom: 2px solid transparent; }
.w-tabs > span.on { border-color: var(--wacc); font-weight: 600; }
.w-tabs i { font-style: normal; color: var(--wmuted); margin-left: 3px; }
.w-spacer { flex: 1; }
.w-pill { font-size: 11.5px; padding: 2px 10px; margin-bottom: 6px; border-radius: 999px; border: 1px solid var(--wacc); color: var(--wacc); }
.w-review { font-size: 12px; padding: 3px 12px; margin: 0 0 6px 8px; border-radius: 7px; border: 1px solid var(--wwarn); }
.w-review i { color: var(--wwarn) !important; }
.w-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 190px 1fr 260px; }
.w-tree { border-right: 1px solid var(--wborder); padding: 10px 8px; background: var(--wbg); }
.w-filter { border: 1px solid var(--wborder); border-radius: 7px; padding: 5px 9px; color: var(--wmuted); margin-bottom: 10px; }
.w-filter kbd { height: 1.5em; font-size: 10px; color: var(--wmuted); border-color: var(--wborder); background: none; }
.w-dir { color: var(--wmuted); padding: 6px 6px 2px; font-size: 11.5px; }
.w-file { display: flex; gap: 7px; padding: 4px 8px; border-radius: 6px; }
.w-file span { margin-left: auto; font-size: 11px; }
.w-file.on { background: var(--whover); }
.w-file b { font-size: 10px; width: 12px; }
.w-file b.m { color: var(--wwarn); }
.w-file b.a { color: var(--wok); }
.w-diff { min-width: 0; overflow: hidden; border-right: 1px solid var(--wborder); }
.w-toolbar { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--wborder); white-space: nowrap; }
.w-seg { display: inline-flex; border: 1px solid var(--wborder); border-radius: 7px; overflow: hidden; font-size: 11.5px; }
.w-seg span { padding: 3px 9px; }
.w-seg span.on, .window[data-mode='all'] .w-seg .m-all, .window[data-mode='since'] .w-seg .m-since { background: var(--whover); font-weight: 600; }
.w-note { color: var(--wmuted); font-size: 11.5px; }
.w-ask-link { color: var(--wacc); }
.w-filehead { display: flex; align-items: center; gap: 10px; margin: 10px 12px 0; padding: 7px 10px; border: 1px solid var(--wborder); border-bottom: none; border-radius: 8px 8px 0 0; background: var(--wside); font-weight: 500; }
.w-filehead label { display: flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 1px 8px; border: 1px solid var(--wborder); border-radius: 6px; }
.w-filehead label i { width: 11px; height: 11px; border: 1px solid var(--wmuted); border-radius: 3px; }
.code { margin: 0 12px; padding: 4px 0; border: 1px solid var(--wborder); border-top: none; font-size: 12px; line-height: 1.75; overflow: hidden; background: var(--wbg); }
.code + .w-comment + .code { border-top: none; border-radius: 0 0 8px 8px; }
.code .ln { display: flex; white-space: pre; }
.code .ln b { flex: none; width: 42px; padding-right: 10px; text-align: right; color: var(--wmuted); font-weight: 400; opacity: 0.8; }
.code .ln code { background: none; padding: 0; font-size: inherit; border-radius: 0; padding-left: 14px; position: relative; }
.code .add { background: var(--addbg); box-shadow: inset 3px 0 0 var(--wok); color: inherit; }
.code .del { background: var(--delbg); box-shadow: inset 3px 0 0 var(--wfail); color: inherit; }
.code .add code::before, .code .del code::before { position: absolute; left: 3px; color: var(--wok); }
.code .add code::before { content: '+'; }
.code .del code::before { content: '−'; color: var(--wfail); }
.code k { color: var(--sk); }
.code f { color: var(--sf); }
.code s { color: var(--ss); text-decoration: none; }
.code n { color: var(--sn); }
.code t { color: var(--st); }
.window[data-mode='since'] .all-only, .window[data-mode='all'] .since-only { display: none; }
.window .ln.all-only, .window .ln.since-only { animation: lineIn 0.45s ease both; }
@keyframes lineIn { from { opacity: 0; transform: translateX(-6px); } }

.w-comment { margin: 0 12px; padding: 10px 14px; border-left: 1px solid var(--wborder); border-right: 1px solid var(--wborder); background: var(--wside); }
.w-comment { position: relative; }
.w-comment::after { content: ''; position: absolute; inset: 6px 10px; border: 1px dashed var(--wwarn); border-radius: 8px; pointer-events: none; }
.w-comment-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 0; }
.w-comment-head .muted { color: var(--wmuted); font-size: 11px; }
.w-comment-head b { color: var(--wwarn); font-size: 11px; }
.w-avatar { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 8px; font-weight: 700; background: var(--wacc); color: var(--won); }
.w-comment p { margin: 4px 6px 6px; }
.w-comment code, .w-askpanel code { background: var(--whover); font-size: 11px; }
.w-askpanel { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--wside); }
.w-askhead { display: flex; justify-content: space-between; align-items: baseline; }
.w-askhead small { color: var(--wmuted); font-size: 10.5px; }
.w-q { align-self: flex-end; max-width: 92%; padding: 7px 10px; border-radius: 10px 10px 2px 10px; background: color-mix(in srgb, var(--wacc) 18%, var(--wbg)); }
.w-activity { font-size: 11px; color: var(--wmuted); font-family: var(--mono); }
.w-activity .warn { color: var(--wwarn); }
.w-a u { text-decoration-color: var(--wacc); color: var(--wacc); }

.stage-controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 22px 4px 0; }
.swatches { display: flex; align-items: center; gap: 8px; }
.swatches .label { font-size: 13px; color: var(--dim); margin-right: 4px; }
.swatches button {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid transparent;
  background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); box-shadow: 0 0 0 1px var(--line-2); transition: transform 0.2s, border-color 0.2s;
}
.swatches button:hover { transform: scale(1.12); }
.swatches button.on { border-color: var(--fg); }
.theme-name { font-size: 13px; color: var(--muted); min-width: 120px; text-align: left; margin-left: 6px; }
.mode-toggle { display: inline-flex; padding: 4px; border-radius: 12px; border: 1px solid var(--line-2); background: rgb(255 255 255 / 3%); }
.mode-toggle button { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 7px 14px; border-radius: 9px; cursor: pointer; transition: all 0.25s; }
.mode-toggle button.on { color: #0b0b14; background: var(--fg); font-weight: 600; }

/* ───────── Sections ───────── */
.section { max-width: var(--max); margin: 0 auto; padding: 140px 16px 0; }
.section-head { max-width: 780px; margin-bottom: 56px; }
.kicker { margin: 0 0 16px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--a1); }
h2 { margin: 0; font-size: clamp(34px, 5vw, 62px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; }
h2 em { color: var(--muted); letter-spacing: -0.01em; }
.sub { margin: 22px 0 0; font-size: 18px; color: var(--muted); max-width: 640px; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative; overflow: hidden; padding: 30px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgb(255 255 255 / 4%), rgb(255 255 255 / 1.5%)), var(--bg-2);
  isolation: isolate;
}
.card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgb(124 140 255 / 16%), transparent 60%);
}
.card:hover::before { opacity: 1; }
.card h3 { margin: 0 0 10px; font-size: 21px; letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.c-wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.c-tall { grid-row: span 2; display: flex; flex-direction: column; }
.icon-chip { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 12px; font-size: 20px; border: 1px solid var(--line-2); background: rgb(124 140 255 / 10%); color: var(--a1); }

.keys-visual { display: flex; flex-direction: column; gap: 10px; }
.keyrow { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.keyrow span { margin-left: 8px; }
.k { width: 38px; height: 38px; font-size: 15px; border-radius: 10px; transition: all 0.2s; }
.k.hot, .keyrow:hover .k { background: var(--fg); color: #0b0b14; border-color: var(--fg); transform: translateY(1px); }

.ask-visual { margin-top: auto; padding-top: 26px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.bubble { padding: 10px 14px; border-radius: 14px; }
.bubble.q { align-self: flex-end; max-width: 85%; background: rgb(124 140 255 / 16%); border-bottom-right-radius: 4px; }
.bubble.a { background: rgb(255 255 255 / 5%); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble u { color: var(--a1); text-decoration-color: rgb(124 140 255 / 50%); }
.trace { font-family: var(--mono); font-size: 12px; color: var(--dim); line-height: 1.7; }
.warn { color: var(--amber); }

.theme-dots { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-top: 22px; }
.theme-dots i { aspect-ratio: 1; border-radius: 8px; background: var(--c); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%); transition: transform 0.25s; }
.card:hover .theme-dots i { transform: translateY(-3px); }
.card:hover .theme-dots i:nth-child(2n) { transform: translateY(2px); }

.merge-visual { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.mv-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgb(255 255 255 / 3%); color: var(--muted); }
.mv-row.refused { color: var(--fg); border-color: rgb(255 123 123 / 40%); background: rgb(255 123 123 / 8%); }
.mv-dot { width: 9px; height: 9px; border-radius: 50%; }
.mv-dot.ok { background: var(--green); }
.mv-dot.warn { background: var(--amber); }
.mv-dot.fail { background: var(--red); box-shadow: 0 0 0 5px rgb(255 123 123 / 18%); }

.tl-svg { width: 100%; height: auto; overflow: visible; }
.tl-svg path { fill: none; stroke-width: 4; stroke-linecap: round; }
.tl-base { stroke: rgb(255 255 255 / 18%); }
.tl-old { stroke: rgb(255 255 255 / 35%); stroke-dasharray: 2 10; }
.tl-new { stroke: url(#tlg); }
.tl-arrow { stroke: var(--green); stroke-width: 2.5 !important; stroke-dasharray: 6 7; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -26; } }
.tl-c { fill: var(--bg-2); stroke: rgb(255 255 255 / 40%); stroke-width: 3; }
.tl-c.old { stroke: rgb(255 255 255 / 55%); }
.tl-c.pin { fill: var(--fg); stroke: var(--fg); }
.tl-c.new { stroke: var(--a2); fill: var(--a2); }
.tl-svg text { fill: var(--dim); font: 13px var(--mono); }
.tl-svg .tl-label { fill: var(--green); font-weight: 500; }
.since-card.in .tl-new { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.4s 0.2s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Principles */
.layers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.layers li { display: flex; gap: 22px; padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); }
.layers li > span { font-family: var(--serif); font-size: 44px; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--a1); }
.layers h4 { margin: 4px 0 8px; font-size: 19px; letter-spacing: -0.015em; }
.layers p { margin: 0; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.facts div { padding: 34px 30px; display: flex; align-items: baseline; gap: 16px; }
.facts div + div { border-left: 1px solid var(--line); }
.facts b { font-family: var(--serif); font-weight: 400; font-size: 72px; line-height: 0.8; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.facts span { color: var(--muted); font-size: 15px; }

/* Terminal */
.term-section { text-align: center; }
.term-section .section-head { margin-inline: auto; }
.terminal { max-width: 760px; margin: 0 auto; text-align: left; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); background: #0a0a12; box-shadow: 0 40px 100px -40px rgb(124 140 255 / 45%); }
.term-bar { position: relative; display: flex; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 12px; height: 12px; border-radius: 50%; background: #3a3a4a; }
.term-bar span { position: absolute; left: 50%; transform: translateX(-50%); top: 9px; font-size: 12.5px; color: var(--dim); font-family: var(--mono); }
.terminal pre { margin: 0; padding: 22px 24px 26px; font-size: 14px; line-height: 1.8; white-space: pre-wrap; min-height: 230px; }
.terminal .p { color: var(--a2); }
.terminal .dim { color: var(--dim); }
.terminal .out { color: var(--muted); opacity: 0; transition: opacity 0.4s; }
.terminal .out.show { opacity: 1; }
.caret { display: inline-block; width: 8px; height: 1.1em; vertical-align: -0.2em; background: var(--fg); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Install */
.install { padding-bottom: 120px; }
.install-card {
  position: relative; overflow: hidden; text-align: center; padding: 70px 40px 56px; border-radius: 32px; border: 1px solid var(--line-2);
  background: radial-gradient(60% 80% at 50% 0%, rgb(124 140 255 / 22%), transparent 70%), var(--bg-2);
}
.install-icon { filter: drop-shadow(0 20px 40px rgb(90 100 250 / 45%)); margin-bottom: 20px; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.install-card .sub { margin-inline: auto; }
.steps { max-width: 760px; margin: 40px auto 0; display: grid; gap: 10px; text-align: left; }
.step { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgb(0 0 0 / 30%); }
.step > span { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 600; background: rgb(124 140 255 / 16%); color: var(--a1); }
.step code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: none; font-size: 14px; scrollbar-width: none; }
.copy { flex: none; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: rgb(255 255 255 / 4%); transition: all 0.2s; }
.copy:hover { color: var(--fg); background: rgb(255 255 255 / 9%); }
.copy.done { color: var(--green); border-color: rgb(74 222 128 / 40%); }
.req { margin: 26px auto 0; max-width: 620px; font-size: 14px; color: var(--dim); }

/* Footer */
.footer { max-width: var(--max); margin: 0 auto; padding: 40px 16px 60px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.footer p { margin: 0; }
.footer .muted { margin-left: auto; color: var(--dim); }

/* ───────── Reveal on scroll ───────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.1, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.1, 1); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal:nth-child(3) { transition-delay: 0.08s; }
.hero .reveal:nth-child(4) { transition-delay: 0.16s; }
.hero .reveal:nth-child(5) { transition-delay: 0.24s; }
.hero .reveal:nth-child(6) { transition-delay: 0.3s; }
.hero .stage.reveal { transition-delay: 0.36s; }
.bento .reveal:nth-child(3n + 2) { transition-delay: 0.08s; }
.bento .reveal:nth-child(3n) { transition-delay: 0.16s; }

/* ───────── Responsive ───────── */
@media (max-width: 1100px) {
  .w-body { grid-template-columns: 170px 1fr; }
  .w-askpanel { display: none; }
}
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .c-wide { grid-column: span 2; }
  .c-tall { grid-row: auto; }
  .window { grid-template-columns: 1fr; height: 560px; }
  .w-side { display: none; }
}
@media (max-width: 640px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .hero { padding-top: 120px; }
  .bento, .layers { grid-template-columns: 1fr; }
  .c-wide { grid-column: auto; grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts div + div { border-left: none; border-top: 1px solid var(--line); }
  .w-body { grid-template-columns: 1fr; }
  .w-tree, .w-pill, .w-review, .w-note { display: none; }
  .window { height: 520px; font-size: 11.5px; }
  .stage-controls { justify-content: center; }
  .theme-name { display: none; }
  .install-card { padding: 50px 18px 40px; }
  .footer .muted { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .window { transform: none; }
}

/* Second file in the replica */
.w-filehead.second { margin-top: 14px; }
.w-filehead label.checked i { background: var(--wacc); border-color: var(--wacc); }
.code:last-of-type { border-radius: 0 0 8px 8px; }

/* Git actions visual */
.git-visual { display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; }
.gv-branch { align-self: flex-start; font-weight: 600; padding: 6px 12px; border-radius: 10px; background: rgb(255 255 255 / 5%); border: 1px solid var(--line); }
.gv-branch span { color: var(--dim); font-size: 11px; }
.gv-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.gv-buttons span { padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--muted); }
.gv-buttons span.hot { color: #0b0b14; background: var(--fg); border-color: var(--fg); }
.gv-buttons i { font-style: normal; margin-left: 5px; opacity: 0.75; }
.gv-status { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.gv-status b { color: var(--amber); font-weight: 500; margin: 0 4px 0 10px; }
.gv-status b:first-child { margin-left: 0; }
.gv-status b.a { color: var(--green); }
.gv-status b.u { color: var(--muted); }
.bento { grid-auto-flow: dense; }
.steps-intro { margin: 36px 0 -24px; font-size: 14px; color: var(--dim); }
@media (max-width: 640px) {
  .terminal pre { white-space: pre; overflow-x: auto; font-size: 12.5px; padding: 18px; }
}

/* Centering: section intros sit on the page's center line, like the hero; nothing can widen the page. */
html { overflow-x: clip; }
body { overflow-x: clip; }
.hero { overflow-x: clip; }
.section-head { margin-inline: auto; text-align: center; }
.section-head .sub { margin-inline: auto; }

/* Theme swatches: always circles (no native button look; the selection ring is a shadow, not a border). */
.swatches button {
  -webkit-appearance: none; appearance: none; padding: 0; border: 0; border-radius: 50%; overflow: hidden;
  flex: none; width: 26px; height: 26px; aspect-ratio: 1;
  background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%);
  box-shadow: 0 0 0 1px var(--line-2);
}
.swatches button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg); }
.swatches button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--a1); }

/* ───────── Since your review ───────── */
.section-head .sub b { color: var(--fg); font-weight: 600; }
.since-card {
  display: grid; grid-template-columns: 1.15fr 1fr; border-radius: 28px; border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(70% 90% at 0% 0%, rgb(124 140 255 / 10%), transparent 60%), var(--bg-2);
}
.since-graph, .since-compare { padding: 34px 36px; }
.since-compare { display: flex; flex-direction: column; gap: 14px; border-left: 1px solid var(--line); background: rgb(0 0 0 / 18%); }
.since-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }
.since-compare .since-label { margin-bottom: 0; }
.cmp { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: rgb(255 255 255 / 2.5%); }
.cmp-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.cmp-head span { font-weight: 600; font-size: 15px; margin-right: auto; }
.cmp-head b { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 0.8; }
.cmp-head small { color: var(--dim); font-size: 13px; }
.bars { display: flex; flex-direction: column; gap: 4px; }
.bars i { display: block; flex: none; height: 5px; width: var(--w); border-radius: 3px; background: rgb(255 255 255 / 12%); }
.bars i.a { background: rgb(74 222 128 / 45%); }
.bars i.d { background: rgb(255 123 123 / 45%); }
.cmp-all { opacity: 0.55; }
.cmp-all .bars { max-height: 58px; overflow: hidden; mask-image: linear-gradient(#000 60%, transparent); }
.cmp-all .cmp-head b { color: var(--muted); }
.cmp-since { border-color: rgb(124 140 255 / 45%); background: rgb(124 140 255 / 8%); box-shadow: 0 20px 60px -30px rgb(124 140 255 / 60%); }
.cmp-since .cmp-head b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cmp-since .bars i { height: 7px; }
.cmp-since .bars i.a { background: var(--green); }
.cmp-since .bars i.d { background: var(--red); }
.since-card.in .cmp-since .bars i { animation: barIn 0.6s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
.since-card.in .cmp-since .bars i:nth-child(2) { animation-delay: 0.12s; }
.since-card.in .cmp-since .bars i:nth-child(3) { animation-delay: 0.24s; }
@keyframes barIn { from { width: 0; } }
.since-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.since-points > div { padding: 26px 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); }
.since-points b { display: block; font-size: 17px; margin-bottom: 6px; letter-spacing: -0.01em; }
.since-points p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 900px) {
  .since-card { grid-template-columns: 1fr; }
  .since-compare { border-left: none; border-top: 1px solid var(--line); }
  .since-points { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .since-graph, .since-compare { padding: 24px 20px; }
}

/* Download */
.dl-btn { margin-top: 32px; }
.dl-meta { margin: 12px 0 0; font-size: 13px; color: var(--dim); font-family: var(--mono); }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.step p b { color: var(--fg); font-weight: 600; }
.step.sub-step { margin-left: 40px; padding-left: 16px; }
@media (max-width: 640px) { .step.sub-step { margin-left: 0; } }
