/* A focused directory; shared course, worksheet and account pages keep their styles. */
body.math-directory{--bg:#fafbfe;--text:#1e293b;--text-muted:#647087;--line:#e0e5ee;--soft:#eff2fb;--accent:#4b5fa9;background:var(--bg);font-weight:500}
.math-directory .math-directory-shell{max-width:1160px;padding:22px 28px 40px;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:28px}
.math-directory [hidden]{display:none!important}
.math-directory .math-language-switcher{grid-row:1;grid-column:1;justify-content:flex-start;margin:0;gap:4px;font-size:12px;align-self:center}
.math-directory .math-language-switcher .math-language-label{font-weight:500;margin-inline-end:8px}
.math-directory .math-language-switcher a{background:transparent;border-color:transparent;border-radius:5px;padding:5px 9px;min-height:32px;color:#5b667e}
.math-directory .math-language-switcher a[aria-current=page]{background:#e9edf9;border-color:transparent;color:#40518d;font-weight:750}
.math-directory-account{grid-row:1;grid-column:2;justify-self:end;align-self:center;min-width:0}
.math-directory .math-directory-account .authbtn{box-shadow:none;border-color:transparent;background:transparent;padding:6px 0;font-size:12px}
.math-directory-header{grid-row:2;grid-column:1/-1;padding:32px 0 24px}
.math-directory .math-directory-header h1{font-family:var(--body);font-size:clamp(31px,3.5vw,44px);line-height:1.15;letter-spacing:-.045em;font-weight:850;margin:0 0 11px;color:var(--text)}
.math-directory .math-directory-header .tagline{font-size:16px;line-height:1.6;font-weight:500;color:#607088;margin:0}
.math-directory .mathsearch{grid-row:3;grid-column:1;display:flex;align-items:center;gap:12px;border:1px solid #d9dfeb;border-radius:9px;background:#fff;box-shadow:0 2px 5px #152b4010;padding:0 15px;margin:0;min-height:50px;max-width:none}
.math-directory .mathsearch:focus-within{outline:3px solid #4b5fa926;outline-offset:2px;border-color:var(--accent)}
.math-directory .mathsearch>svg{flex:none;color:#718097}
.math-directory .mathsearch input{min-width:0;width:100%;font:500 15px/1.5 var(--body);color:var(--text);padding:13px 0;outline:0;border:0;background:transparent;box-shadow:none}
.math-directory .mathsearch input::placeholder{color:#778398;opacity:1}
.math-directory #msclear{display:grid;place-items:center;flex:none;min-width:30px;min-height:32px;background:none;border:0;border-radius:4px;color:#607088;font:24px/1 var(--body);cursor:pointer}
.math-directory .math-view-controls{grid-row:3;grid-column:2;align-self:center;justify-self:end;margin:0;font-size:12px;gap:8px}
.math-directory .math-compact-label{font-weight:600;min-height:44px;color:#56647b}
.math-directory .math-view-hint,.math-directory .math-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;padding:0;border:0}
.math-directory-jumps{grid-row:4;grid-column:1/-1;display:flex;align-items:center;gap:26px;margin:15px 0 0;padding:0 0 21px;border-bottom:1px solid var(--line)}
.math-directory-jumps a{display:inline-flex;align-items:center;gap:9px;min-height:38px;font-size:13px;font-weight:700;color:#455571;text-decoration:none}
.math-directory-jumps a:hover{color:var(--accent);text-decoration:underline;text-underline-offset:5px}
.math-directory-jumps a>span{font-size:15px;color:#8d98b0}
.math-directory-jumps .math-map-jump{margin-inline-start:auto;color:var(--accent)}
.math-directory #kidbar{grid-row:5;grid-column:1/-1;box-shadow:none;background:#f0f3fa;border:0;border-radius:6px;margin:16px 0 0;padding:10px 14px}
.math-directory #noresults{grid-column:1/-1;grid-row:6;padding:28px 0;font-size:16px;color:var(--text-muted)}
.math-directory-grades{grid-column:1/-1;grid-row:7;min-width:0;scroll-margin-top:24px;padding-top:30px}
.math-directory-topics{grid-column:1/-1;grid-row:8;min-width:0;scroll-margin-top:24px;padding-top:34px;margin-top:30px;border-top:1px solid var(--line)}
.math-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:22px}
.math-directory .math-section-heading h2{font:800 25px/1.25 var(--body);letter-spacing:-.025em;margin:0 0 6px;color:var(--text)}
.math-directory .math-section-heading p{font-size:13px;line-height:1.6;color:var(--text-muted);font-weight:500;max-width:720px;margin:0}
.math-grade-group{display:grid;grid-template-columns:120px minmax(0,1fr);gap:22px;padding:0 0 22px;margin:0 0 22px;border-bottom:1px solid #e8ecf3;min-width:0}
.math-grade-group:last-child{border-bottom:0;padding-bottom:0;margin-bottom:0}
.math-directory .math-grade-group>.kicker{font:700 13px/1.5 var(--body);letter-spacing:0;text-transform:none;margin:0;padding-top:14px;color:#586680}
.math-directory .mathgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:0;align-items:stretch}
.math-directory .mathgrid .mcard{display:flex;flex-direction:column;gap:0;min-width:0;min-height:0;margin:0;padding:14px 14px 11px;border:1px solid #e1e6ef;border-radius:8px;background:#fff;box-shadow:none;text-decoration:none;transform:none;transition:border-color .15s,background-color .15s}
.math-directory .mathgrid .mcard:hover{border-color:#a8b4d6;background:#fcfcff;box-shadow:none;transform:none}
.math-directory .mathgrid .mcard .n{font:750 14px/1.4 var(--body);color:#2b3850;margin:0 0 12px;letter-spacing:-.015em}
.math-directory .mathgrid .mcard .meta{display:flex;align-items:center;justify-content:space-between;gap:5px;margin:12px 0 0;font:500 11px/1.5 var(--body);color:#738098}
.math-directory .math-card-arrow{font-size:16px;color:#96a0b6}
.math-directory .math-course-thumbnail{height:100px;min-height:100px;border:0;background:#f5f7fc;border-radius:4px;margin-top:auto;box-shadow:none}
.math-directory .math-course-thumbnail img{height:100px;width:100%;object-fit:contain}
.math-directory .mathgrid .em-picture{min-height:100px;border:0;border-radius:4px;background:#f5f7fc;margin-top:auto;padding:8px}
.math-directory .mathgrid .em-preview{margin:0}
.math-directory.math-compact .mathgrid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.math-directory.math-compact .mathgrid .mcard{display:flex;padding:13px 14px;min-height:68px}
.math-directory.math-compact .mathgrid .mcard .n{font-size:14px;margin:0}
.math-directory.math-compact .mathgrid .mcard .meta{margin-top:auto;padding-top:5px}
.math-directory.math-compact .mathgrid .em-picture{display:none}
.math-topic-filter{flex:none;min-width:180px;max-width:280px}
.math-directory #math-category{width:100%;min-height:40px;padding:9px 32px 9px 12px;border:1px solid #d8dfeb;border-radius:6px;background:#fff;color:#4e5d75;font:600 12px/1.5 var(--body);cursor:pointer}
.math-directory .math-topic-group{margin:0 0 27px;min-width:0}
.math-directory .math-topic-group>.kicker{font:700 12px/1.5 var(--body);letter-spacing:.025em;text-transform:none;color:#6a7890;margin:0 0 10px}
.math-directory .topicgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0;align-items:start}
.math-directory .topicgrid>.topicrow{display:grid;grid-template-columns:64px minmax(0,1fr);gap:17px;min-width:0;padding:17px 18px;border:1px solid #e0e5ef;border-radius:8px;background:#fff;box-shadow:none}
.math-directory .topic-preview{width:64px;aspect-ratio:20/27;border-radius:4px;border-color:#e1e6ef;box-shadow:none;margin:0}
.math-directory .topic-card-content{display:block;min-width:0}
.math-directory .topicgrid .topic-title{font:750 16px/1.4 var(--body);margin:1px 0 5px;letter-spacing:-.02em;min-width:0}
.math-directory .topic-title a{color:#2c3d59;text-decoration:none}
.math-directory .topic-title a:hover{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.math-topic-levels{font-size:11px;line-height:1.6;font-weight:500;color:#7a879d;margin:0 0 3px}
.math-directory .topicfold{margin:6px 0 0}
.math-directory .topicfold>summary{display:inline-flex;flex-wrap:wrap;align-items:center;gap:5px;padding:7px 0;min-height:34px;font:650 12px/1.5 var(--body);color:var(--accent);border:0;border-radius:3px;background:none;box-shadow:none;transform:none;filter:none;cursor:pointer}
.math-directory .topicfold>summary:hover{text-decoration:underline;text-underline-offset:3px;background:none;box-shadow:none;transform:none;filter:none}
.math-directory .topicfold>summary .fchev{border-left-width:4px;border-top-width:4px;border-bottom-width:4px;margin-inline-end:3px}
.math-directory .topicfold>.levels{padding:16px 0 0;margin-top:6px;border-top:1px solid #e5e9f1;gap:18px}
.math-directory .topicfold .level{display:block;margin:0}
.math-directory .level-name{font:750 11px/1.5 var(--body);letter-spacing:0;text-transform:none;margin:0 0 9px;display:flex}
.math-directory .level-sheets{min-width:0;gap:8px}
.math-directory .sheet{min-width:0;gap:4px 8px;align-items:flex-start}
.math-directory .sheet-num{font:600 11px/1.4 var(--body);padding:7px 0;color:#7b879a}
.math-directory .level-files{display:flex;min-width:0;gap:6px;flex-wrap:wrap}
.math-directory .dl{font:650 11px/1.5 var(--body);border:1px solid #e2e7f2;border-radius:4px;box-shadow:none;background:#f3f5fb;color:#485b91;padding:6px 8px;white-space:normal;max-width:100%}
.math-directory .dl.guide{background:#fff;color:#677690;border-color:#e2e7f2}
.math-directory .dl>span[aria-hidden=true]{display:none}
.math-directory.math-compact .topicgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.math-directory.math-compact .topicgrid>.topicrow{display:block;padding:14px 17px;min-height:96px}
.math-directory .resource-note{font-size:12px;line-height:1.7;color:var(--text-muted);margin:20px 0 0}
.math-directory .math-directory-attribution{grid-column:1/-1;grid-row:9;border:0;border-top:1px solid var(--line);background:none;border-radius:0;box-shadow:none;padding:22px 0;margin:34px 0 0}
.math-directory .math-directory-attribution .attrib{font:500 11px/1.8 var(--body);color:#7a8497;max-width:900px}
.math-directory .math-directory-shell>footer{grid-column:1/-1;grid-row:10;margin-top:0}
.math-directory :is(a,button,summary,select):focus-visible{outline:3px solid #596fb9;outline-offset:3px}
@media(max-width:980px){
 .math-directory .math-directory-shell{padding-inline:24px;column-gap:20px}
 .math-grade-group{grid-template-columns:105px minmax(0,1fr);gap:17px}
 .math-directory .mathgrid,.math-directory.math-compact .mathgrid{grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}
 .math-directory .math-section-heading p{max-width:580px}
}
@media(max-width:700px){
 .math-directory .np-site-nav{overflow-x:auto;max-width:100%;padding-bottom:2px}
 .math-directory .np-site-links{width:max-content;min-width:100%;flex-wrap:nowrap}
 .math-directory .np-site-link{font-size:12px;padding-inline:5px;white-space:nowrap}
 .math-directory .math-directory-shell{padding:17px 20px 30px;column-gap:12px}
 .math-directory .math-language-switcher .math-language-label{display:none}
 .math-directory .math-language-switcher a{padding:5px 7px;font-size:11px}
 .math-directory-header{padding:27px 0 20px}
 .math-directory .math-directory-header h1{font-size:32px;letter-spacing:-.04em}
 .math-directory .math-directory-header .tagline{font-size:14px}
 .math-directory .mathsearch{grid-column:1/-1;min-height:48px}
 .math-directory .math-view-controls{grid-row:4;grid-column:1/-1;justify-self:start;margin-top:5px}
 .math-directory-jumps{grid-row:5;gap:18px;padding-bottom:14px;margin-top:0;flex-wrap:wrap}
 .math-directory-jumps a{font-size:12px;gap:5px}
 .math-directory #kidbar{grid-row:6}
 .math-directory #noresults{grid-row:7}
 .math-directory-grades{grid-row:8;padding-top:24px}
 .math-directory-topics{grid-row:9;padding-top:26px;margin-top:26px}
 .math-directory .math-directory-attribution{grid-row:10}
 .math-directory .math-directory-shell>footer{grid-row:11}
 .math-section-heading{gap:15px;flex-wrap:wrap;margin-bottom:20px}
 .math-directory .math-section-heading h2{font-size:23px}
 .math-directory .math-section-heading p{font-size:12px}
 .math-grade-group{display:block;padding-bottom:20px;margin-bottom:20px}
 .math-directory .math-grade-group>.kicker{padding:0;margin-bottom:10px;font-size:12px}
 .math-directory .mathgrid,.math-directory.math-compact .mathgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .math-directory .topicgrid,.math-directory.math-compact .topicgrid{grid-template-columns:1fr}
 .math-directory .math-topic-filter{width:100%;max-width:none}
 .math-directory #math-category{font-size:13px;min-height:44px}
 .math-directory .topicgrid>.topicrow{gap:16px}
 .math-directory .topicfold>summary{min-height:40px}
}
@media(max-width:380px){
 .math-directory .math-directory-shell{padding-inline:15px}
 .math-directory .math-directory-account .authbtn{font-size:10px;gap:3px}
 .math-directory .math-language-switcher{gap:1px}
 .math-directory .math-language-switcher a{padding-inline:5px}
 .math-directory-jumps{gap:12px}
 .math-directory-jumps .math-map-jump{margin-inline-start:0}
 .math-directory .mathgrid .mcard{padding:11px}
}
@media print{
 .math-directory .math-directory-shell{display:block;padding:0;max-width:none}
 .math-directory .math-language-switcher,.math-directory .math-directory-account,.math-directory .math-view-controls,.math-directory .mathsearch,.math-directory-jumps,.math-topic-filter,#kidbar{display:none!important}
 .math-directory-header{padding:0 0 15px}
 .math-directory .math-directory-header h1{font-size:26pt}
 .math-directory .math-grade-group{break-inside:avoid}
 .math-directory .mathgrid{grid-template-columns:repeat(4,minmax(0,1fr))}
 .math-directory .topicgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .math-directory .topicrow{break-inside:avoid}
}

.math-directory .mathgrid .em-equation{font-size:17px;letter-spacing:0;white-space:nowrap}
