/* ==========================================================================
   QuanTeens - Design System
   One dark theme, one accent (green), two supporting hues (blue, amber),
   one warning hue (red). Everything is driven by the tokens in section 1 -
   change a value there and it updates on every page.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand hues */
  --green:   #2bd46c;
  --blue:    #4f8dff;
  --bronze:  #f2b54d;
  --red:     #ff5f57;
  --violet:  #a78bfa;

  --green-deep:  #18a752;
  --green-soft:  rgba(43, 212, 108, 0.10);
  --green-line:  rgba(43, 212, 108, 0.30);
  --blue-soft:   rgba(79, 141, 255, 0.10);
  --blue-line:   rgba(79, 141, 255, 0.30);
  --bronze-soft: rgba(242, 181, 77, 0.10);
  --bronze-line: rgba(242, 181, 77, 0.30);
  --red-soft:    rgba(255, 95, 87, 0.10);
  --red-line:    rgba(255, 95, 87, 0.32);

  /* Surfaces - elevation ladder */
  --bg:          #0c0d10;
  --bg-deep:     #08090b;
  --surface-1:   #121419;
  --surface-2:   #171a20;
  --surface-3:   #1f232a;
  --border:      #252930;
  --border-soft: #1c1f25;
  --border-lit:  #353a43;

  /* Text */
  --white:       #eceef1;
  --text:        var(--white);
  --text-dim:    #a0a5b0;
  --text-faint:  #7d828d;

  /* Type */
  --font-ui:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-num:  var(--font-ui);
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Geometry */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  --shell: 1180px;
  --nav-h: 66px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 150ms var(--ease);
  --med:  280ms var(--ease);

  --shadow-2: 0 10px 30px -12px rgba(0,0,0,.7);
  --shadow-3: 0 30px 70px -24px rgba(0,0,0,.85);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  color-scheme: dark;
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, canvas, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--green-line); color: #fff; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--border-lit); }

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.022em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.06; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 750; letter-spacing: -0.03em; }
h3 { font-size: 1.12rem; font-weight: 650; }
h4 { font-size: 0.98rem; font-weight: 650; }
p { text-wrap: pretty; }

.mono {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.dim   { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.up    { color: var(--green); }
.down  { color: var(--red); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow.muted { color: var(--text-faint); }

.lead { font-size: 1.07rem; color: var(--text-dim); line-height: 1.7; }

.gradient-text {
  background: linear-gradient(100deg, var(--white) 8%, var(--green) 60%, #8ff0b4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 4. Layout ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 22px;
}

.page { padding-block: 40px 96px; }

.section { padding-block: 84px; position: relative; }
.section-tight { padding-block: 56px; }
.section-alt { background: linear-gradient(180deg, var(--bg-deep), var(--bg) 85%); border-block: 1px solid var(--border-soft); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head .lead { max-width: 600px; margin-top: 12px; }
.section-head h2 { margin-top: 10px; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-head.center .lead { margin-inline: auto; }

.page-head { margin-bottom: 30px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin-top: 10px; }
.page-head .lead { max-width: 640px; margin-top: 12px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; gap: 22px; }

.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.spacer { flex: 1; }

/* ---------- 5. Surfaces ---------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  position: relative;
}
.card-pad-lg { padding: 30px; }

.card-hover { transition: border-color var(--fast), transform var(--fast), background var(--fast); }
.card-hover:hover { border-color: var(--border-lit); transform: translateY(-3px); background: var(--surface-2); }

.card-accent { overflow: hidden; }
.card-accent::before {
  content: '';
  position: absolute; inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: .8;
}
.card-glow::after {
  content: '';
  position: absolute; top: -40%; right: -20%;
  width: 70%; height: 120%;
  background: radial-gradient(closest-side, rgba(43,212,108,.10), transparent);
  pointer-events: none;
}

.panel {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 14px 16px;
}

.icon-box {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--green-soft);
  border: 1px solid var(--green-line);
  color: var(--green);
}
.icon-box svg { width: 20px; height: 20px; }
.icon-box.blue   { background: var(--blue-soft);   border-color: var(--blue-line);   color: var(--blue); }
.icon-box.bronze { background: var(--bronze-soft); border-color: var(--bronze-line); color: var(--bronze); }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 19px;
  border-radius: var(--r-pill);
  font-size: 0.92rem;
  font-weight: 620;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: background var(--fast), border-color var(--fast), color var(--fast), transform var(--fast), box-shadow var(--fast);
  white-space: nowrap;
  cursor: pointer;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .42; pointer-events: none; }

.btn-primary {
  background: var(--green);
  color: #05230f;
  font-weight: 700;
  box-shadow: 0 6px 22px -8px rgba(43, 212, 108, .6), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { background: #45e283; box-shadow: 0 10px 30px -8px rgba(43, 212, 108, .7), inset 0 1px 0 rgba(255,255,255,.25); }

.btn-ghost { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--border-lit); }

.btn-quiet { color: var(--text-dim); padding-inline: 12px; }
.btn-quiet:hover { color: var(--text); background: var(--surface-2); }

.btn-outline { border-color: var(--green-line); color: var(--green); background: var(--green-soft); }
.btn-outline:hover { background: rgba(43,212,108,.16); border-color: var(--green); }

.btn-danger { color: var(--red); background: var(--red-soft); border-color: var(--red-line); }
.btn-danger:hover { background: rgba(255,95,87,.18); }

.btn-sm { padding: 7px 14px; font-size: 0.83rem; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-block { width: 100%; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 600; font-size: .9rem; }
.link-arrow svg { width: 15px; height: 15px; transition: transform var(--fast); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- 7. Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge-green  { color: var(--green);  background: var(--green-soft);  border-color: var(--green-line); }
.badge-blue   { color: var(--blue);   background: var(--blue-soft);   border-color: var(--blue-line); }
.badge-bronze { color: var(--bronze); background: var(--bronze-soft); border-color: var(--bronze-line); }
.badge-red    { color: var(--red);    background: var(--red-soft);    border-color: var(--red-line); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot-live { animation: pulse 2.4s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(43,212,108,.6); }
  70%  { box-shadow: 0 0 0 7px rgba(43,212,108,0); }
  100% { box-shadow: 0 0 0 0 rgba(43,212,108,0); }
}

/* ---------- 8. Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.79rem; font-weight: 600; color: var(--text-dim); }
.field .hint { font-size: 0.73rem; color: var(--text-faint); }

.input, select.input, textarea.input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 0.92rem;
  transition: border-color var(--fast), background var(--fast), box-shadow var(--fast);
}
.input:hover { border-color: var(--border-lit); }
.input:focus { outline: none; border-color: var(--green); background: var(--bg); box-shadow: 0 0 0 3px var(--green-soft); }
.input-mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 550; }

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23a0a5b0' stroke-width='1.6' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 32px;
}

input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
}
input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: var(--surface-3); }
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 17px; height: 17px; margin-top: -6.5px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--green-line), 0 2px 8px rgba(0,0,0,.5);
  transition: transform var(--fast);
}
input[type='range']::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type='range']::-moz-range-track { height: 4px; border-radius: 99px; background: var(--surface-3); }
input[type='range']::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--green); border: 3px solid var(--bg); cursor: pointer; }

.slider-row { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.slider-row .row-between { font-size: 0.81rem; }
.slider-row .val { font-family: var(--font-num); font-size: 0.86rem; font-weight: 680; color: var(--green); font-variant-numeric: tabular-nums; }

/* ---------- 9. Progress ---------- */
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; position: relative; }
.bar > i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--green-deep), var(--green));
  transition: width 700ms var(--ease);
}

.ring { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-linecap: round; }
.ring .track { stroke: var(--surface-3); }
.ring .fill  { stroke: var(--green); transition: stroke-dashoffset 800ms var(--ease); }

/* ---------- 10. Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--nav-h);
  background: rgba(12, 13, 16, 0.6);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--med), background var(--med);
}
.nav.scrolled { border-bottom-color: var(--border-soft); background: rgba(12, 13, 16, 0.85); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 12px; }

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-logo { width: 34px; height: 34px; flex: none; object-fit: contain; }
.brand-name { font-weight: 750; font-size: 1.06rem; letter-spacing: -0.03em; color: var(--white); }
.brand-name span { color: var(--green); }

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 22px; }
.nav-link {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 550;
  color: var(--text-dim);
  transition: color var(--fast), background var(--fast);
}
.nav-link { white-space: nowrap; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--text); background: var(--surface-2); font-weight: 640; }

.nav-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.lang-switch { display: flex; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px; }
.lang-switch button {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 680;
  letter-spacing: .03em;
  color: var(--text-faint);
  transition: color var(--fast), background var(--fast);
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { background: var(--surface-3); color: var(--green); }

.tabbar { display: none; }

/* ---------- 11. Hero ---------- */
.hero { position: relative; padding-block: 72px 64px; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute;
  top: -260px; left: 50%;
  width: 1100px; height: 640px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(43,212,108,.13), transparent 64%);
  pointer-events: none;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 0%, #000 15%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 0%, #000 15%, transparent 75%);
  opacity: .6;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.hero h1 { margin-block: 18px 20px; }
/* Kazakh and Russian words run long - keep the headline to two or three lines. */
:lang(kk) .hero h1, :lang(ru) .hero h1 { font-size: clamp(1.9rem, 3.7vw, 2.9rem); }
.hero .lead { max-width: 540px; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-note { font-size: .82rem; color: var(--text-faint); margin-top: 16px; display: flex; align-items: center; gap: 8px; }

.hero-visual {
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-1), var(--bg-deep));
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-3);
}
.hero-visual canvas { width: 100%; height: 300px; }
.viz-again { cursor: pointer; transition: background var(--fast); }
.viz-again:hover { background: rgba(43,212,108,.2); }
.viz-again span:first-child { font-size: .85rem; line-height: 1; }
.hero-visual-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.hero-visual-head .title { font-size: .8rem; font-weight: 650; color: var(--text-dim); }
.hero-visual-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.hero-visual-stats > div { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 8px 10px; }
.hero-visual-stats .l { font-size: .66rem; color: var(--text-faint); font-weight: 600; }
.hero-visual-stats .v { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .95rem; letter-spacing: -.02em; }
.hero-float {
  position: absolute;
  left: -22px; top: 96px;
  background: var(--surface-2);
  border: 1px solid var(--border-lit);
  border-radius: 14px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--green);
  box-shadow: var(--shadow-2);
  animation: qt-float 6s ease-in-out infinite;
}
@keyframes qt-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 64px;
  position: relative;
}
.stat-strip > div { background: var(--surface-1); padding: 20px 18px; text-align: center; }
.stat-strip .n { font-variant-numeric: tabular-nums; font-size: 1.75rem; font-weight: 780; color: var(--white); letter-spacing: -0.04em; }
.stat-strip .n em { font-style: normal; color: var(--green); }
.stat-strip .l { font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }

/* ---------- 12. Landing blocks ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { padding: 26px; }
/* A thin connector runs behind the three steps on wide screens. */
@media (min-width: 821px) {
  .steps { position: relative; }
  .steps::before {
    content: ''; position: absolute; left: 12%; right: 12%; top: 47px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--green-line), var(--blue-line), var(--bronze-line), transparent);
  }
  .step { background: linear-gradient(180deg, var(--surface-1), var(--surface-1)); }
}
.step h3 { margin: 16px 0 8px; }
.step p { color: var(--text-dim); font-size: .92rem; }
.step-num { position: absolute; top: 22px; right: 24px; font-size: .78rem; font-weight: 700; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.parts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.part-card { display: flex; flex-direction: column; gap: 10px; min-height: 100%; }
.part-card .part-top { display: flex; align-items: center; justify-content: space-between; }
.part-card h3 { font-size: 1.08rem; }
.part-card ol { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.part-card li a { display: flex; gap: 10px; font-size: .86rem; color: var(--text-dim); padding: 4px 0; transition: color var(--fast); }
.part-card li a:hover { color: var(--text); }
.part-card li .n { font-variant-numeric: tabular-nums; color: var(--text-faint); font-weight: 650; width: 18px; flex: none; }
.part-card li .ok { color: var(--green); }

.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tool-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.tool-card:hover { box-shadow: 0 14px 40px -18px rgba(43,212,108,.35); }
.tool-card:hover .icon-box { transform: scale(1.06); }
.tool-card .icon-box { transition: transform var(--fast); }
.tool-card .icon-box { margin-bottom: 4px; }

.fest-chip {
  display: flex; align-items: center; gap: 14px;
  margin-top: 26px; padding: 12px 16px 12px 12px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface-1); max-width: 440px;
  transition: border-color var(--fast), background var(--fast);
}
.fest-chip:hover { border-color: var(--border-lit); background: var(--surface-2); }
.fest-chip .thumb { width: 84px; aspect-ratio: 16/9; border-radius: 8px; background-size: cover; background-position: center; flex: none; position: relative; }
.fest-chip .thumb::after { content: ''; position: absolute; inset: 0; border-radius: 8px; background: rgba(0,0,0,.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8.5 6.2v11.6a.7.7 0 0 0 1.07.6l9.2-5.8a.7.7 0 0 0 0-1.19l-9.2-5.8a.7.7 0 0 0-1.07.6Z'/%3E%3C/svg%3E") center/20px no-repeat; }
.fest-chip .t { font-size: .74rem; color: var(--text-faint); font-weight: 600; letter-spacing: .02em; }
.fest-chip .h { font-size: .9rem; font-weight: 640; line-height: 1.35; }
.tool-card h4 { font-size: .98rem; }
.tool-card p { font-size: .82rem; color: var(--text-dim); line-height: 1.5; }
.tool-card .badge { align-self: flex-start; margin-top: auto; }

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--green-line);
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgba(43,212,108,.18), transparent 60%),
    radial-gradient(ellipse 50% 100% at 0% 100%, rgba(79,141,255,.10), transparent 60%),
    var(--surface-1);
  padding: 52px 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.cta-band h2 { max-width: 560px; }
.cta-band p { color: var(--text-dim); margin-top: 10px; max-width: 520px; }

/* ---------- 13. Market ticker ---------- */
.ticker-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ticker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.ticker .sym { font-size: 0.78rem; font-weight: 750; letter-spacing: 0.04em; }
.ticker .note { font-size: .68rem; color: var(--text-faint); margin-left: 6px; font-weight: 500; }
.ticker .px  { font-variant-numeric: tabular-nums; font-size: 1.18rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 2px; }
.ticker .chg { font-variant-numeric: tabular-nums; font-size: 0.78rem; font-weight: 620; }
.ticker canvas { width: 96px; height: 34px; }

/* ---------- 14. Academy path ---------- */
.path-part { margin-bottom: 30px; }
.path-part-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.path-part-head .line { flex: 1; height: 1px; background: var(--border-soft); }

.node {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  transition: border-color var(--fast), background var(--fast), transform var(--fast);
  position: relative;
  margin-bottom: 10px;
}
.node:not(.locked):hover { border-color: var(--border-lit); background: var(--surface-2); transform: translateX(3px); }

.node-orb {
  width: 52px; height: 52px;
  border-radius: 15px;
  display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
  font-size: 1.06rem; font-weight: 750; letter-spacing: -0.02em;
  background: var(--surface-3);
  color: var(--text-dim);
  border: 1px solid var(--border);
  flex: none;
  transition: all var(--fast);
}
.node-orb svg { width: 22px; height: 22px; }
.node-title { font-size: 0.97rem; font-weight: 640; letter-spacing: -0.012em; }
.node-sub   { font-size: 0.8rem; color: var(--text-dim); margin-top: 2px; line-height: 1.45;
              display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.node-meta { display: flex; gap: 12px; margin-top: 6px; font-size: .72rem; color: var(--text-faint); }
.node-meta span { display: inline-flex; align-items: center; gap: 5px; }
.node-meta svg { width: 13px; height: 13px; }

.node.done  { border-color: rgba(43,212,108,.2); }
.node.done .node-orb { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.node.current { border-color: var(--green-line); background: linear-gradient(100deg, var(--green-soft), var(--surface-1) 60%); }
.node.current .node-orb { background: var(--green); color: #05230f; border-color: var(--green); box-shadow: 0 0 24px -4px rgba(43,212,108,.55); }
.node.locked { opacity: .5; cursor: not-allowed; }

.kbd-hint { font-size: .74rem; color: var(--text-faint); margin-top: 14px; }
.kbd-hint kbd {
  font-family: var(--font-mono); font-size: .7rem;
  padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--border-lit); background: var(--surface-2); color: var(--text-dim);
}
@media (hover: none) { .kbd-hint { display: none; } }

.part-bar { height: 3px; border-radius: 99px; background: var(--surface-3); overflow: hidden; width: 70px; }
.part-bar > i { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width 600ms var(--ease); }

/* ---------- 15. Quiz ---------- */
.quiz-q { font-size: 1.05rem; font-weight: 620; line-height: 1.5; }
.quiz-opts { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.quiz-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.45;
  transition: border-color var(--fast), background var(--fast), transform var(--fast);
  width: 100%;
}
.quiz-opt:not(:disabled):hover { border-color: var(--border-lit); background: var(--surface-3); }
.quiz-opt:not(:disabled):active { transform: scale(.995); }
.quiz-opt .key {
  width: 24px; height: 24px; flex: none;
  border-radius: 7px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 0.74rem; font-weight: 700;
  color: var(--text-dim);
  transition: all var(--fast);
}
.quiz-opt.correct { border-color: var(--green); background: var(--green-soft); }
.quiz-opt.correct .key { background: var(--green); border-color: var(--green); color: #05230f; }
.quiz-opt.wrong { border-color: var(--red); background: var(--red-soft); }
.quiz-opt.wrong .key { background: var(--red); border-color: var(--red); color: #fff; }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.faded { opacity: .42; }

.quiz-explain {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
  font-size: 0.89rem;
  line-height: 1.6;
  animation: fade 260ms var(--ease);
}
.quiz-explain b { color: var(--blue); }
.quiz-explain.ok { border-left-color: var(--green); background: var(--green-soft); }
.quiz-explain.ok b { color: var(--green); }

.quiz-progress { display: flex; gap: 5px; }
.quiz-progress i { width: 26px; height: 4px; border-radius: 99px; background: var(--surface-3); transition: background var(--fast); }
.quiz-progress i.done { background: var(--green); }
.quiz-progress i.miss { background: var(--red); }
.quiz-progress i.now  { background: var(--text-dim); }

.quiz-result { text-align: center; padding: 18px 0 4px; }
.quiz-result .score-ring { position: relative; width: 96px; height: 96px; margin: 0 auto; }
.quiz-result .score-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; font-variant-numeric: tabular-nums; }

/* ---------- 16. Concepts ---------- */
.concept {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
}
.concept .idx {
  width: 28px; height: 28px; flex: none;
  border-radius: 8px;
  background: var(--green-soft);
  border: 1px solid var(--green-line);
  color: var(--green);
  display: grid; place-items: center;
  font-size: 0.78rem; font-weight: 750;
}
.concept h4 { margin-bottom: 4px; font-size: 1rem; }
.concept p { font-size: 0.9rem; color: var(--text-dim); line-height: 1.65; }

.formula {
  display: inline-block;
  margin-top: 11px;
  padding: 8px 14px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--green);
  overflow-x: auto;
  max-width: 100%;
  white-space: pre;
}

/* ---------- 17. Video ---------- */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
}
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.video-placeholder {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(43,212,108,.08), transparent 62%),
    var(--bg-deep);
}
.video-placeholder.has-poster { background-size: cover; background-position: center; overflow: hidden; }
.video-placeholder.has-poster::before {
  content: ''; position: absolute; inset: -24px;
  background: inherit; filter: blur(10px) brightness(.45) saturate(.8);
}
.video-placeholder > * { position: relative; }
.video-placeholder .play {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1px solid var(--border-lit);
  background: var(--surface-2);
  display: grid; place-items: center;
  color: var(--text-faint);
}
.video-placeholder .play svg { width: 24px; margin-left: 3px; }

/* Click-to-load YouTube (no YouTube request until the visitor asks for it). */
.yt-lite { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; background-size: cover; background-position: center; }
.yt-lite::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55)); }
.yt-lite .play {
  position: relative;
  width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green); color: #05230f;
  box-shadow: 0 10px 40px -8px rgba(43,212,108,.7);
  transition: transform var(--fast);
}
.yt-lite .play svg { width: 28px; margin-left: 4px; }
.yt-lite:hover .play { transform: scale(1.06); }

/* ---------- 18. Lab ---------- */
.lab-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.lab-nav { position: sticky; top: calc(var(--nav-h) + 20px); display: flex; flex-direction: column; gap: 4px; }
.lab-nav button {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 0.87rem;
  font-weight: 550;
  color: var(--text-dim);
  text-align: left;
  transition: all var(--fast);
  border: 1px solid transparent;
  width: 100%;
}
.lab-nav button:hover { color: var(--text); background: var(--surface-2); }
.lab-nav button.active { color: var(--text); background: var(--surface-2); border-color: var(--border); font-weight: 640; }
.lab-ico { width: 18px; height: 18px; flex: none; color: var(--text-faint); transition: color var(--fast); }
.lab-ico svg { width: 18px; height: 18px; }
.lab-nav button:hover .lab-ico { color: var(--text-dim); }
.lab-nav button.active .lab-ico { color: var(--green); }
.lab-nav .tag { margin-left: auto; font-size: 0.68rem; font-weight: 620; color: var(--text-faint); }

.lab-share { cursor: pointer; transition: color var(--fast), border-color var(--fast); }
.lab-share:hover { color: var(--text); border-color: var(--border-lit); }
.lab-tool { display: none; }
.lab-tool.active { display: block; animation: fade 280ms var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.lab-split { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 22px; align-items: start; }
.lab-col-inputs  { grid-column: 1; grid-row: 1 / span 2; }
.lab-col-chart   { grid-column: 2; grid-row: 1; }
.lab-col-results { grid-column: 2; grid-row: 2; }

.chart-wrap { background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; position: relative; }
.chart-wrap canvas { width: 100%; height: auto; }

.lab-note { font-size: .85rem; line-height: 1.65; color: var(--text-dim); border-left: 2px solid var(--green-line); padding-left: 14px; margin-top: 4px; }
.lab-note b { color: var(--text); }

.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.result { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--r-md); padding: 12px 14px; }
.result .l { font-size: 0.72rem; color: var(--text-dim); font-weight: 600; }
.result .v { font-variant-numeric: tabular-nums; font-size: 1.18rem; font-weight: 720; letter-spacing: -0.03em; margin-top: 2px; }
.result.hl { border-color: var(--green-line); background: var(--green-soft); }
.result.hl .v { color: var(--green); }
.result.neg .v { color: var(--red); }
.result.blue .v { color: var(--blue); }
.result.bronze .v { color: var(--bronze); }

/* ---------- 19. Daily streak ---------- */
.streak-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 650; color: var(--bronze); }
.streak-pill svg { width: 15px; height: 15px; }

/* Glossary */
.gl-search {
  position: sticky; top: calc(var(--nav-h) + 10px); z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px 8px 14px; margin-bottom: 30px;
  background: rgba(18,20,25,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--r-pill);
}
.gl-search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.gl-search .input { border: 0; background: transparent; padding: 8px 0; box-shadow: none; font-size: 1rem; }
.gl-search .input:focus { box-shadow: none; background: transparent; }
.gl-search-ico { display: flex; width: 18px; color: var(--text-faint); flex: none; }
.gl-part { margin-bottom: 30px; }
.gl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gl-item { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.gl-item h4 { font-size: 1rem; }
.gl-en { font-size: .74rem; color: var(--text-faint); font-weight: 600; letter-spacing: .01em; }
.gl-item p { font-size: .88rem; color: var(--text-dim); line-height: 1.6; flex: 1; }
.gl-link { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--green); font-weight: 600; margin-top: 4px; }
.gl-link svg { width: 13px; height: 13px; }
@media (max-width: 820px) { .gl-grid { grid-template-columns: 1fr; } }

/* Certificate card */
.cert-card {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px;
  border: 1px dashed var(--border-lit);
  border-radius: var(--r-lg);
  background: var(--surface-1);
}
.cert-card.on { border-style: solid; border-color: var(--bronze-line); background: linear-gradient(100deg, var(--bronze-soft), var(--surface-1) 65%); }
.cert-seal { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--text-faint); font-size: 1.4rem; }
.cert-seal svg { width: 20px; height: 20px; }
.cert-card.on .cert-seal { background: var(--bronze-soft); border: 1px solid var(--bronze-line); }

/* ---------- 20. About: impact, SDG, team ---------- */
.impact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.impact { padding: 24px 22px; }
.impact .n { font-size: clamp(2rem, 3.6vw, 2.7rem); font-weight: 800; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.impact .n em { font-style: normal; color: var(--green); }
.impact .l { font-size: .85rem; color: var(--text-dim); margin-top: 8px; }
.impact .icon-box { margin-bottom: 18px; }

.sdg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sdg {
  display: flex; flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-1);
}
.sdg-tile {
  aspect-ratio: 1 / 1;
  max-height: 200px;
  color: #fff;
  padding: 18px 18px 16px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
}
.sdg-tile .num { font-size: 3.4rem; font-weight: 800; line-height: .9; letter-spacing: -0.05em; }
.sdg-tile .ttl { font-size: .86rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; line-height: 1.2; }
.sdg-tile .sdg-ico { position: absolute; right: 16px; top: 16px; width: 48px; height: 48px; opacity: .95; }
.sdg-compact .sdg-tile { padding: 14px 14px 13px; }
.sdg-compact .sdg-tile .num { font-size: 2.7rem; }
.sdg-compact .sdg-tile .ttl { font-size: .72rem; }
.sdg-compact .sdg-tile .sdg-ico { width: 36px; height: 36px; top: 14px; right: 14px; }
.sdg-body { padding: 18px 20px 22px; }
.sdg-body p { font-size: .88rem; color: var(--text-dim); line-height: 1.6; }

.sdg-mini { display: flex; gap: 4px; margin-top: 14px; }
.sdg-mini span { width: 26px; height: 26px; border-radius: 4px; display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: #fff; }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.member { padding: 0; overflow: hidden; }
.member-photo { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; filter: saturate(.92); transition: transform 600ms var(--ease); }
.member:hover .member-photo { transform: scale(1.03); }
.member-photo-wrap { overflow: hidden; position: relative; }
.member-photo-wrap::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(18,20,25,.9)); }
.member-body { padding: 18px 20px 22px; position: relative; }
.member-body h3 { font-size: 1.08rem; }
.member-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.festival { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center; }

/* ---------- 21. Modal / toast ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(5, 6, 8, .74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: grid; place-items: center;
  padding: 20px;
  animation: fade 180ms var(--ease);
}
.modal {
  width: 100%; max-width: 430px;
  background: var(--surface-1);
  border: 1px solid var(--border-lit);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow-3);
  max-height: 90vh; overflow-y: auto;
  animation: rise 260ms var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.toast-host {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(94vw, 400px);
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--border-lit);
  box-shadow: var(--shadow-2);
  font-size: 0.87rem;
  font-weight: 560;
  animation: rise 240ms var(--ease);
}
.toast.ok  { border-color: var(--green-line); }
.toast.ok .dot { color: var(--green); }
.toast.err { border-color: var(--red-line); }
.toast.err .dot { color: var(--red); }

/* ---------- 22. Footer & misc ---------- */
.footer {
  border-top: 1px solid var(--border-soft);
  padding-block: 52px 30px;
  color: var(--text-faint);
  font-size: 0.86rem;
  background: var(--bg-deep);
}
.footer a:hover { color: var(--text); }
.footer-cols { display: flex; gap: 48px; flex-wrap: wrap; justify-content: space-between; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-brand { max-width: 300px; }
.footer-brand p { margin-top: 12px; line-height: 1.6; }
.footer-col h5 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-dim); font-weight: 700; margin-bottom: 4px; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border-soft); font-size: .78rem; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--green); color: #05230f;
  padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Content fades in once texts are filled in by JS (failsafe: shows after 2 s regardless). */
body:not(.ready) main, body:not(.ready) .footer { opacity: 0; animation: qt-show 0s 2s forwards; }
body.ready main, body.ready .footer { animation: qt-fade-in 260ms var(--ease); }
@keyframes qt-show { to { opacity: 1; } }
@keyframes qt-fade-in { from { opacity: 0; } to { opacity: 1; } }

.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 650ms var(--ease), transform 650ms var(--ease); }

/* ---------- 23. Responsive ---------- */
@media (max-width: 1100px) {
  .nav-cta { display: none; }
}

@media (max-width: 1060px) {
  .tools-grid, .teach-grid { grid-template-columns: repeat(2, 1fr); }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-float { left: 12px; }
  .lab-layout { grid-template-columns: 1fr; }
  .lab-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 6px;
    gap: 6px;
    scrollbar-width: none;
  }
  .lab-nav::-webkit-scrollbar { display: none; }
  .lab-nav button { white-space: nowrap; width: auto; flex: none; background: var(--surface-1); border-color: var(--border); border-radius: var(--r-pill); }
  .lab-nav button.active { background: var(--green-soft); border-color: var(--green-line); color: var(--green); }
  .lab-nav .tag { display: none; }
  .grid-sidebar { grid-template-columns: 1fr; }
  .parts-grid { grid-template-columns: repeat(2, 1fr); }
  .festival { grid-template-columns: 1fr; }
  .nav-links { margin-left: 8px; }
}

@media (max-width: 820px) {
  :root { --nav-h: 60px; }
  body { padding-bottom: 70px; }

  .nav-links, .nav-cta { display: none; }

  .lab-split { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
  .lab-col-chart {
    order: 1;
    position: sticky;
    top: calc(var(--nav-h) + 4px);
    z-index: 6;
    background: var(--surface-1);
    padding-bottom: 8px;
  }
  .lab-col-inputs  { order: 2; }
  .lab-col-results { order: 3; }

  .section { padding-block: 60px; }
  .grid-2, .grid-3, .steps, .sdg-grid, .team-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); margin-top: 44px; }
  .hero { padding-block: 44px 40px; }
  .hero-visual canvas { height: 230px; }
  .card { padding: 18px; }
  .card-pad-lg { padding: 22px; }
  .cta-band { padding: 34px 24px; }
  .page { padding-block: 26px 48px; }
  .node { grid-template-columns: 44px minmax(0,1fr); gap: 12px; padding: 12px; }
  .node-orb { width: 44px; height: 44px; border-radius: 13px; font-size: .92rem; }
  .node > .node-end { grid-column: 1 / -1; }
  .footer-cols { gap: 30px; }
  .sdg-tile { max-height: none; aspect-ratio: 2.2 / 1; }

  .tabbar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 95;
    background: rgba(12,13,16,.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .tabbar a {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 5px 2px;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--text-faint);
    transition: color var(--fast);
  }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a.active { color: var(--green); }
}

@media (max-width: 560px) {
  .parts-grid, .team-grid, .teach-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tool-card { padding: 14px; gap: 8px; }
  .tool-card p { display: none; }
  .tool-card h4 { font-size: .88rem; }
  .impact { padding: 18px 16px; }
  .impact .icon-box { margin-bottom: 12px; }
  .hero-visual-stats { grid-template-columns: repeat(3, 1fr); }
  .hero-float { display: none; }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .member { display: grid; grid-template-columns: 110px 1fr; align-items: center; }
  .member-photo-wrap::after { display: none; }
  .member-body { padding: 14px 16px; }
}

@media (max-width: 400px) {
  .brand-name { display: none; }
  .shell { padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .tabbar, .footer, .gl-search, .video-frame, #quiz-section, .lesson-aside, .skip-link, .hero-grid-bg, .toast-host { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card, .concept, .panel { background: #fff !important; border: 1px solid #ccc !important; box-shadow: none !important; break-inside: avoid; }
  .dim, .faint, .lead, .concept p, .gl-item p { color: #333 !important; }
  .eyebrow, .gl-link, .formula, .up { color: #0a7a3a !important; }
  .formula { background: #f4f4f4 !important; border-color: #ccc !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .grid-sidebar { grid-template-columns: 1fr; }
  a { text-decoration: none; }
}
