/* Туслагч — Vuexy light дээрх нэмэлт хэв маяг. Vuexy core.css: /static/vendor/vuexy/core.css */

/* Фонт: Public Sans (Vuexy, латин) + Inter (кирилл). Гадны CDN-гүй. */
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/public-sans-latin.woff2?v=79e586612e") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-cyrillic.woff2?v=62cc01daef") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* Монгол Ө ө Ү ү — 2 KB-ийн тусдаа subset (pyftsubset inter-cyrillic-ext.woff2 --unicodes=U+04AE-04AF,U+04E8-04E9);
   бусад cyrillic-ext үсэг гарвал л 26 KB-ийн бүтэн файл татагдана. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-mn.woff2?v=8dcdae3dc8") format("woff2");
  unicode-range: U+04AE-04AF, U+04E8-04E9; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-cyrillic-ext.woff2?v=c2963dc765") format("woff2");
  unicode-range: U+0460-04AD, U+04B0-04E7, U+04EA-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

:root {
  --bs-font-sans-serif: "Public Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  /* Хэрэгслийн (зураг ↔ PDF) CSS-д зориулсан токенууд — Vuexy light-ийн утгууд */
  --c-bg: #f8f7fa;
  --c-surface: #ffffff;
  --c-text: #444050;
  --c-muted: #6d6b77;
  --c-line: #e6e6e8;
  --c-accent: #7367f0;
  --c-accent-ink: #ffffff;
  --radius: .375rem;
  --shadow: 0 .1875rem .75rem 0 rgba(47, 43, 61, .14);
  --font: var(--bs-font-sans-serif);
  --slot: #fff1b8;
  --slot-line: #f1d06b;
}
body { font-family: var(--bs-font-sans-serif); }
html { scroll-padding-top: 80px; } /* sticky navbar-ийн доор #холбоос нуугдахгүй */

/* Хуудас солигдоход богино, зөөлөн бүдгэрэлт (cross-document View Transitions).
   Navbar тусдаа барьж авагдаад шууд шинэ нь харагдана — анивчихгүй. Хөдөлгөөн багасгасан бол унтарна. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .15s; animation-timing-function: ease-out; }
.site-navbar { view-transition-name: site-nav; }
::view-transition-old(site-nav) { display: none; }
::view-transition-new(site-nav) { animation: none; }
::view-transition-group(site-nav) { animation: none; }

/* Navbar, footer */
.site-navbar { box-shadow: 0 .125rem .5rem rgba(47, 43, 61, .08); min-height: 64px; }
.site-navbar .nav-link { color: var(--bs-heading-color); font-weight: 500; }
.site-navbar .nav-link:hover { color: var(--bs-primary); }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: .5rem; color: #fff;
  background: linear-gradient(135deg, #7367f0 0%, #9e95f5 100%); box-shadow: 0 .125rem .375rem rgba(115, 103, 240, .4); }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: var(--bs-body-color); }
.footer-links a:hover { color: var(--bs-primary); }

/* Hero */
.hero { position: relative; padding: 2.5rem 1.5rem; border-radius: 1rem; overflow: hidden;
  background: radial-gradient(1200px 400px at 0% 0%, rgba(115, 103, 240, .16), transparent 60%),
              radial-gradient(800px 360px at 100% 100%, rgba(0, 186, 209, .10), transparent 60%), #fff;
  box-shadow: var(--shadow); }
@media (min-width: 768px) { .hero { padding: 3.5rem 3rem; } }
.hero .lead { color: var(--bs-body-color); max-width: 40rem; }
.hero .search { max-width: 36rem; }
.hero-points { background: #fff; border-radius: .75rem; padding: 1.5rem; box-shadow: var(--shadow); }

/* Icon хавтан (Vuexy avatar маяг) */
.avatar-tile { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: .5rem; flex: none; }
.avatar-tile .icon-base { width: 1.5rem; height: 1.5rem; font-size: 1.5rem; }
.avatar-tile.avatar-lg { width: 56px; height: 56px; }
.avatar-tile.avatar-lg .icon-base { width: 2rem; height: 2rem; font-size: 2rem; }

/* Карт */
.tool-card { color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 .25rem 1.125rem 0 rgba(47, 43, 61, .16); }
.tool-card:hover h3 { color: var(--bs-primary); }
.tool-card p { color: var(--bs-body-color); }

/* Алхам, асуулт */
.step-no { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(115, 103, 240, .16); color: var(--bs-primary); font-weight: 600; font-size: .875rem; }
.faq-item { border-bottom: 1px solid var(--bs-border-color); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { cursor: pointer; list-style: none; padding: .875rem 2rem .875rem 0; font-weight: 500; color: var(--bs-heading-color); position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: .25rem; top: 50%; width: .5rem; height: .5rem; margin-top: -.35rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; opacity: .6; }
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -.1rem; }
.faq-item p { margin: 0 0 1rem; }
.guide h2 { margin-top: 1.5rem; }
.guide h2:first-child { margin-top: 0; }
.guide ul { padding-left: 1.25rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.limit-note a { text-decoration: underline; }

/* Засварлагч */
.form-section { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); margin-bottom: .75rem; }
.slot-mark { background: var(--slot); padding: 0 .25rem; border-radius: .25rem; color: inherit; }
@media (min-width: 992px) {
  .form-panel { position: sticky; top: 80px; max-height: calc(100vh - 96px); display: flex; flex-direction: column; }
  .form-panel .card-body { overflow: auto; }
}
.field.linked .form-control, .field.linked .form-select { border-color: var(--slot-line); box-shadow: 0 0 0 .2rem var(--slot); }
.items { display: grid; gap: .5rem; }
.item-row { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .5rem; padding: .75rem 2.25rem .75rem .75rem;
  border: 1px solid var(--bs-border-color); border-radius: .5rem; position: relative; background: var(--c-bg); }
.item-row .wide { grid-column: span 2; }
.item-row .rm { position: absolute; top: .25rem; right: .25rem; }
.item-row label { display: block; width: 100%; }
@media (max-width: 991.98px) {
  .doc-card .toolbar { position: sticky; top: 64px; z-index: 5; background: #fff; }
}
.doc-stage { background: var(--c-bg); border-radius: 0 0 var(--bs-card-border-radius, .375rem) var(--bs-card-border-radius, .375rem); }

/* A4 хуудас: бүх хэмжээ хуудасны өргөнөөс (cqw) хамаарна */
.doc-wrap { container-type: inline-size; max-width: 860px; margin: 0 auto; }
.doc-wrap.zoom { overflow-x: auto; container-type: normal; }
.doc-page {
  background: #fff; color: #000; border-radius: 2px;
  box-shadow: 0 .125rem .25rem rgba(47, 43, 61, .08), 0 .5rem 1.5rem rgba(47, 43, 61, .10);
  min-height: calc(100cqw * 297 / 210);
  font-family: Arial, "Liberation Sans", Arimo, Helvetica, sans-serif;
  font-size: calc(var(--pt, 12) * .16793cqw);
  line-height: 1.15; overflow-wrap: anywhere; text-align: left;
}
.doc-wrap.zoom .doc-page { width: 794px; min-height: 1123px; font-size: calc(var(--pt, 12) * 1.3333px); }
.doc-page[contenteditable="true"] { outline: none; caret-color: var(--bs-primary); }
.doc-page[contenteditable="true"]:focus-within { box-shadow: 0 0 0 2px rgba(115, 103, 240, .45), 0 .5rem 1.5rem rgba(47, 43, 61, .10); }
.doc-page .doc-p { margin: 0; color: #000; }
.doc-page .al-c { text-align: center; }
.doc-page .al-r { text-align: right; }
.doc-page .al-j { text-align: justify; }
.doc-page .ind { text-indent: 5.95cqw; }
.doc-wrap.zoom .doc-page .ind { text-indent: 47px; }
.doc-page .doc-cols { display: flex; }
.doc-page .doc-cols > div { min-width: 0; }
.doc-page strong { font-weight: 700; color: #000; }
.doc-page table.doc-t { width: 100%; border-collapse: collapse; table-layout: fixed; margin: .2em 0; color: #000; }
.doc-page table.doc-t td, .doc-page table.doc-t th { padding: .15em .35em; vertical-align: middle; font-weight: 400; overflow-wrap: anywhere; border: 0; }
.doc-page table.doc-t th { font-weight: 700; text-align: center; }
.doc-page table.doc-t.bordered td, .doc-page table.doc-t.bordered th { border: 1px solid #000; }
.doc-page table.doc-t.bordered th { background: #f2f2f2; }
.doc-page .slot { background: var(--slot); box-shadow: 0 0 0 1px var(--slot-line) inset; border-radius: 2px; }
.doc-page .slot.hot { background: #ffe27a; }

/* Нэвтрэх */
.auth-wrap { max-width: 460px; margin: 1rem auto 0; }

/* Хэвлэх: зөвхөн баримт, A4 */
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  body * { visibility: hidden; }
  .doc-wrap, .doc-wrap * { visibility: visible; }
  .doc-wrap { position: absolute; left: 0; top: 0; width: 210mm; max-width: none; margin: 0; container-type: normal; overflow: visible; }
  .doc-page, .doc-wrap.zoom .doc-page { width: 210mm; min-height: 297mm; box-shadow: none !important; border-radius: 0; font-size: calc(var(--pt, 12) * 1pt); }
  .doc-page .ind, .doc-wrap.zoom .doc-page .ind { text-indent: 12.5mm; }
  .doc-page .slot { background: none; box-shadow: none; }
}

/* Хуваалцах цонх */
.share-dialog { border: 0; padding: 0; border-radius: .75rem; box-shadow: 0 .5rem 2rem rgba(47, 43, 61, .3); width: min(520px, calc(100vw - 2rem)); }
.share-dialog::backdrop { background: rgba(47, 43, 61, .45); }
.share-card { padding: 1.5rem; margin: 0; }
.share-qr { border-radius: .5rem; border: 1px solid var(--bs-border-color); padding: .375rem; background: #fff; }
