/* ECGDataKit — Sphinx/Furo overrides
   Matches the Hugo production site: ecgdatakit.ummisco.fr
   ========================================================= */

:root {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-darker: #065f46;
  --primary-light: #ecfdf5;
  --primary-wash: #d1fae5;
  --accent: #8b5cf6;
  --accent-light: #f5f3ff;
  --text: #1e293b;
  --text-secondary: #2d3a4a;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-code-inline: #f1f5f9;
  --bg-code-block: #0f172a;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --header-height: 64px;
  --max-content: 900px;
  --max-container: 1400px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Links: no purple visited/hover ───────────────────── */
body {
  --color-link: var(--primary);
  --color-link--hover: var(--primary-dark);
  --color-link--visited: var(--primary);
  --color-link--visited--hover: var(--primary-dark);
}

/* ── Dark-mode variable overrides ─────────────────────── */
body[data-theme="dark"] {
  --primary: #6ee7b7;
  --primary-dark: #34d399;
  --primary-light: #0f2a1f;
  --primary-wash: #0f2a1f;
  --text: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  --bg: #131a25;
  --bg-alt: #1e293b;
  --bg-code-inline: #1e293b;
  --border: #334155;
  --border-light: #1e293b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.25);
  --shadow: 0 1px 3px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.3), 0 2px 4px -2px rgba(0,0,0,.2);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.3), 0 4px 6px -4px rgba(0,0,0,.2);
}

@media (prefers-color-scheme: dark) {
  body:not([data-theme="light"]) {
    --primary: #6ee7b7;
    --primary-dark: #34d399;
    --primary-light: #0f2a1f;
    --primary-wash: #0f2a1f;
    --text: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    --bg: #131a25;
    --bg-alt: #1e293b;
    --bg-code-inline: #1e293b;
    --border: #334155;
    --border-light: #1e293b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.25);
    --shadow: 0 1px 3px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.3), 0 2px 4px -2px rgba(0,0,0,.2);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.3), 0 4px 6px -4px rgba(0,0,0,.2);
  }
}

/* ── Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  font-weight: 450;
}

code, pre, .highlight {
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════════════════
   Top Navbar  (shared by landing + doc pages)
   ══════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: #1e293b;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-inner {
  width: 100%;
  max-width: var(--max-container);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.site-header .logo-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: #fff;
  border-radius: 8px;
  padding: 2px;
}

.site-header .logo-icon svg { width: 32px; height: 32px; }

.site-header .logo-text {
  font-size: 18px; letter-spacing: -.3px; font-weight: 700;
}

.logo-ecg { color: #fff; }
.logo-dk  { color: #34d399; }

.site-header .version-badge {
  background: rgba(255,255,255,.12);
  color: #94a3b8;
}

.version-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2px;
}

.site-header nav {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.site-header nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: color .15s var(--ease), background .15s var(--ease);
}

.site-header nav a:hover {
  color: #fff;
  background: rgba(255,255,255,8%);
}

.site-header nav a.active {
  color: #6ee7b7;
  background: rgba(255,255,255,8%);
  font-weight: 600;
}

/* UMMISCO logo */
.header-lab {
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: opacity .15s var(--ease);
}
.header-lab:hover { opacity: .8; }

.header-lab-logo {
  height: 44px; width: auto;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

/* GitHub icon */
.header-github {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  color: #94a3b8;
  transition: color .15s var(--ease), background .15s var(--ease);
  text-decoration: none;
}
.header-github:hover { color: #fff; background: rgba(255,255,255,8%); }
.header-github svg { width: 20px; height: 20px; }

.header-gitlab {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  color: #94a3b8;
  transition: color .15s var(--ease), background .15s var(--ease);
  text-decoration: none;
}
.header-gitlab:hover { color: #e24329; background: rgba(255,255,255,8%); }
.header-gitlab svg { width: 20px; height: 20px; }

/* Hamburger */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  margin-left: auto;
  transition: background .15s var(--ease);
}
.hamburger:hover { background: rgba(255,255,255,8%); }
.hamburger svg { width: 22px; height: 22px; color: #cbd5e1; }

/* ── Sidebar logo (for doc pages) ─────────────────────── */
.sidebar-brand { text-align: center; }
.sidebar-brand img,
.sidebar-logo {
  max-height: 100px; width: auto; margin: 0 auto; display: block;
}

/* ── Code block styling (doc pages) ───────────────────── */
.highlight {
  background: #1e293b !important;
  border-radius: var(--radius-lg);
  border: 1px solid #334155;
  margin: 0 0 28px;
  position: relative;
}

.highlight pre {
  background: transparent !important;
  color: #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 24px;
  font-size: 14px;
  line-height: 1.65;
  overflow-x: auto;
  border: none;
  margin: 0;
}

/* Pygments token overrides — dark palette for light mode */
.highlight .kn, .highlight .k, .highlight .kd, .highlight .kp,
.highlight .kr, .highlight .kt, .highlight .kc,
.highlight .ow { color: #c084fc; }
.highlight .nf, .highlight .nb, .highlight .nc,
.highlight .nd, .highlight .ni { color: #67e8f9; }
.highlight .nn { color: #67e8f9; }
.highlight .n, .highlight .na, .highlight .nv,
.highlight .bp, .highlight .nt { color: #e2e8f0; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sa,
.highlight .sb, .highlight .sc, .highlight .dl, .highlight .se,
.highlight .sh, .highlight .si, .highlight .sx { color: #86efac; }
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs,
.highlight .cp, .highlight .cpf, .highlight .ch { color: #64748b; }
.highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo,
.highlight .il, .highlight .mb { color: #fbbf24; }
.highlight .o, .highlight .p { color: #94a3b8; }
.highlight .w { color: #e2e8f0; }
.highlight .err { color: #f87171; background: transparent; border: none; }
.highlight .gp { color: #64748b; }             /* prompt */
.highlight .go { color: #94a3b8; }             /* output */
.highlight .gh, .highlight .gu { color: #67e8f9; font-weight: 600; }

/* Copy button (sphinx-copybutton) */
.highlight button.copybtn {
  color: #64748b;
  border: none;
  background: transparent;
}
.highlight button.copybtn:hover { color: #e2e8f0; }

/* Inline code */
code.literal {
  background: var(--bg-code-inline);
  color: #e11d48;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: .875em;
  font-weight: 450;
}

body[data-theme="dark"] code.literal {
  background: #1e293b;
  color: #fbbf24;
}

/* ── Table styling (doc pages) ────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0 0 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  table-layout: auto;
  word-break: break-word;
}

body[data-theme="dark"] table { border-color: #334155; }

th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

td code.literal, th code.literal {
  white-space: nowrap;
}

body[data-theme="dark"] th,
body[data-theme="dark"] td { border-bottom-color: #334155; }

th {
  font-weight: 600;
  color: var(--text);
  background: var(--bg-alt);
  font-size: 13px;
  white-space: nowrap;
}

body[data-theme="dark"] th { background: #1e293b; color: #94a3b8; }

tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--bg-alt); }
tr:hover td { background: var(--primary-light); }

body[data-theme="dark"] tr:hover td { background: #0f2a1f; }

td code, th code { font-size: .85em; }


/* ══════════════════════════════════════════════════════════
   Landing Page  (full takeover — no Furo chrome)
   ══════════════════════════════════════════════════════════ */

/* Hide ALL Furo UI on the landing page & fix body constraints */
.landing ~ * { display: none !important; }
.landing { background: var(--bg); color: var(--text); }

/* Override Furo's body height/overflow so the landing page scrolls */
body:has(.landing) {
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
  overflow: visible !important;
}
html:has(.landing) {
  overflow-y: auto !important;
  height: auto !important;
}

/* ── Hero ──────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  padding: 80px 32px 56px;
  text-align: center;
}

.hero-inner { max-width: 780px; margin: 0 auto; }

.hero-logo {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 8px;
}

.hero-logo-icon { width: 72px; height: 72px; flex-shrink: 0; }

.hero-inner h1 {
  font-size: 56px;
  letter-spacing: -1px;
  margin: 0;
  line-height: 1.1;
}

.hero-inner h1 .logo-ecg { color: #1b4f72; }
.hero-inner h1 .logo-dk  { color: #2e7d32; }

.hero-version {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--primary-light);
  color: var(--primary-dark);
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* Badges */
.hero-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
}

.badge-blue   { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.badge-green  { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.badge-purple { background: #faf5ff; color: #9333ea; border-color: #e9d5ff; }

/* CTA Buttons */
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s var(--ease);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(5,150,105,.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(5,150,105,.35);
  transform: translateY(-1px);
  color: #fff !important;
  text-decoration: none;
}
.btn-primary:visited { color: #fff !important; }

.btn-outline {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover {
  background: var(--bg-alt);
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

/* Install bar */
.hero-install {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg-code-block);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,6%);
}

.hero-install .prompt { color: var(--text-muted); user-select: none; }
.hero-install code { background: transparent; color: #e2e8f0; padding: 0; font-weight: 400; }

.copy-install {
  background: transparent; border: none; color: #64748b;
  cursor: pointer; padding: 4px; border-radius: 4px;
  display: flex; align-items: center;
  transition: color .15s var(--ease); flex-shrink: 0;
}
.copy-install:hover { color: #e2e8f0; }

/* ── Features ─────────────────────────────────────────── */
.features-section { padding: 0 32px 64px; }
.features-inner  { max-width: 1080px; margin: 0 auto; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: all .25s var(--ease);
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--border);
}

.feature-card-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}

.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.feature-icon svg { width: 24px; height: 24px; }

.feature-icon-blue   { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #2563eb; }
.feature-icon-green  { background: linear-gradient(135deg, #f0fdf4, #dcfce7); color: #16a34a; }
.feature-icon-purple { background: linear-gradient(135deg, #faf5ff, #f3e8ff); color: #9333ea; }

.feature-card h3 { margin: 0; font-size: 18px; color: var(--text); }
.feature-card p  { margin: 0; font-size: 15px; color: var(--text-secondary); line-height: 1.6; }

/* ── Sections (Quick Example, Formats, Installation) ──── */
.home-section { padding: 0 32px 64px; }
.home-inner   { max-width: 860px; margin: 0 auto; }

.section-heading {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.3px;
  margin: 0 0 24px;
  color: var(--text);
}

/* Code blocks in landing */
.landing pre {
  background: var(--bg-code-block);
  color: #e2e8f0;
  padding: 24px;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 28px;
  border: 1px solid rgba(255,255,255,6%);
}

.landing pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
  font-weight: 400;
}

.highlight { margin: 0 0 28px; position: relative; }
.highlight pre { margin: 0; }

/* ── Syntax highlighting (Chroma / landing) ───────────── */
.chroma .k, .chroma .kn, .chroma .kd, .chroma .kp, .chroma .kr, .chroma .kt, .chroma .kc { color: #c084fc; }
.chroma .nf { color: #67e8f9; }
.chroma .nb { color: #67e8f9; }
.chroma .s, .chroma .s1, .chroma .s2, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .dl, .chroma .se, .chroma .sh, .chroma .si, .chroma .sx { color: #86efac; }
.chroma .c, .chroma .c1, .chroma .cm, .chroma .cs, .chroma .cp, .chroma .cpf { color: #64748b; }
.chroma .mi, .chroma .mf, .chroma .mh, .chroma .mo, .chroma .il { color: #fbbf24; }
.chroma .o, .chroma .p { color: #94a3b8; }
.chroma .nn { color: #67e8f9; }
.chroma .nc { color: #fbbf24; }
.chroma .nd { color: #67e8f9; }
.chroma .err { color: inherit; background: transparent; border: none; }

/* Also apply to manual span classes in template */
.landing .k  { color: #c084fc; }
.landing .n  { color: #e2e8f0; }
.landing .nf { color: #67e8f9; }
.landing .nb { color: #67e8f9; }
.landing .nn { color: #67e8f9; }
.landing .s, .landing .s2, .landing .sa { color: #86efac; }
.landing .c, .landing .c1 { color: #64748b; }
.landing .m, .landing .mi { color: #fbbf24; }
.landing .o, .landing .p  { color: #94a3b8; }

/* ── Formats Grid ─────────────────────────────────────── */
.formats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.format-item {
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: all .15s var(--ease);
}
.format-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.format-item strong {
  display: block; font-size: 14px; color: var(--text); margin-bottom: 2px;
}
.format-item span {
  font-size: 13px; color: var(--text-muted);
}

/* ── Footer ───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 32px;
  display: flex;
  justify-content: center;
}

.footer-inner {
  width: 100%;
  max-width: var(--max-container);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.footer-inner a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s var(--ease);
}
.footer-inner a:hover { color: var(--primary); text-decoration: none; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .hamburger { display: flex; }
  .site-header nav { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-inner h1 { font-size: 40px; }
  .formats-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

@media (max-width: 640px) {
  .hero-section { padding: 48px 20px 40px; }
  .hero-inner h1 { font-size: 32px; }
  .hero-tagline { font-size: 17px; }
  .home-section, .features-section { padding-left: 20px; padding-right: 20px; }
  .header-inner { padding: 0 16px; }
}

/* ══════════════════════════════════════════════════════════
   Breadcrumbs
   ══════════════════════════════════════════════════════════ */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 20px;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s var(--ease);
}

.breadcrumbs a:hover {
  color: var(--primary);
  text-decoration: none;
}

.bc-sep {
  color: var(--border);
  font-size: 12px;
}

.bc-current {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   API Documentation — signature blocks & badges
   ══════════════════════════════════════════════════════════ */

/* Signature block */
.api-sig {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin: 20px 0 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.api-sig code {
  background: transparent;
  color: var(--text);
  padding: 0;
  font-size: inherit;
  font-weight: 500;
}

.api-sig-property {
  border-left-color: #2563eb;
}

.api-sig-static {
  border-left-color: #9333ea;
}

.sig-arrow {
  color: var(--text-muted);
  font-size: 14px;
}

/* Badge base */
.sig-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-family: var(--font);
  flex-shrink: 0;
}

.sig-badge-method {
  background: #dcfce7;
  color: #166534;
}

.sig-badge-property {
  background: #dbeafe;
  color: #1e40af;
}

.sig-badge-static {
  background: #f3e8ff;
  color: #6b21a8;
}

.sig-badge-func {
  background: #fef3c7;
  color: #92400e;
}

/* Dark mode */
body[data-theme="dark"] .api-sig {
  background: #1e293b;
  border-color: #334155;
}

body[data-theme="dark"] .api-sig-property {
  border-left-color: #60a5fa;
}

body[data-theme="dark"] .api-sig-static {
  border-left-color: #a78bfa;
}

body[data-theme="dark"] .sig-badge-method {
  background: #052e16;
  color: #86efac;
}

body[data-theme="dark"] .sig-badge-property {
  background: #172554;
  color: #93c5fd;
}

body[data-theme="dark"] .sig-badge-static {
  background: #2e1065;
  color: #c4b5fd;
}

body[data-theme="dark"] .sig-badge-func {
  background: #451a03;
  color: #fcd34d;
}

@media (prefers-color-scheme: dark) {
  body:not([data-theme="light"]) .api-sig {
    background: #1e293b;
    border-color: #334155;
  }

  body:not([data-theme="light"]) .api-sig-property {
    border-left-color: #60a5fa;
  }

  body:not([data-theme="light"]) .api-sig-static {
    border-left-color: #a78bfa;
  }

  body:not([data-theme="light"]) .sig-badge-method {
    background: #052e16;
    color: #86efac;
  }

  body:not([data-theme="light"]) .sig-badge-property {
    background: #172554;
    color: #93c5fd;
  }

  body:not([data-theme="light"]) .sig-badge-static {
    background: #2e1065;
    color: #c4b5fd;
  }

  body:not([data-theme="light"]) .sig-badge-func {
    background: #451a03;
    color: #fcd34d;
  }
}

/* ── Doc-page adjustments (non-landing) ───────────────── */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #1e293b;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-navbar-inner {
  width: 100%;
  max-width: var(--max-container);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.top-navbar-brand {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}

.top-navbar-logo-link {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: #fff; font-weight: 700; font-size: 18px;
}

.top-navbar-logo-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 8px; padding: 2px;
  width: 36px; height: 36px;
}

.top-navbar-logo { width: 32px; height: 32px; display: block; }

.top-navbar-title { font-size: 18px; letter-spacing: -.3px; font-weight: 700; }
.top-navbar-title-ecg { color: #fff; }
.top-navbar-title-dk  { color: #34d399; }

.top-navbar-version {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255,255,255,.12);
  color: #94a3b8;
  letter-spacing: .2px;
}

.top-navbar-links {
  margin-left: auto;
  display: flex; gap: 8px; align-items: center;
}

.top-navbar-links a {
  color: #cbd5e1; text-decoration: none;
  font-size: 14px; font-weight: 500;
  padding: 6px 14px; border-radius: 6px;
  transition: color .15s var(--ease), background .15s var(--ease);
}

.top-navbar-links a:hover { color: #fff; background: rgba(255,255,255,8%); }

.top-navbar-ummisco {
  display: flex !important; align-items: center; justify-content: center;
  text-decoration: none; transition: opacity .15s var(--ease);
}
.top-navbar-ummisco:hover { opacity: .8; }

.top-navbar-ummisco-logo {
  height: 44px; width: auto;
  border-radius: 8px; background: #fff; padding: 4px;
}

.top-navbar-github {
  display: flex !important; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  color: #94a3b8; transition: color .15s var(--ease), background .15s var(--ease);
}
.top-navbar-github:hover { color: #fff; background: rgba(255,255,255,8%); }
.top-navbar-github svg { width: 20px; height: 20px; }

.top-navbar-gitlab {
  display: flex !important; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  color: #94a3b8; transition: color .15s var(--ease), background .15s var(--ease);
}
.top-navbar-gitlab:hover { color: #e24329; background: rgba(255,255,255,8%); }
.top-navbar-gitlab svg { width: 20px; height: 20px; }

.top-navbar-toggle {
  display: none; background: none; border: none;
  cursor: pointer; padding: 8px; border-radius: 8px;
  margin-left: auto;
}
.top-navbar-toggle:hover { background: rgba(255,255,255,8%); }
.top-navbar-toggle svg { width: 22px; height: 22px; color: #cbd5e1; }

@media (max-width: 1024px) {
  .top-navbar-toggle { display: flex; }
  .top-navbar-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: #1e293b;
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    padding: 8px;
  }
  .top-navbar-links.show { display: flex; }
  .top-navbar-links a { padding: 10px 16px; width: 100%; }
}


/* ══════════════════════════════════════════════════════════
   Activity Dashboard
   ══════════════════════════════════════════════════════════ */

.activity-dashboard {
  margin-bottom: 32px;
}

/* Stats cards row */
.activity-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.activity-stat-card {
  flex: 1 1 120px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.activity-stat-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.activity-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.activity-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Contribution heatmap */
.activity-heatmap-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.activity-heatmap-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.activity-heatmap-scroll {
  overflow-x: auto;
}

/* SVG heatmap — light/dark visibility */
.activity-heatmap-svg {
  display: block;
}
.activity-heatmap-svg.dark {
  display: none;
}

body[data-theme="dark"] .activity-heatmap-svg.light {
  display: none;
}
body[data-theme="dark"] .activity-heatmap-svg.dark {
  display: block;
}

/* SVG text styles */
.activity-svg-month {
  fill: var(--text-muted);
  font-size: 11px;
  font-family: var(--font);
}

.activity-svg-day {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: var(--font);
}

body[data-theme="dark"] .activity-svg-month {
  fill: #94a3b8;
}

body[data-theme="dark"] .activity-svg-day {
  fill: #94a3b8;
}

/* Legend */
.activity-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.activity-heatmap-legend-cell {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

.activity-heatmap-legend-cell.level-0 { background: #ebedf0; }
.activity-heatmap-legend-cell.level-1 { background: #9be9a8; }
.activity-heatmap-legend-cell.level-2 { background: #40c463; }
.activity-heatmap-legend-cell.level-3 { background: #30a14e; }
.activity-heatmap-legend-cell.level-4 { background: #216e39; }

body[data-theme="dark"] .activity-heatmap-legend-cell.level-0 { background: #161b22; }
body[data-theme="dark"] .activity-heatmap-legend-cell.level-1 { background: #0e4429; }
body[data-theme="dark"] .activity-heatmap-legend-cell.level-2 { background: #006d32; }
body[data-theme="dark"] .activity-heatmap-legend-cell.level-3 { background: #26a641; }
body[data-theme="dark"] .activity-heatmap-legend-cell.level-4 { background: #39d353; }

/* Filter buttons */
.activity-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.activity-filters-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.activity-filter-btn {
  font-size: 13px;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.activity-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.activity-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Dark theme for dashboard ── */
body[data-theme="dark"] .activity-stat-card {
  background: #1e293b;
  border-color: #334155;
}

body[data-theme="dark"] .activity-stat-card:hover {
  border-color: var(--primary);
}

body[data-theme="dark"] .activity-heatmap-wrap {
  background: #1e293b;
  border-color: #334155;
}

body[data-theme="dark"] .activity-filter-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

body[data-theme="dark"] .activity-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

body[data-theme="dark"] .activity-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #0f172a;
}

/* ══════════════════════════════════════════════════════════
   Activity Timeline
   ══════════════════════════════════════════════════════════ */

.activity-timeline {
  position: relative;
  padding: 0;
  margin: 8px 0 32px;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.activity-year-group {
  position: relative;
  margin-bottom: 8px;
}

.activity-year-header {
  position: relative;
  padding: 12px 0 8px;
  z-index: 1;
}

.activity-year-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  margin-left: 4px;
  box-shadow: var(--shadow-sm);
}

/* Day sub-group */
.activity-day-group {
  position: relative;
  margin-bottom: 4px;
}

.activity-day-header {
  position: relative;
  padding: 8px 0 4px 40px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-day-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, var(--text));
  letter-spacing: 0.2px;
}

.activity-dot-day {
  width: 10px;
  height: 10px;
  background: var(--primary) !important;
  border: none !important;
}

/* Release marker */
.activity-release {
  position: relative;
  padding: 6px 0 6px 40px;
}

.activity-dot-release {
  width: 12px;
  height: 12px;
  background: #8b5cf6 !important;
  border: none !important;
  left: 10px;
  top: 14px;
}

.activity-release-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border: 1px solid #c4b5fd;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.activity-release-content:hover {
  border-color: #8b5cf6;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
  text-decoration: none;
}

.activity-release-icon {
  color: #8b5cf6;
  flex-shrink: 0;
}

.activity-release-name {
  font-weight: 700;
  color: #6d28d9;
}

.activity-release-date {
  color: #7c3aed;
  font-size: 12px;
  opacity: 0.8;
}

body[data-theme="dark"] .activity-release-content {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-color: #4c1d95;
}

body[data-theme="dark"] .activity-release-content:hover {
  border-color: #a78bfa;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

body[data-theme="dark"] .activity-hash:hover {
  background: var(--primary);
  color: #0f172a;
}

body[data-theme="dark"] .activity-release-icon { color: #a78bfa; }
body[data-theme="dark"] .activity-release-name { color: #c4b5fd; }
body[data-theme="dark"] .activity-release-date { color: #a78bfa; }

/* Scrollable commit list within a day */
.activity-day-commits {
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.activity-day-commits::-webkit-scrollbar {
  width: 5px;
}

.activity-day-commits::-webkit-scrollbar-track {
  background: transparent;
}

.activity-day-commits::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.activity-day-commits::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Individual commit entry */
.activity-entry {
  position: relative;
  padding: 4px 0 4px 40px;
  min-height: 28px;
}

/* Timeline dot */
.activity-dot {
  position: absolute;
  left: 11px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--primary);
  z-index: 1;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.activity-entry:hover .activity-dot {
  background: var(--primary);
  border-color: var(--primary);
}

/* Content card */
.activity-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.activity-entry:hover .activity-content {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

/* Commit message */
.activity-message {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
}

/* Meta line: hash + author + changes */
.activity-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.activity-hash {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  background: var(--bg-code-inline);
  color: var(--primary);
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.activity-hash:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

.activity-author {
  font-size: 12px;
  color: var(--text-muted);
}

.activity-author::before {
  content: 'by ';
}

.activity-changes {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Dark theme ── */
body[data-theme="dark"] .activity-year-badge {
  background: var(--primary);
  color: #0f172a;
}

body[data-theme="dark"] .activity-dot {
  background: #1e293b;
  border-color: var(--primary);
}

body[data-theme="dark"] .activity-entry:hover .activity-dot {
  background: var(--primary);
}

body[data-theme="dark"] .activity-content {
  background: #1e293b;
  border-color: #334155;
}

body[data-theme="dark"] .activity-entry:hover .activity-content {
  border-color: var(--primary);
}

body[data-theme="dark"] .activity-hash {
  background: #0f172a;
  color: var(--primary);
}

/* ── Auto dark mode (prefers-color-scheme) for activity page ── */
@media (prefers-color-scheme: dark) {
  /* SVG heatmap visibility */
  body:not([data-theme="light"]) .activity-heatmap-svg.light { display: none; }
  body:not([data-theme="light"]) .activity-heatmap-svg.dark { display: block; }

  /* SVG text */
  body:not([data-theme="light"]) .activity-svg-month { fill: #94a3b8; }
  body:not([data-theme="light"]) .activity-svg-day { fill: #94a3b8; }

  /* Legend cells */
  body:not([data-theme="light"]) .activity-heatmap-legend-cell.level-0 { background: #161b22; }
  body:not([data-theme="light"]) .activity-heatmap-legend-cell.level-1 { background: #0e4429; }
  body:not([data-theme="light"]) .activity-heatmap-legend-cell.level-2 { background: #006d32; }
  body:not([data-theme="light"]) .activity-heatmap-legend-cell.level-3 { background: #26a641; }
  body:not([data-theme="light"]) .activity-heatmap-legend-cell.level-4 { background: #39d353; }

  /* Dashboard cards */
  body:not([data-theme="light"]) .activity-stat-card { background: #1e293b; border-color: #334155; }
  body:not([data-theme="light"]) .activity-stat-card:hover { border-color: var(--primary); }
  body:not([data-theme="light"]) .activity-heatmap-wrap { background: #1e293b; border-color: #334155; }

  /* Filter buttons */
  body:not([data-theme="light"]) .activity-filter-btn { background: #1e293b; border-color: #334155; color: #94a3b8; }
  body:not([data-theme="light"]) .activity-filter-btn:hover { border-color: var(--primary); color: var(--primary); }
  body:not([data-theme="light"]) .activity-filter-btn.active { background: var(--primary); border-color: var(--primary); color: #0f172a; }

  /* Timeline */
  body:not([data-theme="light"]) .activity-year-badge { background: var(--primary); color: #0f172a; }
  body:not([data-theme="light"]) .activity-dot { background: #1e293b; border-color: var(--primary); }
  body:not([data-theme="light"]) .activity-entry:hover .activity-dot { background: var(--primary); }
  body:not([data-theme="light"]) .activity-content { background: #1e293b; border-color: #334155; }
  body:not([data-theme="light"]) .activity-entry:hover .activity-content { border-color: var(--primary); }
  body:not([data-theme="light"]) .activity-hash { background: #0f172a; color: var(--primary); }

  /* Release marker */
  body:not([data-theme="light"]) .activity-release-content { background: linear-gradient(135deg, #1e1b4b, #312e81); border-color: #4c1d95; }
  body:not([data-theme="light"]) .activity-release-content:hover { border-color: #a78bfa; box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3); }
  body:not([data-theme="light"]) .activity-release-icon { color: #a78bfa; }
  body:not([data-theme="light"]) .activity-release-name { color: #c4b5fd; }
  body:not([data-theme="light"]) .activity-release-date { color: #a78bfa; }
  body:not([data-theme="light"]) .activity-hash:hover { background: var(--primary); color: #0f172a; }

  /* Code & tables (non-activity, needed on this page too) */
  body:not([data-theme="light"]) code.literal { background: #1e293b; color: #fbbf24; }
  body:not([data-theme="light"]) table { border-color: #334155; }
  body:not([data-theme="light"]) th,
  body:not([data-theme="light"]) td { border-bottom-color: #334155; }
  body:not([data-theme="light"]) th { background: #1e293b; color: #94a3b8; }
  body:not([data-theme="light"]) tr:hover td { background: #0f2a1f; }
}

/* ══════════════════════════════════════════════════════════
   Admonitions — colored header bar style
   ══════════════════════════════════════════════════════════ */

.admonition {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: none;
  padding: 0;
  margin: 24px 0;
  font-size: 15px;
  line-height: 1.65;
  overflow: hidden;
}

.admonition-title {
  font-weight: 600;
  font-size: 13px;
  margin: 0;
  padding: 8px 20px 8px 42px !important;
  background: var(--bg-alt) !important;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.admonition-title::before {
  left: 16px !important;
  margin-right: 6px;
}

.admonition > :not(.admonition-title) {
  padding-left: 20px;
  padding-right: 20px;
}

.admonition > :nth-child(2) {
  margin-top: 14px;
}

.admonition > :last-child {
  margin-bottom: 14px;
}

/* Tip / hint — green (success) */
.admonition.tip,
.admonition.hint {
  border-color: #a7d7b0;
  background: #eef7f0;
}
.admonition.tip .admonition-title,
.admonition.hint .admonition-title {
  background: #cde9d3 !important;
  color: #1a5c2a;
  border-bottom-color: #a7d7b0;
}

/* Note / seealso — blue (info) */
.admonition.note,
.admonition.seealso {
  border-color: #a3c4e3;
  background: #edf4fb;
}
.admonition.note .admonition-title,
.admonition.seealso .admonition-title {
  background: #c7dbf0 !important;
  color: #1a4872;
  border-bottom-color: #a3c4e3;
}

/* Warning / caution — amber (warning) */
.admonition.warning,
.admonition.caution {
  border-color: #e0c57a;
  background: #fdf7e8;
}
.admonition.warning .admonition-title,
.admonition.caution .admonition-title {
  background: #f2e4af !important;
  color: #6e4e0e;
  border-bottom-color: #e0c57a;
}

/* Important / danger / error — red (danger) */
.admonition.important,
.admonition.danger,
.admonition.error {
  border-color: #dba3a3;
  background: #fbefef;
}
.admonition.important .admonition-title,
.admonition.danger .admonition-title,
.admonition.error .admonition-title {
  background: #f0c8c8 !important;
  color: #7a2020;
  border-bottom-color: #dba3a3;
}

/* ── Dark mode admonitions ── */
body[data-theme="dark"] .admonition {
  background: var(--bg);
  border-color: #334155;
}
body[data-theme="dark"] .admonition-title {
  background: var(--bg-alt) !important;
  border-bottom-color: #334155;
}

body[data-theme="dark"] .admonition.tip,
body[data-theme="dark"] .admonition.hint { border-color: #2a3a30; background: #141e18; }
body[data-theme="dark"] .admonition.tip .admonition-title,
body[data-theme="dark"] .admonition.hint .admonition-title {
  background: #1a2e20 !important; color: #8cc9a0; border-bottom-color: #2a3a30;
}

body[data-theme="dark"] .admonition.note,
body[data-theme="dark"] .admonition.seealso { border-color: #273548; background: #141c28; }
body[data-theme="dark"] .admonition.note .admonition-title,
body[data-theme="dark"] .admonition.seealso .admonition-title {
  background: #1a2840 !important; color: #8ab4d9; border-bottom-color: #273548;
}

body[data-theme="dark"] .admonition.warning,
body[data-theme="dark"] .admonition.caution { border-color: #3d3425; background: #1c1812; }
body[data-theme="dark"] .admonition.warning .admonition-title,
body[data-theme="dark"] .admonition.caution .admonition-title {
  background: #2e2618 !important; color: #d4b876; border-bottom-color: #3d3425;
}

body[data-theme="dark"] .admonition.important,
body[data-theme="dark"] .admonition.danger,
body[data-theme="dark"] .admonition.error { border-color: #3d2828; background: #1c1414; }
body[data-theme="dark"] .admonition.important .admonition-title,
body[data-theme="dark"] .admonition.danger .admonition-title,
body[data-theme="dark"] .admonition.error .admonition-title {
  background: #2e1a1a !important; color: #d09090; border-bottom-color: #3d2828;
}

@media (prefers-color-scheme: dark) {
  body:not([data-theme="light"]) .admonition { background: var(--bg); border-color: #334155; }
  body:not([data-theme="light"]) .admonition-title { background: var(--bg-alt) !important; border-bottom-color: #334155; }

  body:not([data-theme="light"]) .admonition.tip,
  body:not([data-theme="light"]) .admonition.hint { border-color: #2a3a30; background: #141e18; }
  body:not([data-theme="light"]) .admonition.tip .admonition-title,
  body:not([data-theme="light"]) .admonition.hint .admonition-title { background: #1a2e20 !important; color: #8cc9a0; border-bottom-color: #2a3a30; }

  body:not([data-theme="light"]) .admonition.note,
  body:not([data-theme="light"]) .admonition.seealso { border-color: #273548; background: #141c28; }
  body:not([data-theme="light"]) .admonition.note .admonition-title,
  body:not([data-theme="light"]) .admonition.seealso .admonition-title { background: #1a2840 !important; color: #8ab4d9; border-bottom-color: #273548; }

  body:not([data-theme="light"]) .admonition.warning,
  body:not([data-theme="light"]) .admonition.caution { border-color: #3d3425; background: #1c1812; }
  body:not([data-theme="light"]) .admonition.warning .admonition-title,
  body:not([data-theme="light"]) .admonition.caution .admonition-title { background: #2e2618 !important; color: #d4b876; border-bottom-color: #3d3425; }

  body:not([data-theme="light"]) .admonition.important,
  body:not([data-theme="light"]) .admonition.danger,
  body:not([data-theme="light"]) .admonition.error { border-color: #3d2828; background: #1c1414; }
  body:not([data-theme="light"]) .admonition.important .admonition-title,
  body:not([data-theme="light"]) .admonition.danger .admonition-title,
  body:not([data-theme="light"]) .admonition.error .admonition-title { background: #2e1a1a !important; color: #d09090; border-bottom-color: #3d2828; }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .activity-stats { gap: 8px; }
  .activity-stat-card { padding: 12px 14px; flex: 1 1 80px; }
  .activity-stat-value { font-size: 18px; }
  .activity-heatmap-wrap { padding: 14px; }
  .activity-filters { gap: 6px; }
  .activity-filter-btn { padding: 4px 10px; font-size: 12px; }
  .activity-timeline::before { left: 11px; }
  .activity-day-header { padding-left: 32px; }
  .activity-release { padding-left: 32px; }
  .activity-entry { padding-left: 32px; }
  .activity-dot { left: 6px; }
  .activity-content { padding: 8px 10px; }
  .activity-meta { flex-direction: column; align-items: flex-start; gap: 2px; }
}
