/* generated by scripts/desk.js from public/desk/*.css: edit those, not this file */
/* ===== 0-base.css ===== */
/* 0-base: shared desktop tokens (screens wider than 700px). The lavender band is the phone's top colour, used on
   desktop as the page header band under the menu; content sits on the page colour in white cards below it. */
@media (min-width:701px){
  :root{--dk-band:#E9E6FF;--dk-card:var(--surface);--dk-line:#EEEEF3;--dk-shadow:0 1px 2px rgba(22,22,29,.04);--dk-pop:0 24px 50px rgba(45,35,140,.18)}
}
@media (min-width:701px) and (prefers-color-scheme:dark){:root:not([data-theme="light"]){--dk-band:#1C1933;--dk-line:#2A2A36;--dk-pop:0 24px 50px rgba(0,0,0,.45)}}
@media (min-width:701px){:root[data-theme="dark"]{--dk-band:#1C1933;--dk-line:#2A2A36;--dk-pop:0 24px 50px rgba(0,0,0,.45)}}

/* ===== 1-nav.css ===== */
/* 1-nav: the site header on screens wider than 700px (server/sitenav.js). Lavender like the page band below it,
   the icon buttons without boxes, the current section as a light purple pill; the three ▾ menus open on hover. */
@media (min-width:701px){
  .nav,.nav.scrolled{background:var(--dk-band);backdrop-filter:none;-webkit-backdrop-filter:none;border-bottom-color:transparent}
  .nav.scrolled{box-shadow:0 1px 0 rgba(45,35,140,.08)}
  /* menu items: quiet text, a soft tint on hover, the current one a light purple pill */
  .nav-links a,.nav .libbtn{color:#3A3A46;font-weight:600}
  .nav-links a:hover,.nav .libbtn:hover,.nav .libbtn[aria-expanded="true"]{color:var(--ink);background:rgba(109,93,252,.08)}
  .nav-links a[aria-current="page"],.nav .libbtn[aria-current="page"]{color:var(--ink);background:rgba(109,93,252,.14)}
  /* search, theme, language and account: no box, a tint on hover */
  .nav-act>.iconbtn,.nav-act>.langwrap>.langbtn,.nav .vprefs>.iconbtn{border-color:transparent;background:transparent;color:#3A3A46}
  .nav-act>.iconbtn:hover,.nav-act>.langwrap>.langbtn:hover,.nav .vprefs>.iconbtn:hover,.nav .vprefs>.iconbtn[aria-expanded="true"]{background:rgba(109,93,252,.10);color:var(--ink)}
  .nav .guestbar .btn.ghost{border-color:transparent;background:transparent}
  .nav .guestbar .btn.ghost:hover{background:rgba(109,93,252,.10)}
  .nav .avatar{box-shadow:none}
  /* the open menus: one look for all three */
  .nav .dropmenu{border-color:var(--dk-line);border-radius:16px;box-shadow:var(--dk-pop)}
  .nav .dropmenu .drop-grid a.on{background:var(--acc-soft);color:var(--acc-text)}
  /* the header steps down to fit (public/navfit.js): tighter spacing, then smaller text, then the logo without its name */
  .nav.nav-compact .nav-links a,.nav.nav-compact .libbtn{font-size:13.5px;padding:8px 6px}
  .nav.nav-compact .libbtn svg{width:12px;height:12px}
  .nav.nav-compact .nav-act{gap:4px}
  /* tablets and long languages: language and theme behind the globe button, tighter buttons, then smaller menu text */
  .nav.nav-xs .nav-act .nav-pref{display:none}
  .nav.nav-xs .vprefs{display:block}
  .nav.nav-xs .nav-act{gap:2px}
  .nav.nav-xs .guestbar{gap:4px}
  .nav.nav-xs .guestbar .btn{padding:8px 12px}
  .nav.nav-xxs .nav-links a,.nav.nav-xxs .libbtn{font-size:13px;padding:8px 4px}
  .nav.nav-xxs .libbtn svg{width:10px;height:10px}
  .nav.nav-xxs .guestbar .btn{padding:8px 10px;font-size:13px}
  .nav.nav-xxs .nav-act{gap:0}
  .nav.nav-xxxs .nav-links a[data-nav="pricing"]{display:none}
  .nav.nav-xxxs .credits{display:none!important} /* the free-problems pill; the study page shows the same count */
}
@media (min-width:701px) and (prefers-color-scheme:dark){:root:not([data-theme="light"]) .nav-links a,:root:not([data-theme="light"]) .nav .libbtn,:root:not([data-theme="light"]) .nav-act>.iconbtn,:root:not([data-theme="light"]) .nav-act>.langwrap>.langbtn,:root:not([data-theme="light"]) .nav .vprefs>.iconbtn{color:var(--muted)}}
@media (min-width:701px){:root[data-theme="dark"] .nav-links a,:root[data-theme="dark"] .nav .libbtn,:root[data-theme="dark"] .nav-act>.iconbtn,:root[data-theme="dark"] .nav-act>.langwrap>.langbtn,:root[data-theme="dark"] .nav .vprefs>.iconbtn{color:var(--muted)}}

/* ===== 2-library.css ===== */
/* 2-library: desktop only, every rule inside @media (min-width:701px) (screen only, so printed worksheets and cram packs
   keep their print layout). The library and content pages: /subjects, /courses, /calculators (directories), a subject,
   a topic (/practice/…), a course, a calculator, a worksheet and a cram pack (server/seo.js, coursev2.js, cram.js).
   One look: a lavender band under the menu holds the crumbs, the title, the lead, the chips and the main button;
   the content sits below in white cards on the page colour.
   The band is painted per element (box-shadow + clip-path reach to the screen edges), so the phone markup and its
   direct-child selectors in site.css stay as they are. Elements in the band are spaced with padding, never margins. */
@media screen and (min-width:701px){
  /* ---------- the band ---------- */
  .seo-subj .mp-desk>.seo-crumbs,.seo-subj .sj-head,
  .seo-topic>.seo-crumbs,.seo-topic>.seo-ttop,.seo-topic .seo-topcta,
  .seo-calc .cnavrow,.seo-calc .ctitle,
  .seo-course>.seo-crumbs,.seo-course .cv-hero,.seo-course>.seo-title,
  .seo-ws .mp-band>.seo-crumbs,.seo-ws .ws-title{
    background:var(--dk-band);box-shadow:0 0 0 100vmax var(--dk-band);clip-path:inset(0 -100vmax)}
  /* the first band element also covers the gap up to the menu */
  .seo-subj .mp-desk>.seo-crumbs,.seo-topic>.seo-crumbs,.seo-calc .cnavrow,.seo-course>.seo-crumbs,.seo-ws .mp-band>.seo-crumbs{clip-path:inset(-40px -100vmax 0)}
  /* the directories' head holds the search and its dropdown, which must not be clipped: its band is a layer behind it */
  .seo-dir .dir-head{position:relative}
  .seo-dir .dir-head::before{content:"";position:absolute;inset:-40px 0 0;background:var(--dk-band);box-shadow:0 0 0 100vmax var(--dk-band);clip-path:inset(0 -100vmax);z-index:-1;pointer-events:none}
  .seo-dir .dir-head,.seo-subj .mp-desk>.seo-crumbs,.seo-topic>.seo-crumbs,.seo-course>.seo-crumbs,.seo-ws .mp-band>.seo-crumbs{margin-top:0;padding-top:30px}
  .seo-crumbs{font-weight:500}
  .seo-crumbs a{font-weight:600}
  /* titles in the band: one size on every page */
  .seo-dir .dir-head h1,.seo-subj .sj-head h1,.seo-topic .seo-ttop h1,.seo-calc .ctitle h1,.seo-course .cv-hero h1,.seo-course>.seo-title h1,.seo-ws .ws-title h1{
    font-size:clamp(30px,3.4vw,42px);line-height:1.08;letter-spacing:-.03em;max-width:24ch}
  .seo-dir .dir-head>p,.seo-topic .seo-ttop>p,.seo-ws .ws-title>p{color:#4A4A58;font-size:16px}
  .btn.lg{border-radius:12px}
  .seo-band-btn,.seo-topic .seo-topcta .btn:not(.primary),.seo-ws .ws-title .btn:not(.primary),.seo-course .cv-ghost{background:var(--surface);border-color:transparent}

  /* the white card every content section sits in */
  .seo-topic .seo-levels,.seo-topic .seo-guide,.seo-topic .seo-formulas,.seo-topic .seo-learn,.seo-topic .seo-ex,.seo-topic .seo-faq,
  .seo-topic .seo-how,.seo-topic .seo-rel,.seo-topic .seo-end,
  .seo-calc .seo-calc-steps,.seo-calc .seo-formulas,.seo-calc .seo-end,.seo-calc .seo-rel,.seo-calc .cabout,.seo-calc .seo-guide,
  .seo-course .cv-sec,.seo-course>section:not(.seo-title):not(.cv-hero),
  .seo-ws .ws-key{
    background:var(--surface);border:1px solid var(--dk-line);border-radius:16px;box-shadow:var(--dk-shadow);padding:24px 26px;box-sizing:border-box}

  /* ---------- directories: /subjects, /courses, /calculators ---------- */
  .seo-dir .dir-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,380px);column-gap:48px;align-items:center;padding-bottom:40px}
  .seo-dir .dir-head>*{grid-column:1}
  .seo-dir .dir-head h1{max-width:20ch}
  .seo-dir .dir-head .dir-note{grid-column:1/-1}
  .seo-dir .dir-lib{display:none}
  /* the search sits on the band's right (public/practice.js moves the form into .dir-head on wide screens) */
  .seo-dir .dir-head>.dir-q{grid-column:2;grid-row:1/span 3;align-self:center;margin:0;max-width:none;z-index:6}
  .seo-dir .dir-q input{border-color:transparent;box-shadow:0 1px 2px rgba(45,35,140,.06);font-size:15px;padding-block:11px}
  .seo-dir .dir{margin-top:32px;grid-template-columns:200px minmax(0,1fr);gap:40px}
  .seo-dir [data-dir="subjects"]{grid-template-columns:minmax(0,1fr)}
  .seo-dir [data-dir="subjects"] .dir-nav{display:none}
  .seo-dir .dir-nav a[aria-current="true"]{box-shadow:inset 2px 0 0 var(--acc);background:var(--surface)}
  [dir="rtl"] .seo-dir .dir-nav a[aria-current="true"]{box-shadow:inset -2px 0 0 var(--acc)}
  .seo-dir .dir-sh{border-bottom:0;padding-bottom:0;margin-bottom:12px;justify-content:space-between}
  .seo-dir .dir-sh h2{font-size:20px}
  .seo-dir .dir-n{background:transparent;padding:0;font-weight:500}
  .seo-dir .dir-sec+.dir-sec{margin-top:34px}
  .seo-dir .dir-cards{gap:12px;grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
  .seo-dir .dir-cards>li{display:flex;flex-direction:column;border:1px solid var(--dk-line);border-radius:14px;background:var(--surface);box-shadow:var(--dk-shadow);transition:border-color .15s,box-shadow .15s}
  .seo-dir .dir-cards>li:hover{border-color:var(--acc-line);box-shadow:0 6px 18px rgba(45,35,140,.08)}
  .seo-dir .dir-card{border:0;background:transparent;padding:16px 16px 6px;gap:4px;height:auto}
  .seo-dir .dir-card:hover{background:transparent}
  .seo-dir .dir-card .dir-ic{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:var(--acc-soft);color:var(--acc-text);margin-bottom:8px}
  .seo-dir .dir-card .dir-ic svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  .seo-dir .dir-card b{font-size:15px}
  .seo-dir .dir-cards>li:not(:has(.dir-tops)) .dir-card{padding-bottom:16px}
  /* the subjects' three topic chips */
  .dir-tops{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 0;padding:0 16px 16px}
  .dir-tops a{max-width:100%;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:500;line-height:1.3;padding:4px 9px;border-radius:999px;background:var(--soft);color:var(--ink);text-decoration:none}
  .dir-tops a:hover{background:var(--acc-soft);color:var(--acc-text)}
  /* calculators and courses (other than exam preparation) are rows: icon, name, a line below */
  .seo-dir [data-dir="calculators"] .dir-cards,.seo-dir [data-dir="courses"] .dir-sec:not(#exams) .dir-cards{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
  .seo-dir [data-dir="calculators"] .dir-card,.seo-dir [data-dir="courses"] .dir-sec:not(#exams) .dir-card{display:grid;grid-template-columns:34px minmax(0,1fr);column-gap:12px;row-gap:1px;align-items:center;padding:12px 14px}
  .seo-dir [data-dir="calculators"] .dir-card .dir-ic,.seo-dir [data-dir="courses"] .dir-sec:not(#exams) .dir-ic{margin:0;grid-row:1/3}
  .seo-dir [data-dir="calculators"] .dir-card b,.seo-dir [data-dir="courses"] .dir-sec:not(#exams) .dir-card b{-webkit-line-clamp:1;line-clamp:1}
  .seo-dir [data-dir="courses"] #exams .dir-cards{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
  .dir-dd{border-color:var(--dk-line);box-shadow:var(--dk-pop);padding:8px}

  /* ---------- a subject (/subjects/<subject>) ---------- */
  .seo-subj .sj-head{padding:4px 0 36px}
  .seo-subj .sj-eyebrow{padding-top:6px}
  .seo-subj .sj-stats{gap:8px}
  .seo-subj .sj-stat{border-color:transparent;padding:8px 14px 8px 10px;border-radius:12px}
  .seo-subj .sj-stat i{width:30px;height:30px}
  .seo-subj .sj-stat b{font-size:17px}
  .seo-subj .sj-tabs{display:none}
  .seo-subj .mp-desk{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);column-gap:24px;align-items:start}
  .seo-subj .mp-desk>*{grid-column:1/-1}
  .seo-subj .mp-desk>#topics{grid-column:1}
  .seo-subj .mp-desk>#calculators{grid-column:2}
  .seo-subj .sj-sec{padding-top:30px;margin-bottom:0}
  .seo-subj .sj-sh h2{font-size:20px}
  .seo-subj #topics .sj-groups{columns:2 260px}
  .seo-subj .sj-card,.seo-subj .sj-item{border-color:var(--dk-line);box-shadow:var(--dk-shadow)}
  .seo-subj #courses .sj-items{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
  .seo-subj #calculators .sj-items{grid-template-columns:1fr;gap:0;border:1px solid var(--dk-line);border-radius:14px;background:var(--surface);overflow:hidden;box-shadow:var(--dk-shadow)}
  .seo-subj #calculators .sj-item{border:0;border-radius:0;box-shadow:none;border-top:1px solid var(--dk-line)}
  .seo-subj #calculators .sj-item:first-child{border-top:0}
  .seo-subj #calculators .sj-item:hover{background:var(--sunk)}

  /* ---------- a topic (/practice/<topic>) ---------- */
  .seo.seo-topic{max-width:1180px;display:grid;grid-template-columns:minmax(0,1fr) 250px;column-gap:28px;align-items:start}
  .seo-topic>*,.seo-topic .mp-wrap>*,.seo-topic .mp-folds>*{grid-column:1}
  .seo-topic .mp-folds{display:contents}
  .seo-topic>.seo-crumbs,.seo-topic>.seo-ttop,.seo-topic .seo-topcta{grid-column:1/-1}
  .seo-topic .seo-topcta{grid-row:3;padding:4px 0 40px;margin:0}
  .seo-topic>.seo-crumbs{grid-row:1}.seo-topic>.seo-ttop{grid-row:2}
  .seo-topic>.seo-ttop{padding-bottom:22px}
  .seo-topic .seo-ttop h1{max-width:26ch}
  .seo-topic .seo-topcta .seo-cta{margin:0}
  .seo-topic>*:not(.seo-crumbs):not(.seo-ttop):not(.mp-top):not(.mp-wrap),.seo-topic .mp-wrap>*:not(.seo-topcta):not(.tp-toc),.seo-topic .mp-fold{margin-top:0;margin-bottom:20px}
  .seo-topic #try{margin-top:28px}
  /* "On this page": beside the content, sticky, its links mark the section in view (public/practice.js) */
  .tp-toc{grid-column:2!important;grid-row:4/span 40;align-self:start;position:sticky;top:calc(var(--dir-top,64px) + 20px);margin-top:28px;
    display:flex;flex-direction:column;gap:1px;padding:16px 14px;background:var(--surface);border:1px solid var(--dk-line);border-radius:16px;box-shadow:var(--dk-shadow);font-size:13.5px}
  .tp-toc p{margin:0 0 8px;padding-inline:10px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
  .tp-toc a{padding:5px 10px;border-radius:8px;color:var(--muted);text-decoration:none;line-height:1.35;box-shadow:inset 2px 0 0 transparent}
  .tp-toc a:hover{color:var(--ink);background:var(--soft)}
  .tp-toc a.on{color:var(--ink);font-weight:600;box-shadow:inset 2px 0 0 var(--acc)}
  [dir="rtl"] .tp-toc a.on{box-shadow:inset -2px 0 0 var(--acc)}
  .seo-topic .safety{margin-top:28px}
  .seo-topic .safety~#try{margin-top:0}
  .seo-topic .tcard{border-color:var(--dk-line);box-shadow:var(--dk-shadow)}
  .seo-topic .seo-levels ol{gap:10px}
  .seo-topic .seo-levels h2,.seo-topic .seo-guide h2,.seo-topic .seo-formulas h2,.seo-topic .seo-learn h2,.seo-topic .seo-ex h2,.seo-topic .seo-faq h2,.seo-topic .seo-how h2,.seo-topic .seo-rel h2,
  .seo-calc .seo-calc-steps h2,.seo-calc .seo-formulas h2,.seo-calc .seo-rel h2{margin-top:0;font-size:20px}
  .seo-topic .seo-rel{margin-top:0}
  .seo-topic .seo-end{text-align:start}
  .seo-topic .seo-faq details.faq{border-color:var(--dk-line)}

  /* ---------- a calculator (/calculators/<calculator>) ---------- */
  .seo.seo-calc{max-width:1180px}
  .seo-calc .mp-ktop.mp-wrap{display:contents}
  .seo-calc .cnavrow{padding-top:22px;margin:0}
  .seo-calc .ctitle{padding:10px 0 30px}
  .seo-calc .calcbox{position:relative;margin-top:-6px;padding-top:0;gap:20px}
  .seo-calc .calcbox::before{content:"";position:absolute;inset:0 0 auto;height:110px;background:var(--dk-band);box-shadow:0 0 0 100vmax var(--dk-band);clip-path:inset(0 -100vmax);z-index:-1}
  .seo-calc .cform,.seo-calc .cout{border-color:var(--dk-line);box-shadow:var(--dk-shadow);border-radius:16px}
  .seo-calc .mp-kp>*:not(.mp-grip),.seo-calc .mp-fold{margin-top:20px}
  .seo-calc .mp-folds{display:contents}
  .seo-calc .seo-embed{background:transparent;border:0;box-shadow:none;padding:0}

  /* ---------- a course (/courses/<course>) ---------- */
  .seo-course>.seo-crumbs{padding-top:30px}
  .seo-course .cv-hero{padding-bottom:40px;margin-bottom:0}
  .seo-course .cv-quiz,.seo-course .cv-try .tcard{box-shadow:var(--dk-pop);border-color:transparent}
  .seo-course .cv-stat{background:var(--surface);border-color:transparent}
  .seo-course .mp-cv{padding-top:28px}
  .seo-course .cv-sec{margin:0 0 20px}
  .seo-course .cv-tile{border-color:var(--dk-line);box-shadow:var(--dk-shadow)}
  .seo-course .cv-foot{background:transparent;border:0;box-shadow:none;padding:0}
  .seo-course>.seo-title{padding-bottom:36px}
  .seo-course>section:not(.seo-title):not(.cv-hero){margin-top:20px}

  /* ---------- a worksheet and a cram pack ---------- */
  .seo.seo-ws{max-width:1180px}
  .seo-ws .ws-title{padding-bottom:36px}
  .seo-ws .ws-title .seo-cta{margin-top:20px}
  .seo-ws .ws-teach{color:#4A4A58}
  .seo-ws .ws{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:26px;align-items:start}
  .seo-ws .wsq{border-color:var(--dk-line);box-shadow:var(--dk-shadow);border-radius:16px}
  .seo-ws .safety{margin-top:26px}
  .seo-ws .ws-key{border-style:solid;margin-top:26px}
}
@media screen and (min-width:701px) and (max-width:1000px){
  .seo.seo-topic{grid-template-columns:minmax(0,1fr) 200px;column-gap:20px}
  .seo-ws .ws{grid-template-columns:minmax(0,1fr)}
  .seo-dir .dir{grid-template-columns:170px minmax(0,1fr);gap:24px}
  .seo-subj .mp-desk{grid-template-columns:minmax(0,1fr)}
  .seo-subj .mp-desk>#topics,.seo-subj .mp-desk>#calculators{grid-column:1}
}
@media screen and (min-width:701px) and (max-width:880px){
  .seo.seo-topic{grid-template-columns:minmax(0,1fr)}
  .tp-toc{display:none}
}
/* dark: the band's grey text and the white button on it */
@media screen and (min-width:701px) and (prefers-color-scheme:dark){:root:not([data-theme="light"]) .seo-dir .dir-head>p,:root:not([data-theme="light"]) .seo-topic .seo-ttop>p,:root:not([data-theme="light"]) .seo-ws .ws-title>p,:root:not([data-theme="light"]) .seo-ws .ws-teach{color:var(--muted)}}
@media screen and (min-width:701px){:root[data-theme="dark"] .seo-dir .dir-head>p,:root[data-theme="dark"] .seo-topic .seo-ttop>p,:root[data-theme="dark"] .seo-ws .ws-title>p,:root[data-theme="dark"] .seo-ws .ws-teach{color:var(--muted)}}

/* Every screen size (the approved Subjects/Topics merge): the subjects search's dropdown; on phones the topic chips and
   the "On this page" list stay hidden. Kept here because site.css belongs to another part of the work. */
.dir-q:has(.dir-dd){position:relative}
.dir-dd[hidden]{display:none}
.dir-dd{position:absolute;top:calc(100% + 6px);left:0;right:0;max-height:min(420px,60vh);overflow:auto;scrollbar-width:none;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 40px rgba(45,35,140,.16);padding:6px;z-index:30;text-align:start}
.dir-dd::-webkit-scrollbar{display:none}
.dir-dd .dir-dg{max-width:none;line-height:1.4;margin:8px 10px 4px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.dir-dd .dir-dg:first-child{margin-top:4px}
.dir-dr{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;padding:8px 10px;border-radius:10px;color:var(--ink);text-decoration:none}
.dir-dr b{font-size:14px;font-weight:600;line-height:1.3;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dir-dr span{grid-row:2;font-size:12px;color:var(--muted);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dir-dr i{grid-row:1/3;grid-column:2;align-self:center;font-style:normal;font-size:11px;font-weight:600;color:var(--acc-text);background:var(--acc-soft);border-radius:999px;padding:2px 8px}
.dir-dr:hover,.dir-dr.on{background:var(--acc-soft)}
.dir-dr.on i,.dir-dr:hover i{background:var(--surface)}
.dir-dd .dir-dr svg{display:none}
@media (max-width:700px){
  .tp-toc{display:none}
  .dir-tops{display:none} /* phones keep their approved two-column subject tiles; the search finds every topic */
}
@media print{.tp-toc,.dir-dd{display:none!important}}

/* ===== 3-site.css ===== */
/* 3-site: home and the site pages (pricing, about, contact, imprint, terms, privacy, what's new, study together, 404)
   on screens wider than 700px. The page's head (.mp-band, the same wrapper the phone uses for its lavender top) is a
   lavender band across the whole width; the content below sits on the page colour in white cards. No phone parts:
   no grips, no sheets, no stacked full-width buttons. */
@media (min-width:701px){
  /* ---------- the lavender head band ---------- */
  .mp-band{display:flow-root;position:relative;background:var(--dk-band);box-shadow:0 0 0 100vmax var(--dk-band);clip-path:inset(0 -100vmax)}
  .mp-body{display:block}
  .mp-body>.mp-grip{display:none}
  .mp-band .ihero{grid-template-columns:minmax(0,1fr) auto;padding-block:48px 44px;gap:40px}
  .mp-band .ihero-art{display:none}
  .mp-band .ptitle h1{max-width:none}
  .mp-band .ibadge{border-color:transparent}
  /* white cards on the page colour */
  .mp-body .icard,.mp-body .ilegal-body>section,.mp-body .ilegal-body>div>section,.mp-body .itoc,.mp-body .cbox,.mp-body .contact .cform{border-color:var(--dk-line);box-shadow:var(--dk-shadow)}
  .mp-body{padding-top:28px}

  /* ---------- about: the facts as four tiles on the right of the band ---------- */
  .mp-band:has(.ifacts){display:grid;grid-template-columns:minmax(0,1fr) 440px;gap:40px;align-items:center;padding-block:44px 40px}
  .mp-band:has(.ifacts) .ihero{display:block;padding:0}
  .mp-band .ifacts{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
  .mp-band .ifact{border-color:transparent;box-shadow:var(--dk-shadow)}
  .mp-band .ifact b{font-size:30px}

  /* ---------- terms and privacy: the contents stay in view on the left ---------- */
  .wrap.legal:has(.mp-band){margin-top:0;padding-top:0}
  .mp-band .ihero:has(+ *),.legal .mp-band .ihero{padding-block:44px 36px}
  .legal .mp-band .ptitle p.muted{display:inline-flex;margin-top:12px;padding:5px 12px;border-radius:999px;background:var(--surface);font-size:13px;font-weight:600;color:var(--ink)}
  .mp-body .ilegal{grid-template-columns:240px minmax(0,1fr);gap:28px}
  .mp-body .itoc{top:88px}

  /* ---------- contact ---------- */
  .contact .mp-band .ihero{padding-block:44px 40px}
  .contact .mp-body .contact-grid{margin-top:0}
  .contact .mp-body .cform{background:var(--surface);border:1px solid var(--dk-line);border-radius:18px;padding:24px}

  /* ---------- pricing: centred head, cards, then Free and Unlimited compared ---------- */
  .mp-band:has(#mprSeg){text-align:center;padding-block:8px 36px}
  .mp-band:has(#mprSeg) .ptitle{margin:0 auto}
  .mp-band:has(#mprSeg) .ptitle p{max-width:600px;margin:12px auto 0}
  .mp-body:has(#plans4){padding-top:36px}
  .mp-body .plans4 .plan{border-color:var(--dk-line);box-shadow:var(--dk-shadow);border-radius:16px}
  .mp-body .plans4 .plan.featured{border-color:var(--acc)}
  .mp-body .vatnote{text-align:center}
  .pcmp{display:table;width:100%;margin:28px 0 0;border-collapse:separate;border-spacing:0;background:var(--surface);border:1px solid var(--dk-line);border-radius:16px;box-shadow:var(--dk-shadow);overflow:hidden;font-size:14px}
  .pcmp th,.pcmp td{padding:12px 20px;border-top:1px solid var(--dk-line);text-align:start;font-weight:500}
  .pcmp td{text-align:center;width:150px;color:var(--muted)}
  .pcmp thead th{border-top:0;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);background:var(--sunk)}
  .pcmp thead th+th{text-align:center}
  .pcmp td b{color:var(--acc-text);font-weight:700}
  .pcmp svg{width:16px;height:16px;fill:none;stroke:var(--acc-text);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
  .mp-body #faq{margin-top:56px}

  /* ---------- study together, exam together, challenge a friend (server/togetherpages.js) ---------- */
  .wrap.seo:has(.mp-tg){max-width:1180px}
  .wrap.seo:has(.mp-tg) .mp-band{padding-bottom:40px}
  .wrap.seo:has(.mp-tg) .mp-band .seo-crumbs{margin-top:24px}
  .mp-tg{padding-top:32px}
  .mp-tg>section>p,.mp-tg>section>ul,.mp-tg>section>h3,.mp-tg>section>ol:not(.gsteps){max-width:780px}
  .mp-tg>section>h2{font-size:22px}
  .mp-tg .gsteps{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
  .mp-tg .gsteps li,[dir="rtl"] .mp-tg .gsteps li{padding:56px 18px 18px;border-color:var(--dk-line);border-radius:16px;box-shadow:var(--dk-shadow);font-size:14px}
  .mp-tg .gsteps li::before{inset-inline-start:18px;top:18px;width:28px;height:28px}
  .mp-tg .seo-rel .seo-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
  .mp-tg .seo-rel .seo-links a{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px;border:1px solid var(--dk-line);border-radius:14px;background:var(--surface);box-shadow:var(--dk-shadow);color:var(--ink);font-weight:600;text-decoration:none}
  .mp-tg .seo-rel .seo-links a::after{content:"›";color:var(--muted);font-size:18px;line-height:1}
  .mp-tg .seo-rel .seo-links a:hover{border-color:var(--acc-line)}

  /* ---------- 404 ---------- */
  .nf{min-height:0;padding:0;display:block}
  .nf .mp-band{padding-block:72px 64px;text-align:center}
  .nf .mp-band h1{margin:12px auto 0;max-width:none}
  .nf .mp-band p{margin:12px auto 0}
  .nf .mp-band .row{justify-content:center;margin-top:24px}
  .nf .nf-code{display:inline-flex;padding:5px 12px;border-radius:999px;background:var(--surface);color:var(--acc-text);font-size:13px;font-weight:700}
  .nf .nf-body{display:block;max-width:1180px;margin:0 auto;padding:32px 0 64px}
  .nf .nf-body .mp-search{display:none}
  .nf .nf-body h2{margin:0 0 14px;font:700 22px/1.2 var(--f-display);letter-spacing:-.01em}
  .nf-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
  .nf-list a{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border:1px solid var(--dk-line);border-radius:14px;background:var(--surface);color:var(--ink);text-decoration:none;font-weight:600;box-shadow:var(--dk-shadow)}
  .nf-list a:hover{border-color:var(--acc-line)}
  .nf-list svg{flex:none;width:16px;height:16px;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
}
/* the Free/Unlimited table is for wide screens only (phones have their own Free | Unlimited switch) */
@media (max-width:700px){.pcmp{display:none}}

/* ---------- home (public/landing.html, server/popular.js desktopHome) ---------- */
@media (max-width:700px){.hero-stats,.dpop{display:none}}
@media (min-width:701px){
  /* the hero sits in the lavender band, text left, the live walkthrough right */
  .hero{background:var(--dk-band);padding-block:44px 48px}
  .hero .wrap.hero-grid{max-width:1180px}
  .hero-text .eyebrow{display:none}
  .hero-title{background:none;color:var(--ink)}
  .hero-text .hero-title{font-size:clamp(34px,3.6vw,48px);line-height:1.04;letter-spacing:-.035em;max-width:13ch}
  .hero-text .hero-sub{font-size:16px;color:var(--ink-2,var(--muted))}
  .hero-text .hero-cta .btn.lg:not(.primary){background:var(--surface);border-color:transparent}
  .hero-text .hero-note{flex-basis:auto;margin:0 0 0 4px;font-size:13px}
  .hero-demo .tour{background:var(--surface);border:1px solid var(--dk-line);border-radius:16px;box-shadow:var(--dk-pop,var(--dk-shadow));overflow:hidden}
  /* plain numbers, not buttons */
  .hero-stats{list-style:none;margin:28px 0 0;padding:0;display:flex;flex-wrap:wrap}
  .hero-stats li{display:flex;flex-direction:column;gap:2px;padding-inline:18px;border-inline-start:1px solid color-mix(in srgb,var(--ink) 16%,transparent)}
  .hero-stats li:first-child{padding-inline-start:0;border:0}
  .hero-stats b{font:700 21px/1.1 var(--f-display);letter-spacing:-.01em;color:var(--ink)}
  .hero-stats span{font-size:12.5px;color:var(--muted)}
  /* Try one now: right under the hero, the problem on white */
  #demo{padding-top:40px}
  #demo .sec-head{display:flex;justify-content:space-between;align-items:baseline;gap:24px;margin-bottom:16px}
  #demo .sec-head h2{font-size:26px;letter-spacing:-.02em}
  #demo .sec-head p{font-size:14px}
  #demo .demo{border-color:var(--dk-line);box-shadow:var(--dk-shadow);border-radius:16px}
  #demo .demo-bar{background:var(--surface)}
  #demo .demo-body .diagram{background:var(--surface)}
  /* the old fields grid is replaced by Popular subjects on wide screens */
  #fields{display:none}
  /* search and Popular right now */
  .dpop{padding-top:40px}
  .dpop-search{display:flex;align-items:center;gap:12px;width:100%;height:50px;padding:0 18px;border:1px solid var(--dk-line);border-radius:14px;background:var(--surface);box-shadow:var(--dk-shadow);color:var(--muted);font:inherit;font-size:15px;text-align:start;cursor:pointer}
  .dpop-search:hover{border-color:var(--acc-line)}
  .dpop-search svg{width:18px;height:18px;flex:none}
  .dpop h2{margin:40px 0 0;font:700 26px/1.2 var(--f-display);letter-spacing:-.02em}
  .dpop-head{display:flex;justify-content:space-between;align-items:baseline;margin:20px 0 10px}
  .dpop-head h3{margin:0;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
  .dpop-head a{font-size:13.5px;font-weight:600;color:var(--acc-text);text-decoration:none}
  .dpop-head a:hover{text-decoration:underline}
  .dpop-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
  .dpop-card{display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:12px;row-gap:2px;align-content:start;padding:16px;border:1px solid var(--dk-line);border-radius:16px;background:var(--surface);box-shadow:var(--dk-shadow);color:var(--ink);text-decoration:none;transition:border-color .15s,transform .15s}
  .dpop-card:hover{border-color:var(--acc-line);transform:translateY(-1px)}
  .dpop-card>i{grid-row:1/3;width:40px;height:40px;border-radius:11px;display:grid;place-items:center;background:var(--acc-soft)}
  .dpop-card>i svg{width:20px;height:20px;fill:none;stroke:var(--acc-text);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .dpop-card>b{font-size:15px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .dpop-card>small{font-size:12.5px;color:var(--muted)}
  .dpop-chips{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px;margin-top:12px;max-height:52px;overflow:hidden;align-content:flex-start}
  .dpop-chips span{max-width:100%;line-height:17px;padding:3px 9px;border-radius:999px;background:var(--sunk);font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .dpop-card>em{grid-column:1/-1;margin-top:12px;font-style:normal;font-size:13.5px;font-weight:700;color:var(--acc-text)}
  #popular .sec-head h2,#faq h2,.final h2,.price-strip h2{font-size:clamp(26px,2.6vw,34px);letter-spacing:-.02em}
  /* features as one row of cards */
  .feats{gap:12px}
  .feat{border:1px solid var(--dk-line);border-radius:16px;background:var(--surface);box-shadow:var(--dk-shadow);padding:20px}
  .feat h3{margin-top:0}
}
@media (min-width:701px) and (max-width:1000px){.dpop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.feats{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ===== 4-app.css ===== */
/* 4-app: desktop only, every rule inside @media (min-width:701px) */

/* the lavender bands run edge to edge: a layer behind the band's content, widened with a shadow and cut to the band's
   height (on a separate layer, so menus that open from the band are not cut off) */
@media (min-width:701px){
  #vPractice>.ptop::before,.vbody .ap-head::before,#socProfile>.soc-head::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--dk-band);box-shadow:0 0 0 100vmax var(--dk-band);clip-path:inset(0 -100vmax);pointer-events:none}
}

/* ---------- study page and ad pages (/study, /go/<key>) ----------
   From 701px (below that the header is the phone one and the topic list lives in the ☰ sheet).
   public/app.js moves .ptop to the top of #vPractice, the tool row under the picture and the question,
   and Check / Next into the question card; it marks #probView .dk-wide (a very wide picture: on top)
   and .dk-nodia (no picture: the question uses the whole width). */
@media (min-width:701px){
  #vPractice.layout{row-gap:24px;padding-top:0}
  #vPractice>.ptop{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 20px;padding:22px 0 22px;
    position:relative;z-index:6;isolation:isolate}
  #vPractice>.ptop>.banner,#vPractice>.ptop>.reviewbar,#vPractice>.ptop>.backbar{flex:1 1 100%;margin:0}
  #vPractice>.ptop>.topbar{flex:1 1 320px;min-width:0;margin:0;gap:14px;align-items:flex-end}
  #vPractice>.ptop .tb-title h1{font-size:34px;line-height:1.15;letter-spacing:-.02em;margin:0}
  #vPractice>.ptop .crumbs{margin-bottom:6px;font-size:13.5px}
  #vPractice>.ptop>.tb-row{flex:none;margin:0;gap:10px}
  #vPractice>.ptop .streak{background:var(--surface);order:9}
  #vPractice>.ptop .streak.hot{background:var(--acc);color:var(--acc-ink)}
  #vPractice>.ptop .tb-row .seg{background:var(--surface);border:0}
  #vPractice>.ptop .tg-btn,#vPractice>.ptop .examchip{min-height:40px;border-radius:12px;border-color:transparent;background:var(--surface)}

  /* Easy ▾: a small menu, as on the phone */
  #vPractice .diffwrap{flex:none;display:block}
  #vPractice .diffbtn{display:inline-flex;align-items:center;height:40px;gap:6px;padding:0 12px;border-radius:12px;border-color:transparent;background:var(--surface);font-size:14.5px;font-weight:600}
  #vPractice .diffbtn svg{width:16px;height:16px;color:var(--acc-text)}
  #vPractice .diffbtn .chev{width:14px;height:14px;color:var(--ink);transition:transform .15s}
  #vPractice .diffwrap.open .diffbtn .chev{transform:rotate(180deg)}
  #vPractice #diffSeg{display:none}
  #vPractice .diffwrap.open #diffSeg{display:flex;flex-direction:column;align-items:stretch;position:absolute;right:0;top:46px;z-index:12;width:190px;padding:6px;gap:2px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--dk-pop)}
  [dir="rtl"] #vPractice .diffwrap.open #diffSeg{right:auto;left:0}
  #vPractice #diffSeg .diffhead{display:block;padding:6px 12px 4px;font-size:12px;font-weight:700;color:var(--muted)}
  #vPractice #diffSeg button{min-height:40px;text-align:start;padding:0 14px;border-radius:10px;font-size:14.5px;color:var(--ink);background:transparent;box-shadow:none}
  #vPractice #diffSeg button:hover{background:var(--soft)}
  #vPractice #diffSeg button[aria-pressed="true"]{background:var(--acc-soft);color:var(--acc-text)}

  /* topic list: a quiet card */
  #vPractice>.rail{top:calc(env(safe-area-inset-top,0px) + 84px)}
  #vPractice>.rail .browse{background:var(--surface);border:1px solid var(--dk-line);border-radius:16px;padding:12px 10px}
  #vPractice>.rail .search{border-radius:12px}

  /* the problem: picture and question side by side, the tools in a row underneath */
  body #bench{background:transparent;border:0;box-shadow:none;border-radius:0;overflow:visible}
  #bench>.start{background:var(--surface);border:1px solid var(--dk-line);border-radius:20px}
  #probView:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:stretch}
  #probView>.diagram{min-width:0;margin:0;padding:14px;border:1px solid var(--dk-line);border-radius:20px;background:var(--sunk);overflow:hidden;display:flex;align-items:center;justify-content:center}
  #probView>.diagram svg{min-width:0;max-width:100%;width:100%;max-height:460px}
  #probView>.q{min-width:0;padding:24px 26px 22px;background:var(--surface);border:1px solid var(--dk-line);border-radius:20px;box-shadow:var(--dk-shadow)}
  #probView>.diagram,#probView>.q{grid-column:1/-1}
  #probView>.q .q-text{font-size:22px;line-height:1.35}
  #probView.dk-nodia>.q .q-text,#probView.dk-wide>.q .q-text{font-size:24px}
  #probView>.q .field{max-width:none}
  #probView.dk-nodia .choices{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  /* Check answer / Next problem at the end of the question card */
  #probView>.q>.acts{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px;margin-top:2px}
  #probView>.q>.acts .pnum{margin-inline-end:auto}
  #probView>.q>.acts .checkbtn,#probView>.q>.acts #nextBtn{min-height:48px;padding:0 22px;border-radius:14px;font-size:16px;font-weight:700}
  #probView>.q>.acts .checkbtn{background:var(--acc);color:var(--acc-ink);border-color:var(--acc)}
  #probView>.q>.acts .checkbtn:hover{filter:brightness(1.06)}
  #probView>.q>.acts .checkbtn:not([hidden])+#nextBtn{background:var(--surface);color:var(--ink);border-color:var(--line)}
  /* the tools: one row of labelled buttons */
  #probView>.tools{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0;padding:8px;border:1px solid var(--dk-line);border-radius:16px;background:var(--surface)}
  #probView>.tools:not(:has(>button:not([hidden]))){display:none}
  #probView>.tools .iconbtn,#probView>.tools .iconbtn.ghost,#probView>.tools #solBtn{display:inline-flex;align-items:center;gap:7px;width:auto;height:40px;min-width:0;padding:0 14px 0 12px;border:0;border-radius:11px;background:var(--soft);color:var(--ink);font-size:14.5px;font-weight:600}
  #probView>.tools .iconbtn[hidden],#probView>.tools #solBtn[hidden]{display:none}
  #probView>.tools .iconbtn:hover{background:color-mix(in srgb,var(--acc) 12%,var(--soft));color:var(--ink)}
  #probView>.tools .iconbtn svg{width:17px;height:17px;flex:none}
  #probView>.tools .iconbtn[aria-pressed="true"],#probView>.tools .hintbtn.on{background:var(--acc-soft);color:var(--acc-text);border:0}
  #probView>.tools .hintbtn .lbl-md,#probView>.tools .tlbl,#probView>.tools .dk-l{display:inline}
  #probView>.tools>#shareBtn:not([hidden]),#probView>.tools>#shareBtn[hidden]+#pdfBtn:not([hidden]){margin-inline-start:11px;position:relative}
  #probView>.tools>#shareBtn:not([hidden])::before,#probView>.tools>#shareBtn[hidden]+#pdfBtn:not([hidden])::before{content:"";position:absolute;inset-inline-start:-9px;top:8px;bottom:8px;width:1px;background:var(--line)}
  /* hints: neutral cards (only “Correct!” is green) */
  #vPractice .hint{background:var(--sunk);border-color:var(--dk-line);border-radius:14px}

  /* ---------- ad pages: title band, the problem, a side column ---------- */
  body.go #vPractice.layout{grid-template-columns:minmax(0,1fr) 300px;max-width:1212px;column-gap:28px;padding-block:0 40px}
  body.go #vPractice>.ptop .topbar{display:flex!important}
  body.go #vPractice>.ptop .topbar .crumbs{display:none}
  body.go #vPractice>.ptop>.go-meta{flex:none;order:2;margin:0}
  body.go #vPractice>.ptop>.go-meta>.gm-c,body.go #vPractice>.ptop>.go-meta>.gm-dot,body.go #vPractice>.ptop>.go-meta>.gm-a{display:none}
  body.go #vPractice>.main{grid-column:1;min-width:0}
  body.go .q-text{font-size:24px}
  body.go #probView>.q .q-text{font-size:22px}
  body.go #probView.dk-nodia>.q .q-text{font-size:26px}
  body.go .choice{min-height:60px;padding:12px 16px;border-radius:14px;font-size:16px}
  body.go .choice .k{width:34px;height:34px;border-radius:10px;font-size:15px}
  body.go #probView>.diagram{border:1px solid var(--dk-line);border-radius:20px}
  .go-side{grid-column:2;display:flex;flex-direction:column;gap:14px;align-self:start;position:sticky;top:96px}
  .go-side .gs-card{display:flex;flex-direction:column;gap:6px;padding:18px;border:1px solid var(--dk-line);border-radius:16px;background:var(--surface)}
  .go-side .gs-k{font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
  .go-side .gs-card b{font-family:var(--f-display);font-size:16px;line-height:1.3}
  .go-side .gs-card>a:not(.btn){color:var(--acc-text);font-weight:700;font-size:14px;text-decoration:none}
  .go-side .gs-card>a:not(.btn):hover{text-decoration:underline}
  .go-side .gs-free{background:var(--acc-soft);border-color:transparent}
  .go-side .gs-free span{font-size:14px;color:var(--muted)}
  .go-side .gs-free .btn{margin-top:8px;justify-content:center;min-height:42px;border-radius:12px}
  body.go .go-note{grid-column:1}
}
@media (min-width:701px){
  #vPractice>.ptop .tb-row .seg button[aria-pressed="true"]{background:var(--acc);color:var(--acc-ink);box-shadow:none}
}

/* ---------- Progress, Exams, Friends: the page title on a lavender band ---------- */
@media (min-width:701px){
  .vbody .ap-head{margin:-26px 0 26px;padding:28px 0 26px;position:relative;z-index:6;isolation:isolate}
  .vbody .ap-head h1{font-size:34px;line-height:1.15;letter-spacing:-.02em}
  .vbody .ap-head .btn{min-height:42px;border-radius:12px}
  .vbody .ap-head .btn:not(.primary){background:var(--surface);border-color:transparent}
}

/* ---------- log in, create account, forgot password: lavender welcome on the left, the form on the right ---------- */
@media (min-width:701px){
  #login.login{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);place-items:stretch;padding:0;max-width:none;margin:0;min-height:calc(100vh - 64px)}
  #login .mp-ltop{display:flex;flex-direction:column;justify-content:center;padding:48px 56px;background:var(--dk-band)}
  #login .mp-ltop .langwrap{display:none}
  #login .mp-lh1{margin:0;font:700 44px/1.08 var(--f-display);letter-spacing:-.025em;color:var(--ink);max-width:460px;margin-inline-start:auto;width:100%}
  #login .mp-llead{margin:14px 0 0 auto;font-size:17px;line-height:1.5;color:var(--muted);max-width:460px;width:100%}
  #login .mp-llead:empty{display:none}
  [dir="rtl"] #login .mp-llead{margin:14px auto 0 0}
  #login .dk-lpts{display:flex;flex-direction:column;gap:10px;list-style:none;margin:24px 0 0 auto;padding:0;max-width:460px;width:100%;font-size:15px;color:var(--ink)}
  [dir="rtl"] #login .dk-lpts{margin:24px auto 0 0}
  #login .dk-lpts li{display:flex;align-items:center;gap:10px}
  #login .dk-lpts li::before{content:"";flex:none;width:18px;height:18px;border-radius:999px;background:var(--acc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5l2.6 2.6L12 5.5'/%3E%3C/svg%3E") center/12px no-repeat}
  #login .login-card{align-self:center;justify-self:center;width:100%;max-width:400px;margin:48px 32px;padding:0;border:0;background:transparent;box-sizing:border-box}
  #login .login-card .railhead,#login .login-card #authSub,#login .login-card #forgotPane>h1,#login .login-card #resetPane>h1,#login .login-card #forgotPane>.sub,#login .login-card #resetPane>.sub{display:none!important}
  #login .login-card .tabs{border:0;background:var(--soft);border-radius:13px;padding:4px;margin-bottom:18px}
  #login .login-card .tabs button{min-height:40px;border-radius:10px;font-size:14.5px}
  #login .login-card .tabs button[aria-selected="true"]{background:var(--acc);color:var(--acc-ink);box-shadow:none}
  #login .login-card .gbtn{height:48px;border-radius:13px;font-weight:700;font-size:15px}
  #login .login-card .fld input{height:48px;border-radius:12px;font-size:15.5px}
  #login .login-card .login-actions .primary{height:48px;border-radius:13px;font-size:15.5px;font-weight:700}
  #login .login-card .linkbtn{display:block;margin:16px auto 0;color:var(--acc-text);font-weight:600;text-decoration:none}
  #login .login-card .legal{text-align:center}
}

/* ---------- public profile (/u/<nick>): name and avatar on a lavender band, the rest in a column underneath ---------- */
@media (min-width:701px){
  #socProfile.soc-page{max-width:1212px;display:flex;flex-direction:column;gap:16px;padding-top:0}
  #socProfile>*{width:100%;max-width:700px;box-sizing:border-box;margin-block:0}
  #socProfile>.soc-head{order:-1;max-width:none;margin:0 0 10px;padding:30px 0;border:0;border-radius:0;background:transparent;box-shadow:none;position:relative;z-index:6;isolation:isolate}
  #socProfile>.soc-head h1{font-size:36px}
  #socProfile>.soc-head .btn{min-height:42px;border-radius:12px}
  #socProfile>.soc-head .btn:not(.primary),#socProfile>.soc-head .iconbtn{background:var(--surface);border-color:transparent}
  #socProfile>.panel:not(.soc-head){border-color:var(--dk-line);border-radius:18px}
  #socProfile>.soc-selfnote{border:0;border-radius:12px;background:var(--surface);border:1px solid var(--dk-line)}
  #socProfile>.soc-gate:only-child{margin-top:32px;max-width:520px;align-self:center}
}

/* picture and question side by side once the column is wide enough for both (narrower: the picture on top) */
@media (min-width:1100px){
  #probView:not([hidden]):not(.dk-wide):not(.dk-nodia){grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
  #probView:not(.dk-wide):not(.dk-nodia)>.diagram{grid-column:1}
  #probView:not(.dk-wide):not(.dk-nodia)>.q{grid-column:2}
  #probView:not(.dk-nodia):not(.dk-wide)>.q>.acts .checkbtn,#probView:not(.dk-nodia):not(.dk-wide)>.q>.acts #nextBtn{flex:1 1 auto;justify-content:center}
}

/* narrower windows (701–999px): the Go page is one centred column; the course card and sign-up box go under the problem */
@media (min-width:701px) and (max-width:999px){
  body.go #vPractice.layout{grid-template-columns:minmax(0,1fr);max-width:760px}
  .go-side{grid-column:1;position:static;display:grid;grid-template-columns:1fr 1fr;gap:14px}
}

/* ===== 5-screens.css ===== */
/* 5-screens: the remaining app screens (30 Oct): mock exam running and results, Study together, welcome, formulas,
   report, check your email, reset password, shared link, offline, admin. Desktop rules sit inside @media (min-width:701px);
   the phone rules for the same screens live in public/study.css (≤700px). Shared bits come first. */

/* small purple label above a title */
.ex-eb,.exinfo .ex-eb{display:block;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--acc-text);margin-bottom:6px}

/* ---------- mock exam: running ---------- */
#exRun .exinfo h1{margin:0;font-family:var(--f-display);letter-spacing:-.02em}
.exdots button{border-radius:9px}
.exdots button.done{background:var(--acc);border-color:var(--acc);color:var(--acc-ink)}
.exdots button[aria-current="true"]{background:var(--surface);border-color:var(--acc);box-shadow:0 0 0 1px var(--acc);color:var(--ink)}
.extimer{display:inline-flex;align-items:center;gap:7px;font-family:var(--f-body);font-size:15px;font-weight:500;color:var(--muted);min-width:0;border-color:transparent;border-radius:999px;padding:7px 14px}
.extimer svg{width:16px;height:16px;color:var(--acc-text)}
.extimer b{font-family:var(--f-mono);font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.extimer b.low{color:var(--acc-text)}
.extimer:has(b.low){box-shadow:0 0 0 2px var(--acc)}
#exRun .ex-hand{display:none}
.ex-side{display:none}
#exRun .tools #exNext{margin-inline-start:auto}

/* ---------- mock exam: results ---------- */
#exResult .kpis{border:0;background:transparent;gap:16px;overflow:visible}
#exResult .kpi{border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.exr-h{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.exr-h span{font-size:13.5px;color:var(--muted)}
.exr .hitem{grid-template-columns:auto minmax(0,1fr) auto auto}
.exr .hitem .ch{grid-row:span 2;align-self:center;color:var(--muted);display:flex}
.exr .m .y::after{content:" ·"}
.exr .hitem .ch svg{width:16px;height:16px}
[dir="rtl"] .exr .hitem .ch svg{transform:scaleX(-1)}
.exr .hitem .st.ok{background:var(--acc-soft);border-color:transparent;color:var(--acc-text)}
.exr .hitem .st.bad{background:var(--sunk);border-color:transparent;color:var(--muted)}

@media (min-width:701px){
  #exRun,#exResult{max-width:none}
  #exRun .exbar{position:relative;top:auto;z-index:6;isolation:isolate;display:flex;flex-wrap:nowrap;align-items:center;gap:16px;padding:28px 0 26px;margin:-26px 0 28px;background:transparent;backdrop-filter:none}
  #exRun .exinfo{flex:1;min-width:0}
  #exRun .exinfo h1{font-size:34px;line-height:1.15}
  #exRun .exdots{flex:none;gap:6px}
  #exRun .exdots button{width:32px;height:32px;font-size:13px}
  #exRun .extimer{background:var(--surface)}
  #exRun #exFinish{min-height:42px;border-radius:12px;border-color:transparent;background:var(--surface);font-weight:700;padding:0 18px}
  #exRun .ex-body{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start;padding-bottom:40px}
  #exRun .bench{margin:0;border-radius:18px}
  #exRun .ex-side{display:flex;flex-direction:column;gap:16px;position:sticky;top:88px}
  .ex-ans{padding:18px 18px 8px;border-radius:18px}
  .ex-ans h2{font-size:16px;margin:0 0 6px}
  .ex-li{display:flex;align-items:center;gap:12px;width:100%;padding:10px 0;border:0;border-top:1px solid var(--soft);background:transparent;text-align:start;color:var(--ink)}
  .ex-li:first-child{border-top:0}
  .ex-li .st{width:30px;height:30px;flex:none;border-radius:9px;display:grid;place-items:center;background:var(--sunk);font:600 13px var(--f-mono);color:var(--muted)}
  .ex-li.done .st{background:var(--acc-soft);color:var(--acc-text)}
  .ex-li[aria-current="true"] .st{background:var(--surface);box-shadow:inset 0 0 0 2px var(--acc);color:var(--ink)}
  .ex-li .t{display:flex;flex-direction:column;line-height:1.3;min-width:0}
  .ex-li b{font-size:14px;font-weight:600}
  .ex-li small{font-size:12.5px;color:var(--muted)}
  .ex-li:hover b{color:var(--acc-text)}
  .ex-tip{margin:0;padding:16px 18px;border-radius:18px;font-size:13.5px;line-height:1.5;color:var(--muted)}

  #exResult .ap-head{align-items:flex-end;padding-bottom:30px}
  #exResult .ap-head h1{font-size:40px}
  #exResult .ap-acts .btn{min-height:46px;border-radius:13px;font-weight:700;padding:0 20px}
  #exResult .ap-acts .btn:not(.primary){background:var(--surface);border-color:transparent}
  #exResult .kpis{margin-top:28px}
  #exResult .kpi{padding:18px 20px}
  #exResult .exr-p{margin-top:20px;padding:0;border-radius:18px;overflow:hidden}
  #exResult .exr-h{padding:18px 22px 8px}
  #exResult .exr-h h2{margin:0}
  #exResult .exr .hitem{padding:14px 22px;border-top-color:var(--soft)}
  #exResult .exr .m{max-width:none;display:flex;flex-direction:column;align-items:flex-end;font-size:13.5px}
  #exResult .exr .m .y::after{content:none}
}

/* ---------- Study together (lobby, a problem, exam together) ---------- */
.tg-ok{background:var(--acc)}
.tg-now{background:var(--acc)}
.tg-top{border-bottom:0}
.tg-kind{display:block}
.tg-intro>.tg-eyebrow{display:none}
.tg-rules li{padding-inline-start:28px}
.tg-rules li::before{inset-inline-start:0;top:.15em;width:18px;height:18px;border-radius:0;background:var(--acc-text);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center/16px no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center/16px no-repeat}
#tgScreen[data-phase="study"] .tg-bar>b{display:none}
.tg-bar .tg-status{display:inline-flex;padding:5px 12px;border-radius:999px;background:var(--soft);color:var(--ink);font-size:13.5px;font-weight:600}
#tgLeave{background:var(--surface);border-color:transparent;font-weight:700}
@media (min-width:701px){
  .tg-top{background:var(--dk-band)}
  .tg-top-in,.tg-in{max-width:1212px}
  .tg-top-in{min-height:0;padding:30px 0 30px;gap:16px;align-items:flex-end}
  .tg-ttl h1{font-size:34px;line-height:1.15;letter-spacing:-.02em;white-space:normal}
  .tg-kind{margin-bottom:6px}
  #tgLeave{min-height:42px;border-radius:12px;padding:0 18px}
  .tg-body{padding-top:28px}
  .tg-lobby{grid-template-columns:minmax(0,1fr) 400px;gap:24px}
  .tg-lobby>.panel,.tg-in>.panel,.tg-card,.tg-bench{border-radius:18px;border-color:var(--soft)}
  .tg-intro{padding:30px 32px}
  .tg-intro h2{font-size:28px}
  .tg-rules{gap:12px;font-size:15px;margin-top:20px}
  .tg-go{border-top:0;padding-top:4px}
  .tg-who,.tg-inv{padding:18px 20px}
  /* a problem: the question on the left, the solution control on the right */
  #tgScreen[data-phase="study"] .tg-in{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:16px 24px;align-items:start}
  #tgScreen[data-phase="study"] .tg-in>*{grid-column:1}
  #tgScreen[data-phase="study"] .tg-bar{grid-column:2;grid-row:1}
  #tgScreen[data-phase="study"] .tg-ctl{grid-column:2;grid-row:2;flex-direction:column;align-items:stretch;gap:12px;padding:18px 20px;background:var(--surface);border:1px solid var(--soft);border-radius:18px}
  #tgScreen[data-phase="study"] .tg-ctl .muted{flex:none;line-height:1.5}
  #tgScreen[data-phase="study"] .tg-ctl .sp{display:none}
  #tgScreen[data-phase="study"] #tgProb{grid-row:1/span 2}
  #tgScreen[data-phase="study"] .tg-bar{justify-content:flex-end}
}
@media (min-width:701px){
  #tgScreen[data-phase="study"] #tgProb{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:0}
  #tgScreen[data-phase="study"] #tgAct{margin-top:-16px}
  #tgScreen[data-phase="study"] #tgAct>.tg-card{border-top-left-radius:0;border-top-right-radius:0;border-top:1px solid var(--soft);padding:20px 28px 24px}
  #tgScreen[data-phase="study"] #tgAct>.tg-card .btn{min-height:46px;border-radius:13px}
}

/* ---------- first-time welcome (what do you study?) ---------- */
.ob .pfield{text-transform:uppercase;font-size:11.5px;letter-spacing:.06em}
.ob h2{font-family:var(--f-display);letter-spacing:-.015em}
.obsteps i{height:5px}
@media (min-width:701px){
  .sheet.ob{max-width:1040px;padding:28px 34px 24px;border-radius:22px;border:0;box-shadow:var(--dk-pop)}
  .ob h2{font-size:30px;margin:0}
  .ob .sub{font-size:15px;margin:6px 0 4px}
  .ob .picks{grid-template-columns:repeat(3,minmax(0,1fr));max-height:none;overflow:visible;margin-top:8px}
  .ob .pfield{margin:12px 0 0}
  .ob .pfield:first-child{margin-top:4px}
  .ob .pick{border-radius:14px;border-color:var(--line);padding:12px 14px;padding-inline-start:44px}
  .obfoot{margin-top:20px;padding-top:16px;border-top:1px solid var(--soft)}
  .obfoot .btn.primary{min-height:46px;border-radius:13px;padding:0 24px;font-weight:700}
  .ob .tpicks{max-height:none}
}

/* ---------- formulas panel ---------- */
#formulaModal .fx-ttl{min-width:0}
#formulaModal #fxTitle{margin:0 0 2px;font-size:12px;font-family:var(--f-body);line-height:1.3}
#formulaModal .fx-topic{margin:0;font:700 20px/1.2 var(--f-display);letter-spacing:-.01em;color:var(--ink)}
.fx-note{margin:16px 0 0;font-size:13px;line-height:1.45;color:var(--muted)}
.fx div{border-color:var(--soft);border-radius:12px}
@media (min-width:701px){
  /* docked on the right, from under the header to the bottom, with the problem still in view */
  .modal.fxpanel{inset:var(--fx-top,64px) 0 0 auto!important;width:440px;max-width:100vw}
  [dir="rtl"] .modal.fxpanel{inset:var(--fx-top,64px) auto 0 0!important}
  .modal.fxpanel .sheet{height:100%;max-height:none;border-radius:0;border-width:0 0 0 1px;border-color:var(--soft);padding:26px 28px;display:flex;flex-direction:column;box-shadow:-24px 0 50px rgba(22,22,29,.10)}
  [dir="rtl"] .modal.fxpanel .sheet{border-width:0 1px 0 0;box-shadow:24px 0 50px rgba(22,22,29,.10)}
  .modal.fxpanel .sheet-head{position:static;margin:0 0 14px;padding:0;align-items:flex-start;cursor:auto}
  #formulaModal .fx-topic{font-size:24px}
  #formulaModal .principle{font-size:15px;line-height:1.6}
  .fx-note{margin-top:auto;padding-top:16px}
}

/* ---------- report an issue ---------- */
#reportModal .cats span{border-color:transparent;background:var(--soft);font-weight:600}
#reportModal .cats input:checked+span{background:var(--acc);border-color:var(--acc)}
#reportModal textarea{border-radius:14px}
#reportModal .ctx{font-family:var(--f-body);font-size:13px;display:flex;align-items:center;gap:7px}
#reportModal .ctx::before{content:"";flex:none;width:15px;height:15px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M6.5 9.5a3 3 0 0 0 4.2 0l2.6-2.6a3 3 0 0 0-4.2-4.2l-.9.9M9.5 6.5a3 3 0 0 0-4.2 0L2.7 9.1a3 3 0 0 0 4.2 4.2l.9-.9'/%3E%3C/svg%3E") center/15px no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M6.5 9.5a3 3 0 0 0 4.2 0l2.6-2.6a3 3 0 0 0-4.2-4.2l-.9.9M9.5 6.5a3 3 0 0 0-4.2 0L2.7 9.1a3 3 0 0 0 4.2 4.2l.9-.9'/%3E%3C/svg%3E") center/15px no-repeat}
#repSend svg{width:16px;height:16px}
[dir="rtl"] #repSend svg{transform:scaleX(-1)}
@media (min-width:701px){
  #reportModal .sheet{max-width:600px;padding:28px 30px 24px;border-radius:22px;border:0;box-shadow:var(--dk-pop)}
  #reportModal h2{font-size:26px}
  #reportModal .sub{font-size:15px}
  #reportModal textarea{min-height:130px}
  #reportModal .row-end .btn{min-height:44px;border-radius:12px;padding:0 18px;font-weight:700}
}

/* ---------- confirm your email (study page) ---------- */
#noCredit .nc-ic{display:none}
#noCredit.is-verify .nc-ic{display:grid;place-items:center;flex:none;width:84px;height:84px;border-radius:24px;background:var(--acc-soft);color:var(--acc-text)}
#noCredit .nc-ic svg{width:40px;height:40px}
#noCredit .nc-note{font-size:13.5px;color:var(--muted)}
body:has(#noCredit.is-verify:not([hidden])) #verifyBanner{display:none!important}
@media (min-width:701px){
  #noCredit.is-verify{flex-direction:row;align-items:center;gap:40px;text-align:start;padding:48px 52px}
  #noCredit.is-verify .nc-ic{width:120px;height:120px;border-radius:30px}
  #noCredit.is-verify .nc-ic svg{width:54px;height:54px}
  #noCredit.is-verify .nc-main{flex:1;display:flex;flex-direction:column;gap:12px}
  #noCredit.is-verify h2{font-size:30px;margin:0}
  #noCredit.is-verify p{margin:0;max-width:none}
  #noCredit.is-verify .nc-btns{justify-content:flex-start;align-items:center;gap:14px;margin-top:8px}
  #noCredit.is-verify .nc-btns .btn{min-height:48px;border-radius:13px;padding:0 22px;font-weight:700}
}

/* ---------- forgot password: sent; choose a new password ---------- */
.fg-sent{display:flex;flex-direction:column;gap:12px}
.fg-sent .nc-ic{display:grid;place-items:center;width:64px;height:64px;border-radius:18px;background:var(--acc-soft);color:var(--acc-text)}
.fg-sent .nc-ic svg{width:30px;height:30px}
.fg-sent h2{margin:0;font:700 26px/1.15 var(--f-display);letter-spacing:-.015em}
.fg-sent .ok{margin:0;padding:0;border:0;background:transparent;color:var(--muted);font-size:15px;line-height:1.5}
#forgotPane.sent>h1,#forgotPane.sent>.sub{display:none}
#login #forgotPane.sent [data-back]{display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;margin-top:18px;border-radius:13px;background:var(--acc);color:var(--acc-ink);font-weight:700;text-decoration:none}
.pwwrap{position:relative;display:block}
.pwwrap input{width:100%;padding-inline-end:72px}
.pwshow{position:absolute;inset-inline-end:6px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:var(--acc-text);font-weight:600;font-size:13.5px;padding:6px 10px;border-radius:8px;cursor:pointer}
.pwshow:hover{background:var(--soft)}

/* ---------- shared problem link (/s/…) ---------- */
.share-by svg{width:15px;height:15px;flex:none}
.share-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px}
.share-meta .chip{background:var(--surface);border-color:transparent;font-family:var(--f-body);font-size:13px;font-weight:600}
.share-pdf{display:none}
.share-side .panel h2{margin:0;font:700 17px/1.25 var(--f-display)}
.share-side .share-note{margin:8px 0 0}
.share-side .share-open{flex-direction:column;align-items:stretch;gap:10px;margin-top:12px;text-align:start}
.share-side .share-open .muted{font-size:13.5px;line-height:1.5}
@media (min-width:701px){
  .wrap.seo:has(.share-grid){max-width:1212px}
  .share-title{padding:30px 0 32px;margin:0;max-width:none}
  .share-title .share-meta{max-width:none}
  .share-title h1{font-size:40px}
  .share-title .share-by{font-size:13px}
  .share-pdf{display:inline-flex;align-items:center;gap:8px;margin-inline-start:auto;min-height:40px;border-radius:12px;background:var(--surface);border-color:transparent;font-weight:700}
  .share-pdf svg{width:16px;height:16px}
  .share-card .tcard-head .pdfbtn{display:none}
  .share-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;align-items:start;margin-top:28px}
  .share-side{display:flex;flex-direction:column;gap:16px}
  .share-side .panel{margin:0;padding:20px;border-radius:18px;border-color:var(--soft)}
  .share-main .share-card{margin:0;border-radius:18px}
  .share-main .demo-body:not(.nodia){display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)}
  .share-main .demo-body:not(.nodia)>.diagram{border-radius:0;min-height:100%;display:flex;flex-direction:column;justify-content:center;padding:24px}
  .share-main .demo-body>.diagram svg{display:block;margin:0 auto;width:100%!important;height:auto!important;max-width:none!important;max-height:360px}
  .share-side .share-open .btn{min-height:46px;border-radius:13px;font-weight:700;justify-content:center}
}
