/*
 * Дизайны хэл: «ТА ХЭН БЭ?» номын хавтас (docs/design-direction.md).
 * Нийтийн сайт зориуд зөвхөн харанхуй (хар) — хавтасны хар дэвсгэр, неон шугам зөвхөн хар дээр утга учиртай.
 * Хэвлэхэд цагаан. Админ самбар (admin.css) өөрийн гэрэл/харанхуй токенуудаар дарж бичнэ.
 * Фонт: Inter (UI, үндсэн текст), Rubik Glitch — зөвхөн том гарчиг (.glitch). Хоёулаа Ө ө Ү ү-г зурна (cyrillic-ext).
 */

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #17171c;      /* карт, самбар */
  --surface-2: #202027;    /* картын доторх давхарга, hover */
  --ink: #f2f2f4;
  --ink-inv: #000000;
  --muted: #a6a6b0;
  --line: #31313a;
  --line-strong: #4a4a55;
  --soft: #24242b;
  --field: #222229;        /* текст талбарын дэвсгэр */
  --field-line: #686875;   /* текст талбарын хүрээ */
  --good: #5fe36a;
  --focus: #7fb2ff;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: var(--font);
  --display: var(--font);
  --glitch: "Rubik Glitch", Inter, system-ui, sans-serif;
  --radius: 14px;
  --hdr: 57px;
  /* Векторын өнгө — хар дэвсгэр дээр тод харагдахаар тааруулсан (хавтасны неон өнгөнөөс) */
  --v-red: #ff4b4b; --v-orange: #ff8a1f; --v-brown: #c08552; --v-black: #4b4b55;
  --v-green: #5fe36a; --v-blue: #3d8bff; --v-yellow: #f5c542; --v-violet: #a77bff;
  --neon: linear-gradient(90deg, var(--v-green), var(--v-blue), var(--v-violet), var(--v-red), var(--v-orange), var(--v-yellow));
}

/* Векторын өнгийг data-v атрибутаар (inline style-гүй, CSP-д нийцтэй) */
[data-v="urethral"] { --c: var(--v-red); }
[data-v="skin"] { --c: var(--v-orange); }
[data-v="anal"] { --c: var(--v-brown); }
[data-v="muscular"] { --c: var(--v-black); }
[data-v="visual"] { --c: var(--v-green); }
[data-v="sound"] { --c: var(--v-blue); }
[data-v="oral"] { --c: var(--v-yellow); }
[data-v="olfactory"] { --c: var(--v-violet); }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); }
.hidden { display: none !important; }
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
h1 { font: 300 clamp(32px, 5.2vw, 56px)/1.06 var(--display); letter-spacing: -0.025em; margin: 0 0 18px; }
h2 { font: 400 22px/1.25 var(--display); letter-spacing: -0.01em; margin: 0 0 12px; }
h3 { font-weight: 500; }
p { margin: 0 0 12px; }
b, strong { font-weight: 600; }
.lead { font-size: 18px; font-weight: 300; color: var(--muted); max-width: 60ch; }
.lead b { color: var(--ink); font-weight: 500; }
.eyebrow, .kicker { font-size: 12px; font-weight: 400; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.muted { color: var(--muted); }
.glitch { font-family: var(--glitch); font-weight: 400; text-transform: uppercase; letter-spacing: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
kbd { font: 12px/1 ui-monospace, monospace; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; background: var(--surface); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(16px, calc((100% - 1120px) / 2));
  background: rgba(0, 0, 0, 0.86); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; flex: none; fill: none; stroke-width: 1.15; stroke-linecap: round; }
.brand-mark path:nth-child(1) { stroke: var(--v-green); }
.brand-mark path:nth-child(2) { stroke: var(--v-blue); }
.brand-mark path:nth-child(3) { stroke: var(--v-violet); }
.brand-mark path:nth-child(4) { stroke: var(--v-red); }
.brand-mark path:nth-child(5) { stroke: var(--v-orange); }
.brand-mark path:nth-child(6) { stroke: var(--v-yellow); }
.brand-mark path:nth-child(7) { stroke: var(--v-brown); }
.brand-mark path:nth-child(8) { stroke: #9a9aa5; }
.brand-name { font: 500 13px var(--display); letter-spacing: 0.24em; text-transform: uppercase; }
.topbar nav { display: flex; align-items: center; gap: 22px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 400; white-space: nowrap; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: var(--ink); }
.topbar nav a.nav-book { color: var(--ink); display: inline-flex; align-items: center; gap: 7px; }
.topbar nav a.nav-book::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--v-green); box-shadow: 0 0 8px var(--v-green); }

main { padding-block: 0 64px; }
.view, .wrap { max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
#intro.view { max-width: none; padding-inline: 0; }
/* #test, #guide г.м. hash нь view-ийн id-тай давхцдаг: браузерийн фрагмент гүйлгэлт view-г sticky толгойн доор нуухгүй */
.view { scroll-margin-top: calc(var(--hdr) + env(safe-area-inset-top, 0px)); }

/* ---------- Buttons ---------- */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; border: 1px solid transparent; border-radius: 4px; padding: 12px 24px;
  font: 500 14px/1.2 var(--font); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: transform 0.08s, background 0.15s, border-color 0.15s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.35; cursor: default; }
.btn.primary, .btn.light { background: var(--ink); color: var(--ink-inv); }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
@media (hover: hover) {
  .btn.primary:hover:not(:disabled), .btn.light:hover:not(:disabled) { background: #fff; box-shadow: 0 0 0 1px #fff, 0 0 28px -4px rgba(127, 178, 255, 0.55); }
  .btn.ghost:hover:not(:disabled) { border-color: var(--ink); }
}
.link { font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- Нүүр: hero (хавтасны найруулга — зүүн талд гарчиг, баруун талд неон толгойнууд) ---------- */
.hero { position: relative; overflow: hidden; background: #000; border-bottom: 1px solid var(--line); }
.hero-inner {
  max-width: 1120px; margin: 0 auto; padding: 44px 16px 48px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); column-gap: 32px;
  grid-template-areas: "eyebrow art" "title art" "lockup art" "body art";
  grid-template-rows: auto auto auto 1fr;
}
.hero .eyebrow { grid-area: eyebrow; margin-bottom: 26px; }
.hero-title { grid-area: title; margin: 0; font-size: clamp(54px, 10vw, 140px); line-height: 0.98; }
.hero-title span { display: block; }
.lockup { grid-area: lockup; display: flex; align-items: center; gap: 14px; margin: 26px 0 0; }
.lockup-8 { font: 100 64px/0.9 var(--font); }
.lockup-txt { font: 300 13px/1.55 var(--font); letter-spacing: 0.16em; text-transform: uppercase; }
.hero-body { grid-area: body; margin-top: 30px; min-width: 0; }
.hero .lead { margin-bottom: 0; }
.hero .cta-row { margin: 28px 0 30px; }
.hero-art {
  grid-area: art; align-self: stretch; min-height: 100%;
  background: #000 url(img/book-cover.webp) no-repeat; background-size: auto 168%; background-position: 98% 41%;
}
.facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 8px 32px; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.facts div { min-width: 0; }
.facts dt { font: 200 28px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.facts dd { margin: 0; font-size: 13px; color: var(--muted); }
.hero-book {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 26px; padding: 10px 18px 10px 10px; max-width: 100%;
  border: 1px solid var(--line-strong); border-radius: 6px; text-decoration: none; background: #0b0b0d;
  transition: border-color 0.15s;
}
.hero-book:hover { border-color: var(--ink); }
.hero-book .cover-sm { width: 40px; }
.hero-book-text { display: flex; flex-direction: column; line-height: 1.35; font-size: 14px; min-width: 0; }
.hero-book-text small { color: var(--muted); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
.hero-book-text b { font-weight: 500; }

@media (max-width: 860px) {
  .hero-inner {
    padding-top: 28px; column-gap: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    grid-template-areas: "eyebrow eyebrow" "title art" "lockup art" "body body";
    grid-template-rows: auto auto auto auto;
  }
  .hero-art { min-height: 300px; background-size: 200% auto; background-position: 100% 45%; margin-right: -16px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .hero .eyebrow { letter-spacing: 0.2em; font-size: 11px; margin-bottom: 18px; }
  .hero-title { font-size: clamp(48px, 15.5vw, 72px); }
  .lockup { gap: 10px; margin-top: 18px; }
  .lockup-8 { font-size: 46px; }
  .lockup-txt { font-size: 11px; letter-spacing: 0.12em; }
  .hero-art { min-height: 250px; }
  .hero .cta-row .btn { flex: 1 1 auto; }
}

/* ---------- Нүүр: 8 өнгө ---------- */
.section { padding-block: 56px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-size: clamp(24px, 3.4vw, 34px); font-weight: 300; letter-spacing: -0.02em; }
.section-head p { margin: 0; color: var(--muted); max-width: 46ch; font-size: 15px; }
.spectrum { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spectrum li { min-width: 0; background: var(--surface); }
.spec { display: block; height: 100%; padding: 18px 18px 20px; text-decoration: none; position: relative; transition: background 0.15s; }
.spec::before { content: ""; display: block; height: 2px; width: 40px; margin-bottom: 16px; background: var(--c); box-shadow: 0 0 12px var(--c); transition: width 0.25s; }
.spec[data-v="muscular"]::before { background: #8b8b96; box-shadow: none; }
@media (hover: hover) { .spec:hover { background: var(--surface); } .spec:hover::before { width: 72px; } }
.spec b { display: block; font-weight: 500; font-size: 17px; }
.spec span { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 2px; }
@media (max-width: 760px) { .spectrum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .spec { padding: 16px 14px 18px; } }

.intro-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; } }
.howto { background: var(--surface); border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); }
.howto-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: h; }
.howto-steps li { counter-increment: h; position: relative; padding-left: 34px; color: #c4c4cc; max-width: 62ch; }
.howto-steps li::before { content: counter(h); position: absolute; left: 0; top: -1px; font: 200 22px/1.2 var(--font); color: var(--ink); }
.howto-steps b { color: var(--ink); font-weight: 500; }

/* Номын хавтас (CSS дэвсгэр — нүүр хуудасны #app дотор <img> ашиглахгүй) */
.cover-sm, .cover-md, .cover-lg {
  display: block; flex: none; aspect-ratio: 1269 / 2000; border-radius: 2px 4px 4px 2px;
  background: #000 url(img/book-cover-thumb.webp) center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 14px 30px -10px rgba(0, 0, 0, 0.9);
}
.cover-md, .cover-lg { background-image: url(img/book-cover.webp); }
.cover-md { width: 112px; }
.cover-lg { width: 100%; }

.book-strip {
  display: flex; gap: 22px; align-items: flex-start; padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #000; position: relative; overflow: hidden;
}
.book-strip::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--neon); opacity: 0.85; }
.book-strip .cover-md { width: 92px; }
.book-strip-text { min-width: 0; }
.book-title { font-size: 15px; margin-bottom: 16px; }
.book-title b { display: block; font: 400 26px/1.1 var(--glitch); text-transform: uppercase; margin-bottom: 8px; }
.book-title span { color: var(--muted); }

/* ---------- Тестийн өмнөх заавар ---------- */
#guide.view { max-width: 760px; }
.guide { padding: clamp(28px, 6vh, 64px) 0 16px; }
.guide .eyebrow { margin-bottom: 18px; }
.guide-title { font-size: clamp(40px, 9vw, 84px); line-height: 1; margin: 0 0 22px; }
.guide-title:focus { outline: none; }
.guide-lead { font-size: clamp(18px, 1rem + 0.6vw, 21px); font-weight: 300; line-height: 1.55; color: var(--ink); max-width: 40ch; margin-bottom: 28px; }
.guide-list { list-style: none; counter-reset: g; margin: 0 0 28px; padding: 0; border-top: 1px solid var(--line); }
.guide-list li {
  counter-increment: g; position: relative; padding: 16px 0 16px 48px; border-bottom: 1px solid var(--line);
  color: #c4c4cc; font-size: 16px; line-height: 1.55; max-width: 66ch;
}
.guide-list li::before {
  content: counter(g, decimal-leading-zero); position: absolute; left: 0; top: 16px;
  font: 200 22px/1.1 var(--font); color: var(--ink); font-variant-numeric: tabular-nums;
}
.guide-list li b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 2px; }
.guide-scale { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 28px; }
.guide-scale span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 13px; color: var(--muted); }
.guide-scale b { font: 300 22px/1.1 var(--font); color: var(--ink); font-variant-numeric: tabular-nums; }
.guide-scale span:nth-child(2) { text-align: center; align-items: center; }
.guide-scale span:last-child { text-align: right; align-items: flex-end; }
@media (max-width: 520px) { .guide-btn { width: 100%; } .guide-list li { padding-left: 40px; } .guide-scale span { padding: 8px 10px; font-size: 12px; } }

/* ---------- Тест: нэг удаад нэг асуулт ---------- */
/* Өгүүлбэр бол дэлгэцийн гол баатар; онооны шкал хоёрдогч боловч дарахад хялбар (≥ 44px). */
#test.view { max-width: 800px; }
.qprog { padding: 18px 0 0; }
.qprog-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.progress { height: 3px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.progress .bar { height: 100%; width: 0; transition: width 0.3s; background: var(--neon); }

.qcard {
  margin-top: clamp(20px, 4vh, 40px); padding: clamp(28px, 4vw, 48px);
  background: #0b0b0d; border: 1px solid var(--line); border-radius: var(--radius);
}
.qcard.enter { animation: q-in 0.26s cubic-bezier(.2, .8, .2, 1); }
@keyframes q-in { from { opacity: 0; transform: translateY(8px); } }
.qmeta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.qpos { letter-spacing: 0.16em; font-variant-numeric: tabular-nums; }
.qcheer { color: var(--good); }
.qcheer:empty { display: none; }
.qtext {
  margin: 0 0 clamp(28px, 5vh, 44px); max-width: 34ch; min-height: calc(3 * 1.42em);
  font: 400 clamp(22px, 1.05rem + 1.5vw, 34px)/1.42 var(--font); letter-spacing: -0.012em; color: #fff; text-wrap: pretty;
}
.qtext:focus { outline: none; }

.qscale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.opt {
  min-width: 0; height: 52px; padding: 0; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: #d4d4db; cursor: pointer; font-weight: 500; font-size: 16px; font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background 0.12s, color 0.12s, border-color 0.12s, box-shadow 0.2s;
}
@media (hover: hover) { .opt:hover:not(.on) { border-color: var(--ink); color: var(--ink); background: var(--surface-2); } }
.opt.on { background: var(--ink); border-color: var(--ink); color: var(--ink-inv); box-shadow: 0 0 26px -6px rgba(127, 178, 255, 0.65); }
.qanchors { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 13px; line-height: 1.35; color: var(--muted); }
.qanchors span { flex: 1 1 0; min-width: 0; }
.qanchors span:nth-child(2) { text-align: center; }
.qanchors span:last-child { text-align: right; }
.qanchors b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.qhint { min-height: 1.5em; margin: 16px 0 0; font-size: 16px; font-weight: 500; color: var(--ink); }
.qhint.preview { color: var(--muted); font-weight: 400; }

.qnav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.qnav .btn { min-width: 140px; }
.shake { animation: shake 0.4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.hint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 24px; }
@media (hover: none) { .hint { display: none; } }

/* Нарийн дэлгэц: шкал 6 + 5 (доод мөр голлосон) хоёр мөр — 320px дээр ч товч бүр ≥ 44px */
@media (max-width: 719px) {
  .qscale { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; max-width: 440px; }
  .opt { grid-column: span 2; }
  .opt:nth-child(7) { grid-column: 2 / span 2; }
  .qanchors { max-width: 440px; }
}
@media (max-width: 480px) {
  .qprog { padding-top: 14px; }
  .qprog-meta { font-size: 11px; letter-spacing: 0.08em; }
  .qprog-meta span { white-space: nowrap; }
  .qcard { margin-top: 22px; padding: 0; background: none; border: 0; border-radius: 0; }
  .qtext { min-height: calc(3 * 1.42em); }
  .qanchors { font-size: 12px; }
  .qnav .btn { flex: 1 1 0; min-width: 0; padding-inline: 12px; }
}

/* «Бүх асуултад хариуллаа» */
.qdone { padding: clamp(32px, 7vh, 72px) 0 8px; }
.qdone-title { font: 300 clamp(30px, 5vw, 48px)/1.1 var(--font); letter-spacing: -0.02em; margin: 0 0 14px; }
.qdone-title:focus { outline: none; }
.qdone-text { color: var(--muted); max-width: 52ch; }
.qdone-cta { margin: 24px 0 32px; }
.qreview { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.qr {
  width: 100%; min-height: 44px; padding: 4px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 1px solid var(--line); border-radius: 6px; background: transparent; cursor: pointer; font-variant-numeric: tabular-nums; line-height: 1.1;
}
@media (hover: hover) { .qr:hover { border-color: var(--ink); } }
.qr-n { font-size: 11px; color: var(--muted); }
.qr-v { font-size: 15px; font-weight: 500; }
@media (max-width: 480px) { .qreview { grid-template-columns: repeat(8, minmax(0, 1fr)); } .qdone-cta .btn { flex: 1 1 auto; } }

/* ---------- Result ---------- */
.result-head { padding-block: 48px 30px; }
.result-head h1 { font-size: clamp(30px, 4.8vw, 50px); }
.vname { font-weight: 500; color: var(--ink); white-space: nowrap; }
.vname::before { content: ""; display: inline-block; width: 0.62em; height: 0.62em; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); margin-right: 0.32em; vertical-align: 0.05em; }

.charts { display: grid; gap: 16px; }
.chart-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 18px; min-width: 0; }
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin-bottom: 24px; }
.chart-head h2 { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; }
.chart-head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 52ch; }
.colchart { position: relative; padding-left: 30px; }
.cols-grid { position: absolute; left: 0; right: 0; top: 0; height: 200px; pointer-events: none; }
.tick { position: absolute; left: 30px; right: 0; border-top: 1px dashed var(--line-strong); }
.tick span { position: absolute; left: -30px; top: -9px; font: 400 11px var(--body); color: var(--muted); font-variant-numeric: tabular-nums; }
.cols-row { position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: clamp(4px, 1.6vw, 18px); }
.col { min-width: 0; display: flex; flex-direction: column; align-items: stretch; }
.col-track { height: 200px; display: flex; align-items: flex-end; }
.col-bar {
  position: relative; width: 100%; background: var(--c); border-radius: 3px 3px 1px 1px;
  box-shadow: 0 0 22px -6px var(--c), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: height 0.6s cubic-bezier(.2,.8,.2,1);
}
.col-bar b { position: absolute; left: 0; right: 0; top: -22px; text-align: center; font: 500 13px var(--font); font-variant-numeric: tabular-nums; }
.col.muted .col-bar { background: color-mix(in srgb, var(--c) 30%, var(--surface)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.col-label { margin-top: 10px; text-align: center; font-size: clamp(11px, 1.3vw, 13px); font-weight: 500; line-height: 1.2; white-space: nowrap; color: var(--ink); }
@media (max-width: 520px) {
  .chart-panel { padding: 20px 12px 14px; }
  .col-bar b { font-size: 11px; }
}

/* Үр дүнгийн номын хэсэг — хавтас + хувийн санал */
.book-cta {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 40px; align-items: center;
  margin-top: 20px; padding: 40px; border-radius: var(--radius); background: #000; color: var(--ink); border: 1px solid var(--line-strong);
}
.book-cta::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--neon); }
.book-cta-cover { width: 100%; transform: rotate(-3deg); }
.book-cta-body { min-width: 0; }
.book-cta .kicker { color: var(--muted); }
.book-cta h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 300; letter-spacing: -0.015em; margin: 0 0 10px; }
.book-cta p { color: #cfcfd6; max-width: 62ch; }
.book-cta-points { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.book-cta-points li { display: flex; gap: 10px; }
.book-cta-points li::before { content: ""; flex: none; width: 14px; height: 1px; margin-top: 0.8em; background: var(--good); box-shadow: 0 0 6px var(--good); }
.book-cta .cta-row { margin-top: 24px; }
@media (max-width: 680px) {
  .book-cta { grid-template-columns: 1fr; gap: 22px; padding: 28px 20px; }
  .book-cta-cover { width: 112px; }
  .book-cta .cta-row .btn { flex: 1 1 auto; }
}
.book-price { font-weight: 500; font-variant-numeric: tabular-nums; }
.book-phone { font-weight: 400; color: var(--muted); }
.book-phone::before { content: "Утас: "; }

.section-title { margin: 56px 0 18px; font-size: clamp(24px, 3.2vw, 32px); font-weight: 300; letter-spacing: -0.02em; }
.vector-list { display: grid; gap: 12px; }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative; }
.vcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--c); box-shadow: 0 0 14px var(--c); }
.vcard header {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 22px;
  background: color-mix(in srgb, var(--c) 9%, var(--surface));
}
.vcard h3 { margin: 0; font: 500 19px var(--display); letter-spacing: -0.01em; }
.vcard header p { margin: 0; color: var(--muted); font-size: 14px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.dot.big { width: 28px; height: 28px; box-shadow: 0 0 16px -2px var(--c), inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.stats { margin-left: auto; display: flex; gap: 28px; }
.stats div { text-align: right; }
.stats b { display: block; font: 200 28px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.stats small { color: var(--muted); font-size: 12px; }
@media (max-width: 560px) { .stats { margin-left: 0; width: 100%; justify-content: flex-start; } .stats div { text-align: left; } }
.vbody { padding: 18px 22px 22px; }
.vbody > p { max-width: 70ch; }
.tags { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 13px; padding: 3px 11px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); }
.stress { font-size: 15px; color: var(--muted); }
.stress b { color: var(--ink); font-weight: 500; }
.note { font-size: 14px; padding: 10px 14px; border-radius: 8px; background: var(--soft); }
.fields { font-size: 14px; color: var(--muted); }
.fields b { color: var(--ink); font-weight: 500; }
.hooks { margin-top: 14px; padding: 14px 16px; border-radius: 8px; border: 1px solid var(--line-strong); font-size: 14px; }
.hooks p { margin: 0 0 4px; font-weight: 500; }
.hooks ul { margin: 0 0 10px; padding-left: 18px; color: var(--muted); }
.hooks a { font-weight: 500; }
.vcard.weak header { background: var(--soft); }
.vcard.weak::before { opacity: 0.35; box-shadow: none; }

.book-final { margin-top: 56px; padding: 40px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-strong); position: relative; overflow: hidden; }
.book-final::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--neon); }
.book-final h2 { font-size: clamp(24px, 3.6vw, 34px); line-height: 1.15; font-weight: 300; letter-spacing: -0.02em; }
.book-final p { max-width: 62ch; }
.book-final p b { font-weight: 500; }
.book-points { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.book-points li { display: flex; gap: 10px; }
.book-points li::before { content: ""; flex: none; width: 14px; height: 1px; margin-top: 0.8em; background: var(--good); box-shadow: 0 0 6px var(--good); }
@media (max-width: 560px) { .book-points { grid-template-columns: 1fr; } .book-final { padding: 24px 20px; } }
.promo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.promo small { color: var(--muted); }
.promo-code { font: 600 18px ui-monospace, monospace; letter-spacing: 0.1em; padding: 6px 14px; border: 1px dashed var(--ink); border-radius: 6px; background: transparent; cursor: pointer; }

.share-block { margin-top: 48px; text-align: center; }
.share-block h2 { font-weight: 300; font-size: 26px; }
.share-block p { color: var(--muted); }
.share-block .cta-row { justify-content: center; }
.disclaimer { color: var(--muted); font-size: 13px; text-align: center; max-width: 640px; margin: 32px auto 0; }

/* ---------- Scale ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .grid2 { grid-template-columns: 1fr; } }
.scale-card, .ideal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.scale-card > p { color: var(--muted); font-size: 15px; }
.ideal { margin-top: 16px; }
.ideal p { max-width: 75ch; margin: 0; }
.tbl { overflow-x: auto; }
.scale { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.scale th { text-align: left; color: var(--muted); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line-strong); }
.scale td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.scale td:first-child { white-space: nowrap; font: 300 14px var(--font); font-variant-numeric: tabular-nums; }
.scale td b { font-weight: 500; }
.scale small { color: var(--muted); }

/* ---------- Footer ---------- */
.footer { color: var(--muted); font-size: 13px; padding: 40px 16px 48px; border-top: 1px solid var(--line); background: #000; }
.footer-inner { max-width: 1088px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px 40px; }
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-brand .cover-sm { width: 44px; }
.footer-brand p { margin: 0 0 6px; }
.footer-title { color: var(--ink); font: 400 18px/1.1 var(--glitch); text-transform: uppercase; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; align-content: start; }
.footer a, .footer .linkbtn { color: var(--ink); font-weight: 400; cursor: pointer; text-decoration: none; }
.footer a:hover, .footer .linkbtn:hover { text-decoration: underline; }
.footer-note a { text-decoration: underline; text-underline-offset: 3px; }
.footer-note { grid-column: 1 / -1; margin: 8px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 680px) { .footer-inner { grid-template-columns: 1fr; } }

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translate(-50%, 20px); z-index: 30;
  background: var(--ink); color: var(--ink-inv); padding: 10px 18px; border-radius: 6px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all 0.25s; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 420px) { .brand-name { display: none; } .topbar nav { gap: 16px; } }

/* Нарийн дэлгэц: графикийн нэрсийг босоо болгоно */
@media (max-width: 720px) {
  .col-label { writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; height: 72px; text-align: left; font-size: 12px; }
}
@media (max-width: 380px) {
  .col-label { font-size: 11px; height: 66px; }
}

/* ---------- Номын захиалга ---------- */
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; color: var(--ink); text-decoration: underline; cursor: pointer; }
.book-price.soldout-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 4px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--ink); }
/* Захиалгын цонхны загвар: public/order.css (.vo-*). Доорх .field/.form-err-ийг админ самбар ашиглана. */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 14px; font-weight: 600; }
.field i { color: var(--v-red); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; font: inherit; font-size: 16px; color: var(--ink); background: var(--field, var(--bg));
  border: 1px solid var(--field-line, var(--line)); border-radius: 10px; padding: 11px 12px;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.field [aria-invalid="true"] { border-color: var(--v-red); }
.form-err { color: var(--v-red); font-weight: 600; margin: 10px 0 0; }
.form-err:empty { display: none; }
.small { font-size: 13px; }
.admin-locked { max-width: 560px; margin: 15vh auto; padding: 0 16px; }

@media print {
  :root {
    color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --ink-inv: #fff;
    --muted: #444; --line: #ccc; --line-strong: #999; --soft: #eee; --good: #1d7a3e; --v-black: #2f3036;
    --v-green: #2e9e5b; --v-yellow: #c9a20f;
  }
  .topbar, .cta-row, .footer, .toast, .book-cta, .share-block, .book-strip .link, .hero-book, .hero-art, .sticky-buy { display: none !important; }
  body { background: #fff; color: #000; }
  .hero, .book-strip { background: #fff; }
  .vcard, .chart-panel { break-inside: avoid; }
  .col-bar, .vcard::before, .spec::before, .vname::before { box-shadow: none; }
}
