/* =============================================================================
   LangOrbit marketing site — restrained sapphire-on-off-white.
   Tokens come from tokens.css ([data-theme="cool"]). This file holds layout,
   components, and the in-page product renders (browser chrome + parallel
   reading + dict card + grammar card + dropzone) that replaced the static
   SVG screenshots from the original delivery.

   Prose styling for /privacy /terms /contact lives at the bottom of this file.
   ============================================================================= */

/* ----- Base ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    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), 0.35), 0 8px 22px -10px rgba(var(--accent-rgb), 0.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), 0.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), 0.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: var(--type-display-weight); 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: var(--type-h2-weight); 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), 0.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), 0.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), 0.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), 0.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: 0.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: var(--type-h2-weight); 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; }

/* ----- Book landing pages (library index + per-book) ------------------ */
/* Back link above the book title in the hero. */
.book-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: var(--space-5); font-size: var(--type-caption-size); font-weight: 600; color: var(--text-secondary); text-decoration: none; }
.book-back:hover { color: var(--accent); }
.book-back svg { width: 15px; height: 15px; }

/* Author / level / original-title chips under the book title. */
.book-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-6); margin: 0 0 var(--space-8); }
.book-meta__item { text-align: left; }
.book-meta__item dt { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hint); }
.book-meta__item dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--text); }

/* Library grid of book cards. */
.book-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--space-5); }
@media (min-width: 560px) { .book-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .book-grid { grid-template-columns: repeat(3, 1fr); } }
.book-card { display: flex; }
.book-card__link { display: flex; flex-direction: column; width: 100%; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: var(--space-6); box-shadow: var(--shadow-1); text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.book-card__link:hover { transform: translateY(-2px); box-shadow: var(--shadow-2, var(--shadow-1)); border-color: color-mix(in srgb, var(--accent) 40%, var(--card-border)); }
.book-card__badge { align-self: flex-start; font-size: 11px; font-weight: 600; color: var(--text-secondary); padding: 3px 9px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--text) 7%, transparent); }
.book-card__badge--parallel { color: var(--accent); background: var(--accent-soft); }
.book-card__title { margin: var(--space-4) 0 var(--space-2); font-size: 18px; line-height: 24px; font-weight: 700; color: var(--text); }
.book-card__author { margin: 0; font-size: 14px; color: var(--text-secondary); }
.book-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: var(--space-5); }
.book-card__level { font-size: 12px; font-weight: 700; color: var(--hint); letter-spacing: 0.04em; }
.book-card__cta { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; font-size: 14px; font-weight: 600; color: var(--accent); }
.book-card__cta svg { width: 15px; height: 15px; }

/* ----- 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), 0.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: var(--type-h2-weight); 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: 0.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 — HTML/CSS recreations of the Reader UI.
   These replaced the original static SVG screenshots so the marketing site
   shows the actual product surface with brand colours, word states, and a
   real reveal-bar layout. Reading-side text styling matches the app
   (Reader/Story) so the demo feels like the real thing.
   ============================================================================= */
.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); white-space: nowrap; }
.reader-surf__chip svg { width: 13px; height: 13px; flex-shrink: 0; }

.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), 0.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), 0.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), 0.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), 0.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), 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), 0.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); }

/* ----- Reveal-on-scroll / a11y --------------------------------------- */
.fx { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.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: #fff; padding: 10px 16px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 8px; }

/* =============================================================================
   Prose pages — /privacy /terms /contact. Original styling kept intact;
   the designer pass only touched marketing pages, not legal/contact.
   ============================================================================= */
.prose {
    padding-top: var(--space-12);
    padding-bottom: var(--space-16);
    max-width: var(--container-narrow);
}
.prose--narrow { max-width: 560px; }
.prose__head { margin-bottom: var(--space-8); }
.prose__kicker {
    margin: 0 0 var(--space-2);
    font-size: var(--type-caption-size);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}
.prose h1 {
    margin: 0 0 var(--space-3);
    font-size: var(--type-h2-size);
    line-height: var(--type-h2-line);
    font-weight: var(--type-h2-weight);
    letter-spacing: var(--type-h2-track);
}
.prose__updated { margin: 0; color: var(--hint); font-size: 13px; }
.prose__section { margin-top: var(--space-8); }
.prose h2 {
    margin: 0 0 var(--space-3);
    font-size: 22px;
    line-height: 30px;
    font-weight: 650;
    letter-spacing: -0.01em;
}
.prose p { margin: 0 0 var(--space-4); color: var(--text-secondary); }
.prose ul { margin: 0 0 var(--space-4); padding-left: var(--space-6); color: var(--text-secondary); }
.prose ul li { margin-bottom: var(--space-2); }
.prose__contact-line {
    margin-top: var(--space-10);
    padding-top: var(--space-6);
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
}

.contact-list {
    margin: var(--space-6) 0 var(--space-10);
    padding: var(--space-5) var(--space-6);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-3) var(--space-6);
}
.contact-list dt { font-weight: 600; color: var(--text); }
.contact-list dd { margin: 0; color: var(--text-secondary); }
