﻿/* Accessible Dark Dashboard Theme â€” Aurora Noir
   Applies across all pages using existing markup/classes. */

/* Tokens */
:root {
  --radius: 16px;
  --space-1: 6px; --space-2: 10px; --space-3: 14px; --space-4: 18px; --space-5: 24px; --space-6: 32px;
  --shadow: 0 10px 30px rgba(2,6,23,.18);

  /* Aurora Noir palette */
  --bg: #0b0f19;
  --panel: #0f172a;     /* header/blocks */
  --panel-solid: #111827; /* cards/surfaces */
  --card: #111827;
  --text: #f5f7ff;
  --muted: #cdd6f4;
  --border: #243043;
  --primary: #4f46e5;  /* indigo */
  --accent: #22d3ee;   /* cyan */
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --chart-grid: #243043;
  --focus: #22d3ee;
  --table-stripe: rgba(34,211,238,.07);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

/* Disable legacy gradient/waves from older design */
body.glass { background: var(--bg) !important; }
.waves { display: none !important; }

/* Header */
.navbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; margin: 16px auto; max-width: 1200px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow);
}
.brand { display:flex; align-items:center; gap:8px }
.brand-icon { width: 16px; height: 16px; border-radius: 4px; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.brand-name { font-weight: 800; letter-spacing:.2px; }
.nav-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-actions #toggle-headings { display: none; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-6); }

h1 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.15; margin:0 0 var(--space-2); }
h2 { font-size: clamp(18px, 2vw, 22px); margin:.2rem 0 .6rem; color: var(--muted); }

/* Cards */
.card { background: var(--panel-solid); border: 1.5px solid var(--border); border-radius: var(--radius); padding: var(--space-4); box-shadow: var(--shadow); overflow: visible; }
.card h3 { margin:0 0 8px 0; color:var(--muted); font-size:14px }
.card-label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.card-value { font-size: 22px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.card-value .sub { font-size: 12px; color: var(--muted); font-weight: 500; }

/* KPI summary */
.chips { display:grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.chip { padding: var(--space-4); border-radius: calc(var(--radius) - 4px); border:1.5px solid var(--border); background: var(--panel); box-shadow: 0 10px 18px rgba(2,6,23,.10); }
.chip.kpi-card { display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.chip .sub { margin-left: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: var(--kpi-font); font-weight: 800; line-height: 1.05; }
.kpi-delta, .kpi-note { font-size: 14px; font-weight: 600; color: var(--muted); display:flex; align-items:center; gap:6px; }
.kpi-delta.gain, .kpi-note.gain { color: var(--success); }
.kpi-delta.loss, .kpi-note.loss { color: var(--danger); }
.kpi-delta.neutral, .kpi-note.neutral { color: var(--muted); }

.hero { margin-top:10px; padding:18px; background: var(--panel-solid); border:1.5px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display:grid; grid-template-columns:1fr; gap:16px }

/* Controls and buttons */
.controls { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 }
.btn { border:1.5px solid var(--border); background: var(--panel-solid); color:var(--text); padding:10px 14px; border-radius: 12px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; line-height:1; text-decoration:none }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(2,6,23,.12) }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px }
.btn-quiet { background: transparent; }
.btn-primary { background: var(--primary); color:#fff; border-color: var(--primary); }

.range { padding:8px 10px; border-radius:12px; border:1.5px solid var(--border); background:var(--panel); color:var(--muted); cursor:pointer }
.range.btn-primary,
.range.active { background: var(--primary); color:#fff; border-color: var(--primary) }
.range[data-two]{ border:none; color:#fff; background-clip: padding-box; overflow:hidden; box-shadow:0 8px 18px rgba(2,6,23,.10), inset 0 0 0 1px rgba(255,255,255,.08) }

/* Forms */
.field { position: relative; }
.field-small input { text-align: right; }
.add-form { display:grid; grid-template-columns: 1fr 160px 120px; gap:12px; align-items:start; margin:12px 0 8px }
.add-form { overflow: visible; }
.add-form .field { position: relative; z-index: 10; }
#add-stock-card .field.field-small.stepper { position: relative; }
.input-stepper { position:absolute; right:8px; top:50%; transform:translateY(-50%); display:flex; flex-direction:column; gap:4px; }
.input-stepper .step {
  width:14px;
  height:14px;
  padding:0;
  border-radius:6px;
  border:1.5px solid #38bdf8;
  background:rgba(56,189,248,.18);
  color:#e0f2fe;
  font-size:11px;
  line-height:1;
  box-shadow:0 4px 14px rgba(56,189,248,.16);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.input-stepper .step:hover { background: rgba(56,189,248,.3); }
.field.field-small input[type="number"] { padding-right: 40px; }
#add-stock-card { position: relative; z-index: 200; }
#fundamentals-search-card { position: relative; z-index: 200; }
.add-form input, .apikey {
  width:100%; padding:12px; border:1.5px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text);
}
input:focus-visible { outline:3px solid var(--focus); outline-offset:2px }
/* Hide default browser number spinners; we use a custom stepper */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* Dropdown */
.dropdown { list-style:none; position:absolute; top:calc(100% + 6px); left:0; right:0; padding:6px; margin:0; background: var(--panel-solid); border:1.5px solid var(--border); border-radius:10px; box-shadow: var(--shadow); max-height:280px; overflow:auto; z-index:99999 }
/* Explicitly lift dashboard suggestions above grid neighbors */
#search-results.dropdown { z-index: 100000; }
#symbol-results.dropdown { z-index: 100000; }
.dropdown li { padding:8px 10px; border-radius:6px; cursor:pointer }
.dropdown li:hover { background: rgba(79,70,229,.15) }

/* Grids */
.summary-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px }
.grid { display:grid; grid-template-columns:1fr 1fr; gap:14px }
.chart-card { padding: 16px }
.chart { min-height: 320px }
/* Improve chart sizing on phones/tablets */
@media (max-width: 820px) { .chart { min-height: 42vh; } }
@media (min-width: 821px) and (max-width: 1080px) { .chart { min-height: 48vh; } }
.stock-cell { text-decoration: underline }
.allocation-chart { min-height: 320px; }
.chart-empty { color: var(--muted); font-size:14px; text-align:center; padding: var(--space-4); }
.allocation-legend { margin: var(--space-3) 0 0; padding:0; list-style:none; display:flex; flex-wrap:wrap; gap:8px; }
.allocation-legend li { display:flex; align-items:center; gap:8px; background: rgba(17,24,39,.52); border:1px solid rgba(36,48,67,.8); border-radius:999px; padding:6px 10px; }
.legend-left { display:flex; align-items:center; gap:8px; }
.legend-swatch { width:12px; height:12px; border-radius:50%; }
.legend-text, .legend-chip { font-weight:700; letter-spacing:.2px; }
.legend-sub { display:none; }
.donut-center text { fill:#cbd5f5; font-weight:600; letter-spacing:.02em; }
.donut-label-top { font-size:12px; text-transform:uppercase; fill:#94a3b8; }
.donut-label-main { font-size:20px; font-weight:700; fill:#f8fafc; }
.donut-label-sub { font-size:12px; fill:#94a3b8; }
.tooltip-title { font-weight:600; margin-bottom:2px; }
.tooltip-sub { color:#cbd5f5; font-size:11px; }

.chart-tooltip {
  position: fixed;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.35);
  z-index: 200000;
  opacity: 0;
  transform: translate3d(0, 4px, 0);
  transition: opacity .18s ease, transform .18s ease;
}

/* Badges + gain/loss semantics */
.badge { display:inline-flex; align-items:center; gap:6px; padding:4px 8px; border-radius:999px; font-weight:700; border:2px solid currentColor; }
.badge .dot { inline-size:.75em; block-size:.75em; border-radius:50%; background: currentColor; }
.badge.pos, .gain { color: var(--success); }
.badge.neg, .loss { color: var(--danger); text-decoration: underline dotted; }
.neutral { color: var(--muted); font-weight:600; }

/* Table */
.table-card { padding: var(--space-4); border-radius: var(--radius); border:1.5px solid var(--border); background: var(--panel); box-shadow: var(--shadow); }
.table-wrap { overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--surface); }
.table-wrap table { width:100%; border-collapse: separate; border-spacing:0; font-size:14px; }
.table-wrap thead th { background: var(--table-head-bg); color: var(--table-head-color); padding:12px; text-align:left; border-bottom:1px solid rgba(36,48,67,.4); font-weight:700; }
.table-wrap tbody td { padding:12px; border-bottom:1px solid rgba(36,48,67,.35); }
.holdings-table { width:100%; border-collapse: separate; border-spacing:0; font-size:14px }
.holdings-table thead th { position: sticky; top: 0; background: var(--table-head-bg); color: var(--table-head-color); padding:14px 16px; text-align:left; border-bottom:1px solid rgba(36,48,67,.6); font-weight:700; letter-spacing:.02em; }
.holdings-table thead th:first-child { border-top-left-radius: calc(var(--radius) - 2px); }
.holdings-table thead th:last-child { border-top-right-radius: calc(var(--radius) - 2px); }
.holdings-table tbody td { padding: 18px 16px; border-bottom: 1px solid rgba(36,48,67,.55); }
.holdings-table tbody tr:nth-child(odd) { background: rgba(36,48,67,.55); }
.holdings-table tbody tr:nth-child(even) { background: rgba(36,48,67,.35); }
.holdings-table tbody tr:hover { background: rgba(34,211,238,.10); }
.holdings-table .num { text-align:right; font-variant-numeric: tabular-nums; }
.holdings-table .holding-name { font-weight:700; font-size:15px; }
.holdings-table .symbol-cell { display:flex; align-items:center; gap:10px; }
.holdings-table .symbol-code { font-weight:700; font-size:15px; color: var(--text); }
.holdings-table .symbol-pill { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; font-weight:700; font-size:12px; border:2px solid currentColor; background: rgba(255,255,255,.08); text-transform:capitalize; }
.holdings-table .pill-dot { inline-size:.65rem; block-size:.65rem; border-radius:50%; background: currentColor; }
.symbol-pill[data-tone="tech"] { color: #22d3ee; }
.symbol-pill[data-tone="health"] { color: #22c55e; }
.symbol-pill[data-tone="auto"] { color: #f59e0b; }
.symbol-pill[data-tone="commerce"] { color: #f97316; }
.symbol-pill[data-tone="finance"] { color: #38bdf8; }
.symbol-pill[data-tone="energy"] { color: #38bdf8; }
.symbol-pill[data-tone="industrial"] { color: #a855f7; }
.symbol-pill[data-tone="communications"] { color: #fb7185; }
.symbol-pill[data-tone="realestate"] { color: #fbbf24; }
.symbol-pill[data-tone="utility"] { color: #38d9a9; }
.symbol-pill[data-tone="materials"] { color: #c084fc; }
.symbol-pill[data-tone="neutral"] { color: var(--muted); }
.holdings-table .pl-cell { text-align:right; display:flex; flex-direction:column; align-items:flex-end; gap:4px; }
.holdings-table .pl-value { font-weight:700; font-size:16px; }
.holdings-table .pl-sub { font-size:12px; font-weight:600; color:var(--muted); }
.holdings-table .pl-value.gain, .holdings-table .pl-sub.gain { color: var(--success); }
.holdings-table .pl-value.loss, .holdings-table .pl-sub.loss { color: var(--danger); }
.holdings-table .pl-value.neutral, .holdings-table .pl-sub.neutral { color: var(--muted); }
.holdings-table .table-action { align-self:flex-end; font-size:12px; padding:4px 10px; border-radius:999px; border:1px solid rgba(239,68,68,.4); background:rgba(239,68,68,.15); color:var(--danger); cursor:pointer; transition:background .2s ease; }
.holdings-table .table-action:hover { background:rgba(239,68,68,.25); }

/* Financials tabs */
.fin-topbar{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px }
.fin-tabs{ display:flex; gap:8px; flex-wrap:wrap }
.fin-tabs .tab{ padding:8px 12px; border:1.5px solid var(--border); border-radius:8px; background:var(--panel); color:var(--muted); cursor:pointer }
.fin-tabs .tab.active{ background:var(--primary); color:#fff; border-color:var(--primary) }
.fin-format{ font-weight:600; color:var(--muted); }
.fin-caption{ background:rgba(255,255,255,.06); color:#fff; font-weight:600; }
.fin-name{ white-space:nowrap }
.fin-lvl-1 .fin-name{ padding-left:12px }
.fin-lvl-2 .fin-name{ padding-left:24px }
.fin-bold .fin-name{ font-weight:700 }

/* Fundamentals ratios grid */
#ratios {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
@media (max-width: 900px) {
  #ratios {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  #ratios {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Quote panel styling */
#quote{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px }
@media (max-width: 720px){ #quote{ grid-template-columns:minmax(0,1fr) } }
#quote .quote-metric{ padding:10px 12px; border:1px solid rgba(148,163,184,.25); border-radius:12px; background:rgba(15,23,42,.4); display:flex; flex-direction:column; gap:6px }
#quote .metric-label{ font-size:12px; font-weight:600; letter-spacing:.04em; color:var(--muted) }
#quote .metric-value{ font-size:16px; font-weight:700; color:#e2e8f0; display:flex; flex-direction:column; gap:4px }
.quote-price-badge{ display:inline-flex; align-items:center; justify-content:center; padding:4px 16px; border-radius:999px; font-weight:800; letter-spacing:.03em; background:#0f172a; border:1.5px solid #38bdf8; color:#f8fafc; box-shadow:0 4px 16px rgba(56,189,248,.22) }
.quote-price-badge.gain{ border-color:#22c55e; box-shadow:0 4px 16px rgba(34,197,94,.25) }
.quote-price-badge.loss{ border-color:#ef4444; box-shadow:0 4px 16px rgba(239,68,68,.2) }
.quote-price-badge.flat{ border-color:#94a3b8; box-shadow:0 4px 12px rgba(148,163,184,.15) }
.quote-change{ font-size:12px; font-weight:600; color:var(--muted) }
.quote-change.gain{ color:#22c55e }
.quote-change.loss{ color:#f87171 }
.quote-change.flat{ color:#cbd5f5 }

/* Footer */
.landing-footer {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.85);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.landing-footer .footer-brand {
  color: inherit;
  text-decoration: none;
}
.landing-footer .footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.landing-footer .footer-links a {
  color: var(--text-muted);
  transition: color .18s;
}
.landing-footer .footer-links a:hover {
  color: var(--text-main);
}

/* Marketing features (index page) */
.features { margin-top: 16px; background: var(--panel); border:1px solid var(--border); border-radius:var(--radius); padding:18px; box-shadow: var(--shadow); }
.features h2 { text-align:center; margin: 0 0 12px; color:var(--text); }
.feature-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feature-card { background: var(--panel-solid); border:1px solid var(--border); border-radius:10px; padding:12px; color:var(--text); }

.feature-card h4 { display:flex; align-items:center; gap:8px }
.feature-card p { margin:0; color:var(--muted); font-size:12px }
.feature-icon { font-size:16px; margin-right:8px }

/* Loading overlay */
.loading-overlay[hidden]{ display:none }
.loading-overlay{ position:fixed; inset:0; display:grid; place-items:center; background:rgba(2,6,23,.18); backdrop-filter: blur(4px); z-index:1000 }
.loading-panel{ padding:18px 20px; border-radius:14px; border:1.5px solid var(--border); background:var(--panel); display:flex; align-items:center; gap:12px; box-shadow: var(--shadow) }
.spinner{ width:36px; height:36px; border-radius:50%; border:3px solid rgba(15,23,42,.25); border-top-color: var(--primary); animation: spin 1s linear infinite }
.loading-text{ color:var(--muted); font-size:12px }
@keyframes spin{ to { transform: rotate(360deg) } }

/* Charts respect theme */
.chart svg .domain, .chart svg .tick line { opacity: 0.35; }
.chart svg text { fill: #94a3b8; }

/* Cookie consent (disabled) */
.cookie-banner, .cookie-floating { display:none !important }

/* Responsive */
@media (max-width: 1000px) {
  .grid { grid-template-columns: 1fr; }
  .chips{grid-template-columns:1fr 1fr}
  .feature-grid { grid-template-columns: 1fr; }
  /* Hide section titles by default on small screens; toggle with body.show-headings */
  .card > h3 { display: none; }
  body.show-headings .card > h3 { display: block; }
  /* Hide nav links by default on small screens; show only the menu toggle */
  .nav-actions .btn:not(#toggle-headings) { display: none; }
  .nav-actions #toggle-headings { display:inline-flex; }
  body.show-menu .nav-actions { flex-direction: column; align-items: flex-start; gap:12px; }
  body.show-menu .nav-actions .btn { display:inline-flex !important; }
}
@media (max-width: 760px) {
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr; }
  .add-form { grid-template-columns: 1fr; }
}



.chart-tooltip.show { opacity: 1; transform: translate3d(0, 0, 0); }


/* Micro-interactions & motion */
html { scroll-behavior: smooth; }
.btn { transition: transform .12s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(2,6,23,.2); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(2,6,23,.15); }
.btn-primary { transition: background .2s ease, transform .12s ease, box-shadow .2s ease; }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(59,130,246,.25); }

.card { animation: fadeUp .5s ease-out both; }
.grid .card:nth-child(1) { animation-delay: .02s }
.grid .card:nth-child(2) { animation-delay: .06s }
.grid .card:nth-child(3) { animation-delay: .10s }
.grid .card:nth-child(4) { animation-delay: .14s }
@keyframes fadeUp { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }

/* Brand icon playful hover */
.brand:hover .brand-icon { animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-3px) } }

/* Mobile menu reveal animation */
@media (max-width: 1000px) {
  body.show-menu .nav-actions .btn { animation: slideIn .2s ease-out both; }
  body.show-menu .nav-actions .btn:nth-child(1){ animation-delay: .02s }
  body.show-menu .nav-actions .btn:nth-child(2){ animation-delay: .05s }
  body.show-menu .nav-actions .btn:nth-child(3){ animation-delay: .08s }
  body.show-menu .nav-actions .btn:nth-child(4){ animation-delay: .11s }
  @keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Sticker icons (cartoon-style) */
.sticker { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:10px; margin-right:8px; font-size:16px; line-height:1; user-select:none; background: rgba(56,189,248,.12); border:1.5px solid #38bdf8; color:#e0f2fe; box-shadow: 0 4px 14px rgba(56,189,248,.16); transform: translateZ(0); animation: sticker-pop .4s ease both; position: relative; overflow: hidden }

.sticker.sm { width:20px; height:20px; border-radius:8px; margin-right:6px; font-size:13px }
.card h3 { display:flex; align-items:center; gap:8px }
@keyframes sticker-pop { from { opacity:0; transform: translateY(6px) scale(.96) } to { opacity:1; transform: none } }
@keyframes sticker-wiggle { 0%,100% { transform: rotate(0deg) } 25% { transform: rotate(-4deg) } 50% { transform: rotate(3deg) } 75% { transform: rotate(-2deg) } }

/* Cartoon face variant to replace question marks */
.sticker.face { background: linear-gradient(145deg, var(--accent), var(--primary)); border-color: transparent; box-shadow: 0 8px 18px rgba(34,211,238,.22); width:24px; height:24px }
.sticker.face::before, .sticker.face::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #0f172a; top: 8px }
.sticker.face::before { left: 7px }
.sticker.face::after { right: 7px }
.sticker.face .smile { position:absolute; width: 9px; height: 3px; border-radius: 999px; background:#0f172a; left:50%; bottom: 6px; transform: translateX(-50%); }
.sticker.sm.face { width:16px; height:16px }
.sticker.sm.face::before, .sticker.sm.face::after { top: 5px; width: 3px; height: 3px }
.sticker.sm.face .smile { bottom: 3px; width: 7px; height: 2px }
.sticker.face.blink::before, .sticker.face.blink::after { animation: blink 5s infinite }
@keyframes blink { 0%,92%,100%{ transform: scaleY(1) } 95%{ transform: scaleY(.2) } }

/* Cartoon illustration helpers */
.cartoon-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; margin-top:12px }
.cartoon-panel { display:flex; align-items:center; gap:16px; padding:16px; border-radius:var(--radius); border:1.5px solid var(--border); background:linear-gradient(120deg,rgba(56,189,248,.12),rgba(99,102,241,.12)); box-shadow:var(--shadow); min-height:120px }
.cartoon-panel.reverse { flex-direction:row-reverse }
.cartoon-panel.column { flex-direction:column; text-align:center }
.cartoon-panel h3 { margin:0; font-size:16px }
.cartoon-panel p { margin:4px 0 0 0; color:var(--muted); font-size:13px }
.cartoon-caption { display:flex; flex-direction:column; gap:4px; flex:1 }
.cartoon-caption small { color:var(--muted); font-size:12px; letter-spacing:.04em; text-transform:uppercase }
.cartoon-figure { width:96px; height:96px; border-radius:28px; background:radial-gradient(circle at 25% 0,#38bdf8,#6366f1 55%,#0f172a); box-shadow:0 14px 30px rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; border:2px solid #020617 }
.cartoon-figure.lg { width:128px; height:128px }
.cartoon-figure img { width:70%; height:auto; display:block }
.cartoon-chip { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; background:rgba(56,189,248,.15); border:1px solid rgba(56,189,248,.35); font-size:12px }
@media (max-width: 720px) {
  .cartoon-panel { flex-direction:column; text-align:center }
  .cartoon-panel.reverse { flex-direction:column }
}

/* Trial offer panel (marketing) */
.trial-offer { display:flex; align-items:center; justify-content:space-between; gap:16px; margin: 16px 0 28px; padding: 16px; border-radius: var(--radius); border: 1.5px solid var(--border); background: linear-gradient(115deg, rgba(79,70,229,.16), rgba(34,211,238,.10)); box-shadow: var(--shadow) }
.trial-offer .trial-copy h3 { margin: 4px 0 6px; }
.trial-offer .trial-copy .muted { color: var(--muted); font-size: 13px }
.trial-offer .trial-actions { display:flex; gap:8px; flex-wrap:wrap }

/* Animated divider to replace the broken em dash */
.cartoon-divider { display:inline-flex; align-items:center; justify-content:center; width:46px; height:14px; margin:0 6px; position:relative; vertical-align:middle; pointer-events:none }
.cartoon-divider::before, .cartoon-divider::after { content:""; position:absolute }
.cartoon-divider::before { width:100%; height:3px; border-radius:999px; background:linear-gradient(90deg,#38bdf8,#818cf8,#f472b6,#34d399); top:50%; left:50%; transform:translate(-50%,-50%); animation: dividerPulse 2.4s ease-in-out infinite }
.cartoon-divider::after { width:9px; height:9px; border-radius:50%; background:#fbbf24; top:50%; left:50%; transform:translate(-50%,-60%); box-shadow:-16px 0 0 rgba(14,165,233,.8), 16px 0 0 rgba(245,158,11,.85); animation: dividerBounce 2.4s ease-in-out infinite }
.kpi-delta .cartoon-divider { width:28px; height:10px; margin:0 }
.kpi-delta .cartoon-divider::after { box-shadow:-12px 0 0 rgba(14,165,233,.8), 12px 0 0 rgba(245,158,11,.85) }
@keyframes dividerPulse { 0%,100% { transform:translate(-50%,-50%) scaleX(.8); opacity:.85 } 50% { transform:translate(-50%,-50%) scaleX(1.1); opacity:1 } }
@keyframes dividerBounce { 0%,100% { transform:translate(-50%,-60%) scale(.85) } 50% { transform:translate(-50%,-80%) scale(1.1) } }

/* Accessibility helper for hidden em dash text */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0 }



