/* The MS Tea Party — Election Blog. Тема «civic editorial»: папір, navy, червоний, золото; світла й темна. */

/* ═══════════════ токени ═══════════════ */
:root {
  --bg: #f6f3ec;
  --bg-2: #eee8dc;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --ink: #0f1a2e;
  --ink-2: #39445a;
  --muted: #687286;
  --line: #e4ded1;
  --line-2: #d3cbbb;
  --navy: #13284b;
  --navy-2: #1d3a68;
  --band: #13284b;
  --foot: #0c1830;
  --brand: #c63a2f;
  --brand-ink: #a52d23;
  --brand-btn: #c63a2f;
  --brand-soft: #fae6e2;
  --blue: #2553a6;
  --blue-soft: #e5ecf8;
  --gold: #e0a429;
  --gold-soft: #f9eed6;
  --on-dark: #f5f2ea;
  --on-dark-2: rgba(245, 242, 234, .74);
  --shadow-sm: 0 1px 2px rgba(15, 26, 46, .06), 0 1px 1px rgba(15, 26, 46, .03);
  --shadow: 0 14px 34px -16px rgba(15, 26, 46, .24), 0 2px 6px rgba(15, 26, 46, .05);
  --shadow-lg: 0 34px 70px -26px rgba(15, 26, 46, .38);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --wrap: 1220px;
  --gutter: 24px;
  --f-head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --stars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='%23fff' fill-opacity='.12'%3E%3Cpath d='M12 5l1.76 3.6 3.97.58-2.87 2.8.68 3.95L12 14.06l-3.54 1.87.68-3.95-2.87-2.8 3.97-.58z'/%3E%3Cpath d='M36 29l1.76 3.6 3.97.58-2.87 2.8.68 3.95L36 38.06l-3.54 1.87.68-3.95-2.87-2.8 3.97-.58z'/%3E%3C/g%3E%3C/svg%3E");
  --stripe: linear-gradient(90deg, var(--navy) 0 58%, var(--brand) 58% 84%, var(--gold) 84%);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b1222;
  --bg-2: #0e172b;
  --surface: #121c31;
  --surface-2: #16223a;
  --ink: #edf0f6;
  --ink-2: #c0c8d7;
  --muted: #8e98ac;
  --line: #22304d;
  --line-2: #2f3f61;
  --navy: #1d3a68;
  --navy-2: #27497f;
  --band: #0f1a31;
  --foot: #070d1a;
  --brand: #ff7563;
  --brand-ink: #ff8f80;
  --brand-btn: #d4463b;
  --brand-soft: rgba(255, 117, 99, .13);
  --blue: #8bacff;
  --blue-soft: rgba(139, 172, 255, .11);
  --gold: #f2c14e;
  --gold-soft: rgba(242, 193, 78, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 14px 34px -16px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .25);
  --shadow-lg: 0 34px 70px -26px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

/* палітри: обкладинки, плитки тем, шапки категорій */
.pal-0 { --c1: #13284b; --c2: #2f5dab; --soft: #e2e8f4; --tone: #1d3a68; }
.pal-1 { --c1: #a42c23; --c2: #e1593f; --soft: #fae3de; --tone: #b3342a; }
.pal-2 { --c1: #b07210; --c2: #e9b23f; --soft: #f9edd2; --tone: #92600a; }
.pal-3 { --c1: #1d4e9b; --c2: #4b8ae0; --soft: #e2ebf9; --tone: #1f56a8; }
.pal-4 { --c1: #0c5c5f; --c2: #22a094; --soft: #dcf1ee; --tone: #0d6a67; }
.pal-5 { --c1: #4d2365; --c2: #9852b1; --soft: #efe3f4; --tone: #6a2f87; }
.pal-6 { --c1: #29344a; --c2: #64748b; --soft: #e6e9ee; --tone: #3b475b; }
.pal-7 { --c1: #1b5434; --c2: #3e9a5e; --soft: #dff0e4; --tone: #22653e; }
[data-theme="dark"] .pal-0 { --soft: rgba(94, 140, 222, .16); --tone: #9dbaf2; }
[data-theme="dark"] .pal-1 { --soft: rgba(255, 117, 99, .15); --tone: #ff9c8f; }
[data-theme="dark"] .pal-2 { --soft: rgba(242, 193, 78, .15); --tone: #f4cc6c; }
[data-theme="dark"] .pal-3 { --soft: rgba(91, 150, 236, .16); --tone: #93bdf5; }
[data-theme="dark"] .pal-4 { --soft: rgba(48, 190, 175, .15); --tone: #6fd3c6; }
[data-theme="dark"] .pal-5 { --soft: rgba(178, 112, 207, .17); --tone: #d1a5e4; }
[data-theme="dark"] .pal-6 { --soft: rgba(148, 163, 184, .15); --tone: #b9c4d3; }
[data-theme="dark"] .pal-7 { --soft: rgba(80, 180, 116, .15); --tone: #86d29f; }

/* ═══════════════ база ═══════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
html.lock { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { display: block; padding-bottom: 96px; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--f-head); font-optical-sizing: auto; font-weight: 700; color: var(--ink); letter-spacing: -.012em; line-height: 1.18; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--gold-soft); color: var(--ink); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.center { justify-content: center; text-align: center; }
.skip-link { position: absolute; left: -9999px; top: 10px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip-link:focus { left: 16px; }

.ico { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.ico-sm { width: 16px; height: 16px; }
.ico-xs { width: 12px; height: 12px; }
kbd { font-family: var(--f-body); font-size: .72rem; line-height: 1; padding: 3px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }

.tile-ico { width: 46px; height: 46px; border-radius: 12px; display: inline-grid; place-items: center; flex-shrink: 0; background: var(--soft, var(--brand-soft)); color: var(--tone, var(--brand)); }
.tile-ico .ico { width: 22px; height: 22px; }
.tile-ico.sm { width: 34px; height: 34px; border-radius: 9px; }
.tile-ico.sm .ico { width: 18px; height: 18px; }
.tile-ico.xs { width: 22px; height: 22px; border-radius: 6px; }
.tile-ico.xs .ico { width: 13px; height: 13px; }

/* ═══════════════ кнопки, чіпи, заголовки секцій ═══════════════ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; font-weight: 650; font-size: .95rem; line-height: 1; white-space: nowrap; transition: background .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand-btn); color: #fff; box-shadow: 0 8px 20px -10px var(--brand-btn); }
.btn-primary:hover { background: var(--brand-ink); }
[data-theme="dark"] .btn-primary:hover { background: #e3574b; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: #13284b; }
.btn-light:hover { background: #fff6e2; }
.btn-outline-light { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1rem; }
.btn-sm { height: 36px; padding: 0 14px; font-size: .86rem; border-radius: 10px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .83rem; font-weight: 600; line-height: 1.3; transition: border-color .2s, color .2s, background .2s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip small { color: var(--muted); font-size: .72rem; font-weight: 600; }
.chip-ico { padding-left: 5px; }
.chip-sm { position: relative; z-index: 1; align-self: flex-start; padding: 3px 10px; border: 0; background: var(--brand-soft); color: var(--brand-ink); font-size: .7rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.chip-sm:hover { background: var(--brand-btn); color: #fff; }
[data-theme="dark"] .chip-sm { color: var(--brand); }
[data-theme="dark"] .chip-sm:hover { color: #fff; }

.kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--brand); font-family: var(--f-body); font-size: .76rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.kicker-light { color: var(--gold); }
.section { padding-top: 76px; }
.section-tight { padding-top: 34px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; padding-top: 14px; border-top: 3px solid var(--ink); }
.sec-head h2 { margin: 6px 0 0; font-size: clamp(1.6rem, 2.6vw, 2.15rem); }
.link-more { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--brand); font-weight: 650; font-size: .93rem; white-space: nowrap; transition: gap .2s; }
.link-more:hover { gap: 10px; }

/* ═══════════════ шапка ═══════════════ */
.topbar { background: var(--navy); color: var(--on-dark-2); font-size: .78rem; }
[data-theme="dark"] .topbar { background: #070d1a; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 36px; }
.topbar-note { display: flex; align-items: center; gap: 8px; margin: 0; letter-spacing: .04em; }
.topbar-note .ico { color: var(--gold); }
.topbar-note span + span::before { content: '\00b7'; margin-right: 8px; opacity: .6; }
.topbar-links { display: flex; gap: 20px; }
.topbar-links a { color: var(--on-dark-2); transition: color .2s; }
.topbar-links a:hover { color: #fff; }

.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--line); transition: box-shadow .25s; }
.site-header::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--stripe); }
.site-header.scrolled { box-shadow: var(--shadow); }
.header-row { position: relative; display: flex; align-items: center; gap: 22px; height: 70px; }

.logo { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); flex-shrink: 0; }
.logo-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--navy); color: #fff; --star: var(--gold); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.logo-mark .ico { width: 25px; height: 25px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text small { font-family: var(--f-body); font-size: .62rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }
.logo-text b { font-family: var(--f-head); font-size: 1.38rem; font-weight: 750; letter-spacing: -.015em; }
.logo-light { color: var(--on-dark); }
.logo-light .logo-mark { background: #fff; color: #13284b; --star: #c63a2f; }
.logo-light .logo-text small { color: var(--gold); }

.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font-size: .93rem; font-weight: 560; white-space: nowrap; transition: background .2s, color .2s; }
.nav-link:hover { background: var(--surface); color: var(--ink); }
.mega-btn .ico { transition: transform .2s; }
.has-mega.open .mega-btn { background: var(--surface); color: var(--ink); }
.has-mega.open .mega-btn .ico { transform: rotate(180deg); }
.mega { position: absolute; top: calc(100% + 10px); left: 50%; width: min(880px, calc(100vw - 32px)); padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: opacity .2s, transform .2s, visibility .2s; }
.has-mega.open .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.mega-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 8px 14px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.mega-head b { font-family: var(--f-head); font-size: 1.2rem; }
.mega-head span { color: var(--muted); font-size: .84rem; }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; max-height: min(60vh, 520px); overflow: auto; }
.mega-link { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 11px; transition: background .2s; }
.mega-link:hover { background: var(--surface-2); }
.mega-text { display: flex; flex-direction: column; min-width: 0; }
.mega-text b { font-size: .9rem; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mega-text small { color: var(--muted); font-size: .75rem; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; min-width: 40px; padding: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); transition: border-color .2s, background .2s; }
.icon-btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.search-btn { padding: 0 8px 0 12px; }
.search-btn span { color: var(--muted); font-size: .9rem; padding-right: 22px; }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: inline; }
[data-theme="dark"] .i-moon { display: none; }
.menu-btn { display: none; }

/* ═══════════════ головна: hero ═══════════════ */
.hero { position: relative; overflow: hidden; padding: 64px 0 80px; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--blue) 13%, transparent), transparent 42%),
    radial-gradient(circle at 6% 92%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 38%),
    var(--bg); }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 6px; background: var(--stripe); opacity: .9; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 56px; align-items: center; }
.hero h1 { margin: 0; font-size: clamp(2.3rem, 4.7vw, 4rem); line-height: 1.04; letter-spacing: -.025em; font-weight: 720; }
.hero-kicker { display: flex; width: fit-content; align-items: center; gap: 8px; margin-bottom: 20px; padding: 7px 14px 7px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-family: var(--f-body); font-size: .8rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; line-height: 1.2; }
[data-theme="dark"] .hero-kicker { color: var(--brand); }
.hl { color: var(--brand); background: linear-gradient(var(--gold), var(--gold)) 0 94% / 100% .1em no-repeat; padding-bottom: .02em; }
.lead { font-size: 1.15rem; line-height: 1.6; color: var(--ink-2); max-width: 38em; margin: 22px 0 0; }
.hero-search { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 540px; height: 58px; margin-top: 30px; padding: 0 12px 0 18px; border: 1px solid var(--line-2); border-radius: 15px; background: var(--surface); color: var(--muted); font-size: 1rem; text-align: left; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.hero-search .ico { color: var(--brand); }
.hero-search span { flex: 1; }
.hero-search:hover { border-color: var(--brand); }
.hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.hero-tags > span { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-right: 4px; }
.hero-stats { display: flex; gap: 36px; margin: 34px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.hero-stats dd { margin: 0; font-family: var(--f-head); font-size: 1.95rem; font-weight: 720; line-height: 1.15; }

.hero-art { position: relative; display: grid; justify-items: center; align-content: start; min-height: 540px; padding-top: 30px; }
.ballot { position: relative; width: min(410px, 100%); padding: 22px 22px 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); transform: rotate(-2.2deg); }
.ballot::before { content: ''; position: absolute; left: 22px; right: 22px; top: 0; height: 5px; border-radius: 0 0 6px 6px; background: var(--stripe); }
.ballot-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 2px dashed var(--line-2); }
.ballot-seal { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--gold); flex-shrink: 0; box-shadow: 0 0 0 4px var(--gold-soft); }
.ballot-head b { display: block; font-family: var(--f-head); font-size: 1.2rem; }
.ballot-head small { color: var(--muted); font-size: .8rem; }
.ballot-list { list-style: none; margin: 10px 0 0; padding: 0; }
.ballot-list a { display: flex; align-items: center; gap: 13px; padding: 11px 8px; border-bottom: 1px dashed var(--line); border-radius: 8px; transition: background .2s; }
.ballot-list li:last-child a { border-bottom: 0; }
.ballot-list a:hover { background: var(--surface-2); }
.ballot-box { width: 24px; height: 24px; border: 2px solid var(--ink-2); border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; color: transparent; transition: background .2s, border-color .2s, color .2s; }
.ballot-box .ico { width: 15px; height: 15px; stroke-width: 3.2; }
.ballot-box.checked, .ballot-list a:hover .ballot-box { background: var(--brand-btn); border-color: var(--brand-btn); color: #fff; }
.ballot-name { flex: 1; font-weight: 620; }
.ballot-list small { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.ballot-foot { display: flex; align-items: center; gap: 7px; margin: 12px 0 0; padding-top: 12px; border-top: 2px dashed var(--line-2); color: var(--muted); font-size: .8rem; }
.ballot-foot .ico { color: var(--brand); }
.sticker { position: absolute; top: -6px; right: -2%; width: 112px; height: 112px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, #2a4d86, #13284b 70%); color: #fff; text-align: center; transform: rotate(12deg); box-shadow: var(--shadow); animation: bob 6s ease-in-out infinite; }
.sticker::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px dashed rgba(255, 255, 255, .45); }
.sticker .ico { color: var(--gold); width: 18px; height: 18px; margin-bottom: 2px; }
.sticker b { font-family: var(--f-head); font-size: 1.1rem; line-height: 1; }
.sticker small { font-size: .62rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; opacity: .85; margin-top: 3px; }
.float-card { position: absolute; left: -2%; bottom: 0; max-width: 290px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); transform: rotate(1.5deg); transition: transform .25s; }
.float-card:hover { transform: rotate(0) translateY(-3px); }
.float-label { display: flex; align-items: center; gap: 6px; color: var(--brand); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.float-card b { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 5px; font-family: var(--f-head); font-size: 1rem; font-weight: 650; line-height: 1.3; }
@keyframes bob { 0%, 100% { transform: rotate(12deg) translateY(0); } 50% { transform: rotate(9deg) translateY(-8px); } }

/* ═══════════════ картки ═══════════════ */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; color: #fff; background: var(--stars), linear-gradient(135deg, var(--c1), var(--c2)); }
.cover::before { content: ''; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px; border-radius: 50%; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .14) 0 7px, transparent 7px 16px); }
.cover::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .22); }
.cover-ico { position: relative; width: 62px; height: 62px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25)); transition: transform .35s; }
.card:hover .cover-ico { transform: scale(1.08) rotate(-4deg); }
.card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 18px 20px 20px; }
.card-title { margin: 0; font-size: 1.2rem; font-weight: 650; line-height: 1.28; }
.card-title a::after { content: ''; position: absolute; inset: 0; }
.card-title a:hover { color: var(--brand); }
.card-excerpt { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: auto; padding-top: 4px; color: var(--muted); font-size: .8rem; }
.card-meta span::before { content: '\00b7'; margin-right: 14px; }

.front { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 28px; margin-bottom: 28px; }
.card-lead .cover { aspect-ratio: 16 / 7.2; }
.card-lead .cover-ico { width: 92px; height: 92px; }
.card-lead .card-body { padding: 24px 26px 26px; gap: 12px; }
.card-lead .card-title { font-size: clamp(1.5rem, 2.4vw, 2.05rem); line-height: 1.15; font-weight: 700; }
.card-lead .card-excerpt { font-size: 1.02rem; -webkit-line-clamp: 4; }
.front-list { display: flex; flex-direction: column; border-top: 3px solid var(--brand); }
.story { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 9px; flex: 1; padding: 20px 0; border-bottom: 1px solid var(--line); }
.story-title { margin: 0; font-size: 1.28rem; font-weight: 650; line-height: 1.25; }
.story-excerpt { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-title a::after { content: ''; position: absolute; inset: 0; }
.story-title a:hover { color: var(--brand); }
.story .card-meta { margin-top: 0; }

.card-featured { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); margin-bottom: 24px; }
.card-featured .cover { aspect-ratio: auto; min-height: 300px; }
.card-featured .cover-ico { width: 96px; height: 96px; }
.card-featured .card-body { justify-content: center; padding: 34px 36px; gap: 14px; }
.card-featured .card-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.15; font-weight: 700; }
.card-featured .card-excerpt { font-size: 1.02rem; -webkit-line-clamp: 4; }
.card-featured .card-meta { margin-top: 4px; }

/* ═══════════════ теми ═══════════════ */
.topics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.topic-tile { display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .2s, transform .2s, box-shadow .2s; }
.topic-tile:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.topic-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.topic-name { font-weight: 650; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.topic-count { color: var(--muted); font-size: .8rem; }
.topic-arrow { color: var(--muted); transition: transform .2s, color .2s; }
.topic-tile:hover .topic-arrow { color: var(--brand); transform: translate(2px, -2px); }

/* ═══════════════ добірка (темна смуга) ═══════════════ */
.picks-band { margin-top: 80px; padding: 64px 0 70px; color: var(--on-dark); background: var(--stars), linear-gradient(160deg, var(--band), #0a1630); }
[data-theme="dark"] .picks-band { background: var(--stars), var(--band); border-block: 1px solid var(--line); }
.picks-band .sec-head { border-top-color: rgba(255, 255, 255, .85); }
.picks-band h2 { color: #fff; }
.picks-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 36px; }
.picks-list .mini { padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, .13); }
.picks-list .mini-n { color: var(--gold); font-size: 2.3rem; }
.picks-list .mini-title { color: #fff; font-family: var(--f-head); font-size: 1.1rem; font-weight: 600; }
.picks-list .mini-title:hover { color: var(--gold); }
.picks-list .mini-meta { color: var(--on-dark-2); }

/* мініатюрні списки (сайдбар, «More in…») */
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini { display: flex; align-items: flex-start; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mini:last-child { border-bottom: 0; }
.mini-n { min-width: 2ch; font-family: var(--f-head); font-size: 1.45rem; font-weight: 720; line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }
.mini-body { min-width: 0; }
.mini-title { color: var(--ink); font-size: .95rem; font-weight: 600; line-height: 1.38; transition: color .2s; }
.mini-title:hover { color: var(--brand); }
.mini-meta { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; }

/* ═══════════════ принципи ═══════════════ */
.principles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 48px; align-items: start; padding: 40px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.principles-head h2 { margin: 10px 0 12px; font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.principles-head p { margin: 0 0 22px; color: var(--muted); }
.principles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.principle { padding: 22px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.principle-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--tone); }
.principle h3 { margin: 16px 0 8px; font-size: 1.18rem; }
.principle p { margin: 0; color: var(--muted); font-size: .93rem; }
.principle a { color: var(--brand); font-weight: 600; }

/* ═══════════════ пагінація, крихти ═══════════════ */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 46px; }
.page-num, .page-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); font-weight: 620; font-variant-numeric: tabular-nums; transition: border-color .2s, color .2s; }
.page-btn { padding: 0 16px; }
a.page-num:hover, .page-btn:hover { border-color: var(--brand); color: var(--brand); }
.page-num.current { background: var(--navy); border-color: var(--navy); color: #fff; }
[data-theme="dark"] .page-num.current { background: var(--brand-btn); border-color: var(--brand-btn); }
.page-num.dots { border-color: transparent; background: none; min-width: 24px; padding: 0; }
.page-of { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: .85rem; }

.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .84rem; }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: '\00bb'; margin: 0 9px; opacity: .6; }
.crumbs a { color: var(--ink-2); transition: color .2s; }
.crumbs a:hover { color: var(--brand); }
.crumbs [aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.crumbs-light ol, .crumbs-light a { color: rgba(255, 255, 255, .78); }
.crumbs-light a:hover { color: #fff; }

/* ═══════════════ архіви ═══════════════ */
.cat-hero { position: relative; overflow: hidden; padding: 34px 0 46px; color: #fff; background: var(--stars), linear-gradient(120deg, var(--c1), var(--c2)); }
.cat-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--stripe); }
.cat-hero-inner { position: relative; }
.cat-hero-row { display: flex; align-items: center; gap: 18px; margin-top: 26px; }
.cat-hero-ico { width: 66px; height: 66px; border-radius: 18px; display: grid; place-items: center; flex-shrink: 0; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); }
.cat-hero-ico .ico { width: 32px; height: 32px; }
.cat-hero h1 { margin: 4px 0 0; color: #fff; font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.08; }
.cat-hero p { max-width: 46em; margin: 18px 0 0; color: rgba(255, 255, 255, .88); font-size: 1.06rem; }
.cat-hero .kicker-light { color: rgba(255, 255, 255, .8); }
.cat-hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.cat-hero-meta span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: .85rem; font-weight: 600; }
.cat-hero-art { position: absolute; right: -10px; top: 50%; width: 270px; height: 270px; transform: translateY(-42%) rotate(-8deg); stroke: #fff; fill: none; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; opacity: .14; pointer-events: none; }
.related-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.rt-label { color: var(--muted); font-size: .76rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.page-head { padding: 40px 0 6px; }
.page-head .kicker { margin-top: 22px; }
.page-head h1 { margin: 10px 0 8px; font-size: clamp(2rem, 4vw, 2.9rem); }
.page-head p { margin: 0; color: var(--muted); }
.empty { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty .ico { width: 48px; height: 48px; }

/* ═══════════════ стаття ═══════════════ */
.progress { position: fixed; left: 0; right: 0; top: 0; z-index: 60; height: 3px; background: var(--brand); transform: scaleX(0); transform-origin: 0 50%; }
.post-hero { padding: 30px 0 36px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--bg)); }
.post-hero-inner > * { max-width: 900px; }
.post-hero .chips { margin-top: 20px; }
.post-title { margin: 16px 0 24px; font-size: clamp(2rem, 4.3vw, 3.25rem); line-height: 1.1; letter-spacing: -.02em; font-weight: 720; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--navy); color: #fff; font-family: var(--f-head); font-size: 1.25rem; font-weight: 700; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--gold); }
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }
.byline-text { display: flex; flex-direction: column; gap: 2px; }
.byline-text > span:first-child { font-weight: 650; }
.byline-text a:hover { color: var(--brand); }
.byline-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--muted); font-size: .86rem; }
.byline-meta span { display: inline-flex; align-items: center; gap: 5px; }
.share { display: flex; gap: 8px; }
.share-top { margin-left: auto; }
.share-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 0; transition: color .2s, border-color .2s, transform .2s; }
.share-btn .ico { width: 17px; height: 17px; }
.share-btn:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.copied { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 4px 9px; border-radius: 7px; background: var(--ink); color: var(--bg); font-size: .74rem; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.share-btn.done .copied { opacity: 1; }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 60px; padding-top: 40px; }
.post-main { min-width: 0; max-width: 760px; }
.side-sticky { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }
.side-box { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.side-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--ink); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.side-title .ico { color: var(--brand); width: 17px; height: 17px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc-side ol { max-height: calc(100vh - 420px); min-height: 120px; overflow: auto; }
.toc-side a { display: block; padding: 6px 10px; border-left: 2px solid var(--line); color: var(--muted); font-size: .87rem; line-height: 1.38; transition: color .2s, border-color .2s; }
.toc-side .lvl-3 a { padding-left: 22px; font-size: .83rem; }
.toc-side a:hover, .toc-side a.active { color: var(--brand); border-left-color: var(--brand); }
.toc-inline { display: none; margin: 0 0 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.toc-inline summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 700; cursor: pointer; list-style: none; }
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline summary > .ico:first-child { color: var(--brand); }
.toc-count { margin-left: auto; color: var(--muted); font-size: .82rem; font-weight: 500; }
.toc-chev { transition: transform .2s; }
.toc-inline[open] .toc-chev { transform: rotate(180deg); }
.toc-inline ol { padding: 0 18px 14px 20px; counter-reset: toc; }
.toc-inline li a { display: block; padding: 6px 0; color: var(--ink-2); font-size: .93rem; border-top: 1px solid var(--line); }
.toc-inline .lvl-3 a { padding-left: 16px; color: var(--muted); font-size: .88rem; }

/* типографіка тексту */
.prose { color: var(--ink-2); font-size: 1.1rem; line-height: 1.78; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.25em; }
.prose h2 { margin: 2.1em 0 .65em; font-size: 1.78rem; line-height: 1.2; }
.prose h3 { margin: 1.75em 0 .55em; font-size: 1.32rem; line-height: 1.28; }
.prose h4, .prose h5, .prose h6 { margin: 1.5em 0 .5em; font-family: var(--f-body); font-size: 1.05rem; font-weight: 700; letter-spacing: 0; }
.prose a { color: var(--brand-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
[data-theme="dark"] .prose a { color: var(--brand); }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong, .prose b { color: var(--ink); font-weight: 650; }
.prose ul, .prose ol { margin: 0 0 1.35em; padding-left: 1.35em; }
.prose li { margin: .45em 0; padding-left: .2em; }
.prose ul > li::marker { color: var(--brand); }
.prose ol > li::marker { color: var(--brand); font-weight: 700; font-family: var(--f-head); }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--gold); color: var(--ink); font-family: var(--f-head); font-size: 1.22rem; line-height: 1.55; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { margin: 2.4em 0; border: 0; height: 3px; background: var(--stripe); border-radius: 3px; opacity: .8; }
.prose code { padding: 2px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: .88em; }
.prose pre { padding: 16px 18px; overflow: auto; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: .9rem; }
.prose img { height: auto; border-radius: 12px; }
.table-wrap { margin: 1.7em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.prose table, .table-wrap table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.prose th, .prose td { padding: 12px 15px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface-2); color: var(--ink); font-size: .8rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }

.quick-answer { margin: 0 0 2em; padding: 20px 24px 22px; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 4px 16px 16px 4px; background: var(--surface); box-shadow: var(--shadow-sm); }
.qa-label { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--brand); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.qa-label .ico { width: 16px; height: 16px; }
.quick-answer p { margin: 0 !important; color: var(--ink); font-family: var(--f-head); font-size: 1.2rem; font-weight: 450; line-height: 1.55; }
.read-also { display: flex; align-items: center; gap: 14px; margin: 1.9em 0; padding: 14px 18px 14px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); line-height: 1.35; }
.ra-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--soft); color: var(--tone); }
.ra-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ra-label { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.prose .read-also a { color: var(--ink); font-family: var(--f-head); font-size: 1.07rem; font-weight: 650; text-decoration: none; }
.prose .read-also a:hover { color: var(--brand); }

.note-box { display: flex; gap: 14px; margin-top: 44px; padding: 18px 20px; border: 1px solid color-mix(in srgb, var(--blue) 22%, transparent); border-radius: 14px; background: var(--blue-soft); }
.note-ico { flex-shrink: 0; color: var(--blue); padding-top: 1px; }
.note-box p { margin: 0; color: var(--ink-2); font-size: .93rem; line-height: 1.6; }
.note-box a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.post-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.post-tags, .post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.foot-label { margin-right: 6px; color: var(--muted); font-size: .76rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.author-box { display: flex; gap: 20px; margin-top: 32px; padding: 26px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.author-box .avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--gold); }
.author-name { margin: 4px 0 6px; font-size: 1.35rem; }
.author-box p { margin: 0; color: var(--muted); font-size: .95rem; }
.author-box a { color: var(--brand); font-weight: 600; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.post-nav-link { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .2s, transform .2s; }
.post-nav-link:hover { border-color: var(--brand); transform: translateY(-2px); }
.post-nav-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .74rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.post-nav-link b { display: block; margin-top: 6px; font-family: var(--f-head); font-size: 1.04rem; font-weight: 650; line-height: 1.32; }
.post-nav-link.next { text-align: right; }
.post-nav-link.next .post-nav-label { justify-content: flex-end; }
.more-in { margin-top: 44px; }
.more-in-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 3px solid var(--ink); }
.more-in-head h2 { margin: 0 0 6px; font-size: 1.4rem; }

/* ═══════════════ інформаційні сторінки ═══════════════ */
.page-hero { position: relative; padding: 40px 0 46px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--blue) 11%, transparent), transparent 40%), linear-gradient(180deg, var(--surface-2), var(--bg)); }
.page-hero-inner > * { max-width: 860px; }
.page-hero .kicker { margin-top: 26px; }
.page-hero h1 { margin: 12px 0 0; font-size: clamp(2.2rem, 4.6vw, 3.5rem); line-height: 1.07; letter-spacing: -.022em; }
.page-updated { display: inline-flex; align-items: center; gap: 7px; margin: 20px 0 0; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .84rem; }
.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 60px; }
.legal { max-width: 780px; }
.legal h2 { font-size: 1.5rem; }
.page-nav { display: flex; flex-direction: column; gap: 2px; }
.page-nav a { padding: 8px 11px; border-radius: 9px; color: var(--ink-2); font-size: .92rem; transition: background .2s, color .2s; }
.page-nav a:hover { background: var(--surface-2); color: var(--ink); }
.page-nav a[aria-current] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; }
[data-theme="dark"] .page-nav a[aria-current] { color: var(--brand); }
.side-contact p:last-child { margin: 0; color: var(--muted); font-size: .9rem; }
.side-contact a { color: var(--brand); font-weight: 600; word-break: break-all; }

.about-intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.about-intro .prose h2:first-child { margin-top: 0; }
.about-card { position: sticky; top: 100px; overflow: hidden; padding: 30px 32px; border-radius: var(--r-lg); color: var(--on-dark); background: var(--stars), linear-gradient(150deg, #13284b, #1f4682); box-shadow: var(--shadow); }
.about-card .stat { position: relative; display: flex; flex-direction: column; padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.about-card .stat:last-of-type { border-bottom: 0; }
.stat b { font-family: var(--f-head); font-size: 2.5rem; font-weight: 720; line-height: 1.05; color: #fff; }
.stat span { color: var(--on-dark-2); font-size: .92rem; }
.about-card-art { position: absolute; right: -36px; bottom: -36px; width: 210px; height: 210px; stroke: #fff; fill: none; stroke-width: 1.1; opacity: .12; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step { padding: 26px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); counter-increment: step; }
.step::before { content: counter(step, decimal-leading-zero); display: block; color: var(--brand); font-family: var(--f-head); font-size: 2.1rem; font-weight: 720; line-height: 1; }
.step h3 { margin: 14px 0 8px; font-size: 1.22rem; }
.step p, .value p { margin: 0; color: var(--muted); font-size: .94rem; }
.values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.value { padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.value h3 { margin: 14px 0 6px; font-size: 1.1rem; }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 36px 40px; border-radius: var(--r-lg); color: #fff; background: var(--stars), linear-gradient(120deg, #b3342a, #e0603f); box-shadow: var(--shadow); }
.cta-band h2 { margin: 0 0 6px; color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.cta-band p { margin: 0; opacity: .9; }

.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.contact-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.contact-card h3 { margin: 16px 0 6px; font-size: 1.18rem; }
.contact-card p { margin: 0 0 14px; color: var(--muted); font-size: .94rem; }
.contact-card .mail { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 650; word-break: break-all; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 52px; align-items: start; }
.form { display: flex; flex-direction: column; gap: 16px; padding: 30px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.form .btn { align-self: flex-start; }
.form-title { margin: 0 0 6px; font-size: 1.6rem; }
.form-note { margin: 0; color: var(--muted); font-size: .9rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: .84rem; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface-2); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field textarea { min-height: 150px; resize: vertical; }
.form-sent { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 11px; background: var(--gold-soft); color: var(--ink-2); font-size: .9rem; }
.form-sent a { color: var(--brand); font-weight: 600; }
.faq-title { margin: 8px 0 14px; font-size: 1.65rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; font-weight: 650; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brand); font-size: 1.4rem; font-weight: 400; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 16px; color: var(--muted); font-size: .95rem; }
.faq a { color: var(--brand); }

/* 404 */
.notfound { padding: 80px var(--gutter) 30px; text-align: center; }
.nf-art { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--navy); font-family: var(--f-head); font-size: clamp(5rem, 14vw, 9rem); font-weight: 800; line-height: 1; }
[data-theme="dark"] .nf-art { color: var(--ink); }
.nf-ballot { width: .9em; height: .9em; border-radius: .22em; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); transform: rotate(-6deg); }
.nf-ballot .ico { width: .55em; height: .55em; }
.notfound h1 { margin: 28px 0 0; font-size: clamp(1.9rem, 4vw, 2.7rem); }
.notfound .lead { margin: 14px auto 0; }
.notfound .hero-actions { margin: 30px 0 34px; }

/* ═══════════════ футер ═══════════════ */
.site-footer { position: relative; padding: 56px 0 30px; background: var(--foot); color: var(--on-dark-2); font-size: .93rem; }
.site-footer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--stripe); }
.footer-cta { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 38px 40px; border-radius: var(--r-lg); color: #fff; background: var(--stars), linear-gradient(120deg, #b3342a, #df5d3f); }
.footer-cta-text { position: relative; max-width: 640px; }
.footer-cta .kicker-light { color: #ffe3a3; }
.footer-cta h2 { margin: 10px 0 8px; color: #fff; font-size: clamp(1.45rem, 2.6vw, 2rem); }
.footer-cta p { margin: 0; opacity: .9; }
.footer-cta-actions { position: relative; display: flex; flex-wrap: wrap; gap: 12px; }
.footer-cta-art { position: absolute; right: 20px; bottom: -46px; width: 220px; height: 220px; stroke: #fff; fill: none; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; opacity: .14; pointer-events: none; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 54px; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-brand p { max-width: 34em; margin: 18px 0 16px; line-height: 1.6; }
.footer-mail { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; word-break: break-all; }
.footer-mail:hover { color: var(--gold); }
.footer-col h3 { margin: 4px 0 14px; color: #fff; font-family: var(--f-body); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 9px 0; }
.footer-col a { transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-top: 22px; font-size: .8rem; }
.footer-bottom p { margin: 0; }
.footer-bottom p:last-child { max-width: 62em; text-align: right; }

/* ═══════════════ оверлеї ═══════════════ */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(6, 12, 26, .55); opacity: 0; transition: opacity .3s; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(390px, 90vw); padding: 18px 18px 30px; overflow-y: auto; background: var(--bg); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 8px; }
.drawer-head .logo { margin-right: auto; }
.drawer-search { display: flex; align-items: center; gap: 10px; width: 100%; height: 50px; margin: 18px 0 6px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 13px; background: var(--surface); color: var(--muted); text-align: left; }
.drawer-search .ico { color: var(--brand); }
.drawer-label { margin: 22px 0 10px; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.drawer-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.drawer-topics a { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-size: .84rem; font-weight: 600; line-height: 1.25; }
.drawer-topics a:hover { border-color: var(--brand); }
.drawer-links a { display: flex; align-items: center; justify-content: space-between; padding: 13px 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.drawer-links a .ico { color: var(--muted); }

.search-modal { position: fixed; inset: 0; z-index: 90; }
.search-backdrop { position: absolute; inset: 0; background: rgba(6, 12, 26, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.search-box { position: relative; display: flex; flex-direction: column; width: min(700px, calc(100% - 24px)); max-height: 80vh; margin: 9vh auto 0; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); }
.search-form { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); }
.search-form > .ico { color: var(--brand); }
.search-form input[type="search"] { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 1.1rem; }
.search-form input::-webkit-search-cancel-button { display: none; }
.esc { padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: .75rem; font-weight: 600; }
.search-body { padding: 8px 16px 18px; overflow-y: auto; }
.search-label { margin: 14px 4px 8px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.search-list { list-style: none; margin: 0; padding: 0; }
.sr-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 11px; color: var(--ink); font-size: .95rem; line-height: 1.35; }
.sr-item:hover, .sr-item.active { background: var(--surface-2); }
.sr-item.active { box-shadow: inset 3px 0 0 var(--brand); }
.sr-item > .ico { color: var(--muted); }
.sr-tag { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.sr-count { margin-left: auto; padding-left: 12px; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.search-body mark { padding: 0 1px; border-radius: 3px; background: var(--gold-soft); color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); }
.search-empty { margin: 18px 4px; color: var(--muted); }
.search-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.search-foot kbd { margin-right: 3px; }

.cookie { position: fixed; left: 16px; bottom: 16px; z-index: 70; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 14px; max-width: 470px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); }
.cookie-ico { flex-shrink: 0; color: var(--gold); padding-top: 2px; }
.cookie p { flex: 1 1 260px; margin: 0; color: var(--ink-2); font-size: .88rem; line-height: 1.5; }
.cookie p a { color: var(--brand); font-weight: 600; }
.cookie-actions { display: flex; gap: 8px; margin-left: auto; }
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 48px; height: 48px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .25s, transform .25s, background .2s; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--brand-btn); }

/* ═══════════════ адаптив ═══════════════ */
@media (max-width: 1180px) {
  .main-nav > a.nav-link:nth-child(n+3) { display: none; }
  .post-layout, .page-layout { gap: 40px; }
  .topics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-main { max-width: 780px; }
  .post-side { display: none; }
  .toc-inline { display: block; }
  .page-layout { grid-template-columns: minmax(0, 1fr); }
  .page-side .side-sticky { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 980px) {
  .main-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .hero { padding: 44px 0 64px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-art { min-height: 0; padding: 30px 0 70px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .front { grid-template-columns: minmax(0, 1fr); }
  .front-list { border-top-width: 3px; }
  .picks-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-intro, .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .about-card { position: relative; top: 0; }
  .steps, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-bottom p:last-child { text-align: left; }
}
@media (max-width: 760px) {
  .topbar { display: none; }
  .header-row { height: 62px; gap: 12px; }
  .logo-mark { width: 38px; height: 38px; }
  .logo-text b { font-size: 1.22rem; }
  .search-btn { padding: 0; width: 40px; }
  .search-btn span, .search-btn kbd, .hero-search kbd { display: none; }
  .section { padding-top: 56px; }
  .card-featured { grid-template-columns: minmax(0, 1fr); }
  .card-featured .cover { min-height: 0; aspect-ratio: 16 / 9; }
  .card-featured .card-body { padding: 22px 22px 24px; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav-link.next { text-align: left; }
  .post-nav-link.next .post-nav-label { justify-content: flex-start; }
  .share-top { margin-left: 0; width: 100%; }
  .principles { padding: 26px 22px; }
  .principles-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-cta, .cta-band { padding: 28px 24px; }
  .prose { font-size: 1.06rem; }
  .prose h2 { font-size: 1.55rem; }
  .prose h3 { font-size: 1.22rem; }
  .cat-hero-art { width: 190px; height: 190px; right: -40px; }
  .page-side .side-sticky { grid-template-columns: minmax(0, 1fr); }
  .float-card { left: 0; }
}
@media (max-width: 620px) {
  :root { --gutter: 16px; }
  .grid, .topics-grid, .picks-list, .values, .form-row, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(2.05rem, 9vw, 2.6rem); }
  .hero-kicker { font-size: .72rem; }
  .hero-stats { gap: 22px; }
  .hero-stats dd { font-size: 1.55rem; }
  .ballot { transform: none; }
  .sticker { width: 88px; height: 88px; top: 0; right: -4px; }
  .sticker b { font-size: .92rem; }
  .float-card { position: relative; left: auto; bottom: auto; margin-top: -10px; transform: none; max-width: none; width: calc(100% - 24px); }
  .hero-art { padding: 34px 0 0; }
  .sec-head { flex-wrap: wrap; align-items: flex-start; }
  .card-lead .card-body { padding: 20px; }
  .author-box { flex-direction: column; gap: 14px; padding: 22px; }
  .cookie { left: 10px; right: 10px; bottom: 10px; max-width: none; }
  .search-box { margin-top: 12px; max-height: calc(100vh - 24px); }
  .search-foot { display: none; }
  .crumbs [aria-current] { max-width: 26ch; }
  .cat-hero-row { align-items: flex-start; }
  .cat-hero-ico { width: 54px; height: 54px; border-radius: 15px; }
  .quick-answer { padding: 18px 18px 20px; }
  .quick-answer p { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .site-header, .site-footer, .drawer, .search-modal, .cookie, .to-top, .progress, .post-side, .share, .post-nav, .more-in, .note-box { display: none !important; }
  body { background: #fff; color: #000; }
  .post-layout { display: block; }
}
