/* آکادمی زیست‌شناسی دکتر علیرضا احمدیان — نسخه‌ی نمایشی
   Design: a night-lab hero (a glowing DNA helix) over a calm, paper-light page.
   Everything is local: no CDN, no inline style (CSP: style-src 'self'). */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+200C-200F, U+00AB, U+00BB, U+2E2E;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter.woff2') format('woff2');
  font-weight: 400 650;
  font-display: swap;
}

:root {
  --paper: #f4f8f6;
  --paper-2: #e9f2ee;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.86);
  --ink: #0a1f19;
  --ink-2: #3a4f49;
  --ink-3: #5a6e68;
  --line: #d8e4de;
  --line-2: #c3d5cc;
  --brand: #0b7a63;
  --brand-2: #0f9f80;
  --brand-soft: #d9f3ea;
  --brand-ring: rgba(11, 122, 99, 0.2);
  --brand-ink: #ffffff;
  --night: #03110d;
  --night-2: #082019;
  --night-3: #0d2c23;
  --night-line: rgba(150, 235, 210, 0.14);
  --night-ink: #e9f7f2;
  --night-ink-2: #a9c8be;
  --mint: #34d399;
  --teal: #2dd4bf;
  --glow: #5eead4;
  --amber: #fbbf24;
  --sky: #60a5fa;
  --rose: #f472b6;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok-soft: #dcf5ec;
  --radius: 24px;
  --radius-md: 18px;
  --shadow: 0 1px 2px rgba(10, 31, 25, 0.05), 0 14px 34px -16px rgba(10, 31, 25, 0.22);
  --shadow-lg: 0 40px 80px -30px rgba(3, 17, 13, 0.45);
  --font: 'Vazirmatn', 'Inter', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --wrap: 72rem;
  --top-h: 4.4rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #05100d;
    --paper-2: #081813;
    --surface: #0c1f19;
    --surface-glass: rgba(12, 31, 25, 0.86);
    --ink: #e6f3ee;
    --ink-2: #b3cbc3;
    --ink-3: #8ea89f;
    --line: #1a332b;
    --line-2: #24453a;
    --brand: #34d399;
    --brand-2: #5eead4;
    --brand-soft: #0f2e25;
    --brand-ring: rgba(52, 211, 153, 0.22);
    --brand-ink: #03110d;
    --danger: #ff8a80;
    --danger-soft: #2a1210;
    --ok-soft: #0f2e25;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.9;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 0.25em; }
h1, h2, h3 { line-height: 1.35; margin: 0; overflow-wrap: break-word; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); font-weight: 850; }
h3 { font-size: 1.12rem; font-weight: 750; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
[dir="ltr"] { font-family: 'Inter', var(--font); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100; padding: 0.6rem 1rem; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.skip:focus { top: 1rem; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
main:focus { outline: none; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3rem; padding: 0.6rem 1.35rem;
  border: 1.5px solid var(--brand); border-radius: 999px;
  background: var(--brand); color: var(--brand-ink);
  font-weight: 750; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px var(--brand); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.15rem; height: 1.15rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-sm { min-height: 2.5rem; padding: 0.35rem 1rem; font-size: 0.92rem; }
.btn-lg { min-height: 3.4rem; padding: 0.7rem 1.7rem; font-size: 1.04rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); box-shadow: none; }
.btn-glow {
  color: #03110d;
  background: linear-gradient(135deg, var(--glow), var(--mint) 55%, #10b981);
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.35), 0 10px 30px -10px rgba(52, 211, 153, 0.65);
}
.btn-glow:hover { box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.6), 0 16px 40px -12px rgba(52, 211, 153, 0.85); }
.btn-line { background: rgba(255, 255, 255, 0.04); color: var(--night-ink); border-color: rgba(233, 247, 242, 0.32); }
.btn-line:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(233, 247, 242, 0.6); box-shadow: none; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-danger { color: #1a0605; } }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 50;
  color: var(--night-ink);
  background: rgba(3, 17, 13, 0.74);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--night-line);
  transition: background-color 0.35s, color 0.35s, border-color 0.35s;
}
.top.is-light { color: var(--ink); background: var(--surface-glass); border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; gap: 1rem; min-height: var(--top-h); }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: inherit; text-decoration: none; margin-inline-end: auto; min-width: 0; }
.brand-mark { width: 2.4rem; height: 2.4rem; flex: none; padding: 0.35rem; border-radius: 12px; background: rgba(94, 234, 212, 0.12); border: 1px solid rgba(94, 234, 212, 0.35); fill: none; stroke: var(--glow); stroke-width: 2.4; stroke-linecap: round; }
.top.is-light .brand-mark, .foot .brand-mark { stroke: var(--brand); border-color: var(--line-2); background: var(--brand-soft); }
.brand-mark .rung { stroke-width: 1.8; opacity: 0.7; }
.brand-t { display: grid; line-height: 1.3; min-width: 0; }
.brand-t b { font-weight: 800; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-t small { font-size: 0.74rem; opacity: 0.72; font-weight: 500; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 1.2rem; }
.nav ul { display: flex; gap: 0.2rem; list-style: none; }
.nav ul a { display: block; padding: 0.4rem 0.8rem; border-radius: 999px; color: inherit; text-decoration: none; font-weight: 600; font-size: 0.95rem; opacity: 0.85; transition: opacity 0.2s, background-color 0.2s, color 0.2s; }
.nav ul a:hover, .nav ul a.is-here { opacity: 1; background: rgba(150, 235, 210, 0.12); }
.top.is-light .nav ul a:hover, .top.is-light .nav ul a.is-here { background: var(--brand-soft); color: var(--brand); }
.menu-btn { display: none; }

@media (max-width: 61.99rem) {
  .js .menu-btn {
    display: inline-grid; place-items: center; width: 2.9rem; height: 2.9rem; flex: none;
    border-radius: 14px; border: 1px solid; border-color: inherit; color: inherit;
    background: transparent; cursor: pointer;
  }
  .js .top .menu-btn { border-color: var(--night-line); }
  .js .top.is-light .menu-btn { border-color: var(--line-2); }
  .burger, .burger::before, .burger::after { display: block; width: 1.2rem; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.3s var(--ease), background-color 0.2s; }
  .burger { position: relative; }
  .burger::before, .burger::after { content: ''; position: absolute; inset-inline-start: 0; }
  .burger::before { top: -6px; }
  .burger::after { top: 6px; }
  .is-open .burger { background: transparent; }
  .is-open .burger::before { transform: translateY(6px) rotate(45deg); }
  .is-open .burger::after { transform: translateY(-6px) rotate(-45deg); }

  .js .nav {
    position: fixed; inset: var(--top-h) 0 auto 0; z-index: 49;
    display: grid; gap: 1.2rem; align-content: start;
    padding: 1.2rem 1.25rem 1.8rem;
    background: var(--night); color: var(--night-ink);
    border-bottom: 1px solid var(--night-line);
    box-shadow: var(--shadow-lg);
    transform: translateY(-0.75rem); opacity: 0; visibility: hidden;
    transition: transform 0.35s var(--ease), opacity 0.25s, visibility 0s 0.35s;
  }
  .js .is-open .nav { transform: none; opacity: 1; visibility: visible; transition: transform 0.35s var(--ease), opacity 0.25s; }
  .js .nav ul { display: grid; gap: 0.2rem; }
  .js .nav ul a { font-size: 1.15rem; padding: 0.65rem 0.9rem; opacity: 1; border-radius: 14px; }
  .js .top.is-light .nav ul a:hover, .js .top.is-light .nav ul a.is-here { background: rgba(150, 235, 210, 0.12); color: inherit; }
  .js .nav .btn { width: 100%; }
  /* without the script the menu is a plain wrapped row under the brand */
  html:not(.js) .top-in { flex-wrap: wrap; padding-block: 0.6rem; }
  html:not(.js) .nav { flex-wrap: wrap; gap: 0.6rem; }
  html:not(.js) .nav ul { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: var(--night-ink);
  background:
    radial-gradient(60rem 40rem at 15% 20%, rgba(45, 212, 191, 0.16), transparent 60%),
    radial-gradient(50rem 36rem at 90% 90%, rgba(16, 185, 129, 0.14), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  margin-top: calc(var(--top-h) * -1); padding-top: var(--top-h);
}
.hero::before {
  /* the lab-notebook grid */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(150, 235, 210, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 235, 210, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
}
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; gap: 2rem; padding-block: 4.5rem 2.5rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.35rem 0.95rem; border-radius: 999px;
  border: 1px solid var(--night-line); background: rgba(150, 235, 210, 0.06);
  color: var(--glow); font-size: 0.88rem; font-weight: 650;
}
.pulse { position: relative; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--mint); flex: none; }
.pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--mint); opacity: 0; animation: ping 2.2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.9); opacity: 0; } }
.hero h1 { margin-top: 1.3rem; font-size: clamp(2.7rem, 1.6rem + 5vw, 5.2rem); font-weight: 900; line-height: 1.15; letter-spacing: -0.02em; }
.hero h1 span { display: block; }
.grad {
  background: linear-gradient(100deg, #99f6e4 0%, var(--glow) 30%, var(--mint) 60%, #a7f3d0 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 8s linear infinite;
  padding-bottom: 0.1em;
}
@keyframes sheen { to { background-position: -200% 0; } }
.lead { margin-top: 1.4rem; max-width: 34rem; font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.2rem); color: var(--night-ink-2); line-height: 2; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 2rem; list-style: none; color: var(--night-ink-2); font-size: 0.92rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-points svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: var(--mint); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.hero-art { position: relative; height: clamp(24rem, 52vw, 36rem); }
.hero-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.helix-svg { position: absolute; inset: 8% 20%; width: 60%; height: 84%; }
.helix-svg .s1 { fill: none; stroke: var(--glow); stroke-width: 5; stroke-linecap: round; }
.helix-svg .s2 { fill: none; stroke: var(--mint); stroke-width: 5; stroke-linecap: round; opacity: 0.8; }
.helix-svg .rungs path { stroke: rgba(233, 247, 242, 0.35); stroke-width: 3; stroke-linecap: round; }
.is-live .helix-svg { display: none; }
.chip {
  position: absolute; z-index: 2;
  display: grid; gap: 0.1rem; padding: 0.7rem 1rem; border-radius: 16px;
  background: rgba(8, 32, 25, 0.62); border: 1px solid rgba(150, 235, 210, 0.2);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
  line-height: 1.5;
}
.chip b { font-size: 1.05rem; font-weight: 800; color: #fff; }
.chip span { font-size: 0.8rem; color: var(--night-ink-2); }
.chip .pair { display: inline-flex; align-items: center; gap: 0.4rem; direction: ltr; font-family: 'Inter', var(--font); }
.chip .pair i { width: 0.6rem; height: 0.6rem; border-radius: 50%; }
.chip .a { background: var(--mint); } .chip .t { background: var(--amber); } .chip .g { background: var(--sky); } .chip .c { background: var(--rose); }
.chip-1 { top: 12%; inset-inline-end: 2%; }
.chip-2 { bottom: 14%; inset-inline-start: 0; }
.chip-3 { top: 46%; inset-inline-end: -2%; }
@media (prefers-reduced-motion: no-preference) {
  .chip { animation: bob 7s ease-in-out infinite; }
  .chip-2 { animation-delay: -3.5s; }
  .chip-3 { animation-delay: -1.8s; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0 0 3.5rem; list-style: none; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--night-line); background: var(--night-line); }
.stats li { display: grid; gap: 0.15rem; padding: 1.4rem 1.2rem; background: rgba(6, 26, 21, 0.9); text-align: center; }
.stats strong { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 900; color: #fff; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stats span { color: var(--night-ink-2); font-size: 0.9rem; }

/* a slow strip of chapter names under the hero */
.ticker { overflow: hidden; border-block: 1px solid var(--night-line); background: var(--night-2); color: var(--night-ink-2); padding-block: 0.95rem; }
.ticker-track { display: flex; width: max-content; }
.ticker span { display: inline-flex; align-items: center; gap: 2.4rem; padding-inline-end: 2.4rem; white-space: nowrap; font-weight: 600; font-size: 0.98rem; }
.ticker span::after { content: ''; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--mint); opacity: 0.7; }
@media (prefers-reduced-motion: no-preference) { .ticker-track { animation: tick 70s linear infinite; } }
@keyframes tick { to { transform: translateX(50%); } }

/* ---------------------------------------------------------------- sections */
.section { padding-block: clamp(4.5rem, 3rem + 6vw, 7.5rem); }
.section.tint { background: var(--paper-2); }
.sec-head { max-width: 44rem; margin-bottom: 3rem; }
.sec-head.center { margin-inline: auto; text-align: center; }
.kicker { display: inline-flex; align-items: center; gap: 0.55rem; margin-bottom: 0.9rem; color: var(--brand); font-weight: 800; font-size: 0.9rem; }
.kicker::before { content: ''; width: 1.6rem; height: 2px; border-radius: 2px; background: currentColor; }
.section-lead { margin-top: 1rem; color: var(--ink-2); font-size: 1.06rem; }
.accent { color: var(--brand); }

/* reveal on scroll (only while the script runs, and only if motion is welcome) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
  .js [data-reveal="2"] { transition-delay: 0.12s; }
  .js [data-reveal="3"] { transition-delay: 0.24s; }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- about */
.about { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.id-card {
  position: relative; margin: 0; padding: 1.4rem; border-radius: 28px;
  background: linear-gradient(160deg, var(--night-3), var(--night) 70%);
  color: var(--night-ink); box-shadow: var(--shadow-lg);
  border: 1px solid var(--night-line); overflow: hidden;
}
.id-card::after { content: ''; position: absolute; inset: auto -30% -40% auto; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(52, 211, 153, 0.25), transparent 65%); pointer-events: none; }
.id-top { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.78rem; color: var(--night-ink-2); font-weight: 600; }
.id-top span:last-child { font-family: 'Inter', var(--font); letter-spacing: 0.14em; direction: ltr; }
.lens { position: relative; width: min(100%, 20rem); margin: 1.2rem auto; aspect-ratio: 1; }
.lens svg { width: 100%; height: 100%; }
.lens .ring { fill: none; stroke: rgba(150, 235, 210, 0.22); }
.lens .ring-2 { fill: none; stroke: rgba(150, 235, 210, 0.14); stroke-dasharray: 2 6; }
.lens .field { fill: rgba(13, 44, 35, 0.9); }
.lens .lens-core { fill: #06201a; }
.lens .cellb { fill: rgba(52, 211, 153, 0.1); stroke: rgba(94, 234, 212, 0.55); stroke-width: 1.4; }
.lens .nuc { fill: rgba(96, 165, 250, 0.22); stroke: rgba(147, 197, 253, 0.7); stroke-width: 1.2; }
.lens .mono { fill: #fff; font-family: var(--font); font-weight: 900; font-size: 46px; text-anchor: middle; dominant-baseline: central; }
.lens .mono-s { fill: var(--glow); font-family: 'Inter', var(--font); font-weight: 600; font-size: 11px; letter-spacing: 3px; text-anchor: middle; }
@media (prefers-reduced-motion: no-preference) { .lens .spin { transform-origin: 150px 150px; animation: spin 80s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.id-meta { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 0; }
.id-meta div { padding: 0.7rem 0.8rem; border-radius: 14px; background: rgba(150, 235, 210, 0.06); border: 1px solid var(--night-line); }
.id-meta dt { font-size: 0.74rem; color: var(--night-ink-2); }
.id-meta dd { margin: 0; font-weight: 750; font-size: 0.95rem; }
.about-text > p { margin-top: 1.1rem; color: var(--ink-2); font-size: 1.05rem; }
.ticks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem 1.2rem; margin-top: 1.8rem; list-style: none; }
.ticks li { display: flex; align-items: center; gap: 0.65rem; font-weight: 650; }
.ticks svg { width: 1.6rem; height: 1.6rem; flex: none; padding: 0.3rem; border-radius: 50%; background: var(--brand-soft); fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.quote { position: relative; margin: 2rem 0 0; padding: 1.2rem 1.5rem 1.1rem; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.quote::before { content: ''; position: absolute; inset-block: 1.2rem; inset-inline-start: -1px; width: 4px; border-radius: 4px; background: linear-gradient(var(--glow), var(--brand)); }
.quote p { margin: 0; }
.quote footer { margin-top: 0.6rem; font-size: 0.88rem; color: var(--ink-3); font-weight: 600; }

/* ---------------------------------------------------------------- cell explorer */
.cell-sec { background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); }
.cell-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.cell-stage {
  position: sticky; top: 6rem;
  padding: clamp(0.8rem, 2vw, 1.4rem); border-radius: 30px;
  background: radial-gradient(ellipse at 50% 40%, var(--night-3), var(--night) 75%);
  border: 1px solid var(--night-line); box-shadow: var(--shadow-lg);
}
.cell-stage-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.4rem; padding-inline: 0.4rem; color: var(--night-ink-2); font-size: 0.8rem; font-weight: 600; }
.cell-stage-top span:last-child { font-family: 'Inter', var(--font); letter-spacing: 0.12em; direction: ltr; }
.cell-svg { width: 100%; height: auto; }
.cell-svg .wall { fill: none; stroke: #2f9e6a; stroke-width: 10; }
.cell-svg .wall-in { fill: none; stroke: rgba(134, 239, 172, 0.3); stroke-width: 2; stroke-dasharray: 3 7; }
.cell-svg .membrane { fill: rgba(16, 64, 48, 0.55); stroke: #6ee7b7; stroke-width: 2.4; }
.cell-svg .dots { fill: rgba(167, 243, 208, 0.25); }
.cell-svg .vac { fill: rgba(96, 165, 250, 0.16); stroke: rgba(147, 197, 253, 0.8); stroke-width: 2; }
.cell-svg .vac-shine { fill: none; stroke: rgba(191, 219, 254, 0.35); stroke-width: 3; stroke-linecap: round; }
.cell-svg .nuc-env { fill: rgba(167, 139, 250, 0.22); stroke: #c4b5fd; stroke-width: 3; }
.cell-svg .nuc-pore { fill: none; stroke: rgba(196, 181, 253, 0.5); stroke-width: 1.5; stroke-dasharray: 4 6; }
.cell-svg .nucleolus { fill: rgba(196, 181, 253, 0.8); }
.cell-svg .chromatin { fill: none; stroke: rgba(221, 214, 254, 0.6); stroke-width: 1.6; stroke-linecap: round; }
.cell-svg .er { fill: none; stroke: #f9a8d4; stroke-width: 3; stroke-linecap: round; }
.cell-svg .rib { fill: #fde68a; }
.cell-svg .golgi { fill: none; stroke: #fbbf24; stroke-width: 5; stroke-linecap: round; }
.cell-svg .ves { fill: rgba(251, 191, 36, 0.5); stroke: #fbbf24; stroke-width: 1.4; }
.cell-svg .mito { fill: rgba(251, 146, 60, 0.35); stroke: #fb923c; stroke-width: 2.4; }
.cell-svg .cristae { fill: none; stroke: #fdba74; stroke-width: 1.8; stroke-linejoin: round; }
.cell-svg .chl { fill: rgba(74, 222, 128, 0.35); stroke: #4ade80; stroke-width: 2.4; }
.cell-svg .grana { fill: #22c55e; }
.cell-svg .pin circle { fill: var(--night); stroke: var(--glow); stroke-width: 2; }
.cell-svg .pin text { fill: #fff; font-family: var(--font); font-size: 15px; font-weight: 800; text-anchor: middle; dominant-baseline: central; }
.cell-svg .pin .halo { fill: none; stroke: var(--glow); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.cell-svg [data-org] { cursor: pointer; transition: opacity 0.35s var(--ease), filter 0.35s var(--ease); }
.cell-svg.has-pick [data-org] { opacity: 0.45; }
.cell-svg.has-pick [data-org].is-on { opacity: 1; filter: drop-shadow(0 0 10px rgba(94, 234, 212, 0.55)); }
.cell-svg [data-org].is-on .pin circle { fill: var(--glow); }
.cell-svg [data-org].is-on .pin .halo { fill: none; }
.cell-svg [data-org].is-on .pin text { fill: #03110d; }
@media (prefers-reduced-motion: no-preference) {
  .cell-svg [data-org].is-on .pin .halo { animation: halo 1.8s var(--ease) infinite; }
  .cell-svg .float { animation: drift 9s ease-in-out infinite alternate; }
  .cell-svg .float-2 { animation: drift 11s ease-in-out -4s infinite alternate-reverse; }
}
@keyframes halo { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.2); } }
@keyframes drift { to { transform: translate(5px, -4px); } }

.org-list { display: grid; gap: 0.5rem; list-style: none; }
.org-list > li { border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); transition: border-color 0.25s, box-shadow 0.25s; }
.org-list > li.is-on { border-color: var(--brand); box-shadow: var(--shadow); }
.org-btn { display: flex; align-items: center; gap: 0.8rem; width: 100%; padding: 0.7rem 0.95rem; border: 0; background: none; text-align: start; font-weight: 750; font-size: 1rem; cursor: pointer; border-radius: var(--radius-md); }
html:not(.js) .org-btn { cursor: default; }
.org-num { display: grid; place-items: center; width: 2rem; height: 2rem; flex: none; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 0.9rem; font-weight: 850; }
.is-on .org-num { background: var(--brand); color: var(--brand-ink); }
.org-sw { width: 0.75rem; height: 0.75rem; border-radius: 4px; margin-inline-start: auto; flex: none; }
.sw-nucleus { background: #a78bfa; } .sw-ribosome { background: #fcd34d; } .sw-er { background: #f472b6; } .sw-golgi { background: #f59e0b; }
.sw-mito { background: #fb923c; } .sw-chloro { background: #22c55e; } .sw-vacuole { background: #60a5fa; } .sw-membrane { background: #34d399; } .sw-wall { background: #15803d; }
.org-info { padding: 0 1rem 1rem; padding-inline-start: 3.75rem; }
.org-book { display: inline-block; margin-bottom: 0.4rem; padding: 0.1rem 0.7rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 0.8rem; font-weight: 750; line-height: 1.8; }
.org-info p:last-child { color: var(--ink-2); font-size: 0.95rem; }
.js .org-list > li:not(.is-on) .org-info { display: none; }

/* ---------------------------------------------------------------- features (bento) */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; list-style: none; }
.bento li {
  position: relative; overflow: hidden; display: grid; align-content: start; gap: 0.5rem;
  padding: 1.6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.bento li:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.bento .big { grid-row: span 2; display: flex; flex-direction: column; background: linear-gradient(165deg, var(--night-3), var(--night) 80%); color: var(--night-ink); border-color: var(--night-line); }
.bento .big p { color: var(--night-ink-2); }
.bento .big::after { content: ''; position: absolute; inset: auto -20% -30% -20%; height: 70%; background: radial-gradient(ellipse at 50% 100%, rgba(52, 211, 153, 0.35), transparent 65%); pointer-events: none; }
.bento .big-n { position: relative; z-index: 1; margin-top: auto; padding-top: 2.4rem; font-size: clamp(3rem, 2rem + 4vw, 4.6rem); font-weight: 900; line-height: 1; color: #fff; }
.bento .big-n small { display: block; margin-top: 0.7rem; font-size: 0.95rem; font-weight: 600; color: var(--night-ink-2); line-height: 1.6; }
.ic { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 0.5rem; border-radius: 16px; background: var(--brand-soft); color: var(--brand); flex: none; }
.big .ic { background: rgba(94, 234, 212, 0.14); color: var(--glow); }
.ic svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bento p { color: var(--ink-2); font-size: 0.97rem; }
.bento .wide { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.2rem; }
.bento .wide .ic { margin: 0; }
.bento .wide div { flex: 1; min-width: 0; }
.bento .wide-n { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 900; line-height: 1; color: var(--brand) !important; }

/* ---------------------------------------------------------------- method */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; list-style: none; }
.steps::before { content: ''; position: absolute; top: 1.75rem; inset-inline: 12%; height: 2px; background: var(--line-2); }
.steps li { position: relative; display: grid; justify-items: center; align-content: start; gap: 0.5rem; text-align: center; padding-inline: 0.4rem; }
.steps .n { position: relative; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); color: var(--brand); font-weight: 900; font-size: 1.3rem; box-shadow: 0 0 0 8px var(--paper-2); }
.steps li:last-child .n { background: var(--brand); color: var(--brand-ink); }
.steps h3 { margin-top: 0.5rem; }
.steps p { color: var(--ink-2); font-size: 0.95rem; }

/* ---------------------------------------------------------------- courses */
.courses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; list-style: none; }
.course {
  position: relative; display: flex; flex-direction: column; gap: 0.6rem;
  padding: 1.6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.course:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.course-top { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.course .ic { margin: 0; }
.learners { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink-3); font-size: 0.85rem; font-weight: 650; }
.learners svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.course h3 { margin-top: 0.4rem; font-size: 1.2rem; }
.course > p { color: var(--ink-2); font-size: 0.97rem; }
.course .price { display: flex; align-items: baseline; gap: 0.4rem; margin-top: auto; padding-top: 1rem; border-top: 1px dashed var(--line-2); color: var(--ink-3); font-size: 0.9rem; }
.price strong { font-size: 1.55rem; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.course .btn { margin-top: 0.3rem; }
.course.featured {
  color: var(--night-ink);
  background:
    linear-gradient(165deg, var(--night-3), var(--night) 85%) padding-box,
    conic-gradient(from var(--ang, 0deg), var(--glow), var(--mint), #065f46, var(--amber), var(--glow)) border-box;
  border: 2px solid transparent;
  box-shadow: 0 30px 60px -30px rgba(16, 185, 129, 0.55);
}
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@media (prefers-reduced-motion: no-preference) { .course.featured { animation: turn 6s linear infinite; } }
@keyframes turn { to { --ang: 360deg; } }
.course.featured > p, .course.featured .learners { color: var(--night-ink-2); }
.course.featured .price { border-top-color: var(--night-line); color: var(--night-ink-2); }
.course.featured .price strong { color: #fff; }
.course.featured .ic { background: rgba(94, 234, 212, 0.14); color: var(--glow); }
.course .tag { position: absolute; top: -0.85rem; inset-inline-start: 1.4rem; padding: 0.15rem 0.85rem; border-radius: 999px; background: linear-gradient(135deg, #fcd34d, #f59e0b); color: #1c1402; font-size: 0.8rem; font-weight: 850; box-shadow: 0 8px 20px -8px rgba(245, 158, 11, 0.8); }
.courses-note { margin-top: 1.4rem; color: var(--ink-3); font-size: 0.9rem; text-align: center; }

/* ---------------------------------------------------------------- curriculum */
.book-tabs { display: inline-flex; gap: 0.3rem; padding: 0.35rem; margin-bottom: 1.6rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 100%; overflow-x: auto; }
.book-tabs button { min-height: 2.6rem; padding: 0.4rem 1.2rem; border: 0; border-radius: 999px; background: none; font-weight: 750; cursor: pointer; white-space: nowrap; color: var(--ink-2); transition: background-color 0.25s, color 0.25s; }
.book-tabs button[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); }
html:not(.js) .book-tabs { display: none; }
.books { display: grid; gap: 1.2rem; }
.book { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: 1.6rem; padding: clamp(1.1rem, 3vw, 2rem); border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.book-cover {
  position: relative; overflow: hidden; display: grid; align-content: space-between; gap: 1rem; min-height: 15rem; padding: 1.4rem; border-radius: 20px;
  color: #fff; background: linear-gradient(160deg, var(--c1), var(--c2));
}
.book-cover::after { content: ''; position: absolute; inset: auto -25% -35% auto; width: 90%; aspect-ratio: 1; border-radius: 50%; border: 18px solid rgba(255, 255, 255, 0.1); }
.book-cover .vol { font-size: 4.4rem; font-weight: 900; line-height: 1; }
.book-cover p { font-weight: 700; opacity: 0.9; }
.book-cover h3 { font-size: 1.3rem; }
.b10 { --c1: #0f766e; --c2: #064e3b; }
.b11 { --c1: #1d4ed8; --c2: #172554; }
.b12 { --c1: #7c3aed; --c2: #2e1065; }
.chap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 0.8rem; list-style: none; counter-reset: ch; align-content: start; }
.chap li { counter-increment: ch; display: flex; align-items: center; gap: 0.8rem; padding: 0.65rem 0.8rem; border-radius: 14px; background: var(--paper); font-weight: 650; }
.chap li::before { content: counter(ch, persian); display: grid; place-items: center; width: 1.9rem; height: 1.9rem; flex: none; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--brand); font-size: 0.88rem; font-weight: 850; }

/* ---------------------------------------------------------------- faq */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.faq { display: grid; gap: 0.7rem; }
.faq details { border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); transition: box-shadow 0.25s, border-color 0.25s; }
.faq details[open] { box-shadow: var(--shadow); border-color: var(--line-2); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; cursor: pointer; font-weight: 750; list-style: none; border-radius: var(--radius-md); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 1.9rem; height: 1.9rem; flex: none; padding: 0.45rem; border-radius: 50%; background: var(--brand-soft); fill: none; stroke: var(--brand); stroke-width: 2.8; stroke-linecap: round; transition: transform 0.3s var(--ease); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding: 0 1.25rem 1.1rem; color: var(--ink-2); }

/* ---------------------------------------------------------------- call to action */
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; align-items: center;
  padding: clamp(1.6rem, 5vw, 3.6rem); border-radius: 34px;
  color: var(--night-ink);
  background:
    radial-gradient(40rem 20rem at 0% 0%, rgba(45, 212, 191, 0.25), transparent 60%),
    radial-gradient(30rem 20rem at 100% 100%, rgba(16, 185, 129, 0.22), transparent 60%),
    linear-gradient(160deg, var(--night-3), var(--night));
  box-shadow: var(--shadow-lg);
}
.cta::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(150, 235, 210, 0.16) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000); }
.cta h2 { color: #fff; }
.cta .kicker { color: var(--glow); }
.cta .section-lead { color: var(--night-ink-2); }
.contact-list { display: grid; gap: 0.7rem; list-style: none; }
.contact-list li { display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 1rem; border-radius: 18px; background: rgba(150, 235, 210, 0.06); border: 1px solid var(--night-line); }
.contact-list .ic { width: 2.6rem; height: 2.6rem; margin: 0; border-radius: 14px; background: rgba(94, 234, 212, 0.14); color: var(--glow); }
.contact-list span { display: block; font-size: 0.8rem; color: var(--night-ink-2); }
.contact-list strong, .contact-list a { color: #fff; font-weight: 750; font-size: 1.05rem; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- footer */
.foot { padding-block: 2.2rem; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.9rem; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.8rem 2rem; }
.foot .brand { color: var(--ink); margin: 0; }
.made a { font-weight: 700; }
.demo-pill { display: inline-block; margin-inline-end: 0.3rem; padding: 0 0.6rem; border-radius: 999px; border: 1px dashed var(--line-2); font-size: 0.8rem; }

/* ================================================================= student panel */
.panel-page { min-height: 100vh; display: flex; flex-direction: column; }
.panel-page main { flex: 1; }
.panel-page .top { background: var(--night); }
/* signed in on a narrow screen: the two buttons need the room, the mark stays */
@media (max-width: 39.99rem) { .top-in:has([data-logout]:not([hidden])) .brand-t { display: none; } }
.top-actions { display: flex; align-items: center; gap: 0.5rem; }
.top .top-actions .btn-line { color: inherit; }
.top.is-light .top-actions .btn-line { border-color: var(--line-2); }

/* signed out: the form on one side, the lab on the other */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - var(--top-h)); }
.auth-side {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; align-content: end; gap: 1.2rem; padding: clamp(1.6rem, 4vw, 3.4rem);
  color: var(--night-ink);
  background: radial-gradient(40rem 30rem at 30% 20%, rgba(45, 212, 191, 0.2), transparent 60%), linear-gradient(170deg, var(--night-2), var(--night));
}
.auth-side canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.auth-side .kicker { color: var(--glow); }
.auth-side h2 { color: #fff; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); }
.auth-side ul { display: grid; gap: 0.7rem; list-style: none; }
.auth-side li { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 1rem; border-radius: 16px; background: rgba(6, 26, 21, 0.72); border: 1px solid var(--night-line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.auth-side .ic { width: 2.5rem; height: 2.5rem; margin: 0; border-radius: 12px; background: rgba(94, 234, 212, 0.14); color: var(--glow); }
.auth-side li b { display: block; }
.auth-side li span { display: block; color: var(--night-ink-2); font-size: 0.86rem; }
.auth-main { display: grid; align-content: center; justify-items: center; padding: clamp(1.8rem, 4vw, 3.4rem) 1.25rem; }
.auth-box { width: min(100%, 27rem); }
.auth-box h1 { font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.4rem); font-weight: 900; }
.auth-box .section-lead { margin-top: 0.5rem; margin-bottom: 1.5rem; }
.auth-card { padding: clamp(1.1rem, 3vw, 1.7rem); border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem; padding: 0.3rem; margin-bottom: 1.3rem; border-radius: 16px; background: var(--paper-2); }
.tabs button { min-height: 2.8rem; border: 0; border-radius: 12px; background: none; font-weight: 750; color: var(--ink-2); cursor: pointer; transition: background-color 0.25s, color 0.25s, box-shadow 0.25s; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 4px 14px -6px rgba(10, 31, 25, 0.25); }
.field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.field label { font-weight: 700; font-size: 0.93rem; }
.field input, .field select {
  width: 100%; min-height: 3.1rem; padding: 0.55rem 0.95rem;
  border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--paper);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px var(--brand-ring); }
.hint { color: var(--ink-3); font-size: 0.82rem; }
.error { margin-bottom: 0.8rem; color: var(--danger); font-weight: 650; font-size: 0.92rem; }
.error:empty { margin: 0; }
.or { display: flex; align-items: center; gap: 0.8rem; margin: 0.9rem 0; color: var(--ink-3); font-size: 0.85rem; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn.is-busy { opacity: 0.7; pointer-events: none; }
.notice { margin-top: 1.2rem; padding: 0.95rem 1.1rem; border-radius: 16px; background: var(--ok-soft); border: 1px dashed var(--brand); color: var(--ink-2); font-size: 0.86rem; line-height: 1.9; }
.notice strong { color: var(--ink); }

/* signed in */
.dash { padding-block: 1.6rem 4rem; }
.welcome {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.2rem;
  padding: clamp(1.2rem, 3vw, 2rem); border-radius: 28px; color: var(--night-ink);
  background: radial-gradient(30rem 16rem at 0% 0%, rgba(45, 212, 191, 0.25), transparent 60%), linear-gradient(160deg, var(--night-3), var(--night));
  box-shadow: var(--shadow-lg);
}
.welcome::after { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(150, 235, 210, 0.14) 1px, transparent 1px); background-size: 20px 20px; -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000); mask-image: linear-gradient(90deg, transparent 20%, #000); }
.avatar { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 22px; background: linear-gradient(135deg, var(--glow), var(--mint)); color: #03110d; font-size: 1.6rem; font-weight: 900; box-shadow: 0 10px 30px -10px rgba(52, 211, 153, 0.8); }
.welcome .kicker { color: var(--glow); margin-bottom: 0.1rem; }
.welcome h1 { font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.2rem); font-weight: 900; color: #fff; }
.demo-badge { padding: 0.25rem 0.9rem; border-radius: 999px; border: 1px solid rgba(251, 191, 36, 0.5); background: rgba(251, 191, 36, 0.12); color: var(--amber); font-size: 0.85rem; font-weight: 750; white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-block: 1rem; list-style: none; }
.kpi { display: flex; align-items: center; gap: 0.9rem; min-width: 0; padding: 1.05rem 1.15rem; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.kpi .ic { width: 2.8rem; height: 2.8rem; margin: 0; }
.kpi div { min-width: 0; }
.kpi b { display: block; font-size: 1.3rem; font-weight: 900; line-height: 1.4; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi span { display: block; color: var(--ink-3); font-size: 0.84rem; }
.ring { position: relative; width: 3.2rem; height: 3.2rem; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--paper-2); stroke-width: 7; }
.ring .bar { fill: none; stroke: var(--brand); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 150.8; stroke-dashoffset: 150.8; transition: stroke-dashoffset 0.9s var(--ease); }
.ring em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 0.74rem; font-weight: 850; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1rem; align-items: start; }
.card { min-width: 0; padding: clamp(1.1rem, 2.5vw, 1.6rem); border-radius: 26px; background: var(--surface); border: 1px solid var(--line); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.card-head h2 { font-size: 1.2rem; font-weight: 850; }
.card-head p, .muted { color: var(--ink-3); font-size: 0.88rem; }
.sample { flex: none; padding: 0 0.6rem; border-radius: 999px; border: 1px dashed var(--line-2); color: var(--ink-3); font-size: 0.75rem; font-weight: 650; line-height: 1.9; }
.meter { height: 0.7rem; margin: 0; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--glow)); transition: width 0.8s var(--ease); }
.meter-text { margin: 0.5rem 0 1rem; color: var(--ink-3); font-size: 0.88rem; font-weight: 650; }
.chapters { display: grid; gap: 0.45rem; list-style: none; }
.chapters li { position: relative; }
.chapters input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chapters label { display: flex; align-items: center; gap: 0.8rem; padding: 0.65rem 0.8rem; border-radius: 14px; background: var(--paper); border: 1.5px solid transparent; cursor: pointer; font-weight: 650; font-size: 0.95rem; transition: background-color 0.2s, border-color 0.2s; }
.chapters label::before { content: ''; width: 1.35rem; height: 1.35rem; flex: none; border-radius: 8px; border: 2px solid var(--line-2); background: var(--surface) center / 0.85rem no-repeat; transition: background-color 0.2s, border-color 0.2s; }
.chapters label:hover { border-color: var(--line-2); }
.chapters input:checked + label { background: var(--ok-soft); }
.chapters input:checked + label::before { border-color: var(--brand); background-color: var(--brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { .chapters input:checked + label::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2303110d' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); } }
.chapters input:focus-visible + label { outline: 3px solid var(--mint); outline-offset: 2px; }
.ch-t { flex: 1; min-width: 0; }
.ch-n { color: var(--ink-3); font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.quiz fieldset { margin: 0 0 0.9rem; padding: 0.9rem 1rem 1rem; border: 1px solid var(--line); border-radius: 18px; min-width: 0; }
.quiz legend { padding-inline: 0.4rem; font-weight: 750; line-height: 1.8; }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.3rem; }
.opt { position: relative; min-width: 0; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt label { display: flex; align-items: center; gap: 0.6rem; min-height: 2.9rem; padding: 0.45rem 0.8rem; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); cursor: pointer; font-size: 0.95rem; line-height: 1.6; transition: border-color 0.2s, background-color 0.2s; }
.opt label::before { content: ''; width: 1.05rem; height: 1.05rem; flex: none; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); transition: border-color 0.2s, box-shadow 0.2s; }
.opt label:hover { border-color: var(--line-2); }
.opt input:checked + label { border-color: var(--brand); background: var(--ok-soft); }
.opt input:checked + label::before { border-color: var(--brand); box-shadow: inset 0 0 0 3px var(--surface); background: var(--brand); }
.opt input:focus-visible + label { outline: 3px solid var(--mint); outline-offset: 2px; }
.opt.is-right label { border-color: var(--brand); background: var(--ok-soft); }
.opt.is-wrong label { border-color: var(--danger); background: var(--danger-soft); }
.mark { margin-inline-start: auto; font-size: 0.78rem; font-weight: 800; white-space: nowrap; }
.is-right .mark { color: var(--brand); }
.is-wrong .mark { color: var(--danger); }
.quiz-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; }
.result { font-weight: 800; font-size: 1.05rem; }
.result.is-great { color: var(--brand); }
.stack { display: grid; gap: 1rem; min-width: 0; }
.tasks, .schedule { display: grid; gap: 0.6rem; list-style: none; }
.tasks li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.85rem; padding: 0.8rem 0.9rem; border-radius: 16px; background: var(--paper); }
.tasks .due { display: grid; place-items: center; min-width: 3.2rem; padding: 0.3rem 0.4rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); line-height: 1.35; text-align: center; }
.tasks .due b { font-size: 1.1rem; font-weight: 900; color: var(--brand); }
.tasks .due small { font-size: 0.7rem; color: var(--ink-3); }
.tasks strong { display: block; font-weight: 750; font-size: 0.97rem; }
.tasks span { display: block; color: var(--ink-3); font-size: 0.84rem; }
.soon { padding: 0 0.55rem; border-radius: 999px; background: rgba(251, 191, 36, 0.18); color: #92400e; font-size: 0.75rem; font-weight: 800; white-space: nowrap; line-height: 1.9; }
@media (prefers-color-scheme: dark) { .soon { color: var(--amber); } }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; margin-bottom: 1rem; list-style: none; }
.week li { display: grid; justify-items: center; gap: 0.25rem; padding: 0.5rem 0.1rem; border-radius: 12px; background: var(--paper); font-size: 0.78rem; color: var(--ink-3); font-weight: 700; line-height: 1.4; }
.week li i { width: 0.45rem; height: 0.45rem; border-radius: 50%; }
.week li.has i { background: var(--brand); }
.week li.today { background: var(--brand); color: var(--brand-ink); }
.week li.today.has i { background: var(--brand-ink); }
.schedule li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0.95rem; border-radius: 16px; border: 1px solid var(--line); }
.schedule strong { font-weight: 800; }
.schedule span { color: var(--ink-2); font-size: 0.92rem; }
.danger { margin-top: 1.2rem; padding: 0.85rem 1.1rem; border-radius: 18px; border: 1px solid var(--line); }
.danger summary { cursor: pointer; color: var(--ink-3); font-weight: 700; font-size: 0.92rem; }
.danger p { margin: 0.6rem 0 0.9rem; color: var(--ink-2); font-size: 0.92rem; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 61.99rem) {
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 1.5rem 1.5rem; }
  .hero-art { order: -1; height: clamp(17rem, 68vw, 26rem); }
  .chip-3 { display: none; }
  .about, .cell-grid, .faq-grid, .cta, .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .cell-stage { position: relative; top: 0; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento .big { grid-column: 1 / -1; grid-row: auto; }
  .courses { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.6rem; }
  .bento .wide { flex-wrap: wrap; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
  .steps::before { display: none; }
  .book { grid-template-columns: minmax(0, 1fr); }
  .book-cover { min-height: 0; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.2rem 1.2rem; }
  .book-cover .vol { grid-row: span 2; font-size: 3.6rem; }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth-side { order: 2; align-content: start; }
  .auth-side canvas { opacity: 0.35; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 39.99rem) {
  :root { --top-h: 4rem; }
  .wrap { width: min(var(--wrap), 100% - 2rem); }
  .brand-t small { display: none; }
  .brand-mark { width: 2.2rem; height: 2.2rem; }
  .hero h1 { font-size: clamp(2.5rem, 1.4rem + 7vw, 3.4rem); }
  .actions .btn { flex: 1 1 11rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 2.5rem; }
  .stats li { padding: 1.1rem 0.8rem; }
  .chip { padding: 0.5rem 0.8rem; }
  .chip-1 { top: 4%; inset-inline-end: 0; }
  .chip-2 { bottom: 4%; }
  .ticks { grid-template-columns: minmax(0, 1fr); }
  .id-meta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .id-meta div:last-child { grid-column: 1 / -1; }
  .bento, .courses, .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { grid-template-columns: auto minmax(0, 1fr); justify-items: start; text-align: start; column-gap: 1rem; row-gap: 0.2rem; }
  .steps .n { grid-row: span 2; width: 3rem; height: 3rem; font-size: 1.1rem; }
  .steps h3 { margin: 0; }
  .chap { grid-template-columns: minmax(0, 1fr); }
  .org-info { padding-inline-start: 1rem; }
  .opts { grid-template-columns: minmax(0, 1fr); }
  .welcome { grid-template-columns: auto minmax(0, 1fr); }
  .welcome .demo-badge { grid-column: 1 / -1; justify-self: start; }
  .avatar { width: 3.4rem; height: 3.4rem; border-radius: 18px; font-size: 1.35rem; }
  .kpis { gap: 0.6rem; }
  .kpi { flex-direction: column; align-items: stretch; gap: 0.5rem; padding: 0.9rem; }
  .kpi .ic, .kpi .ring { align-self: flex-start; }
  .kpi b { font-size: 1.1rem; white-space: normal; }
  .top-actions .hide-sm { display: none; }
  .book-tabs { display: flex; width: 100%; }
  .book-tabs button { flex: 1; padding-inline: 0.4rem; font-size: 0.86rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grad { animation: none; }
  .pulse::after { animation: none; }
}
@media (forced-colors: active) {
  .btn, .card, .course, .kpi, .auth-card { border: 1px solid CanvasText; }
  .grad { color: CanvasText; background: none; }
}
@media print {
  .top, .ticker, .hero-art, .cta .actions { display: none; }
  .hero, .cta, .id-card, .bento .big, .course.featured { background: none; color: #000; }
}
