/* ============================================================
   Insightnix — main.css
   Shared styles for every page. Loaded after Tailwind CDN.
   ============================================================ */

/* ── THEME ────────────────────────────────────────────────────
   Change these four values to re-colour the entire site.
   --accent-ring is the RGB of --accent (used for focus glows).

   Ready-made palettes:
     Blue    #2563eb / #1d4ed8 / #eff5ff / 37,99,235
     Sky     #0284c7 / #0369a1 / #f0f9ff / 2,132,199
     Teal    #0d9488 / #0f766e / #effcfa / 13,148,136
     Emerald #10b981 / #059669 / #ecfdf5 / 16,185,129
     Indigo  #4f46e5 / #4338ca / #eef2ff / 79,70,229
     Violet  #7c3aed / #6d28d9 / #f5f3ff / 124,58,237
     Rose    #e11d48 / #be123c / #fff1f2 / 225,29,72
   ─────────────────────────────────────────────────────────── */
:root{
  --accent:      #2563eb;
  --accent-dark: #1d4ed8;
  --accent-tint: #eff5ff;
  --accent-ring: 37,99,235;

  --ink:   #111827;
  --muted: #6b7280;
}

/* ── BASE ─────────────────────────────────────────────────── */
html{scroll-behavior:smooth}
body{font-family:system-ui,-apple-system,sans-serif;overflow-x:hidden}

/* Accent underbar beneath section headings */
.underbar{display:block;width:40px;height:3px;background:var(--accent);border-radius:9px;margin-top:10px}

/* Focus rings */
input:focus,textarea:focus,select:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(var(--accent-ring),.12);
}

/* Utility */
.line-clamp-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tabular{font-variant-numeric:tabular-nums}

/* Accent helper classes (for JS class toggling, since Tailwind
   can't generate arbitrary values at runtime) */
.bg-accent{background:var(--accent)!important}
.text-accent{color:var(--accent)!important}
.border-accent{border-color:var(--accent)!important}


/* ── HEADER: burger + mobile menu ─────────────────────────── */
.burger{position:relative;display:block;width:18px;height:14px}
.burger-line{
  position:absolute;left:0;height:2px;width:100%;
  background:var(--ink);border-radius:2px;
  transition:transform .25s ease,opacity .2s ease,top .25s ease;
}
.burger-line:nth-child(1){top:0}
.burger-line:nth-child(2){top:6px}
.burger-line:nth-child(3){top:12px}
#mobileToggle.open .burger-line:nth-child(1){top:6px;transform:rotate(45deg)}
#mobileToggle.open .burger-line:nth-child(2){opacity:0}
#mobileToggle.open .burger-line:nth-child(3){top:6px;transform:rotate(-45deg)}

#mobileMenu{
  transform:translateY(-10px);opacity:0;pointer-events:none;
  transition:transform .22s ease,opacity .22s ease;
}
#mobileMenu.open{transform:translateY(0);opacity:1;pointer-events:auto}

.mob-link{display:flex;align-items:center;gap:.85rem;padding:.75rem;border-radius:.85rem;transition:background .15s}
.mob-link:hover,.mob-link:active{background:#f9fafb}
.mob-ico{
  display:inline-flex;align-items:center;justify-content:center;
  height:2.25rem;width:2.25rem;border-radius:.7rem;
  background:#f3f4f6;color:#374151;font-size:.75rem;flex-shrink:0;
}


/* ── CARDS: dashboard grid (index, dashboards) ────────────── */
.dash-card{transition:box-shadow .2s,transform .2s,border-color .2s}
.dash-card:hover{
  box-shadow:0 8px 30px rgba(0,0,0,.08);
  transform:translateY(-2px);
  border-color:var(--accent);
}
.pill{
  display:inline-flex;align-items:center;
  padding:3px 10px;border-radius:999px;
  font-size:11px;font-weight:600;background:#f3f4f6;color:#374151;
}

/* ── SEARCH ───────────────────────────────────────────────── */
.search-wrap{box-shadow:0 2px 12px rgba(0,0,0,.06)}
.search-wrap:focus-within{
  border-color:var(--accent)!important;
  box-shadow:0 0 0 3px rgba(var(--accent-ring),.12);
}
.search-wrap input:focus{
  border-color:transparent!important;
  box-shadow:none!important;
  outline:none!important;
}


/* ── LEGAL / DOC PAGES: TOC + prose ───────────────────────── */
.toc-link{
  display:block;padding:6px 12px;border-radius:9px;
  font-size:13px;color:var(--muted);text-decoration:none;
  transition:all .15s;
}
.toc-link:hover{background:#f3f4f6;color:var(--ink)}
.toc-link.active{background:var(--accent);color:#fff;font-weight:500}

.section-anchor{scroll-margin-top:96px}

.prose p{color:#4b5563;line-height:1.8;margin-bottom:1rem}
.prose p:last-child{margin-bottom:0}
.prose ul{color:#4b5563;line-height:1.8;margin-bottom:1rem;padding-left:0;list-style:none}
.prose ul li{position:relative;padding-left:1.25rem;margin-bottom:.4rem}
.prose ul li::before{
  content:'';position:absolute;left:0;top:.65em;
  width:5px;height:5px;border-radius:50%;background:var(--ink);
}
.prose strong{color:var(--ink);font-weight:600}
.prose a{color:var(--accent);text-decoration:underline}
.prose a:hover{color:var(--accent-dark)}


/* ── DATA SERVICES: accordion + option cards ──────────────── */
.acc{border:1px solid #e5e7eb;border-radius:1rem;background:#fff;overflow:hidden}
.acc-head{
  display:flex;align-items:center;gap:.75rem;width:100%;
  padding:1rem 1.25rem;text-align:left;cursor:pointer;
  background:#fff;transition:background .15s;
}
.acc-head:hover{background:#f9fafb}
.acc-title{font-size:.95rem;font-weight:700;color:var(--ink)}
.acc-sel{
  font-size:.75rem;color:var(--muted);font-weight:500;
  margin-left:auto;margin-right:.25rem;max-width:45%;
  text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.acc-chev{color:#9ca3af;transition:transform .2s;flex-shrink:0}
.acc.open .acc-chev{transform:rotate(180deg)}
.acc-body{display:none;padding:0 1.25rem 1.25rem}
.acc.open .acc-body{display:block}

.opt-card,.addon-card{transition:border-color .15s,background .15s,box-shadow .15s;cursor:pointer}
.opt-card.selected,.addon-card.selected{
  border-color:var(--accent);
  background:var(--accent-tint);
  box-shadow:0 0 0 1px var(--accent) inset;
}
.opt-card input[type=radio],
.opt-card input[type=checkbox],
.addon-card input[type=checkbox]{accent-color:var(--accent)}

.step-num{
  display:inline-flex;align-items:center;justify-content:center;
  width:28px;height:28px;border-radius:50%;
  background:var(--accent);color:#fff;
  font-size:12px;font-weight:700;flex-shrink:0;
}


/* ── DASHBOARD PAGE: charts, slider, compare ──────────────── */
#toc a.active,#toc summary.active{background:var(--accent);color:#fff}
.compare-item.active{background:var(--accent);color:#fff;border-color:var(--accent)}
.chart-zoom-btn.active{background:var(--accent);color:#fff;border-color:var(--accent)}

/* noUiSlider overrides */
.noUi-connect{background:var(--accent);border-radius:999px}
.noUi-handle{
  background:#fff;border:2px solid var(--accent);border-radius:50%;
  box-shadow:none;cursor:pointer;
  height:16px!important;width:16px!important;
  right:-8px!important;top:-7px!important;
}
.noUi-handle:after,.noUi-handle:before{display:none}

#searchInput:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}


/* ── COOKIEBOT declaration table ──────────────────────────── */
#CookieDeclaration{font-size:14px;color:#4b5563}
#CookieDeclaration a{color:var(--accent);text-decoration:underline}