/* kite.hellodahab.com — flat, playful, ink-outlined (after the edumex template the owner chose):
   white pages, a pale blue-grey band, bright blue / purple / yellow / green blocks, 2px ink
   outlines with hard offset shadows, hand-written tags, squiggly lines and little kite-diamonds. */

@font-face { font-family: 'Outfit'; font-weight: 300 800; font-display: swap; src: url(fonts/outfit-latin.woff2) format('woff2'); }
@font-face { font-family: 'Caveat'; font-weight: 600 700; font-display: swap; src: url(fonts/caveat-latin.woff2) format('woff2'); }

:root {
  --ink: #101223;
  --ink-2: #4A4D63;
  --ink-3: #8A8DA3;
  --navy: #14163A;
  --paper: #FFFFFF;
  --mist: #EEF1F8;
  --mist-2: #E2E7F3;
  --blue: #3D6DF5;
  --blue-d: #2A55D6;
  --purple: #8F63F1;
  --lav: #E7DEFF;
  --yellow: #F1E93B;
  --green: #22CC7B;
  --pink: #E259C9;
  --red: #F0533F;
  --sea: #CFDBFF;
  --sand: #FFF4C2;
  --line: 2px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 7px 7px 0 var(--ink);
  --r: 12px;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Comic Sans MS', cursive;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--font); overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.025em; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.center { text-align: center; max-width: 40rem; margin: 0 auto 2.5rem; }
.center p { color: var(--ink-2); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--yellow); padding: 8px 14px; border: var(--line); border-radius: 8px; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* --- Buttons, tags, pills ------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  padding: .62em 1.1em; border: 0; border-radius: 8px; background: var(--blue); color: #fff;
  font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .12s;
}
.btn:hover { background: var(--blue-d); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn--lg { padding: .85em 1.35em; font-size: 1.02rem; border-radius: 10px; }
.btn--ghost { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--ghost:hover { background: var(--mist); }
.btn--white { background: var(--paper); color: var(--ink); border: var(--line); box-shadow: 3px 3px 0 var(--ink); }
.btn--white:hover { background: var(--yellow); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn--yellow { background: var(--yellow); color: var(--ink); border: var(--line); box-shadow: 3px 3px 0 var(--ink); }
.btn--yellow:hover { background: #fff36a; }
.btn--red { background: var(--red); color: #fff; border: var(--line); box-shadow: 3px 3px 0 var(--ink); }
.btn--red:hover { background: #d8402d; }
.btn.is-off { opacity: .55; cursor: default; box-shadow: none; }

.tag {
  display: inline-block; padding: .05em .7em .12em; margin-bottom: 1.1rem;
  border: var(--line); border-radius: 9px; box-shadow: 3px 3px 0 var(--ink);
  font: 700 1.4rem/1.25 var(--hand); transform: rotate(-3deg);
}
.tag--yellow { background: var(--yellow); }
.tag--purple { background: var(--purple); color: #fff; }
.tag--green { background: var(--green); }
.tag--white { background: var(--paper); }

.pill { display: inline-flex; align-items: center; gap: .35em; padding: .18em .75em; border-radius: 999px; font: 600 .78rem/1.5 var(--font); }
.pill--blue { background: var(--blue); color: #fff; }
.pill--green { background: var(--green); color: var(--ink); }
.pill--purple { background: var(--purple); color: #fff; }
.pill--yellow { background: var(--yellow); color: var(--ink); }
.pill--mist { background: var(--mist); color: var(--ink-2); }
.pill--dark { background: var(--ink); color: #fff; }

.diamond { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--ink); transform: rotate(45deg); border-radius: 2px; flex: none; }
.d-blue { background: var(--blue); } .d-green { background: var(--green); } .d-yellow { background: var(--yellow); }
.d-purple { background: var(--purple); } .d-pink { background: var(--pink); }
.kites { display: flex; gap: 8px; margin: 0; }
.kites .diamond { width: 11px; height: 11px; }

.squiggle { position: absolute; pointer-events: none; fill: none; stroke: var(--ink); stroke-width: 1.6; overflow: visible; z-index: 0; }

/* --- Header ---------------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.top__in { display: flex; align-items: center; gap: 2rem; min-height: 72px; }
.logo { display: inline-flex; align-items: baseline; gap: 2px; font: 800 1.45rem/1 var(--font); letter-spacing: -0.04em; text-decoration: none; }
.logo i { width: 9px; height: 9px; margin: 0 4px 0 3px; background: var(--pink); border: 2px solid var(--ink); transform: rotate(45deg) translateY(-1px); border-radius: 2px; }
.logo span { font-size: .8rem; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-2); }
.nav { display: flex; gap: 1.8rem; margin-left: 1.5rem; }
.nav a, .menu nav a:not(.btn) { font-weight: 500; font-size: .95rem; text-decoration: none; }
.nav a:hover, .nav a[aria-current] { text-decoration: underline 2px; text-underline-offset: 6px; }
.top__cta { display: flex; gap: .7rem; margin-left: auto; }
.top__cta .btn--ghost { box-shadow: none; }
.top__cta .btn--ghost:hover { background: var(--mist); }
.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border: var(--line); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); background: var(--paper); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 22px; }
.menu nav { position: absolute; right: 0; top: 54px; display: grid; gap: .25rem; min-width: 220px; padding: .75rem; background: var(--paper); border: var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.menu nav a:not(.btn) { padding: .55rem .6rem; border-radius: 8px; }
.menu nav a:not(.btn):hover { background: var(--mist); }
.menu nav .btn { margin-top: .4rem; }

/* --- Hero ------------------------------------------------------------------ */
.hero { position: relative; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); overflow: hidden; }
.sq-hero-l { left: -10px; top: 10px; width: 240px; height: 130px; }
.sq-hero-r { right: -20px; top: 140px; width: 280px; height: 220px; }
.sun { position: absolute; left: 58%; top: -46px; width: 74px; height: 74px; border-radius: 50%; background: var(--purple); border: var(--line); box-shadow: 0 0 0 9px var(--yellow), 0 0 0 11px var(--ink); }
.hero__in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__copy h1 { margin-bottom: 1.6rem; }
.rule { border: 0; border-top: 2px solid var(--mist-2); margin: 0 0 1.4rem; max-width: 30rem; }
.checks { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; list-style: none; margin: 0 0 1.8rem; padding: 0; font-weight: 500; }
.checks li { display: flex; align-items: center; gap: .5rem; }
.checks li::before { content: ''; width: 18px; height: 18px; border-radius: 4px; background: var(--purple) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__note { margin-top: 1.2rem; color: var(--ink-2); font-size: .92rem; }

.hero__art { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 1.4rem; padding: 0 0 0 1rem; }
.card { background: var(--paper); border: var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card > header { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; font-weight: 600; font-size: .95rem; }
.card .dots { letter-spacing: .1em; font-weight: 800; }
.card--today { grid-column: 1 / -1; width: min(100%, 360px); margin-left: clamp(0px, calc(100% - 372px), 18%); transform: rotate(-1deg); }
.today { display: grid; grid-template-columns: auto 1fr; gap: .4rem .9rem; margin: 0 -2px -2px; padding: 1rem 1.1rem; background: var(--green); border: var(--line); border-radius: 0 0 var(--r) var(--r); text-decoration: none; }
.ring { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--ink); background: var(--yellow); display: grid; place-items: center; }
.ring i { width: 22px; height: 22px; background: var(--green); border: 2px solid var(--ink); transform: rotate(45deg); border-radius: 3px; }
.today__txt strong { display: block; font-size: 1.08rem; }
.today__txt small { display: flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--ink); }
.today__txt small svg { width: 14px; }
.today__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: .4rem; font-size: .82rem; }
.today__foot b { font-size: 1.05rem; }
.chip { margin-left: auto; padding: .3em .9em; border-radius: 999px; background: var(--paper); border: 2px solid var(--ink); font-weight: 600; }
.today:hover .chip { background: var(--yellow); }
.card--live { box-shadow: 5px 5px 0 var(--blue), 5px 5px 0 2px var(--ink); align-self: start; }
.live { padding: 0 .7rem; }
.live canvas { width: 100%; height: auto; aspect-ratio: 300 / 170; }
.spark { display: flex; align-items: center; gap: .5rem; padding: .3rem .8rem .7rem; font-size: .72rem; color: var(--ink-2); }
.spark canvas { flex: 1; height: 36px; width: 100%; }
.clockchip { min-width: 3.2em; text-align: center; padding: .05em .55em; border-radius: 999px; background: var(--lav); font-size: .8rem; font-variant-numeric: tabular-nums; }
.card--path { align-self: end; transform: translateY(18px); }
.path { list-style: none; margin: 0; padding: 0 .8rem .9rem; display: grid; gap: .45rem; }
.path li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.path .pill { font-size: .78rem; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.path li.is-done .pill { background: var(--purple); color: #fff; }
.path li.is-done .pill::before { content: '✓'; }
.path small { color: var(--ink-3); font-size: .72rem; white-space: nowrap; }
.hero-d1 { position: absolute; right: 6%; top: -18px; }
.hero-d2 { position: absolute; left: -8px; bottom: 30%; }
.hero-d3 { position: absolute; right: -10px; bottom: -6px; }

/* --- Band ------------------------------------------------------------------- */
.band { background: var(--mist); margin-top: 1rem; }
.band__in { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); min-height: 180px; }
.stat { display: flex; align-items: center; gap: 1rem; }
.stat strong { font-size: clamp(2.6rem, 5vw, 3.3rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.stat span { font-size: .9rem; line-height: 1.4; color: var(--ink-2); }
.stat--stars { flex-wrap: wrap; }
.stat--stars .kites { flex-basis: 100%; }
.sticky {
  position: relative; display: flex; align-items: center; gap: 1.2rem; align-self: stretch; margin: -12px 0 -12px;
  padding: 1.4rem 2.6rem 1.4rem 1.8rem; background: var(--yellow); border: var(--line); box-shadow: 6px 6px 0 var(--ink);
  font: 700 clamp(1.8rem, 3vw, 2.3rem)/1 var(--font); letter-spacing: -0.03em; text-decoration: none;
  clip-path: polygon(0 0, 86% 0, 100% 16%, 100% 100%, 0 100%);
}
.sticky::after { content: ''; position: absolute; right: 0; top: 0; width: 14%; height: 16%; background: linear-gradient(to bottom left, transparent 49%, var(--ink) 50%, #d9d132 53%); }
.sticky .play { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--paper); border: var(--line); color: var(--blue); box-shadow: 3px 3px 0 var(--ink); transition: transform .15s; }
.sticky .play svg { width: 24px; }
.sticky:hover .play { transform: scale(1.08); }
.levels-mini { display: flex; }
.lv { width: 52px; height: 52px; border-radius: 50%; border: var(--line); display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; margin-left: -10px; box-shadow: 3px 3px 0 var(--ink); }
.lv--blue { background: var(--blue); color: #fff; } .lv--green { background: var(--green); } .lv--purple { background: var(--purple); color: #fff; }

/* --- Split: copy + blue panel ------------------------------------------------- */
.split { position: relative; padding: clamp(4rem, 9vw, 7rem) 0; }
.split-d { position: absolute; left: 47%; top: 58%; }
.split__in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split__copy h2 { margin-bottom: 1.1rem; max-width: 14ch; }
.split__copy > p { color: var(--ink-2); }
.more { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: none; font-size: .95rem; }
.more svg { width: 18px; }
.more:hover { text-decoration: underline 2px; text-underline-offset: 5px; }
.rule-card { margin: 2.6rem 0 0; padding: 0; }
.rule-card__who { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; }
.rule-card__who b { display: block; font-size: .95rem; }
.rule-card__who small { color: var(--ink-3); font-size: .78rem; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); border: 2px solid var(--ink); font: 700 .78rem/1 var(--font); font-style: normal; }
.rule-card p { font-size: .95rem; color: var(--ink-2); max-width: 30rem; }

.panel { position: relative; border-radius: 22px; padding: clamp(14px, 3.4vw, 40px); }
.panel--blue { background: var(--blue); }
.panel__card { background: var(--paper); border: var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: clamp(10px, 2vw, 20px); }

/* --- How it works (purple band) ----------------------------------------------- */
.how { position: relative; background: var(--purple); color: #fff; padding: clamp(3.5rem, 8vw, 6rem) 0; overflow: hidden; }
.sq-how { left: -20px; top: 30px; width: 220px; height: 120px; stroke: var(--ink); }
.how__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; position: relative; z-index: 1; }
.how h2 { margin-bottom: 1.8rem; max-width: 16ch; }
.how .tag { color: var(--ink); }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 1.2rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 0 1rem; }
.steps li::before { content: counter(s); grid-row: span 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--ink); border: var(--line); font-weight: 700; box-shadow: 3px 3px 0 var(--ink); }
.steps b { font-size: 1.15rem; }
.steps span { color: rgb(255 255 255 / .85); font-size: .95rem; }
.how__art { margin: 0; background: var(--yellow); border: var(--line); box-shadow: 8px 8px 0 var(--ink); padding: 1.6rem 1.2rem 1rem; transform: rotate(1.5deg); color: var(--ink); }
.how__art figcaption { margin-top: .8rem; font: 700 1.35rem/1.2 var(--hand); text-align: center; }

/* --- Level cards ---------------------------------------------------------------- */
.path-sec { position: relative; padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 4rem); }
.ps-d1 { position: absolute; left: 8%; top: 18%; } .ps-d2 { position: absolute; right: 7%; top: 55%; }
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.level { border-radius: 14px; padding: 1.6rem 1.5rem 1.5rem; display: flex; flex-direction: column; box-shadow: 0 18px 40px -24px rgb(16 18 35 / .45); }
.level--blue { background: var(--blue); color: #fff; }
.level--green { background: var(--green); }
.level--purple { background: var(--purple); color: #fff; }
.level__n { font: 700 1.3rem/1 var(--hand); }
.level h3 { font-size: 1.5rem; margin: .3rem 0 .6rem; }
.level h3 small { display: block; font-size: .85rem; font-weight: 500; opacity: .85; letter-spacing: 0; margin-top: .25rem; }
.level p { font-size: .92rem; opacity: .9; }
.level ul { margin: 0 0 1.4rem; padding-left: 1.1rem; font-size: .9rem; display: grid; gap: .2rem; }
.level .btn { margin-top: auto; align-self: flex-start; }

.safety-note { margin-bottom: 4rem; }
.safety-note p { margin: 0; padding: 1rem 1.3rem; border: var(--line); border-radius: var(--r); background: var(--sand); font-size: .92rem; }

/* --- Footer ------------------------------------------------------------------------ */
.foot { background: var(--mist); padding: 3.5rem 0 1.5rem; font-size: .9rem; }
.foot__in { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 2rem; }
.foot__brand p { color: var(--ink-2); margin-top: .9rem; max-width: 18rem; }
.foot__brand .kites { margin-top: 1rem; }
.foot__col ul { list-style: none; padding: 0; margin: .7rem 0 1.4rem; display: grid; gap: .35rem; }
.foot__col a { text-decoration: none; color: var(--ink-2); }
.foot__col a:hover { color: var(--ink); text-decoration: underline; }
.foot__note p { color: var(--ink-2); font-size: .82rem; margin: .7rem 0 0; }
.foot__base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--mist-2); color: var(--ink-3); font-size: .8rem; }

/* --- Page heads (course, lesson, sim) ----------------------------------------------- */
.pagehead { position: relative; padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); overflow: hidden; }
.pagehead .wrap { position: relative; z-index: 1; }
.sq-head { right: -10px; top: 20px; width: 360px; height: 150px; }
.pagehead h1 { font-size: clamp(2.3rem, 5.4vw, 3.8rem); max-width: 18ch; margin-bottom: 1rem; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 44rem; }
.crumbs { font-size: .88rem; color: var(--ink-3); margin-bottom: 1.4rem; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .9rem; font-weight: 500; }
.meta span { display: inline-flex; align-items: center; gap: .35rem; }
.meta svg { width: 18px; color: var(--purple); }
.jump { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 1.6rem 0 0; }
.jump a { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem .45rem .5rem; border: var(--line); border-radius: 999px; background: var(--paper); box-shadow: 2px 2px 0 var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.jump b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--mist); font-size: .78rem; }
.jump a:hover { background: var(--yellow); }

/* --- Course map ------------------------------------------------------------------------ */
.course { padding-bottom: 4rem; display: grid; gap: 3.5rem; }
.lvl__head { display: grid; gap: .5rem; margin-bottom: 1.4rem; max-width: 46rem; }
.lvl__head .pill { justify-self: start; font-size: .85rem; }
.lvl__head p { color: var(--ink-2); margin: 0; }
.lcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
.lcard { position: relative; border: var(--line); border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.lcard > a { display: flex; flex-direction: column; height: 100%; padding: 1.2rem 1.2rem 1rem; text-decoration: none; }
.lcard:not(.is-soon):hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.lcard__n { font: 700 1.2rem/1 var(--hand); color: var(--purple); }
.lcard h3 { margin: .35rem 0 .5rem; }
.lcard p { font-size: .9rem; color: var(--ink-2); }
.lcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: auto; font-size: .78rem; color: var(--ink-2); }
.lcard__meta svg { width: 14px; }
.lcard__progress:not(:empty) { margin-top: .8rem; display: inline-flex; gap: .4rem; flex-wrap: wrap; }
.lcard__progress .pill { font-size: .72rem; }
.lcard.is-done { background: #F6F2FF; }
.lcard.is-done::after { content: '✓'; position: absolute; right: -10px; top: -10px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--purple); color: #fff; border: var(--line); font-weight: 800; }
.lcard.is-soon { padding: 1.2rem; background: var(--mist); box-shadow: none; border-style: dashed; }
.lcard.is-soon .lcard__n { color: var(--ink-3); }
.covers { margin: 0; padding-left: 1.1rem; font-size: .84rem; color: var(--ink-2); display: grid; gap: .15rem; }

/* --- Lesson ---------------------------------------------------------------------------- */
.lesson { padding-bottom: 4rem; }
.lsec { padding: 2.6rem 0 1rem; }
.lsec > h2 { display: flex; align-items: center; gap: .8rem; font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 1.4rem; }
.lsec > h2 .pill { width: 38px; height: 38px; justify-content: center; padding: 0; font-size: 1rem; border: var(--line); box-shadow: 2px 2px 0 var(--ink); }
.lsec__lead { color: var(--ink-2); margin-top: -.6rem; margin-bottom: 1.4rem; }
.learn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3rem; }
.lcard-learn { position: relative; padding: 1.4rem 1.4rem .6rem; border: var(--line); border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow); }
.lcard-learn.has-diagram { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 2rem; align-items: start; }
.lcard-learn.has-diagram h3 { grid-column: 2; }
.lcard-learn.has-diagram .diagram-wrap { grid-column: 1; grid-row: 1 / span 3; }
.lcard-learn.has-diagram .prose { grid-column: 2; }
.lcard-learn .num { position: absolute; left: -12px; top: -12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); border: var(--line); font-weight: 700; font-size: .85rem; }
.lcard-learn h3 { margin-bottom: .7rem; }
.diagram-wrap { margin: 0 0 1rem; }
.diagram { width: 100%; height: auto; }
.prose { font-size: .96rem; color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1em; display: grid; gap: .35rem; }

.panel--sim .panel__card { padding: clamp(8px, 1.6vw, 16px); }

.beach { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.beach__note { position: relative; padding: 1.6rem 1.6rem 1.2rem; background: var(--yellow); border: var(--line); box-shadow: 7px 7px 0 var(--ink); clip-path: polygon(0 0, 94% 0, 100% 7%, 100% 100%, 0 100%); }
.beach__note::after { content: ''; position: absolute; right: 0; top: 0; width: 6%; height: 7%; background: linear-gradient(to bottom left, transparent 49%, var(--ink) 50%, #d9d132 53%); }
.beach__note h3 { font-size: 1.6rem; margin-bottom: .6rem; }
.beach__kit { font-size: .95rem; }
.beach__steps { list-style: none; counter-reset: b; margin: 0 0 1rem; padding: 0; display: grid; gap: .55rem; }
.beach__steps label { display: grid; grid-template-columns: 26px 1fr; gap: .7rem; align-items: start; cursor: pointer; font-size: .97rem; }
.beach__steps input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 1px 0 0; border: var(--line); border-radius: 6px; background: var(--paper); cursor: pointer; }
.beach__steps input:checked { background: var(--purple) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.beach__steps input:checked + span { text-decoration: line-through; text-decoration-color: rgb(16 18 35 / .45); }
.beach__foot { font-size: .85rem; margin: 0; }
.safety { padding: 1.4rem; border: var(--line); border-radius: var(--r); background: var(--paper); box-shadow: 4px 4px 0 var(--red); }
.safety h3 { display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.safety h3::before { content: '!'; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; font-size: .9rem; border: 2px solid var(--ink); }
.safety ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .45rem; font-size: .93rem; color: var(--ink-2); }

.quiz { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.q { margin: 0; padding: 1.2rem; border: var(--line); border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow); min-width: 0; }
.q legend { float: left; width: 100%; display: flex; gap: .6rem; font-weight: 600; margin-bottom: .9rem; line-height: 1.35; }
.q legend .num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--lav); font-size: .8rem; }
.opt { clear: both; display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .7rem; margin-bottom: .45rem; border: 2px solid var(--mist-2); border-radius: 10px; cursor: pointer; font-size: .93rem; line-height: 1.35; }
.opt:hover { border-color: var(--ink); }
.opt input { margin: .15rem 0 0; accent-color: var(--purple); }
.opt.is-right { border-color: var(--ink); background: #D5F7E6; }
.opt.is-wrong { border-color: var(--red); background: #FDE4E0; }
.why { clear: both; margin: .6rem 0 0; font-size: .88rem; color: var(--ink-2); }
.quiz__score { grid-column: 1 / -1; margin: 0; font-weight: 600; }

.lnav { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 3rem; }
.lnav a { display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1.3rem; border: var(--line); border-radius: var(--r); text-decoration: none; font-weight: 600; font-size: 1.05rem; background: var(--paper); box-shadow: var(--shadow); }
.lnav a small { color: var(--ink-3); font-weight: 500; font-size: .8rem; }
.lnav a:hover { background: var(--mist); }
.lnav__next { text-align: right; align-items: flex-end; background: var(--blue) !important; color: #fff; }
.lnav__next small { color: rgb(255 255 255 / .75) !important; }
.lnav__next svg { display: inline; width: 18px; vertical-align: -3px; }
.lnav__next:hover { background: var(--blue-d) !important; }

.simpage { padding-bottom: 4rem; }
.simpage__missions { margin-top: 3rem; }
.simpage__missions p { color: var(--ink-2); }
.mlist { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; counter-reset: m; }
.mlist a { display: grid; padding: .8rem 1rem .8rem 3rem; position: relative; border: var(--line); border-radius: 10px; text-decoration: none; background: var(--paper); }
.mlist li { counter-increment: m; }
.mlist a::before { content: counter(m); position: absolute; left: .8rem; top: .85rem; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--mist); font-weight: 700; font-size: .8rem; }
.mlist li.is-done a::before { content: '✓'; background: var(--purple); color: #fff; }
.mlist small { color: var(--ink-3); }
.mlist a:hover { background: var(--mist); }

/* --- Simulator --------------------------------------------------------------------------- */
.sim { position: relative; display: grid; gap: .8rem; }
.sim__nojs { padding: 2rem; text-align: center; color: var(--ink-2); }
.sim__tabs { display: flex; gap: .5rem; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.sim__tabs::-webkit-scrollbar { display: none; }
.sim__tab { flex: none; display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem .45rem .45rem; border: var(--line); border-radius: 999px; background: var(--paper); font: 600 .85rem/1.2 var(--font); color: var(--ink); cursor: pointer; }
.sim__tab b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--mist); font-size: .75rem; }
.sim__tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.sim__tab[aria-selected="true"] b { background: var(--yellow); color: var(--ink); }
.sim__tab.is-done b { background: var(--purple); color: #fff; }
.sim__stage { position: relative; border: var(--line); border-radius: 12px; overflow: hidden; background: #F7F9FE; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
.sim__stage:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.sim__stage canvas { width: 100%; height: auto; aspect-ratio: 16 / 9.4; max-height: min(58vh, 520px); }
.sim--compact .sim__stage canvas { aspect-ratio: 16 / 10.5; }
.sim__hud { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; max-width: calc(100% - 90px); }
.hud { padding: .2rem .6rem; border-radius: 999px; background: rgb(255 255 255 / .92); border: 2px solid var(--ink); font: 600 .78rem/1.3 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hud--zone-power { background: var(--yellow); }
.hud--zone-intermediate { background: var(--lav); }
.hud--gust { background: var(--sea); }
.meter { position: absolute; right: 12px; top: 12px; bottom: 12px; width: 22px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; pointer-events: none; }
.meter i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--green); transition: background .2s; }
.meter i.is-high { background: var(--yellow); }
.meter i.is-over { background: var(--red); }
.meter b { position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); }
.meter-label { position: absolute; right: 40px; bottom: 12px; font: 700 .72rem/1 var(--font); color: var(--ink-2); pointer-events: none; text-align: right; }
.meter-label span { display: block; font-size: 1.15rem; color: var(--ink); font-variant-numeric: tabular-nums; }

.sim__card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 24px)); padding: 1.1rem 1.2rem; background: var(--paper); border: var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); text-align: left; z-index: 3; }
.sim__card h3 { font-size: 1.15rem; margin-bottom: .45rem; }
.sim__card p { font-size: .9rem; color: var(--ink-2); margin-bottom: .7rem; }
.sim__card .beachcue { padding: .6rem .8rem; background: var(--yellow); border: 2px solid var(--ink); border-radius: 10px; color: var(--ink); font-size: .88rem; }
.sim__card .beachcue b { font-family: var(--hand); font-size: 1.15rem; margin-right: .3rem; }
.sim__card .row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.sim__card--done { border-color: var(--ink); box-shadow: 7px 7px 0 var(--green); }
.sim__card--fail { box-shadow: 7px 7px 0 var(--red); }
.sim__status { position: absolute; left: 10px; right: 46px; bottom: 10px; display: flex; align-items: center; gap: .6rem; padding: .45rem .7rem; background: rgb(255 255 255 / .94); border: 2px solid var(--ink); border-radius: 10px; font: 600 .85rem/1.3 var(--font); pointer-events: none; }
.sim__status.is-alert { background: var(--red); color: #fff; animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.02); } }
.sim__status .bar { flex: 0 0 80px; height: 8px; border-radius: 99px; background: var(--mist-2); overflow: hidden; }
.sim__status .bar i { display: block; height: 100%; width: 0; background: var(--purple); transition: width .2s; }
.sim__status.is-alert .bar i { background: #fff; }
.sim__hint { position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%); padding: .3rem .7rem; border-radius: 999px; background: var(--ink); color: #fff; font: 500 .78rem/1.3 var(--font); pointer-events: none; white-space: nowrap; opacity: .92; }

.sim__controls { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; }
.steer { min-width: 92px; min-height: 52px; padding: .5rem .8rem; border: var(--line); border-radius: 12px; background: var(--mist); box-shadow: 3px 3px 0 var(--ink); font: 700 .9rem/1.1 var(--font); color: var(--ink); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.steer small { display: block; font-weight: 500; font-size: .72rem; color: var(--ink-2); }
.steer.is-on, .steer:active { background: var(--yellow); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.sheet { display: grid; gap: .3rem; justify-items: stretch; font: 600 .75rem/1.2 var(--font); color: var(--ink-2); }
.sheet__labels { display: flex; justify-content: space-between; }
.sheet input[type=range] { width: 100%; accent-color: var(--blue); height: 28px; }
.sim__extra { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.sim__extra .btn { font-size: .85rem; padding: .55em .9em; }
.sim__settings { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; font-size: .85rem; font-weight: 500; }
.sim__settings label { display: inline-flex; align-items: center; gap: .4rem; }
.sim__settings input[type=range] { width: 120px; accent-color: var(--purple); }
.sim__settings input[type=checkbox] { accent-color: var(--purple); width: 16px; height: 16px; }
.sim__keys { margin: 0; font-size: .78rem; color: var(--ink-3); }
.sim__keys kbd { display: inline-block; min-width: 1.6em; padding: 0 .35em; border: 1.5px solid var(--ink-3); border-bottom-width: 3px; border-radius: 5px; font: 600 .72rem/1.5 var(--font); text-align: center; color: var(--ink-2); background: var(--paper); }

/* --- Simulator set-up, live numbers, phone-as-bar ----------------------------------------------------- */
.btn--sm { font-size: .8rem !important; padding: .45em .8em !important; }
.sim__settings .set { display: inline-flex; align-items: center; gap: .4rem; }
.sim__settings select, .sim__settings input[type=number] { font: 600 .85rem var(--font); padding: .3rem .5rem; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink); }
.sim__settings input[type=number] { width: 4.2em; }
.set__gear { font-size: .82rem; font-weight: 600; padding: .25rem .7rem; border-radius: 999px; background: var(--mist); }
.gearline { font-size: .82rem !important; font-weight: 600; color: var(--ink) !important; padding: .3rem .6rem; border-radius: 8px; background: var(--mist); display: inline-block; }
.sheet.is-off { opacity: .45; }
.hud--alert { background: var(--red) !important; color: #fff; animation: pulse .4s ease-in-out infinite alternate; }
.sim__power { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: .8rem 1.2rem; align-items: center; padding: .8rem 1rem; border: 2px solid var(--ink); border-radius: 12px; background: var(--mist); }
.sim__power dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem 1rem; }
.sim__power dt { font-size: .75rem; color: var(--ink-2); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.sim__power dd { margin: .1rem 0 0; font-variant-numeric: tabular-nums; }
.sim__power dd b { font-size: 1.15rem; }
.sim__power dd small { display: block; color: var(--ink-2); font-size: .75rem; }
.sim__chart { display: grid; gap: .2rem; }
.sim__chart canvas { width: 100%; height: 90px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; }
.sim__chart span { font-size: .72rem; color: var(--ink-3); }
.sim__barui, .sim__rotate { display: none; }
html.bar-lock, html.bar-lock body { overflow: hidden; overscroll-behavior: none; }
.sim.is-bar { position: fixed; inset: 0; z-index: 100; display: block; background: #F7F9FE; }
.sim.is-bar .sim__tabs, .sim.is-bar .sim__controls, .sim.is-bar .sim__keys, .sim.is-bar .sim__power, .sim.is-bar .sim__settings, .sim.is-bar .sim__phone { display: none !important; }
.sim.is-bar .sim__stage { position: absolute; inset: 0; border: 0; border-radius: 0; }
.sim.is-bar .sim__stage canvas { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; }
.sim.is-bar .sim__extra { position: absolute; right: 44px; bottom: 10px; z-index: 4; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.sim.is-bar .sim__extra .btn--red { min-height: 64px; font-size: 1rem; }
.sim.is-bar .sim__status { right: 190px; }
.sim.is-bar .sim__card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 40px)); max-height: calc(100% - 24px); overflow: auto; margin: 0; }
.sim.is-bar .sim__barui { display: flex; position: absolute; top: 10px; right: 44px; z-index: 5; gap: 8px; align-items: center; }
.barind { position: relative; width: 70px; height: 34px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); }
.barind i { position: absolute; left: 8px; right: 8px; top: 14px; height: 5px; border-radius: 3px; background: var(--ink); transition: transform .05s linear; }
.calib__step { font: 700 1.1rem/1 var(--hand); color: var(--purple) !important; margin-bottom: .3rem !important; }
.sim__msg { z-index: 6; }
.sim.is-bar.is-turned { inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(var(--turn, 90deg)); }
.sim.is-bar.is-portrait-pose .sim__rotate { display: grid; place-items: center; position: absolute; inset: 0; z-index: 10; background: rgb(16 18 35 / .92); color: #fff; text-align: center; padding: 24px; }
.sim__rotate b { display: block; font-size: 1.4rem; margin-bottom: .4rem; }

/* --- Home tools, phone-as-bar and physics sections ------------------------------------------------- */
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; padding-top: clamp(3.5rem, 7vw, 5rem); }
.tool { display: flex; flex-direction: column; gap: .4rem; padding: 1.4rem 1.4rem 1.2rem; border: var(--line); border-radius: 14px; box-shadow: 6px 6px 0 var(--ink); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.tool:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.tool .tag { align-self: flex-start; font-size: 1.15rem; margin-bottom: .5rem; color: var(--ink); }
.tool h3 { font-size: 1.35rem; }
.tool p { font-size: .92rem; margin: .2rem 0 .6rem; }
.tool .more { margin-top: auto; }
.tool--yellow { background: var(--yellow); }
.tool--green { background: var(--green); }
.tool--blue { background: var(--blue); color: #fff; }
.phonebar { margin-top: 3rem; padding: 1.6rem; max-width: 52rem; }
.phonebar h2 { margin-bottom: .7rem; }
.phonebar p { color: var(--ink-2); }
.fine { font-size: .85rem; color: var(--ink-3) !important; margin: 0; }
.physics { margin-top: 3.5rem; }
.physics h2 { margin-bottom: .6rem; }
.physics__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: 1.4rem; }
.physics__grid .card { padding: 1.2rem 1.3rem; }
.physics__grid h3 { margin-bottom: .5rem; font-size: 1.1rem; }
.physics__grid p { font-size: .9rem; color: var(--ink-2); margin: 0; }
.physics code { font: 600 .85em ui-monospace, 'SF Mono', Menlo, monospace; background: var(--mist); padding: .05em .35em; border-radius: 5px; color: var(--ink); white-space: nowrap; }

/* --- Wind check game --------------------------------------------------------------------- */
.windcheck { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; align-items: center; }
.wc__scene { border: var(--line); border-radius: 12px; overflow: hidden; background: var(--sand); }
.wc__scene svg { width: 100%; height: auto; }
.wc__side h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.wc__side p { color: var(--ink-2); font-size: .93rem; }
.wc__opts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .8rem 0; }
.wc__opts button { padding: .65rem .7rem; border: var(--line); border-radius: 10px; background: var(--paper); box-shadow: 2px 2px 0 var(--ink); font: 600 .9rem/1.2 var(--font); color: var(--ink); cursor: pointer; text-align: left; }
.wc__opts button:hover:not(:disabled) { background: var(--mist); }
.wc__opts button.is-right { background: #D5F7E6; }
.wc__opts button.is-wrong { background: #FDE4E0; border-color: var(--red); }
.wc__opts button:disabled { cursor: default; }
.wc__result { padding: .8rem 1rem; border-radius: 10px; border: 2px solid var(--ink); background: var(--mist); font-size: .92rem; }
.wc__result b { display: block; margin-bottom: .2rem; }
.wc__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .4rem; font-size: .82rem; font-weight: 600; color: var(--ink-3); }

/* --- Self-rescue game -------------------------------------------------------------------------- */
.panel--purple { background: var(--purple); }
.lsec__sub { margin: 2.2rem 0 1rem; font-size: 1.35rem; }
.rescue { display: grid; gap: 1.6rem; }
.rs__part h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.rs__part > p { color: var(--ink-2); font-size: .93rem; }
.rs__done { margin: .8rem 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: .5rem; }
.rs__done:empty { display: none; }
.rs__done li { counter-increment: r; display: grid; grid-template-columns: 30px 1fr; gap: 0 .7rem; padding: .6rem .8rem; border: 2px solid var(--ink); border-radius: 10px; background: #F6F2FF; }
.rs__done li::before { content: counter(r); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--purple); color: #fff; font-weight: 700; font-size: .8rem; }
.rs__done small { color: var(--ink-2); font-size: .85rem; }
.rs__pool { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .8rem 0; }
.rs__step { padding: .7rem .8rem; border: var(--line); border-radius: 10px; background: var(--paper); box-shadow: 2px 2px 0 var(--ink); font: 600 .9rem/1.3 var(--font); color: var(--ink); text-align: left; cursor: pointer; }
.rs__step:hover { background: var(--mist); }
.rs__step.is-wrong { animation: shake .35s; border-color: var(--red); }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* --- Kite size calculator --------------------------------------------------------------------- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.4rem; align-items: start; padding-bottom: 4rem; }
.calc__form { padding: 1.4rem; display: grid; gap: 1.2rem; }
.calc__field { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
.calc__field span { display: flex; justify-content: space-between; }
.calc__field b { font-variant-numeric: tabular-nums; }
.calc__field input[type=range] { width: 100%; accent-color: var(--purple); height: 26px; }
.calc__pills { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.calc__pills legend { font-weight: 600; font-size: .95rem; margin-bottom: .45rem; padding: 0; }
.calc__pills input { position: absolute; opacity: 0; pointer-events: none; }
.calc__pills span { display: inline-block; padding: .4rem .8rem; border: 2px solid var(--ink); border-radius: 999px; font-size: .85rem; font-weight: 600; cursor: pointer; background: var(--paper); }
.calc__pills input:checked + span { background: var(--ink); color: #fff; }
.calc__pills input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.calc__result { display: grid; gap: 1.2rem; }
.calc__size { position: relative; padding: 1.4rem 1.6rem; background: var(--yellow); border: var(--line); box-shadow: 7px 7px 0 var(--ink); }
.calc__size p { margin: 0; }
.calc__size p:first-of-type { display: flex; align-items: baseline; gap: .4rem; }
.calc__size strong { font-size: clamp(4rem, 9vw, 5.6rem); line-height: 1; letter-spacing: -0.05em; }
.calc__size p:first-of-type span { font-size: 1.8rem; font-weight: 700; }
.calc__range { margin: .3rem 0 1rem !important; font-size: 1rem; }
.calc__pull { padding: 1.2rem 1.4rem; }
.calc__pull h3, .calc__why h3, .calc__chart h3 { margin-bottom: .7rem; }
.calc__pull dl { margin: 0; display: grid; gap: .6rem; }
.calc__pull dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--mist-2); padding-bottom: .5rem; }
.calc__pull dt { font-size: .92rem; color: var(--ink-2); }
.calc__pull dd { margin: 0; text-align: right; }
.calc__pull dd b { font-size: 1.35rem; }
.calc__pull dd small { display: block; color: var(--ink-2); font-size: .8rem; }
.calc__fine { font-size: .8rem; color: var(--ink-3); margin: .7rem 0 0; }
.calc__why { padding: 1.2rem 1.4rem; }
.calc__why ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: .9rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.calc__chart { grid-column: 1 / -1; padding: 1.4rem; }
.calc__chart > p { color: var(--ink-2); font-size: .92rem; }
.ch { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .35rem; }
.ch li { display: grid; grid-template-columns: 52px 1fr 82px; gap: .7rem; align-items: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
.ch li.is-on { font-weight: 700; }
.ch__track { position: relative; height: 16px; border-radius: 99px; background: var(--mist); }
.ch__track i { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: var(--lav); border: 1.5px solid var(--ink); }
.ch li.is-on .ch__track i { background: var(--yellow); }
.ch__track b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--red); }
.ch__axis .ch__track { background: none; height: 14px; }
.ch__axis em { position: absolute; transform: translateX(-50%); font-style: normal; color: var(--ink-3); font-size: .75rem; }
.ch__kn { color: var(--ink-2); }
.calc__notes { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.note { padding: .8rem 1rem; border: 2px solid var(--ink); border-radius: 10px; font-size: .92rem; background: var(--mist); }
.note--warn { background: var(--sand); }
.note--stop { background: #FDE4E0; border-color: var(--red); }

/* --- Responsive ----------------------------------------------------------------------------- */
@media (max-width: 1020px) {
  .nav, .top__cta { display: none; }
  .menu { display: block; }
  .hero__in, .split__in, .how__in { grid-template-columns: 1fr; }
  .hero__art { padding: 0; max-width: 560px; }
  .card--today { margin-left: 0; }
  .band__in { grid-template-columns: 1fr 1fr; padding: 2rem 0; }
  .sticky { margin: 0; justify-self: start; }
  .levels { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .foot__in { grid-template-columns: 1fr 1fr; }
  .learn { grid-template-columns: 1fr; }
  .lcard-learn.has-diagram { grid-template-columns: 1fr; }
  .lcard-learn.has-diagram h3, .lcard-learn.has-diagram .prose, .lcard-learn.has-diagram .diagram-wrap { grid-column: 1; grid-row: auto; }
  .beach { grid-template-columns: 1fr; }
  .quiz { grid-template-columns: 1fr; }
  .windcheck { grid-template-columns: 1fr; }
  .calc { grid-template-columns: 1fr; }
  .tools, .physics__grid { grid-template-columns: 1fr; }
  .split-d { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .sun { left: auto; right: 12%; width: 54px; height: 54px; top: -30px; }
  .hero__art { grid-template-columns: 1fr; gap: 1rem; }
  .card--today, .card--path { transform: none; }
  .card--path { display: none; }
  .band__in { grid-template-columns: 1fr; gap: 1.4rem; }
  .levels-mini { display: none; }
  .foot__in { grid-template-columns: 1fr; }
  .lnav { grid-template-columns: 1fr; }
  .sim__stage canvas, .sim--compact .sim__stage canvas { aspect-ratio: 4 / 3.6; }
  .sim__controls { grid-template-columns: 1fr 1fr; }
  .sim__controls .sheet { grid-column: 1 / -1; grid-row: 1; }
  .sim__power { grid-template-columns: 1fr; }
  .steer { min-height: 60px; }
  .meter-label { display: none; }
  .meter { width: 14px; right: 8px; }
  /* The mission card sits under the canvas on phones, so long goals never cover the Start button. */
  .sim__card { position: relative; left: auto; top: auto; transform: none; width: auto; margin: 10px; box-shadow: 4px 4px 0 var(--ink); }
  .sim__card--done { box-shadow: 4px 4px 0 var(--green); }
  .sim__card--fail { box-shadow: 4px 4px 0 var(--red); }
  .sim__card p { font-size: .86rem; }
  .has-map .sim__hud { max-width: calc(100% - 160px); }
  .has-map .sim__hud .hud:nth-child(2) { display: none; }
  .sq-hero-l { display: none; }
  .wc__opts { grid-template-columns: 1fr; }
  .rs__pool { grid-template-columns: 1fr; }
  .ch li { grid-template-columns: 44px 1fr 64px; gap: .4rem; font-size: .78rem; }
}
@media (hover: none) {
  .sim__keys { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
