:root {
  --learn-bg: #090b0e;
  --learn-surface: #11151a;
  --learn-surface-2: #171c22;
  --learn-ink: #eef1f4;
  --learn-muted: #a6afb9;
  --learn-line: #343b45;
  --learn-gold: #e0bb66;
  --learn-good: #82b99a;
  --learn-warn: #e58a3b;
  --learn-bad: #ed6265;
}

html { scroll-behavior: smooth; }
body.learning-page { background: var(--learn-bg); color: var(--learn-ink); }
.learning-page table { min-width: 0; }
.learning-page .site-nav__inner,
.learning-page .footer__inner { width: min(1180px, calc(100% - 32px)); }

.crumbs {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--learn-muted);
  font-size: 12px;
}
.crumbs a { color: var(--learn-muted); text-decoration: none; }
.crumbs a:hover { color: var(--learn-ink); }

.utility-hero {
  min-height: 500px;
  height: min(540px, calc(100svh - 84px));
  position: relative;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--learn-line);
  background-color: #090b0e;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
}
.utility-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(5, 7, 9, .98) 0%, rgba(5, 7, 9, .88) 38%, rgba(5, 7, 9, .34) 70%, rgba(5, 7, 9, .12) 100%), linear-gradient(0deg, rgba(5, 7, 9, .84), transparent 58%);
}
.utility-hero__inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 42px;
}
.utility-hero__copy { max-width: 670px; }
.utility-hero h1 {
  margin: 8px 0 12px;
  max-width: 760px;
  color: #fff;
  font: 760 58px/1.02 Georgia, serif;
  text-shadow: 0 3px 24px rgba(0, 0, 0, .72);
}
.utility-hero p { max-width: 650px; color: #d9dee4; font-size: 18px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; color: #c6cdd4; font-size: 12px; }
.hero-facts span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 7px 1px 0; border-radius: 50%; background: var(--learn-good); }

.learning-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 44px 0 78px; }
.answer-block { max-width: 820px; margin-bottom: 36px; }
.answer-block h2 { margin: 7px 0 12px; font: 750 34px/1.16 Georgia, serif; }
.answer-block p { color: var(--learn-muted); font-size: 17px; }
.review-by { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; color: var(--learn-muted); font-size: 12px; }
.review-by strong { color: var(--learn-ink); }

.tool-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 28px; align-items: start; }
.tool-frame { min-width: 0; border: 1px solid var(--learn-line); border-radius: 7px; background: var(--learn-surface); padding: 18px; }
.tool-frame h2, .tool-frame h3 { margin: 5px 0 10px; font-family: Georgia, serif; }
.tool-frame > p { color: var(--learn-muted); }
.tool-image { width: 100%; height: auto; display: block; border: 1px solid var(--learn-line); border-radius: 6px; background: #090b0e; }
.tool-context { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 10px; color: var(--learn-muted); font-size: 12px; }
.tool-side { min-width: 0; }
.game-embed { width: 100%; height: 650px; display: block; border: 1px solid var(--learn-line); border-radius: 7px; background: #07090b; }

.choice-list { display: grid; gap: 8px; margin-top: 16px; }
.choice {
  min-height: 52px;
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--learn-line);
  border-radius: 6px;
  background: var(--learn-surface-2);
  color: var(--learn-ink);
  text-align: left;
  cursor: pointer;
  font-weight: 750;
}
.choice:hover { border-color: #59636e; }
.choice[aria-pressed="true"] { border-color: var(--learn-gold); background: rgba(224, 187, 102, .08); }
.choice-key { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #4d5661; border-radius: 50%; color: var(--learn-muted); font-size: 11px; }
.choice-result { margin-top: 14px; padding: 13px 14px; border-left: 3px solid var(--learn-gold); background: rgba(224, 187, 102, .05); color: var(--learn-muted); }
.choice-result[hidden] { display: none; }
.choice-result strong { color: var(--learn-ink); }
.choice-result[data-state="correct"] { border-color: var(--learn-good); }
.choice-result[data-state="revise"] { border-color: var(--learn-warn); }

.field { margin-top: 14px; }
.field label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--learn-muted); font-size: 12px; }
.field input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--learn-gold); }
.field input[type="number"], .field select {
  width: 100%; min-height: 44px; border: 1px solid var(--learn-line); border-radius: 6px; background: #0c0f13; color: var(--learn-ink); padding: 0 11px;
}
.tool-output { margin-top: 16px; padding: 14px 0; border-top: 1px solid var(--learn-line); border-bottom: 1px solid var(--learn-line); }
.tool-output strong { display: block; color: var(--learn-gold); font: 750 27px/1.1 Georgia, serif; }
.tool-output span { display: block; margin-top: 6px; color: var(--learn-muted); }

.sample-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; align-items: end; height: 150px; margin-top: 18px; }
.sample-bar { min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; color: var(--learn-muted); font-size: 11px; }
.sample-bar i { width: 100%; min-height: 4px; border-radius: 3px 3px 0 0; background: var(--learn-good); transition: height 220ms ease; }

.article-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(240px, 1fr); gap: 70px; align-items: start; }
.article h1 { margin: 8px 0 16px; font: 760 48px/1.05 Georgia, serif; }
.article h2 { margin: 42px 0 12px; font: 740 29px/1.18 Georgia, serif; }
.article h3 { margin: 28px 0 8px; font: 730 20px/1.25 Georgia, serif; }
.article p, .article li { color: var(--learn-muted); }
.article strong { color: var(--learn-ink); }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 8px 0; }
.article figure { margin: 28px 0; }
.article figure img { width: 100%; height: auto; display: block; border: 1px solid var(--learn-line); border-radius: 6px; }
.article figcaption { margin-top: 8px; color: var(--learn-muted); font-size: 12px; }
.article-aside { position: sticky; top: 82px; border-top: 1px solid var(--learn-line); padding-top: 16px; }
.article-aside strong { display: block; margin-bottom: 8px; }
.article-aside a { min-height: 38px; display: flex; align-items: center; color: var(--learn-muted); text-decoration: none; font-size: 13px; }
.article-aside a:hover { color: var(--learn-ink); }

.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.topic-card { min-height: 190px; display: flex; flex-direction: column; padding: 19px; border: 1px solid var(--learn-line); border-radius: 7px; background: var(--learn-surface); text-decoration: none; }
.topic-card:hover { border-color: #58616c; }
.topic-card small { color: var(--learn-gold); font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.topic-card h2, .topic-card h3 { margin: 9px 0; font: 740 22px/1.2 Georgia, serif; }
.topic-card p { color: var(--learn-muted); font-size: 14px; }
.topic-card span { margin-top: auto; color: var(--learn-gold); font-size: 13px; font-weight: 750; }

.lesson-band { margin-top: 48px; padding: 42px 0; border-top: 1px solid var(--learn-line); border-bottom: 1px solid var(--learn-line); }
.lesson-band h2 { margin: 5px 0 12px; font: 750 34px/1.16 Georgia, serif; }
.lesson-band p { max-width: 760px; color: var(--learn-muted); }
.next-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.next-links a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 13px; border: 1px solid var(--learn-line); border-radius: 6px; color: var(--learn-ink); text-decoration: none; font-size: 13px; font-weight: 700; }
.next-links a:hover { border-color: var(--learn-gold); }

@media (max-width: 900px) {
  .tool-layout, .article-layout { grid-template-columns: 1fr; gap: 24px; }
  .article-aside { position: static; }
  .topic-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .utility-hero { min-height: 480px; height: min(520px, calc(100svh - 102px)); background-position: 58% center; }
  .utility-hero::before { background: linear-gradient(0deg, rgba(5, 7, 9, .98) 0%, rgba(5, 7, 9, .8) 62%, rgba(5, 7, 9, .34) 100%); }
  .utility-hero h1 { font-size: 40px; }
  .utility-hero p { font-size: 16px; }
  .learning-shell { padding-top: 30px; }
  .answer-block h2, .lesson-band h2 { font-size: 28px; }
  .article h1 { font-size: 38px; }
  .topic-grid { grid-template-columns: 1fr; }
  .tool-frame { padding: 12px; }
  .game-embed { height: 620px; }
}

@media (max-width: 480px) {
  .learning-page .nav-links { overflow: visible; }
  .learning-page .nav-links a { padding: 0 8px; }
  .learning-page .nav-links a[href="/alpha"],
  .learning-page .nav-links a[href="/pricing"],
  .learning-page .nav-links a[href="/support"] { display: none; }
  .learning-page .nav-links .nav-cta { margin-left: auto; padding: 0 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
