/* EduGen — дулаан, тайван, хөнгөн. Хямд утас, удаан интернэтэд зориулав. */
:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --surface-2: #f3ece0;
  --ink: #1f2a2e;
  --ink-2: #4b585c;
  --line: #e4dccd;
  --brand: #2f6f5e;      /* хээрийн ногоон */
  --brand-ink: #ffffff;
  --brand-soft: #e2efe9;
  --accent: #d98e2b;     /* шар тос */
  --accent-soft: #fbecd6;
  --warn: #b5482f;
  --warn-soft: #f8e1da;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(31,42,46,.06), 0 6px 20px rgba(31,42,46,.06);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161b1c; --surface: #1f2627; --surface-2: #273032; --ink: #eef1ee; --ink-2: #b4bfbc;
    --line: #34403f; --brand: #6fbfa6; --brand-ink: #10201b; --brand-soft: #22342f;
    --accent: #f0ad55; --accent-soft: #3a2f1f; --warn: #ef8a71; --warn-soft: #3b2722;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }

/* Navigation */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.logo { font-weight: 900; font-size: 1.25rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo b { color: var(--brand); font-weight: 900; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 700; color: var(--ink); }
@media (max-width: 1060px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; flex-direction: column; }
  .nav.open { display: flex; }
}

/* Sections */
section { padding: 48px 0; }
.hero { padding: 56px 0 40px; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 640px; }
.pill { display: inline-block; background: var(--accent-soft); color: var(--ink); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .85rem; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.soft { background: var(--surface-2); box-shadow: none; }
.card.brand { background: var(--brand-soft); border-color: transparent; box-shadow: none; }
.card.accent { background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.card.warn { background: var(--warn-soft); border-color: transparent; box-shadow: none; }
.card h3 { margin-bottom: .35em; }
.num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 900; margin-bottom: 8px; }
ul.clean { list-style: none; padding: 0; margin: 0; }
ul.clean li { padding: 6px 0 6px 28px; position: relative; }
ul.clean li::before { content: "✓"; position: absolute; left: 4px; color: var(--brand); font-weight: 900; }
ul.no li::before { content: "✕"; color: var(--warn); }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; border: 2px solid var(--brand); background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; min-height: 48px; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.sm { padding: 6px 12px; min-height: 36px; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
label { font-weight: 700; display: block; margin-bottom: 6px; }
input[type=text], input[type=number], textarea, select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; }
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { font: inherit; font-weight: 800; border: 2px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* Checklists */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.check input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.check label { font-weight: 600; margin: 0; }

/* Bars */
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 160px; margin-top: 12px; }
.bar { background: var(--brand); border-radius: 8px 8px 0 0; min-height: 2px; position: relative; }
.bar span { position: absolute; top: -22px; left: 0; right: 0; text-align: center; font-size: .8rem; font-weight: 800; color: var(--ink); }
.bar-labels { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; text-align: center; font-size: .8rem; color: var(--ink-2); }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-2); font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }

.say { border-left: 4px solid var(--brand); padding: 8px 14px; margin: 8px 0; background: var(--surface); border-radius: 0 10px 10px 0; }
.say.bad { border-color: var(--warn); }
.hide { display: none !important; }
.center { text-align: center; }

/* Print — ажлын хуудас */
.sheet { background: #fff; color: #111; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 24px; }
.sheet h2 { font-size: 1.5rem; }
.sheet .name-line { display: flex; gap: 24px; margin-bottom: 18px; font-size: .95rem; }
.sheet .name-line span { flex: 1; border-bottom: 1px solid #999; }
.trace { font-size: 44px; letter-spacing: 18px; line-height: 1.6; color: #c9c9c9; border-bottom: 2px dashed #bbb; white-space: nowrap; overflow: hidden; }
.trace b { color: #111; }
.house { display: inline-grid; grid-template-columns: 1fr 1fr; width: 120px; margin: 10px; text-align: center; font-size: 26px; font-weight: 800; }
.house .roof { grid-column: span 2; border: 2px solid #111; border-bottom: none; border-radius: 60px 60px 0 0; padding: 4px; }
.house .cell { border: 2px solid #111; height: 48px; }
.stars { display: grid; grid-template-columns: 110px repeat(7, 1fr); border: 2px solid #111; }
.stars div { border: 1px solid #999; min-height: 44px; padding: 4px; font-size: .85rem; }
.stars .h { font-weight: 800; background: #f2f2f2; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff; color: #000; font-size: 14px; }
  .top, footer, .no-print { display: none !important; }
  .sheet { border: none; padding: 0; margin: 0; page-break-after: always; }
  .sheet:not(.printing) { display: none; }
  body:not(.print-one) .sheet { display: block; }
}

/* Нүүр хуудасны утасны жишээ — хүүхдийн хэсгийн өнгийг урьдчилан харуулна */
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } }
.phone { display: block; justify-self: center; width: 250px; padding: 10px; border-radius: 38px; background: #26215c; box-shadow: 0 18px 40px rgba(38,33,92,.25); text-decoration: none; transform: rotate(2deg); }
.phone-screen { border-radius: 30px; background: #ffd25a radial-gradient(rgba(255,255,255,.35) 2px, transparent 2.5px) 0 0/22px 22px; padding: 16px 14px 18px; color: #26215c; font-weight: 900; }
.ph-top { display: flex; gap: 4px; align-items: center; margin-bottom: 14px; }
.ph-top i { flex: 1; height: 6px; border-radius: 6px; background: rgba(38,33,92,.18); }
.ph-top i.on { background: #26215c; }
.ph-top span { background: #fff; border: 2px solid #26215c; border-radius: 999px; padding: 0 8px; font-size: .8rem; }
.ph-tag { font-size: .8rem; }
.ph-title { font-size: 1.5rem; line-height: 1.1; margin: 2px 0 10px; }
.ph-stage { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 24px; margin: 16px 0; }
.ph-stage span { background: rgba(255,255,255,.6); border: 2px dashed #26215c; border-radius: 12px; padding: 4px 6px; }
.ph-bubble { display: flex; gap: 6px; align-items: flex-end; font-size: .8rem; margin-bottom: 12px; }
.ph-bubble i { font-style: normal; font-size: 22px; background: #fff; border: 2px solid #26215c; border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; flex: none; }
.ph-bubble span { background: #fff; border: 2px solid #26215c; border-radius: 12px 12px 12px 3px; padding: 6px 8px; }
.ph-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph-opts b { background: #fff; border: 2px solid #26215c; border-radius: 14px; box-shadow: 0 4px 0 #26215c; text-align: center; padding: 8px 0; font-size: 1.2rem; }
.ph-opts b.ok { background: #17924d; color: #fff; border-color: #0f6b38; box-shadow: 0 4px 0 #0f6b38; }
@media (prefers-reduced-motion: no-preference) { .phone { transition: transform .3s ease; } .phone:hover { transform: rotate(0) scale(1.02); } }
