/* ============================================================
   Umidjon Biologiya — umumiy uslublar
   Palitra: biologik pigmentlar. Shrift: Newsreader + IBM Plex Sans
   ============================================================ */

:root{
  /* qog'oz va siyoh */
  --paper:      #EDEBE2;
  --paper-2:    #E2E0D5;
  --paper-3:    #F8F7F1;
  --ink:        #16211B;
  --ink-2:      #4A5A50;
  --ink-3:      #7D8B82;
  --rule:       #D5D2C4;

  /* pigmentlar */
  --chlorophyll: #2F6B4A;
  --chloro-lite: #6FA97F;
  --chloro-dim:  #E4EEE6;
  --carotene:    #C07817;
  --carotene-dim: #F6E9D4;
  --anthocyanin: #6A4C93;
  --anthocyanin-dim: #EBE4F3;
  --hemoglobin:  #A33A38;
  --hemoglobin-dim: #F5E1DF;

  /* qorong'i maydon (test rejimi) */
  --field:      #0A1310;
  --field-2:    #10201A;
  --field-3:    #172E25;
  --field-ink:  #DCE8DF;
  --field-ink2: #8DA695;
  --field-rule: #224537;

  --max:     1160px;
  --measure: 68ch;

  /* radius: ierarxiya bo'yicha turlicha */
  --r-xs:    8px;
  --r-sm:    12px;
  --r:       16px;
  --r-lg:    22px;
  --r-pill:  999px;

  /* soyalar: har doim siyoh rangiga bo'yalgan, kulrang emas */
  --shadow-xs: 0 1px 2px rgba(22,33,27,.06);
  --shadow-sm: 0 2px 8px rgba(22,33,27,.07), 0 1px 2px rgba(22,33,27,.05);
  --shadow-md: 0 10px 28px rgba(22,33,27,.10), 0 2px 8px rgba(22,33,27,.06);
  --shadow-lg: 0 22px 48px rgba(22,33,27,.14), 0 6px 16px rgba(22,33,27,.08);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,.5);

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(47,107,74,.05), transparent 45%),
    radial-gradient(circle at 84% 78%, rgba(106,76,147,.045), transparent 42%);
  color: var(--ink);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,h2,h3,h4{
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.012em;
  margin: 0;
}

p{ margin: 0; }
a{ color: inherit; }
img, svg, canvas{ max-width: 100%; display: block; }
button, input, select, textarea{ font: inherit; color: inherit; }

/* lotincha tur nomlari — ilmiy qoida bo'yicha kursiv */
.taxon{
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  color: var(--ink-3);
}

.num{
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

:focus-visible{
  outline: 2px solid var(--chlorophyll);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap{
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 32px;
}

.skip{
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: 10px 18px; z-index: 100;
}
.skip:focus{ left: 16px; top: 12px; }

/* ---------------- Header ---------------- */
.site-head{
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(255,255,255,.4), var(--shadow-xs);
}

.nav{
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 16px 0;
}

.brand{
  display: inline-flex; align-items: center; gap: 11px;
  text-decoration: none;
  font-family: 'Newsreader', serif;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand svg{ width: 27px; height: 27px; flex: none; }
.brand em{
  font-style: italic;
  color: var(--chlorophyll);
  font-size: .8em;
  margin-left: 2px;
}

.navlinks{
  display: flex; gap: 30px; list-style: none; margin: 0; padding: 0;
  align-items: center;
}
.navlinks a{
  text-decoration: none; font-size: .95rem; color: var(--ink-2);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.navlinks a:hover, .navlinks a[aria-current="page"]{
  color: var(--ink); border-bottom-color: var(--carotene);
}

.navtoggle{
  display: none; background: none; border: 1px solid var(--rule);
  border-radius: var(--r-xs); padding: 7px 11px; cursor: pointer;
}
.navtoggle span{
  display: block; width: 18px; height: 1.5px; background: var(--ink);
  margin: 4px 0; transition: transform .25s var(--ease), opacity .2s;
}
.navtoggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(5.5px) rotate(45deg); }
.navtoggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.navtoggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-5.5px) rotate(-45deg); }

/* ---------------- Buttons ---------------- */
.btn{
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  padding: 14px 28px; border-radius: var(--r-sm);
  text-decoration: none; font-size: .97rem; font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .22s var(--ease), transform .18s var(--ease-spring), box-shadow .22s var(--ease);
}
.btn:hover{ background: var(--chlorophyll); border-color: var(--chlorophyll); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active{ transform: translateY(0); box-shadow: var(--shadow-xs); }
.btn[disabled]{ opacity: .45; cursor: not-allowed; }

.btn-line{
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-xs);
}
.btn-line:hover{ background: var(--paper-3); border-color: var(--ink-3); color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-line:active{ transform: translateY(0); }

.btn-ghost{
  text-decoration: none; font-size: .97rem;
  border-bottom: 1px solid var(--carotene);
  padding-bottom: 2px;
  transition: border-color .2s;
}
.btn-ghost:hover{ border-bottom-width: 2px; }

.btn-sm{ padding: 8px 15px; font-size: .88rem; }

/* ---------------- Sections ---------------- */
.section{ padding: 74px 0; }
.section + .section{ border-top: 1px solid var(--rule); }

.section-head{
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.5fr);
  gap: 44px; margin-bottom: 46px; align-items: start;
}
.section-head h2{ font-size: clamp(1.75rem, 3vw, 2.3rem); }
.section-head .note{ color: var(--ink-2); max-width: 48ch; padding-top: 5px; }

/* ---------------- Hero ---------------- */
.hero{ padding: 72px 0 86px; }
.hero-grid{
  display: grid; grid-template-columns: 1.02fr .98fr;
  gap: 62px; align-items: center;
}
.hero h1{
  font-size: clamp(2.5rem, 5.4vw, 4.1rem);
  max-width: 15ch;
}
.hero h1 .it{ font-style: italic; }
.hero .lead{
  margin-top: 24px; font-size: 1.1rem; color: var(--ink-2);
  max-width: 46ch;
}
.hero-actions{
  margin-top: 34px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
}

/* mikroskop maydoni */
.scope{
  position: relative;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 22px 22px 16px;
  box-shadow: var(--shadow-md);
}
.scope-stage{
  position: relative;
  aspect-ratio: 1 / .92;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #F7FAF5 0%, #E2E9DD 72%, #CFDAC9 100%);
  box-shadow: inset 0 0 0 1px var(--rule), inset 0 12px 34px rgba(22,33,27,.09);
}
.scope-stage svg{ width: 100%; height: 100%; }
.scope-blur{
  transition: filter .5s var(--ease);
  filter: blur(var(--focus-blur, 5.5px));
}
.scope-labels{
  position: absolute; inset: 0; pointer-events: none;
  opacity: var(--focus-op, 0);
  transition: opacity .35s var(--ease);
}
.scope-labels text{
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 11.5px; fill: var(--ink-2);
}
.scope-labels line{ stroke: var(--ink-3); stroke-width: .7; }

.scope-ctrl{
  margin-top: 16px; display: flex; align-items: center; gap: 14px;
}
.scope-ctrl label{ font-size: .8rem; color: var(--ink-3); white-space: nowrap; }
.scope-ctrl input[type=range]{
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 2px; background: var(--rule); border-radius: 2px; cursor: pointer;
}
.scope-ctrl input[type=range]::-webkit-slider-thumb{
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper-3); border: 1.5px solid var(--chlorophyll);
  box-shadow: 0 1px 4px rgba(22,33,27,.2);
  cursor: grab;
}
.scope-ctrl input[type=range]::-moz-range-thumb{
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper-3); border: 1.5px solid var(--chlorophyll); cursor: grab;
}
.scope-cap{
  margin-top: 12px; text-align: center;
  font-family: 'Newsreader', serif; font-style: italic;
  font-size: .87rem; color: var(--ink-3);
}

/* ---------------- About ---------------- */
.about-grid{ display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 52px; align-items: start; }
.sigil{
  aspect-ratio: 1; background: var(--paper-3);
  border: 1px solid var(--rule); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
}
.sigil span{ font-family: 'Newsreader', serif; font-size: 2.7rem; color: var(--carotene); }
.about-body p{ color: var(--ink-2); max-width: var(--measure); }
.about-body p + p{ margin-top: 15px; }

.facts{ margin-top: 30px; display: flex; gap: 40px; flex-wrap: wrap; }
.fact b{ display: block; font-family: 'Newsreader', serif; font-size: 1.55rem; font-weight: 400; }
.fact span{ font-size: .87rem; color: var(--ink-3); }

/* ---------------- Lessons ---------------- */
.lesson-list{ display: flex; flex-direction: column; gap: 14px; }
.lesson-row{
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr);
  gap: 34px; align-items: center;
  padding: 26px 28px;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: var(--shadow-xs);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.lesson-row:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.lesson-title{ font-family: 'Newsreader', serif; font-size: 1.28rem; margin-bottom: 10px; }
.lesson-desc{ color: var(--ink-2); }

/* ---------------- Test katalogi ---------------- */
.test-list{ display: flex; flex-direction: column; gap: 14px; }
.test-item{
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  gap: 28px; align-items: center;
  padding: 26px 28px;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.test-item:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.test-item h3{ font-size: 1.22rem; margin-bottom: 9px; }
.test-meta{
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: .86rem; color: var(--ink-3);
}
.test-meta span{ display: inline-flex; align-items: center; gap: 6px; }

.pill{
  display: inline-block; font-size: .74rem; font-weight: 500; letter-spacing: .02em;
  padding: 4px 11px; border-radius: var(--r-pill);
}
.p-chloro{ color: var(--chlorophyll); background: var(--chloro-dim); }
.p-carot{  color: var(--carotene); background: var(--carotene-dim); }
.p-anth{   color: var(--anthocyanin); background: var(--anthocyanin-dim); }
.p-hemo{   color: var(--hemoglobin); background: var(--hemoglobin-dim); }

.empty{
  border: 1.5px dashed var(--rule); border-radius: var(--r-lg);
  background: var(--paper-3);
  padding: 46px 30px; text-align: center; color: var(--ink-2);
}
.empty h3{ font-size: 1.3rem; margin-bottom: 8px; }

/* ---------------- Forms ---------------- */
.field{ margin-bottom: 18px; }
.field label{ display: block; font-size: .87rem; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea{
  width: 100%; padding: 11px 14px;
  background: var(--paper-3);
  border: 1.5px solid var(--rule); border-radius: var(--r-xs);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.field input:focus, .field select:focus, .field textarea:focus{
  outline: none; border-color: var(--chlorophyll); background: #fff;
  box-shadow: 0 0 0 3px rgba(47,107,74,.11);
}
.field .hint{ font-size: .79rem; color: var(--ink-3); margin-top: 5px; }

.form-card{
  background: var(--paper-3); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: 34px;
  max-width: 460px;
  box-shadow: var(--shadow-md);
}
.form-card h2{ font-size: 1.5rem; margin-bottom: 6px; }
.form-card .sub{ color: var(--ink-2); font-size: .93rem; margin-bottom: 24px; }

.alert{
  padding: 12px 16px; border-radius: var(--r-xs);
  border-left: 3px solid; font-size: .9rem; margin-bottom: 18px;
}
.alert-err{ color: var(--hemoglobin); border-color: var(--hemoglobin); background: rgba(163,58,56,.07); }
.alert-ok{  color: var(--chlorophyll); border-color: var(--chlorophyll); background: rgba(47,107,74,.07); }
.alert-warn{ color: var(--carotene); border-color: var(--carotene); background: rgba(192,120,23,.07); }
.alert[hidden]{ display: none; }

/* ---------------- Footer ---------------- */
.site-foot{
  border-top: 1px solid var(--rule); padding: 34px 0 44px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .87rem; color: var(--ink-3);
}
.site-foot a{ text-decoration: none; }
.site-foot a:hover{ color: var(--chlorophyll); }

/* ============================================================
   QORONG'I MAYDON — test rejimi (dark-field microscopy)
   ============================================================ */
body.darkfield{
  background-color: var(--field);
  background-image:
    radial-gradient(circle at 50% 30%, rgba(47,107,74,.13), transparent 58%),
    radial-gradient(circle at 12% 88%, rgba(106,76,147,.09), transparent 50%);
  color: var(--field-ink);
}
body.darkfield .site-head, body.darkfield .site-foot{ display: none; }

.player{
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding: 24px 0 60px;
}
.player[hidden]{ display: none; }

.player-bar{
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--field-rule);
  flex-wrap: wrap;
}
.player-who{ font-size: .9rem; color: var(--field-ink2); }
.player-who b{ color: var(--field-ink); font-weight: 500; }

.timer{
  display: inline-flex; align-items: center; gap: 9px;
  font-family: 'IBM Plex Mono', monospace; font-size: 1.12rem;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--field-rule);
  transition: color .3s, border-color .3s;
}
.timer.warn{ color: var(--carotene); border-color: var(--carotene); }
.timer.crit{
  color: #E4756F; border-color: #E4756F;
  animation: pulse 1s infinite;
}
@keyframes pulse{ 50%{ opacity: .5; } }

.progress-track{
  height: 2px; background: var(--field-rule);
  margin: 16px 0 34px; border-radius: 2px; overflow: hidden;
}
.progress-fill{
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--chlorophyll), var(--chloro-lite));
  transition: width .45s var(--ease);
}

.q-stage{ flex: 1; max-width: 780px; }
.q-index{
  font-family: 'IBM Plex Mono', monospace; font-size: .82rem;
  color: var(--field-ink2); margin-bottom: 14px;
}
.q-text{
  font-family: 'Newsreader', serif; font-size: clamp(1.35rem, 2.7vw, 1.85rem);
  line-height: 1.32; margin-bottom: 30px;
}

.opts{ display: flex; flex-direction: column; gap: 11px; }
.opt{
  display: flex; align-items: flex-start; gap: 14px;
  width: 100%; text-align: left;
  padding: 15px 18px;
  background: var(--field-2);
  border: 1px solid var(--field-rule);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .12s var(--ease);
}
.opt:hover:not(:disabled){ background: var(--field-3); border-color: var(--chloro-lite); }
.opt:disabled{ cursor: default; }
.opt .key{
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--field-rule);
  font-family: 'IBM Plex Mono', monospace; font-size: .8rem;
  color: var(--field-ink2);
  transition: all .18s;
}
.opt .txt{ flex: 1; }

.opt.selected{
  background: var(--field-3);
  border-color: var(--field-ink2);
}
.opt.selected .key{ background: var(--field-ink2); border-color: var(--field-ink2); color: var(--field); }

.opt.correct{
  background: rgba(47,107,74,.24);
  border-color: var(--chloro-lite);
  animation: bloom .55s var(--ease);
}
.opt.correct .key{ background: var(--chloro-lite); border-color: var(--chloro-lite); color: var(--field); }
.opt.wrong{
  background: rgba(163,58,56,.2);
  border-color: #C4635F;
  animation: shake .38s var(--ease);
}
.opt.wrong .key{ background: #C4635F; border-color: #C4635F; color: #fff; }

@keyframes bloom{
  0%{ transform: scale(.99); box-shadow: 0 0 0 0 rgba(111,169,127,.5); }
  55%{ transform: scale(1.012); box-shadow: 0 0 0 12px rgba(111,169,127,0); }
  100%{ transform: scale(1); }
}
@keyframes shake{
  0%,100%{ transform: translateX(0); }
  22%{ transform: translateX(-7px); }
  46%{ transform: translateX(6px); }
  72%{ transform: translateX(-3px); }
}

.explain{
  margin-top: 22px; padding: 16px 18px;
  border-left: 2px solid var(--chloro-lite);
  background: var(--field-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: .95rem; color: var(--field-ink2);
  animation: rise .35s var(--ease);
}
.explain b{ color: var(--field-ink); font-weight: 500; }
@keyframes rise{ from{ opacity:0; transform: translateY(8px);} to{opacity:1;transform:none;} }

.player-foot{
  margin-top: 30px; display: flex; justify-content: space-between;
  align-items: center; gap: 16px; flex-wrap: wrap;
}
.dot-row{ display: flex; gap: 6px; flex-wrap: wrap; }
.dot{ width: 8px; height: 8px; border-radius: 50%; background: var(--field-rule); }
.dot.answered{ background: var(--field-ink2); }
.dot.ok{ background: var(--chloro-lite); }
.dot.no{ background: #C4635F; }
.dot.now{ box-shadow: 0 0 0 3px rgba(111,169,127,.25); }

body.darkfield .btn{ background: var(--chloro-lite); border-color: var(--chloro-lite); color: var(--field); }
body.darkfield .btn:hover{ background: #8CC49A; border-color: #8CC49A; }
body.darkfield .btn-line{ background: transparent; color: var(--field-ink2); border-color: var(--field-rule); }
body.darkfield .btn-line:hover{ color: var(--field-ink); border-color: var(--field-ink2); background: transparent; }

/* natija ekrani */
.result{ max-width: 720px; animation: rise .5s var(--ease); }
.score-ring{ display: flex; align-items: center; gap: 34px; flex-wrap: wrap; margin-bottom: 34px; }
.score-ring svg{ width: 148px; height: 148px; flex: none; }
.ring-bg{ fill: none; stroke: var(--field-rule); stroke-width: 6; }
.ring-fg{
  fill: none; stroke: var(--chloro-lite); stroke-width: 6; stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke-dashoffset 1.2s var(--ease);
}
.ring-num{
  font-family: 'IBM Plex Mono', monospace; font-size: 30px;
  fill: var(--field-ink); text-anchor: middle;
}
.ring-sub{ font-size: 11px; fill: var(--field-ink2); text-anchor: middle; }
.verdict h2{ font-size: clamp(1.8rem,3.4vw,2.4rem); margin-bottom: 10px; }
.verdict p{ color: var(--field-ink2); max-width: 44ch; }

.stat-row{
  display: flex; gap: 38px; flex-wrap: wrap;
  padding: 22px 0; margin-bottom: 30px;
  border-top: 1px solid var(--field-rule);
  border-bottom: 1px solid var(--field-rule);
}
.stat b{ display: block; font-family: 'IBM Plex Mono', monospace; font-size: 1.5rem; }
.stat span{ font-size: .83rem; color: var(--field-ink2); }

.review h3{ font-size: 1.25rem; margin-bottom: 16px; }
.review-item{
  padding: 16px 0; border-top: 1px solid var(--field-rule);
  font-size: .95rem;
}
.review-item .rq{ margin-bottom: 8px; }
.review-item .ra{ color: var(--field-ink2); font-size: .89rem; }
.review-item .ra.bad{ color: #D98A85; }
.review-item .ra.good{ color: var(--chloro-lite); }

.sync-note{ margin-top: 22px; font-size: .84rem; color: var(--field-ink2); }

/* ---------------- Admin ---------------- */
.tabs{
  display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 32px;
  flex-wrap: wrap;
}
.tab{
  background: none; border: none; cursor: pointer;
  padding: 11px 18px; font-size: .95rem; color: var(--ink-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .2s, border-color .2s;
}
.tab:hover{ color: var(--ink); }
.tab[aria-selected="true"]{ color: var(--ink); border-bottom-color: var(--chlorophyll); }

.drop{
  border: 1.5px dashed var(--rule); border-radius: var(--r-lg);
  padding: 52px 28px; text-align: center;
  background: var(--paper-3);
  transition: border-color .2s var(--ease), background .2s var(--ease);
  cursor: pointer;
}
.drop.over{ border-color: var(--chlorophyll); background: rgba(47,107,74,.06); }
.drop svg{ margin: 0 auto 16px; opacity: .5; }
.drop h3{ font-size: 1.18rem; margin-bottom: 7px; }
.drop p{ color: var(--ink-3); font-size: .89rem; }

.data-table{ width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th{
  text-align: left; font-weight: 500; color: var(--ink-3);
  font-size: .8rem; padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--rule); white-space: nowrap;
}
.data-table td{ padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.data-table tr:hover td{ background: color-mix(in srgb, var(--paper-3) 60%, transparent); }
.table-scroll{ overflow-x: auto; }

.linkbtn{
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--hemoglobin); font-size: .85rem;
  border-bottom: 1px solid currentColor;
}

.toolbar{ display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.toolbar input[type=search]{
  padding: 10px 14px; border: 1.5px solid var(--rule); border-radius: var(--r-xs);
  background: var(--paper-3); min-width: 220px;
}

.spinner{
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid var(--rule); border-top-color: var(--chlorophyll);
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* ---------------- Toast ---------------- */
.toast-wrap{
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 9px; align-items: center;
  pointer-events: none;
}
.toast{
  background: var(--ink); color: var(--paper);
  padding: 11px 20px; border-radius: 999px; font-size: .89rem;
  animation: toastin .3s var(--ease);
  box-shadow: 0 6px 22px rgba(22,33,27,.25);
}
@keyframes toastin{ from{opacity:0; transform: translateY(12px);} to{opacity:1;transform:none;} }

/* ---------------- Hero feature list ---------------- */
.hero-features{
  margin-top: 30px; display: flex; flex-direction: column; gap: 13px;
}
.hero-feature{
  display: flex; align-items: baseline; gap: 11px;
  font-size: .95rem; color: var(--ink-2);
}
.hero-feature .mark{
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--chloro-dim);
  display: inline-flex; align-items: center; justify-content: center;
  transform: translateY(2px);
}
.hero-feature .mark svg{ width: 9px; height: 9px; }
.hero-feature .mark svg path{ stroke: var(--chlorophyll); }

/* ---------------- Live stat strip ---------------- */
.stat-strip{
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat-cell{
  padding: 28px 22px; text-align: center;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: var(--shadow-xs);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.stat-cell:hover{ transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.stat-cell b{
  display: block; font-family: 'Newsreader', serif; font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem); color: var(--chlorophyll);
  line-height: 1;
}
.stat-cell span{
  display: block; margin-top: 10px; font-size: .84rem; color: var(--ink-3);
}

/* ---------------- Icon feature grid ---------------- */
.feature-grid{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.feature-card{
  background: var(--paper-3); padding: 36px 32px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.feature-card:hover{
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.icon-badge{
  width: 54px; height: 54px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  margin-bottom: 20px;
}
.icon-badge.b-chloro{ background: var(--chloro-dim); }
.icon-badge.b-carot{  background: var(--carotene-dim); }
.icon-badge.b-anth{   background: var(--anthocyanin-dim); }
.feature-card .ic{ width: 26px; height: 26px; }
.feature-card h3{ font-size: 1.18rem; margin-bottom: 10px; }
.feature-card p{ color: var(--ink-2); font-size: .94rem; }

/* ---------------- Steps (qanday ishlaydi) ---------------- */
.steps{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
  counter-reset: step;
}
.step{ position: relative; padding-top: 50px; }
.step::before{
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 38px; height: 38px; border-radius: var(--r-xs);
  background: var(--chloro-dim); color: var(--chlorophyll);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Newsreader', serif; font-size: 1.05rem;
  box-shadow: var(--shadow-xs);
}
.step h3{ font-size: 1.1rem; margin-bottom: 8px; }
.step p{ color: var(--ink-2); font-size: .93rem; }

.cta-band{
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  margin-top: 20px; padding: 34px 36px;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.cta-band p{ color: var(--ink-2); max-width: 42ch; font-size: 1.02rem; }

@media (max-width: 900px){
  .stat-strip{ grid-template-columns: repeat(2, 1fr); }
  .feature-grid, .steps{ grid-template-columns: 1fr; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px){
  .hero-grid{ grid-template-columns: 1fr; gap: 42px; }
  .hero-figure, .scope{ order: -1; }
  .section-head{ grid-template-columns: 1fr; gap: 14px; margin-bottom: 34px; }
  .about-grid{ grid-template-columns: 1fr; gap: 26px; }
  .sigil{ width: 108px; }
  .lesson-row{ grid-template-columns: 1fr; gap: 8px; }
  .test-item{ grid-template-columns: 1fr; gap: 16px; align-items: start; }

  .navtoggle{ display: block; }
  .navlinks{
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 8px 32px 20px;
    display: none;
  }
  .navlinks.open{ display: flex; }
  .navlinks li{ width: 100%; }
  .navlinks a{ display: block; padding: 11px 0; }
}

@media (max-width: 560px){
  body{ font-size: 16px; }
  .wrap{ padding-inline: 20px; }
  .hero{ padding: 46px 0 56px; }
  .section{ padding: 52px 0; }
  .form-card{ padding: 22px; }
  .score-ring{ gap: 22px; }
  .facts{ gap: 26px; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media print{
  .site-head, .site-foot, .player-bar, .player-foot, .toast-wrap, .btn, .btn-line{ display: none !important; }
  body, body.darkfield{ background: #fff !important; color: #000 !important; }
  .result{ max-width: 100%; }
}
