:root {
  --bg: #fbfbfe; --surface: #ffffff; --surface-2: #f3f2fd; --text: #1c1b29; --muted: #5f5d77; --border: #e5e3f2;
  --accent: #5b4ef0; --accent-2: #7c3aed; --accent-soft: #ecebfe; --accent-text: #4338ca; --code: #f6f5fd;
  --shadow: 0 10px 30px rgba(55, 48, 163, .10), 0 2px 6px rgba(28, 27, 41, .06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111019; --surface: #1b1a26; --surface-2: #232134; --text: #edecf6; --muted: #a8a6bf; --border: #2f2d44;
    --accent: #8b80ff; --accent-2: #a78bfa; --accent-soft: #29264b; --accent-text: #c4bdff; --code: #171622;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; -webkit-font-smoothing: antialiased; }
html:not(.i18n-ready) [data-i18n] { visibility: hidden; }
a { color: var(--accent-text); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; inset-inline-start: 8px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 5; backdrop-filter: saturate(1.4) blur(10px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--border); }
.nav-in { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { flex: none; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text); text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 18px; margin-inline-start: auto; font-size: 15px; min-width: 0; overflow: hidden; }
.nav .lang, .nav .btn-sm { flex: none; }
.nav-links a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav-links a:hover { color: var(--text); }
.lang select { font: inherit; font-size: 14px; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; max-width: 170px; }
.nav-links a.fold { display: none; }
@media (max-width: 860px) { .nav-links { display: none; } .lang { margin-inline-start: auto; } }
@media (max-width: 520px) {
  .nav-in { gap: 10px; }
  .nav .btn-sm { display: none; } /* the hero has the big CTA */
  .lang select { max-width: 140px; }
  .hero { padding-top: 40px; }
  .btn { white-space: normal; }
}
.brand, .btn-sm { white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; text-decoration: none; border-radius: 12px; padding: 13px 22px; border: 1px solid transparent; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 8px 20px rgba(91, 78, 240, .35); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { color: var(--text); border-color: var(--border); background: var(--surface); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }

/* Hero */
.hero { padding: 72px 0 56px; background: radial-gradient(1000px 400px at 80% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent), radial-gradient(800px 360px at 0% 10%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 700; color: var(--accent-text); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; }
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
.prose p, .prose li, .feature p, .faq p { overflow-wrap: break-word; }
h1 { font-size: clamp(32px, 5.2vw, 60px); line-height: 1.07; letter-spacing: -.02em; margin: 18px 0 16px; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 26px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.note { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* Demo */
.demo { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.demo-pane { padding: 18px 20px; }
.demo-pane + .demo-pane { border-top: 1px dashed var(--border); background: var(--code); }
.demo-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
:lang(ja) .demo-label, :lang(zh) .demo-label, :lang(ko) .demo-label, :lang(ar) .demo-label, :lang(he) .demo-label, :lang(hi) .demo-label, :lang(th) .demo-label { text-transform: none; letter-spacing: 0; }
.demo h3 { margin: 0 0 6px; font-size: 20px; }
.demo p { margin: 0 0 8px; }
.demo .hl { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
pre.md { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.55 ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace; direction: ltr; text-align: left; }
.md .h { color: var(--accent-text); font-weight: 700; }
code { font: .9em ui-monospace, Menlo, Consolas, monospace; background: var(--code); padding: 1px 6px; border-radius: 6px; }

/* Sections */
section { padding: 72px 0; }
.section-title { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 10px; text-align: center; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 40px; max-width: 40em; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.feature .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; margin-bottom: 14px; font-weight: 800; font-size: 18px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 15.5px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 800; margin-bottom: 12px; }
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }
.alt { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.fmt { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.fmt b { display: block; font-size: 14px; margin-bottom: 6px; }
.fmt pre { margin: 0; font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); direction: ltr; text-align: left; }
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 820px) { .shots { grid-template-columns: 1fr; } }
.shots figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.shots img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.shots figcaption { padding: 12px 16px; color: var(--muted); font-size: 15px; }
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: inline-end; color: var(--accent-text); font-weight: 800; }
.faq details[open] summary::after { content: '–'; }
.faq p { margin: 0 0 16px; color: var(--muted); }
.cta { text-align: center; background: linear-gradient(135deg, #5b4ef0, #7c3aed); color: #fff; border-radius: 24px; padding: 56px 24px; }
.cta h2 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 36px); }
.cta p { margin: 0 0 24px; opacity: .9; }
.cta .btn-primary { background: #fff; color: #4338ca; box-shadow: none; }

/* Pages */
.page { padding: 56px 0 72px; }
.page h1 { font-size: clamp(28px, 4vw, 46px); }
.prose { max-width: 760px; }
.prose h2 { font-size: 22px; margin: 32px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose .muted { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; margin: 16px 0; }
.card > :first-child, .card > div > :first-child { margin-top: 0; }
.card h2 { margin-bottom: 8px; }
.sample { font-size: 19px; }
.reasons { display: grid; gap: 10px; margin: 12px 0 16px; }
.reasons label { display: flex; gap: 10px; align-items: center; }
.reasons input { width: 18px; height: 18px; accent-color: var(--accent); }
textarea { width: 100%; min-height: 90px; font: inherit; color: inherit; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
button.btn { cursor: pointer; font-family: inherit; }
.pin { display: flex; gap: 18px; align-items: center; }
@media (max-width: 520px) { .pin { flex-direction: column; align-items: flex-start; gap: 4px; } }
.pin svg { flex: none; }
.timeline { list-style: none; padding: 0; }
.timeline > li { border-inline-start: 3px solid var(--accent); padding: 4px 0 4px 20px; margin-bottom: 24px; }
[dir="rtl"] .timeline > li { padding: 4px 20px 4px 0; }
.timeline h2 { margin: 0; }
.timeline .date { color: var(--muted); font-size: 15px; }

/* Footer */
footer.site { border-top: 1px solid var(--border); padding: 32px 0 40px; color: var(--muted); font-size: 15px; }
.foot { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }
.foot .brand { font-size: 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; margin-inline-start: auto; }
.foot a { color: var(--muted); }
.rights { width: 100%; font-size: 13.5px; }
