/* ERI — eri.kz
   Style reference: NBER (serif headlines, Arimo body, generous white space, thin rules).
   Colours: taken from the ERI logo (#156BA3). Change the tokens below to restyle the site. */

:root {
  --blue: #156ba3;        /* logo blue */
  --blue-dark: #0e4f7a;   /* hover / footer bottom */
  --blue-deep: #0b3d5f;
  --blue-tint: #eef4f9;   /* hero, panels */
  --blue-line: #cfe0ec;
  --ink: #23262b;         /* headings */
  --text: #3b3f46;        /* body text */
  --muted: #676c75;
  --rule: #dfe2e6;
  --bg: #ffffff;
  --bg-alt: #f6f7f8;
  --error: #a3262a;
  --error-bg: #fbeeee;
  --ok: #1d6b3a;

  --serif: 'Source Serif', 'Tiempos Headline', Georgia, 'Times New Roman', serif;
  --sans: 'Arimo', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --wrap: 1200px;
  --gutter: 16px;
  --radius: 2px;
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (min-width: 1024px) { body { font-size: 17px; } }

img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
:focus-visible { outline: 3px solid #f2b632; outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.2; font-weight: 700; margin: 0 0 .5em; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
address { font-style: normal; }
.icon { vertical-align: -0.15em; flex: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
main:focus { outline: none; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 44px; padding: .6em 1.3em;
  font: 700 .95rem/1.2 var(--sans); letter-spacing: .01em;
  border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-light { background: #fff; color: var(--blue-deep); }
.btn-light:hover { background: var(--blue-tint); color: var(--blue-deep); }
.btn-block { width: 100%; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.inline-form { display: inline; margin: 0; }

/* ---------- header */
.site-header { border-bottom: 1px solid var(--rule); background: #fff; position: relative; z-index: 20; }
.utility { background: var(--bg-alt); border-bottom: 1px solid var(--rule); font-size: .8125rem; }
.utility-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; flex-wrap: wrap; }
.utility a, .utility .link-button { color: var(--text); }
.utility a:hover, .utility .link-button:hover { color: var(--blue); }
.langs { display: flex; align-items: center; gap: 2px; }
.langs a { padding: 6px 6px; font-weight: 700; letter-spacing: .03em; }
.langs a.active { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; }
.langs .sep { color: #b4b8be; }
.account { display: flex; align-items: center; gap: 14px; }
.account .who { color: var(--muted); display: none; }
@media (min-width: 640px) { .account .who { display: inline; } }
.login-link { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; }

.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand img { width: 64px; height: auto; flex: none; }
.brand-name {
  font-family: var(--serif); font-weight: 600; font-size: 1.05rem; line-height: 1.2;
  padding-left: 14px; border-left: 1px solid var(--rule); max-width: 15ch;
}
@media (min-width: 1024px) {
  .masthead { min-height: 110px; }
  .brand img { width: 84px; }
  .brand-name { font-size: 1.3rem; max-width: 16ch; }
}

.menu-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 10px;
  border: 1px solid var(--rule); background: #fff; color: var(--ink); border-radius: var(--radius);
  font: 700 .85rem var(--sans); cursor: pointer;
}
.menu-toggle .when-open { display: none; }
.menu-toggle[aria-expanded="true"] .when-open { display: inline-flex; }
.menu-toggle[aria-expanded="true"] .when-closed { display: none; }
.menu-label { display: none; }
@media (min-width: 400px) { .menu-label { display: inline; } }

.primary-nav { display: none; }
.primary-nav.open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--rule); box-shadow: 0 12px 24px rgba(0,0,0,.08);
  padding: 8px var(--gutter) 20px; max-height: calc(100vh - 120px); overflow-y: auto;
}
.primary-list { list-style: none; margin: 0; padding: 0; }
.primary-list a {
  display: flex; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--rule);
  color: var(--ink); font-weight: 700; font-size: 1.05rem;
}
.primary-list a.active { color: var(--blue); }
.mobile-sections .mobile-heading { margin: 18px 0 4px; font: 700 .75rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mobile-sections ul { list-style: none; margin: 0; padding: 0; columns: 2 220px; column-gap: 24px; }
.mobile-sections a { display: block; padding: 8px 0; color: var(--text); break-inside: avoid; }

@media (min-width: 960px) {
  .menu-toggle { display: none; }
  .primary-nav, .primary-nav.open { display: block; position: static; box-shadow: none; border: 0; padding: 0; max-height: none; overflow: visible; }
  .primary-list { display: flex; gap: 28px; }
  .primary-list a { border: 0; padding: 8px 0; font-size: 1rem; border-bottom: 3px solid transparent; }
  .primary-list a:hover { text-decoration: none; border-bottom-color: var(--blue-line); }
  .primary-list a.active { border-bottom-color: var(--blue); }
  .library-link { color: var(--blue) !important; }
  .mobile-sections { display: none; }
}

/* ---------- home */
.hero { background: var(--blue-tint); border-bottom: 1px solid var(--blue-line); }
.hero-inner { padding-top: 48px; padding-bottom: 52px; }
.eyebrow { font: 700 .75rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--blue); margin-bottom: 14px; }
.hero-title { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 700; max-width: 18ch; margin-bottom: .3em; }
.hero-tagline { font-family: var(--serif); font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--blue-deep); max-width: 40ch; line-height: 1.35; }
.hero-lead { max-width: 62ch; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
@media (min-width: 1024px) { .hero-inner { padding-top: 76px; padding-bottom: 80px; } }

.block { padding-top: 48px; padding-bottom: 56px; }
.section-title {
  font-size: 1.6rem; padding-top: 14px; border-top: 3px solid var(--ink); display: inline-block; margin-bottom: 24px;
}
.tile-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--rule); }
@media (min-width: 640px) { .tile-grid { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
@media (min-width: 1024px) { .tile-grid { grid-template-columns: repeat(3, 1fr); column-gap: 40px; } }
.tile {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 14px 2px; border-bottom: 1px solid var(--rule);
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--ink);
}
.tile .icon { color: var(--blue); transition: transform .15s; }
.tile:hover { color: var(--blue); text-decoration: none; }
.tile:hover .icon { transform: translateX(4px); }

.library-band { background: var(--blue); color: #fff; }
.library-band-inner { display: flex; flex-direction: column; gap: 20px; padding-top: 40px; padding-bottom: 44px; }
.library-band p { max-width: 62ch; margin: 0; color: #e3eef6; }
.band-title { color: #fff; font-size: 1.6rem; display: flex; align-items: center; gap: 10px; }
@media (min-width: 800px) { .library-band-inner { flex-direction: row; align-items: center; justify-content: space-between; } }

/* ---------- content pages */
.page-layout { display: grid; grid-template-columns: 1fr; gap: 24px; padding-top: 24px; padding-bottom: 64px; }
@media (min-width: 960px) { .page-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 56px; padding-top: 44px; } }
.content { min-width: 0; max-width: 800px; }
.crumbs { font-size: .8125rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.page-title { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin-bottom: .45em; }
.page-date { color: var(--muted); font-size: .9rem; margin-top: -.3em; }
.notice { background: var(--blue-tint); border-left: 3px solid var(--blue); padding: 10px 14px; font-size: .9rem; }
.restricted-tag { display: inline-flex; align-items: center; gap: 6px; font: 700 .7rem var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--blue); margin-bottom: 10px; }
.restricted-tag.light { color: #cfe3f1; }

.side-details { border: 1px solid var(--rule); border-radius: var(--radius); }
.side-details > summary {
  list-style: none; cursor: pointer; padding: 12px 14px; min-height: 44px;
  font: 700 .8rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center;
}
.side-details > summary::-webkit-details-marker { display: none; }
.side-details > summary::after { content: '+'; font-size: 1.2rem; color: var(--blue); }
.side-details[open] > summary::after { content: '−'; }
.side-home { margin: 0; padding: 0 14px 6px; font-size: .9rem; }
.side-nav { list-style: none; margin: 0; padding: 0 0 8px; }
.side-nav ul { list-style: none; margin: 0 0 6px; padding: 0 0 0 14px; border-left: 2px solid var(--blue-line); margin-left: 14px; }
.side-nav a { display: block; padding: 7px 14px; color: var(--text); font-size: .95rem; line-height: 1.35; }
.side-nav ul a { font-size: .9rem; padding: 5px 10px; }
.side-nav a:hover { color: var(--blue); text-decoration: none; background: var(--bg-alt); }
.side-nav a[aria-current="page"], .side-nav a.in-section { color: var(--blue); font-weight: 700; }
.side-nav > li > a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--blue); }
@media (min-width: 960px) {
  .side-details { border: 0; position: sticky; top: 20px; }
  .side-details > summary { padding: 0 0 12px; border-bottom: 3px solid var(--ink); margin-bottom: 8px; cursor: default; pointer-events: none; }
  .side-details > summary::after { content: none; }
  .side-home { padding: 4px 0 8px; }
  .side-nav a { padding-left: 12px; }
}

/* ---------- markdown content */
.prose { font-size: 1.0625rem; line-height: 1.7; overflow-wrap: break-word; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.4em; }
.prose img { display: block; margin: 1.2em 0; border: 1px solid var(--rule); background: #fff; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose blockquote { margin: 1.2em 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--blue); color: var(--ink); font-family: var(--serif); font-size: 1.15rem; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.prose strong { color: var(--ink); }
.prose a { text-decoration: underline; text-decoration-color: var(--blue-line); }
.prose a:hover { text-decoration-color: currentColor; }
.prose .doc-link { font-weight: 700; text-decoration: none; }
.prose .doc-link::before {
  content: ''; display: inline-block; width: .8em; height: 1em; margin-right: .45em; vertical-align: -0.12em;
  border: 2px solid currentColor; border-radius: 1px; clip-path: polygon(0 0, 65% 0, 100% 30%, 100% 100%, 0 100%);
}
.prose .doc-meta { font-size: .75rem; color: var(--muted); white-space: nowrap; letter-spacing: .03em; }
.table-wrap { overflow-x: auto; margin: 1.2em 0; -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; width: 100%; font-size: .9rem; line-height: 1.45; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 8px 10px; vertical-align: top; text-align: left; }
.prose th { background: var(--bg-alt); color: var(--ink); }
.prose td p:last-child { margin: 0; }

.listing { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.listing li { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.listing time { font-size: .8rem; color: var(--muted); font-weight: 700; letter-spacing: .03em; }
.listing h2 { font-size: 1.25rem; margin: 4px 0 6px; }
.listing h2 a { color: var(--ink); }
.listing h2 a:hover { color: var(--blue); }
.listing p { margin: 0; color: var(--text); font-size: .95rem; }

/* ---------- contacts */
.lead-name { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--rule); margin-bottom: 32px; }
@media (min-width: 640px) { .contact-grid { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.contact-card { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.contact-card h2 { font: 700 .78rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.contact-card p, .contact-card address { margin: 0; font-size: 1.05rem; color: var(--ink); }
.contact-card p.small { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.sub-title { font-size: 1.3rem; }

/* ---------- social */
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.social a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; border-radius: 50%; color: #fff; border: 1px solid rgba(255,255,255,.45); }
.social a:hover { background: #fff; color: var(--blue); text-decoration: none; }
.social-dark a { border-radius: var(--radius); border-color: var(--rule); color: var(--ink); padding: 0 16px; font-weight: 700; }
.social-dark a:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- forms / auth */
.auth-wrap { padding-top: 40px; padding-bottom: 72px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card.center { text-align: center; }
.form label { display: block; font-weight: 700; color: var(--ink); font-size: .9rem; margin: 16px 0 6px; }
.form input[type="text"], .form input[type="password"], .form input[type="email"] { width: 100%; }
input[type="text"], input[type="password"], input[type="email"], input[type="search"] {
  min-height: 46px; padding: 10px 12px; font: 400 1rem var(--sans); color: var(--ink);
  border: 1px solid #b9bec5; border-radius: var(--radius); background: #fff;
}
input:focus { border-color: var(--blue); outline: 2px solid var(--blue-line); outline-offset: 0; }
.form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--text); margin: 12px 0 20px; }
.form label.check input { width: 18px; height: 18px; }
.form .small { margin: 6px 0 0; }
.alert { padding: 12px 14px; border-radius: var(--radius); font-size: .95rem; }
.alert-error { background: var(--error-bg); color: var(--error); border-left: 3px solid var(--error); }
.alert-info { background: var(--blue-tint); color: var(--blue-deep); border-left: 3px solid var(--blue); }
.help { margin-top: 22px; }

/* ---------- library */
.library-head { background: var(--blue-deep); color: #e3eef6; }
.library-head .wrap { padding-top: 36px; padding-bottom: 36px; }
.library-head .page-title { color: #fff; }
.library-head strong { color: #fff; }
.search-form { display: flex; gap: 8px; max-width: 640px; margin-top: 18px; }
.search-form input { flex: 1; min-width: 0; border-color: transparent; }
.btn-text { display: none; }
@media (min-width: 480px) { .btn-text { display: inline; } }

/* ---------- footer */
.site-footer { background: var(--blue); color: #e3eef6; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 36px; padding-top: 48px; padding-bottom: 40px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.1fr 1fr 1.3fr; gap: 56px; } }
.footer-logo { width: 96px; margin-bottom: 16px; }
.legal-name { font-family: var(--serif); font-size: 1.1rem; color: #fff; margin-bottom: 8px; }
.footer-title { font: 700 .78rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: #fff; margin-bottom: 12px; }
.site-footer .muted { color: #d4e5f1; }
.footer-contacts .label { color: #bcd6e9; font-size: .85rem; }
.social-title { margin-top: 26px; }
.newsletter-form { margin: 0; }
.newsletter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-row input { flex: 1 1 200px; min-width: 0; border-color: transparent; }
.newsletter-row .btn { flex: 0 0 auto; }
.consent { font-size: .78rem; color: #bcd6e9; margin: 8px 0 0; }
.newsletter-status { min-height: 1.4em; margin: 8px 0 0; font-weight: 700; color: #fff; }
.newsletter-status.error { color: #ffd7d7; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.25); padding-top: 20px; padding-bottom: 28px; font-size: .8rem; color: #bcd6e9; }
.footer-bottom p { margin: 0 0 8px; max-width: 90ch; }
.footer-bottom strong { color: #fff; }

@media print {
  .site-header .utility, .menu-toggle, .sidebar, .site-footer, .library-band { display: none !important; }
  .page-layout { display: block; }
  a { color: inherit; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- admin overview */
.data-table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.data-table th, .data-table td { border-bottom: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
.data-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.data-table.small { font-size: .8rem; }
.nowrap { white-space: nowrap; }
.status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .75rem; font-weight: 700; background: var(--bg-alt); }
.status-active { background: #e5f3ea; color: var(--ok); }
.status-disabled { background: var(--error-bg); color: var(--error); }
.status-locked, .status-temp { background: #fff4dc; color: #7a5300; }
.admin .section-title { margin-top: 36px; }
.batch { border-bottom: 1px solid var(--rule); padding: 8px 0; }
.batch summary { cursor: pointer; }

/* ---------- people (former leaders, notable figures) */
.prose .people { border-top: 1px solid var(--rule); margin-top: 8px; }
.prose .person { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.prose .person-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; margin: 0; background: var(--bg-alt); }
.prose .person-name { font-size: 1.2rem; margin: 2px 0 4px; }
.prose .person-note { color: var(--muted); font-size: .92rem; margin: 0 0 8px; }
.prose .person-bio > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; cursor: pointer; color: var(--blue); font-weight: 700; font-size: .92rem; list-style: none; }
.prose .person-bio > summary::-webkit-details-marker { display: none; }
.prose .person-bio > summary::after { content: '+'; font-size: 1.1rem; line-height: 1; }
.prose .person-bio[open] > summary::after { content: '−'; }
.prose .person-bio[open] > summary { margin-bottom: 6px; }
.prose .person-bio p { font-size: .97rem; line-height: 1.65; }
@media (min-width: 640px) {
  .prose .person { grid-template-columns: 140px minmax(0, 1fr); gap: 24px; }
  .prose .person-name { font-size: 1.35rem; }
}
.prose .people--items .person-photo { aspect-ratio: 1 / 1; object-fit: contain; padding: 8px; background: #fff; border: 1px solid var(--rule); }
.prose .people--items .person { grid-template-columns: 80px minmax(0, 1fr); }
@media (min-width: 640px) { .prose .people--items .person { grid-template-columns: 110px minmax(0, 1fr); } }

/* ---------- library: featured cards, listing thumbnails, badges */
.feature-grid { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
.feature-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 96px; padding: 22px 24px; background: var(--blue-tint); border-left: 4px solid var(--blue); color: var(--ink); font-family: var(--serif); font-size: 1.3rem; font-weight: 700; }
.feature-card:hover { background: var(--blue); color: #fff; text-decoration: none; }
.feature-card .icon { color: currentColor; }
.listing-title { margin-top: 36px; }
.listing li.has-image { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (min-width: 640px) { .listing li.has-image { grid-template-columns: 150px minmax(0, 1fr); gap: 24px; } }
.listing-thumb img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--rule); }
.badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; font: 700 .7rem var(--sans); text-transform: uppercase; letter-spacing: .05em; background: var(--bg-alt); color: var(--muted); vertical-align: 1px; }
.badge-on { background: #e5f3ea; color: var(--ok); }

/* ---------- dashboards */
.dash-page { padding-top: 24px; padding-bottom: 48px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dash-frame { display: block; width: 100%; height: 85vh; min-height: 640px; border: 1px solid var(--rule); background: #f4f6fa; }
@media (max-width: 640px) { .dash-frame { height: 80vh; min-height: 520px; } }

/* ---------- home: animated Kazakhstan map (desktop) */
.hero-visual { display: none; }
@media (min-width: 1024px) {
  .hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
  .hero-visual { display: block; }
}
.kz-map { width: 100%; height: auto; overflow: visible; }
.kz-shape { fill: url(#kzFill); }
.kz-outline { fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: kz-draw 2.6s ease-out .2s forwards; }
.kz-arc { fill: none; stroke: var(--blue); stroke-width: 1.1; stroke-linecap: round; opacity: .55; stroke-dasharray: 4 7; animation: kz-flow 3.2s linear infinite; }
.kz-dot { fill: var(--blue); stroke: #fff; stroke-width: 1.2; }
.kz-big .kz-dot { fill: var(--blue-deep); }
.kz-pulse { fill: none; stroke: var(--blue); stroke-width: 1.4; transform-box: fill-box; transform-origin: center; animation: kz-pulse 3s ease-out infinite; }
.kz-card-bg { fill: #fff; stroke: var(--blue-line); filter: drop-shadow(0 6px 14px rgba(11, 61, 95, .10)); }
.kz-area { fill: url(#kzArea); opacity: 0; animation: kz-fade 6s ease-in-out infinite; }
.kz-spark { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: kz-line 6s ease-in-out infinite; }
.kz-spark-end { fill: var(--blue-deep); opacity: 0; animation: kz-fade 6s ease-in-out infinite; }
.kz-bar { fill: var(--blue); transform-box: fill-box; transform-origin: bottom; animation: kz-bars 4.8s ease-in-out infinite; }
.kz-bar:nth-child(odd) { fill: #4f93c2; }
@keyframes kz-draw { to { stroke-dashoffset: 0; } }
@keyframes kz-flow { to { stroke-dashoffset: -22; } }
@keyframes kz-pulse { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(3.4); opacity: 0; } }
@keyframes kz-line { 0% { stroke-dashoffset: 1; } 45%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes kz-fade { 0%, 35% { opacity: 0; } 50%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes kz-bars { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.kz-bar:nth-child(2) { animation-duration: 5.4s; } .kz-bar:nth-child(3) { animation-duration: 4.2s; } .kz-bar:nth-child(5) { animation-duration: 5.9s; } .kz-bar:nth-child(7) { animation-duration: 4.5s; }
@media (prefers-reduced-motion: reduce) {
  .kz-outline { stroke-dashoffset: 0; animation: none; }
  .kz-arc, .kz-pulse, .kz-bar { animation: none; }
  .kz-pulse { display: none; }
  .kz-spark { stroke-dashoffset: 0; animation: none; }
  .kz-area, .kz-spark-end { opacity: 1; animation: none; }
}
/* animation delays for the map (no inline styles: CSP) */
.kzd0 { animation-delay: 0.00s; }
.kzd1 { animation-delay: 0.15s; }
.kzd2 { animation-delay: 0.30s; }
.kzd3 { animation-delay: 0.45s; }
.kzd4 { animation-delay: 0.60s; }
.kzd5 { animation-delay: 0.75s; }
.kzd6 { animation-delay: 0.90s; }
.kzd7 { animation-delay: 1.05s; }
.kzd8 { animation-delay: 1.20s; }
.kzd9 { animation-delay: 1.35s; }
.kzd12 { animation-delay: 1.80s; }
.kzd15 { animation-delay: 2.25s; }
.kzd18 { animation-delay: 2.70s; }
.kzd21 { animation-delay: 3.15s; }
.kzd24 { animation-delay: 3.60s; }
.kzd10 { animation-delay: 1.50s; }
.kzd17 { animation-delay: 2.55s; }
.kzd19 { animation-delay: 2.85s; }
.kzd20 { animation-delay: 3.00s; }

/* ---------- two-factor pages */
.tfa-steps { padding-left: 1.2em; }
.tfa-steps li { margin-bottom: 12px; }
.tfa-qr { margin: 12px 0; }
.tfa-qr .qr { display: block; width: 220px; height: 220px; border: 1px solid var(--rule); }
.tfa-secret code { font-size: 1.05rem; letter-spacing: .08em; background: var(--bg-alt); padding: 6px 10px; display: inline-block; }
.tfa-codes { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.tfa-codes code { display: block; text-align: center; font-size: 1.05rem; letter-spacing: .08em; padding: 8px; border: 1px dashed var(--blue-line); background: #fff; }
.resend-form { margin: 14px 0 0; text-align: center; }
.resend { color: var(--blue); font-weight: 700; }
@media (max-width: 639px) { .hide-sm { display: none; } }
.form .btn { margin-top: 14px; }
