/* AI Level Up Lab
   Palette: trust blue + highlighter yellow + growth green on a graph-paper sky.
   Type: Archivo (variable width), expanded and heavy for headlines. */

:root {
  --sky: #eef4ff;
  --sky-2: #e1ebff;
  --sky-3: #cddcff;
  --ink: #142057;
  --ink-2: #3a4677;
  --blue: #2f5bff;
  --sun: #ffce3a;
  --leaf: #19a866;
  --leaf-text: #0d7a47;
  --coral: #ff6a55;
  --white: #ffffff;
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(88px, 11vw, 150px);
  --font: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--sky);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* graph-paper sky behind the 3D story */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(47, 91, 255, 0.07) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(47, 91, 255, 0.07) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(110% 85% at 70% 40%, #ffffff 0%, #eef4ff 52%, #dbe6ff 100%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-weight: 800;
  font-stretch: 116%;
  letter-spacing: -0.02em;
  line-height: 0.98;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 1.3rem + 4.4vw, 5.25rem); }
h2 { font-size: clamp(2rem, 1.15rem + 2.9vw, 3.55rem); }
h3 { font-size: 1.3rem; font-stretch: 108%; letter-spacing: -0.01em; line-height: 1.15; }
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.lead { font-size: clamp(1.12rem, 1rem + 0.35vw, 1.3rem); color: var(--ink-2); max-width: 36em; }
.small { font-size: 0.92rem; color: var(--ink-2); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 10px;
}
.skip:focus { top: 12px; }

/* ---------- buttons: keycaps you press ---------- */
.btn {
  --cap: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px;
  padding: 0.8rem 1.35rem;
  font: inherit; font-weight: 750; font-stretch: 104%; font-size: 1.04rem; line-height: 1.1;
  color: var(--ink); text-decoration: none;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 5px 0 var(--cap);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.btn:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 7px 0 var(--cap); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--cap); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn-sun { background: var(--sun); }
.btn-ghost { background: rgba(255, 255, 255, 0.78); }
.btn-ink { background: var(--ink); color: #fff; --cap: #070d2e; }
.btn-ink:hover { color: #fff; background: #1c2b72; }
.btn-small { min-height: 42px; padding: 0.5rem 0.95rem; font-size: 0.95rem; box-shadow: 0 4px 0 var(--cap); }
.btn-small:hover { box-shadow: 0 5px 0 var(--cap); }

.actions { display: flex; flex-wrap: wrap; gap: 14px 16px; margin: 1.6rem 0 1.2rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.nav.is-scrolled {
  background: rgba(238, 244, 255, 0.86);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(20, 32, 87, 0.1);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-stretch: 112%; font-size: 1.08rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.98rem; }
.nav-links a:hover { color: var(--blue); }
.nav .btn { margin-left: 8px; }

/* ---------- the 3D stage ---------- */
#stage {
  position: fixed; inset: 0; z-index: 1;
  width: 100vw; height: 100vh; height: 100lvh;
  display: block;
  touch-action: pan-y;
  cursor: grab;
}
.no-webgl #stage, .no-webgl .tool-labels, .no-webgl .level-rail, .no-webgl .hint { display: none; }

.tool-labels { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.tool-label {
  position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.28rem 0.7rem 0.28rem 0.45rem;
  font-size: 0.86rem; font-weight: 700; font-stretch: 104%;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid rgba(20, 32, 87, 0.14);
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity;
  transition: background-color 0.15s, border-color 0.15s;
}
.tool-label::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.tool-label.is-hover { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }

/* ---------- story ---------- */
/* clicks over the empty parts of the story fall through to the 3D canvas */
main { position: relative; z-index: 2; pointer-events: none; }
main > section:not(.story) { pointer-events: auto; }
.story { position: relative; pointer-events: none; }
.story .panel, .story a, .story button { pointer-events: auto; }
.story-inner {
  max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter);
  min-height: inherit;
  display: flex; align-items: center;
}
.hero { min-height: 100vh; min-height: 100svh; }
.hero .story-inner { padding-top: 92px; padding-bottom: 72px; }
.hero .panel { max-width: min(620px, 50vw); }
.hero .note { font-size: 0.95rem; color: var(--ink-2); font-weight: 600; }
.taught { display: flex; align-items: center; gap: 12px; max-width: 34em; margin: 0.4rem 0 0; font-size: 0.95rem; color: var(--ink-2); line-height: 1.4; }
.taught img { width: 48px; height: 48px; border-radius: 50%; flex: none; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--sun); background: var(--sun); }
.taught b { color: var(--ink); }
.byline { margin-top: -0.4rem; font-weight: 650; color: var(--blue) !important; font-size: 1rem !important; }
.hero .poster { display: none; }
.no-webgl .hero .poster { display: block; width: min(46vw, 640px); margin-left: auto; }

.hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  margin: 0; padding: 0.4rem 0.9rem;
  font-size: 0.88rem; font-weight: 600; color: var(--ink-2);
  background: rgba(255, 255, 255, 0.7); border-radius: 999px;
  white-space: nowrap;
}

.chapter { min-height: 118vh; }
.chapter .panel { max-width: min(520px, 42vw); }
.step { margin-bottom: 0.9rem; font-weight: 750; font-size: 0.98rem; color: var(--blue); font-stretch: 104%; }
.chapter p:not(.step):not(.keep) { color: var(--ink-2); font-size: 1.12rem; }
.keep { margin-top: 1.4rem; font-weight: 700; font-size: 1.08rem; }
.keep span {
  background: linear-gradient(transparent 52%, var(--sun) 52%, var(--sun) 90%, transparent 90%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 0.15em;
}

.finale { min-height: 100vh; min-height: 100svh; }
.finale h2 { font-size: clamp(2rem, 1.1rem + 2.6vw, 3.3rem); }
.finale .story-inner { align-items: flex-end; justify-content: center; padding-bottom: 5vh; }
.finale .panel {
  max-width: 760px; text-align: center;
  padding: 24px 32px 4px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55) 70%, transparent);
}
.finale .panel p { color: var(--ink-2); font-size: 1.15rem; }
.finale .actions { justify-content: center; }

/* level rail: your progress through the five projects */
.level-rail {
  position: fixed; right: clamp(14px, 2.2vw, 32px); top: 50%; z-index: 40;
  transform: translateY(-50%) translateX(12px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.level-rail.is-on { opacity: 1; pointer-events: auto; transform: translateY(-50%); }
.level-rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; position: relative; }
.level-rail .xp {
  position: absolute; right: 15px; top: 16px; bottom: 16px; width: 4px;
  background: rgba(20, 32, 87, 0.12); border-radius: 4px; overflow: hidden;
}
.level-rail .xp span {
  position: absolute; inset: 0 0 auto 0; height: calc(var(--xp, 0) * 100%);
  background: var(--leaf); border-radius: 4px;
}
.level-rail li a { display: flex; flex-direction: row-reverse; align-items: center; justify-content: flex-start; gap: 12px; text-decoration: none; color: var(--ink); }
.level-rail li b {
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  font-size: 0.9rem; font-weight: 800;
  background: #fff; border: 2px solid rgba(20, 32, 87, 0.25); border-radius: 10px;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}
.level-rail li span {
  font-size: 0.86rem; font-weight: 700; white-space: nowrap;
  background: #fff; padding: 0.2rem 0.6rem; border-radius: 8px;
  opacity: 0; transform: translateX(6px); transition: opacity 0.2s, transform 0.2s;
}
.level-rail li a:hover span, .level-rail li a:focus-visible span, .level-rail li.is-current span { opacity: 1; transform: none; }
.level-rail li.is-done b { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.level-rail li.is-current b { background: var(--sun); border-color: var(--ink); transform: scale(1.12); }

/* ---------- tools ---------- */
.tools, .fit, .honest, .ar, .about, .join, .faq { position: relative; padding-block: var(--section); }
.tools { background: #fff; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head p { color: var(--ink-2); font-size: 1.15rem; }
.tool-list { list-style: none; margin: 0; padding: 0; }
.tool-list li {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 48px; align-items: center;
  padding: clamp(18px, 2.4vw, 28px) 0;
  border-top: 2px solid rgba(20, 32, 87, 0.1);
}
.tool-list li:last-child { border-bottom: 2px solid rgba(20, 32, 87, 0.1); }
.tool-list h3 {
  display: flex; align-items: center; gap: 0.5em; margin: 0;
  font-size: clamp(1.6rem, 1rem + 2vw, 2.6rem); font-stretch: 120%;
}
.tool-list h3::before {
  content: ''; flex: none; width: 0.62em; height: 0.62em; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff 0 8%, color-mix(in srgb, var(--c) 70%, #fff) 22%, var(--c) 60%, color-mix(in srgb, var(--c) 70%, #000) 100%);
}
.tool-list p { margin: 0; color: var(--ink-2); font-size: 1.1rem; }

/* ---------- fit ---------- */
.fit { background: var(--sky-2); }
.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); margin-top: 28px; }
.fit ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fit li { position: relative; padding-left: 34px; font-size: 1.12rem; }
.fit-yes li::before {
  content: ''; position: absolute; left: 0; top: 0.3em; width: 20px; height: 16px;
  background: var(--blue);
  clip-path: polygon(50% 0, 100% 50%, 100% 88%, 50% 38%, 0 88%, 0 50%);
}
.fit-no li { color: var(--ink-2); }
.fit-no li::before { content: ''; position: absolute; left: 2px; top: 0.75em; width: 16px; height: 3px; background: rgba(20, 32, 87, 0.35); border-radius: 2px; }

/* ---------- honest ---------- */
.honest { background: var(--ink); color: #fff; }
.honest h2 { max-width: 15em; }
.honest .lead { color: rgba(255, 255, 255, 0.78); }
.honest a { color: var(--sun); }
.honest a:hover { color: #fff; }
.honest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); margin: clamp(36px, 5vw, 56px) 0; }
.honest h3 { color: var(--sun); }
.ticks, .crosses { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li, .crosses li { position: relative; padding-left: 32px; font-size: 1.1rem; }
.ticks li::before {
  content: ''; position: absolute; left: 2px; top: 0.42em; width: 16px; height: 9px;
  border-left: 3px solid var(--leaf); border-bottom: 3px solid var(--leaf); transform: rotate(-45deg);
}
.honest .ticks li::before { border-color: #5fe0a1; }
.crosses li::before, .crosses li::after {
  content: ''; position: absolute; left: 2px; top: 0.75em; width: 18px; height: 3px; background: var(--coral); border-radius: 2px;
}
.crosses li::before { transform: rotate(45deg); }
.crosses li::after { transform: rotate(-45deg); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 48px); padding-top: clamp(28px, 4vw, 44px); border-top: 1px solid rgba(255, 255, 255, 0.18); }
.fact { display: grid; gap: 8px; margin: 0; color: rgba(255, 255, 255, 0.8); }
.fact strong { font-size: clamp(2.4rem, 1.6rem + 2.4vw, 3.6rem); font-weight: 800; font-stretch: 120%; line-height: 1; color: var(--sun); letter-spacing: -0.02em; }

/* ---------- AR ---------- */
.ar { background: linear-gradient(180deg, var(--sky-2), #fff); }
.ar-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.ar-stage {
  position: relative; border-radius: 28px; overflow: hidden;
  background:
    linear-gradient(rgba(47, 91, 255, 0.08) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(47, 91, 255, 0.08) 1px, transparent 1px) 0 0 / 40px 40px,
    radial-gradient(circle at 50% 45%, #fff, #e6eeff 75%);
  border: 2px solid rgba(20, 32, 87, 0.12);
}
model-viewer { display: block; width: 100%; height: clamp(360px, 46vw, 600px); --poster-color: transparent; background: transparent; }
model-viewer:not(:defined) { background: url('../img/system-poster.webp') center / contain no-repeat; }
.ar-btn { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); }
.ar-btn:hover { transform: translateX(-50%) translateY(-2px); }
.ar-btn:active { transform: translateX(-50%) translateY(4px); }
.ar-copy p { color: var(--ink-2); font-size: 1.12rem; }
.ar-copy .small { font-size: 0.95rem; }

/* ---------- about ---------- */
.about { background: #fff; }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.portrait { position: relative; max-width: 420px; width: 100%; justify-self: center; }
.portrait::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 1;
  background: var(--sun); border-radius: 50%;
  box-shadow: 0 10px 0 #e8b400;
}
.portrait img {
  position: relative; width: 100%;
  /* head can rise above the circle; everything below its centre stays inside it */
  -webkit-mask: radial-gradient(circle closest-side, #000 99%, transparent 100%) bottom / 100% calc(100% * 840 / 999) no-repeat,
    linear-gradient(#000, #000) top / 100% calc(100% - 100% * 420 / 999) no-repeat;
  mask: radial-gradient(circle closest-side, #000 99%, transparent 100%) bottom / 100% calc(100% * 840 / 999) no-repeat,
    linear-gradient(#000, #000) top / 100% calc(100% - 100% * 420 / 999) no-repeat;
}
.about-copy p { font-size: 1.12rem; color: var(--ink-2); max-width: 36em; }

/* ---------- join ---------- */
.join { background: var(--sun); }
.join-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 3vw, 40px); align-items: start; }
.join-card {
  background: #fff; border: 2px solid var(--ink); border-radius: 24px;
  padding: clamp(24px, 3.4vw, 44px);
  box-shadow: 0 10px 0 var(--ink);
}
.join-card h2 { font-size: clamp(1.8rem, 1.1rem + 2vw, 2.7rem); }
.join-card > p { color: var(--ink-2); font-size: 1.1rem; }
.join-card .ticks { margin: 1rem 0 1.6rem; gap: 8px; }
.join-card .ticks li { font-size: 1.04rem; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 0.95rem; }
.field input {
  font: inherit; font-size: 1.05rem; color: var(--ink);
  padding: 0.8rem 0.95rem; min-height: 52px;
  background: #f7f9ff; border: 2px solid rgba(20, 32, 87, 0.3); border-radius: 12px;
}
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 91, 255, 0.2); background: #fff; }
form .btn { width: 100%; margin-top: 6px; }
.consent { margin: 14px 0 0; font-size: 0.88rem; color: var(--ink-2); }
.join-card .check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--ink-2); margin: 2px 0 14px; cursor: pointer; }
.join-card .check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status .btn { width: auto; margin-top: 10px; }
.form-status { margin: 12px 0 0; font-weight: 650; font-size: 0.98rem; min-height: 1.2em; }
.form-status[data-kind='ok'] { color: var(--leaf-text); }
.form-status[data-kind='error'] { color: #c2341f; }
.teams { margin: 22px 0 0; padding-top: 18px; border-top: 2px dashed rgba(20, 32, 87, 0.15); font-weight: 600; }

/* ---------- faq ---------- */
.faq { background: #fff; }
.faq-list { max-width: 860px; margin-top: 24px; border-top: 2px solid rgba(20, 32, 87, 0.1); }
.faq details, .article .faq-list details { border-bottom: 2px solid rgba(20, 32, 87, 0.1); }
.faq summary, .article .faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0;
  font-weight: 750; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); font-stretch: 106%;
}
.faq summary::-webkit-details-marker, .article .faq-list summary::-webkit-details-marker { display: none; }
.faq summary::after, .article .faq-list summary::after {
  content: ''; flex: none; width: 30px; height: 30px; border-radius: 9px;
  border: 2px solid var(--ink);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 2.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2.5px 12px no-repeat;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after, .article .faq-list details[open] summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 12px 2.5px no-repeat, var(--sun); }
.faq details p, .article .faq-list details p { margin: 0 0 22px; color: var(--ink-2); font-size: 1.08rem; max-width: 46em; }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 2; background: var(--ink); color: rgba(255, 255, 255, 0.8); padding: 64px 0 36px; }
.footer a { color: #fff; }
.footer a:hover { color: var(--sun); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.brand-light { color: #fff; }
.brand-light:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.legal { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.86rem; color: rgba(255, 255, 255, 0.6); }

/* ---------- legal pages ---------- */
.page { position: relative; z-index: 2; padding: 130px 0 90px; pointer-events: auto; }
.page .wrap { max-width: 820px; }
.page h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); }
.page h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.page p, .page li { color: var(--ink-2); }

/* ---------- guide and course pages ---------- */
.article .crumbs { font-size: 0.92rem; font-weight: 650; margin: 0 0 0.6rem; color: var(--ink-2); }
.article .crumbs a { text-decoration: none; }
.article h1 { font-stretch: 112%; line-height: 1.04; letter-spacing: -0.015em; margin: 0 0 1rem; }
.article .lead { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem); color: var(--ink); }
.article .byline-small { font-size: 0.92rem; }
.article h2 { font-stretch: 108%; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin-bottom: 0.45em; }
.article li b { color: var(--ink); }
.article .steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 12px; }
.article .steps li { counter-increment: step; position: relative; padding: 14px 16px 14px 58px; background: #fff; border: 2px solid var(--ink); border-radius: 14px; margin: 0; }
.article .steps li::before { content: counter(step); position: absolute; left: 14px; top: 13px; width: 30px; height: 30px; border-radius: 9px; background: var(--sun); border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 800; color: var(--ink); font-size: 0.95rem; }
.article .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.article .status-note { background: #fff; border-left: 5px solid var(--sun); padding: 12px 16px; border-radius: 0 12px 12px 0; }
.article .cta-box { margin-top: 3rem; padding: clamp(20px, 4vw, 34px); background: var(--sun); border: 2px solid var(--ink); border-radius: 18px; }
.article .cta-box h2 { margin-top: 0; }
.article .cta-box p { color: var(--ink); }
.article .actions .btn { width: auto; }
.article .faq-list { border-top: 2px solid rgba(20, 32, 87, 0.1); }
@media (max-width: 640px) { .article .two-col { grid-template-columns: 1fr; } }

/* ---------- small screens ---------- */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}

@media (max-width: 899px) {
  body { font-size: 1rem; }
  .hero .story-inner, .chapter .story-inner { align-items: flex-end; }
  .hero .story-inner { padding-top: 50vh; padding-bottom: 28px; }
  .hero .panel, .chapter .panel { max-width: none; }
  .chapter { min-height: 100vh; min-height: 100svh; }
  .chapter .story-inner { padding-bottom: 3vh; }
  .chapter .panel, .hero .panel {
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(20, 32, 87, 0.08);
    border-radius: 22px;
    padding: 22px 20px 8px;
  }
  .hero .panel { padding-bottom: 14px; }
  .hero h1 { font-size: clamp(1.85rem, 1.1rem + 4.2vw, 2.6rem); }
  .hero .lead { font-size: 1rem; line-height: 1.5; }
  .hero .actions { margin: 1rem 0 0.6rem; gap: 10px 12px; }
  .hero .note { display: none; }
  .taught { font-size: 0.85rem; gap: 10px; }
  .taught img { width: 40px; height: 40px; }
  .taught span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .chapter .panel { padding: 16px 16px 4px; }
  .chapter h2 { font-size: clamp(1.45rem, 1rem + 2.6vw, 1.9rem); margin-bottom: 0.4em; }
  .chapter p:not(.step):not(.keep) { font-size: 0.95rem; line-height: 1.5; margin-bottom: 0.6em; }
  .step { margin-bottom: 0.4rem; font-size: 0.88rem; }
  .keep { margin-top: 0.6rem; font-size: 0.95rem; }
  .hint { display: none; }
  .tool-label { font-size: 0.76rem; padding: 0.2rem 0.55rem 0.2rem 0.4rem; }
  .no-webgl .hero .story-inner { padding-top: 110px; flex-direction: column-reverse; align-items: stretch; }
  .no-webgl .hero .poster { width: 100%; }

  .level-rail {
    top: 66px; right: var(--gutter); left: var(--gutter);
    transform: translateY(-8px);
  }
  .level-rail.is-on { transform: none; }
  .level-rail ol { grid-auto-flow: column; justify-content: space-between; gap: 0; }
  .level-rail .xp { left: 16px; right: 16px; top: 15px; bottom: auto; width: auto; height: 4px; }
  .level-rail .xp span { inset: 0 auto 0 0; width: calc(var(--xp, 0) * 100%); height: 100%; }
  .level-rail li span { display: none; }
  .level-rail li b { width: 32px; height: 32px; }

  .tool-list li { grid-template-columns: 1fr; gap: 6px; }
  .fit-grid, .honest-grid, .facts, .ar-grid, .about-grid, .join-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 300px; }
  .finale .panel { padding: 20px 8px 0; }
  .finale { min-height: 130vh; }
}

@media (max-width: 420px) {
  .actions .btn { width: 100%; }
  .brand span { font-size: 0.98rem; }
}

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