/* ===== mamandyq.pro — дизайн жүйесі ===== */
/* Палитра логотиппен үйлескен: navy (#142240) · teal (#1f6f6b → #4fbfc4) · coral (#ef7b5f) */
:root {
  --bg: #e9eef0;
  --surface: #ffffff;
  --surface-2: #eef3f4;
  --text: #142240;
  --muted: #5f6b7d;
  --border: #dfe6e8;
  --navy: #142240;
  --teal: #1f5f5c;
  --teal-soft: #d9e7e7;
  --primary: #1f7a75;
  --primary-2: #4fbfc4;
  --accent: #ef7b5f;
  --success: #12a37f;
  --gold: #e2b45a;
  --grad: linear-gradient(135deg, #1d4f4d 0%, #2a8a85 100%);
  --shadow: 0 24px 48px -28px rgba(20, 34, 64, .35);
  --radius: 24px;
  --header-h: 84px;
}
:root[data-theme="dark"] {
  --bg: #0b171b;
  --surface: #12232a;
  --surface-2: #19303a;
  --text: #e6eef0;
  --muted: #94a8ae;
  --border: #23414b;
  --navy: #1b3356;
  --teal: #1d5552;
  --teal-soft: #1a3a3e;
  --primary: #4fbfc4;
  --primary-2: #7fd6da;
  --shadow: 0 24px 48px -28px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(1100px 600px at 0% -10%, color-mix(in srgb, var(--primary-2) 22%, transparent), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  transition: background .3s, color .3s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h); padding-top: 12px;
}
.site-header .container {
  height: 60px; display: flex; align-items: center; gap: 24px; padding: 0 10px 0 18px;
  border-radius: 999px; background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(16px); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  box-shadow: 0 14px 34px -22px rgba(20, 34, 64, .4);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.logo-mark { height: 42px; flex-shrink: 0; display: block; }
.logo-mark img { height: 100%; width: auto; }
.logo-mark .logo-dark { display: none; }
:root[data-theme="dark"] .logo-mark .logo-light { display: none; }
:root[data-theme="dark"] .logo-mark .logo-dark { display: block; }
.logo > span:last-child { color: var(--navy); }
.logo > span:last-child b { color: #3fb0b5; font-weight: 800; }
:root[data-theme="dark"] .logo > span:last-child { color: #fff; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 9px 16px; border-radius: 999px; font-weight: 500; color: var(--muted); white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: #fff; background: var(--navy); }

.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.1rem;
  display: grid; place-items: center;
}
.menu-btn { display: none; }

/* Мәзір бір жолға сыймайтын ендікте (логин батырмасымен) бургер-мәзірге ауысады */
@media (max-width: 1060px) {
  .menu-btn { display: grid; }
  .header-actions { margin-left: auto; }
  .nav {
    position: fixed; inset: calc(var(--header-h) + 6px) 16px auto 16px; flex-direction: column;
    background: var(--surface); padding: 16px; border: 1px solid var(--border); border-radius: 24px;
    box-shadow: var(--shadow); opacity: 0; pointer-events: none;
    transform: translateY(-12px); transition: transform .25s, opacity .25s; margin: 0;
  }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px 16px; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px;
  border-radius: 999px; font-weight: 600; border: none; cursor: pointer; font-size: 1rem;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 14px 28px -14px rgba(20, 34, 64, .7); }
:root[data-theme="dark"] .btn-primary { background: var(--primary); color: #0b171b; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 14px 28px -14px var(--accent); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-light { background: rgba(255, 255, 255, .92); color: var(--navy); }
.pill-mini {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; background: rgba(255, 255, 255, .9); color: var(--navy);
  transition: transform .2s; white-space: nowrap;
}
.pill-mini:hover { transform: translateX(3px); }

/* ===== Hero ===== */
.hero { position: relative; padding: 90px 0 70px; overflow: hidden; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35; z-index: -1;
}
.hero::before { width: 480px; height: 480px; background: var(--primary); top: -160px; left: -120px; }
.hero::after { width: 420px; height: 420px; background: var(--primary-2); bottom: -180px; right: -100px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-size: .875rem; color: var(--muted);
  margin-bottom: 20px;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.8rem); line-height: 1.06; font-weight: 800; letter-spacing: -.035em; color: var(--text); }
.grad-text { background: linear-gradient(135deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin: 20px 0 32px; font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  padding: 28px; box-shadow: var(--shadow);
}
.hero-card h3 { font-size: 1rem; color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.match-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.match-row:first-of-type { border-top: none; }
.match-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); font-size: 1.3rem; }
.match-info { flex: 1; }
.match-info strong { display: block; font-size: .98rem; }
.match-info small { color: var(--muted); }
.match-pct { font-weight: 700; color: var(--primary); }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }

@media (max-width: 900px) {
  .hero { padding: 56px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; }
}

/* ===== Sections ===== */
.section { padding: 70px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.section-head p { color: var(--muted); margin-top: 10px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center;
}
.stat b { display: block; font-size: 2rem; font-weight: 800; }
.stat span { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex; flex-direction: column; gap: 12px;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.card-icon {
  width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center;
  font-size: 1.6rem; background: var(--teal-soft);
}
.card h3 { font-size: 1.2rem; }
.card p { color: var(--muted); flex: 1; }
.card .more { color: var(--primary); font-weight: 600; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad); color: #fff; font-weight: 700; margin-bottom: 14px;
}
.step h4 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { color: var(--muted); }

.cta {
  border-radius: 32px; padding: 64px 32px; text-align: center; color: #fff;
  background: radial-gradient(600px 300px at 85% 120%, rgba(239, 123, 95, .45), transparent 60%), linear-gradient(135deg, var(--navy), var(--teal));
  position: relative; overflow: hidden;
}
.cta h2 { letter-spacing: -.03em; }
.cta h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
.cta p { opacity: .9; margin: 10px auto 26px; max-width: 520px; }
.cta .btn { background: var(--accent); color: #fff; }

/* ===== Page header (ішкі беттер) ===== */
.page-hero { padding: 64px 0 40px; position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: var(--primary); filter: blur(100px); opacity: .2; top: -300px; right: -100px; z-index: -1;
}
.page-hero .crumbs { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.page-hero .crumbs a:hover { color: var(--primary); }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
.page-hero p { color: var(--muted); font-size: 1.1rem; margin-top: 10px; max-width: 640px; }

.placeholder {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 60px 24px;
  text-align: center; color: var(--muted); background: var(--surface);
}
.placeholder .ph-icon { font-size: 2.6rem; margin-bottom: 10px; }

/* ===== Footer ===== */
.site-footer { padding: 0 0 20px; margin-top: 48px; }
.site-footer > .container {
  padding: 44px 40px 24px; border-radius: 32px; color: #dbe6ea;
  background: radial-gradient(500px 260px at 100% 0%, rgba(79, 191, 196, .22), transparent 60%), var(--navy);
}
.site-footer .logo > span:last-child { color: #fff; }
.site-footer .logo-mark .logo-light { display: none; }
.site-footer .logo-mark .logo-dark { display: block; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid p { color: #a9bac2; margin-top: 12px; max-width: 360px; }
.footer-grid h5 { font-size: .95rem; margin-bottom: 12px; color: #fff; }
.footer-grid ul { list-style: none; display: grid; gap: 8px; }
.footer-grid ul a { color: #a9bac2; }
.footer-grid ul a:hover { color: var(--accent); }
.copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); color: #8ea2ab; font-size: .9rem; text-align: center; }
.copy a { color: #c3d3d9; text-decoration: underline; text-underline-offset: 2px; }
.copy a:hover { color: var(--accent); }
@media (max-width: 600px) { .site-footer > .container { padding: 32px 22px 20px; border-radius: 26px; } }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===== Басты бет (бенто) ===== */
.home { padding-top: 20px; }
.h-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; align-items: center; min-height: 460px; padding-bottom: 28px; }
.h-hero h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); line-height: 1.04; font-weight: 800; letter-spacing: -.04em; margin: 8px 0 18px; }
.h-hero .lead { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin-bottom: 28px; }
@media (max-width: 900px) { .h-hero { grid-template-columns: 1fr; } }

/* Басты блок: студенттің фотосы */
.hero-photo { position: relative; height: 470px; display: flex; justify-content: center; align-items: flex-end; }
.hp-circle {
  position: absolute; left: 50%; bottom: 36px; width: min(410px, 92%); aspect-ratio: 1; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #6fd0d3, #2a8a85 45%, #1f5f5c 80%);
  box-shadow: 0 40px 70px -30px rgba(31, 95, 92, .7), inset 0 -20px 50px rgba(20, 34, 64, .25);
}
.hp-circle::after {
  content: ""; position: absolute; inset: -18px; border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--primary-2) 45%, transparent);
}
.hero-photo img {
  position: relative; z-index: 1; height: 100%; width: auto; object-fit: contain;
  -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent);
}
.hp-chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--surface) 80%, transparent);
  box-shadow: 0 20px 36px -18px rgba(20, 34, 64, .5); animation: gsFloat 7s ease-in-out infinite;
}
.hp-chip span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: var(--teal-soft); }
.hp-chip b { display: block; font-size: .95rem; line-height: 1.2; }
.hp-chip small { color: var(--muted); font-size: .75rem; }
.hp-chip.c1 { left: 0; top: 34%; }
.hp-chip.c2 { right: 0; top: 62%; animation-delay: -3.5s; }
@keyframes gsFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.gs-gold {
  position: absolute; z-index: 2; border-radius: 48% 52% 45% 55%;
  background: radial-gradient(circle at 32% 28%, #fff6d6, #e2b45a 40%, #8a6422 85%);
  box-shadow: 0 16px 24px -10px rgba(110,80,20,.55); animation: gsFloat 9s ease-in-out infinite;
}
.gs-gold.g1 { width: 44px; height: 41px; right: 12%; top: 14%; animation-delay: -3s; }
.gs-gold.g2 { width: 26px; height: 24px; left: 14%; top: 16%; animation-delay: -5s; }
@media (max-width: 900px) { .hero-photo { height: 400px; } }
@media (max-width: 480px) {
  .hero-photo { height: 360px; }
  .hp-chip { padding: 8px 12px 8px 8px; }
  .hp-chip span { width: 32px; height: 32px; font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) { .hp-chip, .gs-gold { animation: none; } }

/* Dashboard жолағы */
.h-dash {
  display: grid; grid-template-columns: 1.2fr 1.4fr .9fr; gap: 24px; align-items: center; margin-top: 8px;
  padding: 22px 26px; border-radius: 28px; color: #e2ecef;
  background: radial-gradient(400px 200px at 0% 100%, rgba(79,191,196,.25), transparent 60%), var(--navy);
  box-shadow: var(--shadow);
}
.hd-logo { display: block; font-weight: 700; margin-bottom: 12px; }
.hd-donut { display: flex; align-items: center; gap: 14px; }
.hd-donut svg { width: 76px; height: 76px; transform: rotate(-90deg); }
.hd-donut circle { fill: none; stroke-width: 6; }
.d-bg { stroke: rgba(255,255,255,.12); } .d-a { stroke: #4fbfc4; } .d-b { stroke: #e2b45a; }
.hd-mini { padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, #e2b45a, #c89235); color: #2a1d05; }
.hd-mini small { display: block; font-size: .72rem; opacity: .8; }
.hd-chart small, .hd-big small { font-size: .78rem; color: #9fb3bb; }
.hd-chart svg { width: 100%; height: 70px; margin-top: 8px; overflow: visible; }
.hd-line { fill: none; stroke: #4fbfc4; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.hd-chart circle { fill: #fff; }
.hd-years { display: flex; justify-content: space-between; font-size: .72rem; color: #9fb3bb; margin-top: 6px; }
.hd-big b { display: block; font-size: clamp(1.8rem, 3.6vw, 2.4rem); font-weight: 800; color: #fff; letter-spacing: -.02em; }
.hd-big .pill-mini { margin-top: 10px; }
@media (max-width: 900px) { .h-dash { grid-template-columns: 1fr; } }

.h-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.hs-card {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 4px 10px; padding: 20px 22px;
  border-radius: 24px; background: var(--teal-soft); transition: transform .25s, box-shadow .25s;
}
.hs-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.hs-card small { grid-column: 1 / -1; font-weight: 600; color: var(--muted); font-size: .85rem; }
.hs-card b { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.hs-card.dark { background: var(--teal); color: #fff; }
.hs-card.dark small { color: #b8d4d3; }
@media (max-width: 860px) { .h-stats { grid-template-columns: 1fr 1fr; } }

/* Бенто */
.h-bento { display: grid; grid-template-columns: 1fr 1.6fr 1.1fr; gap: 18px; margin-top: 56px; }
.bx { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: 28px; overflow: hidden; transition: transform .25s, box-shadow .25s; }
a.bx:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.bx h3 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.bx p { font-size: .92rem; opacity: .85; }
.bx-navy { background: var(--navy); color: #fff; }
.bx-navy .bx-ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; background: rgba(255,255,255,.1); }
.bx-navy .pill-mini { margin-top: auto; align-self: flex-start; }
.pill-mini.teal { background: #2a8a85; color: #fff; }
.bx-teal { background: linear-gradient(135deg, #5d7f86, #7f9aa0); color: #fff; }
.bx-teal:not(.bx-chart) { flex-direction: row; align-items: center; gap: 22px; }
.bx-avatar { flex-shrink: 0; width: 210px; height: 190px; padding: 12px 10px 0; border-radius: 24px; overflow: hidden; display: grid; place-items: end center; background: linear-gradient(160deg, #eef3f4, #c9dadb); box-shadow: inset 0 -20px 40px rgba(31,95,92,.15); }
/* Сурет қиылмай толық көрінеді */
.bx-avatar img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.bx-toggle { margin-top: 14px; display: inline-flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.5); font-size: .85rem; font-weight: 600; }
.bx-toggle i { width: 44px; height: 26px; border-radius: 999px; background: rgba(255,255,255,.25); position: relative; }
.bx-toggle i::after { content: ""; position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff6d6, #e2b45a 45%, #8a6422); }
.bx-stack { display: grid; gap: 18px; }
.bx-coral { background: var(--navy); color: #fff; }
.bx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bx-row > div { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.08); }
.bx-row small { display: block; font-size: .72rem; opacity: .75; }
.bx-row b { font-size: 1.05rem; }
.bx-row .bx-hl { background: var(--accent); }
.bx-tag { position: absolute; top: 12px; right: 14px; font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.15); }
.bx-coral .bx-row { margin-top: 18px; }
.bx-white { background: var(--surface); border: 1px solid var(--border); }
.bx-uni { display: flex; align-items: center; gap: 14px; }
.bx-uni-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: var(--teal-soft); }
.bx-uni b { display: block; font-size: 1.2rem; }
.bx-uni small { color: var(--muted); font-size: .8rem; }
.bx-logos { display: flex; align-items: center; }
.bx-logos img, .bx-logos span { width: 40px; height: 40px; border-radius: 50%; object-fit: contain; background: #fff; border: 2px solid var(--surface); margin-left: -8px; box-shadow: 0 4px 10px -4px rgba(20,34,64,.3); }
.bx-logos img:first-child { margin-left: 0; }
.bx-logos span { display: grid; place-items: center; font-size: .75rem; font-weight: 700; background: var(--navy); color: #fff; }
.bx-wide { grid-column: span 2; background: var(--surface-2); }
.bx-title { font-size: clamp(1.4rem, 3vw, 2rem) !important; }
.bx-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }
.bx-step { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 12px; border-radius: 22px; background: var(--surface); text-align: center; transition: transform .2s; }
.bx-step:hover { transform: translateY(-4px); }
.bx-step small { color: var(--muted); font-size: .78rem; font-weight: 600; }
.bx-step b { font-size: 1.3rem; }
.bx-step span { color: var(--muted); font-size: .85rem; }
.bx-step .pill-mini { margin-top: 10px; font-style: normal; background: var(--surface-2); border: 1px solid var(--border); }
.bx-step.on { background: var(--teal); color: #fff; }
.bx-step.on small, .bx-step.on span { color: #b8d4d3; }
.bx-step.on .pill-mini { background: var(--navy); color: #fff; border-color: transparent; }
.bx-chart { background: linear-gradient(160deg, #1f5f5c, #2c7a75); min-height: 420px; justify-content: flex-end; }
.bx-glassbars { position: absolute; top: 30px; left: 26px; right: 120px; height: 130px; display: flex; align-items: flex-end; gap: 10px; transform: skewY(-8deg); }
.bx-glassbars i { flex: 1; height: var(--h); border-radius: 8px; background: linear-gradient(180deg, #ff9a7e, #ef7b5f); box-shadow: 6px 6px 0 rgba(10,30,30,.35); }
.bx-score { position: absolute; top: 110px; right: 22px; padding: 14px 18px; border-radius: 20px; background: var(--accent); color: #fff; box-shadow: 0 16px 30px -14px rgba(239,123,95,.8); }
.bx-score small { display: block; font-size: .72rem; opacity: .9; }
.bx-score b { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.bx-score span { display: block; font-size: .72rem; opacity: .9; }
@media (max-width: 1000px) {
  .h-bento { grid-template-columns: 1fr 1fr; }
  .bx-wide { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .h-bento { grid-template-columns: 1fr; }
  .bx-teal:not(.bx-chart) { flex-direction: column; align-items: flex-start; }
  .bx-avatar { width: 100%; height: 190px; }
  .bx-steps { grid-template-columns: 1fr; }
}

/* ===== Nav dropdown ===== */
.nav-item { position: relative; }
.nav-item > a { display: inline-flex; align-items: center; gap: 4px; }
.caret { font-size: .7em; transition: transform .2s; }
.nav-item:hover .caret { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: 100%; left: 50%; padding-top: 10px;
  transform: translate(-50%, 8px); opacity: 0; visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
}
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.dropdown-inner {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 8px; min-width: 280px; display: grid; gap: 2px;
}
.nav .dropdown a { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 10px 12px; color: var(--text); }
.nav .dropdown a:hover { background: var(--surface-2); }
.nav .dropdown a.active { background: var(--surface-2); color: var(--primary); }
.dd-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.dropdown b { display: block; font-weight: 600; }
.dropdown small { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; }

@media (max-width: 1060px) {
  .nav { max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .caret { display: none; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; padding: 4px 0 0 14px; }
  /* Сенсорлы экранда басу :hover/:focus-within болып саналады — компьютердегі ортаға жылжытуды өшіреміз */
  .nav-item:hover .dropdown, .nav-item:focus-within .dropdown { transform: none; }
  .dropdown-inner { background: transparent; border: none; box-shadow: none; padding: 0; min-width: 0; }
}

/* ===== Профтест беті ===== */
.test-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.test-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: inherit; }
.test-meta span { padding: 5px 12px; border-radius: 999px; background: var(--surface-2); font-size: .85rem; color: var(--muted); }
.last-result { font-size: .9rem; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--text); }
.last-result:empty { display: none; }

/* ===== Профтест беті: hero, инфографика ===== */
.pt-grid-bg { position: relative; isolation: isolate; }
/* Жұмсақ «аврора» фоны: teal + coral жарық дақтары */
.pt-grid-bg::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(520px 260px at 12% 30%, color-mix(in srgb, var(--primary-2) 20%, transparent), transparent 70%),
    radial-gradient(460px 240px at 88% 70%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    radial-gradient(600px 300px at 50% 100%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 70%);
  -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent);
}
#test-cards { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 16px; }
#test-cards .card { padding: 22px; }
#test-cards .card p { font-size: .9rem; }
.pt-hero { padding: 28px 0 40px; }
.pt-hero-box {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 40px;
  border-radius: 32px; border: 1px solid var(--border); box-shadow: var(--shadow); position: relative; overflow: hidden;
  background:
    radial-gradient(420px 320px at 0% 0%, color-mix(in srgb, var(--primary-2) 22%, transparent), transparent 70%),
    radial-gradient(380px 300px at 100% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    linear-gradient(160deg, var(--surface), color-mix(in srgb, var(--teal-soft) 55%, var(--surface)));
}
.pt-hero-box::after {
  content: ""; position: absolute; width: 340px; height: 340px; right: -120px; top: -140px; border-radius: 50%; pointer-events: none;
  border: 2px solid color-mix(in srgb, var(--primary-2) 25%, transparent);
  box-shadow: 0 0 0 40px color-mix(in srgb, var(--primary-2) 6%, transparent), 0 0 0 80px color-mix(in srgb, var(--primary-2) 4%, transparent);
}
.pt-hero-box > * { position: relative; z-index: 1; }
.pt-hero .crumbs { color: var(--muted); font-size: .88rem; margin-bottom: 14px; }
.pt-hero .crumbs a:hover { color: var(--primary); }
.pill-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
}
.pill-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent); }
.pt-hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 900; line-height: 1.08; letter-spacing: -.025em; margin: 18px 0 14px; color: var(--text); }
:root[data-theme="dark"] .pt-hero h1, :root[data-theme="dark"] .pt-h2 { color: var(--text); }
.pt-hero .lead { color: var(--muted); font-size: 1.1rem; margin-bottom: 24px; max-width: 560px; }
.pt-get-title { font-size: clamp(1.3rem, 2.6vw, 1.8rem); font-weight: 800; margin: 30px 0 14px; letter-spacing: -.01em; }
.pt-get { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pt-get span { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: .9rem; }
.pt-get .ic { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: .95rem; }
.ic.g { background: color-mix(in srgb, #10b981 15%, var(--surface)); color: #059669; }
.ic.b { background: color-mix(in srgb, #6366f1 14%, var(--surface)); color: #4f46e5; }
.ic.p { background: color-mix(in srgb, #ec4899 13%, var(--surface)); }
.ic.y { background: color-mix(in srgb, #f59e0b 16%, var(--surface)); }
@media (max-width: 960px) { .pt-hero-box { grid-template-columns: 1fr; padding: 24px; } }
@media (max-width: 520px) { .pt-get { grid-template-columns: 1fr; } }

/* «Профиль картасы» — радар визуалы */
.pt-scan {
  position: relative; padding: 22px 22px 24px; border-radius: 30px; color: #e3eef0;
  background:
    radial-gradient(320px 240px at 50% 45%, rgba(79, 191, 196, .22), transparent 70%),
    radial-gradient(260px 200px at 100% 100%, rgba(239, 123, 95, .25), transparent 70%),
    var(--navy);
  box-shadow: 0 30px 60px -30px rgba(20, 34, 64, .8);
}
.ps-head { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; }
.ps-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; }
.ps-title img { width: auto; height: 26px; }
.ps-step { font-size: .8rem; color: #9fb5bc; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .07); }
.ps-step b { color: #4fbfc4; font-size: .95rem; }
.ps-radar { --R: 118px; position: relative; width: 300px; aspect-ratio: 1; margin: 14px auto 10px; }
.ps-rings { position: absolute; inset: 0; width: 100%; height: 100%; }
.ps-rings circle, .ps-rings line { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 1; }
.ps-rings circle:first-child { stroke: rgba(79, 191, 196, .35); stroke-dasharray: 3 6; }
.ps-sweep {
  position: absolute; inset: 10px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(79, 191, 196, .5), rgba(79, 191, 196, 0) 22%, transparent);
  animation: psSpin 4s linear infinite;
}
@keyframes psSpin { to { transform: rotate(360deg); } }
.ps-core {
  position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; translate: -50% -50%; border-radius: 50%;
  display: grid; place-content: center; text-align: center; color: #fff;
  background: radial-gradient(circle at 35% 30%, #4fbfc4, #1f7a75 70%);
  box-shadow: 0 0 0 8px rgba(79, 191, 196, .15), 0 0 40px rgba(79, 191, 196, .5);
}
.ps-core b { font-size: 1.1rem; line-height: 1; }
.ps-core small { font-size: .75rem; font-weight: 800; letter-spacing: .08em; opacity: .85; }
.ps-node {
  position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.35rem;
  transform: rotate(var(--a)) translateY(calc(var(--R) * -1)) rotate(calc(var(--a) * -1));
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
  transition: background .4s, box-shadow .4s, scale .4s;
}
.ps-node.on { background: #ef7b5f; border-color: transparent; scale: 1.18; box-shadow: 0 0 0 6px rgba(239, 123, 95, .25), 0 10px 24px -6px rgba(239, 123, 95, .8); }
.ps-blip { position: absolute; left: var(--x); top: var(--y); width: 8px; height: 8px; border-radius: 50%; background: #4fbfc4; animation: psBlip 4s ease-in-out infinite; }
.ps-blip.b2 { animation-delay: -1.3s; background: #e2b45a; }
.ps-blip.b3 { animation-delay: -2.6s; background: #ef7b5f; }
@keyframes psBlip { 0%, 100% { opacity: 0; scale: .4; } 15%, 40% { opacity: 1; scale: 1; box-shadow: 0 0 0 6px rgba(255, 255, 255, .08); } 70% { opacity: 0; } }
.ps-match {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px;
  background: #fff; color: var(--navy); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6);
}
.ps-match.swap { animation: psSwap .5s ease; }
@keyframes psSwap { from { opacity: 0; transform: translateY(8px); } }
.psm-ic { width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: #d9e7e7; }
.psm-body { flex: 1; min-width: 0; }
.psm-body small { display: block; font-size: .72rem; font-weight: 700; color: #5f6b7d; text-transform: uppercase; letter-spacing: .04em; }
.psm-body b { display: block; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psm-bar { height: 6px; border-radius: 99px; background: #eef3f4; margin-top: 6px; overflow: hidden; }
.psm-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1f7a75, #4fbfc4); transition: width .8s ease; }
.ps-match em { font-style: normal; font-weight: 800; font-size: 1.4rem; color: #1f7a75; }
.ps-chip {
  position: absolute; padding: 8px 14px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .6); animation: gsFloat 6s ease-in-out infinite;
}
.ps-chip.ca { left: -14px; top: 38%; background: #fff; color: var(--navy); }
.ps-chip.cb { right: -12px; top: 22%; background: #ef7b5f; color: #fff; animation-delay: -3s; }
@media (max-width: 520px) {
  .ps-radar { --R: 100px; width: 260px; }
  .ps-chip.ca { left: 6px; top: 64px; } .ps-chip.cb { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ps-sweep, .ps-blip, .ps-chip, .ps-match.swap { animation: none; } }

.pt-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pt-feature { padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); }
.pf-ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; font-size: 1.9rem; background: color-mix(in srgb, var(--primary) 12%, var(--surface)); margin-bottom: 18px; }
.pt-feature h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.pt-feature p { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .pt-features { grid-template-columns: 1fr; } }
.pt-h2 { font-size: clamp(1.8rem, 4.4vw, 3rem) !important; font-weight: 900 !important; letter-spacing: -.025em; line-height: 1.1; color: var(--text); }
.pt-card { background: color-mix(in srgb, var(--surface) 94%, transparent); }

.pt-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 24px; }
.pt-tabs button {
  font: inherit; font-weight: 600; cursor: pointer; padding: 10px 18px; border-radius: 999px;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); transition: all .2s;
}
.pt-tabs button:hover { border-color: var(--primary); }
.pt-tabs button.on { color: #fff; background: var(--navy); border-color: transparent; box-shadow: 0 10px 22px -12px rgba(20, 34, 64, .7); }
.iv-panel { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding: 32px; border-radius: 28px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); animation: qIn .35s ease; }
.iv-left h3 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 900; letter-spacing: -.02em; margin: 14px 0 10px; }
.iv-left > p { color: var(--muted); }
.iv-stats { display: grid; grid-template-columns: auto auto 1fr; gap: 12px; margin: 20px 0; }
.iv-stats div { padding: 12px 16px; border-radius: 14px; background: var(--surface-2); }
.iv-stats b { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.iv-stats b.sm { font-size: .95rem; padding-top: 4px; }
.iv-stats small { color: var(--muted); font-size: .78rem; }
.iv-steps { list-style: none; counter-reset: s; display: grid; gap: 10px; margin-bottom: 24px; }
.iv-steps li { counter-increment: s; display: flex; gap: 12px; align-items: center; font-weight: 500; }
.iv-steps li::before { content: counter(s); flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad); }
.iv-right { display: grid; place-items: center; padding: 16px; border-radius: 22px; min-height: 320px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 7%, var(--surface)), color-mix(in srgb, var(--primary-2) 7%, var(--surface))); }
.iv-svg { width: 100%; max-width: 340px; height: auto; }
.iv-line { stroke: var(--border); stroke-width: 2; stroke-dasharray: 4 4; }
.iv-core { fill: var(--primary); }
.iv-core-t { fill: #fff; font-weight: 800; font-size: 15px; }
.iv-lbl { fill: var(--text); font-size: 12px; font-weight: 700; }
.iv-hex { fill: var(--surface); stroke: var(--border); stroke-width: 2; }
.iv-hex.in { fill: none; stroke-dasharray: 4 4; }
.iv-area { fill: var(--primary); fill-opacity: .22; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; }
.iv-letter { fill: #fff; font-weight: 800; font-size: 15px; }
.iv-ring { fill: var(--surface); stroke: var(--border); stroke-width: 2; }
.iv-axis { stroke: var(--muted); stroke-width: 1.5; }
.iv-ax-t { fill: var(--muted); font-size: 11px; font-weight: 600; }
.iv-dich { width: 100%; max-width: 380px; display: grid; gap: 18px; }
.iv-dl { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 700; margin-bottom: 6px; }
.iv-dbar { height: 14px; border-radius: 99px; background: color-mix(in srgb, var(--primary-2) 30%, var(--surface-2)); overflow: hidden; }
.iv-dbar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.iv-eq { text-align: center; padding: 14px; border-radius: 16px; background: var(--surface); font-weight: 600; }
.iv-eq b { color: var(--primary); font-size: 1.2rem; }
.iv-eq span { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.iv-areas { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; width: 100%; max-width: 360px; }
.iv-areas span { aspect-ratio: 1; display: grid; place-items: center; font-size: 1.4rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); opacity: .55; }
.iv-areas span.on { opacity: 1; border-color: var(--success); background: color-mix(in srgb, var(--success) 14%, var(--surface)); transform: scale(1.06); }
.iv-cap { margin-top: 12px; text-align: center; font-size: .82rem; color: var(--muted); }
.iv-results { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.iv-res { display: flex; gap: 18px; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); transition: transform .2s, box-shadow .2s; }
.iv-res:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.iv-res-ic { flex-shrink: 0; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 2rem; background: var(--surface-2); }
.iv-res h4 { font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.iv-res p { color: var(--muted); font-size: .92rem; }
@media (max-width: 900px) { .iv-panel { grid-template-columns: 1fr; padding: 22px; } .iv-results { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .iv-stats { grid-template-columns: 1fr 1fr; } .iv-stats div:last-child { grid-column: 1 / -1; } .iv-res { padding: 16px; gap: 14px; } .iv-res-ic { width: 52px; height: 52px; font-size: 1.6rem; } }

.my-results { display: grid; gap: 12px; max-width: 900px; margin: 0 auto; }
.mr-progress { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.mr-progress span { white-space: nowrap; }
.mr-progress .bar { flex: 1; margin: 0; height: 10px; }
.mr-row { display: grid; grid-template-columns: 48px 1.2fr 1.3fr auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.mr-row.done { border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.mr-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--surface-2); }
.mr-main small { display: block; color: var(--muted); font-size: .82rem; }
.mr-sum { font-weight: 600; }
.mr-row:not(.done) .mr-sum { color: var(--muted); }
.mr-go { font-weight: 700; color: var(--primary); white-space: nowrap; }
.my-results-cta { text-align: center; margin-top: 24px; }
@media (max-width: 640px) {
  .mr-row { grid-template-columns: 44px 1fr auto; }
  .mr-sum { grid-column: 2 / -1; font-size: .9rem; }
}

/* ===== Тест ===== */
.test-page { padding: 32px 0 20px; }
.test-page .crumbs { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.test-page .crumbs a:hover { color: var(--primary); }
.test-wrap { max-width: 880px; margin: 0 auto; }
.test-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  padding: 32px; box-shadow: var(--shadow);
}
.test-intro { text-align: center; }
.test-intro .test-emoji { font-size: 3.5rem; margin-bottom: 8px; }
.test-intro h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; }
.test-intro .test-sub { color: var(--muted); margin: 8px auto 18px; max-width: 560px; }
.test-intro .test-meta { justify-content: center; margin-bottom: 22px; }
.test-instr {
  text-align: left; background: var(--surface-2); border-radius: 16px; padding: 16px 20px;
  margin-bottom: 26px; color: var(--text);
}

.q-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.q-back { background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; font-weight: 500; padding: 6px 0; }
.q-back:hover:not(:disabled) { color: var(--primary); }
.q-back:disabled { opacity: .35; cursor: default; }
.q-count { font-weight: 700; color: var(--primary); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 26px; }
.progress i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .4s; }
.q-tag { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--primary); background: var(--surface-2); padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; }
.q-text { font-size: clamp(1.2rem, 3vw, 1.55rem); line-height: 1.35; margin-bottom: 24px; }
.q-anim { animation: qIn .35s ease; }
@keyframes qIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.option {
  font: inherit; color: var(--text); text-align: left; cursor: pointer; padding: 0;
  background: var(--surface); border: 2px solid var(--border); border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
}
.option:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow); }
.option.selected { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.opt-img {
  aspect-ratio: 16 / 9; display: grid; place-items: center; font-size: clamp(3.2rem, 8vw, 4.6rem);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, var(--surface)), color-mix(in srgb, var(--primary-2) 10%, var(--surface)));
}
.opt-img.opt-1 { background: linear-gradient(135deg, color-mix(in srgb, var(--primary-2) 20%, var(--surface)), color-mix(in srgb, var(--accent) 10%, var(--surface))); }
.opt-img img { width: 100%; height: 100%; object-fit: cover; }
.opt-body { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; font-weight: 500; }
.opt-letter {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 700; font-size: .9rem;
}
.options.compact .opt-img { aspect-ratio: auto; padding: 14px; font-size: 2.4rem; }
.options.compact .opt-body { justify-content: center; font-size: 1.15rem; font-weight: 600; }
.q-emoji {
  width: 96px; height: 96px; margin-bottom: 14px; border-radius: 26px; display: grid; place-items: center; font-size: 3.2rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, var(--surface)), color-mix(in srgb, var(--primary-2) 12%, var(--surface)));
}
.options.scale { grid-template-columns: repeat(5, 1fr); gap: 10px; }
.options.scale .opt-img { padding: 12px 6px; font-size: 2rem; }
.options.scale .opt-body { padding: 12px 8px; font-size: .9rem; text-align: center; line-height: 1.3; }
@media (max-width: 700px) {
  .options.scale { grid-template-columns: 1fr; }
  .options.scale .option { flex-direction: row; align-items: center; }
  .options.scale .opt-img { padding: 8px 14px; font-size: 1.6rem; }
  .options.scale .opt-body { justify-content: flex-start; text-align: left; font-size: 1rem; }
}
.go-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.go-chips a { padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 500; background: color-mix(in srgb, var(--primary) 10%, var(--surface)); border: 1px solid transparent; transition: border-color .2s; }
.go-chips a:hover { border-color: var(--primary); color: var(--primary); }
.lvl { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 8px; }
.lvl.high { background: color-mix(in srgb, var(--success) 16%, var(--surface)); color: #047857; }
.lvl.mid { background: color-mix(in srgb, #3b82f6 14%, var(--surface)); color: #1d4ed8; }
.lvl.low { background: color-mix(in srgb, #f59e0b 16%, var(--surface)); color: #b45309; }
.lvl.none { background: var(--surface-2); color: var(--muted); }
:root[data-theme="dark"] .lvl.high { color: #6ee7b7; }
:root[data-theme="dark"] .lvl.mid { color: #93c5fd; }
:root[data-theme="dark"] .lvl.low { color: #fcd34d; }
.q-hint { margin-top: 18px; font-size: .82rem; color: var(--muted); text-align: center; }
@media (max-width: 600px) {
  .test-card { padding: 22px 18px; }
  .options:not(.compact) { grid-template-columns: 1fr; }
  .options:not(.compact) .opt-img { aspect-ratio: 21 / 9; }
}

/* ===== Нәтиже ===== */
.result { display: grid; gap: 20px; animation: qIn .4s ease; }
.result-hero {
  background: var(--grad); color: #fff; border-radius: 24px; padding: 36px 28px; text-align: center;
}
.result-hero .rh-emoji { font-size: 3.2rem; }
.result-hero small { opacity: .85; font-size: .95rem; }
.result-hero h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); line-height: 1.2; margin: 6px 0; }
.result-hero p { opacity: .92; }
.rh-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.rh-chips span { background: rgba(255, 255, 255, .18); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.result .test-card h3 { font-size: 1.1rem; margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; margin-top: 12px; }

.bar-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; }
.bar-row .bl { font-size: .92rem; white-space: nowrap; }
@media (max-width: 600px) {
  .bar-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .bar-row .bl { grid-column: 1 / -1; }
}
.bar-row .bar { margin: 0; height: 10px; }
.bar-row b { min-width: 52px; text-align: right; font-size: .92rem; }
.bar-row b small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.bar-row.top .bl { font-weight: 700; }
.bar-row:not(.top) .bar i { opacity: .55; }

.split { margin-bottom: 16px; }
.split-labels { display: flex; justify-content: space-between; font-size: .92rem; margin-bottom: 6px; }
.split-labels .win { font-weight: 700; color: var(--primary); }
.split-bar { height: 12px; border-radius: 99px; background: color-mix(in srgb, var(--primary-2) 35%, var(--surface-2)); overflow: hidden; }
.split-bar i { display: block; height: 100%; background: var(--primary); }

.type-card .tc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.type-card .tc-head .card-icon { flex-shrink: 0; }
.type-card .tc-head h3 { margin: 0 !important; }
.type-card .tc-head small { color: var(--muted); display: block; }
.type-card p { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips span { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: .85rem; font-weight: 500; }
.chips-title { margin-top: 16px; font-weight: 600; font-size: .9rem; }

.warn { border-radius: 16px; padding: 14px 18px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-row .stat { padding: 16px; }
.stat-row .stat b { font-size: 1.6rem; }
.stat-row .stat small { display: block; color: var(--muted); font-size: .8rem; }
@media (max-width: 600px) { .stat-row { grid-template-columns: 1fr; } }

.result-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* SVG диаграммалар */
.chart { width: 100%; height: auto; display: block; max-width: 440px; margin: 0 auto; }
.ch-grid { fill: none; stroke: var(--border); stroke-width: 1; }
.ch-area { fill: var(--primary); fill-opacity: .25; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; }
.ch-dot { fill: var(--primary); stroke: var(--surface); stroke-width: 2; }
.ch-label { fill: var(--text); font-size: 13px; font-weight: 600; font-family: inherit; }
.ch-value { fill: var(--muted); font-size: 12px; font-family: inherit; }
.ch-quad { fill: var(--surface-2); }
.ch-quad.on { fill: color-mix(in srgb, var(--primary) 22%, var(--surface)); }
.ch-axis { stroke: var(--muted); stroke-width: 1.5; }
.ch-point { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }

/* ===== ҰБТ беті ===== */
.subnav {
  position: sticky; top: var(--header-h); z-index: 40;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.subnav .container { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.subnav .container::-webkit-scrollbar { display: none; }
.subnav a {
  flex-shrink: 0; padding: 7px 14px; border-radius: 999px; font-size: .88rem; font-weight: 500;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border); transition: all .2s;
}
.subnav a:hover, .subnav a.active { color: #fff; background: var(--grad); border-color: transparent; }
.ubt section[id] { scroll-margin-top: calc(var(--header-h) + 64px); }
.ubt .section { padding: 56px 0; }
.ubt .section.alt { background: var(--surface-2); }
.sec-title { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.sec-title .num {
  font-size: clamp(3rem, 8vw, 4.6rem); font-weight: 800; line-height: .9;
  background: linear-gradient(135deg, #f59e0b, #d97706); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sec-title h2 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.sec-title p { color: var(--muted); font-size: .95rem; letter-spacing: .04em; margin-top: 4px; }
.sec-title .gold { color: var(--accent); }

.ubt-hero-points { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 36px; }
.ubt-hero-points div { display: flex; gap: 12px; align-items: center; }
.ubt-hero-points .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; font-size: 1.3rem; }
.ubt-hero-points b { display: block; font-size: .95rem; }
.ubt-hero-points small { color: var(--muted); }
.hero-visual {
  border-radius: 28px; padding: 36px; background: var(--grad); color: #fff; box-shadow: var(--shadow);
  display: grid; gap: 14px; position: relative; overflow: hidden;
}
.hero-visual::after { content: "🎓"; position: absolute; right: -10px; bottom: -30px; font-size: 9rem; opacity: .18; }
.hero-visual .hv-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-radius: 16px; background: rgba(255,255,255,.14); }
.hero-visual .hv-row b { font-size: 1.5rem; }

.big-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.big-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 28px 18px; text-align: center; transition: transform .25s, box-shadow .25s; }
.big-stat:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.big-stat .em { font-size: 2.6rem; }
.big-stat b { display: block; font-size: clamp(2.4rem, 6vw, 3.4rem); font-weight: 800; line-height: 1.1; margin: 8px 0 4px; }
.big-stat:nth-child(odd) b { color: var(--primary); }
.big-stat:nth-child(even) b { color: var(--accent); }
.big-stat span { font-weight: 600; text-transform: uppercase; font-size: .85rem; letter-spacing: .04em; color: var(--muted); }
@media (max-width: 760px) { .big-stats { grid-template-columns: repeat(2, 1fr); } }

.subj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.subj { border-radius: 24px; padding: 30px 24px; text-align: center; border: 1px solid var(--border); background: var(--surface); }
.subj .ring {
  width: 104px; height: 104px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; align-content: center;
  border: 5px solid var(--primary); background: var(--surface);
}
.subj:nth-child(2) .ring { border-color: var(--accent); }
.subj .ring b { font-size: 2rem; line-height: 1; }
.subj .ring small { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.subj .em { font-size: 3.2rem; margin-bottom: 8px; }
.subj h3 { font-size: 1.15rem; }
.total-note { margin-top: 18px; text-align: center; color: var(--muted); }
.total-note b { color: var(--text); }
@media (max-width: 760px) { .subj-grid { grid-template-columns: 1fr; } }

.task-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.task { border-radius: 22px; padding: 26px 20px; text-align: center; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.task .em { font-size: 2.6rem; }
.task .cnt { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: #fff; background: var(--navy); }
.task:nth-child(even) .cnt { background: var(--accent); }
.task h4 { font-size: 1.02rem; flex: 1; }
.task .pts { font-weight: 800; padding-top: 10px; border-top: 3px solid var(--accent); }
@media (max-width: 900px) { .task-grid { grid-template-columns: repeat(2, 1fr); } }

.combo-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.combo-table th { background: var(--navy); color: #fff; padding: 14px 16px; text-align: left; font-size: .9rem; text-transform: uppercase; letter-spacing: .03em; }
.combo-table td { padding: 13px 16px; border-top: 1px solid var(--border); }
.combo-table tr:nth-child(even) td { background: var(--surface-2); }
.combo-table td:first-child, .combo-table th:first-child { text-align: center; width: 56px; font-weight: 700; }
.combo-table .ic { margin-right: 10px; }
.combo-table tbody tr:hover td { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
@media (max-width: 600px) { .combo-table th, .combo-table td { padding: 10px 8px; font-size: .85rem; } .combo-table .ic { display: none; } }

.thr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.thr { border-radius: 24px; padding: 24px; border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.thr-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.thr-head .em { font-size: 2.4rem; }
.thr-head h3 { flex: 1; font-size: 1.2rem; }
.thr-badge { border-radius: 16px; padding: 10px 18px; text-align: center; color: #fff; background: var(--navy); }
.thr.gold .thr-badge { background: var(--accent); }
.thr-badge b { display: block; font-size: 2rem; line-height: 1; }
.thr-badge small { font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.thr-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); }
.thr-row span:nth-child(2) { flex: 1; }
.thr-row b { min-width: 52px; text-align: center; padding: 4px 10px; border-radius: 10px; background: var(--surface); }
.thr-note { margin-top: auto; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--border); font-size: .9rem; color: var(--muted); }
@media (max-width: 760px) { .thr-grid { grid-template-columns: 1fr; } }

.growth { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; }
.g-row { display: grid; grid-template-columns: 70px 1fr 110px; gap: 14px; align-items: center; padding: 10px 0; }
.g-year { font-weight: 700; background: var(--navy); color: #fff; border-radius: 10px; padding: 6px 0; text-align: center; }
.g-bar { height: 26px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.g-bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #10b981, #34d399); }
.g-row b { font-size: 1.15rem; }
.g-row b small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.g-side { display: grid; gap: 16px; }
.g-side .card { padding: 22px; }
@media (max-width: 860px) { .growth { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .g-row { grid-template-columns: 58px 1fr 90px; gap: 8px; } }

.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: center; margin-bottom: 28px; }
.flow-step { text-align: center; }
.flow-step .em { width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 2.8rem; background: var(--surface); border: 1px solid var(--border); }
.flow-step b { display: block; text-transform: uppercase; letter-spacing: .03em; }
.flow-step small { color: var(--muted); }
.flow-arrow { font-size: 1.6rem; color: var(--muted); }
.res-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.res-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: transform .2s, border-color .2s; }
.res-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.res-card .em { font-size: 2.2rem; }
.res-card b { font-size: .9rem; flex: 1; }
.res-card .go { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; color: var(--primary); }
@media (max-width: 1000px) { .res-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) {
  .res-cards { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); text-align: center; }
}

.dates-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; }
.date-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.date-card { border-radius: 22px; padding: 22px; text-align: center; background: var(--surface); border: 1px solid var(--border); }
.date-card .em { font-size: 2.4rem; }
.date-card h4 { margin: 6px 0 12px; }
.date-card .dt { border-radius: 16px; padding: 18px 10px; color: #fff; background: var(--navy); font-weight: 800; font-size: 1.35rem; line-height: 1.3; }
.date-card.gold .dt { background: var(--accent); }
.who-list { display: grid; gap: 10px; }
.who { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); font-weight: 500; }
.who .em { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 1.3rem; }
@media (max-width: 860px) { .dates-grid { grid-template-columns: 1fr; } }

.stages { display: grid; gap: 12px; }
.stage { display: grid; grid-template-columns: 52px 1fr 30px 1fr 1.1fr; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.stage .no { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; }
.stage:nth-child(1) .no { background: #dbeafe; color: #1e40af; }
.stage:nth-child(2) .no { background: #fef3c7; color: #92400e; }
.stage:nth-child(3) .no { background: #d1fae5; color: #065f46; }
.stage:nth-child(4) .no { background: #fee2e2; color: #991b1b; }
.stage .lbl { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.stage .val { font-weight: 700; }
.stage .arr { color: var(--muted); font-size: 1.3rem; text-align: center; }
.stage .tag { font-size: .85rem; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.stage.is-grant { border: 2px solid var(--success); }
.stage.is-grant .tag { background: color-mix(in srgb, var(--success) 15%, var(--surface)); font-weight: 600; }
@media (max-width: 760px) {
  .stage { grid-template-columns: 44px 1fr 1fr; }
  .stage .arr { display: none; }
  .stage .tag { grid-column: 1 / -1; }
}

.pay-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.pay { border-radius: 24px; padding: 26px; border: 1px solid var(--border); background: var(--surface); }
.pay .pay-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pay .no { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--navy); }
.pay:nth-child(2) .no { background: var(--accent); }
.pay small { color: var(--muted); display: block; }
.pay .em { font-size: 4rem; text-align: center; padding: 14px 0; }
.price { background: var(--grad); color: #fff; border: none; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.price b { font-size: clamp(2.8rem, 7vw, 3.8rem); line-height: 1.1; }
.price span { opacity: .9; }
@media (max-width: 860px) { .pay-grid { grid-template-columns: 1fr; } }

.grant-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grant {
  position: relative; border-radius: 22px; padding: 22px; min-height: 230px; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--border); background: var(--g-bg, var(--surface));
}
.grant .gno { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--g-c, var(--primary)); }
.grant h3 { font-size: 1.02rem; text-transform: uppercase; line-height: 1.25; }
.grant .gsub { font-size: .82rem; color: var(--muted); }
.grant .gnum { margin-top: auto; font-size: clamp(2rem, 4.5vw, 2.6rem); font-weight: 800; line-height: 1; color: var(--g-c, var(--primary)); }
.grant .gnum small { display: block; font-size: .95rem; font-weight: 600; margin-top: 4px; }
.grant .gem { position: absolute; right: 14px; bottom: 10px; font-size: 3.4rem; opacity: .9; }
.grant p { font-size: .88rem; color: var(--muted); }
@media (max-width: 1000px) { .grant-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grant-grid { grid-template-columns: 1fr; } }
.g1 { --g-c: #b45309; --g-bg: color-mix(in srgb, #3b82f6 10%, var(--surface)); }
.g2 { --g-c: #15803d; --g-bg: color-mix(in srgb, #22c55e 10%, var(--surface)); }
.g3 { --g-c: #1d4ed8; --g-bg: color-mix(in srgb, #60a5fa 12%, var(--surface)); }
.g4 { --g-c: #b45309; --g-bg: color-mix(in srgb, #f59e0b 12%, var(--surface)); }
.g5 { --g-c: #9f1239; --g-bg: color-mix(in srgb, #f43f5e 10%, var(--surface)); }
.g6 { --g-c: #6d28d9; --g-bg: color-mix(in srgb, #8b5cf6 10%, var(--surface)); }
.g7 { --g-c: #1e3a8a; --g-bg: color-mix(in srgb, #64748b 10%, var(--surface)); }
.g8 { --g-c: #be123c; --g-bg: color-mix(in srgb, #ec4899 10%, var(--surface)); }
:root[data-theme="dark"] .g1, :root[data-theme="dark"] .g4 { --g-c: #fbbf24; }
:root[data-theme="dark"] .g2 { --g-c: #4ade80; }
:root[data-theme="dark"] .g3, :root[data-theme="dark"] .g7 { --g-c: #93c5fd; }
:root[data-theme="dark"] .g5, :root[data-theme="dark"] .g8 { --g-c: #fb7185; }
:root[data-theme="dark"] .g6 { --g-c: #c4b5fd; }

.grant-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 28px; }
.gd { display: flex; gap: 16px; padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.gd .em { font-size: 2.4rem; flex-shrink: 0; }
.gd h4 { font-size: 1.05rem; margin-bottom: 4px; }
.gd p { color: var(--muted); font-size: .92rem; }
.gd .pill { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; background: var(--surface-2); }

/* ===== Мамандықтар беті ===== */
.spec-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.spec-stats div { padding: 12px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: baseline; gap: 8px; }
.spec-stats b { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.spec-stats span { color: var(--muted); font-size: .9rem; }

.spec-toolbar { display: grid; grid-template-columns: 2fr 1.3fr 1.2fr 1fr; gap: 12px; }
.spec-toolbar .search { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.spec-toolbar input, .spec-toolbar select {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 13px 14px; width: 100%; min-width: 0;
}
.spec-toolbar .search input { border: none; padding: 13px 0; outline: none; background: transparent; }
.spec-toolbar .search:focus-within, .spec-toolbar select:focus { border-color: var(--primary); outline: none; }
@media (max-width: 900px) { .spec-toolbar { grid-template-columns: 1fr 1fr; } .spec-toolbar .search { grid-column: 1 / -1; } }
@media (max-width: 520px) { .spec-toolbar { grid-template-columns: 1fr; } }

.spec-sub { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 16px 0; color: var(--muted); font-size: .92rem; }
.spec-sub b { color: var(--text); }
.match-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 7px 14px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--text); font-weight: 500; }
.match-toggle input { accent-color: var(--primary); width: 16px; height: 16px; }
.match-toggle small { color: var(--muted); font-weight: 400; }
.match-hint { color: var(--primary); font-weight: 500; }
.link-btn { margin-left: auto; background: none; border: none; color: var(--primary); font: inherit; cursor: pointer; font-weight: 500; }

.spec-table { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.spec-head, .spec-row { display: grid; grid-template-columns: 82px minmax(220px, 2.3fr) 1.4fr 1.5fr 1.25fr; gap: 16px; align-items: center; padding: 14px 20px; }
.spec-head { background: var(--navy); color: #fff; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.spec-row {
  width: 100%; font: inherit; color: var(--text); text-align: left; background: var(--surface);
  border: none; border-top: 1px solid var(--border); cursor: pointer; transition: background .15s;
}
.spec-row:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); }
.spec-row:hover { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.spec-row:hover .sr-name b { color: var(--primary); }
.sr-code { font-weight: 800; font-size: .88rem; padding: 6px 0; text-align: center; border-radius: 10px; background: var(--surface-2); color: var(--primary); }
.sr-name { display: flex; align-items: center; gap: 12px; }
.sr-emoji { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; background: var(--surface-2); }
.sr-name b { font-weight: 600; line-height: 1.3; transition: color .15s; }
.match-badge { display: block; margin-top: 4px; font-size: .75rem; font-weight: 600; color: #b45309; }
:root[data-theme="dark"] .match-badge { color: #fbbf24; }
.sr-subj { display: flex; flex-wrap: wrap; gap: 4px; }
.subj-chip { font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--primary-2) 14%, var(--surface)); white-space: nowrap; }
.sr-salary b { display: block; font-size: .9rem; font-weight: 700; white-space: nowrap; }
.sal-bar { position: relative; display: block; height: 6px; border-radius: 99px; background: var(--surface-2); margin-top: 6px; }
.sal-bar i { position: absolute; top: 0; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #10b981, #34d399); min-width: 6px; }
.demand { display: inline-block; font-size: .8rem; font-weight: 600; padding: 5px 10px; border-radius: 10px; line-height: 1.3; }
.d-hot { background: color-mix(in srgb, #ef4444 14%, var(--surface)); color: #b91c1c; }
.d-up { background: color-mix(in srgb, #10b981 15%, var(--surface)); color: #047857; }
.d-stable { background: color-mix(in srgb, #3b82f6 13%, var(--surface)); color: #1d4ed8; }
.d-comp { background: color-mix(in srgb, #8b5cf6 14%, var(--surface)); color: #6d28d9; }
.d-low { background: var(--surface-2); color: var(--muted); }
.d-mid { background: color-mix(in srgb, #f59e0b 16%, var(--surface)); color: #b45309; }
:root[data-theme="dark"] .d-hot { color: #fca5a5; }
:root[data-theme="dark"] .d-up { color: #6ee7b7; }
:root[data-theme="dark"] .d-stable { color: #93c5fd; }
:root[data-theme="dark"] .d-comp { color: #c4b5fd; }
:root[data-theme="dark"] .d-mid { color: #fcd34d; }
.spec-table .placeholder { border: none; border-radius: 0; }

@media (max-width: 960px) {
  .spec-head { display: none; }
  .spec-row {
    grid-template-columns: 1fr auto; grid-template-areas: "name code" "subj subj" "salary demand"; gap: 10px; padding: 16px;
  }
  .sr-code { grid-area: code; padding: 4px 10px; align-self: start; }
  .sr-name { grid-area: name; }
  .sr-subj { grid-area: subj; }
  .sr-salary { grid-area: salary; }
  .sr-demand { grid-area: demand; justify-self: end; text-align: right; }
}

/* Модаль */
.spec-modal {
  width: min(900px, calc(100% - 24px)); max-height: calc(100vh - 32px); margin: auto; padding: 0;
  border: none; border-radius: 26px; background: var(--surface); color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); overflow: hidden;
}
.spec-modal[open] { display: flex; flex-direction: column; animation: smIn .25s ease; }
.spec-modal::backdrop { background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px); }
@keyframes smIn { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
.sm-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.sm-bar #sm-pos { font-size: .85rem; color: var(--muted); }
.sm-bar .icon-btn:disabled { opacity: .35; cursor: default; }
.sm-close { margin-left: auto; }
.sm-scroll { overflow-y: auto; }
.sm-head { display: flex; align-items: center; gap: 18px; padding: 28px; background: var(--grad); color: #fff; }
.sm-emoji { width: 72px; height: 72px; flex-shrink: 0; border-radius: 20px; display: grid; place-items: center; font-size: 2.4rem; background: rgba(255, 255, 255, .2); }
.sm-code { display: inline-block; font-weight: 800; font-size: .85rem; padding: 3px 10px; border-radius: 8px; background: rgba(255, 255, 255, .22); }
.sm-head h2 { font-size: clamp(1.3rem, 3.5vw, 1.8rem); line-height: 1.2; margin-top: 6px; }
.sm-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border); }
.sm-facts div { padding: 16px 22px; display: grid; gap: 4px; }
.sm-facts div + div { border-left: 1px solid var(--border); }
.sm-facts small { color: var(--muted); font-size: .8rem; }
.sm-body { padding: 24px 28px 30px; }
.sm-body h3 { font-size: 1.05rem; margin: 22px 0 12px; }
.sm-body h3:first-child { margin-top: 0; }
.psy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.psy { border-radius: 16px; padding: 14px; background: var(--surface-2); border: 1.5px solid transparent; }
.psy.hit { border-color: var(--success); background: color-mix(in srgb, var(--success) 10%, var(--surface)); }
.psy-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.psy-top span { font-size: 1.3rem; }
.psy-top small { font-size: .75rem; color: var(--muted); font-weight: 600; line-height: 1.2; }
.psy-val { font-weight: 700; font-size: .95rem; }
.psy-hit { margin-top: 8px; font-size: .75rem; font-weight: 700; color: var(--success); }
.h-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.h-chip { font-size: .78rem; font-weight: 500; padding: 3px 8px; border-radius: 8px; background: var(--surface); }
.h-chip b { color: var(--primary); }
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.chips.hard span { background: color-mix(in srgb, var(--primary) 12%, var(--surface)); }
.chips.soft span { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.skills-grid .chips { margin-top: 0; }
.sm-desc { color: var(--text); line-height: 1.7; }
.pros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.pro { border-radius: 16px; padding: 14px 16px; }
.pro p { margin-top: 6px; color: var(--muted); font-size: .92rem; }
.pro.good { background: color-mix(in srgb, #10b981 12%, var(--surface)); }
.pro.bad { background: color-mix(in srgb, #f59e0b 14%, var(--surface)); }
.pro.grow { background: color-mix(in srgb, #6366f1 12%, var(--surface)); }
@media (max-width: 760px) {
  .psy-grid { grid-template-columns: 1fr 1fr; }
  .skills-grid, .pros, .sm-facts { grid-template-columns: 1fr; }
  .sm-facts div + div { border-left: none; border-top: 1px solid var(--border); }
  .sm-head, .sm-body { padding: 20px; }
}

/* ===== ЖОО-лар беті ===== */
.uni-toolbar, .ud-toolbar { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.uni-toolbar .search, .ud-toolbar .search { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.uni-toolbar input, .uni-toolbar select, .ud-toolbar input, .ud-toolbar select {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 13px 14px; width: 100%; min-width: 0;
}
.uni-toolbar .search input, .ud-toolbar .search input { border: none; padding: 13px 0; outline: none; background: transparent; }
.uni-toolbar .search:focus-within, .ud-toolbar .search:focus-within, .uni-toolbar select:focus, .ud-toolbar select:focus, .ud-toolbar input:focus { border-color: var(--primary); outline: none; }
@media (max-width: 760px) { .uni-toolbar, .ud-toolbar { grid-template-columns: 1fr; } }

.uni-logo {
  width: 72px; height: 72px; flex-shrink: 0; border-radius: 20px; display: grid; place-items: center; align-content: center; gap: 2px;
  background: color-mix(in srgb, var(--uc) 12%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--uc) 35%, transparent);
}
.uni-logo .ul-emoji { font-size: 1.5rem; line-height: 1; }
.uni-logo b { font-size: .7rem; font-weight: 800; color: var(--uc); letter-spacing: .02em; }
:root[data-theme="dark"] .uni-logo b { color: color-mix(in srgb, var(--uc) 45%, #fff); }
.uni-logo.img { background: #fff; padding: 6px; overflow: hidden; }
.uni-logo.img img { width: 100%; height: 100%; object-fit: contain; }
.uni-logo.img .ul-emoji, .uni-logo.img b { display: none; }
.u-count { margin: -8px 0 16px; font-size: .92rem; }
.u-count b { color: var(--text); }
.p-joint { display: block; font-size: .68rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
.uni-logo.big { width: 110px; height: 110px; border-radius: 28px; }
.uni-logo.big .ul-emoji { font-size: 2.4rem; }
.uni-logo.big b { font-size: .9rem; }

.uni-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
@media (max-width: 400px) { .uni-grid { grid-template-columns: 1fr; } }
.uni-card {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--border); overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.uni-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--uc); }
.uni-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--uc); }
.uc-top { display: flex; gap: 16px; align-items: center; }
.uc-top h3 { font-size: 1.08rem; line-height: 1.3; }
.uc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.uc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-tags span { font-size: .8rem; padding: 5px 10px; border-radius: 10px; background: var(--surface-2); }
.uc-tags span.off { opacity: .55; }
.uc-foot { margin-top: auto; display: flex; align-items: center; gap: 22px; padding-top: 14px; border-top: 1px solid var(--border); }
.uc-foot b { display: block; font-size: 1.3rem; font-weight: 800; color: var(--uc); }
:root[data-theme="dark"] .uc-foot b { color: color-mix(in srgb, var(--uc) 45%, #fff); }
.uc-foot small { color: var(--muted); font-size: .78rem; }
.uc-go { margin-left: auto; font-weight: 600; color: var(--primary); }

.uni-detail { padding-top: 28px; }
.uni-detail .crumbs { color: var(--muted); font-size: .9rem; }
.uni-detail .crumbs a:hover { color: var(--primary); }
.back-link { display: inline-block; margin: 12px 0 18px; font-weight: 600; color: var(--primary); }
.ud-head {
  display: flex; align-items: center; gap: 26px; padding: 32px; border-radius: 28px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--uc) 10%, var(--surface)), var(--surface));
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.ud-head h1 { font-size: clamp(1.4rem, 3.6vw, 2.2rem); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
@media (max-width: 600px) { .ud-head { flex-direction: column; align-items: flex-start; padding: 22px; } }
.ud-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.ud-tile { padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); display: grid; gap: 6px; }
.ud-tile small { color: var(--muted); }
.ud-tile b { font-weight: 700; word-break: break-word; }
.ud-tile a { color: var(--primary); }
.yn { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .9rem; }
.yn.yes { background: color-mix(in srgb, var(--success) 15%, var(--surface)); color: #047857; }
.yn.no { background: color-mix(in srgb, #ef4444 13%, var(--surface)); color: #b91c1c; }
:root[data-theme="dark"] .yn.yes { color: #6ee7b7; }
:root[data-theme="dark"] .yn.no { color: #fca5a5; }
@media (max-width: 760px) { .ud-tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .ud-tiles { grid-template-columns: 1fr; } }
.ud-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 30px; }
.ud-stats div { padding: 18px; border-radius: 18px; text-align: center; background: var(--grad); color: #fff; }
.ud-stats b { display: block; font-size: 1.9rem; font-weight: 800; }
.ud-stats span { font-size: .85rem; opacity: .9; }
@media (max-width: 560px) { .ud-stats b { font-size: 1.4rem; } .ud-stats span { font-size: .72rem; } }

.ud-programs { padding: 28px; border-radius: 28px; background: var(--surface); border: 1px solid var(--border); }
.ud-programs h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 800; margin-bottom: 18px; }
.my-score { display: flex; align-items: center; gap: 10px; padding: 0 0 0 14px; border-radius: 14px; border: 1px solid var(--border); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.my-score span { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.ud-toolbar .my-score input { border: none; border-radius: 0 14px 14px 0; background: var(--surface); }
.p-head, .p-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 18px; align-items: center; }
.p-head { padding: 0 22px 10px; font-size: .78rem; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }
.p-head span:last-child { text-align: right; }
.p-head small { display: block; text-transform: none; font-weight: 500; }
.p-row { padding: 16px 22px; margin-bottom: 10px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); transition: border-color .2s, transform .2s, box-shadow .2s; }
.p-row.link:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.p-row.link:hover .p-name b { color: var(--primary); }
.p-code { font-weight: 800; color: var(--primary); text-align: center; }
.p-name b { display: block; font-weight: 600; line-height: 1.35; transition: color .2s; }
.p-subj { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.p-subj span { font-size: .8rem; padding: 3px 10px; border-radius: 8px; color: #15803d; background: color-mix(in srgb, #22c55e 12%, var(--surface)); }
:root[data-theme="dark"] .p-subj span { color: #86efac; }
.p-score { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.p-score b { min-width: 46px; text-align: center; font-size: 1.25rem; font-weight: 800; color: #15803d; }
:root[data-theme="dark"] .p-score b { color: #4ade80; }
.p-state { font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.p-state.ok { background: color-mix(in srgb, var(--success) 15%, var(--surface)); color: #047857; }
.p-state.bad { background: color-mix(in srgb, #ef4444 13%, var(--surface)); color: #b91c1c; }
@media (max-width: 600px) {
  .ud-programs { padding: 18px 14px; }
  .p-head { display: none; }
  .p-row { grid-template-columns: 1fr auto; grid-template-areas: "code score" "name name"; gap: 8px; padding: 14px; }
  .p-code { grid-area: code; text-align: left; }
  .p-score { grid-area: score; }
  .p-name { grid-area: name; }
}

/* ===== Грант калькуляторы (ҰБТ беті) ===== */
.gc-wrap { max-width: 760px; }
.gc-card {
  display: grid; gap: 0; padding: 8px 32px 32px; border-radius: 28px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.gc-block { padding: 26px 0; border-bottom: 1px solid var(--border); }
.gc-h { font-size: clamp(1.3rem, 3vw, 1.6rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 16px; }
.gc-sub { color: var(--muted); margin: -8px 0 8px; }
.gc-field { border: none; margin: 0 0 18px; padding: 0; min-width: 0; }
.gc-label { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; padding: 0; }
.gc-quota { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.gc-opt { position: relative; cursor: pointer; }
.gc-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.gc-opt-body {
  display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px 16px 14px 44px; border-radius: 18px;
  border: 2px solid var(--border); background: var(--surface); position: relative; transition: border-color .2s, background .2s;
}
.gc-opt-body::before {
  content: ""; box-sizing: border-box; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface); transition: border .2s;
}
.gc-opt-body b { font-weight: 700; }
.gc-opt-body small { color: var(--muted); font-size: .82rem; line-height: 1.3; }
.gc-opt:hover .gc-opt-body { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.gc-opt input:checked + .gc-opt-body { border-color: var(--primary); background: var(--teal-soft); }
.gc-opt input:checked + .gc-opt-body::before { border: 6px solid var(--primary); }
.gc-opt input:focus-visible + .gc-opt-body { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }

.gc-select { position: relative; }
.gc-select::after { content: "▾"; position: absolute; right: 18px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.gc-select select {
  width: 100%; appearance: none; -webkit-appearance: none; font: inherit; font-weight: 600; color: var(--text); cursor: pointer;
  padding: 14px 44px 14px 16px; border-radius: 16px; border: 2px solid var(--border); background: var(--surface);
}
.gc-select select:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent); }
.gc-link { display: inline-block; margin-top: 14px; color: var(--primary); font-weight: 600; font-size: .92rem; border-radius: 6px; }
.gc-link:hover { text-decoration: underline; }
.gc-link:focus-visible, .gc-result a:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }

.gc-counter { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 6vw, 36px); margin: 14px 0 18px; }
.gc-value { min-width: 3ch; text-align: center; font-size: clamp(3.6rem, 15vw, 5.2rem); font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--text); font-variant-numeric: tabular-nums; }
.gc-step {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  font: inherit; font-size: 1.6rem; font-weight: 600; color: var(--text); background: var(--surface); border: 2px solid var(--border);
  transition: border-color .2s, background .2s, transform .1s;
}
.gc-step:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.gc-step:active:not(:disabled) { transform: scale(.94); }
.gc-step:disabled { opacity: .35; cursor: default; }
.gc-step:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }

/* Слайдер: --p (0…1) JS орнатады; тұтқа центрі 13px…(100%−13px) аралығында жүреді */
.gc-range { --thumb: 26px; }
.gc-range input {
  --fill: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--p, .667));
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: var(--thumb); margin: 0;
  background: transparent; cursor: pointer;
}
.gc-range input::-webkit-slider-runnable-track {
  height: 10px; border-radius: 99px;
  background: linear-gradient(90deg, var(--primary) 0 var(--fill), var(--surface-2) var(--fill) 100%);
}
.gc-range input::-webkit-slider-thumb {
  -webkit-appearance: none; width: var(--thumb); height: var(--thumb); margin-top: -8px; border-radius: 50%;
  background: var(--gold); border: 4px solid var(--surface); box-shadow: 0 4px 12px -2px rgba(20, 34, 64, .4);
}
.gc-range input::-moz-range-track { height: 10px; border-radius: 99px; background: var(--surface-2); }
.gc-range input::-moz-range-progress { height: 10px; border-radius: 99px; background: var(--primary); }
.gc-range input::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--gold);
  border: 4px solid var(--surface); box-shadow: 0 4px 12px -2px rgba(20, 34, 64, .4);
}
.gc-range input:focus-visible { outline: none; }
.gc-range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 30%, transparent); }
.gc-range input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 30%, transparent); }
.gc-ticks { position: relative; height: 30px; margin-top: 6px; }
.gc-tick {
  position: absolute; top: 0; left: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--p));
  width: 1px; height: 6px; background: var(--border);
}
.gc-tick.major { height: 10px; background: var(--muted); opacity: .6; }
.gc-tick em { position: absolute; top: 12px; left: 50%; translate: -50% 0; font-style: normal; font-size: .72rem; font-weight: 600; color: var(--muted); }

.gc-submit { width: 100%; justify-content: center; margin-top: 26px; padding: 18px 26px; font-size: 1.05rem; }
.gc-submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 50%, transparent); outline-offset: 3px; }

/* Нәтиже */
.gc-result { margin-top: 22px; scroll-margin-top: calc(var(--header-h) + 70px); animation: qIn .35s ease; }
.gc-res-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.gc-res-head h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.gc-res-head p { color: var(--muted); }
.gc-res-head p b { color: var(--text); }
.gc-mock { font-size: .78rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: #b4482e; }
:root[data-theme="dark"] .gc-mock { color: #ffb4a1; }
.gc-levels { display: grid; gap: 14px; }
.gc-level { padding: 18px 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--lv); }
.lv-high { --lv: var(--success); }
.lv-border { --lv: var(--gold); }
.lv-low { --lv: var(--accent); }
.gc-level-head { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; }
.gc-count { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: color-mix(in srgb, var(--lv) 18%, var(--surface)); }
.gc-level-note { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.gc-list { list-style: none; display: grid; gap: 8px; margin-top: 12px; }
.gc-list li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); }
.gc-emoji { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; background: var(--surface); }
.gc-prog { min-width: 0; }
.gc-prog a { display: block; font-weight: 600; line-height: 1.3; }
.gc-prog a:hover { color: var(--primary); }
.gc-prog .gc-uni { font-weight: 400; font-size: .82rem; color: var(--muted); margin-top: 2px; }
.gc-pass { text-align: right; }
.gc-pass b { display: block; font-size: 1.15rem; font-weight: 800; line-height: 1.1; }
.gc-pass small { font-size: .75rem; font-weight: 700; }
.gc-pass .up { color: var(--success); }
.gc-pass .down { color: #c2412b; }
:root[data-theme="dark"] .gc-pass .down { color: #ff9b85; }
.gc-empty { margin-top: 10px; color: var(--muted); font-size: .9rem; }
.gc-foot { margin-top: 14px; color: var(--muted); font-size: .85rem; }
.gc-error { padding: 16px 18px; border-radius: 18px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
@media (max-width: 480px) {
  .gc-card { padding: 4px 18px 20px; border-radius: 24px; }
  .gc-level { padding: 14px; }
  .gc-list li { grid-template-columns: 34px 1fr auto; gap: 10px; }
  .gc-emoji { width: 34px; height: 34px; font-size: 1.05rem; }
}

/* ===== Animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== Кіру / аккаунт ===== */
.user-btn { white-space: nowrap; }
@media (max-width: 600px) { .user-btn span { display: none; } }
/* Тар экранда логотип пен батырмалар бір жолға сыюы үшін */
@media (max-width: 480px) {
  .site-header .container { gap: 8px; padding: 0 8px 0 14px; }
  .logo { font-size: 1.05rem; gap: 7px; }
  .logo-mark { height: 32px; }
  .header-actions { gap: 6px; }
  .header-actions .icon-btn { width: 38px; height: 38px; }
  .user-btn { padding: 8px 12px; }
}

.field { display: grid; gap: 6px; text-align: left; font-weight: 600; font-size: .9rem; }
.field input, .field select {
  font: inherit; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px; width: 100%; min-width: 0;
}
.field input:focus, .field select:focus { border-color: var(--primary); outline: none; }
.form-error { color: #d14343; font-weight: 500; }
:root[data-theme="dark"] .form-error { color: #fca5a5; }

.auth-wrap { max-width: 440px; }
.auth-card { display: grid; gap: 16px; text-align: center; }
.auth-card .test-emoji { font-size: 3rem; }
.auth-card h1 { font-size: 2rem; font-weight: 800; }
.auth-card .btn { justify-content: center; }

.save-note { padding: 12px 18px; border-radius: 14px; margin-bottom: 16px; font-weight: 500; }
.save-note.ok { background: color-mix(in srgb, var(--success) 14%, var(--surface)); color: var(--success); }
.save-note.err { background: color-mix(in srgb, #d14343 12%, var(--surface)); color: #d14343; }

/* ===== Админ панелі ===== */
.admin-h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; }
.admin-page .spec-stats { margin: 12px 0 24px; }
.ad-block { margin-bottom: 24px; display: grid; gap: 14px; }
.ad-block h2 { font-size: 1.3rem; font-weight: 700; }
.ad-form { display: grid; grid-template-columns: 1.4fr 1.2fr .7fr auto; gap: 12px; align-items: end; }
@media (max-width: 760px) { .ad-form { grid-template-columns: 1fr 1fr; } .ad-form .btn { grid-column: 1 / -1; justify-content: center; } }

.fresh-box { border: 2px dashed var(--primary); border-radius: 18px; padding: 18px; display: grid; gap: 14px; }
.fresh-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.fresh-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.fresh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cred { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: .92rem; }
.cred small { color: var(--muted); }
.cred b { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; letter-spacing: .03em; }

.ad-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.ad-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-tools input, .ad-tools select {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 14px; min-width: 0;
}
.ad-table-wrap { overflow-x: auto; margin: 0 -8px; }
.ad-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ad-table th, .ad-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.ad-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.ad-res { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--primary); font-weight: 500; }
.ad-actions .icon-btn { display: inline-grid; width: 34px; height: 34px; font-size: .9rem; }
.nowrap { white-space: nowrap; }
@media (max-width: 900px) { .ad-table th span { display: none; } }

/* Басып шығаруға арналған карточкалар */
.slips { display: none; }
@media print {
  /* Тек логин-пароль карточкалары басып шығарылғанда (админ панелі) қалғанын жасырамыз */
  body:has(> .slips:not(:empty)) { background: #fff; display: block; }
  body:has(> .slips:not(:empty)) > *:not(.slips) { display: none !important; }
  .slips { display: grid; grid-template-columns: repeat(3, 1fr); color: #000; font: 11pt/1.5 "Inter", sans-serif; }
  .slip { border: 1px dashed #999; padding: 12px 14px; break-inside: avoid; }
  .slip-top { font-size: 12pt; margin-bottom: 4px; }
  .slip b { font-family: Consolas, monospace; font-size: 12pt; }
  .slip small { color: #555; }
}

/* ===== Қорытынды есеп (report.html) ===== */
.report-page { padding-top: 24px; }
.report-page .crumbs { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.report-page .crumbs a:hover { color: var(--primary); }
.rp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.rp-head h1 { font-size: clamp(1.8rem, 4.4vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 12px; }
.rp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-nav { position: sticky; top: calc(var(--header-h) + 4px); z-index: 30; display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; margin-bottom: 8px; scrollbar-width: none; }
.rp-nav::-webkit-scrollbar { display: none; }
.rp-nav a { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: var(--surface); border: 1px solid var(--border); }
.rp-nav a:hover { border-color: var(--primary); color: var(--primary); }
.rp-section { padding: 22px 0; scroll-margin-top: calc(var(--header-h) + 70px); display: grid; gap: 16px; }
.rp-h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 800; letter-spacing: -.02em; }
.rp-h2 small { font-size: .85rem; font-weight: 500; color: var(--muted); margin-left: 8px; }
.rp-traits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rp-trait { display: grid; gap: 2px; padding: 16px 18px; border-radius: 20px; background: var(--navy); color: #fff; }
.rp-trait span { font-size: 1.4rem; }
.rp-trait small { color: #a9bac2; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.rp-trait b { font-size: 1.02rem; line-height: 1.3; }
.rp-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.rp-text h3 { font-size: 1.05rem; margin: 18px 0 6px; }
.rp-text h3:first-child { margin-top: 0; }
.rp-text p { line-height: 1.75; }
.rp-side { display: grid; gap: 16px; }
.rp-list h3 { font-size: 1.05rem; margin-bottom: 10px; }
.rp-list ul { list-style: none; display: grid; gap: 8px; }
.rp-list li { padding: 9px 12px; border-radius: 12px; font-weight: 500; font-size: .92rem; }
.rp-list.good li { background: color-mix(in srgb, var(--success) 12%, var(--surface)); }
.rp-list.grow li { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); }
.rp-recs { display: grid; gap: 10px; }
.rp-rec {
  display: grid; grid-template-columns: 34px 46px 1fr 150px; gap: 14px; align-items: center; padding: 14px 18px;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, transform .2s;
}
.rp-rec:hover { border-color: var(--primary); transform: translateY(-2px); }
.rp-rank { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--navy); color: #fff; }
.rp-emoji { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--teal-soft); }
.rp-rec-main b { display: block; line-height: 1.3; }
.rp-rec-main small { color: var(--muted); font-size: .8rem; }
.rp-hits { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rp-hits i { font-style: normal; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--success) 13%, var(--surface)); color: var(--success); }
.rp-pct b { display: block; font-size: 1.3rem; font-weight: 800; color: var(--primary); text-align: right; }
.rp-pct .bar { display: block; margin-top: 4px; height: 8px; }
.rp-progress { max-width: 760px; }
.rp-progress h2 { font-size: 1.3rem; margin-bottom: 6px; }
.rp-checks { display: grid; gap: 8px; margin-top: 16px; }
.rp-check { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.rp-check.done { background: color-mix(in srgb, var(--success) 11%, var(--surface)); }
.rp-check small { color: var(--muted); }
.rp-check a { color: var(--primary); font-weight: 600; }
.rp-disclaimer { text-align: center; max-width: 720px; margin: 10px auto 0; }
.report-banner {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 20px; color: #fff; font-size: 1.1rem;
  background: radial-gradient(400px 200px at 100% 100%, rgba(239, 123, 95, .5), transparent 60%), linear-gradient(135deg, var(--navy), var(--teal));
}
.report-banner span { flex: 1; font-size: .95rem; }
.report-banner b { display: block; font-size: 1.05rem; }
.ad-report { padding: 6px 12px !important; font-size: .8rem !important; margin-right: 4px; }
@media (max-width: 860px) {
  .rp-traits { grid-template-columns: 1fr 1fr; }
  .rp-grid { grid-template-columns: 1fr; }
  .rp-rec { grid-template-columns: 30px 1fr 90px; }
  .rp-emoji { display: none; }
}
@media (max-width: 480px) {
  .rp-rec { grid-template-columns: 1fr 70px; padding: 12px 14px; }
  .rp-rank { display: none; }
  .rp-pct b { font-size: 1.1rem; }
}

/* Есепті басып шығару / PDF */
@media print {
  .report-page ~ .site-footer, .report-page .rp-actions, .report-page .rp-nav, body:has(.report-page) .site-header { display: none !important; }
  body:has(.report-page) { background: #fff; }
  .report-page .test-card, .report-page .rp-rec, .report-page .rp-trait { box-shadow: none !important; break-inside: avoid; }
  .report-page .rp-test { break-before: page; }
  .report-page .reveal { opacity: 1 !important; transform: none !important; }
}
