:root {
  --navy: #101a2d;
  --navy-2: #17243b;
  --ink: #172033;
  --muted: #687287;
  --paper: #fbfaf7;
  --paper-2: #f3f0e9;
  --white: #ffffff;
  --line: #dedbd3;
  --coral: #ef6a5b;
  --coral-dark: #c9483d;
  --teal: #16a394;
  --blue: #4b6fe8;
  --amber: #d99521;
  --red: #d74d57;
  --radius: 18px;
  --header-height: 72px;
  --shadow: 0 24px 70px rgba(16, 26, 45, 0.12);
  --body-size: 17px;
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.search-open { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; touch-action: manipulation; }
img { max-width: 100%; }
::selection { background: rgba(239, 106, 91, 0.22); }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  padding: .75rem 1rem;
  background: var(--white);
  color: var(--ink);
  border-radius: 10px;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(222, 219, 211, .8);
  background: rgba(251, 250, 247, .9);
  backdrop-filter: blur(18px) saturate(150%);
}
.home .site-header {
  position: fixed;
  inset: 0 0 auto;
  color: #fff;
  border-bottom-color: rgba(255,255,255,.12);
  background: rgba(16, 26, 45, .72);
}
.header-inner {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  color: inherit;
  text-decoration: none;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.34rem;
  font-weight: 650;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px 9px 9px 3px;
  background: var(--coral);
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: .92rem;
  font-weight: 800;
}
.desktop-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.desktop-nav a {
  color: inherit;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 650;
  opacity: .68;
  transition: opacity .2s ease, color .2s ease;
}
.desktop-nav a:hover, .desktop-nav a[aria-current="page"] { opacity: 1; }
.header-search, .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  padding: 0 .9rem;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.home .header-search { border-color: rgba(255,255,255,.24); }
.header-search:hover { transform: translateY(-1px); border-color: var(--coral); }
.kbd {
  opacity: .55;
  font-size: .68rem;
  padding: .08rem .35rem;
  border: 1px solid currentColor;
  border-radius: 5px;
}
.menu-toggle { display: none; width: 42px; padding: 0; }
.mobile-nav { display: none; }

.home-hero {
  position: relative;
  min-height: 720px;
  height: 100svh;
  max-height: 980px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.11) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, transparent 0, #000 58%, #000 100%);
  opacity: .45;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  padding-top: var(--header-height);
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(520px, 1.08fr);
  align-items: center;
  gap: 5vw;
}
.hero-kicker, .eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 1.3rem;
  color: var(--coral);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero-kicker::before, .eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: currentColor;
}
.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(3.7rem, 5.8vw, 6.3rem);
  line-height: .93;
  font-weight: 560;
  letter-spacing: -.055em;
}
.hero-copy h1 em { color: var(--coral); font-weight: 560; }
.hero-lead {
  max-width: 620px;
  margin: 1.7rem 0 0;
  color: rgba(255,255,255,.72);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
}
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2.2rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 48px;
  padding: .72rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 760;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: #f47a6d; box-shadow: 0 12px 30px rgba(239, 106, 91, .25); }
.btn-light { color: #fff; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.06); }
.btn-light:hover { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.1); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-outline { border-color: var(--line); background: var(--white); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }

.hero-visual {
  position: relative;
  min-height: 610px;
  align-self: end;
}
.hero-graph {
  position: absolute;
  inset: 5% -8% 0 0;
  width: 108%;
  height: 95%;
  overflow: visible;
}
.graph-axis { stroke: rgba(255,255,255,.28); stroke-width: 1.5; }
.graph-grid { stroke: rgba(255,255,255,.08); stroke-width: 1; }
.graph-curve {
  fill: none;
  stroke: var(--coral);
  stroke-width: 5;
  stroke-linecap: round;
  filter: drop-shadow(0 12px 18px rgba(239,106,91,.22));
  stroke-dasharray: 1050;
  stroke-dashoffset: 1050;
  animation: drawCurve 1.6s .25s cubic-bezier(.2,.7,.2,1) forwards;
}
.graph-tangent { stroke: #4fd7c8; stroke-width: 3; stroke-dasharray: 9 10; }
.graph-dot { fill: #fff; stroke: var(--coral); stroke-width: 5; }
.graph-label { fill: rgba(255,255,255,.78); font: 600 16px Manrope, sans-serif; }
@keyframes drawCurve { to { stroke-dashoffset: 0; } }
.formula-note {
  position: absolute;
  right: 2%;
  top: 12%;
  max-width: 240px;
  padding: 1.1rem 1.25rem;
  border-left: 2px solid var(--coral);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.74);
  backdrop-filter: blur(8px);
  transform: translateY(16px);
  opacity: 0;
  animation: riseIn .7s .8s ease forwards;
}
.formula-note strong { display: block; color: #fff; font-family: "Newsreader", serif; font-size: 1.45rem; }
@keyframes riseIn { to { opacity: 1; transform: none; } }

.trust-bar { background: #0b1425; color: #fff; }
.trust-inner {
  width: min(1440px, calc(100% - 64px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: rgba(255,255,255,.66);
  font-size: .82rem;
}
.trust-item { display: flex; align-items: center; gap: .65rem; }
.trust-item b { color: #fff; }
.trust-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--teal); }

.section { padding: 7rem 0; }
.section-inner { width: min(1280px, calc(100% - 64px)); margin: 0 auto; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 3rem; margin-bottom: 3rem; }
.section-head h2, .level-hero h1 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: -.045em;
  font-weight: 570;
}
.section-head p { max-width: 520px; margin: 0; color: var(--muted); }
.levels { background: var(--paper); }
.level-lines { border-top: 1px solid var(--line); }
.level-line {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 2rem;
  min-height: 154px;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: color .25s ease;
}
.level-line::after {
  content: "";
  position: absolute;
  inset: 0 -2rem;
  z-index: -1;
  background: var(--white);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .25s ease;
}
.level-line:hover::after { transform: scaleY(1); }
.level-line:hover { color: var(--coral-dark); }
.level-code { color: var(--muted); font-size: .73rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.level-title { font-family: "Newsreader", serif; font-size: clamp(2rem, 3vw, 3.25rem); line-height: 1; }
.level-meta { display: block; margin-top: .55rem; color: var(--muted); font-family: Manrope, sans-serif; font-size: .83rem; }
.level-arrow { font-size: 1.8rem; transition: transform .25s ease; }
.level-line:hover .level-arrow { transform: translateX(8px); }
.level-line.is-muted { opacity: .48; }

.experience { background: var(--white); }
.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.experience-step {
  min-height: 310px;
  padding: 2.4rem 2.2rem 2.5rem 0;
}
.experience-step + .experience-step {
  padding-left: 2.2rem;
  border-left: 1px solid var(--line);
}
.experience-step > span {
  color: var(--coral);
  font: 750 .72rem/1 "JetBrains Mono", monospace;
  letter-spacing: .12em;
}
.experience-step h3 {
  margin: 4.2rem 0 .9rem;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.85rem, 2.6vw, 2.7rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 570;
}
.experience-step p { margin: 0; color: var(--muted); font-size: .9rem; }

/* Avis */
.reviews-section { background: var(--white); }
.reviews-head { align-items: end; }
.reviews-intro { width: min(100%, 520px); }
.reviews-intro > p { margin: 0; color: var(--muted); }
.reviews-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.reviews-summary > strong {
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: 3.25rem;
  font-weight: 570;
  line-height: .82;
  letter-spacing: -.045em;
}
.reviews-summary > span { display: grid; gap: .25rem; }
.reviews-summary [data-reviews-stars] {
  --reviews-score: 0%;
  background: linear-gradient(90deg, var(--coral) 0 var(--reviews-score), var(--line) var(--reviews-score) 100%);
  background-clip: text;
  color: transparent;
  font-size: .9rem;
  letter-spacing: .12em;
  -webkit-background-clip: text;
}
.reviews-summary small { color: var(--muted); font-size: .72rem; }
.reviews-feed { min-height: 180px; }
.reviews-loading,
.reviews-error {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}
.reviews-loading-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(239, 106, 91, .32);
  animation: reviewsPulse 1.45s ease-out infinite;
}
@keyframes reviewsPulse {
  70% { box-shadow: 0 0 0 10px rgba(239, 106, 91, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 106, 91, 0); }
}
.reviews-error { flex-direction: column; }
.reviews-error p { margin: 0; }
.reviews-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 3rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}
.reviews-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.review-item {
  min-width: 0;
  min-height: 238px;
  display: flex;
  flex-direction: column;
  padding: 2rem 2.25rem 2.25rem 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.review-item:nth-child(even) {
  padding-right: 0;
  padding-left: 2.25rem;
  border-left: 1px solid var(--line);
}
.review-stars {
  color: var(--coral);
  font-size: .78rem;
  letter-spacing: .12em;
}
.review-item blockquote {
  margin: 1.15rem 0 2rem;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 570;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-wrap: pretty;
}
.review-byline {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  margin-top: auto;
  color: var(--muted);
  font-size: .74rem;
}
.review-byline strong { color: var(--ink); font-size: .82rem; }
.review-byline span::before { content: "·"; margin-right: .65rem; }

.review-contribution { background: var(--navy); color: #fff; }
.review-form-layout {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(520px, 1.28fr);
  gap: 8vw;
  align-items: start;
}
.review-form-copy .eyebrow { color: #65d2c6; }
.review-form-copy h2 {
  max-width: 540px;
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.7rem, 4.6vw, 4.8rem);
  font-weight: 570;
  line-height: 1;
  letter-spacing: -.045em;
}
.review-form-copy > p:last-child { max-width: 500px; margin: 1.5rem 0 0; color: rgba(255,255,255,.62); }
.review-form {
  position: relative;
  display: grid;
  gap: 1.35rem;
  padding-top: 1.8rem;
  border-top: 1px solid rgba(255,255,255,.18);
}
.review-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.review-field { display: grid; gap: .5rem; min-width: 0; }
.review-field > span,
.review-rating legend {
  color: rgba(255,255,255,.72);
  font-size: .73rem;
  font-weight: 750;
}
.review-field small { color: rgba(255,255,255,.4); font-size: .68rem; font-weight: 600; }
.review-field input,
.review-field textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  color: #fff;
  padding: .85rem .95rem;
  outline: 0;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.review-field input { min-height: 48px; }
.review-field textarea { min-height: 142px; resize: vertical; line-height: 1.6; }
.review-field input::placeholder,
.review-field textarea::placeholder { color: rgba(255,255,255,.32); }
.review-field input:focus,
.review-field textarea:focus {
  border-color: #65d2c6;
  background: rgba(255,255,255,.08);
  box-shadow: 0 0 0 3px rgba(101,210,198,.12);
}
.review-rating { min-width: 0; margin: 0; padding: 0; border: 0; }
.review-rating legend { margin-bottom: .55rem; }
.review-rating-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.review-rating-options label { position: relative; min-width: 0; cursor: pointer; }
.review-rating-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.review-rating-options label > span {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 11px;
  background: rgba(255,255,255,.055);
  color: rgba(255,255,255,.7);
  font-size: .78rem;
  font-weight: 750;
  transition: transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease;
}
.review-rating-options label:hover > span { transform: translateY(-1px); border-color: rgba(255,255,255,.48); color: #fff; }
.review-rating-options input:checked + span { border-color: var(--coral); background: var(--coral); color: #fff; }
.review-rating-options input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 3px; }
.review-rating-options b { color: #ffd276; font-size: .82rem; }
.review-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.review-form-footer { display: flex; align-items: center; gap: 1.2rem; }
.review-form-footer .btn { flex: 0 0 auto; border: 0; }
.review-form-footer .btn:disabled { cursor: wait; opacity: .62; transform: none; box-shadow: none; }
.review-form-footer p { max-width: 490px; margin: 0; color: rgba(255,255,255,.44); font-size: .67rem; line-height: 1.55; }
.review-form-status { min-height: 1.4em; margin: -.25rem 0 0; color: rgba(255,255,255,.68); font-size: .76rem; }
.review-form-status.is-success { color: #78e0d4; }
.review-form-status.is-error { color: #ff9e94; }

.manifesto { background: var(--paper-2); }
.manifesto-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 7vw; align-items: start; }
.manifesto-number { font-family: "Newsreader", serif; color: var(--coral); font-size: 8rem; line-height: .8; }
.manifesto-copy blockquote {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: clamp(2.2rem, 4vw, 4.3rem);
  line-height: 1.05;
  letter-spacing: -.04em;
}
.manifesto-copy p { max-width: 680px; margin: 2rem 0 0; color: var(--muted); }

.site-footer { padding: 4.5rem 0 2rem; background: var(--navy); color: #fff; }
.footer-inner { width: min(1280px, calc(100% - 64px)); margin: 0 auto; }
.footer-top { display: flex; align-items: start; justify-content: space-between; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-copy { max-width: 440px; margin-top: 1rem; color: rgba(255,255,255,.55); font-size: .86rem; }
.footer-links { display: flex; gap: 3rem; }
.footer-links a { display: block; margin: .35rem 0; color: rgba(255,255,255,.68); text-decoration: none; font-size: .84rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.7rem; color: rgba(255,255,255,.38); font-size: .72rem; }

/* Catalogues */
.level-hero { padding: 5.3rem 0 4.5rem; background: var(--navy); color: #fff; overflow: hidden; }
.level-hero-inner { width: min(1280px, calc(100% - 64px)); margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: end; }
.level-hero .eyebrow { color: #65d2c6; }
.level-hero p { max-width: 650px; margin: 1.35rem 0 0; color: rgba(255,255,255,.64); }
.level-hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; }
.level-count { font-family: "Newsreader", serif; color: var(--coral); font-size: 5rem; line-height: .8; text-align: right; }
.level-count span { display: block; margin-top: .6rem; color: rgba(255,255,255,.5); font-family: Manrope, sans-serif; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.catalogue { padding: 4.5rem 0 7rem; }
.catalogue-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: end; margin-bottom: 3rem; }
.catalogue-intro h2, .pack-layout h2, .faq-layout h2, .exam-main h2, .research-layout h2, .upcoming-layout h2 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.4rem, 4.5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -.045em;
  font-weight: 570;
}
.catalogue-intro > p { max-width: 570px; margin: 0; color: var(--muted); }
.category-filters { display: flex; gap: .55rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-chip {
  min-height: 38px;
  padding: .45rem .95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 750;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.filter-chip:hover, .filter-chip.is-active { border-color: var(--navy); background: var(--navy); color: #fff; }
.catalogue-tools { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.2rem; }
.catalogue-tools p { margin: 0; color: var(--muted); font-size: .88rem; }
.catalogue-search { position: relative; width: min(360px, 100%); }
.catalogue-search input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 0 1rem 0 2.8rem;
  color: var(--ink);
  outline: none;
}
.catalogue-search input:focus { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(239,106,91,.1); }
.catalogue-search svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.course-list { border-top: 1px solid var(--line); }
.course-row {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 210px auto;
  gap: 1.6rem;
  align-items: center;
  min-height: 130px;
  padding: 1.5rem .25rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background .2s ease, padding .2s ease;
}
.course-row:hover { background: var(--white); padding-left: 1rem; padding-right: 1rem; }
.course-number { color: var(--coral); font-size: .76rem; font-weight: 850; letter-spacing: .12em; }
.course-row h2 { margin: 0; font-family: "Newsreader", serif; font-size: clamp(1.65rem, 2.4vw, 2.45rem); line-height: 1.08; font-weight: 570; }
.course-row p { margin: .55rem 0 0; color: var(--muted); font-size: .84rem; }
.course-topics { color: var(--muted); font-size: .78rem; line-height: 1.6; }
.course-action { display: flex; align-items: center; gap: .55rem; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.course-row:hover .course-action { color: var(--coral-dark); }
.course-row-static { cursor: default; }
.course-row[hidden] { display: none !important; }
.empty-state { padding: 3rem 0; color: var(--muted); }

/* Terminale */
.pack-section { padding: 6.5rem 0; background: var(--navy); color: #fff; }
.pack-layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7vw; align-items: center; }
.pack-layout .eyebrow { color: #65d2c6; }
.pack-layout p:not(.eyebrow) { max-width: 650px; margin: 1.5rem 0 0; color: rgba(255,255,255,.62); }
.pack-action { min-width: 290px; display: grid; justify-items: end; gap: 1rem; }
.pack-price { font-family: "Newsreader", serif; color: var(--coral); font-size: 5.5rem; line-height: .75; }
.pack-action small { color: rgba(255,255,255,.45); font-size: .72rem; }
.faq-section { background: var(--paper-2); }
.faq-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8vw; align-items: start; }
.faq-layout > div:first-child > p:last-child { max-width: 520px; margin: 1.6rem 0 0; color: var(--muted); }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 1.4rem 2.4rem 1.4rem 0; list-style: none; cursor: pointer; font-weight: 760; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: .3rem; top: 1.15rem; color: var(--coral); font-family: "Newsreader", serif; font-size: 1.7rem; font-weight: 500; transition: transform .2s ease; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { max-width: 680px; margin: 0; padding: 0 2.5rem 1.5rem 0; color: var(--muted); font-size: .88rem; }

/* Sujets */
.exam-section { background: var(--paper); }
.exam-list { border-top: 1px solid var(--line); }
.exam-item { display: grid; grid-template-columns: 100px minmax(0, 1fr) 230px; gap: clamp(2rem, 5vw, 5rem); align-items: start; padding: 4rem 0; border-bottom: 1px solid var(--line); }
.exam-index { display: grid; gap: .35rem; color: var(--coral); }
.exam-index span { font-size: .68rem; font-weight: 850; letter-spacing: .14em; }
.exam-index strong { font-family: "Newsreader", serif; font-size: 4rem; line-height: .8; font-weight: 570; }
.exam-kicker { margin-bottom: 1rem; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.exam-main h2 { max-width: 760px; font-size: clamp(2.6rem, 4.7vw, 5rem); }
.exam-main > p { max-width: 720px; margin: 1.5rem 0 0; color: var(--muted); }
.exam-topics { display: flex; flex-wrap: wrap; gap: .5rem .7rem; margin-top: 1.8rem; }
.exam-topics span { padding-bottom: .18rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.exam-actions { display: grid; gap: .75rem; padding-top: 1.9rem; }
.exam-actions .btn { width: 100%; }
.exam-actions small { margin-top: .35rem; color: var(--muted); text-align: center; font-size: .68rem; }
.research-note { padding: 6rem 0; background: var(--paper-2); }
.research-layout { display: grid; grid-template-columns: 140px minmax(0, 1fr) minmax(250px, .6fr); gap: 5vw; align-items: start; }
.research-symbol { color: var(--coral); font-family: "Newsreader", serif; font-size: 10rem; line-height: .7; }
.research-layout h2 { max-width: 740px; }
.research-layout > div:nth-child(2) > p:last-child { max-width: 710px; margin: 1.6rem 0 0; color: var(--muted); }
.research-layout ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.research-layout li { display: flex; gap: .8rem; padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: .83rem; font-weight: 720; }
.research-layout li span { color: var(--coral); font-family: "JetBrains Mono", monospace; font-size: .68rem; }
.upcoming-section { background: var(--white); }
.upcoming-layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4rem; align-items: end; }
.upcoming-layout p:not(.eyebrow) { max-width: 700px; margin: 1.5rem 0 0; color: var(--muted); }

/* Lecteur */
.reading-progress { position: fixed; z-index: 120; left: 0; top: 0; width: 0; height: 3px; background: var(--coral); }
.reader-shell { min-height: calc(100svh - var(--header-height)); }
.reader-page { width: 100%; overflow-x: hidden; overflow-x: clip; touch-action: pan-y pinch-zoom; }
.reader-head { border-bottom: 1px solid var(--line); background: var(--white); }
.reader-head-inner { width: min(1460px, calc(100% - 64px)); min-width: 0; margin: 0 auto; padding: 2.7rem 0 2.2rem; }
.breadcrumbs { display: flex; align-items: center; gap: .45rem; margin-bottom: 1rem; color: var(--muted); font-size: .74rem; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--coral-dark); }
.reader-title-row { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.reader-title-row > *, .reader-title { min-width: 0; }
.reader-title h1 { margin: 0; overflow-wrap: break-word; hyphens: auto; text-wrap: balance; font-family: "Newsreader", serif; font-size: clamp(2.7rem, 5vw, 5rem); line-height: .96; letter-spacing: -.045em; font-weight: 570; }
.reader-title p { max-width: 720px; margin: 1rem 0 0; color: var(--muted); font-size: .9rem; }
.reader-actions { display: flex; gap: .65rem; flex-wrap: wrap; justify-content: flex-end; }
.reader-modes { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: 2rem; padding-bottom: .05rem; }
.mode-btn {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: .7rem .9rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.mode-btn:hover, .mode-btn.is-active { color: var(--ink); border-bottom-color: var(--coral); }
.reader-layout {
  width: min(1460px, calc(100% - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 790px) 190px;
  justify-content: space-between;
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: start;
  padding: 3rem 0 7rem;
}
.reader-toc { position: sticky; top: calc(var(--header-height) + 1.5rem); max-height: calc(100svh - 110px); overflow-y: auto; overflow-x: clip; scrollbar-width: thin; }
.toc-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 0; border: 0; background: transparent; text-align: left; pointer-events: none; }
.toc-toggle > span:first-child { min-width: 0; }
.toc-label, .reader-tools-label { display: block; margin-bottom: .9rem; color: var(--muted); font-size: .66rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.toc-current, .toc-chevron { display: none; }
.toc-list { display: grid; gap: .18rem; }
.toc-list a { display: block; padding: .42rem .65rem; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; overflow-wrap: break-word; hyphens: auto; font-size: .75rem; line-height: 1.45; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.toc-list a[hidden] { display: none !important; pointer-events: none; }
.toc-list a:hover, .toc-list a.is-active { color: var(--ink); border-left-color: var(--coral); background: rgba(239,106,91,.06); }
.reader-article { min-width: 0; max-width: 790px; margin-inline: auto; font-family: "Manrope", sans-serif; font-size: var(--body-size); line-height: 1.74; }
.reader-article :where(h2, h3, h4, p, li, figcaption, .callout-title) { overflow-wrap: break-word; hyphens: auto; }
.course-part { margin-bottom: 5rem; }
.course-part[hidden] { display: none !important; }
.course-part > h2 {
  margin: 0 0 2rem;
  padding-top: 1rem;
  font-family: "Newsreader", serif;
  font-size: clamp(2.25rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 580;
}
.reader-article h3 { margin: 2.8rem 0 1rem; font-family: "Newsreader", serif; font-size: 2rem; line-height: 1.12; font-weight: 600; letter-spacing: -.025em; }
.reader-article h4 { margin: 2rem 0 .8rem; font-size: 1.05rem; }
.reader-article p { margin: 0 0 1.3rem; text-wrap: pretty; }
.reader-article ul, .reader-article ol { margin: .7rem 0 1.25rem; padding-left: 1.45rem; }
.reader-article li { margin: .38rem 0; padding-left: .25rem; }
.reader-article strong { font-weight: 820; }
.reader-article code { font-family: "JetBrains Mono", Consolas, monospace; }
.lesson-callout {
  --callout: var(--blue);
  position: relative;
  margin: 1.5rem 0;
  padding: 1.25rem 1.35rem 1.15rem;
  border-left: 4px solid var(--callout);
  background: color-mix(in srgb, var(--callout) 7%, white);
}
.lesson-callout.definition { --callout: var(--blue); }
.lesson-callout.theorem, .lesson-callout.property { --callout: var(--teal); }
.lesson-callout.method { --callout: var(--amber); }
.lesson-callout.warning { --callout: var(--red); }
.lesson-callout.example { --callout: #358bd0; }
.lesson-callout.intuition { --callout: #d79a23; }
.lesson-callout.proof { --callout: #738097; background: #f7f8fa; }
.callout-title { margin-bottom: .72rem; color: var(--callout); font-size: .77rem; font-weight: 900; line-height: 1.42; letter-spacing: .03em; text-wrap: pretty; }
.lesson-callout > :last-child { margin-bottom: 0; }
.math-block { min-width: 0; max-width: 100%; overflow: hidden; overflow: clip; margin: .9rem 0; padding: .3rem .2rem; text-align: center; }
.math-block mjx-container[display="true"] { max-width: 100%; margin: 0 auto !important; }
.lesson-callout > p:has(+ .math-block) { margin-bottom: .65rem; }
.lesson-callout > .math-block:has(+ p) { margin-bottom: .65rem; }
.math-inline { display: inline-block; max-width: 100%; white-space: nowrap; vertical-align: -.08em; }
.math-inline mjx-container, .math-block mjx-container { max-width: 100%; transform-origin: center center; }
.reader-article .math-inline > mjx-container { font-size: 1.06em; }
.reader-article .math-block > mjx-container[display="true"] { font-size: 1.14em; }
.reader-article .latex-table .math-inline > mjx-container { font-size: max(1.08em, .94rem); }
.math-inline.math-is-scaled, .math-block.math-is-scaled { max-width: 100%; }
.math-inline.math-is-scrollable, .math-block.math-is-scrollable { max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.math-block.math-is-scrollable { width: 100%; }
.code-block { position: relative; max-width: 100%; overflow: hidden; margin: 1.3rem 0; padding: 1.15rem 1.25rem; border-radius: 12px; background: #111a2b; color: #e7edf7; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; font: .78rem/1.7 "JetBrains Mono", Consolas, monospace; tab-size: 2; }
.visual-placeholder { margin: 1.2rem 0; padding: 1rem 1.2rem; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); background: var(--paper-2); font-size: .8rem; }
.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; }
.course-figure { width: 100%; max-width: 100%; margin: 1.8rem auto 2rem; overflow: clip; }
.course-figure img, .reader-article img, .reader-article svg, .reader-article canvas { display: block; width: auto; max-width: 100%; height: auto; margin-inline: auto; object-fit: contain; }
.course-figure > img { width: min(100%, var(--figure-upscale-limit, 100%)); }
.course-figure.figure-tall > img { width: min(100%, 340px, var(--figure-upscale-limit, 340px)); }
.course-figure.figure-portrait > img { width: min(100%, 440px, var(--figure-upscale-limit, 440px)); }
.course-figure.figure-square > img { width: min(100%, 540px, var(--figure-upscale-limit, 540px)); }
.course-figure.figure-landscape > img { width: min(100%, 680px, var(--figure-upscale-limit, 680px)); }
.course-figure.figure-wide > img { width: min(100%, var(--figure-upscale-limit, 100%)); }
.figure-strip-mobile { display: none; }
.course-animation { max-width: 640px; padding: .8rem; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.course-animation img { border-radius: 10px; }
.course-animation figcaption { max-width: 540px; margin: .8rem auto .15rem; color: var(--muted); text-align: center; font-size: .72rem; line-height: 1.55; }
.latex-table { width: 100%; max-width: 100%; overflow: hidden; margin: 1.5rem 0; }
.latex-table-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; margin: 1.5rem 0; }
.latex-table-pair .latex-table { margin: 0; }
.latex-table table { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--white); font-size: .82rem; overflow-wrap: anywhere; }
.latex-table.is-wide table { font-size: .72rem; }
.latex-table td, .latex-table th { padding: .7rem .75rem; border: 1px solid var(--line); text-align: left; }
.latex-table thead { font-weight: 800; background: var(--paper-2); }
.latex-table tbody th { font-weight: 750; background: color-mix(in srgb, var(--paper-2) 55%, white); }
.exercise-heading { display: block; max-width: 100%; overflow-wrap: break-word; hyphens: auto; text-wrap: balance; }
.difficulty { display: inline-flex; align-items: center; margin-inline: .2rem; color: var(--amber); letter-spacing: .08em; font-size: .78rem; white-space: nowrap; }
.reader-tools { position: sticky; top: calc(var(--header-height) + 1.5rem); }
.reader-tool { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .7rem 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); font-size: .74rem; }
.reader-tool:hover { color: var(--ink); }
.font-controls { display: flex; gap: .25rem; }
.font-controls button { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); cursor: pointer; }
.course-nav { display: grid; grid-template-columns: 1fr 1fr; margin-top: 5rem; border-top: 1px solid var(--line); }
.course-nav a { padding: 1.4rem 0; text-decoration: none; }
.course-nav a:last-child { text-align: right; }
.course-nav small { display: block; color: var(--muted); font-size: .67rem; text-transform: uppercase; letter-spacing: .1em; }
.course-nav strong { font-family: "Newsreader", serif; font-size: 1.15rem; }

/* Quizlets de validation */
.quiz-part > h2 { margin-bottom: .9rem; }
.quiz-intro { max-width: 680px; margin-bottom: 2.3rem; color: var(--muted); }
.quiz-intro p:last-child { margin-bottom: 0; }
.quiz-kicker, .quiz-answer-label {
  margin: 0 0 .55rem;
  color: var(--coral-dark);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.quiz-experience-switch {
  display: inline-flex;
  gap: .2rem;
  margin-bottom: 1.4rem;
  padding: .25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
}
.quiz-experience-btn {
  min-height: 42px;
  padding: .65rem .95rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: .69rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.quiz-experience-btn.is-active { background: var(--white); color: var(--ink); box-shadow: 0 3px 12px rgba(16, 26, 45, .08); }
.quiz-quest { min-width: 0; }
.quest-overview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 2rem;
  overflow: hidden;
  padding: clamp(1.5rem, 4.5vw, 2.7rem);
  border-radius: 18px 18px 6px 6px;
  background: var(--navy);
  color: #fff;
}
.quest-overview::after {
  position: absolute;
  right: -80px;
  bottom: -135px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255,255,255,.025), 0 0 0 76px rgba(255,255,255,.018);
  content: "";
  pointer-events: none;
}
.quest-overview-copy { position: relative; z-index: 1; max-width: 600px; }
.quest-overview .quiz-kicker { color: #ff8b7f; }
.reader-article .quest-overview h3 { margin: .55rem 0 .6rem; color: #fff; font-size: clamp(2rem, 5vw, 3.15rem); line-height: 1; text-wrap: balance; }
.reader-article .quest-overview-copy > p:last-child { max-width: 590px; margin: 0; color: rgba(255,255,255,.7); font-size: .76rem; line-height: 1.65; }
.quest-score { position: relative; z-index: 1; align-self: center; min-width: 90px; text-align: right; }
.quest-score strong { display: block; font-family: "Newsreader", Georgia, serif; font-size: clamp(3.5rem, 8vw, 5.7rem); font-weight: 500; line-height: .82; letter-spacing: -.06em; }
.quest-score span { color: rgba(255,255,255,.62); font: 700 .66rem/1.4 "JetBrains Mono", Consolas, monospace; text-transform: uppercase; }
.quest-overview-progress { position: relative; z-index: 1; grid-column: 1 / -1; height: 5px; overflow: hidden; background: rgba(255,255,255,.14); }
.quest-overview-progress span { display: block; height: 100%; background: var(--coral); transition: width .4s ease; }
.quest-overview.is-complete .quest-overview-progress span { background: var(--teal); }
.quest-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-top: 0; background: var(--white); }
.quest-delay-setting { display: inline-flex; align-items: center; gap: .7rem; cursor: pointer; }
.quest-delay-setting input { width: 38px; height: 22px; margin: 0; appearance: none; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-2); cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.quest-delay-setting input::before { display: block; width: 16px; height: 16px; margin: 2px; border-radius: 50%; background: var(--muted); content: ""; transition: transform .18s ease, background .18s ease; }
.quest-delay-setting input:checked { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 18%, white); }
.quest-delay-setting input:checked::before { transform: translateX(16px); background: var(--teal); }
.quest-delay-setting span { display: grid; }
.quest-delay-setting strong { font-size: .7rem; line-height: 1.4; }
.quest-delay-setting small { color: var(--muted); font-size: .6rem; line-height: 1.45; }
.quest-toolbar-actions { display: flex; align-items: center; gap: 1rem; }
.quest-course-link { padding: .45rem 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); font-size: .66rem; font-weight: 800; cursor: pointer; }
.quest-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1.2rem 1.3rem;
  border-left: 4px solid var(--coral);
  background: var(--white);
  box-shadow: 0 12px 34px rgba(16, 26, 45, .06);
}
.quest-next.is-cooling { border-left-color: var(--amber); }
.quest-next > div > span { color: var(--coral-dark); font: 800 .61rem/1.4 "JetBrains Mono", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.reader-article .quest-next h4 { margin: .35rem 0 .2rem; font-size: 1.1rem; }
.reader-article .quest-next p { margin: 0; color: var(--muted); font-size: .68rem; }
.quest-next.is-cooling > div > span { color: var(--amber); }
.quest-next .quiz-btn:disabled { cursor: wait; opacity: .75; transform: none; }
.quest-map { margin-top: 1.5rem; border-block: 1px solid var(--line); background: color-mix(in srgb, var(--paper-2) 72%, white); }
.quest-zone + .quest-zone { border-top: 1px solid var(--line); }
.quest-zone-toggle {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.1rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.quest-zone-toggle:hover { background: rgba(255,255,255,.48); }
.quest-zone-toggle > span:first-child { display: grid; gap: .08rem; }
.quest-zone-toggle small { color: var(--muted); font: 700 .57rem/1.4 "JetBrains Mono", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.quest-zone-toggle strong { color: var(--ink); font-size: .83rem; }
.quest-zone.is-current .quest-zone-toggle strong { color: var(--coral-dark); }
.quest-zone.is-complete .quest-zone-toggle strong { color: var(--teal); }
.quest-zone-status { display: flex; align-items: center; gap: .8rem; color: var(--coral-dark); font: 800 .64rem/1.4 "JetBrains Mono", Consolas, monospace; }
.quest-zone-status i { font-style: normal; transition: transform .18s ease; }
.quest-zone-toggle[aria-expanded="true"] .quest-zone-status i { transform: rotate(180deg); }
.quest-zone-body { padding: 0 1rem 1rem; animation: questZoneIn .2s ease both; }
@keyframes questZoneIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.reader-article .quest-checkpoints {
  display: grid;
  grid-template-columns: repeat(10, minmax(44px, 1fr));
  gap: .7rem 0;
  margin: 0;
  padding: .6rem 0;
  list-style: none;
}
.quest-waypoint { position: relative; min-height: 48px; display: grid; place-items: center; }
.quest-waypoint::before { position: absolute; z-index: 0; right: 50%; top: 22px; width: 100%; border-top: 2px dotted var(--line); content: ""; }
.quest-waypoint:nth-child(10n + 1)::before { display: none; }
.quest-waypoint.is-passed::before { border-top-style: solid; border-color: var(--teal); }
.quest-waypoint.is-current::before, .quest-waypoint.is-cooling::before { border-color: var(--coral); }
.quest-node {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--muted);
  font: 800 .65rem/1 "JetBrains Mono", Consolas, monospace;
  box-shadow: 0 5px 14px rgba(16, 26, 45, .08);
}
.quest-node.is-passed { border-color: var(--teal); background: var(--teal); color: #fff; }
.quest-node.is-current { border-color: var(--navy); background: var(--navy); color: #fff; cursor: pointer; animation: questPulse 2.2s ease-in-out infinite; }
.quest-node.is-current::after { position: absolute; inset: -8px; border: 1px solid color-mix(in srgb, var(--coral) 65%, transparent); border-radius: 50%; content: ""; }
.quest-node.is-cooling { border-color: var(--amber); background: #fff8e9; color: var(--amber); }
.quest-node.is-locked { background: color-mix(in srgb, var(--paper-2) 78%, white); color: #a8a298; box-shadow: none; }
@keyframes questPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239,106,91,.25), 0 5px 14px rgba(16,26,45,.1); } 50% { box-shadow: 0 0 0 9px rgba(239,106,91,0), 0 7px 18px rgba(16,26,45,.16); } }
.quest-card { animation: questCardIn .3s ease both; }
@keyframes questCardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.quest-card-actions { align-items: flex-start; }
.quest-challenge { padding: clamp(1.35rem, 4vw, 2.25rem); border-top: 1px solid var(--line); background: var(--paper-2); }
.quest-challenge-head { max-width: 650px; }
.quest-challenge-head > span { color: var(--coral-dark); font: 800 .61rem/1.4 "JetBrains Mono", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.reader-article .quest-challenge-head h4 { margin: .35rem 0 .2rem; font-size: 1.15rem; line-height: 1.35; }
.reader-article .quest-challenge-head p { margin: 0 0 1.1rem; color: var(--muted); font-size: .68rem; }
.quest-options { display: grid; gap: .65rem; margin: 0; padding: 0; border: 0; }
.quest-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 32px minmax(0, 1fr);
  gap: .75rem;
  align-items: start;
  min-height: 58px;
  padding: .85rem .95rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.quest-option:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--navy) 28%, var(--line)); box-shadow: 0 7px 18px rgba(16,26,45,.05); }
.quest-option:has(input:checked) { border-color: var(--navy); box-shadow: inset 3px 0 0 var(--navy); }
.quest-option input { width: 18px; height: 18px; margin: .25rem 0 0; accent-color: var(--navy); }
.quest-option-marker { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-2); color: var(--muted); font: 800 .62rem/1 "JetBrains Mono", Consolas, monospace; }
.quest-option:has(input:checked) .quest-option-marker { background: var(--navy); color: #fff; }
.quest-option-content { min-width: 0; color: var(--ink); font-size: .73rem; line-height: 1.58; }
.reader-article .quest-option-content :where(p, ul, ol, .math-block) { margin-top: .25rem; margin-bottom: .25rem; }
.reader-article .quest-option-content > :first-child { margin-top: 0; }
.reader-article .quest-option-content > :last-child { margin-bottom: 0; }
.quest-option-content :where(.latex-table, .code-block) { max-height: 240px; overflow: auto; }
.quest-option-content img { display: block; width: auto; max-height: 220px; margin: .25rem auto; object-fit: contain; }
.reader-article .quest-order-list { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.quest-order-list > li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  min-height: 62px;
  padding: .75rem .8rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
  cursor: grab;
  transition: opacity .16s ease, border-color .16s ease, transform .16s ease;
}
.quest-order-list > li:hover { border-color: color-mix(in srgb, var(--navy) 28%, var(--line)); }
.quest-order-list > li.is-dragging { opacity: .48; transform: scale(.99); }
.quest-drag-handle { color: var(--muted); font-weight: 900; letter-spacing: -.16em; }
.quest-order-controls { display: flex; gap: .3rem; }
.quest-order-controls button { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--muted); cursor: pointer; }
.quest-order-controls button:hover:not(:disabled) { border-color: var(--navy); color: var(--ink); }
.quest-order-controls button:disabled { opacity: .3; cursor: default; }
.reader-article .quest-form-message { min-height: 1.45rem; margin: .75rem 0 .15rem; color: var(--red); font-size: .68rem; font-weight: 750; }
.quest-submit { margin-top: .35rem; }
.quest-feedback {
  min-height: 470px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1.7rem, 7vw, 4.2rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}
.quest-feedback-mark { width: 68px; height: 68px; display: grid; place-items: center; margin-bottom: 1.4rem; border-radius: 50%; font-size: 1.6rem; font-weight: 900; }
.quest-feedback.is-success .quest-feedback-mark { background: color-mix(in srgb, var(--teal) 12%, white); color: var(--teal); }
.quest-feedback.is-review .quest-feedback-mark { background: color-mix(in srgb, var(--amber) 13%, white); color: var(--amber); }
.reader-article .quest-feedback h3 { max-width: 590px; margin: .45rem 0 .7rem; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.04; text-wrap: balance; }
.reader-article .quest-feedback > p:not(.quiz-kicker) { max-width: 610px; margin: 0 0 1.4rem; color: var(--muted); font-size: .78rem; }
.quest-feedback-actions, .quest-finish-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.quest-review {
  margin-top: 1rem;
  padding: clamp(1.35rem, 4vw, 2.4rem);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  background: var(--white);
  animation: questReviewIn .24s ease both;
  scroll-margin-top: 1rem;
}
.quest-review[hidden] { display: none !important; }
@keyframes questReviewIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
.quest-review-head { max-width: 700px; }
.quest-review-head > span, .quest-reference-answer > span { color: var(--teal); font: 800 .61rem/1.4 "JetBrains Mono", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.reader-article .quest-review-head h3 { margin: .4rem 0 .35rem; font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.12; }
.reader-article .quest-review-head p { margin: 0; color: var(--muted); font-size: .72rem; }
.reader-article .quest-review-options, .reader-article .quest-review-order { display: grid; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.quest-review-options > li, .quest-review-order > li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: .85rem;
  margin: 0;
  padding: 1rem .15rem;
  border-top: 1px solid var(--line);
}
.quest-review-options > li.is-selected { box-shadow: inset 3px 0 0 var(--navy); padding-left: .8rem; }
.quest-review-marker, .quest-review-index { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font: 850 .62rem/1 "JetBrains Mono", Consolas, monospace; }
.quest-review-options > li.is-correct .quest-review-marker, .quest-review-order > li.is-correct .quest-review-index { background: color-mix(in srgb, var(--teal) 14%, white); color: var(--teal); }
.quest-review-options > li.is-incorrect .quest-review-marker, .quest-review-order > li.is-incorrect .quest-review-index { background: color-mix(in srgb, var(--red) 11%, white); color: var(--red); }
.quest-review-options > li .quest-review-verdict { display: block; margin: .1rem 0 .45rem; font-size: .68rem; }
.quest-review-options > li.is-correct .quest-review-verdict { color: var(--teal); }
.quest-review-options > li.is-incorrect .quest-review-verdict { color: var(--red); }
.reader-article .quest-review-reason { margin: .45rem 0 0; color: var(--muted); font-size: .69rem; line-height: 1.55; }
.quest-reference-answer { margin-top: 1.45rem; padding-top: 1.35rem; border-top: 2px solid var(--line); }
.quest-reference-answer > div { margin-top: .8rem; color: var(--ink); font-size: .76rem; line-height: 1.7; }
.reader-article .quest-review .math-inline > mjx-container { font-size: max(1.06em, 14px) !important; }
.reader-article .quest-review .math-block > mjx-container[display="true"] { font-size: max(1.14em, 14px) !important; }
.reader-article .quest-reference-answer :where(p, ul, ol, .math-block, .latex-table, .code-block) { margin-top: .65rem; margin-bottom: .65rem; }
.quest-reference-answer :where(.latex-table, .code-block) { max-width: 100%; overflow: auto; }
.quest-reference-answer img { display: block; width: auto; max-height: 360px; margin: .7rem auto; object-fit: contain; }
.quest-finish { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.2rem 1.4rem; align-items: center; margin-top: 1rem; padding: clamp(1.4rem, 4vw, 2.3rem); border: 1px solid color-mix(in srgb, var(--teal) 35%, var(--line)); background: color-mix(in srgb, var(--teal) 6%, white); }
.quest-finish-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; font-size: 1.35rem; font-weight: 900; }
.reader-article .quest-finish h3 { margin: .2rem 0 .35rem; font-size: 1.65rem; }
.reader-article .quest-finish p:not(.quiz-kicker) { margin: 0; color: var(--muted); font-size: .72rem; }
.quest-finish-actions { grid-column: 2; }
.quiz-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 2rem; align-items: start; }
.quiz-decks { border-top: 1px solid var(--line); }
.quiz-deck {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .8rem;
  width: 100%;
  padding: 1rem .15rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: color .18s ease, padding-left .18s ease;
}
.quiz-deck:hover, .quiz-deck.is-active { padding-left: .55rem; color: var(--ink); }
.quiz-deck.is-active { box-shadow: inset 3px 0 0 var(--coral); }
.quiz-deck strong { display: block; font-size: .78rem; line-height: 1.3; }
.quiz-deck small { display: block; margin-top: .3rem; font-size: .62rem; line-height: 1.45; }
.quiz-deck-score { align-self: start; color: var(--coral-dark); font: 700 .63rem/1.4 "JetBrains Mono", Consolas, monospace; }
.quiz-workspace { min-width: 0; }
.quiz-progress-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .55rem; color: var(--muted); font-size: .66rem; font-weight: 750; }
.quiz-progress { height: 4px; overflow: hidden; margin-bottom: 1rem; background: var(--line); }
.quiz-progress span { display: block; height: 100%; background: var(--coral); transition: width .28s ease; }
.quiz-card {
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(16, 26, 45, .07);
}
.quiz-question { min-height: 390px; padding: clamp(1.6rem, 5vw, 3rem); display: flex; flex-direction: column; justify-content: center; }
.quiz-card-kind { color: var(--coral-dark); font: 800 .64rem/1.3 "JetBrains Mono", Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.reader-article .quiz-question h3 { max-width: 580px; margin: 1.2rem 0 0; font-size: clamp(1.8rem, 4.2vw, 2.75rem); line-height: 1.08; text-wrap: balance; }
.quiz-question h3 .math-inline { vertical-align: -.04em; }
.quiz-given { max-width: 580px; margin-top: 1.35rem; padding: .9rem 1rem; border-left: 3px solid var(--teal); background: color-mix(in srgb, var(--teal) 6%, white); }
.quiz-given > span, .quiz-objective > span { display: block; margin-bottom: .45rem; color: var(--muted); font: 800 .61rem/1.4 "JetBrains Mono", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.quiz-given > div { color: var(--ink); font-size: .78rem; line-height: 1.6; }
.quiz-given :where(p, ul, ol, .math-block, .latex-table) { margin-top: .55rem; margin-bottom: .55rem; }
.quiz-given > div > :first-child { margin-top: 0; }
.quiz-given > div > :last-child { margin-bottom: 0; }
.quiz-objective { max-width: 580px; margin-top: 1.25rem; }
.quiz-objective > span { color: var(--coral-dark); }
.reader-article .quiz-objective p { margin: 0; color: var(--ink); font-size: .84rem; line-height: 1.65; }
.quiz-expectations { max-width: 570px; margin-top: 1.35rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.quiz-expectations strong { display: block; margin-bottom: .55rem; color: var(--muted); font-size: .66rem; letter-spacing: .03em; }
.reader-article .quiz-expectations ul { display: flex; flex-wrap: wrap; gap: .3rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.reader-article .quiz-expectations li { position: relative; margin: 0; padding: 0 0 0 .85rem; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.quiz-expectations li::before { position: absolute; left: 0; color: var(--coral); content: "✓"; font-weight: 900; }
.reader-article .quiz-instruction { max-width: 540px; margin: 1.35rem 0 0; color: var(--muted); font-size: .68rem; line-height: 1.6; }
.quiz-answer { padding: clamp(1.4rem, 4vw, 2.35rem); border-top: 1px solid var(--line); background: var(--paper-2); animation: quizAnswerIn .28s ease both; }
.quiz-answer > :last-child { margin-bottom: 0; }
.quiz-answer .latex-table { background: var(--white); }
@keyframes quizAnswerIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.quiz-actions { display: flex; justify-content: space-between; gap: .7rem; margin-top: 1rem; }
.quiz-verdicts { display: flex; gap: .55rem; margin-left: auto; }
.quiz-verdicts[hidden], .quiz-btn[hidden] { display: none !important; }
.quiz-btn {
  min-height: 44px;
  padding: .72rem 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.quiz-btn:hover { transform: translateY(-2px); }
.quiz-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.quiz-btn-primary { background: var(--navy); color: #fff; }
.quiz-btn-secondary { border-color: var(--line); background: var(--white); color: var(--muted); }
.quiz-btn-review { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); background: color-mix(in srgb, var(--red) 8%, white); color: var(--red); }
.quiz-btn-acquired { background: var(--teal); color: #fff; }
.quiz-btn kbd { margin-left: .35rem; padding: .08rem .3rem; border: 1px solid currentColor; border-radius: 4px; background: transparent; color: inherit; font: inherit; opacity: .72; }
.quiz-summary { min-height: 450px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(1.7rem, 6vw, 4rem); border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.quiz-summary-score { color: var(--coral); font-family: "Newsreader", serif; font-size: clamp(4.5rem, 12vw, 7.5rem); line-height: .85; letter-spacing: -.06em; }
.quiz-summary-score span { margin-left: .12em; font-size: .32em; }
.reader-article .quiz-summary h3 { margin: 1.4rem 0 .65rem; }
.quiz-summary > p:not(.quiz-kicker) { max-width: 470px; color: var(--muted); font-size: .8rem; }
.quiz-summary-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .7rem; }
.quiz-empty { padding: 2rem 0; color: var(--muted); }

/* Search overlay */
.search-overlay { position: fixed; z-index: 200; inset: 0; display: none; padding: 10vh 1.2rem 1.2rem; background: rgba(10, 17, 30, .72); backdrop-filter: blur(10px); }
.search-overlay.is-open { display: block; }
.search-panel { width: min(720px, 100%); max-height: 78vh; margin: 0 auto; overflow: hidden; border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }
.search-box { position: relative; border-bottom: 1px solid var(--line); }
.search-box input { width: 100%; height: 68px; border: 0; outline: 0; padding: 0 4rem 0 1.4rem; background: transparent; color: var(--ink); font-size: 1rem; }
.search-close { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); cursor: pointer; }
.search-results { max-height: calc(78vh - 68px); overflow: auto; padding: .6rem; }
.search-box input::-webkit-search-cancel-button,
.catalogue-search input::-webkit-search-cancel-button { appearance: none; display: none; }
.search-result { display: grid; grid-template-columns: 54px 1fr auto; gap: .9rem; align-items: center; padding: .85rem; border-radius: 12px; text-decoration: none; }
.search-result:hover, .search-result:focus { background: var(--paper-2); outline: 0; }
.search-result-num { color: var(--coral); font-size: .68rem; font-weight: 850; }
.search-result-title { font-weight: 750; }
.search-result-level { color: var(--muted); font-size: .68rem; }
.search-hint { padding: 1.2rem; color: var(--muted); font-size: .8rem; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1320px) {
  .reader-layout { grid-template-columns: 220px minmax(0, 790px); justify-content: center; }
  .reader-tools { display: none; }
}

@media (max-width: 1180px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(430px, .9fr); }
  .course-row { grid-template-columns: 70px minmax(0, 1fr) auto; }
  .course-topics { display: none; }
  .exam-item { grid-template-columns: 80px minmax(0, 1fr) 210px; gap: 2rem; }
  .research-layout { grid-template-columns: 100px minmax(0, 1fr); }
  .research-layout ol { grid-column: 2; }
}

@media (max-width: 860px) {
  :root { --header-height: 64px; }
  .header-inner, .hero-inner, .trust-inner, .section-inner, .footer-inner, .level-hero-inner, .reader-head-inner, .reader-layout { width: min(760px, calc(100% - 40px)); }
  .desktop-nav, .header-search .search-label, .header-search .kbd { display: none; }
  .header-search { margin-left: auto; width: 42px; padding: 0; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav { position: fixed; z-index: 79; inset: var(--header-height) 0 auto; display: none; padding: 1rem 1.2rem 1.3rem; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
  .mobile-nav.is-open { display: grid; }
  .mobile-nav a { padding: .8rem .2rem; border-bottom: 1px solid var(--line); text-decoration: none; }
  .home-hero { height: auto; min-height: 760px; padding: 7.5rem 0 4rem; }
  .hero-inner { display: block; padding-top: 0; }
  .hero-copy h1 { font-size: clamp(3.4rem, 15vw, 5.6rem); }
  .hero-visual { min-height: 390px; margin-top: 2rem; }
  .formula-note { right: 0; top: 7%; }
  .trust-inner { min-height: 0; padding: 1.2rem 0; flex-wrap: wrap; justify-content: flex-start; }
  .section { padding: 5rem 0; }
  .section-head, .footer-top { display: block; }
  .section-head p { margin-top: 1rem; }
  .manifesto-grid { grid-template-columns: 1fr; gap: 3rem; }
  .experience-grid { grid-template-columns: 1fr; }
  .experience-step { min-height: 0; padding: 2rem 0; }
  .experience-step + .experience-step { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .experience-step h3 { margin-top: 1.7rem; }
  .reviews-list { grid-template-columns: 1fr; }
  .review-item,
  .review-item:nth-child(even) { min-height: 0; padding: 1.8rem 0 2rem; border-left: 0; }
  .review-form-layout { grid-template-columns: 1fr; gap: 3.5rem; }
  .review-form-copy h2 { max-width: 700px; }
  .review-form-copy > p:last-child { max-width: 620px; }
  .manifesto-number { font-size: 5rem; }
  .footer-links { margin-top: 2rem; }
  .level-hero { padding: 4rem 0 3rem; }
  .level-hero-inner { display: block; }
  .level-count { display: none; }
  .catalogue-tools { align-items: stretch; flex-direction: column; }
  .catalogue-intro, .pack-layout, .faq-layout, .upcoming-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .catalogue-search { width: 100%; }
  .course-row { grid-template-columns: 50px minmax(0,1fr); min-height: 116px; gap: 1rem; }
  .course-action { display: none; }
  .pack-action { min-width: 0; justify-items: start; }
  .exam-item { grid-template-columns: 64px minmax(0, 1fr); gap: 1.4rem; padding: 3rem 0; }
  .exam-actions { grid-column: 2; grid-template-columns: 1fr 1fr; padding-top: 0; }
  .exam-actions small { grid-column: 1 / -1; }
  .research-layout { grid-template-columns: 65px minmax(0, 1fr); gap: 1.5rem; }
  .research-symbol { font-size: 6rem; }
  .research-layout ol { grid-column: 2; }
  .reader-title-row { align-items: start; flex-direction: column; }
  .reader-title h1 { font-size: clamp(2.45rem, 10vw, 4rem); line-height: 1.01; text-wrap: balance; }
  .reader-actions { justify-content: flex-start; }
  .reader-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem; }
  .mode-btn { min-width: 0; white-space: normal; text-align: center; line-height: 1.35; }
  .reader-layout { display: block; padding-top: 1.5rem; }
  .reader-toc { position: static; max-width: 100%; min-width: 0; max-height: none; margin-bottom: 1.9rem; overflow: visible; }
  .toc-toggle { min-height: 56px; padding: .65rem .85rem; border: 1px solid var(--line); border-radius: 13px; background: var(--white); box-shadow: 0 8px 24px rgba(16,26,45,.045); pointer-events: auto; cursor: pointer; }
  .toc-label { margin: 0 0 .15rem; }
  .toc-current { display: block; max-width: min(68vw, 520px); overflow: hidden; color: var(--ink); font-size: .8rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
  .toc-chevron { display: block; color: var(--coral); font-size: 1.25rem; transition: transform .18s ease; }
  .reader-toc.is-open .toc-chevron { transform: rotate(180deg); }
  .toc-list { display: none; gap: .12rem; padding: .55rem .15rem .1rem; }
  .reader-toc.is-open .toc-list { display: grid; max-height: min(44svh, 360px); overflow-y: auto; overflow-x: clip; overscroll-behavior: contain; scrollbar-gutter: stable; }
  .toc-list a { padding: .65rem .8rem; border-left: 2px solid var(--line); border-bottom: 0; }
  .toc-list a.is-active { border-left-color: var(--coral); }
  .reader-article { font-size: var(--body-size); line-height: 1.76; }
  .reader-article .math-inline { max-width: 100%; vertical-align: baseline; }
}

@media (max-width: 700px) {
  .latex-table-pair { grid-template-columns: 1fr; gap: 1rem; }
  .latex-table table:not([data-rows="1"]),
  .latex-table table:not([data-rows="1"]) tbody,
  .latex-table table:not([data-rows="1"]) tr,
  .latex-table table:not([data-rows="1"]) th,
  .latex-table table:not([data-rows="1"]) td { display: block; width: 100%; }
  .latex-table table:not([data-rows="1"]) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .latex-table table:not([data-rows="1"]) tbody { display: grid; gap: .85rem; }
  .latex-table table:not([data-rows="1"]) tbody tr { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
  .latex-table table:not([data-rows="1"]) tbody th,
  .latex-table table:not([data-rows="1"]) tbody td { display: block; min-width: 0; padding: .72rem .8rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; overflow-wrap: break-word; font-size: .78rem; }
  .latex-table table:not([data-rows="1"]) tbody th[scope="row"] { display: block; padding-block: .78rem; background: var(--paper-2); font-size: .82rem; }
  .latex-table table:not([data-rows="1"]) tbody th[scope="row"]::before { display: none; }
  .latex-table table:not([data-rows="1"]) tbody tr > :last-child { border-bottom: 0; }
  .latex-table table:not([data-rows="1"]) tbody th::before,
  .latex-table table:not([data-rows="1"]) tbody td::before { content: attr(data-label); display: block; margin-bottom: .34rem; color: var(--muted); font-size: .66rem; font-weight: 850; letter-spacing: .02em; }
  .latex-table table[data-rows="1"] { font-size: .72rem; }
}

@media (max-width: 560px) {
  .header-inner, .hero-inner, .trust-inner, .section-inner, .footer-inner, .level-hero-inner, .reader-head-inner, .reader-layout { width: min(760px, calc(100% - 32px)); }
  .header-inner { gap: .55rem; }
  .brand { font-size: 1.1rem; }
  .brand-mark { width: 27px; height: 27px; }
  .hero-actions .btn { width: 100%; }
  .hero-visual { min-height: 330px; }
  .formula-note { display: none; }
  .level-line { grid-template-columns: 1fr auto; gap: .7rem; min-height: 130px; }
  .level-code { grid-column: 1 / -1; align-self: end; }
  .level-title { font-size: 2.25rem; }
  .section-head h2, .level-hero h1 { font-size: 3rem; }
  .reviews-summary { align-items: flex-end; }
  .reviews-summary > strong { font-size: 2.75rem; }
  .review-item blockquote { font-size: 1.55rem; }
  .review-form-copy h2 { font-size: 3rem; }
  .review-form-row { grid-template-columns: 1fr; }
  .review-rating-options { gap: .35rem; }
  .review-rating-options label > span { min-height: 44px; }
  .review-form-footer { display: block; }
  .review-form-footer .btn { width: 100%; }
  .review-form-footer p { margin-top: .9rem; }
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-bottom { display: block; }
  .footer-bottom span { display: block; margin-top: .45rem; }
  .reader-head-inner { padding: 1.75rem 0 1.65rem; }
  .breadcrumbs { flex-wrap: wrap; row-gap: .2rem; }
  .reader-title h1 { font-size: clamp(2rem, 9.5vw, 2.8rem); line-height: 1.06; }
  .reader-title p { margin-top: .8rem; line-height: 1.6; }
  .reader-actions { width: 100%; }
  .reader-actions .btn { flex: 1 1 100%; padding-inline: .75rem; font-size: .74rem; white-space: normal; }
  .reader-modes { gap: .25rem; margin-top: 1.45rem; }
  .mode-btn { min-width: 0; min-height: 50px; padding: .55rem .4rem; text-align: center; white-space: normal; line-height: 1.3; }
  .reader-layout { padding-top: 1.1rem; }
  .course-part { margin-bottom: 4.25rem; }
  .course-part > h2 { margin-bottom: 1.6rem; padding-top: .5rem; font-size: clamp(2rem, 10vw, 2.75rem); line-height: 1.06; text-wrap: balance; }
  .reader-article h3 { margin-top: 2.6rem; font-size: clamp(1.55rem, 8vw, 2rem); line-height: 1.13; }
  .reader-article h4 { font-size: 1rem; line-height: 1.35; }
  .reader-article p { margin-bottom: 1.35rem; }
  .reader-article ul, .reader-article ol { padding-left: 1.2rem; }
  .lesson-callout { margin-left: 0; margin-right: 0; padding: 1.15rem 1rem; }
  .course-figure { margin: 1.55rem 0 1.8rem; }
  .course-figure.figure-tall > img { width: min(78vw, 300px, var(--figure-upscale-limit, 300px)); }
  .course-figure.figure-portrait > img { width: min(88vw, 360px, var(--figure-upscale-limit, 360px)); }
  .course-figure.figure-strip > img { display: none; }
  .figure-strip-mobile { display: grid; gap: .75rem; width: 100%; }
  .figure-strip-slice { position: relative; display: block; width: 100%; overflow: hidden; border-radius: 10px; background: var(--white); }
  .course-figure .figure-strip-slice img { position: absolute; top: 0; max-width: none; height: auto; margin: 0; object-fit: initial; }
  .course-animation { padding: .55rem; }
  .math-block { margin-block: .8rem; padding: .2rem 0; }
  .difficulty { font-size: .7rem; }
  .code-block { padding: 1rem; font-size: .72rem; }
  .course-nav { grid-template-columns: 1fr; }
  .course-nav a:last-child { text-align: left; border-top: 1px solid var(--line); }
  .search-result { grid-template-columns: 44px 1fr; }
  .search-result-level { display: none; }
  .level-hero-actions .btn { width: 100%; }
  .category-filters { flex-wrap: wrap; padding-bottom: .35rem; }
  .filter-chip { flex: 0 0 auto; }
  .exam-item { grid-template-columns: 1fr; }
  .exam-index { display: flex; align-items: end; gap: .6rem; }
  .exam-index strong { font-size: 3rem; }
  .exam-actions { grid-column: 1; grid-template-columns: 1fr; }
  .exam-actions small { grid-column: 1; }
  .research-layout { grid-template-columns: 1fr; }
  .research-symbol { font-size: 5rem; }
  .research-layout ol { grid-column: 1; }
}

@media (max-width: 700px) {
  .quest-overview { gap: 1rem; }
  .quest-toolbar { flex-wrap: wrap; }
  .reader-article .quest-checkpoints { grid-template-columns: repeat(7, minmax(44px, 1fr)); }
  .quest-waypoint:nth-child(10n + 1)::before { display: block; }
  .quest-waypoint:nth-child(7n + 1)::before { display: none; }
  .quest-next { grid-template-columns: 1fr; align-items: start; }
  .quest-next .quiz-btn { justify-self: start; }
  .quest-finish { grid-template-columns: auto minmax(0, 1fr); }
  .quest-finish-actions { grid-column: 1 / -1; }
  .quiz-layout { grid-template-columns: 1fr; gap: 1.4rem; }
  .quiz-decks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; gap: .4rem; }
  .quiz-deck { min-height: 82px; padding: .8rem; border: 1px solid var(--line); border-radius: 10px; }
  .quiz-deck:hover, .quiz-deck.is-active { padding-left: .8rem; }
  .quiz-deck.is-active { border-color: var(--coral); box-shadow: inset 0 -3px 0 var(--coral); }
  .quiz-deck small { display: none; }
  .quiz-card, .quiz-question { min-height: 350px; }
}

@media (max-width: 480px) {
  .quiz-intro { margin-bottom: 1.5rem; }
  .quiz-experience-switch { width: 100%; }
  .quiz-experience-btn { flex: 1; padding-inline: .55rem; line-height: 1.3; }
  .quest-overview { grid-template-columns: 1fr; padding: 1.5rem 1.2rem; }
  .reader-article .quest-overview h3 { font-size: 2.25rem; }
  .quest-score { display: flex; align-items: baseline; gap: .55rem; min-width: 0; text-align: left; }
  .quest-score strong { font-size: 3.35rem; }
  .quest-toolbar { align-items: flex-start; padding: .9rem; }
  .quest-delay-setting small { max-width: 180px; }
  .quest-toolbar-actions { width: 100%; justify-content: space-between; }
  .quest-course-link { flex: 0 0 auto; }
  .quest-next { padding: 1.05rem; }
  .quest-next .quiz-btn { width: 100%; }
  .quest-zone-toggle { min-height: 62px; padding-inline: .8rem; }
  .quest-zone-body { padding-inline: .4rem; }
  .reader-article .quest-checkpoints { grid-template-columns: repeat(5, minmax(44px, 1fr)); }
  .quest-waypoint:nth-child(7n + 1)::before { display: block; }
  .quest-waypoint:nth-child(5n + 1)::before { display: none; }
  .quest-option { grid-template-columns: auto 28px minmax(0, 1fr); gap: .55rem; padding: .75rem .65rem; }
  .quest-option-marker { width: 28px; height: 28px; }
  .quest-order-list > li { grid-template-columns: 24px minmax(0, 1fr); gap: .55rem; }
  .quest-order-controls { grid-column: 2; justify-self: end; }
  .quest-submit { width: 100%; }
  .quest-feedback { min-height: 390px; padding: 1.6rem 1.15rem; }
  .quest-feedback-actions, .quest-feedback-actions .quiz-btn { width: 100%; }
  .quest-review { padding: 1.25rem .9rem; }
  .quest-review-options > li, .quest-review-order > li { grid-template-columns: 30px minmax(0, 1fr); gap: .65rem; padding-block: .85rem; }
  .quest-review-options > li.is-selected { padding-left: .55rem; }
  .quest-review-marker, .quest-review-index { width: 28px; height: 28px; }
  .quest-finish { grid-template-columns: 1fr; }
  .quest-finish-mark { width: 50px; height: 50px; }
  .quest-finish-actions { grid-column: 1; }
  .quest-finish-actions .quiz-btn { width: 100%; }
  .quiz-decks { grid-template-columns: 1fr; }
  .quiz-deck { min-height: 60px; }
  .quiz-card, .quiz-question { min-height: 320px; }
  .quiz-question { padding: 1.4rem 1.15rem; }
  .quiz-actions, .quiz-verdicts { width: 100%; flex-wrap: wrap; }
  .quiz-verdicts { margin-left: 0; }
  .quiz-btn { flex: 1 1 130px; }
  .quiz-summary { min-height: 380px; padding: 1.6rem 1.2rem; }
}

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

:where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--coral) !important;
  outline-offset: 3px;
}

@media (pointer: coarse) {
  .font-controls button, .reader-tool, .filter-chip { min-height: 44px; }
}

/* Message d'accueil bienveillant */
.encouragement-open { overflow: hidden; }
.encouragement-overlay {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 20, 37, .58);
  backdrop-filter: blur(8px) saturate(85%);
  opacity: 0;
  transition: opacity .28s ease;
}
.encouragement-overlay.is-visible { opacity: 1; }
.encouragement-dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100svh - 48px);
  overflow: auto;
  padding: clamp(2.4rem, 6vw, 4rem);
  border: 1px solid rgba(16, 26, 45, .08);
  border-radius: 28px 28px 28px 10px;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: 0 38px 110px rgba(5, 11, 23, .34);
  text-align: center;
  transform: translateY(22px) scale(.97);
  opacity: 0;
  transition: transform .42s cubic-bezier(.2,.75,.2,1), opacity .3s ease;
}
.encouragement-overlay.is-visible .encouragement-dialog { transform: none; opacity: 1; }
.encouragement-dialog::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 92px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: var(--coral);
  transform: translateX(-50%);
}
.encouragement-close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 1.35rem;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.encouragement-close:hover { background: #ece6db; color: var(--ink); transform: rotate(5deg); }
.encouragement-symbol {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 1.5rem;
  border-radius: 18px 18px 18px 6px;
  background: var(--coral);
  color: #fff;
  box-shadow: 0 14px 32px rgba(239, 106, 91, .22);
}
.encouragement-symbol span { transform: translateY(1px); }
.encouragement-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  margin: 0 0 .85rem;
  color: var(--teal);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.encouragement-kicker::before,
.encouragement-kicker::after { content: ""; width: 24px; height: 1px; background: currentColor; opacity: .55; }
.encouragement-dialog h2 {
  margin: 0;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.encouragement-message {
  max-width: 500px;
  margin: 1rem auto 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.8rem, 4.3vw, 2.55rem);
  font-weight: 570;
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.encouragement-gentle { max-width: 440px; margin: 1.25rem auto 0; color: var(--muted); font-size: .78rem; }
.encouragement-actions { display: flex; align-items: center; justify-content: center; gap: 1.3rem; margin-top: 2rem; }
.encouragement-actions .btn { min-width: 220px; border: 0; }
.encouragement-actions > a { color: var(--ink); font-size: .74rem; font-weight: 750; text-decoration: none; }
.encouragement-actions > a span { display: inline-block; margin-left: .25rem; color: var(--coral); transition: transform .2s ease; }
.encouragement-actions > a:hover span { transform: translateX(4px); }

@supports not (backdrop-filter: blur(8px)) {
  .encouragement-overlay { background: rgba(11, 20, 37, .78); }
}

/* Soutien */
.support-page { background: #f7f2e9; }
.support-urgent { background: #0b1425; color: #fff; }
.support-urgent > div {
  width: min(1280px, calc(100% - 64px));
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0 auto;
  font-size: .76rem;
}
.support-urgent strong { color: #ff9e94; white-space: nowrap; }
.support-urgent span { color: rgba(255,255,255,.7); }
.support-urgent a { color: #fff; font-weight: 800; text-underline-offset: 3px; }

.support-hero {
  min-height: min(780px, calc(100svh - var(--header-height) - 54px));
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
}
.support-hero-inner {
  width: min(1440px, calc(100% - 64px));
  min-height: inherit;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(520px, 1.05fr);
  align-items: center;
  gap: 5vw;
  margin: 0 auto;
}
.support-hero-copy { position: relative; z-index: 2; padding: 5rem 0; }
.support-hero-copy .eyebrow { color: #6bd8cc; }
.support-hero-copy h1 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(4rem, 7vw, 7.5rem);
  font-weight: 560;
  line-height: .86;
  letter-spacing: -.06em;
}
.support-hero-copy h1 em { color: var(--coral); font-weight: inherit; }
.support-hero-copy > p:not(.eyebrow) { max-width: 620px; margin: 1.8rem 0 0; color: rgba(255,255,255,.66); font-size: 1.05rem; }
.support-hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.support-hero-visual { position: relative; align-self: stretch; min-height: 600px; }
.support-hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% -18% 8% 0;
  background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle, #000, transparent 70%);
}
.support-envelope {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: min(440px, 76%);
  min-height: 295px;
  padding: 3.6rem 3.2rem 2.7rem;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: 0 42px 90px rgba(2, 8, 17, .35);
  transform: translate(-48%, -50%) rotate(-4deg);
  animation: supportFloat 5.5s ease-in-out infinite;
}
.support-envelope::before {
  content: "";
  position: absolute;
  inset: -18px 18px 18px -18px;
  z-index: -1;
  border: 1px solid rgba(255,255,255,.24);
  transform: rotate(7deg);
}
.support-envelope span { display: block; margin-bottom: 2rem; font-family: "Newsreader", Georgia, serif; font-size: clamp(1.5rem, 2.5vw, 2.2rem); }
.support-envelope i { display: block; width: 100%; height: 1px; margin: 1rem 0; background: #d9d4ca; }
.support-envelope i:nth-of-type(2) { width: 88%; }
.support-envelope i:nth-of-type(3) { width: 63%; }
.support-envelope b { display: block; margin-top: 2rem; color: var(--coral-dark); font: 600 .7rem/1.4 "JetBrains Mono", monospace; text-align: right; }
.support-orbit { position: absolute; border: 1px solid rgba(107,216,204,.25); border-radius: 50%; }
.support-orbit-one { width: 590px; height: 590px; right: -5%; top: 8%; }
.support-orbit-two { width: 410px; height: 410px; right: 23%; top: 25%; border-color: rgba(239,106,91,.22); }
@keyframes supportFloat { 50% { transform: translate(-48%, calc(-50% - 10px)) rotate(-2.5deg); } }

.support-receive { background: #f7f2e9; }
.support-receive-layout { display: grid; grid-template-columns: minmax(0, .72fr) minmax(520px, 1.28fr); gap: 8vw; align-items: start; }
.support-receive-copy { position: sticky; top: 120px; }
.support-receive-copy h2,
.support-write-copy h2 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.7rem, 4.8vw, 5rem);
  font-weight: 570;
  line-height: .98;
  letter-spacing: -.045em;
}
.support-receive-copy > p:last-child { max-width: 500px; margin: 1.5rem 0 0; color: var(--muted); }
.support-letter-wrap { min-width: 0; }
.support-letter {
  position: relative;
  min-height: 490px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.3rem, 5vw, 4.7rem);
  background: #fffdf8;
  box-shadow: 0 26px 80px rgba(71, 54, 34, .1);
}
.support-letter::before { content: "“"; position: absolute; right: 2rem; top: .8rem; color: rgba(239,106,91,.15); font-family: "Newsreader", serif; font-size: 8rem; line-height: 1; }
.support-letter.is-entering { animation: letterReveal .48s cubic-bezier(.2,.7,.2,1); }
@keyframes letterReveal { from { opacity: .25; transform: translateY(10px) rotate(.4deg); } }
.support-letter-salutation { position: relative; margin: 0 0 1.5rem; color: var(--coral-dark); font-family: "Newsreader", Georgia, serif; font-size: clamp(1.55rem, 2.3vw, 2.15rem); font-weight: 570; }
.support-letter [data-letter-content] { position: relative; color: #394054; font-family: "Newsreader", Georgia, serif; font-size: clamp(1.25rem, 1.85vw, 1.55rem); line-height: 1.5; white-space: pre-line; }
.support-letter footer { margin-top: 2.2rem; color: var(--muted); font: 600 .68rem/1.5 "JetBrains Mono", monospace; }
.support-next-letter { width: 100%; min-height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 1.4rem; border: 0; border-top: 1px solid #e5ded2; background: #fffdf8; color: var(--ink); font-weight: 750; cursor: pointer; }
.support-next-letter span:last-child { color: var(--coral); font-size: 1.3rem; transition: transform .3s ease; }
.support-next-letter:hover span:last-child { transform: rotate(120deg); }
.support-letter-count { margin: .8rem 0 0; color: var(--muted); font-size: .67rem; text-align: right; }

.support-write { background: var(--navy); color: #fff; }
.support-write-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(520px, 1.2fr); gap: 8vw; align-items: start; }
.support-write-copy .eyebrow { color: #6bd8cc; }
.support-write-copy > p:not(.eyebrow) { margin: 1.5rem 0 0; color: rgba(255,255,255,.6); }
.support-write-copy ul { margin: 2rem 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.14); }
.support-write-copy li { position: relative; padding: 1rem 0 1rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.68); font-size: .82rem; }
.support-write-copy li::before { content: "·"; position: absolute; left: .25rem; color: var(--coral); font-size: 1.4rem; line-height: 1; }
.support-letter-form { position: relative; display: grid; gap: 1rem; padding-top: 1.8rem; border-top: 1px solid rgba(255,255,255,.18); }
.support-letter-field textarea { min-height: 280px; }
.support-form-meta { display: flex; justify-content: space-between; gap: 1rem; color: rgba(255,255,255,.38); font-size: .67rem; }
.support-consent { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; color: rgba(255,255,255,.62); font-size: .75rem; cursor: pointer; }
.support-consent input { width: 18px; height: 18px; margin: .15rem 0 0; accent-color: var(--coral); }
.support-form-action { display: flex; align-items: center; gap: 1.2rem; margin-top: .4rem; }
.support-form-action .btn { flex: 0 0 auto; }
.support-form-action .btn:disabled { cursor: not-allowed; opacity: .5; transform: none; box-shadow: none; }
.support-form-action p { margin: 0; color: rgba(255,255,255,.4); font-size: .67rem; line-height: 1.5; }

.support-help { background: var(--white); }
.support-help-head h2 { max-width: 720px; }
.support-resource-list { border-top: 1px solid var(--line); }
.support-resource {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  align-items: center;
  gap: 3rem;
  min-height: 190px;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}
.support-resource-number { color: var(--coral-dark); font-family: "Newsreader", Georgia, serif; font-size: clamp(2.2rem, 4vw, 4.2rem); line-height: .86; letter-spacing: -.04em; }
.support-resource h3 { margin: 0; font-family: "Newsreader", Georgia, serif; font-size: 2rem; font-weight: 570; line-height: 1.1; }
.support-resource p { max-width: 660px; margin: .55rem 0 0; color: var(--muted); font-size: .83rem; }
.support-resource-primary { margin: 0 -2rem; padding-right: 2rem; padding-left: 2rem; background: #f7f2e9; border-bottom: 0; }
.support-nearby { display: flex; align-items: center; justify-content: space-between; gap: 3rem; padding-top: 2.5rem; }
.support-nearby p { max-width: 800px; margin: 0; color: var(--muted); }
.support-nearby a { flex: 0 0 auto; color: var(--coral-dark); font-size: .8rem; font-weight: 800; text-underline-offset: 4px; }

@media (max-width: 1080px) {
  .support-hero-inner { grid-template-columns: minmax(0, 1fr) minmax(400px, .8fr); }
  .support-receive-layout, .support-write-layout { gap: 5vw; }
  .support-resource { grid-template-columns: 150px minmax(0, 1fr) auto; gap: 2rem; }
}

@media (max-width: 860px) {
  .support-urgent > div { width: min(100% - 32px, 1280px); min-height: 68px; align-items: flex-start; flex-direction: column; justify-content: center; gap: .15rem; line-height: 1.4; }
  .support-hero { min-height: auto; }
  .support-hero-inner { width: min(100% - 40px, 720px); grid-template-columns: 1fr; padding: 1rem 0 4rem; }
  .support-hero-copy { padding: 4rem 0 0; }
  .support-hero-visual { min-height: 430px; }
  .support-envelope { width: min(420px, 78%); }
  .support-orbit-one { width: 470px; height: 470px; right: 0; }
  .support-orbit-two { width: 320px; height: 320px; right: 28%; }
  .support-receive-layout, .support-write-layout { grid-template-columns: 1fr; gap: 3.5rem; }
  .support-receive-copy { position: static; }
  .support-letter { min-height: 420px; }
  .support-help-head { align-items: start; }
  .support-resource { grid-template-columns: 130px minmax(0, 1fr); gap: 1.5rem; }
  .support-resource .btn { grid-column: 2; justify-self: start; }
  .support-nearby { align-items: start; flex-direction: column; gap: 1rem; }
}

@media (max-width: 560px) {
  .encouragement-overlay { padding: 16px; }
  .encouragement-dialog { max-height: calc(100svh - 32px); padding: 2.35rem 1.35rem 1.65rem; border-radius: 22px 22px 22px 8px; }
  .encouragement-close { right: 11px; top: 11px; width: 36px; height: 36px; }
  .encouragement-symbol { width: 50px; height: 50px; margin-bottom: 1.2rem; border-radius: 15px 15px 15px 5px; }
  .encouragement-kicker { font-size: .62rem; }
  .encouragement-message { font-size: clamp(1.65rem, 8.2vw, 2.05rem); }
  .encouragement-gentle { font-size: .73rem; }
  .encouragement-actions { align-items: stretch; flex-direction: column; gap: 1rem; margin-top: 1.6rem; }
  .encouragement-actions .btn { width: 100%; min-width: 0; }
  .support-hero-inner { width: min(100% - 32px, 720px); }
  .support-hero-copy h1 { font-size: clamp(3.5rem, 18vw, 5rem); }
  .support-hero-copy > p:not(.eyebrow) { font-size: .92rem; }
  .support-hero-actions .btn { width: 100%; }
  .support-hero-visual { min-height: 340px; }
  .support-envelope { width: 88%; min-height: 240px; padding: 2.5rem 2rem 2rem; }
  .support-envelope span { margin-bottom: 1.4rem; }
  .support-envelope b { margin-top: 1.4rem; }
  .support-orbit-one { width: 360px; height: 360px; right: -20%; }
  .support-orbit-two { width: 250px; height: 250px; right: 25%; }
  .support-letter { min-height: 0; padding: 2.2rem 1.5rem; }
  .support-letter::before { right: .8rem; top: .5rem; font-size: 6rem; }
  .support-letter [data-letter-content] { font-size: 1.16rem; }
  .support-form-action { align-items: stretch; flex-direction: column; }
  .support-form-action .btn { width: 100%; }
  .support-resource { grid-template-columns: 1fr; gap: 1rem; padding: 2rem 0; }
  .support-resource .btn { grid-column: 1; width: 100%; }
  .support-resource-primary { margin: 0 -16px; padding: 2rem 16px; }
  .support-resource-number br { display: none; }
}
