/* ==========================================================================
   ICEBERG ANALYTICS — DESIGN LANGUAGE SYSTEM
   Периодическая система FMCG · Версия 1.0 (2026)
   Строгое следование брендбуку Iceberg Analytics
   ========================================================================== */

/* --- CSS Variables: Brandbook Tokens --- */
:root {
  /* Brand Primary Signal */
  --signal-blue: #1F5FD6;          /* oklch(0.52 0.17 253) */
  --signal-blue-hover: #174bb0;
  --signal-blue-light: #EBF2FD;
  --signal-dark: #3D82F6;          /* oklch(0.70 0.16 248) for dark mode contrast */

  /* Neutrals: Brandbook Scale */
  --paper: #F8F9FA;                /* N-00: Background base (72% usage) */
  --n00: #F8F9FA;
  --n10: #EBEDF0;                  /* Card hover, subtle backgrounds */
  --n20: #D5D8DD;                  /* Primary 1px borders & dividers */
  --n40: #A9AEB6;                  /* Secondary borders, placeholders */
  --n60: #767C85;                  /* Secondary text, neutral states */
  --n80: #43484F;                  /* Body text, subheadings */
  --n95: #1B1E24;                  /* N-95 / Graphite: Headings, dark backgrounds (20% usage) */
  --graphite: #1B1E24;
  --white: #FFFFFF;

  /* State Colors (Brandbook: Strictly by measured facts/deviations, not decoration) */
  --state-growth: #22863A;         /* oklch(0.55 0.12 155) - Plan fulfilled, positive effect */
  --state-growth-bg: #F0FDF4;
  --state-growth-border: #BBF7D0;

  --state-risk: #D97706;           /* oklch(0.72 0.14 75) - Deviation in focus area, forecast below plan */
  --state-risk-bg: #FFFBEB;
  --state-risk-border: #FDE68A;

  --state-loss: #DC2626;           /* oklch(0.55 0.18 25) - Critical deviation, lost volume */
  --state-loss-bg: #FEF2F2;
  --state-loss-border: #FECACA;

  --state-neutral: #767C85;        /* oklch(0.55 0.008 250) - Fact without evaluation */

  /* Dark UI Environment (Brandbook p.9, 18) */
  --dark-bg: #14171C;
  --dark-surface: #1B1E24;
  --dark-surface-2: #242932;
  --dark-border: #323844;
  --dark-text-primary: #F8F9FA;
  --dark-text-secondary: #A9AEB6;

  /* Typography */
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', Consolas, Monaco, monospace;

  /* Corner Radii (Brandbook p.11: r0 for tables/schemes, r4 for UI cards, pill for filters/tags) */
  --r-none: 0px;
  --r-card: 4px;
  --r-pill: 9999px;

  /* Spacing Scale (Brandbook: Module 8: 4, 8, 16, 24, 40, 64) */
  --space-4: 4px;
  --space-8: 8px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-64: 64px;
  --space-96: 96px;

  /* Layout */
  --container-max: 1280px;
  --header-height: 72px;
}

/* --- Global Reset & Box Sizing --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--paper);
  color: var(--n80);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.533; /* 15/23 per brandbook */
  font-weight: 400;
  text-align: left; /* strictly left-aligned per brandbook */
  overflow-x: hidden;
}

/* --- Brandbook Typography System (p.10) --- */
/* Display: 40/44, 500, letter-spacing -3% */
.type-display {
  font-family: var(--font-sans);
  font-size: 38px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--graphite);
}
@media (min-width: 768px) {
  .type-display {
    font-size: 42px;
    line-height: 1.12;
  }
}

/* H1: 30/36, 500, -2.5% */
h1, .type-h1 {
  font-family: var(--font-sans);
  font-size: 26px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--graphite);
}
@media (min-width: 768px) {
  h1, .type-h1 {
    font-size: 30px;
    line-height: 1.2;
  }
}

/* H2: 22/28, 500 */
h2, .type-h2 {
  font-family: var(--font-sans);
  font-size: 22px;
  line-height: 1.27;
  font-weight: 500;
  color: var(--graphite);
}

/* H3: 17/24, 600 */
h3, .type-h3 {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.41;
  font-weight: 600;
  color: var(--graphite);
}

/* Body: 15/23, 400 */
p, .type-body {
  font-size: 15px;
  line-height: 1.533;
  color: var(--n80);
}

/* Caption: 12.5/18, 400 */
.type-caption {
  font-size: 12.5px;
  line-height: 1.44;
  color: var(--n60);
}

/* Label Mono: 11px, mono, uppercase, tracking +14% */
.type-label-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--n60);
}

/* Tabular numbers for tables, KPI and metrics */
.num-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Alignment rule: Numbers in KPI & tables align right */
.align-right {
  text-align: right;
}

a {
  color: var(--signal-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--signal-blue-hover);
}

/* --- Container & Grid (Brandbook p.11: 12 columns, max 1280px) --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}
@media (min-width: 576px) {
  .container {
    padding-left: var(--space-24);
    padding-right: var(--space-24);
  }
}
@media (min-width: 992px) {
  .container {
    padding-left: var(--space-40);
    padding-right: var(--space-40);
  }
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-24);
}
@media (max-width: 767px) {
  .grid-12 {
    grid-template-columns: 1fr;
    gap: var(--space-16);
  }
  .grid-12 > [style*="grid-column"],
  .grid-12 > div {
    grid-column: 1 / -1 !important;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .grid-12 {
    gap: var(--space-16);
  }
  .grid-12 > [style*="span 3"],
  .grid-12 > [style*="span 4"] {
    grid-column: span 6 !important;
  }
}

/* --- Brandbook Logo Element (p.5, 6, 22) --- */
.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 28px;
  height: 28px;
  position: relative;
  flex-shrink: 0;
}
/* Mark geometry: Contour box 20x20 with stroke 2px, shifted solid blue box 15x15 */
.brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}
.brand-text-block {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--graphite);
  line-height: 1.15;
}
.brand-descriptor {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--n60);
  margin-top: 3px;
}

/* Dark mode logo */
.theme-dark .brand-name {
  color: var(--white);
}
.theme-dark .brand-descriptor {
  color: var(--n40);
}

/* --- Header / Navigation Bar --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(248, 249, 250, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--n20);
  height: var(--header-height);
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-menu {
  display: none;
  list-style: none;
  align-items: center;
  gap: 32px;
}
@media (min-width: 992px) {
  .nav-menu {
    display: flex;
  }
}
.nav-item {
  position: relative;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--n80);
  transition: color 0.15s ease;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-link:hover, .nav-link.active {
  color: var(--graphite);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--signal-blue);
}

/* Dropdown Menu for Directions */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--n20);
  border-radius: var(--r-card);
  padding: 8px 0;
  min-width: 280px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  display: none;
  z-index: 110;
}
.nav-item:hover .nav-dropdown {
  display: block;
}
.nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--n80);
  border-bottom: 1px solid var(--n10);
  transition: background 0.1s ease;
}
.nav-dropdown-item:last-child {
  border-bottom: none;
}
.nav-dropdown-item:hover {
  background: var(--n00);
  color: var(--signal-blue);
}
.nav-dropdown-item small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--n60);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile hamburger */
.mobile-menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
@media (min-width: 992px) {
  .mobile-menu-toggle {
    display: none;
  }
}
.mobile-menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--graphite);
  transition: transform 0.2s ease;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  border-top: 1px solid var(--n20);
  padding: var(--space-24);
  overflow-y: auto;
  z-index: 99;
}
.mobile-drawer.open {
  display: block;
}
.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mobile-nav-item a {
  font-size: 16px;
  font-weight: 500;
  color: var(--graphite);
  display: block;
  padding: 8px 0;
}
.mobile-sub-list {
  list-style: none;
  padding-left: 16px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mobile-sub-list a {
  font-size: 14px;
  color: var(--n60);
}

/* --- Brandbook Button System (p.12, 16, 17) --- */
/* Strictly: Icon only left of text, 16px, gap 8px */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  padding: 12px 20px;
  border-radius: var(--r-card);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}
.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

/* Primary Action: Signal Blue */
.btn-primary {
  background-color: var(--signal-blue);
  color: var(--white);
  border-color: var(--signal-blue);
}
.btn-primary:hover {
  background-color: var(--signal-blue-hover);
  border-color: var(--signal-blue-hover);
  color: var(--white);
}

/* Secondary Action: Ghost / Outline on Paper */
.btn-secondary {
  background-color: transparent;
  color: var(--graphite);
  border-color: var(--n20);
}
.btn-secondary:hover {
  background-color: var(--n10);
  border-color: var(--n40);
  color: var(--graphite);
}

/* Dark Mode Action Button */
.btn-dark-primary {
  background-color: var(--signal-dark);
  color: var(--white);
  border-color: var(--signal-dark);
}
.btn-dark-primary:hover {
  background-color: #2b70e0;
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* --- Section Dividers & Structure (Brandbook: 1px lines, no heavy cards) --- */
.section-divider {
  border: none;
  border-top: 1px solid var(--n20);
  margin: 0;
}

.section {
  padding-top: var(--space-64);
  padding-bottom: var(--space-64);
  border-bottom: 1px solid var(--n20);
}
@media (min-width: 992px) {
  .section {
    padding-top: var(--space-96);
    padding-bottom: var(--space-96);
  }
}

/* --- Hero Block (Brandbook p.17 & User Spec) --- */
.hero-hub {
  padding-top: var(--space-64);
  padding-bottom: var(--space-64);
  background-color: var(--paper);
  border-bottom: 1px solid var(--n20);
}
@media (min-width: 992px) {
  .hero-hub {
    padding-top: 80px;
    padding-bottom: 80px;
  }
}

.hero-preheader {
  display: inline-block;
  margin-bottom: var(--space-16);
  background-color: var(--n10);
  border: 1px solid var(--n20);
  padding: 6px 12px;
  border-radius: var(--r-card);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 600;
}

.hero-title {
  margin-bottom: var(--space-24);
  max-width: 1040px;
}
.hero-title-prefix {
  display: block;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 400;
  color: var(--n60);
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}
@media (min-width: 768px) {
  .hero-title-prefix {
    font-size: 28px;
    line-height: 1.22;
  }
}
@media (min-width: 1200px) {
  .hero-title-prefix {
    font-size: 30px;
    line-height: 1.2;
  }
}
.hero-title-accent {
  display: block;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--graphite);
  letter-spacing: -0.03em;
}
@media (min-width: 768px) {
  .hero-title-accent {
    font-size: 40px;
    line-height: 1.12;
  }
}
@media (min-width: 1200px) {
  .hero-title-accent {
    font-size: 44px;
  }
}
.hero-title-line {
  display: block;
}

.hero-subtitle {
  font-size: 17px;
  line-height: 1.6;
  color: var(--n80);
  max-width: 980px;
  margin-bottom: var(--space-40);
}

/* --- Hero 2-Column Layout with Splash Thematic Illustration --- */
.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-32);
  align-items: center;
  margin-bottom: var(--space-40);
}
@media (min-width: 992px) {
  .hero-layout {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
  }
}
.hero-hub .hero-layout:last-child {
  margin-bottom: 0;
}
.hero-main {
  display: flex;
  flex-direction: column;
}
.hero-main .hero-title {
  margin-bottom: var(--space-20);
  max-width: none;
}
.hero-main .hero-subtitle {
  margin-bottom: 0;
  max-width: none;
}
.hero-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: var(--r-card);
  padding: 0;
  box-shadow: none;
}
.hero-illustration svg {
  width: 100%;
  max-width: 540px;
  height: auto;
  display: block;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: var(--space-24);
}
.hero-audience-box {
  border-left: 3px solid var(--graphite);
  padding: 12px 18px;
  background: var(--n10);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--n80);
}

/* Trust & Industry Panel (User Spec) */
.trust-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  border: 1px solid var(--n20);
  background-color: var(--white);
  border-radius: var(--r-card);
  padding: 24px;
  margin-bottom: var(--space-40);
}
@media (min-width: 768px) {
  .trust-panel {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}
.trust-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trust-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--n60);
  display: flex;
  align-items: center;
  gap: 6px;
}
.trust-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--signal-blue);
}
.trust-text {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--n80);
}

/* --- Interactive Track Navigator: "Выберите ваше ключевое направление" --- */
.navigator-section {
  margin-top: var(--space-40);
}
.navigator-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--n20);
  border-bottom: none;
  background-color: var(--n10);
  padding: 12px 20px;
  border-top-left-radius: var(--r-card);
  border-top-right-radius: var(--r-card);
}
.navigator-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 600;
}
.navigator-grid {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--n20);
  background-color: var(--white);
}
@media (min-width: 768px) {
  .navigator-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .navigator-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.nav-track-card {
  padding: 24px;
  border-bottom: 1px solid var(--n20);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.15s ease;
  background: var(--white);
  text-decoration: none;
  color: inherit;
}
@media (min-width: 768px) {
  .nav-track-card:nth-child(odd) {
    border-right: 1px solid var(--n20);
  }
}
@media (min-width: 1024px) {
  .nav-track-card {
    border-bottom: none;
    border-right: 1px solid var(--n20);
  }
  .nav-track-card:last-child {
    border-right: none;
  }
}
.nav-track-card:hover {
  background-color: var(--n00);
}
.nav-track-card.active-preview {
  outline: 2px solid var(--signal-blue);
  outline-offset: -2px;
  background-color: #FAFBFD;
}
.track-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--signal-blue);
  margin-bottom: 8px;
}
.track-title {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--graphite);
  margin-bottom: 8px;
  line-height: 1.3;
}
.track-audience {
  font-size: 12.5px;
  color: var(--n60);
  line-height: 1.4;
  margin-bottom: 16px;
}
.track-action {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--signal-blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

/* --- Periodic System FMCG Elements Grid (Brandbook p.13) --- */
.elements-board {
  border: 1px solid var(--n20);
  background: var(--white);
  padding: 24px;
  border-radius: var(--r-card);
  margin-top: var(--space-24);
}
.elements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .elements-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 900px) {
  .elements-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 1200px) {
  .elements-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Exact Brandbook Element Cell (p.13) */
.elem-cell {
  border: 1px solid var(--n20);
  padding: 12px 14px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 96px;
  cursor: pointer;
  transition: all 0.12s ease;
  position: relative;
}
.elem-cell:hover {
  border-color: var(--n60);
  background: var(--n00);
}
.elem-cell.is-selected {
  border-color: var(--signal-blue);
  box-shadow: 0 0 0 1px var(--signal-blue);
}
.elem-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--n60);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.elem-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--graphite);
}
.elem-value {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--graphite);
}

/* State codings for elements (p.13: grey = normal, colored = deviation, blue = action ready) */
.elem-cell.state-normal {
  background: var(--n00);
}
.elem-cell.state-risk {
  border-left: 3px solid var(--state-risk);
  background: #FFFDF8;
}
.elem-cell.state-risk .elem-value {
  color: var(--state-risk);
}
.elem-cell.state-loss {
  border-left: 3px solid var(--state-loss);
  background: #FFF8F8;
}
.elem-cell.state-loss .elem-value {
  color: var(--state-loss);
}
.elem-cell.state-growth {
  border-left: 3px solid var(--state-growth);
  background: #F6FCF7;
}
.elem-cell.state-growth .elem-value {
  color: var(--state-growth);
}
.elem-cell.state-action {
  border: 1px solid var(--signal-blue);
  background: var(--signal-blue);
  color: var(--white);
}
.elem-cell.state-action .elem-code,
.elem-cell.state-action .elem-name,
.elem-cell.state-action .elem-value {
  color: var(--white);
}

/* --- 4 Layers of FMCG Analytics (Brandbook p.13) --- */
.layers-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
}
@media (min-width: 768px) {
  .layers-container {
    grid-template-columns: repeat(4, 1fr);
  }
}
.layer-card {
  border: 1px solid var(--n20);
  background: var(--white);
  padding: 16px;
  border-radius: var(--r-card);
}
.layer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.layer-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--n60);
  border: 1px solid var(--n20);
  padding: 2px 6px;
}
.layer-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--graphite);
}
.layer-text {
  font-size: 13px;
  color: var(--n80);
  line-height: 1.4;
}

/* --- Metric & Evidence Grid (Brandbook p.17) --- */
.metric-grid-hub {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--n20);
  background: var(--white);
  border-radius: var(--r-card);
}
@media (min-width: 900px) {
  .metric-grid-hub {
    grid-template-columns: repeat(4, 1fr);
  }
}
.metric-hub-item {
  padding: 32px 24px;
  border-bottom: 1px solid var(--n20);
}
@media (min-width: 600px) {
  .metric-hub-item:nth-child(odd) {
    border-right: 1px solid var(--n20);
  }
}
@media (min-width: 900px) {
  .metric-hub-item {
    border-bottom: none;
    border-right: 1px solid var(--n20);
  }
  .metric-hub-item:last-child {
    border-right: none;
  }
}
.metric-hub-val {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 600;
  color: var(--graphite);
  line-height: 1.1;
  margin-bottom: 8px;
}
.metric-hub-desc {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--n60);
}

/* --- Brandbook UI Card: Anatomy (p.16) ---
   метка -> значение -> причина -> действие */
.ui-data-card {
  border: 1px solid var(--n20);
  background: var(--white);
  border-radius: var(--r-card);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
}
.ui-data-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--n60);
  margin-bottom: 8px;
}
.ui-data-val {
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 600;
  color: var(--graphite);
  line-height: 1.15;
  margin-bottom: 6px;
}
.ui-data-delta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.ui-data-delta.state-loss {
  color: var(--state-loss);
}
.ui-data-delta.state-growth {
  color: var(--state-growth);
}
.ui-data-delta.state-risk {
  color: var(--state-risk);
}
.ui-data-cause {
  font-size: 13px;
  line-height: 1.45;
  color: var(--n80);
  border-top: 1px solid var(--n10);
  padding-top: 10px;
  margin-top: auto;
}

/* --- Exact Decision Card (Brandbook p.16, 18) --- */
.decision-card {
  border: 1px solid var(--n20);
  background: var(--white);
  border-radius: var(--r-card);
  padding: 24px;
}
.decision-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.decision-priority {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--n60);
}
.decision-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--graphite);
  line-height: 1.35;
  margin-bottom: 20px;
}
.decision-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-top: 1px solid var(--n10);
  border-bottom: 1px solid var(--n10);
  padding: 14px 0;
  margin-bottom: 20px;
}
.meta-item-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--n60);
  margin-bottom: 4px;
}
.meta-item-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--graphite);
}
.decision-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* --- Brandbook Chart Principle (p.14): "График существует ради вывода. Вывод пишется словами рядом." --- */
.chart-container-block {
  border: 1px solid var(--n20);
  background: var(--white);
  border-radius: var(--r-card);
  padding: 24px;
  margin-bottom: var(--space-24);
}
.chart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--n10);
  padding-bottom: 14px;
  margin-bottom: 20px;
}
.chart-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--graphite);
}
.chart-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--n60);
}
.chart-bars-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}
.chart-bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 100px;
  align-items: center;
  gap: 16px;
  font-size: 13.5px;
}
@media (max-width: 575px) {
  .chart-bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
.bar-track {
  background: var(--n10);
  height: 22px;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
}
.bar-fill.bar-neutral {
  background: var(--n40);
}
.bar-fill.bar-loss {
  background: var(--state-loss);
}
.bar-fill.bar-risk {
  background: var(--state-risk);
}
.bar-fill.bar-dark {
  background: var(--graphite);
}
.bar-fill.bar-growth {
  background: var(--state-growth);
}
.bar-fill.bar-signal {
  background: var(--signal-blue);
}

/* Dedicated Conclusion Callout (Brandbook p.14) */
.chart-conclusion-callout {
  border-left: 3px solid var(--signal-blue);
  background: var(--n00);
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--graphite);
}
.chart-conclusion-callout strong {
  font-weight: 600;
}

/* --- Dark Environment Callout Block (Brandbook p.9, 17, 18, 23) --- */
.section-dark-cta {
  background-color: var(--dark-bg);
  color: var(--dark-text-primary);
  border-top: 1px solid var(--dark-border);
  border-bottom: 1px solid var(--dark-border);
  padding: var(--space-64) 0;
}
.dark-panel-box {
  background-color: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-card);
  padding: 40px;
}
.section-dark-cta h2,
.section-dark-cta h3,
.section-dark-cta .type-display {
  color: var(--dark-text-primary);
}
.section-dark-cta p {
  color: var(--dark-text-secondary);
}

/* --- Specific Page Components: Pain Points Block --- */
.pains-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: var(--space-24);
}
@media (min-width: 768px) {
  .pains-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.pain-card {
  border: 1px solid var(--state-loss-border);
  background: #FFFBFB;
  border-radius: var(--r-card);
  padding: 24px;
  position: relative;
}
.pain-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  bottom: 0;
  background: var(--state-loss);
  border-top-left-radius: var(--r-card);
  border-bottom-left-radius: var(--r-card);
}
.pain-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--graphite);
  margin-bottom: 8px;
  line-height: 1.35;
}
.pain-desc {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--n80);
}

/* --- Module Header with Pill Badge --- */
.module-block {
  margin-top: var(--space-64);
  padding-top: var(--space-40);
  border-top: 1px solid var(--n20);
}
.module-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal-blue);
  background: var(--signal-blue-light);
  border: 1px solid #D0E1FD;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-bottom: 12px;
  font-weight: 600;
}
.module-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--graphite);
  margin-bottom: 8px;
}
.module-purpose {
  font-size: 14.5px;
  color: var(--n80);
  margin-bottom: 24px;
  max-width: 900px;
}

/* --- Interactive Simulators & Widgets --- */
.interactive-widget-box {
  border: 1px solid var(--n20);
  background: var(--white);
  border-radius: var(--r-card);
  padding: 24px;
  margin-top: 20px;
}
.widget-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--n10);
}
.widget-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--signal-blue);
  background: var(--signal-blue-light);
  padding: 2px 8px;
  border-radius: var(--r-pill);
}

/* Form inputs matching Brandbook (1px lines, no excess shadows) */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--graphite);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--graphite);
  background: var(--white);
  border: 1px solid var(--n20);
  border-radius: var(--r-card);
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s ease;
}
.form-control:focus {
  border-color: var(--signal-blue);
}
.form-control::placeholder {
  color: var(--n40);
}
.input-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px) {
  .input-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Lead Capture Form (User Spec) --- */
.lead-capture-box {
  background: var(--white);
  border: 1px solid var(--n20);
  border-radius: var(--r-card);
  padding: 36px;
  margin-top: var(--space-64);
  position: relative;
}
.lead-capture-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--signal-blue);
}
.lead-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
}
@media (min-width: 768px) {
  .lead-form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Footer (Brandbook p.2, 21, 23) --- */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--n20);
  padding-top: var(--space-64);
  padding-bottom: var(--space-40);
  font-size: 13.5px;
}
.footer-top-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: var(--space-40);
}
@media (min-width: 768px) {
  .footer-top-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links-list a {
  color: var(--n60);
  transition: color 0.15s ease;
}
.footer-links-list a:hover {
  color: var(--graphite);
}
.footer-bottom-bar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-top: 1px solid var(--n20);
  padding-top: 24px;
}
@media (min-width: 768px) {
  .footer-bottom-bar {
    flex-direction: row;
    align-items: center;
  }
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--n60);
}

/* --- Modal Dialogs (Demo Request / Scenarios) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(27, 30, 36, 0.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
}
.modal-window {
  background: var(--white);
  border: 1px solid var(--n20);
  border-radius: var(--r-card);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}
.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--n60);
  cursor: pointer;
}
.modal-close-btn:hover {
  color: var(--graphite);
}

/* Toast message */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--graphite);
  color: var(--white);
  padding: 14px 20px;
  border-radius: var(--r-card);
  border-left: 4px solid var(--signal-blue);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 1000;
  font-size: 13.5px;
  display: none;
  animation: fadeInToast 0.2s ease;
}
@keyframes fadeInToast {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Formula Cards with Math Rendering --- */
.formula-display-box {
  background: #F1F4F9;
  border: 1px solid #D5E1F2;
  border-radius: var(--r-card);
  padding: 16px 20px;
  margin: 16px 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--graphite);
  text-align: center;
}

/* --- Tables (Brandbook p.11, 20: r0, no vertical lines, no row shading except totals) --- */
.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--n20);
  background: var(--white);
  border-radius: 0;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--n60);
  padding: 12px 16px;
  border-bottom: 1px solid var(--n20);
  font-weight: 500;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--n10);
  color: var(--n80);
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tr.total-row {
  background-color: var(--n00);
  font-weight: 600;
}
.data-table tr.total-row td {
  color: var(--graphite);
  border-top: 1px solid var(--n20);
}

/* --- Substantive SVG Diagrams & Architectural Graphics --- */
.svg-architecture-wrap {
  background: var(--white);
  border: 1px solid var(--n20);
  border-radius: var(--r-card);
  padding: 24px;
  margin: var(--space-32, 32px) 0;
  overflow-x: auto;
  position: relative;
}
.svg-architecture-wrap svg {
  display: block;
  width: 100%;
  min-width: 860px;
  height: auto;
}
.svg-architecture-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--n10);
  padding-bottom: 14px;
  margin-bottom: 20px;
}
.svg-architecture-footer {
  border-top: 1px solid var(--n10);
  padding-top: 12px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--n60);
}
@media (max-width: 767px) {
  .svg-architecture-wrap {
    padding: 16px;
  }
  .svg-architecture-caption,
  .svg-architecture-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Micro-diagrams in track navigator cards */
.track-svg-micro {
  width: 100%;
  height: 128px;
  margin: 14px 0 16px;
  border: 1px solid var(--n10);
  background: var(--n00);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.nav-track-card:hover .track-svg-micro {
  border-color: var(--n20);
  background: var(--white);
}
.track-svg-micro svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Clean SVG node hover */
.svg-interactive-node {
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.svg-interactive-node:hover rect {
  stroke-width: 1.5px;
}
.svg-flow-path {
  stroke-dasharray: 6 3;
  animation: flowLine 30s linear infinite;
}
@keyframes flowLine {
  to {
    stroke-dashoffset: -100;
  }
}

