/*
 * STX.mn, SelectTronics BMS-ийн design token (etech_bms/ui/theme/tokens.py) дээр суурилсан корпорацын сайт.
 * ISA-101: саарал гадаргуу, ганц accent (SelectTronics цэнхэр), статусын өнгө зөвхөн утгатай газар.
 * Харанхуй (graphite) үндсэн (системийн тохиргооноос үл хамааран, BMS шиг), цайвар нь товчоор.
 */
:root,
:root[data-theme="dark"] {
  --bg-base: #15181d;
  --bg-surface: #1c2027;
  --bg-surface-2: #232831;
  --bg-elevated: #2b313b;
  --border-subtle: #2d333d;
  --border-default: #3b424e;
  --border-strong: #7c8696;
  --text-primary: #e2e6ec;
  --text-secondary: #aab2be;
  --text-tertiary: #8e97a4;
  --status-normal: #62b48c;
  --status-warning: #edb03e;
  --status-alarm: #ff3b30;
  --tint-normal: rgba(79, 174, 128, 0.14);
  --tint-info: rgba(59, 130, 246, 0.16);
  --focus-ring: #7fbbfa;
  --accent: #4da0f7;
  --accent-hover: #3a8de8;
  --on-accent: #15181d;
  --brand-select: #eef2f8;
  --brand-tronics: #6433eb;
  --shot-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg-base: #e9ecf0;
  --bg-surface: #f6f7f9;
  --bg-surface-2: #e1e5ea;
  --bg-elevated: #ffffff;
  --border-subtle: #d3d9e0;
  --border-default: #bfc7d1;
  --border-strong: #6e7988;
  --text-primary: #1c2129;
  --text-secondary: #47505d;
  --text-tertiary: #525b68;
  --status-normal: #2b6a4b;
  --status-warning: #a04a08;
  --status-alarm: #c81e1e;
  --tint-normal: rgba(43, 106, 75, 0.12);
  --tint-info: rgba(29, 78, 216, 0.1);
  --focus-ring: #005fc2;
  --accent: #005fc2;
  --accent-hover: #004fa3;
  --on-accent: #ffffff;
  --brand-select: #182533;
  --brand-tronics: #6433eb;
  --shot-shadow: 0 20px 50px rgba(20, 30, 45, 0.18);
  color-scheme: light;
}

/* BMS: radius 6/8/12, Segoe UI/Inter 14px, mono Cascadia */
:root {
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;
  /* SelectTronics BMS-ийн фонт (etech_bms/ui/theme/tokens.py FONTS), skill: selecttronics-font */
  --font: "Segoe UI", "Inter", "Roboto", sans-serif;
  --mono: "Cascadia Mono", "Consolas", monospace;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

* { box-sizing: border-box; }
:lang(ko) { --font: "Segoe UI", "Inter", "Roboto", "Malgun Gothic", "Noto Sans KR", sans-serif; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg-base); color: var(--text-primary);
  font: 15px/1.6 var(--font); /* BMS body 14px; вэб уншихад 15 */ -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--bg-elevated); padding: 8px 12px; }

/* ── Толгой ─────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg-surface) 92%, transparent); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--border-subtle); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text-primary); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.logo img { height: 28px; width: auto; }
.logo .s { color: var(--brand-select); } .logo .t { color: var(--brand-tronics); }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { color: var(--text-secondary); padding: 8px 12px; border-radius: var(--r-md); font-size: 14px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text-primary); background: var(--bg-surface-2); }
.top .spacer { flex: 1; }
.tools { display: flex; align-items: center; gap: 8px; }
.select, .icon-btn { height: 36px; background: var(--bg-surface-2); color: var(--text-primary); border: 1px solid var(--border-default); border-radius: var(--r-md); font: inherit; font-size: 13px; }
.select { padding: 0 8px; }
.icon-btn { width: 36px; display: grid; place-items: center; cursor: pointer; }
.menu-btn { display: none; }

.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r-md); font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn.ghost { background: transparent; color: var(--text-primary); border-color: var(--border-default); }
.btn.ghost:hover { border-color: var(--border-strong); color: var(--text-primary); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }

/* ── Брэндийн нүүр: шинэ компанийн тэмдэг (теma-аас үл хамааран харанхуй тайз) ── */
.brand-hero { padding: 20px 0 0; }
.brand-stage { position: relative; overflow: hidden; border-radius: 28px; min-height: min(78vh, 760px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 72px 24px 88px;
  background: radial-gradient(900px 520px at 50% 38%, #101a2c 0%, #0a0e15 55%, #06080c 100%); border: 1px solid #1d2532; color: #e6ebf2; isolation: isolate; }
.brand-stage::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(closest-side at 50% 45%, #000 30%, transparent 100%); z-index: -1; }
/* Лого: JS-гүй/хөдөлгөөн багасгасан үед статик тод лого; JS үед canvas (brand-intro.js) "фотолитографи" */
.brand-mark-wrap { position: relative; width: min(480px, 74vw); aspect-ratio: 834 / 382; }
.brand-mark { width: 100%; height: auto; filter: drop-shadow(0 0 18px rgba(10,132,255,0.5)) drop-shadow(0 0 40px rgba(102,51,238,0.3)); }
.brand-canvas { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.brand-stage.litho .brand-mark { opacity: 0; filter: none; }
.brand-stage.litho::after { display: none; }
.brand-word { margin: 28px 0 10px; font-size: clamp(40px, 7vw, 84px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; animation: rise 1.1s 3.7s cubic-bezier(.2,.8,.2,1) both; }
.brand-word .s { color: #f1f4f9; } .brand-word .t { color: #7a57f5; }
.brand-tag { margin: 6px 0 0; min-height: 1.6em; font-size: clamp(18px, 2.4vw, 26px); font-weight: 600; letter-spacing: -0.01em; color: #c9d3e0; animation: fadeIn 0.4s 4.2s both; }
.brand-tag.typing::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -0.12em; background: #7a57f5; animation: caret 0.9s steps(1) infinite; }
.brand-since { margin-top: 26px; font: 600 12px var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: #7f8a9b; padding: 7px 14px; border: 1px solid #263042; border-radius: 999px; animation: rise 1s 6s cubic-bezier(.2,.8,.2,1) both; }
.brand-scroll { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: #7f8a9b; animation: fadeIn 0.6s 6.4s both, bob 2.4s 6.4s ease-in-out infinite; }
.brand-scroll:hover { color: #e6ebf2; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes ignite {
  0% { opacity: 0; transform: scale(0.42); filter: brightness(0.2) drop-shadow(0 0 0 rgba(10,132,255,0)); }
  35% { opacity: 1; filter: brightness(0.9) drop-shadow(0 0 10px rgba(10,132,255,0.5)); }
  70% { transform: scale(1.04); filter: brightness(1.55) drop-shadow(0 0 40px rgba(10,132,255,0.9)) drop-shadow(0 0 90px rgba(122,87,245,0.75)); }
  100% { opacity: 1; transform: scale(1); filter: brightness(1) drop-shadow(0 0 18px rgba(10,132,255,0.55)) drop-shadow(0 0 42px rgba(102,51,238,0.30)); }
}
@keyframes glowIn { from { opacity: 0; } to { opacity: 0.85; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes glow { 0%, 100% { opacity: 0.7; transform: translate(-52%, -62%); } 50% { opacity: 1; transform: translate(-48%, -60%); } }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }
.hero-title { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -0.025em; margin: 16px 0 18px; font-weight: 750; }
.hero-title .accent { color: var(--accent); display: block; }
@media (max-width: 640px) { .brand-stage { border-radius: 20px; min-height: 72vh; padding: 56px 16px 80px; } .brand-hero { padding-top: 12px; } }

/* ── Hero ──────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 112px) 0 48px; border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(1100px 500px at 85% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), var(--bg-base); }
.hero .grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-tertiary); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--status-normal); box-shadow: 0 0 0 4px var(--tint-normal); }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.08; letter-spacing: -0.025em; margin: 16px 0 18px; font-weight: 750; }
h1 .accent { color: var(--accent); display: block; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--text-secondary); max-width: 40em; margin: 0 0 28px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.shot { border-radius: var(--r-lg); border: 1px solid var(--border-default); box-shadow: var(--shot-shadow); overflow: hidden; background: var(--bg-surface); }
.shot img { width: 100%; height: auto; }
.hero .shot { transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 56px; background: var(--border-subtle); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; }
.fact { background: var(--bg-surface); padding: 20px 22px; border-top: 3px solid var(--accent); }
.fact b { display: block; font: 700 26px/1.2 var(--mono); letter-spacing: -0.02em; }
.fact span { color: var(--text-tertiary); font-size: 13px; }

/* ── Хэсгүүд ───────────────────────────────────────────── */
section.block { padding: clamp(56px, 8vw, 96px) 0; }
section.alt { background: var(--bg-surface); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.head { max-width: 760px; margin-bottom: 36px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.15; letter-spacing: -0.02em; margin: 8px 0 12px; }
h3 { font-size: 18px; margin: 0 0 6px; letter-spacing: -0.01em; }
.muted { color: var(--text-secondary); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 10px; transition: border-color 0.15s, transform 0.15s; }
section.alt .card { background: var(--bg-base); }
a.card { color: inherit; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit; }
.card .tag { font-size: 12px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; }
.card .name { font-size: 20px; font-weight: 700; }
.card p { margin: 0; color: var(--text-secondary); font-size: 14px; flex: 1; }
.card .more { font-weight: 600; font-size: 14px; color: var(--accent); }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--tint-info); color: var(--accent); }

.points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.point { padding: 22px; border-left: 3px solid var(--accent); background: var(--bg-surface); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
section.alt .point { background: var(--bg-base); }
.point p { margin: 0; color: var(--text-secondary); font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 600 13px var(--mono); padding: 8px 12px; border: 1px solid var(--border-default); border-radius: var(--r-md); background: var(--bg-surface-2); }

.layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; position: relative; }
.layer { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 22px; position: relative; }
.layer .n { font: 700 12px var(--mono); color: var(--accent); }

.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.split.rev { grid-template-columns: 1.15fr 1fr; }
.split.rev > :first-child { order: 2; }
ul.ticks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
ul.ticks li { position: relative; padding-left: 28px; color: var(--text-secondary); }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 14px; height: 8px; border-left: 2px solid var(--status-normal); border-bottom: 2px solid var(--status-normal); transform: rotate(-45deg); }

/* Бидний тухай */
.since { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-top: 3px solid var(--accent); border-radius: var(--r-lg); padding: 28px; }
.since b { display: block; font: 700 64px/1 var(--mono); letter-spacing: -0.03em; color: var(--accent); }
.since span { color: var(--text-tertiary); font-size: 14px; }
.since blockquote { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--border-subtle); font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.vm { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vm-card { background: var(--bg-base); border: 1px solid var(--border-subtle); border-left: 3px solid var(--accent); border-radius: 0 var(--r-lg) var(--r-lg) 0; padding: 28px; }
.vm-card p { margin: 10px 0 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; font-weight: 600; }
.card .num { font: 700 13px var(--mono); color: var(--accent); }
ol.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 2px solid var(--border-default); display: grid; gap: 24px; }
ol.timeline li { position: relative; }
ol.timeline li::before { content: ""; position: absolute; left: -36px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg-surface); }
ol.timeline b { font: 700 15px var(--mono); color: var(--accent); }
ol.timeline p { margin: 4px 0 0; color: var(--text-secondary); max-width: 52em; }
@media (max-width: 640px) { .vm { grid-template-columns: 1fr; } }
/* STX товчлол (Бидний тухай → эрхэм зорилгын доор) */
.stx-acronym { margin-top: 28px; }
.stx-letters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 12px; }
.stx-letter { display: flex; gap: 16px; align-items: flex-start; background: var(--bg-base); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 22px; }
.stx-letter b { font-size: 56px; line-height: 0.9; font-weight: 800; color: var(--accent); min-width: 0.8em; }
.stx-letter .word { display: block; font-weight: 700; font-size: 17px; }
.stx-letter p { margin: 6px 0 0; color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
@media (max-width: 760px) { .stx-letters { grid-template-columns: 1fr; } }

/* Баг (team.mjs): ижил хэлбэрийн карт, бүлгээр */
.team-group + .team-group { margin-top: 40px; }
.team-group h3 { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary); margin: 0 0 14px; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.person { display: flex; gap: 16px; align-items: flex-start; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 20px; }
.person .avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--tint-info); color: var(--accent); font-weight: 700; font-size: 22px; letter-spacing: 0.02em; }
.person b { display: block; font-size: 17px; color: var(--text-primary); }
.person .role { display: block; font-size: 13px; color: var(--accent); margin-top: 2px; }
.person p { margin: 8px 0 0; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.person .links { font-size: 13px; }
.person.draft { border-style: dashed; opacity: 0.75; }
.person.clickable { cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.person.clickable:hover, .person.clickable:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
.country { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }
.country .flag { flex: none; border-radius: 2px; box-shadow: 0 0 0 1px var(--border-subtle); }
.flag.code { font-size: 10px; font-weight: 700; padding: 1px 3px; background: var(--bg-elevated); color: var(--text-secondary); }
.team-countries { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; }
.team-countries .country { margin: 0; font-size: 14px; color: var(--text-secondary); }
.team-countries b { color: var(--text-primary); }
.pd-head .country { display: flex; margin-top: 6px; }
.team-filters { display: grid; gap: 8px; }
.chip .flag { vertical-align: -2px; margin-right: 6px; border-radius: 2px; }
.person .more { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--accent); }

/* Дэлгэрэнгүй цонх: хүн бүрт ижил бүтэц */
.person-dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--border-default); border-radius: var(--r-xl); background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shot-shadow); }
.person-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.person-dialog .pd-content { padding: 28px; overflow-y: auto; max-height: calc(100vh - 50px); }
.person-dialog .pd-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-default); background: var(--bg-elevated); color: var(--text-primary); font-size: 22px; line-height: 1; cursor: pointer; }
.person-dialog .pd-close:hover { border-color: var(--accent); }
.pd-head { display: flex; gap: 20px; align-items: center; padding-right: 40px; }
.pd-head .avatar { flex: none; width: 120px; height: 120px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--tint-info); color: var(--accent); font-weight: 700; font-size: 36px; }
.pd-head h3 { margin: 6px 0 2px; font-size: 24px; }
.pd-head .role { display: block; color: var(--accent); font-size: 15px; }
.pd-bio { margin: 18px 0 0; color: var(--text-secondary); line-height: 1.6; }
.pd-body section { margin-top: 22px; }
.pd-body h4 { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary); }
.pd-body ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.pd-body li { color: var(--text-secondary); line-height: 1.5; font-size: 15px; }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.pd-all { margin: 22px 0 0; font-size: 14px; font-weight: 600; }

/* /team/: бүх хүний дэлгэрэнгүй, шүүлт, хайлт */
.team-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--text-secondary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.chip span { color: var(--text-tertiary); font-weight: 500; margin-left: 4px; }
.chip:hover { border-color: var(--border-strong); color: var(--text-primary); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip[aria-pressed="true"] span { color: inherit; opacity: 0.75; }
.team-search { height: 40px; min-width: 260px; flex: 0 1 320px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: 15px; }
.team-search:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.team-full-group + .team-full-group { margin-top: 44px; }
.team-full-group > h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary); margin: 0 0 14px; }
.profile { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 28px; scroll-margin-top: 90px; }
.profile + .profile { margin-top: 16px; }
.profile:target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.profile.draft { border-style: dashed; opacity: 0.75; }
.profile .pd-head .avatar { width: 140px; height: 140px; font-size: 40px; }
.profile .pd-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.team-empty { text-align: center; padding: 40px 0; }
@media (max-width: 760px) { .profile .pd-body { grid-template-columns: 1fr; } .profile { padding: 20px; } .team-search { min-width: 0; flex: 1 1 100%; } }
@media (max-width: 640px) { .pd-head { flex-direction: column; align-items: flex-start; } .person-dialog .pd-content { padding: 22px 18px; } }
.person.draft b::after { content: " · draft"; font-weight: 500; font-size: 12px; color: var(--status-warning); }

/* Оршин суугчийн апп, утасны хүрээ */
.phones { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }
.phone { margin: 0; width: 250px; border-radius: 34px; padding: 9px; background: #0b0d10; border: 1px solid var(--border-default); box-shadow: var(--shot-shadow); cursor: zoom-in; }
.phone img { border-radius: 26px; width: 100%; height: auto; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gallery .shot { cursor: zoom-in; }

table.cmp { width: 100%; border-collapse: collapse; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; }
table.cmp th, table.cmp td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border-subtle); font-size: 14px; }
table.cmp th { font-size: 13px; color: var(--text-tertiary); font-weight: 600; background: var(--bg-surface-2); }
table.cmp td.y { color: var(--status-normal); font-weight: 700; text-align: center; }
table.cmp td.n { color: var(--text-tertiary); text-align: center; }
table.cmp th:not(:first-child) { text-align: center; }
/* Төслийн showcase */
.proj-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 28px; border-radius: var(--r-xl); overflow: hidden; background: var(--border-subtle); border: 1px solid var(--border-subtle); }
.proj-totals > div { background: linear-gradient(160deg, var(--bg-surface) 0%, var(--bg-elevated) 100%); padding: 22px 24px; display: grid; gap: 6px; }
.proj-totals b, .show-stats b { font-size: 46px; line-height: 1; font-weight: 800; letter-spacing: -0.02em; background: linear-gradient(120deg, var(--accent) 0%, #8b6cff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.proj-totals span, .show-stats span { font-size: 14px; color: var(--text-secondary); }
.showcase { display: grid; gap: 24px; }
.show { position: relative; overflow: hidden; border-radius: var(--r-xl); border: 1px solid var(--border-default); background: var(--bg-surface); scroll-margin-top: 90px; isolation: isolate; }
.show:target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.show-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; opacity: 0.22; z-index: -2; transform: scale(1.04); transition: transform 6s ease, opacity 0.6s ease; }
.show::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, var(--bg-surface) 25%, color-mix(in srgb, var(--bg-surface) 70%, transparent) 60%, color-mix(in srgb, var(--bg-surface) 35%, transparent) 100%); }
.show:hover .show-bg { transform: scale(1.1); opacity: 0.3; }
.show-in { padding: 34px; display: grid; gap: 26px; }
.show-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.show-head h3 { margin: 6px 0 4px; font-size: 32px; line-height: 1.15; }
.show-scope { margin: 0; color: var(--text-secondary); font-size: 15px; }
.show-meta { display: grid; gap: 8px; justify-items: end; }
.show-meta .done { font-size: 13px; color: var(--status-normal); font-weight: 600; }
.show-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.show-stats > div { display: grid; gap: 6px; padding: 18px 20px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--bg-elevated) 80%, transparent); border: 1px solid var(--border-subtle); backdrop-filter: blur(6px); }
.show-stats b { font-size: 56px; }
.show-sys { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.show-sys li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: 13px; background: color-mix(in srgb, var(--bg-elevated) 85%, transparent); border: 1px solid var(--border-subtle); color: var(--text-primary); }
.show-sys svg { color: var(--accent); flex: none; }
@media (max-width: 760px) { .proj-totals { grid-template-columns: repeat(2, 1fr); } .show-in { padding: 22px; } .show-head h3 { font-size: 24px; } .show-stats { grid-template-columns: 1fr; } .show-stats b { font-size: 44px; } .show-meta { justify-items: start; } .proj-totals b { font-size: 36px; } }

/* Системүүдийн холболтын схем */
.dg-wrap { overflow-x: auto; border-radius: var(--r-xl); border: 1px solid var(--border-subtle); background: radial-gradient(1200px 500px at 50% 40%, color-mix(in srgb, var(--accent) 7%, var(--bg-base)) 0%, var(--bg-base) 70%); }
svg.dg { display: block; width: 100%; min-width: 960px; height: auto; font-family: inherit; }
.dg-panel { fill: color-mix(in srgb, var(--bg-surface) 88%, transparent); stroke: var(--border-default); }
.dg-bus { fill: color-mix(in srgb, var(--accent) 8%, var(--bg-surface)); stroke: color-mix(in srgb, var(--accent) 45%, var(--border-default)); }
.dg-core { fill: color-mix(in srgb, var(--accent) 12%, var(--bg-surface)); stroke: var(--accent); stroke-width: 2; }
.dg-box { fill: var(--bg-elevated); stroke: var(--border-default); }
.dg-erp { stroke-dasharray: 5 4; }
.dg-edge { fill: color-mix(in srgb, #8b6cff 16%, var(--bg-elevated)); stroke: #8b6cff; }
.dg-chip { fill: var(--bg-elevated); stroke: var(--border-default); }
.dg-proto { fill: var(--bg-elevated); stroke: color-mix(in srgb, var(--accent) 55%, var(--border-default)); }
.dg-fire-c { stroke: #ff6b5e; } .dg-sec-c { stroke: #4da0f7; } .dg-clim-c { stroke: #62b48c; } .dg-util-c { stroke: #edb03e; }
.dg-core-c { stroke: color-mix(in srgb, var(--accent) 60%, var(--border-default)); fill: var(--bg-surface); }
.dg-out-c, .dg-cloud-c { stroke: var(--border-default); }
.dg-t { fill: var(--text-primary); font-size: 13px; }
.dg-small { font-size: 11.5px; }
.dg-h { fill: var(--text-tertiary); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.dg-g { font-size: 12.5px; font-weight: 700; }
.dg-fire { fill: #ff6b5e; } .dg-sec { fill: #4da0f7; } .dg-clim { fill: #62b48c; } .dg-util { fill: #edb03e; }
.dg-title { fill: var(--text-primary); font-size: 24px; font-weight: 800; }
.dg-title2 { fill: var(--text-primary); font-size: 15px; font-weight: 700; }
.dg-sub { fill: var(--text-secondary); font-size: 12px; }
.dg-link { fill: none; stroke: var(--accent); stroke-width: 2; }
.dg-arrow { fill: var(--accent); }
.dg-flow { stroke-dasharray: 6 5; animation: dgflow 1.1s linear infinite; }
@keyframes dgflow { to { stroke-dashoffset: -11; } }
@media (prefers-reduced-motion: reduce) { .dg-flow { animation: none; } }

/* Сошиал, видео */
.socials { display: flex; gap: 8px; margin-top: 14px; }
.social { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border-default); color: var(--text-secondary); }
.social:hover { color: var(--accent); border-color: var(--accent); }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.video { margin: 0; display: grid; gap: 10px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border-default); background: #000; }
.video-frame video, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-yt { position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; background-size: cover; background-position: center; }
.video-yt .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: rgba(0, 0, 0, 0.7); }
.video-yt .play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.video-yt:hover .play { background: #e00; }
.video figcaption { display: grid; gap: 2px; }
.video figcaption span { font-size: 14px; color: var(--text-secondary); }
@media (max-width: 640px) { .videos { grid-template-columns: 1fr; } }

/* Хамтрагч байгууллагууд */
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.partner { display: grid; gap: 10px; justify-items: center; text-align: center; color: var(--text-secondary); text-decoration: none; }
.logo-tile { width: 100%; height: 140px; display: grid; place-items: center; border-radius: var(--r-lg); border: 1px solid var(--border-subtle); padding: 18px; transition: border-color 0.15s, transform 0.15s; }
.logo-tile.light { background: #fff; }
.logo-tile.dark { background: #1c2027; }
.logo-tile img { width: auto; height: auto; max-width: 100%; max-height: 104px; object-fit: contain; } /* 140 - 2×18 padding; grid дотор % өндөр ажилладаггүй */
a.partner:hover .logo-tile { border-color: var(--accent); transform: translateY(-2px); }
.partner-name { font-size: 14px; font-weight: 600; }

/* Хэрэгжүүлсэн төслүүд */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 20px; }
.project { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 26px; display: grid; gap: 18px; scroll-margin-top: 90px; }
.project:target { border-color: var(--accent); }
.project-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.project-head h3 { margin: 6px 0 0; font-size: 22px; }
.project-meta { display: grid; gap: 8px; justify-items: end; }
.project-meta .done { font-size: 13px; color: var(--status-normal); font-weight: 600; }
.project-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border-subtle); border: 1px solid var(--border-subtle); border-radius: var(--r-md); overflow: hidden; }
.project-stats div { background: var(--bg-elevated); padding: 14px 16px; display: grid; gap: 4px; }
.project-stats b { font-size: 30px; line-height: 1; color: var(--accent); }
.project-stats span { font-size: 13px; color: var(--text-secondary); }
.project-scope { margin: 0; color: var(--text-secondary); font-size: 15px; }
.project .tag { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 6px; }
.project-systems ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.project-systems li { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--tint-info); color: var(--text-primary); }
@media (max-width: 640px) { .projects { grid-template-columns: 1fr; } .project-meta { justify-items: start; } .project-stats b { font-size: 24px; } }

/* BMS дэлгэрэнгүй танилцуулга */
.scenarios { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.scenario { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-left: 3px solid var(--status-alarm); border-radius: var(--r-lg); padding: 24px; }
.scenario + .scenario { border-left-color: var(--status-warning); }
.scenario h3 { margin: 0 0 14px; }
ol.steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
ol.steps li { color: var(--text-secondary); line-height: 1.55; }
ol.steps li::marker { color: var(--accent); font-weight: 700; }
.cards.modules { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card.module .ticks { margin: 4px 0 0; }
.card.module .ticks li { font-size: 14px; }
.economy { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; margin-bottom: 24px; }
.economy .big { display: grid; gap: 4px; padding: 20px 28px; border-radius: var(--r-lg); background: var(--tint-normal); border: 1px solid var(--status-normal); }
.economy .big b { font-size: 44px; line-height: 1; color: var(--status-normal); }
.economy .big span { font-size: 14px; color: var(--text-secondary); max-width: 16em; }
table.savings td, table.savings th { text-align: left !important; }
table.savings td.pct { font-weight: 700; color: var(--status-normal); white-space: nowrap; }
.points.life { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .scenarios, .points.life, .economy { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; }

.band { background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 22%, var(--bg-surface)), var(--bg-surface)); border: 1px solid var(--border-default); border-radius: var(--r-xl); padding: clamp(28px, 5vw, 48px); display: flex; align-items: center; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.band h2 { margin: 0 0 6px; }
.band p { margin: 0; color: var(--text-secondary); }

.page-head { padding: clamp(48px, 7vw, 80px) 0 32px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-surface); }
.page-head h1 { font-size: clamp(30px, 4vw, 46px); margin: 8px 0 12px; }
.crumbs { font-size: 13px; color: var(--text-tertiary); }
.crumbs a { color: var(--text-tertiary); } .crumbs a:hover { color: var(--text-primary); }

form.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
form.contact .full { grid-column: 1 / -1; }
form.contact .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
form.contact { position: relative; }
form.contact .note.err { color: var(--status-alarm); }
label { display: grid; gap: 6px; font-size: 13px; color: var(--text-secondary); font-weight: 600; }
input, textarea, select.field { font: inherit; font-size: 15px; color: var(--text-primary); background: var(--bg-base); border: 1px solid var(--border-default); border-radius: var(--r-md); padding: 10px 12px; min-height: 44px; }
textarea { min-height: 120px; resize: vertical; }
.note { font-size: 13px; color: var(--status-normal); }

/* ── Хөл ───────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border-subtle); background: var(--bg-surface); padding: 48px 0 28px; margin-top: 0; }
footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-tertiary); margin: 0 0 12px; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer a { color: var(--text-secondary); font-size: 14px; } footer a:hover { color: var(--text-primary); }
footer .base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border-subtle); font-size: 13px; color: var(--text-tertiary); }

/* Зураг томруулах */
dialog.zoom { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
dialog.zoom::backdrop { background: rgba(0, 0, 0, 0.8); }
dialog.zoom img { max-height: 92vh; width: auto; border-radius: var(--r-lg); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero .grid, .split, .split.rev { grid-template-columns: 1fr; }
  .split.rev > :first-child { order: 0; }
  .hero .shot { transform: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1180px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle); padding: 8px var(--gutter) 16px; margin: 0; }
  .nav.open { display: flex; }
  .menu-btn { display: grid; }
  .tools .login-btn { display: none; }
}
@media (max-width: 640px) {
  .cards, .points, .layers, .gallery, form.contact { grid-template-columns: 1fr; }
  footer .cols { grid-template-columns: 1fr; }
  .facts { margin-top: 36px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; animation: none !important; } .hero .shot { transform: none; } .brand-mark { opacity: 1 !important; } }

/* Мэдээ (ERP «Вэбсайт» модулиас) */
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.news-card { display: grid; grid-template-rows: auto 1fr; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; color: inherit; text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.news-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.news-card > img, .news-noimg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--bg-elevated, var(--bg-surface)); }
.news-noimg { display: grid; place-items: center; }
.news-noimg img { width: 56px; opacity: 0.5; }
.news-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.news-body time { font: 600 12px var(--mono); color: var(--text-tertiary); }
.news-body b { font-size: 18px; line-height: 1.35; }
.news-body .muted { font-size: 14px; flex: 1; }
.news-body .more { font-weight: 600; font-size: 14px; color: var(--accent); }
.news-article { max-width: 760px; }
.news-article > time { display: block; margin-bottom: 18px; font: 600 13px var(--mono); }
.news-cover { width: 100%; border-radius: var(--r-lg); border: 1px solid var(--border-subtle); margin: 16px 0 8px; }
.prose p { font-size: 17px; line-height: 1.75; color: var(--text-secondary); margin: 0 0 1.1em; overflow-wrap: anywhere; }
@media (max-width: 640px) { .news-list { grid-template-columns: 1fr; } .prose p { font-size: 16px; } }
