/* Elephus design system — lime + graphite + paper */
:root {
  --graphite: #0E1116;
  --graphite-2: #181C24;
  --graphite-3: #2A2E38;
  --paper: #F5F4EF;
  --paper-2: #ECEAE2;
  --paper-3: #E0DDD3;
  --ink: #1A1D24;
  --muted: #6E7280;
  --muted-2: #9AA0A8;
  --muted-3: #B6B9C0;
  --lime: #C6FF3D;
  --lime-dim: #6E7280; /* neutral gray for small accents on paper (replaced dark-green olive) */
  --crimson: #FF4D6D;
  --copper: #E07A2F;
  --white: #FFFFFF;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

/* ========== TYPE ========== */
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mono-sm { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mono-lg { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.lime-dot::after { content: "."; color: var(--lime); }

.h1 { font-weight: 800; font-size: clamp(2rem, 5.8vw, 72px); letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; margin: 0; }
.h2 { font-weight: 800; font-size: clamp(1.7rem, 4.3vw, 52px); letter-spacing: -0.035em; line-height: 1.08; text-wrap: balance; margin: 0; }
.h3 { font-weight: 800; font-size: clamp(1.5rem, 3.2vw, 36px); letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; margin: 0; }

/* Заголовки НЕ переносятся внутри слова: WordPress по умолчанию ставит
   word-break/overflow-wrap: break-word, из-за чего крупные слова рвались посередине
   на узких экранах. Отключаем разрыв слов; вместо этого размер шрифта плавно
   уменьшается (clamp выше), поэтому слова целиком помещаются на любой ширине.
   text-wrap: balance — аккуратно распределяет строки. */
.wp-block-heading, h1, h2, h3, h4, h5,
.h1, .h2, .h3, .h4, .h5 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}
.h4 { font-weight: 700; font-size: 24px; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
.h5 { font-weight: 700; font-size: 18px; letter-spacing: -0.015em; line-height: 1.3; margin: 0; }
.lead { font-size: 18px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-block;
}
.eyebrow.lime { color: var(--lime); }
/* On paper backgrounds, eyebrow drops to the neutral muted gray (matches head-meta).
   The "//" prefix stays in lime as a small accent. */
.section-paper .eyebrow.lime,
.section-paper-2 .eyebrow.lime,
.section-white .eyebrow.lime,
.section-lime .eyebrow.lime { color: var(--muted); }
.eyebrow.lime::before { content: "// "; }
.section-paper .eyebrow.lime::before,
.section-paper-2 .eyebrow.lime::before,
.section-white .eyebrow.lime::before { color: var(--lime-dim); }

@media (max-width: 900px) {
  /* Размеры .h1/.h2/.h3 теперь плавные (clamp) — ступенчатые правила не нужны. */
  .container, .container-wide { padding: 0 20px; }
}

/* ========== WORDMARK ========== */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.14em;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}
.wordmark::after {
  content: "";
  width: 0.18em;
  height: 0.18em;
  background: var(--lime);
  border-radius: 50%;
  display: inline-block;
}
.wordmark.dark { color: var(--paper); }
.wordmark.light { color: var(--graphite); }
.wordmark.xl { font-size: 88px; }
.wordmark.lg { font-size: 48px; }

/* ========== HEADER ========== */
.site-header-inner .wordmark { font-size: 30px; }
.site-header {
  background: var(--graphite);
  color: var(--paper);
  border-bottom: 1px solid var(--graphite-3);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: 1440px;
  margin: 0 auto;
  gap: 32px;
}
.site-nav { display: flex; gap: 28px; }
.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-3);
  transition: color 0.15s;
  position: relative;
}
.site-nav a:hover { color: var(--paper); }
.site-nav a.active { color: var(--paper); }
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  width: 100%;
  height: 3px;
  background: var(--lime);
  border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 16px; }
.lang-toggle { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); letter-spacing: 0.1em; }
.lang-toggle .active { color: var(--paper); }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  border-radius: 0;
  white-space: nowrap;
}
.btn-sm { padding: 9px 14px; font-size: 12px; }
.btn-lg { padding: 18px 28px; font-size: 15px; }
.btn-primary { background: var(--lime); color: var(--graphite); }
.btn-primary:hover { background: #B5EE2C; }
.btn-ghost-dark { background: transparent; color: var(--paper); border-color: var(--graphite-3); }
.btn-ghost-dark:hover { background: var(--graphite-2); border-color: var(--paper); }
.btn-ghost-light { background: transparent; color: var(--graphite); border-color: var(--paper-3); }
.btn-ghost-light:hover { background: var(--white); border-color: var(--graphite); }
.btn-graphite { background: var(--graphite); color: var(--paper); }
.btn-graphite:hover { background: var(--graphite-2); }
.btn .arrow { transition: transform 0.15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ========== HERO PATTERN ========== */
.section {
  padding: 96px 0;
}
.section-tight { padding: 64px 0; }
.section-loose { padding: 128px 0; }
.section-dark { background: var(--graphite); color: var(--paper); }
.section-paper { background: var(--paper); color: var(--ink); }
.section-paper-2 { background: var(--paper-2); color: var(--ink); }
.section-lime { background: var(--lime); color: var(--graphite); }
.section-white { background: var(--white); color: var(--ink); }

/* ========== FOIL — crumpled metallic silver surface ========== */
/* Mirrors the EMRA reference: silver foil field, bold black type, acid-lime accent. */
.section-foil {
  position: relative;
  isolation: isolate;
  background: #a7aab0 url("../brand/foil-silver.svg?v=5") center / cover no-repeat;
  color: var(--graphite);
}
.section-foil > * { position: relative; z-index: 1; }
/* soft light wash on the lead side keeps black type legible over darker creases */
.section-foil::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(102deg,
    rgba(233,233,236,0.80) 0%,
    rgba(233,233,236,0.42) 34%,
    rgba(233,233,236,0.08) 56%,
    rgba(233,233,236,0) 70%);
}
/* fine grain + a top sheen line so the sheet catches light at the header seam */
.section-foil::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0) 18%),
    linear-gradient(0deg, rgba(13,14,18,0.16) 0%, rgba(13,14,18,0) 22%);
}
.section-foil .eyebrow.lime { color: var(--graphite); }
.section-foil .eyebrow.lime::before { content: "// "; color: var(--lime-dim); }
.section-foil .foil-dot { color: var(--lime-dim); }
.foil-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 7px 13px;
  background: var(--graphite);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.foil-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
}
.section-head .head-title { display: flex; flex-direction: column; gap: 14px; }
.section-head .head-meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }

@media (max-width: 900px) {
  .section { padding: 64px 0; }
  .section-loose { padding: 80px 0; }
  .section-head { flex-direction: column; align-items: flex-start; margin-bottom: 32px; }
}

/* ========== CARDS ========== */
.card {
  background: var(--white);
  border: 1px solid var(--paper-3);
  border-radius: var(--r-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(14,17,22,0.08); }
.card-dark {
  background: var(--graphite-2);
  border: 1px solid var(--graphite-3);
  border-radius: var(--r-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--paper);
}
.card { position: relative; }
.card-num {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.card-num:empty,
.card-num > span:first-child:empty + .dot {
  /* When the number is gone, pin the indicator dot to the corner so the title sits at the top */
}
.card-num > span:first-child:empty {
  display: none;
}
.card-num:has(> span:first-child:empty) {
  position: absolute;
  top: 36px;
  right: 28px;
  margin: 0;
}
/* Titles in cards with a corner-pinned dot must not run under it */
.card:has(.card-num > span:first-child:empty) > h4,
.card:has(.card-num > span:first-child:empty) > .h5 {
  padding-right: 26px;
}
.card-num .dot { width: 8px; height: 8px; background: var(--lime); border-radius: 50%; }
.card-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--graphite);
  text-transform: uppercase;
  margin-top: auto;
}
.card-dark .card-link { color: var(--paper); }

/* ========== GRID UTILITIES ========== */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
}

/* ========== BADGE / CHIP ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--paper-3);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  background: var(--white);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }
.badge-dark { background: var(--graphite-2); color: var(--paper); border-color: var(--graphite-3); }
.badge-lime { background: var(--lime); color: var(--graphite); border-color: var(--lime); }

/* ========== FOOTER ========== */
.site-footer { background: var(--graphite); color: var(--muted-3); padding: 80px 0 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--graphite-3);
}
.footer-col h6 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 500;
  margin: 0 0 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--paper); font-size: 13px; }
.footer-col a:hover { color: var(--lime); }
.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.1em;
}
.footer-legal-link { color: var(--muted-2); text-decoration: none; transition: color 0.15s; }
.footer-legal-link:hover { color: var(--lime); }
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Подвал из блоков (редактируемый синхро-паттерн «Подвал сайта») — приводим
   блочную разметку (Columns + Heading + List + Group) к виду прежнего подвала. */
.site-footer .footer-cols {
  display: grid !important;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 48px !important;
  margin: 0;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--graphite-3);
  align-items: start;
}
.site-footer .footer-cols .wp-block-column { flex-basis: auto; }
.site-footer h6 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-2); font-weight: 500; margin: 0 0 18px;
}
.site-footer .footer-cols ul,
.site-footer .footer-cols .wp-block-list {
  list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px;
}
.site-footer .footer-cols li { margin: 0; }
.site-footer .footer-cols a { color: var(--paper); font-size: 13px; }
.site-footer .footer-cols a:hover { color: var(--lime); }
.site-footer .footer-meta-block {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding-top: 28px; font-family: var(--font-mono); font-size: 11px;
  color: var(--muted-2); letter-spacing: 0.1em;
}
.site-footer .footer-meta-block p { margin: 0; }
.site-footer .footer-meta-block a { color: var(--muted-2); }
.site-footer .footer-meta-block a:hover { color: var(--lime); }
@media (max-width: 1000px) {
  .site-footer .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .site-footer .footer-cols { grid-template-columns: 1fr !important; }
  .site-footer .footer-meta-block { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ========== UTILITIES ========== */
.divider { border-top: 1px solid var(--paper-3); }
.divider-dark { border-top: 1px solid var(--graphite-3); }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-48 { gap: 48px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.text-muted { color: var(--muted); }
.text-paper { color: var(--paper); }
.text-lime { color: var(--lime); }
.text-graphite { color: var(--graphite); }

.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .v { font-weight: 800; font-size: 44px; letter-spacing: -0.03em; line-height: 1; }
.kpi .l { font-size: 13px; color: var(--muted); }

/* form */
.input, .select {
  width: 100%;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--paper-3);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
}
.input:focus, .select:focus { outline: none; border-color: var(--graphite); }
.label-mono {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

/* mobile nav burger */
.burger { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 8px; margin: -8px; border-radius: 6px; transition: background 0.15s; }
.burger:hover { background: var(--graphite-2); }
.burger span { width: 22px; height: 2px; background: var(--paper); transition: transform 0.2s, opacity 0.2s; }
@media (max-width: 1100px) {
  .site-nav { display: none; }
  .burger { display: flex; }
}

/* ============================================ */
/* ============ RESPONSIVE LAYER ============== */
/* ============================================ */

/* --- Mobile burger menu overlay --- */
@media (max-width: 1100px) {
  .site-header-inner { padding: 14px 20px; gap: 16px; }
  body.nav-open { overflow: hidden; }
  body.nav-open .site-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    /* --header-h выставляется в js/site.js по реальной высоте шапки, чтобы меню
       начиналось ровно под ней (иначе накладка на нижнюю кромку шапки). */
    top: var(--header-h, 74px); left: 0; right: 0; bottom: 0;
    background: var(--graphite);
    padding: 32px 24px 48px;
    gap: 4px;
    z-index: 90;
    overflow-y: auto;
    border-top: 1px solid var(--graphite-3);
  }
  body.nav-open .site-nav a {
    font-size: 22px;
    font-weight: 700;
    color: var(--paper);
    padding: 16px 0;
    border-bottom: 1px solid var(--graphite-3);
    letter-spacing: -0.01em;
  }
  body.nav-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.nav-open .burger span:nth-child(2) { opacity: 0; }
  body.nav-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* --- Section padding shrinks on small screens --- */
@media (max-width: 900px) {
  .container, .container-wide { padding: 0 20px; }
  .section { padding: 56px 0; }
  .section-tight { padding: 40px 0; }
  .section-loose { padding: 64px 0; }
  /* Override sections with inline padding (most hero blocks) */
  .section-dark[style*="padding"],
  .section-paper[style*="padding"],
  .section-paper-2[style*="padding"],
  .section-lime[style*="padding"] {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
}
@media (max-width: 600px) {
  .section, .section-dark[style*="padding"], .section-paper[style*="padding"] { padding-top: 40px !important; padding-bottom: 40px !important; }
}

/* --- Hero / wide 2-col layouts collapse to a single column --- */
@media (max-width: 900px) {
  [style*="grid-template-columns: 1.5fr 1fr"],
  [style*="grid-template-columns: 1fr 1.5fr"],
  [style*="grid-template-columns: 1.4fr 1fr"],
  [style*="grid-template-columns: 1fr 1.4fr"],
  [style*="grid-template-columns: 1.1fr 1fr"],
  [style*="grid-template-columns: 1fr 1.1fr"],
  [style*="grid-template-columns: 2fr 1fr"],
  [style*="grid-template-columns: 1fr 2fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    align-items: start !important;
  }
}

/* --- Big inline hero headings need to shrink --- */
@media (max-width: 900px) {
  .h1[style*="font-size: 88px"],
  .h1[style*="font-size: 80px"],
  .h1[style*="font-size: 72px"] { font-size: 48px !important; line-height: 1.05 !important; }
  .h2[style*="font-size: 64px"],
  .h2[style*="font-size: 56px"],
  .h2[style*="font-size: 52px"] { font-size: 34px !important; }
  .h2[style*="font-size: 48px"],
  .h2[style*="font-size: 40px"] { font-size: 30px !important; }
  .h3[style*="font-size: 32px"],
  .h3[style*="font-size: 28px"] { font-size: 24px !important; }
}
@media (max-width: 500px) {
  .h1[style*="font-size"] { font-size: 36px !important; }
  .h2[style*="font-size"] { font-size: 26px !important; }
}

/* --- KPI numbers shrink --- */
@media (max-width: 700px) {
  .kpi .v { font-size: 32px; }
  .kpi .v[style*="font-size"] { font-size: 32px !important; }
}

/* --- Catalog: filter rail unsticks and product-card stacks --- */
@media (max-width: 1000px) {
  .filter-rail { position: static !important; }
}
@media (max-width: 700px) {
  .product-card {
    grid-template-columns: 48px 1fr !important;
    gap: 14px !important;
    padding: 18px !important;
  }
  .product-cta { grid-column: 1 / -1 !important; align-items: flex-start !important; flex-direction: row !important; justify-content: space-between; width: 100%; padding-top: 8px; border-top: 1px solid var(--paper-3); }
  .toolbar { flex-direction: column; gap: 10px; align-items: flex-start !important; padding: 14px !important; }
  .category-chips { gap: 4px; }
  .cat-chip { padding: 6px 10px !important; font-size: 11px !important; }
}

/* --- Industry-gov: 4-col solutions table stacks --- */
@media (max-width: 800px) {
  [style*="grid-template-columns: 64px 1fr 1.4fr 200px"] {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }
  [style*="grid-template-columns: 64px 1fr 1.4fr 200px"] > *:last-child { text-align: left !important; }
}

/* --- About: 6-col timeline becomes a 2-col grid then 1-col --- */
@media (max-width: 900px) {
  [style*="grid-template-columns: repeat(6, 1fr)"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
  }
}
@media (max-width: 500px) {
  [style*="grid-template-columns: repeat(6, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* --- Wordmark + buttons scale --- */
@media (max-width: 700px) {
  .wordmark { font-size: 20px; }
  .btn-lg { padding: 14px 20px; font-size: 14px; }
  .btn { padding: 12px 18px; }
  .section-head .head-meta { display: none; }
}

/* --- Footer cleanup on phones --- */
@media (max-width: 700px) {
  .site-footer { padding: 48px 0 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px !important; padding-bottom: 32px; }
  .footer-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr !important; }
}

/* --- Gantt-like timeline in services-siem becomes scrollable --- */
@media (max-width: 800px) {
  [style*="overflow-x: auto"] { font-size: 12px; }
}

/* --- Portal login: stack the two panels --- */
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr !important; min-height: auto !important; }
  .login-side, .login-form-side { padding: 40px 28px !important; }
}

/* --- Default container max-width breathing on tablets --- */
@media (max-width: 1100px) and (min-width: 901px) {
  .container-wide { padding: 0 32px; }
}

/* ============================================ */
/* ======= ДОСТУПНОСТЬ И ХЛЕБНЫЕ КРОШКИ ======= */
/* ============================================ */

/* main — обёртка содержимого между шапкой и подвалом (см. header.php/footer.php).
   Нужна и семантически, и для ссылки «Перейти к содержимому». */
main { display: block; }

/* Ссылка для клавиатуры и скринридеров: спрятана, пока не получит фокус.
   Google Lighthouse и требования доступности ожидают её на каждой странице. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--lime); color: var(--graphite);
  padding: 12px 20px; font-weight: 700; font-size: 14px;
}
.skip-link:focus { left: 0; }

/* Хлебные крошки. Выводятся в тёмной шапке материала (см. single-elephus_news.php):
   поисковики показывают этот путь вместо длинного адреса, а посетителю проще
   вернуться в раздел. Разделитель рисуем через ::before — он не попадает в текст
   ссылки и не мешает разметке BreadcrumbList. */
.crumbs { margin: 0 0 20px; }
.crumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.crumbs li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.crumbs li + li::before { content: "/"; color: var(--muted); opacity: 0.6; }
.crumbs a { color: var(--muted-2); text-decoration: none; transition: color 0.15s ease; }
.crumbs a:hover { color: var(--lime); }
.crumbs [aria-current="page"] { color: var(--muted-3); }

/* На светлых секциях крошки должны быть темнее фона. */
.is-style-section-paper .crumbs a,
.is-style-section-paper-2 .crumbs a,
.is-style-section-white .crumbs a { color: var(--muted); }
.is-style-section-paper .crumbs [aria-current="page"],
.is-style-section-paper-2 .crumbs [aria-current="page"],
.is-style-section-white .crumbs [aria-current="page"] { color: var(--ink); }

/* Похожие материалы под статьёй — внутренние ссылки, по которым поисковик
   доходит до старых новостей (иначе они висят только в карте сайта). */
.news-related { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--paper-3); }
.news-related h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 20px; }
.news-related-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-related-item { display: block; padding: 20px; background: var(--paper-2); border-radius: var(--r-md); transition: background 0.15s ease; }
.news-related-item:hover { background: var(--paper-3); }
.news-related-item span { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.news-related-item strong { display: block; font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
@media (max-width: 900px) { .news-related-list { grid-template-columns: 1fr; } }

/* ============================================ */
/* ======= ПЕЧАТЬ / ЭКСПОРТ В PDF ============= */
/* ============================================ */
/* Тёмная тема на бумаге читается плохо и тратит краску. Для печати и «Сохранить
 * как PDF» переворачиваем макет в светлый: белый фон, тёмный текст, без навигации,
 * кнопок и форм, с аккуратными разрывами страниц. */
@media print {
  @page { margin: 1.4cm; }

  /* Светлый фон + тёмный текст везде. print-color-adjust: exact — чтобы белый фон
     печатался даже при включённой опции браузера «Фоновая графика». Заодно
     background:#fff убирает фоновые текстуры/градиенты (foil, сетка). */
  *, *::before, *::after {
    background: #fff !important;
    color: #1a1a1a !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Прячем то, что на бумаге не нужно: шапку, меню, кнопки, формы, модалки, декор. */
  .site-header, .burger, .site-nav, .header-actions,
  .btn, .wp-block-button, .wp-block-buttons,
  #consult-modal, .news-lightbox, .login-close,
  .filter-chip, [data-elephus-post-filters],
  .footer-logo, form, .svc-anchor,
  .svc-card::after, .serv-card::after, .wp-block-elephus-card.card::after,
  .dot { display: none !important; }

  /* Карточки и бейджи — тонкая серая рамка вместо тёмной заливки. */
  .is-style-card-dark, .serv-card, .svc-card, .vendor-card, .post-card,
  .team-photo, .kpi-list, .foil-tag, .wp-block-elephus-card.card,
  p.is-style-badge, p.is-style-badge-dark, p.is-style-badge-lime {
    border: 1px solid #ccc !important;
  }

  a { color: #1a1a1a !important; text-decoration: none !important; }
  .site-header { position: static !important; }

  /* Фиксированные размеры заголовков — vw в печати ведёт себя непредсказуемо. */
  h1, .h1, .has-h-1-font-size, .has-h-1-lg-font-size { font-size: 24pt !important; line-height: 1.15 !important; }
  h2, .h2, .has-h-2-font-size, .has-h-2-lg-font-size { font-size: 18pt !important; line-height: 1.2 !important; }
  h3, .h3, .has-h-3-font-size { font-size: 14pt !important; }
  h4, .h4, .has-h-4-font-size { font-size: 12pt !important; }
  body { font-size: 10.5pt !important; }

  img, svg { max-width: 100% !important; height: auto !important; }
  svg text { fill: #1a1a1a !important; }

  /* Аккуратные разрывы страниц. */
  h1, h2, h3, h4, h5 { break-after: avoid; page-break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
  .serv-card, .svc-card, .vendor-card, .post-card, .team-card, .kpi-item,
  figure, img, tr { break-inside: avoid; page-break-inside: avoid; }

  /* На всю ширину листа; секции — с умеренными отступами (на экране они по 80–96px). */
  .container, .container-wide { max-width: 100% !important; padding: 0 !important; }
  [class*="is-style-section-"], .section, .section-tight, .section-loose {
    padding-top: 18px !important; padding-bottom: 18px !important;
  }

  /* Колонки выравниваем по верху. На экране колонки центрируются по высоте
     (align-self: center у .is-vertically-aligned-center), из-за чего на печати
     сверху зиял большой пустой отступ. Ставим выравнивание по верху. */
  .wp-block-columns.are-vertically-aligned-center { align-items: flex-start !important; }
  .wp-block-column.is-vertically-aligned-center { align-self: flex-start !important; }
  .wp-block-columns { gap: 16px !important; }
  /* Минимальные высоты секций (если заданы) на бумаге не нужны. */
  .login-shell, .wp-block-group { min-height: 0 !important; }
}
