/* =========================================================
   Aurora Landing — styles.css
   Dark aurora theme · gradients · glassmorphism · responsive
   ========================================================= */

:root {
  --bg-0: #05060d;
  --bg-1: #090b18;
  --ink: #eaf0ff;
  --muted: rgba(234, 240, 255, 0.66);
  --faint: rgba(234, 240, 255, 0.42);

  --mint: #7cf7d1;
  --sky: #7c9df7;
  --violet: #c77cf7;
  --pink: #f77cc8;

  --grad-aurora: linear-gradient(120deg, #7cf7d1 0%, #7c9df7 45%, #c77cf7 100%);

  --glass-bg: rgba(255, 255, 255, 0.045);
  --glass-bg-strong: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-strong: rgba(255, 255, 255, 0.16);

  --shadow-lg: 0 30px 60px -30px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 0 0 1px rgba(124, 247, 209, 0.14), 0 20px 50px -20px rgba(124, 157, 247, 0.4);

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body.aurora-body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg-0);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; }

p { margin: 0; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  color: #d7e3ff;
}

.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;
}

::selection { background: rgba(124, 157, 247, 0.4); color: #fff; }

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Aurora animated background ---------- */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 15% -10%, rgba(124, 157, 247, 0.15), transparent 60%),
    radial-gradient(900px 700px at 100% 10%, rgba(199, 124, 247, 0.14), transparent 65%),
    radial-gradient(1000px 800px at 50% 110%, rgba(124, 247, 209, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 55%, #070913 100%);
}

.aurora-blob {
  position: absolute;
  display: block;
  filter: blur(90px);
  opacity: 0.6;
  border-radius: 50%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  animation: drift 22s ease-in-out infinite alternate;
}

.blob-1 {
  width: 55vmin; height: 55vmin;
  top: -12vmin; left: -10vmin;
  background: radial-gradient(circle at 30% 30%, rgba(124, 247, 209, 0.85), rgba(124, 247, 209, 0) 70%);
  animation-duration: 26s;
}
.blob-2 {
  width: 60vmin; height: 60vmin;
  top: -8vmin; right: -12vmin;
  background: radial-gradient(circle at 60% 40%, rgba(124, 157, 247, 0.85), rgba(124, 157, 247, 0) 72%);
  animation-duration: 30s;
  animation-delay: -6s;
}
.blob-3 {
  width: 65vmin; height: 65vmin;
  bottom: -20vmin; left: 15%;
  background: radial-gradient(circle at 40% 60%, rgba(199, 124, 247, 0.8), rgba(199, 124, 247, 0) 70%);
  animation-duration: 34s;
  animation-delay: -12s;
}
.blob-4 {
  width: 45vmin; height: 45vmin;
  bottom: -12vmin; right: 5%;
  background: radial-gradient(circle at 50% 50%, rgba(247, 124, 200, 0.7), rgba(247, 124, 200, 0) 70%);
  animation-duration: 28s;
  animation-delay: -18s;
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(6vmin, 4vmin, 0) scale(1.08); }
  100% { transform: translate3d(-4vmin, -3vmin, 0) scale(1.02); }
}

.aurora-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
  opacity: 0.6;
}

.aurora-noise {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Typography utilities ---------- */
.grad-text {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(234, 240, 255, 0.55);
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  color: rgba(234, 240, 255, 0.85);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(124, 247, 209, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.7; }
}

/* ---------- Buttons ---------- */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  border: 1px solid transparent;
}

.btn-primary {
  color: #06111a;
  background: var(--grad-aurora);
  box-shadow: 0 12px 30px -12px rgba(124, 247, 209, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}
.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 18px 40px -12px rgba(124, 157, 247, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.btn-ghost {
  color: rgba(234, 240, 255, 0.92);
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  transform: translateY(-1.5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--glass-border-strong);
}

/* ---------- Nav ---------- */
#site-header {
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
}
#site-header.scrolled {
  background: rgba(5, 6, 13, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
}
.logo-mark svg { width: 22px; height: 22px; }

.nav-link {
  position: relative;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--grad-aurora);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after { transform: scaleX(1); }

/* Mobile menu + bars */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  background: rgba(5, 6, 13, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--glass-border);
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-menu.open { max-height: 420px; }
.mobile-link {
  display: block;
  padding: 0.75rem 0.25rem;
  color: rgba(234, 240, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.mobile-link:hover { color: #fff; }

#nav-toggle .bar {
  position: absolute;
  left: 50%;
  width: 18px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}
#nav-toggle .bar-1 { top: 13px; }
#nav-toggle .bar-2 { top: 19px; }
#nav-toggle .bar-3 { top: 25px; }
#nav-toggle[aria-expanded="true"] .bar-1 { top: 19px; transform: translateX(-50%) rotate(45deg); }
#nav-toggle[aria-expanded="true"] .bar-2 { opacity: 0; }
#nav-toggle[aria-expanded="true"] .bar-3 { top: 19px; transform: translateX(-50%) rotate(-45deg); }

/* Small inline dots in hero */
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.dot-mint { background: var(--mint); box-shadow: 0 0 0 3px rgba(124, 247, 209, 0.15); }
.dot-sky { background: var(--sky); box-shadow: 0 0 0 3px rgba(124, 157, 247, 0.15); }
.dot-violet { background: var(--violet); box-shadow: 0 0 0 3px rgba(199, 124, 247, 0.15); }

/* ---------- Feature / showcase / pricing / faq cards ---------- */
.feature-card, .showcase-card, .price-card, .faq-item {
  position: relative;
  padding: 1.6rem 1.6rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}
.feature-card:hover, .showcase-card:hover, .price-card:hover {
  transform: translateY(-3px);
  border-color: var(--glass-border-strong);
  background: var(--glass-bg-strong);
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(124, 157, 247, 0.12);
  border: 1px solid rgba(124, 157, 247, 0.25);
  color: var(--mint);
  font-size: 1.1rem;
}
.feature-title { margin-top: 1rem; font-size: 1.05rem; font-weight: 600; color: #fff; }
.feature-copy { margin-top: 0.5rem; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

.showcase-card { min-height: 220px; overflow: hidden; }
.showcase-glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 260px; height: 260px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  transition: opacity 0.4s ease, transform 0.6s ease;
}
.showcase-card:hover .showcase-glow { opacity: 0.85; transform: scale(1.08); }
.glow-a { background: radial-gradient(circle, rgba(124, 247, 209, 0.65), transparent 70%); }
.glow-b { background: radial-gradient(circle, rgba(124, 157, 247, 0.65), transparent 70%); }
.glow-c { background: radial-gradient(circle, rgba(199, 124, 247, 0.65), transparent 70%); }
.showcase-title { position: relative; font-size: 1.15rem; font-weight: 600; color: #fff; }
.showcase-copy { position: relative; margin-top: 0.6rem; color: var(--muted); font-size: 0.9rem; line-height: 1.65; }

.price-card { display: flex; flex-direction: column; gap: 0.6rem; }
.price-card-featured {
  border-color: rgba(124, 247, 209, 0.35);
  background: linear-gradient(180deg, rgba(124, 247, 209, 0.06), rgba(124, 157, 247, 0.05));
  box-shadow: var(--shadow-glow);
}
.price-badge {
  align-self: flex-start;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #06111a;
  background: var(--grad-aurora);
}
.price-tier { font-size: 0.95rem; font-weight: 600; color: rgba(234, 240, 255, 0.75); margin: 0; }
.price-amount { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: #fff; line-height: 1; }
.price-per { font-size: 0.95rem; color: var(--muted); font-weight: 500; }
.price-copy { color: var(--muted); font-size: 0.9rem; }
.price-list { list-style: none; padding: 0; margin: 0.4rem 0 1rem; display: flex; flex-direction: column; gap: 0.45rem; }
.price-list li { position: relative; padding-left: 1.4rem; color: rgba(234, 240, 255, 0.82); font-size: 0.9rem; }
.price-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--mint); font-size: 0.85rem;
}

.faq-item { padding: 0; }
.faq-item summary {
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  font-weight: 600;
  color: #fff;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--mint);
  transition: transform 0.3s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 1.4rem 1.3rem; color: var(--muted); font-size: 0.92rem; line-height: 1.7; }

/* ---------- CTA card ---------- */
.cta-card {
  position: relative;
  border-radius: 28px;
  padding: 3rem 1.5rem;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(124, 157, 247, 0.22), transparent 70%),
    radial-gradient(600px 300px at 100% 100%, rgba(199, 124, 247, 0.18), transparent 70%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }

/* ---------- To top ---------- */
.to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
  z-index: 60;
}
.to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { background: rgba(255, 255, 255, 0.12); }

/* =========================================================
   MARKET CHARTS
   ========================================================= */

.chart-card {
  position: relative;
  padding: 1.4rem 1.4rem 1.2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  transition: border-color 0.4s ease, background 0.4s ease, transform 0.4s ease;
}
.chart-card:hover {
  border-color: var(--glass-border-strong);
  background: var(--glass-bg-strong);
}

.chart-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.chart-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.005em;
}
.chart-card-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.chart-card-meta {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: rgba(234, 240, 255, 0.75);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
}
.chart-card-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.chart-stage {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.chart-stage-tall { height: 340px; }
.chart-stage-wide { height: 320px; }
.chart-stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Empty / loading state overlay */
.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(5, 6, 13, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: var(--radius-md);
  text-align: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.chart-empty[hidden] { display: none; }
.chart-empty[data-state="hidden"] { opacity: 0; visibility: hidden; pointer-events: none; }
.chart-empty-inner { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.chart-empty-title { font-weight: 600; color: #fff; font-size: 0.95rem; margin: 0; }
.chart-empty-sub { color: var(--faint); font-size: 0.8rem; margin: 0; }
.chart-empty[data-state="error"] .chart-empty-title { color: #ffb4c7; }

.spinner {
  display: inline-block;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--mint);
  border-right-color: var(--sky);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Status chip */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(234, 240, 255, 0.85);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 3px rgba(124, 157, 247, 0.18);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.status-chip[data-state="live"] .status-dot {
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(124, 247, 209, 0.22);
  animation: pulse 2s ease-in-out infinite;
}
.status-chip[data-state="fallback"] { border-color: rgba(247, 124, 200, 0.35); }
.status-chip[data-state="fallback"] .status-dot {
  background: var(--pink);
  box-shadow: 0 0 0 3px rgba(247, 124, 200, 0.22);
}
.status-chip[data-state="error"] { border-color: rgba(255, 120, 140, 0.4); }
.status-chip[data-state="error"] .status-dot { background: #ff7a90; box-shadow: 0 0 0 3px rgba(255, 122, 144, 0.22); }

/* Segmented control */
.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
}
.segmented button {
  border: 0;
  background: transparent;
  color: rgba(234, 240, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease;
}
.segmented button:hover { color: #fff; }
.segmented button.is-active {
  color: #06111a;
  background: var(--grad-aurora);
}

/* Dark select */
.select-dark {
  appearance: none;
  -webkit-appearance: none;
  max-width: 240px;
  padding: 0.45rem 2rem 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: rgba(234, 240, 255, 0.9);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'><path d='M6 8l4 4 4-4' stroke='%23aab4d4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 16px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.select-dark:hover { border-color: var(--glass-border-strong); }
.select-dark option { background: #0b0e1c; color: #eaf0ff; }

/* Legend */
.chart-legend {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-top: 0.9rem;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.legend-item { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend-swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.swatch-a { background: linear-gradient(120deg, var(--mint), var(--sky)); }
.swatch-b { background: linear-gradient(120deg, var(--violet), var(--pink)); }
.legend-source { margin-left: auto; color: var(--faint); font-size: 0.72rem; }

/* Notice panel */
.mk-notice {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(234, 240, 255, 0.82);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
}
.mk-notice[data-state="error"] {
  border-color: rgba(255, 122, 144, 0.35);
  background: rgba(255, 122, 144, 0.08);
  color: #ffc6d1;
}
.mk-notice[data-state="warn"] {
  border-color: rgba(247, 124, 200, 0.28);
  background: rgba(247, 124, 200, 0.07);
  color: #f8cfec;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 640px) {
  .chart-card { padding: 1.1rem 1rem 1rem; }
  .chart-stage { height: 240px; }
  .chart-stage-tall { height: 280px; }
  .chart-stage-wide { height: 260px; }
  .chart-card-actions { width: 100%; }
  .select-dark { flex: 1; max-width: 100%; }
  .legend-source { margin-left: 0; width: 100%; }
  .to-top { right: 14px; bottom: 14px; }
}

@media (min-width: 1280px) {
  .chart-stage { height: 300px; }
  .chart-stage-tall { height: 360px; }
  .chart-stage-wide { height: 340px; }
}
