/* Course sales site — palette taken from the app (lib/theme/app_colors.dart). */
:root {
    --navy: #14263D;
    --navy-2: #1d3452;
    --navy-ink: #B9C4D2;
    --gold: #DCC895;
    --gold-ink: #7B6B47;
    --gold-deep: #c9b273;
    --canvas: #EDE4D5;
    --paper: #F8EDD5;
    --surface: #FAF5EB;
    --line: #D7C8AF;
    --ink: #14263D;
    --muted: #505D6D;
    --warm: #64523D;
    --success: #326653;
    --error: #9B4141;
    --radius: 18px;
    --shadow: 0 18px 40px -18px rgba(20, 38, 61, .35), 0 2px 6px rgba(20, 38, 61, .06);
    --serif: 'Literata', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
[dir="rtl"] { --serif: 'Noto Naskh Arabic', serif; --sans: 'Noto Sans Arabic', Tahoma, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.course-site { margin: 0; background: var(--canvas); color: var(--ink); font: 400 16px/1.6 var(--sans); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.bounds { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 720px; }
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; inset-inline-start: 16px; top: 12px; z-index: 50; background: var(--gold); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; border-radius: 6px; }

.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 14px; }
[dir="rtl"] .eyebrow { letter-spacing: 0; }
.eyebrow--gold { color: var(--gold); }
.lead { font-size: 1.1rem; color: var(--muted); line-height: 1.65; }
.fine { font-size: .85rem; color: var(--muted); margin-top: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 999px; font: 600 1rem/1.2 var(--sans); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--gold); color: var(--navy); box-shadow: 0 8px 20px -10px rgba(123, 107, 71, .9); }
.btn--gold:hover { background: #e5d4a6; }
.btn--ghost { border-color: rgba(20, 38, 61, .25); color: var(--navy); background: transparent; }
.btn--ghost:hover { border-color: var(--navy); }
.btn--sm { padding: 9px 16px; font-size: .9rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(237, 228, 213, .9); backdrop-filter: saturate(1.3) blur(12px); border-bottom: 1px solid rgba(20, 38, 61, .08); }
.site-header__row { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.25rem var(--serif); color: var(--navy); }
.brand img { border-radius: 9px; }
.brand__mark { width: 36px; height: 36px; border-radius: 9px; background: var(--navy); color: var(--gold); display: grid; place-items: center; }
.brand--light { color: var(--paper); }
.site-nav { display: flex; gap: 22px; margin-inline-start: auto; font-size: .95rem; }
.site-nav a { text-decoration: none; color: var(--warm); }
.site-nav a:hover { color: var(--navy); }
.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 8px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--navy); border: 1px solid rgba(20, 38, 61, .15); }
.lang summary::-webkit-details-marker { display: none; }
.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 170px; }
.lang li a { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; }
.lang li a:hover, .lang li a[aria-current] { background: var(--paper); }
.lang li a[aria-current] { font-weight: 600; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 90px) 0 clamp(50px, 7vw, 100px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 26px; }
.hero__notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--warm); font-size: .95rem; }
.hero__notes li, .price-card li { display: flex; align-items: center; gap: 10px; }
.hero__notes svg, .price-card svg { color: var(--success); flex: none; }
.hero__visual { position: relative; display: grid; place-items: center; min-height: 560px; }
.meander { position: absolute; inset: 8% 4%; border-radius: 40px; background:
    radial-gradient(circle at 30% 20%, rgba(220, 200, 149, .55), transparent 55%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); }
.meander::after { content: ''; position: absolute; inset: 18px; border-radius: 28px; border: 1px solid rgba(220, 200, 149, .35);
    background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(220, 200, 149, .08) 22px 24px); -webkit-mask: linear-gradient(transparent 0 82%, #000 82%); mask: linear-gradient(transparent 0 82%, #000 82%); }

.phone { position: relative; width: 300px; padding: 11px; border-radius: 46px; background: #0d1a2b; box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .6); transform: rotate(-3deg); }
[dir="rtl"] .phone { transform: rotate(3deg); }
.phone__screen { border-radius: 36px; background: var(--studySurface, var(--surface)); padding: 14px 16px 22px; min-height: 560px; }
.phone__bar { display: flex; justify-content: space-between; align-items: center; font-size: .7rem; font-weight: 600; color: var(--navy); padding: 2px 8px 12px; direction: ltr; }
.phone__notch { width: 86px; height: 22px; background: #0d1a2b; border-radius: 20px; }
.app-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.app-top__title { font: 600 1.05rem var(--serif); }
.chip { display: inline-block; font-size: .7rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--canvas); color: var(--warm); }
.chip--gold { background: var(--gold); color: var(--navy); }
.app-progress { height: 6px; border-radius: 6px; background: var(--canvas); overflow: hidden; }
.app-progress span { display: block; height: 100%; background: var(--navy); border-radius: 6px; }
[dir="rtl"] .app-progress span { margin-inline-start: auto; }
.app-progress__label { font-size: .72rem; color: var(--muted); margin: 6px 0 14px; }
.q-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.q-card__prompt { font: 600 1.1rem/1.35 var(--serif); margin: 10px 0 4px; font-family: 'Literata', Georgia, serif; }
.q-card__gloss { font-size: .76rem; color: var(--muted); margin-bottom: 10px; }
.q-options { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; gap: 7px; counter-reset: opt; }
.q-options li { counter-increment: opt; font-size: .78rem; line-height: 1.35; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px 9px 34px; position: relative; }
.q-options li::before { content: counter(opt, upper-alpha); position: absolute; left: 10px; top: 9px; font-weight: 700; color: var(--gold-ink); }
.q-options li.is-correct { border-color: var(--success); background: #e5efe6; color: #1f4a3a; font-weight: 600; }
.q-options li.is-correct::before { content: '✓'; color: var(--success); }
.listen { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; color: var(--navy); background: var(--gold); padding: 7px 12px; border-radius: 999px; }
.note-card { position: absolute; bottom: 5%; inset-inline-start: 0; max-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); font-size: .82rem; transform: rotate(2deg); }
.note-card::before { content: '✎'; display: block; color: var(--gold-ink); margin-bottom: 2px; }

/* Stats */
.stats { background: var(--navy); color: var(--paper); }
.stats__row { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats__row div { padding: 30px 18px; border-inline-start: 1px solid rgba(220, 200, 149, .18); }
.stats__row div:first-child { border-inline-start: 0; }
.stats strong { display: block; font: 600 2.4rem/1 var(--serif); color: var(--gold); margin-bottom: 6px; }
.stats span { color: var(--navy-ink); font-size: .95rem; }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--navy { background: var(--navy); color: var(--paper); }
.section--navy .lead { color: var(--navy-ink); }
.section--paper { background: var(--paper); }
.section__head { max-width: 720px; margin-bottom: 48px; }
.section__head h2 { margin-bottom: 16px; }

.topics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.topic { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s ease, box-shadow .2s ease; }
.topic:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.topic__glyph { width: 48px; height: 48px; border-radius: 14px; background: var(--navy); color: var(--gold); display: grid; place-items: center; font: 600 1.4rem 'Literata', Georgia, serif; margin-bottom: 6px; }
.topic p { color: var(--muted); font-size: .95rem; flex: 1; }
.topic__count { font-size: .82rem; font-weight: 600; color: var(--gold-ink); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: rgba(255, 255, 255, .04); border: 1px solid rgba(220, 200, 149, .2); border-radius: var(--radius); padding: 28px; }
.step__num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: var(--navy); font: 600 1.2rem var(--serif); margin-bottom: 18px; }
.step h3 { margin-bottom: 8px; color: var(--paper); }
.step p { color: var(--navy-ink); }

.compare { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-width: 880px; }
.compare__row { display: grid; grid-template-columns: 1fr 110px 130px; align-items: center; border-top: 1px solid var(--line); }
.compare__row:first-child { border-top: 0; }
.compare__row > span { padding: 15px 20px; }
.compare__row--head { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--paper); }
.compare__mark { text-align: center; display: flex; justify-content: center; color: var(--success); }
.compare .is-premium { background: rgba(220, 200, 149, .22); text-align: center; }
.compare__row--head .is-premium { color: var(--navy); }
.muted-dash { color: #b3a68e; }

.pricing { display: grid; grid-template-columns: 1fr 420px; gap: 48px; align-items: center; }
.pricing__copy h2 { margin-bottom: 16px; }
.price-card { background: var(--navy); color: var(--paper); border-radius: 24px; padding: 34px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.price-card::before { content: ''; position: absolute; inset-inline-end: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(rgba(220, 200, 149, .35), transparent 70%); }
.price-card__name { color: var(--gold); font-weight: 600; margin-bottom: 10px; }
.price-card__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.price-card__price strong { font: 600 3.2rem/1 var(--serif); }
.price-card__price span { color: var(--navy-ink); }
.price-card__was { color: var(--navy-ink); text-decoration: line-through; font-size: .9rem; }
.price-card ul { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 10px; }
.price-card svg { color: var(--gold); }
.price-card__fine { font-size: .82rem; color: var(--navy-ink); margin-top: 12px; text-align: center; }
.price-card__closed { background: rgba(220, 200, 149, .14); border: 1px solid rgba(220, 200, 149, .3); border-radius: 12px; padding: 14px; font-size: .95rem; }

.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.faq__list { display: grid; gap: 10px; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; }
.faq__item summary { cursor: pointer; list-style: none; font-weight: 600; padding: 16px 0; display: flex; justify-content: space-between; gap: 16px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: '+'; color: var(--gold-ink); font-size: 1.3rem; line-height: 1; }
.faq__item[open] summary::after { content: '–'; }
.faq__item p { color: var(--muted); padding-bottom: 18px; }

.cta { padding: 0 0 clamp(64px, 9vw, 110px); }
.cta__inner { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: var(--paper); border-radius: 28px; padding: clamp(32px, 5vw, 60px); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.cta .lead { color: var(--navy-ink); margin-top: 12px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stores--center { justify-content: center; margin-top: 24px; }
.store { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 14px; background: #0b1726; color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .15); min-width: 170px; }
.store img { filter: invert(1); }
.store small { display: block; font-size: .7rem; opacity: .75; }
.store strong { font-size: 1rem; }
.store--soon { opacity: .55; }

/* Footer */
.site-footer { background: var(--navy); color: var(--navy-ink); padding: 36px 0 28px; }
.site-footer__row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid rgba(220, 200, 149, .15); }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: .92rem; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { color: var(--gold); }
.site-footer__legal { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 20px; font-size: .82rem; }
.site-footer__legal p:first-child { max-width: 640px; }

/* Checkout + result pages */
.page { padding: clamp(36px, 6vw, 80px) 0 clamp(60px, 8vw, 110px); }
.card-paper { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.checkout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: start; }
.checkout h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 10px 0 12px; }
.checkout form { margin-top: 26px; display: grid; gap: 18px; }
.back { font-size: .9rem; color: var(--muted); text-decoration: none; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: .95rem; }
.field input { font: inherit; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: #fffdf8; color: var(--ink); }
.field input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 4px rgba(220, 200, 149, .45); }
.field input[aria-invalid] { border-color: var(--error); }
.field small { color: var(--muted); font-size: .85rem; }
.field__error { color: var(--error); font-style: normal; font-size: .85rem; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--warm); line-height: 1.5; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--navy); flex: none; }
.notice { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 18px; font-size: .95rem; }
.notice--error { border-color: var(--error); color: var(--error); background: #f7e6e1; }
.checkout__summary { background: var(--navy); color: var(--paper); border-radius: 24px; padding: 30px; position: sticky; top: 96px; }
.checkout__summary .eyebrow { color: var(--gold); }
.summary-line { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(220, 200, 149, .18); }
.summary-line--total { border-bottom: 0; font-size: 1.15rem; }
.summary-line--total strong { color: var(--gold); font-family: var(--serif); font-size: 1.6rem; }
.summary-was { color: var(--navy-ink); font-size: .85rem; text-decoration: line-through; }
.summary-points { padding-inline-start: 18px; margin: 16px 0 0; color: var(--navy-ink); font-size: .92rem; display: grid; gap: 6px; }

.result { text-align: center; }
.result h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 12px; }
.result__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--success); color: #fff; font-size: 1.8rem; margin-bottom: 18px; }
.result__icon--spin { background: var(--gold); color: var(--navy); animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result__steps { text-align: start; max-width: 460px; margin: 26px auto 0; display: grid; gap: 10px; padding-inline-start: 22px; }

.legal h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 6px; }
.legal h2 { font-size: 1.25rem; margin: 30px 0 10px; }
.legal p { margin-bottom: 12px; color: #2c3a4c; }

/* Responsive */
@media (max-width: 980px) {
    .site-nav { display: none; }
    .lang { margin-inline-start: auto; }
    .hero__grid, .pricing, .faq, .checkout, .cta__inner { grid-template-columns: 1fr; }
    .hero__visual { min-height: 520px; }
    .topics { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
    .checkout__summary { position: static; }
}
@media (max-width: 620px) {
    .site-header__cta { display: none; }
    .stats__row { grid-template-columns: repeat(2, 1fr); }
    .stats__row div:nth-child(3) { border-inline-start: 0; }
    .stats__row div:nth-child(n+3) { border-top: 1px solid rgba(220, 200, 149, .18); }
    .topics { grid-template-columns: 1fr; }
    .phone { width: 270px; }
    .phone__screen { min-height: 500px; }
    .note-card { display: none; }
    .compare__row { grid-template-columns: 1fr 64px 84px; }
    .compare__row > span { padding: 13px 12px; font-size: .9rem; }
    .compare__row--head { font-size: .68rem; letter-spacing: .03em; }
    .hero__cta .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ======================================================================
   Motion layer: the page breathes, the app beats.
   Easing tokens; everything below is off under prefers-reduced-motion.
   ====================================================================== */
:root {
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --ease-state: cubic-bezier(.4, 0, .2, 1);
    --beat: 2.4s;   /* one heartbeat cycle: lub-dub, then rest */
    --breath: 7s;   /* one slow breath */
}
::selection { background: var(--gold); color: var(--navy); }

/* Hero entrance: eyebrow -> words -> lead -> CTAs -> notes */
.js [data-hero] > * { opacity: 0; transform: translateY(22px); filter: blur(8px); }
.js [data-hero].is-in > * { opacity: 1; transform: none; filter: none; transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), filter .9s var(--ease-out); }
.js [data-hero].is-in > :nth-child(1) { transition-delay: .05s; }
.js [data-hero].is-in > :nth-child(2) { transition-delay: .15s; }
.js [data-hero].is-in > :nth-child(3) { transition-delay: .55s; }
.js [data-hero].is-in > :nth-child(4) { transition-delay: .7s; }
.js [data-hero].is-in > :nth-child(5) { transition-delay: .85s; }
.hero__title .w { display: inline-block; opacity: 0; transform: translateY(.45em); filter: blur(10px); }
.is-in .hero__title .w { opacity: 1; transform: none; filter: none; transition: opacity .8s var(--ease-out), transform .8s var(--ease-out), filter .8s var(--ease-out); transition-delay: calc(.15s + var(--i) * 70ms); }
.hero__title .accent { position: relative; white-space: nowrap; }
.hero__title .accent::after { content: ''; position: absolute; inset-inline: 0; bottom: .02em; height: .12em; border-radius: 99px; background: var(--gold); transform: scaleX(0); transform-origin: left; opacity: .85; z-index: -1; }
[dir="rtl"] .hero__title .accent::after { transform-origin: right; }
.is-in .hero__title .accent::after { transform: scaleX(1); transition: transform 1.1s var(--ease-out) 1.1s; }
.hero__title .accent { isolation: isolate; }

/* Heartbeat: the primary CTA and the halo behind the phone share one rhythm */
.btn--pulse { position: relative; isolation: isolate; }
.btn--pulse::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(201, 178, 115, .55); animation: cta-beat var(--beat) var(--ease-state) infinite 1.6s; z-index: -1; }
@keyframes cta-beat {
    0% { box-shadow: 0 0 0 0 rgba(201, 178, 115, .55); }
    12% { box-shadow: 0 0 0 9px rgba(201, 178, 115, .18); }
    18% { box-shadow: 0 0 0 4px rgba(201, 178, 115, .4); }
    32% { box-shadow: 0 0 0 16px rgba(201, 178, 115, 0); }
    100% { box-shadow: 0 0 0 16px rgba(201, 178, 115, 0); }
}

.heartbeat { position: absolute; width: 420px; height: 420px; display: grid; place-items: center; pointer-events: none; }
.heartbeat::before { content: ''; position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle, rgba(220, 200, 149, .55) 0%, rgba(220, 200, 149, .14) 45%, transparent 70%); animation: halo-beat var(--beat) var(--ease-state) infinite; }
.heartbeat span { position: absolute; inset: 22%; border-radius: 50%; border: 1.5px solid rgba(201, 178, 115, .55); animation: ring-beat var(--beat) var(--ease-out) infinite; opacity: 0; }
.heartbeat span:nth-child(2) { animation-delay: .32s; }
@keyframes halo-beat {
    0%, 100% { transform: scale(1); opacity: .75; }
    10% { transform: scale(1.07); opacity: 1; }
    18% { transform: scale(1.01); opacity: .85; }
    28% { transform: scale(1.05); opacity: .95; }
    45% { transform: scale(1); opacity: .75; }
}
@keyframes ring-beat {
    0% { transform: scale(.85); opacity: 0; }
    8% { opacity: .9; }
    45% { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

/* Breathing: the phone floats on a slow breath, the frame behind it glows with it */
.phone-float { position: relative; animation: breathe var(--breath) ease-in-out infinite; will-change: transform; }
@keyframes breathe {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(.6deg); }
}
.meander { animation: frame-breathe var(--breath) ease-in-out infinite; }
@keyframes frame-breathe {
    0%, 100% { filter: brightness(1); transform: scale(1); }
    50% { filter: brightness(1.12); transform: scale(1.012); }
}
.note-card { animation: note-drift var(--breath) ease-in-out infinite reverse; transition: opacity .45s var(--ease-state), transform .45s var(--ease-out); }
@keyframes note-drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 8px; } }
.note-card.is-swap { opacity: 0; transform: translateY(8px) scale(.97); }

/* The live lesson inside the phone */
.phone__screen { position: relative; overflow: hidden; }
.q-card { transition: opacity .4s var(--ease-state), transform .5s var(--ease-out); }
.q-card.is-leaving { opacity: 0; transform: translateX(-18px); }
.q-card.is-entering { opacity: 0; transform: translateX(18px); transition: none; }
.q-options li { transition: background .35s var(--ease-state), border-color .35s var(--ease-state), color .35s var(--ease-state), transform .35s var(--ease-out); }
.q-options li.is-picked { border-color: var(--navy); background: #fff; transform: scale(1.02); }
.q-options li.is-wrong { border-color: var(--error); background: #f4e3e0; color: #6d2b2b; animation: shake .42s var(--ease-state); }
.q-options li.is-wrong::before { content: '✕'; color: var(--error); }
.q-options li.is-correct { animation: correct-pop .55s var(--ease-out); }
@keyframes correct-pop { 0% { transform: scale(.98); } 45% { transform: scale(1.035); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { translate: 0 0; } 20% { translate: -4px 0; } 40% { translate: 4px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
.app-progress span { transition: width 1s var(--ease-out); }
.streak svg { color: #d97a2b; transform-origin: 50% 80%; }
.streak.is-hit svg { animation: flame .7s var(--ease-out); }
@keyframes flame { 0% { transform: scale(1); } 40% { transform: scale(1.45) rotate(-8deg); } 100% { transform: scale(1); } }
.chip.streak { display: inline-flex; align-items: center; gap: 4px; }
.tap { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: rgba(20, 38, 61, .18); border: 2px solid rgba(20, 38, 61, .35); pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.6); transition: left .7s var(--ease-out), top .7s var(--ease-out), opacity .3s var(--ease-state); left: 70%; top: 90%; }
.tap.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.tap.is-press { animation: press .45s var(--ease-state); }
@keyframes press { 0% { transform: translate(-50%, -50%) scale(1); } 40% { transform: translate(-50%, -50%) scale(.72); background: rgba(20, 38, 61, .32); } 100% { transform: translate(-50%, -50%) scale(1.25); opacity: 0; } }

/* Slow topic marquee under the stats */
.marquee { overflow: hidden; border-top: 1px solid rgba(220, 200, 149, .14); padding: 16px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; gap: 26px; width: max-content; align-items: center; animation: marquee 48s linear infinite; direction: ltr; }
.marquee span { font: 500 1.15rem/1 var(--serif); color: rgba(248, 237, 213, .72); white-space: nowrap; letter-spacing: .01em; }
.marquee i { font-style: normal; color: var(--gold); font-size: .7rem; opacity: .8; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Scroll reveals */
.js [data-reveal] { opacity: 0; transform: translateY(26px); }
.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--d, 0) * 90ms); }

/* Topic tiles breathe gently; on hover the glyph turns */
.topic__glyph { transition: transform .5s var(--ease-out), background .3s var(--ease-state); }
.topic:hover .topic__glyph { transform: rotate(-8deg) scale(1.08); }
.topic { transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-state), border-color .35s var(--ease-state); }
.topic:hover { border-color: var(--gold); }

/* How it works: a line fills, then each step beats in turn */
.steps { position: relative; }
.steps::before { content: ''; position: absolute; top: 50px; inset-inline: 50px; height: 2px; background: linear-gradient(90deg, var(--gold), rgba(220, 200, 149, .2)); transform: scaleX(0); transform-origin: left; z-index: 0; }
[dir="rtl"] .steps::before { transform-origin: right; background: linear-gradient(270deg, var(--gold), rgba(220, 200, 149, .2)); }
.steps.is-live::before { transform: scaleX(1); transition: transform 1.6s var(--ease-out) .2s; }
.step { position: relative; z-index: 1; background: #182e48; }
.steps.is-live .step__num { animation: step-beat 6s var(--ease-state) infinite; animation-delay: calc(var(--n) * 2s); }
@keyframes step-beat {
    0%, 22%, 100% { box-shadow: 0 0 0 0 rgba(220, 200, 149, 0); transform: scale(1); }
    5% { box-shadow: 0 0 0 8px rgba(220, 200, 149, .22); transform: scale(1.1); }
    9% { transform: scale(1); }
    13% { box-shadow: 0 0 0 14px rgba(220, 200, 149, 0); transform: scale(1.06); }
}

/* Price card: a slow gold sheen crosses every few seconds */
.price-card::after { content: ''; position: absolute; inset: -40% auto -40% -60%; width: 45%; background: linear-gradient(100deg, transparent, rgba(220, 200, 149, .16), transparent); transform: skewX(-18deg); animation: sheen 7s var(--ease-state) infinite 2s; pointer-events: none; }
@keyframes sheen { 0% { left: -60%; } 30%, 100% { left: 130%; } }
.price-card__price strong { display: inline-block; }
.price-card.is-in .price-card__price strong { animation: price-beat var(--beat) var(--ease-state) 2 .9s; }
@keyframes price-beat { 0%, 100% { transform: scale(1); } 10% { transform: scale(1.04); } 18% { transform: scale(1); } 28% { transform: scale(1.025); } 45% { transform: scale(1); } }

/* Closing band breathes */
.cta__inner { background-size: 160% 160%; animation: cta-breathe 14s ease-in-out infinite; }
@keyframes cta-breathe { 0%, 100% { background-position: 0% 40%; } 50% { background-position: 100% 60%; } }

/* FAQ answers open softly */
.faq__item[open] p { animation: faq-open .5s var(--ease-out); }
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
    .heartbeat { width: 320px; height: 320px; }
    .steps::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js [data-hero] > *, .js [data-reveal], .hero__title .w { opacity: 1 !important; transform: none !important; filter: none !important; }
    .hero__title .accent::after { transform: scaleX(1); }
    .steps::before { transform: scaleX(1); }
    .tap { display: none; }
}

.cta__inner { background: linear-gradient(125deg, var(--navy) 0%, #24406a 35%, var(--navy-2) 60%, var(--navy) 100%); }

/* Round 2 tuning: halo must show around the phone, underline reads as a highlighter */
.heartbeat { width: 660px; height: 660px; }
.heartbeat::before { inset: 4%; background: radial-gradient(circle, rgba(220, 200, 149, .62) 0%, rgba(220, 200, 149, .26) 38%, rgba(220, 200, 149, .08) 56%, transparent 70%); }
.heartbeat span { inset: 16%; border-width: 2px; }
.hero__title .accent::after { bottom: .08em; height: .3em; opacity: .5; border-radius: 4px; }
@media (max-width: 760px) { .heartbeat { width: 420px; height: 420px; } }
@media (prefers-reduced-motion: reduce) { .heartbeat::before { opacity: .7; } }
/* Fail-safe: never leave the hero hidden if the script is late or blocked */
.js [data-hero]:not(.is-in) > *, .js [data-hero]:not(.is-in) .hero__title .w { animation: show-anyway .6s var(--ease-out) 2.5s forwards; }
@keyframes show-anyway { to { opacity: 1; transform: none; filter: none; } }

/* Study pages (practice test, topic question banks, exam guide) */
.study-hero { padding: clamp(48px, 7vw, 88px) 0 8px; }
.study-hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 16px; }
.study-list { padding-top: 32px; }
.study-list .bounds, .study-guide .bounds { display: grid; gap: 16px; }
.study-q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.study-q__head { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; font-size: 1.05rem; margin-bottom: 14px; }
.study-q__n { flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-size: .85rem; }
.study-q__opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.study-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: inherit; color: var(--ink); }
button.study-opt { cursor: pointer; transition: border-color .15s ease, background .15s ease; }
button.study-opt:hover:not([disabled]) { border-color: var(--navy); }
button.study-opt[disabled] { cursor: default; }
.study-opt__l { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--canvas); display: grid; place-items: center; font-size: .8rem; font-weight: 600; }
.study-opt.is-correct { border-color: var(--success); background: #e6f0eb; }
.study-opt.is-wrong { border-color: var(--error); background: #f6e6e6; }
.study-opt__tag { margin-inline-start: auto; font-size: .78rem; font-weight: 600; color: var(--success); }
.study-q__reveal { margin-top: 12px; font-size: .92rem; color: var(--muted); }
.study-q__reveal summary { cursor: pointer; font-weight: 600; color: var(--gold-ink); }
.js .study-q:not(.is-done) .study-q__reveal { display: none; }
.study-score { margin-top: 18px; font-weight: 600; color: var(--gold-ink); }
.study-result { background: var(--navy); color: var(--paper); border-radius: var(--radius); padding: 28px; text-align: center; }
.study-result .lead { color: var(--navy-ink); margin-top: 10px; }
.study-more { color: var(--muted); text-align: center; margin-top: 8px; }
.study-guide__part { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 10px; }
.study-guide__part h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.study-guide__faq-title { margin-top: 24px; }
.study-source { font-size: .85rem; color: var(--muted); }
.study-source a, a.study-source { color: var(--gold-ink); }
.study-related h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 20px; }
.study-related__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.study-related__list a { display: block; padding: 14px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.study-related__list a:hover { border-color: var(--gold-deep); }
.study-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 40; background: var(--navy); color: var(--paper); box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .4); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }
.study-bar__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.study-bar p { font-size: .92rem; }
.study-bar p span { color: var(--navy-ink); }
.study-bar__actions { display: flex; gap: 8px; align-items: center; flex: none; }
.study-bar__store { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; background: #0b1726; color: #fff; text-decoration: none; font-size: .85rem; font-weight: 600; border: 1px solid rgba(255, 255, 255, .15); }
.study-bar__store img { filter: invert(1); }
body:has(.study-bar) { padding-bottom: 72px; }
@media (max-width: 640px) {
    .study-bar p span { display: none; }
    .study-bar__store span { display: none; }
    .study-q { padding: 16px; }
}
.topic__link { font-size: .9rem; font-weight: 600; color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--gold-deep); align-self: flex-start; }
.topics__more { margin-top: 28px; text-align: center; color: var(--muted); }
.topics__more a { color: var(--navy); font-weight: 600; }
.site-footer__study { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 18px; font-size: .88rem; }
.site-footer__study a { color: inherit; opacity: .8; }

/* Tsolias, the mascot */
.mascot { display: block; height: auto; }
.study-hero__row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.study-hero__mascot { width: 110px; order: -1; }
@media (min-width: 760px) {
    .study-hero__row { grid-template-columns: 1fr 190px; align-items: end; gap: 32px; }
    .study-hero__mascot { width: 190px; order: 1; }
}
.study-result__mascot { width: 130px; margin: 0 auto 12px; }
.study-more { display: grid; justify-items: center; gap: 10px; }
.study-more__mascot { width: 120px; }
.cta__inner--mascot { grid-template-columns: 1fr; text-align: center; }
.cta__inner--mascot .stores { justify-content: center; }
.cta__mascot { width: 120px; margin: -8px auto 0; }
@media (min-width: 900px) {
    .cta__inner--mascot { grid-template-columns: 150px 1fr auto; text-align: start; }
    .cta__inner--mascot .stores { justify-content: flex-start; }
    .cta__mascot { width: 150px; margin: -70px 0 -10px; }
}

/* Study pages in other languages: Greek as in the exam, translation underneath */
.study-q__head > div { display: grid; gap: 4px; }
.study-q__prompt { font-weight: 600; }
.study-q__tr { font-weight: 400; font-size: .92rem; color: var(--muted); }
.study-opt__text { display: grid; gap: 2px; }
.study-opt__tr { font-size: .82rem; color: var(--muted); }
.study-note { font-size: .9rem; color: var(--warm); background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; }
[dir="rtl"] .study-q__prompt, [dir="rtl"] .study-opt__text [lang="el"] { text-align: left; }

/* AdSense in-content slots: clearly labelled, set apart from questions and buttons, height reserved */
.ad-slot { margin: 28px 0; padding: 10px 0 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 300px; }
.ad-slot__label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: 8px; }
[dir="rtl"] .ad-slot__label { letter-spacing: 0; }
.ad-slot .adsbygoogle { min-height: 250px; }
