/* ===== VERSTA SHARED STYLES (header, base, brand) ===== */
:root {
  --green: #134E3A;
  --green-dark: #0E3A2A;
  --cobalt: #3A5A8C;
  --terracotta: #D04A2E;
  --gold: #B8893B;
  --cream: #FAF8F2;
  --cream-2: #F2EFE5;
  --ink: #1A1A1A;
  --ink-2: #4A4A4A;
  --line: #E5E0D0;
  --ok: #2A7F4E;
  --warn: #C67D1E;
  --err: #B33A2A;
  /* iOS safe area insets */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* iOS touch targets: minimum 44px, no 300ms delay */
button, .tappable, .pill, [role="button"] {
  touch-action: manipulation;
  min-height: 44px;
  min-width: 44px;
  user-select: none;
  -webkit-user-select: none;
}

/* Prevent Safari zoom on input focus */
input, select, textarea { font-size: 16px; }

/* Scrollable areas: smooth momentum, no overscroll bleed */
.scrollable {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* 100dvh: avoids iOS address bar jump */
.screen {
  height: 100dvh;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

/* Bottom bar: above home indicator */
.bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding-bottom: calc(12px + var(--safe-bottom));
}

/* Landscape: safe area for notch/Dynamic Island */
@media (orientation: landscape) {
  .screen {
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
  }
}

.serif { font-family: 'PT Serif', Georgia, serif; }

/* ===== SHARED HEADER ===== */
.vh {
  background: var(--green);
  color: var(--cream);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 3px solid var(--gold);
}
.vh-logo {
  font-family: 'PT Serif', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--cream);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.vh-logo-mark {
  width: 32px; height: 32px;
  background: var(--gold);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--green);
  font-weight: 700;
  font-size: 16px;
}
.vh-nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
}
.vh-nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.vh-nav a:hover { opacity: 1; }
.vh-nav a.active {
  opacity: 1;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}
.vh-badge {
  background: var(--gold);
  color: var(--green);
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-left: 12px;
}

/* ===== BASE LAYOUT ===== */
section { padding: 48px 24px; }
.container { max-width: 1400px; margin: 0 auto; }
.section-head { margin-bottom: 28px; }
.section-eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 700;
  margin-bottom: 8px;
}
.section-title {
  font-family: 'PT Serif', serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.section-desc {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 760px;
  margin-top: 10px;
  line-height: 1.6;
}

/* ===== KPI TILES ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.kpi {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  position: relative;
}
.kpi.accent { border-left: 4px solid var(--terracotta); }
.kpi.green { border-left: 4px solid var(--green); }
.kpi.gold { border-left: 4px solid var(--gold); }
.kpi-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-2);
  margin-bottom: 8px;
  font-weight: 600;
}
.kpi-value {
  font-family: 'PT Serif', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
.kpi-value small {
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 400;
}
.kpi-delta {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
}
.kpi-delta.up { color: var(--ok); }
.kpi-delta.down { color: var(--err); }

/* ===== TABLES ===== */
.tbl-wrap {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tbl thead {
  background: var(--cream-2);
}
.tbl th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--green-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.tbl tr:hover td { background: var(--cream); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.status-ok { background: rgba(42,127,78,0.12); color: var(--ok); }
.status-warn { background: rgba(198,125,30,0.12); color: var(--warn); }
.status-err { background: rgba(179,58,42,0.12); color: var(--err); }
.status-info { background: rgba(58,90,140,0.12); color: var(--cobalt); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 0;
  text-decoration: none;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-primary { background: var(--green); color: var(--cream); }
.btn-primary:hover { background: var(--green-dark); }
.btn-gold { background: var(--gold); color: var(--green); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }

/* ===== FOOTER ===== */
footer.vfooter {
  background: var(--ink);
  color: var(--cream);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  opacity: 0.85;
}
footer.vfooter a { color: var(--gold); text-decoration: none; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--cream);
  padding: 48px 24px 40px;
  position: relative;
  overflow: hidden;
}
.hero h1 {
  font-family: 'PT Serif', serif;
  font-size: clamp(28px, 4.5vw, 48px);
  line-height: 1.1;
  font-weight: 700;
  max-width: 880px;
  margin-bottom: 14px;
}
.hero-sub {
  font-size: 16px;
  max-width: 720px;
  opacity: 0.85;
  line-height: 1.6;
}
.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .vh { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .vh-nav { width: 100%; order: 3; gap: 12px; }
  .vh-nav a { font-size: 13px; }
  section { padding: 36px 16px; }
  .hero { padding: 36px 16px 28px; }
  .section-title { font-size: 26px; }
  .kpi-value { font-size: 26px; }
}
@media (min-width: 2400px) {
  .container { max-width: 1800px; }
  .section-title { font-size: 48px; }
  .kpi-value { font-size: 44px; }
  .hero h1 { font-size: 64px; }
}

/* --- Разделение публичного и B2G слоёв --- */
.vh--b2g { background: #0E2B22; border-bottom: 1px solid rgba(184,137,59,0.3); }
.vh--b2g .vh-logo { color: #FAF8F2; }
.vh--b2g .vh-nav a { color: rgba(250,248,242,0.7); }
.vh--b2g .vh-nav a:hover { color: #FAF8F2; }
.vh--b2g .vh-nav a.active { color: #d4a93a; }
.vh--b2g .vh-nav a.b2g-link {
  position: relative; padding-left: 14px;
}
.vh--b2g .vh-nav a.b2g-link::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: #d97246;
}
.vh-b2g-entry {
  margin-left: auto;
  font: 600 11px/1 Inter, sans-serif; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(19,78,58,0.65); text-decoration: none;
  padding: 8px 14px; border: 1px solid rgba(19,78,58,0.18);
  border-radius: 999px; transition: all .2s; white-space: nowrap;
}
.vh-b2g-entry:hover {
  color: #134E3A; border-color: rgba(19,78,58,0.5); background: rgba(19,78,58,0.04);
}
.mobile-menu .mm-sep {
  margin: 18px 0 8px; padding: 0 4px;
  font: 600 10px/1 Inter, sans-serif; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(0,0,0,0.4); border-top: 1px solid rgba(0,0,0,0.08); padding-top: 14px;
}
.mobile-menu .b2g-link {
  color: #d97246 !important; font-weight: 600;
}
@media (max-width: 720px) {
  .vh-b2g-entry { font-size: 10px; padding: 6px 10px; }
}
