/*
Theme Name: CRM-CVM.ru
Theme URI: https://crm-cvm.ru
Description: Editorial catalog theme for CRM-CVM.ru — warm cream + gold accent, Playfair Display + IBM Plex Sans/Mono.
Version: 1.0
Author: AI Content Factory
Text Domain: crm-cvm
*/

/* ============================================================
   FONTS — self-hosted
   ============================================================ */
/* Self-hosted fonts — cyrillic+latin subsets, woff2.
   Заменяет fonts.googleapis.com: два внешних origin убраны из критического пути.
   Веса соответствуют реальному использованию в style.css. */

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/plexmono-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/plexmono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/plexmono-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/plexmono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('fonts/plexsans-300-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('fonts/plexsans-300-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/playfair-400i-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/playfair-400i-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/playfair-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/playfair-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface2: #f0ebe2;
  --border: #e2dbd0;
  --text: #1c1814;
  --text-body: #3d3028;
  --text-muted: #6b5f54;
  --text-dim: #a09488;
  --accent: #c8a96e;
  --accent-dim: #b8924a;
  --cyan: #1a7a84;
  --red: #9a2828;
  --green: #2a6a2a;
  --nav-bg: rgba(250,247,242,0.96);
  --ff-d: 'Playfair Display', Georgia, serif;
  --ff-b: 'IBM Plex Sans', -apple-system, sans-serif;
  --ff-m: 'IBM Plex Mono', 'Courier New', monospace;
  --max-w: 1200px;
  --pad: 48px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
::selection { background: var(--accent); color: var(--text); }

body {
  font-family: var(--ff-b);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-size: 256px 256px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: var(--ff-d); color: var(--text); font-weight: 700; line-height: 1.25; }
body { overflow-x: hidden; animation: page-fade-in 0.5s ease both; }

/* Animations */
@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes iti-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes iti-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
  z-index: 1;
}

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 54px;
  display: flex;
  align-items: center;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  width: 100%;
}
.nav-logo { margin-right: auto; }
.nav-logo {
  font-family: var(--ff-b);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.nav-logo .punct { color: var(--accent); }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin-right: 24px;
}
.nav-menu a {
  font-family: var(--ff-b);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-menu a:hover { color: var(--text); }
.nav-menu a.active { color: var(--text); font-weight: 600; }
.nav-cta {
  font-family: var(--ff-m);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: var(--accent);
  color: var(--text);
  padding: 7px 16px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.breadcrumbs,
.breadcrumbs a,
.breadcrumbs span {
  font-family: var(--ff-m);
  font-size: 11px;
  color: var(--text-dim);
}
.breadcrumbs a:hover { color: var(--accent); }
.bc-sep { margin: 0 6px; color: var(--border); }

/* ============================================================
   SECTION LABEL & HEADING
   ============================================================ */
.sl {
  font-family: var(--ff-m);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.sl::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}
.sh {
  font-family: var(--ff-d);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 16px;
}
.sh em {
  color: var(--accent);
  font-style: italic;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-block;
  font-family: var(--ff-m);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  background: var(--accent);
  color: var(--text);
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; }

/* Featured badge */
.badge-featured {
  display: inline-block;
  font-family: var(--ff-m);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
}
.badge-tier {
  display: inline-block;
  font-family: var(--ff-m);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
}
.badge-tier.pro { color: var(--accent); border-color: var(--accent-dim); }
.badge-tier.premium { color: var(--text); background: var(--accent); border-color: var(--accent); }
.btn-secondary {
  display: inline-block;
  font-family: var(--ff-m);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  background: transparent;
  color: var(--text-muted);
  padding: 12px 24px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--accent-dim); color: var(--text); }

/* ============================================================
   KF GRID (Key Figures)
   ============================================================ */
.kf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}
.kf-cell {
  background: var(--surface);
  padding: 16px 20px;
}
.kf-cell.alt { background: var(--surface2); }
.kf-num {
  font-family: var(--ff-d);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}
.kf-num.big { font-size: 40px; }
.kf-label {
  font-family: var(--ff-m);
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block;
  font-family: var(--ff-m);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border: 1px solid;
}
.badge-analytical { color: var(--accent); border-color: var(--accent-dim); }
.badge-original { color: var(--green); border-color: rgba(42,106,42,0.4); }
.badge-base { color: var(--text-muted); border-color: var(--border); }
.badge-column { color: var(--cyan); border-color: rgba(26,122,132,0.3); }

/* ============================================================
   CALLOUT & PULLQUOTE
   ============================================================ */
.callout {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 24px 0;
}
.callout-label {
  font-family: var(--ff-m);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.callout-text {
  font-family: var(--ff-b);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.6;
}
.pullquote {
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  padding: 24px 28px;
  margin: 32px 0;
}
.pullquote-text {
  font-family: var(--ff-d);
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
}
.pullquote-source {
  font-family: var(--ff-m);
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 10px;
}

/* ============================================================
   CARDS (agency, blog, toolkit)
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px 24px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--accent-dim); }
.card-title {
  font-family: var(--ff-b);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.card-desc {
  font-family: var(--ff-b);
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 6px;
}

/* Bar chart inline */
.bar-track {
  background: var(--surface2);
  border: 1px solid var(--border);
  height: 4px;
  width: 100%;
  margin-top: 6px;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  opacity: 0.6;
}

/* Agency rank card */
.rank-card {
  display: grid;
  grid-template-columns: 56px 1fr 200px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s;
}
.rank-card:hover { border-color: var(--accent-dim); }
.rank-card.top3 { border-left: 3px solid var(--accent); }
.rank-num {
  font-family: var(--ff-d);
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 0;
  border-right: 1px solid var(--border);
}
.rank-content { padding: 20px 24px; }
.rank-metrics {
  border-left: 1px solid var(--border);
  padding: 16px 20px;
}

/* Area tags */
.area-tag {
  display: inline-block;
  font-family: var(--ff-m);
  font-size: 10px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
}

/* ============================================================
   ARTICLE PROSE
   ============================================================ */
.article-prose h2 {
  font-family: var(--ff-d);
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
}
.article-prose p {
  font-family: var(--ff-b);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: 16px;
}
.article-prose a:not(.btn-primary):not(.btn-secondary) {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.article-prose a:not(.btn-primary):not(.btn-secondary):hover { border-bottom-color: var(--accent); }
.article-prose ul, .article-prose ol {
  margin: 16px 0;
  padding-left: 24px;
}
.article-prose li { margin-bottom: 8px; }
.article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
  line-height: 1.5;
}
.article-prose table thead th {
  background: var(--surface2);
  color: var(--text);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 2px solid var(--border);
}
.article-prose table tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-prose table tbody tr:nth-child(even) { background: var(--surface2); }
.article-prose table tbody tr:hover { background: rgba(200,169,110,0.04); }

/* FAQ */
.faq-section { margin: 24px 0; }
.faq-item {
  margin-bottom: 16px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  background: var(--surface2);
}
.faq-item h3 {
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.4;
}
.faq-item p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 15px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--surface2);
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: var(--ff-b);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.footer-logo .punct { color: var(--accent); }
.footer-sub {
  font-family: var(--ff-m);
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}
.footer-links { text-align: right; }
.show-mobile { display: none; }
.footer-copy {
  font-family: var(--ff-m);
  font-size: 10px;
  color: var(--text-dim);
}

/* ============================================================
   CTA SECTION (dark)
   ============================================================ */
.cta-dark {
  background: var(--text);
  padding: 64px 0;
}
.cta-dark h2 {
  font-family: var(--ff-d);
  font-size: 30px;
  color: var(--bg);
}
.cta-dark h2 em { color: var(--accent); font-style: italic; }
.cta-dark p {
  color: rgba(250,247,242,0.55);
  max-width: 520px;
  margin: 0 auto;
}

/* ============================================================
   INVITE BUTTON
   ============================================================ */
.invite-btn {
  font-family: var(--ff-m); font-size: 11px; font-weight: 500;
  letter-spacing: 0.04em; color: var(--accent);
  background: transparent; border: 1px solid var(--accent-dim);
  padding: 8px 16px; cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}
.invite-btn:hover { color: var(--text); background: var(--accent); border-color: var(--accent); }
.invite-btn.invited { color: var(--text); background: var(--accent); border-color: var(--accent); }
.invite-btn.compact { font-size: 10px; padding: 5px 12px; }

/* ============================================================
   FLOATING BAR (tender)
   ============================================================ */
.tender-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--text); border-top: 2px solid var(--accent);
  animation: iti-up 0.3s ease both;
}
.tender-bar-inner {
  display: flex; justify-content: space-between; align-items: center;
  height: 56px; gap: 12px;
}
.tender-bar-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.tender-bar-count { font-family: var(--ff-d); font-size: 20px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.tender-bar-word { font-family: var(--ff-m); font-size: 11px; color: rgba(250,247,242,0.5); letter-spacing: 0.04em; }
.tender-bar-names { display: flex; gap: 4px; overflow: hidden; }
.tender-bar-chip { font-family: var(--ff-m); font-size: 10px; color: rgba(250,247,242,0.6); background: rgba(255,255,255,0.06); padding: 2px 8px; white-space: nowrap; }
.tender-bar-more { font-family: var(--ff-m); font-size: 10px; color: rgba(250,247,242,0.3); }
.tender-bar-right { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.tender-bar-clear { font-family: var(--ff-m); font-size: 10px; color: rgba(250,247,242,0.35); background: none; border: none; cursor: pointer; }
.tender-bar-submit { font-family: var(--ff-m); font-size: 12px; font-weight: 500; color: var(--text); background: var(--accent); border: none; padding: 8px 16px; cursor: pointer; letter-spacing: 0.04em; }

/* ============================================================
   SLIDE PANEL (tender)
   ============================================================ */
.tender-panel-overlay { position: fixed; inset: 0; z-index: 299; background: rgba(28,24,20,0.5); display: none; }
.tender-panel-overlay.open { display: block; }
.tender-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 300;
  width: 480px; background: var(--bg); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.3s ease;
  overflow-y: auto;
}
.tender-panel.open { transform: translateX(0); }
.tender-panel-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.tender-panel-title { font-family: var(--ff-d); font-size: 20px; font-weight: 700; color: var(--text); }
.tender-panel-close { font-family: var(--ff-m); font-size: 20px; color: var(--text-dim); background: none; border: none; cursor: pointer; padding: 4px; }
.tender-panel-list { flex: 1; overflow-y: auto; }
.tender-panel-row { padding: 14px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; }
.tender-panel-remove { font-family: var(--ff-m); font-size: 10px; color: var(--red); background: none; border: 1px solid rgba(154,40,40,0.2); padding: 3px 8px; cursor: pointer; flex-shrink: 0; margin-left: 8px; }
.tender-panel-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface); }
.tender-panel-cta {
  display: block; width: 100%; text-align: center;
  font-family: var(--ff-m); font-size: 13px; font-weight: 500;
  color: var(--text); background: var(--accent); border: none;
  padding: 14px; cursor: pointer; letter-spacing: 0.04em; margin-bottom: 6px;
}

/* ============================================================
   TENDER FORM
   ============================================================ */
.tender-form-container { max-width: 720px; margin: 0 auto; padding: 32px 0 80px; }
.tender-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tender-form label { font-family: var(--ff-m); font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; display: block; }
.tender-form select {
  width: 100%; padding: 12px 14px; font-family: var(--ff-b); font-size: 14px; font-weight: 400;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); outline: none;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a09488' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
  cursor: pointer;
}
.tender-form select:focus { border-color: var(--accent-dim); }
.tender-form input, .tender-form textarea {
  width: 100%; padding: 12px 14px; font-family: var(--ff-b); font-size: 14px; font-weight: 400;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); outline: none;
}
.tender-form input:focus, .tender-form textarea:focus { border-color: var(--accent-dim); }
.tender-form textarea { min-height: 120px; resize: vertical; }
.tender-form .field-error { font-family: var(--ff-m); font-size: 10px; color: var(--red); margin-top: 4px; }
.tender-form input::placeholder, .tender-form textarea::placeholder { color: var(--text-dim); }

/* ============================================================
   PAGINATOR (blog)
   ============================================================ */
.blog-paginator { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 32px; }
.blog-paginator a, .blog-paginator span {
  font-family: var(--ff-m); font-size: 12px; font-weight: 400;
  color: var(--text-muted); background: none;
  border: 1px solid transparent; padding: 7px 12px; min-width: 36px;
  text-align: center; text-decoration: none; transition: all 0.2s; display: inline-block;
}
.blog-paginator a:hover { border-color: var(--border); color: var(--text); }
.blog-paginator .current {
  font-weight: 500; color: var(--text); background: var(--surface);
  border: 1px solid var(--accent);
}
.blog-paginator .prev, .blog-paginator .next {
  border: 1px solid var(--border); color: var(--text-muted);
}
.blog-paginator .prev:hover, .blog-paginator .next:hover { border-color: var(--accent-dim); color: var(--text); }
.blog-paginator .dots { border: none; color: var(--text-dim); }
.blog-paginator-count {
  font-family: var(--ff-m); font-size: 10px; color: var(--text-dim); margin-left: 12px;
}

/* ============================================================
   PILLAR PAGE LAYOUT
   ============================================================ */
.pillar-layout { display: grid; grid-template-columns: 200px 1fr 200px; gap: 0; min-height: 60vh; }
.pillar-toc { border-right: 1px solid var(--border); padding: 40px 20px 40px 0; }
.pillar-toc-sticky { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow-y: auto; }
.pillar-content { }
.pillar-header { padding: 40px 40px 0; }
.pillar-body { padding: 24px 40px 40px; }
.pillar-meta { border-left: 1px solid var(--border); padding: 40px 0 40px 20px; }
.pillar-meta-sticky { position: sticky; top: 70px; }

@media (max-width: 1024px) {
  .pillar-layout { grid-template-columns: 1fr; }
  .pillar-toc, .pillar-meta { display: none; }
  .pillar-header { padding: 24px 0 0; }
  .pillar-body { padding: 16px 0 40px; }
}

/* ============================================================
   COPY PROTECTION (legal pages)
   ============================================================ */
.no-copy {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.no-copy::selection { background: transparent; }
.no-copy ::-moz-selection { background: transparent; }

/* ============================================================
   YEAR TABS (ratings page)
   ============================================================ */
.year-tab {
  font-family: var(--ff-d); font-size: 18px; font-weight: 700;
  color: var(--text-dim); background: transparent;
  border: 1px solid transparent; border-bottom: 1px solid transparent;
  padding: 12px 24px; margin-bottom: -1px;
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; transition: all 0.2s; cursor: pointer;
}
.year-tab:hover { color: var(--accent); }
.year-tab.active {
  color: var(--accent); background: var(--surface);
  border: 1px solid var(--border); border-bottom: 2px solid var(--accent);
}

/* ============================================================
   HIDE MOBILE
   ============================================================ */
.hide-mobile { }

/* ============================================================
   RESPONSIVE GRID CLASSES (used in templates)
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); }
.grid-hero { display: grid; grid-template-columns: 1fr 360px; gap: 48px; align-items: start; }
.grid-featured { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-article { display: grid; grid-template-columns: 1fr 680px 1fr; gap: 0; min-height: 60vh; }
.article-aside-left { border-right: 1px solid var(--border); padding: 40px 24px 40px 0; }
.article-toc-sticky { position: sticky; top: 80px; }
.article-aside-right { border-left: 1px solid var(--border); padding: 40px 0 40px 24px; }
.article-meta-sticky { position: sticky; top: 80px; }
.article-header { padding: 40px 40px 0; }
.article-body { padding: 16px 40px 40px; }
.grid-methodology { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-area-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
/* Toolkit cards */
.toolkit-card { background: var(--surface); padding: 28px 24px; cursor: pointer; border-left: 3px solid var(--accent); transition: background 0.2s; }
.toolkit-card:hover { background: var(--bg); }

/* Shortlist widget */
.shortlist-row { padding: 12px 20px; transition: padding 0.2s, background 0.2s; }
.shortlist-row:hover { padding: 14px 20px 16px; background: var(--bg); }
.shortlist-first { padding: 14px 20px 16px; background: var(--bg); }
.shortlist-expanded { display: none; overflow: hidden; transition: opacity 0.2s; }
.shortlist-first .shortlist-expanded { display: block; }
.shortlist-row:hover .shortlist-expanded { display: block; }
.shortlist-bar { transition: width 0.8s ease; }
.shortlist-footer { transition: background 0.2s; }
.shortlist-footer:hover { background: var(--border) !important; }

/* Grid cell hover (audience, columns, blog, how-it-works) */
.grid-cell { background: var(--surface); transition: background 0.2s; }
.grid-cell:hover { background: var(--bg); }

/* Area filter buttons */
.area-filter-btn { font-family: var(--ff-b); font-size: 13px; padding: 9px 14px; border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; font-weight: 400; text-align: left; display: flex; justify-content: space-between; align-items: center; transition: border-color 0.2s, background 0.2s; }
.area-filter-btn:hover { border-color: var(--border) !important; }
.area-filter-btn.active { border-color: var(--accent-dim) !important; background: var(--surface2); color: var(--accent); font-weight: 600; }
.area-filter-btn .count { font-family: var(--ff-m); font-size: 10px; color: var(--text-dim); }
.area-filter-btn.active .count { color: var(--accent-dim); }
.grid-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); }

/* Mobile hamburger */
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; transition: transform 0.2s, opacity 0.2s; }
.mobile-menu { display: none; position: fixed; top: 54px; left: 0; right: 0; background: var(--nav-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 16px var(--pad); z-index: 99; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; font-family: var(--ff-b); font-size: 15px; color: var(--text-muted); padding: 10px 0; border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover, .mobile-menu a.active { color: var(--text); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --pad: 24px; }
  .kf-grid { grid-template-columns: repeat(2, 1fr); }
  .rank-card { grid-template-columns: 48px 1fr; }
  .rank-metrics { grid-column: 1 / -1; border-left: none; border-top: 1px solid var(--border); }
  .grid-hero { grid-template-columns: 1fr; gap: 32px; }
  .grid-article { grid-template-columns: 1fr; }
  .article-aside-left, .article-aside-right { display: none; }
  .article-header { padding: 24px 0 0; }
  .article-body { padding: 16px 0 40px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-stats { grid-template-columns: repeat(2, 1fr); }
  .grid-area-btns { grid-template-columns: repeat(3, 1fr); }
  .grid-methodology { grid-template-columns: 1fr; gap: 16px; }
  .grid-featured { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 768px) {
  :root { --pad: 16px; }
  .sh { font-size: 26px; }
  .kf-grid { grid-template-columns: 1fr 1fr; }
  .nav-menu { display: none; }
  .nav-burger { display: block; }
  .rank-card { grid-template-columns: 1fr; }
  .rank-num { border-right: none; border-bottom: 1px solid var(--border); justify-content: flex-start; padding: 12px 16px; }
  .article-prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .grid-hero { gap: 24px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-stats { grid-template-columns: 1fr 1fr; }
  .grid-area-btns { grid-template-columns: repeat(2, 1fr); }
  .grid-featured { gap: 16px; }
  .site-footer .wrap { flex-direction: column; gap: 12px; text-align: center; }
  .site-footer .footer-links { text-align: center !important; }
  .card-inner { grid-template-columns: 32px 1fr auto !important; gap: 10px !important; }
  .card-inner .hide-mobile { display: none !important; }
  .hide-mobile { display: none !important; }
  .show-mobile { display: inline !important; }
  .tender-panel { width: 100% !important; }
  .tender-form-container { max-width: 100% !important; }
  .tender-form-row { grid-template-columns: 1fr !important; gap: 14px !important; }
  .site-footer .wrap > div:last-child { text-align: center; }
  /* Taxonomy /uslugi/ mobile fixes */
  .service-kf { grid-template-columns: 1fr 1fr !important; }
  .service-agency-row { grid-template-columns: 32px 1fr !important; gap: 8px !important; }
  .service-agency-row .sa-stars,
  .service-agency-row .sa-cases,
  .service-agency-row .sa-rev { display: none !important; }
  .service-agency-row .sa-cta { grid-column: 1 / -1; }
  .service-includes { grid-template-columns: 1fr !important; }
  .service-when-platforms { grid-template-columns: 1fr !important; gap: 24px !important; }
  .hero-section { padding: 48px 0 32px; }
  .section-lg { padding: 40px 0; }
  .pullquote-block { padding: 20px 24px; }
}
