:root {
  --bg: #fbfdfc;
  --band: #eff6f5;
  --text: #10242a;
  --muted: #546a70;
  --accent: #0f766e;
  --accent-text: #ffffff;
  --card: #ffffff;
  --border: #d9e5e3;
  --code: #eaf2f1;
  --focus: #0b5ed7;
  --shadow: 0 24px 60px -20px rgba(16, 36, 42, 0.35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #081418;
    --band: #0d1e24;
    --text: #eef6f5;
    --muted: #9db4b8;
    --accent: #5eead4;
    --accent-text: #04201c;
    --card: #11272d;
    --border: #24404a;
    --code: #0a1519;
    --focus: #8ab4ff;
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 19px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 0.4em; letter-spacing: -0.025em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 7vw, 3.9rem); letter-spacing: -0.035em; max-width: 18em; margin-left: auto; margin-right: auto; }
h2 { font-size: clamp(2rem, 6vw, 3.2rem); }
h3 { font-size: clamp(1.35rem, 3vw, 1.6rem); }
p { margin: 0 0 1em; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace; font-size: 0.82em; }
code { background: var(--code); padding: 0.1em 0.35em; border-radius: 4px; }
.small { font-size: 0.85rem; color: var(--muted); }
.lead { font-size: clamp(1.15rem, 3vw, 1.5rem); color: var(--muted); max-width: 34rem; margin: 0 auto 1.5rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.top-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.lang { font-size: 0.9rem; color: var(--muted); }
.lang [aria-current] { color: var(--text); font-weight: 700; text-decoration: none; }

/* hero */
.hero { text-align: center; padding: clamp(2rem, 8vw, 5rem) 0 clamp(2.5rem, 8vw, 5rem); }
.hero img { width: 100%; max-width: 360px; margin: 3rem auto 0; border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.75rem 1.5rem; }
.btn {
  display: inline-block; padding: 0.7rem 1.6rem; border-radius: 999px;
  border: 2px solid var(--accent); font-weight: 600; text-decoration: none; color: var(--accent);
}
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn:hover { filter: brightness(1.1); }
.more { font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* the dictation demo (app.js): a notes window, the dictation display below it, the text lands in the document */
.demo { position: relative; container-type: inline-size; margin: 3rem auto 0; max-width: 560px; }
.screen {
  position: relative; container-type: inline-size; aspect-ratio: 16 / 10; overflow: hidden; text-align: left;
  border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
  background: linear-gradient(155deg, var(--band), color-mix(in srgb, var(--accent) 14%, var(--band)));
}
.win {
  position: absolute; left: 7%; right: 7%; top: 8%; bottom: 27%; display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.35);
}
.bar { display: flex; align-items: center; gap: 1.2cqw; height: max(22px, 6.2cqw); padding: 0 2.2cqw; border-bottom: 1px solid var(--border); font-size: max(10px, 2.3cqw); color: var(--muted); }
.bar i { width: max(6px, 1.6cqw); height: max(6px, 1.6cqw); border-radius: 50%; background: var(--border); }
.bar span { margin-left: 1cqw; }
.doc { position: relative; flex: 1; padding: 2.4cqw 3cqw; overflow: hidden; font-size: max(11px, 2.7cqw); line-height: 1.45; transition: opacity 0.4s ease-in-out; }
.doc.fade { opacity: 0; }
.doc p { margin: 0; }
.doc p + p { margin-top: 0.5em; }
.word { transition: opacity 0.2s ease-out; }
.word.hide { opacity: 0; }
.caret { position: absolute; left: 3cqw; top: 2.4cqw; width: 2px; height: 1.2em; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
.caret.typing { animation: none; }
.caret { display: none; }
.js .caret { display: block; }
.screen.play { cursor: pointer; }
.screen.play:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@keyframes blink { 50% { opacity: 0; } }
.screen video { display: none; position: absolute; left: 7%; bottom: 2%; width: 86%; height: auto; aspect-ratio: 1160 / 160; pointer-events: none; }
.js .screen video { display: block; }
.go {
  position: absolute; left: 50%; top: 36cqw; transform: translate(-50%, -50%); padding: 0.6rem 1.4rem 0.6rem 1.1rem; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-text); font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2; cursor: pointer; box-shadow: var(--shadow);
}
.go::before { content: "\25B6"; margin-right: 0.5em; font-size: 0.8em; }
.go:hover { filter: brightness(1.1); }
.keys { margin: 1rem 0 0; font-size: 0.95rem; color: var(--muted); }
kbd {
  display: inline-block; min-width: 2.2em; padding: 0.05em 0.5em; border: 1px solid var(--border); border-bottom-width: 3px; border-radius: 6px;
  background: var(--card); color: var(--text); font: 600 0.85em/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; text-align: center;
  transition: transform 0.1s, border-bottom-width 0.1s, background-color 0.1s;
}
kbd.down { transform: translateY(2px); border-bottom-width: 1px; background: var(--code); }

/* the little remark under the main heading, with the logo's wave next to it */
.hero .lead { margin-bottom: 1rem; }
.quip { display: flex; justify-content: center; align-items: center; gap: 0.6rem; margin: 0 0 1.75rem; min-height: 1.5rem; font-size: 0.95rem; font-style: italic; color: var(--muted); }
.quip { transition: opacity 0.45s ease-in-out; }
.quip.out { opacity: 0; }
.wave { display: inline-flex; align-items: center; gap: 2px; height: 16px; flex: none; }
.wave i { display: block; width: 2px; height: 12px; border-radius: 1px; background: var(--accent); opacity: 0.85; transform: scaleY(0.2); animation: sway 2.2s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: -0.45s; }
.wave i:nth-child(3) { animation-delay: -0.9s; }
.wave i:nth-child(4) { animation-delay: -1.35s; }
@keyframes sway { 0%, 100% { transform: scaleY(0.2); } 50% { transform: scaleY(1); } }

/* features */
.features { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-bottom: clamp(3rem, 8vw, 6rem); }
.feature { background: var(--band); border-radius: 24px; padding: clamp(1.75rem, 4vw, 2.5rem); }
.feature h3 { margin-bottom: 0.5em; }
.feature p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* steps */
.section-title { text-align: center; margin: 0 0 1.25rem; }
.steps { padding-bottom: clamp(3rem, 8vw, 6rem); }
.steps ol { list-style: none; counter-reset: step; max-width: 44rem; margin: 0 auto; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.25rem 3.2rem; font-size: 1.05rem; color: var(--muted); }
.steps li b { color: var(--text); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -0.05rem; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font-weight: 700; display: grid; place-items: center;
}

/* band */
.band { background: var(--band); text-align: center; padding: clamp(3rem, 9vw, 6rem) 0; }
.band p { max-width: 36rem; margin-left: auto; margin-right: auto; }
.band .lead { margin-bottom: 1rem; }

/* download */
.download { text-align: center; padding: clamp(3rem, 9vw, 6rem) 0; }
.made-with { margin-top: 2.5rem; }
.made-with img { display: inline-block; border-radius: 8px; vertical-align: middle; }
.panel { padding-top: 1.5rem; }
.panel + .panel { border-top: 1px solid var(--border); margin-top: 1.5rem; }
.js .panel + .panel { border-top: 0; margin-top: 0; }
.js .panel[hidden] { display: none; }
.js .panel > h3 { display: none; }
.tablist { display: inline-flex; gap: 0.25rem; padding: 4px; margin-top: 1.5rem; background: var(--band); border-radius: 999px; }
.tablist button {
  font: inherit; font-size: 0.95rem; font-weight: 600; color: var(--muted); background: none; cursor: pointer;
  border: 0; border-radius: 999px; padding: 0.45rem 1.3rem;
}
.tablist button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); }
.tablist button:hover { color: var(--text); }
.codebox { position: relative; max-width: 44rem; margin: 0 auto 1rem; text-align: left; }
.codebox pre {
  background: var(--code); border: 1px solid var(--border); border-radius: 14px;
  padding: 1rem 1.25rem; margin: 0; overflow-x: auto;
}
.codebox pre code { background: none; padding: 0; }
.copy {
  position: absolute; top: 8px; right: 8px; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer;
  background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 0.2rem 0.8rem;
}
.copy:hover { border-color: var(--accent); }

.more-info { max-width: 44rem; margin: 1.5rem auto 0; text-align: left; }
.more-info details:first-child { border-top: 1px solid var(--border); }
.more-info .codebox { margin-top: 0.8rem; }

/* faq */
.faq { max-width: 44rem; margin: 0 auto; padding: clamp(3rem, 9vw, 6rem) 20px; }
.faq h2 { text-align: center; margin-bottom: 1rem; }
details { border-bottom: 1px solid var(--border); padding: 1rem 0; }
summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; }
details p { margin: 0.6rem 0 0; color: var(--muted); font-size: 1.05rem; }

footer { border-top: 1px solid var(--border); padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: 0.85rem; text-align: center; }
footer p { margin: 0 0 0.5rem; }
footer .links a { margin: 0 0.6rem; white-space: nowrap; }

/* System requirements */
.specs { padding: clamp(3rem, 9vw, 6rem) 0 0; }
.spec-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 2.5rem; max-width: 52rem; margin: 0 auto; }
.spec-cols ul { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 1.05rem; }
.spec-cols li { margin-bottom: 0.4rem; }
.spec-note { text-align: center; margin: 1.5rem auto 0; }

@media (min-width: 860px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wave i { animation: none; transform: scaleY(0.6); }
  .quip { transition: none; }
  .caret { animation: none; }
  .doc, .word, kbd { transition: none; }
}
