:root {
  color-scheme: light;
  --ink: #102338;
  --muted: #52677d;
  --line: #dce6ee;
  --paper: #ffffff;
  --canvas: #f3f7fa;
  --navy: #163b65;
  --blue: #246ea1;
  --teal: #14877b;
  --teal-soft: #e8f7f3;
  --amber: #a85d09;
  --amber-soft: #fff4df;
  --shadow: 0 18px 45px rgba(17, 47, 74, 0.09);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
}

main :where(img, svg, video, canvas) {
  max-width: 100%;
  height: auto;
}

main :where(pre, .math-display, mjx-container[display="true"]) {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

main :where(table) {
  width: 100%;
  max-width: 100%;
}

.solution-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.65rem;
  background: #fff;
  color: #143d67;
  font-weight: 750;
  transform: translateY(-180%);
  transition: transform 120ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(220, 230, 238, 0.9);
  background: rgba(255, 255, 255, 0.96);
}

.header-inner,
.site-footer,
.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 820;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border-radius: 0.75rem;
  background: linear-gradient(145deg, #1d6fa4, #17476f);
  color: #fff;
  box-shadow: 0 7px 16px rgba(24, 84, 126, 0.22);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.site-nav a {
  flex: none;
  padding: 0.55rem 0.68rem;
  border-radius: 0.55rem;
  color: #415a70;
  font-size: 0.88rem;
  font-weight: 680;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  background: #edf5f8;
  color: #175f80;
}

.site-nav .sign-in-link {
  margin-left: 0.35rem;
  border: 1px solid #c6dbe5;
  background: #f8fbfd;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 390px;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(15, 49, 78, 0.98), rgba(26, 96, 137, 0.95)),
    #163b65;
  color: #fff;
}

.hero::after {
  position: absolute;
  z-index: -1;
  right: -8%;
  bottom: -65%;
  width: 48%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 55px rgba(255, 255, 255, 0.025),
    0 0 0 110px rgba(255, 255, 255, 0.018);
  content: "";
}

.hero-content {
  width: min(860px, calc(100% - 2rem));
  margin-inline: auto;
  padding: 5.2rem 0 6.4rem;
  text-align: center;
}

.hero-glow {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
}

.hero-glow-one {
  top: -9rem;
  left: -7rem;
  width: 25rem;
  height: 25rem;
  background: radial-gradient(circle, rgba(53, 190, 172, 0.2), transparent 67%);
}

.hero-glow-two {
  right: 14%;
  bottom: -10rem;
  width: 28rem;
  height: 28rem;
  background: radial-gradient(circle, rgba(107, 169, 255, 0.18), transparent 68%);
}

.eyebrow,
.section-kicker,
.class-label {
  margin: 0;
  color: #33728d;
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  display: inline-block;
  padding: 0.36rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d8f5f0;
}

.hero h1 {
  margin: 0.9rem 0 0;
  font-size: clamp(2.65rem, 7vw, 5.3rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero-lead {
  max-width: 690px;
  margin: 1.15rem auto 0;
  color: #d9eaf2;
  font-size: clamp(1.03rem, 2vw, 1.26rem);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.hero-points span {
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #edf8fb;
  font-size: 0.85rem;
  font-weight: 680;
}

.page-shell {
  position: relative;
  z-index: 2;
  padding-bottom: 4rem;
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 2rem;
  margin-top: -3rem;
  padding: 1.6rem;
  border: 1px solid rgba(211, 226, 235, 0.92);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.intro-panel h2 {
  margin: 0.22rem 0 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.intro-panel p:not(.section-kicker) {
  max-width: 650px;
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.class-jumps {
  display: flex;
  align-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.class-jumps a {
  display: inline-flex;
  min-height: 2.45rem;
  align-items: center;
  justify-content: center;
  padding: 0.48rem 0.72rem;
  border: 1px solid #d4e2e9;
  border-radius: 0.65rem;
  background: #f5f9fb;
  color: #235975;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

.class-jumps a:hover,
.class-jumps a:focus-visible {
  border-color: #79a9bc;
  background: #eaf5f7;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.class-card {
  --accent: #2d7ea0;
  --accent-soft: #eaf5f8;
  position: relative;
  overflow: hidden;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(17, 47, 74, 0.055);
  scroll-margin-top: 1rem;
}

.class-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 35%, white));
  content: "";
}

.class-card.revised {
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.class-card.revised:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, #dce6ee);
  box-shadow: 0 16px 36px rgba(17, 47, 74, 0.095);
  transform: translateY(-2px);
}

.class-five {
  --accent: #187f73;
  --accent-soft: #e7f5f2;
}

.class-six {
  --accent: #2875a2;
  --accent-soft: #eaf3f9;
}

.class-seven {
  --accent: #5d65ac;
  --accent-soft: #eeeffa;
}

.class-eight {
  --accent: #a65e22;
  --accent-soft: #fbefe5;
}

.class-nine {
  --accent: #8a4b7d;
  --accent-soft: #f7ecf4;
}

.class-card-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
}

.class-card-top > *,
.chapter-panel-heading > *,
.coming-soon-message > * {
  min-width: 0;
}

.class-number {
  display: grid;
  width: 3.45rem;
  height: 3.45rem;
  place-items: center;
  border-radius: 1rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.55rem;
  font-weight: 850;
  letter-spacing: -0.05em;
}

.stream-number {
  gap: 0;
  align-content: center;
  line-height: 1;
}

.stream-number span {
  margin-top: 0.18rem;
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.class-card h2 {
  margin: 0.12rem 0 0;
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.status {
  justify-self: end;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 820;
  white-space: nowrap;
}

.status-revised {
  border: 1px solid #b9e1d7;
  background: var(--teal-soft);
  color: #11695f;
}

.status-upcoming {
  border: 1px solid #efd3a8;
  background: var(--amber-soft);
  color: #8a4b05;
}

.class-summary {
  min-height: 3.2rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.subject-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  margin-top: 1rem;
}

.subject-list > span,
.subject-list > a {
  max-width: 100%;
  padding: 0.42rem 0.62rem;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, #dce6ee);
  border-radius: 0.58rem;
  background: color-mix(in srgb, var(--accent-soft) 60%, white);
  color: color-mix(in srgb, var(--accent) 78%, #173047);
  font-size: 0.78rem;
  font-weight: 710;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.subject-list > a {
  display: inline-block;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.subject-list > a span {
  color: var(--muted);
  font-weight: 620;
}

.subject-list > .subject-book-upcoming {
  display: inline-block;
  border-style: dashed;
  background: #f5f7f9;
  color: #667785;
}

.subject-book-upcoming > span {
  color: #7c8993;
  font-weight: 620;
}

.subject-book-upcoming > small {
  margin-left: 0.18rem;
  padding: 0.12rem 0.32rem;
  border-radius: 999px;
  background: #e7edf1;
  color: #65747f;
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.subject-list > a:hover,
.subject-list > a:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 62%, #dce6ee);
  box-shadow: 0 7px 16px rgba(17, 47, 74, 0.09);
  transform: translateY(-1px);
}

.publishing-note,
.waiting-note {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid #e8eef2;
  color: #256b68;
  font-size: 0.78rem;
  font-weight: 750;
}

.upcoming {
  --accent: #8b99a5;
  --accent-soft: #eef2f5;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 251, 0.98)),
    #fff;
}

.upcoming .class-label,
.upcoming .subject-list span {
  color: #6e7d89;
}

.subject-list.muted span {
  border-color: #dfe6eb;
  background: #f4f6f8;
  color: #687885;
}

.waiting-note {
  color: #8a570e;
}

.reading-shell {
  width: min(980px, calc(100% - 2rem));
  margin-inline: auto;
  padding: 2rem 0 4.5rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
  color: #64798c;
  font-size: 0.82rem;
}

.breadcrumbs > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.breadcrumbs a {
  color: #236888;
  font-weight: 720;
  text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.breadcrumbs > span[aria-hidden="true"] {
  color: #9eacb7;
}

.book-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 4.2rem);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 90% 12%, rgba(101, 203, 188, 0.2), transparent 30%),
    linear-gradient(125deg, #123451, #1b6380);
  color: #fff;
  box-shadow: 0 24px 55px rgba(17, 47, 74, 0.16);
}

.book-hero::after {
  position: absolute;
  right: -4rem;
  bottom: -6rem;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 2rem rgba(255, 255, 255, 0.025),
    0 0 0 4rem rgba(255, 255, 255, 0.02);
  content: "";
}

.book-hero .eyebrow,
.coming-soon-card .eyebrow {
  color: #b9ece4;
}

.book-hero h1 {
  max-width: 760px;
  margin: 0.55rem 0 0;
  font-size: clamp(2.15rem, 6vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.book-hero > p:not(.eyebrow) {
  max-width: 680px;
  margin: 1rem 0 0;
  color: #d8eaf0;
  font-size: 1.02rem;
}

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.35rem;
}

.book-meta span {
  max-width: 100%;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #eef8fa;
  font-size: 0.78rem;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.chapter-panel {
  margin-top: 1.2rem;
  padding: clamp(1.2rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: #fff;
  box-shadow: 0 14px 34px rgba(17, 47, 74, 0.07);
}

.chapter-panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid #e5edf2;
}

.chapter-panel-heading h2 {
  margin: 0.18rem 0 0;
  font-size: clamp(1.45rem, 4vw, 2rem);
  letter-spacing: -0.03em;
}

.official-link {
  flex: none;
  padding: 0.58rem 0.78rem;
  border: 1px solid #c9dce5;
  border-radius: 0.65rem;
  background: #f4f9fa;
  color: #226782;
  font-size: 0.78rem;
  font-weight: 760;
  text-decoration: none;
}

.official-link:hover,
.official-link:focus-visible {
  border-color: #7baabc;
  background: #eaf5f7;
}

.chapter-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
}

.chapter-link {
  display: grid;
  min-width: 0;
  min-height: 100%;
  grid-template-columns: 1fr auto;
  gap: 0.28rem 0.75rem;
  padding: 1rem;
  border: 1px solid #dce7ed;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, #fff, #f8fbfc);
  text-decoration: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.chapter-link:hover,
.chapter-link:focus-visible {
  border-color: #84b3c1;
  box-shadow: 0 10px 22px rgba(17, 68, 91, 0.1);
  transform: translateY(-2px);
}

.chapter-number {
  grid-column: 1;
  color: #337891;
  font-size: 0.7rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapter-name {
  grid-column: 1;
  color: #183047;
  font-size: 0.96rem;
  font-weight: 760;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.chapter-availability {
  grid-column: 1;
  width: max-content;
  max-width: 100%;
  margin-top: 0.18rem;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 780;
}

.chapter-availability.available {
  background: #def3ec;
  color: #12675d;
}

.chapter-availability.waiting {
  background: #f2f5f7;
  color: #687986;
}

.chapter-arrow {
  display: grid;
  grid-column: 2;
  grid-row: 1 / 4;
  width: 2rem;
  height: 2rem;
  align-self: center;
  place-items: center;
  border-radius: 50%;
  background: #eaf5f5;
  color: #16766f;
  font-size: 1rem;
}

.chapter-reading-shell {
  max-width: 900px;
}

.coming-soon-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 560px;
  padding: clamp(2rem, 7vw, 5rem);
  border-radius: 1.6rem;
  background:
    radial-gradient(circle at 84% 18%, rgba(75, 190, 171, 0.2), transparent 26%),
    linear-gradient(135deg, #102d49, #1c5f78 72%, #1b746e);
  color: #fff;
  box-shadow: 0 26px 60px rgba(17, 47, 74, 0.18);
}

.coming-soon-card::before {
  position: absolute;
  z-index: -1;
  right: -8rem;
  bottom: -9rem;
  width: 27rem;
  height: 27rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 3.2rem rgba(255, 255, 255, 0.025),
    0 0 0 6.4rem rgba(255, 255, 255, 0.018);
  content: "";
}

.coming-soon-card h1 {
  max-width: 720px;
  margin: 0.75rem 0 0;
  font-size: clamp(2.25rem, 7vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: -0.048em;
  overflow-wrap: anywhere;
}

.chapter-label {
  margin: 0.8rem 0 0;
  color: #c9e0e8;
  font-size: 0.92rem;
  font-weight: 720;
}

.chapter-orbit {
  display: grid;
  width: 4.7rem;
  height: 4.7rem;
  margin-bottom: 1.7rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 0.45rem rgba(255, 255, 255, 0.025);
  color: #d9fff8;
  font-size: 1.8rem;
  font-weight: 850;
}

.coming-soon-message {
  display: flex;
  max-width: 650px;
  align-items: flex-start;
  gap: 0.9rem;
  margin-top: 2rem;
  padding: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.085);
  backdrop-filter: blur(8px);
}

.status-dot {
  flex: 0 0 0.7rem;
  height: 0.7rem;
  margin-top: 0.43rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: #62d4be;
  box-shadow: 0 0 0 0.28rem rgba(98, 212, 190, 0.13);
}

.coming-soon-message h2 {
  margin: 0;
  font-size: 1.18rem;
}

.coming-soon-message p {
  margin: 0.3rem 0 0;
  color: #d7e9ee;
}

.back-to-book {
  display: inline-flex;
  margin-top: 1.25rem;
  padding: 0.72rem 0.95rem;
  border-radius: 0.72rem;
  background: #fff;
  color: #15516c;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.back-to-book:hover,
.back-to-book:focus-visible {
  background: #e9f7f4;
}

.chapter-neighbours {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.chapter-neighbours a {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
  color: #27495f;
  font-size: 0.82rem;
  font-weight: 720;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.chapter-neighbours a span {
  margin-bottom: 0.18rem;
  color: #668092;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.chapter-neighbours .next {
  align-items: flex-end;
  text-align: right;
}

.chapter-neighbours a:hover,
.chapter-neighbours a:focus-visible {
  border-color: #8eb5c3;
  background: #f6fafb;
}

.solution-reading-shell {
  width: min(1080px, calc(100% - 2rem));
}

.solution-chapter-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  overflow: hidden;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 92% 5%, rgba(105, 216, 190, 0.23), transparent 30%),
    linear-gradient(130deg, #102f4d, #185f78 70%, #14766d);
  color: #fff;
  box-shadow: 0 24px 55px rgba(17, 47, 74, 0.16);
}

.solution-chapter-number {
  display: grid;
  width: clamp(4rem, 9vw, 6rem);
  height: clamp(4rem, 9vw, 6rem);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 0.5rem rgba(255, 255, 255, 0.025);
  color: #dcfff7;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 850;
}

.solution-chapter-hero .eyebrow {
  color: #b9ece4;
}

.solution-chapter-hero h1 {
  max-width: 780px;
  margin: 0.5rem 0 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.solution-intro {
  max-width: 700px;
  margin: 1rem 0 0;
  color: #dceff2;
}

.solution-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.solution-meta span {
  padding: 0.4rem 0.68rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #f1fbfc;
  font-size: 0.76rem;
  font-weight: 720;
}

.solution-review-note {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid #bfe1d7;
  border-radius: 0.9rem;
  background: #eef9f5;
  color: #315f58;
  font-size: 0.86rem;
}

.solution-review-note > span {
  display: grid;
  flex: 0 0 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 0.55rem;
  background: #d5eee7;
  color: #176f63;
  font-weight: 900;
}

.solution-review-note p {
  margin: 0.15rem 0 0;
}

.solution-review-note a {
  color: #145f75;
  font-weight: 760;
}

.solution-article {
  padding: clamp(1.1rem, 4vw, 3.2rem);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: #fff;
  box-shadow: 0 16px 40px rgba(17, 47, 74, 0.08);
}

.solution-article .toc {
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 1px solid #cfe3e6;
  border-radius: 1rem;
  background: linear-gradient(135deg, #f2faf8, #f5f9fc);
}

.solution-article .toc h2 {
  margin: 0 0 0.75rem;
  color: #174f66;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}

.solution-article .toc ul {
  margin: 0;
  padding-left: 1.25rem;
}

.solution-article .toc li + li {
  margin-top: 0.35rem;
}

.solution-article .toc a {
  color: #216985;
  font-weight: 680;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2rem;
}

.ncert-solution-content {
  color: #25394c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.8vw, 1.08rem);
  line-height: 1.78;
}

.ncert-solution-content h2,
.ncert-solution-content h3,
.ncert-solution-content h4 {
  color: #143e5b;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.25;
  scroll-margin-top: 1rem;
}

.ncert-solution-content h2 {
  margin: 3.5rem 0 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid #d9e9eb;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  letter-spacing: -0.03em;
}

.ncert-solution-content h3 {
  margin: 2.6rem 0 0.85rem;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
}

.ncert-solution-content h4 {
  margin: 2rem 0 0.65rem;
  font-size: 1.08rem;
}

.ncert-solution-content > h2:first-child {
  margin-top: 0;
}

.ncert-solution-content p,
.ncert-solution-content ul,
.ncert-solution-content ol {
  margin-block: 0.8rem;
}

.ncert-solution-content li + li {
  margin-top: 0.35rem;
}

.ncert-solution-content hr {
  height: 1px;
  margin: 2.6rem 0;
  border: 0;
  background: #e1e9ee;
}

.ncert-solution-content :where(.question-block, .solution-block, .example-block, .think-block, .activity-block) {
  margin: 1rem 0;
  padding: clamp(1rem, 3vw, 1.35rem);
  border: 1px solid;
  border-radius: 0.9rem;
}

.ncert-solution-content .question-block {
  border-color: #cadfea;
  background: #f3f8fb;
}

.ncert-solution-content .solution-block {
  border-color: #bfe1d7;
  background: #f1faf7;
}

.ncert-solution-content .example-block {
  border-color: #ead8b2;
  background: #fff9ec;
}

.ncert-solution-content :where(.think-block, .activity-block) {
  border-color: #d8d2ed;
  background: #f8f6fd;
}

.ncert-solution-content :where(.q-label, .s-label, .e-label, .t-label, .a-label, .part-label) {
  margin-bottom: 0.45rem;
  color: #1d6176;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ncert-solution-content .s-label {
  color: #187064;
}

.ncert-solution-content .figure {
  margin: 2rem auto;
  padding: clamp(0.7rem, 2vw, 1rem);
  border: 1px solid #d9e5eb;
  border-radius: 1rem;
  background: #fbfdfe;
}

.ncert-solution-content .figure-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  overflow-x: auto;
}

.ncert-solution-content .figure-inner :where(img, svg) {
  display: block;
  width: auto;
  max-height: 650px;
  margin-inline: auto;
  border-radius: 0.5rem;
}

.ncert-solution-content .figure-inner img {
  max-width: 100% !important;
  height: auto !important;
}

.ncert-solution-content figcaption {
  margin-top: 0.7rem;
  color: #617486;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.82rem;
  text-align: center;
}

.ncert-solution-content .math-display,
.ncert-solution-content mjx-container[display="true"] {
  margin: 1rem 0;
  padding: 0.75rem 0.25rem;
  border-radius: 0.55rem;
  background: #f8fafc;
  scrollbar-color: #9bbbc6 transparent;
}

.ncert-solution-content :where(em, strong):has(mjx-container[display="true"]) {
  display: block;
  max-width: 100%;
}

.ncert-solution-content mjx-container:not([display="true"]) {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  vertical-align: middle;
}

.ncert-solution-content .table-wrap {
  max-width: 100%;
  margin: 1.2rem 0;
  overflow-x: auto;
  border: 1px solid #d9e5eb;
  border-radius: 0.75rem;
}

.ncert-solution-content table {
  border-collapse: collapse;
  background: #fff;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.88rem;
}

.ncert-solution-content :where(th, td) {
  min-width: 5rem;
  padding: 0.65rem;
  border: 1px solid #d9e5eb;
  text-align: left;
  vertical-align: top;
}

.ncert-solution-content th {
  background: #edf5f7;
  color: #173f56;
}

.solution-back-link {
  border: 1px solid #c8dce5;
  background: #fff;
  box-shadow: 0 8px 18px rgba(17, 47, 74, 0.06);
}

.closing-note {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1.35rem;
  border: 1px solid #bfe0d7;
  border-radius: 1.1rem;
  background: linear-gradient(115deg, #eaf7f3, #f7fbfa);
}

.closing-icon {
  display: grid;
  flex: 0 0 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 0.8rem;
  background: #d5eee7;
  color: #176f63;
  font-size: 1.1rem;
  font-weight: 900;
}

.closing-note h2 {
  margin: 0;
  font-size: 1.05rem;
}

.closing-note p {
  margin: 0.3rem 0 0;
  color: #486c68;
  font-size: 0.9rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.2rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.site-footer p {
  margin: 0.25rem 0 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer nav a {
  color: #315f76;
  font-weight: 680;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

:focus-visible {
  outline: 3px solid rgba(47, 136, 171, 0.42);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.8rem 0;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 0.25rem;
  }

  .hero-content {
    padding-top: 4rem;
  }

  .intro-panel {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

@media (max-width: 720px) {
  .header-inner,
  .site-footer,
  .page-shell {
    width: min(100% - 1.1rem, 1180px);
  }

  .brand {
    margin-left: 0.25rem;
  }

  .hero {
    min-height: 365px;
  }

  .hero-content {
    width: min(100% - 1.4rem, 860px);
    padding-bottom: 5.4rem;
  }

  .class-grid {
    grid-template-columns: 1fr;
  }

  .reading-shell {
    width: min(100% - 1rem, 980px);
    padding-top: 1rem;
  }

  .solution-reading-shell {
    width: min(100% - 0.75rem, 1080px);
  }

  .book-hero,
  .coming-soon-card,
  .solution-chapter-hero,
  .solution-article {
    border-radius: 1.15rem;
  }

  .solution-chapter-hero {
    grid-template-columns: 1fr;
  }

  .solution-chapter-number {
    border-radius: 1rem;
  }

  .solution-review-note {
    margin-inline: 0.15rem;
  }

  .solution-article {
    padding-inline: clamp(0.85rem, 4vw, 1.2rem);
  }

  .ncert-solution-content {
    line-height: 1.7;
  }

  .chapter-list {
    grid-template-columns: 1fr;
  }

  .chapter-panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .coming-soon-card {
    min-height: 520px;
  }

  .class-card {
    padding: 1.1rem;
  }

  .class-card-top {
    grid-template-columns: auto 1fr;
  }

  .status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .class-summary {
    min-height: auto;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .site-nav a {
    padding-inline: 0.55rem;
    font-size: 0.81rem;
  }

  .hero h1 {
    font-size: 2.65rem;
  }

  .intro-panel {
    padding: 1.15rem;
  }

  .class-number {
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    font-size: 1.35rem;
  }

  .chapter-neighbours {
    grid-template-columns: 1fr;
  }

  .chapter-neighbours .next {
    align-items: flex-start;
    text-align: left;
  }

  .solution-chapter-hero h1 {
    font-size: 2rem;
  }

  .ncert-solution-content :where(.question-block, .solution-block, .example-block, .think-block, .activity-block) {
    padding: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .skip-link,
  .site-header,
  .hero-glow,
  .class-jumps {
    display: none;
  }

  body,
  .hero,
  .class-card,
  .intro-panel {
    background: #fff;
    color: #111;
  }

  .hero {
    min-height: auto;
    border-bottom: 2px solid #222;
  }

  .hero-content {
    padding: 2rem 0;
  }

  .hero-lead,
  .hero-points span {
    color: #222;
  }

  .intro-panel {
    margin-top: 1rem;
    box-shadow: none;
  }

  .class-card {
    break-inside: avoid;
    box-shadow: none;
  }

  .book-hero,
  .coming-soon-card,
  .solution-chapter-hero {
    min-height: auto;
    border: 2px solid #222;
    background: #fff;
    color: #111;
    box-shadow: none;
  }

  .book-hero > p,
  .coming-soon-card .eyebrow,
  .coming-soon-message p,
  .solution-chapter-hero .eyebrow,
  .solution-intro {
    color: #222;
  }

  .solution-article {
    border: 0;
    box-shadow: none;
  }
}
