* {
  box-sizing: border-box;
}
html {
  color-scheme: light;
  background: var(--math-paper);
}
body {
  margin: 0;
  color: var(--math-ink);
  font-family: var(--math-font);
  line-height: 1.45;
  word-break: keep-all;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  touch-action: manipulation;
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #12765d;
  outline-offset: 3px;
}
button:active {
  transform: translateY(1px);
}
main {
  max-width: 1536px;
  margin: auto;
  padding: 0 clamp(13px, 4.45vw, 68px);
}
h1,
h2,
h3,
p {
  margin: 0;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: clamp(64px, 5.7vw, 88px);
  padding: 12px 0;
  border-bottom: 1px solid #dadfd3;
  flex-wrap: wrap;
}
.brand,
.menu button,
.back,
.quick {
  border: 0;
  background: transparent;
}
button.brand {
  font-size: clamp(22px, 2.3vw, 36px);
  padding: 8px 0;
}
.menu {
  display: flex;
  gap: 3px;
  align-items: center;
  flex-wrap: wrap;
}
.menu button,
.back {
  border-radius: 24px;
  min-height: 44px;
  padding: 8px clamp(10px, 1.8vw, 28px);
  font-size: clamp(15px, 1.7vw, 26px);
  font-weight: 700;
}
.menu button.active {
  background: #e3eee4;
  color: #145d4b;
}
.classroom-home {
  position: relative;
  isolation: isolate;
  min-height: min(61vw, 937px);
  padding: 0 clamp(0px, 1.6vw, 25px) clamp(84px, 8vw, 123px);
}
.classroom-art {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: calc(-1 * clamp(64px, 5.7vw, 88px));
  left: calc(-1 * clamp(13px, 4.45vw, 68px));
  width: calc(100% + 2 * clamp(13px, 4.45vw, 68px));
  height: auto;
}
header {
  position: relative;
  z-index: 1;
  background: #faf6f0;
  box-shadow: 0 0 0 100vmax #faf6f0;
  clip-path: inset(0 -100vmax);
}
.hero {
  display: grid;
  align-content: start;
  padding-top: clamp(20px, 1.5vw, 24px);
  min-height: min(20.4vw, 314px);
  gap: clamp(17px, 2.3vw, 36px);
  margin-left: 43%;
}
.hero h1, .results h1 {
  font-size: clamp(28px, 3.4vw, 53px);
  line-height: 1.18;
  letter-spacing: -0.06em;
  text-wrap: balance;
}
.hero-intro {padding-inline-start: 4%;}
.hero-tools {display: flex; align-items: stretch; gap: clamp(12px, 2vw, 32px);}
.hero-tools .search {flex: 1;}
.home-note {
  width: fit-content;
  max-width: 100%;
  margin: 16px auto 0;
  padding: 5px 14px;
  background: #fffaf2f2;
  border-radius: 12px;
  font-size: 15px;
  color: #41574b;
}
.home-note p {margin: 0;}
.search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1.5px solid #a2b8aa;
  border-radius: 15px;
  padding: 4px 4px 4px 13px;
  min-width: 0;
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #223c32;
  font-size: clamp(16px, 1.45vw, 22px);
  outline: 0;
}
.search:focus-within {
  box-shadow: 0 0 0 2px #95cbb4;
}
.search button {
  border: 0;
  border-radius: 10px;
  background: #1c6654;
  color: white;
  padding: 9px 14px;
  min-height: clamp(44px, 3.4vw, 52px);
  font-size: clamp(16px, 1.45vw, 22px);
  font-weight: 750;
}
.glass {
  width: 16px;
  height: 16px;
  border: 2px solid #527269;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  margin-right: 3px;
  flex: none;
}
.glass:after {
  content: "";
  width: 7px;
  height: 2px;
  background: #527269;
  position: absolute;
  right: -5px;
  bottom: -2px;
  transform: rotate(45deg);
}
.grades {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 22px);
}
.grade,
.family,
.qcard {
  border: 1px solid #ced7c8;
  border-radius: var(--math-radius);
  background: #fff;
  min-width: 0;
}
.grade {
  overflow: clip;
  padding: 0 clamp(9px, 1.2vw, 18px) clamp(10px, 1.2vw, 18px);
  border-color: var(--edge);
  border-top: clamp(4px, 0.45vw, 7px) solid var(--tone);
  box-shadow: 0 4px 8px #1538290b;
}
.gradeHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: clamp(78px, 8.6vw, 132px);
}
.grade h2 {
  font-size: clamp(24px, 3.15vw, 49px);
  letter-spacing: -0.065em;
  white-space: nowrap;
}
.gradeHead img {
  width: 65%;
  height: auto;
  margin-right: clamp(-18px, -1vw, -9px);
}
.sems {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(5px, 0.8vw, 12px);
  margin-top: clamp(5px, 1vw, 16px);
}
.sems button {
  background: var(--wash);
  border: 1px solid var(--edge);
  border-radius: 14px;
  min-height: clamp(44px, 3.6vw, 56px);
  font-size: clamp(16px, 1.62vw, 25px);
  font-weight: 780;
  position: relative;
}
.sems span {
  position: absolute;
  right: 10%;
  font-weight: 500;
}
.hero-tools > .math-share-button {
  min-height: clamp(48px, 4vw, 62px);
  padding-inline: clamp(10px, 2vw, 32px);
  font-size: clamp(15px, 1.55vw, 24px);
  gap: 12px;
}
.hero-tools > .math-share-button::before {
  content: "";
  width: 1.5em;
  aspect-ratio: 1;
  background: url("assets/math-step/qr-icon.webp") center / contain no-repeat;
}
.hero[data-mode="0"] h1 {
  position: relative;
  width: fit-content;
  text-align: center;
}
.hero-lead { display: block;font-size: clamp(19px, 2.16vw, 33px);letter-spacing: -.04em; }
.hero h1 strong {display: block;font-size: clamp(39px, 5.9vw, 91px);line-height: 1.12;white-space: nowrap;}
.hero[data-mode="0"] h1::before {content:"";position:absolute;right:101%;top:-.2em;width:1.1em;aspect-ratio:1;background:url("assets/math-step/rays.webp") center/contain no-repeat;}
.hero[data-mode="0"] h1::after {
  content: "";
  position: absolute;
  bottom: -0.20em;
  left: 36%;
  width: 52%;
  height: 0.36em;
  background: url("assets/math-step/underline-green.webp") center / 100% 100%
    no-repeat;
}
.activity-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.activity-actions :is(.row, .qcard) {
  width: 100%;
  min-width: 0;
}
.sems button:hover {
  border-color: #1b6b56;
  background: #e1efe3;
}
.families {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.family {
  padding: 14px 16px 16px;
}
.familyTop {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.familyTop img {
  width: 56px;
  height: auto;
}
.family h2 {
  font-size: 21px;
  letter-spacing: -0.045em;
}
.chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  border: 1px solid #ccd5c8;
  color: #33483f;
  background: white;
  padding: 7px 12px;
  min-height: 42px;
  font-weight: 650;
  border-radius: 22px;
}
.chip.active {
  border-color: #1d6554;
  color: white;
  background: #1d6554;
}
.questions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}
.qcard {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 13px;
  min-height: 88px;
}
.qcard:hover,
.row:hover,
.chip:hover {
  border-color: #489179;
}
.qcard img {
  height: auto;
  width: 58px;
  flex: none;
  background: #f5f3e7;
  border-radius: 12px;
}
.qcard b {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.045em;
  display: block;
}
.qcard small,
.row small,
.meta {
  font-size: 14px;
  color: #52695f;
}
.results {
  padding-top: 13px;
}
.back {
  border: 1px solid #c7d4c8;
  border-radius: 10px;
  min-height: 44px;
  background: #fff;
  font-size: 15px;
}
.resultsTop {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.results h1 {
  font-size: clamp(25px, 4vw, 36px);
  margin: 14px 0 8px;
}
.results .chips {
  margin: 12px 0;
}
.meta {
  margin: 12px 0 7px;
}
.rows {
  display: grid;
  gap: 7px;
}
.row {
  padding: 11px 14px;
  display: grid;
  grid-template-columns: 47px minmax(0, 1fr) auto;
  gap: 12px;
  text-align: left;
  align-items: center;
  background: white;
  border: 1px solid #d3d9ce;
  border-radius: 14px;
}
.row strong {
  display: block;
  color: #233f35;
  font-size: clamp(17px, 2.4vw, 21px);
  letter-spacing: -0.045em;
}
.row img {
  height: auto;
  width: 48px;
  background: #f4f3e9;
  border-radius: 8px;
}
.row .open {
  color: #225f4d;
  font-size: 14px;
  font-weight: 750;
}
.row small {
  display: block;
  margin-top: 2px;
  line-height: 1.4;
}
.extra {
  display: flex;
  justify-content: center;
  margin: 12px auto;
}
.empty {
  padding: 20px 0;
}
.empty p {
  margin-bottom: 12px;
}
.subselect {
  font-size: 16px;
  font-weight: 650;
  min-height: 43px;
  border: 1px solid #c8d2c8;
  border-radius: 10px;
  background: white;
  padding: 6px 9px;
  color: #203e35;
}
.resultsTop .search {
  max-width: 410px;
  flex: 1;
}
.homeRecent {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #506961;
  margin-top: 18px;
  flex-wrap: wrap;
}
.quick {
  font-weight: 750;
  color: #17634e;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 42px;
  padding: 3px;
}
.footer {
  margin-top: 9px;
  color: var(--math-ink);
  font-size: clamp(15px, 1.35vw, 22px);
}
.footer summary {
  cursor: pointer;
  width: fit-content;
  padding: 8px 12px;
}
.footer p {
  max-width: 65ch;
}
.small {
  color: #536c60;
  font-size: 15px;
}
.textbutton {
  background: #f7f8f2;
  border: 1px solid #c8d3c8;
  border-radius: 10px;
  min-height: 44px;
  padding: 8px 16px;
}
@media (max-width: 900px) {
  .classroom-home {padding-inline: 0;}
  .hero {min-height: max(21vw, 160px);gap: 17px;}
  .hero h1 {font-size: 32px;}
  .hero-intro {padding: 0;}
  .hero-tools {flex-wrap: wrap;gap: 6px;}
  .hero-tools .search {flex-basis: 100%;}
  .hero-tools > .math-share-button {min-height: 44px;}
  .hero[data-mode="0"] h1::after, .hero[data-mode="0"] h1::before {display: none;}
}
@media (max-width: 660px) {
  .classroom-home {padding-bottom: 20px;}
  .classroom-home picture {display: block;}
  .classroom-art {position: relative; display: block; top: 0; height: auto;}
  .hero {margin: 0;min-height: 0;padding: 12px 0 15px;gap: 10px;}
  .hero h1 {font-size: 32px;}
  .hero[data-mode="0"] h1 {text-align: left;}
  .hero-lead {font-size: clamp(16px, 4.5vw, 21px);}
  .hero-tools .search {flex: 1 1 180px;}
  .hero-tools > .math-share-button {font-size: 15px;padding-inline: 9px;gap: 6px;}
  .grades {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .questions {
    grid-template-columns: 1fr;
  }
  .family {
    padding: 11px;
  }
  .activity-actions {
    grid-template-columns: minmax(0, 1fr);
  }
  .activity-actions > a {
    justify-self: end;
  }
  .sems span {
    display: none;
  }
  .row {
    gap: 8px;
  }
  .menu button {
    padding: 6px 10px;
  }
}
@media (max-width: 420px) {
  .menu {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .menu button {
    font-size: 15px;
  }
  .brand {
    font-size: 19px;
  }
  .families {
    grid-template-columns: 1fr;
  }
  .grades {
    gap: 8px;
  }
  .sems {
    gap: 4px;
  }
  .sems button {
    font-size: 16px;
    padding: 4px;
  }
  .gradeHead {
    min-height: 57px;
  }
  .gradeHead img {
    width: 56%;
  }
  .grade h2 {
    font-size: 24px;
  }
  .row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .row img {
    height: auto;
    display: none;
  }
  .resultsTop .search {
    flex-basis: 100%;
    max-width: none;
  }
  .results .chips {
    gap: 4px;
  }
  .chip {
    padding: 6px 10px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      border-color 0.16s,
      background-color 0.16s;
  }
}
.coverage {
  --sea: #175d53;
  --line: #cad4cd;
  --white: #fffefa;
  --muted: #465e68;
}
.coverage p {
  overflow-wrap: anywhere;
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.searchbox :is(select, input) {
  padding: 8px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
}
.codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.codecard {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.codecard p {
  margin: 5px 0;
}
.codecard small {
  color: var(--muted);
}
.concepts {
  list-style: none;
  margin: 8px 0;
  padding: 0;
}
.concepts li {
  display: grid;
  grid-template-columns: 4.8rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.4rem;
  margin: 0.35rem 0;
}
.concepts :is(.concept-confirmed, .concept-pending) {
  font-size: 0.82rem;
  font-weight: 750;
}
.concept-confirmed {
  color: var(--sea);
}
.concept-pending {
  color: var(--muted);
}

.coverage .badge {
  background: #e4efe9;
  color: #22574c;
  border-radius: 6px;
  padding: 2px 7px;
}
.coverage a {
  color: var(--sea);
}
@media (max-width: 600px) {
  .codes {
    grid-template-columns: 1fr;
  }
}
.skip {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-150%);
  background: white;
  padding: 0.5rem;
  z-index: 5;
}
.skip:focus {
  transform: none;
}
