/* ============================================================
   HALO AURORA · Theme for Bootstrap 5
   Load order in your HTML:
     1. halo-tokens.css
     2. Bootstrap 5.3 CSS
     3. halo-aurora.css   (this file — overrides Bootstrap)
   ============================================================ */

/* ============================================================
   1 · Bootstrap variable overrides
   ============================================================ */
:root,
[data-bs-theme="dark"],
[data-bs-theme="light"] {
  --bs-primary:                var(--tz-accent-1);
  --bs-primary-rgb:            var(--tz-accent-rgb);
  --bs-body-bg:                var(--tz-bg);
  --bs-body-color:             var(--tz-fg-1);
  --bs-body-font-family:       var(--tz-font-ui);
  --bs-body-font-size:         15px;
  --bs-body-line-height:       1.55;
  --bs-secondary-color:        var(--tz-fg-2);
  --bs-tertiary-color:         var(--tz-fg-3);
  --bs-emphasis-color:         var(--tz-fg-1);
  --bs-border-color:           var(--tz-border);
  --bs-border-color-translucent: var(--tz-border);
  --bs-border-radius:          var(--tz-radius-md);
  --bs-border-radius-sm:       var(--tz-radius-sm);
  --bs-border-radius-lg:       var(--tz-radius-lg);
  --bs-border-radius-xl:       var(--tz-radius-xl);
  --bs-link-color:             var(--tz-fg-1);
  --bs-link-color-rgb:         240, 241, 248;
  --bs-link-hover-color:       var(--tz-accent-1);
  --bs-link-hover-color-rgb:   var(--tz-accent-rgb);
  --bs-secondary-bg:           var(--tz-surface-2);
  --bs-tertiary-bg:            var(--tz-surface);
  --bs-card-bg:                var(--tz-surface);
  --bs-card-border-color:      var(--tz-border);
  --bs-card-border-radius:     var(--tz-radius-xl);
}

/* ============================================================
   2 · Base & typography
   ============================================================ */
html, body {
  background: var(--tz-bg);
  color: var(--tz-fg-1);
  font-family: var(--tz-font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { overflow-x: hidden; }

:lang(ta), [lang="ta"] {
  font-family: var(--tz-font-tamil);
}

.font-display      { font-family: var(--tz-font-display); font-weight: 400; letter-spacing: var(--tz-tracking-tight); }
.font-display-i    { font-family: var(--tz-font-display); font-weight: 400; font-style: italic; letter-spacing: var(--tz-tracking-snug); }
.font-mono         { font-family: var(--tz-font-mono); font-variant-numeric: tabular-nums; }
.font-ui           { font-family: var(--tz-font-ui); }

.display-1.font-display,
.display-2.font-display,
.display-3.font-display,
.display-4.font-display { line-height: 0.98; letter-spacing: -0.035em; }

.text-gradient {
  background: var(--tz-grad-h);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.text-fg-1 { color: var(--tz-fg-1) !important; }
.text-fg-2 { color: var(--tz-fg-2) !important; }
.text-fg-3 { color: var(--tz-fg-3) !important; }
.text-accent { color: var(--tz-accent-1) !important; }
.text-gain { color: var(--tz-gain) !important; }
.text-loss { color: var(--tz-loss) !important; }

.bg-surface   { background: var(--tz-surface) !important; }
.bg-surface-2 { background: var(--tz-surface-2) !important; }

.tracking-wider { letter-spacing: var(--tz-tracking-wider); }
.tracking-wide  { letter-spacing: var(--tz-tracking-wide); }

::selection {
  background: rgba(var(--tz-accent-rgb), 0.35);
  color: var(--tz-fg-1);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--tz-border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--tz-border-strong); }

/* ============================================================
   3 · Eyebrow pill / kicker labels
   ============================================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 5px 12px;
  border-radius: var(--tz-radius-full);
  border: 1px solid var(--tz-border-accent);
  background: transparent;
  color: var(--tz-accent-1);
  font-family: var(--tz-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--tz-accent-1);
  box-shadow: 0 0 0 4px rgba(var(--tz-accent-rgb), 0.18);
}

.eyebrow-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: var(--tz-radius-full);
  background: var(--tz-surface);
  border: 1px solid var(--tz-border-accent);
  color: var(--tz-fg-1);
  font-size: 12.5px;
  font-weight: 500;
}
.eyebrow-hero .badge-new {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--tz-grad);
  color: #fff;
  padding: 3px 10px;
  border-radius: var(--tz-radius-full);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* ============================================================
   4 · Buttons
   ============================================================ */
.btn { font-family: var(--tz-font-ui); font-weight: 600; transition: opacity var(--tz-duration-fast) var(--tz-ease-out), transform var(--tz-duration-fast) var(--tz-ease-out); }
.btn:active { transform: scale(0.97); }

.btn-aurora {
  background: var(--tz-grad);
  color: #fff;
  border: none;
  border-radius: var(--tz-radius-lg);
  padding: 12px 22px;
  font-size: 14.5px;
  box-shadow: var(--tz-glow);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-aurora:hover  { background: var(--tz-grad); color: #fff; opacity: 0.92; box-shadow: var(--tz-glow); }
.btn-aurora:focus  { color: #fff; box-shadow: var(--tz-glow), 0 0 0 3px rgba(var(--tz-accent-rgb), 0.35); }
.btn-aurora:active { color: #fff; }
.btn-aurora.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--tz-radius-md); }

.btn-ghost {
  background: var(--tz-surface);
  color: var(--tz-fg-1);
  border: 1px solid var(--tz-border-strong);
  border-radius: var(--tz-radius-lg);
  padding: 11px 20px;
  font-size: 14.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ghost:hover { background: var(--tz-surface-2); color: var(--tz-fg-1); border-color: var(--tz-border-strong); }
.btn-ghost.btn-sm { padding: 7px 14px; font-size: 13px; }

.btn-quiet {
  background: transparent;
  color: var(--tz-fg-1);
  border: 1px solid var(--tz-border-strong);
  border-radius: var(--tz-radius-md);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
}
.btn-quiet:hover { background: var(--tz-surface-2); color: var(--tz-fg-1); }

.btn-icon {
  width: 34px; height: 34px;
  border: 1px solid var(--tz-border);
  border-radius: var(--tz-radius-full);
  background: var(--tz-surface);
  color: var(--tz-fg-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover { background: var(--tz-surface-2); color: var(--tz-fg-1); }

/* ============================================================
   5 · Navbar
   ============================================================ */
.halo-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 14px 0;
  background: color-mix(in srgb, var(--tz-bg) 75%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--tz-border);
}
.halo-navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--tz-font-ui);
  font-weight: 700;
  font-size: 18px;
  color: var(--tz-fg-1);
  letter-spacing: -0.01em;
}
.halo-navbar .navbar-brand:hover { color: var(--tz-fg-1); }
.halo-navbar .navbar-nav .nav-link {
  color: var(--tz-fg-2);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
  margin: 0 14px;
}
.halo-navbar .navbar-nav .nav-link:hover  { color: var(--tz-fg-1); }
.halo-navbar .navbar-nav .nav-link.active { color: var(--tz-fg-1); }
.halo-navbar .navbar-toggler {
  border: 1px solid var(--tz-border);
  color: var(--tz-fg-1);
  padding: 4px 10px;
}
.halo-navbar .navbar-toggler-icon {
  filter: invert(1) opacity(0.7);
}
[data-bs-theme="light"] .halo-navbar .navbar-toggler-icon {
  filter: none;
}

.changelog-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--tz-radius-full);
  background: var(--tz-grad);
  color: #fff;
  font-weight: 700;
  margin-left: 6px;
  letter-spacing: 0.04em;
}

/* ============================================================
   6 · Language toggle pill (EN / தமிழ்)
   ============================================================ */
.lang-toggle {
  display: inline-flex;
  background: var(--tz-surface);
  border: 1px solid var(--tz-border);
  border-radius: var(--tz-radius-full);
  padding: 3px;
  gap: 0;
}
.lang-toggle button {
  border: none;
  background: transparent;
  padding: 5px 14px;
  border-radius: var(--tz-radius-full);
  color: var(--tz-fg-2);
  font-family: var(--tz-font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--tz-duration-fast) var(--tz-ease-out);
}
.lang-toggle button.is-active {
  background: var(--tz-grad);
  color: #fff;
  box-shadow: var(--tz-glow-soft);
}
.lang-toggle button[data-lang="ta"] {
  font-family: var(--tz-font-tamil);
  font-weight: 500;
}

/* ============================================================
   7 · Hero with aurora halos
   ============================================================ */
.halo-hero {
  position: relative;
  padding: 110px 0 100px;
  text-align: center;
  overflow: hidden;
}
.halo-hero .halo-bg {
  position: absolute; inset: 0;
  pointer-events: none;
}
.halo-hero .halo-bg::before,
.halo-hero .halo-bg::after {
  content: ''; position: absolute; inset: 0;
}
.halo-hero .halo-bg::before { background: var(--tz-halo-a); }
.halo-hero .halo-bg::after  { background: var(--tz-halo-b); }

.halo-hero .halo-grid {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--tz-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--tz-border) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(60% 50% at 50% 30%, black 0%, transparent 75%);
          mask-image: radial-gradient(60% 50% at 50% 30%, black 0%, transparent 75%);
  opacity: 0.7;
}

.halo-hero .hero-content { position: relative; z-index: 1; }

.halo-hero h1.hero-title {
  font-family: var(--tz-font-display);
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--tz-fg-1);
  font-weight: 400;
  margin: 32px auto 0;
  max-width: 1000px;
  text-wrap: balance;
}
.halo-hero h1 .hl-italic {
  font-style: italic;
  padding: 0 0.12em 0.18em 0;
  background-image: var(--tz-grad-h);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.09em;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}

.halo-hero .hero-sub {
  font-family: var(--tz-font-ui);
  font-size: 19px;
  line-height: 1.55;
  color: var(--tz-fg-2);
  max-width: 720px;
  margin: 28px auto 0;
}

.halo-hero .hero-cta {
  margin-top: 38px;
  display: flex; gap: 12px; justify-content: center; align-items: center;
  flex-wrap: wrap;
}

.halo-hero .hero-trust {
  margin-top: 56px;
  display: flex; gap: 36px; justify-content: center; flex-wrap: wrap;
  font-family: var(--tz-font-mono);
  font-size: 11px;
  color: var(--tz-fg-3);
  letter-spacing: 0.14em;
}

.section-header {
  margin-bottom: 36px;
}
.section-header h2 {
  font-family: var(--tz-font-display);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--tz-fg-1);
  font-weight: 400;
  margin: 14px 0 0;
}

/* ============================================================
   8 · Tools grid — cards
   ============================================================ */
.tool-card {
  position: relative;
  background: var(--tz-surface);
  border: 1px solid var(--tz-border);
  border-radius: var(--tz-radius-xl);
  padding: 26px;
  text-decoration: none;
  color: var(--tz-fg-1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  transition: border-color var(--tz-duration-fast) var(--tz-ease-out),
              transform var(--tz-duration-fast) var(--tz-ease-out);
}
.tool-card:hover {
  color: var(--tz-fg-1);
  border-color: var(--tz-border-strong);
  transform: translateY(-2px);
}
.tool-card.is-featured {
  border-color: var(--tz-border-accent);
  box-shadow: 0 0 0 1px var(--tz-border-accent), 0 20px 60px rgba(var(--tz-accent-rgb), 0.15);
}
.tool-card.is-featured::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(70% 70% at 0% 0%, rgba(var(--tz-accent-rgb), 0.14) 0%, rgba(var(--tz-accent-rgb), 0) 60%);
  pointer-events: none;
}
.tool-card > * { position: relative; }

.tool-card .tool-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 28px;
}
.tool-card .tool-icon {
  width: 44px; height: 44px;
  border-radius: var(--tz-radius-lg);
  background: rgba(var(--tz-accent-rgb), 0.10);
  border: 1px solid var(--tz-border-accent);
  color: var(--tz-accent-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tool-card.is-featured .tool-icon {
  background: var(--tz-grad);
  border: none;
  color: #fff;
}
.tool-card .tool-num {
  font-family: var(--tz-font-mono);
  font-size: 11px;
  color: var(--tz-fg-3);
  letter-spacing: 0.16em;
}
.tool-card h3 {
  font-family: var(--tz-font-ui);
  font-size: 20px;
  font-weight: 700;
  color: var(--tz-fg-1);
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.tool-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--tz-fg-2);
  margin: 0 0 22px;
}
.tool-card .tool-foot {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
}
.tool-card .tool-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tool-tag {
  font-family: var(--tz-font-mono);
  font-size: 10px;
  color: var(--tz-accent-1);
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(var(--tz-accent-rgb), 0.10);
  border: 1px solid var(--tz-border-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.tool-card .arrow {
  color: var(--tz-fg-2);
  display: inline-flex;
}

.filter-bar {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  background: var(--tz-surface);
  border: 1px solid var(--tz-border);
  border-radius: var(--tz-radius-lg);
  font-family: var(--tz-font-ui);
  font-size: 12.5px;
  font-weight: 500;
}
.filter-bar button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--tz-fg-2);
  padding: 7px 14px;
  border-radius: var(--tz-radius-md);
  cursor: pointer;
}
.filter-bar button.is-active {
  background: var(--tz-surface-2);
  border-color: var(--tz-border);
  color: var(--tz-fg-1);
}

/* ============================================================
   9 · Dashboard glimpse
   ============================================================ */
.dashboard-frame {
  position: relative;
  background: var(--tz-bg-elev);
  border: 1px solid var(--tz-border);
  border-radius: var(--tz-radius-2xl);
  overflow: hidden;
}
.dashboard-halo {
  position: absolute; inset: -40px;
  background: radial-gradient(50% 40% at 50% 40%, rgba(var(--tz-accent-rgb), 0.25) 0%, rgba(91,138,245,0.12) 40%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}
.dashboard-wrap { position: relative; z-index: 1; }

.dash-topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--tz-border);
  background: var(--tz-surface);
}
.dash-traffic { display: flex; gap: 6px; }
.dash-traffic span { width: 11px; height: 11px; border-radius: 50%; opacity: 0.8; }
.dash-traffic span:nth-child(1) { background: #ff5f57; }
.dash-traffic span:nth-child(2) { background: #febc2e; }
.dash-traffic span:nth-child(3) { background: #28c840; }
.dash-url {
  font-family: var(--tz-font-mono);
  font-size: 11px;
  color: var(--tz-fg-3);
}
.dash-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--tz-radius-full);
  background: var(--tz-gain-dim);
  color: var(--tz-gain);
  font-family: var(--tz-font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.dash-live-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--tz-gain);
}

.dash-grid {
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  min-height: 540px;
}
@media (max-width: 992px) {
  .dash-grid { grid-template-columns: 64px 1fr; }
  .dash-grid .dash-rail { display: none; }
}

.dash-sidebar {
  border-right: 1px solid var(--tz-border);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-sidebar-brand {
  display: flex; gap: 10px; padding: 6px 8px; margin-bottom: 8px;
}
.dash-sidebar-brand .brand-meta { line-height: 1.1; }
.dash-sidebar-brand .brand-name {
  font-family: var(--tz-font-ui);
  font-weight: 700;
  font-size: 14px;
  color: var(--tz-fg-1);
}
.dash-sidebar-brand .brand-version {
  font-family: var(--tz-font-mono);
  font-size: 9px;
  color: var(--tz-fg-3);
  letter-spacing: 0.16em;
  margin-top: 2px;
}

.dash-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--tz-radius-md);
  color: var(--tz-fg-2);
  font-family: var(--tz-font-ui);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.dash-nav-item:hover { color: var(--tz-fg-1); background: var(--tz-surface-2); }
.dash-nav-item .label { flex: 1; }
.dash-nav-item .badge-mini {
  font-family: var(--tz-font-mono);
  font-size: 9px;
  padding: 2px 6px;
  background: var(--tz-surface-2);
  color: var(--tz-accent-1);
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.dash-nav-item.is-active {
  background: var(--tz-grad);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--tz-glow-soft);
}
.dash-nav-item.is-active .badge-mini {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.dash-main {
  padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
}
.index-card {
  position: relative;
  background: var(--tz-surface);
  border: 1px solid var(--tz-border);
  border-radius: var(--tz-radius-lg);
  padding: 14px;
  overflow: hidden;
}
.index-card.is-featured { border-color: var(--tz-border-accent); }
.index-card.is-featured::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 0% 100%, rgba(var(--tz-accent-rgb), 0.12), transparent 70%);
}
.index-card > * { position: relative; }
.index-card .label {
  font-family: var(--tz-font-mono); font-size: 10px;
  color: var(--tz-fg-3); letter-spacing: 0.14em;
}
.index-card .value {
  font-family: var(--tz-font-mono); font-size: 22px;
  color: var(--tz-fg-1); font-weight: 700;
  margin-top: 6px; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.index-card .chip-gain,
.index-card .chip-loss {
  font-family: var(--tz-font-mono); font-size: 11px;
  font-weight: 700; padding: 2px 7px; border-radius: 4px;
}
.chip-gain { color: var(--tz-gain); background: var(--tz-gain-dim); }
.chip-loss { color: var(--tz-loss); background: var(--tz-loss-dim); }

.cpr-card {
  background: var(--tz-surface);
  border: 1px solid var(--tz-border);
  border-radius: var(--tz-radius-lg);
  padding: 16px;
}
.cpr-tf {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--tz-surface-2);
  border-radius: var(--tz-radius-md);
  font-family: var(--tz-font-mono);
  font-size: 10.5px;
}
.cpr-tf span {
  padding: 4px 10px;
  border-radius: 5px;
  color: var(--tz-fg-3);
  font-weight: 600;
  cursor: pointer;
}
.cpr-tf span.is-active {
  background: var(--tz-grad);
  color: #fff;
}
.cpr-canvas {
  position: relative;
  height: 130px;
  margin-top: 10px;
}
.cpr-canvas svg { display: block; width: 100%; height: 100%; }
.cpr-canvas .level {
  position: absolute; left: 0; right: 0;
  border-top: 1px dashed var(--tz-fg-2);
  opacity: 0.4;
  pointer-events: none;
}
.cpr-canvas .level.is-pivot {
  border-top-style: solid;
  border-top-color: var(--tz-accent-2);
  opacity: 0.7;
}
.cpr-canvas .level.is-cpr {
  border-top-color: var(--tz-accent-1);
}
.cpr-canvas .level .label {
  position: absolute; right: 0; top: -8px;
  font-family: var(--tz-font-mono);
  font-size: 9.5px;
  background: var(--tz-surface);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
  color: var(--tz-fg-2);
}
.cpr-canvas .level.is-pivot .label { color: var(--tz-accent-2); font-weight: 700; }
.cpr-canvas .level.is-cpr   .label { color: var(--tz-accent-1); }

.dash-rail {
  border-left: 1px solid var(--tz-border);
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  background: rgba(var(--tz-accent-rgb), 0.04);
}
.rail-header { display: flex; align-items: center; gap: 10px; }
.rail-avatar {
  width: 30px; height: 30px;
  border-radius: var(--tz-radius-md);
  background: var(--tz-grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: var(--tz-glow-soft);
}
.rail-name {
  font-family: var(--tz-font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--tz-fg-1);
  line-height: 1.1;
}
.rail-status {
  font-family: var(--tz-font-mono);
  font-size: 9.5px;
  color: var(--tz-fg-3);
  letter-spacing: 0.14em;
  margin-top: 2px;
}
.rail-bubble {
  background: var(--tz-surface);
  border: 1px solid var(--tz-border-accent);
  border-radius: var(--tz-radius-md);
  padding: 12px;
  font-size: 12.5px;
  color: var(--tz-fg-1);
  line-height: 1.55;
}
.rail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-family: var(--tz-font-mono);
  font-size: 11px;
}
.rail-stat {
  background: var(--tz-surface);
  border: 1px solid var(--tz-border);
  border-radius: 6px;
  padding: 8px;
}
.rail-stat .k {
  color: var(--tz-fg-3);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rail-stat .v {
  font-weight: 700;
  color: var(--tz-fg-1);
  margin-top: 2px;
}
.rail-action {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--tz-border);
}
.rail-action .k {
  font-family: var(--tz-font-mono);
  font-size: 10px;
  color: var(--tz-fg-3);
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}
.rail-action .footnote {
  margin-top: 8px;
  font-family: var(--tz-font-mono);
  font-size: 10px;
  color: var(--tz-fg-3);
  text-align: center;
}

/* ============================================================
   10 · Learn cards
   ============================================================ */
.learn-card {
  position: relative;
  background: var(--tz-surface);
  border: 1px solid var(--tz-border-accent);
  border-radius: var(--tz-radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 260px;
  overflow: hidden;
  text-decoration: none;
  color: var(--tz-fg-1);
}
.learn-card:hover { color: var(--tz-fg-1); }
.learn-card::before {
  content: ''; position: absolute; inset: 0;
  pointer-events: none;
}
.learn-card.from-tl::before { background: radial-gradient(60% 80% at 100% 0%, rgba(var(--tz-accent-rgb), 0.14), transparent 60%); }
.learn-card.from-br::before { background: radial-gradient(60% 80% at 0% 100%, rgba(91,138,245,0.14), transparent 60%); }
.learn-card > * { position: relative; }

.learn-tag {
  display: inline-flex;
  align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--tz-grad);
  border-radius: var(--tz-radius-full);
  font-family: var(--tz-font-ui);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.learn-tag.ta { font-family: var(--tz-font-tamil); }

.learn-card h3 {
  font-family: var(--tz-font-display);
  font-size: 28px;
  line-height: 1.12;
  color: var(--tz-fg-1);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.02em;
}
.learn-card p {
  font-size: 14px;
  color: var(--tz-fg-2);
  line-height: 1.6;
  margin: 0;
}
.learn-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--tz-border);
}
.learn-meta {
  font-family: var(--tz-font-mono);
  font-size: 11px;
  color: var(--tz-fg-3);
  letter-spacing: 0.1em;
}
.learn-cta {
  color: var(--tz-accent-1);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* ============================================================
   11 · FAQ — override Bootstrap accordion
   ============================================================ */
.halo-faq .accordion {
  --bs-accordion-bg: var(--tz-surface);
  --bs-accordion-color: var(--tz-fg-1);
  --bs-accordion-border-color: var(--tz-border);
  --bs-accordion-border-radius: var(--tz-radius-lg);
  --bs-accordion-inner-border-radius: var(--tz-radius-lg);
  --bs-accordion-btn-color: var(--tz-fg-1);
  --bs-accordion-btn-bg: var(--tz-surface);
  --bs-accordion-active-bg: var(--tz-surface);
  --bs-accordion-active-color: var(--tz-fg-1);
  --bs-accordion-btn-focus-box-shadow: none;
  --bs-accordion-btn-icon: none;
  --bs-accordion-btn-active-icon: none;
  --bs-accordion-btn-padding-y: 18px;
  --bs-accordion-btn-padding-x: 20px;
  --bs-accordion-body-padding-y: 0;
  --bs-accordion-body-padding-x: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.halo-faq .accordion-item {
  border: 1px solid var(--tz-border);
  border-radius: var(--tz-radius-lg);
  overflow: hidden;
  background: var(--tz-surface);
}
.halo-faq .accordion-item:has(.accordion-button:not(.collapsed)) {
  border-color: var(--tz-border-accent);
}
.halo-faq .accordion-button {
  font-family: var(--tz-font-ui);
  font-weight: 600;
  font-size: 16px;
  color: var(--tz-fg-1);
  background: var(--tz-surface);
  box-shadow: none !important;
  align-items: center;
  display: flex;
  justify-content: space-between;
}
.halo-faq .accordion-button::after {
  content: '+';
  width: 28px; height: 28px;
  border-radius: var(--tz-radius-md);
  background: var(--tz-surface-2);
  color: var(--tz-fg-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  background-image: none;
  transform: none;
  transition: background var(--tz-duration-fast) var(--tz-ease-out);
  margin-left: 12px;
}
.halo-faq .accordion-button:not(.collapsed)::after {
  content: '−';
  background: var(--tz-grad);
  color: #fff;
  transform: none;
}
.halo-faq .accordion-body {
  font-family: var(--tz-font-ui);
  font-size: 14px;
  color: var(--tz-fg-2);
  line-height: 1.6;
  padding-bottom: 20px;
}

/* ============================================================
   12 · Footer
   ============================================================ */
.halo-footer {
  position: relative;
  border-top: 1px solid var(--tz-border);
  padding: 64px 0 36px;
  overflow: hidden;
}
.halo-footer::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--tz-halo-footer);
  pointer-events: none;
}
.halo-footer .container { position: relative; }
.halo-footer h3.footer-lead {
  font-family: var(--tz-font-display);
  font-size: 32px;
  line-height: 1.1;
  color: var(--tz-fg-1);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.025em;
}
.halo-footer .footer-col-title {
  font-family: var(--tz-font-mono);
  font-size: 10.5px;
  color: var(--tz-accent-1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}
.halo-footer .footer-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.halo-footer .footer-list a {
  font-family: var(--tz-font-ui);
  font-size: 13.5px;
  color: var(--tz-fg-2);
  text-decoration: none;
}
.halo-footer .footer-list a:hover { color: var(--tz-fg-1); }
.halo-footer .footer-bottom {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--tz-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--tz-font-mono);
  font-size: 11px;
  color: var(--tz-fg-3);
  letter-spacing: 0.1em;
  flex-wrap: wrap;
  gap: 12px;
}
.halo-footer .footer-bottom .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.halo-footer .footer-bottom .status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--tz-gain);
}

/* ============================================================
   13 · Sparkline + small data viz
   ============================================================ */
.spark { display: block; width: 100%; height: 36px; }
.spark path.line { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================
   14 · Responsive tweaks
   ============================================================ */
@media (max-width: 768px) {
  .halo-hero { padding: 64px 0 56px; }
  .halo-hero h1.hero-title { font-size: 56px; }
  .halo-hero .hero-sub { font-size: 16px; }
  .halo-hero .hero-trust { font-size: 10px; gap: 20px; }
  .section-header h2 { font-size: 30px; }
  .tool-card { padding: 22px; }
  .dash-grid { min-height: 0; }
  .dash-sidebar { padding: 12px 8px; }
  .dash-sidebar .label,
  .dash-sidebar .badge-mini { display: none; }
  .dash-sidebar-brand .brand-meta { display: none; }
}

/* ============================================================
   15 · Light-mode overrides for legacy page CSS variables
   Pages migrated from theme.css define --bg / --text / etc.
   in :root with hardcoded dark values. halo-aurora.css loads
   after those <style> blocks, so equal-specificity rules here
   win when [data-bs-theme="light"] is active on <html>.
   ============================================================ */
[data-bs-theme="light"] {
  /* backgrounds */
  --bg:      #f4f5fb;
  --bg1:     #eceef8;
  --bg2:     #e3e5f5;
  --bg3:     #d8dbf0;
  --bg4:     #cdd2eb;
  /* borders */
  --border:  #c2c8e0;
  --border2: #adb5d4;
  /* text */
  --text:    #1a1d32;
  --dim:     #3d4268;
  --muted:   #6b709a;
  /* signal tints — lighten for readability on pale bg */
  --green-bg:   rgba(46, 204, 113, 0.14);
  --green-glow: rgba(46, 204, 113, 0.22);
  --red-bg:     rgba(231,  76,  60, 0.11);
  --red-glow:   rgba(231,  76,  60, 0.18);
  --yellow-bg:  rgba(245, 166,  35, 0.12);
  --purple-bg:  rgba(139,  92, 246, 0.12);
}

/* Hero h1 hardcoded color:#fff becomes invisible on light bg */
[data-bs-theme="light"] .hero h1 { color: var(--text); }
[data-bs-theme="light"] .hero h1 em { color: transparent; }

/* Nav type-selector rule in page <style> can force dark bg */
[data-bs-theme="light"] nav:not(.navbar):not([class*="halo"]) {
  background: rgba(244, 245, 251, 0.97) !important;
  border-bottom-color: var(--border) !important;
}
