:root {
  --bg: #ffffff; --bg-2: #f6f7f9; --bg-3: #eef0f3; --ink: #0d0f16; --ink-2: #424757; --ink-3: #868b9a;
  --line: #ebecef; --line-2: #dcdee4; --accent: #3352e6; --red: #cf222e;
  --del-bg: #ffebe9; --del-bar: #ff8182; --cap: #ffffff; --cap-edge: #d5d8df;
  --shadow: 15, 17, 23;
  --g: clamp(16px, 4vw, 48px);
  --nav: 60px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #15161e; --bg-2: #1b1c27; --bg-3: #232535; --ink: #e8ebf7; --ink-2: #b2b8d4; --ink-3: #767d9f;
  --line: #24263a; --line-2: #31344a; --accent: #82aaff; --red: #ff757f;
  --del-bg: rgba(255, 117, 127, .11); --del-bar: #ff757f; --cap: #23253a; --cap-edge: #34374f;
  --shadow: 0, 0, 0;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: calc(var(--nav) + 20px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; transition: background .35s, color .35s; }
a { color: inherit; }
code, kbd, pre { font-family: var(--mono); }
.wrap { width: min(1320px, 100% - 2 * var(--g)); margin-inline: auto; }
p code, dd code, li code { font-size: .86em; background: var(--bg-3); border-radius: 6px; padding: 2px 6px; }
p kbd, dd kbd, li kbd {
  font-size: .8em; font-weight: 600; color: var(--ink); background: var(--cap); border-radius: 6px; padding: 2px 7px 3px;
  box-shadow: 0 0 0 1px var(--cap-edge), 0 2px 0 var(--cap-edge);
}
.head { font: 720 clamp(30px, 3.2vw, 42px)/1.08 var(--display); letter-spacing: -.03em; margin: 0; text-wrap: balance; }

.nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px); }
.nav-in { height: var(--nav); display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 720 19px/1 var(--display); letter-spacing: -.03em; text-decoration: none; }
.brand img { border-radius: 6px; }
.nav nav { display: flex; align-items: center; gap: 2px; }
.nav nav a:not(.nav-install) { text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 550; padding: 7px 11px; border-radius: 9px; }
.nav nav a:not(.nav-install):hover { color: var(--ink); background: var(--bg-3); }
.mode { width: 34px; height: 34px; margin: 0 8px 0 6px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.mode i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); transition: transform .4s; }
[data-theme="dark"] .mode i { transform: rotate(180deg); }
.nav-install { text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--bg); background: var(--ink); border-radius: 999px; padding: 8px 15px; }

.hero { padding-top: clamp(14px, 3vh, 36px); }
.hero-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(18px, 3vh, 32px); }
.hero h1 { font: 740 clamp(28px, 3.1vw, 44px)/1.08 var(--display); letter-spacing: -.032em; margin: 0; text-wrap: balance; }
.hero-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; justify-items: start; min-width: 0; }
.hero-side > * { max-width: 100%; }
.cmd { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 9px 9px 9px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); color: var(--ink); font: 14.5px var(--mono); cursor: pointer; }
.cmd span { color: var(--accent); }
.cmd code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cmd em { font: 600 13.5px/1 var(--body); font-style: normal; padding: 7px 11px; border-radius: 8px; background: var(--ink); color: var(--bg); flex: none; }
.cmd.copied em { background: var(--accent); color: #fff; }

.stage { position: relative; }
.langs { background: var(--bg-3); }
.langs button { color: var(--ink-2); }
.langs button[aria-pressed="true"] { color: var(--ink); background: var(--bg); box-shadow: 0 1px 3px rgba(var(--shadow), .12); }

footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 140px; padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 15px; }
footer a { text-decoration: none; }
footer .brand { color: var(--ink); font-size: 17px; margin-right: auto; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in, html:not(.js) .reveal { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero-head { grid-template-columns: minmax(0, 1fr); }
  .nav nav a:not(.nav-install):not([href^="https"]) { display: none; }
}
@media (max-width: 640px) {
  .langs { order: -1; }
  .cmd { font-size: 12.5px; }
}

.h-ed { display: inline-block; position: relative; text-decoration: none; color: var(--ink-3); font-weight: 560; }
.h-ed::after { content: ""; position: absolute; left: -.04em; right: -.04em; top: 55%; height: .075em; border-radius: 1em; background: var(--red); transform-origin: left; transform: scaleX(var(--s, 1)); }
html.js .h-pre .h-ed { color: var(--ink); font-weight: inherit; }
html.js .h-pre .h-ed::after { --s: 0; }
html.js .h-run .h-ed { transition: color .5s .5s, font-weight .5s .5s; }
html.js .h-run .h-ed::after { transition: transform .45s cubic-bezier(.6, 0, .2, 1); }
.h-nav { white-space: nowrap; }
.h-nav .ch { display: inline-block; position: relative; white-space: pre; }
.h-nav .ch.hide { color: transparent; }
.h-nav .ch.cur::after { content: ""; position: absolute; top: 6%; bottom: 6%; left: 100%; width: calc(var(--cw, .58em) * .8); background: var(--accent); }
.h-nav .ch.cur.first::after { left: 0; }
.h-nav.done .ch.cur::after { animation: h-blink 1.05s steps(1) infinite; }
.h-nav.rest .ch.cur::after { animation: none; opacity: 0; transition: opacity .5s; }
@keyframes h-blink { 55% { opacity: 0; } }

/* review stage */
.rv-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.pr { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pr-state { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 var(--body); color: #fff; background: #1f883d; border-radius: 999px; padding: 7px 12px 7px 10px; }
:root[data-theme="dark"] .pr-state { background: #238636; }
.pr-state svg { width: 15px; height: 15px; }
.pr-text { display: grid; gap: 2px; min-width: 0; }
.pr-text b { font: 680 18px/1.3 var(--display); letter-spacing: -.01em; }
.pr-text span { font-size: 14.5px; color: var(--ink-3); }
.pr-text span b { font: inherit; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.pr-text code { font-size: 13px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 6px; padding: 1px 6px; }
.rv .keycap { bottom: auto; top: 14px; }
.stage.showing .screen { cursor: progress; }

.tk-coach:empty { display: none; }
.tk-coach.swap { animation: tk-in .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes tk-in { from { opacity: .4; transform: translateY(5px); } }
.tk-coach.is-said { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }
.tk-ask { margin: 0; font-size: 19px; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.tk-said { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--accent); }
.tk-said::before { content: "✓  "; }
.tk-said kbd, .tk-ask kbd { font-size: .85em; }
.tk-coach code { font-size: .86em; background: var(--bg-3); border-radius: 6px; padding: 2px 6px; }
.tk-coach kbd, .touch button { font: 600 .8em var(--mono); color: var(--ink); background: var(--cap); border-radius: 6px; padding: 2px 7px 3px; box-shadow: 0 0 0 1px var(--cap-edge), 0 2px 0 var(--cap-edge); white-space: nowrap; }
.tk-keys { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tk-keys kbd { font-size: 16px; padding: 7px 12px 8px; border-radius: 8px; box-shadow: 0 0 0 1px var(--cap-edge), 0 3px 0 var(--cap-edge); }
.tk-foot { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.tk-dots { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tk-dots li { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); transition: background .3s, transform .3s; }
.tk-dots li.done { background: var(--accent); }
.tk-dots li.cur { background: var(--bg); box-shadow: 0 0 0 2px var(--accent); transform: scale(1.1); }
.tk-btn { border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: 600 14px/1 var(--body); padding: 9px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tk-btn:hover { border-color: var(--ink-3); }
.tk-n { display: grid; justify-items: center; align-content: center; min-width: 64px; }
.tk-n b { font: 760 44px/1 var(--display); letter-spacing: -.04em; color: var(--accent); }
.tk-n span { font-size: 13px; color: var(--ink-3); margin-top: 2px; }

.tk-coach { position: absolute; right: 18px; bottom: 34px; width: min(400px, 46%); z-index: 3; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; padding: 16px 18px; border-radius: 16px; background: var(--bg); color: var(--ink); cursor: default;
  box-shadow: 0 0 0 1px var(--line-2), 0 18px 50px -12px rgba(0, 0, 0, .55); font: 15px/1.5 var(--body); }
.tk-coach .tk-n { min-width: 0; }
.tk-coach .tk-n b { font-size: 32px; }
.tk-coach .tk-ask { font-size: 16.5px; }
.tk-coach .tk-keys kbd { font-size: 14px; padding: 5px 9px 6px; }
.tk-coach .tk-foot { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; margin-top: 8px; }
.tk-coach::after { content: ""; position: absolute; right: 34px; bottom: -7px; width: 14px; height: 14px; background: var(--bg); transform: rotate(45deg); box-shadow: 1px 1px 0 var(--line-2); }

.rv .touch { display: none; flex-wrap: wrap; gap: 8px; padding: 12px 0 0; background: none; }
.rv .touch button { font-size: 17px; padding: 10px 14px 12px; border: 0; cursor: pointer; }
@media (hover: none) { .rv .touch { display: flex; } }
@media (max-width: 700px) {
  .tk-coach { position: static; width: auto; margin: 10px 0 0; }
  .tk-coach::after { display: none; }
  .pr-text b { font-size: 16px; }
}

.hero-title { display: grid; gap: 14px; min-width: 0; }
.h-big { margin: 0; font: 700 clamp(22px, 2.15vw, 31px)/1.15 var(--display); letter-spacing: -.025em; color: var(--accent); text-wrap: balance; }
.take-hint { display: none; }
.stage.demo .take-hint { display: block; position: absolute; left: 50%; bottom: 42px; transform: translateX(-50%); z-index: 2; pointer-events: none; white-space: nowrap; font: 600 15px/1 var(--body); color: #e8ebf7; background: rgba(16, 17, 26, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: 12px 20px; animation: hint 2.4s ease-in-out infinite; }
@keyframes hint { 50% { opacity: .72; } }
.stage.demo .screen { cursor: pointer; }
.hint-tap { display: none; }
@media (hover: none) { .hint-key { display: none; } .hint-tap { display: inline; } }
@media (max-width: 700px) { .stage.demo .take-hint { font-size: 13px; white-space: normal; text-align: center; width: 80%; } }
.stage.demo .tk-coach [data-show] { display: none; }
