/* One system: one container, one card, one type scale, 2/3/4-column grids. Black & white + tiranga accents. */
:root {
  --ink: #171717; --ink-2: #383838; --ink-3: #525252; --mute: #737373;
  --line: #ececec; --line-2: #e0e0e0;
  --bg: #ffffff; --surf: #f8f8f8; --surf-2: #f2f2f2; --surf-3: #e9e9e9;
  --saffron: #ff9933; --green: #138808; --ok: #18794e; --bad: #d92d20;
  --r: 8px; --r-lg: 12px; --r-xl: 16px;
  --sh-lg: 0 16px 40px -12px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.05);
  --w: 1280px; --gap: 20px;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 Inter, "Noto Sans Devanagari", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
html[data-lang="hi"] body { line-height: 1.7; }
html[data-lang="hi"] .en, html[data-lang="en"] .hi { display: none !important; }
h1, h2, h3, h4 { letter-spacing: -.02em; line-height: 1.25; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-3); }
.sm { font-size: 13px; }
.fine { font-size: 13px; color: var(--mute); margin-top: 16px; }
kbd { font-family: Inter, sans-serif; font-size: 11px; color: var(--mute); background: #fff; border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
:focus-visible { outline: 2px solid #8a8a8a; outline-offset: 2px; }

/* grids — every section uses one of these, so edges always line up */
.g2, .g3, .g4 { display: grid; gap: var(--gap); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 20px; transition: border-color .15s, box-shadow .15s; }
a.card, button.card { display: block; text-decoration: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
a.card:hover, button.card:hover { border-color: #c4c4c4; box-shadow: 0 4px 14px -6px rgba(0,0,0,.12); }
.card h4 { font-size: 16px; font-weight: 600; }
.card p { font-size: 14px; color: var(--ink-3); }

.tiranga-bar { display: flex; height: 3px; position: sticky; top: 0; z-index: 31; }
.tiranga-bar i { flex: 1; } .tiranga-bar i:nth-child(1) { background: var(--saffron); } .tiranga-bar i:nth-child(2) { background: #fff; } .tiranga-bar i:nth-child(3) { background: var(--green); }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: var(--r); background: var(--surf-2); color: var(--ink); font: inherit; font-weight: 500; font-size: 14px; text-decoration: none; cursor: pointer; transition: background .15s; white-space: nowrap; }
.btn:hover { background: var(--surf-3); }
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surf-2); }
.btn-line { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-line:hover { background: var(--surf); }
.btn-lg { height: 42px; padding: 0 18px; font-size: 15px; }
.btn-icon { width: 34px; padding: 0; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.wide { width: 100%; }
.heart { color: var(--bad); }
.link { background: none; border: 0; padding: 6px 0; color: var(--ink-3); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--ink); }
.input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--r); background: var(--surf-2); color: var(--ink); font: inherit; font-size: 15px; }
.input:focus { outline: 0; background: #fff; border-color: #bdbdbd; box-shadow: 0 0 0 3px #efefef; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); margin: 2px 0 16px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--surf-2); color: var(--ink-3); font-size: 12px; font-weight: 600; margin-left: auto; }

/* nav: logo + links on the left, actions on the right */
.nav { position: sticky; top: 3px; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo img { border-radius: 9px; }
.wordmark { font-size: 15px; letter-spacing: -.02em; white-space: nowrap; }
.wordmark span { color: var(--ink-3); font-weight: 500; }
.wordmark b { font-weight: 700; }
.links { display: flex; gap: 2px; }
.links a { padding: 6px 10px; border-radius: var(--r); font-size: 14px; color: var(--ink-3); text-decoration: none; }
.links a:hover { background: var(--surf-2); color: var(--ink); }
.nav-r { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.search-btn { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 10px; border: 0; border-radius: var(--r); background: var(--surf-2); color: var(--mute); font: inherit; font-size: 14px; cursor: pointer; min-width: 160px; }
.search-btn:hover { background: var(--surf-3); }
.search-btn kbd { margin-left: auto; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #ffd8a8, #c8ecd0); font-weight: 600; font-size: 13px; flex-shrink: 0; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 42px; width: 240px; padding: 6px; background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-lg); }
.menu-pop .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-pop .who b { display: block; font-size: 14px; }
.menu-pop button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; text-align: left; }
.menu-pop button:hover { background: var(--surf-2); }

.marquee { overflow: hidden; height: 34px; display: flex; align-items: center; background: var(--ink); color: #e8e8e8; font-size: 13px; }
.mq-track { will-change: transform; display: flex; gap: 40px; width: max-content; padding-left: 40px; animation: marquee var(--mq, 50s) linear infinite; white-space: nowrap; }
.marquee:hover .mq-track { animation-play-state: paused; }
.mq-track span { display: inline-flex; align-items: center; gap: 6px; }
.mq-track b { color: #fff; font-weight: 600; }
.mq-track .amt { color: #7ee2a8; font-weight: 600; }
.mq-track em { color: #a8a8a8; font-style: normal; }
.mq-track .heart { color: #ff7b7b; }

/* hero */
.hero { padding: 64px 0 56px; border-bottom: 1px solid var(--line); background: radial-gradient(520px 260px at 0% 0%, #fff3e6, transparent 70%), radial-gradient(520px 260px at 100% 100%, #ecf7ee, transparent 70%); }
.hero-in { align-items: center; gap: 40px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line-2); font-size: 13px; color: var(--ink-3); font-weight: 500; }
.dot-tri { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(var(--saffron) 33%, #fff 33% 66%, var(--green) 66%); box-shadow: 0 0 0 1px #0000001a; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 700; margin: 20px 0 16px; letter-spacing: -.035em; line-height: 1.1; }
html[data-lang="hi"] .hero h1 { letter-spacing: -.01em; line-height: 1.3; }
mark { background: none; color: inherit; position: relative; white-space: nowrap; z-index: 0; }
mark::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: .06em; height: .3em; z-index: -1; border-radius: 3px; background: linear-gradient(90deg, #ffb366, #fff 50%, #5cc25c); opacity: .8; }
.lead { font-size: 17px; color: var(--ink-3); max-width: 540px; margin-bottom: 24px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.stats { display: flex; gap: 32px; margin: 32px 0 0; }
.stats dt { font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats dd { margin: 0; font-size: 13px; color: var(--mute); }
.hero-svg { width: 100%; max-width: 460px; margin: 0 auto; }
.hero-svg .s { filter: none; } /* moving parts + SVG filter = repaint every frame → janky scroll */
.wheel { transform-box: view-box; transform-origin: 300px 250px; animation: spin 12s linear infinite; }

/* sketch illustrations — thumbnails only move on hover, lesson banner moves always */
.art .s { filter: url(#rough); stroke: #1f1f1f; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.a-bob { animation: bob 3s ease-in-out infinite; }
.a-fly { animation: fly 3.2s var(--ease) infinite; }
.a-wave { animation: wave 4s linear infinite; }
.a-blink, .a-pulse { animation: blink 1.4s ease-in-out infinite; }
.a-beat { transform-box: fill-box; transform-origin: center; animation: beat 1.4s ease-in-out infinite; }
.a-drift { animation: drift 7s ease-in-out infinite alternate; }
.a-scan { animation: scan 3.5s ease-in-out infinite; }
.a-drip { animation: drip 1.8s ease-in infinite; }
.a-glow { animation: glow 2.4s ease-in-out infinite; }
.lcard .art * { animation-play-state: paused; }
.lcard:hover .art * { animation-play-state: running; }

/* sections: same padding, same header, same left edge */
.sec { position: relative; padding: 80px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 64px; }
.head { max-width: 680px; margin-bottom: 32px; }
.eyebrow { font-size: 13px; font-weight: 600; color: #b45309; margin-bottom: 8px; }
.head h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; }
.head p:not(.eyebrow) { margin-top: 10px; font-size: 16px; color: var(--ink-3); }
.sub { font-size: 18px; font-weight: 600; margin: 40px 0 16px; }

.doodle { position: absolute; width: 54px; display: none; opacity: .75; pointer-events: none; }
.doodle .s { stroke: #1f1f1f; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.d-l { left: calc(50% - 730px); } .d-r { right: calc(50% - 730px); }
@media (min-width: 1560px) { .doodle { display: block; } }

/* news & world */
.news b { display: block; font-size: 24px; letter-spacing: -.02em; margin-bottom: 8px; }
.news .src, .src { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--mute); }
.flag { display: block; width: 42px; height: 28px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); margin-bottom: 14px; overflow: hidden; }
.wcity .flag { width: 24px; height: 16px; margin: 0; border-radius: 3px; }
.wcity .lbl { display: flex; align-items: center; gap: 8px; }
.wcard .code { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; margin-bottom: 14px; }
.wcard h4 { margin-bottom: 6px; }

/* course */
.progress { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px; margin-bottom: 40px; padding: 14px 16px 14px 20px; }
.p-label { font-size: 14px; font-weight: 600; }
.progress b { font-variant-numeric: tabular-nums; font-size: 14px; }
.bar { height: 8px; border-radius: 99px; background: var(--surf-3); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--saffron), #ffd08a 50%, var(--green)); transition: width .6s var(--ease); }
.bar.sm { height: 4px; width: 140px; }
.module + .module { margin-top: 40px; }
.module-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.mnum { font-size: 13px; font-weight: 600; color: var(--mute); }
.module-head h3 { font-size: 20px; font-weight: 700; }
.module-head p { font-size: 14px; color: var(--mute); }
.lcard { padding: 0; overflow: hidden; }
.lcard .thumb { background: var(--surf); border-bottom: 1px solid var(--line); padding: 12px 28px; }
.lcard .thumb svg { width: 100%; height: 130px; }
.lcard .meta { display: flex; justify-content: space-between; padding: 16px 20px 0; font-size: 13px; color: var(--mute); }
.lcard .ok { color: var(--ok); font-weight: 600; }
.lcard h4 { padding: 6px 20px 0; }
.lcard p { padding: 4px 20px 20px; }
.lcard.done .thumb { background: #f1faf3; }

/* certificate preview */
.cert-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-top: 40px; padding: 28px; }
.cert-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.cert-card p:not(.eyebrow) { font-size: 15px; margin-bottom: 18px; }
.cert-card img { width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); box-shadow: 0 10px 30px -14px rgba(0,0,0,.25); transform: rotate(1.2deg); }
.cert-mini { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; background: var(--surf); border-radius: var(--r); padding: 10px; margin-bottom: 16px; }
.cert-mini img { width: 120px; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.cert-mini p { font-size: 13px; color: var(--ink-3); }

/* air: map + panel */
.air { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.map { width: 100%; height: auto; max-height: 620px; cursor: crosshair; touch-action: manipulation; }
.map .land { fill: #f4f4f2; stroke: #1f1f1f; stroke-width: 1.2; stroke-linejoin: round; }
.map .dot { cursor: pointer; outline: none; }
.map .dot circle { stroke: #fff; stroke-width: 1.5; transition: fill 1.2s ease, r .2s; }
.map .dot text { font: 700 8.5px Inter, sans-serif; text-anchor: middle; pointer-events: none; }
.map .dot:hover circle, .map .dot:focus circle { r: 13; }
.map .dot.on circle { stroke: #171717; stroke-width: 2.5; r: 13; }
.map .st { stroke: #fff; stroke-width: .8; cursor: pointer; opacity: .9; }
.map .pin { fill: #17171722; stroke: #171717; stroke-width: 2; }
.timebar { display: grid; grid-template-columns: auto 1fr 76px; align-items: center; gap: 12px; margin-top: 12px; }
.timebar input { width: 100%; accent-color: var(--ink); }
.timebar span { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 12px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.panel { display: grid; gap: 18px; align-content: start; }
.p-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.p-top h3 { font-size: 20px; font-weight: 700; }
.chip { flex-shrink: 0; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.p-aqi { display: flex; align-items: center; gap: 16px; }
.p-aqi b { font-size: 56px; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.p-aqi p { font-size: 14px; color: var(--ink-3); }
.spark { width: 100%; height: auto; }
.spark { max-height: 90px; }
.spark .sx { font: 10px Inter, sans-serif; fill: var(--mute); }
.p-h { font-size: 15px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.params { display: grid; gap: 10px; margin-top: -8px; }
.prow { display: grid; grid-template-columns: 128px 1fr 92px; align-items: center; gap: 12px; }
.prow b { font-size: 14px; display: block; }
.prow small { font-size: 12px; color: var(--mute); }
.prow.main b::after { content: " ●"; color: var(--bad); font-size: 10px; vertical-align: middle; }
.prow .track, .mini { height: 8px; border-radius: 99px; background: var(--surf-2); overflow: hidden; }
.prow .track i, .mini i { display: block; height: 100%; border-radius: inherit; transition: width .5s var(--ease); }
.pv { text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.facts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.facts2 div { background: var(--surf); border-radius: var(--r); padding: 12px 14px; }
.facts2 b { display: block; font-size: 22px; letter-spacing: -.02em; }
.facts2 span { font-size: 13px; color: var(--ink-3); }
.wcity { display: grid !important; gap: 6px; padding: 16px; }
.wcity b { font-size: 28px; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* faq & support */
.faq { padding: 0; }
.faq summary { padding: 18px 20px; font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--mute); font-size: 18px; line-height: 1; }
.faq[open] summary::after { content: "–"; }
.faq p { padding: 0 20px 18px; }
.g2 > .faq { align-self: start; }
.pitch, .wall { display: grid; gap: 16px; align-content: start; }
.pitch h3, .wall h3 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.uses { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--ink-3); }
.uses li { display: flex; gap: 8px; } .uses li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.amounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.amounts button { height: 40px; border: 0; border-radius: var(--r); background: var(--surf-2); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.amounts button:hover { background: var(--surf-3); }
.amounts button.on { background: #fff; box-shadow: 0 0 0 2px var(--ink); }
.donors { list-style: none; margin: 0 -8px; padding: 0; max-height: 400px; overflow: auto; }
.donors li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; padding: 10px 8px; border-radius: var(--r); }
.donors li + li { border-top: 1px solid var(--line); }
.donors .nm { font-size: 14px; font-weight: 600; }
.donors .msg { font-size: 14px; color: var(--ink-3); }
.donors .when { font-size: 12px; color: var(--mute); }
.donors .amt { font-weight: 700; font-size: 14px; }
.empty { padding: 32px 12px; text-align: center; color: var(--mute); font-size: 14px; display: block !important; }

.foot { padding: 40px 0 48px; }
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; }
.foot-in p { margin-top: 10px; font-size: 14px; color: var(--ink-3); max-width: 340px; }
.foot-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 20px; font-size: 14px; }
.foot-links a { color: var(--ink-3); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }

/* dialogs */
dialog { border: 0; padding: 0; color: var(--ink); background: #fff; box-shadow: var(--sh-lg); }
dialog::backdrop { background: rgba(10,10,10,.35); }
dialog[open] { animation: pop .18s var(--ease); }
.modal { width: min(440px, calc(100% - 32px)); max-height: 92dvh; overflow-y: auto; border-radius: var(--r-xl); padding: 22px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head b { font-size: 18px; }
.nudge { font-size: 14px; color: var(--ink-3); background: var(--surf); border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; }
.skip { display: block; margin: 8px auto 0; }
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--surf-2); border-radius: var(--r); margin-bottom: 16px; }
.tabs button { flex: 1; height: 30px; border: 0; border-radius: 6px; background: none; font: inherit; font-weight: 500; font-size: 14px; color: var(--ink-3); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px #0000001a; }
#authDlg form, #donateDlg form { display: none; }
#authDlg form.on, #donateDlg form.on { display: block; }
.qr-warn { font-size: 13px; line-height: 1.45; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: var(--r); padding: 10px 12px; margin-bottom: 12px; }
.qr-box { text-align: center; background: var(--surf); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 14px; }
.qr-img { display: block; margin: 0 auto 8px; width: min(190px, 60vw); height: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.qr-notice { font-size: 13px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: var(--r); padding: 10px 12px; margin-bottom: 12px; }
.err { color: var(--bad); font-size: 13px; margin: -4px 0 10px; }
.palette { width: min(600px, calc(100% - 32px)); margin-top: 12vh; border-radius: var(--r-xl); }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--mute); }
.pal-x { display: none; }
.pal-in input::-webkit-search-cancel-button { display: none; }
.pal-in input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; color: var(--ink); background: none; }
.results { max-height: 56vh; overflow: auto; padding: 6px; }
.rgroup { padding: 8px 10px 4px; font-size: 12px; font-weight: 600; color: var(--mute); }
.ritem { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r); background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.ritem.on, .ritem:hover { background: var(--surf-2); }
.ritem .ri { width: 28px; height: 28px; flex-shrink: 0; border-radius: 6px; background: var(--surf-2); display: grid; place-items: center; font-size: 13px; }
.ritem b { font-size: 14px; font-weight: 500; display: block; }
.ritem small { font-size: 13px; color: var(--mute); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 460px; }
.langpick { text-align: center; padding: 28px 24px 24px; }
.langpick img { margin: 0 auto 12px; }
.langpick h2 { font-size: 20px; margin-bottom: 6px; }
.lang-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.lang-opts button { display: grid; gap: 4px; padding: 18px 12px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: #fff; font: inherit; color: var(--ink); cursor: pointer; }
.lang-opts button:hover { border-color: var(--ink); }
.lang-opts b { font-size: 22px; }
.lang-opts span { font-size: 13px; color: var(--mute); }
.cert-dlg { width: min(760px, calc(100% - 24px)); }
.cert-dlg canvas { width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); margin-bottom: 16px; }
.thanks { text-align: center; display: grid; gap: 10px; justify-items: center; }
.thanks .big { font-size: 46px; }

/* lesson sheet */
.sheet { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border-radius: 0; }
.sheet[open] { display: flex; flex-direction: column; }
.sheet:not(:modal)[open] { position: fixed; inset: 0; z-index: 50; }
.sheet-top { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 12px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.sheet-title { font-size: 14px; margin-right: auto; }
.sheet-body { flex: 1; display: grid; grid-template-columns: 280px 1fr; min-height: 0; }
.outline { border-right: 1px solid var(--line); overflow: auto; padding: 12px 8px; background: var(--surf); }
.outline h5 { margin: 14px 10px 4px; font-size: 13px; color: var(--mute); font-weight: 600; }
.outline a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r); font-size: 14px; color: var(--ink-2); text-decoration: none; }
.outline a:hover { background: var(--surf-3); }
.outline a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line-2); }
.tick { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid #c7c7c7; display: grid; place-items: center; font-size: 11px; color: #fff; }
.tick.ok { background: var(--ok); border-color: var(--ok); }
.lesson { overflow: auto; padding: 40px 24px 96px; }
.lesson > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.crumb { font-size: 13px; color: var(--mute); }
.lesson h1 { font-size: clamp(28px, 4vw, 38px); margin-top: 8px; margin-bottom: 8px; letter-spacing: -.03em; }
.lesson .tag { font-size: 18px; color: var(--ink-3); }
.banner { background: var(--surf); border-radius: var(--r-xl); padding: 16px; margin-top: 24px; }
.banner svg { max-height: 260px; width: 100%; }
.step { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; margin-top: 40px; margin-bottom: 14px; }
.step .n { font-style: normal; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; flex-shrink: 0; }
.story { font-size: 18px; line-height: 1.7; }
html[data-lang="hi"] .story { line-height: 1.85; }
.box { background: var(--surf); border-radius: var(--r-lg); padding: 18px 20px; font-size: 16px; }
.box h4 { font-size: 15px; margin-bottom: 10px; }
.dd { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dd ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.dd li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; }
.do li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.dont li::before { content: "✕"; color: var(--bad); font-weight: 700; }
.quiz { display: grid; gap: 8px; }
.quiz .q { font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; font: inherit; font-size: 15px; color: var(--ink); text-align: left; cursor: pointer; }
.opt:hover { border-color: #bdbdbd; }
.opt .k { width: 24px; height: 24px; border-radius: 6px; background: var(--surf-2); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.opt.right { border-color: var(--ok); background: #effaf3; }
.opt.wrong { border-color: var(--bad); background: #fff3f2; animation: shake .35s; }
.why { font-size: 15px; color: var(--ink-3); padding-top: 8px; }
.promise { margin-top: 40px; border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 28px 24px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.promise .pr { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.promise .fine { margin: 0; }
.lnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: grid; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-lg); font-size: 14px; box-shadow: var(--sh-lg); max-width: 340px; }
.toast.bad { background: #b42318; }
.skeleton { border-radius: var(--r); background: linear-gradient(90deg, var(--surf-2), var(--surf), var(--surf-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-3px); } }
@keyframes fly { 0% { transform: translate(0,0); opacity: 1; } 70% { transform: translate(84px,0); opacity: 1; } 71%, 100% { transform: translate(84px,0); opacity: 0; } }
@keyframes wave { to { transform: translateX(50px); } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes beat { 50% { transform: scale(1.15); } }
@keyframes drift { to { transform: translateX(14px); } }
@keyframes scan { 50% { transform: translate(-30px,-34px); } }
@keyframes drip { 0% { transform: translateY(-6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(26px); opacity: 0; } }
@keyframes glow { 50% { fill: #ffe066; } }
@keyframes pop { from { opacity: 0; transform: scale(.98); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* responsive: 3 → 2 → 1 columns, nothing else changes */
@media (max-width: 960px) {
  .links { display: none; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2, .air, .foot-in, .cert-card { grid-template-columns: minmax(0, 1fr); }
  .hero-art { max-width: 340px; margin: 0 auto; width: 100%; }
  .sheet-body { grid-template-columns: 1fr; }
  .outline { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav-in { gap: 8px; }
  .search-btn { min-width: 0; padding: 0 10px; }
  .search-btn span, .search-btn kbd, .wordmark span, .btn-line .en, .btn-line .hi { display: none !important; }
  .btn-line { width: 34px; padding: 0; }
  .hero { padding: 32px 0 40px; }
  .stats { gap: 20px; }
  .sec { padding: 56px 0; }
  .g3 { grid-template-columns: minmax(0, 1fr); }
  .progress { grid-template-columns: 1fr auto; }
  .progress .bar { grid-column: 1 / -1; grid-row: 2; }
  .progress .btn { grid-column: 1 / -1; }
  .prow { grid-template-columns: 104px 1fr 80px; gap: 8px; }
  .p-aqi b { font-size: 46px; }
  .amounts { grid-template-columns: repeat(3, 1fr); }
  .row2, .dd, .foot-links { grid-template-columns: 1fr 1fr; }
  .dd { grid-template-columns: 1fr; }
  .lesson { padding: 24px 16px 72px; }
  .palette { width: 100%; max-width: 100%; margin: 0; border-radius: 0 0 var(--r-xl) var(--r-xl); }
  .palette .results { max-height: calc(100dvh - 140px); }
  .pal-in kbd { display: none; } .pal-x { display: inline-flex; }
  .ritem small { max-width: 70vw; }
  /* hero on phones: words + buttons first, no pill, small art below */
  .hero .pill { display: none; }
  .hero-in { gap: 24px; }
  .hero-art { order: 0; max-width: 260px; }
  .hero h1 { font-size: 32px; margin-top: 0; }
  .lead { font-size: 16px; }
  .cta .btn { flex: 1; }
  .sheet-top .bar, #sheetProg { display: none; }
  .story { font-size: 17px; }
}

/* bot honeypot: invisible to people, irresistible to bots */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-turnstile { margin-bottom: 14px; }

/* live news */
.live { margin-top: 20px; padding: 0; overflow: hidden; }
.live-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.live-head b { display: flex; align-items: center; gap: 8px; }
.live-head .btn { margin-left: auto; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #e11d48; box-shadow: 0 0 0 0 rgba(225,29,72,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(225,29,72,0); } 100% { box-shadow: 0 0 0 0 rgba(225,29,72,0); } }
.live-list, .news-archive ul { list-style: none; margin: 0; padding: 0; }
.live-list li + li, .news-archive li + li { border-top: 1px solid var(--line); }
.hl { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px 20px; text-decoration: none; color: inherit; transition: background .15s; }
.hl:hover { background: var(--surf); }
.hl b { font-weight: 500; font-size: 15px; line-height: 1.5; }
.hl small { color: var(--mute); font-size: 12.5px; white-space: nowrap; align-self: start; padding-top: 3px; }
.hl .via { grid-column: 1; color: var(--mute); font-size: 12.5px; }
.hl.new { animation: newin 2.4s ease; }
@keyframes newin { from { background: #fff4d6; } to { background: transparent; } }
.live .fine { padding: 12px 20px; margin: 0; border-top: 1px solid var(--line); }
.wide-modal { width: min(760px, calc(100vw - 24px)); }
.news-archive { max-height: 70vh; overflow: auto; margin: 0 -20px -20px; }
.news-archive h4 { position: sticky; top: 0; background: #fff; padding: 10px 20px; font-size: 13px; color: var(--mute); border-bottom: 1px solid var(--line); z-index: 1; }
.news-archive .hl { padding-inline: 20px; }
/* testimonials */
.testi { display: grid; gap: 14px; align-content: space-between; }
.testi p { font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.testi p::before { content: "“"; font-size: 40px; line-height: 0; vertical-align: -14px; margin-right: 4px; color: #FF9933; }
.testi .who { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.testi .who small { color: var(--mute); display: block; }
.testi-form { margin-top: 20px; display: grid; gap: 12px; }
.testi-form h3 { font-size: 16px; }
.testi-form textarea { resize: vertical; min-height: 84px; font: inherit; }
.testi-row { display: flex; gap: 10px; }
.testi-row .input { flex: 1; }
.input.otp { font-size: 24px; letter-spacing: 12px; text-align: center; font-weight: 700; }
@media (max-width: 640px) {
  .hl { grid-template-columns: 1fr; } .hl small { padding: 0; }
  .live-head { flex-wrap: wrap; padding: 14px 16px; } .hl, .live .fine { padding-inline: 16px; }
}
