:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --fg: #1c1c1e;
  --muted: #5f6368;
  --line: #e3e6ea;
  --accent: #408cd9;
  --accent-strong: #2b6cb0;
  --accent-soft: #eaf2fb;
  --button: #2b6cb0;
  --card: #ffffff;
  --new: #2b6cb0;
  --new-soft: #e3effb;
  --saved: #1f7a3d;
  --saved-soft: #e3f4e8;
  --select: rgba(64, 140, 217, .26);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --bg-soft: #1a1c1f;
    --fg: #f2f2f7;
    --muted: #a1a1a6;
    --line: #2c2e33;
    --accent: #5aa2ea;
    --accent-strong: #7bb6f0;
    --accent-soft: #17283b;
    --card: #1a1c1f;
    --new: #8cc0f3;
    --new-soft: #17283b;
    --saved: #7fd49a;
    --saved-soft: #15301f;
    --select: rgba(90, 162, 234, .34);
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
html:has(.toc) { scroll-padding-top: 128px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 106.25%/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
main p a, main li a, main dd a, main td a { text-decoration: underline; text-underline-offset: .15em; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 20; padding: 8px 14px; border-radius: 8px; background: var(--bg); }
.skip:focus { top: 12px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 700; font-size: 19px; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.site-nav { display: flex; gap: 20px; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--muted); white-space: nowrap; padding: 10px 0; }
.site-nav a:hover { color: var(--fg); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--fg); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .4em; }

@media (max-width: 760px) {
  .site-nav .hide-sm { display: none; }
  .site-nav { gap: 14px; }
}

@media (max-width: 359px) {
  .brand img { display: none; }
  .site-nav { gap: 12px; }
}

.hero { padding-top: 64px; padding-bottom: 48px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; text-align: center; }
.hero img.app-icon { width: 112px; height: 112px; border-radius: 25px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1.05; letter-spacing: -0.03em; margin: 8px 0 16px; }
.hero .eyebrow { margin: 24px 0 0; font-size: 16px; font-weight: 600; color: var(--accent-strong); }
.hero .lead { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.hero-shot img, .detail figure img { width: 260px; border-radius: 22px; box-shadow: var(--shadow); }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.4fr 1fr; text-align: left; }
  .hero .lead { margin-left: 0; }
  .hero-shot { text-align: center; }
  .hero-shot img { width: 300px; }
}

.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 52px; width: auto; }
.button.store { font-size: 18px; padding: 14px 28px; margin: 0; }

.quick-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 40px 0 0; font-size: 14px; color: var(--muted); }
.quick-facts li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 14px; }

section { padding: 64px 0; }
section.alt { background: var(--bg-soft); }
section h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; }
section .intro { color: var(--muted); font-size: 19px; max-width: 680px; margin: 0 0 32px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
@media (min-width: 720px) {
  .features.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.feature, .plan, .contact-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.feature { padding: 26px; display: flex; flex-direction: column; }
.feature h3 { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.01em; }
.feature .kicker { color: var(--accent-strong); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.feature ul { margin: 12px 0 0; padding-left: 20px; }
.feature li { margin: 6px 0; }
.feature p { margin: 0; }
.feature .more { margin-top: auto; padding-top: 16px; font-weight: 600; }
.feature .more a { text-decoration: none; }
.feature .more a:hover { text-decoration: underline; }
.feature-shot { margin: 20px 0 0; text-align: center; }
.feature-shot img { width: 200px; border-radius: 18px; box-shadow: var(--shadow); }
@media (min-width: 1000px) {
  .feature.with-shot { display: grid; grid-template-columns: 1fr 160px; grid-template-rows: auto auto 1fr auto; column-gap: 24px; }
  .feature.with-shot > * { grid-column: 1; }
  .feature.with-shot .feature-shot { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
  .feature.with-shot .feature-shot img { width: 160px; border-radius: 14px; }
}

.loop { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.loop li, .toc a { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; border-radius: 999px; }
.loop li { padding: 6px 16px; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px; }
.plan { padding: 28px; }
.plan.plus { border: 2px solid var(--accent); }
.plan h3 { margin: 0; font-size: 22px; }
.plan .price-note { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.plan ul { margin: 0; padding-left: 20px; }
.plan li { margin: 6px 0; }
.fineprint { color: var(--muted); font-size: 15px; margin-top: 20px; }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; content: "+" / ""; color: var(--accent-strong); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; content: "–" / ""; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

.cta { text-align: center; }
.cta h2 { margin-bottom: 8px; }
.cta p { color: var(--muted); margin: 0 0 24px; }
.cta .fineprint { margin: 20px 0 0; }

.page { padding-top: 56px; padding-bottom: 72px; }
.page h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 12px; }
.page h2 { font-size: 24px; margin: 44px 0 10px; padding-top: 20px; border-top: 1px solid var(--line); letter-spacing: -0.01em; }
.page h3 { font-size: 19px; margin: 28px 0 6px; }
.page .meta, .page .lead { color: var(--muted); }
.page .lead { font-size: 19px; }
.page ol, .page ul { padding-left: 22px; }
.page li { margin: 6px 0; }
.page code { font-size: .9em; }
.page-shot { margin: 28px 0; text-align: center; }
.page-shot img { width: 240px; border-radius: 20px; box-shadow: var(--shadow); }
.page-shot figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }

.callout {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 24px 0;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }

.contact-card { padding: 28px; margin: 28px 0 8px; }
.contact-card p { margin: 0 0 18px; }
.button {
  display: inline-block;
  background: var(--button);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: 12px 24px;
  margin: 0 8px 8px 0;
  text-decoration: none;
}
.button.secondary { background: transparent; color: var(--accent-strong); border: 1px solid var(--accent); }
.button:hover { text-decoration: none; background: #28649f; }
.button.secondary:hover { background: var(--accent-soft); }

.toc {
  position: sticky;
  top: 60px;
  z-index: 5;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.toc a { padding: 6px 14px; font-size: 15px; }
.toc a:hover { text-decoration: none; }
@media (min-width: 900px) { .toc { justify-content: center; } }

.detail { padding: 56px 0; border-bottom: 1px solid var(--line); }
.detail h2 { font-size: clamp(28px, 4vw, 36px); margin-bottom: 8px; }
.detail .intro { margin-bottom: 28px; }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.detail h3 { font-size: 19px; margin: 24px 0 4px; }
.detail h3:first-child { margin-top: 0; }
.detail p { margin: 0 0 8px; }
.detail figure { margin: 0; text-align: center; }
.detail figure + figure { margin-top: 28px; }
.detail figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }
.detail-body { max-width: 760px; }
.page-intro { padding-bottom: 24px; }
@media (min-width: 900px) {
  .detail-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .detail-grid .figures { position: sticky; top: 130px; }
  .detail figure img.adaptive { width: 400px; border-radius: 18px; }
}

.token-legend { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.token-legend li { display: flex; align-items: center; gap: 12px; }
.chip { display: inline-block; min-width: 92px; text-align: center; border-radius: 999px; padding: 3px 14px; font-weight: 600; }
.chip-new { background: var(--new-soft); color: var(--new); }
.chip-saved { background: var(--saved-soft); color: var(--saved); }
.chip-known { font-weight: 400; }


.data-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 16px; }
.data-table th, .data-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { font-weight: 600; }

.data-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 12px 0; }
.data-list dt { font-weight: 600; }
.data-list dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) {
  .data-list { grid-template-columns: 1fr; gap: 2px; }
  .data-list dd { margin-bottom: 10px; }
}

.downloads { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 16px; }
.downloads li { margin: 0; }
.downloads img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.downloads a { display: block; font-size: 15px; }
.downloads img { margin-bottom: 8px; }

.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 22px; margin-bottom: 14px; }
.site-footer nav a { color: var(--muted); padding: 6px 0; }
.site-footer nav a:hover { color: var(--fg); }
.site-footer p { margin: 4px 0; }
.site-footer p a { color: var(--muted); text-decoration: underline; }

.demo, .detail .demo { margin: 0; text-align: left; }
.demo figcaption { color: var(--muted); font-size: 15px; margin-top: 12px; }
.demo-steps { margin: 0; padding-left: 20px; }
.demo-steps li { margin: 2px 0; }

.features-head { display: grid; gap: 32px 48px; margin-bottom: 32px; }
.demo-card { max-width: 400px; width: 100%; justify-self: center; }
.demo-card figcaption { margin: 0 0 16px; }
@media (min-width: 900px) {
  .features-head { grid-template-columns: 1fr 1.2fr; align-items: center; }
}
.demo-svg { display: block; width: 100%; height: auto; font-family: inherit; }
.d-surface { fill: var(--card); stroke: var(--line); }
.d-lines rect, .d-rule { fill: var(--line); }
.d-text { fill: var(--fg); font-size: 14px; }
.d-label { fill: var(--muted); font-size: 10.5px; }
.fd-select rect { fill: var(--select); }
.fd-menu { opacity: 0; }
.fd-pill { fill: var(--card); stroke: var(--line); }
.fd-press { fill: var(--accent-soft); }
.fd-sep { stroke: var(--line); }
.fd-menu text { fill: var(--fg); font-size: 12px; }
.fd-title { fill: var(--fg); font-size: 12px; font-weight: 600; opacity: 0; }
.fd-gen text { fill: var(--accent-strong); font-size: 11px; font-weight: 600; }
.fd-gen path { fill: var(--accent-strong); }
.fd-gen-press { fill: var(--accent-soft); opacity: 0; }
.fd-btn rect { fill: var(--accent-soft); }
.fd-btn text { fill: var(--accent-strong); font-size: 12px; font-weight: 600; }
.fd-arrow { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; }
.fd-head { fill: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .demo-card .demo-svg { view-timeline-name: --fd; }
    .fd-sel1, .fd-sel2 { transform-box: fill-box; transform-origin: 0 50%; }
    .fd-sel1 { animation: fd-sel1 linear both; }
    .fd-sel2 { animation: fd-sel2 linear both; }
    .fd-select { animation: fd-flash linear both; }
    .fd-menu { animation: fd-menu linear both; }
    .fd-press { animation: fd-press linear both; }
    .fd-card { animation: fd-card linear both; }
    .fd-title { animation: fd-title linear both; }
    .fd-q { animation: fd-q linear both; }
    .fd-gen-press { animation: fd-gen linear both; }
    .fd-btn { animation: fd-btn linear both; }
    .fd-arrow { animation: fd-arrow linear both; }
    .fd-head { animation: fd-head linear both; }
    .demo-card .demo-svg * { animation-timeline: --fd; animation-range: cover 30vh cover 100vh; }
  }
}
@keyframes fd-sel1 { 0% { transform: scaleX(0); } 6%, 100% { transform: scaleX(1); } }
@keyframes fd-sel2 { 0%, 6% { transform: scaleX(0); } 10%, 100% { transform: scaleX(1); } }
@keyframes fd-flash { 0%, 86% { opacity: 1; } 90% { opacity: .35; } 95%, 100% { opacity: 1; } }
@keyframes fd-menu { 0%, 12% { opacity: 0; transform: translateY(6px); } 18%, 30% { opacity: 1; transform: none; } 34%, 100% { opacity: 0; transform: none; } }
@keyframes fd-press { 0%, 22% { opacity: 0; } 25%, 100% { opacity: 1; } }
@keyframes fd-card { 0%, 34% { opacity: 0; transform: translateY(14px); } 42%, 100% { opacity: 1; transform: none; } }
@keyframes fd-title { 0%, 34% { opacity: 0; } 42%, 56% { opacity: 1; } 62%, 100% { opacity: 0; } }
@keyframes fd-gen { 0%, 43% { opacity: 0; } 46%, 50% { opacity: 1; } 53%, 100% { opacity: 0; } }
@keyframes fd-q { 0%, 50% { opacity: 0; } 56%, 100% { opacity: 1; } }
@keyframes fd-btn { 0%, 58% { opacity: 0; transform: translateY(4px); } 64%, 100% { opacity: 1; transform: none; } }
@keyframes fd-arrow { 0%, 66% { stroke-dashoffset: 1; } 84%, 100% { stroke-dashoffset: 0; } }
@keyframes fd-head { 0%, 83% { opacity: 0; } 86%, 100% { opacity: 1; } }

.word-stage { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--card); margin-top: 16px; }
.tokens { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; margin: 0 0 16px; font-size: 17px; }
.tok-new { border-radius: 999px; padding: 1px 10px; font-weight: 600; background: var(--new-soft); color: var(--new); }
.tok-pick { background: var(--saved-soft); color: var(--saved); }
.meaning-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--bg-soft); }
.meaning-card p { margin: 0; }
.meaning-word span { color: var(--muted); }
.meaning-card .meaning-row { margin: 8px 0 12px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); }
.meaning-save { display: inline-block; padding: 6px 16px; border-radius: 999px; background: var(--button); color: #fff; font-weight: 600; font-size: 15px; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .word-stage { view-timeline-name: --word; }
    .tok-pick { animation: word-chip linear both; }
    .meaning-card { animation: word-card linear both; }
    .meaning-row { animation: word-row linear both; }
    .meaning-save { animation: word-save linear both; }
    .word-stage * { animation-timeline: --word; animation-range: cover 35vh cover 90vh; }
  }
}
@keyframes word-chip { 0% { background-color: var(--new-soft); color: var(--new); transform: none; } 6% { transform: scale(.9); } 12% { transform: none; } 76% { background-color: var(--new-soft); color: var(--new); } 86%, 100% { background-color: var(--saved-soft); color: var(--saved); transform: none; } }
@keyframes word-card { 0%, 14% { opacity: 0; transform: translateY(10px); } 26%, 100% { opacity: 1; transform: none; } }
@keyframes word-row { 0%, 34% { background-color: transparent; } 44%, 100% { background-color: var(--accent-soft); } }
@keyframes word-save { 0%, 58% { transform: none; opacity: 1; } 63% { transform: scale(.92); opacity: .75; } 68%, 100% { transform: none; opacity: 1; } }

.waits { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.waits li { display: grid; grid-template-columns: 1fr 4.4em; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: var(--muted); }
.wait-bar { height: 10px; min-width: 6px; border-radius: 5px; background: var(--accent); }
.waits li:nth-child(1) .wait-bar { width: 4.8%; }
.waits li:nth-child(2) .wait-bar { width: 9.5%; }
.waits li:nth-child(3) .wait-bar { width: 14.3%; }
.waits li:nth-child(4) .wait-bar { width: 23.8%; }
.waits li:nth-child(5) .wait-bar { width: 38.1%; }
.waits li:nth-child(6) .wait-bar { width: 61.9%; }
.waits li:nth-child(7) .wait-bar { width: 100%; }
.waits li.learned { grid-template-columns: 1fr; }
.waits li.learned .wait-label { justify-self: start; border-radius: 12px; padding: 2px 12px; background: var(--saved-soft); color: var(--saved); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .waits { view-timeline-name: --waits; }
    .wait-bar { transform-origin: 0 50%; animation: wait-grow linear both; }
    .wait-label { animation: wait-show linear both; }
    .waits * { animation-timeline: --waits; }
    .waits li:nth-child(1) * { animation-range: cover 40vh cover 46vh; }
    .waits li:nth-child(2) * { animation-range: cover 45vh cover 51vh; }
    .waits li:nth-child(3) * { animation-range: cover 50vh cover 56vh; }
    .waits li:nth-child(4) * { animation-range: cover 55vh cover 61vh; }
    .waits li:nth-child(5) * { animation-range: cover 60vh cover 66vh; }
    .waits li:nth-child(6) * { animation-range: cover 65vh cover 71vh; }
    .waits li:nth-child(7) * { animation-range: cover 70vh cover 76vh; }
    .waits li:nth-child(8) * { animation-range: cover 75vh cover 81vh; }
  }
}
@keyframes wait-grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes wait-show { from { opacity: 0; } to { opacity: 1; } }
