/* eko-sevarlar.uz */
:root {
  color-scheme: light;
  --bg: #EDF2EA;
  --surface: #FBFDF9;
  --surface-2: #E1EADD;
  --ink: #16302A;
  --muted: #55695F;
  --line: #C9D6C8;
  --leaf: #1F5C3B;
  --leaf-hi: #2E7D4F;
  --on-leaf: #F4F9F1;
  --pollen: #D9A11E;
  --pollen-soft: #F4E4B5;
  --water: #2C7A92;
  --good: #23784A;
  --good-soft: #D5EBDC;
  --bad: #B5412C;
  --bad-soft: #F5DDD5;

  /* sahna ranglari (galereya rasmlari) */
  --sky: #CFE3E6;
  --sky-dim: #C9C7B9;
  --hill: #9BBE86;
  --grass: #7FAE6B;
  --earth: #BFA57C;
  --sand: #DCC79B;
  --trunk: #7A583A;
  --crown: #3E7F4C;
  --crown-2: #5E9C5A;
  --river: #6FA9BC;
  --dirty: #7D7550;
  --smoke: #8F938C;
  --smoke-2: #B3B5AE;
  --build: #7C8A86;
  --build-2: #A3AEA9;
  --rust: #8E4F30;
  --flame: #E0822E;
  --plastic: #5AA7D6;
  --white: #F7F7F2;

  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r: 10px;
  --shadow: 0 1px 0 rgba(22, 48, 42, .06), 0 8px 24px -14px rgba(22, 48, 42, .35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F1915;
    --surface: #15231D;
    --surface-2: #1C2E26;
    --ink: #E3EEE7;
    --muted: #9BB1A6;
    --line: #2C4238;
    --leaf: #6CC08E;
    --leaf-hi: #86D3A4;
    --on-leaf: #0C1A13;
    --pollen: #E8BD48;
    --pollen-soft: #3A3219;
    --water: #6BB6CC;
    --good: #6CC08E;
    --good-soft: #193A28;
    --bad: #EE8A73;
    --bad-soft: #43231C;
    --sky: #1E3440;
    --sky-dim: #34332C;
    --hill: #2F5536;
    --grass: #3B6A3E;
    --earth: #5E4E36;
    --sand: #6E6044;
    --trunk: #8B6848;
    --crown: #4F9A60;
    --crown-2: #3B7A4A;
    --river: #3F7C90;
    --dirty: #6A6443;
    --smoke: #6F736D;
    --smoke-2: #575B55;
    --build: #4E5A57;
    --build-2: #66726E;
    --rust: #A0603E;
    --plastic: #4A8FBA;
    --white: #D9DBD3;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 26px -14px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1915;
  --surface: #15231D;
  --surface-2: #1C2E26;
  --ink: #E3EEE7;
  --muted: #9BB1A6;
  --line: #2C4238;
  --leaf: #6CC08E;
  --leaf-hi: #86D3A4;
  --on-leaf: #0C1A13;
  --pollen: #E8BD48;
  --pollen-soft: #3A3219;
  --water: #6BB6CC;
  --good: #6CC08E;
  --good-soft: #193A28;
  --bad: #EE8A73;
  --bad-soft: #43231C;
  --sky: #1E3440;
  --sky-dim: #34332C;
  --hill: #2F5536;
  --grass: #3B6A3E;
  --earth: #5E4E36;
  --sand: #6E6044;
  --trunk: #8B6848;
  --crown: #4F9A60;
  --crown-2: #3B7A4A;
  --river: #3F7C90;
  --dirty: #6A6443;
  --smoke: #6F736D;
  --smoke-2: #575B55;
  --build: #4E5A57;
  --build-2: #66726E;
  --rust: #A0603E;
  --plastic: #4A8FBA;
  --white: #D9DBD3;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 26px -14px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { max-width: 100%; }
a { color: var(--leaf); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--pollen); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5.6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 20px; }
main.wrap { flex: 1; padding-block: 40px 72px; outline: none; }

.tag {
  font: 500 .74rem/1 var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }

/* ---------- Sarlavha ---------- */
.site-head {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font: 800 1.25rem/1 var(--f-display);
  color: var(--ink); text-decoration: none; letter-spacing: -.02em;
}
.brand-mark { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 8px 12px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; font-size: .95rem;
}
.nav a:hover { background: var(--surface-2); }
.nav a.is-active { background: var(--leaf); color: var(--on-leaf); }
@media (max-width: 1000px) and (min-width: 721px) {
  .nav a { padding: 8px 9px; gap: 5px; }
  .nav-long { display: none; }
}
/* Telefon: pastki menyu (ilovadagidek) */
@media (max-width: 720px) {
  .site-head { backdrop-filter: none; background: var(--bg); }
  .head-row { min-height: 56px; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
    margin: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -18px rgba(0, 0, 0, .35);
    overflow: visible;
  }
  .nav a {
    flex-direction: column; justify-content: center; gap: 3px; min-height: 52px;
    padding: 6px 2px; border-radius: 12px; font-size: .7rem; font-weight: 600; line-height: 1.1;
    text-align: center; white-space: normal;
  }
  .nav a .ic { width: 22px; height: 22px; }
  .nav a.is-active { background: var(--good-soft); color: var(--leaf); }
  .nav a.is-active .ic { color: var(--leaf); transform: translateY(-1px); }
  .nav-long { display: none; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  main.wrap { padding-block: 24px 40px; }
  .page-title h1, .topic-head h1 { font-size: clamp(1.7rem, 7.4vw, 2.1rem); }
  .ic-tile.lg { width: 52px; height: 52px; border-radius: 15px; }
  .ic-tile.lg .ic { width: 30px; height: 30px; }
  .page-title { gap: 12px; }
  .feature { padding: 20px; }
  .q { padding: 14px 14px; }
  .opt { padding: 9px 10px; }
  .panel { padding: 16px; }
  .hero { padding-block: 0 32px; }
  .facts { margin-bottom: 44px; }
  .section { margin-bottom: 52px; }
  .foot-row { padding-block: 18px; font-size: .82rem; }
}

.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.foot-row { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 22px; }
.foot-row span:last-child { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .06em; }

/* ---------- Tugmalar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--leaf);
  background: var(--leaf); color: var(--on-leaf);
  font: 600 1rem/1.2 var(--f-body); text-decoration: none; cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--leaf-hi); border-color: var(--leaf-hi); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--leaf); }
.btn.ghost:hover { background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Bosh sahifa ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-block: 8px 48px; }
.hero h1 em { font-style: normal; color: var(--leaf); }
.hero .lead { margin-top: 18px; }
.hero .btn-row { margin-top: 28px; }
.hero-art { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--sky); }
.hero-art svg { display: block; width: 100%; height: auto; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 28px; } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); margin-bottom: 64px; }
.facts div { padding: 18px 16px; display: grid; gap: 4px; }
.facts div + div { border-left: 1px solid var(--line); }
.facts b { font: 800 2.2rem/1 var(--f-display); font-variant-numeric: tabular-nums; }
.facts span { color: var(--muted); font-size: .92rem; }
@media (max-width: 620px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(3) { border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

.section { display: grid; gap: 24px; margin-bottom: 72px; }
.section-head { display: grid; gap: 10px; max-width: 70ch; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.step { position: relative; padding: 20px 22px 22px 0; display: grid; gap: 8px; align-content: start; }
.step::before {
  counter-increment: s; content: "0" counter(s);
  font: 500 .78rem/1 var(--f-mono); color: var(--muted); letter-spacing: .08em;
}
.step strong { font: 800 1.35rem/1.1 var(--f-display); color: var(--leaf); }
.step p { color: var(--muted); font-size: .96rem; }
.step + .step { padding-left: 22px; border-left: 1px dashed var(--line); }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .step:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 440px) {
  .steps { grid-template-columns: 1fr; }
  .step + .step { border-left: 0; padding-left: 0; border-top: 1px dashed var(--line); }
}

/* Mavzu kartochkalari: gerbariy yorlig‘i uslubida */
.topic-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 1040px) { .topic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .topic-grid { grid-template-columns: 1fr; } }
.label-card {
  display: grid; grid-template-rows: auto 1fr auto; gap: 14px;
  padding: 16px 16px 14px; min-height: 180px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--ink); text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.label-card:hover { border-color: var(--leaf); transform: translateY(-2px); box-shadow: var(--shadow); }
.label-card .tag { display: flex; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.label-card h3 { font-size: 1.12rem; }
.label-card p { font-size: .9rem; color: var(--muted); }
.label-card .score { font: 500 .74rem/1 var(--f-mono); color: var(--good); letter-spacing: .04em; }

.teaser-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

/* ---------- Mavzu sahifasi ---------- */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.topic-head { display: grid; gap: 14px; margin-bottom: 36px; max-width: 800px; }
.topic-head .lead { font-family: var(--f-display); font-weight: 500; font-size: 1.3rem; color: var(--muted); }
.topic-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
@media (max-width: 940px) { .topic-layout { grid-template-columns: 1fr; gap: 32px; } }

.prose { display: grid; gap: 18px; max-width: 66ch; }
.prose p { font-size: 1.06rem; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.flow span {
  padding: 6px 12px; border-radius: 999px; background: var(--surface-2);
  font-size: .9rem; font-weight: 500;
}
.flow i { font-style: normal; color: var(--muted); }

.conclusion {
  margin-top: 8px; padding: 22px 24px; border-radius: var(--r);
  background: var(--pollen-soft); display: grid; gap: 8px;
}
.conclusion p { font: 600 1.18rem/1.45 var(--f-display); }

.aside { display: grid; gap: 18px; position: sticky; top: 88px; }
@media (max-width: 940px) { .aside { position: static; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 14px; }
.panel h3 { font-size: 1.05rem; }
.chain { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.chain li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding-block: 10px; }
.chain li + li { border-top: 1px dashed var(--line); }
.chain b { display: block; font: 700 .78rem/1.3 var(--f-mono); letter-spacing: .06em; color: var(--leaf); margin-bottom: 2px; }
.chain .dot {
  width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--leaf);
  display: grid; place-items: center; font: 500 .74rem/1 var(--f-mono); color: var(--leaf);
}
.chain p { font-size: .93rem; }
.kv { display: grid; gap: 10px; }
.kv div { display: grid; gap: 2px; }
.kv p { font-size: .93rem; }

.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { display: grid; gap: 4px; text-decoration: none; color: var(--ink); max-width: 46%; }
.pager a:last-child { text-align: right; margin-left: auto; }
.pager strong { font-family: var(--f-display); font-size: 1.1rem; }

/* ---------- Test ---------- */
.quiz { display: grid; gap: 18px; margin-top: 56px; }
.quiz-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.q {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  padding: 18px 20px; display: grid; gap: 12px; margin: 0;
}
.q legend { padding: 0; font-weight: 600; font-size: 1.04rem; display: flex; gap: 10px; float: left; width: 100%; }
.q legend span { font: 500 .8rem/1.9 var(--f-mono); color: var(--muted); flex: none; }
.opts { display: grid; gap: 8px; clear: both; }
.opt {
  display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start;
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer;
  transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--leaf); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .letter {
  width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; font: 500 .8rem/1 var(--f-mono); color: var(--muted);
}
.opt:has(input:checked) { border-color: var(--leaf); background: var(--surface-2); }
.opt:has(input:checked) .letter { background: var(--leaf); border-color: var(--leaf); color: var(--on-leaf); }
.opt:has(input:focus-visible) { outline: 3px solid var(--pollen); outline-offset: 2px; }
.q.done .opt { cursor: default; }
.opt.right { border-color: var(--good); background: var(--good-soft); }
.opt.right .letter { background: var(--good); border-color: var(--good); color: var(--on-leaf); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .letter { background: var(--bad); border-color: var(--bad); color: var(--on-leaf); }
.q .verdict { font-size: .9rem; font-weight: 600; }
.q .verdict.ok { color: var(--good); }
.q .verdict.no { color: var(--bad); }

.student { gap: 12px; }
.student-row { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 10px; }
.student-row label { display: grid; gap: 6px; }
.student input {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: 400 1rem/1.4 var(--f-body);
}
.student input:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px var(--good-soft); }
.student input:disabled { opacity: .7; }
.student-row.two { grid-template-columns: 2fr 1fr; }
.student select {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: 400 1rem/1.4 var(--f-body);
}
@media (max-width: 640px) { .student-row, .student-row.two { grid-template-columns: 1fr; } }
.sources { display: grid; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.sources ol { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; font-size: .95rem; color: var(--muted); }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.credit { font-size: .78rem; color: var(--muted); margin-top: -8px; }

.result {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center;
  padding: 20px 22px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--leaf);
}
.result .big { font: 800 2.8rem/1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--leaf); }
.result p { color: var(--muted); }
@media (max-width: 480px) { .result { grid-template-columns: 1fr; } }

.test-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.test-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
.test-row:hover { border-color: var(--leaf); }
.test-row .tag { white-space: nowrap; }
.feature {
  display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; align-items: center;
  padding: 24px; border-radius: var(--r); background: var(--leaf); color: var(--on-leaf);
}
.feature .tag { color: inherit; opacity: .8; }
.feature p { opacity: .9; }
.feature .btn { background: var(--on-leaf); color: var(--leaf); border-color: var(--on-leaf); }
@media (max-width: 600px) { .feature { grid-template-columns: 1fr; } }

/* ---------- O‘yinlar ---------- */
.game-card {
  display: grid; gap: 10px; padding: 20px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.game-card:hover { border-color: var(--leaf); box-shadow: var(--shadow); }
.game-card h3 { font-size: 1.2rem; }
.game-card p { color: var(--muted); font-size: .95rem; }
.game-card .tag { color: var(--leaf); }

.game { display: grid; gap: 22px; max-width: 860px; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--leaf); transition: width .3s; }
.game-meta { display: flex; justify-content: space-between; gap: 12px; font: 500 .8rem/1 var(--f-mono); color: var(--muted); letter-spacing: .05em; }

.item-card {
  padding: 28px 24px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  text-align: center; display: grid; gap: 6px;
}
.item-card strong { font: 700 1.6rem/1.2 var(--f-display); }
.item-card small { color: var(--muted); font-size: .95rem; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .choice-grid { grid-template-columns: repeat(2, 1fr); } }
.choice {
  padding: 16px 12px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font: 600 1rem/1.25 var(--f-body); cursor: pointer; min-height: 64px;
}
.choice:hover:not(:disabled) { border-color: var(--leaf); background: var(--surface-2); }
.choice:disabled { cursor: default; }
.choice.right { border-color: var(--good); background: var(--good-soft); }
.choice.wrong { border-color: var(--bad); background: var(--bad-soft); }
.feedback { padding: 14px 16px; border-radius: 8px; background: var(--surface-2); display: grid; gap: 4px; }
.feedback b.ok { color: var(--good); }
.feedback b.no { color: var(--bad); }

.slots { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.slot {
  display: grid; grid-template-columns: 180px 1fr; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 8px; border: 1px dashed var(--line); min-height: 52px;
}
.slot .tag { color: var(--leaf); }
.slot.filled { border-style: solid; background: var(--surface); }
.slot.right { border-color: var(--good); background: var(--good-soft); }
.slot.wrong { border-color: var(--bad); background: var(--bad-soft); }
@media (max-width: 560px) { .slot { grid-template-columns: 1fr; gap: 4px; } }
.pool { display: flex; flex-wrap: wrap; gap: 8px; }
.pool button {
  padding: 10px 14px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font: 500 .95rem/1.3 var(--f-body); cursor: pointer; text-align: left;
}
.pool button:hover { border-color: var(--leaf); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button {
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent;
  color: var(--ink); font: 500 .92rem/1 var(--f-body); cursor: pointer;
}
.tabs button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.fp { display: grid; gap: 12px; }
.fp .q legend { font-weight: 600; }
.fp-opts { display: flex; flex-wrap: wrap; gap: 8px; clear: both; }
.fp-opts label {
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); cursor: pointer; font-size: .95rem;
}
.fp-opts input { position: absolute; opacity: 0; pointer-events: none; }
.fp-opts label:has(input:checked) { background: var(--leaf); border-color: var(--leaf); color: var(--on-leaf); }
.fp-opts label:has(input:focus-visible) { outline: 3px solid var(--pollen); outline-offset: 2px; }
.meter { display: grid; gap: 8px; }
.meter-bar { position: relative; height: 14px; border-radius: 99px; background: linear-gradient(90deg, var(--good) 0 25%, var(--pollen) 25% 60%, var(--bad) 60% 100%); }
.meter-bar i {
  position: absolute; top: -5px; width: 4px; height: 24px; border-radius: 2px;
  background: var(--ink); transform: translateX(-2px); transition: left .3s;
}
.meter-scale { display: flex; justify-content: space-between; font: 500 .72rem/1 var(--f-mono); color: var(--muted); }

/* ---------- Galereya ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
@media (max-width: 400px) { .gallery { grid-template-columns: 1fr; } }
.scene { margin: 0; display: grid; gap: 14px; align-content: start; }
.scene .art { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--sky); max-width: 100%; }
.scene .art svg, .scene .art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scene figcaption { display: grid; gap: 10px; }
.scene dl { margin: 0; display: grid; gap: 8px; }
.scene dt { font: 500 .72rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.scene dd { margin: 2px 0 0; font-size: .95rem; }
.scene dd.act { color: var(--leaf); font-weight: 500; }

/* ---------- Loyiha ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }
.about blockquote {
  margin: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--pollen);
  font: 600 1.35rem/1.35 var(--f-display);
}
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 .74rem/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
td.num { font-variant-numeric: tabular-nums; }

/* ---------- Animatsion ikonkalar ---------- */
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; overflow: visible; }
.ic .acc { color: var(--pollen); }
.ic .wat { color: var(--water); }
.btn .ic .acc, .nav a.is-active .ic .acc, .feature .ic .acc { color: currentColor; }
.ic [class*="a-"] {
  transform-box: fill-box; transform-origin: center;
  animation-duration: 1.6s; animation-timing-function: ease-in-out; animation-iteration-count: infinite;
  animation-play-state: paused;
}
a:hover .ic [class*="a-"], button:hover .ic [class*="a-"], a:focus-visible .ic [class*="a-"], button:focus-visible .ic [class*="a-"],
.ic-host:hover .ic [class*="a-"], .ic-live [class*="a-"] { animation-play-state: running; }
.ic-once [class*="a-"] { animation-play-state: running; animation-iteration-count: 1; }
.ic .d2 { animation-delay: .2s; } .ic .d3 { animation-delay: .4s; }

.ic .a-sway { animation-name: ic-sway; animation-duration: 2.4s; transform-origin: 50% 100%; }
.ic-leaf .a-sway, .ic-sprout .a-sway { transform-origin: 0 100%; }
.ic .a-spin { animation-name: ic-spin; animation-duration: 2.4s; animation-timing-function: linear; }
.ic .a-spin-slow { animation-name: ic-spin; animation-duration: 12s; animation-timing-function: linear; }
.ic .a-grow { animation-name: ic-grow; transform-origin: 0 100%; }
.ic .a-draw { stroke-dasharray: 1; animation-name: ic-draw; animation-duration: 1.8s; }
.ic .a-blink { animation-name: ic-blink; animation-duration: 1.2s; }
.ic .a-pulse { animation-name: ic-pulse; }
.ic .a-bob { animation-name: ic-bob; }
.ic .a-nudge { animation-name: ic-nudge; animation-duration: 1s; }
.ic .a-nudge-up { animation-name: ic-nudge-up; animation-duration: 1s; }
.ic .a-dropdown { animation-name: ic-dropdown; animation-duration: 1s; }
.ic .a-shake { animation-name: ic-shake; animation-duration: .7s; }
.ic .a-twinkle { animation-name: ic-twinkle; }
.ic .a-beat { animation-name: ic-beat; animation-duration: 1.3s; }
.ic .a-glow { animation-name: ic-blink; animation-duration: 1s; }
.ic .a-rain { animation-name: ic-rain; animation-duration: .9s; }
.ic .a-wiggle { animation-name: ic-wiggle; animation-duration: 1.2s; }
.ic .a-lid { animation-name: ic-lid; transform-origin: 0 100%; }
.ic .a-shackle { animation-name: ic-shackle; animation-duration: 1.2s; }
.ic .a-fly { animation-name: ic-fly; animation-duration: 2.4s; }
.ic .a-drip { animation-name: ic-drip; animation-duration: 1.4s; }
.ic .a-drift { animation-name: ic-drift; animation-duration: 1.8s; }
.ic .a-rise { animation-name: ic-rise; animation-duration: 2s; }
.ic .a-step { animation-name: ic-step; animation-duration: 1.4s; }
.ic .a-wave-l { animation-name: ic-wave-l; transform-origin: 100% 100%; }
.ic .a-wave-r { animation-name: ic-wave-r; transform-origin: 0 100%; }
.ic .a-pop { animation-name: ic-pop; }
.ic .a-lines { animation-name: ic-lines; transform-origin: 0 50%; }
.ic .a-bar { animation-name: ic-bar; transform-origin: 50% 100%; }
.ic .a-scan { animation-name: ic-scan; animation-duration: 2s; }
.ic .a-write { animation-name: ic-write; animation-duration: 1s; transform-origin: 0 100%; }
.ic .a-turn { animation-name: ic-turn; animation-duration: .8s; }

@keyframes ic-sway { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-9deg); } 70% { transform: rotate(7deg); } }
@keyframes ic-spin { to { transform: rotate(360deg); } }
@keyframes ic-grow { 0%, 100% { transform: scale(1); } 50% { transform: scale(.55); } }
@keyframes ic-draw { 0% { stroke-dashoffset: 0; } 1% { stroke-dashoffset: 1; } 55%, 100% { stroke-dashoffset: 0; } }
@keyframes ic-blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes ic-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }
@keyframes ic-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.6px); } }
@keyframes ic-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
@keyframes ic-nudge-up { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(2px, -2px); } }
@keyframes ic-dropdown { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2.5px); } }
@keyframes ic-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-2px); } 40% { transform: translateX(2px); } 60% { transform: translateX(-1.5px); } 80% { transform: translateX(1.5px); } }
@keyframes ic-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(.6) rotate(25deg); } }
@keyframes ic-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }
@keyframes ic-rain { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(3px); opacity: .1; } }
@keyframes ic-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@keyframes ic-lid { 0%, 100% { transform: translate(0, 0) rotate(0); } 40%, 60% { transform: translate(-1px, -2.5px) rotate(-18deg); } }
@keyframes ic-shackle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.2px); } }
@keyframes ic-fly { 0% { transform: translate(0, 0); opacity: 1; } 70% { transform: translate(3px, -3px); opacity: 0; } 71% { transform: translate(0, 0); opacity: 0; } 100% { opacity: 1; } }
@keyframes ic-drip { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(1.5px) scale(.94, 1.06); } }
@keyframes ic-drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(2.5px); } }
@keyframes ic-rise { 0% { transform: translateY(0) scale(1); opacity: 1; } 80% { transform: translateY(-3.5px) scale(1.3); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 0; } }
@keyframes ic-step { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes ic-wave-l { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }
@keyframes ic-wave-r { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(14deg); } }
@keyframes ic-pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(.7); } }
@keyframes ic-lines { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.4); } }
@keyframes ic-bar { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }
@keyframes ic-scan { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes ic-write { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-1px, 1px) rotate(-7deg); } }
@keyframes ic-turn { 0% { transform: rotate(0); } 100% { transform: rotate(90deg); } }

/* ikonka joylashuvlari */
.ic-tile {
  display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--surface-2); color: var(--leaf);
  transition: background .2s, transform .2s;
}
.ic-tile .ic { width: 26px; height: 26px; }
.ic-tile.lg { width: 64px; height: 64px; border-radius: 18px; }
.ic-tile.lg .ic { width: 36px; height: 36px; }
.ic-tile.sm { width: 34px; height: 34px; border-radius: 10px; }
.ic-tile.sm .ic { width: 20px; height: 20px; }
a:hover .ic-tile, .ic-host:hover .ic-tile { background: var(--good-soft); transform: rotate(-4deg) scale(1.05); }
.btn .ic { width: 1.15em; height: 1.15em; }
.nav a { display: inline-flex; align-items: center; gap: 7px; }
.nav a .ic { width: 18px; height: 18px; color: var(--leaf); }
.nav a.is-active .ic { color: inherit; }
.brand .brand-mark { transition: transform .4s; }
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.08); }
.h-ic { display: flex; align-items: center; gap: 12px; }
.facts .ic { width: 26px; height: 26px; color: var(--leaf); }
.facts div > .ic { margin-bottom: 4px; }
.step .ic { width: 30px; height: 30px; color: var(--leaf); }
.panel h3 { display: flex; align-items: center; gap: 8px; }
.panel h3 .ic { color: var(--leaf); }
.conclusion .tag, .sources .tag { display: inline-flex; align-items: center; gap: 6px; }
.scene dt { display: flex; align-items: center; gap: 6px; }
.scene dt .ic { width: 16px; height: 16px; }
.verdict { display: inline-flex; align-items: center; gap: 6px; }
.result .big { display: flex; align-items: center; gap: 10px; }
.result .big .ic { width: 40px; height: 40px; }
.opt.wrong { animation: opt-shake .45s; }
@keyframes opt-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.opt.right .letter { animation: opt-pop .4s; }
@keyframes opt-pop { 50% { transform: scale(1.25); } }

.page-title { gap: 16px; }
.label-card .ic-tile { margin-bottom: 12px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--leaf); font-size: .92rem; }
.flip { display: inline-flex; transform: scaleX(-1); }
.test-row .ic-tile { margin-right: 2px; }
.feedback b.h-ic { gap: 6px; }

/* muallif */
.author {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start;
  padding: 28px; margin-bottom: 56px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line);
}
.author-photo { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface-2); max-width: 100%; }
.author-photo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 3px var(--leaf); opacity: .0; transition: opacity .3s;
}
.author:hover .author-photo::after { opacity: 1; }
.author-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.author:hover .author-photo img { transform: scale(1.04); }
.author-main { display: grid; gap: 14px; align-content: start; max-width: 70ch; }
.author-main h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.author-pos { color: var(--muted); font-size: 1.05rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  background: var(--surface-2); font-size: .9rem;
}
.chip .ic { color: var(--leaf); }
.chip b { font: 800 1.05rem/1 var(--f-display); color: var(--leaf); }
@media (max-width: 760px) {
  .author { grid-template-columns: 1fr; padding: 20px; gap: 22px; }
  .author-photo { width: 180px; }
}

.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 4px; max-width: 820px; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--leaf), var(--line)); }
.timeline li {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 12px 0;
  animation: tl-in .5s ease both;
}
@keyframes tl-in { from { opacity: .3; transform: translateX(-10px); } }
.tl-dot {
  position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line); color: var(--leaf); transition: border-color .2s, transform .2s;
}
.tl-dot .ic { width: 22px; height: 22px; }
.timeline li:hover .tl-dot { border-color: var(--leaf); transform: scale(1.08); }
.timeline li.now .tl-dot { background: var(--leaf); border-color: var(--leaf); color: var(--on-leaf); }
.timeline li.now .tl-dot::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--leaf);
  animation: tl-ping 2s ease-out infinite;
}
@keyframes tl-ping { from { transform: scale(.85); opacity: .8; } to { transform: scale(1.35); opacity: 0; } }
.timeline strong { font-family: var(--f-display); font-size: 1.1rem; display: block; margin-top: 2px; }
.timeline p { color: var(--muted); font-size: .95rem; }
.pubs { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; max-width: 820px; }

.author-strip {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center;
  margin-top: 28px; padding: 18px 22px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface);
}
.author-strip > div { display: grid; gap: 2px; }
.author-strip strong { font: 700 1.2rem/1.2 var(--f-display); }
.author-strip span:not(.tag) { color: var(--muted); font-size: .92rem; }
.author-avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--surface-2); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--leaf); }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .author-strip { grid-template-columns: auto minmax(0, 1fr); } .author-strip .btn { grid-column: 1 / -1; } }

/* bosh sahifa rasmi va galereya lavhalari */
.hero-art .h-sway, .scene .h-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: ic-sway 6s ease-in-out infinite; }
.hero-art .h-sway.d2 { animation-delay: -2s; } .hero-art .h-sway.d3 { animation-delay: -4s; }
.h-puff { transform-box: fill-box; transform-origin: center; animation: h-puff 5s ease-out infinite; }
@keyframes h-puff { 0% { transform: translateY(0) scale(1); opacity: .95; } 100% { transform: translateY(-22px) scale(1.45); opacity: 0; } }
.h-swim { animation: h-swim 7s ease-in-out infinite; }
.h-swim.d2 { animation-delay: -3s; }
@keyframes h-swim { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(14px); } }
.h-sun { transform-box: fill-box; transform-origin: center; animation: ic-pulse 5s ease-in-out infinite; }
.h-flicker { transform-box: fill-box; transform-origin: 50% 100%; animation: h-flicker .9s ease-in-out infinite alternate; }
.h-flicker.d2 { animation-delay: -.4s; }
@keyframes h-flicker { from { transform: scaleY(1) skewX(0); } to { transform: scaleY(.82) skewX(4deg); } }
.h-bob { animation: ic-bob 3s ease-in-out infinite; }

/* sahifa almashganda */
#view > * { animation: view-in .4s ease both; }
@keyframes view-in { from { opacity: .35; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
