.math-directory,.math-grade-modules{display:grid;gap:48px}.math-directory h2,.math-grade-module h2{margin:0 0 12px;font-size:26px;line-height:1.4;letter-spacing:-.02em}.math-section-intro{max-width:72ch;margin:0 0 24px;font-size:16px;line-height:1.8}.math-grade-grid,.math-module-links{margin:0;padding:0;list-style:none}.math-grade-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.math-grade-grid li{min-width:0}.math-grade-card{display:flex;flex-direction:column;align-items:flex-start;gap:16px;height:100%;padding:24px;border:1px solid var(--math-line);border-radius:14px;background:var(--white);text-decoration:none;transition:background var(--motion-fast, .16s),border-color var(--motion-fast, .16s)}.math-grade-card h3{margin:0;color:var(--math-accent);font-size:24px;line-height:1.4}.math-grade-card p{flex:1;margin:0;font-size:15px;line-height:1.8;color:var(--ink)}.math-grade-action{display:inline-flex;align-items:center;gap:12px;min-height:44px;padding:8px 16px;border-radius:8px;background:var(--math-soft);color:var(--math-accent);font-size:14px;font-weight:650}.math-grade-card:hover{border-color:var(--math-accent);background:var(--math-soft)}.math-grade-card:hover .math-grade-action{background:var(--math-accent);color:var(--white)}.math-scope{max-width:76ch;margin:24px 0 0;font-size:14px;line-height:1.8;color:var(--ink)}.math-function-directory{padding-top:32px;border-top:1px solid var(--line)}.math-module-links{border:1px solid var(--math-line);border-radius:14px;background:var(--white)}.math-module-links li+li{border-top:1px solid var(--line)}.math-module-links a{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:88px;padding:20px 24px;border-radius:12px;text-decoration:none}.math-module-links a:hover{background:var(--math-soft)}.math-module-copy{min-width:0}.math-module-copy h3{margin:0 0 6px;font-size:19px;line-height:1.5}.math-module-copy>span{display:block;max-width:72ch;font-size:14px;line-height:1.8}.math-module-action{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;gap:12px;min-height:44px;padding:8px 12px;border:1px solid var(--math-line);border-radius:8px;color:var(--math-accent);font-size:14px;font-weight:650}.math-module-action svg,.math-grade-action svg{flex-shrink:0}.math-grade-switcher{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:24px}.math-grade-switcher a,.math-module-nav a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 16px;border:1px solid var(--math-line);border-radius:8px;background:var(--white);color:var(--math-accent);font-size:15px;font-weight:650;text-decoration:none}.math-grade-switcher a[aria-current=page]{background:var(--math-accent);border-color:var(--math-accent);color:var(--white)}.math-grade-switcher a:hover{border-color:var(--math-accent)}.math-module-nav{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:40px;padding-bottom:24px;border-bottom:1px solid var(--line)}.math-module-nav a{gap:8px;border-color:transparent;background:var(--math-soft);font-size:14px}.math-module-nav a:hover{border-color:var(--math-accent)}.math-grade-module{scroll-margin-top:32px}.math-grade-module:target h2{text-decoration:underline;text-decoration-color:var(--math-line);text-underline-offset:8px}:is(.math-directory,.math-grade-page) a:focus-visible{outline:3px solid var(--focus-ring, var(--focus));outline-offset:4px}@media(max-width:900px){.math-grade-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.math-directory,.math-grade-modules{gap:40px}.math-grade-grid{grid-template-columns:minmax(0,1fr);gap:12px}.math-grade-card{gap:12px;padding:20px}.math-grade-card h3{font-size:22px}.math-grade-card p{font-size:14px}.math-module-links a{align-items:flex-start;flex-direction:column;gap:12px;padding:20px}.math-grade-switcher{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.math-grade-switcher>a:first-child{grid-column:1 / -1;justify-self:start}.math-grade-switcher a{padding:8px}.math-module-nav{margin-bottom:32px}.math-directory h2,.math-grade-module h2{font-size:23px}}@media(prefers-reduced-motion:reduce){.math-grade-card{transition:none}}
