/* Learn Tajwīd — "the muṣḥaf's margin" design system on the web.
   Mobile (< 900px): the app's own layout (tab bar, sheets). Desktop (≥ 900px):
   top bar, three-pane workspaces and a 12-column grid (design/WEB-MAKEOVER.md,
   2026-09-08). Paper, ink, hairlines; gold only as gilding. UI colour is never
   a hue: colour on screen ALWAYS means a tajwīd rule, from the data. */

@font-face{font-family:'Gentium Book Plus';src:url('fonts/GentiumBookPlus-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Gentium Book Plus';src:url('fonts/GentiumBookPlus-Bold.ttf') format('truetype');font-weight:700 900;font-style:normal;font-display:swap}
@font-face{font-family:'Gentium Book Plus';src:url('fonts/GentiumBookPlus-Italic.ttf') format('truetype');font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:'Noto Sans';src:url('fonts/NotoSans-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Noto Sans';src:url('fonts/NotoSans-Medium.ttf') format('truetype');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:'Noto Sans';src:url('fonts/NotoSans-SemiBold.ttf') format('truetype');font-weight:600;font-style:normal;font-display:swap}
/* Home makeover (2026-09-09): rounded faces. Fredoka has NO ā ī ū / ḥ ṣ ṭ
   glyphs — it is used only for numbers and ASCII display strings (class
   .disp); anything that may carry a macron or a rule name uses .disp.alt
   (Nunito 800) or the serif. Nunito covers the full transliteration set. */
@font-face{font-family:'Fredoka';src:url('fonts/Fredoka-VF.ttf') format('truetype');font-weight:300 700;font-style:normal;font-display:swap}
@font-face{font-family:'Nunito';src:url('fonts/Nunito-VF.ttf') format('truetype');font-weight:200 1000;font-style:normal;font-display:swap}
@font-face{font-family:'AlQuran IndoPak by QuranWBW';src:url('fonts/AlQuran-IndoPak-QuranWBW-v2.100.woff2') format('woff2'),url('fonts/AlQuran-IndoPak-QuranWBW-v2.100.ttf') format('truetype');font-weight:400;font-style:normal;font-display:block}

:root{
  --paper:#F7F3EC;--raised:#FFFDF9;--line:#E4DCCE;--ink:#1E1A15;--ink2:#5C544A;--ink3:#948B7E;
  --gold:#A9822A;--page:#FBF8F1;--page-ink:#1E1A15;--on-ink:#F7F3EC;--scrim:rgba(30,26,21,.42);--wash:rgba(30,26,21,.06);
  --serif:'Gentium Book Plus',Georgia,serif;--sans:'Nunito','Noto Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --disp:'Fredoka','Nunito',system-ui,sans-serif;--sun:#F5E9C9;--dune:#F1EADF;--gilt-line:rgba(169,130,42,.35);--r-pill:999px;
  --arabic:'AlQuran IndoPak by QuranWBW',serif;
  --r-card:12px;--r-sheet:20px;--gutter:20px;--tabbar:64px;--top:56px;
}
/* LIGHT ONLY (Hamza, 2026-09-08): the 29 certified rule colours are read
   against paper; a dark scheme was hurting legibility, so the site never
   follows the OS dark setting. */
:root{color-scheme:light only}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
.disp{font-family:var(--disp);font-weight:600;letter-spacing:-.005em}
.disp.alt{font-family:'Nunito',var(--sans);font-weight:800;letter-spacing:-.01em}
.kick{font-family:var(--disp);font-weight:500;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink3)}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:15px;line-height:1.5;min-height:100dvh}
button{font:inherit;color:inherit;background:none;border:none;padding:0;cursor:pointer}
select,input{font:inherit;color:inherit}
.hidden{display:none!important}
.desktop-only{display:none!important}

/* ── type ── */
h1,h2,h3{font-family:var(--serif);font-weight:400;line-height:1.15;margin:0;color:var(--ink)}
h1{font-size:32px;line-height:38px}
h2{font-size:20px;line-height:26px}
h3{font-size:17px;line-height:22px}
p{margin:0}
.label{font-family:var(--sans);font-size:11px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--ink3)}
.label.sec{display:block;margin-bottom:8px}
.secondary{font-size:13px;line-height:18px;color:var(--ink2)}
.muted{color:var(--ink3)}
.kicker{font-size:11px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--ink3)}
.kbd{display:inline-block;font-family:var(--sans);font-size:11px;font-weight:500;line-height:1;padding:3px 6px;border:1px solid var(--line);border-bottom-width:2px;border-radius:5px;color:var(--ink2);background:var(--raised);vertical-align:middle}
.kbd.inv{border-color:rgba(255,255,255,.35);color:var(--on-ink);background:transparent}

/* ── app shell (phone) ── */
.top{display:none}
.app{max-width:600px;margin:0 auto;padding:0 var(--gutter) calc(var(--tabbar) + 24px)}
.view{padding-top:8px}
.tabbar{position:fixed;left:0;right:0;bottom:0;height:var(--tabbar);background:var(--raised);border-top:1px solid var(--line);
  display:flex;justify-content:center;z-index:30;padding-bottom:env(safe-area-inset-bottom)}
.tabbar-inner{width:100%;max-width:600px;display:flex}
.tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--ink3);
  font-family:var(--sans);font-size:11px;font-weight:500;padding-top:6px}
.tab svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.tab.active{color:var(--ink)}
.tab:focus-visible{outline:2px solid var(--ink);outline-offset:-4px;border-radius:8px}
body.reading .tabbar{display:none}
body.reading .app{padding-bottom:0;padding-top:0}
body.reading{overflow:hidden}

/* ── screen top bar ── */
.topbar{display:flex;align-items:center;height:52px;margin:0 calc(-1 * var(--gutter));padding:0 12px;border-bottom:1px solid var(--line)}
.topbar h2{flex:1;text-align:center}
.iconbtn{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;color:var(--ink);flex:none}
.iconbtn svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.iconbtn:hover{background:var(--wash)}
.iconbtn[disabled]{opacity:.35;cursor:default}
.iconbtn.gold{color:var(--gold)}
.iconbtn.gold svg{fill:currentColor}
.view-intro{color:var(--ink2);font-size:13px;line-height:18px;margin:8px 0 16px}

/* ── primitives ── */
.card{background:var(--raised);border:1px solid var(--line);border-radius:var(--r-card);padding:16px}
.card.paper{background:var(--page);color:var(--page-ink)}
.card.paper .secondary{color:#5C544A}
.hairline{height:1px;background:var(--line)}
.btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;width:100%;border-radius:var(--r-pill);padding:0 22px;font-family:var(--disp);font-weight:600;font-size:16px;
  font-family:var(--sans);font-weight:600;font-size:15px;margin:6px 0;transition:opacity .12s}
.btn:active{opacity:.75}.btn[disabled]{opacity:.4;cursor:default}
.btn.primary{background:var(--ink);color:var(--on-ink)}
.btn.secondary{border:1.5px solid var(--ink);color:var(--ink)}
.btn.tertiary{min-height:40px;color:var(--ink);text-decoration:underline;font-weight:500;width:auto;margin:6px auto}
.btn.small{min-height:36px;font-size:13px;padding:0 12px;width:auto;margin:0}
.btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.seg{display:flex;background:var(--line);border-radius:10px;padding:3px}
.seg button{flex:1;min-height:36px;border-radius:8px;font-family:var(--sans);font-size:13px;font-weight:500;color:var(--ink2);padding:0 6px;white-space:nowrap}
.seg button.on{background:var(--ink);color:var(--on-ink)}
.row{display:flex;align-items:center;gap:12px;min-height:52px;padding:8px 6px;border-bottom:1px solid var(--line);width:100%;text-align:left;border-radius:8px}
button.row:hover{background:var(--wash)}
.row.on{box-shadow:inset 0 0 0 1.5px var(--ink);border-bottom-color:transparent}
.row .row-body{flex:1;min-width:0;display:flex;flex-direction:column}
.row .row-title,.row .row-sub{display:block}
.row .row-title{font-family:var(--serif);font-size:17px;color:var(--ink)}
.row .row-sub{font-size:13px;color:var(--ink2);margin-top:1px}
.row .row-num{font-family:var(--serif);font-size:15px;color:var(--ink2);width:30px;text-align:right;flex:none}
.row .row-ar{font-family:var(--arabic);font-size:20px;color:var(--ink);direction:rtl}
.row.selected .row-title{font-weight:700}
.chev{width:18px;height:18px;stroke:var(--ink3);fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;flex:none}
.field{display:flex;align-items:center;gap:8px;min-height:52px;border:1px solid var(--line);border-radius:var(--r-card);background:var(--raised);
  padding:8px 14px;margin:6px 0;position:relative;cursor:pointer}
.field select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.field .field-body{flex:1;min-width:0;display:flex;flex-direction:column}
.field .field-value{font-family:var(--serif);font-size:17px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.field.compact{min-height:44px;padding:6px 14px;margin:4px 0}
.figure{font-family:var(--serif);font-size:30px;line-height:34px;color:var(--ink)}
.tagrow{display:flex;flex-wrap:wrap;gap:8px 14px}
.tagcol{display:flex;flex-direction:column;gap:8px}
.input{height:48px;border-radius:12px;border:1px solid var(--line);background:var(--paper);padding:0 14px;font-family:var(--serif);font-size:18px;color:var(--ink);width:100%}
.input.search{height:40px;font-family:var(--sans);font-size:14px;margin:10px 0 6px}
:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

/* rule identity: swatch square + name in Gentium, gilt mark for the standard 7 */
.rt{display:inline-flex;align-items:center;gap:8px;font-family:var(--serif);font-size:15px;color:var(--ink);background:none;text-align:left}
.rt.sm{font-size:13px;gap:6px}.rt.lg{font-size:17px}
button.rt:hover{text-decoration:underline}
/* phone: inline rule tags are tap targets — give them a 32px hit height (mobile pass 2026-09-22) */
@media (max-width:899px){
  button.rt,.rt[role=button]{min-height:32px;padding:3px 0}
  .rt.sm{min-height:32px}
  .strip .skl{min-height:32px;padding:6px 2px 4px;align-items:flex-end}
  .rbar .rpage{min-height:32px}
  .label,.kicker,.home .lab,.home .ring .lv,.strip .lvl-name{font-size:12px}
  .home .week{flex-wrap:wrap;row-gap:6px}
  .home .week .t{white-space:normal;min-width:0}
}
.sw{display:inline-block;width:14px;height:14px;border-radius:3px;flex:none}
.rt.sm .sw{width:12px;height:12px}.rt.lg .sw{width:20px;height:20px;border-radius:5px}
.gilt{width:12px;height:12px;fill:var(--gold);flex:none}
.rt.sm .gilt{width:10px;height:10px}
.rt.muted{opacity:.5}
/* status marks: ink + icon, never a status colour */
.st{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;flex:none;border:1px solid var(--line)}
.st svg{width:10px;height:10px;stroke:var(--on-ink);fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.st.secure{background:var(--ink);border-color:var(--ink)}
.st.practising{background:linear-gradient(90deg,var(--ink) 50%,transparent 50%);border-color:var(--ink)}
.st.review{border:2px solid var(--gold)}
.st.review svg{stroke:var(--gold)}
.stl{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--ink2)}

/* ── home ── */
.home-head{padding-top:12px}
.home-head h1{margin-top:6px}
.section{margin-top:24px}
.continue{display:block;width:100%;text-align:left}
.continue .cont-top{display:flex;align-items:center;gap:14px}
.continue .cont-ar{font-family:var(--arabic);font-size:24px;direction:rtl;color:var(--page-ink)}
.continue .cont-open{display:flex;align-items:center;justify-content:space-between;font-weight:500;color:var(--page-ink)}
.continue .thumb{display:block;width:96px;flex:none}
.continue .cont-mid{flex:1;min-width:0}
.checkins{display:flex;gap:12px;margin-top:12px}
.checkins .card{flex:1;text-align:left}
.checkins .figure{font-size:32px;line-height:36px}
.checkins .figure small{font-size:18px;color:var(--ink3)}
.legend{display:flex;flex-wrap:wrap;gap:8px 14px}
.legend .lg-item .secondary{display:none}
.home-note{font-size:13px;line-height:18px;color:var(--ink3);margin-top:14px}
.tertiary-row{display:flex;justify-content:center;gap:4px}
.prov{display:none}

/* ── learn section tabs: Syllabus · Flashcards · Āyah breakdown · Practice ── */
.subnav{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);margin:0 calc(-1 * var(--gutter));padding:0 10px;background:var(--raised)}
.subnav button{flex:none;display:flex;align-items:center;gap:6px;height:44px;padding:0 6px;font-family:var(--sans);font-size:13px;font-weight:500;color:var(--ink2);border-bottom:2px solid transparent;white-space:nowrap}
.subnav button svg{display:none}
.subnav button.on{color:var(--ink);border-bottom-color:var(--ink)}
.subnav button:hover{background:var(--wash)}
/* ── learn: course strip + syllabus + lesson ── */
.strip-wrap{margin-top:8px}
.strip{display:flex;flex-wrap:nowrap;gap:10px 18px}
.strip .lvl{flex:none}
.strip .lvl{display:flex;flex-direction:column;gap:5px}
.strip .cells{display:flex;gap:6px}
.strip .skl{display:flex;gap:2px;padding-bottom:3px;border-bottom:2px solid transparent}
.strip .skl.cur{border-bottom-color:var(--gold)}
.strip .cell{width:12px;height:12px;border-radius:3px;border:1px solid var(--line)}
.strip .cell.full{border:none}.strip .cell.faded{opacity:.45;border:none}.strip .cell.review{border:1.5px solid var(--gold)}
.strip .lvl-name{font-size:11px;color:var(--ink3);white-space:nowrap}
.syl{display:flex;flex-direction:column}
.syl .chap{margin-top:16px;display:flex;align-items:baseline;justify-content:space-between}
.syl .chap h3{font-size:17px}
.syl .chap .n{font-family:var(--serif);color:var(--ink2)}
.syl .chap.quiet h3{color:var(--ink2)}
.syl .skl{display:flex;align-items:center;gap:10px;padding:10px 8px;border-radius:10px;width:100%;text-align:left;border:1.5px solid transparent}
.syl .skl:hover{background:var(--wash)}
.syl .skl.on{border-color:var(--ink)}
.syl .skl .t{flex:1;min-width:0}
.syl .skl .t .name{font-family:var(--serif);font-size:16px;color:var(--ink)}
.syl .skl .t .sws{display:flex;gap:4px;margin-top:4px}
.syl .skl .sts{display:flex;gap:4px}
.syl .lvlbtn{margin:6px 0 4px}
.lesson{padding:8px 0 24px}
.lesson .kicker{margin-bottom:6px}
.lesson h1{font-size:28px;line-height:34px}
.lesson .focus{font-size:15px;color:var(--ink2);margin-top:6px;max-width:64ch}
.lesson .acts{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin-top:14px}
.lesson .acts .btn.primary{width:auto;padding:0 22px}
.rcard{margin-top:12px}
.rcard .rc-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.rcard .cond{margin-top:8px;font-size:15px;line-height:22px}
.rcard .paperbox{margin-top:10px}
.rcard .links{display:flex;flex-wrap:wrap;gap:0 4px;margin-top:4px}
.readit{margin-top:18px}
.readit .ri{display:flex;gap:16px;align-items:center}
.readit .thumb{width:140px;height:180px;flex:none}
/* page previews: the real renderer at full size, scaled down — crisp and
   proportionate instead of a tiny re-fit */
.thumb{position:relative;overflow:hidden;border-radius:6px;background:#FBF8F1;border:1px solid #E4DCCE}
.thumb .thumb-inner{position:absolute;top:0;left:0;width:468px;height:600px;transform-origin:top left}
.thumb .book{position:absolute;inset:0;width:100%;height:100%}
.lesson-nav{display:flex;justify-content:space-between;margin-top:20px}
.continue-card{margin-top:14px}

/* ── rules ── */
.rule-edge{height:6px;margin:0 calc(-1 * var(--gutter))}
.detail-head{display:flex;align-items:center;gap:14px;margin-top:18px}
.detail-head .sw.big{width:44px;height:44px;border-radius:12px}
.detail-head h2{font-size:24px;line-height:30px}
.tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.tag{font-size:13px;color:var(--ink2);border:1px solid var(--line);border-radius:6px;padding:2px 8px;display:inline-flex;align-items:center;gap:4px}
.cond{font-size:17px;line-height:26px;color:var(--ink);margin-top:18px}
.example{margin-top:16px;text-align:center}
.example .secondary{margin-top:10px}
.figs3{display:flex;gap:24px;margin-top:14px}
.figs3 .figure{font-size:24px;line-height:28px}
.acts{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center}
.acts .btn{width:auto;margin:6px 0}
.ex-grid{display:grid;grid-template-columns:1fr;gap:10px}

/* ── reader ── */
.reader{display:flex;flex-direction:column;height:100dvh;margin:0 calc(-1 * var(--gutter));padding:0 4px}
.rbar{display:flex;align-items:center;gap:2px;height:46px;padding:0 8px}
.rbar .spacer{flex:1}
.rbar .rpage{font-family:var(--serif);font-size:13px;color:var(--ink2);padding:0 10px}
@media (min-width:900px){.rbar .rpage{white-space:nowrap}}
.rbar .kbdhint{font-size:12px;color:var(--ink3);margin-right:8px;white-space:nowrap}
@media (max-width:1199px){.rbar .kbdhint{display:none!important}}
.bookwrap{flex:1;min-height:0;display:flex;justify-content:center}
.book{position:relative;width:100%;height:100%;touch-action:none;overflow:hidden;margin-bottom:env(safe-area-inset-bottom)}
.book .slot{position:absolute;top:0;left:0;width:100%;height:100%;padding:0 4px}
.book .frame{width:100%;height:100%;background:#FBF8F1;border:1px solid #E4DCCE;border-radius:12px;padding:2px;display:flex;flex-direction:column}
.book .phead{flex:none;height:30px;display:flex;align-items:center;gap:8px;padding:0 10px;font-family:var(--serif);font-size:12px;color:#5C544A}
.book .phead .side{display:flex;align-items:center;gap:8px;min-width:80px}
.book .phead .side.right{justify-content:flex-end}
.book .phead .item{display:flex;align-items:center;gap:4px}
.book .phead .ar{font-family:var(--arabic);font-size:14px;color:#1E1A15;direction:rtl;line-height:24px}
.book .phead .rule{flex:1;height:1px;background:#E4DCCE}
.book .inner{flex:1;min-height:0;width:100%;border-radius:9px;padding:6px 6px;display:flex;flex-direction:column;justify-content:center}
.book .ornamental .block{width:70%;margin:0 auto}
.book .block{width:100%}
.book .line{position:relative;direction:rtl;font-family:var(--arabic);color:#1E1A15;text-align:right;overflow:visible;border-bottom:1px solid #D6CFC0}
.book .line:last-child{border-bottom:none}
.book .line.cen{text-align:center}
.book .line.head{text-align:center;background:#EFE8DC;border-radius:8px;color:#1E1A15}
.book .base{position:relative;z-index:1;display:block;width:100%;white-space:nowrap;padding:0 .28em}
.book .line.just .base{white-space:normal;text-align:justify;text-align-last:justify}
.book .line.cen .base,.book .line.head .base{text-align:center;text-align-last:center}
.book .ov{position:absolute;top:0;left:0;right:0;z-index:2;pointer-events:none;border:none!important;background:none!important}
.book .ov *{color:inherit!important}
.book .w{background:transparent;border-radius:4px;cursor:pointer}
.book .w.held,.book .w:hover{background:rgba(30,26,21,.14)}
.thumb .book .w{cursor:default}.thumb .book .w:hover{background:transparent}
.thumb .book .frame{border-radius:6px}
.thumb .book .line{border-bottom-width:1px}
.mk{display:inline-block;min-width:.6em;text-align:center}
.m{display:inline-flex;align-items:center;justify-content:center;vertical-align:-.1em;width:.9em;height:.9em;border-radius:50%;border:1.5px solid #1E1A15;background:transparent;color:#1E1A15;font-size:1em}
.m b{font-family:Georgia,'Times New Roman',serif;font-weight:700;font-size:.45em;line-height:1;direction:rtl}
.chrome-hint{display:none;text-align:center;font-size:12px;color:var(--ink3);padding:6px 0}
.rail-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.panel-sec{padding:16px 16px 20px;border-bottom:1px solid var(--line)}
.note{font-size:13px;line-height:18px;color:var(--ink2);margin-top:10px}
.draft{font-size:13px;color:var(--ink3);margin:6px 0}
.switch{position:relative;width:44px;height:26px;border-radius:13px;background:var(--line);flex:none;transition:background .15s}
.switch::after{content:'';position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:var(--raised);transition:left .15s;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.switch.on{background:var(--ink)}.switch.on::after{left:21px}
.switch-row{display:flex;align-items:center;min-height:48px;gap:12px}
.switch-row .rt,.switch-row>span{flex:1}
.wasl{font-size:13px;color:var(--ink2);font-style:italic;margin-top:6px}

/* ── snippets ── */
.snip{position:relative;direction:rtl;font-family:var(--arabic);color:#1E1A15;padding:2px 4px;text-align:center}
.snip .dim{color:#9A9184}
.snip .ov{position:absolute;top:0;left:0;right:0;padding:2px 4px;box-sizing:border-box;pointer-events:none}
.snip .ov *{color:inherit!important}
.snip .ul{position:absolute;height:3px;border-radius:2px;background:#A9822A;pointer-events:none}
.paperbox{background:var(--page);border-radius:8px;padding:6px 0}

/* ── breakdown ── */
.bd-top{display:flex;align-items:center;gap:8px;margin-top:8px}
.bd-top .field{flex:1}
.stepper{display:flex;align-items:center;border:1px solid var(--line);border-radius:12px;background:var(--raised);height:44px;flex:none}
.stepper button{width:40px;height:44px;display:inline-flex;align-items:center;justify-content:center}
.stepper button svg{width:18px;height:18px;stroke:var(--ink);fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.stepper button[disabled] svg{stroke:var(--ink3)}
.stepper .stp{font-family:var(--serif);font-size:17px;min-width:52px;text-align:center}
.stepper .stp span{color:var(--ink3)}
.wcards{display:grid;gap:10px;margin-top:4px}
.wcard{padding:12px}
.wcard .wc-foot{display:flex;align-items:center;justify-content:space-between;margin-top:10px}
.wcard .wc-meta{font-size:13px;color:var(--ink3)}

/* ── flashcards ── */
.fc-card{min-height:320px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;margin:12px 0;cursor:pointer;width:100%}
.fc-card>div{width:100%}
.fc-hint{display:flex;align-items:center;justify-content:center;gap:6px;font-size:13px;color:var(--ink3);margin-top:18px}
.fc-hint svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.fc-cond{font-family:var(--sans);font-size:15px;line-height:22px;color:#1E1A15;text-align:center;margin-top:14px;direction:ltr}
.fc-ref{font-size:13px;color:#5C544A;margin-top:14px;direction:ltr;text-align:center}
#fc-rule-name{display:flex;justify-content:center}
.fc-controls{display:flex;align-items:center;gap:12px}
.fc-controls .btn{flex:1}
.fc-controls .count{font-size:13px;color:var(--ink2);min-width:56px;text-align:center}
.fc-mastery{font-size:13px;color:var(--ink2);margin-top:4px}
.blur{filter:blur(5px);user-select:none}

/* ── practice ── */
.pseg{display:flex;gap:3px}
.pseg i{flex:1;height:4px;border-radius:2px;background:var(--line)}
.pseg i.done{background:var(--ink)}.pseg i.cur{background:var(--gold)}
.qhead{display:flex;justify-content:space-between;font-size:13px;color:var(--ink2);margin:8px 0 14px}
.ask{font-family:var(--serif);font-size:20px;line-height:26px;color:var(--ink);margin-bottom:12px}
#qz-word-card{margin-bottom:12px}
/* phone: one column in answering order (the DOM keeps feedback/Next under the card for desktop) */
.qz-split{display:flex;flex-direction:column}
.qz-left,.qz-right{display:contents}
#qz-word-card{order:1}.ask{order:2}#qz-opts{order:3}#qz-check-wrap{order:4}#qz-feedback{order:5;margin-top:12px}#qz-next-wrap{order:6;margin-top:12px}
.opts{display:grid;gap:8px}
.opt{display:flex;align-items:center;gap:10px;min-height:52px;border:1.5px solid var(--line);border-radius:12px;padding:10px 14px;background:var(--raised);
  font-family:var(--serif);font-size:17px;color:var(--ink);text-align:left;width:100%}
.opt:hover:not([disabled]){background:var(--wash)}
.opt[disabled]{cursor:default}
.opt .otxt{flex:1}
.opt .k{margin-left:auto}
.opt.right{background:var(--ink);border-color:var(--ink);color:var(--on-ink);font-weight:700}
.opt.right .kbd{border-color:rgba(255,255,255,.35);color:var(--on-ink);background:transparent}
.opt.wrong{border-style:dashed;border-color:var(--ink2);color:var(--ink2)}
.opt.wrong .otxt{text-decoration:line-through}
.opt.also{border-color:var(--ink);border-style:dashed}
.opt .also-tag{font-family:var(--disp);font-weight:500;font-size:12px;color:var(--ink2);margin-left:8px;white-space:nowrap}
.opt svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;flex:none}
.opts.contrast{grid-template-columns:1fr 1fr}
.opt.contrast{flex-direction:column;align-items:stretch;padding:10px}
.opt.contrast .paperbox{margin-top:8px}
@media (max-width:480px){.opts.contrast{grid-template-columns:1fr}}
.feedback{margin-top:14px}
.feedback .fb-title{display:flex;align-items:center;gap:8px}
.feedback .fb-title svg{width:18px;height:18px;stroke:var(--ink);fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.feedback .fb-cond{font-size:15px;line-height:22px;color:var(--ink);margin-top:10px}
.feedback .fb-meta{font-size:13px;color:var(--ink2);margin-top:8px}
.score{font-family:var(--serif);font-size:64px;line-height:70px;color:var(--ink);margin-top:8px}
.score span{font-size:24px;color:var(--ink3)}

/* ── progress ── */
.figures{display:grid;grid-template-columns:repeat(3,1fr);column-gap:12px}
.figures .fig{padding:6px 0}
.grid29{display:flex;flex-direction:column;gap:10px}
.grid29 .lvl{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.grid29 .lvl .label{width:100%}
.grid29 button{width:30px;height:30px;border-radius:6px;border:1px solid var(--line)}
.grid29 button.faded{opacity:.45;border:none}
.grid29 button.full{border:none}
.grid29 button.review{border:2.5px solid var(--gold)}
.prow{display:flex;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}
.prow .prow-body{flex:1}
.prow .prow-meta{font-size:13px;color:var(--ink2);margin-top:2px}
.prow .acc{font-family:var(--serif);font-size:17px;color:var(--ink2);margin-left:12px}
.foot{font-size:13px;line-height:18px;color:var(--ink3);text-align:center;margin-top:8px}

/* ── sheets (phone) ── */
.scrim{position:fixed;inset:0;background:var(--scrim);z-index:40}
.sheet{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:600px;z-index:50;background:var(--raised);
  border-radius:var(--r-sheet) var(--r-sheet) 0 0;padding:8px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  box-shadow:0 -4px 16px rgba(0,0,0,.18);max-height:80dvh;display:flex;flex-direction:column}
.sheet .grab{width:36px;height:4px;border-radius:2px;background:var(--line);margin:0 auto 10px;flex:none}
.sheet .sheet-body{overflow:auto;min-height:0}
.sheet h2{margin-bottom:8px}
.keys div{padding:8px 0;border-bottom:1px solid var(--line);font-size:14px;color:var(--ink2)}
.load-error{position:sticky;top:0;z-index:100;background:var(--raised);color:var(--ink);padding:10px 18px;font-weight:600;text-align:center;border-bottom:2px solid var(--gold)}

/* phone: rails/panels that desktop uses become sheets or push screens */
.read-ws .rail,.read-ws .panel,.cards-ws .rail,.cards-ws .panel,.learn-ws .main,.rules-ws .main,.rules-ws .panel{display:none}
.rules-ws .rail-head,.learn-ws .rail-head{display:none}
.strip-wrap{overflow-x:auto;scrollbar-width:none;margin:8px calc(-1 * var(--gutter)) 0;padding:0 var(--gutter)}
.strip-wrap::-webkit-scrollbar{display:none}

/* ═══════════ DESKTOP (≥ 900px) ═══════════ */
@media (min-width:900px){
  .mobile-only{display:none!important}
  .desktop-only{display:initial!important}
  .tabbar{display:none}
  body{display:grid;grid-template-rows:var(--top) 1fr;min-height:100dvh}
  .top{display:flex;align-items:center;gap:24px;height:var(--top);padding:0 40px;background:var(--raised);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:30}
  .top .brand{display:flex;flex-direction:column;line-height:1.1;min-width:160px}
  .top .wordmark{font-family:var(--serif);font-size:20px;color:var(--ink)}
  .topnav{display:flex;gap:4px;flex:1;height:100%}
  .top .tab{flex:none;flex-direction:row;gap:8px;font-size:14px;padding:0 14px;height:100%;border-bottom:2px solid transparent;border-radius:0}
  .top .tab svg{width:20px;height:20px}
  .top .tab.active{border-bottom-color:var(--ink)}
  .top .tab:hover{background:var(--wash)}
  .topright{display:flex;align-items:center;gap:8px;height:100%}
  .topright .tab{height:100%}
  .app{max-width:none;margin:0;padding:0}
  .view{padding-top:0}
  .topbar{margin:0;padding:0;height:auto;border:none}
  .topbar h2{text-align:left;font-size:28px;line-height:34px}
  .topbar>span{display:none}
  .view-intro{margin:6px 0 0}
  .g12{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:24px;padding:28px 40px 48px;align-content:start}
  .c12{grid-column:span 12}.c8{grid-column:span 8}.c7{grid-column:span 7}.c5{grid-column:span 5}.c4{grid-column:span 4}
  .g12 .topbar{display:flex;align-items:center;gap:16px}
  .g12 .topbar h2{flex:1}
  /* three-pane workspace */
  .ws{display:grid;grid-template-columns:var(--rail,280px) minmax(0,1fr) var(--panel,340px);height:calc(100dvh - var(--top));min-height:0}
  .ws .rail,.ws .panel{overflow:auto;min-height:0;background:var(--raised)}
  .ws .rail{border-right:1px solid var(--line);padding:16px}
  .ws .panel{border-left:1px solid var(--line);padding:0}
  .ws .main{overflow:auto;min-height:0;padding:24px 40px 48px}
  .read-ws .rail,.read-ws .panel,.cards-ws .rail,.cards-ws .panel,.learn-ws .main,.rules-ws .main,.rules-ws .panel{display:block}
  .rules-ws .rail-head,.learn-ws .rail-head{display:flex}
  .read-ws{--rail:280px;--panel:340px}
  .rules-ws{--rail:320px;--panel:340px}
  .cards-ws{--rail:300px;--panel:340px}
  .learn-ws{--rail:400px;--panel:0px;grid-template-columns:var(--rail) minmax(0,1fr)}
  @media (max-width:1279px){.read-ws{--rail:240px;--panel:280px}.rules-ws{--rail:260px;--panel:280px}.cards-ws{--rail:240px;--panel:280px}.learn-ws{--rail:300px}}
  body.rails-hidden .ws{grid-template-columns:0 minmax(0,1fr) 0}
  body.rails-hidden .ws .rail,body.rails-hidden .ws .panel{display:none}
  /* reader */
  .read-ws .main{padding:0;overflow:hidden;display:flex;flex-direction:column}
  .reader{height:auto;margin:0;padding:0;flex:1;min-height:0}
  .rbar{height:52px;padding:0 16px;gap:6px;flex:none}
  .bookwrap{padding:0 16px 16px}
  .book{width:var(--bookw,600px);height:100%;margin:0}
  .chrome-hint{display:none}
  body.chrome-hidden .top{display:none}
  body.chrome-hidden{grid-template-rows:1fr}
  body.chrome-hidden .read-ws{grid-template-columns:0 minmax(0,1fr) 0;height:100dvh}
  body.chrome-hidden .read-ws .rail,body.chrome-hidden .read-ws .panel,body.chrome-hidden .rbar{display:none}
  body.chrome-hidden .bookwrap{padding:16px}
  body.chrome-hidden .chrome-hint{display:block;animation:fade 4s forwards}
  @keyframes fade{0%,70%{opacity:1}100%{opacity:0}}
  /* learn */
  #view-learn{display:flex;flex-direction:column;height:calc(100dvh - var(--top))}
  #view-learn.hidden{display:none}
  .subnav{margin:0;padding:0 28px;justify-content:flex-start;gap:2px}
  .subnav button{height:48px;padding:0 14px;font-size:14px}
  .subnav button svg{display:block;width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
  .g12 .subnav{grid-column:span 12;margin:-28px -40px 0;padding:0 28px}
  #view-quiz .subnav{margin:-28px -40px 0}
  #view-cards .subnav{flex:none}
  #view-cards{display:flex;flex-direction:column;height:calc(100dvh - var(--top))}
  #view-cards.hidden{display:none}
  #view-cards .cards-ws{flex:1;min-height:0;height:auto}
  .strip-wrap{margin:0;padding:14px 40px 12px;border-bottom:1px solid var(--line);background:var(--raised);overflow:visible}
  .strip{gap:12px 28px;flex-wrap:wrap}
  .strip .cell{width:16px;height:16px;border-radius:4px}
  .strip .skl{gap:3px;padding-bottom:4px}
  .strip .lvl-name{font-size:12px}
  .learn-ws{flex:1;min-height:0;height:auto}
  .lesson{max-width:900px}
  .rcard-grid{display:grid;grid-template-columns:1fr;gap:12px}
  @media (min-width:1280px){.rcard-grid{grid-template-columns:1fr 1fr}}
  .readit .thumb{width:176px;height:225px}
  .continue-card{display:none}
  /* home */
  .home-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding-top:0}
  .home-head h1{font-size:36px;line-height:42px}
  .prov{display:block;max-width:34ch;text-align:right}
  .continue .cont-top{gap:20px}
  .continue .cont-top{align-items:flex-start}
  .continue .thumb{width:280px}
  .continue .cont-mid{padding-top:6px}
  .continue .cont-ar{font-size:32px}
  .checkins .figure{font-size:36px;line-height:40px}
  .legend{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:16px}
  .legend .lg-item{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
  .legend .lg-item .secondary{display:block}
  /* rules */
  .rule-edge{margin:-24px -40px 0}
  .ex-grid{grid-template-columns:1fr 1fr}
  /* breakdown */
  .wcards{grid-template-columns:repeat(5,minmax(0,1fr))}
  @media (max-width:1279px){.wcards{grid-template-columns:repeat(3,minmax(0,1fr))}}
  /* flashcards */
  .fc-main{display:flex;flex-direction:column;align-items:center;justify-content:center}
  .fc-main .fc-card{max-width:680px;min-height:400px}
  .fc-main .fc-controls{width:100%;max-width:680px}
  /* practice */
  #view-quiz{padding:28px 40px 48px}
  .qz-setup{max-width:560px}
  .qz-split{display:grid;grid-template-columns:7fr 5fr;gap:24px;align-items:start}
  .qz-left,.qz-right{display:block}
  .qz-left .card.paper{min-height:180px;display:flex;align-items:center;justify-content:center}
  #qz-feedback{margin-top:0}
  #qz-next-wrap{margin-top:14px}
  #qz-results{max-width:640px}
  /* progress */
  .figures{grid-template-columns:repeat(6,1fr)}
  .grid29 button{width:34px;height:34px}
  .sheet{max-width:560px}
}


/* ═════════════ HOME · "a launchpad that feels alive" (design/HOME-CONCEPT.md, 2026-09-09) ═════════════
   Roundness, Fredoka/Nunito display, gold gilding, two tinted papers (sun, dune).
   No new saturated colour: every hue below is a rule colour written by app.js from the data. */
.home .sec-kick{display:block;margin:22px 0 8px}
.home .kick-note{text-transform:none;letter-spacing:0;font-family:var(--sans);font-weight:400;color:var(--ink2);font-size:13px}
.home .gilt-mark{color:var(--gold)}
.home .sec{font-size:13px;line-height:18px;color:var(--ink2)}
.home .sec b{color:var(--ink)}
.home .card{border-radius:22px;padding:18px}
.home .card.page{background:var(--page)}
.home .card.sun{background:var(--sun);border-color:transparent}
.home .hello h1{font-size:34px;line-height:38px;margin:2px 0 6px;color:var(--ink)}
.home .hello .sub{font-size:15px;color:var(--ink2)}
.home .hello .sub b{color:var(--ink);font-weight:700}
/* week chip */
.home .week{display:flex;align-items:center;gap:10px;background:var(--raised);border:1px solid var(--line);border-radius:var(--r-pill);padding:8px 14px 8px 10px;margin-top:14px}
.home .week .days{display:flex;gap:4px}
.home .week .d{width:26px;height:26px;border-radius:50%;border:1.5px solid var(--line);display:flex;align-items:center;justify-content:center;font-family:var(--disp);font-weight:600;font-size:11px;color:var(--ink3);background:var(--paper)}
.home .week .d.on{background:var(--gold);border-color:var(--gold);color:#fff}
.home .week .d.now{border:2px solid var(--gold);color:var(--ink)}
.home .week .t{font-family:var(--disp);font-weight:600;font-size:14px;line-height:16px;color:var(--ink);white-space:nowrap}
.home .week .t small{display:block;font-family:var(--sans);font-weight:600;font-size:11px;color:var(--ink2)}
/* continue */
.home .cont{display:flex;gap:14px;align-items:stretch;width:100%;text-align:left}
.home .cont .thumb{flex:none;width:96px;border-radius:10px;box-shadow:0 10px 24px rgba(30,26,21,.10);transition:transform .18s ease,box-shadow .18s ease}
.home .cont .thumb .bm{position:absolute;top:-2px;right:10px;width:14px;height:24px;background:var(--gold);clip-path:polygon(0 0,100% 0,100% 100%,50% 72%,0 100%);z-index:2}
.home .cont .body{flex:1;display:flex;flex-direction:column;min-width:0}
.home .cont .ttl{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.home .cont h2{font-size:24px;line-height:28px;margin:0;color:var(--ink)}
.home .cont .arname{font-family:var(--arabic);font-size:22px;line-height:32px;color:var(--ink);direction:rtl}
.home .cont .meta{font-size:13px;color:var(--ink2);margin-top:4px}
.home .cont .meta b{color:var(--ink);font-weight:700}
.home .onpage{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:10px;align-items:center}
.home .onpage .lab{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink3);width:100%}
.home .onpage .rt{font-size:0}.home .onpage .rt .sw{width:16px;height:16px;border-radius:5px}.home .onpage .rt .gilt{display:none}
.home .cont .act{margin-top:auto;padding-top:12px;display:flex;align-items:center;gap:10px}
.home .cont .act .btn{min-height:44px;font-size:15px;margin:0}
.home .cont .act .alt{display:none;font-family:var(--disp);font-weight:500;color:var(--ink2);font-size:15px}
/* today */
.home .today{display:flex;gap:12px}
.home .tcard{display:flex;flex-direction:column;align-items:flex-start;gap:8px;flex:1;padding:16px;text-align:left;min-width:0}
.home .tcard .n{font-family:var(--disp);font-weight:600;font-size:44px;line-height:44px;letter-spacing:-.02em;color:var(--ink)}
.home .tcard .n.zero{color:var(--ink3)}
.home .tcard .w{flex:1;min-width:0}
.home .tcard .w b{display:block;font-family:var(--disp);font-weight:600;font-size:16px;line-height:20px;color:var(--ink)}
.home .tcard .w p{font-size:12.5px;color:var(--ink2);margin-top:2px}
.home .tcard .w p .rt{font-size:12.5px;gap:5px;display:inline}.home .tcard .w p .rt .sw{display:inline-block;vertical-align:-1px;margin-right:4px}.home .tcard .w p .rt .sw{width:10px;height:10px;border-radius:3px}.home .tcard .w p .rt .gilt{display:none}
.home .tcard .btn{min-height:38px;font-size:14px;padding:0 16px;width:auto;margin:4px 0 0;border:1.5px solid var(--ink);background:transparent;color:var(--ink)}
.home .tcard .btn[disabled]{opacity:.35}
/* rings band */
.home .band{border-radius:0;padding:18px 0 18px var(--gutter);margin:22px calc(-1 * var(--gutter)) 0;background:var(--dune)}
.home .band .hd{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-bottom:12px;padding-right:var(--gutter)}
.home .band .hd h3{font-size:20px;line-height:24px;color:var(--ink)}
.home .rings{display:flex;overflow-x:auto;gap:12px;padding-right:var(--gutter);scrollbar-width:none}
.home .rings::-webkit-scrollbar{display:none}
.home .ring{flex:none;width:200px;display:flex;align-items:center;gap:12px;background:var(--raised);border-radius:20px;padding:10px 12px;border:1px solid var(--line);text-align:left;transition:transform .18s ease,box-shadow .18s ease}
.home .ring.cur{border-color:var(--gold);box-shadow:0 0 0 3px rgba(169,130,42,.16)}
.home .ring svg{width:64px;height:64px;flex:none}
.home .ring .num{font-family:var(--disp);font-weight:600;font-size:22px;line-height:24px;color:var(--ink)}
.home .ring .num small{font-size:14px;color:var(--ink3);font-weight:500}
.home .ring .lv{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--ink3)}
.home .ring .nm{font-family:'Nunito',var(--sans);font-weight:700;font-size:14px;line-height:17px;margin-top:2px;color:var(--ink)}
/* up next */
.home .next{text-align:left}
.home .next .kick{display:block;margin-bottom:4px}
.home .next h2{font-size:26px;line-height:30px;margin:0;color:var(--ink)}
.home .next .focus{font-size:14px;color:var(--ink2);margin-top:6px;max-width:52ch}
.home .rrows{display:flex;flex-direction:column;margin:14px 0 16px;border-radius:16px;background:var(--paper);overflow:hidden}
.home .rrow{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 10px;padding:10px 14px;border-top:1px solid var(--line)}
.home .rrow .stc{margin-left:auto}
.home .rrow:first-child{border-top:0}
.home .rrow .rt{font-size:15px}
.home .stc{display:inline-flex;align-items:center;gap:7px;font-family:var(--disp);font-weight:500;font-size:13px;color:var(--ink2);white-space:nowrap;flex:none}
.home .stc i{width:16px;height:16px;border-radius:50%;border:1.5px solid var(--ink3);display:inline-flex;align-items:center;justify-content:center;background:transparent;flex:none}
.home .stc.ok i{background:var(--ink);border-color:var(--ink)}
.home .stc.ok i::after{content:"";width:5px;height:8px;border:solid var(--on-ink);border-width:0 2px 2px 0;transform:translateY(-1px) rotate(45deg)}
.home .stc.half i{background:linear-gradient(90deg,var(--ink) 50%,transparent 50%);border-color:var(--ink)}
.home .stc.due i{border:2px solid var(--gold)}
.home .next .acts{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.home .next .acts .btn{width:100%;min-height:46px;margin:0}
.home .next .acts .lnk{flex:1;text-align:center;font-family:var(--disp);font-weight:500;font-size:14px;color:var(--ink2);padding:10px 8px;min-height:40px}
.home .next .acts .lnk:hover{color:var(--ink)}
/* quick tools */
.home .tools{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}
.home .tool{grid-column:span 2;background:var(--raised);border:1px solid var(--line);border-radius:18px;padding:12px;display:flex;flex-direction:column;gap:8px;text-align:left;transition:transform .18s ease,box-shadow .18s ease}
.home .tool .ico{width:36px;height:36px;border-radius:50%;background:var(--dune);display:flex;align-items:center;justify-content:center;color:var(--ink)}
.home .tool .ico.gilt{background:var(--sun)}
.home .tool .ico svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.home .tool b{font-family:'Nunito',var(--sans);font-weight:800;font-size:14px;line-height:17px;color:var(--ink)}
.home .tool small{display:none;font-family:var(--sans);font-size:12.5px;color:var(--ink2);font-weight:400;margin-top:2px}
/* legend strip */
.home .legend-col .legend{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:10px;margin:0 calc(-1 * var(--gutter));padding:0 var(--gutter) 6px;scrollbar-width:none}
.home .legend::-webkit-scrollbar{display:none}
.home .lg{flex:none;width:150px;background:var(--raised);border-radius:18px;padding:12px;border:1px solid var(--line);display:flex;flex-direction:column;gap:8px;text-align:left;transition:transform .18s ease,box-shadow .18s ease}
.home .lg .blob{width:30px;height:30px;border-radius:10px;position:relative}
.home .lg .blob::after{content:"";position:absolute;inset:4px;border-radius:7px;border:2px solid rgba(255,255,255,.22)}
.home .lg .nm{font-family:var(--serif);font-size:14px;line-height:18px;color:var(--ink);display:flex;align-items:flex-start;gap:5px}
.home .lg .nm .g{color:var(--gold);font-size:11px;line-height:18px}
.home .lg .cd{font-size:12px;line-height:16px;color:var(--ink2)}
.home .homeprov{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--ink3);margin-top:18px;padding-bottom:8px}
.home .hairline{display:none}

@media (min-width:900px){
  .home .hello{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding-top:0}
  .home .hello h1{font-size:44px;line-height:48px}
  .home .hello .sub{font-size:16px}
  .home .week{margin-top:0;gap:14px;padding:10px 18px 10px 12px}
  .home .week .d{width:30px;height:30px;font-size:12px}
  .home .week .days{gap:6px}
  .home .week .t{font-size:15px;line-height:17px}
  .home .week .t small{font-size:12px}
  .home .card{border-radius:24px;padding:22px}
  .home .cont-col{display:flex}
  .home .cont{gap:24px}
  .home .cont .thumb{width:200px;border-radius:16px}
  .home .cont .thumb .bm{right:16px;width:18px;height:30px}
  .home .cont h2{font-size:30px;line-height:34px;margin:4px 0 2px}
  .home .cont .arname{font-size:30px;line-height:44px}
  .home .cont .meta{font-size:15px}
  .home .onpage{gap:6px 14px;margin-top:14px}
  .home .onpage .lab{font-size:12px}
  .home .onpage .rt{font-size:14px}.home .onpage .rt .sw{width:14px;height:14px;border-radius:5px}
  .home .cont .act{padding-top:18px;gap:14px}
  .home .cont .act .btn{width:auto;min-height:48px;font-size:16px;padding:0 22px}
  .home .cont .act .alt{display:inline}
  .home .today{flex-direction:column;gap:16px;height:100%}
  .home .tcard{flex-direction:row;align-items:center;gap:18px;padding:20px 22px}
  .home .tcard .n{font-size:56px;line-height:56px;min-width:64px;text-align:center}
  .home .tcard .w b{font-size:19px;line-height:23px}
  .home .tcard .w p{font-size:13.5px}
  .home .tcard .btn{flex:none;min-height:40px;font-size:15px;padding:0 18px;margin:0}
  .home .band{border-radius:28px;padding:22px 26px;margin:0}
  .home .band .hd{flex-direction:row;align-items:baseline;justify-content:space-between;margin-bottom:14px;padding-right:0}
  .home .band .hd h3{font-size:22px;line-height:26px}
  .home .rings{display:grid;grid-template-columns:repeat(5,1fr);gap:16px;overflow:visible;padding:0}
  .home .ring{width:auto;gap:14px;padding:12px 14px 12px 12px}
  .home .ring svg{width:76px;height:76px}
  .home .next h2{font-size:30px;line-height:34px}
  .home .next .focus{font-size:15px}
  .home .rrows{margin:16px 0 18px}
  .home .rrow{padding:11px 16px}
  .home .rrow .rt{font-size:16px}
  .home .next .acts{gap:10px}
  .home .next .acts .btn{width:auto;min-height:48px}
  .home .next .acts .lnk{flex:none;font-size:15px;padding:0 8px}
  .home .tools{gap:14px}
  .home .tool{padding:16px 16px 14px;gap:12px;border-radius:20px;min-height:118px}
  .home .tool .ico{width:40px;height:40px}
  .home .tool b{font-size:16px;line-height:19px}
  .home .tool small{display:block}
  .home .legend-col .legend{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:14px;margin:0;padding:0;overflow:visible}
  .home .lg{width:auto;padding:14px 14px 12px}
  .home .lg .blob{width:34px;height:34px;border-radius:12px}.home .lg .blob::after{border-radius:8px}
  .home .lg .nm{font-size:15px;line-height:19px}
  .home .lg .cd{font-size:12.5px}
  .home .homeprov{flex-direction:row;justify-content:space-between;gap:24px;font-size:12.5px;margin-top:0;padding-top:4px}
  .home .sec-kick{margin:2px 0 10px}
  .top .tab{font-family:var(--disp);font-weight:500;font-size:15px}
  .top .wordmark{font-family:var(--disp);font-weight:600}
}
.tabbar .tab{font-family:var(--disp);font-weight:500}
@media (prefers-reduced-motion:no-preference){
  .home .ring circle.seg{transition:stroke-dashoffset .6s cubic-bezier(.2,.8,.2,1)}
  .home .tool:hover,.home .lg:hover,.home .ring:hover{transform:translateY(-3px);box-shadow:0 10px 22px rgba(30,26,21,.10)}
  .home .cont:hover .thumb{transform:translateY(-4px);box-shadow:0 14px 28px rgba(30,26,21,.14)}
  .btn{transition:transform .12s ease}.btn:active{transform:scale(.97)}
  .home .week .d.pulse{animation:lt-pulse .5s ease}
  @keyframes lt-pulse{0%{transform:scale(1)}50%{transform:scale(1.12)}100%{transform:scale(1)}}
}

/* ── walkthrough fixes 2026-09-10 ── */
@media (min-width:900px){
  #view-breakdown .c8.card{align-self:start}
}
/* home at narrow desktop (900–1279): the two side-by-side columns are too
   tight for the row-form Today cards, 5 wide rings and 7 legend columns */
@media (min-width:900px) and (max-width:1279px){
  .home .cont .thumb{width:160px}
  .home .cont h2{font-size:26px;line-height:30px}
  .home .tcard{flex-direction:column;align-items:flex-start;gap:8px;padding:18px 20px}
  .home .tcard .n{font-size:48px;line-height:48px;min-width:0;text-align:left}
  .home .tcard .btn{margin-top:4px}
  .home .rings{gap:10px}
  .home .ring{gap:10px;padding:10px}
  .home .ring svg{width:60px;height:60px}
  .home .ring .num{font-size:19px;line-height:22px}
  .home .ring .nm{font-size:13px;line-height:16px}
  .home .legend-col .legend{grid-template-columns:repeat(4,minmax(0,1fr))}
  .home .tool{min-height:0}
  .home .tool small{display:none}
}

/* Contrast questions hide the word card, so the two-column split left the
   pair of examples stranded on the right (Hamza, 2026-09-10). Desktop: one
   centred column — ask · the two examples side by side · feedback · Next. */
@media (min-width:900px){
  .qz-split:has(#qz-opts.contrast){display:flex;flex-direction:column;align-items:stretch;max-width:920px;margin:0 auto}
  .qz-split:has(#qz-opts.contrast) .qz-left,.qz-split:has(#qz-opts.contrast) .qz-right{display:contents}
  .qz-split:has(#qz-opts.contrast) .ask{text-align:center;font-size:22px;line-height:28px;margin-bottom:16px}
  .qz-split:has(#qz-opts.contrast) #qz-opts{display:grid;grid-template-columns:1fr 1fr;gap:18px}
  .qz-split:has(#qz-opts.contrast) .opt.contrast{margin:0;min-height:0}
  .qz-split:has(#qz-opts.contrast) #qz-next-wrap .btn{width:100%}
  .qz-split:has(#qz-opts.contrast) #qz-feedback{margin-top:18px}
  .qz-split:has(#qz-opts.contrast) #qz-next-wrap{margin-top:14px}
}

/* ── mobile-friendliness pass (2026-09-22, before the v0.5.5 release): 32px
   tap targets and ≥12px text on phones; appended last so it wins by order ── */
@media (max-width:899px){
  .home .tcard .w p .rt{display:inline-block;padding:4px 0}
  .home .lab,.home .ring .lv,.home .week .t small,.strip .lvl-name,.kicker,.label{font-size:12px}
  .strip .skl{min-width:32px;justify-content:center}
  .grid29 button{width:32px;height:32px}
  .home .onpage .lab{font-size:12px}
}
