/* Convola site. Tokens, then base, then components. Brand colors: site/src/brand.ts. */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/fonts/fraunces-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 700; font-display: swap; src: url("/fonts/fraunces-italic.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/instrument-sans-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("/fonts/instrument-sans-italic.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --paper: #f3ede2;
  --surface: #fcfaf5;
  --surface-2: #ebe3d5;
  --ink: #1f1a14;
  --ink-2: #5a5248;
  --muted: #7d7368;
  --line: #e2d9ca;
  --brand: #1d5b4a;
  --brand-deep: #154536;
  --brand-ink: #ffffff;
  --brand-tint: #dcebe4;
  --coral: #ee7b55;
  --coral-tint: #fbe3d8;
  --self: #b9502c;
  --self-tint: #f6e3d7;
  --self-ink: #7a3218;
  --good: #4f7a3a;
  --bad: #b4532a;
  --accent: var(--brand);
  --accent-deep: var(--brand-deep);
  --accent-ink: var(--brand-ink);
  --accent-tint: var(--brand-tint);
  --shadow: 0 24px 60px -24px rgba(31, 26, 20, 0.28);
  --lift: 0 1px 2px rgba(31, 26, 20, 0.06), 0 4px 14px -6px rgba(31, 26, 20, 0.12);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
:root[data-theme="dark"] {
    --paper: #171310;
    --surface: #211c17;
    --surface-2: #2c251e;
    --ink: #f1e9dc;
    --ink-2: #c6bbad;
    --muted: #9d9183;
    --line: #342c24;
    --brand: #7fd1b5;
    --brand-deep: #a6e2cd;
    --brand-ink: #0d2a22;
    --brand-tint: #1b302a;
    --coral: #ff9b76;
    --coral-tint: #3b2419;
    --self: #e08a68;
    --self-tint: #3b2419;
    --self-ink: #f0b79e;
    --good: #9cbf7c;
    --bad: #e08a62;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
    --lift: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px -6px rgba(0, 0, 0, 0.5);
  }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
    --paper: #171310;
    --surface: #211c17;
    --surface-2: #2c251e;
    --ink: #f1e9dc;
    --ink-2: #c6bbad;
    --muted: #9d9183;
    --line: #342c24;
    --brand: #7fd1b5;
    --brand-deep: #a6e2cd;
    --brand-ink: #0d2a22;
    --brand-tint: #1b302a;
    --coral: #ff9b76;
    --coral-tint: #3b2419;
    --self: #e08a68;
    --self-tint: #3b2419;
    --self-ink: #f0b79e;
    --good: #9cbf7c;
    --bad: #e08a62;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
    --lift: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px -6px rgba(0, 0, 0, 0.5);
  }
}

/* A language page or app picker takes its language's color. */
[data-lang="es"] { --accent: #2b4c9e; --accent-deep: #1f3a7a; --accent-ink: #fff; --accent-tint: #dfe6f7; }
[data-lang="it"] { --accent: #6a2c70; --accent-deep: #4e1f53; --accent-ink: #fff; --accent-tint: #efe1f0; }
[data-lang="nl"] { --accent: #c2410c; --accent-deep: #9a3412; --accent-ink: #fff; --accent-tint: #fbe4d6; }
:root[data-theme="dark"][data-lang="es"], :root[data-theme="dark"] [data-lang="es"] { --accent: #93abf0; --accent-deep: #b9c9f7; --accent-ink: #0f1a3a; --accent-tint: #232c47; }
:root[data-theme="dark"][data-lang="it"], :root[data-theme="dark"] [data-lang="it"] { --accent: #d7a6dc; --accent-deep: #e8c4ec; --accent-ink: #2a1030; --accent-tint: #3a2440; }
:root[data-theme="dark"][data-lang="nl"], :root[data-theme="dark"] [data-lang="nl"] { --accent: #fdba8c; --accent-deep: #fed7bd; --accent-ink: #3a1606; --accent-tint: #40261a; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"])[data-lang="es"], :root:not([data-theme="light"]) [data-lang="es"] { --accent: #93abf0; --accent-deep: #b9c9f7; --accent-ink: #0f1a3a; --accent-tint: #232c47; }
:root:not([data-theme="light"])[data-lang="it"], :root:not([data-theme="light"]) [data-lang="it"] { --accent: #d7a6dc; --accent-deep: #e8c4ec; --accent-ink: #2a1030; --accent-tint: #3a2440; }
:root:not([data-theme="light"])[data-lang="nl"], :root:not([data-theme="light"]) [data-lang="nl"] { --accent: #fdba8c; --accent-deep: #fed7bd; --accent-ink: #3a1606; --accent-tint: #40261a; }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1; }
h1, h2, h3 { font-family: var(--serif); font-optical-sizing: auto; font-weight: 560; letter-spacing: -0.02em; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 1.4rem + 1.9vw, 2.9rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; color: var(--ink-2); text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-deep); }
em { font-style: italic; }
::selection { background: var(--accent-tint); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
input:focus-visible, textarea:focus-visible { outline: none; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.lead { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.25rem); line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  background: var(--surface-2); color: var(--ink);
  transition: background 0.15s, color 0.15s, transform 0.12s var(--ease), box-shadow 0.15s;
}
.btn:hover { color: var(--ink); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--lift); }
.btn-primary:hover { background: var(--accent-deep); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-quiet { background: transparent; padding: 0 12px; color: var(--ink-2); }
.btn-quiet:hover { color: var(--ink); }
.btn-lg { min-height: 58px; padding: 0 30px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
button.btn { font-family: var(--sans); }
button.btn:disabled { opacity: 0.55; cursor: default; }

/* ---------- header and footer ---------- */

.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo { display: inline-flex; align-items: center; flex: none; }
.logo img { height: 34px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav .links { display: none; gap: 4px; margin-right: 8px; }
.site-nav .links a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: 0.97rem; }
.site-nav .links a:hover, .site-nav .links a[aria-current="page"] { color: var(--ink); background: var(--surface); }
.site-nav .btn { min-height: 42px; padding: 0 18px; font-size: 0.95rem; }
.site-nav .signin { display: none; }
@media (min-width: 560px) { .site-nav .signin { display: inline-flex; } }
@media (min-width: 900px) { .site-nav .links { display: flex; } }

.site-foot { margin-top: 96px; border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 0.95rem; }
.site-foot .cols { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .site-foot .cols { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.site-foot .logo img { height: 30px; }
.site-foot h4 { margin: 0 0 10px; font: 600 0.78rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .about { max-width: 34ch; margin-top: 14px; }
.site-foot .legal-line { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted); font-size: 0.86rem; }
.site-foot .legal-line p { color: var(--muted); }

/* ---------- cards, forms, narrow pages ---------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--lift); }
.narrow { max-width: 460px; margin: 0 auto; padding: 48px 20px 0; }
.narrow h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.6rem); }
.narrow > p { margin-top: 10px; }
.narrow .card { margin-top: 24px; }
.narrow .card + .card { margin-top: 14px; }
.narrow .back { display: inline-block; margin-top: 20px; }
.stack { display: grid; gap: 10px; }
.stack form { margin: 0; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-weight: 600; font-size: 0.92rem; color: var(--ink); }
input, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; outline: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
textarea { min-height: 110px; resize: vertical; }
.error { color: var(--bad); min-height: 1.5em; margin: 10px 0 0; font-size: 0.95rem; }
.error:empty { min-height: 0; margin: 0; }
.notice { margin-top: 18px; padding: 12px 16px; border-radius: 14px; background: var(--brand-tint); color: var(--ink); font-weight: 500; }
.fine { font-size: 0.86rem; color: var(--muted); margin-top: 16px; }
.fine a { color: inherit; }

.meter { margin-top: 14px; }
.meter .row { display: flex; justify-content: space-between; font-size: 0.92rem; color: var(--ink-2); margin-bottom: 6px; }
.meter .bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter .bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.plan-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 560; letter-spacing: -0.01em; }
.plan-detail { margin-top: 4px; }
.plans { display: grid; gap: 10px; margin-top: 16px; }
.plans .btn { justify-content: space-between; }
.plans .btn small { font-weight: 500; opacity: 0.8; }

.prose { max-width: 720px; margin: 0 auto; padding: 48px 20px 0; }
.prose h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.8rem); }
.prose h2 { font-size: 1.4rem; margin: 36px 0 10px; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose .version { margin-top: 8px; color: var(--muted); }
.prose .company { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 16px 0; }
.prose .company dt { color: var(--muted); }
.prose .company dd { margin: 0; color: var(--ink-2); }
.narrow h2 { font-size: 1.2rem; margin: 36px 0 8px; }
.model-form { margin: 12px 0 0; padding: 14px 16px; border-left: 3px solid var(--line); color: var(--ink-2); }
.model-form p + p { margin-top: 8px; }

.choices { display: grid; gap: 12px; margin-top: 24px; }
.choice {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  box-shadow: var(--lift); transition: transform 0.15s var(--ease), border-color 0.15s;
}
.choice:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-1px); }
.choice img { width: 48px; height: 48px; border-radius: 13px; flex: none; }
.choice .t { font-weight: 600; font-size: 1.1rem; display: block; }
.choice .d { color: var(--muted); font-size: 0.92rem; display: block; }
.choice .go { margin-left: auto; color: var(--accent); flex: none; }

.lost { text-align: center; padding-top: 96px; }
.lost .code { font-family: var(--serif); font-size: 6rem; line-height: 1; color: var(--accent); }
.lost p { margin: 14px auto 28px; max-width: 36ch; }

.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.9rem; margin: 16px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.center { text-align: center; }
.narrow-wrap { max-width: 820px; }

/* ---------- landing ---------- */

.split { display: grid; gap: 48px; align-items: center; }
.split > * { min-width: 0; }
@media (min-width: 960px) { .split { grid-template-columns: 1.05fr 0.95fr; gap: 64px; } }

.hero { padding: 40px 0 72px; position: relative; overflow: hidden; }
@media (min-width: 960px) { .hero { padding: 72px 0 104px; } }
.hero::before {
  content: ""; position: absolute; z-index: -1; right: -24vw; top: -8vw; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  border-radius: 50%; background: radial-gradient(closest-side, var(--accent-tint), transparent);
}
.hero h1 { margin-top: 16px; }
.hero h1 em { color: var(--accent); font-weight: 520; }
.hero .lead { margin-top: 20px; max-width: 34em; }
.pick-label { margin-top: 32px; font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.cta-row { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

.lang-pick { display: grid; gap: 10px; margin-top: 12px; }
@media (min-width: 560px) { .lang-pick { grid-template-columns: repeat(3, 1fr); } }
.lang-btn {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--lift);
  transition: transform 0.15s var(--ease), border-color 0.15s, box-shadow 0.15s;
}
.lang-btn:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.lang-btn img { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.lang-btn b { display: block; font-size: 1.05rem; }
.lang-btn small { display: block; color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.lang-btn .arrow { margin-left: auto; color: var(--accent); flex: none; }
@media (min-width: 560px) and (max-width: 1279px) { .lang-btn .arrow { display: none; } }
@media (max-width: 559px) {
  .lang-pick { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .lang-btn { flex-direction: column; gap: 8px; padding: 14px 6px 12px; text-align: center; border-radius: 16px; }
  .lang-btn img { width: 40px; height: 40px; }
  .lang-btn b { font-size: 0.98rem; }
  .lang-btn small, .lang-btn .arrow { display: none; }
}

.reassure { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--ink-2); font-size: 0.94rem; }
@media (max-width: 559px) { .reassure { gap: 6px 14px; font-size: 0.88rem; } .reassure svg { width: 16px; height: 16px; } }
.reassure li { display: inline-flex; align-items: center; gap: 6px; }
.reassure svg { color: var(--brand); }

/* The recorded conversation, drawn with the app's session styles (public/style.css). */
.demo-wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.demo-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 14px; margin: 0 auto 14px; }
.demo-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.demo-tabs button { font: 600 0.92rem var(--sans); color: var(--ink-2); background: none; border: 0; padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.demo-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--lift); }
.en-toggle { display: inline-flex; align-items: center; gap: 8px; font: 600 0.88rem var(--sans); color: var(--ink-2); background: none; border: 0; padding: 8px 4px; cursor: pointer; }
.en-toggle .sw { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--line); transition: background 0.2s; }
.en-toggle .sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.2s var(--ease); }
.en-toggle[aria-pressed="true"] { color: var(--ink); }
.en-toggle[aria-pressed="true"] .sw { background: var(--accent); }
.en-toggle[aria-pressed="true"] .sw::after { transform: translateX(14px); }
.demo-fig { margin: 0; width: 100%; max-width: 420px; }
.demo-fig figcaption { margin: 12px auto 0; max-width: 36em; text-align: center; font-size: 0.84rem; line-height: 1.5; color: var(--muted); text-wrap: balance; }
.demo {
  position: relative; width: 100%; height: 600px; display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: 32px; box-shadow: var(--shadow);
  font-size: 1rem; -webkit-user-select: none; user-select: none;
}
.demo-head { flex: none; display: flex; align-items: center; gap: 6px; height: 54px; padding: 0 16px 0 10px; }
.demo-head .back { color: var(--ink-2); display: grid; place-items: center; width: 32px; }
.demo-head .ttl { flex: 1; min-width: 0; font-family: var(--serif); font-size: 1.12rem; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-head .end { color: var(--ink-2); font-weight: 500; }
.demo-goal { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px 12px; color: var(--muted); font-size: 0.86rem; border-bottom: 1px solid var(--line); }
.demo-goal svg { flex: none; }
.demo-goal span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-body { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.demo .log { height: 100%; overflow-y: auto; scrollbar-width: none; padding: 16px 14px 20px; display: flex; flex-direction: column; gap: 14px; transition: opacity 0.4s; }
.demo .log::-webkit-scrollbar { display: none; }
.demo .m { flex: none; display: flex; flex-direction: column; align-items: flex-start; max-width: 88%; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.demo-wrap.js .demo .m:not(.on) { display: none; }
.demo-wrap.js .demo .m.on { animation: msg-in 0.35s var(--ease); }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.demo .m.user { align-self: flex-end; align-items: flex-end; max-width: 84%; }
.demo .who { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0 0 5px 14px; }
.demo .bubble { padding: 10px 15px; border-radius: 20px; border-bottom-left-radius: 6px; line-height: 1.45; background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--lift); }
.demo .m.user .bubble { border-radius: 20px; border-bottom-right-radius: 6px; border-color: transparent; box-shadow: none; background: var(--accent); color: var(--accent-ink); }
.demo .en { display: block; margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); font-size: 0.84rem; line-height: 1.4; color: var(--muted); }
.demo .m.user .en { color: inherit; opacity: 0.78; border-top-color: color-mix(in srgb, currentColor 25%, transparent); }
.demo-wrap.no-en .en { display: none; }
.demo .acts { display: flex; gap: 16px; margin: 6px 0 0 14px; color: var(--muted); opacity: 0.8; }
.demo .chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.demo .chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--self-ink); font: 500 0.86rem var(--sans); white-space: nowrap; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; }
.demo .chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--self); }
.demo .chip:hover { border-color: var(--self); }
.demo .chip.tap { border-color: var(--self); box-shadow: 0 0 0 4px var(--self-tint); }
.demo-wrap.js .demo .m.on .chip { animation: chip-in 0.3s var(--ease) 0.5s both; }
@keyframes chip-in { from { opacity: 0; transform: scale(0.85); } }
.demo .typing .bubble { display: flex; gap: 4px; padding: 14px 16px; }
.demo .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1s ease-in-out infinite; }
.demo .typing i:nth-child(2) { animation-delay: 0.15s; }
.demo .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.demo-foot { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px 14px; border-top: 1px solid var(--line); background: var(--paper); }
.demo-foot .mic { color: var(--ink-2); display: grid; place-items: center; width: 36px; }
.fake-input { flex: 1; min-width: 0; padding: 11px 16px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-family: var(--serif); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-foot .send { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); flex: none; }
.isheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 20px 20px; background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: 0 -18px 50px -12px rgba(31, 26, 20, 0.3); transform: translateY(105%); transition: transform 0.45s var(--ease); cursor: pointer; }
.isheet.on { transform: none; }
.demo.open .log { opacity: 0.5; }
.isheet .handle { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 12px; }
.isheet .ih { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 12px; }
.isheet .kv { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; font-size: 0.95rem; }
.isheet .k { color: var(--muted); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 4px; }
.isheet .wrong { text-decoration: line-through; text-decoration-color: var(--self); color: var(--ink-2); }
.isheet .right { font-weight: 600; color: var(--good); }
.isheet .lesson { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; height: 46px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 500; }
@media (max-width: 559px) {
  .demo { height: 540px; border-radius: 28px; }
  .demo-bar { gap: 10px; }
  .demo-tabs button { padding: 8px 12px; font-size: 0.88rem; }
  .en-toggle { gap: 6px; font-size: 0.86rem; }
  .en-toggle .sw { width: 30px; height: 18px; }
  .en-toggle .sw::after { width: 12px; height: 12px; }
  .en-toggle[aria-pressed="true"] .sw::after { transform: translateX(12px); }
}

.facts { border-block: 1px solid var(--line); background: var(--surface); }
.facts ul { list-style: none; margin: 0; padding: 26px 0; display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .facts ul { grid-template-columns: repeat(4, 1fr); } }
.facts b { display: block; font-family: var(--serif); font-weight: 560; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -0.02em; line-height: 1.1; }
.facts span { color: var(--muted); font-size: 0.92rem; }

.section { padding: 88px 0 0; }
@media (min-width: 960px) { .section { padding-top: 120px; } }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 { margin-top: 12px; }
.section-head .lead { margin-top: 16px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 20px 20px 26px; box-shadow: var(--lift); }
.step h3 { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 600 0.85rem var(--sans); flex: none; }
.step p { margin-top: 8px; }
@media (max-width: 859px) { .step { padding: 16px 16px 22px; } .step .art { height: 140px; } .step h3 { margin-top: 16px; } }
.art { height: 168px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.chips { min-width: 0; list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.chips li { min-width: 0; display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 0.88rem; }
.chips li span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips b { font-size: 0.75rem; color: var(--accent); background: var(--accent-tint); padding: 2px 8px; border-radius: 999px; flex: none; }
.art.talk { flex-direction: row; align-items: center; justify-content: center; gap: 18px; }
.wave { display: flex; align-items: center; gap: 4px; height: 56px; }
.wave i { width: 4px; border-radius: 4px; background: var(--accent); opacity: 0.75; animation: wave 1.2s ease-in-out infinite; }
.wave i:nth-child(odd) { animation-delay: -0.4s; }
.wave i:nth-child(3n) { animation-delay: -0.8s; }
@keyframes wave { 0%, 100% { height: 14px; } 50% { height: 52px; } }
.art.talk .mic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 10px var(--accent-tint); }
.mini-sheet { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 0.95rem; }
.mini-sheet b { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; }
.mini-sheet s { color: var(--ink-2); text-decoration-color: var(--self); }
.mini-sheet .ok { color: var(--good); font-weight: 600; }

.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.ticks svg { flex: none; margin-top: 4px; color: var(--accent-ink); background: var(--accent); border-radius: 50%; padding: 3px; width: 20px; height: 20px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; max-width: 440px; width: 100%; justify-self: center; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 30px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 32px; }
.timeline li::before { content: ""; position: absolute; left: 1px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.timeline li:first-child::before { border-color: var(--coral); background: var(--coral); }
.timeline li:last-child::before { background: var(--accent); }
.timeline .when { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--lift); }
.tl-card p { margin-top: 6px; color: var(--ink); }
.tl-card s { color: var(--muted); text-decoration-color: var(--coral); text-decoration-thickness: 2px; }
.tl-card.drill { display: grid; gap: 8px; }
.tl-card.drill p { margin: 0; }
.tl-card .q { font-family: var(--serif); font-size: 1.05rem; line-height: 1.35; }
.tl-card .a { justify-self: end; max-width: 90%; padding: 7px 13px; border-radius: 16px; border-bottom-right-radius: 5px; background: var(--accent); color: var(--accent-ink); font-size: 0.95rem; }
.tl-card .ok { display: inline-flex; align-items: center; gap: 6px; color: var(--good); font-weight: 600; font-size: 0.95rem; }
.tl-card .ok svg { width: 16px; height: 16px; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); }
.tag.bad { background: var(--coral-tint); color: var(--ink); }
.tag.good { background: var(--brand-tint); color: var(--brand); }

.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ladder li { display: grid; grid-template-columns: 56px 1fr; gap: 2px 16px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.ladder .lv { grid-row: span 2; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-family: var(--serif); font-size: 1.25rem; font-weight: 560; background: var(--accent-tint); color: var(--accent); }
.ladder li:nth-child(n + 3) .lv { background: color-mix(in srgb, var(--accent) 35%, var(--accent-tint)); color: var(--ink); }
.ladder li:nth-child(n + 5) .lv { background: var(--accent); color: var(--accent-ink); }
.ladder .lt { font-weight: 600; }
.ladder .ls { color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 759px) {
  .ladder { grid-template-columns: 1fr 1fr; }
  .ladder li { grid-template-columns: 1fr; align-content: start; gap: 2px; padding: 14px; }
  .ladder .lv { grid-row: auto; width: 44px; height: 44px; font-size: 1.1rem; margin-bottom: 8px; }
  .ladder .lt { font-size: 0.95rem; line-height: 1.3; }
  .ladder .ls { font-size: 0.88rem; line-height: 1.4; margin-top: 2px; }
}
@media (min-width: 760px) {
  .ladder { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .ladder li { grid-template-columns: 1fr; align-content: start; gap: 4px; padding: 20px; border-radius: 20px; }
  .ladder .lv { grid-row: auto; margin-bottom: 10px; }
}

.trio { display: grid; gap: 16px; }
@media (min-width: 860px) { .trio { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.seg-card { padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.seg-card:first-child { background: var(--accent-tint); border-color: transparent; }
.seg-card p { margin-top: 12px; }

.langs { display: grid; gap: 20px; }
@media (min-width: 860px) { .langs { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
.lang-card { display: flex; flex-direction: column; padding: 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--lift); transition: transform 0.15s var(--ease), border-color 0.15s; }
.lang-card:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-2px); }
.lang-card img { width: 52px; height: 52px; border-radius: 14px; }
.lang-card h3 { margin-top: 18px; font-size: 1.6rem; }
.lang-card p { margin-top: 6px; }
.lang-card ul { margin: 16px 0 20px; padding-left: 1.1em; color: var(--ink-2); font-size: 0.95rem; display: grid; gap: 4px; }
.lang-card .more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; }

.price-card { max-width: 480px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); }
.billing { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.billing input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.billing label { text-align: center; padding: 10px 8px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; color: var(--ink-2); cursor: pointer; }
.billing input:checked + label { background: var(--surface); color: var(--ink); box-shadow: var(--lift); }
.billing input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.billing .save { display: inline-block; font-size: 0.72rem; color: var(--brand); background: var(--brand-tint); border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }
.amount { margin-top: 26px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.amount b { font-family: var(--serif); font-size: 3.4rem; font-weight: 560; letter-spacing: -0.03em; line-height: 1; }
.amount span { color: var(--ink-2); }
.per-day { margin-top: 8px; font-weight: 600; color: var(--good); font-size: 0.95rem; }
.usd { margin-top: 6px; font-size: 0.88rem; color: var(--muted); }
.price-card[data-plan="yearly"] .monthly, .price-card[data-plan="monthly"] .yearly { display: none; }
.price-card:not([data-plan]) .monthly { display: none; }
.price-card .ticks { margin: 22px 0 26px; }

.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 2px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 18px; }
#questions .small { margin-top: 24px; }

.closing { margin-top: 120px; }
.closing .wrap { background: var(--brand); color: var(--brand-ink); border-radius: 32px; padding: 56px 24px; text-align: center; position: relative; overflow: hidden; }
[data-lang] .closing .wrap { background: var(--accent); color: var(--accent-ink); }
@media (min-width: 720px) { .closing .wrap { padding: 72px 48px; } }
.closing .wrap::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: var(--coral); right: -60px; top: -70px; opacity: 0.9; }
.closing h2 { color: inherit; position: relative; }
.closing p { color: inherit; opacity: 0.85; margin-top: 12px; font-size: 1.1rem; position: relative; }
.closing .lang-pick { max-width: 760px; margin: 28px auto 0; text-align: left; position: relative; }
.closing .reassure { justify-content: center; color: inherit; opacity: 0.9; position: relative; }
.closing .reassure svg { color: inherit; }
.closing .btn-light { margin-top: 28px; background: var(--paper); color: var(--ink); position: relative; }
.closing .btn-light:hover { background: var(--surface); }

/* ---------- sign-in ---------- */

.signin .reassure { margin-top: 14px; }
.google svg { flex: none; }
.sent { margin-bottom: 16px; }
.sent b { color: var(--ink); word-break: break-all; }
.code-input { font: 600 1.7rem/1 var(--sans); letter-spacing: 0.5em; text-align: center; padding: 14px 0 14px 0.5em; font-variant-numeric: tabular-nums; }
.code-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.link { background: none; border: 0; padding: 4px 0; font: 500 0.92rem var(--sans); color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link:disabled { color: var(--muted); text-decoration: none; cursor: default; }

/* ---------- theme ---------- */

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
.for-dark { display: none; }
:root[data-theme="dark"] .for-light { display: none; }
:root[data-theme="dark"] .for-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .for-light { display: none; }
  :root:not([data-theme="light"]) .for-dark { display: block; }
}
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.theme-switch button { font: 500 0.82rem var(--sans); color: var(--ink-2); background: none; border: 0; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
:root[data-choice="system"] .theme-switch [data-set="system"], :root[data-choice="light"] .theme-switch [data-set="light"], :root[data-choice="dark"] .theme-switch [data-set="dark"] { background: var(--surface); color: var(--ink); box-shadow: var(--lift); }
.site-foot .legal-line { align-items: center; }
.card .theme-switch { display: flex; margin-top: 12px; }
.card .theme-switch button { flex: 1; padding: 10px 12px; font-size: 0.95rem; }
.card .label + p { margin-top: 4px; }

/* ---------- scene sample, comparison, phone start bar ---------- */

.marquees { display: grid; gap: 12px; margin-top: 4px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee { overflow: hidden; }
.marquee .track { display: flex; width: max-content; animation: marquee 90s linear infinite; }
.marquee.rev .track { animation-direction: reverse; animation-duration: 100s; }
.marquees:hover .track { animation-play-state: paused; }
.marquee ul { list-style: none; margin: 0; padding: 0 12px 0 0; display: flex; gap: 12px; }
.marquee li { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; font-size: 0.97rem; color: var(--ink); box-shadow: var(--lift); }
.marquee li img { width: 22px; height: 22px; border-radius: 6px; }
.marquee li b { font-size: 0.74rem; color: var(--accent); background: var(--accent-tint); padding: 3px 8px; border-radius: 999px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquees { -webkit-mask-image: none; mask-image: none; }
  .marquee { overflow-x: auto; padding: 0 20px; }
  .marquee .track { animation: none; }
  .marquee ul[aria-hidden] { display: none; }
}

.compare { border: 1px solid var(--line); border-radius: 24px; background: var(--surface); overflow: hidden; box-shadow: var(--lift); }
.crow { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; align-items: center; border-top: 1px solid var(--line); }
.crow:first-child { border-top: 0; }
.crow > span { padding: 16px 18px; color: var(--ink-2); font-size: 0.97rem; line-height: 1.35; }
.crow > span:first-child { color: var(--ink); font-weight: 600; }
.crow > .us { background: var(--accent-tint); color: var(--ink); font-weight: 600; align-self: stretch; display: flex; align-items: center; }
.chead > span { font-weight: 600; color: var(--ink); padding-top: 18px; padding-bottom: 14px; }
.chead > .us { font-family: var(--serif); font-size: 1.15rem; color: var(--accent); }
.compare .yes, .compare .no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.compare .yes { background: var(--accent); color: var(--accent-ink); }
.compare .yes svg { width: 15px; height: 15px; }
.compare .no { background: var(--surface-2); color: var(--muted); }
@media (max-width: 719px) {
  .crow { grid-template-columns: 1fr 1fr 1fr; }
  .crow > span:first-child { grid-column: 1 / -1; padding: 14px 14px 2px; font-size: 0.9rem; }
  .chead > span:first-child { display: none; }
  .crow > span { padding: 8px 10px 14px; font-size: 0.86rem; text-align: center; justify-content: center; }
  .crow > .us { background: none; }
  .chead > span { padding: 14px 6px 12px; font-size: 0.86rem; }
  .chead > .us { font-size: 1rem; }
  .crow > .us { color: var(--accent); }
}

.sticky-start { display: none; }
@media (max-width: 719px) {
  .sticky-start {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 10px 10px 10px 18px; border-radius: 20px; border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: var(--shadow); transform: translateY(140%); transition: transform 0.3s var(--ease); pointer-events: none;
  }
  .sticky-start.on { transform: none; pointer-events: auto; }
  .sticky-start span { display: grid; line-height: 1.25; }
  .sticky-start b { font-size: 0.95rem; }
  .sticky-start small { color: var(--muted); font-size: 0.82rem; }
  .sticky-start .btn { min-height: 46px; padding: 0 18px; font-size: 0.98rem; }
}
