/* Layout: one calm reading column (max 880px) under a slim top bar; on phones the three sections move to a bottom tab bar. */
:root{
  --bg:#F3F6F2; --surface:#FFFFFF; --surface-2:#E8EEE7; --ink:#1E2B27; --ink-2:#53625C; --muted:#78857F; --line:#DCE4DB; --line-2:#CBD6CA; --navy:#1E2B27; --top:#F3F6F2; --top-ink:#1E2B27; --hero:#2F6F5E; --hero-ink:#F3F6F2;
  --accent:#2F6F5E; --accent-d:#245A4C; --accent-ink:#FFFFFF; --accent-soft:#E1EEE9; --hot:#C9A24A; --hot-d:#A8852F; --hot-ink:#2B2005; --hot-soft:#F6EEDB;
  --blue:#2F78C4; --blue-soft:#E4EFF9; --red:#C0563F; --red-soft:#F8E5E0; --green:#2F7F62; --green-soft:#E1F1EA; --purple:#7A63C7; --purple-soft:#EEEAF8; --amber:#94701C; --amber-soft:#F6EEDB;
  --shadow:none; --lift:0 1px 2px rgba(30,43,39,.05),0 10px 26px rgba(30,43,39,.06);
  --f-ar:"IBM Plex Sans Arabic","Segoe UI",Tahoma,sans-serif; --f-en:"Nunito","Segoe UI",system-ui,sans-serif; --f-ui:"IBM Plex Sans Arabic","Segoe UI",system-ui,sans-serif; --f-d:"Alexandria","IBM Plex Sans Arabic","Segoe UI",Tahoma,sans-serif;
  --r:18px; --r-s:14px; --ease:cubic-bezier(.2,.8,.2,1);
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#111816; --surface:#18221F; --surface-2:#1F2B27; --ink:#E4EBE7; --ink-2:#A7B4AE; --muted:#86938D; --line:#283631; --line-2:#33433D; --navy:#E4EBE7; --top:#111816; --top-ink:#E4EBE7; --hero:#1E3D34; --hero-ink:#E4EBE7;
  --accent:#7CC2AB; --accent-d:#5FA68F; --accent-ink:#0D1A16; --accent-soft:#1C332C; --hot:#D9B565; --hot-d:#B8963F; --hot-ink:#241B06; --hot-soft:#2F2716;
  --blue:#6AA8E8; --blue-soft:#1A2C3D; --red:#FF8F7C; --red-soft:#3A221E; --green:#7CC2AB; --green-soft:#1C332C; --purple:#B29DF0; --purple-soft:#2A2442; --amber:#D9B565; --amber-soft:#2F2716;
  --shadow:none; --lift:0 1px 0 rgba(255,255,255,.03),0 10px 28px rgba(0,0,0,.35); color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#111816; --surface:#18221F; --surface-2:#1F2B27; --ink:#E4EBE7; --ink-2:#A7B4AE; --muted:#86938D; --line:#283631; --line-2:#33433D; --navy:#E4EBE7; --top:#111816; --top-ink:#E4EBE7; --hero:#1E3D34; --hero-ink:#E4EBE7;
  --accent:#7CC2AB; --accent-d:#5FA68F; --accent-ink:#0D1A16; --accent-soft:#1C332C; --hot:#D9B565; --hot-d:#B8963F; --hot-ink:#241B06; --hot-soft:#2F2716;
  --blue:#6AA8E8; --blue-soft:#1A2C3D; --red:#FF8F7C; --red-soft:#3A221E; --green:#7CC2AB; --green-soft:#1C332C; --purple:#B29DF0; --purple-soft:#2A2442; --amber:#D9B565; --amber-soft:#2F2716;
  --shadow:none; --lift:0 1px 0 rgba(255,255,255,.03),0 10px 28px rgba(0,0,0,.35); color-scheme:dark}
*{box-sizing:border-box}
body{background:var(--bg);color:var(--ink);font-family:var(--f-ar);font-size:16px;line-height:1.7;-webkit-font-smoothing:antialiased}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:30;background:var(--surface)}
button,input,textarea,select{font:inherit;color:inherit}
a{color:var(--accent)}
h1,h2,h3{text-wrap:balance;margin:0;line-height:1.35;font-weight:600;font-family:var(--f-d)}
h1{font-size:1.75rem} h2{font-size:1.3rem} h3{font-size:1.06rem}
p{margin:0}
.en{font-family:var(--f-en);direction:ltr;text-align:left;unicode-bidi:isolate}
.en-inline{font-family:var(--f-en);direction:ltr;unicode-bidi:isolate}
.en-i{font-family:var(--f-en);unicode-bidi:isolate}
.gr-ar p{margin:0 0 8px}
.muted{color:var(--muted)} .small{font-size:.86rem} .tiny{font-size:.78rem}
.num{font-variant-numeric:tabular-nums}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}

/* Top bar */
.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.top-in{max-width:960px;margin:0 auto;display:flex;align-items:center;gap:16px;padding-block:10px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);font-weight:800;font-family:var(--f-d);font-size:1.15rem}
.brand-mark{width:34px;height:34px;border-radius:11px;background:var(--accent);display:grid;place-items:center;color:var(--accent-ink);font-family:var(--f-d);font-weight:800;font-size:1.2rem;box-shadow:0 3px 0 var(--accent-d)}
.brand small{display:block;font-weight:400;color:var(--muted);font-size:.74rem;line-height:1.2}
.nav{display:flex;gap:4px;margin-inline-start:auto}
.nav a{padding:7px 14px;border-radius:999px;text-decoration:none;color:var(--ink-2);font-weight:500;font-size:.95rem}
.nav a.on{background:var(--accent-soft);color:var(--accent)}
.sync{font-size:.74rem;color:var(--muted);display:flex;align-items:center;gap:6px}
.sync i{width:7px;height:7px;border-radius:50%;background:var(--muted);display:inline-block}
.sync.ok i{background:var(--green)} .sync.local i{background:var(--amber)}
.tabbar{display:none}
@media (max-width:720px){
  .nav,.sync{display:none}
  .tabbar{display:flex;position:fixed;inset:auto 0 0;z-index:20;background:var(--surface);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom,0px);padding-left:max(8px,env(safe-area-inset-left,0px));padding-right:max(8px,env(safe-area-inset-right,0px))}
  .tabbar a{flex:1;text-align:center;padding:9px 4px 8px;text-decoration:none;color:var(--muted);font-size:.8rem;display:flex;flex-direction:column;align-items:center;gap:2px}
  .tabbar a svg{width:22px;height:22px}
  .tabbar a.on{color:var(--accent)}
  main{padding-bottom:84px!important}
}

main{max-width:960px;margin:0 auto;padding-block:24px 64px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.col{max-width:760px;margin:0 auto;display:flex;flex-direction:column;gap:20px}
.stack{display:flex;flex-direction:column;gap:12px}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.between{justify-content:space-between}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:14px}
.grid3{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:12px}
.grid3>*,.grid2>*{min-width:0}

.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:20px;box-shadow:var(--lift)}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:18px}
.soft{background:var(--surface-2);border-radius:var(--r-s);padding:14px}
.eyebrow{font-size:.78rem;color:var(--muted);letter-spacing:.02em;font-weight:500}
.crumbs{font-size:.85rem;color:var(--muted);display:flex;gap:6px;flex-wrap:wrap}
.crumbs a{color:var(--muted);text-decoration:none} .crumbs a:hover{color:var(--accent)}
.sub-nav{display:flex;gap:6px;flex-wrap:wrap}
.sub-nav a{padding:6px 12px;border-radius:999px;border:1px solid var(--line);text-decoration:none;color:var(--ink-2);font-size:.88rem;background:var(--surface)}
.sub-nav a.on{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--line);background:var(--surface);color:var(--accent);padding:8px 18px;border-radius:14px;cursor:pointer;font-weight:700;font-family:var(--f-d);box-shadow:0 3px 0 var(--line);text-decoration:none;font-size:.95rem;min-height:40px;transition:transform .12s ease,filter .15s,box-shadow .15s}
.btn:active{transform:translateY(3px);box-shadow:none!important}
.btn:hover{border-color:var(--accent)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);box-shadow:0 4px 0 var(--accent-d)}
.btn.primary:hover{filter:brightness(1.06)}
.btn.big{padding:12px 26px;font-size:1.12rem;min-height:54px;border-radius:16px}
.btn.ghost{border-color:transparent;background:transparent;color:var(--accent);box-shadow:none}
.btn.danger{color:var(--red)}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.btn.rec{background:var(--red);border-color:var(--red);color:#fff;box-shadow:0 4px 0 #B8323A}

.chip{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:2px 10px;font-size:.78rem;font-weight:500;background:var(--surface-2);color:var(--ink-2);border:1px solid var(--line);white-space:nowrap}
.chip.blue{background:var(--blue-soft);color:var(--blue);border-color:transparent}
.chip.red{background:var(--red-soft);color:var(--red);border-color:transparent}
.chip.green{background:var(--green-soft);color:var(--green);border-color:transparent}
.chip.purple{background:var(--purple-soft);color:var(--purple);border-color:transparent}
.chip.amber{background:var(--amber-soft);color:var(--amber);border-color:transparent}
.chip.accent{background:var(--accent-soft);color:var(--accent);border-color:transparent}

/* Home */
.hero{display:flex;flex-direction:column;gap:18px;padding:26px}
.hero h1{font-size:1.65rem}
.today-title{font-family:var(--f-en);font-size:1.35rem;direction:ltr;text-align:left}
.meter{height:14px;border-radius:999px;background:var(--surface-2);overflow:hidden}
.meter>span{display:block;height:100%;background:var(--green);border-radius:999px;box-shadow:inset 0 -4px 0 rgba(0,0,0,.12),inset 0 3px 0 rgba(255,255,255,.25)}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
@media (max-width:620px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
.stat{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-s);padding:12px 14px}
.stat b{display:block;font-size:1.35rem;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.3}
.stat span{font-size:.8rem;color:var(--muted)}

/* Week map */
.stage{display:flex;flex-direction:column;gap:10px}
.stage-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.stage-head h3{font-size:1.05rem}
.weeks{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
@media (max-width:560px){.weeks{grid-template-columns:repeat(2,minmax(0,1fr))}}
.wk{display:block;text-decoration:none;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:var(--r-s);padding:10px 12px;min-height:84px}
.wk:hover{border-color:var(--accent)}
.wk .n{font-size:.75rem;color:var(--muted)} .wk .t{font-size:.86rem;line-height:1.45;display:block;margin-top:2px}
.wk.cur{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.wk.done{background:var(--surface-2)}
.wk .dots{display:flex;gap:3px;margin-top:8px}
.wk .dots i{width:8px;height:8px;border-radius:50%;background:var(--line)}
.wk .dots i.f{background:var(--accent)}

/* Day page */
.dayhead{display:flex;flex-direction:column;gap:8px}
.session{display:flex;flex-direction:column;gap:14px}
.session-h{display:flex;align-items:center;gap:10px;margin-top:6px}
.session-h h2{font-size:1.08rem}
.session-h .line{flex:1;height:1px;background:var(--line)}
.step{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.step-h{display:flex;align-items:center;gap:12px;padding:14px 18px;cursor:pointer;user-select:none}
.step-h .tick{width:26px;height:26px;border-radius:50%;border:1.5px solid var(--line);display:grid;place-items:center;flex:none;font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums}
.step.ok .tick{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.step-h h3{flex:1;font-size:1rem;font-weight:600}
.step-h .mins{font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums}
.step-b{padding:0 18px 18px;display:flex;flex-direction:column;gap:14px}
.step.closed .step-b{display:none}
.objective dl{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;margin:0}
.objective dt{color:var(--muted);font-size:.86rem}
.objective dd{margin:0}

/* Expression card */
.xcard{border:1px solid var(--line);border-radius:var(--r-s);padding:14px 16px;background:var(--surface);display:flex;flex-direction:column;gap:8px;border-inline-start:4px solid var(--blue)}
.xcard.green{border-inline-start-color:var(--green)}
.xcard .x-en{font-family:var(--f-en);font-size:1.22rem;direction:ltr;text-align:left;font-weight:500;color:var(--blue)}
.xcard.green .x-en{color:var(--green)}
.xcard .x-ar{font-weight:500}
.xcard .x-ex{font-family:var(--f-en);direction:ltr;text-align:left;color:var(--ink-2);font-style:italic}
.xcard .x-img{font-size:.9rem;color:var(--ink-2);background:var(--surface-2);padding:8px 10px;border-radius:8px}
.deep{border-top:1px dashed var(--line);padding-top:10px;display:flex;flex-direction:column;gap:8px;font-size:.93rem}
.deep b{font-weight:600}

/* Forms */
textarea,input[type=text],select{width:100%;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-s);padding:11px 13px;line-height:1.6}
textarea{min-height:180px;resize:vertical}
textarea.en,input.en{font-family:var(--f-en);font-size:1.06rem}
textarea:focus,input:focus,select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
label{font-size:.9rem;color:var(--ink-2)}
.wc{font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums}

/* Choices */
.q{display:flex;flex-direction:column;gap:8px;padding:12px 0;border-bottom:1px solid var(--line)}
.q:last-child{border-bottom:0}
.opts{display:flex;flex-direction:column;gap:6px}
.opt{text-align:start;border:1px solid var(--line);background:var(--surface);border-radius:var(--r-s);padding:10px 14px;cursor:pointer;box-shadow:0 3px 0 var(--line);font-family:var(--f-en);font-weight:600}
.opt:hover{border-color:var(--accent)}
.opt.right{background:var(--green-soft);border-color:var(--green);color:var(--green)}
.opt.wrong{background:var(--red-soft);border-color:var(--red);color:var(--red)}
.opt[disabled]{cursor:default}
.res{font-size:.88rem}
.res.ok{color:var(--green)} .res.no{color:var(--red)}

/* Recorder */
.recorder{display:flex;flex-direction:column;gap:10px;background:var(--surface-2);border-radius:var(--r-s);padding:14px}
.rec-time{font-variant-numeric:tabular-nums;font-size:1.3rem;font-weight:600;direction:ltr}
.rec-dot{width:10px;height:10px;border-radius:50%;background:var(--red);animation:pulse 1.2s infinite}
@keyframes pulse{50%{opacity:.25}}
@media (prefers-reduced-motion:reduce){.rec-dot{animation:none}}
audio{width:100%;height:40px}
.timer{font-variant-numeric:tabular-nums;font-weight:600;direction:ltr;display:inline-block;min-width:3.5em;text-align:center}

/* Feedback */
.scores{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,140px),1fr));gap:8px}
.score{background:var(--surface-2);border-radius:var(--r-s);padding:10px 12px}
.score b{font-size:1.15rem;font-variant-numeric:tabular-nums}
.score .bar{height:5px;border-radius:999px;background:var(--line);margin:6px 0 4px}
.score .bar span{display:block;height:100%;border-radius:999px;background:var(--accent)}
.score p{font-size:.82rem;color:var(--ink-2);line-height:1.5}
.total{display:flex;align-items:baseline;gap:8px}
.total b{font-size:2rem;font-variant-numeric:tabular-nums;font-weight:600}
.fix{border:1px solid var(--line);border-radius:var(--r-s);padding:12px 14px;display:flex;flex-direction:column;gap:8px;background:var(--surface)}
.fix .o{font-family:var(--f-en);direction:ltr;text-align:left;color:var(--red);text-decoration:line-through;text-decoration-thickness:1px;text-decoration-color:color-mix(in srgb,var(--red) 50%,transparent)}
.fix .c{font-family:var(--f-en);direction:ltr;text-align:left;color:var(--green);font-weight:500}
.fix .alt{font-family:var(--f-en);direction:ltr;text-align:left;font-size:.95rem;color:var(--ink-2)}
.fix .alt em{font-style:normal;color:var(--purple)}
.fix.improve{border-style:dashed}
.fix.improve .o{text-decoration:none;color:var(--ink-2)}

/* Error log */
.err{border:1px solid var(--line);border-radius:var(--r-s);padding:12px 14px;background:var(--surface);display:flex;flex-direction:column;gap:6px}
.err.red{border-color:var(--red);box-shadow:inset 3px 0 0 var(--red)}
[dir=rtl] .err.red{box-shadow:inset -3px 0 0 var(--red)}
.err .k{font-family:var(--f-en);direction:ltr;text-align:left;font-weight:500}

/* Flashcard */
.flash{min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px;padding:28px}
.flash .x-en{font-family:var(--f-en);font-size:1.7rem;direction:ltr;line-height:1.3}
.flash .x-en.blue{color:var(--blue)} .flash .x-en.green{color:var(--green)}
.flash .reveal{display:flex;flex-direction:column;gap:8px;width:100%;max-width:520px}
.grades{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:100%;max-width:520px}

/* Palace */
.room{display:block;text-decoration:none;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:var(--r-s);padding:14px}
.room:hover{border-color:var(--accent)}
.room b{display:block;font-size:1.02rem}
.room .ct{font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums}

/* Sentence map */
.smap{display:flex;flex-wrap:wrap;gap:6px;direction:ltr;justify-content:flex-start;font-family:var(--f-en)}
.smap span{padding:3px 9px;border-radius:7px;background:var(--surface-2);border:1px solid var(--line)}
.smap span.k{background:var(--red-soft);border-color:var(--red);color:var(--red)}
.smap span.v{background:var(--blue-soft);border-color:var(--blue);color:var(--blue)}

/* Reading */
.passage{font-family:var(--f-en);direction:ltr;text-align:left;font-size:1.08rem;line-height:1.85;max-width:65ch}
.passage mark{background:var(--amber-soft);color:inherit;padding:0 2px;border-radius:3px}
.script{font-family:var(--f-en);direction:ltr;text-align:left;line-height:1.8}

/* Chart */
.chart svg{width:100%;height:auto;display:block}
.chart text{fill:var(--muted);font-size:11px;font-family:var(--f-ui)}

/* Toast */
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(24px + env(safe-area-inset-bottom,0px));background:var(--ink);color:var(--bg);padding:10px 18px;border-radius:999px;font-size:.92rem;z-index:50;box-shadow:var(--shadow);max-width:calc(100% - 32px)}
@media (max-width:720px){.toast{bottom:calc(84px + env(safe-area-inset-bottom,0px))}}
.notice{border-radius:var(--r-s);padding:12px 14px;font-size:.92rem;background:var(--amber-soft);color:var(--ink)}
.notice.info{background:var(--accent-soft)}
.notice.red{background:var(--red-soft)}
.spinner{width:18px;height:18px;border:1px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite;display:inline-block;vertical-align:middle}
@keyframes spin{to{transform:rotate(360deg)}}
.list{display:flex;flex-direction:column}
.li{display:flex;gap:12px;align-items:center;padding:12px 4px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink)}
.li:last-child{border-bottom:0}
.li .grow{flex:1;min-width:0}
.li .t{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
table{border-collapse:collapse;width:100%;font-size:.92rem}
th,td{padding:8px 10px;border-bottom:1px solid var(--line);text-align:start;vertical-align:top}
th{color:var(--muted);font-weight:500;font-size:.82rem}
.tbl{overflow-x:auto}
details>summary{cursor:pointer;color:var(--accent);font-weight:500}
hr{border:0;border-top:1px solid var(--line);margin:4px 0}

/* ===== Product additions ===== */
.narrow{max-width:560px}
.center{text-align:center}
body.bare .nav,body.bare .tabbar,body.bare .sync{display:none!important}
body.bare main{padding-bottom:48px!important}
.welcome{gap:24px}
.hero-band{padding:40px 0 8px}
.display{font-size:clamp(2.2rem,6vw,3.4rem);line-height:1.15;letter-spacing:-.01em}
.lede{font-size:1.15rem;color:var(--ink-2);max-width:46ch}
.price{font-size:1.6rem;font-weight:600;font-variant-numeric:tabular-nums}
.choice{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:var(--r-s);padding:10px 12px;background:var(--surface);cursor:pointer}
.choice:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.choice.wide{align-items:flex-start;flex-wrap:wrap}
.choice input{accent-color:var(--accent)}
.plan{display:flex;flex-direction:column;align-items:flex-start;gap:6px;text-align:start;border:1px solid var(--line);border-radius:var(--r);padding:14px;background:var(--surface);cursor:pointer;font:inherit;color:inherit}
.plan:hover{border-color:var(--accent)}
.plan.best{border-color:var(--accent)}
.plan.on{box-shadow:0 0 0 2px var(--accent)}
.big-chip{font-size:1.05rem;padding:4px 14px}
.link-card{text-decoration:none;color:inherit}
.journey{display:flex;align-items:center;gap:6px;direction:ltr;flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}
.jstep{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:34px}
.jstep .dot{width:14px;height:14px;border-radius:50%;border:1px solid var(--line);background:var(--surface)}
.jstep.done .dot{background:var(--accent);border-color:var(--accent)}
.jstep.cur .dot{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
.jstep.cur span{color:var(--accent);font-weight:600}
.jline{flex:1;height:2px;background:var(--line);min-width:16px;margin-bottom:20px}
.objective ul{margin:0;padding-inline-start:18px}
.report{opacity:.75}
.report:hover{opacity:1}
.mysr-form{margin-top:12px}
.legal h3{margin-top:10px}
.legal ul{margin:0;padding-inline-start:18px}
input[type=email],input[type=password]{width:100%;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-s);padding:11px 13px}
input[type=email]:focus,input[type=password]:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}

/* ===== Experience layer ===== */
.btn.cta{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);box-shadow:0 4px 0 var(--accent-d)}
.btn.cta:hover{filter:brightness(1.05)}
.btn.block{width:100%}
.chip.hot{background:var(--hot-soft);color:var(--amber);border-color:transparent}
h1,h2{font-weight:800}
.fade-in{animation:fadeUp .3s ease both}
@keyframes fadeUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.fade-in{animation:none}}
.meter.thin{height:10px}
.ltr-line{direction:ltr;text-align:left;font-family:var(--f-en);font-weight:700;unicode-bidi:isolate}
.d-o2{color:var(--red);text-decoration:line-through;text-decoration-thickness:2px}
.d-c{color:var(--green);font-weight:700}

/* Welcome */
.hero2{display:flex;flex-direction:column;gap:14px;padding:28px 0 8px;align-items:center;text-align:center}
.hero2 .lede{margin:0 auto}
.display{font-family:var(--f-d);font-weight:800;font-size:clamp(2.3rem,7vw,3.6rem);line-height:1.12}
.hero-ctas{display:flex;flex-direction:column;gap:12px;width:100%;max-width:380px}
.demo{position:relative;display:flex;flex-direction:column;gap:10px;text-align:start;width:100%;max-width:560px;margin-top:6px}
.demo-head{display:flex;align-items:center;gap:10px}
.tutor-av{width:40px;height:40px;border-radius:12px;background:var(--accent);color:#fff;display:grid;place-items:center;font-family:var(--f-d);font-weight:800;font-size:1.2rem;box-shadow:0 3px 0 var(--accent-d);flex:none}
.demo-s{font-family:var(--f-en);font-weight:700;font-size:1.15rem;line-height:1.9;min-height:2em;direction:ltr;text-align:left}
.d-o{transition:color .25s}.d-o.hit{color:var(--red);text-decoration:line-through;text-decoration-thickness:2px}
.demo-s .d-c{background:var(--green-soft);border-radius:6px;padding:0 4px;animation:fadeUp .3s ease both}
.d-fix{background:var(--surface-2);border-radius:var(--r-s);padding:8px 12px;display:flex;flex-direction:column;gap:2px;animation:fadeUp .3s ease both}
.feat{display:flex;flex-direction:column;gap:10px}
.f{display:grid;grid-template-columns:52px 1fr;gap:0 14px;align-items:center;padding:14px;border-radius:var(--r);background:var(--surface-2)}
.f i{grid-row:span 2;width:52px;height:52px;border-radius:15px;display:grid;place-items:center;font-size:1.5rem;font-style:normal}
.f b{font-family:var(--f-d);font-size:1.08rem}.f span{font-size:.9rem;color:var(--ink-2);line-height:1.6}
.i1{background:var(--blue-soft)}.i2{background:var(--hot-soft)}.i3{background:var(--green-soft)}.i4{background:var(--red-soft)}
.steps3{display:flex;flex-direction:column;gap:14px}
.step3{display:grid;grid-template-columns:40px 1fr;gap:0 12px;align-items:start}
.step3 .n,.tl .n{grid-row:span 2;width:40px;height:40px;border-radius:12px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-weight:800;font-family:var(--f-d);font-size:1.15rem;flex:none}
.step3 b{font-family:var(--f-d);font-size:1.08rem}
.vs{display:grid;grid-template-columns:1fr 1fr 1.3fr;border:1px solid var(--line);border-radius:var(--r-s);overflow:hidden;font-size:.9rem}
.vs>div{padding:10px 12px;border-bottom:1px solid var(--line)}
.vs-h{font-weight:700;background:var(--surface-2);font-family:var(--f-d)}.vs-h.on{background:var(--accent);color:var(--accent-ink)}
.vs-k{font-weight:600}.vs-b{color:var(--muted)}.vs-c{background:var(--accent-soft)}
@media (max-width:560px){.vs{grid-template-columns:.9fr 1fr 1.2fr;font-size:.82rem}.vs>div{padding:8px}}
.lvls{display:flex;flex-direction:column;gap:8px}
.lvl{display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}.lvl:last-child{border-bottom:0}
.lvl .chip{flex:none}
.price-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px;display:flex;flex-direction:column;gap:2px;align-items:flex-start;box-shadow:var(--lift)}
.price-card.best{border-color:var(--accent);box-shadow:0 3px 0 var(--accent-d)}
.sec-t{font-family:var(--f-d);font-weight:800;font-size:1.6rem}

/* Onboarding / placement */
.ob h1{font-size:1.75rem}
.dots3{display:flex;gap:6px}.dots3 i{height:10px;flex:1;border-radius:999px;background:var(--surface-2)}.dots3 i.on{background:var(--green)}
.big-input{font-size:1.25rem;padding:14px 16px!important}
.picks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.pick{display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 10px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);cursor:pointer;font:inherit;color:inherit;box-shadow:0 3px 0 var(--line)}
.pick b{font-family:var(--f-d);font-size:1.02rem}
.pick:hover{border-color:var(--accent-soft);background:var(--surface-2)}
.pick.on,.pick:active{border-color:var(--accent);background:var(--accent-soft);box-shadow:0 3px 0 var(--accent)}
.pick-e{font-size:2rem;line-height:1}
.tl{display:flex;flex-direction:column;gap:14px}
.tl>div{display:grid;grid-template-columns:40px 1fr;gap:0 12px;align-items:start}
.tl>div>b{font-family:var(--f-d)}
.q-big{font-size:1.4rem;line-height:1.6;padding:6px 0;font-weight:700}
.gap{display:inline-block;min-width:70px;border-bottom:3px solid var(--accent);color:transparent}
.opts.big .opt{padding:14px 16px;font-size:1.08rem}
.opts.big .opt:not(.idk){direction:ltr;text-align:left}
.opt.picked{border-color:var(--accent)!important;background:var(--accent-soft)!important;box-shadow:0 3px 0 var(--accent)!important}
.opt.idk{color:var(--muted);font-family:var(--f-ar);font-weight:500;box-shadow:none;border-style:dashed}

/* Level report */
.lvl-hero{text-align:center;align-items:center}
.lvl-hero .soft{text-align:start;width:100%}
.lvl-big{display:flex;flex-direction:column;align-items:center;line-height:1}
.lvl-big span{font-family:var(--f-en);font-weight:800;font-size:5.4rem;color:var(--accent);letter-spacing:-.02em;animation:pop .55s cubic-bezier(.2,1.6,.4,1) both}
.lvl-big small{font-family:var(--f-d);font-size:1.2rem;color:var(--ink-2);margin-top:6px}
@keyframes pop{from{transform:scale(.5);opacity:0}to{transform:none;opacity:1}}
.cefr{width:100%;display:grid;grid-template-columns:repeat(6,1fr);gap:6px;direction:ltr}
.cefr-s span{display:block;text-align:center;padding:6px 0;border-radius:10px;background:var(--surface-2);font-family:var(--f-en);font-weight:800;font-size:.85rem;color:var(--muted)}
.cefr-s.on span{background:var(--accent);color:var(--accent-ink)}
.cefr-s.goal span{background:var(--hot-soft);color:var(--amber);outline:2px dashed var(--hot);outline-offset:-2px}
.cefr-bar{display:none}
.goal-box{background:var(--hot-soft)!important}
.err-top{display:flex;gap:12px;align-items:flex-start;background:var(--red-soft);border-radius:var(--r-s);padding:12px}
.err-top .n{width:28px;height:28px;border-radius:9px;background:var(--red);color:#fff;display:grid;place-items:center;font-weight:800;font-family:var(--f-d);flex:none}
.plan-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.plan-grid>div{background:var(--surface-2);border-radius:var(--r-s);padding:12px;text-align:center;display:flex;flex-direction:column}
.plan-grid b{font-family:var(--f-en);font-weight:800;font-size:1.6rem;color:var(--accent)}.plan-grid span{font-size:.8rem;color:var(--muted)}
.share-box{background:var(--accent-soft);border-color:transparent;box-shadow:none}
.big-spin{width:46px;height:46px;border:5px solid var(--accent-soft);border-top-color:var(--accent);border-radius:50%;animation:spin .9s linear infinite;margin:8px auto}
button.choice{font:inherit;color:inherit;text-align:start;width:100%}

/* Home */
.today{background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:20px;display:flex;flex-direction:column;gap:16px;box-shadow:var(--lift)}
.today .op{color:var(--muted)}
.today-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.hello{font-family:var(--f-d);font-size:1.5rem;font-weight:800}
.streak{background:var(--hot-soft);color:var(--amber);border-radius:999px;padding:4px 12px;font-weight:800;font-family:var(--f-d);white-space:nowrap}
.today-main{display:flex;gap:16px;align-items:center}
.today .today-title{font-family:var(--f-en);font-weight:800;font-size:1.25rem;line-height:1.35}
.ring{position:relative;flex:none;display:grid;place-items:center}
.ring svg{position:absolute;inset:0;transform:rotate(-90deg)}
.ring circle{fill:none;stroke-width:9}
.ring-bg{stroke:var(--surface-2)}
.ring-fg{stroke:var(--green);stroke-linecap:round;transition:stroke-dashoffset .8s ease}
.ring span{font-family:var(--f-en);font-weight:800;font-size:1.1rem}
.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.tiles.two{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width:620px){.tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
.tile{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px;display:flex;flex-direction:column;gap:2px;text-decoration:none;color:var(--ink);box-shadow:var(--lift)}
a.tile:active{transform:translateY(3px);box-shadow:none}
.tile-e{font-size:1.4rem}.tile b{font-family:var(--f-d);font-size:1.2rem}.tile span:last-child{font-size:.8rem;color:var(--muted)}
.tile.glow{border-color:var(--hot);box-shadow:0 3px 0 var(--hot-d)}
.done-all{gap:12px}
a.notice{display:block;text-decoration:none;color:var(--ink)}

/* Before / after */
.ba{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:620px){.ba{grid-template-columns:1fr}}
.ba-c{background:var(--surface-2);border-radius:var(--r-s);padding:12px;display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.ba-c.after{background:var(--green-soft)}
.ba-c audio{width:100%}
table.cmp td,table.cmp th{text-align:center}table.cmp td:first-child{text-align:start}
.delta{font-size:.85rem;font-weight:700}.delta.good{color:var(--green)}.delta.bad{color:var(--red)}

/* Celebration */
.celebrate{position:fixed;inset:0;z-index:80;display:grid;place-items:center;background:color-mix(in srgb,var(--bg) 60%,transparent);backdrop-filter:blur(3px);animation:fadeUp .2s ease both}
.celebrate.out{opacity:0;transition:opacity .3s}
.cele-card{background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:28px 32px;text-align:center;box-shadow:0 4px 0 var(--line-2);max-width:min(90vw,380px);display:flex;flex-direction:column;gap:6px;animation:pop .45s cubic-bezier(.2,1.6,.4,1) both}
.cele-card h2{font-size:1.5rem}
.cele-emoji{font-size:3.2rem;line-height:1}
.confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.confetti i{position:absolute;top:-12px;left:var(--x);width:9px;height:14px;border-radius:2px;transform:rotate(var(--r));animation:fall 2.4s cubic-bezier(.2,.6,.4,1) var(--d) both}
@keyframes fall{to{transform:translateY(105vh) rotate(calc(var(--r) + 540deg))}}
@media (prefers-reduced-motion:reduce){.confetti{display:none}.cele-card{animation:none}}

/* ===== Bayana identity: soft sage, calm motion ===== */
h1,h2,h3{font-weight:600;color:var(--navy)}
body::before{background:var(--top)}
.top{background:color-mix(in srgb,var(--top) 88%,transparent);border-bottom:1px solid var(--line);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.brand{color:var(--top-ink);font-weight:700}
.brand small{color:var(--muted);font-family:var(--f-en);font-weight:700;letter-spacing:.16em;font-size:.62rem}
.brand-mark{width:36px;height:36px;background:none;box-shadow:none;border-radius:9px;display:block}
.brand-mark svg{width:100%;height:100%;display:block}
.top .nav a{color:var(--ink-2)}
.top .nav a.on{background:var(--accent-soft);color:var(--accent)}
.top .sync{color:var(--muted)}
.card,.panel,.tile{border-width:1px;border-radius:var(--r);box-shadow:var(--lift);transition:transform .2s var(--ease),box-shadow .2s var(--ease),background .3s var(--ease),border-color .3s var(--ease)}
a.tile:hover,.link-card:hover{transform:translateY(-2px)}
a.tile:active{transform:scale(.99);box-shadow:var(--lift)}
.btn{border-width:1px;box-shadow:none;font-weight:600;border-radius:14px;font-family:var(--f-ar);transition:transform .15s var(--ease),background .2s var(--ease),border-color .2s var(--ease),color .2s var(--ease)}
.btn:active{transform:scale(.98)}
.btn.primary,.btn.cta{box-shadow:none}
.btn.primary:hover,.btn.cta:hover{background:var(--accent-d);border-color:var(--accent-d);filter:none}
.btn.rec{box-shadow:none}
input,textarea,select{transition:border-color .2s var(--ease),box-shadow .2s var(--ease)}
input:focus,textarea:focus,select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
.display{font-weight:700;color:var(--navy);letter-spacing:0;font-family:var(--f-d)}
.hero-logo{width:64px;height:64px;display:block}.hero-logo svg{width:100%;height:100%;display:block}
.tutor-av{background:none;box-shadow:none;padding:0;overflow:hidden;border-radius:10px}.tutor-av svg{width:100%;height:100%;display:block}
.ix{width:1.4em;height:1.4em;flex:none}
.f i{color:var(--accent)}.f i .ix{width:26px;height:26px}
.i1,.i2,.i3,.i4{background:var(--accent-soft)!important}
.pick-e{color:var(--accent);display:grid;place-items:center}.pick-e .ix{width:30px;height:30px}
.tile-e{color:var(--accent)}.tile-e .ix{width:24px;height:24px}
.tile.glow{border-color:var(--hot);box-shadow:var(--lift)}
.cele-card{border-width:1px;box-shadow:0 14px 40px rgba(30,43,39,.16)}
.cele-ic{width:56px;height:56px;margin:0 auto 4px;border-radius:50%;display:grid;place-items:center;background:var(--hot-soft);color:var(--hot-d)}.cele-ic .ix{width:28px;height:28px}
.goal-box{background:var(--hot-soft)!important}
.meter>span{box-shadow:none;background:var(--accent)}
/* home hero card */
.today:not(.done-all){background:var(--hero);color:var(--hero-ink);border:0;border-radius:calc(var(--r) + 6px)}
.today:not(.done-all) .op,.today:not(.done-all) .muted,.today:not(.done-all) .tiny{color:color-mix(in srgb,var(--hero-ink) 72%,transparent)}
.today:not(.done-all) h1,.today:not(.done-all) h2,.today:not(.done-all) h3,.today:not(.done-all) .hello{color:var(--hero-ink)}
.today:not(.done-all) .ring-bg{stroke:rgba(255,255,255,.16)}.today:not(.done-all) .ring-fg{stroke:var(--hot)}
.today:not(.done-all) .btn{background:transparent;color:var(--hero-ink);border-color:rgba(255,255,255,.3)}
.today:not(.done-all) .btn.cta,.today:not(.done-all) .btn.primary{background:var(--hero-ink);color:var(--hero);border-color:var(--hero-ink)}
.today:not(.done-all) .streak{background:rgba(255,255,255,.14);color:var(--hot)}
.streak{color:var(--hot-ink);background:var(--hot-soft)}
/* theme switch */
.seg{display:inline-flex;background:var(--surface-2);border-radius:999px;padding:3px;gap:2px;align-self:flex-start}
.seg button{border:0;background:transparent;color:var(--ink-2);font:500 .88rem var(--f-ar);padding:7px 16px;border-radius:999px;cursor:pointer;transition:background .25s var(--ease),color .25s var(--ease)}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.08)}
/* page transitions */
@keyframes pgF{from{opacity:0;transform:translateX(-22px)}to{opacity:1;transform:none}}
@keyframes pgB{from{opacity:0;transform:translateX(22px)}to{opacity:1;transform:none}}
@keyframes pgFade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
#main.pg-fwd>*{animation:pgF .38s var(--ease) both}
#main.pg-back>*{animation:pgB .38s var(--ease) both}
#main.pg-fade>*{animation:pgFade .34s var(--ease) both}
#main.pg-fwd .col>*,#main.pg-back .col>*,#main.pg-fade .col>*{animation:rise .45s var(--ease) both}
#main[class*="pg-"] .col>*:nth-child(2){animation-delay:.04s}#main[class*="pg-"] .col>*:nth-child(3){animation-delay:.08s}#main[class*="pg-"] .col>*:nth-child(4){animation-delay:.12s}#main[class*="pg-"] .col>*:nth-child(5){animation-delay:.16s}#main[class*="pg-"] .col>*:nth-child(n+6){animation-delay:.2s}
.tabbar a,.nav a{transition:color .25s var(--ease),background .25s var(--ease)}
.tabbar a svg{transition:transform .25s var(--ease)}.tabbar a.on svg{transform:translateY(-2px)}
body{transition:background-color .35s var(--ease),color .35s var(--ease)}
@media (prefers-reduced-motion:reduce){#main>*,#main .col>*{animation:none!important}.card,.tile,.btn,body{transition:none}}
.passage{white-space:pre-line}
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
