/* Rustkey site. Tokens first; every colour below comes from these. */
:root {
  --paper: oklch(98.4% 0.004 250);
  --paper-2: oklch(96% 0.006 250);
  --surface: oklch(99.7% 0.002 250);
  --ink: oklch(23% 0.014 260);
  --ink-2: oklch(45% 0.014 260);
  --ink-3: oklch(52% 0.012 260);
  --line: oklch(91.5% 0.006 255);
  --line-2: oklch(86.5% 0.008 255);
  --accent: oklch(57% 0.185 32);
  --accent-ink: oklch(99.5% 0.006 33);
  --accent-soft: oklch(94% 0.035 32);
  --night: oklch(23% 0.016 260);
  --night-2: oklch(29% 0.016 260);
  --night-line: oklch(36% 0.015 260);
  --night-ink: oklch(96.5% 0.005 260);
  --night-ink-2: oklch(78% 0.012 260);

  --sans: 'Be Vietnam Pro', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --sect: clamp(80px, 9vw, 120px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-flow: cubic-bezier(0.22, 1, 0.36, 1);

  --shadow-win: 0 2px 6px oklch(23% 0.014 260 / 0.04), 0 18px 44px -14px oklch(23% 0.014 260 / 0.10), 0 38px 76px -28px oklch(23% 0.014 260 / 0.10);
  --shadow-key: 0 1px 0 var(--line-2), 0 3px 8px -3px oklch(23% 0.014 260 / 0.08);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  font-feature-settings: 'ss01' 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--accent-ink); }

/* Bilingual content: only the active language shows. */
html[data-lang="vi"] [lang="en"]:not(html):not([data-set-lang]),
html[data-lang="en"] [lang="vi"]:not(html):not([data-set-lang]) { display: none !important; }

img { display: block; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }

code, kbd { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; padding: 0.06em 0.36em; }
kbd {
  display: inline-block;
  padding: 0.08em 0.42em;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  line-height: 1.35;
  white-space: nowrap;
}

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

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--paper); border-radius: var(--r-s); text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: oklch(98.4% 0.004 250 / 0.84);
  backdrop-filter: saturate(1.3) blur(18px);
  -webkit-backdrop-filter: saturate(1.3) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; }
.nav__brand { display: inline-flex; align-items: center; gap: 10px; }
.nav__ver { text-decoration: none; font-size: 12px; color: var(--ink-3); border-color: var(--line); font-variant-numeric: tabular-nums; transition: color 0.15s, border-color 0.15s; }
.nav__ver:hover { color: var(--ink); border-color: var(--line-2); }
.nav__links { display: flex; gap: 26px; font-size: 15px; color: var(--ink-2); }
.nav__links a { text-decoration: none; padding: 6px 0; white-space: nowrap; transition: color 160ms var(--ease-out); }
.nav__links a:hover { color: var(--ink); }
.nav__end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.lang { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.lang button {
  font: 600 12px/1 var(--sans); letter-spacing: 0.04em;
  color: var(--ink-2); background: none; border: 0; border-radius: 999px;
  padding: 6px 10px; cursor: pointer;
  transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lang button:not([aria-pressed="true"]):hover { color: var(--ink); }
.nav__gh { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; color: var(--ink-2); transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out); }
.nav__gh:hover { color: var(--ink); background: var(--paper-2); }

/* ---------- Hero ---------- */
.hero { padding: clamp(36px, 5vw, 64px) 0 0; }
.hero__title {
  font-weight: 600;
  font-size: clamp(2.5rem, 5.2vw, 4.6rem);
  line-height: 1.18;
  letter-spacing: -0.028em;
  max-width: 20ch;
}
html[data-lang="en"] .hero__title { max-width: 18ch; }
.hero__lede { margin-top: 20px; max-width: 60ch; font-size: clamp(1.06rem, 1.5vw, 1.2rem); color: var(--ink-2); line-height: 1.65; }

.get { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.cmd {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 6px 6px 6px 18px;
  background: var(--night); color: var(--night-ink);
  border-radius: var(--r-m);
  max-width: 100%;
}
.cmd__prompt { font-family: var(--mono); color: var(--night-ink-2); font-size: 15px; }
.cmd__text { background: none; border: 0; padding: 0; color: inherit; font-size: 15px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.cmd__text.is-clipped { mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.cmd__text::-webkit-scrollbar { display: none; }
.cmd__copy {
  flex: none;
  position: relative;
  display: inline-grid; place-items: center;
  color: var(--night-ink);
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: 10px;
  padding: 0; width: 40px; height: 40px; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 100ms var(--ease-out);
}
.cmd__ico { transition: opacity 180ms var(--ease-flow), transform 200ms var(--ease-flow); }
.cmd__ico--done { position: absolute; opacity: 0; transform: scale(0.75); }
.cmd__copy.is-done .cmd__ico--copy { opacity: 0; transform: scale(0.75); }
.cmd__copy.is-done .cmd__ico--done { opacity: 1; transform: scale(1); }
.cmd__copy:hover { background: var(--night-line); }
.cmd__copy:active { transform: scale(0.96); }
.cmd__copy.is-done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cmd--small { min-height: 46px; padding-left: 14px; margin-top: 18px; }
.cmd--small .cmd__text { font-size: 13.5px; }
.cmd--small .cmd__copy { width: 34px; height: 34px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 22px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 16px; text-decoration: none;
  border-radius: var(--r-m);
  box-shadow: 0 1px 0 oklch(100% 0 0 / 0.18) inset, 0 8px 20px -8px oklch(57% 0.185 32 / 0.42);
  transition: transform 280ms var(--ease-flow), box-shadow 280ms var(--ease-flow), background-color 240ms var(--ease-flow);
}
.btn:hover { background: oklch(53% 0.19 32); transform: translateY(-2px); box-shadow: 0 1px 0 oklch(100% 0 0 / 0.18) inset, 0 12px 26px -10px oklch(57% 0.185 32 / 0.5); }
.btn:active { transform: translateY(0) scale(0.985); }

.hero__meta { margin-top: 18px; font-size: 14px; color: var(--ink-3); }

/* ---------- Demo stage ---------- */
.stage { margin: clamp(32px, 3.6vw, 48px) 0 0; position: relative; }
.win {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-win);
  overflow: hidden;
  transition: border-color 280ms var(--ease-flow);
}
.win:focus-within { border-color: var(--line-2); }
.win__bar { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--paper); position: relative; }
.win__bar i { width: 10px; height: 10px; border-radius: 50%; background: oklch(88% 0.008 255); transition: background-color 280ms var(--ease-flow); }
.win:hover .win__bar i:nth-child(1),
.win:focus-within .win__bar i:nth-child(1) { background: oklch(68% 0.16 25); }
.win:hover .win__bar i:nth-child(2),
.win:focus-within .win__bar i:nth-child(2) { background: oklch(80% 0.14 85); }
.win:hover .win__bar i:nth-child(3),
.win:focus-within .win__bar i:nth-child(3) { background: oklch(72% 0.15 145); }
.win__title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 500; color: var(--ink-3); }
.win__badge {
  margin-left: auto;
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.04em;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  transition: color 240ms var(--ease-flow), border-color 240ms var(--ease-flow), background-color 240ms var(--ease-flow);
}
.win:focus-within .win__badge {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: oklch(57% 0.185 32 / 0.28);
}
.field {
  position: relative;
  min-height: clamp(110px, 12vw, 168px);
  padding: clamp(22px, 3vw, 38px) clamp(22px, 4.5vw, 60px);
  font-weight: 500;
  font-size: clamp(1.7rem, 4.4vw, 3.6rem);
  line-height: 1.22;
  letter-spacing: -0.025em;
  cursor: text;
  outline: none;
  overflow-wrap: anywhere;
}
.field:has(.field__input:focus-visible) { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 0 0 var(--r-l) var(--r-l); outline: none; }
.field__input {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0;
  opacity: 0; background: transparent; color: transparent; caret-color: transparent;
  font-size: 16px; cursor: text;
}
.field__input:focus { outline: none; }
.field__word.is-restored { animation: settle 720ms var(--ease-flow); }
.field__word.is-abbr { animation: settle 720ms var(--ease-flow); }
@keyframes settle { from { color: var(--accent); } to { color: inherit; } }

.caret {
  display: inline-block; width: 3px; height: 1.02em; margin-left: 2px;
  vertical-align: -0.14em; background: var(--accent); border-radius: 2px;
  animation: blink 1.4s ease-in-out infinite;
}
.caret--still { height: 1.1em; width: 2px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.16; } }
.is-typing .caret { animation: none; }

.keys {
  display: flex; gap: 8px; justify-content: center; flex-wrap: nowrap;
  height: 60px; margin-top: 18px; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.key {
  flex: none;
  display: inline-grid; place-items: center;
  min-width: 48px; height: 48px; padding: 0 12px;
  font: 500 18px/1 var(--mono); color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow-key);
  transition: color 420ms var(--ease-flow), background-color 420ms var(--ease-flow), border-color 420ms var(--ease-flow), transform 420ms var(--ease-flow), box-shadow 420ms var(--ease-flow);
}
.key--wide { min-width: 108px; font-size: 13px; letter-spacing: 0.02em; }
.key.is-hot { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); transform: translateY(2px); box-shadow: 0 0 0 var(--line-2), 0 1px 2px -1px oklch(19% 0.012 262 / 0.2); transition-duration: 0.05s; }
.key.is-old { color: var(--ink-3); }

.stage__cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.stage__note { font-weight: 600; color: var(--ink); min-height: 1.6em; }
.stage__note b { color: var(--accent); font-weight: 600; }
.stage__fine { margin-top: 8px; font-size: 13px; color: var(--ink-3); }

/* ---------- Sections ---------- */
.sect { padding: var(--sect) 0 0; }
.sect__head { max-width: 760px; }
.sect__head h2 {
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
}
.sect__head p { margin-top: 22px; font-size: 18px; color: var(--ink-2); max-width: 66ch; line-height: 1.65; }
.sect__head p.muted { font-size: 16px; }

.compare { margin-top: 56px; border-top: 1px solid var(--line); }
.compare__row {
  display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 24px;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.compare__who { font-size: 14px; font-weight: 600; color: var(--ink-3); }
.compare__row--rk .compare__who { color: var(--ink); }
.compare__line { font-size: clamp(1.5rem, 3.2vw, 2.5rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.compare__row:not(.compare__row--rk) .compare__line { color: var(--ink-2); }
.ime {
  padding: 0 0.08em;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
  text-decoration-color: oklch(57% 0.14 32 / 0.65);
  background: oklch(95.5% 0.025 32);
  border-radius: 6px;
}

.apps { padding-top: 10px; }
.split--how { align-items: start; }
.split--how .compare { grid-column: 1 / -1; }
.apps h3, .restore th, .steps h3 { font-size: 14px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.apps table { margin-top: 14px; }
.apps th { text-align: left; font-size: 13px; font-weight: 500; color: var(--ink-3); padding: 0 0 10px; border-bottom: 1px solid var(--line-2); }
.apps td { padding: 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.apps td:first-child { font-weight: 600; width: 44%; padding-right: 24px; }
.apps td:last-child { color: var(--ink-2); }

/* Dark band: English mixing */
.sect--ink {
  margin-top: var(--sect);
  padding: var(--sect) 0;
  background: var(--night);
  color: var(--night-ink);
}
.sect--ink .sect__head p { color: var(--night-ink-2); }
.sect--ink kbd { background: var(--night-2); color: var(--night-ink); border-color: var(--night-line); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.split .sect__head h2 { font-size: clamp(2rem, 3.2vw, 2.6rem); }
.restore { font-size: 17px; }
.restore th { text-align: left; color: var(--night-ink-2); font-weight: 500; font-size: 13px; padding: 0 0 12px; border-bottom: 1px solid var(--night-line); }
.restore td { padding: 16px 0; border-bottom: 1px solid var(--night-line); }
.restore td:nth-child(2) { color: var(--night-ink-2); }
.restore .win-cell { font-weight: 600; font-size: 19px; }
.restore kbd { font-size: 15px; }

/* Speed */
.bench { margin-top: 56px; }
.bench__scroll { overflow-x: auto; }
.bench__scroll table { min-width: 620px; }
.bench thead th { vertical-align: bottom; }
.bench h3 { font-size: 14px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.bench table { margin-top: 14px; }
.bench thead th { text-align: left; font-size: 13px; font-weight: 500; color: var(--ink-3); padding: 0 0 10px; border-bottom: 1px solid var(--line-2); }
.bench tbody th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 16px 24px 16px 0; border-bottom: 1px solid var(--line); }
.bench td { padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 17px; }
.bench .num { text-align: right; padding-left: 16px; }
.bench__rk th, .bench__rk td { color: var(--ink); font-weight: 600; }
.bench__na { font-size: 14px; color: var(--ink-3); }
.bench__fine { margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.bench__fine a { color: var(--ink-2); text-underline-offset: 0.18em; }
.bench__fine a:hover { color: var(--ink); }
.bench tbody tr:nth-child(2) { --d: 45ms; }
.bench tbody tr:nth-child(3) { --d: 90ms; }
.bench tbody tr:nth-child(4) { --d: 135ms; }
.bench .num + .num { padding-left: 24px; }

/* Why switch */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.why { margin-top: 56px; table-layout: fixed; }
.why thead th { text-align: left; font-size: 13px; font-weight: 500; color: var(--ink-3); padding: 0 0 10px; border-bottom: 1px solid var(--line-2); }
.why thead th:first-child { width: 26%; }
.why tbody th, .why td { text-align: left; vertical-align: top; padding: 22px 0 24px; border-bottom: 1px solid var(--line); line-height: 1.6; }
.why tbody th { padding-right: 32px; font-size: 19px; font-weight: 600; letter-spacing: -0.012em; line-height: 1.35; color: var(--ink); text-wrap: balance; }
.why td { font-size: 16px; padding-right: 32px; color: var(--ink-2); }
.why td:last-child { padding-right: 0; color: var(--ink); font-weight: 500; }
.why td a { color: inherit; }
.why kbd { font-size: 14px; }

/* FAQ */
.faq { margin: 56px 0 0; border-bottom: 1px solid var(--line-2); }
.faq__item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: clamp(28px, 4vw, 56px); padding: 24px 0 26px; border-top: 1px solid var(--line); }
.faq__item:first-child { border-top-color: var(--line-2); }
.faq dt { font-weight: 600; font-size: 19px; letter-spacing: -0.012em; line-height: 1.35; text-wrap: balance; }
.faq dd { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.65; max-width: 68ch; }
.faq dd a { color: var(--ink); }
.faq kbd { font-size: 14px; }

/* Features */
.feats { margin: 56px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); border-bottom: 1px solid var(--line-2); }
.feat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: clamp(28px, 4vw, 56px); align-items: baseline; padding: 24px 0 26px; border-top: 1px solid var(--line); }
.feat dd { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: clamp(20px, 3vw, 40px); align-items: baseline; }
.feat dd .ex { margin-top: 0; justify-content: flex-start; }
.feat dt { font-weight: 600; font-size: 19px; letter-spacing: -0.012em; line-height: 1.3; }
.feat dd { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.feat .ex { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 14px; color: var(--ink); font-size: 15px; }
.feat .ex kbd + kbd { margin-left: -4px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; font-size: 13px; font-weight: 500; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); }
.tag b { font: 600 11px/1 var(--sans); letter-spacing: 0.04em; color: var(--ink); }
.feat--lead { border-top: 1px solid var(--line-2); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: clamp(28px, 4vw, 56px); align-items: baseline; padding-bottom: 44px; }
.feat--lead dt { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.feat--lead .amp { color: var(--ink-3); font-weight: 500; }
.feat--lead dd { margin: 0; font-size: 18px; display: block; }
.feat--lead dd .ex { margin-top: 14px; }

/* Privacy */
.sect--privacy .sect__head h2 { max-width: 22ch; }
.facts { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 4vw, 56px); }
.facts li { padding: 26px 0 30px; border-top: 1px solid var(--line-2); color: var(--ink-2); font-size: 16px; }
.facts strong { display: block; color: var(--ink); font-size: 19px; font-weight: 600; letter-spacing: -0.012em; margin-bottom: 8px; }
.facts code { font-size: 0.82em; overflow-wrap: anywhere; }
.src { margin-top: 18px; font-size: 15px; }

/* Install */
.steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 64px; border-top: 1px solid var(--line-2); min-width: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 18px; left: 0;
  display: grid; place-items: center; width: 30px; height: 30px;
  font: 500 14px/1 var(--mono); color: var(--ink);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 10px; background: var(--surface);
}
.steps h3 { font-size: 20px; color: var(--ink); font-weight: 600; letter-spacing: -0.012em; }
.steps p { margin-top: 10px; color: var(--ink-2); font-size: 16px; }
.steps .cmd { display: flex; width: 100%; }
.steps .cmd__text { flex: 1; min-width: 0; }

.close {
  margin-top: clamp(88px, 10vw, 140px);
  padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 8vw, 112px);
  border-top: 1px solid var(--line-2);
}
.close__title { font-weight: 600; font-size: clamp(2rem, 4.6vw, 3.8rem); line-height: 1.16; letter-spacing: -0.028em; max-width: 17ch; text-wrap: balance; }
.get--close { margin-top: 32px; }
.close .muted { margin-top: 22px; font-size: 15px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 14px; }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.brand--foot { font-size: 15px; }
.foot__links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-2); }
.foot__links a { text-decoration: none; transition: color 160ms var(--ease-out); }
.foot__links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Motion ---------- */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes stageIn {
  from { opacity: 0; transform: translateY(22px) scale(0.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hero__title { animation: heroIn 720ms var(--ease-flow) both; }
.hero__lede { animation: heroIn 720ms var(--ease-flow) 90ms both; }
.hero .get { animation: heroIn 700ms var(--ease-flow) 170ms both; }
.hero__meta { animation: heroIn 640ms var(--ease-flow) 240ms both; }
.stage { animation: stageIn 860ms var(--ease-flow) 260ms both; }

@keyframes langSettle {
  from { opacity: 0.45; }
  to { opacity: 1; }
}
main.is-switching { animation: langSettle 280ms var(--ease-flow); }

html.has-motion [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(2px);
  transition: opacity 680ms var(--ease-flow), transform 780ms var(--ease-flow), filter 680ms var(--ease-flow);
  transition-delay: var(--d, 0ms);
}
html.has-motion [data-reveal="row"] {
  transform: translateY(10px);
  filter: none;
  transition: opacity 500ms var(--ease-flow), transform 560ms var(--ease-flow);
}
html.has-motion [data-reveal="clip"] {
  transform: translateX(-6px);
  filter: none;
  clip-path: inset(0 14% 0 0);
  transition: opacity 620ms var(--ease-flow), transform 720ms var(--ease-flow), clip-path 760ms var(--ease-flow);
  transition-delay: var(--d, 120ms);
}
html.has-motion [data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: none;
}
html.has-motion [data-reveal="clip"].is-in {
  clip-path: inset(0 0 0 0);
}

.apps tbody tr:nth-child(2) { --d: 45ms; }
.apps tbody tr:nth-child(3) { --d: 90ms; }
.apps tbody tr:nth-child(4) { --d: 135ms; }
.restore tbody tr:nth-child(2) { --d: 40ms; }
.restore tbody tr:nth-child(3) { --d: 80ms; }
.restore tbody tr:nth-child(4) { --d: 120ms; }
.restore tbody tr:nth-child(5) { --d: 160ms; }
.restore tbody tr:nth-child(6) { --d: 200ms; }
.why tbody tr:nth-child(2) { --d: 40ms; }
.why tbody tr:nth-child(3) { --d: 80ms; }
.why tbody tr:nth-child(4) { --d: 120ms; }
.why tbody tr:nth-child(5) { --d: 160ms; }
.why tbody tr:nth-child(6) { --d: 200ms; }
.why tbody tr:nth-child(7) { --d: 240ms; }
.facts li:nth-child(even) { --d: 75ms; }
.steps li:nth-child(2) { --d: 75ms; }
.steps li:nth-child(3) { --d: 150ms; }
.get--close { --d: 70ms; }
.close .muted { --d: 120ms; }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) { .nav__links { display: none; } }
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .feat dd { grid-template-columns: 1fr; row-gap: 12px; }
  .feat--lead { grid-template-columns: 1fr; row-gap: 16px; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding-bottom: 36px; --d: 0ms; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__inner { gap: 16px; }
  .get { flex-direction: column; }
  .cmd { width: 100%; }
  .cmd__text { flex: 1; min-width: 0; font-size: 13.5px; }
  .btn { justify-content: center; }
  .compare__row { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
  .facts { grid-template-columns: 1fr; }
  .facts li { --d: 0ms; }
  .feat { grid-template-columns: 1fr; row-gap: 10px; }
  .key { min-width: 40px; height: 40px; font-size: 16px; padding: 0 9px; }
  .key--wide { min-width: 80px; font-size: 12px; }
  .keys { height: 54px; gap: 6px; }
  .apps td:first-child { width: 46%; }
  .faq__item { grid-template-columns: 1fr; row-gap: 10px; }
  .why thead { display: none; }
  .bench__scroll table { min-width: 0; }
  .bench thead { display: none; }
  .bench table, .bench tbody, .bench tr, .bench tbody th, .bench td { display: block; width: auto; }
  .bench tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .bench tbody tr:first-child { border-top: 1px solid var(--line-2); }
  .bench tbody th, .bench td { padding: 0; border: 0; text-align: left; }
  .bench tbody th { margin-bottom: 6px; }
  .bench td.num { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; font-size: 16px; }
  .bench .num + .num { padding-left: 0; }
  .bench td[data-vi]::before { font-size: 14px; font-weight: 400; color: var(--ink-3); }
  html[data-lang="vi"] .bench td[data-vi]::before { content: attr(data-vi); }
  html[data-lang="en"] .bench td[data-en]::before { content: attr(data-en); }
  .why, .why tbody, .why tr, .why tbody th, .why td { display: block; width: auto; }
  .why tr { padding: 22px 0 24px; border-bottom: 1px solid var(--line); }
  .why tbody tr:first-child { border-top: 1px solid var(--line-2); }
  .why tbody th, .why td { padding: 0; border: 0; }
  .why td { margin-top: 8px; }
  .why td:last-child::before { content: "Rustkey"; display: block; margin-bottom: 2px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
  .foot__links { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  .hero__title, .hero__lede, .hero .get, .hero__meta, .stage { animation: none !important; filter: none; transform: none; }
  main.is-switching { animation-duration: 140ms; }
  .key, .btn, .field__word { transition: none; animation: none !important; }
  .cmd__copy { transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
  .cmd__copy:active { transform: none; }
  .cmd__ico { transform: none !important; }
}

@media (hover: none) { .stage__hint, .field__input { display: none; } }
