/* =============================================================================
   LangOrbit marketing site — "Ink & Paper·Night" (deep-cosmos) reskin.
   Token-driven: same class names as site.css, retokenised to the app's Night
   theme — blue-black cosmos, star-dust, terracotta accent, crisp 4px geometry,
   Schibsted Grotesk display + Literata reading face. Dark by design.
   ============================================================================= */

/* ---- Ink & Paper type stack — self-hosted, see /static/css/fonts-ink.css
   (no Google Fonts @import: keeps the site free of third-party requests). ---- */

:root {
    --radius-xs: 3px;
    --radius-sm: 4px;
    --radius: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-pill: 4px;

    --transition: 200ms cubic-bezier(.2, .6, .2, 1);
    --font: 'Schibsted Grotesk', -apple-system, system-ui, sans-serif;
    --font-reading: 'Literata', Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
    --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
    --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;
    --space-32: 128px;

    --type-display-size: clamp(40px, 5.6vw, 64px);
    --type-display-line: 1.06;
    --type-display-track: -0.025em;
    --type-h2-size: clamp(28px, 3.6vw, 40px);
    --type-h2-line: 1.14;
    --type-h2-track: -0.02em;
    --type-h3-size: 20px;
    --type-h3-line: 28px;
    --type-body-l-size: 18px;
    --type-body-l-line: 29px;
    --type-body-size: 16px;
    --type-body-line: 26px;
    --type-caption-size: 13px;
    --type-caption-line: 18px;

    --container-max: 1140px;
    --container-narrow: 720px;

    /* reading-surface type (matches app) */
    --reading-size: 19px;
    --reading-line: 32px;
}

:root {
    --bg:           #0b0e15;
    --bg-secondary: #10131d;
    --bg-elevated:  #141826;
    --card-bg:      #141826;
    --card-border:  rgba(230, 232, 240, 0.12);
    --card-hover:   #1b2030;

    --text:           #e6e8f0;
    --text-secondary: #9298a8;
    --hint:           #5c6373;
    --on-surface-rgb: 230, 232, 240;

    --accent:        #e07a4e;
    --accent-rgb:    224, 122, 78;
    --accent-strong: #ef8a5c;
    --accent-soft:   rgba(224, 122, 78, 0.14);

    --warning:  #e0b25a;
    --warning-rgb: 224, 178, 90;
    --success:  #9cc77f;
    --grammar:  #8aa6e0;          /* cool starlight — grammar reads against terracotta */
    --grammar-rgb: 138, 166, 224;

    /* word-state highlighting (the Reader's signature) */
    --word-new-bg:        rgba(224, 122, 78, 0.16);
    --word-new-line:      var(--accent);
    --word-seen-bg:       rgba(224, 122, 78, 0.07);
    --word-learning-line: var(--accent);
    --word-familiar-line: rgba(224, 122, 78, 0.45);

    --button-text: #190f08;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-3: 0 18px 50px rgba(0, 0, 0, 0.62);
    --shadow-render: 0 30px 70px -28px rgba(0, 0, 0, 0.75), 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* This site is Night-by-design — no OS-driven theme switch. The cosmos palette
   above is the single source of truth for both light and dark systems. */

/* ----- Base ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    background-image:
        radial-gradient(1.5px 1.5px at 12% 8%, rgba(255,255,255,.6), transparent 60%),
        radial-gradient(1px 1px at 28% 5%, rgba(255,255,255,.4), transparent 60%),
        radial-gradient(1.5px 1.5px at 62% 11%, rgba(255,255,255,.5), transparent 60%),
        radial-gradient(1px 1px at 82% 6%, rgba(255,255,255,.4), transparent 60%),
        radial-gradient(1px 1px at 8% 24%, rgba(255,255,255,.4), transparent 60%),
        radial-gradient(1.5px 1.5px at 92% 20%, rgba(255,255,255,.45), transparent 60%),
        radial-gradient(1px 1px at 46% 16%, rgba(255,255,255,.35), transparent 60%),
        radial-gradient(620px 520px at 88% -4%, rgba(224,122,78,.10), transparent 70%),
        radial-gradient(720px 640px at 4% 2%, rgba(120,150,220,.06), transparent 72%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font);
    font-size: var(--type-body-size);
    line-height: var(--type-body-line);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-strong); }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

.container { max-width: var(--container-max); margin: 0 auto; padding-inline: var(--space-6); }
.muted { color: var(--text-secondary); }
.center { text-align: center; }

/* ----- Buttons -------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
    padding: 11px 20px; border: 1px solid transparent; border-radius: var(--radius-pill);
    font-weight: 600; font-size: 15px; line-height: 1; cursor: pointer;
    font-family: var(--font); white-space: nowrap;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn svg { width: 17px; height: 17px; }
.btn--primary { background: var(--accent); color: var(--button-text); box-shadow: 0 1px 2px rgba(var(--accent-rgb), .35), 0 8px 22px -10px rgba(var(--accent-rgb), .7); }
.btn--primary:hover { background: var(--accent-strong); color: var(--button-text); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: rgba(var(--on-surface-rgb), 0.16); }
.btn--ghost:hover { background: rgba(var(--on-surface-rgb), 0.05); color: var(--text); border-color: rgba(var(--on-surface-rgb), .26); }
.btn--lg { padding: 15px 30px; font-size: 16px; }

/* ----- Header --------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    background-color: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--card-border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: var(--space-4); }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--text); font-weight: 700; letter-spacing: -0.02em; font-size: 19px; }
.brand:hover { color: var(--text); }
.brand__mark { width: 30px; height: 30px; }
.site-header__nav { display: none; gap: var(--space-6); margin-left: auto; margin-right: var(--space-2); }
.site-header__nav a { color: var(--text-secondary); font-size: 15px; font-weight: 500; }
.site-header__nav a:hover { color: var(--text); }
@media (min-width: 880px) { .site-header__nav { display: flex; } }

/* ----- Hero ----------------------------------------------------------- */
.hero { position: relative; padding-top: var(--space-20); padding-bottom: var(--space-16); overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: -40% 0 auto 0; height: 760px; z-index: 0;
    background: radial-gradient(54% 60% at 50% 0%, var(--accent-soft) 0%, transparent 68%);
    pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; text-align: center; max-width: 860px; margin: 0 auto; }
.eyebrow {
    display: inline-flex; align-items: center; gap: var(--space-2);
    margin: 0 0 var(--space-5); padding: 5px 14px 5px 10px;
    border: 1px solid rgba(var(--accent-rgb), .22); border-radius: var(--radius-pill);
    background: var(--accent-soft); color: var(--accent);
    font-size: var(--type-caption-size); font-weight: 600; letter-spacing: 0.01em;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 26%, transparent); }
.hero__title { margin: 0 0 var(--space-5); font-size: var(--type-display-size); line-height: var(--type-display-line); font-weight: 700; letter-spacing: var(--type-display-track); }
.hero__title .accent { color: var(--accent); }
.hero__lede { margin: 0 auto var(--space-8); max-width: 660px; font-size: var(--type-body-l-size); line-height: var(--type-body-l-line); color: var(--text-secondary); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }
.hero__note { margin: var(--space-5) 0 0; font-size: var(--type-caption-size); color: var(--hint); }
.hero__render { position: relative; z-index: 1; margin-top: var(--space-16); }

/* ----- Sections ------------------------------------------------------- */
.section { padding-top: var(--space-24); padding-bottom: var(--space-24); }
.section--tint { background: var(--bg-secondary); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto var(--space-16); }
.kicker { margin: 0 0 var(--space-3); font-size: var(--type-caption-size); letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.section__title { margin: 0 0 var(--space-4); font-size: var(--type-h2-size); line-height: var(--type-h2-line); font-weight: 650; letter-spacing: var(--type-h2-track); }
.section__sub { margin: 0; color: var(--text-secondary); font-size: var(--type-body-l-size); line-height: var(--type-body-l-line); }

/* ----- Product cards (hub) ------------------------------------------- */
.product-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-6); }
@media (min-width: 820px) { .product-grid { grid-template-columns: 1fr 1fr; } }
.product-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius-xl); padding: var(--space-10);
    box-shadow: var(--shadow-1); transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    overflow: hidden;
}
.product-card--live::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}
.product-card--live:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: rgba(var(--accent-rgb), .3); }
.product-card--soon { background: transparent; box-shadow: none; }
.product-tag {
    display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
    margin-bottom: var(--space-5); padding: 5px 12px; border-radius: var(--radius-pill);
    font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.product-tag--live { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.product-tag--live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.product-tag--soon { background: rgba(var(--on-surface-rgb), .06); color: var(--hint); }
.product-card__icon { width: 48px; height: 48px; margin-bottom: var(--space-5); border-radius: var(--radius); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.product-card__icon svg { width: 26px; height: 26px; }
.product-card--soon .product-card__icon { background: rgba(var(--on-surface-rgb), .05); color: var(--hint); }
.product-card__title { margin: 0 0 var(--space-3); font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.product-card__body { margin: 0 0 var(--space-6); color: var(--text-secondary); flex: 1; }
.product-card__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.product-card__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.product-card__list li { position: relative; padding-left: 26px; color: var(--text-secondary); font-size: 15px; line-height: 23px; }
.product-card__list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: rgba(var(--on-surface-rgb), .2); }

/* ----- Feature alternating rows -------------------------------------- */
.feature { display: grid; grid-template-columns: 1fr; gap: var(--space-8); align-items: center; margin-bottom: var(--space-24); }
.feature:last-child { margin-bottom: 0; }
@media (min-width: 900px) {
    .feature { grid-template-columns: 1fr 1fr; gap: var(--space-16); }
    .feature--reverse .feature__copy { order: 2; }
}
.feature__step { display: inline-flex; align-items: center; gap: 8px; margin-bottom: var(--space-4); font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .02em; }
.feature__step .n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); font-size: 13px; }
.feature__title { margin: 0 0 var(--space-4); font-size: var(--type-h2-size); line-height: var(--type-h2-line); font-weight: 650; letter-spacing: var(--type-h2-track); }
.feature__body { margin: 0 0 var(--space-5); color: var(--text-secondary); font-size: var(--type-body-l-size); line-height: var(--type-body-l-line); }
.feature__points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.feature__points li { position: relative; padding-left: 28px; color: var(--text-secondary); }
.feature__points li svg { position: absolute; left: 0; top: 3px; width: 18px; height: 18px; color: var(--accent); }

/* ----- Small feature grid -------------------------------------------- */
.mini-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--space-5); }
@media (min-width: 720px) { .mini-grid { grid-template-columns: repeat(3, 1fr); } }
.mini-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: var(--space-6); box-shadow: var(--shadow-1); }
.mini-card__icon { width: 38px; height: 38px; margin-bottom: var(--space-4); border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.mini-card__icon svg { width: 20px; height: 20px; }
.mini-card__title { margin: 0 0 var(--space-2); font-size: 17px; font-weight: 650; }
.mini-card__body { margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 23px; }

/* ----- Steps (how) ---------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--space-6); counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); } }
.step { position: relative; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: var(--space-8) var(--space-6) var(--space-6); box-shadow: var(--shadow-1); }
.step__num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--radius-pill); background: var(--accent); color: var(--button-text); font-weight: 700; font-size: 15px; margin-bottom: var(--space-4); }
.step__title { margin: 0 0 var(--space-2); font-size: var(--type-h3-size); line-height: var(--type-h3-line); font-weight: 650; }
.step__body { margin: 0; color: var(--text-secondary); }

/* ----- Who: compare --------------------------------------------------- */
.who-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-6); }
@media (min-width: 760px) { .who-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }
.who-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: var(--space-8); box-shadow: var(--shadow-1); }
.who-card--muted { background: transparent; box-shadow: none; }
.who-card__title { margin: 0 0 var(--space-5); font-size: var(--type-h3-size); font-weight: 650; }
.who-list { margin: 0; padding: 0; list-style: none; }
.who-list li { position: relative; padding: var(--space-3) 0 var(--space-3) var(--space-8); line-height: 25px; border-top: 1px solid var(--card-border); }
.who-list li:first-child { border-top: none; }
.who-list li svg { position: absolute; left: 0; top: 14px; width: 19px; height: 19px; color: var(--accent); }
.who-list--muted { color: var(--text-secondary); }
.who-list--muted li svg { color: var(--hint); }

/* ----- FAQ ------------------------------------------------------------ */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-3); }
.faq details { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 2px var(--space-6); box-shadow: var(--shadow-1); transition: border-color var(--transition); }
.faq details[open] { border-color: rgba(var(--accent-rgb), .3); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) 0; font-size: 17px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { flex-shrink: 0; width: 22px; height: 22px; color: var(--hint); transition: transform var(--transition); }
.faq details[open] summary .chev { transform: rotate(180deg); color: var(--accent); }
.faq__body { margin: 0; padding: 0 0 var(--space-6); color: var(--text-secondary); max-width: 64ch; }

/* ----- CTA box -------------------------------------------------------- */
.cta-box { position: relative; text-align: center; max-width: 820px; margin: 0 auto; padding: var(--space-16) var(--space-8); background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-xl); box-shadow: var(--shadow-2); overflow: hidden; }
.cta-box::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 240px; background: radial-gradient(60% 100% at 50% 0%, var(--accent-soft), transparent 70%); pointer-events: none; }
.cta-box > * { position: relative; }
.cta-box__title { margin: 0 0 var(--space-4); font-size: var(--type-h2-size); line-height: var(--type-h2-line); font-weight: 650; letter-spacing: var(--type-h2-track); }
.cta-box__sub { margin: 0 auto var(--space-8); max-width: 540px; color: var(--text-secondary); font-size: var(--type-body-l-size); line-height: var(--type-body-l-line); }
.cta-box__note { margin: var(--space-5) 0 0; font-size: var(--type-caption-size); color: var(--hint); }

/* ----- Footer --------------------------------------------------------- */
.site-footer { padding-top: var(--space-16); padding-bottom: var(--space-12); background: var(--bg); border-top: 1px solid var(--card-border); color: var(--text-secondary); font-size: 14px; }
.site-footer__top { display: grid; grid-template-columns: 1fr; gap: var(--space-8); align-items: start; margin-bottom: var(--space-10); }
@media (min-width: 760px) { .site-footer__top { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer__brand .brand { font-size: 18px; margin-bottom: var(--space-3); }
.site-footer__tagline { margin: 0; max-width: 320px; color: var(--text-secondary); }
.footer-col h4 { margin: 0 0 var(--space-4); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--hint); font-weight: 600; }
.footer-col nav { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a { color: var(--text-secondary); }
.footer-col a:hover { color: var(--accent); }
.site-footer__lang { display: flex; flex-wrap: wrap; gap: var(--space-2); padding-top: var(--space-8); border-top: 1px solid var(--card-border); margin-bottom: var(--space-5); }
.lang-pill { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: var(--radius-pill); border: 1px solid var(--card-border); color: var(--text-secondary); font-size: 13px; font-weight: 500; transition: all var(--transition); }
.lang-pill:hover { background: rgba(var(--on-surface-rgb), 0.05); color: var(--text); }
.lang-pill--current { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.site-footer__copy { margin: 0; font-size: 13px; color: var(--hint); }

/* =============================================================================
   PRODUCT RENDERS — authentic HTML/CSS recreations of the Reader UI.
   ============================================================================= */
.render { position: relative; }
.browser {
    border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-elevated);
    border: 1px solid var(--card-border); box-shadow: var(--shadow-render);
}
.browser__bar { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; background: color-mix(in srgb, var(--bg) 60%, var(--bg-secondary)); border-bottom: 1px solid var(--card-border); }
.browser__dots { display: flex; gap: 7px; }
.browser__dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.browser__dots i:nth-child(1) { background: #e0606c; }
.browser__dots i:nth-child(2) { background: #d4a13c; }
.browser__dots i:nth-child(3) { background: #4cae82; }
.browser__url { flex: 1; max-width: 380px; margin: 0 auto; height: 26px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--card-border); font-size: 12px; color: var(--text-secondary); }
.browser__url svg { width: 12px; height: 12px; color: var(--hint); }
.browser__body { background: var(--bg-elevated); }

/* reading surface */
.reader-surf { padding: clamp(18px, 3vw, 30px); }
.reader-surf__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-6); padding-bottom: var(--space-4); border-bottom: 1px solid var(--card-border); }
.reader-surf__title { font-size: 13px; font-weight: 600; color: var(--text); }
.reader-surf__title span { display: block; font-size: 11px; font-weight: 500; color: var(--hint); margin-top: 2px; }
.reader-surf__chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--accent); padding: 4px 10px; border-radius: var(--radius-pill); background: var(--accent-soft); }

.parallel { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 34px); }
.parallel__col { min-width: 0; }
.parallel__lang { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); margin: 0 0 var(--space-4); }
.parallel__lang.is-native { color: var(--hint); }
.read-text { font-size: var(--reading-size); line-height: var(--reading-line); color: var(--text); margin: 0; }
.read-text p { margin: 0 0 var(--space-4); }
.read-text p:last-child { margin-bottom: 0; }
.read-text .dim { color: var(--text-secondary); }
/* one sentence revealed, rest hushed */
.read-text .veil { color: color-mix(in srgb, var(--text) 22%, transparent); }

/* word states */
.w { border-radius: 3px; padding: 0 2px; cursor: pointer; }
.w--new { background: var(--word-new-bg); border-bottom: 2px solid var(--word-new-line); padding-bottom: 1px; }
.w--seen { background: var(--word-seen-bg); }
.w--learning { border-bottom: 2px solid var(--word-learning-line); padding: 0; border-radius: 0; }
.w--familiar { border-bottom: 1.5px dotted var(--word-familiar-line); padding: 0; border-radius: 0; }
.w--active { background: var(--accent); color: #fff; box-shadow: 0 2px 10px rgba(var(--accent-rgb), .5); border-bottom-color: transparent; }
/* in-context grammar span */
.g { background: rgba(var(--grammar-rgb), 0.16); border-bottom: 2px solid var(--grammar); border-radius: 3px; padding: 0 2px 1px; cursor: pointer; }

/* reveal slider */
.reveal-bar { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--card-border); }
.reveal-bar__track { flex: 1; height: 5px; border-radius: 3px; background: rgba(var(--on-surface-rgb), .1); position: relative; }
.reveal-bar__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 52%; border-radius: 3px; background: var(--accent); }
.reveal-bar__knob { position: absolute; left: 52%; top: 50%; transform: translate(-50%, -50%); width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: var(--shadow-1); }
.reveal-bar__label { font-size: 12px; color: var(--hint); white-space: nowrap; }

/* legend */
.legend { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-5); }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-secondary); }
.legend .sw { width: 22px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.legend .sw--new { background: var(--word-new-bg); border-bottom: 2px solid var(--accent); }
.legend .sw--learning { border-bottom: 2px solid var(--warning); }
.legend .sw--familiar { border-bottom: 1.5px dotted var(--word-familiar-line); }
.legend .sw--grammar { background: rgba(var(--grammar-rgb), .16); border-bottom: 2px solid var(--grammar); }

/* ---- dictionary word card ---- */
.dict-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow-2); overflow: hidden; }
.dict-card__top { padding: var(--space-5) var(--space-6) var(--space-4); }
.dict-card__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); margin: 0 0 var(--space-3); }
.dict-card__headrow { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.dict-card__word { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.dict-card__meta { margin-top: 5px; font-size: 13px; color: var(--hint); }
.dict-card__audio { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; cursor: pointer; transition: background var(--transition); }
.dict-card__audio:hover { background: rgba(var(--accent-rgb), .18); }
.dict-card__audio svg { width: 18px; height: 18px; }
.dict-card__sec { padding: 0 var(--space-6); }
.dict-card__label { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; color: var(--text-secondary); margin: var(--space-4) 0 var(--space-2); }
.dict-card__sense { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 3px; }
.dict-card__gloss { font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 20px; }
.dict-card__example { margin: var(--space-4) var(--space-6); padding: var(--space-4); border-radius: var(--radius-sm); background: var(--bg); border-left: 3px solid var(--accent); }
.dict-card__example .en { font-size: 14px; line-height: 21px; }
.dict-card__example .en mark { background: var(--word-new-bg); color: inherit; border-radius: 3px; padding: 0 2px; font-weight: 600; }
.dict-card__example .ru { font-size: 13px; color: var(--text-secondary); margin-top: 5px; }
.dict-card__actions { display: flex; gap: var(--space-3); padding: 0 var(--space-6) var(--space-6); }
.dict-card__actions .btn { flex: 1; }

/* orbit chip (FSRS schedule note) */
.orbit-note { display: flex; align-items: center; gap: var(--space-3); margin: 0 var(--space-6) var(--space-6); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--card-border); }
.orbit-note__viz { flex-shrink: 0; }
.orbit-note__text { font-size: 12.5px; color: var(--text-secondary); line-height: 18px; }
.orbit-note__text b { color: var(--text); font-weight: 650; }

/* ---- grammar reference card ---- */
.gref { background: var(--bg-secondary); border: 1px solid var(--card-border); border-radius: var(--radius); padding: var(--space-6) var(--space-6) var(--space-5); box-shadow: var(--shadow-2); }
.gref__head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-2); }
.gref__level { background: var(--accent); color: var(--button-text); padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.gref__title { font-size: 21px; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.gref__cat { font-size: 13px; color: var(--hint); margin: 0 0 var(--space-4); }
.gref__form { font-family: var(--font-mono); background: var(--bg-elevated); border: 1px solid var(--card-border); border-radius: 8px; padding: 8px 12px; font-size: 14px; margin-bottom: var(--space-4); display: inline-block; }
.gref__gist { font-size: 16px; line-height: 1.55; margin: 0 0 var(--space-5); }
.gref__seclabel { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--hint); margin: 0 0 var(--space-2); font-weight: 600; }
.gref__example { background: rgba(var(--on-surface-rgb), 0.04); border-left: 3px solid var(--grammar); border-radius: 8px; padding: 10px 14px; margin-bottom: var(--space-3); }
.gref__example .en { font-size: 15px; line-height: 1.5; }
.gref__example .en mark { background: rgba(var(--grammar-rgb), 0.22); border-radius: 4px; padding: 0 3px; color: inherit; }
.gref__example .ru { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.gref__pitfall { display: flex; gap: 10px; background: rgba(var(--warning-rgb, 196, 119, 21), 0.1); border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; line-height: 20px; color: var(--text-secondary); }
.gref__pitfall svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--warning); margin-top: 1px; }
.gref__pitfall b { color: var(--text); }

/* grammar row inline trigger (appears under a sentence) */
.gram-row { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--space-3); padding: 6px 12px 6px 10px; border-radius: var(--radius-pill); background: rgba(var(--grammar-rgb), 0.1); border: 1px solid rgba(var(--grammar-rgb), 0.28); color: var(--grammar); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.gram-row svg { width: 15px; height: 15px; }

/* ---- upload / dropzone ---- */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--space-3); padding: var(--space-12) var(--space-8); margin: var(--space-2); border: 2px dashed rgba(var(--accent-rgb), 0.4); border-radius: var(--radius-lg); background: var(--accent-soft); }
.dropzone__icon { width: 56px; height: 56px; border-radius: var(--radius); background: var(--bg-elevated); display: grid; place-items: center; color: var(--accent); box-shadow: var(--shadow-1); }
.dropzone__icon svg { width: 28px; height: 28px; }
.dropzone__title { font-size: 17px; font-weight: 650; }
.dropzone__sub { font-size: 13px; color: var(--text-secondary); }
.dropzone__formats { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
.dropzone__formats span { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--accent); padding: 3px 10px; border-radius: var(--radius-pill); background: var(--bg-elevated); border: 1px solid var(--card-border); }
.upload-file { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-4) var(--space-2) var(--space-2); padding: var(--space-4); border-radius: var(--radius); background: var(--card-bg); border: 1px solid var(--card-border); box-shadow: var(--shadow-1); }
.upload-file__ico { width: 40px; height: 46px; flex-shrink: 0; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-family: var(--font-mono); font-size: 10px; font-weight: 700; }
.upload-file__meta { flex: 1; min-width: 0; }
.upload-file__name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-file__sub { font-size: 12px; color: var(--hint); margin-top: 2px; }
.upload-file__bar { height: 4px; border-radius: 2px; background: rgba(var(--on-surface-rgb), .1); margin-top: 7px; overflow: hidden; }
.upload-file__bar i { display: block; height: 100%; width: 100%; background: var(--success); border-radius: 2px; }
.upload-file__check { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; }
.upload-file__check svg { width: 14px; height: 14px; }

/* floating render caption */
.render__caption { margin-top: var(--space-4); text-align: center; font-size: 13px; color: var(--hint); }

/* generic reveal-on-scroll */
.fx { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.fx.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fx { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--button-text); padding: 10px 16px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 8px; }

/* =============================================================================
   INK & PAPER · NIGHT — editorial refinements layered over the structural CSS
   ============================================================================= */

/* Book text — actual prose — is set in the Literata reading face, the one
   serif in the system. UI text around it stays grotesk. */
.read-text,
.dict-card__example .en,
.gref__example .en,
.gref__gist { font-family: var(--font-reading); }
.read-text { letter-spacing: .005em; }

/* Eyebrow / kicker → monospace, tracked, uppercase (the app's "надсловник"). */
.eyebrow {
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: 11px; font-weight: 500;
    letter-spacing: .14em; text-transform: uppercase;
}
.kicker { font-family: var(--font-mono); font-weight: 500; letter-spacing: .18em; }
.parallel__lang { font-family: var(--font-mono); letter-spacing: .18em; }
.feature__step { font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; font-size: 11px; }
.product-tag { font-family: var(--font-mono); letter-spacing: .12em; }
.dict-card__eyebrow,
.dict-card__label,
.gref__seclabel { font-family: var(--font-mono); letter-spacing: .12em; }

/* Display headings: grotesk, tight, large. The hero word-mark stays normal
   weight — drama comes from scale + the cosmos behind it, not bolding. */
.hero__title { font-weight: 600; }
.section__title, .feature__title, .cta-box__title { font-weight: 600; }

/* Crisp editorial border on the live product card instead of a soft glow. */
.product-card--live { border-color: rgba(var(--accent-rgb), .35); }
.product-card--live::before { background: var(--accent); }

/* Star-dust never scrolls past the footer edge harshly — soften long pages. */
.site-footer { background: transparent; }

/* =============================================================================
   HERO DIRECTIONS (A/B) + abstract visuals + offline feature
   ============================================================================= */

/* A/B chooser — a small fixed control; not part of the shipped page. */
.hero-switch {
    position: fixed; bottom: 18px; right: 18px; z-index: 80;
    display: flex; align-items: center; gap: 2px;
    padding: 4px; border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--bg-elevated) 86%, transparent);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-2);
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
}
.hero-switch__lbl { color: var(--hint); padding: 0 8px; text-transform: uppercase; }
.hero-switch button {
    border: none; cursor: pointer; background: transparent; color: var(--text-secondary);
    font: inherit; padding: 6px 12px; border-radius: var(--radius-pill); transition: all var(--transition);
}
.hero-switch button[data-on="1"] { background: var(--accent); color: var(--button-text); }

/* show only the active direction */
body[data-hero="a"] .hero--b,
body[data-hero="b"] .hero--a { display: none; }

/* ---- Direction A: declarative, centered, constellation below ---- */
.hero-constel {
    position: relative; margin: var(--space-12) auto 0; max-width: 720px; height: 300px;
}
.hero-constel svg { width: 100%; height: 100%; overflow: visible; }
.hero-chip {
    position: absolute; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
    padding: 5px 11px; border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--bg-elevated) 80%, transparent);
    border: 1px solid var(--card-border); color: var(--text-secondary);
    white-space: nowrap; backdrop-filter: blur(4px);
}
.hero-chip b { color: var(--accent); font-weight: 500; }
.hero-chip--g b { color: var(--grammar); }

/* ---- Direction B: split, transformation typography ---- */
.hero--b .hero__inner { text-align: left; max-width: var(--container-max); margin: 0; }
.hero-split { display: grid; grid-template-columns: 1fr; gap: var(--space-12); align-items: center; }
@media (min-width: 900px) { .hero-split { grid-template-columns: 1.05fr .95fr; gap: var(--space-16); } }
.hero--b .hero__title .line2 { color: var(--accent); display: block; }
.hero--b .hero__cta { justify-content: flex-start; }
.hero-transform {
    position: relative; padding: var(--space-8); border-radius: var(--radius-lg);
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg-elevated) 70%, transparent), transparent);
    border: 1px solid var(--card-border); box-shadow: var(--shadow-render);
}
.hero-transform__tag {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--hint); margin: 0 0 var(--space-4);
}
.hero-transform__text { font-family: var(--font-reading); font-size: 22px; line-height: 38px; color: var(--text); margin: 0; }
.hero-transform__text .w { cursor: default; }

/* ---- Offline feature visual ---- */
.offline-card {
    max-width: 360px; margin: 0 auto; padding: var(--space-6);
    border-radius: var(--radius-lg); background: var(--card-bg);
    border: 1px solid var(--card-border); box-shadow: var(--shadow-render);
}
.offline-card__row { display: flex; align-items: center; gap: var(--space-4); }
.offline-card__cover {
    width: 64px; height: 92px; flex-shrink: 0; border-radius: var(--radius-sm); position: relative;
    background:
        repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(var(--accent-rgb), .12) 5px, rgba(var(--accent-rgb), .12) 6px),
        var(--bg-secondary);
    border: 1px solid var(--card-border);
}
.offline-card__badge {
    position: absolute; right: -8px; bottom: -8px; width: 30px; height: 30px; border-radius: 50%;
    background: var(--success); color: var(--bg); display: grid; place-items: center; box-shadow: var(--shadow-1);
}
.offline-card__badge svg { width: 16px; height: 16px; }
.offline-card__title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.offline-card__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--hint); margin-top: 4px; }
.offline-card__state {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 10px;
    font-size: 12.5px; font-weight: 600; color: var(--success);
}
.offline-card__state svg { width: 15px; height: 15px; }
.offline-card__foot {
    display: flex; align-items: center; gap: 10px; margin-top: var(--space-5);
    padding-top: var(--space-4); border-top: 1px solid var(--card-border);
    font-size: 12.5px; color: var(--text-secondary);
}
.offline-card__foot svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; }

/* =============================================================================
   PER-BOOK SEO LANDING — cover, meta, related-books strip, about
   ============================================================================= */
.book-hero { padding-top: var(--space-16); padding-bottom: var(--space-12); }
.book-hero__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-10); align-items: center; }
@media (min-width: 860px) { .book-hero__grid { grid-template-columns: 280px 1fr; gap: var(--space-16); } }
.book-hero__copy .eyebrow { margin-bottom: var(--space-4); }
.book-hero__title { margin: 0 0 var(--space-4); font-size: clamp(32px, 4.4vw, 52px); line-height: 1.07; font-weight: 600; letter-spacing: -.025em; }
.book-hero__title .accent { color: var(--accent); }
.book-hero__lede { margin: 0 0 var(--space-6); max-width: 60ch; font-size: var(--type-body-l-size); line-height: var(--type-body-l-line); color: var(--text-secondary); }

/* book cover — striped board, title set in the reading serif */
.book-cover {
    position: relative; width: 240px; max-width: 80%; aspect-ratio: 2 / 3; margin: 0 auto;
    border-radius: var(--radius-sm); border: 1px solid var(--card-border);
    background:
        repeating-linear-gradient(45deg, transparent, transparent 7px, rgba(var(--accent-rgb), .10) 7px, rgba(var(--accent-rgb), .10) 8px),
        linear-gradient(160deg, var(--bg-elevated), var(--bg-secondary));
    box-shadow: var(--shadow-render);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: var(--space-6); overflow: hidden;
}
.book-cover::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--accent); opacity: .8;
}
.book-cover__author { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.book-cover__title { font-family: var(--font-reading); font-size: 26px; line-height: 1.12; font-weight: 600; color: var(--text); margin: 0; }
.book-cover__rule { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--card-border); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; color: var(--hint); }

/* meta stat row */
.book-stats { display: flex; flex-wrap: wrap; gap: var(--space-6) var(--space-8); margin: var(--space-6) 0 var(--space-8); padding: var(--space-5) 0; border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); }
.book-stat__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--hint); margin-bottom: 5px; }
.book-stat__val { font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: var(--text); }

/* related-books strip (internal linking) */
.booklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
@media (min-width: 720px) { .booklist { grid-template-columns: repeat(4, 1fr); } }
.book-card { display: flex; flex-direction: column; gap: var(--space-3); color: var(--text); }
.book-card__cover {
    aspect-ratio: 2 / 3; border-radius: var(--radius-sm); border: 1px solid var(--card-border);
    background:
        repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(var(--accent-rgb), .09) 6px, rgba(var(--accent-rgb), .09) 7px),
        linear-gradient(160deg, var(--bg-elevated), var(--bg-secondary));
    box-shadow: var(--shadow-1); display: flex; align-items: flex-end; padding: 14px;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.book-card:hover .book-card__cover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), .4); box-shadow: var(--shadow-2); }
.book-card__cover span { font-family: var(--font-reading); font-size: 15px; font-weight: 600; line-height: 1.15; color: var(--text); }
.book-card__name { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.book-card__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--hint); }

/* about-the-book prose */
.book-about { max-width: 68ch; }
.book-about p { color: var(--text-secondary); font-size: var(--type-body-l-size); line-height: var(--type-body-l-line); margin: 0 0 var(--space-4); }
.book-about p:last-child { margin-bottom: 0; }
.book-about .read-text { font-family: var(--font-reading); }

/* =============================================================================
   HUB FEATURE RENDERS — generated story, exercise chain, grammar practice,
   in-app reader, honest progress. Same hand-built-UI language as the Reader
   renders above.
   ============================================================================= */

/* 4-step method grid (hub) */
@media (min-width: 1020px) { .steps--4 { grid-template-columns: repeat(4, 1fr); } }

/* story interest/level tags (hero render) */
.story-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); }
.story-tag {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
    padding: 4px 11px; border-radius: var(--radius-pill);
    background: var(--accent-soft); border: 1px solid rgba(var(--accent-rgb), .26); color: var(--accent);
}
.story-tag--lvl { background: rgba(var(--grammar-rgb), .12); border-color: rgba(var(--grammar-rgb), .3); color: var(--grammar); }

/* shared mini-eyebrow for bare cards */
.gen-eyebrow { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); margin: 0 0 var(--space-4); text-transform: uppercase; }

/* ---- story generator panel ---- */
.gen-panel { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-render); }
.gen-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--hint); margin: 0 0 var(--space-2); }
.gen-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); }
.gen-chips span {
    padding: 6px 13px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 500;
    border: 1px solid var(--card-border); color: var(--text-secondary); background: transparent;
}
.gen-chips span.is-on { background: var(--accent-soft); border-color: rgba(var(--accent-rgb), .4); color: var(--accent); font-weight: 600; }
.gen-meta { display: grid; grid-template-columns: auto 1fr; gap: var(--space-6); margin-bottom: var(--space-5); }
.gen-level { display: inline-block; font-family: var(--font-mono); font-size: 14px; font-weight: 700; padding: 5px 12px; border-radius: var(--radius-sm); background: rgba(var(--grammar-rgb), .12); border: 1px solid rgba(var(--grammar-rgb), .3); color: var(--grammar); }
.gen-words { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.gen-words span { font-family: var(--font-mono); font-size: 12px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--word-new-bg); border: 1px solid rgba(var(--accent-rgb), .2); color: var(--text); }
.gen-words span.more { background: transparent; border-style: dashed; color: var(--hint); }
.gen-btn { width: 100%; }
.gen-result { margin-top: var(--space-5); padding: var(--space-4) var(--space-5); border-radius: var(--radius-sm); background: var(--bg); border-left: 3px solid var(--accent); }
.gen-result__title { font-family: var(--font-reading); font-size: 15px; font-weight: 650; margin: 0 0 var(--space-2); }
.gen-result__text { font-family: var(--font-reading); font-size: 14.5px; line-height: 23px; color: var(--text-secondary); margin: 0; }

/* ---- exercise card ---- */
.exo-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-render); }
.exo-stages { display: flex; gap: 7px; margin-bottom: var(--space-2); }
.exo-stages i { flex: 1; height: 5px; border-radius: 3px; background: rgba(var(--on-surface-rgb), .12); }
.exo-stages i.is-done { background: rgba(var(--accent-rgb), .45); }
.exo-stages i.is-now { background: var(--accent); }
.exo-stagenote { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--hint); margin: 0 0 var(--space-6); }
.exo-task { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--hint); margin: 0 0 var(--space-2); }
.exo-prompt { font-size: 19px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 var(--space-4); }
.exo-input {
    display: flex; align-items: center; padding: 13px 16px; border-radius: var(--radius-sm);
    background: var(--bg); border: 1px solid rgba(var(--accent-rgb), .45);
    font-family: var(--font-mono); font-size: 17px; color: var(--text);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12);
}
.exo-caret { width: 2px; height: 20px; background: var(--accent); margin-left: 2px; animation: exo-blink 1.1s steps(1) infinite; }
@keyframes exo-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .exo-caret { animation: none; } }
.exo-hint { margin-left: auto; font-size: 12px; color: var(--hint); font-family: var(--font); }
.exo-colls { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--card-border); }
.exo-colls__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--hint); margin: 0 0 var(--space-3); }
.exo-colls__row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.exo-colls__row span { font-family: var(--font-reading); font-size: 13.5px; padding: 5px 12px; border-radius: var(--radius-pill); background: rgba(var(--on-surface-rgb), .05); border: 1px solid var(--card-border); color: var(--text-secondary); }

/* ---- grammar practice (inside .gref) ---- */
.exo-quiz { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--card-border); }
.exo-q { font-family: var(--font-reading); font-size: 15.5px; line-height: 24px; margin: 0 0 var(--space-3); }
.exo-options { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.exo-options span { padding: 8px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; border: 1px solid var(--card-border); color: var(--text-secondary); }
.exo-options span.is-right { border-color: color-mix(in srgb, var(--success) 60%, transparent); background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
.exo-due { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 12.5px; color: var(--text-secondary); }
.exo-due svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }

/* ---- in-app reader: save-word toast ---- */
.save-pop {
    display: inline-flex; align-items: center; gap: 8px; margin: var(--space-2) 0 var(--space-4);
    padding: 8px 14px; border-radius: var(--radius-pill);
    background: var(--accent); color: var(--button-text); font-size: 13px; font-weight: 650;
    box-shadow: 0 6px 18px -6px rgba(var(--accent-rgb), .6);
}
.save-pop svg { width: 15px; height: 15px; }

/* ---- progress card ---- */
.prog-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-render); }
.prog-level { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-6); }
.prog-level__now, .prog-level__next { font-family: var(--font-mono); font-size: 14px; font-weight: 700; }
.prog-level__now { color: var(--accent); }
.prog-level__next { color: var(--hint); }
.prog-level__bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(var(--on-surface-rgb), .1); overflow: hidden; }
.prog-level__bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); }
.prog-ringrow { display: flex; align-items: center; gap: var(--space-5); margin-bottom: var(--space-6); }
.prog-ring {
    width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0;
    background: conic-gradient(var(--accent) calc(var(--pct) * 1%), rgba(var(--on-surface-rgb), .1) 0);
    display: grid; place-items: center;
}
.prog-ring::before { content: ""; grid-area: 1 / 1; width: 64px; height: 64px; border-radius: 50%; background: var(--card-bg); }
.prog-ring span { grid-area: 1 / 1; font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--text); }
.prog-ring__big { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.prog-ring__sub { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.prog-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--hint); margin: 0 0 var(--space-3); }
.prog-notes { list-style: none; margin: 0 0 var(--space-5); padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.prog-notes li {
    display: flex; align-items: flex-start; gap: 9px;
    padding: 9px 12px; border-radius: var(--radius-sm);
    background: rgba(var(--on-surface-rgb), .04); border: 1px solid var(--card-border);
    font-size: 13px; line-height: 19px; color: var(--text-secondary);
}
.prog-notes li svg { flex-shrink: 0; width: 15px; height: 15px; margin-top: 2px; color: var(--success); }
.prog-notes b { color: var(--text); font-weight: 650; }
.prog-reco { display: flex; align-items: baseline; gap: var(--space-3); padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid rgba(var(--accent-rgb), .25); font-size: 13.5px; color: var(--text); }
.prog-reco__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); flex-shrink: 0; }

/* ---- Per-sentence colour markers in renders ----
   Mirrors the reader's .sync-bar: a thin rounded bar before each sentence,
   hue stepped 45deg per sentence index (--i); the sentence and its translation
   share the same --i, hence the same colour. */
.read-text .sync {
    display: inline-block;
    width: 3px; height: .95em;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: -.12em;
    background: hsl(calc(var(--i, 0) * 45deg) 75% 62%);
}
.read-text .veil .sync { opacity: .55; }

/* ---- Cookie-consent banner ----
   Fixed bottom card, shown only while the visitor is undecided (consent.js flips
   `hidden`). Buttons reuse the global .btn variants; the bar must stay readable
   above page content, hence the elevated z-index + solid panel background. */
.consent {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1000;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--bg) 92%, #000);
    border-top: 1px solid var(--border, rgba(255, 255, 255, .12));
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
}
.consent__inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.consent__text {
    margin: 0;
    flex: 1 1 320px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-soft, inherit);
}
.consent__text a { color: var(--accent); text-decoration: underline; }
.consent__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}
.consent__actions .btn { padding: 8px 18px; font-size: 14px; }
@media (max-width: 560px) {
    .consent__actions { margin-left: 0; width: 100%; }
    .consent__actions .btn { flex: 1 1 0; }
}
