/* Make It Easy · Student Space
   Look: a light, friendly teaching platform. White pages, one main colour (indigo blue) for buttons, links and the
   key word, one warm second colour (orange) for small highlights and the current level. Both work in day and night mode.
   Plus Jakarta Sans for English, Cairo for Arabic.
   Motion: calm, with real depth (CSS 3D). Only "transform" and "opacity" move, so it runs at the screen's own refresh rate.
   To change the colours, change the six values on the next line (main, darker, lighter; second, darker, lighter). */

:root {
  --p: #4F46E5; --p-d: #4338CA; --p-l: #A5B4FC; --a: #FF8A3D; --a-d: #B4520E; --a-l: #FFB27D;
  --mark: color-mix(in srgb, var(--a) 38%, transparent);
}

:root {
  --bg: #F6F7FB; --surface: #FFFFFF; --sunk: #F0F2F7; --ink: #1A1D2B; --ink-2: #3A4055; --muted: #697089;
  --line: rgba(26, 29, 43, .1); --line-2: rgba(26, 29, 43, .2);
  --head-bg: #FFFFFF; --foot-bg: #151824;
  --brand: var(--p); --brand-ink: var(--p-d); --on-brand: #FFFFFF;
  --brand-soft: color-mix(in srgb, var(--p) 8%, #FFFFFF); --brand-soft-2: color-mix(in srgb, var(--p) 16%, #FFFFFF);
  --acc-ink: var(--a-d); --acc-soft: color-mix(in srgb, var(--a) 13%, #FFFFFF); --cur: var(--a);
  --good: #1D7A4C; --good-soft: #E3F3EA; --bad: #C2283C; --bad-soft: #FBE6E9; --warn-soft: #FFF1D6; --warn-ink: #6E4A00;
  /* the six levels, A1 → C2: light to strong main colour (the current level uses the second colour) */
  --l1: color-mix(in srgb, var(--p) 20%, #FFFFFF); --l2: color-mix(in srgb, var(--p) 34%, #FFFFFF); --l3: color-mix(in srgb, var(--p) 50%, #FFFFFF);
  --l4: color-mix(in srgb, var(--p) 66%, #FFFFFF); --l5: color-mix(in srgb, var(--p) 84%, #FFFFFF); --l6: var(--p-d);
  --t1: var(--brand-ink); --t2: var(--brand-ink); --t3: var(--brand-ink); --t4: var(--brand-ink); --t5: var(--brand-ink); --t6: var(--brand-ink);
  --shadow: 0 1px 2px rgba(26, 29, 43, .05), 0 10px 30px -16px rgba(26, 29, 43, .16);
  --shadow-lift: 0 2px 6px rgba(26, 29, 43, .06), 0 26px 48px -22px rgba(26, 29, 43, .3);
  --r: 18px; --r-s: 12px;
  --font: 'Plus Jakarta Sans', 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
:root[data-theme="dark"] {
  --bg: #10121A; --surface: #191C27; --sunk: #222634; --ink: #F2F3F8; --ink-2: #C8CCDA; --muted: #959BB0;
  --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .18);
  --head-bg: #151823; --foot-bg: #0B0D14;
  --brand-ink: var(--p-l);
  --brand-soft: color-mix(in srgb, var(--p) 18%, #191C27); --brand-soft-2: color-mix(in srgb, var(--p) 30%, #191C27);
  --acc-ink: var(--a-l); --acc-soft: color-mix(in srgb, var(--a) 18%, #191C27); --cur: var(--a-l);
  --mark: color-mix(in srgb, var(--p) 55%, transparent);
  --good: #6FD6A2; --good-soft: rgba(111, 214, 162, .12); --bad: #FF8A93; --bad-soft: rgba(255, 138, 147, .12); --warn-soft: rgba(255, 190, 80, .13); --warn-ink: #FFD48A;
  --l1: color-mix(in srgb, var(--p) 30%, #191C27); --l2: color-mix(in srgb, var(--p) 45%, #191C27); --l3: color-mix(in srgb, var(--p) 62%, #191C27);
  --l4: color-mix(in srgb, var(--p) 80%, #191C27); --l5: color-mix(in srgb, var(--p-l) 75%, #191C27); --l6: var(--p-l);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px -14px rgba(0, 0, 0, .6);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, .35), 0 26px 50px -22px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 1rem/1.65 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: clip; }
h1, h2, h3 { font-family: var(--font); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 1.8rem); }
h3 { font-size: 1.12rem; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
a { color: inherit; }
code { font-size: .9em; background: var(--sunk); padding: .1em .4em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.ic { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
main.wrap { flex: 1; padding-block: 28px 64px; display: flex; flex-direction: column; gap: 20px; }
main.wrap > * { min-width: 0; }
:where(main.wrap > section, main.wrap > article) { display: flex; flex-direction: column; gap: 20px; }
main.narrow { max-width: 780px; }
main.xs { max-width: 520px; }
main.home { gap: 0; padding-top: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.eyebrow { display: flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-ink); margin: 0 0 .5em; }
.center-panel .eyebrow, .auth-head .eyebrow { justify-content: center; }
.lead { font-size: clamp(1.02rem, 2.2vw, 1.15rem); line-height: 1.6; color: var(--ink-2); max-width: 38em; }
.sel { user-select: all; }
.chip { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin: 0; padding: 4px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: .82rem; font-weight: 800; }

/* ---------- top bar and footer */
.demo-bar { background: var(--warn-soft); color: var(--warn-ink); font-size: .82rem; padding: 5px 20px; display: flex; gap: 6px 12px; justify-content: center; align-items: center; flex-wrap: wrap; text-align: center; }
.demo-bar .link { color: inherit; font-size: inherit; text-decoration-color: currentColor; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--head-bg); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.brand-logo { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--head-bg), 0 0 0 4px color-mix(in srgb, var(--p) 45%, transparent); }
.brand-name { min-width: 0; overflow: hidden; }
.brand b { display: block; font: 800 1.2rem/1.1 var(--font); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; margin-top: 2px; font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-ink); white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.top-links { display: flex; align-items: center; gap: 2px; margin-right: 8px; }
.tab-link { background: none; border: 0; color: var(--ink-2); font: 700 .92rem var(--font); padding: 8px 12px; border-radius: 10px; cursor: pointer; text-decoration: none; transition: background .2s, color .2s; }
.tab-link:hover { background: var(--sunk); color: var(--ink); }
.tab-link.on { background: var(--brand-soft); color: var(--brand-ink); }
.who { color: var(--muted); font-size: .85rem; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; transition: border-color .2s, transform .2s var(--ease); touch-action: manipulation; }
.icon-btn:hover { border-color: var(--brand); }
.icon-btn:active { transform: scale(.92); }
.icon-btn .ic { grid-area: 1 / 1; transition: transform .45s var(--ease), opacity .25s; }
[data-theme="light"] .icon-btn .ic:first-child, [data-theme="dark"] .icon-btn .ic:last-child { opacity: 0; transform: rotate(90deg) scale(.4); }
.days-left { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 5px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font: 700 .82rem var(--font); white-space: nowrap; font-variant-numeric: tabular-nums; }
.days-left svg { width: 28px; height: 28px; transform: rotate(-90deg); flex: none; }
.days-left circle { fill: none; stroke-width: 3; }
.days-left .track { stroke: currentColor; opacity: .2; }
.days-left .arc { stroke: currentColor; stroke-linecap: round; animation: arc 1.2s var(--ease) .2s backwards; }
.days-left .dl-short { display: none; }
.days-left.warn { color: var(--warn-ink); background: var(--warn-soft); }
.days-left.over { color: var(--bad); background: var(--bad-soft); padding: 7px 12px; }
.foot { background: var(--foot-bg); color: #AEB4C7; margin-top: auto; }
.foot-in { padding-block: 26px calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; align-items: center; gap: 10px 24px; flex-wrap: wrap; font-size: .85rem; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; }
.foot-brand img { border-radius: 50%; }
.foot-brand b { color: #FFFFFF; font: 800 1.02rem var(--font); letter-spacing: -.01em; }

/* ---------- buttons and forms */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font: 700 .95rem/1.2 var(--font); cursor: pointer; text-decoration: none; user-select: none; touch-action: manipulation; transition: transform .25s var(--ease), box-shadow .25s, border-color .2s, background .2s; }
@media (hover: hover) { .btn:hover { transform: translateY(-1px); border-color: var(--ink); box-shadow: var(--shadow); } }
.btn:active { transform: scale(.97); transition-duration: .08s; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); overflow: hidden; }
.btn.primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .3) 50%, transparent 62%); transform: translateX(-120%); pointer-events: none; }
@media (hover: hover) { .btn.primary:hover { background: var(--p-d); border-color: var(--p-d); box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--p) 75%, transparent); } .btn.primary:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); } }
.btn.outline-light { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .55); }
@media (hover: hover) { .btn.outline-light:hover { border-color: #FFFFFF; box-shadow: none; } }
.btn.small { min-height: 38px; padding: 6px 16px; font-size: .86rem; }
.btn.big { min-height: 54px; padding: 12px 28px; font-size: 1.02rem; }
.btn.wide { width: 100%; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.off { cursor: default; }
.btn.google .g { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 .8rem var(--font); color: #fff; background: conic-gradient(#EA4335 0 25%, #FBBC05 0 50%, #34A853 0 75%, #4285F4 0); }
.link { background: none; border: 0; padding: 4px 0; font: 700 .9rem var(--font); color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; }
.link:hover { color: var(--brand-ink); }
.link.danger { color: var(--bad); text-decoration-color: currentColor; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.center { justify-content: center; }

form { display: flex; flex-direction: column; gap: 14px; }
.f { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; font-weight: 700; }
input, select, textarea { font: 400 1rem var(--font); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r-s); padding: 10px 14px; min-height: 48px; width: 100%; transition: border-color .2s, box-shadow .2s; }
select { width: auto; padding-right: 34px; min-height: 42px; }
textarea { resize: vertical; font-size: .95rem; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--p) 20%, transparent); }
.err { color: var(--bad); font-size: .875rem; min-height: 1em; margin: 0; }
.err:empty { display: none; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 16px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--sunk); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.seg button { border: 0; background: none; padding: 8px 12px; min-height: 40px; border-radius: 999px; font: 700 .9rem var(--font); color: var(--muted); cursor: pointer; transition: background .25s, color .25s; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg.big { margin: 0; max-width: 460px; }

/* ---------- panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.panel > :last-child { margin-bottom: 0; }
.center-panel { text-align: center; padding: 40px 28px; }
.center-panel .rules { text-align: left; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tag { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--sunk); color: var(--muted); }
.tag.lvl { background: var(--brand); color: var(--on-brand); }
.pill { display: inline-block; min-width: 44px; text-align: center; font-weight: 800; padding: 2px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.spot { position: relative; overflow: hidden; }
.sum-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--sunk); color: var(--ink); font-size: 1.15rem; margin-bottom: 12px; transition: background .25s, color .25s; }
.sum-ic.big { width: 60px; height: 60px; border-radius: 18px; font-size: 1.5rem; margin-bottom: 18px; background: var(--brand); color: var(--on-brand); }
.loader { display: inline-flex; align-items: flex-end; gap: 5px; height: 30px; margin-bottom: 14px; }
.loader i { width: 8px; height: 100%; border-radius: 3px; background: var(--brand); transform-origin: 50% 100%; animation: load .8s ease-in-out infinite alternate; }
.loader i:nth-child(1) { animation-delay: -.5s; } .loader i:nth-child(2) { animation-delay: -.25s; } .loader i:nth-child(3) { background: var(--cur); }

/* ---------- ladder (the six steps; the current one uses the second colour) */
.ladder { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 5%; align-items: end; width: 100%; height: var(--lh, 160px); }
.rung { display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; height: 100%; text-align: center; }
.rung i { display: block; height: calc((var(--lh, 160px) - 42px) * var(--hn)); border-radius: 7px 7px 3px 3px; background: var(--sunk); transform-origin: 50% 100%; animation: grow .9s var(--ease) backwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
.rung.done i { background: var(--c); }
.rung.cur i { background: var(--cur); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cur) 25%, transparent); }
.rung span { font: 800 .72rem/1 var(--font); color: var(--muted); }
.rung.cur span { color: var(--ink); }

/* ---------- home: the top band with the teacher's photo in 3D */
.hero-band { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, var(--brand-soft) 0%, var(--bg) 100%); }
.hero-band::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(color-mix(in srgb, var(--p) 22%, transparent) 1.2px, transparent 1.8px); background-size: 24px 24px; -webkit-mask-image: radial-gradient(ellipse 55% 70% at 78% 42%, #000 0%, transparent 72%); mask-image: radial-gradient(ellipse 55% 70% at 78% 42%, #000 0%, transparent 72%); }
.hero-band::after { content: ''; position: absolute; z-index: -1; width: 680px; height: 680px; right: -200px; top: -240px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--p) 18%, transparent), transparent); animation: glow 16s ease-in-out infinite alternate; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(40px, 7vw, 92px) clamp(56px, 8vw, 104px); }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.hero-chip { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 16px 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--brand-ink); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--cur); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cur) 22%, transparent); }
.hero-title { margin: 0; color: var(--ink); font: 800 clamp(2.5rem, 5.8vw, 4.2rem)/1.04 var(--font); letter-spacing: -.035em; }
.hero-title .ln { display: block; perspective: 700px; padding-bottom: .06em; }
.hero-title .ln > span { display: inline-block; transform-origin: 50% 100%; animation: flipUp 1s var(--ease) backwards; }
.hero-title .ln:nth-child(2) > span { animation-delay: .14s; }
.hero-title .hl { position: relative; isolation: isolate; color: var(--brand); }
[data-theme="dark"] .hero-title .hl { color: var(--p-l); }
.hero-title .hl::after { content: ''; position: absolute; z-index: -1; left: -.05em; right: -.05em; bottom: .1em; height: .28em; border-radius: .12em; background: var(--mark); transform-origin: 0 50%; animation: barIn .8s var(--ease) .75s backwards; }
.hero-lead { margin: 0; font-size: clamp(1.02rem, 2.2vw, 1.18rem); line-height: 1.6; color: var(--ink-2); max-width: 32em; }
.hero-ar { margin: 0; text-wrap: balance; font: 700 clamp(1.1rem, 2.6vw, 1.4rem)/1.5 'Cairo', var(--font); color: var(--ink); }
.hero-actions { margin-top: 8px; }

/* the 3D scene: back plate and dots at different depths, the photo, and the four skills orbiting around it */
.hero-media { position: relative; justify-self: center; width: min(400px, 100%); container-type: inline-size; }
.stage { --R: 60cqi; position: relative; perspective: 1100px; }
.scene { position: relative; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .7s var(--ease); animation: sceneIn 1.4s var(--ease) .1s backwards; }
.sway { position: relative; transform-style: preserve-3d; animation: sway 8s ease-in-out infinite alternate; }
.plate { position: absolute; inset: 0; border-radius: 28px; background: var(--brand); transform: translate3d(24px, 24px, -70px); }
.dots { position: absolute; width: 48%; aspect-ratio: 1; left: -16%; top: -9%; background-image: radial-gradient(var(--brand) 1.7px, transparent 2.1px); background-size: 16px 16px; opacity: .5; transform: translateZ(-150px); }
.photo-frame { position: relative; border-radius: 26px; transform: translateZ(0); }
.photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 30%; border-radius: 26px; box-shadow: 0 30px 60px -26px rgba(26, 29, 43, .5); }
.orbit { position: absolute; left: 50%; top: 56%; width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(74deg); pointer-events: none; }
.orbit::before { content: ''; position: absolute; width: calc(var(--R) * 2); height: calc(var(--R) * 2); left: calc(var(--R) * -1); top: calc(var(--R) * -1); border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--p) 45%, transparent); }
.spin { position: absolute; left: 0; top: 0; transform-style: preserve-3d; animation: spin 30s linear infinite; }
.sat { --a0: calc(var(--k) * 90deg + 30deg); position: absolute; left: 0; top: 0; transform-style: preserve-3d; transform: rotateZ(var(--a0)) translateX(var(--R)); }
.face { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px 7px 7px; border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 .86rem/1.2 var(--font); white-space: nowrap; box-shadow: 0 14px 28px -14px rgba(26, 29, 43, .45), 0 0 0 1px var(--line); transform: rotateZ(calc(var(--a0) * -1)) rotateX(-74deg) translate(-50%, -50%); animation: unspin 30s linear infinite; }
.face .ic { width: 28px; height: 28px; padding: 6px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); }
.photo-name { margin: 40px -30% 0; font-size: .9rem; color: var(--muted); text-align: center; }
.photo-name b { display: block; color: var(--ink); font: 800 1.15rem var(--font); }

/* ---------- home: sections */
.block { display: flex; flex-direction: column; gap: 22px; margin-top: clamp(40px, 7vw, 80px); scroll-margin-top: 84px; }
.block.first { margin-top: clamp(28px, 5vw, 56px); }
.block-head { max-width: 42em; }
.block-head h2 { font: 800 clamp(1.7rem, 3.8vw, 2.4rem)/1.12 var(--font); letter-spacing: -.03em; margin-bottom: .3em; }
.block-head .lead { margin: 0; }
.doors-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.door { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.door h3 { margin: 6px 0 2px; font-size: 1.15rem; }
.door p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.door-ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: var(--brand-soft); color: var(--brand-ink); font-size: 1.3rem; transition: background .25s, color .25s; }
.door-tag { position: absolute; top: 22px; right: 20px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--acc-soft); color: var(--acc-ink); }
.door-tag.soon { background: var(--sunk); color: var(--muted); }
.door-go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; font-weight: 800; font-size: .9rem; color: var(--brand-ink); }
.door-go .ic { transition: transform .3s var(--ease); }
.door.is-soon { box-shadow: none; background: transparent; border-style: dashed; border-color: var(--line-2); }
.door.is-soon .door-ic { background: var(--sunk); color: var(--muted); }
/* cards that lean toward the mouse (computer) */
[data-tilt] { transform: perspective(900px) rotateX(var(--cy, 0deg)) rotateY(var(--cx, 0deg)) translate3d(0, var(--lift, 0px), 0); transition: transform .45s var(--ease), box-shadow .35s, border-color .25s; }
@media (hover: hover) {
  a[data-tilt]:hover { --lift: -4px; box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--p) 55%, transparent); }
  a.door:hover .door-ic { background: var(--brand); color: var(--on-brand); }
  a.door:hover .door-go .ic { transform: translateX(4px); }
}
a[data-tilt]:active { --lift: 1px; transition-duration: .1s; }
.sum-grid, .feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sum-card { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.sum-card h3 { margin-bottom: .35em; }
.sum-card p { font-size: .95rem; }
.sum-meta { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; font: 700 .82rem var(--font); color: var(--muted); }
.sum-go { margin-left: auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--sunk); color: var(--ink); transition: transform .3s var(--ease), background .25s, color .25s; }
.mini-card, .next-card { transition: transform .35s var(--ease), box-shadow .35s, border-color .25s; }
@media (hover: hover) {
  .mini-card:hover, .next-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--p) 55%, transparent); }
  .sum-card:hover .sum-go { transform: translateX(3px); background: var(--brand); color: var(--on-brand); }
  .sum-card:hover .sum-ic, .mini-card:hover .sum-ic { background: var(--brand-soft); color: var(--brand-ink); }
}
.mini-card:active, .next-card:active { transform: scale(.985); transition-duration: .1s; }
.cta-band { position: relative; overflow: hidden; isolation: isolate; margin-top: clamp(40px, 7vw, 80px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: center; padding: clamp(26px, 5vw, 46px); border-radius: 24px; background: var(--brand); color: #FFFFFF; }
.cta-band::before { content: ''; position: absolute; z-index: -1; width: 60%; aspect-ratio: 1; right: -15%; top: -80%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .2), transparent); }
.cta-band::after { content: ''; position: absolute; z-index: -1; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .16) 1.2px, transparent 1.7px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000); mask-image: linear-gradient(90deg, transparent 40%, #000); }
.cta-band h2 { color: inherit; font: 800 clamp(1.6rem, 3.8vw, 2.2rem)/1.1 var(--font); letter-spacing: -.03em; margin-bottom: .35em; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .85); max-width: 34em; }
.cta-band .btn.primary { background: #FFFFFF; border-color: #FFFFFF; color: var(--p-d); }
@media (hover: hover) { .cta-band .btn.primary:hover { background: #FFFFFF; border-color: #FFFFFF; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .4); } }
.cta-band .btn:not(.primary) { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .55); }
.cta-band.small-band { margin-top: 12px; border-radius: var(--r); grid-template-columns: 1fr; }

/* ---------- a summary */
.reader { gap: 18px; }
.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 700 .9rem var(--font); text-decoration: none; transition: transform .3s var(--ease), color .2s; }
.back:hover { color: var(--ink); transform: translateX(-3px); }
.reader-head { margin-top: 6px; }
.reader-head h1 { font: 800 clamp(2rem, 5.4vw, 2.8rem)/1.1 var(--font); letter-spacing: -.03em; }
.reader-head .lead { margin: 0; }
.fact-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fact { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; background: var(--brand-soft); }
.fact b { font: 800 1.8rem/1 var(--font); letter-spacing: -.02em; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.fact span { font-size: .8rem; line-height: 1.3; color: var(--ink-2); }
.reader-sec h2 { font-size: 1.25rem; margin-bottom: .7em; }
.reader-sec ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.reader-sec li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.reader-sec li .ic { width: 24px; height: 24px; padding: 5px; border-radius: 50%; background: var(--good-soft); color: var(--good); stroke-width: 3; margin-top: 2px; }
.reader-sec.avoid li .ic { background: var(--bad-soft); color: var(--bad); }
.tip { padding: 18px 22px; border-radius: var(--r); border: 1.5px dashed color-mix(in srgb, var(--p) 50%, transparent); background: var(--brand-soft); }
.tip b { display: block; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 4px; }
.tip p { margin: 0; }
.next-card, .mini-card { display: flex; align-items: center; gap: 14px; padding: 16px 20px; color: inherit; text-decoration: none; }
.next-card .sum-ic, .mini-card .sum-ic { margin: 0; flex: none; }
.next-card small, .mini-card small { display: block; font-size: .78rem; color: var(--muted); }
.next-card b { font-size: 1.1rem; font-weight: 800; }
.next-card > .ic, .mini-card > .ic { margin-left: auto; color: var(--muted); }

/* ---------- login */
.auth { gap: 18px; }
.auth-head { text-align: center; padding-top: 10px; }
.auth-head h1 { font: 800 clamp(1.9rem, 5.4vw, 2.6rem)/1.1 var(--font); letter-spacing: -.03em; }
.auth-head .lead { margin-inline: auto; }
.demo-panel { background: var(--brand-soft); border-color: transparent; box-shadow: none; }
.demo-panel .row .btn { flex: 1 1 160px; }
.in-app { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; box-shadow: none; }
.in-app h3 { color: inherit; }
.in-app code { background: var(--surface); color: var(--ink); padding: 6px 10px; }

/* ---------- student space */
:where(main.wrap > section).hello { gap: 8px; }
.hello h1 { margin: 0; font: 800 clamp(1.9rem, 5.4vw, 2.7rem)/1.1 var(--font); letter-spacing: -.03em; }
.level-card, .result-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 32px; align-items: center; padding: 30px; }
.level-card > *, .result-hero > * { position: relative; z-index: 1; }
.level-card::after, .result-hero::after { content: ''; position: absolute; z-index: 0; width: 420px; height: 420px; right: -140px; top: -180px; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--p) 14%, transparent), transparent); }
.level-card h2 { margin-bottom: .3em; }
.level-ladder { --lh: 190px; width: 100%; }
.big-level { display: inline-block; font: 800 clamp(4rem, 13vw, 6.4rem)/.95 var(--font); letter-spacing: -.04em; padding-right: .06em; color: var(--c1, var(--brand-ink)); }
.big-level.pop { animation: pop3d .9s var(--ease) .1s backwards; }
.lvl-name { font-size: 1.25rem; font-weight: 800; margin: .3em 0 .3em; color: var(--ink-2); }
.ielts { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 1.1em; }
.ielts b { font-weight: 800; padding: 3px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.access-warn { margin: 4px 0 0; padding: 10px 14px; border-radius: var(--r-s); background: var(--warn-soft); color: var(--warn-ink); }
.test-card { display: flex; flex-direction: column; align-items: flex-start; }
.test-card .btn { margin-top: auto; }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.history li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.history b { font: 800 1.3rem var(--font); }
.sec-title { margin: 20px 0 0; font: 800 1.45rem/1.2 var(--font); letter-spacing: -.02em; }
.today-card .tbl-head { margin-bottom: 4px; }
.today-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.today-skill { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.today-skill .sum-ic { margin-bottom: 6px; background: var(--brand-soft); color: var(--brand-ink); }
.today-skill b { font-size: 1.05rem; font-weight: 800; }
.today-skill .small { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.today-skill .tag { margin-top: 6px; }
.today-skill.done { background: var(--sunk); }
.today-skill.done .small { color: var(--good); font-weight: 700; }
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mini-card { padding: 14px 16px; }
.mini-card .sum-ic { width: 42px; height: 42px; }
.mini-text { min-width: 0; }
.mini-text b { display: block; font-weight: 700; line-height: 1.25; }
.soon { box-shadow: none; background: transparent; border-style: dashed; border-color: var(--line-2); }
.soon .tag { margin-bottom: 12px; }

/* ---------- test */
.rules { margin: 8px 0 24px; padding-left: 1.2em; display: flex; flex-direction: column; gap: 9px; }
.rules li::marker { color: var(--brand); }
.ladder-strip { --lh: 120px; width: min(300px, 100%); margin: 6px auto 22px; }
.test-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.test-meta { display: flex; flex-direction: column; }
.test-meta .eyebrow { margin: 0; }
.qcount { font-weight: 800; font-size: 1.1rem; }
.clock { font: 800 1.35rem/1 var(--font); font-variant-numeric: tabular-nums; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--surface); }
.clock.low { background: var(--bad); color: #fff; animation: blink .9s ease-in-out infinite alternate; }
.segs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.seg-p { display: flex; flex-direction: column; gap: 5px; font-size: .72rem; font-weight: 800; color: var(--muted); text-align: center; }
.seg-p.cur { color: var(--ink); }
.seg-bar { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.seg-bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); transform: translateX(calc((var(--p) - 100) * 1%)); animation: fillFrom .6s var(--ease) backwards; }
.seg-p.cur .seg-bar i { background: var(--cur); }
.qcard { padding: 28px; }
.qcard.q-next { animation: qNext .5s var(--ease) backwards; }
.qcard.q-prev { animation: qPrev .5s var(--ease) backwards; }
.q-tags { display: flex; gap: 6px; margin-bottom: 16px; }
.passage { margin: 0 0 18px; padding: 16px 18px; background: var(--sunk); border-left: 4px solid var(--brand); border-radius: 0 var(--r-s) var(--r-s) 0; font-size: .98rem; line-height: 1.7; color: var(--ink-2); }
.prompt { font: 700 1.22rem/1.5 var(--font); letter-spacing: -.01em; margin-bottom: 20px; }
.gap { display: inline-block; min-width: 4.5em; border-bottom: 3px solid var(--brand); color: transparent; line-height: 1.05; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; min-height: 56px; border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--ink); font: 600 1rem var(--font); cursor: pointer; touch-action: manipulation; transition: border-color .15s, background .2s, transform .2s var(--ease); }
@media (hover: hover) { .opt:hover { border-color: var(--brand); } }
.opt:active { transform: scale(.985); transition-duration: .08s; }
.opt.on { border-color: var(--brand); background: var(--brand-soft); }
.ol { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--sunk); font-weight: 800; font-size: .85rem; color: var(--muted); transition: background .2s, color .2s; }
.opt.on .ol { background: var(--brand); color: var(--on-brand); }
.opt.just .ol { animation: tick .35s var(--ease); }
.test-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.confirm { background: var(--warn-soft); border: 1px solid transparent; box-shadow: none; padding: 18px; border-radius: var(--r-s); margin-top: 14px; }

/* ---------- result */
.lv-rows { display: flex; flex-direction: column; gap: 11px; margin-bottom: 14px; }
.lv-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-variant-numeric: tabular-nums; }
.lv-c { font-weight: 800; font-size: .85rem; }
.lv-n { text-align: right; font-size: .85rem; color: var(--muted); }
.lv-bar { height: 10px; border-radius: 5px; background: var(--sunk); overflow: hidden; }
.lv-bar i { display: block; height: 100%; border-radius: 5px; background: var(--muted); opacity: .35; transform: translateX(calc((var(--p) - 100) * 1%)); animation: fill 1s var(--ease) backwards; animation-delay: calc(var(--i) * 80ms + 300ms); }
.lv-bar i.ok { background: var(--brand); opacity: 1; }
.facts { margin: 0 0 14px; display: flex; flex-direction: column; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- teacher */
.dist-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.dist-c { display: flex; flex-direction: column; align-items: center; padding: 12px 4px; border-radius: var(--r-s); background: var(--sunk); border-bottom: 4px solid var(--c, var(--line-2)); }
.dist-c b { font: 800 1.6rem/1.1 var(--font); font-variant-numeric: tabular-nums; }
.dist-c span { font-size: .75rem; font-weight: 800; color: var(--muted); }
.dist-c.muted b { color: var(--muted); }
.tbl-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tbl-head h3 { margin: 0; }
.tbl-head h3 small { font: 600 .82rem var(--font); margin-left: 6px; letter-spacing: 0; }
.tbl-wrap { overflow-x: auto; margin-inline: -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td small { display: block; color: var(--muted); font-size: .8rem; }
.tbl .num { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .okc { color: var(--good); font-weight: 800; }
.tbl .badc { color: var(--bad); }
.tbl td > .muted { white-space: nowrap; }
.date-in { width: auto; min-height: 38px; padding: 6px 10px; font-size: .88rem; border-radius: 10px; }
.tbl td .date-in + small { margin-top: 4px; white-space: nowrap; }
.tbl td .link[data-renew] { display: block; margin-top: 4px; font-size: .82rem; white-space: nowrap; }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn-ink); }
.acts { white-space: nowrap; }
.acts .link + .link { margin-left: 14px; }
#detail { display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 84px; }
#detail:empty, #confirm:empty, #tConfirm:empty { display: none; }

/* ---------- IELTS mock tests */
.center-panel .sum-ic { margin-inline: auto; }
.mock-today { display: flex; flex-direction: column; gap: 10px; }
.mock-today p { margin: 0; }
.mt-pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mt-pill { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); color: var(--ink); font-weight: 800; font-size: .9rem; line-height: 1.2; }
.mt-pill .ic { color: var(--brand-ink); }
.mt-pill small { display: block; margin-left: auto; font-weight: 600; font-size: .76rem; color: var(--muted); white-space: nowrap; }
.mt-pill.used { background: var(--sunk); color: var(--muted); }
.mt-pill.used .ic { color: var(--good); }
.mock-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mock-card { display: flex; flex-direction: column; gap: 16px; }
.mock-head { display: flex; align-items: center; gap: 14px; }
.mock-no { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--brand); color: var(--on-brand); font-weight: 800; font-size: 1.1rem; }
.mock-head h3 { margin: 0 0 2px; }
.mock-head small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.mock-skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mk { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 9px 12px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font: 700 .92rem/1.2 var(--font); text-align: left; cursor: pointer; touch-action: manipulation; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.mk > .ic { color: var(--brand-ink); }
.mk > span { display: flex; flex-direction: column; min-width: 0; }
.mk small { margin-top: 2px; font-weight: 600; font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk.done { background: var(--sunk); border-color: transparent; }
.mk.done small { color: var(--good); font-weight: 700; }
.mk.open { border-color: var(--brand); background: var(--brand-soft); }
.mk.open small { color: var(--brand-ink); font-weight: 800; }
.mk:disabled { opacity: .5; cursor: not-allowed; }
@media (hover: hover) { .mk:not(:disabled):hover { border-color: var(--brand); } }
.mk:not(:disabled):active { transform: scale(.98); }
.mock-bar { position: sticky; top: calc(68px + env(safe-area-inset-top, 0px)); z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -12px 0 0; padding: 12px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.mock-bar .clock { padding: 8px 14px; font-size: 1.2rem; }
.q-sec { display: flex; flex-direction: column; gap: 12px; }
.q-instr { margin: 0; font-size: .92rem; color: var(--ink-2); }
.q-instr b { color: var(--ink); margin-right: 4px; }
.q-head { margin: 2px 0 0; font-size: 1.05rem; }
.q-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.q-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 150px; }
.q-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; font-size: .85rem; }
.q-text { margin: 2px 0 0; line-height: 2.1; }
.q-body .q-text { margin: 3px 0 10px; line-height: 1.5; font-weight: 600; }
.gap-in { display: inline-block; width: 9em; max-width: 100%; min-height: 38px; padding: 4px 10px; margin: 0 4px; border-radius: 9px; font-weight: 700; line-height: 1.3; vertical-align: middle; }
.q-body .opts { gap: 8px; }
.q-body .opt { min-height: 48px; padding: 9px 12px; }
.opts.tf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opt.opt-s { justify-content: center; text-align: center; font-size: .82rem; font-weight: 800; letter-spacing: .02em; padding: 8px 6px; }
.audio-box { display: flex; flex-direction: column; gap: 12px; }
.audio-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.audio-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.audio-prog { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.audio-prog i { display: block; height: 100%; background: var(--brand); transform-origin: 0 50%; transition: transform .5s var(--ease); }
.read-wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 20px; align-items: start; }
.passage-box { position: sticky; top: calc(150px + env(safe-area-inset-top, 0px)); max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); overflow: auto; overscroll-behavior: contain; }
.passage-box h2 { font-size: 1.35rem; }
.passage-box p { line-height: 1.75; color: var(--ink-2); }
.q-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.read-tabs, .read-next { display: none !important; }
.w-tabs { max-width: none; }
.wtask { display: flex; flex-direction: column; gap: 14px; }
.w-prompt { font-weight: 600; }
.w-area { min-height: 340px; font-size: 1.02rem; line-height: 1.75; padding: 16px; }
.chart { margin: 14px 0 6px; }
.ch-cap { margin: 0 0 6px; font-weight: 800; font-size: .92rem; text-align: center; }
.ch-scroll { overflow-x: auto; }
.chart svg { display: block; width: 100%; min-width: 420px; height: auto; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-base { stroke: var(--line-2); stroke-width: 1.5; }
.ch-axis { fill: var(--muted); font: 600 13px var(--font); }
.ch-s0 { fill: var(--p); stroke: var(--p); }
.ch-s1 { fill: var(--a); stroke: var(--a); }
.ch-s2 { fill: #2BA59A; stroke: #2BA59A; }
.ch-s3 { fill: #8A93A8; stroke: #8A93A8; }
rect.ch-s0, rect.ch-s1, rect.ch-s2, rect.ch-s3 { stroke: none; }
.ch-line { fill: none !important; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 8px; font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.ch-s0 { background: var(--p); } .legend i.ch-s1 { background: var(--a); } .legend i.ch-s2 { background: #2BA59A; } .legend i.ch-s3 { background: #8A93A8; }
.ch-tbl th, .ch-tbl td { font-size: .95rem; }
.ch-tbl tbody th { text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 700; }
.speak-steps { display: flex; gap: 5px; }
.speak-steps i { flex: 1; height: 6px; border-radius: 3px; background: var(--brand-soft-2); }
.speak-steps i.done { background: var(--brand); }
.speak-steps i.cur { background: var(--cur); }
.speak-card { display: flex; flex-direction: column; gap: 14px; }
.speak-card > * { margin: 0; }
.speak-q { font: 800 clamp(1.3rem, 3.6vw, 1.7rem)/1.3 var(--font); letter-spacing: -.02em; }
.hear { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; }
.cue { border: 2px dashed color-mix(in srgb, var(--p) 45%, transparent); border-radius: var(--r); padding: 18px 20px; background: var(--brand-soft); }
.cue h2 { font-size: 1.2rem; margin-bottom: .4em; }
.cue p { margin: 0; }
.cue ul { margin: 6px 0 8px; padding-left: 1.2em; }
.rec-zone { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rec-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 24px 10px 18px; border-radius: 999px; border: 0; background: var(--bad); color: #fff; font: 800 1rem var(--font); cursor: pointer; touch-action: manipulation; transition: transform .2s var(--ease), background .2s; }
.rec-btn:active { transform: scale(.97); }
.rec-btn.on { background: var(--ink); color: var(--surface); }
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.rec-btn.on .rec-dot { background: var(--bad); border-radius: 3px; animation: blink .7s ease-in-out infinite alternate; }
.rec-time { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
audio { display: block; width: 100%; max-width: 480px; height: 44px; }
.mock-hero { grid-template-columns: minmax(0, 1fr) auto; }
.score-big { font: 800 clamp(3.2rem, 11vw, 4.6rem)/1 var(--font); letter-spacing: -.04em; color: var(--brand-ink); margin: 6px 0 10px; }
.score-big small { font-size: .42em; color: var(--muted); letter-spacing: 0; }
.ring { width: 150px; height: 150px; }
.ring circle { fill: none; stroke-width: 11; transform: rotate(-90deg); transform-origin: 60px 60px; }
.ring-t { stroke: var(--sunk); }
.ring-a { stroke: var(--brand); stroke-linecap: round; animation: ringIn 1.2s var(--ease) .2s backwards; }
.ring text { fill: var(--ink); font: 800 22px var(--font); }
@keyframes ringIn { from { stroke-dasharray: 0 326.7; } }
.review { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.review li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.review li:last-child { border-bottom: 0; }
.rv-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.rv-mark .ic { width: 15px; height: 15px; stroke-width: 3; }
.rv-mark.ok { background: var(--good-soft); color: var(--good); }
.rv-mark.no { background: var(--bad-soft); color: var(--bad); }
.rv-q { margin: 2px 0 4px; font-weight: 600; }
.rv-a { margin: 0; font-size: .88rem; color: var(--muted); }
.rv-a b.ok { color: var(--good); }
.rv-a b.no { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.gap-s { display: inline-block; width: 3.5em; border-bottom: 2px solid var(--line-2); vertical-align: baseline; }
details.panel > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; font-weight: 800; list-style: none; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary .ic { transition: transform .3s var(--ease); }
details.panel[open] > summary { margin-bottom: 14px; }
details.panel[open] > summary .ic { transform: rotate(90deg); }
.transcript p { margin: 0 0 .7em; line-height: 1.7; }
.transcript b { color: var(--brand-ink); }
.w-text { white-space: pre-wrap; background: var(--sunk); border-radius: var(--r-s); padding: 14px 16px; line-height: 1.75; margin: 10px 0 0; }
.check-list { margin: 6px 0 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }
.sp-q { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sp-q:last-child { border-bottom: 0; }
.sp-q p { margin: 0 0 6px; }
.sp-q audio, .sp-q .btn { margin-bottom: 8px; }
.sp-said { padding: 10px 14px; border-radius: var(--r-s); background: var(--sunk); line-height: 1.6; }
.sp-said small { display: block; margin-bottom: 2px; font-size: .76rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.up-state { display: flex; align-items: center; gap: 6px; margin: 0; min-height: 1.4em; font-size: .88rem; font-weight: 700; color: var(--muted); }
.up-state.ok { color: var(--good); }
.up-state.fail { color: var(--bad); }
.up-state .ic { width: 16px; height: 16px; }
.ai-box.flat { margin-top: 4px; padding-top: 0; border-top: 0; }
/* the Make It Easy method: steps found in an answer, a tip, and the answer rebuilt with the method */
.method { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.method > * { margin: 0; }
.msteps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.msteps small { flex-basis: 100%; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.msteps span, .mkeys span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 8px; border-radius: 999px; font-size: .84rem; font-weight: 800; }
.msteps span .ic { width: 14px; height: 14px; stroke-width: 3; }
.msteps span.ok { background: var(--good-soft); color: var(--good); }
.msteps span.no { background: var(--bad-soft); color: var(--bad); }
.mtip { display: flex; align-items: flex-start; gap: 8px; font-weight: 700; }
.mtip .ic { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--acc-soft); color: var(--acc-ink); stroke-width: 2.6; }
.mkeys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mkeys small { flex-basis: 100%; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mkeys span { background: var(--brand-soft); color: var(--ink); font-weight: 700; }
.mkeys em { font-style: normal; font-size: .7rem; font-weight: 800; letter-spacing: .06em; color: var(--brand-ink); }
.mmodel { padding: 12px 14px; border-radius: var(--r-s); border: 1.5px solid color-mix(in srgb, var(--brand) 30%, transparent); background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); display: flex; flex-direction: column; gap: 6px; }
.mmodel p { margin: 0; line-height: 1.65; }
.mmodel .mmodel-h { font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); }
.mlabel { display: inline-block; margin-right: 4px; padding: 0 8px; border-radius: 6px; background: var(--brand); color: var(--on-brand); font-size: .74rem; font-weight: 800; letter-spacing: .03em; vertical-align: 1px; }
.mchecks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mchecks li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.mchecks li > .ic { width: 22px; height: 22px; padding: 4px; border-radius: 50%; stroke-width: 3; margin-top: 1px; }
.mchecks li.ok > .ic { background: var(--good-soft); color: var(--good); }
.mchecks li.no > .ic { background: var(--bad-soft); color: var(--bad); }
.mchecks b { display: block; font-size: .95rem; }
.mchecks small { display: block; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.again { margin-top: 10px; }
.spend { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 14px; padding: 12px 14px; border-radius: var(--r-s); background: var(--sunk); }
.spend p { margin: 0; }
.spend .lv-bar { height: 8px; background: var(--surface); }
/* bands: the overall band and one band per skill */
.band-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.band-all { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 150px; padding: 14px 18px; border-radius: var(--r-s); background: var(--brand); color: var(--on-brand); text-align: center; }
.band-all span { font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; opacity: .9; }
.band-all b { font: 800 2.6rem/1.05 var(--font); font-variant-numeric: tabular-nums; }
.band-all small { max-width: 16em; font-size: .76rem; line-height: 1.35; opacity: .9; }
.band-skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.band-skills span { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); font-weight: 800; font-size: .92rem; }
.band-skills span .ic { color: var(--brand-ink); }
.band-skills b { margin-left: auto; font-size: 1.05rem; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.band-skills span.none { background: var(--sunk); color: var(--muted); }
.band-skills span.none b, .band-skills span.none .ic { color: var(--muted); }
.mock-overall { flex: none; margin-left: auto; display: flex; flex-direction: column; align-items: center; padding: 4px 10px; border-radius: 12px; background: var(--acc-soft); color: var(--acc-ink); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.mock-overall b { font-size: 1.15rem; letter-spacing: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .band-card { grid-template-columns: 1fr; }
  .band-all { min-width: 0; }
}
.result-hero > .sum-ic.big { margin: 0; justify-self: end; }
.today-skill .btn { margin-top: 8px; }
@media (max-width: 860px) {
  .read-wrap { grid-template-columns: 1fr; }
  .read-tabs { display: grid !important; position: sticky; top: calc(132px + env(safe-area-inset-top, 0px)); z-index: 9; margin: 0; box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .2); }
  .read-next { display: inline-flex !important; }
  .passage-box { position: static; max-height: none; overflow: visible; }
  .read-wrap[data-show="passage"] .q-col, .read-wrap[data-show="questions"] .passage-box { display: none; }
  .mt-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .mock-grid { grid-template-columns: 1fr; }
  .ring { width: 110px; height: 110px; }
}
@media (max-width: 420px) {
  .mt-pill { flex-wrap: wrap; }
  .mt-pill small { margin-left: 0; width: 100%; }
  .q-item { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .q-n { width: 28px; height: 28px; }
  .opt.opt-s { font-size: .74rem; }
  .ring { width: 92px; height: 92px; }
}

/* automatic writing correction */
.ai-wait { display: flex; align-items: center; gap: 14px; margin-top: 6px; padding: 14px 16px; border-radius: var(--r-s); background: var(--brand-soft); }
.ai-wait .loader { margin: 0; flex: none; }
.ai-wait p { margin: 0; }
.ai-box { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 12px; }
.ai-box h4 { margin: 4px 0 6px; font-size: .95rem; }
.ai-band { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--r-s); background: var(--brand-soft); }
.ai-band span { font-weight: 800; color: var(--brand-ink); font-size: .9rem; }
.ai-band b { font: 800 1.8rem/1 var(--font); color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.ai-crit { margin: 0; }
.ai-crit .lv-row { grid-template-columns: minmax(0, 11em) minmax(0, 1fr) 36px; }
.ai-crit .lv-c { font-weight: 700; font-size: .85rem; }
.ai-comment { margin: 0; padding: 12px 14px; border-left: 4px solid var(--cur); border-radius: 0 var(--r-s) var(--r-s) 0; background: var(--sunk); font-weight: 600; }
.ai-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ai-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ai-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: .95rem; }
.ai-list .ic { width: 22px; height: 22px; padding: 4px; border-radius: 50%; stroke-width: 2.6; margin-top: 1px; }
.ai-list.good .ic { background: var(--good-soft); color: var(--good); }
.ai-list.next .ic { background: var(--acc-soft); color: var(--acc-ink); }
.ai-fix { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ai-fix li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.ai-fix li:last-child { border-bottom: 0; }
.ai-fix p { margin: 0 0 3px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ai-fix s { color: var(--bad); text-decoration-thickness: 1.5px; }
.ai-fix b { color: var(--good); }
.ai-fix .ic { width: 16px; height: 16px; color: var(--muted); }
.ai-fix small { color: var(--muted); font-size: .85rem; }
@media (max-width: 600px) {
  .ai-cols { grid-template-columns: 1fr; }
  .ai-crit .lv-row { grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) 32px; }
}

/* ---------- recorded lessons */
.ls-course { display: flex; flex-direction: column; gap: 18px; }
.ls-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; }
.ls-head h2 { margin: 8px 0 4px; }
.ls-head p { margin: 0; max-width: 44em; }
.ls-count { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.ls-count b { color: var(--ink); }
.ls-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ls-tile { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; transition: transform .3s var(--ease), border-color .2s, box-shadow .3s; }
@media (hover: hover) { .ls-tile:not(:disabled):hover { border-color: var(--brand); box-shadow: var(--shadow-lift); transform: translateY(-2px); } }
.ls-tile:not(:disabled):active { transform: scale(.98); }
.ls-tile:disabled { opacity: .55; cursor: not-allowed; }
.ls-ic { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink); }
.ls-ic .ic { width: 26px; height: 26px; }
.ls-ic.big { width: 60px; height: 60px; border-radius: 18px; background: var(--brand); color: var(--on-brand); }
.ls-ic.big .ic { width: 32px; height: 32px; }
.ls-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ls-txt small { font-size: .72rem; font-weight: 800; letter-spacing: .1em; color: var(--brand-ink); }
.ls-txt b { font-size: 1.05rem; font-weight: 800; }
.ls-txt span { font-family: 'Cairo', var(--font); font-size: .88rem; color: var(--muted); }
.ls-meta { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.ls-meta .ic { width: 15px; height: 15px; stroke-width: 3; }
.ls-tile.done .ls-meta { color: var(--good); }
.ls-tile.done .ls-ic { background: var(--good-soft); color: var(--good); }
.ls-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--cur); transform-origin: 0 50%; transform: scaleX(calc(var(--p) / 100)); }
.lesson-page { gap: 16px; }
.lesson-head { display: flex; align-items: center; gap: 16px; }
.lesson-head .eyebrow { margin: 0 0 2px; }
.lesson-head h1 { margin: 0; font-size: clamp(1.6rem, 4.4vw, 2.3rem); }
.lesson-head .ar { text-align: left; margin: 2px 0 0; font-family: 'Cairo', var(--font); font-weight: 700; color: var(--muted); }
.player { position: relative; border-radius: var(--r); overflow: hidden; background: #000; box-shadow: var(--shadow-lift); }
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.up-next { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; text-align: center; background: rgba(10, 12, 20, .82); color: #FFFFFF; }
.up-next p { margin: 0; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.up-next b { font-size: clamp(1.2rem, 3.6vw, 1.7rem); margin-bottom: 8px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ls-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ls-mini button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid transparent; background: var(--sunk); color: var(--ink); font: 700 .92rem var(--font); text-align: left; cursor: pointer; }
.ls-mini button .ls-ic { width: 36px; height: 36px; border-radius: 10px; }
.ls-mini button .ls-ic .ic { width: 20px; height: 20px; }
.ls-mini button small { margin-left: auto; color: var(--muted); font-weight: 600; }
.ls-mini button.on { border-color: var(--brand); background: var(--brand-soft); }
@media (hover: hover) { .ls-mini button:not(.on):hover { border-color: var(--line-2); } }
@media (max-width: 860px) { .ls-grid, .ls-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .ls-grid, .ls-mini { grid-template-columns: 1fr; } .lesson-nav .btn { flex: 1 1 100%; } }

/* ---------- IELTS Prep lessons (class slides) */
.pp-head { display: flex; align-items: center; gap: 14px; }
.pp-head h2 { margin: 0; }
.pp-head span[lang="ar"] { font-family: 'Cairo', var(--font); font-weight: 700; color: var(--muted); }
.pp-head .ls-count { margin: 0 0 0 auto; }
.pp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pp-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 0; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; transition: transform .3s var(--ease), border-color .2s, box-shadow .3s; }
.pp-tile:active { transform: scale(.985); }
@media (hover: hover) { .pp-tile:hover { border-color: var(--brand); box-shadow: var(--shadow-lift); transform: translateY(-2px); } }
.pp-cover { display: block; aspect-ratio: 16 / 9; background: var(--sunk); overflow: hidden; }
.pp-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pp-txt { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; line-height: 1.35; }
.pp-txt small { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-ink); }
.pp-txt b { font-size: 1.12rem; font-weight: 800; }
.pp-txt span { font-size: .9rem; color: var(--muted); }
.pp-txt em { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-style: normal; font-weight: 800; font-size: .88rem; color: var(--brand-ink); }
.pp-txt em .ic { width: 16px; height: 16px; }
.pp-tile.done em { color: var(--good); }
.slide-stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #0B0D14; box-shadow: var(--shadow-lift); user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.slide-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .2s; }
.slide-stage.loading img { opacity: .55; }
.slide-tap { position: absolute; top: 0; bottom: 0; width: 28%; border: 0; padding: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.slide-tap.prev { left: 0; cursor: w-resize; }
.slide-tap.next { right: 0; cursor: e-resize; }
.slide-full { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: rgba(10, 12, 20, .55); color: #FFFFFF; cursor: pointer; }
.slide-full .ic { width: 20px; height: 20px; }
.slide-num { position: absolute; left: 10px; bottom: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(10, 12, 20, .55); color: #FFFFFF; font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; pointer-events: none; }
.slide-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--cur); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .3s var(--ease); pointer-events: none; }
.slide-key { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; text-align: center; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.slide-key[hidden] { display: none; }
.slide-key b { font-size: clamp(1.2rem, 3.6vw, 1.6rem); }
.slide-key p { margin: 0 0 8px; color: var(--muted); }
.slide-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.slide-bar input[type="range"] { width: 100%; accent-color: var(--brand); }
.done-box { justify-content: space-between; flex-wrap: wrap; }
.done-box[hidden] { display: none; }
.done-box .sum-ic { margin: 0; flex: none; }
/* full screen: the slide fills the screen (on every phone, even where the browser has no real full screen) */
.slide-stage.full { position: fixed; inset: 0; z-index: 200; width: 100vw; height: 100vh; height: 100dvh; aspect-ratio: auto; border-radius: 0; background: #000; }
body.slides-full { overflow: hidden; }
@media (max-width: 560px) {
  .pp-grid { grid-template-columns: 1fr; }
  .slide-stage:not(.full) { margin-inline: -16px; border-radius: 0; }
  .slide-bar { grid-template-columns: 1fr 1fr; }
  .slide-bar input[type="range"] { grid-column: 1 / -1; grid-row: 1; }
}

/* ---------- motion */
@keyframes rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } }
@keyframes rise3d { from { opacity: 0; transform: perspective(900px) translate3d(0, 36px, -40px) rotateX(18deg); } }
@keyframes flipUp { from { opacity: 0; transform: translate3d(0, .3em, 0) rotateX(-85deg); } }
@keyframes pop3d { from { opacity: 0; transform: perspective(600px) translate3d(0, 20px, 0) rotateX(-60deg); } }
@keyframes sceneIn { from { transform: rotateY(-38deg) rotateX(14deg) translate3d(0, 30px, -180px); } }
@keyframes sway { from { transform: rotateY(-9deg) rotateX(3deg); } to { transform: rotateY(9deg) rotateX(-3deg); } }
@keyframes spin { to { transform: rotateZ(360deg); } }
@keyframes unspin { from { transform: rotateZ(calc(var(--a0) * -1)) rotateX(-74deg) translate(-50%, -50%); } to { transform: rotateZ(calc(var(--a0) * -1 - 360deg)) rotateX(-74deg) translate(-50%, -50%); } }
@keyframes grow { from { opacity: 0; transform: scaleY(0); } }
@keyframes barIn { from { transform: scaleX(0); } }
@keyframes glow { to { transform: translate3d(-90px, 70px, 0) scale(1.12); } }
@keyframes tick { 50% { transform: scale(.85); } }
@keyframes load { from { transform: scaleY(.3); } }
@keyframes blink { to { opacity: .7; } }
@keyframes arc { from { stroke-dasharray: 0 56.55; } }
@keyframes fill { from { transform: translateX(-100%); } }
@keyframes fillFrom { from { transform: translateX(calc((var(--from) - 100) * 1%)); } }
@keyframes qNext { from { opacity: 0; transform: perspective(1000px) translate3d(36px, 0, 0) rotateY(-14deg); } }
@keyframes qPrev { from { opacity: 0; transform: perspective(1000px) translate3d(-36px, 0, 0) rotateY(14deg); } }
.in-rise { animation: rise .7s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.js [data-reveal] { opacity: 0; }
.js [data-reveal].seen { opacity: 1; transform-origin: 50% 0; animation: rise3d .9s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 90ms); }
.is-off, .is-off *, .is-off::before, .is-off::after { animation-play-state: paused !important; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.confetti { display: none; }
.fps { position: fixed; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 70; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: var(--surface); font: 700 .8rem var(--font); font-variant-numeric: tabular-nums; pointer-events: none; }

/* ---------- tablet and phone */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { width: min(330px, 76%); margin-top: 12px; }
  .doors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat-grid { grid-template-columns: 1fr; }
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wide-only { display: none !important; }
}
@media (max-width: 760px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .level-card, .result-hero { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .level-ladder { --lh: 150px; max-width: 320px; }
  .cta-band { grid-template-columns: 1fr; }
  .fact-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .wrap { padding-inline: 16px; }
  .panel { padding: 20px; }
  .qcard { padding: 20px; }
  .prompt { font-size: 1.08rem; }
  .center-panel { padding: 30px 20px; }
  .segs { gap: 4px; }
  .test-nav .muted { display: none; }
  .brand small { display: none; }
  .brand b { font-size: 1.08rem; }
  .brand-logo { width: 36px; height: 36px; }
  .topbar-in { gap: 8px; }
  .top-actions .btn .ic { display: none; }
  .days-left { padding-right: 10px; }
  .days-left .dl-word { display: none; }
  .days-left .dl-short { display: inline; }
  .doors-grid, .sum-grid, .mini-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-media { width: min(250px, 66%); }
  .stage { --R: 50cqi; }
  .face { font-size: .72rem; gap: 5px; padding: 5px 10px 5px 5px; }
  .face .ic { width: 22px; height: 22px; padding: 4px; }
  .plate { transform: translate3d(16px, 16px, -60px); }
  .photo-name { margin-top: 34px; margin-inline: -30%; }
  .cta-band .row .btn { flex: 1 1 100%; }
  .foot-in { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  /* signed in on a phone: the round logo alone, so the days left and Sign out fit */
  .topbar-in:has(.days-left, #logout) .brand-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; }
}
