:root{--fg:#0a0a0a;--mute:#666;--bg:#fff;--accent:#1d4ed8;--line:#e5e5e5;--ok:#15803d;--err:#b91c1c}
*{box-sizing:border-box;margin:0;padding:0}
html,body{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--fg);background:var(--bg);line-height:1.5;-webkit-font-smoothing:antialiased}
body{padding:0 20px 60px;max-width:760px;margin:0 auto;opacity:0;transition:opacity .15s}
body.ready{opacity:1}
.topbar{display:flex;justify-content:space-between;align-items:center;padding:14px 0;gap:12px;flex-wrap:wrap}
.open-app-link{color:var(--accent);font-size:.9rem;font-weight:600;text-decoration:none;padding:6px 10px;border:1px solid var(--accent);border-radius:6px;transition:background .15s,color .15s}
.open-app-link:hover{background:var(--accent);color:#fff}
.lang-switch{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.lang-switch button{background:none;border:0;color:var(--mute);font:inherit;font-size:.85rem;cursor:pointer;padding:4px 6px}
.lang-switch button.is-active{color:var(--fg);font-weight:600}
.lang-switch button:hover{color:var(--fg)}
.lang-select{display:none}
main>section{padding:36px 0;border-bottom:1px solid var(--line)}
main>section:last-child{border-bottom:0}
.hero{padding-top:24px;border-bottom:0;padding-bottom:8px}
/* Edge-to-edge grey band behind the demo carousel. slate-200 — darker than the
 * page background, still much lighter than the demo card (slate-900). box-shadow
 * paints the band past the body's max-width without changing layout; clip-path
 * keeps the paint vertically constrained so it doesn't bleed into adjacent
 * sections. The CTA lead + button live in their own .demos-cta section below,
 * which keeps the normal white background. */
.demos{padding-top:24px;padding-bottom:36px;background:#94a3b8;border-bottom:0;box-shadow:0 0 0 100vmax #94a3b8;clip-path:inset(0 -100vmax)}
.demos-cta{padding-top:28px;padding-bottom:36px;border-bottom:1px solid var(--line)}
.eyebrow{color:var(--mute);font-style:italic;font-size:.95rem;margin-bottom:14px}
h1{font-size:2rem;line-height:1.2;letter-spacing:-0.01em;margin-bottom:14px}
h2{font-size:1.5rem;line-height:1.25;margin-bottom:18px}
h3{font-size:1.05rem;margin-bottom:6px}
.sub{color:var(--mute);font-size:1.1rem;margin-bottom:18px}
.hero-try-now{display:inline-block;color:var(--accent);font-weight:600;font-size:1.05rem;text-decoration:none;border-bottom:2px solid transparent;transition:border-color .15s}
.hero-try-now:hover{border-bottom-color:var(--accent)}
html{scroll-behavior:smooth}
.signup{display:flex;flex-direction:column;gap:10px;max-width:420px}
.signup input[type=email]{padding:13px 14px;border:1px solid #c5c5c5;border-radius:6px;font:inherit;font-size:1rem;width:100%}
.signup input[type=email]:focus{outline:2px solid var(--accent);outline-offset:-1px;border-color:var(--accent)}
.signup button{padding:13px 18px;background:var(--fg);color:#fff;border:0;border-radius:6px;font:inherit;font-size:1rem;font-weight:600;cursor:pointer}
.signup button:hover:not(:disabled){background:var(--accent)}
.signup button:disabled{opacity:.6;cursor:wait}
.privacy{color:var(--mute);font-size:.85rem}
.form-message{font-size:.9rem;min-height:1.4em}
.form-message.is-ok{color:var(--ok)}
.form-message.is-err{color:var(--err)}
.honeypot{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.tiers-grid{display:grid;gap:20px;grid-template-columns:1fr}
.demos>.sub{margin-bottom:18px}

/* --- Demo carousel: Embla loop mode, iPhone-sized card centred, arrows + dots --- */
.demos-carousel{position:relative}
/* Soft fade-out at the left/right edges so the carousel slides melt into the
 * grey band instead of clipping with a hard line. The mask is on the embla
 * viewport (the overflow:hidden container); the arrow buttons are positioned
 * outside it, so they stay fully opaque. */
.demos-viewport{overflow:hidden;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 8%,#000 92%,transparent 100%);mask-image:linear-gradient(to right,transparent 0,#000 8%,#000 92%,transparent 100%)}
.demos-viewport:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:14px}
/* Use per-slide right-margin instead of flex `gap` — Embla translates slides
 * around in loop mode, and `gap` (which lives between DOM siblings) doesn't
 * follow the translation, so visually the gap appears only between un-moved
 * slides. Margin "belongs to" the slide and goes with it. */
.demos-track{display:flex;touch-action:pan-y pinch-zoom}
.demos-track .demo-slide{margin-right:14px}
.demo-slide{flex:0 0 360px;max-width:100%;display:flex;flex-direction:column;gap:10px}
.demo-label{margin:0;font-size:.95rem;font-weight:600;color:var(--fg);text-align:center;letter-spacing:-0.01em}
.demo-card{height:600px;background:#0f172a;border:1px solid #1e293b;border-radius:14px;overflow:hidden;display:flex;align-items:stretch;justify-content:stretch;color:#94a3b8;font-size:.9rem;position:relative;min-width:0}
/* The SPA's .card-stack sets `min-height: 60vh` so the flashcard fills mobile
 * screens. Inside the bounded landing demo card it forces the flashcard out of
 * the parent box. Reset to flex naturally so the card-stack shares space with
 * the answer buttons properly. Leave .flashcard alone — it positions absolute
 * inside .card-stack with `inset: 12px 16px`, and that works fine as long as
 * .card-stack is now flex-bounded. */
.demo-card .card-stack{min-height:0;flex:1 1 auto;min-width:0;position:relative}
.demo-card .quiz-actions{flex:0 0 auto}
.demo-card:has(.multistage-compact){align-items:stretch;justify-content:stretch;color:inherit}
.demo-card .multistage-compact{width:100%;height:100%;display:flex;flex-direction:column}
/* Article-quiz buttons in compact landing mode use the same compact footprint
 * as prep/adj/plural (the .article-btn default — 22px padding, 1.4rem font —
 * was tuned for the standalone SPA Article Quiz, where the buttons ARE the
 * whole card). Colors (der/die/das mnemonic) keep working — the rule below
 * only overrides size, not background/border. */
.demo-card .article-actions-default .article-btn{padding:10px 6px;font-size:1.05rem;border-radius:10px}
/* Compact-mode finished state: big verdict + button-styled CTA. Scoped to
 * .demo-card so SPA usages (if added later) stay opt-in. Flips into view
 * like a card turning to show its back face. */
@keyframes demo-card-flip-in{
  0%{transform:perspective(900px) rotateY(-90deg);opacity:0}
  50%{transform:perspective(900px) rotateY(-30deg);opacity:.6}
  100%{transform:perspective(900px) rotateY(0);opacity:1}
}
.demo-card .multistage-compact:has(.cta){align-items:center;justify-content:center;gap:32px;padding:32px 20px;animation:demo-card-flip-in 600ms cubic-bezier(.4,0,.2,1) both;transform-origin:center;backface-visibility:hidden}
.demo-card .multistage-compact .quiz-actions:has(.cta){display:flex;flex-direction:column;align-items:center;gap:24px;padding:0;width:100%;background:none;border:0;box-shadow:none;grid-template-columns:none}
.demo-card .multistage-compact .finished-hint{font-size:4.5rem;line-height:1;font-weight:700;color:#fff}
.demo-card .multistage-compact .verdict-ok{color:#4ade80}
.demo-card .multistage-compact .verdict-err{color:#f87171}
.demo-card .multistage-compact a.cta{display:inline-block;padding:14px 22px;background:#3b82f6;color:#fff;text-decoration:none;border-radius:10px;font-weight:600;font-size:1rem;max-width:100%;text-align:center;transition:background .15s}
.demo-card .multistage-compact a.cta:hover{background:#60a5fa}
@media(max-width:420px){
  .demo-slide{flex:0 0 calc(100vw - 56px)}
  .demo-card{height:620px}
}

.carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:50%;background:var(--bg);border:1px solid var(--line);color:var(--fg);font:inherit;font-size:1.5rem;line-height:1;cursor:pointer;z-index:2;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(0,0,0,.06)}
.carousel-arrow:hover{border-color:var(--fg);background:#fafafa}
.carousel-arrow:disabled{opacity:.4;cursor:default}
.carousel-prev{left:-4px}
.carousel-next{right:-4px}
@media(max-width:520px){
  .carousel-arrow{display:none}
}

.demos-dots{display:flex;justify-content:center;gap:8px;margin-top:14px}
.demos-dots span{width:8px;height:8px;border-radius:50%;background:var(--line);transition:background .15s}
.demos-dots span.is-active{background:var(--fg)}

.signup-section .signup{margin:0 auto}
.demos-cta-lead{color:var(--mute);font-size:.95rem;margin:0 0 12px;text-align:center}
.demos-cta-note{color:var(--mute);font-size:.95rem;margin:0 0 14px;text-align:center}
/* Primary = real button (dark filled), secondary = plain text link below it.
 * Two buttons side-by-side felt like a fork in the road; the text-link makes
 * the hierarchy obvious — Sign up is THE call to action, "Or try without
 * signup" is a low-commitment escape hatch. */
.demos-cta-buttons{display:flex;flex-direction:column;align-items:center;gap:14px;margin:0 auto;width:fit-content;max-width:100%}
.demos-cta-button{display:inline-block;text-decoration:none;transition:background .15s,color .15s,border-color .15s}
.demos-cta-button.primary{padding:14px 28px;background:var(--fg);color:#fff;border-radius:8px;font-weight:600;font-size:1.05rem;text-align:center}
.demos-cta-button.primary:hover{background:var(--accent)}
.demos-cta-button.secondary{color:var(--mute);font-size:.92rem;font-weight:500;padding:4px 8px;border-bottom:1px dashed transparent}
.demos-cta-button.secondary:hover{color:var(--fg);border-bottom-color:var(--mute)}

.howto ol{padding-left:24px}
.howto li{margin-bottom:10px}
.tier{padding:18px;border:1px solid var(--line);border-radius:10px}
.tier p{color:var(--mute);font-size:.95rem}
.tier-note{color:var(--mute);font-size:.85rem;margin-top:14px;text-align:center}
footer{padding:30px 0 0;color:var(--mute);font-size:.85rem;text-align:center}
footer a{color:var(--mute)}
footer p+p{margin-top:6px}
@media(min-width:720px){
  .demos-grid{grid-template-columns:repeat(3,1fr)}
  .tiers-grid{grid-template-columns:repeat(3,1fr)}
  .signup{flex-direction:row;flex-wrap:wrap}
  .signup input[type=email]{flex:1;min-width:240px}
  .signup button{flex:0 0 auto}
  .signup .privacy,.signup .form-message{flex:1 0 100%}
}
@media(max-width:520px){
  .lang-switch button{display:none}
  .lang-select{display:inline-block;padding:8px 10px;font:inherit;font-size:.9rem;background:var(--bg);border:1px solid var(--line);border-radius:6px}
}
