/* Light, cool page with ink-navy text. Pixel type (VT323) draws only the wordmark: it has no safe Vietnamese tone marks, so text never uses it. */

@font-face { font-family: "VT323"; font-weight: 400; font-display: swap; src: url("/fonts/vt323-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Bricolage Grotesque"; font-weight: 200 800; font-display: swap; src: url("/fonts/bricolage-grotesque-vietnamese-wght-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 200 800; font-display: swap; src: url("/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Be Vietnam Pro"; font-weight: 400; font-display: swap; src: url("/fonts/be-vietnam-pro-vietnamese-400-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 400; font-display: swap; src: url("/fonts/be-vietnam-pro-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 500; font-display: swap; src: url("/fonts/be-vietnam-pro-vietnamese-500-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 500; font-display: swap; src: url("/fonts/be-vietnam-pro-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 600; font-display: swap; src: url("/fonts/be-vietnam-pro-vietnamese-600-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 600; font-display: swap; src: url("/fonts/be-vietnam-pro-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f5f6fa;
  --ink: #14142b;
  --ink-2: #4a4f6e;
  --line: #e1e4ef;
  --teal: #4fd6c0;
  --teal-ink: #0b7f6f;
  --teal-wash: rgb(79 214 192 / 0.22);
  --gold-ink: #6b4b00;
  --gold-wash: #ffe9b0;
  --red-ink: #b4232f;
  --red-wash: #ffdde1;

  --night: #14142b;
  --window: #0f1024;
  --on-night: #f4f0e4;
  --on-night-2: #9aa2c8;

  --display: "Bricolage Grotesque", "Be Vietnam Pro", system-ui, sans-serif;
  --body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pixel: "VT323", ui-monospace, monospace;

  --gutter: clamp(20px, 4vw, 48px);
  --measure: 62ch;
}

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

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

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.7; text-rendering: optimizeLegibility;
}

img { image-rendering: pixelated; }

a { color: var(--teal-ink); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 12px; top: -64px; z-index: 10; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }

code, kbd { font-family: var(--mono); font-size: 0.88em; }
code { background: #e9ecf5; color: var(--ink); padding: 0.1em 0.42em; border-radius: 6px; }
kbd {
  display: inline-block; min-width: 1.9em; padding: 0.12em 0.5em; text-align: center; line-height: 1.5;
  background: #fff; color: var(--ink); border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px;
}

h1, h2, h3 { font-family: var(--display); margin: 0; font-weight: 600; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.5rem, 6.6vw, 5rem); line-height: 1.1; font-weight: 700; letter-spacing: -0.04em; max-width: 16em; }
h1 span { display: block; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.05; }
h3 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.02em; }

p { margin: 0 0 1em; max-width: var(--measure); }
.fine { font-size: 0.9rem; color: var(--ink-2); line-height: 1.55; }
.hero .fine { max-width: 72ch; }

/* Top bar */

.bar { display: flex; align-items: center; justify-content: space-between; width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 9px; }
.wordmark { font-family: var(--pixel); font-size: 2.1rem; line-height: 1; letter-spacing: 0.01em; }
.bar nav { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 500; }
.bar nav a { color: var(--ink-2); text-decoration: none; padding: 8px 14px; border-radius: 999px; transition: background 0.15s, color 0.15s; }
.bar nav a:hover { color: var(--ink); background: #e9ecf5; }

/* Hero */

.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); }
.lead { font-size: clamp(1.15rem, 1.7vw, 1.35rem); line-height: 1.6; margin-top: 26px; max-width: 44ch; color: var(--ink-2); }
.lead code { font-size: 0.9em; }

.install {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 60rem; margin: 30px 0 14px; padding: 6px 6px 6px 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgb(20 20 43 / 0.04), 0 8px 24px -12px rgb(20 20 43 / 0.18);
}
.cmd { flex: 1 1 18rem; min-width: 0; overflow-x: auto; white-space: nowrap; background: none; padding: 10px 0; font-size: 0.84rem; color: var(--ink); border-radius: 0; scrollbar-width: none; }
.cmd::-webkit-scrollbar { display: none; }

.btn {
  font-family: var(--body); font-weight: 600; font-size: 0.95rem; line-height: 1; border: 0; cursor: pointer; border-radius: 10px;
  padding: 14px 20px; background: var(--teal); color: var(--ink); transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: #7be3d1; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Stage: the demo window */

.stage {
  background: var(--night); color: var(--on-night); border-radius: 20px; padding: 0 clamp(14px, 2.6vw, 26px) clamp(16px, 2.6vw, 26px); cursor: text;
  border: 1px solid rgb(255 255 255 / 0.08); box-shadow: 0 40px 80px -30px rgb(20 20 43 / 0.55), 0 10px 24px -8px rgb(20 20 43 / 0.25);
}
.stage:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; border-radius: 20px; }

.stage-bar { display: flex; align-items: center; gap: 16px; padding: 14px 0; }
.lights { display: flex; gap: 8px; }
.lights i, .dots i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2), .dots i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3), .dots i:nth-child(3) { background: #28c840; }
.stage-bar h2 { font-family: var(--body); font-size: 0.9rem; font-weight: 500; letter-spacing: 0; color: var(--on-night-2); }
.stage-help { margin: 2px 0 14px; color: var(--on-night-2); font-size: 0.95rem; line-height: 1.5; max-width: none; }
.for-touch { display: none; }
@media (pointer: coarse) { .for-keyboard { display: none; } .for-touch { display: inline; } }

.keys { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 14px; background: var(--window); border-radius: 12px; border: 1px solid rgb(255 255 255 / 0.06); overflow: hidden; }
.keys-label { font-size: 0.85rem; color: var(--on-night-2); flex: none; font-weight: 500; }
.keys-row { display: flex; gap: 6px; justify-content: flex-end; flex: 1; min-width: 0; overflow: hidden; }
.keys-row kbd {
  flex: none; min-width: 2rem; padding: 0.15em 0.55em; font-size: 0.85rem; color: var(--on-night); background: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.12); border-bottom-width: 2px; border-radius: 7px;
}
.keys-row kbd:last-child { background: #fff; color: var(--ink); border-color: #fff; }

.panes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.pane { background: var(--window); border-radius: 14px; padding: 16px 20px 20px; border: 1px solid rgb(255 255 255 / 0.06); min-width: 0; }
.pane h3 { display: flex; align-items: center; gap: 8px; font-family: var(--body); font-size: 0.85rem; font-weight: 500; letter-spacing: 0; color: var(--on-night-2); margin-bottom: 10px; }
.pane h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5a6090; }
.pane[data-tone="ankey"] h3 { color: var(--teal); }
.pane[data-tone="ankey"] h3::before { background: var(--teal); }
.out { margin: 0; min-height: 7.4rem; max-width: none; font-family: var(--body); font-weight: 500; font-size: clamp(1.4rem, 2.5vw, 1.85rem); line-height: 1.7; letter-spacing: -0.01em; white-space: pre-wrap; overflow-wrap: anywhere; }
.out .empty { color: #3c4272; }

/* Word states: a soft tint says what happened to the word */
.out .vi, .out .kept, .out .wrong, .out .composing { border-radius: 8px; padding: 0.04em 0.28em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.out .vi { background: rgb(79 214 192 / 0.2); }
.out .kept { background: rgb(255 209 102 / 0.2); color: #ffd166; }
.out .wrong { background: rgb(255 107 122 / 0.2); color: #ff8a96; }
.out .composing { box-shadow: inset 0 -2px 0 var(--teal); border-radius: 8px 8px 0 0; }

.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -0.2em; background: var(--on-night); visibility: hidden; }
.stage:focus .caret { visibility: visible; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .stage:focus .caret { animation: none; } }

.stage-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 24px; align-items: center; margin-top: 16px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--body); font-weight: 500; font-size: 0.88rem; line-height: 1; padding: 10px 15px; border: 1px solid rgb(255 255 255 / 0.14); border-radius: 999px;
  background: rgb(255 255 255 / 0.06); color: var(--on-night); cursor: pointer; transition: background 0.15s;
}
.chip:hover { background: rgb(255 255 255 / 0.14); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; max-width: none; font-size: 0.8rem; line-height: 1; }
.legend .w { padding: 6px 10px; border-radius: 999px; font-weight: 500; }
.legend .vi { background: rgb(79 214 192 / 0.2); color: #9cf0e2; }
.legend .kept { background: rgb(255 209 102 / 0.2); color: #ffd166; }
.legend .wrong { background: rgb(255 107 122 / 0.2); color: #ff8a96; }
.stage-note { margin-top: 16px; max-width: 80ch; }

@media (max-width: 760px) {
  .panes { grid-template-columns: 1fr; }
  .out { min-height: 5.2rem; }
}

/* Sections */

.block { padding-top: clamp(72px, 10vw, 128px); }
.block > h2 + p, .intro { margin-top: 18px; }
.intro { max-width: 60ch; color: var(--ink-2); }
.block p + p { margin-top: -0.2em; }

.ledger { width: 100%; border-collapse: collapse; margin: 36px 0 64px; line-height: 1.45; }
.ledger th { text-align: left; font-size: 0.8rem; font-weight: 500; color: var(--ink-2); padding: 0 16px 12px 0; border-bottom: 1px solid var(--ink); }
.ledger td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.ledger td:nth-child(1) { font-family: var(--mono); font-size: 0.9rem; color: var(--ink-2); white-space: nowrap; }
.ledger td:nth-child(2), .ledger td:nth-child(3) { font-size: 1.15rem; font-weight: 500; white-space: nowrap; }
.ledger td:last-child { padding-right: 0; max-width: 34ch; font-size: 0.95rem; color: var(--ink-2); }
.ledger td .vi, .ledger td .kept, .ledger td .wrong { padding: 0.08em 0.4em; border-radius: 7px; }
.ledger td .wrong { background: var(--red-wash); color: var(--red-ink); }
.ledger td .kept { background: var(--gold-wash); color: var(--gold-ink); }
.ledger td .vi { background: var(--teal-wash); color: #07584d; }

@media (max-width: 760px) {
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; }
  .ledger thead { display: none; }
  .ledger tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .ledger td { border: 0; padding: 0; white-space: normal !important; }
  .ledger td:nth-child(1) { grid-column: 1 / -1; }
  .ledger td:last-child { grid-column: 1 / -1; max-width: none; padding-top: 6px; }
}

.layers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(28px, 5vw, 72px); counter-reset: layer; }
.layers li { counter-increment: layer; position: relative; padding: 28px 0 32px 64px; border-top: 1px solid var(--line); }
.layers li::before { content: counter(layer); position: absolute; left: 0; top: 16px; font-family: var(--display); font-weight: 300; font-size: 3.4rem; line-height: 1; letter-spacing: -0.04em; color: var(--teal-ink); }
.layers h3 { margin-bottom: 8px; }
.layers p { margin: 0; font-size: 1rem; color: var(--ink-2); }
.layers p code { font-size: 0.85em; }
@media (max-width: 760px) { .layers { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.split h2 { margin-bottom: 20px; }
.split p:not(.fine) { color: var(--ink-2); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.mock {
  margin: 8px 0 0; padding: 30px clamp(20px, 3vw, 32px) 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 1px 2px rgb(20 20 43 / 0.04), 0 24px 48px -24px rgb(20 20 43 / 0.25);
}
.mock-line { margin: 0; max-width: none; font-family: var(--body); font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.4; overflow-wrap: anywhere; }
.typed { color: var(--ink); }
.ghost { color: var(--teal-ink); text-decoration: underline 2px var(--teal); text-underline-offset: 5px; }
.mock-cap { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }

/* Install section */

.setup { margin-top: clamp(80px, 11vw, 144px); padding: clamp(56px, 8vw, 104px) 0; background: var(--night); color: var(--on-night); }
.setup h2 { color: var(--on-night); }
.setup .fine { color: var(--on-night-2); }
.setup a { color: var(--teal); }
.setup code { background: rgb(255 255 255 / 0.1); color: var(--on-night); }

.tour { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 80px); margin: 44px 0 32px; align-items: start; }
.tour-steps { list-style: none; margin: 0; padding: 0; }
.tour-step {
  position: relative; display: block; width: 100%; text-align: left; padding: 14px 0 18px 30px; border: 0; background: transparent; color: var(--on-night-2);
  font: inherit; cursor: pointer; transition: color 0.2s;
}
.tour-step:hover { color: var(--on-night); }
.tour-step[aria-current="step"] { color: var(--on-night); }
.tour-title { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1.2; }
.tour-num {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid currentColor; font-family: var(--body); font-size: 0.8rem; font-weight: 600; flex: none;
}
.tour-step[aria-current="step"] .tour-num { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.tour-text { display: block; margin: 8px 0 0 40px; font-size: 0.95rem; line-height: 1.6; max-width: 44ch; }
.tour-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: rgb(255 255 255 / 0.12); border-radius: 2px; }
.tour-bar::after { content: ""; position: absolute; inset: 0; background: var(--teal); border-radius: 2px; transform-origin: top; transform: scaleY(var(--fill, 0)); }
.tour-step:not([aria-current]) .tour-bar::after { transform: scaleY(0); }
.tour-step:not([aria-current]) .tour-bar { background: rgb(255 255 255 / 0.08); }

.tour-steps .install { margin: 2px 0 14px 30px; padding: 5px 5px 5px 14px; background: rgb(255 255 255 / 0.06); border-color: rgb(255 255 255 / 0.12); box-shadow: none; }
.tour-steps .cmd { flex-basis: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 0.8rem; color: var(--on-night); background: none; padding: 8px 0 4px; }
.tour-steps .btn { font-size: 0.85rem; padding: 10px 14px; margin-left: auto; }

.tour-view { position: sticky; top: 24px; }
.tour-pause {
  margin-top: 14px; font-family: var(--body); font-weight: 500; font-size: 0.85rem; line-height: 1; padding: 9px 14px; border-radius: 999px; cursor: pointer;
  background: rgb(255 255 255 / 0.06); color: var(--on-night); border: 1px solid rgb(255 255 255 / 0.14);
}
.tour-pause:hover { background: rgb(255 255 255 / 0.14); }

@media (max-width: 900px) {
  .tour { grid-template-columns: 1fr; }
  .tour-view { position: static; order: -1; }
}

/* The screen the scenes play on: a macOS desktop in dark appearance. Sizes are in em and the font follows the screen's width. */

.screen {
  position: relative; container-type: inline-size; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 20px;
  background: radial-gradient(120% 90% at 85% 10%, #3b4fa3 0%, transparent 55%), radial-gradient(90% 80% at 10% 90%, #1f6f7a 0%, transparent 60%), #1b1f4a;
  font-family: -apple-system, "SF Pro Text", system-ui, "Be Vietnam Pro", sans-serif; font-size: clamp(9px, 2.05cqw, 15px); line-height: 1.3; color: #f2f3f8;
  border: 1px solid rgb(255 255 255 / 0.1); box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.6);
}
@container (max-width: 480px) { .screen { font-size: 3.3cqw; } }
@media (max-width: 900px) { .screen { aspect-ratio: 4 / 3; } }

.scene { position: absolute; inset: 0; visibility: hidden; }
.scene.active { visibility: visible; }

.toggle { opacity: 0; visibility: hidden; transition: opacity 0.2s, transform 0.2s; }
.toggle.on { opacity: 1; visibility: visible; }

.win {
  position: absolute; display: flex; flex-direction: column; border-radius: 0.9em; background: rgb(32 34 52 / 0.94); overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.12); box-shadow: 0 1.8em 3.6em rgb(0 0 0 / 0.45);
}
.win-bar { display: flex; align-items: center; gap: 0.8em; padding: 0.75em 1em; }
.win-bar b { font-weight: 600; margin-inline: auto; padding-right: 3.6em; color: #e4e6f2; }
.dots { display: flex; gap: 0.5em; }
.dots i { width: 0.85em; height: 0.85em; }

.term { inset: 9% 5% 8%; background: rgb(16 17 26 / 0.96); }
.term-body { padding: 0.4em 1.3em 1em; font-family: var(--mono); font-size: 0.95em; line-height: 1.45; }
.term-body p { margin: 0 0 0.45em; max-width: none; overflow-wrap: anywhere; }
.term-body .ps { color: var(--teal); }
.term-body .next { color: #9aa2c8; font-size: 0.88em; }

.screen .caret { visibility: visible; width: 0.5em; height: 1em; margin-left: 2px; vertical-align: -0.15em; background: #f2f3f8; animation: blink 1.1s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) { .screen .caret { animation: none; } }

.menubar {
  position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 1.3em; padding: 0.45em 1.2em; font-weight: 500;
  background: rgb(10 10 25 / 0.45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.menubar .apple { flex: none; }
.menubar b { font-weight: 700; }
.menubar em { font-style: normal; margin-left: auto; font-variant-numeric: tabular-nums; }
.menubar .spacer { flex: 1; }
.menubar .spacer + .mb-input + em { margin-left: 0; }

.dropdown {
  position: absolute; left: 1.2%; top: 10.5%; list-style: none; margin: 0; padding: 0.4em; min-width: 14em; border-radius: 0.8em;
  background: rgb(44 46 66 / 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgb(255 255 255 / 0.14); box-shadow: 0 1.2em 2.4em rgb(0 0 0 / 0.45);
}
.dropdown.right { left: auto; right: 2.5%; min-width: 12em; }
.dropdown li { padding: 0.28em 0.8em; border-radius: 0.45em; transition: background 0.12s; }
.dropdown .sep { height: 1px; padding: 0; margin: 0.35em 0.4em; background: rgb(255 255 255 / 0.14); }
.dropdown .checked::before { content: ""; display: inline-block; width: 0.45em; height: 0.45em; margin-right: 0.55em; border-radius: 50%; background: var(--teal); }
.row { transition: background 0.12s, color 0.12s; }
li.row.on { background: var(--teal); color: var(--ink); }

.login { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.7em; background: rgb(14 15 34 / 0.72); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.login p { margin: 0; font-size: 1.25em; font-weight: 600; max-width: none; }
.avatar { width: 5.2em; height: 5.2em; border-radius: 50%; background: linear-gradient(160deg, #7be3d1, #2aa592); box-shadow: 0 0.6em 1.4em rgb(0 0 0 / 0.35); }
.field { min-width: 13em; min-height: 2em; padding: 0.4em 1em; background: rgb(255 255 255 / 0.14); border-radius: 999px; border: 1px solid rgb(255 255 255 / 0.2); letter-spacing: 0.2em; }

.settings { inset: 8% 6% 6%; }
.set-body { display: grid; grid-template-columns: 10em 1fr; flex: 1; min-height: 0; }
.side { list-style: none; margin: 0; padding: 0.4em 0.7em; }
.side li { padding: 0.3em 0.8em; border-radius: 0.5em; color: #b4b9d6; }
.side .cur { background: var(--teal-wash); color: #fff; }
.set-main { padding: 0.5em 1.2em 1em 0.6em; }
.set-main h4 { margin: 0 0 0.7em; font: inherit; font-size: 1.5em; font-weight: 700; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: 0.7em 1em; background: rgb(255 255 255 / 0.07); }
.set-row:first-of-type { border-radius: 0.7em 0.7em 0 0; border-bottom: 1px solid rgb(255 255 255 / 0.08); }
.set-row:last-of-type { border-radius: 0 0 0.7em 0.7em; }
.slider { width: 40%; height: 0.3em; background: rgb(255 255 255 / 0.2); border-radius: 999px; }
.mbtn { font: inherit; font-weight: 500; color: #f2f3f8; padding: 0.25em 0.9em; border: 0; border-radius: 0.5em; background: rgb(255 255 255 / 0.14); }
.mbtn.row.on { background: var(--teal); color: var(--ink); }

.sheet, .picker {
  position: absolute; left: 50%; top: 56%; width: 58%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 0.7em; padding: 1em;
  background: rgb(46 48 70 / 0.97); border-radius: 0.9em; border: 1px solid rgb(255 255 255 / 0.14); box-shadow: 0 1.4em 3em rgb(0 0 0 / 0.55);
}
.sheet.toggle:not(.on), .picker.toggle:not(.on) { transform: translate(-50%, -47%) scale(0.97); }
.sheet-list { min-height: 6em; padding: 0.4em; background: rgb(0 0 0 / 0.25); border-radius: 0.6em; }
.sheet-list p { margin: 0; padding: 0.25em 0.7em; border-radius: 0.4em; max-width: none; }
.sheet-list p.on { background: rgb(255 255 255 / 0.1); }
.sheet-foot { display: flex; justify-content: space-between; }
.picker { width: 66%; top: 57%; }
.picker-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6em; }
.picker ul { list-style: none; margin: 0; padding: 0.4em; min-height: 7.4em; background: rgb(0 0 0 / 0.25); border-radius: 0.6em; }
.picker li { padding: 0.25em 0.7em; border-radius: 0.4em; transition: background 0.12s; }

.note { inset: 20% 12% 10% 12%; }
.note-body { margin: 0; padding: 0.4em 1.4em; max-width: none; font-family: var(--body); font-size: 1.7em; line-height: 1.3; }
.note-body .composing { box-shadow: inset 0 -2px 0 var(--teal); }
.mb-input { display: inline-grid; align-items: center; justify-items: center; padding: 0.1em 0.7em; border-radius: 0.45em; }
.mb-input > * { grid-area: 1 / 1; transition: opacity 0.15s; }
.mb-input img { opacity: 0; border-radius: 3px; }
.mb-input.on .lab { opacity: 0; }
.mb-input.on img { opacity: 1; }

/* The pointer is a zero-size anchor that moves with `translate`. The arrow and the click ripple hang off its tip, so a click never shifts it. */
.pointer { position: absolute; left: 0; top: 0; z-index: 5; width: 0; height: 0; pointer-events: none; transition: translate 0.6s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.2s; }
.pointer.jump { transition: none; }
.pointer.hidden { opacity: 0; }
.pointer svg { position: absolute; left: -1px; top: -1px; transform-origin: 1px 1px; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.4)); }
.pointer .ripple { position: absolute; left: -1.4em; top: -1.4em; width: 2.8em; height: 2.8em; border-radius: 50%; border: 2px solid rgb(255 255 255 / 0.9); background: rgb(255 255 255 / 0.18); opacity: 0; }
.pointer.press svg { animation: press 0.25s ease-out; }
.pointer.press .ripple { animation: ripple 0.5s ease-out; }
@keyframes press { 40% { transform: scale(0.84); } }
@keyframes ripple { from { opacity: 1; transform: scale(0.25); } to { opacity: 0; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .pointer { display: none; } }

.foot { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 40px 0 56px; font-size: 0.95rem; }
.foot p { margin: 0; }
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--ink); }

@media (max-width: 540px) {
  .layers li { padding-left: 48px; }
  .layers li::before { font-size: 2.8rem; }
  .bar nav a { padding: 8px 10px; }
}
