/* BASSCOM Research · Design Tokens
   Палитра идентична на основния BASSCOM brand (взета от basscom_ai_conference):
   - teal primary, terracotta accent, network pattern signature
*/

:root {
  /* === Brand palette (BASSCOM official) === */
  --bass-teal: #1a7a7a;          /* основен */
  --bass-teal-light: #0d8a8a;
  --bass-teal-dark: #14605f;
  --bass-teal-bg: rgba(26, 122, 122, 0.08);
  --bass-teal-border: rgba(26, 122, 122, 0.25);

  --bass-accent: #cc785c;        /* terracotta · keynote color */
  --bass-accent-dark: #b05f44;
  --bass-accent-bg: rgba(204, 120, 92, 0.12);

  --bass-navy: #0F2A4F;          /* secondary deep, за headlines и dark overlays */
  --bass-warm: #fbbf24;          /* yellow alert (използван в demo banner) */

  /* === Surface === */
  --bg-page: #f5f7fa;
  --bg-card: #ffffff;
  --bg-soft: #eef2f5;
  --bg-deep: #14605f;

  /* === Ink === */
  --ink-1: #2d3436;
  --ink-2: #636e72;
  --ink-3: #b2bec3;
  --ink-inv: #ffffff;

  /* === Borders === */
  --border-1: #dfe6e9;
  --border-2: #b2bec3;

  /* === Scoring system === */
  --level-base: #cc785c;          /* < 3.0 — terracotta */
  --level-functional: #fbbf24;    /* 3.0 - 3.99 — amber */
  --level-integrated: #1a7a7a;    /* ≥ 4.0 — teal */

  /* === Typography === */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* === Spacing === */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --sp-9: 96px; --sp-10: 128px;

  /* === Radius === */
  --r-1: 4px; --r-2: 8px; --r-3: 12px; --r-4: 16px; --r-5: 24px; --r-pill: 999px;

  /* === Shadow === */
  --shadow-1: 0 1px 2px rgba(20, 96, 95, 0.06);
  --shadow-2: 0 4px 12px rgba(20, 96, 95, 0.08);
  --shadow-3: 0 12px 28px rgba(20, 96, 95, 0.14);
  --shadow-teal: 0 8px 32px rgba(26, 122, 122, 0.18);

  /* === Backward-compat aliases (legacy variable names map to BASSCOM teal palette) === */
  --basscom-navy: var(--bass-teal-dark);    /* #14605f */
  --basscom-blue: var(--bass-teal);         /* #1a7a7a */
  --basscom-azure: var(--bass-teal-light);  /* #0d8a8a */
  --basscom-sky: #88c4c4;
  --basscom-mist: #dceaea;

  /* Accent for italic em-text on dark teal backgrounds — high contrast amber */
  --bass-em-on-dark: #fbbf24;     /* amber, ratio ~7:1 on #14605f */
  --bass-em-on-dark-soft: #fcd34d;
  --bass-em-coral: #fca5a5;       /* coral pink, used for leaders */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 70px; }
section[id], [id^="ch-"], [id$="-def"] { scroll-margin-top: 70px; }

body {
  font-family: var(--font-sans);
  color: var(--ink-1);
  background: var(--bg-page);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); letter-spacing: -0.01em; line-height: 1.15; color: var(--ink-1); font-weight: 600; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }

p { margin-bottom: 0.6em; color: var(--ink-2); }

a { color: var(--bass-teal); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--bass-teal-light); }

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--bass-teal);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag.base { background: rgba(204, 120, 92, 0.15); color: #B05F44; }
.tag.functional { background: rgba(251, 191, 36, 0.20); color: #92400E; }
.tag.integrated { background: rgba(26, 122, 122, 0.15); color: var(--bass-teal-dark); }

.score-bar {
  position: relative;
  height: 10px;
  border-radius: var(--r-pill);
  background: var(--border-1);
  overflow: hidden;
}
.score-bar > span {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--bass-teal), var(--bass-teal-light));
  border-radius: inherit;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-2), transparent);
  margin: var(--sp-7) 0;
}

/* === Network pattern background — signature BASSCOM look === */
.bg-network {
  position: relative;
}
.bg-network::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.06;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='400' height='400' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%231a7a7a' stroke-width='1'%3E%3Ccircle cx='50' cy='50' r='4'/%3E%3Ccircle cx='150' cy='80' r='3'/%3E%3Ccircle cx='250' cy='40' r='5'/%3E%3Ccircle cx='350' cy='70' r='3'/%3E%3Ccircle cx='100' cy='150' r='4'/%3E%3Ccircle cx='200' cy='130' r='3'/%3E%3Ccircle cx='300' cy='160' r='4'/%3E%3Ccircle cx='50' cy='250' r='3'/%3E%3Ccircle cx='150' cy='220' r='5'/%3E%3Ccircle cx='250' cy='260' r='3'/%3E%3Ccircle cx='350' cy='230' r='4'/%3E%3Ccircle cx='100' cy='340' r='3'/%3E%3Ccircle cx='200' cy='310' r='4'/%3E%3Ccircle cx='300' cy='350' r='3'/%3E%3Ccircle cx='50' cy='370' r='4'/%3E%3Ccircle cx='350' cy='380' r='3'/%3E%3Cline x1='50' y1='50' x2='150' y2='80'/%3E%3Cline x1='150' y1='80' x2='250' y2='40'/%3E%3Cline x1='250' y1='40' x2='350' y2='70'/%3E%3Cline x1='50' y1='50' x2='100' y2='150'/%3E%3Cline x1='150' y1='80' x2='200' y2='130'/%3E%3Cline x1='250' y1='40' x2='300' y2='160'/%3E%3Cline x1='350' y1='70' x2='300' y2='160'/%3E%3Cline x1='100' y1='150' x2='200' y2='130'/%3E%3Cline x1='200' y1='130' x2='300' y2='160'/%3E%3Cline x1='100' y1='150' x2='50' y2='250'/%3E%3Cline x1='200' y1='130' x2='150' y2='220'/%3E%3Cline x1='300' y1='160' x2='250' y2='260'/%3E%3Cline x1='300' y1='160' x2='350' y2='230'/%3E%3Cline x1='50' y1='250' x2='150' y2='220'/%3E%3Cline x1='150' y1='220' x2='250' y2='260'/%3E%3Cline x1='250' y1='260' x2='350' y2='230'/%3E%3Cline x1='50' y1='250' x2='100' y2='340'/%3E%3Cline x1='150' y1='220' x2='200' y2='310'/%3E%3Cline x1='250' y1='260' x2='300' y2='350'/%3E%3Cline x1='350' y1='230' x2='300' y2='350'/%3E%3Cline x1='100' y1='340' x2='200' y2='310'/%3E%3Cline x1='200' y1='310' x2='300' y2='350'/%3E%3Cline x1='50' y1='370' x2='100' y2='340'/%3E%3Cline x1='300' y1='350' x2='350' y2='380'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 400px 400px;
}

/* Network pattern with white strokes (for dark backgrounds) */
.bg-network-white::before {
  background-image: url("data:image/svg+xml,%3Csvg width='400' height='400' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Ccircle cx='50' cy='50' r='4'/%3E%3Ccircle cx='150' cy='80' r='3'/%3E%3Ccircle cx='250' cy='40' r='5'/%3E%3Ccircle cx='350' cy='70' r='3'/%3E%3Ccircle cx='100' cy='150' r='4'/%3E%3Ccircle cx='200' cy='130' r='3'/%3E%3Ccircle cx='300' cy='160' r='4'/%3E%3Ccircle cx='50' cy='250' r='3'/%3E%3Ccircle cx='150' cy='220' r='5'/%3E%3Ccircle cx='250' cy='260' r='3'/%3E%3Ccircle cx='350' cy='230' r='4'/%3E%3Ccircle cx='100' cy='340' r='3'/%3E%3Ccircle cx='200' cy='310' r='4'/%3E%3Ccircle cx='300' cy='350' r='3'/%3E%3Ccircle cx='50' cy='370' r='4'/%3E%3Ccircle cx='350' cy='380' r='3'/%3E%3Cline x1='50' y1='50' x2='150' y2='80'/%3E%3Cline x1='150' y1='80' x2='250' y2='40'/%3E%3Cline x1='250' y1='40' x2='350' y2='70'/%3E%3Cline x1='50' y1='50' x2='100' y2='150'/%3E%3Cline x1='150' y1='80' x2='200' y2='130'/%3E%3Cline x1='250' y1='40' x2='300' y2='160'/%3E%3Cline x1='350' y1='70' x2='300' y2='160'/%3E%3Cline x1='100' y1='150' x2='200' y2='130'/%3E%3Cline x1='200' y1='130' x2='300' y2='160'/%3E%3Cline x1='100' y1='150' x2='50' y2='250'/%3E%3Cline x1='200' y1='130' x2='150' y2='220'/%3E%3Cline x1='300' y1='160' x2='250' y2='260'/%3E%3Cline x1='300' y1='160' x2='350' y2='230'/%3E%3Cline x1='50' y1='250' x2='150' y2='220'/%3E%3Cline x1='150' y1='220' x2='250' y2='260'/%3E%3Cline x1='250' y1='260' x2='350' y2='230'/%3E%3Cline x1='50' y1='250' x2='100' y2='340'/%3E%3Cline x1='150' y1='220' x2='200' y2='310'/%3E%3Cline x1='250' y1='260' x2='300' y2='350'/%3E%3Cline x1='350' y1='230' x2='300' y2='350'/%3E%3Cline x1='100' y1='340' x2='200' y2='310'/%3E%3Cline x1='200' y1='310' x2='300' y2='350'/%3E%3Cline x1='50' y1='370' x2='100' y2='340'/%3E%3Cline x1='300' y1='350' x2='350' y2='380'/%3E%3C/g%3E%3C/svg%3E");
}

/* ============================================================
   SHARED SITE CHROME — reused across all pages of the site
   ============================================================ */

/* TOP NAV */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 253, 247, 0.88);
  border-bottom: 1px solid var(--border-1);
}
.site-nav .inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-nav .brand { display: flex; align-items: center; text-decoration: none; gap: 12px; }
.site-nav .brand picture, .site-nav .brand img { display: block; height: 32px; width: auto; }
.site-nav .brand .doc-mini { display: none; }
.site-nav .brand-divider { width: 1px; height: 22px; background: var(--border-1); flex-shrink: 0; }
.site-nav .links { display: flex; gap: 6px; align-items: center; }
.site-nav .links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font-sans);
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.15s;
}
.site-nav .links a:hover { background: var(--bass-teal-bg); color: var(--bass-teal-dark); }
.site-nav .links a.active { color: var(--bass-teal-dark); background: var(--bass-teal-bg); font-weight: 600; }
.site-nav .links a.cta {
  background: var(--bass-teal);
  color: white;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.85rem;
  margin-left: 8px;
}
.site-nav .links a.cta:hover { background: var(--bass-teal-dark); color: white; transform: translateY(-1px); }

/* Mobile menu toggle */
.site-nav .mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--bass-teal-dark);
  font-size: 1.2rem;
}
@media (max-width: 768px) {
  .site-nav .links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: white; padding: 14px 20px; gap: 2px; border-bottom: 1px solid var(--border-1); box-shadow: var(--shadow-2); }
  .site-nav .links.open { display: flex; }
  .site-nav .links a { width: 100%; padding: 12px 14px; }
  .site-nav .mobile-toggle { display: inline-flex; }
  .site-nav .brand .doc-mini { display: none; }
}

/* SITE FOOTER */
.site-footer {
  background: var(--bass-teal-dark);
  color: rgba(255,255,255,0.7);
  padding: 56px 28px 32px;
  margin-top: 64px;
  font-family: var(--font-sans);
}
.site-footer .inner { max-width: 1180px; margin: 0 auto; }
.site-footer .top {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 24px;
}
.site-footer picture.logo, .site-footer img.logo { display: block; height: 56px; width: auto; flex-shrink: 0; }
.site-footer picture.logo img { height: 56px; width: auto; display: block; }
.site-footer .brand-info { flex: 1; min-width: 0; }
.site-footer .brand-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 18px;
  font-weight: 600;
  margin-top: -4px;
}
.site-footer .about { font-size: 0.88rem; color: rgba(255,255,255,0.65); line-height: 1.55; }
.site-footer .bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 768px) {
  .site-footer .top { flex-direction: column; gap: 28px; }
}

/* ============================================================
   SIBLING INFOGRAPHIC TAB STRIP — sits ON TOP of canvas
   ============================================================ */
.siblings {
  max-width: 1200px;
  margin: 24px auto 0;
  display: flex;
  background: white;
  border: 1px solid var(--border-1);
  border-radius: var(--r-3) var(--r-3) 0 0;
  border-bottom: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.siblings a {
  flex: 1;
  text-decoration: none;
  color: inherit;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-right: 1px solid var(--border-1);
  border-top: 3px solid transparent;
  background: var(--bg-soft);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.siblings a:last-child { border-right: 0; }
.siblings a:hover { background: white; color: var(--bass-teal-dark); }
.siblings a.current {
  background: white;
  border-top-color: var(--bass-teal);
  pointer-events: none;
}
.siblings a.current .nm { color: var(--bass-teal-dark); }
.siblings .icn {
  width: 38px; height: 38px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bass-teal-bg);
  color: var(--bass-teal-dark);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.siblings a.current .icn { background: var(--bass-teal); color: white; }
.siblings .nm { font-weight: 600; font-size: 0.92rem; color: var(--ink-1); }
.siblings .ds { font-size: 0.74rem; color: var(--ink-3); margin-top: 2px; line-height: 1.3; }

/* Canvas attaches directly under the tab strip — remove its top radius */
.siblings + .canvas-wrap { padding-top: 0; }
.siblings + .canvas-wrap .canvas { border-radius: 0; }

@media (max-width: 768px) {
  .siblings {
    margin: 16px 12px 0;
    flex-direction: column;
    border-radius: var(--r-3);
    border-bottom: 1px solid var(--border-1);
  }
  .siblings a {
    border-right: 0;
    border-top: 0;
    border-bottom: 1px solid var(--border-1);
    border-left: 3px solid transparent;
  }
  .siblings a:last-child { border-bottom: 0; }
  .siblings a.current {
    border-top-color: transparent;
    border-left-color: var(--bass-teal);
  }
}

/* === Print === */
@media print {
  body { background: white; }
  .no-print, .site-nav, .site-footer { display: none !important; }
  .page-break { page-break-after: always; }
  @page { size: A4; margin: 18mm 16mm; }
}
