:root {
  --ink: #102f42;
  --muted: #547081;
  --blue: #0b79b7;
  --blue-deep: #074568;
  --teal: #13b6a7;
  --mint: #dff5ea;
  --cream: #fff0c9;
  --paper: #fffaf0;
  --line: rgba(16, 47, 66, 0.14);
  --shadow: 0 22px 70px rgba(7, 69, 104, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(135deg, rgba(223, 245, 234, 0.9), rgba(255, 240, 201, 0.72) 45%, rgba(205, 235, 246, 0.86)),
    repeating-linear-gradient(90deg, rgba(16, 47, 66, 0.026) 0 1px, transparent 1px 42px);
  font-size: 16px;
  line-height: 1.62;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  margin: 10px auto 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.78);
  box-shadow: 0 16px 40px rgba(7, 69, 104, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: white;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 8px 20px rgba(19, 182, 167, 0.28);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.nav-links a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.button:hover,
.module-card:hover,
.resource-card:hover,
.course-card:hover {
  transform: translateY(-3px);
}

.button.primary,
.nav-links .primary {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 12px 26px rgba(11, 121, 183, 0.22);
}

.button.secondary {
  border-color: rgba(7, 69, 104, 0.18);
  background: rgba(255, 255, 255, 0.62);
}

.hero {
  position: relative;
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 250, 240, 0.84) 0%, rgba(255, 250, 240, 0.58) 34%, rgba(255, 250, 240, 0.06) 64%),
    url("./assets/math-gradient-hero-final.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.5), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(10, 121, 183, 0.05));
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: min(690px, calc(100vh - 128px));
  padding: clamp(32px, 5vh, 52px) 58px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 5px 10px;
  border: 1px solid rgba(7, 69, 104, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 900;
}

.hero h1,
.page-hero h1,
.section-title h2 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 820px;
  font-size: clamp(42px, 5.5vw, 76px);
}

.hero-subtitle {
  margin: 14px 0 0;
  color: #0d5367;
  font-size: clamp(20px, 2.35vw, 31px);
  font-weight: 900;
  line-height: 1.25;
}

.hero-copy-text {
  max-width: 690px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.stat {
  padding: 14px;
  border: 1px solid rgba(7, 69, 104, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.66);
}

.stat strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--blue-deep);
  font-size: 23px;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.hero-visual {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.math-hero-art {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 440px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  background-image: url("./assets/math-gradient-hero.png");
  background-size: cover;
  background-position: center;
  box-shadow: -18px 20px 48px rgba(7, 69, 104, 0.22);
}

.math-hero-art::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 48%;
  background:
    linear-gradient(90deg, rgba(255, 250, 240, 0), rgba(255, 250, 240, 0.72) 50%, rgba(226, 246, 236, 0.86)),
    linear-gradient(180deg, rgba(255, 240, 201, 0.18), rgba(19, 182, 167, 0.14));
  pointer-events: none;
}

.motto {
  position: absolute;
  right: 22px;
  top: 22px;
  z-index: 2;
  width: min(360px, calc(100% - 44px));
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.68);
  color: var(--blue-deep);
  box-shadow: 0 18px 40px rgba(7, 69, 104, 0.14);
  backdrop-filter: blur(14px);
}

.motto span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.motto strong {
  display: block;
  margin-top: 4px;
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  font-size: clamp(20px, 2.3vw, 30px);
  line-height: 1.18;
}

.floating-note {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: min(310px, 76%);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.78);
  box-shadow: 0 18px 42px rgba(7, 69, 104, 0.22);
  backdrop-filter: blur(14px);
}

.floating-note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--blue-deep);
}

.section {
  padding: 66px 0;
}

.section.compact {
  padding-top: 36px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.section-title h2 {
  font-size: clamp(28px, 3.3vw, 44px);
}

.section-title p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.bio-panel,
.page-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 22px;
  align-items: stretch;
}

.bio-card,
.text-card,
.page-card {
  border: 1px solid rgba(7, 69, 104, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.8);
  box-shadow: 0 18px 48px rgba(7, 69, 104, 0.1);
}

.bio-card {
  overflow: hidden;
}

.bio-card img {
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
  object-position: 39% center;
}

.text-card {
  padding: 28px;
}

.text-card h3,
.module-card h3,
.course-card h3,
.resource-card h3,
.page-card h3 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  font-size: 23px;
  line-height: 1.18;
}

.credential-list {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.credential-list li {
  position: relative;
  padding: 12px 14px 12px 40px;
  border: 1px solid rgba(7, 69, 104, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
}

.credential-list li::before {
  content: "√";
  position: absolute;
  top: 13px;
  left: 15px;
  color: var(--teal);
  font-weight: 900;
}

.module-grid,
.course-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.module-card,
.course-card,
.resource-card {
  min-height: 190px;
  padding: 20px;
  border: 1px solid rgba(7, 69, 104, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.78);
  box-shadow: 0 14px 36px rgba(7, 69, 104, 0.09);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.module-card:hover,
.resource-card:hover,
.course-card:hover {
  box-shadow: 0 24px 54px rgba(7, 69, 104, 0.16);
}

.module-card:nth-child(2n) {
  background: rgba(223, 245, 234, 0.78);
}

.module-card:nth-child(3n) {
  background: rgba(225, 244, 251, 0.78);
}

.module-index,
.card-kicker,
.course-meta {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-card p,
.resource-card p,
.course-card p,
.page-card p {
  color: var(--muted);
}

.card-arrow {
  display: inline-flex;
  margin-top: 8px;
  color: var(--blue-deep);
  font-weight: 900;
}

.material-strip {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(7, 69, 104, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 250, 240, 0.88), rgba(223, 245, 234, 0.72));
  box-shadow: var(--shadow);
}

.book-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.book-stack img,
.book-page img {
  width: 100%;
  border: 1px solid rgba(7, 69, 104, 0.1);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 18px 36px rgba(7, 69, 104, 0.14);
}

.book-stack img:nth-child(2) {
  transform: translateY(22px);
}

.book-stack img:nth-child(3) {
  transform: translateY(44px);
}

.material-copy {
  padding: 18px;
}

.material-copy h2 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.12;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(11, 121, 183, 0.1);
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 900;
}

.page-hero {
  margin-top: 12px;
  padding: 34px 36px 30px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  background:
    linear-gradient(130deg, rgba(255, 250, 240, 0.96), rgba(223, 245, 234, 0.86), rgba(203, 235, 247, 0.82)),
    repeating-linear-gradient(0deg, rgba(16, 47, 66, 0.035) 0 1px, transparent 1px 34px);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 850px;
  font-size: clamp(32px, 4vw, 48px);
}

.page-hero p {
  max-width: 980px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.page-hero + .section {
  padding-top: 34px;
}

.page-card {
  padding: 24px;
}

.feature-list {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: 14px;
  border-left: 4px solid var(--teal);
  background: rgba(255, 255, 255, 0.58);
}

.research-links {
  display: grid;
  gap: 14px;
}

.article-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.article-preview {
  display: grid;
  gap: 12px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid rgba(7, 69, 104, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.82);
  box-shadow: 0 14px 36px rgba(7, 69, 104, 0.09);
  text-decoration: none;
}

.article-preview h2 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  font-size: 22px;
  line-height: 1.2;
}

.article-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

.article-meta {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-self: end;
}

.article-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 34px;
  border: 1px solid rgba(7, 69, 104, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.84);
  box-shadow: 0 18px 48px rgba(7, 69, 104, 0.1);
}

.article-body h2 {
  margin: 28px 0 10px;
  color: var(--blue-deep);
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  font-size: 26px;
}

.article-body p,
.article-body li {
  color: #274b5e;
  font-size: 16px;
}

.article-body blockquote {
  margin: 24px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--teal);
  background: rgba(223, 245, 234, 0.68);
  color: var(--blue-deep);
  font-weight: 800;
}

.research-link {
  display: block;
  padding: 18px;
  border: 1px solid rgba(7, 69, 104, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.82);
  text-decoration: none;
}

.research-link strong {
  display: block;
  font-size: 18px;
}

.research-link span {
  color: var(--muted);
}

.book-section {
  display: grid;
  gap: 20px;
}

.book-showcase {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: start;
}

.book-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.book-page {
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.7);
}

.caption {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.course-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.course-table th,
.course-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(7, 69, 104, 0.12);
  text-align: left;
  vertical-align: top;
}

.course-table th {
  color: white;
  background: var(--blue);
  font-weight: 900;
}

.course-detail {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(7, 69, 104, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.82);
}

.course-detail h2 {
  margin: 0;
  color: var(--blue);
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  font-size: 32px;
  text-align: center;
}

.course-line {
  display: grid;
  grid-template-columns: 140px 1fr;
  overflow: hidden;
  border-radius: var(--radius);
  background: white;
}

.course-line strong {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: var(--blue);
}

.course-line span {
  padding: 14px 18px;
}

.admission-hero {
  overflow: hidden;
  background:
    linear-gradient(112deg, rgba(255, 250, 240, 0.96) 0%, rgba(255, 250, 240, 0.78) 45%, rgba(255, 250, 240, 0.26) 100%),
    url("./assets/math-gradient-hero-final.png") center / cover no-repeat;
}

.admission-page .section {
  padding-top: 34px;
}

.admission-layout {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.test-console {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 14px;
}

.test-tabs {
  display: grid;
  gap: 8px;
}

.test-tab {
  min-height: 44px;
  border: 1px solid rgba(7, 69, 104, 0.14);
  border-radius: var(--radius);
  color: var(--blue-deep);
  background: rgba(255, 250, 240, 0.74);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.test-tab:hover,
.test-tab.active {
  transform: translateY(-2px);
  background: rgba(223, 245, 234, 0.9);
  box-shadow: 0 14px 34px rgba(7, 69, 104, 0.12);
}

.timer-panel,
.progress-panel,
.test-intro,
.audio-panel,
.student-info-block,
.question-block,
.reading-section,
.result-card {
  border: 1px solid rgba(7, 69, 104, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.82);
  box-shadow: 0 14px 36px rgba(7, 69, 104, 0.08);
}

.timer-panel,
.progress-panel {
  padding: 16px;
}

.timer-panel strong {
  display: block;
  margin-top: 4px;
  color: var(--blue-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  line-height: 1;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.progress-track {
  overflow: hidden;
  height: 9px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(7, 69, 104, 0.1);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  transition: width 180ms ease;
}

.test-actions {
  display: grid;
  gap: 8px;
}

.test-actions .button {
  width: 100%;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

.test-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.test-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.test-main {
  display: grid;
  gap: 16px;
}

.test-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
}

.test-intro h2,
.audio-panel h2,
.student-info-block h2,
.question-block h2,
.reading-section h2,
.result-card h2 {
  margin: 0;
  color: var(--blue-deep);
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  font-size: 25px;
  line-height: 1.2;
}

.test-intro p {
  margin: 8px 0 0;
  color: var(--muted);
}

.test-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 330px;
}

.test-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(11, 121, 183, 0.1);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 900;
}

.audio-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(223, 245, 234, 0.9), rgba(255, 250, 240, 0.84));
}

.audio-panel audio {
  width: 100%;
}

.test-body {
  display: grid;
  gap: 14px;
}

.student-info-block,
.question-block,
.reading-section,
.result-card {
  padding: 22px;
}

.student-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.student-line,
.blank-control {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.student-line input,
.blank-control input,
.blank-control select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(7, 69, 104, 0.16);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 15px;
}

.question-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.question-head span,
.question-head small {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.question-block h2 {
  font-size: 22px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.option-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid rgba(7, 69, 104, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  color: #274b5e;
  font-weight: 800;
  cursor: pointer;
}

.option-row input {
  margin-top: 4px;
  accent-color: var(--blue);
}

.option-row:has(input:checked) {
  border-color: rgba(19, 182, 167, 0.62);
  background: rgba(223, 245, 234, 0.82);
}

.passage-text {
  color: #274b5e;
  font-size: 16px;
  line-height: 1.78;
  text-align: justify;
  white-space: normal;
}

.blank-mark {
  display: inline-block;
  min-width: 4.6em;
  color: var(--blue);
  font-weight: 900;
  text-align: center;
}

.blank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(7, 69, 104, 0.12);
}

.reading-section {
  background: linear-gradient(135deg, rgba(255, 250, 240, 0.86), rgba(225, 244, 251, 0.72));
}

.result-panel[hidden] {
  display: none;
}

.result-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.note {
  color: var(--muted);
  font-size: 14px;
}

.footer {
  padding: 42px 0 54px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 920px) {
  .hero-grid,
  .bio-panel,
  .material-strip,
  .page-panel,
  .book-showcase,
  .admission-layout,
  .test-intro,
  .audio-panel {
    grid-template-columns: 1fr;
  }

  .test-console {
    position: static;
  }

  .test-tabs,
  .test-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid {
    min-height: min(610px, calc(100vh - 140px));
    padding: 34px 26px;
  }

  .module-grid,
  .course-grid,
  .resource-grid,
  .article-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 24px, 1180px);
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    font-size: 17px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 5px;
    width: 100%;
  }

  .nav-links a,
  .button {
    min-height: 31px;
    padding: 6px 9px;
    font-size: 12px;
  }

  .hero {
    margin-top: 10px;
    background-position: 60% center;
  }

  .hero-grid {
    min-height: min(500px, calc(100vh - 172px));
    padding: 28px 20px;
    align-items: center;
  }

  .eyebrow {
    margin-bottom: 12px;
    max-width: 100%;
    white-space: normal;
    font-size: 12px;
    line-height: 1.35;
  }

  .hero h1 {
    font-size: clamp(38px, 13vw, 52px);
    max-width: 7em;
  }

  .hero-subtitle {
    font-size: clamp(20px, 6.8vw, 28px);
    max-width: 9em;
  }

  .hero-copy-text {
    max-width: 22em;
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.7;
  }

  .hero-stats,
  .module-grid,
  .course-grid,
  .resource-grid,
  .article-preview-grid,
  .book-stack,
  .book-page-grid,
  .student-lines,
  .option-grid,
  .blank-grid {
    grid-template-columns: 1fr;
  }

  .test-tabs,
  .test-actions {
    grid-template-columns: 1fr;
  }

  .test-meta {
    justify-content: flex-start;
  }

  .math-hero-art {
    min-height: 320px;
  }

  .motto {
    right: 14px;
    top: 14px;
    width: calc(100% - 28px);
  }

  .book-stack img:nth-child(n) {
    transform: none;
  }

  .section {
    padding: 48px 0;
  }

  .page-hero + .section {
    padding-top: 28px;
  }

  .text-card,
  .page-card,
  .page-hero,
  .article-body,
  .course-detail,
  .test-intro,
  .student-info-block,
  .question-block,
  .reading-section,
  .result-card {
    padding: 22px;
  }

  .course-line {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .site-shell {
    width: min(100% - 18px, 1180px);
  }

  .topbar {
    top: 8px;
    margin-top: 8px;
  }

  .nav-links a {
    flex: 1 1 auto;
  }

  .hero {
    background-position: 57% center;
  }

  .hero-grid {
    min-height: min(480px, calc(100vh - 182px));
    padding: 24px 18px;
  }

  .hero h1 {
    font-size: clamp(34px, 12.5vw, 46px);
  }

  .hero-subtitle {
    font-size: clamp(19px, 6.3vw, 25px);
  }

  .hero-copy-text {
    font-size: 14px;
    line-height: 1.68;
  }

  .page-hero {
    padding: 20px;
  }

  .page-hero h1 {
    font-size: clamp(30px, 10vw, 40px);
  }

  .article-preview {
    padding: 16px;
  }

  .article-preview h2 {
    font-size: 20px;
  }
}
