:root {
  --ink: #102c27;
  --ink-2: #1a473d;
  --green: #123b32;
  --green-bright: #1e6454;
  --green-soft: #dce8df;
  --cream: #f5efe2;
  --cream-deep: #e9dfca;
  --paper: #fffdf8;
  --coral: #e76f55;
  --coral-dark: #bc4e3b;
  --coral-soft: #f8ded5;
  --gold: #d6a947;
  --gold-soft: #f4e8c9;
  --red: #b6423e;
  --red-soft: #f7dedb;
  --blue: #376c82;
  --blue-soft: #dceaf0;
  --muted: #6f7771;
  --line: #d8d5c9;
  --shadow-sm: 0 10px 26px rgba(16, 44, 39, 0.08);
  --shadow-lg: 0 30px 80px rgba(16, 44, 39, 0.15);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;
  --max-width: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

:focus-visible {
  outline: 3px solid rgba(231, 111, 85, 0.48);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--coral-dark);
  border-radius: 10px;
  transform: translateY(-140%);
  transition: transform 160ms ease;
}

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

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(216, 213, 201, 0.8);
  background: rgba(245, 239, 226, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  padding: 7px;
  border-radius: 14px 14px 14px 5px;
  color: var(--cream);
  background: var(--green);
  box-shadow: 0 7px 0 var(--coral);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.brand-mark path,
.brand-mark circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav,
.public-nav,
.header-actions {
  display: flex;
  align-items: center;
}

.site-nav {
  flex: 1;
  justify-content: space-between;
  gap: 24px;
}

.public-nav {
  gap: 5px;
}

.public-nav a {
  padding: 10px 13px;
  border-radius: 10px;
  color: #3d524b;
  font-size: 14px;
  font-weight: 650;
}

.public-nav a:hover {
  color: var(--green);
  background: rgba(255, 253, 248, 0.76);
}

.header-actions {
  gap: 8px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 11px;
}

.header-user-copy {
  display: grid;
  text-align: right;
  line-height: 1.25;
}

.header-user-copy strong {
  font-size: 14px;
}

.header-user-copy small {
  color: var(--muted);
  font-size: 11px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 11px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.8);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: 9px;
  background: var(--green);
}

.button {
  min-height: 42px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease,
    border-color 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.button-primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(18, 59, 50, 0.18);
}

.button-primary:hover:not(:disabled) {
  background: var(--ink-2);
  box-shadow: 0 12px 24px rgba(18, 59, 50, 0.22);
}

.button-coral {
  color: #fff;
  background: var(--coral);
  box-shadow: 0 7px 16px rgba(231, 111, 85, 0.2);
}

.button-coral:hover:not(:disabled) {
  background: var(--coral-dark);
}

.button-quiet {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.65);
}

.button-quiet:hover:not(:disabled) {
  border-color: #b8b9ae;
  background: var(--paper);
}

.button-danger {
  color: #fff;
  background: var(--red);
}

.button-small {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 12px;
}

.button-block {
  width: 100%;
}

.button-loading::before {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: spin 700ms linear infinite;
}

main {
  min-height: calc(100vh - 164px);
}

.public-page {
  overflow: hidden;
}

.hero {
  position: relative;
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 665px;
  margin: 0 auto;
  padding: 84px 0 78px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.88fr);
  align-items: center;
  gap: 76px;
}

.hero::before {
  position: absolute;
  z-index: -1;
  top: 30px;
  right: -170px;
  width: 500px;
  height: 500px;
  border: 1px solid rgba(18, 59, 50, 0.12);
  border-radius: 50%;
  content: "";
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--coral-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 18px;
  height: 2px;
  border-radius: 5px;
  background: currentColor;
  content: "";
}

.eyebrow-light {
  color: #ffc0ae;
}

.display-title {
  max-width: 710px;
  margin-bottom: 24px;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(49px, 6.2vw, 80px);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.display-title .accent {
  position: relative;
  color: var(--coral-dark);
  white-space: nowrap;
}

.display-title .accent::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 7px;
  border-radius: 50%;
  background: var(--coral-soft);
  content: "";
  transform: rotate(-1.5deg);
}

.hero-lead {
  max-width: 620px;
  margin-bottom: 29px;
  color: #495b55;
  font-size: 17px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.hero-note {
  margin: 20px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.hero-note::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 4px rgba(30, 100, 84, 0.1);
  content: "";
}

.hero-visual {
  position: relative;
  min-height: 470px;
}

.notebook-card {
  position: absolute;
  inset: 23px 18px 22px 10px;
  padding: 28px 28px 27px 54px;
  overflow: hidden;
  border: 1px solid #ded7c9;
  border-radius: 8px 28px 28px 8px;
  background:
    linear-gradient(90deg, transparent 31px, rgba(231, 111, 85, 0.2) 32px, transparent 33px),
    repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(55, 108, 130, 0.1) 32px),
    var(--paper);
  box-shadow: var(--shadow-lg);
  transform: rotate(2.6deg);
}

.notebook-card::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 14px;
  width: 10px;
  background: radial-gradient(circle, #b9b4a8 0 3px, transparent 3.5px) 0 0 / 10px 28px;
  content: "";
}

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

.notebook-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.notebook-head strong {
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
}

.formula-question {
  margin-bottom: 31px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
}

.formula-line {
  position: relative;
  min-height: 58px;
  margin-bottom: 18px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.formula-line.correct {
  background: rgba(220, 232, 223, 0.6);
}

.formula-line.wrong {
  border: 1px solid rgba(231, 111, 85, 0.42);
  background: rgba(248, 222, 213, 0.48);
}

.formula-state {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green-bright);
  font-family: ui-sans-serif, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.wrong .formula-state {
  background: var(--coral);
}

.diagnosis-note {
  margin-top: 10px;
  padding: 15px;
  border-left: 4px solid var(--coral);
  border-radius: 3px 12px 12px 3px;
  color: #67473f;
  background: var(--coral-soft);
  font-size: 13px;
  line-height: 1.65;
}

.diagnosis-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--coral-dark);
}

.floating-tag {
  position: absolute;
  z-index: 3;
  padding: 11px 14px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 780;
  box-shadow: var(--shadow-sm);
}

.floating-tag.top {
  top: 0;
  right: -8px;
  color: #fff;
  background: var(--green);
  transform: rotate(-4deg);
}

.floating-tag.bottom {
  bottom: 0;
  left: -20px;
  color: var(--ink);
  background: var(--gold-soft);
  transform: rotate(2deg);
}

.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.42);
}

.trust-inner {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 22px 0;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  align-items: center;
  gap: 28px;
}

.trust-inner > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.trust-item {
  display: grid;
  gap: 2px;
}

.trust-item strong {
  font-family: Georgia, serif;
  font-size: 19px;
}

.trust-item span {
  color: var(--muted);
  font-size: 11px;
}

.section {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 112px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 46px;
}

.section-heading.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading.centered .eyebrow {
  justify-content: center;
}

.section-heading h2,
.feature-copy h2,
.cta-copy h2 {
  margin-bottom: 16px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(34px, 4.3vw, 52px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.13;
}

.section-heading p,
.feature-copy > p,
.cta-copy p {
  margin-bottom: 0;
  color: #53645e;
  font-size: 16px;
  line-height: 1.8;
}

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

.course-card {
  position: relative;
  min-height: 460px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.course-card::after {
  position: absolute;
  right: -75px;
  bottom: -75px;
  width: 200px;
  height: 200px;
  border: 45px solid var(--green-soft);
  border-radius: 50%;
  content: "";
}

.course-card.social::after {
  border-color: var(--coral-soft);
}

.course-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.course-index {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px 15px 15px 5px;
  color: #fff;
  background: var(--green);
  font-family: Georgia, serif;
  font-size: 18px;
  font-style: italic;
}

.course-card.social .course-index {
  background: var(--coral);
}

.course-label {
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--muted);
  background: #f2efe8;
  font-size: 11px;
  font-weight: 750;
}

.course-card h3 {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: 28px 0 9px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 28px;
  line-height: 1.2;
}

.course-subtitle {
  position: relative;
  z-index: 1;
  margin-bottom: 27px;
  color: var(--muted);
  font-size: 13px;
}

.topic-pills {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-pills span,
.tag {
  padding: 7px 10px;
  border: 1px solid #d8ddd8;
  border-radius: 999px;
  color: #39584e;
  background: rgba(220, 232, 223, 0.5);
  font-size: 11px;
  font-weight: 700;
}

.course-card.social .topic-pills span {
  border-color: #edd4cc;
  color: #754c43;
  background: rgba(248, 222, 213, 0.47);
}

.course-foot {
  position: absolute;
  z-index: 1;
  right: 34px;
  bottom: 33px;
  left: 34px;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
}

.course-foot strong {
  color: var(--ink);
}

.section-dark-wrap {
  color: #f7f0e3;
  background: var(--green);
}

.feature-layout {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 112px 0;
  display: grid;
  grid-template-columns: 0.83fr 1.17fr;
  align-items: center;
  gap: 85px;
}

.feature-copy > p {
  color: #bfcfc7;
}

.process-list {
  margin: 35px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
  list-style: none;
}

.process-item {
  padding: 17px 0;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.step-number {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: #f8bdab;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 800;
}

.process-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.process-item p {
  margin: 0;
  color: #aebfb7;
  font-size: 12px;
  line-height: 1.65;
}

.diagnosis-board {
  position: relative;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  background: #fbf7ee;
  color: var(--ink);
  box-shadow: 22px 22px 0 rgba(231, 111, 85, 0.22);
}

.board-head,
.panel-head,
.practice-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.board-head {
  margin-bottom: 26px;
}

.board-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.mock-student {
  display: flex;
  align-items: center;
  gap: 11px;
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: var(--coral);
  font-size: 14px;
  font-weight: 850;
}

.avatar.green {
  background: var(--green-bright);
}

.avatar.gold {
  color: var(--ink);
  background: var(--gold);
}

.mock-student strong,
.mock-student small {
  display: block;
}

.mock-student small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.board-overview {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 28px;
}

.mastery-wheel {
  width: 150px;
  aspect-ratio: 1;
  padding: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--coral) 0 42%, var(--gold) 42% 68%, var(--green-bright) 68% 83%, #e5e1d8 83%);
}

.mastery-wheel-inner {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  text-align: center;
}

.mastery-wheel strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 32px;
}

.mastery-wheel span {
  color: var(--muted);
  font-size: 10px;
}

.board-bars {
  display: grid;
  gap: 17px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(120px, 1.6fr) 38px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}

.bar-track,
.mastery-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e1d8;
}

.bar-fill,
.mastery-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--green-bright);
}

.bar-fill.weak,
.mastery-fill.weak {
  background: var(--coral);
}

.bar-fill.medium,
.mastery-fill.medium {
  background: var(--gold);
}

.board-alert {
  margin-top: 25px;
  padding: 15px 17px;
  display: flex;
  gap: 12px;
  border: 1px solid #ecd3cb;
  border-radius: 14px;
  background: var(--coral-soft);
  font-size: 12px;
  line-height: 1.6;
}

.board-alert span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: var(--coral);
  font-weight: 850;
}

.analysis-showcase {
  position: relative;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.analysis-showcase::before {
  position: absolute;
  top: 17px;
  right: 20px;
  width: 75px;
  height: 20px;
  background: rgba(214, 169, 71, 0.3);
  content: "";
  transform: rotate(4deg);
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 24px;
}

.analysis-question {
  padding: 25px;
  border: 1px solid #dedbd2;
  border-radius: 18px;
  background: #fbf8f1;
}

.analysis-question h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.analysis-question .math-text {
  margin: 22px 0;
  font-family: Georgia, serif;
  font-size: 22px;
  line-height: 1.5;
}

.mock-steps {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
  counter-reset: steps;
}

.mock-steps li {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 25px 1fr auto;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  background: #fff;
  font-family: Georgia, serif;
  font-size: 13px;
}

.mock-steps li::before {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: #eeece5;
  font-family: ui-sans-serif, sans-serif;
  font-size: 10px;
  content: counter(steps);
  counter-increment: steps;
}

.mock-steps li.is-error {
  outline: 1px solid var(--coral);
  background: var(--coral-soft);
}

.step-status {
  color: var(--green-bright);
  font-family: ui-sans-serif, sans-serif;
  font-weight: 850;
}

.is-error .step-status {
  color: var(--coral-dark);
}

.analysis-result {
  display: grid;
  align-content: start;
  gap: 13px;
}

.result-card-mini {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.result-card-mini small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.result-card-mini strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.result-card-mini p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.result-card-mini.highlight {
  border-color: #e9b9aa;
  background: var(--coral-soft);
}

.cta-panel {
  position: relative;
  padding: 58px 62px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  border-radius: 36px 36px 10px 36px;
  color: #fff;
  background: var(--green);
}

.cta-panel::after {
  position: absolute;
  right: 180px;
  bottom: -80px;
  width: 190px;
  height: 190px;
  border: 35px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
}

.cta-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.cta-copy h2 {
  margin-bottom: 11px;
  font-size: clamp(32px, 4vw, 48px);
}

.cta-copy p {
  color: #bfd0c8;
}

.cta-panel .button {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #eee6d7;
}

.footer-inner {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr;
  align-items: center;
  gap: 26px;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.footer-brand {
  font-family: Georgia, "Songti SC", serif;
  font-weight: 750;
}

.footer-meta {
  text-align: right;
}

/* Dashboard */
.dashboard-page {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 48px 0 90px;
}

.dashboard-hero {
  position: relative;
  margin-bottom: 25px;
  padding: 31px 34px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-radius: 26px 26px 8px 26px;
  color: #fff;
  background: var(--green);
}

.dashboard-hero::after {
  position: absolute;
  right: 4%;
  bottom: -85px;
  width: 190px;
  height: 190px;
  border: 28px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  content: "";
}

.welcome {
  position: relative;
  z-index: 1;
}

.welcome .eyebrow {
  margin-bottom: 8px;
}

.welcome h1 {
  margin-bottom: 8px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(28px, 3.5vw, 42px);
  letter-spacing: -0.025em;
}

.welcome p {
  margin: 0;
  color: #bbcbc4;
  font-size: 13px;
}

.dashboard-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.role-pill,
.meta-pill,
.status-pill {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.role-pill {
  color: var(--green);
  background: #f5c8ba;
}

.meta-pill {
  color: #e9f2ed;
  background: rgba(255, 255, 255, 0.1);
}

.kpi-grid {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.kpi-card {
  min-height: 142px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}

.kpi-card-button {
  width: 100%;
  border: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.kpi-card-button:hover {
  border-color: #99b9ad;
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kpi-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.kpi-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 850;
}

.kpi-card:nth-child(2n) .kpi-icon {
  color: var(--coral-dark);
  background: var(--coral-soft);
}

.kpi-value {
  margin-top: 13px;
  display: block;
  font-family: Georgia, serif;
  font-size: clamp(25px, 3vw, 35px);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.kpi-caption {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

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

.dashboard-grid.two-column {
  grid-template-columns: minmax(0, 1.9fr) minmax(270px, 0.8fr);
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: 1 / -1;
}

.panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 5px 18px rgba(16, 44, 39, 0.035);
}

.panel-head {
  margin-bottom: 21px;
}

.panel-head h2,
.panel-head h3 {
  margin: 3px 0 0;
  font-size: 18px;
}

.panel-kicker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-link {
  border: 0;
  color: var(--green-bright);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.mastery-list {
  display: grid;
  gap: 19px;
}

.mastery-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.25fr) minmax(120px, 1fr) 52px;
  align-items: center;
  gap: 14px;
}

.mastery-label strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.mastery-label span,
.mastery-value small {
  color: var(--muted);
  font-size: 10px;
}

.mastery-value {
  text-align: right;
}

.mastery-value strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 16px;
}

.recommend-list,
.activity-list,
.weak-list,
.student-list {
  display: grid;
  gap: 10px;
}

.class-roster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.roster-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf7f0;
  text-align: left;
  cursor: pointer;
}

.roster-card:hover {
  border-color: #99b9ad;
  background: #f3f7f2;
}

.roster-card strong {
  display: block;
  font-size: 13px;
}

.roster-card p,
.roster-card span {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.roster-card > div:last-child {
  display: grid;
  justify-items: end;
  text-align: right;
}

.analytics-entrybar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.analytics-entrybar button {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
  cursor: pointer;
}

.analytics-entrybar button:hover {
  border-color: #99b9ad;
  box-shadow: var(--shadow-sm);
}

.analytics-entrybar span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--coral-dark);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 800;
}

.analytics-entrybar strong {
  font-size: 13px;
}

.analytics-entrybar small {
  color: var(--muted);
  font-size: 10px;
}

.analytics-detail-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.analytics-detail-kpis .kpi-card {
  min-height: 112px;
}

.analytics-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin: 22px 0;
}

.analytics-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.analytics-detail-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.error-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.error-chip {
  padding: 8px 10px;
  border-radius: 999px;
  color: #7c4d21;
  background: var(--gold-soft);
  font-size: 10px;
  font-weight: 750;
}

.analytics-table-section {
  margin-top: 22px;
}

.photo-answer-panel {
  align-self: start;
}

.photo-question-preview {
  width: 100%;
  max-height: 380px;
  margin-bottom: 16px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.photo-answer-form {
  display: grid;
  gap: 14px;
}

.photo-upload-drop {
  display: grid;
  place-items: center;
  min-height: 128px;
  padding: 20px;
  border: 1.5px dashed #91b1a5;
  border-radius: 14px;
  color: var(--green);
  background: #f2f7f3;
  text-align: center;
  cursor: pointer;
}

.photo-upload-drop small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.photo-upload-drop input {
  margin-top: 12px;
  max-width: 100%;
}

.student-answer-preview {
  max-height: 420px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: contain;
}

.submission-review-list {
  display: grid;
  gap: 14px;
}

.submission-review-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf7f0;
}

.submission-review-media {
  display: grid;
  gap: 12px;
}

.submission-review-media img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.submission-review-media p {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 10px;
}

.submission-review-form {
  display: grid;
  gap: 10px;
}

.recommend-card,
.activity-item,
.weak-item,
.student-item {
  padding: 14px;
  border: 1px solid #dfddd5;
  border-radius: 14px;
  background: #fbf8f2;
}

.recommend-card {
  display: grid;
  grid-template-columns: 33px 1fr;
  gap: 12px;
}

.recommend-number {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 800;
}

.recommend-card strong,
.activity-item strong,
.weak-item strong,
.student-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.recommend-card p,
.activity-item p,
.weak-item p,
.student-item p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.practice-card {
  position: relative;
  overflow: hidden;
  border-color: #c9d6cf;
}

.practice-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--coral);
  content: "";
}

.practice-top {
  margin-bottom: 18px;
  padding-left: 8px;
}

.practice-top h2 {
  margin: 3px 0 0;
  font-size: 19px;
}

.time-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.timer-chip {
  padding: 7px 9px;
  border-radius: 9px;
  color: #37574d;
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.timer-chip.total {
  color: #735147;
  background: var(--coral-soft);
}

.question-wrap {
  padding: 22px;
  border: 1px solid #dedbd2;
  border-radius: 16px;
  background: #fbf9f4;
}

.question-meta {
  margin-bottom: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.question-meta span {
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--muted);
  background: #ece9e2;
  font-size: 9px;
  font-weight: 750;
}

.question-stem {
  margin-bottom: 19px;
  color: #1c322c;
  font-family: Georgia, "Songti SC", serif;
  font-size: 17px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.answer-options {
  margin-bottom: 15px;
  display: grid;
  gap: 9px;
}

.option-card {
  position: relative;
  min-height: 46px;
  padding: 11px 13px 11px 43px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.option-card:hover {
  border-color: #a9beb5;
}

.option-card input {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.option-card span {
  font-size: 12px;
  line-height: 1.5;
}

.answer-field {
  margin-bottom: 15px;
}

.answer-field textarea,
.answer-field input {
  width: 100%;
}

.answer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hint-box {
  margin: 12px 0;
  padding: 13px 15px;
  border-left: 3px solid var(--gold);
  border-radius: 3px 10px 10px 3px;
  color: #66562f;
  background: var(--gold-soft);
  font-size: 11px;
  line-height: 1.6;
}

.result-card {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #bdcfbf;
  border-radius: 14px;
  background: var(--green-soft);
}

.result-card.is-wrong {
  border-color: #e6b2a5;
  background: var(--coral-soft);
}

.result-head {
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-head span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green-bright);
  font-size: 12px;
  font-weight: 850;
}

.is-wrong .result-head span {
  background: var(--coral);
}

.result-head strong {
  font-size: 13px;
}

.result-card p {
  margin: 0;
  color: #456057;
  font-size: 11px;
  line-height: 1.65;
}

.result-card.is-wrong p {
  color: #704c43;
}

.activity-item,
.weak-item,
.student-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.activity-info,
.weak-info,
.student-info {
  min-width: 0;
}

.activity-score,
.weak-score {
  flex: 0 0 auto;
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 750;
}

.activity-score.good {
  color: var(--green-bright);
}

.activity-score.bad {
  color: var(--coral-dark);
}

.weak-score {
  color: var(--coral-dark);
}

.status-pill {
  display: inline-flex;
  color: var(--green);
  background: var(--green-soft);
}

.status-pill.pending {
  color: #6e571f;
  background: var(--gold-soft);
}

.status-pill.rejected,
.status-pill.suspended {
  color: var(--red);
  background: var(--red-soft);
}

.difficulty {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.difficulty::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.error-summary {
  max-width: 245px;
  color: #5b6863;
  font-size: 11px;
  line-height: 1.45;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 11px;
}

.data-table th,
.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #e7e4dc;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  background: #f4f1ea;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fcfaf5;
}

.question-cell {
  min-width: 180px;
}

.question-cell strong,
.user-cell strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
}

.question-cell small,
.user-cell small {
  color: var(--muted);
  font-size: 9px;
}

.actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.admin-queue {
  display: grid;
  gap: 10px;
}

.review-card {
  padding: 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbf9f4;
}

.review-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-person-info strong,
.review-person-info small {
  display: block;
}

.review-person-info small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.review-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.review-meta span {
  padding: 4px 7px;
  border-radius: 6px;
  color: #586760;
  background: #ece9e1;
  font-size: 9px;
}

.review-actions {
  display: flex;
  gap: 7px;
}

/* Account status */
.status-page {
  width: min(calc(100% - 40px), 820px);
  min-height: calc(100vh - 165px);
  margin: 0 auto;
  padding: 76px 0;
  display: grid;
  place-items: center;
}

.status-card {
  position: relative;
  width: 100%;
  padding: 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px 32px 9px 32px;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}

.status-card::after {
  position: absolute;
  top: -90px;
  right: -90px;
  width: 220px;
  height: 220px;
  border: 40px solid var(--gold-soft);
  border-radius: 50%;
  content: "";
}

.status-illustration {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  border-radius: 22px 22px 22px 7px;
  color: var(--green);
  background: var(--gold-soft);
  font-family: Georgia, serif;
  font-size: 33px;
  font-weight: 800;
}

.status-card h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 13px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(31px, 4vw, 43px);
}

.status-description {
  position: relative;
  z-index: 1;
  max-width: 580px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.status-track {
  position: relative;
  z-index: 1;
  margin: 31px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.status-step {
  position: relative;
  padding-top: 28px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.status-step::before {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 17px;
  height: 17px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: #d9d6ce;
  box-shadow: 0 0 0 1px #d9d6ce;
  content: "";
}

.status-step:not(:last-child)::after {
  position: absolute;
  top: 8px;
  right: 6px;
  left: 17px;
  height: 2px;
  background: #dedbd2;
  content: "";
}

.status-step.done::before,
.status-step.current::before {
  background: var(--green-bright);
  box-shadow: 0 0 0 1px var(--green-bright);
}

.status-step.current::before {
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.status-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Loading, error and empty states */
.page-loading {
  min-height: calc(100vh - 165px);
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  font-size: 12px;
}

.loading-orbit {
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border: 1px solid #becac4;
  border-radius: 50%;
  animation: spin 2.4s linear infinite;
}

.loading-orbit span {
  width: 10px;
  height: 10px;
  margin: -5px auto 0;
  display: block;
  border-radius: 50%;
  background: var(--coral);
}

.skeleton-grid {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.skeleton {
  min-height: 140px;
  border-radius: 18px;
  background: linear-gradient(100deg, #e9e3d7 20%, #f3ede1 38%, #e9e3d7 55%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.skeleton.wide {
  min-height: 310px;
  grid-column: span 3;
}

.skeleton.tall {
  min-height: 310px;
}

.empty-state,
.error-state {
  padding: 42px 22px;
  display: grid;
  justify-items: center;
  text-align: center;
}

.empty-mark,
.error-mark {
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: var(--green);
  background: var(--green-soft);
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 800;
}

.error-mark {
  color: var(--red);
  background: var(--red-soft);
}

.empty-state h3,
.error-state h2 {
  margin-bottom: 7px;
  font-size: 16px;
}

.empty-state p,
.error-state p {
  max-width: 420px;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.inline-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #e7b6aa;
  border-radius: 12px;
  color: #754b42;
  background: var(--coral-soft);
  font-size: 11px;
  line-height: 1.55;
}

/* Forms and dialogs */
.modal {
  width: min(calc(100% - 28px), 920px);
  max-height: min(90vh, 760px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 26px;
  background: transparent;
  box-shadow: var(--shadow-lg);
}

.modal::backdrop {
  background: rgba(7, 28, 23, 0.66);
  backdrop-filter: blur(6px);
}

.modal-shell {
  min-height: 590px;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  background: var(--paper);
}

.auth-intro {
  position: relative;
  padding: 50px 38px;
  overflow: hidden;
  color: #fff;
  background: var(--green);
}

.auth-intro::after {
  position: absolute;
  right: -70px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  border: 38px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
}

.auth-intro h2 {
  margin-bottom: 15px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 36px;
  line-height: 1.15;
}

.auth-intro p {
  color: #bdcec6;
  font-size: 13px;
  line-height: 1.75;
}

.auth-formula {
  position: absolute;
  bottom: 52px;
  left: 38px;
  font-family: Georgia, serif;
  font-size: 26px;
  transform: rotate(-4deg);
}

.auth-formula span {
  color: #f5ad98;
  font-family: "Kaiti SC", cursive;
  font-size: 16px;
}

.auth-panel {
  padding: 43px 46px;
  background: var(--paper);
}

.auth-tabs {
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-bottom: 1px solid var(--line);
}

.auth-tabs button {
  padding: 11px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.auth-tabs button[aria-selected="true"] {
  border-bottom-color: var(--coral);
  color: var(--green);
}

.modal-close {
  position: absolute;
  z-index: 5;
  top: 13px;
  right: 13px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close-dark {
  color: var(--green);
  background: #eeeae1;
}

.compact-modal {
  width: min(calc(100% - 28px), 540px);
}

/* PDF 题目需要按阅读尺寸呈现，不能沿用普通确认弹窗的窄宽度。 */
#detailDialog {
  width: min(calc(100% - 40px), 1040px);
  max-height: min(94vh, 920px);
}

#detailDialog .modal-card {
  padding: 34px 42px 38px;
}

#detailDialog #detailActions {
  position: sticky;
  z-index: 4;
  bottom: -38px;
  margin: 28px -42px -38px;
  padding: 16px 42px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 -10px 24px rgba(16, 44, 39, 0.07);
}

#detailDialog #detailActions .button:first-child:not(:last-child) {
  margin-right: auto;
}

.modal-card {
  position: relative;
  padding: 37px;
  background: var(--paper);
}

.modal-card h2 {
  margin-bottom: 9px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 25px;
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.form-stack {
  display: grid;
  gap: 15px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  color: #31473f;
  font-size: 11px;
  font-weight: 750;
}

.field small {
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field select,
.field textarea,
.answer-field input,
.answer-field textarea {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbc9c1;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  transition: border 150ms ease, box-shadow 150ms ease;
}

.field textarea,
.answer-field textarea {
  resize: vertical;
  line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.answer-field input:focus,
.answer-field textarea:focus {
  outline: none;
  border-color: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(30, 100, 84, 0.13);
}

.form-note,
.muted {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.form-message {
  padding: 10px 12px;
  border: 1px solid #e5aba0;
  border-radius: 10px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 11px;
  line-height: 1.45;
}

.practice-set-summary {
  margin-top: 18px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf7f0;
}

.practice-set-summary strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.practice-set-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.library-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.import-card {
  align-items: start;
}

.import-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.import-card-title .status-pill {
  flex: 0 0 auto;
}

.status-pill.pending-review {
  color: #6e571f;
  background: var(--gold-soft);
}

.status-pill.manual-review {
  color: #7a351f;
  background: #f8ddd2;
}

.library-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf7f0;
}

.library-filter-grid {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(6, minmax(108px, 1fr));
  gap: 10px;
}

.library-toolbar .field {
  min-width: 0;
}

.library-toolbar .field span {
  font-size: 10px;
}

.library-toolbar .field select {
  padding: 8px 30px 8px 10px;
}

.library-toolbar p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
}

.library-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.native-required-note {
  padding: 7px 10px;
  border-radius: 8px;
  color: #765f28;
  background: var(--gold-soft);
  font-size: 10px;
  font-weight: 750;
}

.native-required-note.manual-review-note {
  color: #7a351f;
  background: #f8ddd2;
}

.manual-review-banner {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #e8b9a8;
  border-radius: 14px;
  background: #fff3ee;
}

.manual-review-banner > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.manual-review-banner strong {
  color: #6f301d;
  font-size: 14px;
}

.manual-review-banner p {
  margin: 8px 0 0;
  color: #76584d;
  font-size: 12px;
  line-height: 1.65;
}

.library-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
}

.library-pagination button:disabled {
  cursor: default;
  opacity: 0.42;
}

.classification-editor {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #b9d0c6;
  border-radius: 14px;
  background: #f4f8f3;
}

.classification-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}

.classification-editor-head h3 {
  margin: 4px 0 0;
  font-size: 16px;
}

.classification-editor-head p {
  max-width: 310px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.classification-fields {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.classification-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
}

.import-preview {
  margin: 7px 0 8px !important;
  color: #64746d !important;
}

.source-meta {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.source-question h3 {
  margin: 18px 0 8px;
  font-size: 14px;
}

.structured-reader {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid #d8d3c7;
  border-radius: 14px;
  background: #fffdf8;
}

.structured-reader-collapsible {
  margin-top: 18px;
  padding: 0;
}

.structured-reader-collapsible > summary {
  padding: 15px 18px;
  cursor: pointer;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.structured-reader-content {
  padding: 0 18px 18px;
  border-top: 1px solid #e7e2d7;
}

.structured-reader-content > p {
  margin: 14px 0;
  color: var(--muted);
  font-size: 11px;
}

.native-document {
  padding: 20px;
  border: 1px solid #d4d0c6;
  border-radius: 14px;
  background: #fffdf8;
}

.native-document-head {
  margin-bottom: 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.native-document-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.native-section {
  overflow: hidden;
  border: 1px solid #d8d3c8;
  border-radius: 12px;
  background: #fff;
}

.native-section + .native-section {
  margin-top: 18px;
}

.native-section > header {
  padding: 13px 17px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #dfddd6;
  background: #f2f7f3;
}

.native-solution > header {
  background: #fdf1ec;
}

.native-section > header strong {
  color: var(--green);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
}

.native-solution > header strong {
  color: #ad4f38;
}

.native-section > header span {
  color: var(--muted);
  font-size: 10px;
}

.native-block {
  padding: 17px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
}

.native-block + .native-block {
  border-top: 1px solid #ece8df;
}

.native-part-key {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  font-weight: 850;
}

.native-solution .native-part-key {
  color: #a64a35;
  background: #f9e4dd;
}

.native-subpart {
  padding-top: 13px;
  padding-bottom: 13px;
  padding-left: 54px;
}

.native-subpart-key,
.native-solution .native-subpart-key {
  width: 28px;
  height: auto;
  padding-top: 2px;
  place-items: start center;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.native-block-content {
  min-width: 0;
}

.native-block:not(.native-part) .native-block-content {
  grid-column: 1 / -1;
}

.native-block:not(.native-part).has-score {
  grid-template-columns: minmax(0, 1fr) auto;
}

.native-block:not(.native-part).has-score .native-block-content {
  grid-column: 1;
}

.native-block:not(.native-part).has-score .native-score {
  grid-column: 2;
  grid-row: 1;
}

.native-block-content p {
  margin: 0;
  color: #263a34;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  line-height: 1.7;
}

.native-flow {
  max-width: 100%;
}

.native-inline-math {
  display: inline-block;
  max-width: 100%;
  color: #172d26;
  font-size: .96em;
  line-height: 1;
  vertical-align: -.08em;
}

.native-inline-math .katex {
  white-space: nowrap;
}

.native-block-content p + p,
.native-block-content p + .native-math,
.native-math + p {
  margin-top: 10px;
}

.native-math {
  max-width: 100%;
  padding: 5px 0;
  overflow-x: auto;
  overflow-y: hidden;
  color: #172d26;
  font-size: 14px;
}

.native-graph {
  margin: 14px 0 2px;
  padding: 12px;
  border: 1px solid #d8e2dc;
  border-radius: 12px;
  background: #fbfdfb;
}
.native-box-diagram { margin: 1rem auto; max-width: 30rem; color: #31594e; }
.native-box-diagram svg { display: block; width: 100%; height: auto; }
.native-box-diagram text { font: 18px Georgia, serif; fill: currentColor; }

.native-graph svg {
  display: block;
  width: 100%;
  max-height: 390px;
}

.native-graph-axis { stroke: #56645f; stroke-width: 1.4; }
.native-graph-line { stroke: #537d9e; stroke-width: 1.7; }
.native-graph-line.is-dashed,
.native-graph-curve.is-dashed { stroke-dasharray: 7 6; }
.native-graph-region { fill: rgba(91, 157, 132, .28); stroke: #2f785e; stroke-width: 1.8; }
.native-graph-area { fill: rgba(205, 91, 67, .24); stroke: none; }
.native-graph-area.is-s1 { fill: rgba(238, 213, 64, .58); }
.native-graph-area.is-s2 { fill: rgba(76, 151, 168, .43); }
.native-graph-area.is-neutral { fill: rgba(92, 104, 100, .43); }
.native-graph-area.is-magenta { fill: rgba(196, 75, 189, .56); }
.native-graph-curve { fill: none; stroke: #a64636; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.native-graph-marker { fill: #174d3c; stroke: #174d3c; stroke-width: 2; }
.native-graph-marker.is-open { fill: #fff; }
.native-graph-vertex { fill: #174d3c; }
.native-graph-axis-label,
.native-graph-line-label,
.native-graph-vertex-label { fill: #31443d; font: 13px Georgia, 'Times New Roman', serif; }
.native-graph-line-label { fill: #315f7d; font-style: italic; }
.native-graph-area-label { fill: #31443d; font: italic 13px Georgia, 'Times New Roman', serif; }
.native-graph-annotation { fill: #31443d; font: italic 12px Georgia, 'Times New Roman', serif; }
.native-graph-vertex-label { font-size: 11px; }
.native-graph figcaption { margin-top: 8px; color: var(--muted); font-size: 12px; text-align: center; }
.native-graph-error { color: #a64a35 !important; }

.native-math .katex-display {
  margin: 0;
  text-align: left;
}

.native-math .katex-display > .katex {
  text-align: left;
}

.native-math.is-centered .katex-display,
.native-math.is-centered .katex-display > .katex {
  text-align: center;
}

.native-math-error {
  color: var(--coral-dark);
  font-family: ui-monospace, monospace;
  white-space: pre-wrap;
}

.native-preformatted {
  margin: 10px 0;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid rgba(15, 61, 54, .13);
  border-radius: 12px;
  background: rgba(231, 240, 235, .42);
  color: var(--ink);
  font: 15px/1.55 "STIX Two Text", Georgia, "Times New Roman", serif;
  white-space: pre;
}

.native-solver-panel {
  margin: 12px 0 4px;
  overflow: hidden;
  border: 1px solid #cad8d1;
  border-radius: 12px;
  background: #f8fbf9;
  color: #263a34;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.native-solver-panel > header {
  padding: 10px 14px;
  border-bottom: 1px solid #d7e1dc;
  background: #eaf2ed;
  font-size: 13px;
}

.native-solver-row {
  display: grid;
  grid-template-columns: minmax(205px, .8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: start;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e9e5;
  font-size: 13px;
}

.native-solver-row:last-child {
  border-bottom: 0;
}

.native-solver-row > span {
  color: var(--muted);
}

.native-solver-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.native-solver-row em {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.native-solver-cell {
  padding: 3px 7px;
  border: 1px solid #ccd8d2;
  border-radius: 6px;
  background: #fff;
  color: #163f34;
  font: 700 12px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

.native-solver-math {
  color: #163f34;
  font-family: "STIX Two Text", Georgia, "Times New Roman", serif;
  white-space: nowrap;
}

.native-solver-variables ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.native-solver-variables li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.native-solver-variables li > span:last-child {
  color: var(--muted);
}

.native-solver-constraints ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 7px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.native-solver-constraints li {
  display: grid;
  grid-template-columns: auto 18px 1fr;
  gap: 6px;
  align-items: center;
}

.native-solver-constraints li.is-semantic {
  display: block;
}

.native-solver-error {
  color: #a64a35 !important;
}

.native-score {
  padding: 4px 8px;
  border-radius: 999px;
  color: #715923;
  background: var(--gold-soft);
  font-size: 9px;
  white-space: nowrap;
}

.native-fidelity-warning {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #e6cf9b;
  border-radius: 10px;
  color: #6e6247;
  background: #fff8e9;
}

.native-fidelity-warning strong {
  color: #6a5527;
  font-size: 13px;
}

.native-fidelity-warning p {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.6;
}

.native-typeset-pending {
  padding: 24px;
  border: 1px solid #e6cf9b;
  border-radius: 14px;
  background: #fffaf0;
}

.native-typeset-pending h3 {
  margin: 12px 0 7px;
  font-size: 17px;
}

.native-typeset-pending > p {
  margin: 0;
  color: #6e6247;
  font-size: 12px;
  line-height: 1.65;
}

.native-typeset-editor {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #d8d3c8;
  border-radius: 12px;
  background: #fff;
}

.native-typeset-editor > summary {
  padding: 14px 16px;
  cursor: pointer;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.native-typeset-editor form {
  padding: 17px;
  display: grid;
  gap: 14px;
  border-top: 1px solid #e6e1d7;
}

.native-typeset-editor textarea {
  min-height: 180px;
  resize: vertical;
  font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.native-editor-help {
  padding: 11px 13px;
  display: grid;
  gap: 4px;
  border-radius: 9px;
  color: #5d533d;
  background: var(--gold-soft);
  font-size: 10px;
  line-height: 1.55;
}

.native-editor-help code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.6);
}

.native-source-audit {
  margin-top: 14px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 9px;
  color: var(--muted);
  background: #f3f1eb;
  font-size: 10px;
}

.native-source-audit a {
  color: var(--green-bright);
  font-weight: 800;
}

.structured-reader > h3 {
  margin: 4px 0 7px;
  font-size: 18px;
}

.structured-reader > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.structured-section {
  overflow: hidden;
  border: 1px solid #d9d5ca;
  border-radius: 12px;
  background: #fff;
}

.structured-section + .structured-section {
  margin-top: 16px;
}

.structured-section-head {
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e7e2d7;
  background: #f3f7f3;
}

.structured-solution .structured-section-head {
  background: #fdf1ec;
}

.structured-section-head span {
  color: var(--green);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 850;
}

.structured-solution .structured-section-head span {
  color: #a94c36;
}

.structured-section-head small {
  color: var(--muted);
  font-size: 10px;
}

.structured-blocks {
  display: grid;
}

.structured-block {
  position: relative;
  padding: 16px 17px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.structured-block + .structured-block {
  border-top: 1px solid #eee9df;
}

.structured-block-text {
  color: #243832;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  line-height: 1.72;
  white-space: pre-wrap;
}

.structured-math .structured-block-text {
  font-family: 'STIX Two Math', 'Cambria Math', Georgia, serif;
}

.structured-part-key {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 850;
}

.structured-score {
  padding: 4px 7px;
  border-radius: 999px;
  color: #715923;
  background: var(--gold-soft);
  font-size: 9px;
  white-space: nowrap;
}

.source-reference {
  padding: 18px;
  border: 1px solid #b9d0c6;
  border-radius: 14px;
  background: var(--green-soft);
}

.source-reference-collapsible > summary {
  margin-bottom: 13px;
  cursor: pointer;
  color: var(--green);
  font-size: 14px;
  font-weight: 850;
}

.source-reference h3 {
  margin-top: 4px;
}

.source-reference p {
  max-width: 520px;
  margin: 0 0 15px;
  color: #49645a;
  font-size: 12px;
  line-height: 1.65;
}

#detailDialog .source-reference p {
  max-width: none;
}

.source-page-note {
  margin-top: 20px !important;
  padding: 10px 12px;
  border-left: 3px solid #d99783;
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.48);
}

.layout-images {
  display: grid;
  gap: 14px;
  margin: 17px 0;
}

.layout-section + .layout-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #bed2c8;
}

.layout-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.layout-section-head p {
  margin: 0;
}

.section-label {
  flex: 0 0 auto;
  color: #176849;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
}

.solution-layout .section-label {
  color: #b55137;
}

.layout-images figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid #c3d6cd;
  border-radius: 10px;
  background: #fff;
}

.layout-images img {
  width: 100%;
  display: block;
  cursor: default;
}

.layout-images a {
  display: block;
}

.layout-images figcaption {
  padding: 8px 11px;
  border-top: 1px solid #d8e3dd;
  color: var(--muted);
  background: #f8fbf9;
  font-size: 10px;
}

.searchable-text {
  margin-top: 18px;
}

.searchable-text summary {
  cursor: pointer;
  color: var(--green-bright);
  font-size: 12px;
  font-weight: 800;
}

.source-solution {
  max-height: 260px;
  margin: 0;
  padding: 13px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf9f4;
  color: #283a34;
  font: 11px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}

.solution-steps {
  margin: 0;
  padding-left: 20px;
  color: #31453e;
  font-size: 12px;
  line-height: 1.65;
}

.solution-steps li + li {
  margin-top: 8px;
}

.toast-region {
  position: fixed;
  z-index: 3000;
  right: 18px;
  bottom: 18px;
  width: min(calc(100% - 36px), 360px);
  display: grid;
  gap: 9px;
  pointer-events: none;
}

.toast {
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 25px 1fr;
  align-items: center;
  gap: 10px;
  border-radius: 13px;
  color: #fff;
  background: var(--green);
  box-shadow: var(--shadow-lg);
  font-size: 11px;
  line-height: 1.5;
  animation: toast-in 220ms ease both;
}

.toast.error {
  background: var(--red);
}

.toast span:first-child {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: #fff;
  font-weight: 850;
}

.toast.error span:first-child {
  color: var(--red);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  to { background-position-x: -200%; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr 0.85fr;
    gap: 35px;
  }

  .display-title {
    font-size: clamp(47px, 7vw, 67px);
  }

  .feature-layout {
    gap: 48px;
  }

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

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid,
  .dashboard-grid.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span-2 {
    grid-column: span 2;
  }

  .dashboard-grid.two-column > :last-child {
    grid-column: span 2;
  }
}

@media (max-width: 800px) {
  .header-inner {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 14px;
    left: 14px;
    padding: 14px;
    display: none;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 0 0 18px 18px;
    background: var(--paper);
    box-shadow: var(--shadow-lg);
  }

  .site-nav.is-open {
    display: grid;
  }

  .public-nav,
  .header-actions {
    align-items: stretch;
  }

  .public-nav {
    display: grid;
  }

  .header-actions {
    margin-top: 7px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .header-user {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .hero {
    width: min(calc(100% - 32px), var(--max-width));
    padding-top: 58px;
    grid-template-columns: 1fr;
  }

  .hero-visual {
    width: min(100%, 560px);
    min-height: 430px;
    margin: 0 auto;
  }

  .trust-inner {
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-inner > p {
    grid-column: 1 / -1;
  }

  .section,
  .feature-layout {
    padding: 85px 0;
  }

  .course-grid,
  .feature-layout {
    grid-template-columns: 1fr;
  }

  .feature-copy {
    max-width: 650px;
  }

  .diagnosis-board {
    max-width: 630px;
    margin: 0 auto;
  }

  .cta-panel {
    padding: 45px;
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-meta {
    text-align: left;
  }

  .modal-shell {
    grid-template-columns: 1fr;
  }

  .auth-intro {
    min-height: 175px;
    padding: 35px 36px;
  }

  .auth-intro h2 {
    margin-bottom: 8px;
    font-size: 29px;
  }

  .auth-formula {
    right: 35px;
    bottom: 28px;
    left: auto;
  }

  .dashboard-page {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .review-card {
    grid-template-columns: 1fr;
  }

  .review-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .brand-copy small {
    display: none;
  }

  .display-title {
    font-size: 46px;
  }

  .hero {
    min-height: auto;
    padding-bottom: 55px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions .button {
    flex: 1 1 160px;
  }

  .hero-visual {
    min-height: 405px;
  }

  .notebook-card {
    inset: 20px 5px 18px;
    padding: 23px 18px 22px 42px;
  }

  .formula-question {
    font-size: 16px;
  }

  .formula-line {
    font-size: 17px;
  }

  .floating-tag.bottom {
    left: 2px;
  }

  .trust-inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .trust-inner > p {
    grid-column: auto;
  }

  .section,
  .feature-layout {
    width: min(calc(100% - 28px), var(--max-width));
    padding: 68px 0;
  }

  .section-heading {
    margin-bottom: 29px;
  }

  .section-heading h2,
  .feature-copy h2 {
    font-size: 34px;
  }

  .course-card {
    min-height: 490px;
    padding: 25px;
  }

  .course-foot {
    right: 25px;
    left: 25px;
  }

  .diagnosis-board {
    padding: 20px;
    box-shadow: 10px 12px 0 rgba(231, 111, 85, 0.2);
  }

  .board-overview {
    grid-template-columns: 1fr;
  }

  .mastery-wheel {
    width: 130px;
    margin: 0 auto;
  }

  .bar-row {
    grid-template-columns: 95px 1fr 35px;
  }

  .analysis-showcase {
    padding: 18px;
  }

  .analysis-question {
    padding: 17px;
  }

  .cta-panel {
    padding: 36px 28px;
  }

  .dashboard-page {
    padding-top: 28px;
  }

  .dashboard-hero {
    padding: 27px 24px;
    align-items: flex-start;
    flex-direction: column;
  }

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

  .kpi-grid,
  .dashboard-grid,
  .dashboard-grid.two-column {
    grid-template-columns: 1fr;
  }

  .kpi-card {
    min-height: 124px;
  }

  .span-2,
  .span-3,
  .dashboard-grid.two-column > :last-child {
    grid-column: auto;
  }

  .panel {
    padding: 19px;
  }

  .mastery-row {
    grid-template-columns: 1fr 48px;
  }

  .mastery-row .mastery-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .practice-top {
    flex-direction: column;
  }

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

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

  .analytics-entrybar,
  .analytics-detail-kpis,
  .analytics-detail-grid {
    grid-template-columns: 1fr;
  }

  .library-toolbar,
  .classification-editor-head,
  .classification-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .library-filter-grid,
  .classification-fields {
    grid-template-columns: 1fr 1fr;
  }

  .time-chips {
    justify-content: flex-start;
  }

  .question-wrap {
    padding: 17px;
  }

  .answer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .answer-actions .button {
    width: 100%;
  }

  .activity-item,
  .weak-item,
  .student-item {
    align-items: flex-start;
  }

  .review-card {
    padding: 13px;
  }

  .review-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .status-page {
    width: min(calc(100% - 28px), 820px);
    padding: 35px 0;
  }

  .status-card {
    padding: 31px 24px;
  }

  .status-track {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .status-step {
    min-height: 30px;
    padding: 3px 0 0 29px;
  }

  .status-step::before {
    top: 0;
  }

  .status-step:not(:last-child)::after {
    top: 17px;
    bottom: -13px;
    left: 8px;
    width: 2px;
    height: auto;
  }

  .status-actions {
    display: grid;
  }

  .auth-panel,
  .modal-card {
    padding: 30px 22px;
  }

  #detailDialog #detailActions {
    bottom: -30px;
    margin: 24px -22px -30px;
    padding: 13px 22px;
  }

  #detailDialog #detailActions .button {
    width: 100%;
  }

  .auth-intro {
    min-height: 160px;
    padding: 31px 23px;
  }

  .auth-intro p,
  .auth-formula {
    display: none;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .submission-review-card {
    grid-template-columns: 1fr;
  }

  .native-document {
    padding: 13px;
  }

  .native-block {
    padding: 14px 12px;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .native-subpart {
    padding-left: 28px;
  }

  .native-score {
    grid-column: 2;
    justify-self: start;
  }

  .native-math {
    font-size: 12px;
  }

  .native-solver-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .native-solver-constraints ul {
    grid-template-columns: 1fr;
  }

  .native-source-audit {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

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

  .skeleton.wide,
  .skeleton.tall {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
