/* Digital Finance — design system for the public site and the personal cabinet.
   Components are documented in DEV.md. Use the tokens; do not hard-code colours. */

:root {
  --ink: #0b1b33;
  --ink-2: #33445e;
  --muted: #66758c;
  --line: #e2e8f1;
  --line-2: #cfd8e5;
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --bg-tint: #eef3fc;

  --brand: #1747c2;
  --brand-600: #1239a3;
  --brand-800: #0a2463;
  --brand-900: #071a47;
  --brand-50: #edf2ff;
  --accent: #0fb37f;
  --accent-50: #e6f8f1;
  --gold: #f4b400;
  --gold-50: #fff6dc;

  --ok: #15803d;   --ok-50: #e8f6ed;
  --warn: #b45309; --warn-50: #fff4e0;
  --bad: #c53030;  --bad-50: #fdecec;
  --info: #1d4ed8; --info-50: #eaf1ff;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11, 27, 51, .06), 0 1px 1px rgba(11, 27, 51, .04);
  --shadow: 0 6px 24px -8px rgba(11, 27, 51, .14), 0 2px 6px rgba(11, 27, 51, .05);
  --shadow-lg: 0 24px 60px -20px rgba(7, 26, 71, .35);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Manrope", "Inter", system-ui, sans-serif;
  --container: 1200px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
/* default size for m.icon(); zero specificity so component rules (.btn svg, .card-icon svg …) win */
:where(svg.i) { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.18em; flex: none; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--ink-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }
.section { padding: 72px 0; }
.section-sm { padding: 44px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.sticky { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .section { padding: 48px 0; } }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .bar { height: var(--header-h); display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-head); font-weight: 800; line-height: 1.05; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: contain; }
.brand small { display: block; font-family: var(--font); font-weight: 500; font-size: .72rem; line-height: 1.25; margin-top: 3px; max-width: 13.5em; color: var(--muted); letter-spacing: .02em; }
.brand .brand-mark { width: 58px; height: 58px; }
.brand { flex: 0 1 auto; min-width: 0; }
.brand-name { display: block; font-size: .9rem; line-height: 1.18; max-width: 13em; text-wrap: balance; }
:lang(ru) .brand-name { max-width: 11.4em; }
@media (min-width: 1241px) { .brand { flex: none; } }   /* beside the full menu the name keeps its two lines */
.brand-name em { font-style: normal; white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.main-nav a { color: var(--ink-2); font-weight: 600; font-size: .93rem; padding: 8px 8px; border-radius: 10px; white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--bg-tint); color: var(--brand); text-decoration: none; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { border-color: var(--line-2); color: var(--brand); text-decoration: none; }
.icon-btn svg { width: 20px; height: 20px; }
svg.ic-14 { width: 14px; height: 14px; display: inline-block; vertical-align: middle; }
svg.ic-16 { width: 16px; height: 16px; display: inline-block; vertical-align: middle; }
.lang-switch summary svg { flex: none; }
@media (max-width: 420px) { .brand small { display: none; } .site-header .bar { gap: 8px; } .header-tools { gap: 4px; } .header-tools .icon-btn { width: 36px; height: 36px; } .lang-switch summary { padding: 0 8px; } .brand-name { font-size: .7rem; } .brand-name em, .hdr-search { display: none; } }
@media (max-width: 560px) { .brand-mark, .brand .brand-mark { width: 40px; height: 40px; } .brand-name, :lang(ru) .brand-name { font-size: .74rem; max-width: 11em; } }
@media (max-width: 420px) { .brand-name, :lang(ru) .brand-name { font-size: .7rem; } }
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; font-size: .85rem; color: var(--ink-2); }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch[open] summary { border-color: var(--brand); color: var(--brand); }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 60; }
.dropdown a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 8px; color: var(--ink); font-size: .92rem; }
.dropdown a:hover, .dropdown a[aria-current="true"] { background: var(--bg-tint); text-decoration: none; }
.nav-toggle { display: none; }
.mobile-nav { display: none; }
@media (max-width: 1240px) {   /* the full menu needs this much beside the logo and name (Russian is the widest) */
  .main-nav { display: none; }
  .nav-toggle { display: inline-grid; margin-left: auto; }
  .header-tools .btn-label { display: none; }
  .mobile-nav[data-open="true"] { display: block; border-top: 1px solid var(--line); padding-top: 10px; padding-bottom: 18px; }
  .mobile-nav a { display: block; padding: 12px 4px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
}

/* ---------- buttons ---------- */
.btn { --b: var(--brand); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 11px; border: 1.5px solid transparent; font: 700 .95rem/1 var(--font); cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #0c9a6d; }
.btn-gold { background: var(--gold); color: var(--brand-900); }
.btn-gold:hover { background: #e0a500; }
.btn-outline { background: #fff; border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--bg-tint); }
.btn-light { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn-light:hover { background: rgba(255, 255, 255, .2); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #a82727; }
.btn-telegram { background: #229ED9; color: #fff; }
.btn-telegram:hover { background: #1b8cc2; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .86rem; border-radius: 9px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.02rem; border-radius: 13px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.link-arrow { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.link-arrow::after { content: "→"; transition: transform .15s; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(1200px 500px at 85% -10%, rgba(15, 179, 127, .35), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(244, 180, 0, .18), transparent 60%), linear-gradient(135deg, var(--brand-900), var(--brand-800) 55%, #0d3a9a); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%); }
.hero .container { position: relative; }
.hero h1, .hero h2, .hero h3 { color: #fff; }
.hero .lead { color: rgba(255, 255, 255, .82); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; padding-top: 84px; padding-bottom: 96px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); font-size: .85rem; font-weight: 600; margin-bottom: 20px; }
.hero-badge b { background: var(--accent); color: #fff; padding: 2px 9px; border-radius: 999px; font-size: .75rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-card { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius-lg); padding: 24px; backdrop-filter: blur(6px); box-shadow: var(--shadow-lg); }
.hero-card .card-title { color: #fff; }
.page-hero { background: linear-gradient(135deg, var(--brand-900), var(--brand-800)); color: #fff; padding: 56px 0 48px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(15, 179, 127, .35), transparent 65%); }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 8px; }
.page-hero .lead { color: rgba(255, 255, 255, .8); margin: 0; max-width: 760px; }
.page-hero .container { position: relative; z-index: 1; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 64px; } }

/* breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; margin-bottom: 14px; color: rgba(255, 255, 255, .7); }
.crumbs a { color: rgba(255, 255, 255, .85); }
.crumbs span[aria-hidden] { opacity: .5; }
.crumbs-dark { color: var(--muted); }
.crumbs-dark a { color: var(--ink-2); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.stat-value { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--brand-800); }
.stat-label { color: var(--muted); font-size: .9rem; margin-top: 8px; }
.stats-on-dark .stat { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .16); }
.stats-on-dark .stat-value { color: #fff; }
.stats-on-dark .stat-label { color: rgba(255, 255, 255, .72); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-value { font-size: 1.7rem; } }

/* ---------- cards ---------- */
.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card-hover { transition: transform .18s, box-shadow .18s, border-color .18s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card-media { margin: -22px -22px 18px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--bg-tint); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-title { font-family: var(--font-head); font-weight: 800; font-size: 1.12rem; line-height: 1.3; margin: 0 0 8px; color: var(--ink); }
.card-title a { color: inherit; }
.card-title a::after { content: ""; position: absolute; inset: 0; }  /* whole card clickable */
.card-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .86rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.card-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: 16px; }
.card-icon svg { width: 24px; height: 24px; }
.card-flat { box-shadow: none; }
.card-soft { background: var(--bg-soft); border-color: transparent; box-shadow: none; }
.card-highlight { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.05rem; }
.panel-body { padding: 20px; }

/* ---------- chips, badges, status ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--bg-tint); color: var(--ink-2); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.chip-brand { background: var(--brand-50); color: var(--brand); }
.chip-accent { background: var(--accent-50); color: #08805b; }
.chip-gold { background: var(--gold-50); color: #8a6500; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tone-info { background: var(--info-50); color: var(--info); }
.tone-warn { background: var(--warn-50); color: var(--warn); }
.tone-ok { background: var(--ok-50); color: var(--ok); }
.tone-bad { background: var(--bad-50); color: var(--bad); }
.tone-muted { background: #eef1f5; color: #5b6778; }
.tone-accent { background: #f1ebff; color: #6d28d9; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters a, .filters button { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; font-size: .9rem; cursor: pointer; }
.filters a:hover { text-decoration: none; border-color: var(--line-2); }
.filters .is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field > label, .label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.req { color: var(--bad); margin-left: 2px; }
.help { font-size: .84rem; color: var(--muted); }
.input, .select, .textarea, input[type="text"], input:not([type]), input[type="email"], input[type="password"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 11px; background: #fff; color: var(--ink); font: 400 1rem/1.4 var(--font); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #b4c1d4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
input[type="file"] { padding: 9px; min-height: auto; }
.field-error input, .field-error select, .field-error textarea, input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--bad); }
.error-text { color: var(--bad); font-size: .85rem; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .94rem; cursor: pointer; }
.check input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; accent-color: var(--brand); flex: none; }
.input-group { display: flex; gap: 8px; }
.input-group > input { flex: 1; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* honeypot */
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 22px; text-align: center; background: var(--bg-soft); transition: border-color .15s, background .15s; }
.dropzone.is-over { border-color: var(--brand); background: var(--brand-50); }
.file-pill { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.file-pill .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.form-section > h2, .form-section > h3 { font-size: 1.15rem; margin-bottom: 16px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; padding-top: 6px; }
.save-state { font-size: .85rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.save-state[data-state="saved"]::before { content: "✓"; color: var(--ok); font-weight: 800; }

/* ---------- alerts / flash ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid; font-size: .95rem; }
.alert-success { background: var(--ok-50); border-color: #bfe3cb; color: #14532d; }
.alert-error { background: var(--bad-50); border-color: #f3c2c2; color: #7f1d1d; }
.alert-info { background: var(--info-50); border-color: #c7d7fb; color: #1e3a8a; }
.alert-warn { background: var(--warn-50); border-color: #f6d9a8; color: #7c2d12; }
.alert > svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.flash-stack { display: grid; gap: 10px; margin: 18px 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-weight: 700; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; background: var(--bg-soft); }
.table th, .table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 12px 16px; font-weight: 600; color: var(--muted); border: 0; background: none; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; font-size: .95rem; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs .is-active, .tabs [aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bg-tint); color: var(--ink-2); font-size: .72rem; font-weight: 700; }

/* ---------- progress / timeline / steps ---------- */
.progress { height: 8px; background: var(--bg-tint); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: inherit; }
.steps { display: flex; gap: 0; counter-reset: step; }
.steps li { list-style: none; flex: 1; position: relative; padding-top: 34px; font-size: .82rem; color: var(--muted); text-align: center; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line-2); font-weight: 700; font-size: .78rem; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: var(--line-2); }
.steps li:first-child::after { display: none; }
.steps li.is-done::before { content: "✓"; background: var(--accent); border-color: var(--accent); color: #fff; }
.steps li.is-done::after, .steps li.is-current::after { background: var(--accent); }
.steps li.is-current { color: var(--ink); font-weight: 700; }
.steps li.is-current::before { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 20px 28px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.timeline li::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline time { font-size: .82rem; color: var(--muted); display: block; }

/* ---------- avatar / person ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--brand-50); color: var(--brand); display: inline-grid; place-items: center; font-weight: 800; font-family: var(--font-head); flex: none; overflow: hidden; }
.avatar-sm { width: 30px; height: 30px; font-size: .75rem; }
.avatar-lg { width: 96px; height: 96px; font-size: 2rem; }
.avatar-xl { width: 128px; height: 128px; font-size: 2.6rem; }
.person { display: flex; align-items: center; gap: 12px; }
.person-photo { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, var(--brand-50), var(--accent-50)); display: grid; place-items: center; margin-bottom: 14px; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-photo .initials { font-family: var(--font-head); font-size: 3rem; font-weight: 800; color: var(--brand); }

/* ---------- logos / partners ---------- */
.logo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.logo-tile { height: 96px; display: grid; place-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink-2); font-weight: 800; font-family: var(--font-head); text-align: center; }
.logo-tile img { max-height: 56px; max-width: 100%; width: auto; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.logo-tile:hover img { filter: none; opacity: 1; }

/* ---------- date badge (events) ---------- */
.date-badge { width: 64px; flex: none; text-align: center; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.date-badge .m { background: var(--brand); color: #fff; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 0; }
.date-badge .d { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; padding: 4px 0 6px; }

/* ---------- prose (CMS rich text) ---------- */
.prose { font-size: 1.04rem; color: var(--ink-2); }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose img { border-radius: var(--radius); margin: 1.2em 0; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid var(--brand); background: var(--bg-soft); border-radius: 0 12px 12px 0; color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }

/* ---------- empty state / misc ---------- */
.empty { text-align: center; padding: 48px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); background: var(--bg-soft); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--line-2); }
.empty h3 { color: var(--ink); }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; }
.pagination .is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 10px 20px; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; font-weight: 600; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 10px; } }
.countdown { display: inline-flex; gap: 8px; }
.countdown span { min-width: 54px; text-align: center; padding: 8px 6px; border-radius: 10px; background: var(--brand-50); }
.countdown b { display: block; font-family: var(--font-head); font-size: 1.35rem; color: var(--brand-800); line-height: 1.1; }
.countdown small { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cta-band { border-radius: var(--radius-lg); padding: 44px; color: #fff; background: radial-gradient(600px 300px at 90% 0%, rgba(15, 179, 127, .45), transparent 60%), linear-gradient(135deg, var(--brand-800), var(--brand)); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .82); }
.notice-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); display: inline-block; }

/* ---------- ticket / certificate ---------- */
.ticket { display: grid; grid-template-columns: 1fr auto; border-radius: var(--radius-lg); overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.ticket-main { padding: 28px; background: linear-gradient(135deg, var(--brand-900), var(--brand-800)); color: #fff; }
.ticket-main h2, .ticket-main h3 { color: #fff; }
.ticket-qr { padding: 24px; display: grid; place-items: center; gap: 8px; border-left: 2px dashed var(--line-2); text-align: center; }
.ticket-qr svg { width: 168px; height: 168px; }
.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; letter-spacing: .06em; }
@media (max-width: 640px) { .ticket { grid-template-columns: 1fr; } .ticket-qr { border-left: 0; border-top: 2px dashed var(--line-2); } }

/* ---------- cabinet (My profile) ---------- */
.cab-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; padding: 32px 0 72px; }
.cab-nav { position: sticky; top: calc(var(--header-h) + 16px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.cab-nav .who { display: flex; gap: 12px; align-items: center; padding: 10px 10px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.cab-nav .who b { display: block; line-height: 1.25; }
.cab-nav a.item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .94rem; }
.cab-nav a.item svg { width: 19px; height: 19px; flex: none; opacity: .8; }
.cab-nav a.item:hover { background: var(--bg-soft); text-decoration: none; }
.cab-nav a.item.is-active { background: var(--brand-50); color: var(--brand); }
.cab-nav a.item .count { margin-left: auto; }
.cab-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.cab-head h1 { font-size: 1.7rem; margin: 0; }
.profile-cover { border-radius: var(--radius-lg); padding: 28px; background: radial-gradient(500px 220px at 100% 0%, rgba(15, 179, 127, .35), transparent 60%), linear-gradient(135deg, var(--brand-900), var(--brand-800)); color: #fff; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.profile-cover h1, .profile-cover h2 { color: #fff; margin: 0; }
.profile-cover .muted { color: rgba(255, 255, 255, .72); }
.profile-cover .avatar { border: 3px solid rgba(255, 255, 255, .5); }
@media (max-width: 900px) { .cab-layout { grid-template-columns: 1fr; padding-top: 16px; } .cab-nav { position: static; display: flex; overflow-x: auto; gap: 4px; } .cab-nav .who { display: none; } .cab-nav a.item { white-space: nowrap; } }

/* ---------- auth pages ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(150deg, var(--brand-900), var(--brand-800) 60%, #0d4fb8); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side h2 { color: #fff; }
.auth-side::after { content: ""; position: absolute; right: -140px; bottom: -140px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(15, 179, 127, .4), transparent 65%); }
.auth-main { display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 440px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- footer ---------- */
.site-footer { background: var(--brand-900); color: rgba(255, 255, 255, .72); padding: 56px 0 28px; margin-top: 0; font-size: .93rem; }
.site-footer a { color: rgba(255, 255, 255, .85); }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 32px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; }
.social { display: flex; gap: 8px; }
.social a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.social a:hover { background: rgba(255, 255, 255, .16); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.subscribe { display: flex; gap: 8px; margin-top: 10px; }
.subscribe input { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #fff; }
.subscribe input::placeholder { color: rgba(255, 255, 255, .5); }
.site-footer .brand { color: #fff; }
.site-footer .brand small { color: rgba(255, 255, 255, .6); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- modal ---------- */
dialog.modal { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(7, 26, 71, .5); backdrop-filter: blur(2px); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- print (tickets, receipts) ---------- */
@media print {
  .site-header, .site-footer, .cab-nav, .no-print { display: none !important; }
  body { background: #fff; }
  .cab-layout { display: block; padding: 0; }
}
