/* Fokus: presentation only. Deck contents, drafts, ratings and SRS stay in their existing paths. */
:root{
  color-scheme:light;
  --bg:#f4f6fa;--ink:#17263c;--sub:#596b83;--line:#dce3ee;--surface:#fff;
  --brand:#3865d8;--brand-soft:#eaf0ff;--brand-ink:#fff;
  --good:#167a61;--good-bg:#e5f4ed;--hard:#915514;--hard-bg:#fff1dc;
  --new-bg:#edf1f6;--new:#65758b;--focus-review:#5c5299;--focus-review-bg:#eeeafa;
  --shadow:0 3px 14px #20334e05;
}
body{background:var(--bg);color:var(--ink);font-size:15px;line-height:1.6}
.ic{stroke-width:1.55}
.surface{border-color:var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow)}
.btn{min-height:46px;font-weight:600;font-size:14px;border-radius:11px;padding:11px 15px;line-height:1.4;box-shadow:none}
.btn-primary{background:var(--brand);color:var(--brand-ink);border-color:transparent}
.btn-primary:hover:not(:disabled){background:var(--brand);filter:brightness(1.06)}
.btn-outline,.btn-muted{background:var(--surface);border-color:var(--line);color:var(--ink)}
.btn-outline:hover:not(:disabled),.btn-muted:hover:not(:disabled){background:var(--brand-soft);border-color:var(--line)}
.btn-green{background:var(--good-bg);border-color:transparent;color:var(--good)}
.btn-orange{background:var(--hard-bg);border-color:transparent;color:var(--hard)}
.btn-review{background:var(--focus-review-bg);border-color:transparent;color:var(--focus-review)}
.btn-review:hover{background:var(--focus-review-bg);border-color:transparent}
.plain-link{font-weight:550;color:var(--brand);font-size:13px}
.page-title,.page-heading .page-title{font-size:30px;font-weight:650;line-height:1.2;letter-spacing:-1px}
.page-description{font-size:14px;color:var(--sub);line-height:1.65}
.eyebrow{font-size:11px;letter-spacing:1.3px;font-weight:600;color:var(--sub)}
.side{background:var(--surface);color:var(--ink);border-right:1px solid var(--line);padding:25px 17px}
.side-brand{gap:10px;padding:0 9px 26px}
.brand-mark{background:var(--brand);color:var(--brand-ink);box-shadow:none;width:35px;height:35px;border-radius:11px}
.brand-title{font-size:16px;font-weight:650;letter-spacing:-.4px}
.brand-sub{font-size:11px;color:var(--sub)}
.nav-button{font-weight:500;color:var(--sub);min-height:47px;padding:12px;border-radius:10px;margin:4px 0}
.nav-button.is-active{background:var(--brand-soft);color:var(--brand);font-weight:600;box-shadow:none}
.nav-button:hover:not(.is-active){background:var(--bg);color:var(--ink)}
.side-bottom{border-color:var(--line);color:var(--sub);font-size:12px;line-height:1.8;padding-left:10px}
.topbar{background:var(--surface);border-color:var(--line);min-height:74px;padding:13px 30px}
.brand-name{font-size:14px;font-weight:650;gap:9px;letter-spacing:-.25px}
.focus-brand-mark{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:9px;background:var(--brand);color:var(--brand-ink)}
.focus-brand-mark .ic{width:17px;height:17px}
.topbar-actions{gap:9px}
.icon-button,.account-button{background:var(--surface);border-color:var(--line);color:var(--sub);font-weight:550;border-radius:10px;min-height:44px}
.body-content{max-width:1120px;padding:32px 32px 55px}
.study-home{max-width:730px}
.read-home .page-heading{margin-bottom:24px}
.read-home .page-heading p{max-width:58ch;font-size:14px;line-height:1.65}
.read-start-card{display:grid;gap:20px;min-width:0;padding:24px}
.read-start-card .form-control{gap:9px}
.read-start-card label{color:var(--sub);font-size:13px;font-weight:500}
.read-start-card select.field{display:block;width:100%;max-width:100%;min-width:0;min-height:48px;text-overflow:ellipsis}
.read-start-card>.btn{min-width:0;min-height:50px}
.read-start-note{margin:0;color:var(--sub);font-size:13px;line-height:1.65;overflow-wrap:anywhere}
.focus-home-heading{margin-bottom:23px;gap:4px}
.focus-home-heading .page-title{font-size:34px;font-weight:650;line-height:1.17;letter-spacing:-1.2px;margin-top:4px}
.focus-home-heading .eyebrow{margin-bottom:4px}
.subject-picker{display:grid;gap:7px;width:100%;max-width:352px;min-width:0;margin:20px 0 24px}
.subject-picker>label{color:var(--sub);font-size:12px;font-weight:500;line-height:1.5}
.subject-picker>select.field{display:block;width:100%;max-width:100%;min-width:0;min-height:48px;padding:10px 14px;font-size:16px;font-weight:550;border-color:var(--line);border-radius:11px;background:var(--surface);color:var(--ink);text-overflow:ellipsis}
.focus-home .learning-summary{gap:0;margin:25px 0 27px}
.focus-home .learning-summary>.summary-item{background:transparent;border:0;border-right:1px solid var(--line);border-radius:0;box-shadow:none;padding:1px 17px;min-height:70px;gap:5px}
.focus-home .learning-summary>.summary-item:first-child{padding-left:1px}
.focus-home .learning-summary>.summary-item:last-child{border-right:0}
.focus-home .learning-summary>.summary-item:hover:not(:disabled){background:var(--brand-soft);box-shadow:none}
.focus-home .learning-summary>.summary-item>strong{font-size:29px;line-height:1.25;font-weight:650;letter-spacing:-.8px;color:var(--ink)}
.focus-home .learning-summary>.summary-item>span{font-size:12px;font-weight:400;color:var(--sub);gap:5px}
.start-card,.resume-card{border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:none;padding:24px;margin:20px 0}
.focus-card-eyebrow{display:inline-flex;align-items:center;gap:6px;background:var(--brand-soft);color:var(--brand);padding:4px 9px;border-radius:7px;font-size:11px;font-weight:550;margin-bottom:13px}
.start-card h2,.resume-card h2{font-size:22px;line-height:1.35;letter-spacing:-.6px;font-weight:600;margin:0 0 9px}
.start-card p,.resume-card p{font-size:14px;color:var(--sub);line-height:1.65;margin-bottom:17px}
.start-card>.btn-primary,.resume-card>.btn-primary{min-height:50px;border-radius:12px;font-size:14px;font-weight:600}
.start-card .learning-actions:empty{display:none}
.learning-start{display:grid;gap:16px;min-width:0}
.learning-start>h2{margin:0;font-size:19px}
.learning-field{display:grid;gap:7px;min-width:0;color:var(--sub);font-size:12px;font-weight:500}
.learning-field>select.field{display:block;width:100%;max-width:100%;min-width:0;min-height:48px;padding:10px 12px;font-size:16px;font-weight:500;color:var(--ink);background:var(--surface);border-color:var(--line);border-radius:10px;text-overflow:ellipsis}
.learning-start>p{margin:0;overflow-wrap:anywhere}
.learning-start>.learning-mode-note{font-size:12px;line-height:1.55}
.learning-section-progress{display:grid;gap:3px;padding:12px 14px;border-left:2px solid var(--brand);background:var(--bg);border-radius:0 9px 9px 0}
.learning-section-progress>strong{color:var(--ink);font-size:14px;font-weight:550}
.learning-section-progress>span{font-size:12px}
.learning-session-label{display:block;color:var(--sub);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.resume-card>.learning-session-label{margin-bottom:8px}
.learning-report{display:grid;gap:12px;margin:22px 0 12px;text-align:left}
.learning-report>p{margin:0;color:var(--sub);font-size:14px;overflow-wrap:anywhere}
.learning-actions{margin-bottom:0}
.resume-card{border-top:3px solid var(--brand)}
.resume-card>.plain-link{display:block;margin-top:10px}
.focus-new-round{margin:14px 0 22px;min-width:0}
.focus-new-round>summary{min-height:44px;padding:10px 0;cursor:pointer;font-size:13px;color:var(--sub);font-weight:500}
.focus-new-round .start-card{margin-top:6px}
.focus-shortcuts{margin:25px 0 28px}
.focus-shortcuts>h2{font-size:14px;font-weight:600;letter-spacing:0;margin:0 0 13px}
.focus-shortcut-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.focus-shortcut{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:15px;min-width:0;min-height:94px;padding:15px 13px;border:1px solid var(--line);border-radius:13px;background:var(--surface);color:var(--ink);font-size:13px;line-height:1.4;font-weight:550;text-align:left;overflow-wrap:anywhere}
.focus-shortcut:hover{border-color:var(--brand);background:var(--surface)}
.focus-shortcut-icon{color:var(--sub)}
.focus-shortcut-icon.is-review{color:var(--hard)}
.focus-shortcut small{display:inline-block;font-size:11px;font-weight:500;color:var(--sub);margin-left:3px}
.quick-question-search{background:transparent;border-color:var(--line);padding:0;margin:25px 0}
.quick-question-search>label{color:var(--sub);font-size:12px;font-weight:500}
.focus-home .sheet-entry{border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;background:transparent;padding:22px 0;margin-top:20px}
.focus-home .sheet-entry h2{font-size:16px;font-weight:600;margin-bottom:7px}
.focus-home .sheet-entry p{font-size:13px;margin-bottom:12px}
.focus-home .sheet-entry .btn{width:auto;min-height:42px;font-size:13px;padding:8px 12px}
.focus-home .settings-card:has(.chapter-item){border:0;padding:10px 0;background:transparent;box-shadow:none}
.focus-home .settings-card:has(.chapter-item)>h2{font-size:16px;font-weight:600}
.chapter-item{background:var(--surface);border-color:var(--line);box-shadow:none;border-radius:12px;font-weight:500}
.chapter-text strong{font-weight:550}
.learn-mode-tabs{background:var(--brand-soft);border:0;padding:4px;gap:4px;border-radius:12px}
.learn-mode-tabs>button{color:var(--sub);font-size:13px;font-weight:550;border:0;min-height:44px}
.learn-mode-tabs>button.is-active{background:var(--surface);border:0;box-shadow:0 1px 4px #18375b09;color:var(--ink)}
.learning-summary>div{background:var(--surface);border-color:var(--line);font-weight:500}
.learning-summary strong{font-weight:650}
.practice-layout{max-width:750px}
.session-header{font-size:12px;color:var(--sub)}
.live-study-counts{background:var(--surface);color:var(--sub);border-color:var(--line)}
.session-progress{height:4px;background:var(--line);margin-bottom:20px}
.practice-card{padding:27px;border-radius:19px;box-shadow:none}
.practice-title{font-size:25px;font-weight:600;letter-spacing:-.65px;line-height:1.4;margin:22px 0 17px}
.practice-tag-row .pill{font-size:12px;font-weight:500;background:var(--brand-soft);color:var(--sub)}
.status{font-size:11px;font-weight:550;border-radius:7px;padding:5px 8px}
.status.easy{background:var(--good-bg);color:var(--good)}
.status.hard{background:var(--hard-bg);color:var(--hard)}
.status.review{background:var(--focus-review-bg);color:var(--focus-review)}
.status.new{background:var(--new-bg);color:var(--sub)}
.edit-question-button{border:0;background:transparent;color:var(--sub);font-size:13px;font-weight:500;min-height:40px;padding:5px 0;margin-bottom:8px}
.personal-card-tools{gap:8px;margin:13px 0 16px}
.favorite-toggle,.hint-toggle,.archive-card{font-size:13px;font-weight:500;background:var(--surface);color:var(--sub);border-color:var(--line);min-height:44px;padding:9px 12px;border-radius:10px}
.personal-card-tools>.favorite-toggle,.personal-card-tools>.archive-card,.personal-card-tools>.hint-toggle{flex:0 0 auto;white-space:nowrap;overflow-wrap:normal}
.favorite-toggle[aria-pressed="true"],.hint-toggle[aria-expanded="true"]{background:var(--hard-bg);border-color:transparent;color:var(--hard)}
.favorite-toggle[aria-pressed="true"]>.ic{fill:none}
.answer-details,.metadata-fields,.filters-details{border-color:var(--line);background:var(--surface);border-radius:11px}
.answer-details>summary,.metadata-fields>summary,.filters-details>summary{color:var(--sub);font-size:13px;font-weight:500}
.solution{background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;padding:24px 0 0;margin-top:24px}
.solution h2{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:1px;color:var(--good);margin:0 0 12px}
.solution p{font-size:17px;line-height:1.75;color:var(--ink)}
.solution .card-meta-details{color:var(--sub)}
.edit-answer-button,.new-study-card-button{font-size:12px;font-weight:500;min-height:42px;padding:9px 11px}
.card-meta-details{border-color:var(--line);color:var(--sub)}
.card-meta-details>summary{color:var(--sub);font-weight:500;font-size:12px}
.personal-editor{border-color:var(--line)}
.personal-editor h2{font-size:16px;font-weight:600}
.personal-editor label,.form-control label,.answer-label{font-weight:550;color:var(--sub)}
.recall-heading{border-top:1px solid var(--line)}
.recall-heading h2{font-size:17px;font-weight:600}
.recall-heading p{color:var(--sub);font-size:13px}
.study-actions{background:var(--surface);border-color:var(--line);box-shadow:0 4px 18px #17263c0a;border-radius:15px;padding:8px;gap:8px}
.study-actions.is-grading>.btn{border:0;border-radius:10px;font-size:14px;min-height:72px}
.grade-copy strong{font-weight:600}
.study-actions .grade-copy small{font-weight:400}
.study-actions .skip-action{border-top:1px solid var(--line);border-radius:0;margin-top:2px;background:transparent;color:var(--sub);font-size:12px}
.understanding-details{background:var(--bg);border-color:var(--line)}
.understanding-details>summary{color:var(--sub);font-weight:500}
.understanding-options>button{background:var(--surface);border-color:var(--line);color:var(--ink);font-weight:500}
.understanding-options>button[aria-pressed="true"]{background:var(--brand-soft);border-color:var(--brand);color:var(--ink)}
.question-row,.settings-group,.modal,.field,.answer-input,.search-box,.favorite-round-summary>div{background:var(--surface);color:var(--ink);border-color:var(--line)}
.question-main strong{font-weight:600}
.question-actions .btn{font-size:12px;font-weight:500}
.settings-card h2,.modal h2{font-weight:600}
.settings-card p{color:var(--sub)}
.form-control label{font-size:13px}
.field,.answer-input,.search-box input{color:var(--ink);background:var(--surface);font-size:16px;border-color:var(--line)}
.modal{border-radius:18px;box-shadow:0 20px 70px #08152324}
.rich-editor-shell{background:var(--surface);border-color:var(--line)}
.format-toolbar{background:var(--bg);border-color:var(--line);color:var(--sub)}
.format-tool,.format-menu{color:var(--sub)}
.format-tool:hover,.format-menu:hover{background:var(--brand-soft);color:var(--ink)}
.format-toggle[aria-pressed="true"]{background:var(--brand-soft);color:var(--brand)}
.format-divider{background:var(--line)}
.rich-editor{color:var(--ink)}
.format-instruction{color:var(--sub)}
.review-card{border-top:2px solid var(--hard);box-shadow:none}
.review-card h2{font-weight:600;font-size:19px}
.review-tab-count,.answer-review-badge{background:var(--hard-bg);color:var(--hard);font-weight:550}
.answer-review-toggle{background:var(--surface);border-color:var(--line);color:var(--hard);font-weight:550}
.answer-review-toggle[aria-pressed="true"]{background:var(--hard-bg);border-color:var(--hard)}
.activity-chart h2{font-weight:600}
.activity-kpis strong{font-weight:650}
.activity-chart{border-radius:19px;box-shadow:none}
.activity-chart-top{gap:13px}
.activity-period>button{font-weight:550}
.progress-row{border-color:var(--line);font-size:14px}
.progress-row>strong{font-weight:600}
.sheet-answer,.choice-feedback{background:var(--bg);color:var(--ink);border-color:var(--line)}
.study-sheet-card{background:var(--surface)}
.save-notice{background:var(--good-bg);color:var(--good);border-color:transparent}
.info,.import-summary{background:var(--brand-soft);color:var(--ink);border-color:var(--line)}
.warning,.hint-panel{background:var(--hard-bg);color:var(--hard);border-color:transparent}
.favorite-badge{background:var(--hard-bg);color:var(--hard)}
.footer-note,.chapter-text small,.question-meta,.last-shown,.repeat-note{color:var(--sub)}
.empty{background:var(--surface);border-color:var(--line)}
.bottom-nav{background:var(--surface);border-color:var(--line);box-shadow:none}
.bottom-nav-button{font-size:11px;color:var(--sub);font-weight:500}
.bottom-nav-button.is-active{background:var(--brand-soft);color:var(--brand);font-weight:550}
@media(prefers-color-scheme:dark){
  :root{color-scheme:dark;--bg:#141c2b;--ink:#edf2fa;--sub:#afbdd0;--line:#354158;--surface:#1c283c;--brand:#9ab4ff;--brand-ink:#172d56;--brand-soft:#283b60;--good:#8ddcbf;--good-bg:#1b3c34;--hard:#efc386;--hard-bg:#48351f;--new-bg:#273244;--focus-review:#d2bef9;--focus-review-bg:#382d53;--shadow:0 3px 14px #00000009}
  .fmt-color-blue{color:#a8c4ff}.fmt-color-green{color:#b4e3bf}.fmt-color-red{color:#ffb4b4}.fmt-color-purple{color:#d4b6fc}.fmt-color-gray{color:#d2d9e6}
  .fmt-highlight-yellow{background-color:#514522}.fmt-highlight-green{background-color:#24432e}.fmt-highlight-blue{background-color:#263e5c}.fmt-highlight-pink{background-color:#513444}.fmt-highlight-purple{background-color:#44365a}
  .rich-editor-shell:focus-within{box-shadow:0 0 0 2px var(--brand-soft);border-color:var(--brand)}
  .rich-editor[aria-disabled="true"]{background:var(--bg)}
  .understanding-options>button[aria-pressed="true"]{color:var(--ink)}
  .personal-editor label,.recall-heading p,.answer-details[open]>summary{color:var(--sub);border-color:var(--line)}
  .login-card .brand-icon{background:var(--brand-soft);color:var(--brand)}
  .source-box{background:var(--bg);border-color:var(--line);color:var(--sub)}
  .choice-option.is-correct{background:var(--good-bg);border-color:var(--good)}
  .choice-option.is-wrong{background:var(--hard-bg);border-color:var(--hard)}
  .btn-danger{background:#432a2c;color:#ffb8ae}
}
@media(max-width:700px){
  .read-start-card{padding:20px;gap:18px}
  .topbar{padding:13px 17px;min-height:68px;flex-direction:row;align-items:center;gap:8px}
  .brand-name{font-size:13px;gap:8px}
  .focus-brand-mark{width:28px;height:28px;border-radius:9px}
  .topbar-actions{gap:6px}
  .account-button{max-width:none;padding:8px;min-width:44px}
  .account-button>span{display:none}
  .body-content{padding:25px 19px 38px}
  .focus-home-heading .page-title{font-size:29px;line-height:1.2;letter-spacing:-1px}
  .focus-home-heading{margin-bottom:19px}
  .subject-picker{margin:18px 0 22px}
  .focus-home .learning-summary{margin:24px 0}
  .focus-home .learning-summary>.summary-item{padding:1px 12px;min-height:65px}
  .focus-home .learning-summary>.summary-item>strong{font-size:27px}
  .focus-home .learning-summary>.summary-item>span{font-size:11px}
  .start-card,.resume-card{padding:20px;border-radius:17px;margin:19px 0}
  .start-card h2,.resume-card h2{font-size:21px;font-weight:600}
  .start-card p,.resume-card p{font-size:13px}
  .start-card>.btn-primary,.resume-card>.btn-primary{font-size:14px;min-height:50px}
  .focus-shortcut-grid{gap:8px}
  .focus-shortcut{padding:12px 10px;min-height:91px;gap:13px;font-size:12px}
  .focus-shortcuts>h2{font-size:13px}
  .practice-card{padding:23px 19px;border-radius:17px}
  .practice-title{font-size:24px;line-height:1.4;font-weight:600}
  .solution{padding:22px 0 0;margin-top:23px}
  .solution p{font-size:16px;line-height:1.75}
  .study-actions{padding:8px;gap:7px;border-radius:13px;margin:18px -5px -5px}
  .study-actions.is-grading>.btn{font-size:13px;font-weight:600;min-height:72px;padding:11px 5px}
  .study-actions .grade-copy small{font-size:11px}
  .study-actions .skip-action{min-height:42px;font-size:12px}
  .learn-mode-tabs>button{font-size:12px}
  .activity-chart{padding:22px 18px}
  .bottom-nav{padding-top:7px;padding-bottom:calc(7px + var(--phone-safe-bottom))}
  .bottom-nav-button .ic{width:20px;height:20px}
}
@media(max-width:360px){
  .body-content{padding-left:15px;padding-right:15px}
  .focus-home-heading .page-title{font-size:27px}
  .focus-shortcut{padding:12px 8px;font-size:11px}
  .practice-card{padding:20px 16px}
  .practice-title{font-size:22px}
  .focus-home .learning-summary>.summary-item{padding-right:6px;padding-left:9px}
  .brand-name{font-size:12px;gap:6px}
}
@media print{
  :root{color-scheme:light;--bg:#fff;--ink:#111;--sub:#444;--surface:#fff;--line:#bbb}
  body{background:#fff;color:#111}
  .focus-shortcuts,.focus-brand-mark,.focus-new-round{display:none}
}

/* Primary tabs always navigate directly; the separate learning menu holds optional areas. */
.brand-home{border:0;background:transparent;color:var(--ink);font:inherit;min-height:44px;padding:0;text-align:left;cursor:pointer}
.brand-home .brand-full{font-size:14px;font-weight:650}
.brand-short,.mobile-learning-toggle{display:none}
.side>nav{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:2px;flex:1}
.side-bottom{flex-shrink:0}
.learning-nav-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:3px;border-radius:10px}
.learning-nav-row:has(.is-active){background:var(--brand-soft)}
.learning-menu-toggle{display:grid;place-items:center;min-height:44px;width:44px;border:0;border-radius:9px;background:transparent;color:var(--sub)}
.learning-menu-toggle:hover{background:var(--brand-soft);color:var(--ink)}
.learning-menu-toggle[aria-expanded="true"]>.ic{transform:rotate(90deg)}
.learning-menu-group-label{margin:9px 11px 3px;font-size:11px;font-weight:550;color:var(--sub)}
.learning-menu-group+.learning-menu-group,.learning-menu-search{border-top:1px solid var(--line);margin-top:7px;padding-top:4px}
.page-navigation{display:flex;align-items:center;margin:-7px 0 10px}
.body-content:has(>.page-navigation.is-learning-back){max-width:794px}
.page-navigation>.plain-link{display:inline-flex;align-items:center;gap:5px;min-height:44px;color:var(--sub);font-weight:500}
.page-navigation .ic{transform:rotate(180deg)}
.focus-extra-practice{border-top:1px solid var(--line);margin-top:19px;padding-top:3px}
.focus-extra-practice>summary{display:flex;align-items:center;gap:7px;min-height:44px;cursor:pointer;font-size:13px;color:var(--sub);list-style:none}
.focus-extra-practice>summary::after{content:'+';margin-left:auto;font-size:17px;font-weight:400}
.focus-extra-practice[open]>summary::after{content:'−'}
.focus-extra-practice>summary::-webkit-details-marker{display:none}
.focus-extra-practice .learning-actions{margin:7px 0 2px}
.learning-subnav{display:grid;gap:2px;margin:2px 0 13px;padding-left:10px;border-left:1px solid var(--line);max-height:max(100px,calc(100dvh - 445px));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.learning-menu-item{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;min-width:0;padding:10px 11px;border:0;border-radius:9px;text-align:left;background:transparent;color:var(--sub);font-size:13px;font-weight:500;line-height:1.5}
.learning-menu-item>span{flex:1;min-width:0}
.learning-menu-item>small{margin-left:auto;font-size:11px;font-weight:500;color:var(--sub)}
.learning-menu-item:hover,.learning-menu-item.is-active{background:var(--brand-soft);color:var(--ink)}
.learning-menu-item[data-page="answer-review"]>.ic{color:var(--hard)}
.learning-menu-backdrop,.learning-menu-popover{display:none}
.history-correction-button{margin:5px 0 14px;font-size:13px;min-height:44px}
.history-correction{padding:17px;margin:16px 0 22px;background:var(--bg);border:1px solid var(--line);border-radius:12px}
.history-correction h3{font-size:15px;font-weight:600;margin:0 0 8px}
.history-correction p{font-size:13px;line-height:1.65;color:var(--sub);margin:6px 0 13px}
.history-correction-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:13px 0}
.history-correction-options>.btn{min-width:0;min-height:54px;padding:10px 6px;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.history-correction-options>.btn[aria-pressed="true"]{opacity:1;box-shadow:inset 0 0 0 1px var(--brand)}
.history-correction .plain-link{font-size:12px}
.correction-pending{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}
@media(max-width:1000px){
 .brand-home .brand-full{display:none}
 .brand-home .brand-short{display:inline;font-size:14px;font-weight:650}
 .mobile-learning-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--ink);font-size:12px;font-weight:500;white-space:nowrap}
 .mobile-learning-toggle[aria-expanded="true"]{background:var(--brand-soft)}
 .learning-menu-backdrop{display:block;position:fixed;inset:0;z-index:43;border:0;background:#0813236b;padding:0;cursor:default}
 .learning-menu-popover{display:block;position:fixed;z-index:46;left:12px;right:12px;bottom:calc(var(--bottom-nav-height) + var(--phone-safe-bottom) + 10px);padding:8px;max-height:calc(100dvh - var(--bottom-nav-height) - var(--phone-safe-bottom) - 35px);overflow-y:auto;overscroll-behavior:contain;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:17px;box-shadow:0 18px 50px #0003}
 .learning-menu-heading{display:flex;align-items:center;justify-content:space-between;padding:4px 10px 7px}
 .learning-menu-heading>strong{font-size:15px;font-weight:600}
 .learning-menu-heading .icon-button{border:0;padding:7px;min-height:38px}
 .learning-menu-item{min-height:47px;font-size:14px;padding:10px 13px}
 .learning-menu-group-label{margin-left:13px;font-size:12px}
 .history-correction{padding:14px 11px}
 .history-correction-options{gap:5px}
 .history-correction-options>.btn{font-size:12px;padding:9px 4px}
}
@media print{.learning-menu-popover,.learning-menu-backdrop,.page-navigation,.history-correction,.history-correction-button{display:none!important}}

/* A round fills the app viewport. The classic card tools remain behind its close button. */
.focus-study{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh;background:var(--bg);color:var(--ink)}
.focus-study:focus{outline:none}
.focus-session-bar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:68px;padding:12px max(24px,env(safe-area-inset-right)) 12px max(24px,env(safe-area-inset-left));background:var(--bg);color:var(--sub);font-size:12px}
.focus-session-bar>span{font-variant-numeric:tabular-nums}
.focus-session-bar>.focus-close{width:44px;min-height:44px;border:0;background:transparent;color:var(--sub)}
.focus-close:hover{background:var(--surface);color:var(--ink)}
.focus-stage{display:flex;flex:1;flex-direction:column;min-width:0;width:100%;max-width:788px;margin:0 auto;padding:12px 24px 0}
.focus-study-card{display:flex;flex:1;flex-direction:column;justify-content:center;gap:24px;min-width:0;min-height:35vh;padding:30px 0 44px;overflow-wrap:anywhere}
.focus-question{margin:0;font-size:clamp(25px,3.1vw,36px);font-weight:600;line-height:1.45;letter-spacing:-.7px;text-align:center;overflow-wrap:anywhere}
.focus-study-card.is-revealed{justify-content:flex-start;padding-top:14px}
.is-revealed>.focus-question{font-size:clamp(22px,2.5vw,28px);text-align:left}
.focus-answer{min-width:0;scroll-margin-top:80px}
.focus-answer>.answer-label{font-size:13px;font-weight:500;color:var(--sub)}
.focus-answer>.answer-label>span{font-weight:400}
.focus-answer>.answer-input{display:block;min-height:112px;font-size:16px;line-height:1.6}
.focus-study-card>.focus-solution{margin:0;padding:25px 0 0}
.focus-solution p{margin:0;font-size:18px;line-height:1.8;overflow-wrap:anywhere}
.study-notes{min-width:0;border-left:2px solid var(--line);padding:4px 0 4px 14px;text-align:left}
.study-notes>h2{margin:0 0 8px;color:var(--sub);font-size:14px;font-weight:600;line-height:1.6;letter-spacing:0}
.study-notes>summary{min-height:44px;padding:9px 0;cursor:pointer;color:var(--sub);font-size:14px;font-weight:500;line-height:1.8}
.study-notes>summary::marker{font-size:10px}
.study-notes>summary:focus-visible{outline:2px solid var(--brand);outline-offset:3px;border-radius:4px}
.study-notes>summary:hover{color:var(--brand)}
.study-notes-text{margin:0;color:var(--ink);font-size:16px;line-height:1.75;overflow-wrap:anywhere}
.study-notes-draft{margin:0 0 6px;color:var(--sub);font-size:12px;line-height:1.5}
.practice-card>.study-notes{margin:16px 0}
.focus-actions{position:sticky;bottom:0;z-index:15;margin-top:auto;padding:20px 0 max(16px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--bg)}
.focus-prompt{margin:0 0 14px;text-align:center;font-size:13px;line-height:1.6;color:var(--sub)}
.focus-assessment-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.is-favorite .focus-assessment-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.focus-assessment-options>.btn{min-width:0;min-height:68px;padding:12px 8px;border:1px solid transparent}
.focus-assessment-options>.btn[aria-pressed="true"]{border-color:currentColor;box-shadow:inset 0 0 0 1px currentColor}
.focus-assessment-options .grade-copy{display:flex;flex-direction:column;gap:4px;line-height:1.35}
.focus-assessment-options .grade-copy small{font-size:11px;font-weight:400}
.focus-reveal{min-height:52px}
.focus-next{margin-top:14px;min-height:52px}
.focus-save-note{margin:10px 0 0;font-size:12px;line-height:1.5;text-align:center;color:var(--sub)}
.focus-secondary-actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 24px;margin-top:7px}
.focus-secondary-actions>.plain-link{min-height:44px;color:var(--sub);font-size:12px;font-weight:400}
.unrated-action{grid-column:1/-1;flex-basis:100%;width:100%;min-width:0;text-align:center}
.unrated-action>.btn{width:100%;min-height:44px;gap:8px;font-size:13px;font-weight:500;white-space:normal}
.unrated-action>small{display:block;margin-top:6px;color:var(--sub);font-size:11px;line-height:1.5}
.study-actions:has(.unrated-action){flex-wrap:wrap}
.focus-reading-actions,.focus-choice-actions{display:flex;flex-wrap:wrap;gap:10px}
.focus-reading-actions>.btn,.focus-choice-actions>.btn{flex:1;min-width:0;min-height:50px}
.focus-enter{display:inline-flex;align-items:center;gap:6px;margin-left:auto;white-space:normal}
.session-header{flex-wrap:wrap}
@media(max-width:700px){
 .focus-session-bar{min-height:60px;padding:8px max(14px,env(safe-area-inset-right)) 8px max(19px,env(safe-area-inset-left))}
 .focus-stage{padding:10px 20px 0}
 .focus-study-card{min-height:32vh;padding:25px 0 32px;gap:24px}
 .focus-question{font-size:27px;line-height:1.5;letter-spacing:-.5px}
 .is-revealed>.focus-question{font-size:23px}
 .focus-solution p{font-size:17px;line-height:1.8}
 .focus-actions{padding-top:16px}
 .focus-assessment-options{gap:7px}
 .focus-assessment-options>.btn{min-height:66px;font-size:13px;padding:10px 4px}
 .focus-assessment-options .grade-copy small{font-size:10px}
 .focus-prompt{font-size:12px}
}
@media print{.focus-session-bar,.focus-actions{display:none}.focus-stage{max-width:none;padding:0}.focus-study-card{padding:0;min-height:0}}

/* Four distinct recall results, with room for complete labels on phones. */
.focus-assessment-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.focus-assessment-options .grade-copy strong{font-size:13px;font-weight:600}
.btn-partial{background:#4b3424;color:#ffcd9c;border-color:transparent}
.status.partial{background:#4b3424;color:#ffcd9c}
.exam-home{max-width:800px}.exam-overview{padding:24px;margin:20px 0}.exam-overview h2{font-size:20px;margin:0}
.exam-overview .section-heading{align-items:flex-start;flex-wrap:wrap;gap:8px}.exam-overview .section-heading>span{font-size:13px;color:var(--sub)}
.exam-progress{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0}.exam-progress strong{display:block;font-size:28px;font-weight:600}.exam-progress span{display:block;font-size:13px;color:var(--sub);line-height:1.5;margin-top:6px}
.exam-settings{padding:18px 22px;margin:18px 0}.exam-settings>summary,.exam-rules>summary{min-height:44px;cursor:pointer;color:var(--sub)}
.exam-settings form{display:grid;gap:16px;max-width:460px}.exam-settings .form-control{display:grid;gap:8px}.exam-settings p,.exam-rules p{font-size:14px;line-height:1.7;color:var(--sub)}
.exam-enabled{display:flex;gap:10px;align-items:center;min-height:44px}.exam-enabled input{width:20px;height:20px}.exam-home-link{display:inline-flex;align-items:center;gap:8px;margin:12px 0}
.exam-dashboard-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 20px;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.exam-dashboard-actions>.plain-link{display:inline-flex;align-items:center;min-height:44px;padding:8px 0;color:var(--sub);font-weight:500}
.exam-dashboard-actions>.btn{min-height:44px;font-size:13px;white-space:normal}
.exam-settings{scroll-margin-top:20px}
.exam-settings .exam-edit-note{margin:0;font-size:13px}
@media(max-width:480px){.exam-dashboard-actions{align-items:stretch;flex-direction:column;gap:8px}.exam-dashboard-actions>.plain-link{align-self:flex-start}.exam-dashboard-actions>.btn{width:100%}}
.bookmark-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.bookmark-actions .btn{min-height:50px;white-space:normal}.bookmark-start{display:grid;gap:10px;margin:18px 0}.bookmark-start p{font-size:14px;line-height:1.6;color:var(--sub)}
@media(prefers-color-scheme:light){.btn-partial,.status.partial{background:#fff0e1;color:#854515}}
@media(max-width:700px){.exam-overview{padding:20px}.exam-progress{gap:12px}.exam-progress strong{font-size:25px}.focus-assessment-options .grade-copy strong{font-size:12px}.focus-assessment-options .grade-copy small{font-size:11px}.exam-settings{padding:16px}}
/* On short phone screens the four-choice footer must not cover the solution. */
@media(max-height:700px){.focus-actions{position:relative;bottom:auto}}
.study-actions.is-grading,.history-correction-options{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(min-width:1100px){.study-actions.is-grading,.history-correction-options{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-height:700px){.study-actions.is-grading{position:relative;bottom:auto}}

/* Quiet round tools and a readable comparison; existing learning state is unchanged. */
.focus-session-bar{gap:12px}
.focus-position{display:grid;gap:2px;min-width:0;font-variant-numeric:tabular-nums;line-height:1.4}
.focus-position>span{white-space:nowrap}
.focus-position>small{max-width:160px;font-size:10px;font-weight:400;line-height:1.35;color:var(--sub);overflow-wrap:anywhere}
.focus-header-tools{display:flex;align-items:center;gap:4px;flex:none}
.focus-header-tools>.icon-button,.focus-round-menu>summary{display:grid;place-items:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:10px;border:0;border-radius:10px;background:transparent;color:var(--sub)}
.focus-header-tools>.icon-button:hover:not(:disabled),.focus-round-menu>summary:hover{background:var(--surface);color:var(--ink)}
.focus-header-tools>.focus-bookmark[aria-pressed="true"]{background:var(--brand-soft);color:var(--brand)}
.focus-bookmark[aria-pressed="true"] .ic{fill:var(--brand-soft);stroke-width:1.8}
.focus-round-menu{position:static;flex:none;margin:0}
.focus-round-menu>summary{cursor:pointer;list-style:none}
.focus-round-menu>summary::-webkit-details-marker{display:none}
.focus-round-menu>summary::marker{content:''}
.focus-round-menu[open]>summary{background:var(--surface);color:var(--ink)}
.focus-round-popover{position:absolute;z-index:21;top:calc(100% - 4px);right:max(24px,env(safe-area-inset-right));display:grid;gap:3px;width:min(280px,calc(100vw - 32px));max-height:min(320px,calc(100dvh - 90px));overflow:auto;overscroll-behavior:contain;padding:7px;border:1px solid var(--line);border-radius:13px;background:var(--surface);box-shadow:0 12px 28px #00000018}
.focus-round-popover>button{display:flex;align-items:center;justify-content:flex-start;gap:10px;width:100%;min-width:0;min-height:44px;padding:11px 12px;border:0;border-radius:8px;background:transparent;color:var(--ink);font-size:13px;font-weight:500;line-height:1.5;text-align:left;white-space:normal;overflow-wrap:anywhere}
.focus-round-popover>button .ic{flex:none;width:17px;height:17px;color:var(--sub)}
.focus-round-popover>button:hover:not(:disabled){background:var(--brand-soft)}
.focus-round-popover>button:disabled{color:var(--sub);opacity:.5}
.focus-header-tools>.icon-button:focus-visible,.focus-round-menu>summary:focus-visible,.focus-round-popover>button:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.focus-answer-comparison{display:grid;gap:2px;min-width:0;scroll-margin-top:84px}
.focus-answer-read{min-width:0;border-left:2px solid var(--line);padding-left:14px}
.focus-answer-read>summary,.focus-answer-edit>summary{min-height:44px;padding:10px 0;cursor:pointer;font-size:13px;font-weight:500;line-height:1.7;color:var(--sub)}
.focus-answer-read>summary::marker{color:var(--sub);font-size:10px}
.focus-answer-read>p{margin:2px 0 14px;font-size:16px;line-height:1.7;color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere}
.focus-answer-edit{min-width:0}
.focus-answer-edit>summary{color:var(--brand);font-weight:400}
.focus-answer-edit>summary::marker{font-size:10px}
.focus-answer-edit>.focus-answer{margin:8px 0 14px}
.focus-answer-read>summary:focus-visible,.focus-answer-edit>summary:focus-visible{outline:2px solid var(--brand);outline-offset:3px;border-radius:4px}
.focus-solution{scroll-margin-top:84px}
.focus-solution:focus-visible{outline:2px solid var(--brand);outline-offset:6px;border-radius:4px}
.focus-schedule{min-height:0}
.focus-schedule>.focus-save-note{margin-top:10px}
.focus-schedule:empty{display:none}
@media(max-width:700px){
 .focus-position>small{max-width:135px}
 .focus-round-popover{right:max(14px,env(safe-area-inset-right))}
 .focus-answer-read{padding-left:12px}
 .focus-answer-read>p{font-size:16px;line-height:1.7}
 .focus-answer-comparison,.focus-solution{scroll-margin-top:76px}
}
@media(max-width:360px){
 .focus-header-tools{gap:0}
 .focus-position{font-size:11px}
 .focus-position>small{max-width:125px}
}
@media print{.focus-answer-edit{display:none}.focus-answer-read{border-left:0;padding-left:0}}
.focus-round-menu:not([open])>.focus-round-popover{display:none}
.focus-solution-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.focus-solution-heading>h2{margin:0}
.focus-solution-heading>.plain-link{display:flex;align-items:center;gap:4px;min-height:44px;color:var(--sub);font-size:12px;font-weight:400}
.focus-solution-heading>.plain-link>.ic{transform:rotate(-90deg)}
.focus-answer-read{scroll-margin-top:80px}
.focus-answer-comparison:focus{outline:none}
/* Reserve two short lines so choosing an exam grade does not move the controls. */
.focus-schedule:not(:empty){min-height:46px}
.focus-schedule>.focus-save-note{min-height:36px}

/* The catalog has one collection, one search and a quiet action row per card. */
.catalog-heading{margin-bottom:20px}
.catalog-heading .page-title{margin:0 0 8px}
.catalog-heading .page-description{margin:0}
.catalog-collections{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;max-width:540px;padding:4px;border:1px solid var(--line);border-radius:13px;background:var(--surface);margin-bottom:22px}
.catalog-collections>button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:44px;padding:9px 10px;border:0;border-radius:9px;background:transparent;color:var(--sub);font:inherit;font-size:14px;font-weight:500;white-space:nowrap;cursor:pointer}
.catalog-collections>button>.ic{flex:none}
.catalog-collections>button[aria-pressed="true"]{background:var(--brand-soft);color:var(--brand);font-weight:600}
.catalog-collections>button:hover:not(:disabled){color:var(--brand);background:var(--brand-soft)}
.catalog-collections>button:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.catalog-top-tools{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:0 0 16px}
.catalog-top-tools>.subject-picker{flex:1;max-width:300px;margin:0}
.catalog-create-actions{display:flex;flex:none;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.catalog-create-actions>.btn{min-height:48px;font-size:13px;font-weight:550}
.chapter-manager{width:min(640px,100%)}
.chapter-manager .field,.chapter-editor-field>.field{font-size:16px;min-height:46px;min-width:0;width:100%;max-width:100%;color:var(--ink);background:var(--surface);border-color:var(--line)}
.chapter-manager-subject,.chapter-create-form>label,.chapter-preset-list label{display:grid;gap:7px;color:var(--sub);font-size:12px;min-width:0}
.chapter-manager-subject{margin:18px 0;max-width:340px}
.chapter-create-form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px;margin:22px 0}
.chapter-create-form>.btn{min-height:46px}
.chapter-preset-list{list-style:none;padding:0;margin:0;display:grid;gap:0}
.chapter-preset-list>li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 0;border-top:1px solid var(--line);min-width:0}
.chapter-preset-list>li>form{width:100%;min-width:0}
.chapter-preset-name{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}
.chapter-preset-name>strong{font-size:14px;font-weight:550}
.chapter-preset-name>small,.chapter-preset-list form>p,.chapter-manager-note,.chapter-empty,.chapter-editor-field>small{font-size:12px;color:var(--sub);line-height:1.55;overflow-wrap:anywhere}
.chapter-row-actions{display:flex;flex-wrap:wrap;gap:7px;flex-shrink:0}
.chapter-row-actions>.btn{padding:8px 10px;font-size:12px;min-height:44px;font-weight:500}
.chapter-manager-note{margin:18px 0 0;padding-top:14px;border-top:1px solid var(--line)}
.chapter-editor-field{min-width:0;align-content:start}
.chapter-editor-field>.chapter-custom-label{margin-top:7px}
@media(min-width:1001px) and (max-width:1220px){.catalog-top-tools{flex-wrap:wrap}.catalog-create-actions{justify-content:flex-start}}
@media(max-width:600px){.chapter-preset-list>li{align-items:stretch;flex-direction:column}.chapter-row-actions{justify-content:flex-start}.chapter-manager-subject{max-width:none}.chapter-create-form{grid-template-columns:minmax(0,1fr)}.chapter-create-form>.btn{justify-self:start}.catalog-create-actions>.chapter-manage-button{grid-column:1/-1}}
.catalog-page>.catalog-toolbar{margin:0 0 2px}
.catalog-page .search-box{min-width:0;width:100%;border-color:var(--line);background:var(--surface)}
.catalog-page .search-box input{height:48px;font-size:16px}
.catalog-page>.catalog-filters{margin:0 0 12px;border:0;border-radius:0;background:transparent}
.catalog-filters>summary{display:list-item;min-height:44px;padding:10px 2px;font-size:13px}
.catalog-filters[open]>summary{margin:0 0 10px;border:0}
.catalog-filters>.filter-row{padding:0 0 12px}
.catalog-filters>.filter-row>label{color:var(--sub);font-weight:500}
.catalog-page>.catalog-results{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 14px}
.catalog-results>span{font-size:13px;color:var(--sub)}
.catalog-results>.btn{min-height:44px;font-size:12px;font-weight:500;padding:9px 12px}
.catalog-card-list{display:grid;gap:12px}
.catalog-card{min-width:0;padding:0;border-radius:14px;box-shadow:none}
.catalog-card-summary{display:block;list-style:none;min-height:44px;padding:18px 20px;border-radius:14px;cursor:pointer}
.catalog-card-summary::-webkit-details-marker{display:none}
.catalog-card-summary::marker{content:''}
.catalog-card-summary:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.catalog-card-summary:hover .catalog-disclosure-icon{color:var(--brand)}
.catalog-disclosure-icon{display:inline-flex;flex:none;align-self:center;margin-left:auto;color:var(--sub)}
.catalog-card[open]>.catalog-card-summary .catalog-disclosure-icon{transform:rotate(90deg)}
.catalog-card-content{min-width:0;padding:0 20px 18px}
.catalog-card-topic{margin:0 0 8px;color:var(--sub);font-size:12px;overflow-wrap:anywhere}
.catalog-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.catalog-card-heading>h2{min-width:0;margin:0;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;overflow-wrap:anywhere}
.catalog-card-heading>.status{flex:none;margin-top:3px;font-size:10px;font-weight:500}
.catalog-card-summary>.question-meta{margin-top:6px;gap:4px 12px;flex-wrap:nowrap}
.catalog-card-summary>.question-meta>span:first-child{min-width:0;overflow-wrap:anywhere}
.catalog-card-content>.card-meta-details{margin-top:3px}
.catalog-card-content>.card-meta-details>summary{min-height:44px;font-size:12px}
.catalog-card-content>.card-meta-details>p{color:var(--ink)}
.catalog-card-content>.card-meta-details>small{color:var(--sub);margin-bottom:14px}
.catalog-card-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;border-top:1px solid var(--line);padding-top:8px;margin-top:2px}
.catalog-collection-actions,.catalog-edit-actions{display:flex;align-items:center;gap:6px}
.catalog-card-actions .btn{flex:0 0 auto;min-width:0;min-height:44px;gap:6px;padding:9px 10px;border:0;border-radius:8px;color:var(--sub);font-size:12px;font-weight:500;white-space:nowrap;overflow-wrap:normal}
.catalog-card-actions .btn:not([aria-pressed="true"]){background:transparent}
.catalog-card-actions .favorite-toggle[aria-pressed="true"]{color:var(--hard);background:var(--hard-bg)}
.catalog-card-actions .btn:hover:not(:disabled){background:var(--brand-soft);color:var(--brand)}
.catalog-card-actions .btn>.ic{width:16px;height:16px;flex:none}
@media(max-width:700px){
 .catalog-heading{margin-bottom:16px}
 .catalog-collections{max-width:none;margin-bottom:18px}
 .catalog-collections>button{gap:6px;padding:9px 6px;font-size:13px}
 .catalog-top-tools{flex-direction:column;align-items:stretch;gap:12px}
 .catalog-top-tools>.subject-picker{max-width:none}
 .catalog-create-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .catalog-create-actions>.btn{min-width:0;min-height:44px;padding:10px 8px}
 .catalog-filters>.filter-row{grid-template-columns:minmax(0,1fr)}
 .catalog-card-summary{padding:15px 16px}
 .catalog-card-content{padding:0 16px 15px}
 .catalog-card-heading{flex-wrap:wrap;gap:8px}
 .catalog-card-heading>h2{flex-basis:100%;font-size:16px}
 .catalog-card-heading>.status{margin:0}
 .catalog-card-summary>.question-meta{font-size:11px}
 .catalog-card-content>.card-meta-details>summary{font-size:12px}
}
@media(max-width:480px){
 .catalog-card-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 8px}
 .catalog-collection-actions,.catalog-edit-actions{display:contents}
 .catalog-card-actions .btn{justify-content:flex-start;padding:9px 6px}
 .catalog-card-actions>.catalog-restore{grid-column:1/-1}
 .catalog-page>.catalog-results{gap:8px}
 .catalog-results>span{font-size:12px}
 .catalog-results>.btn{font-size:11px;padding:9px}
}
@media(max-width:360px){
 .catalog-collections>button{font-size:12px;gap:5px}
 .catalog-collections>button>.ic{width:15px;height:15px}
 .catalog-results>.btn{width:100%}
}
@media print{.catalog-collections,.catalog-top-tools,.catalog-filters,.catalog-results>.btn,.catalog-card-actions{display:none}.catalog-card{break-inside:avoid}}

/* Keep sorting visible with the result count, including on small phones. */
.catalog-page>.catalog-results{display:grid;grid-template-columns:minmax(0,1fr) auto auto}
.catalog-sort{display:flex;align-items:center;gap:8px;min-width:0;color:var(--sub);font-size:12px;font-weight:500}
.catalog-sort>span{flex:none}
.catalog-sort>select.field{width:185px;max-width:100%;min-width:0;min-height:44px;font-size:14px;padding:8px 28px 8px 10px;text-overflow:ellipsis;border-color:var(--line);background:var(--surface);color:var(--ink)}
@media(max-width:1000px){
 .catalog-page>.catalog-results{grid-template-columns:minmax(0,1fr) auto}
 .catalog-results>.btn{grid-column:2;grid-row:1}
 .catalog-sort{grid-column:1/-1;grid-row:2;justify-content:flex-end}
}
@media(max-width:700px){
 .catalog-sort>select.field{flex:1;width:auto;max-width:280px;font-size:16px}
 .catalog-sort{justify-content:space-between}
}
@media(max-width:360px){
 .catalog-results>.btn{grid-column:1/-1;grid-row:3}
}
@media print{.catalog-sort{display:none}}

/* Phone and foldable browser layouts. Layout changes never rebuild a learning round. */
:root{
 --safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);
 --safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);
 --page-gutter:32px;--focus-gutter:24px;
}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.side{height:100dvh;padding-top:calc(25px + var(--safe-top));padding-left:max(17px,var(--safe-left))}
.topbar{padding-top:calc(13px + var(--safe-top));padding-right:max(30px,var(--safe-right))}
.body-content{padding-left:max(var(--page-gutter),var(--safe-left));padding-right:max(var(--page-gutter),var(--safe-right))}
.focus-session-bar{padding-top:calc(12px + var(--safe-top))}
.focus-stage{padding-left:max(var(--focus-gutter),var(--safe-left));padding-right:max(var(--focus-gutter),var(--safe-right))}
.focus-answer,.focus-answer-comparison,.focus-solution{scroll-margin-top:calc(84px + var(--safe-top))}
.focus-study:has(.answer-input:focus){min-height:var(--visible-viewport-height,100dvh)}
.focus-study:has(.answer-input:focus) .focus-actions{position:static}
.focus-round-popover{max-height:min(320px,calc(100dvh - 90px - var(--safe-top) - var(--safe-bottom)))}
.modal-shade{
 top:var(--visible-viewport-top,0px);bottom:auto;height:100vh;height:var(--visible-viewport-height,100dvh);
 padding:max(10px,var(--safe-top)) max(10px,var(--safe-right)) max(10px,var(--safe-bottom)) max(10px,var(--safe-left));
}
.modal{max-height:100%;min-height:0;max-width:100%}
.modal-top .icon-button,.question-search-button{width:44px;min-width:44px;min-height:44px}
.rich-editor{max-height:max(150px,calc(var(--visible-viewport-height,100dvh) * .5));overscroll-behavior:contain}
.login-page{padding-top:max(20px,var(--safe-top));padding-left:max(14px,var(--safe-left));padding-right:max(14px,var(--safe-right));padding-bottom:max(20px,var(--safe-bottom))}
@media(min-width:720px){.focus-assessment-options{grid-template-columns:repeat(4,minmax(0,1fr))}.is-favorite .focus-assessment-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1000px){
 :root{--page-gutter:24px}
 .shell{display:block;min-height:100svh}
 .side,.side.open,.mobile-menu,.overlay,.overlay.open{display:none!important}
 .main{min-height:100svh;padding-bottom:calc(var(--bottom-nav-height) + var(--phone-safe-bottom))}
 .topbar{min-height:68px;flex-direction:row;align-items:center;gap:8px;padding:calc(13px + var(--safe-top)) max(19px,var(--safe-right)) 13px max(19px,var(--safe-left))}
 .bottom-nav{position:fixed;z-index:35;left:0;right:0;bottom:0;height:calc(var(--bottom-nav-height) + var(--phone-safe-bottom));padding:7px max(8px,var(--safe-right)) calc(7px + var(--phone-safe-bottom)) max(8px,var(--safe-left));display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;background:var(--surface);border-top:1px solid var(--line)}
 .bottom-nav-button{min-width:0;min-height:54px;border:0;border-radius:10px;background:transparent;color:var(--sub);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:6px 2px;font-size:11px;line-height:1.15;text-align:center;overflow-wrap:anywhere}
 .bottom-nav-button .ic{width:20px;height:20px;flex:none}
 .bottom-nav-button.is-active{background:var(--brand-soft);color:var(--brand);font-weight:550}
 .bottom-nav-button:focus-visible{outline:3px solid var(--brand);outline-offset:-3px}
 .learning-menu-popover{left:max(12px,var(--safe-left));right:max(12px,var(--safe-right));max-height:calc(var(--visible-viewport-height,100dvh) - var(--bottom-nav-height) - var(--phone-safe-bottom) - var(--safe-top) - 35px)}
 .learning-menu-heading .icon-button{width:44px;min-width:44px;min-height:44px}
 .toast{left:max(16px,var(--safe-left));right:max(16px,var(--safe-right));bottom:calc(var(--bottom-nav-height) + var(--phone-safe-bottom) + 12px);max-width:none}
 .format-tool,.format-menu{width:44px;min-width:44px;height:44px;min-height:44px}
}
@media(min-width:701px) and (max-width:1000px) and (min-height:701px){.study-actions{bottom:calc(var(--bottom-nav-height) + var(--phone-safe-bottom) + 8px)}}
@media(max-width:700px){
 :root{--page-gutter:19px;--focus-gutter:20px}
 .focus-session-bar{padding-top:calc(8px + var(--safe-top))}
 .focus-answer,.focus-answer-comparison,.focus-solution{scroll-margin-top:calc(76px + var(--safe-top))}
}
@media(max-width:360px){:root{--page-gutter:15px;--focus-gutter:18px}}
@media print{.bottom-nav{display:none!important}.main{padding-bottom:0}}

/* A quiet history cue, independent of the last rating and of the SRS. */
.recall-tint{
 --recall-rgb:100,116,139;--recall-wash:0;--recall-edge:0;--recall-base:var(--surface);
 background:linear-gradient(120deg,rgba(var(--recall-rgb),var(--recall-wash)),transparent 100%),var(--recall-base);
 box-shadow:inset 3px 0 rgba(var(--recall-rgb),var(--recall-edge));
}
.recall-tint-hard,.recall-tint-partial,.recall-tint-review,.recall-tint-easy{--recall-wash:.09;--recall-edge:.5}
.recall-tint-hard{--recall-rgb:190,59,73}
.recall-tint-partial{--recall-rgb:184,109,40}
.recall-tint-review{--recall-rgb:166,137,35}
.recall-tint-easy{--recall-rgb:35,137,98}
.learning-tone{display:flex;align-items:baseline;gap:8px;margin:10px 0;color:var(--sub);font-size:12px;line-height:1.5;font-weight:400;overflow-wrap:anywhere}
.learning-tone-dot{flex:none;width:6px;height:6px;align-self:center;border-radius:50%;background:rgb(var(--recall-rgb))}
.learning-tone-count{white-space:nowrap}
.catalog-card-content .learning-tone{margin:9px 0 2px}
.focus-study-card.recall-tint{--recall-base:var(--bg);margin:8px 0 18px;padding-left:20px;padding-right:20px;border-radius:16px}
.focus-study-card>.learning-tone{justify-content:center;margin:0;font-size:12px}
.focus-study-card.is-revealed>.learning-tone{justify-content:flex-start}
@media(max-width:700px){.focus-study-card.recall-tint{padding-left:16px;padding-right:16px}}
@media(prefers-color-scheme:light){.recall-tint{--sub:#52627a}}
@media(prefers-color-scheme:dark){
 .recall-tint:not(.recall-tint-new){--recall-wash:.13;--recall-edge:.65}
 .recall-tint-hard{--recall-rgb:224,117,128}
 .recall-tint-partial{--recall-rgb:228,167,104}
 .recall-tint-review{--recall-rgb:221,201,113}
 .recall-tint-easy{--recall-rgb:112,202,164}
}
@media(forced-colors:active){.recall-tint{background:Canvas;box-shadow:none}.learning-tone{color:CanvasText}.learning-tone-dot{background:CanvasText}}
@media print{.recall-tint{background:none;box-shadow:none}}

.learning-cue{width:100%;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:4px 14px;flex-wrap:wrap;margin:6px 0}
.learning-cue>.learning-tone{margin:0}
.priority-control{position:relative;font-size:12px;color:var(--sub);max-width:100%}
.priority-control>summary{display:flex;align-items:center;gap:6px;min-height:44px;cursor:pointer;list-style:none;border-radius:7px;padding:4px 6px}
.priority-control>summary::-webkit-details-marker{display:none}
.priority-control>summary:hover{background:var(--brand-soft);color:var(--ink)}
.priority-control>summary:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.priority-control[open]{flex-basis:100%;width:100%}
.priority-options{display:grid;gap:8px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);text-align:left;color:var(--ink)}
.priority-options>p{margin:0 0 3px;font-weight:600}
.priority-option{display:grid;gap:4px;width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:transparent;text-align:left;font:inherit;cursor:pointer}
.priority-option>strong{font-size:14px;font-weight:550}
.priority-option>span,.priority-options>small{color:var(--sub);font-size:12px;line-height:1.55}
.priority-option[aria-pressed="true"]{border-color:var(--brand);background:var(--brand-soft)}
.priority-intensive>strong{color:#a13442}.priority-secure>strong{color:#17745a}
.priority-option:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.priority-option:disabled{opacity:.6;cursor:default}
.focus-study-card>.learning-cue{justify-content:center;margin:0}
.focus-study-card.is-revealed>.learning-cue{justify-content:space-between}
.recall-tint-hard:has(.priority-intensive[aria-pressed="true"]){--recall-wash:.14;--recall-edge:.8}
.recall-tint-easy:has(.priority-secure[aria-pressed="true"]){--recall-wash:.13;--recall-edge:.8}
@media(prefers-color-scheme:dark){.priority-intensive>strong{color:#f0a7b0}.priority-secure>strong{color:#91d9bb}.recall-tint-hard:has(.priority-intensive[aria-pressed="true"]){--recall-wash:.18}.recall-tint-easy:has(.priority-secure[aria-pressed="true"]){--recall-wash:.16}}
@media print{.priority-control{display:none}}
