/* Шрифт: Palatino. Apple/Windows-та жүйедегі Palatino (жүктелмейді), қалғанында (Android) — P052,
   URW-дің ашық Palatino-клоны (fonts/, AGPL-3, лицензиясы fonts/COPYING-P052.txt). Қазақ әріптері бар. */
@font-face { font-family: "GEO Palatino"; font-weight: 400; font-style: normal; font-display: swap;
  src: local("Palatino-Roman"), local("Palatino"), local("Palatino Linotype"), local("PalatinoLinotype-Roman"), url("../fonts/P052-Roman.woff2") format("woff2"); }
@font-face { font-family: "GEO Palatino"; font-weight: 700; font-style: normal; font-display: swap;
  src: local("Palatino-Bold"), local("Palatino Linotype Bold"), local("PalatinoLinotype-Bold"), url("../fonts/P052-Bold.woff2") format("woff2"); }
@font-face { font-family: "GEO Palatino"; font-weight: 400; font-style: italic; font-display: swap;
  src: local("Palatino-Italic"), local("Palatino Linotype Italic"), local("PalatinoLinotype-Italic"), url("../fonts/P052-Italic.woff2") format("woff2"); }

/* GEO tanu — брэнд түстері (geo-lesson-deck): қою жасыл / ашық жасыл / сары «ҰБТ» */
:root {
  --g900: #1E4D2B; --g500: #7CB342; --g100: #E6EFDF; --bg: #F3F6F1; --card: #FFFFFF;
  --ink: #1D1D1D; --mute: #5F5F5F; --line: #DCE3D6;
  --ok: #2E7D32; --bad: #C62828; --mid: #F9A825;
  --font: "GEO Palatino", Palatino, "Palatino Linotype", "Book Antiqua", "Noto Serif", Georgia, serif;
  --r: 14px; --sh: 0 1px 2px rgba(30,77,43,.06), 0 4px 16px rgba(30,77,43,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.55 var(--font); color: var(--ink); background: var(--bg); }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }

/* Жоғарғы жолақ */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)); background: rgba(243,246,241,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: baseline; gap: 3px; text-decoration: none; font-weight: 800; letter-spacing: .02em; }
.logo-mark { background: var(--g900); color: #fff; padding: 2px 7px; border-radius: 7px; font-size: 15px; }
.logo-word { color: var(--g900); font-size: 18px; }
.nav { margin-left: auto; display: flex; gap: 16px; font-size: 14px; font-weight: 600; }
.nav a { text-decoration: none; color: var(--mute); }
.nav a:hover { color: var(--g900); }
.back { border: 0; background: var(--card); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  text-decoration: none; font-size: 18px; box-shadow: var(--sh); cursor: pointer; flex: none; }
@media (max-width: 720px) { .nav { display: none; } }

.wrap { max-width: 860px; margin: 0 auto; padding: 20px 16px 60px; }
.title { font-size: 26px; line-height: 1.2; font-weight: 800; margin: 8px 0 16px; }
.title em, .hero-title em { font-style: normal; color: var(--g900); }
.title::after { content: ""; display: block; width: 44px; height: 4px; background: var(--g500); border-radius: 2px; margin-top: 10px; }
.sub { font-size: 20px; margin: 28px 0 12px; }
.muted { color: var(--mute); }

/* Батырмалар */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 20px; border-radius: 12px;
  background: var(--g900); color: #fff; border: 2px solid var(--g900); font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: #163b21; }
.btn.ghost { background: transparent; color: var(--g900); }
.btn.ghost:hover { background: var(--g100); }
.btn.sm { padding: 7px 14px; font-size: 14px; }
.btn[disabled] { opacity: .35; cursor: default; }

/* Басты бет */
.hero { padding: 28px 0 8px; }
.kicker { margin: 0; color: var(--g500); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.hero-title { font-size: clamp(34px, 7vw, 54px); line-height: 1.05; font-weight: 800; margin: 10px 0 14px; }
.lead { font-size: 17px; color: var(--mute); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; justify-content: inherit; }
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
@media (min-width: 720px) { .grid4 { grid-template-columns: repeat(5, 1fr); } }
.tile { background: var(--card); border-radius: var(--r); padding: 18px; text-decoration: none; box-shadow: var(--sh);
  display: flex; flex-direction: column; gap: 4px; border: 1px solid transparent; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--g500); transform: translateY(-2px); }
.tile-ic { font-size: 26px; }
.tile small, .row small { color: var(--mute); font-weight: 500; }
.stats { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; margin-top: 24px; padding: 16px 18px;
  background: var(--g900); color: #fff; border-radius: var(--r); }
.stats b { font-size: 24px; margin-right: 6px; color: var(--g500); }
.stats a { color: #fff; font-weight: 600; }

/* Тізімдер */
.list { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; background: var(--card); padding: 14px 16px; border-radius: var(--r);
  text-decoration: none; box-shadow: var(--sh); border: 1px solid transparent; }
a.row:hover { border-color: var(--g500); }
.row-ic { font-size: 24px; }
.row-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.row-go { color: var(--g500); font-size: 24px; font-weight: 700; }
.card { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--sh); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--g100); color: var(--mute); white-space: nowrap; }
.chip.ok { background: #E3F1E4; color: var(--ok); }
.chip.mid { background: #FFF4D6; color: #9A6A00; }
.chip.bad { background: #FBE6E6; color: var(--bad); }
@media (max-width: 520px) { .chip.none { display: none; } }
.chip.demo { background: #FFF4D6; color: #9A6A00; vertical-align: middle; }

/* Тест */
.test-top .tt { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--g900); background: var(--g100); padding: 4px 10px; border-radius: 8px; }
.timer.warn { color: #fff; background: var(--bad); }
.q-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.q-grid button { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 13px; cursor: pointer; }
.q-grid button.ans { background: var(--g100); border-color: var(--g500); }
.q-grid button.cur { background: var(--g900); border-color: var(--g900); color: #fff; }
.q-card { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--sh); margin-bottom: 14px; }
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.q-head .chip { margin-left: auto; }
.q-no { background: var(--g900); color: #fff; font-weight: 800; min-width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.q-text { font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.q-img { display: block; border-radius: 10px; margin: 0 auto 14px; max-height: 420px; }
.q-zoom { display: block; cursor: zoom-in; }
.ctx { background: var(--bg); border-left: 4px solid var(--g500); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; font-size: 15px; }
.ctx p { margin: 6px 0 0; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--card); cursor: pointer; transition: border-color .12s, background .12s; }
.opt:hover:not([disabled]) { border-color: var(--g500); }
.opt .ol { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--g100); font-weight: 800; font-size: 14px; }
.opt.multi .ol { border-radius: 50%; }
.opt.on { border-color: var(--g900); background: var(--g100); }
.opt.on .ol { background: var(--g900); color: #fff; }
.opt.right { border-color: var(--ok); background: #E3F1E4; }
.opt.right .ol { background: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: #FBE6E6; }
.opt.wrong .ol { background: var(--bad); color: #fff; }
.opt[disabled] { cursor: default; }
.opt[disabled].on::after { content: "сенің жауабың"; margin-left: auto; font-size: 12px; font-weight: 700; color: var(--mute); white-space: nowrap; }
.mo-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 16px; }
.mo-list b { color: var(--g900); margin-right: 6px; }
.match { display: flex; flex-direction: column; gap: 8px; }
.mi { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.mi-text { flex: 1 1 200px; font-weight: 600; }
.mi-opts { display: flex; gap: 6px; }
.mi-opts button { width: 38px; height: 38px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); font-weight: 800; cursor: pointer; }
.mi-opts button.on { background: var(--g900); border-color: var(--g900); color: #fff; }
.mi-opts button.right { background: var(--ok); border-color: var(--ok); color: #fff; }
.match.tf .mi-opts button { width: auto; padding: 0 14px; font-size: 14px; }
.mi-opts button.wrong { background: var(--bad); border-color: var(--bad); color: #fff; }
.q-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.result-hero { text-align: center; background: var(--card); border-radius: var(--r); padding: 26px 18px; box-shadow: var(--sh); border-top: 6px solid var(--g500); margin: 8px 0 14px; justify-content: center; }
.result-hero.ok { border-top-color: var(--ok); } .result-hero.mid { border-top-color: var(--mid); } .result-hero.bad { border-top-color: var(--bad); }
.result-hero .big { font-size: 48px; font-weight: 800; color: var(--g900); line-height: 1.1; }
.result-hero p { font-weight: 600; margin: 8px 0 2px; }

/* Карта */
.map { position: relative; border-radius: var(--r); overflow: hidden; box-shadow: var(--sh); background: #DCEBF2; line-height: 0; }
.map img { width: 100%; display: block; }
.mk { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; background: var(--g900); color: #fff;
  font: 700 14px/30px var(--font); text-align: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.mk.on { background: var(--g500); }
.mk.right { background: var(--ok); } .mk.wrong { background: var(--bad); }
@media (max-width: 520px) { .mk { width: 22px; height: 22px; font-size: 11px; line-height: 22px; } }
.mlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 14px 0; }
.mrow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; background: var(--card); padding: 8px 10px; border-radius: 12px; border: 2px solid transparent; box-shadow: var(--sh); }
.mrow.right { border-color: var(--ok); } .mrow.wrong { border-color: var(--bad); }
.mk-n { width: 28px; height: 28px; border-radius: 50%; background: var(--g900); color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; font-size: 13px; }
.mrow select { flex: 1; min-width: 0; font: inherit; padding: 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); }
.fix { width: 100%; color: var(--ok); font-weight: 700; padding-left: 38px; }

/* Аккаунт */
.acc { margin-left: 12px; width: 36px; height: 36px; border-radius: 50%; background: var(--g900); color: #fff; display: grid; place-items: center;
  font-weight: 800; text-decoration: none; flex: none; }
.top > .btn.sm { margin-left: auto; }
.nav + .acc, .nav + .btn.sm { margin-left: 12px; }
@media (max-width: 720px) { .top .acc, .top > .btn.sm { margin-left: auto; } }
.form { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.fld input, .search { font: inherit; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); }
.fld input:focus, .search:focus { outline: none; border-color: var(--g500); background: #fff; }
.search { width: 100%; margin-bottom: 12px; }
.err { color: var(--bad); font-weight: 600; margin: 0; min-height: 1px; }
.loading { padding: 40px 0; text-align: center; color: var(--mute); font-weight: 600; }
.chip.prem { background: #FFF4D6; color: #9A6A00; }
.locked { text-align: center; }
.lock-ic { font-size: 44px; color: var(--mid); margin: 0; }
.locked .seg { justify-content: center; }
.row.me { border-color: var(--g500); background: var(--g100); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 8px 14px; border-radius: 10px; background: var(--card); text-decoration: none; font-weight: 600; font-size: 14px; box-shadow: var(--sh); }
.tabs a.on { background: var(--g900); color: #fff; }
code { background: var(--g100); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.ok-msg { color: var(--ok); font-weight: 600; margin: 0; }
.pw-box { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--g100); }
.pw-box p { margin: 4px 0; }
.pw { font-size: 26px; font-weight: 700; letter-spacing: .06em; color: var(--g900); }
