:root {
  color-scheme: light;
  --paper: #f7f6f1;
  --card: #ffffff;
  --surface: #f7f6f1;
  --surface-strong: #efeee7;
  --ink: #1f2937;
  --muted: #626a75;
  --hairline: #e8e6de;
  --track: #ecebe1;
  --accent: #0f6e56;
  --accent-strong: #0b5b48;
  --accent-container: #e1f5ee;
  --hint: #7a4c00;
  --correct: #1f6f31;
  --wrong: #a23e1e;
  --prob: #ad3f6a;
  --on-accent: #ffffff;
  --nav-bg: rgba(247, 246, 241, .92);
  --shadow-sm: 0 12px 30px -24px rgba(31, 41, 55, .34);
  --shadow-md: 0 24px 54px -34px rgba(31, 41, 55, .4);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --content-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #17181c;
    --card: #1f2126;
    --surface: #17181c;
    --surface-strong: #2a2c33;
    --ink: #e7e9ee;
    --muted: #aab1bc;
    --hairline: #32343b;
    --track: #2a2c33;
    --accent: #3fb08e;
    --accent-strong: #49bc98;
    --accent-container: #12362c;
    --hint: #e2b45a;
    --correct: #75c984;
    --wrong: #f08a65;
    --prob: #d97ba0;
    --on-accent: #071510;
    --nav-bg: rgba(23, 24, 28, .92);
    --shadow-sm: 0 14px 34px -24px rgba(0, 0, 0, .8);
    --shadow-md: 0 28px 60px -34px rgba(0, 0, 0, .88);
  }
}

html {
  scroll-padding-top: 72px;
}

body {
  min-width: 280px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .01em;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img,
video {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.wrap,
.nav-in,
.foot-in {
  width: min(calc(100% - 48px), var(--content-width));
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}

section {
  padding-block: clamp(72px, 8vw, 104px);
  scroll-margin-top: 64px;
}

.feature-chapter {
  padding-block: 0;
}

.feature-intro {
  padding-block: clamp(72px, 8vw, 104px);
}

.feature-subsection {
  position: relative;
  padding-block: clamp(56px, 6vw, 80px);
  border-top: 0;
}

.feature-subsection::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(calc(100% - 48px), var(--content-width));
  height: 1px;
  content: "";
  background: var(--hairline);
  transform: translateX(-50%);
}

.feature-chapter #subjects {
  background: transparent;
  border-block: 0;
}

#subjects,
#demo,
.org {
  background: var(--surface);
  border-block: 1px solid var(--hairline);
}

/* Navigation: one shared horizontal alignment and one clear action. */
nav {
  background: var(--nav-bg);
  border-bottom-color: var(--hairline);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .3);
}

.nav-in {
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: .02em;
}

.brand .glyph {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  place-items: center;
  color: var(--on-accent);
  background: var(--accent-strong);
  border-radius: 9px;
  font-size: 18px;
}

.nav-links {
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
}

.nav-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-inline: 12px;
  color: var(--muted);
  border-radius: 10px;
  font-weight: 650;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--surface);
}

/* Hero: stronger contrast, tighter grouping, and a stable two-column grid. */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(68px, 8vw, 108px);
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}

.hero::after {
  position: absolute;
  right: -150px;
  bottom: -210px;
  width: 460px;
  height: 460px;
  content: "";
  border: 1px solid var(--hairline);
  border-radius: 50%;
  opacity: .7;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: clamp(40px, 6vw, 72px);
}

.hero-grid > div:first-child {
  max-width: 640px;
}

.badge {
  gap: 9px;
  margin-bottom: 24px;
  padding: 7px 14px;
  color: var(--accent-strong);
  background: var(--accent-container);
  border-color: transparent;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .04em;
}

.badge .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.hero h1 {
  max-width: 14em;
  font-size: clamp(34px, 4.5vw, 48px);
  font-weight: 850;
  line-height: 1.28;
  letter-spacing: -.025em;
}

.hero h1 .line {
  white-space: normal;
}

.hero h1 .u {
  background: linear-gradient(transparent 70%, var(--accent-container) 70%);
}

.hero .sub {
  max-width: 38em;
  margin-top: 22px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.85;
}

.cta-row {
  gap: 10px;
  margin-top: 30px;
}

.btn {
  min-height: 46px;
  justify-content: center;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 750;
  line-height: 1.25;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease,
    background-color .18s ease;
}

.btn-primary {
  color: var(--on-accent);
  background: var(--accent-strong);
  box-shadow: 0 12px 24px -16px var(--accent-strong);
}

.btn-primary:hover {
  opacity: 1;
  box-shadow: 0 16px 30px -18px var(--accent-strong);
}

.btn-ghost {
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--hairline);
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.cta-note {
  margin-top: 11px;
  color: var(--muted);
  font-size: 12px;
}

.hero-shot {
  width: min(390px, 100%);
  border-color: var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Section headings repeat one alignment and one contrast pattern. */
.sec-head {
  max-width: 760px;
  margin-bottom: clamp(32px, 4vw, 44px);
}

.section-head .kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .16em;
}

.section-head .kicker::before {
  width: 24px;
  height: 2px;
  content: "";
  background: currentColor;
  border-radius: 999px;
}

.section-head h2 {
  margin-top: 10px;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: -.018em;
}

.sec-head p {
  max-width: 48em;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.85;
}

/* Nested headings use a label column instead of repeating the chapter style. */
.subsection-head {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 8px 20px;
  max-width: 900px;
  margin-bottom: clamp(28px, 3vw, 36px);
  align-items: start;
}

.subsection-head .kicker {
  grid-row: 1 / span 2;
  grid-column: 1;
  display: inline-flex;
  width: 124px;
  min-height: 30px;
  justify-content: center;
  margin-top: 4px;
  padding: 6px 10px;
  color: var(--accent-strong);
  background: var(--accent-container);
  border: 1px solid var(--hairline);
  border-color: color-mix(in srgb, var(--accent) 18%, var(--hairline));
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.2;
}

.subsection-head .kicker::before {
  display: none;
}

.subsection-head h3 {
  grid-row: 1;
  grid-column: 2;
  margin-top: 0;
  font-size: clamp(23px, 2.7vw, 29px);
  line-height: 1.4;
}

.subsection-head p {
  grid-row: 2;
  grid-column: 2;
  margin-top: 0;
}

/* Repeated card language. */
.features {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.feature,
.subject,
.demo-card,
.quality,
.org-lead {
  border-color: var(--hairline);
  box-shadow: var(--shadow-sm);
}

.feature {
  min-height: 100%;
  padding: clamp(24px, 3vw, 30px);
  border-radius: var(--radius-md);
}

.feature .fi {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  color: var(--accent-strong);
  background: var(--accent-container);
  border-radius: 13px;
  font-size: 19px;
  font-weight: 800;
}

.feature h3 {
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
}

.feature p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

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

.subject {
  min-height: 190px;
  padding: 26px 24px;
  border-radius: var(--radius-md);
}

.subject h3,
.subject h4 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
}

.subject .count {
  margin-top: 10px;
  font-size: 36px;
  line-height: 1.2;
}

.subject .units {
  max-width: 17em;
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.75;
}

.subject .glyph {
  right: 12px;
  bottom: -24px;
  font-size: 96px;
  opacity: .09;
}

.subject.s-cal,
.subject.s-la,
.subject.s-pr {
  border-top-width: 4px;
}

.subjects-note {
  max-width: none;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.quality-section {
  margin-top: clamp(32px, 5vw, 56px);
}

/* Keep each explanatory block close to the media it describes. */
#video .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(44px, 8vw, 92px);
  align-items: center;
}

#video .sec-head {
  margin-bottom: 0;
}

.demo-video {
  width: 100%;
  margin: 0;
  border-color: var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

#demo .sec-head,
#demo .demo-card,
#demo > .wrap > .demo-note {
  width: min(100%, 720px);
  margin-inline: auto;
}

.demo-card {
  max-width: none;
  padding: clamp(24px, 4vw, 38px);
  border-radius: var(--radius-lg);
}

.demo-unit {
  color: var(--prob);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .08em;
}

.demo-title {
  margin: 4px 0 16px;
  font-size: 19px;
  line-height: 1.45;
}

.demo-q {
  font-size: 15.5px;
  line-height: 1.85;
}

.opts {
  gap: 10px;
  margin-top: 22px;
}

.opt {
  min-height: 48px;
  gap: 12px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--paper);
  border-color: var(--hairline);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.75;
}

.opt:hover {
  border-color: var(--accent);
}

.opt input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

.opt:has(input:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.opt.sel {
  border-color: var(--accent);
  background: var(--accent-container);
}

.grade-row {
  margin-top: 20px;
}

.grade-row .btn {
  min-width: 132px;
}

.hint-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 10px;
  color: var(--hint);
  font-size: 13.5px;
}

.hint-body,
.verdict {
  border-radius: var(--radius-sm);
}

.solution {
  line-height: 1.85;
}

.demo-note {
  margin-top: 18px;
  line-height: 1.7;
}

/* Credibility points stay close, but are divided by one strong alignment. */
.quality {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: clamp(30px, 4vw, 44px) 0;
  border-radius: var(--radius-lg);
}

.quality > article {
  padding-inline: clamp(26px, 4vw, 44px);
}

.quality > article + article {
  border-left: 1px solid var(--hairline);
}

.quality h3,
.quality h4 {
  margin-bottom: 10px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  font-size: 17px;
  line-height: 1.5;
}

.quality p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

/* Classroom section: one focal card, then process and action. */
.org {
  text-align: left;
}

.org-lead {
  grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
  gap: clamp(28px, 5vw, 52px);
  padding: clamp(26px, 4vw, 42px);
  border-radius: var(--radius-lg);
}

.org-copy .sec-head {
  margin-bottom: 18px;
}

.org-copy .sec-head h2 {
  line-height: 1.38;
}

.org-copy p,
.org-body p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.85;
}

.grading-video {
  border-color: var(--hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.badge-dev {
  padding: 3px 10px;
  color: var(--hint);
  background: var(--hint-container);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}

.flow {
  gap: 8px;
  max-width: none;
  margin: 36px auto 0;
}

.flow .step {
  padding: 8px 15px;
  color: var(--ink);
  background: var(--card);
  border-color: var(--hairline);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
}

.flow .arrow {
  color: var(--accent);
}

.org-body {
  max-width: 720px;
  margin: 28px auto 0;
  text-align: left;
}

.org-body p + p {
  margin-top: 14px;
}

.org .mail {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  padding: 10px 18px;
  color: var(--on-accent);
  background: var(--accent-strong);
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 28px -20px var(--accent-strong);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
}

.org .mail:hover {
  transform: translateY(-1px);
}

footer {
  padding-block: 30px 40px;
  background: var(--card);
  border-top-color: var(--hairline);
}

.foot-in {
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 12.5px;
}

.foot-links {
  gap: 8px;
}

.foot-links a,
.foot-in > span a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-inline: 10px;
  border-radius: 9px;
}

.foot-in > span a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.foot-links a:hover,
.foot-in > span a:hover {
  background: var(--surface);
}

.lightbox {
  overflow: auto;
  background: rgba(8, 13, 11, .9);
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  border-radius: var(--radius-md);
}

@media (hover: hover) {
  .feature,
  .subject {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  }

  .feature:hover,
  .subject:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 36%, var(--hairline));
    box-shadow: var(--shadow-md);
  }
}

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

  .hero-grid > div:first-child {
    max-width: 700px;
  }

  .hero-shot {
    width: min(380px, 100%);
  }

  .org-lead {
    grid-template-columns: 1fr;
  }

  .grading-video {
    width: 100%;
  }
}

@media (max-width: 820px) {
  #video .wrap {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  #video .sec-head {
    margin-bottom: 0;
  }

  .demo-video {
    width: min(420px, 100%);
    margin-inline: auto;
  }
}

@media (max-width: 760px) {
  .subjects {
    grid-template-columns: 1fr;
  }

  .subject {
    min-height: 0;
  }

  .quality {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .quality > article {
    padding: 28px 24px;
  }

  .quality > article + article {
    border-top: 1px solid var(--hairline);
    border-left: 0;
  }
}

@media (max-width: 700px) {
  .features {
    grid-template-columns: 1fr;
  }

  .flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .flow .arrow {
    display: none;
  }

  .flow .step {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .wrap,
  .nav-in,
  .foot-in {
    width: min(calc(100% - 32px), var(--content-width));
  }

  section {
    padding-block: 64px;
  }

  .feature-chapter {
    padding-block: 0;
  }

  .feature-intro {
    padding-block: 64px;
  }

  .nav-in {
    height: 58px;
  }

  .brand {
    font-size: 15.5px;
  }

  .brand .glyph {
    width: 26px;
    height: 26px;
    margin-right: 7px;
    font-size: 16px;
  }

  .nav-links {
    gap: 0;
  }

  .nav-links .keep {
    min-height: 44px;
    padding-inline: 12px;
    color: var(--on-accent);
    background: var(--accent-strong);
  }

  .hero {
    padding-block: 58px 68px;
  }

  .hero-grid {
    gap: 40px;
  }

  .hero h1 {
    font-size: clamp(31px, 9vw, 40px);
  }

  .section-head h2 {
    font-size: clamp(23px, 7vw, 30px);
  }

  .feature-subsection::before {
    width: min(calc(100% - 32px), var(--content-width));
  }

  .subsection-head {
    display: block;
    margin-bottom: 28px;
  }

  .subsection-head .kicker {
    width: auto;
    min-height: 28px;
    margin: 0 0 12px;
    padding-inline: 10px;
  }

  .subsection-head h3 {
    margin-top: 0;
    font-size: clamp(21px, 6vw, 26px);
  }

  .subsection-head p {
    margin-top: 10px;
  }

  .org-lead {
    padding: 24px 20px;
  }

  .badge-dev {
    display: table;
    margin: 10px 0 0;
    vertical-align: initial;
  }

  .foot-in {
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .cta-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cta-row .btn {
    width: 100%;
  }

  .grade-row .btn {
    width: 100%;
  }

  .demo-card {
    padding: 22px 16px;
  }

  .opt {
    padding: 12px;
  }

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

  .foot-in {
    flex-direction: column;
  }

  .foot-links {
    margin-left: -10px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
