/* ═══════════════════════════════════════════════════════
   BitLens App — Premium dark-first design system
   ═══════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --color-primary-bg: #06060a;
  --color-secondary-bg: #0c0c14;
  --color-card-bg: rgba(255, 255, 255, 0.03);
  --color-surface: rgba(255, 255, 255, 0.05);
  --color-surface-2: rgba(255, 255, 255, 0.07);
  --color-text: #f0f0f5;
  --color-muted: #a0a0b8;
  --color-dim: #8585a0;
  --color-accent: #d6a056;
  --color-accent-rgb: 214, 160, 86;
  --color-bear: #ef4444;
  --color-base: #3b82f6;
  --color-bull: #10b981;
  --color-custom: #f59e0b;
  --border: rgba(255, 255, 255, 0.07);
  --panel: var(--color-card-bg);
  --brand: var(--color-accent);
  --muted: var(--color-muted);
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 26px rgba(var(--color-accent-rgb), 0.08);
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);
  /* Shadow scale */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.35);
  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  /* Type scale */
  --text-xs: 0.75rem;     /* 12px — captions, badges, timestamps */
  --text-sm: 0.8125rem;   /* 13px — small labels, secondary text */
  --text-base: 0.875rem;  /* 14px — default body text */
  --text-md: 1rem;         /* 16px — body emphasis, paragraphs */
  --text-lg: 1.125rem;    /* 18px — card titles, subheadings */
  --text-xl: 1.25rem;     /* 20px — section headings */
  --text-2xl: 1.5rem;     /* 24px — module section titles */
  --text-3xl: 2rem;       /* 32px — hero/display titles */
  /* Breakpoints (reference — use raw values in @media, CSS vars don't work there)
     --bp-sm: 480px    — small mobile
     --bp-md: 640px    — mobile/tablet boundary
     --bp-lg: 900px    — tablet/desktop boundary
     --bp-xl: 1200px   — large desktop
  */
  /* Transition timing */
  --ease-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  /* Z-index scale */
  --z-base: 1;
  --z-elevated: 10;
  --z-sticky: 100;
  --z-overlay: 1000;
  /* Focus ring */
  --focus-ring: 0 0 0 2px rgba(var(--color-accent-rgb), 0.36);
  /* Accent variants */
  --color-accent-light: #e4b97c;
  --color-bear-rgb: 239, 68, 68;
  --color-bull-rgb: 16, 185, 129;
  --color-base-rgb: 59, 130, 246;
  --color-custom-rgb: 245, 158, 11;
  /* Semantic colors */
  --color-success: #10b981;
  --color-success-rgb: 16, 185, 129;
  --color-warning: #f59e0b;
  --color-warning-rgb: 245, 158, 11;
  --color-danger: #ef4444;
  --color-danger-rgb: 239, 68, 68;
  --color-info: #3b82f6;
  --color-info-rgb: 59, 130, 246;
}

:root[data-theme="light"] {
  --color-primary-bg: #ffffff;
  --color-secondary-bg: #f5f5f7;
  --color-card-bg: rgba(255, 255, 255, 0.85);
  --color-surface: rgba(255, 255, 255, 0.92);
  --color-surface-2: rgba(255, 255, 255, 1);
  --color-text: #111119;
  --color-muted: #555570;
  --color-dim: #636378;
  --border: rgba(0, 0, 0, 0.08);
  --panel: var(--color-card-bg);
  --brand: var(--color-accent);
  --muted: var(--color-muted);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 30px rgba(var(--color-accent-rgb), 0.08);
  --glass: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.08);
  /* Semantic colors (light) */
  --color-success: #059669;
  --color-success-rgb: 5, 150, 105;
  --color-warning: #d97706;
  --color-warning-rgb: 217, 119, 6;
  --color-danger: #dc2626;
  --color-danger-rgb: 220, 38, 38;
  --color-info: #2563eb;
  --color-info-rgb: 37, 99, 235;
}

/* Light-mode subtab pill borders */
[data-theme="light"] .tab-button {
  border-color: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .tab-button:hover {
  border-color: rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .oc-nav-btn {
  border-color: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .oc-nav-btn:hover {
  border-color: rgba(0, 0, 0, 0.3);
}

/* Light-mode card shadows for depth and hierarchy */
[data-theme="light"] .home-stat,
[data-theme="light"] .section-hero,
[data-theme="light"] .module-hero,
[data-theme="light"] .pok-proof-card,
[data-theme="light"] .pok-track-card,
[data-theme="light"] .bl-accordion {
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .home-stat:hover,
[data-theme="light"] .pok-track-card:hover {
  box-shadow: var(--shadow-md);
}

/* ── Reset ── */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--color-primary-bg);
  color: var(--color-text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body {
  animation: pageEnter 0.3s ease-out;
}

@keyframes pageEnter {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Global Focus Indicators ── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.tab-button:focus-visible,
.section-button:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}

/* ── Skip Link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: var(--z-overlay);
  padding: var(--space-sm) var(--space-md);
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-base);
  transition: top var(--ease-fast);
}
.skip-link:focus {
  top: 16px;
  outline: none;
}
#main-content:focus {
  outline: none;
}

/* ── Animated Background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(var(--color-accent-rgb), 0.035) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 100%, rgba(var(--color-base-rgb), 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 35% at 5% 85%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.008) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.008) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(199, 133, 10, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 100%, rgba(199, 133, 10, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 35% at 5% 85%, rgba(224, 160, 48, 0.035) 0%, transparent 50%);
}
[data-theme="light"] body::after {
  background-image:
    linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
}

/* ── App Container ── */
.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* ── Header ── */
.header { margin-bottom: 0; text-align: center; }
.header-content {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 0 28px;
  position: relative;
}
.branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--color-accent);
}
.header-title {
  font-weight: 800;
  font-size: var(--text-2xl);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header-slogan {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-dim);
}
.header-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

/* ── Tab Navigation ── */
/* Command Center app banner */
.tab-nav {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 auto;
  padding: 4px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-x: visible;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
[data-theme="light"] .tab-nav {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
.tab-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-muted);
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-sm);
  white-space: nowrap;
  transition: all 0.25s;
}
.tab-button:hover {
  color: var(--color-text);
  background: var(--color-surface);
  border-color: rgba(255, 255, 255, 0.3);
}
.tab-button.active {
  background: rgba(var(--color-accent-rgb), 0.16);
  color: var(--color-text);
  border-color: rgba(var(--color-accent-rgb), 0.38);
  box-shadow: 0 2px 10px rgba(var(--color-accent-rgb), 0.16);
}

/* ── Section Buttons (top-level nav) ── */
.section-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-muted);
  padding: 10px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  font-size: var(--text-base);
  white-space: nowrap;
  transition: all 0.25s;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.section-button .icon {
  width: 18px;
  height: 18px;
}
.section-button:hover {
  color: var(--color-text);
  background: var(--color-surface);
}
.section-button.active {
  background: rgba(var(--color-accent-rgb), 0.18);
  color: var(--color-text);
  border-color: rgba(var(--color-accent-rgb), 0.36);
  box-shadow: 0 2px 10px rgba(var(--color-accent-rgb), 0.16);
}

[data-theme="light"] .tab-button.active,
[data-theme="light"] .section-button.active {
  background: linear-gradient(135deg, var(--color-accent), #e8850f);
  color: #000;
  border-color: var(--color-accent);
  box-shadow: 0 2px 12px rgba(var(--color-accent-rgb), 0.3);
}

/* ── Section Hero Banners ── */
.section-hero {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: visible;
  margin-top: 16px;
  padding: 32px 24px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.section-hero.active { display: flex; }

/* Subtle radial glow behind each hero */
.section-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
}
.section-hero[data-section="learn"] .section-hero-bg {
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(var(--color-accent-rgb), 0.10) 0%, transparent 70%);
}
.section-hero[data-section="research"] .section-hero-bg {
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(139, 92, 246, 0.10) 0%, transparent 70%);
}
.section-hero[data-section="tools"] .section-hero-bg {
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(var(--color-base-rgb), 0.10) 0%, transparent 70%);
}
.section-hero[data-section="data"] .section-hero-bg {
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(var(--color-bull-rgb), 0.10) 0%, transparent 70%);
}

.section-hero-content {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.section-hero-icon {
  font-size: var(--text-3xl);
  line-height: 1;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--color-surface-2);
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.section-hero-icon .icon-section {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.section-hero[data-section="learn"] .section-hero-icon {
  color: var(--color-accent);
  border-color: rgba(var(--color-accent-rgb), 0.2);
  background: rgba(var(--color-accent-rgb), 0.08);
}
.section-hero[data-section="research"] .section-hero-icon {
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.08);
}
.section-hero[data-section="tools"] .section-hero-icon {
  color: #3b82f6;
  border-color: rgba(var(--color-base-rgb), 0.2);
  background: rgba(var(--color-base-rgb), 0.08);
}
.section-hero[data-section="data"] .section-hero-icon {
  color: #10b981;
  border-color: rgba(var(--color-bull-rgb), 0.2);
  background: rgba(var(--color-bull-rgb), 0.08);
}

.section-hero-text { text-align: left; }
.section-hero-title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.section-hero-desc {
  margin: 4px 0 0;
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.4;
}

/* Sub-tab pills inside hero */
.section-hero-nav {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 0;
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Subtab category groups */
.subtab-group + .subtab-group {
  margin-top: 0.6rem;
}
.subtab-group-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(var(--color-accent-rgb), 0.6);
  margin-bottom: 0.35rem;
  text-align: center;
  font-weight: 600;
  user-select: none;
  pointer-events: none;
}
.subtab-group-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
/* Section-specific label colors */
.section-hero[data-section="research"] .subtab-group-label { color: rgba(139, 92, 246, 0.6); }
.section-hero[data-section="tools"] .subtab-group-label { color: rgba(var(--color-base-rgb), 0.6); }
.section-hero[data-section="data"] .subtab-group-label { color: rgba(var(--color-bull-rgb), 0.6); }

/* Mobile: compact wrapping pills so all are visible without scrolling */

.hidden { display: none; }


/* ── Theme, Glossary, Donate, Tour & Currency Buttons ── */
.theme-toggle,
.glossary-toggle,
.donate-toggle,
.tour-help-btn,
.currency-toggle-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text);
  font-size: var(--text-md);
  line-height: 1;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.theme-toggle:hover,
.glossary-toggle:hover,
.donate-toggle:hover,
.tour-help-btn:hover,
.currency-toggle-btn:hover {
  background: rgba(var(--color-accent-rgb), 0.08);
  border-color: rgba(var(--color-accent-rgb), 0.15);
}
.donate-toggle {
  font-weight: 700;
  color: var(--color-accent);
}
.tour-help-btn {
  border-style: dashed;
  width: 28px;
  height: 28px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-dim);
}

/* ── Theme Menu Dropdown ── */
.theme-menu-dropdown {
  position: fixed;
  top: 48px;
  right: 8px;
  z-index: 10000;
  min-width: 180px;
  max-width: calc(100vw - 16px);
  background: var(--color-primary-bg, var(--bg, #06060a));
  border: 1px solid var(--color-surface, var(--border, rgba(255,255,255,0.07)));
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ── Language Toggle ── */
.lang-toggle-wrap {
  position: relative;
}
.lang-toggle {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text);
  font-size: var(--text-md);
  line-height: 1;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.lang-toggle:hover {
  background: rgba(var(--color-accent-rgb), 0.08);
  border-color: rgba(var(--color-accent-rgb), 0.15);
}
.lang-toggle .icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}
.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  overflow: hidden;
  z-index: 100;
  min-width: 130px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.lang-dropdown.hidden {
  display: none;
}
.lang-option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: var(--text-base);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.lang-option:hover {
  background: rgba(var(--color-accent-rgb), 0.08);
}
.lang-option.active {
  color: var(--color-accent);
  font-weight: 600;
}

.header-branding {
  color: var(--color-accent);
  font-weight: 600;
  font-size: var(--text-sm);
  height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(var(--color-accent-rgb), 0.2);
  border-radius: var(--radius);
  padding: 0 12px;
  background: rgba(var(--color-accent-rgb), 0.05);
  text-decoration: none;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.header-branding:hover {
  background: rgba(var(--color-accent-rgb), 0.12);
  text-decoration: none;
}

/* ── Section Titles ── */
.section-subtitle {
  margin: 28px 0 8px;
  font-size: var(--text-md);
  color: var(--color-muted);
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.02em;
}
.section-title-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 0;
}
.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin: 20px 0 12px;
  letter-spacing: -0.02em;
}

/* ═══════════════════════════════════
   CALCULATOR — Layout
   ═══════════════════════════════════ */
#calculator-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#calculator-view.hidden { display: none; }

/* Hero styling handled by .module-hero */

.calc-chip {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 5px 14px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
  backdrop-filter: blur(4px);
}

/* ── Calculator Section Headers ── */
.calc-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.calc-section-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -0.01em;
}

/* ═══════════════════════════════════
   PRICE CARD — Compact inline card
   ═══════════════════════════════════ */
.price-card {
  background: var(--color-card-bg);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: 28px 20px 18px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.price-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.price-title {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.price-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
}
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--color-accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.price-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 16px;
  position: relative;
  z-index: 1;
}
.price-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--border);
  transition: all 0.25s;
}
.price-item.active {
  background: var(--color-surface-2);
  border-color: rgba(var(--color-accent-rgb), 0.15);
}
.price-label {
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.price-value {
  font-feature-settings: "tnum" 1;
  min-height: 22px;
}
.price-hero {
  font-size: clamp(2.2rem, 5.5vw, 2.75rem);
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 50%, var(--color-text) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  background-size: 200% auto;
  animation: gradientShift 6s ease-in-out infinite;
}
.price-change {
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}
.price-change.positive {
  background: rgba(var(--color-bull-rgb), 0.15);
  color: #059669;
}
.price-change.negative {
  background: rgba(var(--color-bear-rgb), 0.15);
  color: #dc2626;
}
.price-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.loading-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--color-accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.last-updated,
.price-note {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* ═══════════════════════════════
   SCENARIO CARDS
   ═══════════════════════════════ */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.scenario-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.scenario-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: inherit;
}
.scenario-card.bear::before { background: radial-gradient(circle at 50% 0%, rgba(239,68,68,0.08) 0%, transparent 70%); }
.scenario-card.base::before { background: radial-gradient(circle at 50% 0%, rgba(59,130,246,0.08) 0%, transparent 70%); }
.scenario-card.bull::before { background: radial-gradient(circle at 50% 0%, rgba(16,185,129,0.08) 0%, transparent 70%); }
.scenario-card.custom::before { background: radial-gradient(circle at 50% 0%, rgba(245,158,11,0.08) 0%, transparent 70%); }
.scenario-card:hover {
  transform: translateY(-3px);
  background: var(--color-surface-2);
  box-shadow: var(--shadow);
}
.scenario-card:hover::before { opacity: 1; }
.scenario-card.active {
  box-shadow: 0 0 0 2px currentColor, 0 4px 20px rgba(0,0,0,0.12);
}
.scenario-card.active::before { opacity: 1; }
.scenario-card.bear { color: var(--color-bear); }
.scenario-card.base { color: var(--color-base); }
.scenario-card.bull { color: var(--color-bull); }
.scenario-card.custom { color: var(--color-custom); }
.scenario-icon {
  font-size: var(--text-3xl);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  display: inline-block;
}
.scenario-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.scenario-title { font-weight: 700; font-size: var(--text-md); }
.scenario-rate {
  font-weight: 700;
  font-size: var(--text-xs);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
}
.scenario-description {
  color: var(--color-muted);
  font-size: var(--text-sm);
  position: relative;
  z-index: 1;
  line-height: 1.4;
}
.scenario-slider {
  width: 100%;
  margin-top: 10px;
  accent-color: currentColor;
  position: relative;
  z-index: 1;
}
.reset-button {
  margin-top: 12px;
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--color-accent);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.25s;
  backdrop-filter: blur(8px);
}
.reset-button:hover {
  background: rgba(var(--color-accent-rgb), 0.06);
  border-color: rgba(var(--color-accent-rgb), 0.15);
}

/* ═══════════════════════════════
   INPUT CARDS
   ═══════════════════════════════ */
.input-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.input-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s;
}
.input-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.12);
}
.input-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.input-card-title {
  font-size: var(--text-base);
  font-weight: 700;
  margin: 0;
}
.input-card-icon { font-size: var(--text-xl); }
.premium-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--color-text);
  font-size: var(--text-md);
  font-weight: 500;
  outline: none;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}
.premium-input::placeholder { color: var(--color-dim); }
[data-theme="light"] .premium-input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .premium-input::placeholder { color: #999; }
.premium-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.15), var(--shadow-glow);
}
.input-wrapper { position: relative; }
.input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-xs);
  color: var(--color-dim);
  pointer-events: none;
  font-weight: 600;
}
.input-help {
  margin-top: 8px;
  color: var(--color-dim);
  font-size: var(--text-xs);
}

/* ── Toggle Switch ── */
.premium-toggle {
  display: inline-flex;
  align-items: center;
}
.premium-toggle input { display: none; }
.toggle-slider {
  width: 40px;
  height: 22px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.1);
  position: relative;
  transition: all 0.25s;
  display: inline-block;
  border: 1px solid var(--glass-border);
}
.toggle-slider::after {
  content: "";
  width: 16px;
  height: 16px;
  position: absolute;
  top: 2px;
  left: 3px;
  border-radius: 9999px;
  background: #fff;
  transition: all 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.premium-toggle input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--color-accent), #e8850f);
  border-color: transparent;
}
.premium-toggle input:checked + .toggle-slider::after {
  left: 20px;
}
.dca-inputs {
  opacity: 0.5;
  transition: opacity 0.25s;
}
.dca-inputs.enabled { opacity: 1; }
#dca-frequency { margin-top: 8px; }

/* ═══════════════════════════════
   SUMMARY CARDS
   ═══════════════════════════════ */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.summary-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.summary-card:hover::before { opacity: 1; }
.summary-card.final {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  background: rgba(var(--color-accent-rgb), 0.04);
}
.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.summary-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}
.summary-icon { font-size: var(--text-lg); }
.summary-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}
.summary-return {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-top: 6px;
}
.summary-return.positive { color: #34d399; }
.summary-return.negative { color: #f87171; }

/* ═══════════════════════════════
   CHART
   ═══════════════════════════════ */
.chart-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.chart-title {
  font-size: var(--text-md);
  font-weight: 700;
  margin: 0;
}
.chart-container {
  position: relative;
  height: 420px;
}
.chart-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-weight: 500;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  display: inline-block;
}
.chart-note {
  margin-top: 10px;
  font-size: var(--text-xs);
  color: var(--color-dim);
}
.export-buttons {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}
.btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--color-text);
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-sm);
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.btn:hover {
  background: rgba(var(--color-accent-rgb), 0.08);
  border-color: rgba(var(--color-accent-rgb), 0.2);
  color: var(--color-accent);
}

/* ═══════════════════════════════
   SATS CONVERTER
   ═══════════════════════════════ */
/* Hero styling handled by .module-hero */

.converter-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}
.converter-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 16px;
  animation: fadeInScale 0.5s ease-out both;
}
.converter-field {
  margin-bottom: 20px;
}
.converter-field:last-child { margin-bottom: 0; }
.converter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.converter-label-icon {
  font-size: var(--text-md);
}
.converter-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.15);
  color: var(--color-text);
  font-size: var(--text-xl);
  font-weight: 700;
  font-feature-settings: "tnum" 1;
  outline: none;
  transition: all 0.2s;
}
[data-theme="light"] .converter-input {
  background: rgba(0, 0, 0, 0.03);
}
.converter-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.15), 0 0 20px rgba(var(--color-accent-rgb), 0.06);
}
.converter-input::placeholder {
  color: var(--color-dim);
  font-weight: 400;
}
.converter-info {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.converter-stat {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  animation: fadeInScale 0.4s ease-out both;
}
.converter-stat:nth-child(1) { animation-delay: 0.1s; }
.converter-stat:nth-child(2) { animation-delay: 0.15s; }
.converter-stat:nth-child(3) { animation-delay: 0.2s; }
.converter-stat:nth-child(4) { animation-delay: 0.25s; }
.converter-stat-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.converter-stat-value {
  font-size: var(--text-lg);
  font-weight: 700;
  font-feature-settings: "tnum" 1;
  color: var(--color-accent);
}

/* ═══════════════════════════════
   FEAR & GREED INDEX
   ═══════════════════════════════ */
.fng-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
}
.fng-title {
  font-size: var(--text-base);
  font-weight: 700;
  margin: 0 0 8px;
}
.fng-explainer {
  margin: 0 auto 14px;
  max-width: 32ch;
  font-size: var(--text-xs);
  line-height: 1.45;
  color: var(--color-muted);
}
.fng-gauge {
  position: relative;
  width: 160px;
  height: 80px;
  margin: 0 auto 12px;
}
.fng-gauge-bg {
  width: 160px;
  height: 80px;
  border-radius: 80px 80px 0 0;
  background: conic-gradient(
    from 180deg at 50% 100%,
    #ef4444 0deg,
    #f59e0b 60deg,
    #eab308 90deg,
    #22c55e 150deg,
    #10b981 180deg
  );
  overflow: hidden;
  position: relative;
}
.fng-gauge-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 55px;
  border-radius: 55px 55px 0 0;
  background: var(--color-primary-bg);
}
[data-theme="light"] .fng-gauge-bg::after {
  background: var(--color-primary-bg);
}
.fng-needle {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 3px;
  height: 60px;
  background: var(--color-text);
  border-radius: var(--radius-xs);
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(-90deg);
  transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fng-value {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin: 4px 0;
  font-feature-settings: "tnum" 1;
}
.fng-label {
  font-size: var(--text-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  display: inline-block;
}
.fng-label.extreme-fear { background: rgba(239,68,68,0.15); color: #ef4444; }
.fng-label.fear { background: rgba(245,158,11,0.15); color: #f59e0b; }
.fng-label.neutral { background: rgba(234,179,8,0.15); color: #eab308; }
.fng-label.greed { background: rgba(34,197,94,0.15); color: #22c55e; }
.fng-label.extreme-greed { background: rgba(16,185,129,0.15); color: #10b981; }
.fng-updated {
  margin-top: 8px;
  font-size: var(--text-xs);
  color: var(--color-dim);
}
.fng-chart-link {
  display: inline-block;
  margin-top: 10px;
  font-size: var(--text-xs);
  color: #f59e0b;
  text-decoration: none;
  cursor: pointer;
}
.fng-chart-link:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════
   FOOTER
   ═══════════════════════════════ */
/* ── Dashboard Banner ── */
.dashboard-banner {
  background: rgba(var(--color-accent-rgb), 0.08);
  border: 1px solid rgba(var(--color-accent-rgb), 0.15);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dashboard-banner-text {
  color: rgba(var(--color-accent-rgb), 0.8);
  font-size: 11px;
}
.dashboard-banner-cta {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
}
.home-pwa-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--color-secondary);
  background: rgba(var(--color-accent-rgb), 0.06);
  border: 1px solid rgba(var(--color-accent-rgb), 0.15);
  border-radius: 10px;
  margin-bottom: 12px;
}
.home-pwa-hint-close {
  background: none;
  border: none;
  color: var(--color-secondary);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  flex-shrink: 0;
}

/* ── Learn Footer ── */
.learn-footer {
  text-align: center;
  color: var(--color-dim);
  font-size: var(--text-sm);
  padding: 24px 16px;
  margin: 16px 0 0;
  border-top: 1px solid var(--color-border);
}
.learn-footer a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

.footer { margin: 30px 0 8px; }
.footer-content {
  color: var(--color-dim);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-brand {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

/* ═══════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-sm);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  color: var(--color-text);
  font-size: var(--text-base);
  max-width: 340px;
  cursor: pointer;
  animation: fadeInUp 0.3s ease;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast--error   { border-left: 3px solid var(--color-bear); }
.toast--success { border-left: 3px solid var(--color-bull); }
.toast--warning { border-left: 3px solid var(--color-custom); }
.toast--info    { border-left: 3px solid var(--color-base); }
@media (max-width: 640px) {
  #toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
  .toast { max-width: 100%; }
}

/* ═══════════════════════════════
   STATE COMPONENTS (loading, error, empty)
   ═══════════════════════════════ */
.state-container {
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}
.state-icon {
  font-size: var(--text-3xl);
  opacity: 0.5;
}
.state-message {
  color: var(--color-muted);
  font-size: var(--text-base);
  max-width: 320px;
}
.state-retry {
  margin-top: var(--space-sm);
  padding: var(--space-sm) 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--color-text);
  cursor: pointer;
  font-size: var(--text-base);
  font-family: inherit;
  transition: all var(--ease-fast);
}
.state-retry:hover {
  background: rgba(var(--color-accent-rgb), 0.08);
  border-color: var(--color-accent);
}

/* ═══════════════════════════════
   BREADCRUMB NAVIGATION
   ═══════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-sm) 0;
  font-size: var(--text-sm);
  color: var(--color-dim);
  min-height: 0;
}
.breadcrumb:empty {
  display: none;
}
.breadcrumb-item {
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--ease-fast);
}
.breadcrumb-item:hover {
  color: var(--color-accent);
}
.breadcrumb-current {
  color: var(--color-text);
  font-weight: 500;
}
.breadcrumb-sep {
  opacity: 0.4;
  font-size: var(--text-xs);
}

/* ═══════════════════════════════
   TOOLTIP SYSTEM
   ═══════════════════════════════ */
.inline-tip {
  display: inline-flex;
  align-items: center;
  position: relative;
}
.tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-muted);
  cursor: help;
  transition: all 0.2s;
}
.tip-icon:hover {
  background: rgba(var(--color-accent-rgb), 0.1);
  color: var(--color-accent);
}
[data-theme="light"] .tip-icon {
  background: #f0f0f2;
  color: #555;
}
/* Tooltip popup — shared styles for hover, focus, and touch */
.inline-tip:focus-within::after,
.inline-tip.active::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 125%;
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 12px;
  border-radius: var(--radius);
  white-space: pre-line;
  min-width: 220px;
  max-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  font-size: var(--text-xs);
  color: #e0e0e0;
  z-index: var(--z-sticky);
  backdrop-filter: blur(12px);
}
/* Hover tooltip only on pointer devices */
@media (hover: hover) {
  .inline-tip:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 125%;
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 12px;
    border-radius: var(--radius);
    white-space: pre-line;
    min-width: 220px;
    max-width: 280px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    font-size: var(--text-xs);
    color: #e0e0e0;
    z-index: var(--z-sticky);
    backdrop-filter: blur(12px);
  }
}

/* ═══════════════════════════════
   ANIMATIONS & DYNAMIC EFFECTS
   ═══════════════════════════════ */
.value-update {
  animation: bump 0.5s ease;
}
@keyframes bump {
  0% { transform: scale(0.97); opacity: 0.8; }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes subtleGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(var(--color-accent-rgb), 0.05); }
  50% { box-shadow: 0 0 40px rgba(var(--color-accent-rgb), 0.12); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes borderGlow {
  0%, 100% { border-color: rgba(var(--color-accent-rgb), 0.08); }
  50% { border-color: rgba(var(--color-accent-rgb), 0.2); }
}
@keyframes iconFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.05); }
}
@keyframes chipSlide {
  from { opacity: 0; transform: translateY(8px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes chevronNudge {
  0%, 100% { transform: rotate(0deg); }
  40% { transform: rotate(30deg); }
  60% { transform: rotate(0deg); }
  80% { transform: rotate(20deg); }
}
@keyframes hintFadeIn {
  from { opacity: 0; transform: translateX(6px); }
  to   { opacity: 1; transform: translateX(0); }
}

.price-section { animation: fadeInUp 0.5s ease-out 0.05s both; }
.scenario-section { animation: fadeInUp 0.5s ease-out 0.1s both; }
.input-section { animation: fadeInUp 0.5s ease-out 0.15s both; }
.summary-section { animation: fadeInUp 0.5s ease-out 0.2s both; }
.breakdown-section { animation: fadeInUp 0.5s ease-out 0.25s both; }
.chart-section { animation: fadeInUp 0.5s ease-out 0.3s both; }

/* Scenario card stagger */
.scenario-card:nth-child(1) { animation: fadeInScale 0.4s ease-out 0.12s both; }
.scenario-card:nth-child(2) { animation: fadeInScale 0.4s ease-out 0.17s both; }
.scenario-card:nth-child(3) { animation: fadeInScale 0.4s ease-out 0.22s both; }
.scenario-card:nth-child(4) { animation: fadeInScale 0.4s ease-out 0.27s both; }

/* Summary card stagger */
.summary-card:nth-child(1) { animation: fadeInScale 0.4s ease-out 0.22s both; }
.summary-card:nth-child(2) { animation: fadeInScale 0.4s ease-out 0.27s both; }
.summary-card:nth-child(3) { animation: fadeInScale 0.4s ease-out 0.32s both; }
.summary-card:nth-child(4) { animation: fadeInScale 0.4s ease-out 0.37s both; }

/* ── Global Card Hover Glow ── */
.card,
.sc-step-card,
.ng-step-card,
.mg-step-card,
.ln-step-card,
.ln-card,
.ln-point,
.ln-mini-card,
.ng-card,
.ng-point,
.mg-card,
.mg-point,
.mg-mini-card,
.bb-card,
.bb-method-card,
.bb-faq-card,
.sc-checklist-card,
.sc-faq-card,
.sc-software-card,
.sc-advanced-card,
.fq-category,
.gl-term-card,
.converter-card,
.converter-stat,
.fng-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover,
.ln-card:hover,
.ng-card:hover,
.mg-card:hover,
.bb-card:hover,
.bb-method-card:hover,
.bb-faq-card:hover,
.sc-checklist-card:hover,
.sc-faq-card:hover,
.sc-software-card:hover,
.sc-advanced-card:hover,
.fq-category:hover,
.fng-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.15);
  box-shadow: var(--shadow), 0 0 30px rgba(var(--color-accent-rgb), 0.06);
}

/* ═══════════════════════════════════════════════════════════
   STANDARDIZED MODULE HERO — matches DCA Backtest reference
   ═══════════════════════════════════════════════════════════ */
.module-hero {
  text-align: center;
  margin-bottom: 48px;
  padding: 48px 16px 28px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out both;
}
.module-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(247,147,26,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: subtleGlow 5s ease-in-out infinite;
}
.module-hero-icon {
  font-size: 5rem; /* Decorative icon — intentionally outside type scale */
  animation: iconFloat 4s ease-in-out infinite;
  display: inline-block;
  margin: 0 0 8px;
  color: var(--brand);
  position: relative;
}
.module-hero-title {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 800;
  margin: 0 0 10px;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 50%, var(--color-text) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  background-size: 200% auto;
  animation: gradientShift 6s ease-in-out infinite;
}
.module-hero-sub {
  margin: 0 0 24px;
  color: var(--color-text);
  opacity: 0.72;
  font-size: var(--text-md);
  max-width: 540px;
  margin-inline: auto;
  line-height: 1.6;
}
.module-hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

/* ── Chip Entrance Animations ── */
.calc-chip {
  animation: chipSlide 0.4s ease-out both;
}
.calc-chip:nth-child(1) { animation-delay: 0.1s; }
.calc-chip:nth-child(2) { animation-delay: 0.2s; }
.calc-chip:nth-child(3) { animation-delay: 0.3s; }
.calc-chip:nth-child(4) { animation-delay: 0.4s; }
.calc-chip:nth-child(5) { animation-delay: 0.5s; }

/* ── Step Card Staggered Entrance ── */
.sc-step-card,
.ng-step-card,
.mg-step-card,
.ln-step-card {
  animation: fadeInUp 0.5s ease-out both;
}
.sc-step-card:nth-child(1), .ng-step-card:nth-child(1), .mg-step-card:nth-child(1), .ln-step-card:nth-child(1) { animation-delay: 0.05s; }
.sc-step-card:nth-child(2), .ng-step-card:nth-child(2), .mg-step-card:nth-child(2), .ln-step-card:nth-child(2) { animation-delay: 0.1s; }
.sc-step-card:nth-child(3), .ng-step-card:nth-child(3), .mg-step-card:nth-child(3), .ln-step-card:nth-child(3) { animation-delay: 0.15s; }
.sc-step-card:nth-child(4), .ng-step-card:nth-child(4), .mg-step-card:nth-child(4), .ln-step-card:nth-child(4) { animation-delay: 0.2s; }
.sc-step-card:nth-child(5), .ng-step-card:nth-child(5), .mg-step-card:nth-child(5), .ln-step-card:nth-child(5) { animation-delay: 0.25s; }
.sc-step-card:nth-child(6), .ng-step-card:nth-child(6), .mg-step-card:nth-child(6) { animation-delay: 0.3s; }

/* ── Step Number Pulse on Hover ── */
.sc-step-number,
.ng-step-number,
.mg-step-number,
.ln-step-number {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sc-step-card:hover .sc-step-number,
.ng-step-card:hover .ng-step-number,
.mg-step-card:hover .mg-step-number,
.ln-step-card:hover .ln-step-number {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(var(--color-accent-rgb), 0.35);
}

/* ── Grid Card Stagger ── */
.ng-point,
.mg-point,
.mg-mini-card,
.ln-point,
.ln-mini-card {
  animation: fadeInScale 0.4s ease-out both;
}
.ng-grid > :nth-child(1), .mg-grid > :nth-child(1), .ln-grid > :nth-child(1) { animation-delay: 0.05s; }
.ng-grid > :nth-child(2), .mg-grid > :nth-child(2), .ln-grid > :nth-child(2) { animation-delay: 0.1s; }
.ng-grid > :nth-child(3), .mg-grid > :nth-child(3), .ln-grid > :nth-child(3) { animation-delay: 0.15s; }
.ng-grid > :nth-child(4), .mg-grid > :nth-child(4), .ln-grid > :nth-child(4) { animation-delay: 0.2s; }
.ng-grid > :nth-child(5), .mg-grid > :nth-child(5), .ln-grid > :nth-child(5) { animation-delay: 0.25s; }
.ng-grid > :nth-child(6), .mg-grid > :nth-child(6), .ln-grid > :nth-child(6) { animation-delay: 0.3s; }

/* ── FAQ Accordion Hover ── */
.ng-faq,
.mg-faq,
.ln-faq,
.sc-faq-item,
.fq-item {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.ng-faq:hover,
.mg-faq:hover,
.ln-faq:hover,
.sc-faq-item:hover,
.fq-item:hover {
  border-color: rgba(var(--color-accent-rgb), 0.15);
  transform: translateX(3px);
}

/* ── Clickable Indicator: chevron nudge on first appearance ── */
.ng-faq:not([open]) summary::before,
.mg-faq:not([open]) summary::before,
.ln-faq:not([open]) summary::before,
.sc-faq-item:not([open]) summary::before,
.fq-item:not([open]) summary::before {
  animation: chevronNudge 1.2s ease-in-out 0.8s 2;
}
/* ── Clickable Indicator: "Click to expand" hint on first item ── */
.expand-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-accent);
  opacity: 0.85;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(var(--color-accent-rgb), 0.08);
  margin-left: auto;
  float: right;
  white-space: nowrap;
  animation: hintFadeIn 0.4s ease-out 1.2s both;
  transition: opacity 0.3s;
  pointer-events: none;
}
/* Inside flex containers (Why Bitcoin), don't float */
.wb-acc-right .expand-hint {
  float: none;
  margin-left: 0;
}
.expand-hint-icon {
  font-size: var(--text-sm);
  display: inline-block;
  animation: chevronNudge 1.5s ease-in-out 1.6s 3;
}
/* Hide hint once the item has been opened */
[open] .expand-hint,
.hint-dismissed .expand-hint {
  opacity: 0;
}
/* ── Clickable Indicator: left accent bar on hover ── */
.ng-faq:hover,
.mg-faq:hover,
.ln-faq:hover,
.sc-faq-item:hover,
.fq-item:hover {
  border-left: 2px solid var(--color-accent);
}

/* ── Shared FAQ/Accordion Sub-Selectors ── */
.ng-faq summary,
.mg-faq summary,
.ln-faq summary,
.sc-faq-item summary,
.bb-faq-item summary,
.fq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-base);
  list-style: none;
}
.ng-faq summary::-webkit-details-marker,
.mg-faq summary::-webkit-details-marker,
.ln-faq summary::-webkit-details-marker,
.sc-faq-item summary::-webkit-details-marker,
.bb-faq-item summary::-webkit-details-marker,
.fq-item summary::-webkit-details-marker { display: none; }

.ng-faq summary::before,
.mg-faq summary::before,
.ln-faq summary::before,
.sc-faq-item summary::before,
.bb-faq-item summary::before,
.fq-item summary::before {
  content: '\203A';
  display: inline-block;
  margin-right: 10px;
  font-size: var(--text-xl);
  font-weight: 300;
  transition: transform 0.2s;
  color: var(--color-accent);
}
.ng-faq[open] summary::before,
.mg-faq[open] summary::before,
.ln-faq[open] summary::before,
.sc-faq-item[open] summary::before,
.bb-faq-item[open] summary::before,
.fq-item[open] summary::before {
  transform: rotate(90deg);
}
.ng-faq summary:hover,
.mg-faq summary:hover,
.ln-faq summary:hover,
.sc-faq-item summary:hover,
.bb-faq-item summary:hover,
.fq-item summary:hover {
  color: var(--color-accent);
}
.ng-faq p,
.mg-faq p,
.ln-faq p,
.sc-faq-item p,
.bb-faq-item p {
  margin: 8px 0 0;
  color: var(--color-muted);
  font-size: var(--text-base);
  line-height: 1.6;
}

/* ── Shared Table Sub-Selectors ── */
.sc-table-wrap,
.ng-table-wrap,
.mg-table-wrap,
.hbw-table-wrap,
.wim-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin: 16px 0;
}
.sc-table,
.ng-table,
.mg-table,
.hbw-table,
.wim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
  line-height: 1.5;
}
.sc-table th,
.ng-table thead th,
.mg-table th,
.hbw-table th,
.wim-table th {
  background: var(--color-card-bg);
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--glass-border);
  white-space: nowrap;
  color: var(--color-muted);
}
.sc-table td,
.ng-table td,
.mg-table td,
.hbw-table td,
.wim-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--color-text);
}
.sc-table tbody tr:hover,
.ng-table tbody tr:hover,
.mg-table tbody tr:hover,
.hbw-table tbody tr:hover,
.wim-table tbody tr:hover {
  background: rgba(var(--color-accent-rgb), 0.04);
}

/* Why Bitcoin accordion: chevron nudge */
.wb-module:not(.open) .wb-chevron {
  animation: chevronNudge 1.2s ease-in-out 0.8s 2;
}
.wb-module:hover .wb-acc {
  border-left: 2px solid var(--color-accent);
  margin-left: -1px;
}

/* ── Hero Section Entrance — now handled by .module-hero ── */

/* ── Glossary Term Stagger ── */
.gl-term-card {
  animation: fadeInUp 0.3s ease-out both;
}
.gl-letter-group .gl-term-card:nth-child(1) { animation-delay: 0.02s; }
.gl-letter-group .gl-term-card:nth-child(2) { animation-delay: 0.04s; }
.gl-letter-group .gl-term-card:nth-child(3) { animation-delay: 0.06s; }
.gl-letter-group .gl-term-card:nth-child(4) { animation-delay: 0.08s; }
.gl-letter-group .gl-term-card:nth-child(5) { animation-delay: 0.1s; }

/* ── FAQ Category Stagger ── */
.fq-category {
  animation: fadeInUp 0.5s ease-out both;
}
.fq-categories > .fq-category:nth-child(1) { animation-delay: 0.05s; }
.fq-categories > .fq-category:nth-child(2) { animation-delay: 0.1s; }
.fq-categories > .fq-category:nth-child(3) { animation-delay: 0.15s; }
.fq-categories > .fq-category:nth-child(4) { animation-delay: 0.2s; }
.fq-categories > .fq-category:nth-child(5) { animation-delay: 0.25s; }

/* ── Module Accordion Stagger ── */
.wb-module {
  animation: fadeInUp 0.4s ease-out both;
}
.wb-modules-grid > .wb-module:nth-child(1) { animation-delay: 0.05s; }
.wb-modules-grid > .wb-module:nth-child(2) { animation-delay: 0.1s; }
.wb-modules-grid > .wb-module:nth-child(3) { animation-delay: 0.15s; }
.wb-modules-grid > .wb-module:nth-child(4) { animation-delay: 0.2s; }
.wb-modules-grid > .wb-module:nth-child(5) { animation-delay: 0.25s; }
.wb-modules-grid > .wb-module:nth-child(6) { animation-delay: 0.3s; }
.wb-modules-grid > .wb-module:nth-child(7) { animation-delay: 0.35s; }
.wb-modules-grid > .wb-module:nth-child(8) { animation-delay: 0.4s; }
.wb-modules-grid > .wb-module:nth-child(9) { animation-delay: 0.45s; }
.wb-modules-grid > .wb-module:nth-child(10) { animation-delay: 0.5s; }
.wb-modules-grid > .wb-module:nth-child(11) { animation-delay: 0.55s; }
.wb-modules-grid > .wb-module:nth-child(12) { animation-delay: 0.6s; }
.wb-modules-grid > .wb-module:nth-child(13) { animation-delay: 0.65s; }
.wb-modules-grid > .wb-module:nth-child(14) { animation-delay: 0.7s; }
.wb-modules-grid > .wb-module:nth-child(15) { animation-delay: 0.75s; }
.wb-modules-grid > .wb-module:nth-child(16) { animation-delay: 0.8s; }

/* ── Converter Fields Stagger ── */
.converter-field {
  animation: fadeInUp 0.4s ease-out both;
}
.converter-field:nth-child(1) { animation-delay: 0.05s; }
.converter-field:nth-child(2) { animation-delay: 0.1s; }
.converter-field:nth-child(3) { animation-delay: 0.15s; }
.converter-field:nth-child(4) { animation-delay: 0.2s; }

/* ── On-chain Card Stagger ── */
.onchain-grid > * {
  animation: fadeInScale 0.5s ease-out both;
}
.onchain-grid > :nth-child(1) { animation-delay: 0.05s; }
.onchain-grid > :nth-child(2) { animation-delay: 0.1s; }
.onchain-grid > :nth-child(3) { animation-delay: 0.15s; }
.onchain-grid > :nth-child(4) { animation-delay: 0.2s; }
.onchain-grid > :nth-child(5) { animation-delay: 0.25s; }
.onchain-grid > :nth-child(6) { animation-delay: 0.3s; }
.onchain-grid > :nth-child(7) { animation-delay: 0.35s; }

/* ── Button Micro-interactions ── */
.wb-btn {
  position: relative;
  overflow: hidden;
}
.wb-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}
.wb-btn:hover::after {
  transform: translateX(100%);
}
.wb-btn.primary:active {
  transform: translateY(0) scale(0.97);
}
.wb-btn.secondary:active {
  transform: scale(0.97);
}

/* ── Search Input Focus Glow ── */
.gl-search:focus,
.fq-search:focus,
.wb-search:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.12), 0 0 20px rgba(var(--color-accent-rgb), 0.06);
}

/* ── Progress Bar Shimmer ── */
.wb-progress-fill,
.sc-progress .progress-bar div,
.bar > span {
  position: relative;
  overflow: hidden;
}
.wb-progress-fill::after,
.sc-progress .progress-bar div::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

/* ── Callout Entrance ── */
.callout {
  animation: slideInLeft 0.4s ease-out both;
}

/* ── Letter Nav Button Active ── */
.gl-letter-btn {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.gl-letter-btn:active {
  transform: scale(0.92);
}

/* ═══════════════════════════════════════════════════════════
   DESIGN SYSTEM — Shared Components & Utilities
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════
   SHARED COMPONENTS — bl-* prefix
   Used by buildAccordion(), buildCallout(), buildTable(), buildStat()
   from app/js/utils/dom.js
   ═══════════════════════════════════════════════════════ */

/* ── Accordion ── */
.bl-accordion {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  transition: border-color var(--ease-normal);
}
.bl-accordion:hover {
  border-color: rgba(var(--color-accent-rgb), 0.15);
}
.bl-accordion summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-base);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bl-accordion summary::-webkit-details-marker { display: none; }
.bl-accordion summary::before {
  content: '\203A';
  display: inline-block;
  font-size: var(--text-xl);
  font-weight: 300;
  transition: transform 0.2s;
  color: var(--color-accent);
  flex-shrink: 0;
  width: 12px;
  text-align: center;
}
.bl-accordion[open] summary::before {
  transform: rotate(90deg);
}
.bl-accordion summary:hover {
  color: var(--color-accent);
}
.bl-accordion p {
  margin: 8px 0 0;
  color: var(--color-muted);
  font-size: var(--text-base);
  line-height: 1.6;
}

/* ── Callout/Alert ── */
.bl-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin: 14px 0;
  font-size: var(--text-base);
  line-height: 1.55;
}
.bl-callout-icon {
  font-size: var(--text-lg);
  flex-shrink: 0;
  line-height: 1;
}
.bl-callout-text {
  margin: 0;
  font-weight: 500;
  color: var(--color-text);
}
.bl-callout--info {
  background: rgba(var(--color-info-rgb), 0.08);
  border: 1px solid rgba(var(--color-info-rgb), 0.2);
}
.bl-callout--info .bl-callout-icon::before { content: '\2139\FE0F'; }
.bl-callout--success {
  background: rgba(var(--color-success-rgb), 0.08);
  border: 1px solid rgba(var(--color-success-rgb), 0.2);
}
.bl-callout--success .bl-callout-icon::before { content: '\2705'; }
.bl-callout--warning {
  background: rgba(var(--color-warning-rgb), 0.08);
  border: 1px solid rgba(var(--color-warning-rgb), 0.2);
}
.bl-callout--warning .bl-callout-icon::before { content: '\26A0\FE0F'; }
.bl-callout--danger {
  background: rgba(var(--color-danger-rgb), 0.08);
  border: 2px solid rgba(var(--color-danger-rgb), 0.3);
}
.bl-callout--danger .bl-callout-icon::before { content: '\26D4'; }

[data-theme="light"] .bl-callout--info { background: rgba(var(--color-info-rgb), 0.06); }
[data-theme="light"] .bl-callout--success { background: rgba(var(--color-success-rgb), 0.06); }
[data-theme="light"] .bl-callout--warning { background: rgba(var(--color-warning-rgb), 0.06); }
[data-theme="light"] .bl-callout--danger { background: rgba(var(--color-danger-rgb), 0.06); }

/* ── Data Table ── */
.bl-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin: 16px 0;
}
.bl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
  line-height: 1.5;
}
.bl-table thead th {
  position: sticky;
  top: 0;
  background: var(--color-card-bg);
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--glass-border);
  color: var(--color-muted);
}
.bl-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--color-text);
}
.bl-table--striped tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}
[data-theme="light"] .bl-table--striped tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}
.bl-table tbody tr:hover {
  background: rgba(var(--color-accent-rgb), 0.04);
}
@media (max-width: 640px) {
  .bl-table {
    font-size: var(--text-xs);
  }
  .bl-table thead th,
  .bl-table td {
    padding: 8px 10px;
  }
}

/* ── Stat Display ── */
.bl-stat {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: border-color var(--ease-normal), box-shadow var(--ease-normal);
}
.bl-stat:hover {
  border-color: rgba(var(--color-accent-rgb), 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.bl-stat-icon {
  font-size: var(--text-xl);
  margin-bottom: 4px;
  display: block;
}
.bl-stat-value {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.2;
}
.bl-stat-label {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bl-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
@media (max-width: 480px) {
  .bl-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* ── Badge & Chip ── */
.bl-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.bl-badge--live {
  background: rgba(var(--color-success-rgb), 0.12);
  color: var(--color-success);
}
.bl-badge--cached {
  background: rgba(var(--color-warning-rgb), 0.12);
  color: var(--color-warning);
}
.bl-badge--approximate {
  background: rgba(var(--color-info-rgb), 0.12);
  color: var(--color-info);
}

.bl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--glass);
  backdrop-filter: blur(8px);
  color: var(--color-muted);
  cursor: pointer;
  transition: all var(--ease-normal);
  white-space: nowrap;
}
.bl-chip:hover {
  border-color: rgba(var(--color-accent-rgb), 0.3);
  color: var(--color-text);
  background: rgba(var(--color-accent-rgb), 0.08);
}
.bl-chip.active {
  background: rgba(var(--color-accent-rgb), 0.16);
  color: var(--color-text);
  border-color: rgba(var(--color-accent-rgb), 0.38);
}

/* ── Unified Button System ──
   .btn-base: shared interactive element styles
   Variants: .btn--secondary
   Sizes: .btn--sm */
.btn-base {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--color-text);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-base:hover {
  background: rgba(var(--color-accent-rgb), 0.08);
  border-color: rgba(var(--color-accent-rgb), 0.2);
  color: var(--color-accent);
}
.btn-base:active {
  transform: scale(0.97);
}
.btn-base:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}

/* Secondary: accent-tinted outline */
.btn--secondary {
  background: transparent;
  border: 1px solid rgba(var(--color-accent-rgb), 0.3);
  color: var(--color-accent);
}
.btn--secondary:hover {
  background: rgba(var(--color-accent-rgb), 0.06);
  border-color: rgba(var(--color-accent-rgb), 0.5);
  color: var(--color-accent);
}

/* Sizes */
.btn--sm { padding: 5px 12px; font-size: var(--text-xs); }

/* Active/selected state for filter/tab buttons */
.btn-active {
  background: linear-gradient(135deg, var(--color-accent), #e8850f) !important;
  color: #000 !important;
  border-color: var(--color-accent) !important;
  box-shadow: 0 2px 12px rgba(var(--color-accent-rgb), 0.3);
}

/* ── Skeleton Loading ──
   CSS-only loading placeholders with shimmer animation */
.skeleton {
  background: var(--color-surface);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 60%,
    transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}
[data-theme="light"] .skeleton {
  background: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .skeleton::after {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 40%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.4) 60%,
    transparent 100%);
  background-size: 200% 100%;
}
.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  width: 80%;
}
.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 60%; }
.skeleton-heading {
  height: 24px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  width: 50%;
}
.skeleton-card {
  padding: 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  min-height: 120px;
}
.skeleton-stat {
  height: 80px;
  border-radius: var(--radius);
}
.skeleton-chart {
  height: 200px;
  border-radius: var(--radius-lg);
}
.skeleton-circle {
  border-radius: 50%;
}

/* ── Skeleton Layout Helpers ── */
.skeleton-wrap {
  padding: 8px 0;
}
.skeleton-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.skeleton-card {
  min-height: 120px;
}
/* Fade out skeleton when content loads */
.skeleton-fade-out {
  animation: skeletonFadeOut 0.3s ease-out forwards;
}
@keyframes skeletonFadeOut {
  to { opacity: 0; transform: translateY(-4px); }
}

/* ── Error & Empty States ── */
.error-state,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 16px;
  color: var(--color-muted);
}
.error-state-icon,
.empty-state-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: var(--text-2xl);
}
.error-state-icon {
  background: rgba(var(--color-bear-rgb), 0.1);
  color: var(--color-bear);
  border: 1px solid rgba(var(--color-bear-rgb), 0.2);
}
.empty-state-icon {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
}
.error-state-msg,
.empty-state-msg {
  font-size: var(--text-base);
  max-width: 320px;
  line-height: 1.5;
}
.error-state .btn-base {
  margin-top: 8px;
}

/* ── Data Freshness Indicator ── */
.data-timestamp {
  font-size: var(--text-xs);
  color: var(--color-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}
.data-timestamp .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-bull);
  animation: pulse 2s ease-in-out infinite;
}

/* ── Heading Typography Enhancement ──
   Creates distinctive heading style using system fonts with refined spacing */
.heading-display {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-feature-settings: "ss01", "ss02", "cv01";
  line-height: 1.15;
}
.module-hero-title,
.section-hero-title {
  font-feature-settings: "ss01", "ss02", "cv01";
}

/* Large stat values get tabular numerals + tight spacing */
.stat-value {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum" 1, "ss01";
  font-variant-numeric: tabular-nums;
}

/* ── Inline SVG Icon Utility ──
   Use with inline <svg> for consistent icon sizing */
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }
.icon-section {
  width: 28px;
  height: 28px;
}
/* Filled icon variant (for solid icons) */
.icon-filled {
  fill: currentColor;
  stroke: none;
}

/* ── Count-Up Number Transition ── */
.count-up {
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.count-up.updating {
  opacity: 0.6;
  transform: scale(0.97);
}

/* ── Copy Feedback Tooltip ── */
.copy-feedback {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--color-bull);
  color: #000;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
.copy-feedback.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Active Button Press Feedback ── */
.tab-button:active,
.section-button:active {
  transform: scale(0.96);
}

/* ═══════════════════════════════
   CHARTS VIEW
   ═══════════════════════════════ */
.card {
  padding: 22px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin: 24px 0;
  background: var(--color-card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover::before {
  opacity: 0.6;
}
.onchain-grid .card { margin: 0; }
.rt-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .rt-grid { grid-template-columns: repeat(2, 1fr); }
  .rt-grid > .rt-item:first-child,
  .rt-grid > .rt-item:nth-child(2) { grid-column: 1 / -1; }
}
#tv-btc, #tv-btcd, #tv-mstr, #tv-m2 {
  width: 100%;
  height: 380px;
}
.chart-explainer {
  color: var(--muted);
  font-size: var(--text-md);
  margin: 4px 0 8px;
}
.muted { opacity: 0.7; }

/* ═══════════════════════════════
   ON-CHAIN VIEW
   ═══════════════════════════════ */
/* Hero styling handled by .module-hero */

.onchain-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .onchain-grid { grid-template-columns: 1fr 1fr; }
}
.bar {
  width: 100%;
  height: 8px;
  border: 1px solid var(--glass-border);
  background: var(--panel);
  border-radius: var(--radius-xs);
  overflow: hidden;
  margin-top: 6px;
}
.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--color-accent-light));
  border-radius: var(--radius-xs);
  transition: width 0.5s ease;
}
.bar-percent {
  margin-top: 4px;
  font-weight: 600;
  font-size: var(--text-base);
}
.fee-pill {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-right: 8px;
  margin-bottom: 6px;
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--glass);
  backdrop-filter: blur(4px);
}
.countdown {
  margin-top: 4px;
  font-weight: 700;
  font-size: var(--text-lg);
  font-feature-settings: "tnum" 1;
}
.oc-desc {
  margin-top: 8px;
  line-height: 1.5;
  font-size: var(--text-md);
  color: var(--color-muted);
}
.oc-facts-list {
  margin-top: 8px;
  padding-left: 20px;
  line-height: 1.5;
  font-size: var(--text-md);
  color: var(--color-muted);
}
.value {
  font-size: var(--text-xl);
  font-weight: 700;
  font-feature-settings: "tnum" 1;
}
.sub {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin-top: 2px;
}
.diff {
  font-size: var(--text-md);
  color: var(--color-muted);
  margin-top: 4px;
}
.info {
  display: block;
  margin-top: 8px;
}

/* ═══════════════════════════════
   SELF-CUSTODY VIEW
   ═══════════════════════════════ */
.sc-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.sc-step-icon { font-size: var(--text-3xl); }
/* Hero styling handled by .module-hero */

.callout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius);
  margin: 12px 0;
  font-weight: 500;
  backdrop-filter: blur(4px);
}
.callout::before { font-size: var(--text-xl); }
.callout.danger {
  background: rgba(255, 107, 107, 0.08);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.12);
}
.callout.danger::before { content: "\26A0\FE0F"; }
.callout.tip {
  background: rgba(255, 212, 59, 0.08);
  color: #ffd43b;
  border: 1px solid rgba(255, 212, 59, 0.12);
}
.callout.tip::before { content: "\1F4A1"; }
.sc-step .callout { margin-top: 8px; }
.sc-step .callout.tip {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: var(--text-base);
}
.sc-step .callout.danger { display: block; }
[data-theme="light"] .callout.danger {
  background: rgba(255, 107, 107, 0.1);
  color: #991b1b;
  border: 1px solid rgba(255, 107, 107, 0.25);
}
[data-theme="light"] .callout.tip {
  background: rgba(255, 212, 59, 0.12);
  color: #92400e;
  border: 1px solid rgba(255, 212, 59, 0.3);
}
.check {
  display: flex;
  align-items: center;
  margin-top: 6px;
}
.check-item {
  appearance: none;
  width: 0;
  height: 0;
  margin: 0;
}
.check-text { color: var(--color-text); }
.check-text::before {
  content: "";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border: 2px solid var(--brand);
  border-radius: var(--radius-sm);
  color: transparent;
  font-size: var(--text-sm);
  transition: all 0.2s;
}
.check-item:checked + .check-text::before {
  content: "\2714";
  background: linear-gradient(135deg, var(--color-bull), #059669);
  border-color: var(--color-bull);
  color: #fff;
}
.sc-progress { margin: 12px 0; }
.sc-progress .progress-bar {
  width: 100%;
  height: 8px;
  border: 1px solid var(--glass-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.sc-progress .progress-bar div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--color-accent-light));
  transition: width 0.4s ease;
  border-radius: var(--radius-sm);
}
.progress-text {
  margin-top: 8px;
  font-weight: 600;
  text-align: center;
  color: var(--color-dim);
  font-size: var(--text-sm);
}
.sc-step.card { background: var(--color-card-bg); }
.sc-step h3 { color: var(--brand); font-weight: 700; }
.sc-step p { color: var(--color-text); }

/* ═══════════════════════════════
   WHY BITCOIN GUIDE
   ═══════════════════════════════ */
/* Hero styling handled by .module-hero */

.wb-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  font-family: inherit;
  font-size: var(--text-md);
  transition: all 0.25s;
}
.wb-btn.primary {
  background: linear-gradient(135deg, var(--brand), #e8850f);
  color: #000;
  border: none;
  box-shadow: 0 4px 16px rgba(var(--color-accent-rgb), 0.25);
}
.wb-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--color-accent-rgb), 0.35);
}
.wb-btn.secondary {
  background: transparent;
  border: 1px solid rgba(var(--color-accent-rgb), 0.3);
  color: var(--brand);
}
.wb-btn.secondary:hover {
  background: rgba(var(--color-accent-rgb), 0.06);
}
.wb-hero-cta {
  margin-top: 20px;
}
.wb-modules-intro {
  max-width: 640px;
  margin: 0 auto 24px;
  text-align: center;
  color: var(--color-text);
}
.wb-progress-wrap { margin: 24px 0; }
.wb-progress {
  height: 8px;
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.wb-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--color-accent-light));
  transition: width 0.4s ease;
  border-radius: var(--radius-sm);
}
@media (prefers-reduced-motion: reduce) {
  .wb-progress-fill { transition: none; }
}
.wb-progress-text {
  margin-top: 8px;
  text-align: center;
  font-weight: 600;
  font-size: var(--text-sm);
}
.wb-util {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.wb-search {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  color: var(--color-text);
  font-size: var(--text-base);
  backdrop-filter: blur(8px);
  outline: none;
  transition: all 0.2s;
}
.wb-search:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.12);
}
.wb-module {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  background: var(--color-card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wb-module:hover {
  border-color: rgba(var(--color-accent-rgb), 0.18);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 0 16px rgba(var(--color-accent-rgb), 0.04);
  transform: translateY(-1px);
}
.wb-acc {
  width: 100%;
  text-align: left;
  background: none;
  color: var(--color-text);
  border: none;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-md);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.2s;
}
.wb-acc:hover {
  background: var(--color-surface);
}
.wb-acc:focus {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}
.wb-status {
  margin-left: 8px;
  color: var(--brand);
}
.wb-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
@media (prefers-reduced-motion: reduce) {
  .wb-panel { transition: none; }
}
.wb-body { padding: 20px; }
.wb-callout {
  background: var(--color-surface);
  border-left: 3px solid var(--brand);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 8px 0;
  font-size: var(--text-md);
}

/* ── Why Bitcoin — Sub-sections ── */
.wb-section {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}
.wb-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.wb-section-icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}
.wb-section-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}
.wb-section-intro {
  color: var(--color-muted);
  font-size: var(--text-md);
  margin: 0 0 8px;
  line-height: 1.6;
}
.wb-section .wb-bullets {
  margin-bottom: 8px;
}
.wb-section .wb-callout {
  margin: 8px 0 4px;
}
.wb-section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--glass-border);
}
.wb-section-link {
  color: var(--brand);
  font-size: var(--text-base);
  text-decoration: none;
  transition: opacity 0.2s;
}
.wb-section-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}
.wb-mark {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}
.wb-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.wb-disclaimer {
  margin-top: 12px;
  font-size: 0.9em;
  color: var(--muted);
}
.wb-footnote {
  text-align: center;
  margin-top: 32px;
  font-size: 0.85em;
}
/* ── Money Timeline (History of Money) ── */
.wb-money-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 16px 0;
  padding-left: 20px;
}
.wb-money-timeline::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 36px;
  width: 2px;
  background: linear-gradient(to bottom, var(--brand), rgba(var(--color-accent-rgb), 0.15));
}
.wb-money-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding: 14px 0;
  position: relative;
}
.wb-money-step-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
  z-index: 1;
}
.wb-money-step-icon {
  font-size: var(--text-xl);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-card-bg);
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  transition: all 0.3s ease;
}
.wb-money-step:hover .wb-money-step-icon {
  border-color: var(--brand);
  box-shadow: 0 0 12px rgba(var(--color-accent-rgb), 0.15);
}
.wb-money-step-num {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.wb-money-step-body h4 {
  margin: 0 0 4px;
  font-size: var(--text-md);
  color: var(--color-text);
}
.wb-money-step-period {
  display: inline-block;
  font-size: var(--text-xs);
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.wb-money-step-body > p {
  margin: 0 0 8px;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.wb-money-step-problem {
  margin-top: 4px;
  padding: 10px 14px;
  background: rgba(var(--color-bear-rgb), 0.06);
  border: 1px solid rgba(var(--color-bear-rgb), 0.12);
  border-radius: var(--radius);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-muted);
}
.wb-money-step-problem strong {
  color: #ef4444;
}
.wb-money-step-final .wb-money-step-icon {
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--color-accent-light));
}
.wb-money-step-final .wb-money-step-body h4 {
  color: var(--brand);
}
/* Properties table mobile cards override */
.wb-properties-cards .pow-comparison-card-row em {
  display: block;
  font-size: var(--text-sm);
  color: var(--brand);
  margin-bottom: 4px;
  font-style: italic;
}

/* Glossary Overlay */
/* ── Search Overlay ── */
.wb-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 6, 10, 0.7);
  display: flex;
  flex-direction: column;
  padding: 60px 20px 40px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: var(--z-overlay);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.wb-search-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.wb-search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}
.wb-search-overlay.hidden .wb-search-box {
  transform: translateY(-18px);
  opacity: 0;
}
.wb-search-box input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--color-card-bg);
  color: var(--color-text);
  font-size: var(--text-md);
  outline: none;
  transition: border-color 0.2s;
}
.wb-search-box input:focus {
  border-color: var(--color-accent);
}
.wb-search-close {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 10px 16px;
  cursor: pointer;
  color: var(--color-text);
  font-weight: 600;
  font-size: var(--text-lg);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.wb-search-close:hover {
  background: rgba(var(--color-accent-rgb), 0.08);
}
.wb-search-results {
  max-height: 60vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.05s, opacity 0.3s ease 0.05s;
}
.wb-search-overlay.hidden .wb-search-results {
  transform: translateY(12px);
  opacity: 0;
}
.wb-search-section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  padding: 8px 4px 4px;
  margin-top: 4px;
  position: sticky;
  top: 0;
  background: transparent;
  z-index: 1;
}
.wb-pages-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.wb-page-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  padding: 10px 14px;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  animation: glossaryItemIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.wb-page-item:hover,
.wb-page-item:focus-visible {
  border-color: var(--color-accent);
  background: rgba(var(--color-accent-rgb), 0.06);
  outline: none;
}
.wb-page-section-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  background: rgba(var(--color-accent-rgb), 0.10);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  flex-shrink: 0;
}
.wb-page-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wb-page-info strong {
  font-size: var(--text-base);
}
.wb-page-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted, #888);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wb-page-arrow {
  font-size: var(--text-lg);
  color: var(--color-text-muted, #888);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.wb-page-item:hover .wb-page-arrow {
  transform: translateX(3px);
  color: var(--color-accent);
}
.wb-glossary {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}
.wb-glossary-item {
  margin: 4px 0;
  padding: 10px 14px;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  animation: glossaryItemIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
@keyframes glossaryItemIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Stagger first 12 items for a subtle cascade */
.wb-glossary-item:nth-child(1)  { animation-delay: 0.04s; }
.wb-glossary-item:nth-child(2)  { animation-delay: 0.06s; }
.wb-glossary-item:nth-child(3)  { animation-delay: 0.08s; }
.wb-glossary-item:nth-child(4)  { animation-delay: 0.1s; }
.wb-glossary-item:nth-child(5)  { animation-delay: 0.12s; }
.wb-glossary-item:nth-child(6)  { animation-delay: 0.14s; }
.wb-glossary-item:nth-child(7)  { animation-delay: 0.16s; }
.wb-glossary-item:nth-child(8)  { animation-delay: 0.18s; }
.wb-glossary-item:nth-child(9)  { animation-delay: 0.2s; }
.wb-glossary-item:nth-child(10) { animation-delay: 0.22s; }
.wb-glossary-item:nth-child(11) { animation-delay: 0.24s; }
.wb-glossary-item:nth-child(12) { animation-delay: 0.26s; }
/* Animate the search button icon on hover */
.glossary-toggle {
  transition: all 0.2s, transform 0.2s;
}
.glossary-toggle:active {
  transform: scale(0.9);
}

/* ── Search Overlay — Light Mode Glassmorphism ── */

/* Backdrop overlay — translucent so page content bleeds through the blur */
[data-theme="light"] .wb-search-overlay {
  background: rgba(250, 248, 245, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Results container — frosted glass panel */
[data-theme="light"] .wb-search-results {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  padding: 8px;
}
/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(1px)) {
  [data-theme="light"] .wb-search-results {
    background: rgba(248, 247, 245, 0.95);
  }
}

/* Scrollbar — thin & subtle in light mode */
[data-theme="light"] .wb-search-results::-webkit-scrollbar {
  width: 6px;
}
[data-theme="light"] .wb-search-results::-webkit-scrollbar-track {
  background: transparent;
}
[data-theme="light"] .wb-search-results::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-xs);
}
[data-theme="light"] .wb-search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.22);
}
[data-theme="light"] .wb-search-results {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.12) transparent;
}

/* Cards — glassy depth */
[data-theme="light"] .wb-page-item,
[data-theme="light"] .wb-glossary-item {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Cards — hover state */
[data-theme="light"] .wb-page-item:hover,
[data-theme="light"] .wb-page-item:focus-visible {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .wb-glossary-item:hover {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Badge — warmer orange, legible against glassy backgrounds */
[data-theme="light"] .wb-page-section-tag {
  color: #b5640e;
  background: rgba(215, 120, 10, 0.16);
  border: 1px solid rgba(215, 120, 10, 0.18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Chevron arrow — ensure visibility */
[data-theme="light"] .wb-page-arrow {
  color: #888;
}
[data-theme="light"] .wb-page-item:hover .wb-page-arrow {
  color: var(--color-accent);
}

/* Search box input — glassy in light mode */
[data-theme="light"] .wb-search-box input {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .wb-search-box input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.10), inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Close button — glassy in light mode */
[data-theme="light"] .wb-search-close {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Section titles — sticky background matches glassy results container */
[data-theme="light"] .wb-search-section-title {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ═══════════════════════════════
   RESPONSIVE
   ═══════════════════════════════ */
@media (max-width: 900px) {
  .scenario-grid { grid-template-columns: repeat(2, 1fr); }
  .input-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .breakdown-grid { grid-template-columns: 1fr 1fr; }
  .chart-container { height: 360px; }
}
@media (max-width: 640px) {
  .header-content {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px 0;
  }
  .branding {
    position: static;
    transform: none;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
  }
  .header-title {
    font-size: var(--text-xl);
  }
  .header-slogan {
    font-size: var(--text-xs);
  }
  .header-controls {
    margin-left: 0;
    justify-content: center;
    flex-wrap: wrap;
  }
  .tab-nav {
    gap: 4px;
    padding: 3px;
  }
  .section-button {
    padding: 10px 16px;
    font-size: var(--text-xs);
    min-height: 40px;
  }
  .section-hero {
    padding: 20px 16px 12px;
    margin-top: 12px;
  }
  .section-hero-icon {
    width: 44px;
    height: 44px;
    font-size: var(--text-2xl);
    border-radius: var(--radius);
  }
  .section-hero-title { font-size: var(--text-lg); }
  .section-hero-desc { font-size: var(--text-sm); }
  .section-hero-nav {
    padding: 8px 4px;
  }
  .subtab-group-pills {
    gap: 3px;
  }
  .subtab-group + .subtab-group {
    margin-top: 4px;
    padding-top: 4px;
  }
  .subtab-group-label {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
    opacity: 0.7;
  }
  .tab-button {
    padding: 8px 12px;
    font-size: var(--text-xs);
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
  .price-display { grid-template-columns: 1fr; }
  .scenario-grid { grid-template-columns: 1fr; }
  .input-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .breakdown-grid { grid-template-columns: 1fr; }
  .chart-container { height: 280px; }
  .app { padding: 14px; }
  .converter-info { grid-template-columns: 1fr; }

  /* Search overlay — mobile */
  .wb-search-overlay {
    padding: 20px 12px 20px;
  }
  .wb-search-box {
    max-width: 100%;
  }
  .wb-search-box input {
    font-size: var(--text-md); /* prevents iOS zoom-on-focus */
    padding: 14px 16px;
  }
  .wb-search-close {
    min-width: 48px;
    min-height: 48px;
    font-size: var(--text-2xl);
  }
  .wb-search-results {
    max-width: 100%;
    max-height: calc(100dvh - 120px); /* use dynamic viewport height */
  }
  .wb-glossary-item {
    padding: 14px 16px;
    font-size: var(--text-base);
  }
  .wb-page-item {
    padding: 14px 16px;
    font-size: var(--text-base);
  }
  .wb-page-desc {
    white-space: normal;
  }
  .theme-toggle,
  .glossary-toggle,
  .donate-toggle,
  .currency-toggle-btn,
  .lang-toggle {
    width: 44px;
    height: 44px;
    font-size: var(--text-lg);
  }
  .header-branding {
    height: 44px;
    font-size: var(--text-sm);
  }
  .wb-util {
    flex-direction: column;
    align-items: stretch;
  }
  .wb-share { width: 100%; }
}

/* ═══════════════════════════════
   WHY BITCOIN — Enhanced Accordion
   ═══════════════════════════════ */
.wb-acc-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wb-acc-icon {
  font-size: var(--text-xl);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.wb-acc-title {
  font-weight: 700;
}
.wb-acc-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.wb-chevron {
  font-size: var(--text-2xl);
  font-weight: 300;
  color: var(--color-dim);
  transition: transform 0.3s;
  display: inline-block;
}
.wb-module.open .wb-chevron {
  transform: rotate(90deg);
}
.wb-intro {
  font-size: var(--text-md);
  color: var(--color-muted);
  margin: 0 0 12px;
  line-height: 1.6;
}
.wb-bullets {
  padding-left: 20px;
  margin: 0 0 12px;
  line-height: 1.7;
  color: var(--color-text);
}
.wb-bullets li {
  margin-bottom: 6px;
  font-size: var(--text-md);
}
.wb-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
  flex-wrap: wrap;
}
.wb-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: var(--text-md);
  color: var(--color-muted);
}
.wb-mark input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

/* ═══════════════════════════════
   SELF-CUSTODY — Step Cards
   ═══════════════════════════════ */
.sc-alerts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.sc-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  position: relative;
}
/* Vertical timeline line */
.sc-steps::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(180deg, var(--color-accent), rgba(var(--color-accent-rgb), 0.1));
  border-radius: var(--radius-xs);
  z-index: 0;
}
.sc-step-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}
.sc-step-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 20px rgba(var(--color-accent-rgb), 0.06);
}
.sc-step-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), #e8850f);
  color: #000;
  font-weight: 800;
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(var(--color-accent-rgb), 0.25);
}
.sc-step-content {
  flex: 1;
  min-width: 0;
}
.sc-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sc-step-header h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}
.sc-step-emoji {
  font-size: var(--text-xl);
}
.sc-step-content p {
  margin: 0 0 10px;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.sc-rules {
  padding-left: 20px;
  margin: 0 0 12px;
  line-height: 1.7;
}
.sc-rules li {
  margin-bottom: 4px;
  font-size: var(--text-md);
  color: var(--color-text);
}
.sc-step-content .callout {
  margin: 10px 0 0;
}
.sc-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 10px 0;
}
.sc-compare-item {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px;
}
.sc-compare-title {
  font-weight: 700;
  font-size: var(--text-md);
  margin-bottom: 6px;
}
.sc-compare-item p {
  font-size: var(--text-base);
  margin: 0 0 8px;
}
.sc-compare-tag {
  display: inline-block;
  font-size: var(--text-sm);
  color: var(--color-accent);
  font-weight: 600;
  background: rgba(var(--color-accent-rgb), 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.sc-spotlight {
  margin-top: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 16px;
}
.sc-spotlight-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: var(--text-md);
}
.sc-spotlight-badge {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-bg);
  background: var(--color-accent);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}
.sc-spotlight p {
  font-size: var(--text-md);
  color: var(--color-muted);
  margin: 0 0 10px;
  line-height: 1.55;
}
.sc-spotlight .sc-rules {
  margin-top: 0;
}
.sc-checklist-card,
.sc-faq-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.sc-checklist-title,
.sc-faq-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 4px;
}
.sc-checklist-sub,
.sc-faq-sub {
  color: var(--color-muted);
  font-size: var(--text-md);
  margin: 0 0 16px;
}
.sc-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sc-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sc-faq-item {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}
.sc-faq-item summary {
  padding: 12px 16px;
  color: var(--color-text);
  transition: background 0.2s;
}
.sc-faq-item summary:hover {
  background: var(--color-surface-2);
}
.sc-faq-item p {
  padding: 0 16px 14px;
  margin: 0;
}
/* ── Hardware Wallet Table ── */
.sc-hw-table-section {
  margin-top: 16px;
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
}
.sc-hw-table-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: var(--text-md);
}
.sc-hw-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}
.sc-hw-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  font-size: var(--text-sm);
  line-height: 1.45;
}
.sc-hw-table th {
  text-align: left;
  padding: 8px 10px;
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted);
  border-bottom: 2px solid var(--glass-border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--color-surface);
}
.sc-hw-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--color-text);
  vertical-align: top;
}
.sc-hw-table tbody tr:hover {
  background: rgba(var(--color-accent-rgb), 0.04);
}
.sc-hw-table td:first-child {
  white-space: nowrap;
  font-weight: 600;
}
.sc-hw-table td:last-child {
  min-width: 180px;
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.sc-hw-yes { color: #22c55e; }
.sc-hw-no { color: var(--color-muted); opacity: 0.7; }
.sc-hw-warn { color: #f59e0b; }

/* ── Hardware Wallet Cards ── */
.hw-wallet-group-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
  margin: 16px 0 8px;
  letter-spacing: 0.01em;
}
.hw-wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.hw-wallet-card {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.2s, transform 0.2s;
}
.hw-wallet-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-1px);
}
.hw-wallet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.hw-wallet-header strong {
  font-size: var(--text-md);
  color: var(--color-text);
}
.hw-wallet-price {
  color: var(--color-accent);
  font-weight: 700;
  font-size: var(--text-md);
}
.hw-wallet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.hw-wallet-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  line-height: 1.4;
  white-space: nowrap;
}
.hw-wallet-tag--positive {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}
.hw-wallet-tag--negative {
  background: rgba(160, 160, 184, 0.1);
  color: var(--color-muted);
}
.hw-wallet-tag--warn {
  background: rgba(var(--color-custom-rgb), 0.1);
  color: #f59e0b;
}
.hw-wallet-desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.5;
  margin: 0;
}
.hw-wallet-warning {
  margin-top: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: #f59e0b;
  background: rgba(var(--color-custom-rgb), 0.08);
  border: 1px solid rgba(var(--color-custom-rgb), 0.15);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

/* Light theme overrides for hw cards */
[data-theme="light"] .hw-wallet-tag--positive {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}
[data-theme="light"] .hw-wallet-tag--negative {
  background: rgba(0, 0, 0, 0.05);
  color: #555570;
}
[data-theme="light"] .hw-wallet-tag--warn {
  background: rgba(var(--color-custom-rgb), 0.12);
  color: #92400e;
}
[data-theme="light"] .hw-wallet-warning {
  background: rgba(var(--color-custom-rgb), 0.1);
  color: #92400e;
  border-color: rgba(var(--color-custom-rgb), 0.2);
}

/* ── Wallet Software Section ── */
.sc-software-card,
.sc-advanced-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.sc-section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 4px;
}
.sc-section-sub {
  color: var(--color-muted);
  font-size: var(--text-md);
  margin: 0 0 16px;
}
.sc-software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.sc-software-item {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color 0.2s;
}
.sc-software-item:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
}
.sc-software-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: var(--text-md);
  color: var(--color-text);
}
.sc-software-item p {
  margin: 0;
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.5;
}

/* ── Advanced Best Practices ── */
.sc-advanced-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.sc-advanced-badge {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #000;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  padding: 2px 10px;
  border-radius: var(--radius-xs);
}
.sc-advanced-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sc-advanced-item {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sc-advanced-item:hover {
  border-color: rgba(var(--color-accent-rgb), 0.15);
}
.sc-advanced-item summary {
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.2s;
  list-style: none;
  font-size: var(--text-md);
}
.sc-advanced-item summary::-webkit-details-marker { display: none; }
.sc-advanced-item summary::before {
  content: '›';
  display: inline-block;
  margin-right: 10px;
  font-size: var(--text-xl);
  font-weight: 300;
  transition: transform 0.2s;
  color: var(--color-accent);
}
.sc-advanced-item[open] summary::before {
  transform: rotate(90deg);
}
.sc-advanced-item summary:hover {
  background: var(--color-surface-2);
}
.sc-advanced-body {
  padding: 0 16px 16px;
}
.sc-advanced-body p {
  margin: 0 0 8px;
  font-size: var(--text-md);
  color: var(--color-muted);
  line-height: 1.6;
}
.sc-advanced-body .sc-rules {
  margin-top: 4px;
}
.sc-advanced-links {
  font-size: var(--text-base);
  color: var(--color-accent);
  margin-top: 4px;
}
.sc-advanced-links a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: rgba(var(--color-accent-rgb), 0.3);
}

/* ── Checklist Group Titles ── */
.sc-checklist-group-title {
  font-size: var(--text-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  margin: 16px 0 8px;
  padding: 0;
}
.sc-checklist-group-title:first-of-type {
  margin-top: 0;
}
.sc-checklist-advanced-label {
  color: #f59e0b;
}


@media (max-width: 640px) {
  .sc-comparison { grid-template-columns: 1fr; }
  .sc-steps::before { left: 17px; }
  .sc-step-number { width: 34px; height: 34px; font-size: var(--text-md); }
  .sc-step-card { padding: 14px; gap: 12px; }
  .sc-software-grid { grid-template-columns: 1fr; }
  .sc-hw-table-section { padding: 12px 8px; }
  .hw-wallet-grid { grid-template-columns: 1fr; }
  .hw-wallet-tag { font-size: var(--text-xs); white-space: normal; }
  .sc-advanced-card,
  .sc-software-card { padding: 16px; }
}

/* ── Pause animations on hidden views (save CPU/GPU) ── */
.view-panel:not(.active) .module-hero *,
.view-panel:not(.active) [style*="animation"] {
  animation-play-state: paused !important;
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════
   WHITEPAPER VIEW
   ═══════════════════════════════ */
.wp-shell {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

/* Fade-in animations */
.wp-fade-in {
  animation: fadeInUp 0.6s ease-out both;
}
.wp-fade-in-delay-1 {
  animation-delay: 0.15s;
}

/* Hero card */
.wp-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--color-accent-rgb), 0.1);
}
.wp-hero:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
}
.wp-hero-glow {
  position: absolute;
  top: -80px;
  right: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--color-accent-rgb), 0.12), transparent 70%);
  pointer-events: none;
  animation: subtleGlow 5s ease-in-out infinite;
}
.wp-hero-content {
  position: relative;
  z-index: 1;
}

/* Badge */
.wp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--text-xs);
  color: var(--color-accent);
  font-weight: 700;
  background: rgba(var(--color-accent-rgb), 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--color-accent-rgb), 0.15);
  animation: chipSlide 0.5s ease-out 0.2s both;
}
.wp-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse 2s ease-in-out infinite;
}

.wp-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.wp-subtitle {
  margin: 12px 0 0;
  max-width: 780px;
  color: var(--color-muted);
  line-height: 1.6;
  font-size: var(--text-md);
}
.wp-mobile-tip {
  margin: 12px 0 0;
  max-width: 780px;
  color: var(--color-dim);
  font-size: var(--text-sm);
  background: rgba(var(--color-accent-rgb), 0.04);
  padding: 8px 12px;
  border-radius: var(--radius);
  border-left: 3px solid var(--color-accent);
}

/* Meta row */
.wp-meta-row {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.wp-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 6px 12px;
  border-radius: 999px;
  animation: chipSlide 0.4s ease-out both;
}
.wp-meta-item:nth-child(1) { animation-delay: 0.3s; }
.wp-meta-item:nth-child(2) { animation-delay: 0.4s; }
.wp-meta-item:nth-child(3) { animation-delay: 0.5s; }
.wp-meta-icon {
  font-size: var(--text-md);
}

.wp-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.wp-action-btn {
  animation: fadeInUp 0.5s ease-out both;
}
.wp-action-btn:nth-child(1) { animation-delay: 0.4s; }
.wp-action-btn:nth-child(2) { animation-delay: 0.5s; }

/* Viewer */
.wp-viewer {
  padding-top: 14px;
}
.wp-viewer-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.wp-viewer-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(var(--color-accent-rgb), 0.12);
  color: var(--color-accent);
  font-weight: 700;
  font-size: var(--text-xs);
}
.wp-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}
.wp-page-count {
  color: var(--color-dim);
  font-size: var(--text-xs);
  font-weight: 500;
}

/* Source controls */
.wp-source-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}
.wp-source-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wp-source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-bull);
  animation: pulse 2s ease-in-out infinite;
}
.wp-source-label {
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}
.wp-source-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.wp-source-btn {
  padding: 7px 12px;
  font-size: var(--text-xs);
}

.wp-frame-status {
  min-height: 20px;
  margin: 0 0 10px;
  color: var(--color-muted);
  font-size: var(--text-xs);
}
.wp-frame-status--loading {
  color: var(--color-dim);
}
.wp-frame-status a {
  color: var(--color-accent);
  text-decoration: underline;
}

.wp-frame-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  transition: border-color 0.3s;
  animation: subtleGlow 6s ease-in-out infinite;
}
.wp-frame-wrap:hover {
  border-color: rgba(var(--color-accent-rgb), 0.15);
}
.wp-frame {
  width: 100%;
  height: min(78vh, 1000px);
  border: none;
  background: rgba(0, 0, 0, 0.1);
  display: block;
}

@media (max-width: 640px) {
  .wp-viewer-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .wp-source-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .wp-source-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .wp-frame {
    height: 68vh;
  }
  .wp-meta-row {
    gap: 8px;
  }
}

/* ═══════════════════════════════
   NODE GUIDE VIEW
   ═══════════════════════════════ */
/* Hero styling handled by .module-hero */

.ng-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeInUp 0.5s ease-out both;
}
.ng-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--brand);
  font-size: var(--text-xl);
}
.ng-grid {
  display: grid;
  gap: 12px;
}
.ng-grid-2 {
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .ng-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}
.ng-point {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--glass);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ng-point:hover {
  border-color: rgba(var(--color-accent-rgb), 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1), 0 0 16px rgba(var(--color-accent-rgb), 0.05);
}
.ng-point h4 {
  margin: 0 0 8px;
  color: var(--color-text);
}
.ng-point p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.6;
}
.ng-list {
  margin: 8px 0 0;
  padding-left: 18px;
}
.ng-list li {
  margin-bottom: 8px;
}
.ng-list.compact li {
  margin-bottom: 6px;
}
.ng-muted {
  color: var(--muted);
}
.ng-steps {
  margin-bottom: 16px;
}
.ng-section-title {
  margin: 0 0 10px;
  color: var(--color-text);
}
.ng-step-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ng-step-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 0 20px rgba(var(--color-accent-rgb), 0.06);
}
.ng-step-number {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--brand), var(--color-accent-light));
  color: #111;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ng-step-card h4 {
  margin: 0 0 8px;
}
.ng-step-card p {
  margin: 0 0 8px;
}
.ng-faq {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.ng-table {
  min-width: 700px;
}
.ng-table thead th {
  position: sticky;
  top: 0;
  font-size: var(--text-sm);
}
.ng-table td {
  padding: 12px 14px;
  color: var(--color-muted);
  vertical-align: top;
}
.ng-table tbody td:first-child {
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}
.ng-table tbody tr:last-child td {
  border-bottom: none;
}
.ng-code-block {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin: 16px 0;
  overflow: hidden;
}
.ng-code-label {
  padding: 6px 14px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(var(--color-accent-rgb), 0.04);
}
.ng-code-block pre {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  font-size: var(--text-base);
  line-height: 1.5;
}
.ng-code-block code {
  color: var(--brand);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}
.ng-check-category {
  margin: 16px 0 6px;
  font-weight: 700;
  font-size: var(--text-base);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}
.ng-check-category:first-child {
  margin-top: 0;
}

/* ═══════════════════════════════
   MINING GUIDE VIEW
   ═══════════════════════════════ */
/* Hero styling handled by .module-hero */

/* ── Main card container ── */
.mg-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeInUp 0.5s ease-out both;
}
.mg-card h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--brand);
  font-size: var(--text-xl);
}

/* ── Section title with icon support ── */
.mg-section-title {
  margin: 0 0 14px;
  color: var(--color-text);
  font-size: var(--text-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mg-section-title .mg-section-icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}
.mg-section-intro {
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: var(--text-md);
}
.mg-subsection-title {
  color: var(--color-text);
  font-size: var(--text-md);
  font-weight: 600;
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--glass-border);
}

/* ── Profitability Reality Check ── */
.mg-profitability-check {
  position: relative;
  border: 1px solid rgba(var(--color-bear-rgb), 0.2);
  background: linear-gradient(135deg, rgba(var(--color-bear-rgb), 0.04), rgba(var(--color-bear-rgb), 0.01));
  overflow: hidden;
}
.mg-profitability-check::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #ef4444, #f97316);
  border-radius: var(--radius-xs) 0 0 var(--radius-xs);
}
.mg-profitability-check .mg-section-title {
  color: #f87171;
}
.mg-profit-text {
  color: var(--color-muted);
  line-height: 1.7;
  font-size: var(--text-md);
  margin-bottom: 16px;
}

/* ── Live Stats Grid ── */
.mg-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 900px) {
  .mg-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.mg-stat-card {
  position: relative;
  background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.06), rgba(var(--color-accent-rgb), 0.02));
  border: 1px solid rgba(var(--color-accent-rgb), 0.12);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.mg-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0.6;
}
.mg-stat-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 0 24px rgba(var(--color-accent-rgb), 0.08);
}
.mg-stat-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  line-height: 1.2;
}
.mg-stat-label {
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* ── Grid layout ── */
.mg-grid {
  display: grid;
  gap: 14px;
}
.mg-grid-2,
.mg-grid-3 {
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .mg-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .mg-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Point cards & mini cards ── */
.mg-point,
.mg-mini-card {
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--glass);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.mg-point::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--brand), rgba(var(--color-accent-rgb), 0.2));
  opacity: 0;
  transition: opacity 0.3s;
}
.mg-point:hover::before {
  opacity: 1;
}
.mg-point:hover,
.mg-mini-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 0 20px rgba(var(--color-accent-rgb), 0.06);
}
.mg-point h4,
.mg-mini-card h4 {
  margin: 0 0 10px;
  color: var(--color-text);
  font-size: var(--text-md);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mg-point-icon {
  font-size: var(--text-lg);
  flex-shrink: 0;
}
.mg-point p,
.mg-mini-card p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.7;
  font-size: var(--text-md);
}

/* ── Lists ── */
.mg-list {
  margin: 8px 0 0;
  padding-left: 0;
  list-style: none;
}
.mg-list li {
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
  color: var(--color-muted);
  line-height: 1.6;
  font-size: var(--text-md);
}
.mg-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.7;
}
.mg-list.compact li {
  margin-bottom: 6px;
}
.mg-ordered {
  padding-left: 0;
  counter-reset: mg-counter;
  list-style: none;
}
.mg-ordered li {
  counter-increment: mg-counter;
  position: relative;
  padding-left: 36px;
  margin-bottom: 16px;
  line-height: 1.7;
  color: var(--color-muted);
}
.mg-ordered li::before {
  content: counter(mg-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.2), rgba(var(--color-accent-rgb), 0.08));
  border: 1px solid rgba(var(--color-accent-rgb), 0.25);
  color: var(--brand);
  font-size: var(--text-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mg-ordered li strong {
  color: var(--color-text);
}

/* ── Step cards ── */
.mg-steps {
  margin-bottom: 20px;
}
.mg-step-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.mg-step-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.15), 0 0 24px rgba(var(--color-accent-rgb), 0.06);
}
/* Connector line between steps */
.mg-step-card:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 43px;
  bottom: -14px;
  width: 2px;
  height: 14px;
  background: linear-gradient(180deg, rgba(var(--color-accent-rgb), 0.3), transparent);
}
.mg-step-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--color-accent-light));
  color: #111;
  font-weight: 800;
  font-size: var(--text-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(var(--color-accent-rgb), 0.25);
  flex-shrink: 0;
}
.mg-step-card h4 {
  margin: 0 0 8px;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
}
.mg-step-card p {
  margin: 0 0 8px;
  color: var(--color-muted);
  line-height: 1.7;
  font-size: var(--text-md);
}

/* ── Tables ── */
.mg-table-wrap {
  background: var(--color-card-bg);
}
.mg-table {
  min-width: 700px;
}
.mg-table th {
  position: sticky;
  top: 0;
  background: rgba(var(--color-accent-rgb), 0.06);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  color: var(--brand);
  border-bottom: 2px solid rgba(var(--color-accent-rgb), 0.15);
}
.mg-table td {
  padding: 11px 14px;
  color: var(--color-muted);
  vertical-align: top;
}
.mg-table tbody td:first-child {
  font-weight: 600;
  color: var(--color-text);
  min-width: 140px;
}
.mg-table tbody tr:last-child td {
  border-bottom: none;
}
.mg-table tbody tr {
  transition: background 0.2s;
}

/* ── Note cards (colored) ── */
.mg-note {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin: 10px 0;
  font-size: var(--text-md);
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.mg-note::before {
  font-size: var(--text-md);
  flex-shrink: 0;
  margin-top: 1px;
}
.mg-note-green {
  background: rgba(var(--color-bull-rgb), 0.08);
  border: 1px solid rgba(var(--color-bull-rgb), 0.18);
  color: #6ee7b7;
}
.mg-note-green::before {
  content: '\2705';
}
.mg-note-yellow {
  background: rgba(var(--color-custom-rgb), 0.08);
  border: 1px solid rgba(var(--color-custom-rgb), 0.18);
  color: #fbbf24;
}
.mg-note-yellow::before {
  content: '\26A0\FE0F';
}
.mg-note-red {
  background: rgba(var(--color-bear-rgb), 0.08);
  border: 1px solid rgba(var(--color-bear-rgb), 0.18);
  color: #fca5a5;
}
.mg-note-red::before {
  content: '\274C';
}

/* Light mode note cards */
[data-theme="light"] .mg-note-green {
  background: rgba(var(--color-bull-rgb), 0.1);
  color: #065f46;
}
[data-theme="light"] .mg-note-yellow {
  background: rgba(var(--color-custom-rgb), 0.1);
  color: #92400e;
}
[data-theme="light"] .mg-note-red {
  background: rgba(var(--color-bear-rgb), 0.1);
  color: #991b1b;
}

/* ── FAQ accordion ── */
.mg-faq {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.mg-faq[open] {
  background: rgba(var(--color-accent-rgb), 0.03);
  border-color: rgba(var(--color-accent-rgb), 0.15);
}
.mg-faq summary {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-md);
}
.mg-faq summary::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: rgba(var(--color-accent-rgb), 0.1);
  font-size: var(--text-lg);
  transition: all 0.25s;
  flex-shrink: 0;
}
.mg-faq[open] summary::before {
  background: rgba(var(--color-accent-rgb), 0.2);
}
.mg-faq p {
  margin: 12px 0 0;
  padding-left: 34px;
  line-height: 1.7;
  font-size: var(--text-md);
}

/* ── Muted text & disclaimers ── */
.mg-muted {
  color: var(--muted);
  margin-top: 12px;
  font-size: var(--text-sm);
  font-style: italic;
}

/* ── NL/EU section ── */
#mg-nl-eu {
  border: 1px solid rgba(var(--color-base-rgb), 0.15);
  background: linear-gradient(135deg, rgba(var(--color-base-rgb), 0.04), rgba(var(--color-base-rgb), 0.01));
}
#mg-nl-eu .mg-section-title {
  color: #60a5fa;
}
#mg-nl-eu .mg-subsection-title {
  border-bottom-color: rgba(var(--color-base-rgb), 0.15);
  color: #93bbfc;
}
[data-theme="light"] #mg-nl-eu .mg-subsection-title {
  color: #2563eb;
}
[data-theme="light"] #mg-nl-eu .mg-section-title {
  color: #2563eb;
}

/* ── Cross-link cards ── */
.mg-mini-card a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s;
}
.mg-mini-card a:hover {
  color: var(--color-text);
}

/* ── Mining responsive ── */
@media (max-width: 640px) {
  .mg-card {
    padding: 20px 16px;
  }
  .mg-stat-value {
    font-size: var(--text-xl);
  }
  .mg-stat-label {
    font-size: var(--text-xs);
  }
  .mg-stats-grid {
    gap: 10px;
  }
  .mg-stat-card {
    padding: 14px 12px;
  }
  .mg-step-card {
    grid-template-columns: 40px 1fr;
    padding: 16px;
    gap: 12px;
  }
  .mg-step-number {
    width: 36px;
    height: 36px;
    font-size: var(--text-md);
  }
  .mg-step-card:not(:last-child)::after {
    left: 35px;
  }
  .mg-point,
  .mg-mini-card {
    padding: 16px;
  }
  .mg-table {
    font-size: var(--text-sm);
  }
  .mg-table thead th,
  .mg-table tbody td {
    padding: 8px 10px;
  }
  .mg-faq summary {
    font-size: var(--text-md);
  }
  .mg-faq p {
    padding-left: 0;
  }
}

/* ── PoW vs PoS Comparison Table (Why Bitcoin) ── */
.pow-comparison-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin: 16px 0;
}
.pow-comparison-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: var(--text-base);
  line-height: 1.5;
}
.pow-comparison-table thead th {
  position: sticky;
  top: 0;
  background: var(--color-card-bg);
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-size: var(--text-md);
  border-bottom: 2px solid var(--glass-border);
  white-space: nowrap;
}
.pow-comparison-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--color-muted);
  vertical-align: top;
}
.pow-comparison-table tbody td:first-child {
  font-weight: 600;
  color: var(--color-text);
  min-width: 140px;
}
.pow-comparison-table tbody tr:last-child td {
  border-bottom: none;
}
.pow-comparison-table tbody tr:hover {
  background: rgba(var(--color-accent-rgb), 0.03);
}
.pow-highlight-col {
  background: rgba(var(--color-accent-rgb), 0.06);
  border-left: 2px solid rgba(var(--color-accent-rgb), 0.25);
  border-right: 2px solid rgba(var(--color-accent-rgb), 0.25);
}
thead .pow-highlight-col {
  color: var(--brand);
  border-top: 2px solid rgba(var(--color-accent-rgb), 0.25);
}
tbody tr:last-child .pow-highlight-col {
  border-bottom: 2px solid rgba(var(--color-accent-rgb), 0.25);
}

/* Mobile: stacked cards (hidden on desktop) */
.pow-comparison-cards {
  display: none;
}
@media (max-width: 640px) {
  .pow-comparison-table-scroll {
    display: none;
  }
  .pow-comparison-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
  }
  .pow-comparison-card {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--glass);
  }
  .pow-comparison-card-header {
    font-weight: 700;
    font-size: var(--text-md);
    margin-bottom: 10px;
    color: var(--color-text);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 8px;
  }
  .pow-comparison-card-row {
    padding: 8px 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: var(--text-base);
    color: var(--color-muted);
    line-height: 1.5;
  }
  .pow-comparison-card-row:last-child {
    border-bottom: none;
  }
  .pow-card-highlight {
    background: rgba(var(--color-accent-rgb), 0.04);
    border-radius: var(--radius);
    padding: 8px;
    margin: 4px -8px;
  }
}

/* ═══════════════════════════════
   LIGHTNING NETWORK VIEW
   ═══════════════════════════════ */
/* Hero styling handled by .module-hero */

.ln-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeInUp 0.5s ease-out both;
}
.ln-card:nth-of-type(1) { animation-delay: 0.05s; }
.ln-card:nth-of-type(2) { animation-delay: 0.1s; }
.ln-card:nth-of-type(3) { animation-delay: 0.15s; }
.ln-card:nth-of-type(4) { animation-delay: 0.2s; }
.ln-card:nth-of-type(5) { animation-delay: 0.25s; }
.ln-card:nth-of-type(6) { animation-delay: 0.3s; }
.ln-card:nth-of-type(7) { animation-delay: 0.35s; }
.ln-card:nth-of-type(8) { animation-delay: 0.4s; }
.ln-card:nth-of-type(9) { animation-delay: 0.45s; }
.ln-card:nth-of-type(10) { animation-delay: 0.5s; }
.ln-card:nth-of-type(11) { animation-delay: 0.55s; }
.ln-card:nth-of-type(12) { animation-delay: 0.6s; }
.ln-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--brand);
  font-size: var(--text-xl);
}
.ln-muted {
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.6;
}
.ln-grid {
  display: grid;
  gap: 12px;
}
.ln-grid-2 {
  grid-template-columns: 1fr;
}
.ln-grid-3 {
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .ln-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .ln-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
.ln-point,
.ln-mini-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--glass);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ln-point:hover,
.ln-mini-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 0 16px rgba(var(--color-accent-rgb), 0.06);
}
.ln-point h4,
.ln-mini-card h4 {
  margin: 0 0 8px;
  font-size: var(--text-md);
}
.ln-point p,
.ln-mini-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.ln-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.7;
}
.ln-list li {
  margin-bottom: 6px;
}
.ln-steps {
  margin-bottom: 8px;
}
.ln-step-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ln-step-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 0 20px rgba(var(--color-accent-rgb), 0.06);
}
.ln-step-number {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--brand), var(--color-accent-light));
  color: #111;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ln-step-card h4 {
  margin: 0 0 6px;
}
.ln-step-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.ln-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ln-faq {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ln-faq summary {
  padding: 12px 16px;
  color: var(--color-text);
  transition: background 0.2s;
}
.ln-faq summary:hover {
  background: var(--color-surface-2);
}
.ln-faq p {
  padding: 0 16px 14px;
  margin: 0;
}
.ln-card-highlight {
  border-left: 3px solid var(--brand);
}
.ln-quote {
  margin: 12px 0 0;
  padding: 10px 16px;
  border-left: 3px solid rgba(var(--color-accent-rgb), 0.4);
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
  font-style: italic;
  background: rgba(var(--color-accent-rgb), 0.03);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.ln-faq-body {
  padding: 0 16px 14px;
}
.ln-faq-body p {
  margin: 0 0 8px;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.ln-faq-body ul {
  margin-top: 4px;
  margin-bottom: 8px;
}
.ln-footnote {
  text-align: center;
  margin-top: 32px;
  font-size: 0.85em;
}

/* ── Lightning: Tables ── */
.ln-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin: 16px 0;
  background: var(--color-card-bg);
}
.ln-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: var(--text-base);
  line-height: 1.5;
}
.ln-table thead th {
  position: sticky;
  top: 0;
  background: rgba(var(--color-accent-rgb), 0.06);
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
  border-bottom: 2px solid rgba(var(--color-accent-rgb), 0.15);
  white-space: nowrap;
}
.ln-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--color-muted);
  vertical-align: top;
}
.ln-table tbody td:first-child {
  font-weight: 600;
  color: var(--color-text);
}
.ln-table tbody tr:last-child td {
  border-bottom: none;
}
.ln-table tbody tr {
  transition: background 0.2s;
}
.ln-table tbody tr:hover {
  background: rgba(var(--color-accent-rgb), 0.03);
}

/* ── Lightning: Highlight / Info / Warning boxes ── */
.ln-highlight-box {
  background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.06), rgba(var(--color-accent-rgb), 0.02));
  border: 1px solid rgba(var(--color-accent-rgb), 0.18);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 16px 0;
}
.ln-highlight-box h4 {
  margin: 0 0 8px;
  color: var(--brand);
}
.ln-highlight-box p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.7;
  font-size: var(--text-md);
}
.ln-info-box {
  background: rgba(var(--color-base-rgb), 0.06);
  border: 1px solid rgba(var(--color-base-rgb), 0.18);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 14px 0;
  color: #93c5fd;
  font-size: var(--text-md);
  line-height: 1.6;
}
[data-theme="light"] .ln-info-box {
  background: rgba(var(--color-base-rgb), 0.08);
  color: #1d4ed8;
}
.ln-warning-box {
  background: rgba(var(--color-custom-rgb), 0.06);
  border: 1px solid rgba(var(--color-custom-rgb), 0.18);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 14px 0;
  color: #fbbf24;
  font-size: var(--text-md);
  line-height: 1.6;
}
[data-theme="light"] .ln-warning-box {
  background: rgba(var(--color-custom-rgb), 0.08);
  color: #92400e;
}

/* ── Lightning: Status badges ── */
.ln-status-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 10px;
  border-radius: 9999px;
}
.ln-status-green {
  background: rgba(var(--color-bull-rgb), 0.12);
  color: #34d399;
  border: 1px solid rgba(var(--color-bull-rgb), 0.2);
}
.ln-status-yellow {
  background: rgba(var(--color-custom-rgb), 0.12);
  color: #fbbf24;
  border: 1px solid rgba(var(--color-custom-rgb), 0.2);
}
[data-theme="light"] .ln-status-green {
  color: #065f46;
}
[data-theme="light"] .ln-status-yellow {
  color: #92400e;
}

/* ── Lightning: Recommendation cards ── */
.ln-rec-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--glass);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ln-rec-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}
.ln-rec-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.ln-rec-card h4 {
  margin: 0 0 8px;
  font-size: var(--text-md);
}
.ln-rec-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.ln-rec-green {
  border-color: rgba(var(--color-bull-rgb), 0.2);
}
.ln-rec-green::before {
  background: linear-gradient(180deg, #10b981, #34d399);
}
.ln-rec-yellow {
  border-color: rgba(var(--color-custom-rgb), 0.2);
}
.ln-rec-yellow::before {
  background: linear-gradient(180deg, #f59e0b, #fbbf24);
}
.ln-rec-red {
  border-color: rgba(var(--color-bear-rgb), 0.2);
}
.ln-rec-red::before {
  background: linear-gradient(180deg, #ef4444, #f87171);
}

/* ═══════════════════════════════
   GAME THEORY / THESIS VIEW
   ═══════════════════════════════ */
/* Hero styling handled by .module-hero */

.gt-chip {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 4px 10px;
  font-size: var(--text-sm);
}
.gt-chip-link {
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
}
.gt-chip-link:hover {
  background: var(--glass-border);
  border-color: var(--color-accent, #f7931a);
}

/* Cards */
.gt-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeInUp 0.5s ease-out both;
}
.gt-card:nth-of-type(1) { animation-delay: 0.05s; }
.gt-card:nth-of-type(2) { animation-delay: 0.1s; }
.gt-card:nth-of-type(3) { animation-delay: 0.15s; }
.gt-card:nth-of-type(4) { animation-delay: 0.2s; }
.gt-card:nth-of-type(5) { animation-delay: 0.25s; }
.gt-card:nth-of-type(6) { animation-delay: 0.3s; }
.gt-card:nth-of-type(7) { animation-delay: 0.35s; }
.gt-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--brand);
  font-size: var(--text-xl);
}
.gt-muted {
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* Grid */
.gt-grid {
  display: grid;
  gap: 12px;
}
.gt-grid-2 {
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .gt-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Points */
.gt-point {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--glass);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.gt-point:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 0 16px rgba(var(--color-accent-rgb), 0.06);
}
.gt-point h4 {
  margin: 0 0 8px;
  font-size: var(--text-md);
}
.gt-point p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}

/* Prisoner's Dilemma Levels */
.gt-levels {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gt-level-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.gt-level-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 0 20px rgba(var(--color-accent-rgb), 0.06);
}
.gt-level-icon {
  font-size: var(--text-3xl);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2px;
}
.gt-level-body h4 {
  margin: 0 0 6px;
  font-size: var(--text-md);
}
.gt-level-body > p {
  margin: 0 0 12px;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.gt-outcomes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gt-outcome {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-muted);
}
.gt-outcome.adopt {
  background: rgba(var(--color-bull-rgb), 0.08);
  border: 1px solid rgba(var(--color-bull-rgb), 0.15);
}
.gt-outcome.wait {
  background: rgba(var(--color-bear-rgb), 0.08);
  border: 1px solid rgba(var(--color-bear-rgb), 0.15);
}
.gt-outcome-label {
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  min-width: 90px;
}
.gt-outcome.adopt .gt-outcome-label {
  color: #10b981;
}
.gt-outcome.wait .gt-outcome-label {
  color: #ef4444;
}

/* Timeline / Stages */
.gt-timeline {
  margin-bottom: 8px;
}
.gt-stage-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.gt-stage-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 0 20px rgba(var(--color-accent-rgb), 0.06);
}
.gt-stage-number {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--brand), var(--color-accent-light));
  color: #111;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gt-stage-body h4 {
  margin: 0 0 4px;
}
.gt-stage-period {
  display: inline-block;
  font-size: var(--text-sm);
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.gt-stage-body p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}

/* Thinkers */
.gt-thinker-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--glass);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.gt-thinker-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 0 16px rgba(var(--color-accent-rgb), 0.06);
}
.gt-thinker-card h4 {
  margin: 0 0 4px;
  font-size: var(--text-md);
}
.gt-thinker-concept {
  display: inline-block;
  font-size: var(--text-sm);
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 8px;
}
.gt-thinker-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}

/* Extra card animation delays for expanded sections */
.gt-card:nth-of-type(8) { animation-delay: 0.4s; }
.gt-card:nth-of-type(9) { animation-delay: 0.45s; }
.gt-card:nth-of-type(10) { animation-delay: 0.5s; }
.gt-card:nth-of-type(11) { animation-delay: 0.55s; }
.gt-card:nth-of-type(12) { animation-delay: 0.6s; }
.gt-card:nth-of-type(13) { animation-delay: 0.65s; }
.gt-card:nth-of-type(14) { animation-delay: 0.7s; }

/* Source references */
.gt-source {
  display: block;
  margin-top: 8px;
  font-size: var(--text-sm);
  color: var(--brand);
  font-style: italic;
  opacity: 0.85;
}

/* ── Comparison Table (Sound Money) ── */
.gt-comparison-wrap {
  margin-top: 16px;
  margin-bottom: 16px;
}

/* Desktop: scrollable table */
.gt-comparison-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}
.gt-comparison-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: var(--text-base);
  line-height: 1.5;
}
.gt-comparison-table thead th {
  position: sticky;
  top: 0;
  background: var(--color-card-bg);
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-size: var(--text-md);
  border-bottom: 2px solid var(--glass-border);
  white-space: nowrap;
}
.gt-comparison-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--color-muted);
  vertical-align: top;
}
.gt-comparison-table tbody tr:last-child td {
  border-bottom: none;
}
.gt-comparison-table tbody tr:hover {
  background: rgba(var(--color-accent-rgb), 0.03);
}
.gt-comparison-property-header {
  min-width: 120px;
}
.gt-comparison-property {
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  min-width: 120px;
}
/* Bitcoin column highlight */
.gt-comparison-highlight {
  background: rgba(var(--color-accent-rgb), 0.06);
  border-left: 2px solid rgba(var(--color-accent-rgb), 0.25);
  border-right: 2px solid rgba(var(--color-accent-rgb), 0.25);
}
thead .gt-comparison-highlight {
  color: var(--brand);
  border-top: 2px solid rgba(var(--color-accent-rgb), 0.25);
}
tbody tr:last-child .gt-comparison-highlight {
  border-bottom: 2px solid rgba(var(--color-accent-rgb), 0.25);
}

/* Mobile: stacked cards (hidden on desktop) */
.gt-comparison-cards {
  display: none;
}
@media (max-width: 640px) {
  .gt-comparison-table-scroll {
    display: none;
  }
  .gt-comparison-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .gt-comparison-card {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--glass);
  }
  .gt-comparison-card h4 {
    margin: 0 0 12px;
    font-size: var(--text-md);
  }
  .gt-comparison-card-highlight {
    border-color: rgba(var(--color-accent-rgb), 0.3);
    background: rgba(var(--color-accent-rgb), 0.04);
  }
  .gt-comparison-card-highlight h4 {
    color: var(--brand);
  }
  .gt-comparison-card-row {
    padding: 8px 0;
    border-bottom: 1px solid var(--glass-border);
  }
  .gt-comparison-card-row:last-child {
    border-bottom: none;
  }
  .gt-comparison-card-label {
    display: block;
    font-weight: 600;
    font-size: var(--text-base);
    margin-bottom: 4px;
    color: var(--color-text);
  }
  .gt-comparison-card-value {
    display: block;
    font-size: var(--text-base);
    color: var(--color-muted);
    line-height: 1.5;
  }
}

/* ── Risks & Counterarguments ── */
.gt-risks {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gt-risk-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--glass);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.gt-risk-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 0 16px rgba(var(--color-accent-rgb), 0.06);
}
.gt-risk-main {
  padding: 16px;
}
.gt-risk-main h4 {
  margin: 0 0 8px;
  font-size: var(--text-md);
}
.gt-risk-main p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.gt-risk-counterpoint {
  padding: 14px 16px;
  background: rgba(var(--color-bull-rgb), 0.06);
  border-top: 1px solid rgba(var(--color-bull-rgb), 0.12);
}
.gt-counterpoint-label {
  display: inline-block;
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #10b981;
  margin-bottom: 6px;
}
.gt-risk-counterpoint p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}

/* Footnote */
.gt-footnote {
  text-align: center;
  margin-top: 32px;
  font-size: 0.85em;
}

/* ── Quotes (Sound Money callouts) ── */
.gt-quotes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}
.gt-quote {
  border-left: 3px solid var(--brand);
  padding: 14px 18px;
  margin: 0;
  background: var(--glass);
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: all 0.3s ease;
}
.gt-quote:hover {
  border-left-color: var(--color-accent-light);
  background: rgba(var(--color-accent-rgb), 0.04);
}
.gt-quote p {
  margin: 0 0 8px;
  font-size: var(--text-md);
  line-height: 1.6;
  font-style: italic;
  color: var(--color-text);
}
.gt-quote footer {
  font-size: var(--text-base);
  color: var(--color-muted);
}
.gt-quote footer strong {
  color: var(--brand);
}
.gt-quote footer cite {
  font-style: normal;
  opacity: 0.8;
}

/* ── Thesis Flow Diagram ── */
.gt-flow-wrapper {
  margin: 0 0 2rem 0;
}

.gt-flow {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

/* Subtle orange glow top-center matching gt-card aesthetic */
.gt-flow::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 150px;
  background: radial-gradient(ellipse, rgba(var(--color-accent-rgb), 0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* Title — matches gt-card h3 styling */
.gt-flow-title {
  margin: 0 0 20px 0;
  color: var(--brand);
  font-size: var(--text-xl);
  font-weight: 700;
  text-align: center;
}

/* Scrollable track */
.gt-flow-track {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--color-accent-rgb), 0.2) transparent;
}

.gt-flow-track::-webkit-scrollbar {
  height: 3px;
}
.gt-flow-track::-webkit-scrollbar-thumb {
  background: rgba(var(--color-accent-rgb), 0.2);
  border-radius: var(--radius-xs);
}

/* Individual node */
.gt-flow-node {
  flex-shrink: 0;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  /* Fixed size — prevents inconsistent boxes */
  width: 96px;
  min-width: 96px;
  /* Animation initial state */
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.35s ease var(--flow-delay, 0ms),
    transform 0.35s ease var(--flow-delay, 0ms),
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.gt-flow-node--visible {
  opacity: 1;
  transform: translateY(0);
}

.gt-flow-node:hover,
.gt-flow-node:focus-visible {
  border-color: rgba(var(--color-accent-rgb), 0.4);
  background: rgba(var(--color-accent-rgb), 0.06);
  box-shadow: 0 4px 16px rgba(var(--color-accent-rgb), 0.12), 0 0 0 1px rgba(var(--color-accent-rgb), 0.15);
  outline: none;
  transform: translateY(-2px);
}

.gt-flow-node:active {
  transform: translateY(0px);
}

/* Inner layout — consistent vertical stack */
.gt-flow-node-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 12px 8px 10px;
  height: 100%;
  box-sizing: border-box;
}

/* Step number */
.gt-flow-num {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(var(--color-accent-rgb), 0.5);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Emoji icon */
.gt-flow-icon {
  font-size: var(--text-2xl);
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Label */
.gt-flow-label {
  font-size: var(--text-xs);
  font-weight: 500;
  text-align: center;
  color: var(--color-muted);
  line-height: 1.25;
  max-width: 80px;
}

/* Connector between nodes */
.gt-flow-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  gap: 2px;
  padding-bottom: 14px; /* align with icon center */
}

.gt-flow-connector-line {
  width: 16px;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--color-accent-rgb), 0.25), rgba(var(--color-accent-rgb), 0.5));
}

.gt-flow-connector-arrow {
  font-size: var(--text-xs);
  color: rgba(var(--color-accent-rgb), 0.45);
  line-height: 1;
  margin-top: -2px;
}

/* Live value highlight */
.gt-live-value {
  color: var(--color-accent);
  font-weight: 600;
}

.gt-live-stale {
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: center;
  padding: 0.2rem 0 0.5rem;
  opacity: 0.6;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gt-flow-node {
    opacity: 1;
    transform: none;
    transition: border-color 0.15s, background 0.15s;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .gt-flow {
    padding: 20px 12px 16px;
    overflow: visible;
  }
  .gt-flow-track {
    -webkit-overflow-scrolling: touch;
  }
  .gt-flow-node {
    width: 90px;
    min-width: 90px;
    max-width: 100px;
    flex-shrink: 0;
  }
  .gt-flow-node-inner {
    padding: 8px 6px 8px;
    gap: 5px;
  }
  .gt-flow-icon {
    font-size: var(--text-xl);
  }
  .gt-flow-label {
    font-size: var(--text-xs);
    max-width: 74px;
    word-break: break-word;
    hyphens: auto;
  }
  .gt-flow-connector {
    width: 16px;
  }
  .gt-flow-connector-line {
    width: 8px;
  }
}

/* ═══════════════════════════════
   MULTISIG GUIDE
   ═══════════════════════════════ */

/* Setup comparison cards */
.ms-setup-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .ms-setup-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}
.ms-setup-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ms-setup-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 0 16px rgba(var(--color-accent-rgb), 0.06);
}
.ms-setup-card--recommended {
  border-color: rgba(var(--color-accent-rgb), 0.35);
  box-shadow: 0 0 20px rgba(var(--color-accent-rgb), 0.08);
}
.ms-setup-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--brand);
  color: #000;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius);
}
.ms-setup-card h4 {
  margin: 0 0 2px;
  font-size: var(--text-lg);
}
.ms-setup-subtitle {
  display: block;
  color: var(--muted);
  font-size: var(--text-base);
  margin-bottom: 14px;
}
.ms-setup-row {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  font-size: var(--text-md);
  line-height: 1.5;
  border-bottom: 1px solid var(--glass-border);
  color: var(--color-muted);
}
.ms-setup-row:last-of-type {
  border-bottom: none;
}
.ms-setup-label {
  font-weight: 600;
  flex-shrink: 0;
  min-width: 85px;
  color: var(--color-text);
}
.ms-setup-warning {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: rgba(var(--color-bear-rgb), 0.08);
  border: 1px solid rgba(var(--color-bear-rgb), 0.2);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-muted);
}
.ms-setup-warning strong {
  color: #ef4444;
}

/* Trade-offs table */
.ms-tradeoffs-wrap {
  /* wrapper */
}
.ms-tradeoffs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-md);
}
.ms-tradeoffs-table thead th {
  text-align: left;
  padding: 10px 14px;
  background: var(--glass);
  border-bottom: 2px solid var(--glass-border);
  font-weight: 700;
  font-size: var(--text-base);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
}
.ms-tradeoffs-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--glass-border);
  line-height: 1.5;
  color: var(--color-muted);
}
.ms-tradeoffs-table tbody tr:last-child td {
  border-bottom: none;
}
.ms-tradeoffs-table tbody tr:hover {
  background: rgba(var(--color-accent-rgb), 0.03);
}

/* Stacked layout for mobile */
.ms-tradeoffs-stacked {
  display: none;
}
@media (max-width: 640px) {
  .ms-tradeoffs-table {
    display: none;
  }
  .ms-tradeoffs-stacked {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
}
.ms-tradeoff-item {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ms-tradeoff-adv,
.ms-tradeoff-con {
  padding: 10px 14px;
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-muted);
}
.ms-tradeoff-adv {
  background: rgba(var(--color-bull-rgb), 0.06);
  border-bottom: 1px solid var(--glass-border);
}
.ms-tradeoff-con {
  background: rgba(var(--color-bear-rgb), 0.04);
}
.ms-tradeoff-label {
  display: block;
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.ms-tradeoff-adv .ms-tradeoff-label {
  color: #10b981;
}
.ms-tradeoff-con .ms-tradeoff-label {
  color: #ef4444;
}

/* ── MuSig2 Comparison Table ── */
.ms-comparison-wrap {
  margin-top: 16px;
  margin-bottom: 16px;
}
.ms-comparison-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}
.ms-comparison-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: var(--text-base);
  line-height: 1.5;
}
.ms-comparison-table thead th {
  position: sticky;
  top: 0;
  background: var(--color-card-bg);
  padding: 12px 14px;
  font-weight: 700;
  text-align: left;
  border-bottom: 2px solid var(--glass-border);
  white-space: nowrap;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
}
.ms-comparison-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--color-muted);
  vertical-align: top;
}
.ms-comparison-table tbody tr:last-child td {
  border-bottom: none;
}
.ms-comparison-table tbody tr:hover {
  background: rgba(var(--color-accent-rgb), 0.03);
}
.ms-comparison-property-header {
  min-width: 120px;
}
.ms-comparison-property {
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  min-width: 120px;
}

/* Mobile stacked cards (hidden on desktop) */
.ms-comparison-cards {
  display: none;
}
@media (max-width: 640px) {
  .ms-comparison-scroll {
    display: none;
  }
  .ms-comparison-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
}
.ms-comparison-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--glass);
}
.ms-comparison-card h4 {
  margin: 0 0 10px;
  font-size: var(--text-md);
  color: var(--brand);
}
.ms-comparison-card-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px solid var(--glass-border);
  color: var(--color-muted);
  font-size: var(--text-base);
  line-height: 1.5;
}
.ms-comparison-card-row:last-child {
  border-bottom: none;
}
.ms-comparison-card-label {
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

/* ── Multisig Signing Simulator — Keyframe Animations ── */
@keyframes ms-viz-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@keyframes ms-viz-glow-pulse {
  0%, 100% { box-shadow: 0 0 16px rgba(var(--color-accent-rgb), 0.35); }
  50% { box-shadow: 0 0 28px rgba(var(--color-accent-rgb), 0.6); }
}
@keyframes ms-viz-lost-shake {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(0.95) rotate(-3deg); }
  40% { transform: scale(0.95) rotate(3deg); }
  60% { transform: scale(0.95) rotate(-2deg); }
  80% { transform: scale(1); }
}
@keyframes ms-viz-lock-unlock {
  0% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-15deg) scale(1.1); }
  40% { transform: rotate(10deg) scale(1.2); }
  60% { transform: rotate(-5deg) scale(1.25); }
  80% { transform: rotate(3deg) scale(1.2); }
  100% { transform: rotate(0deg) scale(1.2); }
}
@keyframes ms-viz-check-fade {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes ms-viz-counter-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes ms-viz-green-glow {
  0% { box-shadow: 0 0 0 rgba(var(--color-bull-rgb), 0); }
  50% { box-shadow: 0 0 30px rgba(var(--color-bull-rgb), 0.3); }
  100% { box-shadow: 0 0 20px rgba(var(--color-bull-rgb), 0.15); }
}

/* ── Multisig Signing Simulator ── */
.ms-viz-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0 0;
  flex-wrap: wrap;
}
.ms-viz-sel-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ms-viz-ctrl-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}
.ms-viz-select {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 6px 12px;
  color: var(--color-text);
  font-size: var(--text-base);
  cursor: pointer;
  outline: none;
}
.ms-viz-select:focus {
  border-color: rgba(var(--color-accent-rgb), 0.4);
}
.ms-viz-lose-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-base);
  color: var(--color-muted);
  cursor: pointer;
  user-select: none;
}
.ms-viz-lose-chk {
  accent-color: var(--brand);
}
.ms-viz-mode-hint {
  font-size: var(--text-sm);
  color: #ef4444;
  margin: 8px 0 0;
  font-style: italic;
}
.ms-viz-area {
  position: relative;
  padding: 24px 0 8px;
}
.ms-viz-area--lose {
  border-radius: var(--radius-lg);
  background: rgba(var(--color-bear-rgb), 0.03);
}
.ms-viz-keys {
  display: flex;
  justify-content: space-evenly;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.ms-viz-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}
.ms-viz-key:hover {
  transform: scale(1.08);
}
.ms-viz-key:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
  border-radius: var(--radius);
}
.ms-viz-key-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  background: var(--glass);
  border: 2px solid var(--glass-border);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease,
    opacity 0.3s ease, filter 0.3s ease;
  opacity: 0.6;
  filter: grayscale(0.3);
}
.ms-viz-key-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  transition: color 0.3s ease;
}

/* Key state label (✓ Signed / ✗ Lost) */
.ms-viz-key-state {
  font-size: var(--text-xs);
  font-weight: 600;
  min-height: 16px;
  transition: color 0.3s ease;
  color: transparent;
}

/* Signed key */
.ms-viz-key--signed {
  animation: ms-viz-bounce 0.35s ease;
}
.ms-viz-key--signed .ms-viz-key-icon {
  border-color: var(--brand);
  box-shadow: 0 0 16px rgba(var(--color-accent-rgb), 0.35);
  background: rgba(var(--color-accent-rgb), 0.1);
  opacity: 1;
  filter: none;
  animation: ms-viz-glow-pulse 2s ease-in-out infinite;
}
.ms-viz-key--signed .ms-viz-key-label {
  color: var(--brand);
}
.ms-viz-key--signed .ms-viz-key-state {
  color: var(--brand);
  animation: ms-viz-check-fade 0.3s ease;
}

/* Lost key */
.ms-viz-key--lost {
  animation: ms-viz-lost-shake 0.4s ease;
}
.ms-viz-key--lost .ms-viz-key-icon {
  border-color: rgba(var(--color-bear-rgb), 0.3);
  background: rgba(var(--color-bear-rgb), 0.08);
  opacity: 0.5;
  filter: grayscale(0.5);
}
.ms-viz-key--lost .ms-viz-key-label {
  color: #ef4444;
  text-decoration: line-through;
}
.ms-viz-key--lost .ms-viz-key-state {
  color: #ef4444;
  animation: ms-viz-check-fade 0.3s ease;
}

/* SVG connector lines */
.ms-viz-lines {
  display: block;
  width: 100%;
  height: 48px;
}
.ms-viz-line {
  stroke: var(--glass-border);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  transition: stroke 0.3s ease;
}
.ms-viz-line--active {
  stroke: var(--brand);
  stroke-dasharray: none;
  stroke-width: 2.5;
}
.ms-viz-line--lost {
  stroke: rgba(var(--color-bear-rgb), 0.25);
  stroke-dasharray: 4 6;
}

/* Flow arrows (mobile connectors — hidden on desktop) */
.ms-viz-flow-arrow {
  display: none;
}

/* Mobile signing pipeline (hidden on desktop) */
.ms-viz-pipeline {
  display: none;
}

/* Transaction box */
.ms-viz-tx {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  max-width: 280px;
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 2px solid var(--glass-border);
  transition: border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.ms-viz-lock {
  font-size: var(--text-xl);
  transition: transform 0.3s ease;
}
.ms-viz-tx-label {
  font-weight: 600;
  font-size: var(--text-md);
}
.ms-viz-tx-status {
  width: 100%;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: 4px;
  animation: ms-viz-check-fade 0.3s ease;
}
.ms-viz-tx--complete {
  border-color: #10b981;
  background: rgba(var(--color-bull-rgb), 0.1);
  animation: ms-viz-green-glow 0.6s ease;
  box-shadow: 0 0 20px rgba(var(--color-bull-rgb), 0.15);
}
.ms-viz-tx--complete .ms-viz-lock {
  animation: ms-viz-lock-unlock 0.5s ease forwards;
}
.ms-viz-tx--complete .ms-viz-tx-status {
  color: #10b981;
  font-weight: 600;
}
.ms-viz-tx--failed {
  border-color: rgba(var(--color-bear-rgb), 0.4);
  background: rgba(var(--color-bear-rgb), 0.08);
  box-shadow: 0 0 16px rgba(var(--color-bear-rgb), 0.1);
}
.ms-viz-tx--failed .ms-viz-tx-status {
  color: #ef4444;
  font-weight: 600;
}

/* Status text (animated) */
.ms-viz-status {
  text-align: center;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-muted);
  margin-top: 16px;
}
.ms-viz-status-text {
  display: inline-block;
  animation: ms-viz-counter-pop 0.3s ease;
}

/* Message */
.ms-viz-message {
  text-align: center;
  font-size: var(--text-base);
  min-height: 22px;
  margin-top: 8px;
}
.ms-viz-message:empty {
  display: none;
}
.ms-viz-message--success {
  color: #10b981;
  font-weight: 600;
  animation: ms-viz-check-fade 0.3s ease;
}
.ms-viz-message--warn {
  color: #ef4444;
  font-weight: 600;
}
.ms-viz-message--info {
  color: var(--color-muted);
  font-style: italic;
}

/* Reset button */
.ms-viz-reset {
  display: block;
  margin: 16px auto 0;
}

/* ── Responsive: mobile signing experience (<500px) ── */
@media (max-width: 480px) {
  .ms-viz-keys {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .ms-viz-key {
    padding: 4px 0;
  }
  .ms-viz-key-icon {
    width: 48px;
    height: 48px;
    font-size: var(--text-xl);
  }

  /* Hide SVG lines on mobile */
  .ms-viz-lines {
    display: none;
  }

  /* Show flow arrows between keys */
  .ms-viz-flow-arrow {
    display: block;
    width: 2px;
    height: 24px;
    background: var(--glass-border);
    position: relative;
    transition: background 0.3s ease;
  }
  .ms-viz-flow-arrow::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--glass-border);
    transition: border-top-color 0.3s ease;
  }
  .ms-viz-flow-arrow--active {
    background: var(--brand);
  }
  .ms-viz-flow-arrow--active::after {
    border-top-color: var(--brand);
  }
  .ms-viz-flow-arrow--lost {
    background: rgba(var(--color-bear-rgb), 0.25);
  }
  .ms-viz-flow-arrow--lost::after {
    border-top-color: rgba(var(--color-bear-rgb), 0.25);
  }

  /* Show mobile signing pipeline */
  .ms-viz-pipeline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px auto;
    max-width: 220px;
  }
  .ms-viz-pipeline-bar {
    flex: 1;
    height: 6px;
    border-radius: var(--radius-xs);
    background: var(--glass-border);
    overflow: hidden;
  }
  .ms-viz-pipeline-fill {
    height: 100%;
    border-radius: var(--radius-xs);
    background: var(--brand);
    transition: width 0.4s ease, background 0.3s ease;
    width: 0;
  }
  .ms-viz-pipeline--complete .ms-viz-pipeline-fill {
    background: #10b981;
  }
  .ms-viz-pipeline--failed .ms-viz-pipeline-fill {
    background: #ef4444;
  }
  .ms-viz-pipeline-text {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-muted);
    min-width: 32px;
    text-align: center;
  }
  .ms-viz-pipeline--complete .ms-viz-pipeline-text {
    color: #10b981;
  }
  .ms-viz-pipeline--failed .ms-viz-pipeline-text {
    color: #ef4444;
  }
}

/* ═══════════════════════════════
   GLOSSARY VIEW
   ═══════════════════════════════ */
/* Hero styling handled by .module-hero */

.gl-search-wrap {
  max-width: 500px;
  margin: 0 auto;
}
.gl-search {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--color-card-bg);
  color: var(--color-text);
  font-size: var(--text-md);
  outline: none;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.gl-search:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.12);
}
.gl-letter-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}
.gl-letter-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-muted);
  transition: all 0.2s;
}
.gl-letter-btn:hover {
  background: rgba(var(--color-accent-rgb), 0.08);
  color: var(--color-accent);
  border-color: rgba(var(--color-accent-rgb), 0.2);
}
.gl-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0 4px;
}
.gl-stat {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-dim);
}
.gl-filter-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--color-accent);
  transition: all 0.2s;
  margin-left: auto;
}
.gl-filter-btn:hover {
  background: rgba(var(--color-accent-rgb), 0.08);
}
.gl-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gl-letter-group {
  margin-bottom: 16px;
}
.gl-letter-header {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-accent);
  padding: 8px 4px 4px;
  border-bottom: 2px solid rgba(var(--color-accent-rgb), 0.15);
  margin-bottom: 8px;
}
.gl-term-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 6px;
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.gl-term-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 0 12px rgba(var(--color-accent-rgb), 0.04);
}
.gl-term-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}
.gl-term-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.gl-term-name {
  font-size: var(--text-md);
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}
.gl-term-def {
  font-size: var(--text-md);
  color: var(--color-muted);
  margin: 0;
  line-height: 1.6;
}
.gl-bookmark-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-lg);
  color: var(--color-dim);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 2px 4px;
  border-radius: var(--radius-xs);
}
.gl-bookmark-btn:hover {
  color: var(--color-accent);
  transform: scale(1.2);
}
.gl-bookmark-btn:active {
  transform: scale(0.9);
}
.gl-bookmark-btn.active {
  color: var(--color-accent);
  filter: drop-shadow(0 0 4px rgba(var(--color-accent-rgb), 0.4));
}
.gl-footnote {
  text-align: center;
  margin-top: 32px;
  font-size: 0.85em;
}

/* ═══════════════════════════════
   GLOSSARY INLINE TOOLTIPS
   ═══════════════════════════════ */
.gl-tooltip {
  border-bottom: 1px dotted rgba(var(--color-accent-rgb), 0.4);
  cursor: help;
  position: relative;
}
.gl-tooltip:hover {
  color: var(--color-accent);
}
.gl-tooltip:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 8px);
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 12px;
  border-radius: var(--radius);
  white-space: normal;
  min-width: 200px;
  max-width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  font-size: var(--text-xs);
  font-weight: 400;
  color: #e0e0e0;
  z-index: 100;
  backdrop-filter: blur(12px);
  line-height: 1.5;
  pointer-events: none;
}

/* ═══════════════════════════════
   GLOSSARY CATEGORY CHIPS & BADGES
   ═══════════════════════════════ */
.gl-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.gl-cat-chip {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 6px 14px;
  font-size: var(--text-sm);
  color: var(--color-dim);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.gl-cat-chip:hover {
  border-color: rgba(var(--color-accent-rgb), 0.3);
  color: var(--color-text);
  background: rgba(var(--color-accent-rgb), 0.06);
}
.gl-cat-chip.active {
  background: linear-gradient(135deg, rgba(var(--color-accent-rgb),0.15), rgba(var(--color-accent-rgb),0.08));
  border-color: rgba(var(--color-accent-rgb), 0.4);
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 0 16px rgba(var(--color-accent-rgb), 0.1);
}
/* Per-term category badge */
.gl-cat-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.gl-cat-badge:hover {
  filter: brightness(1.15);
}
.gl-cat-basics       { background: rgba(var(--color-accent-rgb), 0.12); color: var(--brand); }
.gl-cat-consensus    { background: rgba(139, 92, 246, 0.12); color: #a78bfa; }
.gl-cat-economics    { background: rgba(234, 179, 8, 0.12); color: #facc15; }
.gl-cat-mining       { background: rgba(var(--color-bear-rgb), 0.12); color: #f87171; }
.gl-cat-privacy      { background: rgba(var(--color-bull-rgb), 0.12); color: #34d399; }
.gl-cat-scaling      { background: rgba(var(--color-base-rgb), 0.12); color: #60a5fa; }
.gl-cat-security     { background: rgba(251, 146, 60, 0.12); color: #fb923c; }
.gl-cat-wallets-keys { background: rgba(var(--color-custom-rgb), 0.12); color: #fbbf24; }
/* See-also link line */
.gl-see-also {
  font-size: var(--text-base);
  color: var(--color-dim);
  margin: 6px 0 0;
  line-height: 1.5;
}
.gl-see-also a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px dotted rgba(var(--color-accent-rgb), 0.3);
  transition: border-color 0.2s;
}
.gl-see-also a:hover {
  border-bottom-color: var(--color-accent);
}

/* ═══════════════════════════════
   FAQ VIEW
   ═══════════════════════════════ */
/* Hero styling handled by .module-hero */

.fq-search-wrap {
  max-width: 500px;
  margin: 0 auto;
}
.fq-search {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--color-card-bg);
  color: var(--color-text);
  font-size: var(--text-md);
  outline: none;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.fq-search:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.12);
}
.fq-categories {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.fq-category {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.fq-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}
.fq-category-icon {
  font-size: var(--text-2xl);
}
.fq-category-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  flex: 1;
}
.fq-category-count {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(var(--color-accent-rgb), 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.fq-questions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fq-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.fq-item summary {
  padding: 12px 16px;
  color: var(--color-text);
  transition: background 0.2s;
  font-size: var(--text-md);
}
.fq-item summary:hover {
  background: var(--color-surface-2);
}
.fq-answer p {
  padding: 0 16px 14px;
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.7;
}
.fq-cta-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Explore Further Cards ── */
.explore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.explore-grid .explore-card:first-child {
  grid-column: 1 / -1;
}
.explore-grid .explore-card:last-child:nth-child(even) {
  grid-column: 1 / -1;
}
.explore-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  color: var(--color-accent);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-md);
}
.explore-card:hover {
  background: rgba(var(--color-accent-rgb), 0.08);
}
.explore-card-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.explore-card-arrow {
  font-style: normal;
  transition: transform 0.2s ease;
}
.explore-card:hover .explore-card-arrow {
  transform: translateX(3px);
}
@media (max-width: 480px) {
  .explore-grid {
    grid-template-columns: 1fr;
  }
}

.fq-footnote {
  text-align: center;
  margin-top: 32px;
  font-size: 0.85em;
}

/* ── FAQ Category Filter Chips ── */
.fq-filters {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 0 24px;
  text-align: center;
}
.fq-filters-scroll {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 8px;
}
.fq-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 6px 14px;
  font-size: var(--text-sm);
  font-family: inherit;
  color: var(--color-dim);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.fq-filter-chip:hover {
  border-color: rgba(var(--color-accent-rgb), 0.3);
  color: var(--color-text);
  background: rgba(var(--color-accent-rgb), 0.06);
}
.fq-filter-chip.active {
  background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.15), rgba(var(--color-accent-rgb), 0.08));
  border-color: rgba(var(--color-accent-rgb), 0.4);
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 0 16px rgba(var(--color-accent-rgb), 0.1);
}
.fq-chip-icon {
  font-size: var(--text-base);
}
.fq-chip-label {
  font-size: var(--text-sm);
}

/* ═══════════════════════════════
   RESPONSIVE — NEW SECTIONS
   ═══════════════════════════════ */
@media (max-width: 640px) {
  .module-hero {
    padding: 24px 16px 16px;
    margin-bottom: 16px;
  }
  .module-hero-icon {
    font-size: 3.5rem;
    margin-bottom: 4px;
  }
  .module-hero-title {
    font-size: var(--text-2xl);
    margin-bottom: 2px;
  }
  .module-hero-sub {
    font-size: var(--text-sm);
    margin-bottom: 6px;
  }
  .module-hero .calc-chip {
    padding: 4px 10px;
    font-size: var(--text-xs);
  }
  .price-hero {
    font-size: var(--text-3xl);
  }
  .ln-step-card,
  .mg-step-card,
  .ng-step-card {
    grid-template-columns: 36px 1fr;
    padding: 12px;
  }
  .ln-step-number,
  .mg-step-number,
  .ng-step-number {
    width: 30px;
    height: 30px;
    font-size: var(--text-base);
  }
  .gl-letter-nav {
    gap: 2px;
  }
  .gl-letter-btn {
    padding: 3px 7px;
    font-size: var(--text-xs);
  }
  .fq-category {
    padding: 16px;
  }
}
@media (max-width: 480px) {
  .subtab-group-pills {
    gap: 4px;
  }
  .tab-button {
    padding: 6px 10px;
    font-size: 0.65rem;
  }
  .section-hero-nav {
    padding: 4px 0;
  }
}

/* ═══════════════════════════════
   TIMELINE VIEW
   ═══════════════════════════════ */

/* Hero styling handled by .module-hero */

/* Hero Stats */
.tl-hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 20px;
}
.tl-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tl-stat-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--brand);
}
.tl-stat-label {
  font-size: var(--text-sm);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Filter Chips */
.tl-filters {
  margin-bottom: 24px;
  text-align: center;
}
.tl-filters-scroll {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 8px;
}
.tl-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 6px 14px;
  font-size: var(--text-sm);
  font-family: inherit;
  color: var(--color-muted);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.tl-filter-chip:hover {
  border-color: rgba(var(--color-accent-rgb), 0.3);
  color: var(--color-text);
  background: rgba(var(--color-accent-rgb), 0.06);
}
.tl-filter-chip.active {
  background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.15), rgba(var(--color-accent-rgb), 0.08));
  border-color: rgba(var(--color-accent-rgb), 0.4);
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 0 16px rgba(var(--color-accent-rgb), 0.1);
}
.tl-chip-icon {
  font-size: var(--text-base);
}
.tl-active-count {
  margin-top: 10px;
  font-size: var(--text-base);
  color: var(--muted);
}

/* Timeline Container */
.tl-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px 40px;
}
.tl-line {
  position: absolute;
  left: 32px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(var(--color-accent-rgb), 0.4) 0%,
    rgba(var(--color-accent-rgb), 0.15) 50%,
    rgba(var(--color-accent-rgb), 0.4) 100%
  );
  border-radius: var(--radius-xs);
}

/* Year Marker */
.tl-year-marker {
  position: relative;
  margin: 32px 0 20px 0;
  padding-left: 56px;
}
.tl-year-marker:first-child {
  margin-top: 0;
}
.tl-year-marker span {
  display: inline-block;
  font-size: var(--text-2xl);
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--color-accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  position: relative;
}
.tl-year-marker::before {
  content: '';
  position: absolute;
  left: 25px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--color-accent-light));
  box-shadow: 0 0 12px rgba(var(--color-accent-rgb), 0.3);
}

/* Event Card */
.tl-event {
  position: relative;
  padding-left: 56px;
  margin-bottom: 16px;
  animation: fadeInUp 0.5s ease-out both;
}
.tl-event-dot {
  position: absolute;
  left: 27px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-secondary-bg);
  border: 2px solid rgba(var(--color-accent-rgb), 0.5);
  transition: all 0.3s ease;
  z-index: 1;
}
.tl-event:hover .tl-event-dot {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.4);
}
.tl-event-content {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tl-event:hover .tl-event-content {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 20px rgba(var(--color-accent-rgb), 0.06);
}
.tl-event-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.tl-event-date {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.02em;
}
.tl-event-cat {
  font-size: var(--text-xs);
  color: var(--muted);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}
.tl-event-title {
  margin: 0 0 8px;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
}
.tl-event-desc {
  margin: 0 0 12px;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.tl-event-significance {
  background: rgba(var(--color-accent-rgb), 0.04);
  border: 1px solid rgba(var(--color-accent-rgb), 0.1);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.tl-sig-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
  margin-bottom: 4px;
}
.tl-event-significance p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.55;
}

/* Category color accents on dots */
.tl-event[data-category="genesis"] .tl-event-dot { border-color: #a78bfa; }
.tl-event[data-category="genesis"]:hover .tl-event-dot { background: #a78bfa; }
.tl-event[data-category="adoption"] .tl-event-dot { border-color: #10b981; }
.tl-event[data-category="adoption"]:hover .tl-event-dot { background: #10b981; }
.tl-event[data-category="price"] .tl-event-dot { border-color: #3b82f6; }
.tl-event[data-category="price"]:hover .tl-event-dot { background: #3b82f6; }
.tl-event[data-category="halving"] .tl-event-dot { border-color: var(--brand); }
.tl-event[data-category="halving"]:hover .tl-event-dot { background: var(--brand); }
.tl-event[data-category="institutional"] .tl-event-dot { border-color: #f59e0b; }
.tl-event[data-category="institutional"]:hover .tl-event-dot { background: #f59e0b; }
.tl-event[data-category="technical"] .tl-event-dot { border-color: #06b6d4; }
.tl-event[data-category="technical"]:hover .tl-event-dot { background: #06b6d4; }
.tl-event[data-category="regulation"] .tl-event-dot { border-color: #ec4899; }
.tl-event[data-category="regulation"]:hover .tl-event-dot { background: #ec4899; }
.tl-event[data-category="security"] .tl-event-dot { border-color: #ef4444; }
.tl-event[data-category="security"]:hover .tl-event-dot { background: #ef4444; }

/* Footnote */
.tl-footnote {
  text-align: center;
  margin-top: 16px;
  padding: 0 16px 24px;
  font-size: 0.85em;
  color: var(--muted);
}

/* ── Timeline Responsive ── */
@media (min-width: 640px) {
  .tl-container {
    padding: 0 24px 40px;
  }
  .tl-line {
    left: 40px;
  }
  .tl-year-marker {
    padding-left: 72px;
  }
  .tl-year-marker::before {
    left: 33px;
  }
  .tl-event {
    padding-left: 72px;
  }
  .tl-event-dot {
    left: 35px;
  }
}

@media (max-width: 640px) {
  .tl-hero-stats {
    gap: 20px;
  }
  .tl-stat-value {
    font-size: var(--text-xl);
  }
  .tl-filter-chip {
    padding: 5px 10px;
    font-size: var(--text-xs);
  }
  .tl-event-content {
    padding: 14px;
  }
  .tl-event-significance {
    padding: 10px 12px;
  }
}

/* ── Internal Links ── */
.internal-link {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px dotted rgba(var(--color-accent-rgb), 0.4);
  transition: border-color 0.2s, color 0.2s;
}
.internal-link:hover {
  color: var(--brand);
  border-bottom-style: solid;
  border-bottom-color: var(--brand);
}

/* ── Inline content links (bare <a> tags inside module text) ── */
.wb-body a:not(.wb-btn):not(.wb-section-link):not(.internal-link),
.wb-money-step-body a,
.wb-money-step-problem a,
.wb-section-intro a:not(.internal-link),
.wb-callout a:not(.internal-link),
.gt-point p a:not(.internal-link),
.gt-level-body p a:not(.internal-link),
.gt-stage-body p a:not(.internal-link),
.gt-risk-counterpoint p a:not(.internal-link),
.ng-point p a:not(.internal-link),
.ng-muted a:not(.internal-link),
.ln-muted a:not(.internal-link) {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px dotted rgba(var(--color-accent-rgb), 0.4);
  transition: border-color 0.2s, color 0.2s;
}
.wb-body a:not(.wb-btn):not(.wb-section-link):not(.internal-link):hover,
.wb-money-step-body a:hover,
.wb-money-step-problem a:hover,
.wb-section-intro a:not(.internal-link):hover,
.wb-callout a:not(.internal-link):hover,
.gt-point p a:not(.internal-link):hover,
.gt-level-body p a:not(.internal-link):hover,
.gt-stage-body p a:not(.internal-link):hover,
.gt-risk-counterpoint p a:not(.internal-link):hover,
.ng-point p a:not(.internal-link):hover,
.ng-muted a:not(.internal-link):hover,
.ln-muted a:not(.internal-link):hover {
  color: var(--color-accent-light);
  border-bottom-style: solid;
  border-bottom-color: var(--color-accent-light);
}
.wb-body a:not(.wb-btn):not(.wb-section-link):not(.internal-link):visited,
.wb-money-step-body a:visited,
.wb-money-step-problem a:visited,
.wb-section-intro a:not(.internal-link):visited,
.wb-callout a:not(.internal-link):visited,
.gt-point p a:not(.internal-link):visited,
.gt-level-body p a:not(.internal-link):visited,
.gt-stage-body p a:not(.internal-link):visited,
.gt-risk-counterpoint p a:not(.internal-link):visited,
.ng-point p a:not(.internal-link):visited,
.ng-muted a:not(.internal-link):visited,
.ln-muted a:not(.internal-link):visited {
  color: #e8850f;
  border-bottom-color: rgba(232, 133, 15, 0.4);
}

/* ── Related Guides Cards (Self-Custody, etc.) ── */
.sc-related-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.3s;
}
.sc-related-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.18);
}
.sc-related-card h3 {
  margin: 0 0 8px;
  font-size: var(--text-lg);
}
.sc-related-card p {
  color: var(--color-muted);
  font-size: var(--text-md);
  margin: 0 0 16px;
}

/* ── Self-Custody: New Components ── */

/* Danger callout (prominent supply chain warning) */
.sc-danger-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(var(--color-bear-rgb), 0.08);
  border: 2px solid rgba(var(--color-bear-rgb), 0.35);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin: 16px 0;
}
.sc-danger-icon { font-size: var(--text-xl); flex-shrink: 0; }
.sc-danger-text {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.55;
}

/* Highlight card (seed phrase link, principles) */
.sc-highlight-card {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin: 14px 0;
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-text);
}

/* Link chip */
.sc-link-chip {
  margin: 8px 0 14px;
}

/* Table (mobile wallets comparison) */
.sc-table-wrap {
  margin: 14px 0;
}
.sc-table th {
  background: var(--color-bg-alt, var(--color-card-bg));
  padding: 10px 12px;
  font-weight: 600;
  font-size: var(--text-sm);
}
.sc-table td {
  padding: 10px 12px;
}

/* Mobile wallets section */
.sc-mobile-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin: 20px 0;
  transition: border-color 0.3s;
}
.sc-mobile-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.18);
}

/* Principles grid */
.sc-principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

/* Fee tip widget */
.sc-fee-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(var(--color-accent-rgb), 0.06);
  border: 1px solid rgba(var(--color-accent-rgb), 0.15);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  margin: 12px 0;
  font-size: var(--text-base);
}
.sc-fee-tip-label {
  color: var(--color-muted);
  font-weight: 500;
}
.sc-fee-tip-value {
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.sc-fee-tip-link {
  margin-left: auto;
  font-size: var(--text-sm);
}

/* CTA card */
.sc-cta-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin: 20px 0;
  transition: border-color 0.3s;
}
.sc-cta-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.18);
}
.sc-cta-card .sc-section-title {
  margin-bottom: 14px;
}

/* Disclaimer */
.sc-disclaimer {
  font-size: var(--text-sm);
  margin-top: 16px;
}

@media (max-width: 640px) {
  .sc-danger-callout { padding: 12px; gap: 8px; }
  .sc-mobile-card { padding: 16px; }
  .sc-fee-tip { flex-direction: column; align-items: flex-start; }
  .sc-fee-tip-link { margin-left: 0; }
  .sc-principles-grid { grid-template-columns: 1fr; }
}

/* ── Donate Modal ── */
.donate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 6, 10, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: var(--z-overlay);
  animation: donateIn 0.2s ease;
}
@keyframes donateIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.donate-overlay.hidden { display: none; }
.donate-modal {
  background: var(--color-secondary-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 40px 32px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow), var(--shadow-glow);
  animation: donateSlide 0.25s ease;
}
@keyframes donateSlide {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.donate-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: var(--text-2xl);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  line-height: 1;
}
.donate-close:hover {
  background: rgba(var(--color-accent-rgb), 0.08);
  color: var(--color-text);
}
.donate-icon {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: 12px;
  line-height: 1;
}
.donate-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.donate-desc {
  color: var(--color-muted);
  font-size: var(--text-base);
  margin: 0 0 20px;
  line-height: 1.5;
}
.donate-address-box {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.donate-address-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}
.donate-address {
  font-size: var(--text-xs);
  word-break: break-all;
  color: var(--color-text);
  background: none;
  font-family: 'Inter', monospace;
  line-height: 1.5;
  user-select: all;
  -webkit-user-select: all;
}
.donate-copy-btn {
  background: rgba(var(--color-accent-rgb), 0.1);
  border: 1px solid rgba(var(--color-accent-rgb), 0.2);
  color: var(--color-accent);
  padding: 6px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-sm);
  transition: all 0.2s;
}
.donate-copy-btn:hover {
  background: rgba(var(--color-accent-rgb), 0.18);
  border-color: rgba(var(--color-accent-rgb), 0.35);
}
.donate-copied {
  display: block;
  margin-top: 10px;
  color: var(--color-bull);
  font-size: var(--text-sm);
  font-weight: 500;
}
.donate-copied.hidden { display: none; }
.donate-divider {
  color: var(--color-muted);
  font-size: var(--text-sm);
  margin: 12px 0;
  font-weight: 500;
}

/* ═══════════════════════════════
   ON-CHAIN SECTION NAVIGATION
   ═══════════════════════════════ */
.oc-section-nav {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  padding: 10px 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.oc-nav-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-muted);
  padding: 7px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-xs);
  white-space: nowrap;
  transition: all 0.25s;
}
.oc-nav-btn:hover {
  color: var(--color-text);
  background: var(--color-surface);
  border-color: rgba(255, 255, 255, 0.3);
}
.oc-nav-btn.active {
  background: linear-gradient(135deg, var(--color-accent), #e8850f);
  color: #000;
  border-color: var(--color-accent);
  box-shadow: 0 2px 12px rgba(var(--color-accent-rgb), 0.3);
}
.oc-section { animation: fadeIn 0.3s ease-out both; }

/* Shared new section styles */
.oc-section-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease-out both;
}
.oc-section-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.oc-section-card:hover::before { opacity: 0.6; }
.oc-section-card h3 {
  font-size: var(--text-md);
  font-weight: 700;
  margin: 0 0 6px;
}
.oc-loading {
  text-align: center;
  padding: 40px 16px;
  color: var(--color-muted);
  font-size: var(--text-base);
}
.oc-unavailable {
  text-align: center;
  padding: 24px 16px;
  color: var(--color-muted);
  font-size: var(--text-base);
}

/* ═══════════════════════════════
   MEMPOOL VISUALIZATION
   ═══════════════════════════════ */
.mempool-chart-wrap {
  margin: 16px 0;
  min-height: 200px;
}
.mempool-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  padding: 0 4px;
}
.mempool-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.mempool-bar {
  width: 100%;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  min-height: 4px;
  transition: height 0.5s ease;
}
.mempool-bar-value {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  white-space: nowrap;
  font-feature-settings: "tnum" 1;
}
.mempool-bar-label {
  font-size: var(--text-xs);
  color: var(--color-dim);
  text-align: center;
  white-space: nowrap;
}
.mempool-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}
.mempool-stat {
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.mempool-stat strong {
  color: var(--color-text);
  font-feature-settings: "tnum" 1;
}

/* ═══════════════════════════════
   UTXO STATISTICS
   ═══════════════════════════════ */
.utxo-grid {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}
@media (min-width: 640px) {
  .utxo-grid { grid-template-columns: repeat(3, 1fr); }
}
.utxo-card {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.utxo-card.utxo-wide {
  grid-column: 1 / -1;
  text-align: left;
}
.utxo-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.utxo-value {
  font-size: var(--text-xl);
  font-weight: 700;
  font-feature-settings: "tnum" 1;
}
.utxo-note {
  font-size: var(--text-xs);
  color: var(--color-dim);
  margin-top: 4px;
}

/* ═══════════════════════════════
   HASH RATE & DIFFICULTY
   ═══════════════════════════════ */
.hashrate-tabs {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}
.hashrate-tab {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  color: var(--color-muted);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-xs);
  transition: all 0.2s;
}
.hashrate-tab:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}
.hashrate-tab.active {
  background: rgba(var(--color-accent-rgb), 0.15);
  color: var(--color-accent);
  border-color: rgba(var(--color-accent-rgb), 0.3);
}
.hashrate-chart-wrap {
  margin: 12px 0;
}
.hashrate-canvas {
  width: 100%;
  height: 280px;
  display: block;
}
.hashrate-current {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin-top: 8px;
}
.hashrate-current strong {
  color: var(--color-text);
}

/* ═══════════════════════════════
   MINING POOL DISTRIBUTION
   ═══════════════════════════════ */
.pool-period-tabs {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}
.pool-period-tab {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  color: var(--color-muted);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-xs);
  transition: all 0.2s;
}
.pool-period-tab:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}
.pool-period-tab.active {
  background: rgba(var(--color-accent-rgb), 0.15);
  color: var(--color-accent);
  border-color: rgba(var(--color-accent-rgb), 0.3);
}
.pool-chart-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin: 12px 0;
}
@media (max-width: 640px) {
  .pool-chart-layout {
    grid-template-columns: 1fr;
  }
}
.pool-chart-wrap {
  position: relative;
  aspect-ratio: 1;
  max-height: 320px;
}
.pool-donut-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.pool-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}
.pool-legend-item {
  display: grid;
  grid-template-columns: 12px 1fr auto auto;
  gap: 8px;
  align-items: center;
  font-size: var(--text-sm);
  padding: 4px 0;
  border-bottom: 1px solid var(--glass-border);
}
.pool-legend-item:last-child {
  border-bottom: none;
}
.pool-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}
.pool-legend-name {
  color: var(--color-text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pool-legend-share {
  color: var(--color-accent);
  font-weight: 700;
  font-feature-settings: "tnum" 1;
  text-align: right;
}
.pool-legend-blocks {
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-feature-settings: "tnum" 1;
  text-align: right;
  white-space: nowrap;
}
.pool-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}
.pool-stat {
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.pool-stat strong {
  color: var(--color-text);
  font-feature-settings: "tnum" 1;
}
.pool-stat-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-dim);
  margin-bottom: 2px;
}

/* ═══════════════════════════════
   DIFFICULTY ADJUSTMENT HISTORY
   ═══════════════════════════════ */
.diff-period-tabs {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}
.diff-period-tab {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  color: var(--color-muted);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-xs);
  transition: all 0.2s;
}
.diff-period-tab:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}
.diff-period-tab.active {
  background: rgba(var(--color-accent-rgb), 0.15);
  color: var(--color-accent);
  border-color: rgba(var(--color-accent-rgb), 0.3);
}
.diff-chart-wrap {
  margin: 12px 0;
}
.diff-history-canvas {
  width: 100%;
  height: 380px;
  display: block;
}
.diff-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}
.diff-stat {
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.diff-stat strong {
  color: var(--color-text);
  font-feature-settings: "tnum" 1;
}
.diff-stat-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-dim);
  margin-bottom: 2px;
}

/* ═══════════════════════════════
   LIGHTNING NETWORK STATS
   ═══════════════════════════════ */
.ln-stats-grid {
  display: grid;
  gap: 14px;
  margin: 16px 0;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) {
  .ln-stats-grid { grid-template-columns: repeat(3, 1fr); }
}
.ln-stat-card {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: all 0.3s;
}
.ln-stat-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.15);
  box-shadow: 0 0 20px rgba(var(--color-accent-rgb), 0.06);
}
.ln-stat-icon {
  font-size: var(--text-2xl);
  margin-bottom: 6px;
}
.ln-stat-value {
  font-size: var(--text-lg);
  font-weight: 700;
  font-feature-settings: "tnum" 1;
  margin-bottom: 2px;
}
.ln-stat-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════
   SUPPLY DISTRIBUTION
   ═══════════════════════════════ */
.supply-chart {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.supply-row {
  display: grid;
  grid-template-columns: 140px 1fr 90px;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
}
@media (max-width: 640px) {
  .supply-row {
    grid-template-columns: 120px 1fr 70px;
    gap: 8px;
  }
}
.supply-cohort {
  display: flex;
  align-items: center;
  gap: 8px;
}
.supply-icon {
  font-size: var(--text-lg);
  flex-shrink: 0;
}
.supply-name {
  font-size: var(--text-sm);
  font-weight: 600;
}
.supply-range {
  font-size: var(--text-xs);
  color: var(--color-dim);
}
.supply-bar-wrap {
  background: var(--color-surface);
  border-radius: var(--radius-xs);
  height: 16px;
  overflow: hidden;
}
.supply-bar {
  height: 100%;
  border-radius: var(--radius-xs);
  transition: width 0.5s ease;
  min-width: 4px;
}
.supply-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.supply-pct {
  font-size: var(--text-sm);
  font-weight: 700;
  font-feature-settings: "tnum" 1;
}
.supply-addrs {
  font-size: var(--text-xs);
  color: var(--color-dim);
}
.supply-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}

/* ═══════════════════════════════
   HALVING HISTORY & PROJECTION
   ═══════════════════════════════ */
.halving-chart-wrap {
  margin: 16px 0;
}
.halving-canvas {
  width: 100%;
  height: 260px;
  display: block;
}
.halving-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.halving-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.halving-table th {
  text-align: left;
  font-weight: 600;
  color: var(--color-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--glass-border);
}
.halving-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}
.halving-table tr:last-child td { border-bottom: none; }
.halving-past td { color: var(--color-text); }
.halving-future td { color: var(--color-dim); font-style: italic; }
.halving-table td:nth-child(3),
.halving-table td:nth-child(5) {
  font-feature-settings: "tnum" 1;
}
.halving-table td:last-child {
  white-space: normal;
  max-width: 200px;
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* ═══════════════════════════════
   CHARTS & VISUALIZATIONS
   ═══════════════════════════════ */

/* Shared chart canvas styles */
.cv-chart-wrap {
  margin: 16px 0;
  position: relative;
}
.cv-canvas {
  width: 100%;
  height: 320px;
  display: block;
}
.cv-canvas-tall {
  height: 400px;
}
@media (max-width: 640px) {
  .cv-canvas { height: 260px; }
  .cv-canvas-tall { height: 320px; }
}
.cv-chart-note {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-top: 10px;
  line-height: 1.6;
}
.cv-chart-note strong {
  color: var(--color-text);
  font-feature-settings: "tnum" 1;
}

/* Rainbow band legend */
.cv-band-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 8px;
}
.cv-band-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
  color: var(--color-text);
}

/* Hero styling handled by .module-hero */

/* DCA Backtest controls */
.dca-bt-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin: 16px 0;
}
.dca-bt-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dca-bt-field label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dca-bt-field input,
.dca-bt-field select {
  min-width: 100px;
  max-width: 160px;
}
.dca-bt-result { margin-top: 16px; }
.dca-bt-summary { margin-top: 16px; }
.dca-bt-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
@media (min-width: 640px) {
  .dca-bt-stats { grid-template-columns: repeat(4, 1fr); }
}
.dca-bt-stat {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.dca-bt-stat-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.dca-bt-stat-value {
  display: block;
  font-size: var(--text-lg);
  font-weight: 700;
  font-feature-settings: "tnum" 1;
}
.dca-bt-stat-value.positive { color: #10b981; }
.dca-bt-stat-value.negative { color: #ef4444; }
.dca-bt-desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.6;
  margin: 8px 0 0;
}
.dca-bt-desc strong {
  color: var(--color-text);
}

/* Asset comparison toggles */
.cv-asset-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.cv-asset-toggle {
  cursor: pointer;
}
.cv-asset-toggle input[type="checkbox"] {
  display: none;
}
.cv-asset-chip {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: var(--color-surface);
  color: var(--color-muted);
  transition: all 0.2s;
  user-select: none;
}
.cv-asset-toggle input:checked + .cv-asset-chip {
  background: rgba(var(--color-accent-rgb), 0.1);
  border-color: var(--asset-color, var(--color-accent));
  color: var(--color-text);
  box-shadow: 0 0 8px rgba(var(--color-accent-rgb), 0.1);
}

/* Period tabs */
.cv-period-tabs {
  display: flex;
  gap: 6px;
  margin: 16px 0 12px;
}
.cv-period-tab {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  color: var(--color-muted);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-xs);
  transition: all 0.2s;
}
.cv-period-tab:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}
.cv-period-tab.active {
  background: rgba(var(--color-accent-rgb), 0.15);
  color: var(--color-accent);
  border-color: rgba(var(--color-accent-rgb), 0.3);
}

/* Return comparison table */
.cv-return-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin-top: 4px;
}
.cv-return-table th {
  text-align: left;
  font-weight: 600;
  color: var(--color-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--glass-border);
}
.cv-return-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--glass-border);
}
.cv-return-table tr:last-child td { border-bottom: none; }
.cv-return-table td:last-child {
  font-weight: 700;
  font-feature-settings: "tnum" 1;
  text-align: right;
}
.cv-return-table .positive { color: #10b981; }
.cv-return-table .negative { color: #ef4444; }

/* ═══════════════════════════════
   FEAR & GREED HISTORY CHART
   ═══════════════════════════════ */

/* Period tabs override for horizontal scroll on mobile */
.fg-period-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fg-period-tabs::-webkit-scrollbar { display: none; }

/* Chart wrapper */
.fg-chart-wrap {
  position: relative;
  touch-action: pan-y;
}

/* Education section */
.fg-education {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}
.fg-education-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 8px;
}
.fg-education-body {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-muted);
  margin: 0 0 10px;
}
.fg-disclaimer {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-dim);
  font-style: italic;
}

@media (max-width: 640px) {
  .fg-education {
    padding: 12px 14px;
  }
  .fg-period-tabs {
    gap: 4px;
  }
}

/* ═══════════════════════════════════════════════════════════
   BIP Explorer
   ═══════════════════════════════════════════════════════════ */

/* Hero styling handled by .module-hero */

.bip-chip {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.bip-controls {
  max-width: 900px;
  margin: 0 auto 32px;
  padding: 0 16px;
}
.bip-search-wrap {
  margin-bottom: 16px;
}
.bip-search {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--color-text);
  font-size: var(--text-md);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.bip-search:focus {
  border-color: var(--brand);
}
.bip-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.bip-cat-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--color-muted);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.bip-cat-btn.active {
  background: var(--brand);
  color: #000;
  border-color: var(--brand);
  font-weight: 600;
}
.bip-result-count {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.bip-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bip-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}
.bip-card[open] {
  border-color: var(--brand);
}
.bip-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  flex-wrap: wrap;
}
.bip-card-header::-webkit-details-marker { display: none; }
.bip-card-header::marker { content: ''; }
.bip-number {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--brand);
  white-space: nowrap;
  min-width: 64px;
}
.bip-title {
  flex: 1;
  font-weight: 600;
  font-size: var(--text-md);
  min-width: 0;
}
.bip-status {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bip-status-final { background: rgba(16,185,129,0.15); color: #10b981; }
.bip-status-active { background: rgba(59,130,246,0.15); color: #3b82f6; }
.bip-status-proposed { background: rgba(245,158,11,0.15); color: #f59e0b; }
.bip-status-deployed { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.bip-status-complete { background: rgba(6,182,212,0.15); color: #06b6d4; }
.bip-status-draft { background: rgba(148,163,184,0.15); color: #94a3b8; }
.bip-status-withdrawn { background: rgba(239,68,68,0.15); color: #ef4444; }
.bip-status-replaced { background: rgba(107,114,128,0.15); color: #6b7280; }

.bip-card-body {
  padding: 0 20px 20px;
}
.bip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.bip-tag {
  display: inline-block;
  background: rgba(var(--color-accent-rgb), 0.08);
  border: 1px solid rgba(var(--color-accent-rgb), 0.15);
  color: var(--brand);
  padding: 2px 10px;
  border-radius: 99px;
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.bip-tag:hover {
  background: rgba(var(--color-accent-rgb), 0.18);
  border-color: var(--brand);
}
.bip-authors {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin: 0 0 8px;
  font-style: italic;
}
.bip-activation {
  font-size: var(--text-sm);
  color: #10b981;
  font-weight: 600;
  margin: 0 0 10px;
  padding: 4px 10px;
  background: rgba(16,185,129,0.08);
  border-radius: var(--radius);
  display: inline-block;
}
.bip-summary {
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 12px;
}
.bip-importance {
  color: var(--brand);
  font-size: var(--text-base);
  font-weight: 500;
  font-style: italic;
  line-height: 1.5;
  margin: 0 0 12px;
  padding: 8px 12px;
  background: rgba(var(--color-accent-rgb), 0.06);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.bip-note {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin: 0 0 12px;
  padding: 8px 12px;
  background: rgba(245,158,11,0.06);
  border-left: 3px solid #f59e0b;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.bip-key-points {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--color-muted);
  font-size: var(--text-base);
  line-height: 1.7;
}
.bip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}
.bip-source-link,
.bip-optech-link {
  color: var(--brand);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
}
.bip-source-link:hover,
.bip-optech-link:hover { text-decoration: underline; }
.bip-internal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.bip-internal-link {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 4px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
}
.bip-internal-link:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.bip-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--color-muted);
}


.bip-source {
  max-width: 900px;
  margin: 40px auto 0;
  padding: 0 16px;
  text-align: center;
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.bip-source a {
  color: var(--brand);
  text-decoration: none;
}
.bip-source a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   Script & Opcode Reference
   ═══════════════════════════════════════════════════════════ */

/* Hero styling handled by .module-hero */

.sr-chip {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.sr-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}
.sr-tab {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--color-muted);
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.sr-tab.active {
  background: var(--brand);
  color: #000;
  border-color: var(--brand);
}

.sr-panel {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}
.sr-panel.hidden { display: none; }

.sr-controls {
  margin-bottom: 24px;
}
.sr-search-wrap {
  margin-bottom: 12px;
}
.sr-search {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--color-text);
  font-size: var(--text-md);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.sr-search:focus { border-color: var(--brand); }
.sr-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.sr-cat-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--color-muted);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.sr-cat-btn.active {
  background: var(--brand);
  color: #000;
  border-color: var(--brand);
  font-weight: 600;
}
.sr-result-count {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.sr-opcode-table {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sr-table-header {
  display: grid;
  grid-template-columns: 220px 80px 1fr;
  padding: 12px 16px;
  background: var(--glass);
  border-bottom: 1px solid var(--glass-border);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}
.sr-opcode-row {
  border-bottom: 1px solid var(--glass-border);
}
.sr-opcode-row:last-child { border-bottom: none; }
.sr-opcode-summary {
  display: grid;
  grid-template-columns: 220px 80px 1fr;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  font-size: var(--text-base);
  align-items: start;
  transition: background 0.2s;
}
.sr-opcode-summary::-webkit-details-marker { display: none; }
.sr-opcode-summary::marker { content: ''; }
.sr-opcode-summary:hover { background: var(--glass); }
.sr-opcode-summary code {
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: var(--text-sm);
}
.sr-col-name code { color: var(--brand); font-weight: 600; }
.sr-col-hex code { color: var(--color-muted); }
.sr-col-desc { color: var(--color-text); line-height: 1.5; }
.sr-opcode-details {
  padding: 0 16px 16px 16px;
  padding-left: calc(220px + 16px);
}
.sr-opcode-notes {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
  border-left: 3px solid var(--brand);
  padding-left: 12px;
}
.sr-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--color-muted);
}

/* Script Patterns */
.sr-scripts-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sr-script-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sr-script-name {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--brand);
}
.sr-script-desc {
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 16px;
}
.sr-script-code-block {
  margin-bottom: 16px;
}
.sr-script-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  margin-bottom: 6px;
}
.sr-script-code {
  background: var(--color-primary-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--brand);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.sr-script-flow {
  margin-top: 4px;
}
.sr-flow-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.7;
}
.sr-flow-steps li {
  margin-bottom: 4px;
}

@media (max-width: 640px) {
  .sr-table-header { display: none; }
  .sr-opcode-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .sr-opcode-details {
    padding-left: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════
   Seed Phrase & Entropy Education
   ═══════════════════════════════════════════════════════════ */

/* Hero styling handled by .module-hero */

.sp-chip {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.sp-pipeline, .sp-demo, .sp-depth, .sp-wordlist-info, .sp-best-practices, .sp-ctas {
  max-width: 900px;
  margin: 0 auto 48px;
  padding: 0 16px;
}
.sp-section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin: 0 0 12px;
}
.sp-section-desc {
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.sp-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sp-step-card {
  display: flex;
  gap: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  align-items: flex-start;
}
.sp-step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #000;
  font-weight: 700;
  font-size: var(--text-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-step-content h4 {
  margin: 0 0 6px;
  font-size: var(--text-md);
  font-weight: 700;
}
.sp-step-content p {
  margin: 0 0 8px;
  color: var(--color-text);
  line-height: 1.6;
}
.sp-detail {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.5;
  border-left: 3px solid var(--brand);
  padding-left: 12px;
}

/* Interactive Demo */
.sp-generate-btn {
  background: var(--brand);
  color: #000;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: var(--text-md);
  cursor: pointer;
  transition: opacity 0.2s;
  margin-bottom: 24px;
}
.sp-generate-btn:hover { opacity: 0.85; }

.sp-demo-output {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sp-demo-output.hidden { display: none; }
.sp-demo-step {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}
.sp-demo-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  margin-bottom: 8px;
}
.sp-demo-value {
  line-height: 1.6;
  word-break: break-all;
}
.sp-mono {
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: var(--text-sm);
  color: var(--brand);
}
.sp-highlight {
  background: rgba(var(--color-accent-rgb), 0.2);
  padding: 1px 4px;
  border-radius: var(--radius-xs);
  color: var(--brand);
  font-weight: 600;
}
.sp-demo-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sp-word-badge {
  background: var(--color-primary-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: var(--text-base);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sp-word-num {
  font-size: var(--text-xs);
  color: var(--brand);
  font-weight: 700;
}

/* Entropy Comparison */
.sp-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.sp-comparison-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}
.sp-comparison-card.highlight {
  border-color: var(--brand);
  background: rgba(var(--color-accent-rgb), 0.05);
}
.sp-comparison-icon {
  font-size: var(--text-3xl);
  margin-bottom: 8px;
}
.sp-comparison-label {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: 4px;
}
.sp-comparison-value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
}
.sp-comparison-note {
  color: var(--color-muted);
  font-size: var(--text-base);
  line-height: 1.6;
  text-align: center;
}

/* Wordlist Info */
.sp-wl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.sp-wl-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.sp-wl-card h4 {
  margin: 0 0 6px;
  font-size: var(--text-md);
  font-weight: 700;
}
.sp-wl-card p {
  margin: 0;
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.5;
}
.sp-wl-sample {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.sp-wl-sample-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  margin-bottom: 12px;
}
.sp-wl-sample-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sp-wl-word {
  background: var(--color-primary-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 4px 10px;
  font-size: var(--text-sm);
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sp-wl-index {
  font-size: var(--text-xs);
  color: var(--brand);
  font-weight: 700;
}

/* Best Practices */
.sp-bp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.sp-bp-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sp-bp-card.do { border-color: #10b981; }
.sp-bp-card.dont { border-color: #ef4444; }
.sp-bp-card h4 {
  margin: 0 0 12px;
  font-size: var(--text-md);
  font-weight: 700;
}
.sp-bp-card.do h4 { color: #10b981; }
.sp-bp-card.dont h4 { color: #ef4444; }
.sp-bp-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.8;
}

.sp-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Seed Phrase — Section base */
.sp-section {
  max-width: 900px;
  margin: 0 auto 48px;
  padding: 0 16px;
}

/* Seed Phrase — 12 vs 24 Words grid */
.sp-words-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.sp-words-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.sp-words-card-title {
  margin: 0 0 8px;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
}
.sp-words-card-text {
  margin: 0;
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.6;
}

/* Seed Phrase — Subsection & lists */
.sp-subsection-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--color-text);
}
.sp-passphrase-list {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.8;
}

/* Seed Phrase — Method cards (dice/coin) */
.sp-method-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.sp-method-title {
  margin: 0 0 12px;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
}
.sp-method-list {
  margin: 0;
  padding-left: 20px;
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.8;
}

/* Seed Phrase — Highlight box */
.sp-highlight-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin: 16px 0;
  background: rgba(var(--color-accent-rgb), 0.08);
  border: 1px solid rgba(var(--color-accent-rgb), 0.15);
  color: var(--brand);
  font-weight: 500;
  font-size: var(--text-base);
  line-height: 1.6;
}
[data-theme="light"] .sp-highlight-box {
  background: rgba(var(--color-accent-rgb), 0.1);
  color: #92400e;
  border: 1px solid rgba(var(--color-accent-rgb), 0.25);
}

/* Seed Phrase — Restore Flow */
.sp-restore-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.sp-restore-scenario-title {
  margin: 0 0 12px;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
}
.sp-restore-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.sp-word-changed {
  border-color: var(--color-bear) !important;
  background: rgba(var(--color-bear-rgb), 0.1) !important;
}
.sp-word-swapped {
  border-color: var(--color-custom) !important;
  background: rgba(var(--color-custom-rgb), 0.1) !important;
}
.sp-restore-change {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.sp-restore-change-label {
  font-weight: 600;
  color: var(--color-text);
}
.sp-restore-original {
  text-decoration: line-through;
  color: var(--color-bear);
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: var(--text-sm);
}
.sp-restore-changed {
  color: var(--color-bull);
  font-weight: 600;
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: var(--text-sm);
}
.sp-restore-result {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-top: 8px;
}
.sp-restore-result.invalid {
  background: rgba(var(--color-bear-rgb), 0.1);
  color: #ef4444;
  border: 1px solid rgba(var(--color-bear-rgb), 0.2);
}
.sp-restore-result.wrong-wallet {
  background: rgba(var(--color-custom-rgb), 0.1);
  color: #f59e0b;
  border: 1px solid rgba(var(--color-custom-rgb), 0.2);
}
[data-theme="light"] .sp-restore-result.invalid {
  color: #991b1b;
  border-color: rgba(var(--color-bear-rgb), 0.3);
}
[data-theme="light"] .sp-restore-result.wrong-wallet {
  color: #92400e;
  border-color: rgba(var(--color-custom-rgb), 0.3);
}

/* Seed Phrase — Security Fact */
.sp-secfact {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto 48px;
  padding: 20px 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--brand);
}
.sp-secfact-icon {
  font-size: var(--text-2xl);
  flex-shrink: 0;
  line-height: 1;
}
.sp-secfact-text {
  margin: 0;
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.6;
}

/* Seed Phrase — Inline link */
.sp-inline-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.sp-inline-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Seed Phrase — Comparison Table */
.sp-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px 24px;
  padding: 0 4px;
}
.sp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
  line-height: 1.5;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.sp-table th {
  text-align: left;
  padding: 10px 14px;
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted);
  border-bottom: 2px solid var(--glass-border);
  background: var(--color-surface);
  white-space: nowrap;
}
.sp-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--color-text);
  vertical-align: top;
}
.sp-table td:first-child {
  font-weight: 600;
  white-space: nowrap;
}
.sp-table tbody tr:hover {
  background: rgba(var(--color-accent-rgb), 0.04);
}
.sp-table tbody tr:last-child td {
  border-bottom: none;
}

/* Seed Phrase — Checksum Validator */
.sp-checksum-form {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 16px;
}
.sp-checksum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.sp-checksum-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 8px 12px;
  transition: border-color 0.2s;
}
.sp-checksum-input-wrap:focus-within {
  border-color: var(--brand);
}
.sp-checksum-num {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-muted);
  min-width: 20px;
  text-align: right;
}
.sp-checksum-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--color-text);
  font-size: var(--text-base);
  font-weight: 500;
  font-family: inherit;
  padding: 0;
  min-width: 0;
}
.sp-checksum-input::placeholder {
  color: var(--color-dim);
  font-weight: 400;
}
.sp-input-error {
  border-color: var(--color-bear) !important;
  background: rgba(var(--color-bear-rgb), 0.06);
}
.sp-checksum-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.sp-fill-btn {
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--glass-border);
}
.sp-fill-btn:hover {
  background: var(--color-surface);
  border-color: var(--brand);
}
.sp-checksum-result {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--text-base);
}
.sp-checksum-result.hidden { display: none; }
.sp-result-valid {
  background: rgba(var(--color-bull-rgb), 0.1);
  color: #10b981;
  border: 1px solid rgba(var(--color-bull-rgb), 0.2);
}
.sp-result-invalid {
  background: rgba(var(--color-bear-rgb), 0.1);
  color: #ef4444;
  border: 1px solid rgba(var(--color-bear-rgb), 0.2);
}
[data-theme="light"] .sp-result-valid {
  background: rgba(var(--color-bull-rgb), 0.1);
  color: #065f46;
  border: 1px solid rgba(var(--color-bull-rgb), 0.3);
}
[data-theme="light"] .sp-result-invalid {
  background: rgba(var(--color-bear-rgb), 0.1);
  color: #991b1b;
  border: 1px solid rgba(var(--color-bear-rgb), 0.3);
}

/* ═══════════════════════════════════════════════════════════
   Bitcoin Resource Library
   ═══════════════════════════════════════════════════════════ */

/* Hero styling handled by .module-hero */

.rl-chip {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.rl-controls {
  max-width: 900px;
  margin: 0 auto 32px;
  padding: 0 16px;
}
.rl-filter-group {
  margin-bottom: 16px;
}
.rl-filter-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  margin-bottom: 8px;
}
.rl-filter-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rl-filter-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--color-muted);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.rl-filter-btn.active {
  background: var(--brand);
  color: #000;
  border-color: var(--brand);
  font-weight: 600;
}
.rl-result-count {
  color: var(--color-muted);
  font-size: var(--text-sm);
  margin-top: 8px;
}

.rl-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rl-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  transition: border-color 0.2s;
}
.rl-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.3);
}
.rl-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}
.rl-card-icon {
  font-size: var(--text-3xl);
  flex-shrink: 0;
  line-height: 1;
}
.rl-card-meta {
  flex: 1;
  min-width: 0;
}
.rl-card-title {
  font-size: var(--text-md);
  font-weight: 700;
  margin: 0 0 2px;
}
.rl-card-author {
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.rl-difficulty {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.rl-diff-beginner { background: rgba(16,185,129,0.15); color: #10b981; }
.rl-diff-intermediate { background: rgba(59,130,246,0.15); color: #3b82f6; }
.rl-diff-advanced { background: rgba(245,158,11,0.15); color: #f59e0b; }

.rl-card-desc {
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.6;
  margin-bottom: 10px;
}
.rl-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rl-tag {
  background: var(--color-primary-bg);
  border: 1px solid var(--glass-border);
  padding: 3px 10px;
  border-radius: var(--radius);
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.rl-card-disclaimer {
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-style: italic;
  margin-top: 8px;
  margin-bottom: 0;
}
.rl-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--color-muted);
}
.rl-footer-note {
  max-width: 900px;
  margin: 40px auto 0;
  padding: 0 16px;
  text-align: center;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

/* ═══════════════════════════════════════════════════════════
   Interactive Quiz / Knowledge Check
   ═══════════════════════════════════════════════════════════ */

/* Hero styling handled by .module-hero */

.qz-chip {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* Difficulty Filter */
.qz-difficulty-filter {
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 0 16px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.qz-filter-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--color-muted);
  padding: 7px 18px;
  border-radius: 99px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.qz-filter-btn:hover {
  border-color: var(--brand);
  color: var(--color-text);
}
.qz-filter-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #000;
}
.qz-filter-btn.qz-filter-easy.active { background: #10b981; border-color: #10b981; color: #000; }
.qz-filter-btn.qz-filter-medium.active { background: #f59e0b; border-color: #f59e0b; color: #000; }
.qz-filter-btn.qz-filter-hard.active { background: #ef4444; border-color: #ef4444; color: #fff; }

/* Module Selection Grid */
.qz-module-grid {
  max-width: 900px;
  margin: 0 auto 32px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.qz-module-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  color: var(--color-text);
}
.qz-module-card:hover {
  border-color: var(--brand);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.qz-module-card:active {
  transform: translateY(-1px) scale(0.99);
}
.qz-module-card.qz-card-complete {
  border-color: rgba(16,185,129,0.4);
  box-shadow: 0 0 20px rgba(16,185,129,0.08);
}
.qz-module-icon { font-size: var(--text-3xl); }
.qz-module-title {
  font-size: var(--text-md);
  font-weight: 700;
  margin: 0;
}
.qz-module-count {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* Difficulty dots on cards */
.qz-difficulty-dots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.qz-dot {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}
.qz-dot-easy { background: rgba(16,185,129,0.12); color: #10b981; }
.qz-dot-medium { background: rgba(245,158,11,0.12); color: #f59e0b; }
.qz-dot-hard { background: rgba(239,68,68,0.12); color: #ef4444; }

/* Best score badge */
.qz-module-best {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
}
.qz-best-none { color: var(--color-muted); }
.qz-best-partial { background: rgba(59,130,246,0.15); color: #3b82f6; }
.qz-best-perfect { background: rgba(16,185,129,0.15); color: #10b981; }

/* Score ring on card */
.qz-score-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: conic-gradient(
    var(--brand) calc(var(--ring-pct) * 1%),
    var(--glass-border) calc(var(--ring-pct) * 1%)
  );
  position: absolute;
  top: 12px;
  right: 12px;
  mask: radial-gradient(circle at center, transparent 10px, #000 11px);
  -webkit-mask: radial-gradient(circle at center, transparent 10px, #000 11px);
}

.qz-reset-wrap {
  text-align: center;
  margin: 0 auto;
  padding: 0 16px;
}
.qz-reset-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--color-muted);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.qz-reset-btn:hover { border-color: #ef4444; color: #ef4444; }

/* Quiz In-Progress — Category Header (three-layer) */
.qz-category-header {
  max-width: 700px;
  margin: 0 auto 24px;
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
}

/* Layer 1 — Back link */
.qz-category-back {
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: 0;
  text-align: left;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.qz-category-back:hover { color: var(--brand); }

/* Layer 2 — Category title */
.qz-category-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 12px;
}

/* Layer 3 — Progress row */
.qz-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qz-progress-row .qz-progress-bar {
  flex: 1;
  min-width: 0;
}
.qz-progress-text {
  font-size: var(--text-sm);
  color: var(--color-muted);
  white-space: nowrap;
}

.qz-progress-bar {
  height: 8px;
  background: var(--glass-border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.qz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--color-accent-light));
  border-radius: var(--radius-xs);
  transition: width 0.4s ease;
}

/* Difficulty badge */
.qz-difficulty-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 12px;
}
.qz-diff-easy { background: rgba(16,185,129,0.12); color: #10b981; }
.qz-diff-medium { background: rgba(245,158,11,0.12); color: #f59e0b; }
.qz-diff-hard { background: rgba(239,68,68,0.12); color: #ef4444; }

.qz-question-card {
  max-width: 700px;
  margin: 0 auto 24px;
  padding: 0 16px;
  animation: qzFadeIn 0.3s ease;
}
@keyframes qzFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.qz-question-text {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 20px;
}
.qz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.qz-option {
  background: var(--glass);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: var(--text-md);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--color-text);
}
.qz-option.selectable:hover {
  border-color: var(--brand);
  background: rgba(var(--color-accent-rgb), 0.05);
  transform: translateX(4px);
}
.qz-option.correct {
  border-color: #10b981;
  background: rgba(16,185,129,0.1);
  color: #10b981;
  font-weight: 600;
  animation: qzCorrectPulse 0.4s ease;
}
@keyframes qzCorrectPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.01); }
  100% { transform: scale(1); }
}
.qz-option.wrong {
  border-color: #ef4444;
  background: rgba(239,68,68,0.1);
  color: #ef4444;
}
.qz-option:disabled { cursor: default; }

.qz-explanation {
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: var(--text-base);
  line-height: 1.6;
  animation: qzFadeIn 0.3s ease;
}
.qz-explanation.correct {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
}
.qz-explanation.wrong {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
}
.qz-explanation strong {
  display: block;
  margin-bottom: 4px;
}
.qz-explanation p { margin: 0; }

.qz-nav-buttons {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.qz-nav-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--color-text);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.qz-nav-btn.primary {
  background: var(--brand);
  color: #000;
  border-color: var(--brand);
}
.qz-nav-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* Results */
.qz-results-card {
  max-width: 420px;
  margin: 0 auto 32px;
  padding: 40px 24px;
  text-align: center;
  background: var(--glass);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-lg);
  animation: qzFadeIn 0.5s ease;
  position: relative;
  overflow: hidden;
}
.qz-results-card.perfect { border-color: #10b981; }
.qz-results-card.great { border-color: #3b82f6; }
.qz-results-card.good { border-color: #f59e0b; }
.qz-results-card.retry { border-color: #ef4444; }

/* Circular progress indicator */
.qz-circle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.qz-circle-progress {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(
    var(--brand) calc(var(--pct) * 1%),
    var(--glass-border) calc(var(--pct) * 1%)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  animation: qzCircleReveal 0.8s ease-out;
}
@keyframes qzCircleReveal {
  from { opacity: 0; transform: scale(0.8) rotate(-90deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
.qz-circle-inner {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.qz-circle-score {
  font-size: var(--text-3xl);
  font-weight: 800;
}
.qz-circle-pct {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-muted);
}

.qz-results-grade {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-top: 8px;
}
.perfect .qz-results-grade { color: #10b981; }
.great .qz-results-grade { color: #3b82f6; }
.good .qz-results-grade { color: #f59e0b; }
.retry .qz-results-grade { color: #ef4444; }

/* CSS-only confetti for 90%+ */
.qz-confetti::before,
.qz-confetti::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}
.qz-confetti::before {
  background-image:
    radial-gradient(circle, #10b981 2px, transparent 2px),
    radial-gradient(circle, #f59e0b 2px, transparent 2px),
    radial-gradient(circle, var(--brand) 2px, transparent 2px),
    radial-gradient(circle, #3b82f6 2px, transparent 2px),
    radial-gradient(circle, #ef4444 1.5px, transparent 1.5px),
    radial-gradient(circle, #10b981 1.5px, transparent 1.5px);
  background-size: 60px 80px, 70px 90px, 50px 70px, 80px 60px, 65px 75px, 55px 85px;
  background-position: 10% 10%, 30% 20%, 50% 5%, 70% 15%, 85% 8%, 15% 25%;
  animation: qzConfettiFall 3s ease-out forwards;
  opacity: 0;
}
@keyframes qzConfettiFall {
  0% { opacity: 0.8; transform: translateY(-30px); }
  70% { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(40px); }
}

/* Difficulty breakdown */
.qz-difficulty-breakdown {
  max-width: 420px;
  margin: 0 auto 24px;
  padding: 0 16px;
}
.qz-difficulty-breakdown h4 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-muted);
}
.qz-bd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}
.qz-bd-label {
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 99px;
}
.qz-bd-score {
  font-size: var(--text-base);
  font-weight: 600;
}

/* Review section */
.qz-results-review {
  max-width: 700px;
  margin: 0 auto 32px;
  padding: 0 16px;
}
.qz-results-review h4 {
  font-size: var(--text-md);
  font-weight: 700;
  margin-bottom: 16px;
}
.qz-review-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--glass-border);
}
.qz-review-item:last-child { border-bottom: none; }
.qz-review-marker {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-base);
}
.qz-review-item.correct .qz-review-marker {
  background: rgba(16,185,129,0.15);
  color: #10b981;
}
.qz-review-item.wrong .qz-review-marker {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}
.qz-review-content { flex: 1; min-width: 0; }
.qz-review-q {
  font-weight: 600;
  margin-bottom: 4px;
}
.qz-review-a, .qz-review-correct {
  font-size: var(--text-base);
  margin-bottom: 4px;
}
.qz-review-correct { color: #10b981; }
.qz-review-explanation {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.5;
  margin-top: 6px;
}
.qz-review-toggle {
  background: none;
  border: none;
  color: var(--brand);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 4px;
}
.qz-review-toggle:hover { text-decoration: underline; }
.qz-review-detail.hidden { display: none; }
.qz-review-detail {
  animation: qzFadeIn 0.2s ease;
}

.qz-results-actions {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Responsive */
@media (max-width: 640px) {
  .qz-module-grid { grid-template-columns: 1fr; }
  .qz-circle-progress { width: 120px; height: 120px; }
  .qz-circle-inner { width: 94px; height: 94px; }
  .qz-circle-score { font-size: var(--text-2xl); }
  .qz-difficulty-filter { gap: 6px; }
  .qz-filter-btn { padding: 6px 14px; font-size: var(--text-xs); }
}

/* ═══════════════════════════════════════════════════════════
   Address Validator
   ═══════════════════════════════════════════════════════════ */

/* Hero styling handled by .module-hero */

.av-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px 48px;
}
.av-input-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 24px;
}
.av-input-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  margin-bottom: 10px;
}
.av-input-row {
  display: flex;
  gap: 10px;
}
.av-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--color-text);
  font-size: var(--text-md);
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}
.av-input:focus {
  border-color: var(--brand);
}
.av-examples {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.av-examples-label {
  font-size: var(--text-xs);
  color: var(--color-muted);
  font-weight: 600;
}
.av-example-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--color-muted);
  padding: 4px 12px;
  border-radius: var(--radius);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.av-example-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.av-result {
  animation: fadeInUp 0.3s ease-out both;
}
.av-result.hidden { display: none; }
.av-result-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.av-result-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  opacity: 0.8;
}
.av-success::before {
  background: linear-gradient(90deg, transparent, #10b981, transparent);
}
.av-success {
  border-color: rgba(var(--color-bull-rgb), 0.25);
}
.av-error::before {
  background: linear-gradient(90deg, transparent, #ef4444, transparent);
}
.av-error {
  border-color: rgba(var(--color-bear-rgb), 0.25);
}
.av-result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}
.av-result-icon {
  font-size: var(--text-2xl);
}
.av-result-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}
.av-table {
  width: 100%;
  border-collapse: collapse;
}
.av-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.av-table tr:last-child {
  border-bottom: none;
}
.av-table-key {
  padding: 8px 12px 8px 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  white-space: nowrap;
  vertical-align: top;
  width: 140px;
}
.av-table-val {
  padding: 8px 0;
  font-size: var(--text-base);
  color: var(--color-text);
  word-break: break-all;
}
.av-hex {
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: var(--text-xs);
  color: var(--brand);
  background: rgba(var(--color-accent-rgb), 0.06);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  word-break: break-all;
}
.av-valid {
  color: #10b981;
  font-weight: 700;
}
.av-error-msg {
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.6;
  margin: 0;
  padding: 4px 0;
}
.av-loading {
  text-align: center;
  padding: 16px;
  color: var(--color-muted);
  font-size: var(--text-base);
}

@media (max-width: 640px) {
  .av-input-row {
    flex-direction: column;
  }
  .av-table-key {
    width: auto;
    display: block;
    padding-bottom: 2px;
  }
  .av-table-val {
    display: block;
    padding-top: 0;
    padding-bottom: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════
   Transaction Decoder
   ═══════════════════════════════════════════════════════════ */

/* Hero styling handled by .module-hero */

.td-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 48px;
}
.td-input-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 24px;
}
.td-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.6;
}
.td-textarea:focus {
  border-color: var(--brand);
}
.td-example-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--color-muted);
  padding: 4px 12px;
  border-radius: var(--radius);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.td-example-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.td-result {
  animation: fadeInUp 0.3s ease-out both;
}
.td-result.hidden { display: none; }

.td-decoded {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.td-section {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.td-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.td-section:hover::before { opacity: 0.6; }
.td-section-title {
  font-size: var(--text-md);
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.td-io-detail {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.td-io-detail:last-child { margin-bottom: 0; }
.td-io-detail[open] {
  border-color: rgba(var(--color-accent-rgb), 0.2);
}
.td-io-summary {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-base);
  list-style: none;
  transition: background 0.2s;
  flex-wrap: wrap;
}
.td-io-summary::-webkit-details-marker { display: none; }
.td-io-summary::marker { content: ''; }
.td-io-summary::before {
  content: '\203A';
  font-size: var(--text-xl);
  font-weight: 300;
  color: var(--brand);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.td-io-detail[open] > .td-io-summary::before {
  transform: rotate(90deg);
}
.td-io-summary:hover { background: var(--color-surface); }
.td-io-index {
  font-weight: 700;
  color: var(--brand);
  font-size: var(--text-sm);
  min-width: 24px;
}
.td-io-txid {
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.td-io-value {
  margin-left: auto;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  font-feature-settings: "tnum" 1;
}
.td-io-table {
  margin: 0 16px 16px;
}
.td-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.td-badge-type {
  background: rgba(var(--color-accent-rgb), 0.1);
  color: var(--brand);
  border: 1px solid rgba(var(--color-accent-rgb), 0.2);
}
.td-badge-coinbase {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.25);
}
.td-item-size {
  font-size: var(--text-xs);
  color: var(--color-dim);
  margin-left: 4px;
}

@media (max-width: 640px) {
  .td-section {
    padding: 16px;
  }
  .td-io-table {
    margin: 0 8px 12px;
  }
  .td-io-summary {
    padding: 10px 12px;
  }
}

/* ═══════════════════════════════
   BLOCK EXPLORER
   ═══════════════════════════════ */
.be-search-card { margin-bottom: 16px; }
.be-search-wrap {
  display: flex;
  gap: 8px;
}
.be-search-input {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--color-text);
  font-size: var(--text-base);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.be-search-input:focus {
  border-color: var(--color-accent);
}
.be-search-input::placeholder {
  color: var(--color-dim);
}
.be-search-btn {
  background: linear-gradient(135deg, var(--color-accent), #e8850f);
  border: none;
  border-radius: var(--radius);
  padding: 10px 20px;
  color: #000;
  font-weight: 700;
  font-size: var(--text-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.be-search-btn:hover { opacity: 0.85; }

/* Block list */
.be-block-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--color-surface);
  cursor: pointer;
  transition: all 0.2s;
}
.be-block-row:hover {
  border-color: rgba(var(--color-accent-rgb), 0.3);
  background: var(--color-surface-2);
}
.be-block-height {
  font-size: var(--text-md);
  font-weight: 700;
  font-feature-settings: "tnum" 1;
  color: var(--color-accent);
  min-width: 80px;
}
.be-block-info {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.be-block-arrow {
  font-size: var(--text-xl);
  color: var(--color-dim);
}

/* Back button */
.be-back-btn {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 8px 16px;
  color: var(--color-text);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.2s;
}
.be-back-btn:hover {
  border-color: rgba(var(--color-accent-rgb), 0.3);
  background: var(--color-surface-2);
}

/* Detail cards */
.be-detail-card { margin-bottom: 16px; }
.be-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.be-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.be-detail-full { grid-column: 1 / -1; }
.be-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-dim);
}
.be-value {
  font-size: var(--text-base);
  font-weight: 600;
  font-feature-settings: "tnum" 1;
  color: var(--color-text);
  word-break: break-all;
}
.be-hash {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.be-hash-full {
  font-size: var(--text-xs);
  word-break: break-all;
}

/* Badges */
.be-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.be-confirmed {
  background: rgba(var(--color-bull-rgb), 0.15);
  color: #10b981;
}
.be-partial {
  background: rgba(var(--color-custom-rgb), 0.15);
  color: #f59e0b;
}
.be-unconfirmed {
  background: rgba(var(--color-bear-rgb), 0.15);
  color: #ef4444;
}
.be-coinbase {
  background: rgba(var(--color-accent-rgb), 0.15);
  color: var(--color-accent);
}

/* Transaction list in block detail */
.be-tx-list-card { margin-bottom: 16px; }
.be-tx-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  background: var(--color-surface);
  cursor: pointer;
  transition: all 0.2s;
}
.be-tx-row:hover {
  border-color: rgba(var(--color-accent-rgb), 0.3);
  background: var(--color-surface-2);
}
.be-tx-id {
  display: flex;
  align-items: center;
  gap: 8px;
}
.be-tx-summary {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.be-tx-amount {
  font-weight: 600;
  color: var(--color-text);
}

/* Input/Output grid */
.be-io-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: start;
}
.be-io-arrow-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 40px;
  font-size: var(--text-xl);
  color: var(--color-accent);
}
.be-io-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.be-io-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}
.be-io-addr {
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--color-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.be-io-value {
  font-weight: 600;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
  color: var(--color-text);
}

@media (max-width: 640px) {
  .be-search-wrap { flex-direction: column; }
  .be-block-height { min-width: 60px; font-size: var(--text-base); }
  .be-block-info { font-size: var(--text-xs); }
  .be-detail-grid { grid-template-columns: 1fr; }
  .be-io-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .be-io-arrow-col {
    padding-top: 0;
    transform: rotate(90deg);
    font-size: var(--text-md);
  }
}

/* ═══════════════════════════════
   WHALE ALERT
   ═══════════════════════════════ */
.wa-controls { margin-bottom: 16px; }
.wa-threshold-card { padding: 16px 20px; }
.wa-threshold-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.wa-threshold-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}
.wa-threshold-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wa-threshold-input {
  width: 100px;
  text-align: right;
}
.wa-threshold-suffix {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
}

/* Stats grid */
.wa-stats-card { margin-bottom: 16px; }
.wa-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.wa-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}
.wa-stat-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-dim);
}
.wa-stat-value {
  font-size: var(--text-lg);
  font-weight: 700;
  font-feature-settings: "tnum" 1;
  color: var(--color-text);
}

/* Whale transaction rows */
.wa-tx-row {
  padding: 14px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--color-surface);
  transition: all 0.2s;
  border-left: 3px solid var(--glass-border);
}
.wa-tx-row.wa-mega { border-left-color: #ef4444; }
.wa-tx-row.wa-whale { border-left-color: var(--color-accent); }
.wa-tx-row.wa-large { border-left-color: #f59e0b; }
.wa-tx-row.wa-notable { border-left-color: #3b82f6; }

.wa-tx-row.wa-tx-clickable {
  cursor: pointer;
}
.wa-tx-row:hover {
  background: var(--color-surface-2);
}
.wa-tx-row.wa-tx-clickable:hover {
  border-color: var(--color-accent);
}
.wa-tx-hash {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: var(--text-xs);
  color: var(--color-accent);
}
.wa-tx-view {
  font-size: var(--text-xs);
  color: var(--color-accent);
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.wa-tx-row.wa-tx-clickable:hover .wa-tx-view {
  opacity: 1;
}

.wa-tx-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.wa-tx-type {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
}
.wa-tx-time {
  font-size: var(--text-xs);
  color: var(--color-dim);
  margin-left: auto;
}

.wa-tx-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.wa-tx-amount {
  font-size: var(--text-xl);
  font-weight: 800;
  font-feature-settings: "tnum" 1;
  color: var(--color-text);
}
.wa-tx-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: var(--text-xs);
  color: var(--color-muted);
  align-items: center;
}

/* Whale size badges */
.wa-mega {
  background: rgba(var(--color-bear-rgb), 0.15);
  color: #ef4444;
}
.wa-whale {
  background: rgba(var(--color-accent-rgb), 0.15);
  color: var(--color-accent);
}
.wa-large {
  background: rgba(var(--color-custom-rgb), 0.15);
  color: #f59e0b;
}
.wa-notable {
  background: rgba(var(--color-base-rgb), 0.15);
  color: #3b82f6;
}

.wa-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--color-muted);
  font-size: var(--text-base);
}

@media (max-width: 640px) {
  .wa-stats-grid { grid-template-columns: 1fr 1fr; }
  .wa-tx-amount { font-size: var(--text-md); }
  .wa-tx-body { flex-direction: column; align-items: flex-start; }
  .wa-threshold-row { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════════════════════════
   Node Network
   ══════════════════════════════════════════════════════════════════ */

.nm-stats-card {
  margin-bottom: 16px;
}

.nm-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.nm-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.nm-chart-card .nm-chart-wrap {
  height: 300px;
  position: relative;
  margin: 12px 0 4px;
}

.nm-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Bar list (used for services, sync status, uptime, ports) */
.nm-bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 500px;
  overflow-y: auto;
}

.nm-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nm-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.nm-bar-count {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.nm-bar-track {
  height: 6px;
  background: var(--color-surface);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.nm-bar-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-xs);
  min-width: 2px;
  transition: width 0.4s ease;
}

@media (max-width: 640px) {
  .nm-stats-grid { grid-template-columns: 1fr 1fr; }
  .nm-two-col { grid-template-columns: 1fr; }
  .nm-chart-card .nm-chart-wrap { height: 280px; }
}

@media (max-width: 480px) {
  .nm-stats-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
   Transaction Analytics
   ══════════════════════════════════════════════════════════════════ */

.ta-controls {
  margin-bottom: 16px;
}

.ta-timespan-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ta-timespan-label {
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-weight: 500;
  white-space: nowrap;
}

.ta-timespan-btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.ta-timespan-btn {
  padding: 6px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.ta-timespan-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.ta-timespan-btn.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.ta-stats-card {
  margin-bottom: 16px;
}

.ta-chart-card {
  margin-bottom: 16px;
}

.ta-chart-wrap {
  height: 320px;
  position: relative;
  margin: 12px 0 4px;
}

.ta-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.ta-chart-footer {
  padding: 4px 0;
}

.ta-mini-stats {
  display: flex;
  gap: 16px;
  font-size: var(--text-xs);
  color: var(--color-muted);
  flex-wrap: wrap;
}

.ta-mini-stats strong {
  color: var(--color-text);
  font-weight: 600;
}

.ta-source-card {
  text-align: center;
  padding: 12px;
}

@media (max-width: 640px) {
  .ta-chart-wrap { height: 260px; }
}

@media (max-width: 480px) {
  .ta-chart-wrap { height: 220px; }
  .ta-timespan-btn { padding: 5px 10px; font-size: var(--text-xs); }
}

/* ── Bottom Page Navigation ─────────────────────────────────── */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 48px auto 32px;
  padding: 0 24px;
  gap: 12px;
}

.page-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--color-text);
  font-size: var(--text-base);
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.page-nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

[data-theme="light"] .page-nav-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.10);
}

.page-nav-btn:active {
  transform: translateY(0);
}

.page-nav-arrow {
  font-size: var(--text-md);
  line-height: 1;
}

.page-nav-top {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.page-nav-top:hover {
  color: var(--color-accent);
  border-color: rgba(247, 147, 26, 0.25);
}

.page-nav-prev .page-nav-label,
.page-nav-next .page-nav-label {
  color: var(--color-accent);
}

.page-nav-spacer {
  min-width: 120px;
}

@media (max-width: 640px) {
  .page-nav {
    padding: 0 16px;
    margin: 32px auto 24px;
    gap: 8px;
  }

  .page-nav-btn {
    padding: 10px 14px;
    font-size: var(--text-sm);
    gap: 6px;
  }

  .page-nav-label {
    display: none;
  }

  .page-nav-top .page-nav-label {
    display: inline;
  }

  .page-nav-spacer {
    min-width: 48px;
  }
}

/* ═══════════════════════════════════════════════════════
   MACRO ECONOMICS DASHBOARD
   ═══════════════════════════════════════════════════════ */

/* ── Overview Cards Row ── */
.macro-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.macro-card {
  padding: 18px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--color-card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.macro-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.macro-card--loading {
  min-height: 100px;
}

.macro-card-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.macro-card-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.macro-card-delta {
  margin-top: 4px;
  font-size: var(--text-base);
}

.macro-arrow--up { color: var(--color-bull); }
.macro-arrow--down { color: var(--color-bear); }
.macro-arrow--flat { color: var(--color-muted); }

/* Skeleton loading animation */
.skeleton-line {
  height: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg,
    var(--color-surface) 25%,
    var(--color-surface-2) 50%,
    var(--color-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton-line--wide { width: 80%; margin: 8px auto 0; height: 22px; }
.skeleton-line--short { width: 40%; margin: 6px auto 0; height: 12px; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Panel ── */
.macro-panel {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--color-card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.macro-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  opacity: 0.5;
}

.macro-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.macro-panel-title {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}

.macro-panel-subtitle {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin: 2px 0 0;
}

/* ── Period Selector ── */
.macro-period-selector {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.macro-period-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-muted);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-xs);
  white-space: nowrap;
  transition: all 0.2s;
}
.macro-period-btn:hover {
  color: var(--color-text);
  background: var(--color-surface);
}
.macro-period-btn.active {
  background: linear-gradient(135deg, var(--color-accent), #e8850f);
  color: #000;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(var(--color-accent-rgb), 0.25);
}

/* ── Chart Container ── */
.macro-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 200px;
  margin: 8px 0 16px;
}

.macro-canvas {
  display: block;
  width: 100%;
  cursor: crosshair;
}

.macro-chart-skeleton {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.macro-chart-skeleton-bar {
  width: 60%;
  height: 8px;
  border-radius: var(--radius-xs);
  background: linear-gradient(90deg,
    var(--color-surface) 25%,
    var(--color-surface-2) 50%,
    var(--color-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.macro-chart-error {
  text-align: center;
  color: var(--color-muted);
  padding: 40px 16px;
  font-size: var(--text-base);
}

/* ── Educational Text ── */
.macro-panel-edu {
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-muted);
}
.macro-panel-edu p {
  margin: 0 0 8px;
}
.macro-panel-edu strong {
  color: var(--color-text);
  font-weight: 600;
}


/* ── Data Freshness Indicator ── */
.bl-freshness {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--color-dim);
  margin-top: 4px;
}
.bl-freshness-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bl-freshness-dot[data-status="live"] {
  background: var(--color-success);
  animation: freshness-pulse 2s ease-in-out infinite;
}
@keyframes freshness-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 6px 2px rgba(34, 197, 94, 0.2); }
}
.bl-freshness-dot[data-status="cached"] {
  background: var(--color-warning);
}
.bl-freshness-dot[data-status="approximate"] {
  background: #f97316;
}
.bl-freshness-sep {
  color: var(--color-dim);
  opacity: 0.5;
}

/* ── Disclaimer ── */
.macro-disclaimer {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-dim);
  padding: 24px 16px;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto 24px;
}
.macro-info-icon {
  display: inline-block;
  cursor: help;
  margin-right: 4px;
  font-size: var(--text-base);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .macro-overview {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .macro-card {
    padding: 14px 10px;
  }
  .macro-card-value {
    font-size: var(--text-lg);
  }
  .macro-panel {
    padding: 16px 12px;
  }
  .macro-panel-header {
    flex-direction: column;
  }
  .macro-period-selector {
    align-self: stretch;
    justify-content: center;
  }
  .macro-period-btn {
    flex: 1;
    text-align: center;
    padding: 5px 6px;
    font-size: var(--text-xs);
  }
}

@media (max-width: 480px) {
  .macro-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  .macro-card-value {
    font-size: var(--text-md);
  }
}

/* ═══════════════════════════════
   BUY BITCOIN GUIDE
   ═══════════════════════════════ */
/* Hero styling handled by .module-hero */

.bb-chip {
  display: inline-block;
  padding: 8px 14px;
  background: rgba(var(--color-accent-rgb), 0.1);
  border: 1px solid rgba(var(--color-accent-rgb), 0.2);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
}

/* ── Cards ── */
.bb-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeInUp 0.5s ease-out both;
}
.bb-card-highlight {
  border-color: rgba(var(--color-accent-rgb), 0.25);
  background: linear-gradient(135deg, var(--color-card-bg), rgba(var(--color-accent-rgb), 0.03));
}
.bb-card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--color-text);
}
.bb-card-desc {
  color: var(--color-muted);
  font-size: var(--text-md);
  margin: 0 0 18px;
  line-height: 1.6;
}

/* ── Before You Buy Grid ── */
.bb-grid {
  display: grid;
  gap: 14px;
}
.bb-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.bb-point {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.3s;
}
.bb-point:hover {
  border-color: rgba(var(--color-accent-rgb), 0.18);
}
.bb-point-icon {
  font-size: var(--text-2xl);
  margin-bottom: 8px;
}
.bb-point h4 {
  margin: 0 0 6px;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
}
.bb-point p {
  margin: 0;
  font-size: var(--text-md);
  color: var(--color-muted);
  line-height: 1.55;
}

/* ── Acquisition Methods Grid ── */
.bb-method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.bb-method-card {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  animation: fadeInUp 0.5s ease-out both;
}
.bb-method-card:nth-child(1) { animation-delay: 0.05s; }
.bb-method-card:nth-child(2) { animation-delay: 0.1s; }
.bb-method-card:nth-child(3) { animation-delay: 0.15s; }
.bb-method-card:nth-child(4) { animation-delay: 0.2s; }
.bb-method-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.bb-method-icon {
  font-size: var(--text-2xl);
}
.bb-method-header h4 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
}
.bb-method-card > p {
  margin: 0 0 12px;
  font-size: var(--text-md);
  color: var(--color-muted);
  line-height: 1.55;
}

/* ── Pros/Cons Lists ── */
.bb-list {
  padding-left: 18px;
  margin: 0 0 10px;
  line-height: 1.7;
}
.bb-list li {
  margin-bottom: 3px;
  font-size: var(--text-base);
  color: var(--color-text);
}
.bb-pros li::marker {
  content: '\2713  ';
  color: var(--color-bull);
}
.bb-cons li::marker {
  content: '\2717  ';
  color: #ff6b6b;
}

/* ── KYC Spectrum ── */
.bb-kyc-spectrum {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.bb-kyc-item {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--glass-border);
  transition: border-color 0.3s;
}
.bb-kyc-item:hover {
  border-color: rgba(var(--color-accent-rgb), 0.18);
}
.bb-kyc-item h4 {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--color-text);
}
.bb-kyc-item > p {
  margin: 0 0 10px;
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.5;
}
.bb-kyc-full {
  border-top: 3px solid #ff6b6b;
}
.bb-kyc-light {
  border-top: 3px solid #ffd43b;
}
.bb-kyc-none {
  border-top: 3px solid var(--color-bull);
}

/* ── What to Look For Grid ── */
.bb-checklist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.bb-criteria {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.3s;
}
.bb-criteria:hover {
  border-color: rgba(var(--color-accent-rgb), 0.18);
}
.bb-criteria-icon {
  font-size: var(--text-2xl);
  margin-bottom: 8px;
}
.bb-criteria h4 {
  margin: 0 0 6px;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
}
.bb-criteria p {
  margin: 0;
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.55;
}

/* ── DCA Section ── */
.bb-dca-content {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.bb-dca-explain {
  flex: 1;
}
.bb-dca-explain > p {
  margin: 0 0 12px;
  font-size: var(--text-md);
  color: var(--color-text);
  line-height: 1.6;
}
.bb-dca-cta {
  flex-shrink: 0;
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  min-width: 200px;
}
.bb-dca-cta-text {
  margin: 0 0 12px;
  font-size: var(--text-md);
  color: var(--color-muted);
  line-height: 1.5;
}

/* ── After You Buy Steps ── */
.bb-steps-withdraw {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.bb-withdraw-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.3s;
}
.bb-withdraw-step:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
}
.bb-step-number {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), #e8850f);
  color: #000;
  font-weight: 800;
  font-size: var(--text-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(var(--color-accent-rgb), 0.25);
}
.bb-withdraw-step h4 {
  margin: 0 0 4px;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
}
.bb-withdraw-step p {
  margin: 0;
  font-size: var(--text-md);
  color: var(--color-muted);
  line-height: 1.55;
}
.bb-withdraw-cta {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ── Mistakes Grid ── */
.bb-mistakes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.bb-mistake {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.3s;
}
.bb-mistake:hover {
  border-color: rgba(var(--color-accent-rgb), 0.18);
}
.bb-mistake-icon {
  font-size: var(--text-xl);
  margin-bottom: 6px;
}
.bb-mistake h4 {
  margin: 0 0 6px;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
}
.bb-mistake p {
  margin: 0;
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.55;
}

/* ── FAQ ── */
.bb-faq-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.bb-faq-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 12px;
}
.bb-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bb-faq-item {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}
.bb-faq-item summary {
  padding: 12px 16px;
  color: var(--color-text);
  transition: background 0.2s;
}
.bb-faq-item summary:hover {
  background: var(--color-surface-2);
}
.bb-faq-item p {
  padding: 0 16px 14px;
  margin: 0;
}

/* ── Related Card ── */
.bb-related-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.3s;
}
.bb-related-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.18);
}
.bb-related-card h3 {
  margin: 0 0 8px;
  font-size: var(--text-lg);
}
.bb-related-card p {
  color: var(--color-muted);
  font-size: var(--text-md);
  margin: 0 0 16px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .bb-checklist-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .bb-grid-2,
  .bb-method-grid,
  .bb-kyc-spectrum,
  .bb-checklist-grid,
  .bb-mistakes-grid {
    grid-template-columns: 1fr;
  }
  .bb-dca-content {
    flex-direction: column;
  }
  .bb-dca-cta {
    min-width: auto;
    width: 100%;
  }
  .bb-card {
    padding: 16px;
  }
  .bb-faq-card {
    padding: 16px;
  }
  .bb-step-number {
    width: 34px;
    height: 34px;
    font-size: var(--text-base);
  }
}

/* ═══════════════════════════════════════════════════════
   BITCOIN MYTHS & MISCONCEPTIONS VIEW  (mm-*)
   ═══════════════════════════════════════════════════════ */

/* Hero styling handled by .module-hero */

/* ── Progress ── */
.mm-progress-wrap {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 0 24px;
}
.mm-progress {
  width: 100%;
  height: 6px;
  background: var(--glass);
  border-radius: var(--radius-xs);
  overflow: hidden;
  margin-bottom: 6px;
}
.mm-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-accent), #e8850f);
  border-radius: var(--radius-xs);
  transition: width 0.4s ease;
}
.mm-progress-text {
  font-size: var(--text-sm);
  color: var(--color-dim);
  text-align: center;
}

/* ── Search ── */
.mm-search-wrap {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 0 24px;
}
.mm-search {
  width: 100%;
  padding: 12px 16px;
  font-size: var(--text-md);
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.mm-search::placeholder {
  color: var(--color-dim);
}
.mm-search:focus {
  border-color: rgba(var(--color-accent-rgb), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
}

/* ── Category Filter Chips ── */
.mm-filters {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 0 24px;
  text-align: center;
}
.mm-filters-scroll {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 8px;
}
.mm-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 6px 14px;
  font-size: var(--text-sm);
  font-family: inherit;
  color: var(--color-dim);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.mm-filter-chip:hover {
  border-color: rgba(var(--color-accent-rgb), 0.3);
  color: var(--color-text);
  background: rgba(var(--color-accent-rgb), 0.06);
}
.mm-filter-chip.active {
  background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.15), rgba(var(--color-accent-rgb), 0.08));
  border-color: rgba(var(--color-accent-rgb), 0.4);
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 0 16px rgba(var(--color-accent-rgb), 0.1);
}

/* ── Category Badge (in summary) ── */
.mm-cat-badge {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.mm-cat-technical {
  background: rgba(100, 149, 237, 0.12);
  color: #6495ed;
}
.mm-cat-financial {
  background: rgba(var(--color-accent-rgb), 0.12);
  color: var(--brand);
}
.mm-cat-environmental {
  background: rgba(76, 175, 80, 0.12);
  color: #4caf50;
}
.mm-cat-political {
  background: rgba(171, 71, 188, 0.12);
  color: #ab47bc;
}

/* ── Myths Container ── */
.mm-myths {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Accordion Item (details/summary) ── */
.mm-item {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.mm-item:hover {
  border-color: rgba(var(--color-accent-rgb), 0.15);
}
.mm-item[open] {
  border-color: rgba(var(--color-accent-rgb), 0.25);
}

/* ── Summary (clickable header) ── */
.mm-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-md);
  color: var(--color-text);
  list-style: none;
  transition: background 0.2s;
  gap: 12px;
}
.mm-summary::-webkit-details-marker { display: none; }
.mm-summary::before {
  content: '\203A';
  display: inline-block;
  flex-shrink: 0;
  width: 20px;
  font-size: var(--text-xl);
  font-weight: 300;
  color: var(--color-accent);
  transition: transform 0.25s ease;
}
.mm-item[open] > .mm-summary::before {
  transform: rotate(90deg);
}
.mm-summary:hover {
  background: rgba(var(--color-accent-rgb), 0.03);
}
.mm-title {
  flex: 1;
  min-width: 0;
}
.mm-status {
  flex-shrink: 0;
  font-size: var(--text-base);
  color: var(--color-accent);
  width: 20px;
  text-align: center;
}

.mm-summary .expand-hint {
  float: none;
  margin-left: 0;
  flex-shrink: 0;
}

/* ── Panel Content ── */
.mm-panel {
  padding: 0 20px 20px;
}
.mm-section-label {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 16px 0 8px;
  padding: 0;
}
.mm-claim-label {
  color: var(--color-dim);
}
.mm-reality-label {
  color: var(--color-accent);
}
.mm-sources-label {
  color: var(--color-dim);
}

.mm-claim {
  font-size: var(--text-md);
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0 0 8px;
  padding: 12px 16px;
  background: rgba(var(--color-accent-rgb), 0.04);
  border-left: 3px solid rgba(var(--color-accent-rgb), 0.3);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

.mm-reality {
  margin: 0;
}
.mm-reality p {
  font-size: var(--text-md);
  color: var(--color-text);
  line-height: 1.7;
  margin: 0 0 12px;
}
.mm-reality p:last-child {
  margin-bottom: 0;
}

/* ── "Why this myth persists" ── */
.mm-persists-label {
  color: rgba(171, 71, 188, 0.9);
}
.mm-persists {
  font-size: var(--text-md);
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0 0 8px;
  padding: 10px 14px;
  background: rgba(171, 71, 188, 0.05);
  border-left: 3px solid rgba(171, 71, 188, 0.3);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* ── Internal Links ── */
.mm-related-label {
  color: var(--color-dim);
}
.mm-internal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}
.mm-internal-link {
  display: inline-block;
  font-size: var(--text-base);
  color: var(--brand);
  text-decoration: none;
  padding: 4px 12px;
  background: rgba(var(--color-accent-rgb), 0.06);
  border: 1px solid rgba(var(--color-accent-rgb), 0.15);
  border-radius: var(--radius);
  transition: background 0.2s, border-color 0.2s;
}
.mm-internal-link:hover {
  background: rgba(var(--color-accent-rgb), 0.12);
  border-color: rgba(var(--color-accent-rgb), 0.35);
}

/* ── Live Data ── */
.mm-live-data {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 8px;
}
.mm-live-item {
  flex: 1 1 auto;
  padding: 12px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-accent);
  text-align: center;
  min-width: 180px;
}

/* ── Sources ── */
.mm-sources {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mm-sources li {
  font-size: var(--text-base);
}
.mm-sources a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s;
  border-bottom: 1px solid rgba(var(--color-accent-rgb), 0.2);
}
.mm-sources a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* ── Disclaimer ── */
.mm-disclaimer {
  max-width: 720px;
  margin: 24px auto 0;
  padding: 0 24px;
  text-align: center;
  font-size: var(--text-base);
}

/* ── CTA Section ── */
.mm-cta-section {
  max-width: 720px;
  margin: 24px auto 32px;
  padding: 0 24px;
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .mm-myths {
    padding: 0 16px;
  }
  .mm-search-wrap,
  .mm-progress-wrap,
  .mm-filters {
    padding: 0 16px;
  }
  .mm-filter-chip {
    padding: 5px 10px;
    font-size: var(--text-xs);
  }
  .mm-summary {
    padding: 14px 16px;
    font-size: var(--text-md);
    flex-wrap: wrap;
  }
  .mm-summary .expand-hint {
    flex-basis: calc(100% - 32px);
    margin-left: 32px;
    margin-top: 4px;
  }
  .mm-cat-badge {
    font-size: var(--text-xs);
    padding: 2px 6px;
  }
  .mm-panel {
    padding: 0 16px 16px;
  }
  .mm-live-data {
    flex-direction: column;
  }
  .mm-live-item {
    min-width: auto;
  }
}

/* ── Currency Toggle Button (header) ── */
.currency-toggle-btn {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-accent);
}

/* ── Update Banner ── */
.update-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  animation: updateBannerFadeIn 0.3s ease-out;
}
.update-banner-hidden {
  animation: updateBannerFadeOut 0.3s ease-out forwards;
}
@keyframes updateBannerFadeIn {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes updateBannerFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(100%); }
}
.update-banner-text {
  font-size: var(--text-base);
  color: var(--color-text);
}
.update-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.update-banner-refresh {
  padding: 6px 16px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--color-accent), #e8850f);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.update-banner-refresh:hover {
  opacity: 0.9;
}
.update-banner-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: var(--text-lg);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.update-banner-close:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}
@media (max-width: 480px) {
  .update-banner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
  }
  .update-banner-text {
    width: 100%;
    text-align: center;
  }
  .update-banner-actions {
    justify-content: center;
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════
   Sats Thinking Module (st-*)
   ═══════════════════════════════════════════════════════ */

/* Hero styling handled by .module-hero */

/* ── Section Titles & Descriptions ── */
.st-section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--color-text);
}
.st-section-desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin: 0 0 20px;
  line-height: 1.5;
}

/* ── Education Section ── */
.st-edu {
  max-width: 720px;
  margin: 0 auto 32px;
  padding: 24px;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}
.st-edu-body {
  font-size: var(--text-md);
  color: var(--color-muted);
  line-height: 1.7;
  margin: 0 0 20px;
}

/* ── Scale Grid ── */
.st-scale-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 16px;
}
.st-scale-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.st-scale-row:hover {
  background: var(--color-surface-2);
}
.st-scale-unit {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  min-width: 80px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.st-scale-eq {
  color: var(--color-dim);
  font-size: var(--text-base);
}
.st-scale-sats {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-accent);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ── Items Table ── */
.st-items-section {
  max-width: 720px;
  margin: 0 auto 32px;
  padding: 0 24px;
}
.st-table {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}
.st-table-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 12px 16px;
  align-items: center;
  transition: background 0.15s;
}
.st-table-header {
  background: var(--color-surface);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 16px;
}
.st-row-alt {
  background: var(--color-card-bg);
}
.st-table-row:not(.st-table-header):hover {
  background: var(--color-surface-2);
}
.st-table-cell {
  font-size: var(--text-base);
  color: var(--color-text);
}
.st-cell-right {
  text-align: right;
  white-space: nowrap;
}
.st-cell-sats {
  font-weight: 600;
}
.st-sats-value {
  color: var(--color-accent);
}
.st-last-updated {
  font-size: var(--text-xs);
  color: var(--color-dim);
  text-align: right;
  margin-top: 8px;
}
.st-last-updated.st-stale {
  color: var(--color-bear);
}

/* ── Calculator Section ── */
.st-calc-section {
  max-width: 720px;
  margin: 0 auto 32px;
  padding: 0 24px;
}
.st-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.st-calc-field {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.st-calc-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.st-calc-input {
  width: 100%;
  padding: 14px 16px;
  font-size: var(--text-lg);
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  -moz-appearance: textfield;
}
.st-calc-input::-webkit-outer-spin-button,
.st-calc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.st-calc-input::placeholder {
  color: var(--color-dim);
}
.st-calc-input:focus {
  border-color: rgba(var(--color-accent-rgb), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
}
.st-calc-result {
  font-size: var(--text-2xl);
  font-weight: 700;
  min-height: 30px;
  line-height: 30px;
}

/* ── History Section ── */
.st-history-section {
  max-width: 720px;
  margin: 0 auto 32px;
  padding: 0 24px;
}
.st-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.st-history-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  border-left: 3px solid var(--color-accent);
}
.st-history-text {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}

/* ── Takeaway Section ── */
.st-takeaway-section {
  max-width: 720px;
  margin: 0 auto 32px;
  padding: 24px;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}
.st-takeaway-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.st-takeaway-item {
  font-size: var(--text-md);
  color: var(--color-text);
  line-height: 1.5;
  padding-left: 20px;
  position: relative;
}
.st-takeaway-item::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}
.st-dca-link {
  display: inline-block;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
.st-dca-link:hover {
  opacity: 0.8;
}

/* ── CTA Section ── */
.st-cta-section {
  max-width: 720px;
  margin: 0 auto 40px;
  padding: 0 24px;
  text-align: center;
}

/* ── Fade-in Animation ── */
.st-fade-in {
  animation: stFadeIn 0.5s ease both;
}
@keyframes stFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .st-calc-grid {
    grid-template-columns: 1fr;
  }
  .st-table-row {
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    padding: 10px 12px;
  }
  .st-table-cell {
    font-size: var(--text-sm);
  }
}
@media (max-width: 480px) {
  .st-edu {
    margin-left: 16px;
    margin-right: 16px;
    padding: 16px;
  }
  .st-items-section,
  .st-calc-section,
  .st-history-section,
  .st-cta-section {
    padding: 0 16px;
  }
  .st-takeaway-section {
    margin-left: 16px;
    margin-right: 16px;
    padding: 16px;
  }
  .st-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .st-table-row {
    min-width: 320px;
  }
  .st-calc-result {
    font-size: var(--text-lg);
  }
}

/* ═══════════════════════════════════════════════════════
   Fee Estimator
   ═══════════════════════════════════════════════════════ */

/* Hero styling handled by .module-hero */

/* Fee cards */
.fe-cards-section {
  padding: 0 24px;
  animation: fadeInUp 0.5s ease-out 0.1s both;
}
.fe-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
.fe-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.fe-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.fe-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.fe-tier-high::before { background: var(--color-bear); }
.fe-tier-medium::before { background: var(--color-custom); }
.fe-tier-low::before { background: var(--color-bull); }
.fe-card-icon {
  font-size: var(--text-2xl);
  margin-bottom: 8px;
}
.fe-card-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.fe-card-rate {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 4px;
}
.fe-card-eta {
  font-size: var(--text-base);
  color: var(--color-dim);
  margin-bottom: 12px;
}
.fe-card-costs {
  border-top: 1px solid var(--glass-border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fe-card-cost {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* Pulse animation for high priority when congested */
.fe-pulse {
  animation: fePulse 2s ease-in-out infinite;
}
@keyframes fePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--color-bear-rgb), 0); }
  50% { box-shadow: 0 0 16px 2px rgba(var(--color-bear-rgb), 0.15); }
}

/* Meta row (last updated + countdown) */
.fe-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 12px auto 0;
  padding: 0 4px;
}
.fe-last-updated,
.fe-countdown {
  font-size: var(--text-xs);
  color: var(--color-dim);
}

/* Mid grid: calculator + mempool side by side */
.fe-mid-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 900px;
  margin: 28px auto 0;
  padding: 0 24px;
  animation: fadeInUp 0.5s ease-out 0.2s both;
}
.fe-section-title {
  margin: 0 0 6px;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}
.fe-section-desc {
  margin: 0 0 16px;
  font-size: var(--text-base);
  color: var(--color-muted);
}

/* Calculator card */
.fe-calc-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.fe-calc-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fe-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fe-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
}
.fe-input {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--color-text);
  font-size: var(--text-md);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.fe-input:focus {
  border-color: var(--color-accent);
}
.fe-input::placeholder {
  color: var(--color-dim);
}
.fe-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fe-pill {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 6px 14px;
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.fe-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}
.fe-pill.active {
  background: rgba(var(--color-accent-rgb), 0.12);
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.fe-custom-group.hidden {
  display: none;
}

/* Calculator output */
.fe-calc-output {
  margin-top: 20px;
  padding: 16px;
  background: var(--color-surface);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 80px;
}
.fe-out-row {
  font-size: var(--text-md);
  color: var(--color-muted);
}
.fe-out-row:first-child {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-accent);
}
.fe-out-fiat {
  font-weight: 600;
  color: var(--color-text);
}

/* Mempool card */
.fe-mempool-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fe-mp-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.fe-mp-stat-label {
  font-size: var(--text-base);
  color: var(--color-muted);
}
.fe-mp-stat-value {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
}
.fe-mp-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-surface);
  border-radius: var(--radius);
}
.fe-mp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-dim);
  flex-shrink: 0;
}
.fe-mp-green { background: var(--color-bull); }
.fe-mp-orange { background: var(--color-custom); }
.fe-mp-red { background: var(--color-bear); }
.fe-mp-status-label {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
}
.fe-mempool-link {
  font-size: var(--text-base);
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}
.fe-mempool-link:hover {
  opacity: 0.8;
}

/* Education section */
.fe-edu-section {
  max-width: 900px;
  margin: 28px auto 0;
  padding: 0 24px 48px;
  animation: fadeInUp 0.5s ease-out 0.3s both;
}
.fe-edu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

/* ── Fee Estimator responsive ── */
@media (max-width: 640px) {
  .fe-cards-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .fe-mid-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .fe-cards-section,
  .fe-mid-grid,
  .fe-edu-section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .fe-card-rate {
    font-size: var(--text-xl);
  }
  .fe-pill-row {
    gap: 6px;
  }
  .fe-pill {
    padding: 5px 10px;
    font-size: var(--text-xs);
  }
}

/* ═══════════════════════════════════════════════════════════════
   Privacy Guide Module
   ═══════════════════════════════════════════════════════════════ */

/* Warning-highlighted points (security-sensitive content) */
.pv-warning-point {
  border-left: 3px solid rgba(var(--color-accent-rgb), 0.6);
}

/* Legal context blockquote */
.pv-legal-note {
  margin: 0 0 16px;
  padding: 14px 18px;
  border-left: 3px solid rgba(var(--color-accent-rgb), 0.5);
  background: rgba(var(--color-accent-rgb), 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}

.pv-legal-note strong {
  color: var(--color-text);
}

/* Best Practices numbered list */
.pv-best-practices {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  counter-reset: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pv-bp-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: border-color 0.2s;
}

.pv-bp-item:hover {
  border-color: rgba(var(--color-accent-rgb), 0.3);
}

.pv-bp-rank {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--glass-border);
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1;
  margin-top: 1px;
}

.pv-bp-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pv-bp-body strong {
  color: var(--color-text);
  font-size: var(--text-md);
}

.pv-bp-detail {
  color: var(--color-muted);
  font-size: var(--text-base);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .pv-bp-item {
    padding: 10px 12px;
    gap: 10px;
  }
  .pv-bp-rank {
    width: 24px;
    height: 24px;
    font-size: var(--text-xs);
  }
}

/* ── 404 Not Found ── */
.notfound-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 50vh;
  padding: 60px 24px;
  gap: 16px;
}

.notfound-icon {
  font-size: var(--text-3xl);
  line-height: 1;
  margin-bottom: 8px;
}

.notfound-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-text);
  margin: 0;
}

.notfound-text {
  font-size: var(--text-md);
  color: var(--color-muted);
  max-width: 440px;
  line-height: 1.6;
  margin: 0;
}

.notfound-home-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 32px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: var(--text-md);
  border-radius: var(--radius);
  text-decoration: none;
  transition: opacity 0.2s;
}
.notfound-home-btn:hover { opacity: 0.85; }

.notfound-links {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.notfound-links a {
  color: var(--color-accent);
  font-weight: 600;
  font-size: var(--text-md);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  transition: background 0.2s, color 0.2s;
}
.notfound-links a:hover {
  background: rgba(247, 147, 26, 0.1);
}

/* ═══════════════════════════════════════════════════════
   Home Dashboard
   ═══════════════════════════════════════════════════════ */

.home {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* ── Home Nav Button ── */
.home-nav-btn {
  font-size: var(--text-lg);
  padding: 8px 12px;
  min-width: auto;
  line-height: 1;
}

/* ── Hero Banner ── */
.home-hero {
  text-align: center;
  padding: 40px 24px 32px;
  position: relative;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

:root:not([data-theme="light"]) .home-hero::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse 60% 70% at 50% 30%, rgba(var(--color-accent-rgb), 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

[data-theme="light"] .home-hero {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow-md);
}

.home-price-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.home-price-row-clickable {
  cursor: pointer;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.home-price-row-clickable:hover {
  transform: scale(1.02);
}

.home-price-row-clickable:active {
  transform: scale(0.98);
}

.home-price-val {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-accent) 50%, #e8850f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter:
    drop-shadow(0 0 16px rgba(var(--color-accent-rgb), 0.3))
    drop-shadow(0 0 40px rgba(var(--color-accent-rgb), 0.12));
  transition: transform 0.15s ease, opacity 0.15s ease;
}

[data-theme="light"] .home-price-val {
  background: linear-gradient(135deg, #e8850f 0%, var(--color-accent) 50%, #d4780a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-price-chg {
  font-size: var(--text-md);
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 9999px;
  line-height: 1.3;
  margin-top: 4px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.home-price-chg.up {
  color: var(--color-bull);
  background: rgba(var(--color-bull-rgb), 0.12);
  border: 1px solid rgba(var(--color-bull-rgb), 0.15);
}

.home-price-chg.down {
  color: var(--color-bear);
  background: rgba(var(--color-bear-rgb), 0.12);
  border: 1px solid rgba(var(--color-bear-rgb), 0.15);
}

/* ── Sparkline (block element below hero content) ── */
.home-sparkline-wrap {
  position: relative;
  width: calc(100% + 48px);
  margin-left: -24px;
  height: 120px;
  margin-top: 20px;
}

.home-sparkline {
  display: block;
  width: 100%;
  height: 100%;
}

.home-sparkline-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

/* ── Chart Time-range Bar ── */
.home-range-bar {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.home-range-btn {
  background: transparent;
  border: 1px solid var(--color-border, rgba(255,255,255,0.08));
  color: var(--color-muted);
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.home-range-btn:hover {
  background: var(--color-accent-dim, rgba(247, 147, 26, 0.08));
  border-color: rgba(247, 147, 26, 0.2);
  color: var(--color-text);
}

.home-range-btn.active {
  background: linear-gradient(135deg, var(--color-accent, #f7931a), #e8850f);
  border-color: transparent;
  color: #000;
}

/* ── Hero Content ── */
.home-hero-content {
  text-align: center;
}

/* ── Sats + ATH ── */
.home-sats {
  color: var(--color-muted);
  font-size: var(--text-base);
  margin-top: 16px;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.home-ath {
  color: var(--color-dim);
  font-size: var(--text-sm);
  margin-top: 4px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.home-ath-new {
  color: var(--color-accent);
  font-weight: 600;
}

/* ── Command Center Link ── */
.cc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(var(--color-accent-rgb, 214, 160, 86), 0.2);
  border-radius: 6px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-accent, #d6a056);
  transition: border-color 0.2s;
}
.cc-link:hover {
  border-color: rgba(var(--color-accent-rgb, 214, 160, 86), 0.4);
}
.cc-dot {
  width: 6px;
  height: 6px;
  background: var(--color-accent, #d6a056);
  border-radius: 50%;
  animation: ccPulse 2s ease-in-out infinite;
}
.cc-arrow {
  font-size: 12px;
  color: var(--color-accent, #d6a056);
}
@keyframes ccPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(var(--color-accent-rgb, 214, 160, 86), 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(var(--color-accent-rgb, 214, 160, 86), 0); }
}
@media (min-width: 768px) {
  .cc-link-desktop { display: inline-flex; }
  .cc-link-mobile { display: none; }
}
@media (max-width: 767px) {
  .cc-link-desktop { display: none; }
  .cc-link-mobile {
    display: flex;
    justify-content: center;
    margin: 8px auto 4px;
  }
}

/* ── Quick Stats Grid ── */
.home-stats {
  margin: 24px -16px 0;
  padding: 0 16px;
}

.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 640px) {
  .home-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.home-stat {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: border-color 0.2s, background 0.3s;
  position: relative;
  overflow: hidden;
}

.home-stat:hover {
  border-color: rgba(var(--color-accent-rgb), 0.25);
}

.home-stat-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s ease, box-shadow 0.2s, background 0.3s;
}

.home-stat-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.home-stat-icon {
  font-size: var(--text-2xl);
  display: block;
  margin-bottom: 6px;
}

.home-stat-val {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
  transition: color 0.2s;
}

.home-stat-label {
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.home-stat-sub {
  font-size: var(--text-xs);
  color: var(--color-dim);
  margin-top: 4px;
  min-height: 1.2em;
  transition: color 0.2s;
}

/* ── Halving Progress Bar ── */
.home-stat-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-surface);
}

.home-stat-progress-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  transition: width 0.5s ease;
  width: 0;
}

/* ── Fear & Greed Dynamic Classes ── */
.home-stat.fg-extreme-fear {
  border-left: 3px solid #e74c3c;
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.07) 0%, transparent 60%), var(--glass);
}
.home-stat.fg-extreme-fear .home-stat-val { color: #e74c3c; }

.home-stat.fg-fear {
  border-left: 3px solid #e67e22;
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.06) 0%, transparent 60%), var(--glass);
}
.home-stat.fg-fear .home-stat-val { color: #e67e22; }

.home-stat.fg-neutral {
  border-left: 3px solid #95a5a6;
  background: linear-gradient(135deg, rgba(149, 165, 166, 0.05) 0%, transparent 60%), var(--glass);
}
.home-stat.fg-neutral .home-stat-val { color: #95a5a6; }

.home-stat.fg-greed {
  border-left: 3px solid #27ae60;
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.06) 0%, transparent 60%), var(--glass);
}
.home-stat.fg-greed .home-stat-val { color: #27ae60; }

.home-stat.fg-extreme-greed {
  border-left: 3px solid #2ecc71;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.08) 0%, transparent 60%), var(--glass);
}
.home-stat.fg-extreme-greed .home-stat-val { color: #2ecc71; }

/* ── Mempool Status Colors ── */
.home-stat[data-status="clear"] {
  border-left: 3px solid var(--color-bull);
  background: linear-gradient(135deg, rgba(var(--color-bull-rgb), 0.06) 0%, transparent 60%), var(--glass);
}
.home-stat[data-status="clear"] .home-stat-sub { color: var(--color-bull); }

.home-stat[data-status="moderate"] {
  border-left: 3px solid #f59e0b;
  background: linear-gradient(135deg, rgba(var(--color-custom-rgb), 0.06) 0%, transparent 60%), var(--glass);
}
.home-stat[data-status="moderate"] .home-stat-sub { color: #f59e0b; }

.home-stat[data-status="congested"] {
  border-left: 3px solid var(--color-bear);
  background: linear-gradient(135deg, rgba(var(--color-bear-rgb), 0.06) 0%, transparent 60%), var(--glass);
}
.home-stat[data-status="congested"] .home-stat-sub { color: var(--color-bear); }

/* ── Hashrate Trend ── */
.home-stat-sub.trend-up { color: var(--color-bull); }
.home-stat-sub.trend-down { color: var(--color-bear); }

/* ── Section Titles ── */
.home-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 16px;
}

/* ── Explore Grid ── */
.home-explore {
  margin-top: 40px;
}

/* ── Explore: path grid ── */
.home-paths-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 900px) {
  .home-paths-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.home-path-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  border-top: 3px solid var(--glass-border);
}
.home-path-card.path-green  { border-top-color: #27ae60; }
.home-path-card.path-orange { border-top-color: #f59e0b; }
.home-path-card.path-blue   { border-top-color: #3b82f6; }
.home-path-card.path-purple { border-top-color: #8b5cf6; }

.home-path-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.home-path-emoji {
  font-size: var(--text-xl);
}
.home-path-title {
  font-size: var(--text-md);
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}
.home-path-sub {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin: 0 0 14px;
  line-height: 1.4;
}

.home-path-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-path-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}
.home-path-link:hover {
  background: var(--color-surface);
}
.home-path-link-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.home-path-link-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
}
.home-path-link-desc {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.3;
}
.home-path-link-arrow {
  font-size: var(--text-md);
  color: var(--color-dim);
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}
.home-path-link:hover .home-path-link-arrow {
  color: var(--color-accent);
  transform: translateX(2px);
}

/* ── What's New ── */
.home-new {
  margin-top: 40px;
}

.home-new-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-new-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
}

.home-new-item:hover {
  border-color: rgba(var(--color-accent-rgb), 0.3);
}

.home-new-icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.home-new-content {
  flex: 1;
  min-width: 0;
}

.home-new-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.home-new-text {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
}

.home-new-detail {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.3;
  display: block;
  margin-top: 2px;
}

.home-new-pill {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.home-new-pill-learn {
  color: #3b82f6;
  background: rgba(var(--color-base-rgb), 0.12);
}

.home-new-pill-data {
  color: var(--color-accent);
  background: rgba(var(--color-accent-rgb), 0.12);
}

.home-new-pill-tools {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.12);
}
.home-new-pill-new {
  background: rgba(var(--color-accent-rgb), 0.15);
  color: var(--color-accent);
}

.home-new-arrow {
  font-size: var(--text-xl);
  color: var(--color-muted);
  flex-shrink: 0;
}

/* ── Personalize Card ── */
.home-personalize {
  margin-top: 40px;
}
.home-personalize-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.home-personalize-dismiss {
  background: none;
  border: none;
  color: var(--color-dim);
  font-size: var(--text-xl);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.home-personalize-dismiss:hover {
  color: var(--color-text);
  background: var(--color-surface);
}
.home-personalize-desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin: 0 0 14px;
  line-height: 1.4;
}
.home-personalize-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.home-personalize-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.home-personalize-item:hover {
  border-color: rgba(var(--color-accent-rgb), 0.12);
}
.home-personalize-icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}
.home-personalize-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.home-personalize-label {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
}
.home-personalize-value {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.3;
}
.home-personalize-action {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid rgba(var(--color-accent-rgb), 0.2);
  border-radius: var(--radius);
  background: rgba(var(--color-accent-rgb), 0.08);
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.home-personalize-action:hover {
  background: rgba(var(--color-accent-rgb), 0.15);
  border-color: rgba(var(--color-accent-rgb), 0.35);
}

/* ── Mobile Responsive ── */
@media (max-width: 640px) {
  .home-hero {
    padding: 32px 16px 24px;
  }
  .home-price-val {
    font-size: var(--text-3xl);
  }
  .home-sparkline-wrap {
    width: calc(100% + 32px);
    margin-left: -16px;
    height: 100px;
  }
  .home-range-btn {
    padding: 4px 10px;
    font-size: var(--text-xs);
  }
  .home-price-chg {
    font-size: var(--text-base);
  }
  .home-nav-btn {
    padding: 6px 10px;
  }
}

/* ═══════════════════════════════════════════════════════
   Scroll Progress Bar
   ═══════════════════════════════════════════════════════ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--color-accent);
  z-index: 900;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════
   Scroll-to-Top Button
   ═══════════════════════════════════════════════════════ */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  background: rgba(var(--color-accent-rgb), 0.15);
  color: var(--color-accent);
}
.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-to-top:hover {
  background: var(--color-accent);
  color: #fff;
}
.scroll-to-top:active {
  transform: scale(0.92);
}
.scroll-to-top svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 640px) {
  .scroll-to-top {
    width: 56px;
    height: 56px;
    bottom: 1.5rem;
    right: 1rem;
  }
  .scroll-to-top svg {
    width: 26px;
    height: 26px;
  }
}

/* ══════════════════════════════════════════════════
   What is Money Module
   ══════════════════════════════════════════════════ */
/* Hero styling handled by .module-hero */

.wim-section {
  max-width: 860px;
  margin: 0 auto 40px;
  padding: 0 16px;
}
.wim-section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 16px;
}
.wim-subsection-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--color-text);
}
.wim-section > p {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 16px;
}
.wim-sources {
  font-size: var(--text-base);
  font-style: italic;
  color: var(--color-muted);
  margin-bottom: 20px;
}

/* Properties grid */
.wim-props-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.wim-prop-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wim-prop-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.wim-prop-name {
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--brand);
}
.wim-prop-desc {
  font-size: var(--text-md);
  color: var(--color-muted);
  margin: 0;
  line-height: 1.5;
}

/* Tables (responsive) */
.wim-table {
  font-size: var(--text-md);
  min-width: 580px;
}
.wim-table th {
  background: var(--color-surface);
  font-weight: 600;
  color: var(--color-text);
}
.wim-table tbody tr:last-child td {
  border-bottom: none;
}
.wim-highlight-col {
  background: rgba(var(--color-accent-rgb), 0.06);
}
.wim-score-high {
  color: #10B981;
  font-weight: 600;
}
.wim-score-medium {
  color: var(--color-text);
}
.wim-score-low {
  color: #EF4444;
  font-weight: 600;
}

/* Highlight / shock-stat boxes */
.wim-highlight {
  padding: 16px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--text-md);
  line-height: 1.6;
  margin: 16px 0;
}
.wim-highlight-green {
  background: rgba(var(--color-bull-rgb), 0.08);
  border: 1px solid rgba(var(--color-bull-rgb), 0.25);
  color: #10B981;
}
.wim-highlight-red {
  background: rgba(var(--color-bear-rgb), 0.08);
  border: 1px solid rgba(var(--color-bear-rgb), 0.25);
  color: #EF4444;
}
[data-theme="light"] .wim-highlight-green {
  background: rgba(var(--color-bull-rgb), 0.1);
  color: #059669;
}
[data-theme="light"] .wim-highlight-red {
  background: rgba(var(--color-bear-rgb), 0.1);
  color: #DC2626;
}

/* History & Problem cards */
.wim-history-card,
.wim-problem-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeInUp 0.5s ease-out both;
}
.wim-history-title,
.wim-problem-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.wim-history-icon,
.wim-problem-icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}
.wim-history-card p,
.wim-problem-card p {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin: 0 0 12px;
}

/* Quote cards */
.wim-quote {
  background: var(--color-surface);
  border-left: 3px solid var(--brand);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 16px 0;
}
.wim-quote-text {
  font-style: italic;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0 0 8px;
  font-size: var(--text-md);
}
.wim-quote-author {
  display: block;
  font-size: var(--text-base);
  color: var(--color-muted);
  font-style: normal;
}
.wim-quotes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

/* Bridge to Bitcoin grid */
.wim-bridge-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.wim-bridge-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.wim-bridge-problem {
  padding: 14px 18px;
  border-bottom: 1px solid var(--glass-border);
}
.wim-bridge-solution {
  padding: 14px 18px;
  background: rgba(var(--color-bull-rgb), 0.04);
}
.wim-bridge-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #EF4444;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.wim-bridge-label-btc {
  color: #10B981;
}
.wim-bridge-problem p,
.wim-bridge-solution p {
  margin: 0;
  line-height: 1.6;
  font-size: var(--text-md);
  color: var(--color-text);
}

/* Key statistics grid (2x3) */
.wim-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.wim-stat-card {
  padding: 20px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--text-md);
  text-align: center;
  line-height: 1.5;
  animation: fadeInUp 0.5s ease-out both;
}
.wim-stat-red {
  background: rgba(var(--color-bear-rgb), 0.08);
  border: 1px solid rgba(var(--color-bear-rgb), 0.2);
  color: #EF4444;
}
.wim-stat-green {
  background: rgba(var(--color-bull-rgb), 0.08);
  border: 1px solid rgba(var(--color-bull-rgb), 0.2);
  color: #10B981;
}
[data-theme="light"] .wim-stat-red {
  background: rgba(var(--color-bear-rgb), 0.08);
  color: #DC2626;
}
[data-theme="light"] .wim-stat-green {
  background: rgba(var(--color-bull-rgb), 0.08);
  color: #059669;
}

/* Stagger stat card entrance */
.wim-stat-card:nth-child(1) { animation-delay: 0.05s; }
.wim-stat-card:nth-child(2) { animation-delay: 0.10s; }
.wim-stat-card:nth-child(3) { animation-delay: 0.15s; }
.wim-stat-card:nth-child(4) { animation-delay: 0.20s; }
.wim-stat-card:nth-child(5) { animation-delay: 0.25s; }
.wim-stat-card:nth-child(6) { animation-delay: 0.30s; }

/* Key limitations */
.wim-limitation {
  background: var(--color-surface);
  border-left: 3px solid #EF4444;
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 8px 0;
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-text);
}

/* Explore further */
.wim-explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.wim-explore-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.wim-explore-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.wim-explore-link {
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  font-size: var(--text-md);
}
.wim-explore-desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin: 6px 0 0;
  line-height: 1.5;
}
.wim-explore-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: var(--text-xl);
  color: var(--color-muted);
}

/* Mobile: stack stat grid to 1 column */
@media (max-width: 640px) {
  .wim-stats-grid {
    grid-template-columns: 1fr;
  }
  .wim-props-grid {
    grid-template-columns: 1fr;
  }
  .wim-explore-grid {
    grid-template-columns: 1fr;
  }
  .wim-history-card,
  .wim-problem-card {
    padding: 16px;
  }
  .wim-section {
    padding: 0 12px;
  }
}

/* ═══════════════════════════════════════════════
   Inheritance & Estate Planning Module (Redesigned)
   ═══════════════════════════════════════════════ */

/* Flat section layout */
.inh-section {
  max-width: 860px;
  margin: 0 auto 24px;
  padding: 0 16px;
}
.inh-section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.inh-section-icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}
.inh-subsection-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--color-text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
}
.inh-section-intro {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 16px;
}

/* Chip navigation — horizontal scroll on mobile */
.inh-chip-nav {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.inh-chip-link {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.inh-chip-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.inh-chip-link.inh-chip-active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 16px rgba(var(--color-accent-rgb), 0.3);
}

/* Generic card */
.inh-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeInUp 0.5s ease-out both;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.inh-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* Shock stat cards (2x2 grid) */
.inh-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.inh-stat-card {
  text-align: center;
  padding: 20px 16px;
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.06), rgba(247, 147, 26, 0.01));
  border-color: rgba(247, 147, 26, 0.15);
}
.inh-stat-card:hover {
  border-color: rgba(247, 147, 26, 0.3);
  box-shadow: 0 4px 20px rgba(247, 147, 26, 0.08);
}
.inh-stat-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 6px;
}
.inh-stat-label {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.4;
}

/* Horror stories */
.inh-horror-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.inh-horror-title {
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--color-text);
}
.inh-horror-text {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin: 0;
}

/* Strategy cards */
.inh-strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.inh-strategy-card {
  border-left: 3px solid var(--brand);
}
.inh-strategy-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--color-text);
}
.inh-strategy-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.inh-strategy-list li {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}
.inh-strategy-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.7;
}

/* Tables (responsive) */
.inh-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}
.inh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-md);
  min-width: 580px;
}
.inh-table th,
.inh-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}
.inh-table th {
  background: var(--color-surface);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}
.inh-table tbody tr:last-child td {
  border-bottom: none;
}
.inh-table tbody tr:hover {
  background: rgba(var(--color-accent-rgb), 0.04);
}

/* Checklist cards */
.inh-checklist-card {
  padding: 20px 24px;
}
.inh-checklist-title {
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--color-text);
}
.inh-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.inh-checklist-item {
  line-height: 1.6;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}
.inh-checklist-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.7;
}
.inh-store-card {
  border-left: 3px solid var(--brand);
}

/* Letter grid (include/never side by side) */
.inh-letter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

/* Interactive checklist rows */
.inh-checklist-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 4px;
}
.inh-checklist-row:hover {
  background: rgba(var(--color-accent-rgb), 0.04);
}
.inh-row-checked {
  background: rgba(var(--color-bull-rgb), 0.06);
}
.inh-row-checked .inh-check-label {
  text-decoration: line-through;
  opacity: 0.6;
}
.inh-check-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.inh-check-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.inh-check-input:checked + .inh-check-indicator {
  background: #10B981;
  border-color: #10B981;
}
.inh-check-input:checked + .inh-check-indicator::after {
  content: '';
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
  margin-top: -2px;
}
.inh-check-num {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-muted);
  min-width: 24px;
  flex-shrink: 0;
}
.inh-check-label {
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-text);
  transition: opacity 0.2s ease;
}
.inh-maintenance-list {
  display: flex;
  flex-direction: column;
}

/* Progress bar */
.inh-progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.inh-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--glass-border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.inh-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #10B981, #34D399);
  border-radius: var(--radius-xs);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.inh-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s ease-in-out infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.inh-progress-text {
  font-size: var(--text-base);
  font-weight: 700;
  color: #10B981;
  white-space: nowrap;
  min-width: 40px;
  text-align: right;
}

/* Template steps */
.inh-template-steps {
  margin: 0;
  padding-left: 24px;
}
.inh-template-step {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 10px;
  padding-left: 4px;
}

/* Legal tabs */
.inh-tab-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 0;
  border-bottom: 2px solid var(--glass-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.inh-tab-bar::-webkit-scrollbar { display: none; }
.inh-tab-btn {
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--color-muted);
  font-family: inherit;
  font-size: var(--text-md);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  border-radius: var(--radius) var(--radius) 0 0;
}
.inh-tab-btn:hover {
  color: var(--color-text);
  background: rgba(var(--color-accent-rgb), 0.04);
}
.inh-tab-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
  background: rgba(247, 147, 26, 0.06);
}
.inh-tab-content {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.inh-tab-panel {
  display: none;
}
.inh-tab-panel-active {
  display: block;
}
.inh-legal-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.inh-legal-list li {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}
.inh-legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.7;
}

/* Service cards */
.inh-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.inh-service-card {
  border-left: 3px solid var(--brand);
}
.inh-service-title {
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--brand);
}
.inh-service-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.inh-service-list li {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}
.inh-service-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.7;
}
.inh-comparison-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.inh-comparison-list li {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}
.inh-comparison-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.7;
}

/* Metal backup grid */
.inh-metal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.inh-metal-card {
  padding: 16px;
}
.inh-metal-name {
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--brand);
}
.inh-metal-card p {
  font-size: var(--text-md);
  color: var(--color-muted);
  margin: 0;
  line-height: 1.5;
}

/* Storage grid */
.inh-storage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.inh-storage-point {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--color-card-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.inh-storage-point:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.inh-storage-point p {
  margin: 0;
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
}

/* Dead-man card */
.inh-deadman-card {
  border-left: 3px solid #F59E0B;
  background: linear-gradient(135deg, rgba(var(--color-custom-rgb), 0.04), transparent);
}
.inh-deadman-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.inh-deadman-list li {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}
.inh-deadman-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.7;
}

/* Mistake cards grid */
.inh-mistake-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.inh-mistake-card {
  padding: 16px;
}
.inh-mistake-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.inh-mistake-num {
  width: 22px;
  height: 22px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
}
.inh-mistake-text {
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-text);
  opacity: 0.85;
}

/* Decision framework steps */
.inh-steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
}
.inh-step {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  width: 100%;
  max-width: 480px;
  animation: fadeInUp 0.5s ease-out both;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.inh-step:hover {
  border-color: rgba(247, 147, 26, 0.3);
  box-shadow: 0 4px 16px rgba(247, 147, 26, 0.08);
  transform: translateY(-1px);
}
.inh-step-num {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--brand), #e08515);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(247, 147, 26, 0.3);
}
.inh-step-text {
  font-size: var(--text-md);
  color: var(--color-text);
  font-weight: 500;
}
.inh-step-arrow {
  text-align: center;
  font-size: var(--text-xl);
  color: var(--brand);
  width: 100%;
  max-width: 480px;
  animation: fadeInUp 0.5s ease-out both;
  opacity: 0.6;
}

/* Explore section (non-collapsible) */
.inh-explore-section {
  border: none;
  background: none;
  padding: 0 16px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Footnote */
.inh-footnote {
  max-width: 860px;
  margin: 0 auto 40px;
  padding: 0 16px;
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-align: center;
  font-style: italic;
  line-height: 1.5;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .inh-strategy-grid {
    grid-template-columns: 1fr;
  }
  .inh-letter-grid {
    grid-template-columns: 1fr;
  }
  .inh-chip-link {
    flex-shrink: 1;
  }
  .inh-stats-grid {
    grid-template-columns: 1fr;
  }
  .inh-stat-value {
    font-size: var(--text-xl);
  }
  .inh-metal-grid {
    grid-template-columns: 1fr;
  }
  .inh-mistake-grid {
    grid-template-columns: 1fr;
  }
  .inh-card {
    padding: 16px;
  }
  .inh-section-title {
    font-size: var(--text-lg);
  }
  .inh-section {
    padding: 0 8px;
    margin: 0 auto 16px;
  }
  .inh-step {
    padding: 12px 14px;
  }
  .inh-tab-btn {
    padding: 10px 14px;
    font-size: var(--text-base);
  }
  .inh-tab-content {
    padding: 16px;
  }
  .inh-service-grid {
    grid-template-columns: 1fr;
  }
  .inh-checklist-row {
    padding: 8px 10px;
  }
  .inh-horror-grid {
    grid-template-columns: 1fr;
  }
  .inh-storage-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════
   Security & OpSec Module (Redesigned) (sec-)
   ═══════════════════════════════════════════════════ */

/* Flat section layout */
.sec-section {
  max-width: 860px;
  margin: 0 auto 24px;
  padding: 0 16px;
}
.sec-section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-section-icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}
.sec-subsection-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--color-text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
}
.sec-section-intro {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 16px;
}

/* Chip navigation — horizontal scroll on mobile */
.sec-chip-nav {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.sec-chip-link {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  flex-shrink: 0;
}
.sec-chip-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.sec-chip-link.sec-chip-active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 16px rgba(var(--color-accent-rgb), 0.3);
}

/* Generic card */
.sec-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeInUp 0.5s ease-out both;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.sec-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* Intro card */
.sec-intro-card {
  border-left: 3px solid var(--brand);
}
.sec-intro-text {
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.7;
  color: var(--color-text);
  margin: 0;
}

/* Shock stat cards (2×3 grid) */
.sec-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.sec-stat-card {
  text-align: center;
  padding: 20px 16px;
  background: linear-gradient(135deg, rgba(var(--color-bear-rgb), 0.06), rgba(var(--color-bear-rgb), 0.01));
  border-color: rgba(var(--color-bear-rgb), 0.15);
}
.sec-stat-card:hover {
  border-color: rgba(var(--color-bear-rgb), 0.3);
  box-shadow: 0 4px 20px rgba(var(--color-bear-rgb), 0.08);
}
.sec-stat-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: #EF4444;
  margin-bottom: 6px;
}
.sec-stat-label {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.4;
}

/* Target reason cards */
.sec-reason-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.sec-reason-card {
  border-left: 3px solid var(--brand);
}
.sec-reason-title {
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--color-text);
}
.sec-reason-text {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin: 0;
}

/* Point cards in grids (neutral) */
.sec-point-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.sec-point {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--color-card-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sec-point:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.sec-point-title {
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--color-text);
}
.sec-point-text {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin: 0;
}

/* Styled lists (replaces emoji-prefixed lists) */
.sec-styled-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sec-styled-list li {
  line-height: 1.6;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}
.sec-styled-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.7;
}

/* Tables (responsive) */
.sec-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}
.sec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-md);
  min-width: 480px;
}
.sec-table th,
.sec-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}
.sec-table th {
  background: var(--color-surface);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}
.sec-table tbody tr:last-child td {
  border-bottom: none;
}

/* Traffic light table */
.sec-traffic-table .sec-traffic-tool {
  font-weight: 600;
  color: var(--color-text);
}
.sec-traffic-table .sec-traffic-verdict {
  font-weight: 600;
  white-space: nowrap;
}
.sec-traffic-table .sec-traffic-note {
  color: var(--color-text);
  opacity: 0.85;
}
.sec-traffic-green td { border-left: 3px solid #10B981; }
.sec-traffic-yellow td { border-left: 3px solid #F59E0B; }
.sec-traffic-red td { border-left: 3px solid #EF4444; }
.sec-traffic-green:hover { background: rgba(var(--color-bull-rgb), 0.06); }
.sec-traffic-yellow:hover { background: rgba(var(--color-custom-rgb), 0.06); }
.sec-traffic-red:hover { background: rgba(var(--color-bear-rgb), 0.06); }

/* 2FA Hierarchy */
.sec-2fa-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.sec-2fa-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  animation: fadeInUp 0.5s ease-out both;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.sec-2fa-row:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.sec-2fa-green { border-left: 3px solid #10B981; }
.sec-2fa-red { border-left: 3px solid #EF4444; }
.sec-2fa-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}
.sec-2fa-green .sec-2fa-rank { background: #10B981; }
.sec-2fa-red .sec-2fa-rank { background: #EF4444; }
.sec-2fa-body {
  flex: 1;
}
.sec-2fa-label {
  font-size: var(--text-md);
  color: var(--color-text);
}
.sec-2fa-desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin: 4px 0 0;
  line-height: 1.5;
}

/* Practice card */
.sec-practice-card {
  border-left: 3px solid var(--brand);
}
.sec-practice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sec-practice-item {
  line-height: 1.6;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}
.sec-practice-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.7;
}

/* OpSec Principles grid */
.sec-principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.sec-principle-card {
  border-left: 3px solid var(--brand);
}
.sec-principle-title {
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--color-text);
}
.sec-principle-text {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin: 0;
}

/* Timeline cards (Hall of Shame) — Grid layout */
.sec-timeline {
  position: relative;
  margin: 16px 0 24px;
}
.sec-timeline-item {
  display: grid;
  grid-template-columns: 48px 24px 1fr;
  gap: 0 8px;
  margin-bottom: 0;
  align-items: stretch;
  animation: fadeInUp 0.5s ease-out both;
}
.sec-timeline-year {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--brand, #f7931a);
  text-align: right;
  padding-top: 14px;
  line-height: 1;
}
.sec-timeline-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sec-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand, #f7931a);
  margin-top: 16px;
  flex-shrink: 0;
}
.sec-timeline-line {
  width: 2px;
  flex: 1;
  background: var(--glass-border);
  min-height: 20px;
}
.sec-timeline-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-left: 3px solid #e53e3e;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.sec-timeline-card:hover {
  border-color: rgba(229, 62, 62, 0.3);
  box-shadow: 0 4px 16px rgba(229, 62, 62, 0.06);
}
.sec-timeline-card h4 {
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--color-text);
}
.sec-timeline-card p {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin: 0;
  line-height: 1.5;
}

/* Traffic light — Mobile card view */
.sec-traffic-cards {
  display: none;
}
.sec-traffic-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  animation: fadeInUp 0.5s ease-out both;
}
.sec-traffic-card-green { border-left: 3px solid #10B981; }
.sec-traffic-card-yellow { border-left: 3px solid #F59E0B; }
.sec-traffic-card-red { border-left: 3px solid #EF4444; }
.sec-traffic-card-tool {
  font-weight: 600;
  font-size: var(--text-md);
  color: var(--color-text);
  margin-bottom: 6px;
}
.sec-traffic-card-verdict {
  font-weight: 600;
  font-size: var(--text-base);
  margin-bottom: 8px;
}
.sec-traffic-card-green .sec-traffic-card-verdict { color: #10B981; }
.sec-traffic-card-yellow .sec-traffic-card-verdict { color: #F59E0B; }
.sec-traffic-card-red .sec-traffic-card-verdict { color: #EF4444; }
.sec-traffic-card-note {
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text);
  opacity: 0.75;
}

/* Mobile platform — Mobile card view */
.sec-mob-cards {
  display: none;
}
.sec-mob-platform-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  animation: fadeInUp 0.5s ease-out both;
}
.sec-mob-platform-name {
  font-weight: 600;
  font-size: var(--text-md);
  color: var(--color-text);
  margin-bottom: 6px;
}
.sec-mob-platform-level {
  font-weight: 600;
  font-size: var(--text-base);
  margin-bottom: 8px;
}
.sec-mob-platform-level.sec-level-green { color: #10B981; }
.sec-mob-platform-level.sec-level-yellow { color: #F59E0B; }
.sec-mob-platform-level.sec-level-red { color: #EF4444; }
.sec-mob-platform-note {
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text);
  opacity: 0.75;
}

/* Progress bar */
.sec-progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.sec-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--glass-border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.sec-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #10B981, #34D399);
  border-radius: var(--radius-xs);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.sec-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s ease-in-out infinite;
}
.sec-progress-text {
  font-size: var(--text-base);
  font-weight: 700;
  color: #10B981;
  white-space: nowrap;
  min-width: 40px;
  text-align: right;
}

/* 30-Point Checklist tiers */
.sec-checklist-tier {
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.sec-tier-basic {
  background: rgba(var(--color-bull-rgb), 0.06);
  border: 1px solid rgba(var(--color-bull-rgb), 0.2);
}
.sec-tier-intermediate {
  background: rgba(var(--color-custom-rgb), 0.06);
  border: 1px solid rgba(var(--color-custom-rgb), 0.2);
}
.sec-tier-advanced {
  background: rgba(var(--color-bear-rgb), 0.06);
  border: 1px solid rgba(var(--color-bear-rgb), 0.2);
}
.sec-tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sec-tier-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
}
.sec-tier-count {
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
}
.sec-tier-basic .sec-tier-count { color: #10B981; background: rgba(var(--color-bull-rgb), 0.12); }
.sec-tier-intermediate .sec-tier-count { color: #F59E0B; background: rgba(var(--color-custom-rgb), 0.12); }
.sec-tier-advanced .sec-tier-count { color: #EF4444; background: rgba(var(--color-bear-rgb), 0.12); }
.sec-checklist-items {
  display: flex;
  flex-direction: column;
}

/* Interactive checklist rows */
.sec-checklist-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 2px;
}
.sec-checklist-row:hover {
  background: rgba(255,255,255,0.04);
}
.sec-row-checked {
  background: rgba(var(--color-bull-rgb), 0.06);
}
.sec-row-checked .sec-check-label {
  text-decoration: line-through;
  opacity: 0.6;
}
.sec-check-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.sec-check-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.sec-check-input:checked + .sec-check-indicator {
  background: #10B981;
  border-color: #10B981;
}
.sec-check-input:checked + .sec-check-indicator::after {
  content: '';
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
  margin-top: -2px;
}
.sec-check-num {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-muted);
  min-width: 28px;
  flex-shrink: 0;
}
.sec-check-label {
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-text);
  transition: opacity 0.2s ease;
}

/* Explore section (non-collapsible) */
.sec-explore-section {
  border: none;
  background: none;
  padding: 0 16px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Footnote */
.sec-footnote {
  max-width: 860px;
  margin: 0 auto 40px;
  padding: 0 16px;
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-align: center;
  font-style: italic;
  line-height: 1.5;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .sec-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sec-reason-grid {
    grid-template-columns: 1fr;
  }
  .sec-principle-grid {
    grid-template-columns: 1fr;
  }
  .sec-point-grid {
    grid-template-columns: 1fr;
  }
  .sec-chip-nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .sec-chip-nav::-webkit-scrollbar { display: none; }
  .sec-chip-link {
    scroll-snap-align: start;
  }
  /* Show mobile card views, hide desktop tables */
  .sec-traffic-desktop {
    display: none;
  }
  .sec-traffic-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .sec-mob-table-container > .sec-table-wrap {
    display: none;
  }
  .sec-mob-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .sec-stats-grid {
    grid-template-columns: 1fr;
  }
  .sec-stat-value {
    font-size: var(--text-xl);
  }
  .sec-card {
    padding: 16px;
  }
  .sec-section-title {
    font-size: var(--text-lg);
  }
  .sec-section {
    padding: 0 8px;
    margin: 0 auto 16px;
  }
  .sec-checklist-tier {
    padding: 16px;
  }
  .sec-checklist-row {
    padding: 8px 10px;
  }
  .sec-timeline-item {
    grid-template-columns: 40px 20px 1fr;
    gap: 0 6px;
  }
  .sec-timeline-year {
    font-size: var(--text-xs);
    padding-top: 12px;
  }
  .sec-timeline-card {
    padding: 12px 14px;
  }
  .sec-2fa-row {
    padding: 12px 14px;
    gap: 10px;
  }
  /* Score block mobile */
  .sec-score-block {
    padding: 20px 16px 16px;
  }
  .sec-score-value {
    font-size: var(--text-3xl);
  }
  .sec-score-value span {
    font-size: var(--text-lg);
  }
  /* Tier card mobile */
  .sec-tier-card {
    padding: 16px;
  }
  .sec-checklist-item {
    padding: 10px 12px;
    gap: 10px;
  }
  .sec-checklist-item-num {
    width: 24px;
    height: 24px;
    font-size: var(--text-xs);
  }
  .sec-tier-label {
    font-size: var(--text-md);
  }
}

/* ── Security: info card variant ── */
.sec-info-card {
  background: linear-gradient(135deg, rgba(var(--color-base-rgb), 0.05), rgba(var(--color-base-rgb), 0.01));
  border-color: rgba(var(--color-base-rgb), 0.15);
}

/* ── Security: threat list container ── */
.sec-threat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}

/* ── Info list cards (grouped card look) ── */
.sec-info-list {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 4px 0;
  margin: 12px 0;
}
.sec-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border);
}
.sec-info-item:last-child {
  border-bottom: none;
}
.sec-info-text {
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-text);
}

/* ── Warning list (red flags) ── */
.sec-warning-list {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 4px 0;
  margin: 12px 0;
}
.sec-warning-item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--glass-border);
  font-size: var(--text-md);
  color: var(--color-text);
  line-height: 1.5;
}
.sec-warning-item:last-child {
  border-bottom: none;
}

/* ═══════════════════════════════════════════════════
   Security Redesign v2 — Score, Tier Cards, Cards
   ═══════════════════════════════════════════════════ */

/* ── Score Block ── */
.sec-score-block {
  text-align: center;
  padding: 28px 24px 20px;
  border-radius: var(--radius-lg);
  background: var(--color-card-bg);
  border: 2px solid var(--glass-border);
  margin-bottom: 24px;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.sec-score-block--fullcitadel {
  border-color: #F59E0B;
  animation: secGoldPulse 2s ease-in-out infinite;
}
@keyframes secGoldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--color-custom-rgb), 0.3); }
  50% { box-shadow: 0 0 20px 4px rgba(var(--color-custom-rgb), 0.2); }
}
.sec-score-value {
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--color-text);
}
.sec-score-value span {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-muted);
}
.sec-score-bar {
  height: 10px;
  border-radius: var(--radius-xs);
  background: var(--glass-border);
  overflow: hidden;
  margin-bottom: 16px;
}
.sec-score-bar-fill {
  height: 100%;
  border-radius: var(--radius-xs);
  width: 0;
  transition: width 0.4s ease, background 0.4s ease;
}
.sec-score-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  transition: background 0.4s ease;
}
.sec-score-message {
  font-size: var(--text-md);
  color: var(--color-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}
.sec-score-reset {
  font-size: var(--text-xs);
  color: var(--color-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  text-decoration: underline;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.sec-score-reset:hover {
  opacity: 1;
}
.sec-score-title-text {
  font-size: var(--text-base);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 8px;
}

/* ── Tier Cards ── */
.sec-tier-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  transition: opacity 0.3s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.sec-tier-card--basic {
  background: rgba(var(--color-bull-rgb), 0.06);
  border: 1px solid rgba(var(--color-bull-rgb), 0.2);
}
.sec-tier-card--intermediate {
  background: rgba(var(--color-custom-rgb), 0.06);
  border: 1px solid rgba(var(--color-custom-rgb), 0.2);
}
.sec-tier-card--advanced {
  background: rgba(var(--color-bear-rgb), 0.06);
  border: 1px solid rgba(var(--color-bear-rgb), 0.2);
}
.sec-tier-card--complete {
  box-shadow: 0 0 12px rgba(var(--color-bull-rgb), 0.15);
  border-color: #10B981;
}
.sec-tier-locked {
  opacity: 0.5;
  pointer-events: none;
}
.sec-tier-locked .sec-checklist-item {
  cursor: default;
}
.sec-tier-card--basic .sec-tier-count { color: #10B981; background: rgba(var(--color-bull-rgb), 0.12); }
.sec-tier-card--intermediate .sec-tier-count { color: #F59E0B; background: rgba(var(--color-custom-rgb), 0.12); }
.sec-tier-card--advanced .sec-tier-count { color: #EF4444; background: rgba(var(--color-bear-rgb), 0.12); }
.sec-tier-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.sec-tier-label {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sec-tier-lock-msg {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sec-tier-lock-progress {
  height: 4px;
  border-radius: var(--radius-xs);
  background: var(--glass-border);
  overflow: hidden;
  margin-bottom: 16px;
  max-width: 200px;
}
.sec-tier-lock-progress-fill {
  height: 100%;
  border-radius: var(--radius-xs);
  background: var(--color-muted);
  transition: width 0.3s ease;
}

/* ── Checklist Items as Toggle Cards ── */
.sec-checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  margin-bottom: 4px;
  border-left: 3px solid transparent;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}
.sec-checklist-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
.sec-checklist-item--checked {
  border-left-color: #10B981;
  background: rgba(var(--color-bull-rgb), 0.06);
}
.sec-checklist-item--checked .sec-checklist-item-text {
  opacity: 0.7;
}
.sec-checklist-item-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-muted);
  border: 1px solid var(--glass-border);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.sec-checklist-item--checked .sec-checklist-item-num {
  background: #10B981;
  color: #fff;
  border-color: #10B981;
  font-size: var(--text-md);
}
.sec-checklist-item-text {
  flex: 1;
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-text);
  transition: opacity 0.2s ease;
}
.sec-checklist-item-hint {
  font-size: var(--text-xs);
  color: var(--color-muted);
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}
.sec-checklist-item:hover .sec-checklist-item-hint {
  opacity: 0.8;
}
.sec-checklist-item--checked .sec-checklist-item-hint {
  display: none;
}
.sec-checklist-item-pts {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-muted);
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}
.sec-checklist-item:hover .sec-checklist-item-pts {
  opacity: 0.6;
}
.sec-checklist-item--checked .sec-checklist-item-pts {
  opacity: 0;
}
/* Points badge that fades in on check */
.sec-pts-badge {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-xs);
  font-weight: 700;
  color: #10B981;
  opacity: 0;
  animation: secPtsFade 1.5s ease-out forwards;
  pointer-events: none;
}
@keyframes secPtsFade {
  0% { opacity: 0; transform: translateY(-50%) translateX(0); }
  15% { opacity: 1; transform: translateY(-50%) translateX(0); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ── Sub-Section Headers ── */
.sec-subsection-header {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--color-text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
}

/* ── Score bar gradient helper ── */
.sec-score-bar-fill--red { background: linear-gradient(90deg, #EF4444, #F87171); }
.sec-score-bar-fill--orange { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.sec-score-bar-fill--green { background: linear-gradient(90deg, #22C55E, #4ADE80); }
.sec-score-bar-fill--purple { background: linear-gradient(90deg, #A855F7, #C084FC); }
.sec-score-bar-fill--gold { background: linear-gradient(90deg, #F59E0B, #FDE68A, #F59E0B); background-size: 200% 100%; animation: secGoldShimmer 2s ease infinite; }
@keyframes secGoldShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Checked card transition ── */
.sec-checklist-item {
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* ═══════════════════════════════════════════════════
   How Bitcoin Works Module (hbw-)
   ═══════════════════════════════════════════════════ */
.hbw-section {
  max-width: 860px;
  margin: 0 auto 40px;
  padding: 0 16px;
}
.hbw-section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 16px;
}
.hbw-subsection-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--color-text);
}
.hbw-section > p {
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 16px;
}
.hbw-muted {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin-bottom: 12px;
}

/* Highlight boxes */
.hbw-highlight {
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: var(--text-md);
  line-height: 1.6;
  margin: 16px 0;
}
.hbw-highlight strong {
  display: block;
  margin-bottom: 6px;
}
.hbw-highlight-blue {
  background: rgba(var(--color-base-rgb), 0.08);
  border: 1px solid rgba(var(--color-base-rgb), 0.25);
  color: var(--color-text);
}
.hbw-highlight-green {
  background: rgba(var(--color-bull-rgb), 0.08);
  border: 1px solid rgba(var(--color-bull-rgb), 0.25);
  color: #10B981;
}
.hbw-highlight-gold {
  background: rgba(var(--color-custom-rgb), 0.08);
  border: 1px solid rgba(var(--color-custom-rgb), 0.25);
  color: var(--color-text);
}
[data-theme="light"] .hbw-highlight-green {
  background: rgba(var(--color-bull-rgb), 0.1);
  color: #059669;
}
[data-theme="light"] .hbw-highlight-gold {
  background: rgba(var(--color-custom-rgb), 0.1);
}

/* Concept cards grid */
.hbw-concepts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.hbw-concept-card {
  display: flex;
  gap: 12px;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.5s ease-out both;
}
.hbw-concept-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.hbw-concept-card-wide {
  grid-column: 1 / -1;
  display: block;
}
.hbw-concept-icon {
  font-size: var(--text-2xl);
  flex-shrink: 0;
  line-height: 1;
}
.hbw-concept-body {
  flex: 1;
  min-width: 0;
}
.hbw-concept-title {
  display: block;
  font-size: var(--text-md);
  color: var(--brand);
  margin-bottom: 4px;
}
.hbw-concept-desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin: 0;
  line-height: 1.55;
}

/* Tables (responsive) */
.hbw-table {
  font-size: var(--text-md);
  min-width: 480px;
}
.hbw-table th {
  background: var(--color-surface);
  font-weight: 600;
  color: var(--color-text);
}
.hbw-table tbody tr:last-child td {
  border-bottom: none;
}
.hbw-highlight-col {
  background: rgba(var(--color-accent-rgb), 0.06);
}

/* Timeline / Stepper */
.hbw-timeline {
  position: relative;
  padding-left: 32px;
  margin: 24px 0;
}
.hbw-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--glass-border);
}
.hbw-timeline-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  position: relative;
  animation: fadeInUp 0.5s ease-out both;
}
.hbw-timeline-item:nth-child(1) { animation-delay: 0.05s; }
.hbw-timeline-item:nth-child(2) { animation-delay: 0.10s; }
.hbw-timeline-item:nth-child(3) { animation-delay: 0.15s; }
.hbw-timeline-item:nth-child(4) { animation-delay: 0.20s; }
.hbw-timeline-item:nth-child(5) { animation-delay: 0.25s; }
.hbw-timeline-item:nth-child(6) { animation-delay: 0.30s; }
.hbw-timeline-item:nth-child(7) { animation-delay: 0.35s; }
.hbw-timeline-item:nth-child(8) { animation-delay: 0.40s; }
.hbw-timeline-item:nth-child(9) { animation-delay: 0.45s; }
.hbw-timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.hbw-timeline-icon {
  font-size: var(--text-xl);
  background: var(--color-bg);
  padding: 2px;
}
.hbw-timeline-num {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--brand);
  background: var(--color-bg);
  padding: 0 2px;
}
.hbw-timeline-body {
  flex: 1;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
}
.hbw-timeline-item:last-child .hbw-timeline-body {
  border-bottom: none;
}
.hbw-timeline-title {
  display: block;
  font-size: var(--text-md);
  color: var(--color-text);
  margin-bottom: 4px;
}
.hbw-timeline-desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin: 0 0 4px;
  line-height: 1.55;
}
.hbw-timeline-time {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--brand);
  background: rgba(var(--color-accent-rgb), 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}

/* Confirmation guide rows */
.hbw-conf-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
}
.hbw-conf-level {
  flex-shrink: 0;
  min-width: 60px;
  color: var(--brand);
  font-size: var(--text-md);
}

/* Walk-through example */
.hbw-walkthrough {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}
.hbw-walk-scenario {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
}
.hbw-walk-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.hbw-walk-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-md);
  color: var(--color-text);
}
.hbw-walk-arrow {
  color: var(--brand);
  font-weight: 700;
  flex-shrink: 0;
}
.hbw-walk-conclusion {
  font-style: italic;
  font-size: var(--text-base);
  color: var(--color-muted);
  margin: 0;
}

/* Block header visual */
.hbw-block-header {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}
.hbw-block-header-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--brand);
  background: rgba(var(--color-accent-rgb), 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  margin-bottom: 12px;
}
.hbw-header-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.hbw-header-field {
  padding: 8px 0;
}
.hbw-header-field strong {
  display: block;
  font-size: var(--text-md);
  color: var(--color-text);
  margin-bottom: 2px;
}

/* Cryptographic primitives cards */
.hbw-crypto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.hbw-crypto-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.5s ease-out both;
}
.hbw-crypto-card:hover {
  border-color: rgba(var(--color-accent-rgb), 0.2);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.hbw-crypto-icon {
  font-size: var(--text-3xl);
  margin-bottom: 10px;
}
.hbw-crypto-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--brand);
  margin: 0 0 8px;
}
.hbw-crypto-analogy {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.55;
  margin: 0;
}

/* Statistics grid (2x3) */
.hbw-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.hbw-stat-card {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  position: relative;
  animation: fadeInUp 0.5s ease-out both;
}
.hbw-stat-card:nth-child(1) { animation-delay: 0.05s; }
.hbw-stat-card:nth-child(2) { animation-delay: 0.10s; }
.hbw-stat-card:nth-child(3) { animation-delay: 0.15s; }
.hbw-stat-card:nth-child(4) { animation-delay: 0.20s; }
.hbw-stat-card:nth-child(5) { animation-delay: 0.25s; }
.hbw-stat-card:nth-child(6) { animation-delay: 0.30s; }
.hbw-stat-value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}
.hbw-stat-label {
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-weight: 500;
}

/* Inline stat + link rows */
.hbw-inline-stat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
}
.hbw-section-link {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}
.hbw-section-link:hover {
  text-decoration: underline;
}

/* Footnote */
.hbw-footnote {
  max-width: 860px;
  margin: 40px auto 0;
  padding: 0 16px;
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-align: center;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .hbw-concepts-grid {
    grid-template-columns: 1fr;
  }
  .hbw-crypto-grid {
    grid-template-columns: 1fr;
  }
  .hbw-stats-grid {
    grid-template-columns: 1fr;
  }
  .hbw-header-grid {
    grid-template-columns: 1fr;
  }
  .hbw-timeline {
    padding-left: 24px;
  }
  .hbw-timeline::before {
    left: 11px;
  }
  .hbw-conf-row {
    flex-direction: column;
    gap: 4px;
  }
}

/* ── Proof of Knowledge: My Journey ── */
.pok-overview {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  padding: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.pok-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.pok-ring { filter: none; }
.pok-section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 8px;
}
.pok-ladder-wrap { width: 100%; }
/* Tier ladder */
.pok-tier-ladder-wrap { width: 100%; }
.pok-tier-ladder {
  display: flex;
  gap: 4px;
  width: 100%;
}
.pok-tier-step {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-xs);
  background: rgba(var(--color-accent-rgb), 0.15);
  position: relative;
  transition: background 0.3s;
}
.pok-tier-step.active {
  box-shadow: 0 0 8px currentColor;
}
.pok-tier-step.reached {
  background: rgba(var(--color-accent-rgb), 0.35);
}
.pok-tier-labels {
  display: flex;
  width: 100%;
  margin-top: 6px;
}
.pok-tier-label {
  flex: 1;
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: center;
}
/* Track cards */
.pok-tracks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.pok-track-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.pok-track-emoji { font-size: 2rem; margin-bottom: 8px; }
.pok-track-name { font-weight: 700; font-size: var(--text-base); margin-bottom: 8px; }
.pok-track-bar {
  height: 6px;
  background: var(--color-surface);
  border-radius: var(--radius-xs);
  overflow: hidden;
  margin-bottom: 6px;
}
.pok-track-bar-fill {
  height: 100%;
  border-radius: var(--radius-xs);
  background: var(--color-accent);
  transition: width 0.8s ease-out;
}
.pok-track-count {
  font-size: var(--text-sm);
  color: var(--color-muted);
}
/* Proof card */
.pok-proof-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.pok-proof-hash {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: var(--text-sm);
  color: var(--color-accent);
  word-break: break-all;
  background: var(--color-surface);
  padding: 12px;
  border-radius: var(--radius);
  margin: 8px 0;
  user-select: all;
}
.pok-verify-link {
  display: inline-block;
  color: var(--color-accent);
  font-size: var(--text-sm);
  margin-top: 8px;
  text-decoration: none;
}
.pok-verify-link:hover {
  text-decoration: underline;
}
/* Buttons */
.pok-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  transition: background 0.2s, opacity 0.2s;
}
.pok-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pok-btn-primary {
  background: var(--color-accent);
  color: #000;
  border-color: var(--color-accent);
}
.pok-btn-primary:hover:not(:disabled) { opacity: 0.85; }
.pok-btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
}
.pok-btn-secondary:hover:not(:disabled) { background: var(--color-surface-2); }
.pok-btn-danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}
.pok-btn-danger:hover:not(:disabled) { opacity: 0.85; }
/* Reset section */
.pok-reset-input {
  width: 100%;
  max-width: 200px;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-family: inherit;
}
.pok-reset-input:focus { outline: 1px solid var(--color-accent); }
/* Recent activity */
.pok-activity-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: var(--text-sm);
}
.pok-activity-item:last-child { border-bottom: none; }
.pok-activity-time { color: var(--color-muted); }
/* Actions row */
.pok-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.pok-actions .pok-proof-card { margin-bottom: 0; }

/* ── Share Card ── */
.pok-share-preview {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  margin: 16px auto;
  display: block;
}
.pok-share-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Responsive */
@media (max-width: 640px) {
  .pok-overview {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .pok-tracks { grid-template-columns: 1fr 1fr; }
  .pok-actions { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .pok-tracks { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Protocol Playground — pg-* prefix
   ═══════════════════════════════════════════════════════════════════════ */

.pg-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Step navigation pills ────────────────────────────────────────── */

.pg-step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
}

.pg-step-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--color-muted);
  cursor: pointer;
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 600;
  transition: all 0.25s;
}

.pg-step-pill:hover:not(.pg-step-disabled) {
  border-color: rgba(var(--color-accent-rgb), 0.3);
  color: var(--color-text);
}

.pg-step-pill.pg-step-active {
  background: rgba(var(--color-accent-rgb), 0.16);
  border-color: rgba(var(--color-accent-rgb), 0.38);
  color: var(--color-accent);
  box-shadow: 0 2px 10px rgba(var(--color-accent-rgb), 0.16);
}

.pg-step-pill.pg-step-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pg-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(var(--color-accent-rgb), 0.12);
  font-size: 0.75rem;
  font-weight: 700;
}

.pg-step-active .pg-step-num {
  background: var(--color-accent);
  color: #fff;
}

.pg-step-icon {
  font-size: 1rem;
}

.pg-step-label-full {
  font-size: 0.82rem;
}

.pg-step-label-short {
  display: none;
  font-size: 0.82rem;
}

/* ── Chain status bar ─────────────────────────────────────────────── */

.pg-chain-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin: 8px 0 20px;
  flex-wrap: wrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pg-chain-title {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-accent);
}

.pg-chain-stats {
  display: flex;
  gap: 16px;
  flex: 1;
}

.pg-chain-stat {
  font-family: var(--font-mono, monospace);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.pg-chain-reset {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 4px 12px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.pg-chain-reset:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* ── Step content area ────────────────────────────────────────────── */

.pg-step-content {
  min-height: 200px;
}

/* ── Phase cards (keygen) ─────────────────────────────────────────── */

.pg-phase-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  animation: fadeInUp 0.4s ease-out both;
}

.pg-phase-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pg-phase-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(var(--color-accent-rgb), 0.15);
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.pg-phase-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.pg-phase-desc {
  color: var(--color-muted);
  font-size: var(--text-base);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ── Code boxes ───────────────────────────────────────────────────── */

.pg-code-box {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  overflow-x: auto;
  word-break: break-all;
  margin: 12px 0;
  color: var(--color-text);
}

:root[data-theme="light"] .pg-code-box {
  background: rgba(0, 0, 0, 0.05);
}

.pg-code-box--gold {
  border-color: rgba(var(--color-accent-rgb), 0.3);
  background: rgba(var(--color-accent-rgb), 0.06);
}

.pg-code-box--gold code {
  color: var(--color-accent);
}

/* ── Action buttons ───────────────────────────────────────────────── */

.pg-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  background: rgba(var(--color-accent-rgb), 0.12);
  border: 1px solid rgba(var(--color-accent-rgb), 0.3);
  color: var(--color-accent);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.25s;
  margin: 8px 0;
}

.pg-action-btn:hover:not(:disabled) {
  background: rgba(var(--color-accent-rgb), 0.2);
  box-shadow: 0 2px 8px rgba(var(--color-accent-rgb), 0.15);
}

.pg-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pg-action-btn--accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.pg-action-btn--accent:hover:not(:disabled) {
  filter: brightness(1.1);
}

/* ── Entropy grid ─────────────────────────────────────────────────── */

.pg-entropy-wrap {
  margin: 16px 0;
}

.pg-entropy-grid {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 2px;
  max-width: 420px;
  margin: 0 auto;
}

.pg-entropy-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: rgba(var(--color-accent-rgb), 0.04);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, monospace);
  font-size: 0.6rem;
  color: var(--color-muted);
  transition: all 0.15s;
}

.pg-entropy-cell.pg-entropy-one {
  background: rgba(var(--color-accent-rgb), 0.25);
  border-color: rgba(var(--color-accent-rgb), 0.4);
  color: var(--color-accent);
}

.pg-entropy-cell.pg-entropy-zero {
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-muted);
  opacity: 0.5;
}

.pg-entropy-hex {
  max-width: 420px;
  margin: 12px auto;
}

/* ── Stat line ────────────────────────────────────────────────────── */

.pg-stat-line {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin: 8px 0;
  font-style: italic;
}

/* ── Elliptic curve canvas ────────────────────────────────────────── */

.pg-curve-canvas-wrap {
  margin: 16px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.pg-curve-canvas {
  width: 100%;
  height: 300px;
  display: block;
}

.pg-pubkey-hex {
  margin-top: 12px;
}

/* ── Learn more link ──────────────────────────────────────────────── */

.pg-learn-link {
  display: inline-block;
  color: var(--color-accent);
  font-size: var(--text-sm);
  margin: 12px 0;
  text-decoration: underline;
  text-decoration-color: rgba(var(--color-accent-rgb), 0.3);
  transition: text-decoration-color 0.2s;
}

.pg-learn-link:hover {
  text-decoration-color: var(--color-accent);
}

/* ── Address flow diagram ─────────────────────────────────────────── */

.pg-flow-diagram {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
  overflow-x: auto;
  padding: 8px 0;
}

.pg-flow-step {
  flex: 0 0 auto;
  padding: 10px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.3s;
  min-width: 80px;
}

.pg-flow-step.pg-flow-active {
  border-color: rgba(var(--color-accent-rgb), 0.4);
  background: rgba(var(--color-accent-rgb), 0.08);
}

.pg-flow-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.pg-flow-value {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  color: var(--color-accent);
  word-break: break-all;
  transition: opacity 0.3s;
}

.pg-flow-arrow {
  flex: 0 0 auto;
  padding: 0 6px;
  color: var(--color-muted);
  font-size: 1.2rem;
}

/* ── Label input ──────────────────────────────────────────────────── */

.pg-label-input {
  display: block;
  width: 100%;
  max-width: 300px;
  padding: 8px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  color: var(--color-text);
  font-size: var(--text-sm);
  margin: 12px 0;
}

.pg-label-input:focus {
  border-color: rgba(var(--color-accent-rgb), 0.4);
  outline: none;
}

/* ── Save wrap ────────────────────────────────────────────────────── */

.pg-save-wrap {
  margin: 16px 0;
}

/* ── Address box ──────────────────────────────────────────────────── */

.pg-address-box {
  border-color: rgba(var(--color-accent-rgb), 0.3);
  text-align: center;
}

.pg-address-box code {
  font-size: 1rem;
  color: var(--color-accent);
  font-weight: 600;
}

/* ── Success banner ───────────────────────────────────────────────── */

.pg-success-banner {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  margin: 20px 0;
  animation: fadeInUp 0.4s ease-out both;
}

.pg-success-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.pg-success-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #22c55e;
  margin: 0 0 8px;
}

.pg-success-desc {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.pg-success-details {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pg-success-row {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  color: var(--color-text);
}

/* ── Confetti animation ───────────────────────────────────────────── */

.pg-confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 10;
}

.pg-confetti {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pgConfettiFall 3s ease-out forwards;
  pointer-events: none;
}

@keyframes pgConfettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

/* ── Mining: Hero Action bar ──────────────────────────────────────── */

.pg-mining-action {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 8px 0 20px;
}

.pg-mining-action .pg-mine-btn {
  flex-shrink: 0;
  width: auto;
  min-width: 200px;
  margin: 0;
}

.pg-mining-action .bl-stat-grid {
  flex: 1;
  margin: 0;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.pg-mining-action .bl-stat {
  padding: 10px 8px;
}

.pg-mining-action .bl-stat-value {
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-base);
}

/* ── Mining: Dashboard 2-col layout ──────────────────────────────── */

.pg-mining-dashboard {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  margin: 0 0 20px;
}

/* ── Mining: Block Preview Card ──────────────────────────────────── */

.pg-block-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pg-block-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(var(--color-accent-rgb), 0.08);
  border-bottom: 1px solid var(--glass-border);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
}

.pg-block-card-header-icon {
  font-size: 1.1rem;
}

.pg-block-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  gap: 8px;
}

.pg-block-field:nth-child(even) {
  background: rgba(var(--color-accent-rgb), 0.03);
}

.pg-block-field-label {
  font-size: 0.78rem;
  color: var(--color-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.pg-block-field-value {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  color: var(--color-text);
  text-align: right;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

.pg-block-field-value--dim {
  color: var(--color-muted);
  font-style: italic;
}

.pg-hash-truncated {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgba(var(--color-accent-rgb), 0.3);
}

.pg-nonce-live {
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}

.pg-diff-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  margin: 10px 16px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pg-diff-easy {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.pg-diff-medium {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.pg-diff-hard {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ── Mining: Difficulty slider (enhanced) ────────────────────────── */

.pg-difficulty-wrap {
  margin: 0 0 16px;
}

.pg-difficulty-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.pg-diff-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.pg-difficulty-slider {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #22c55e, #fbbf24, #ef4444);
  border-radius: 4px;
  outline: none;
}

.pg-difficulty-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
  border: 3px solid var(--color-primary-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.pg-difficulty-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
  border: 3px solid var(--color-primary-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.pg-difficulty-slider::-moz-range-track {
  height: 8px;
  background: linear-gradient(to right, #22c55e, #fbbf24, #ef4444);
  border-radius: 4px;
  border: none;
}

.pg-diff-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 6px;
}

.pg-difficulty-info {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-top: 6px;
}

/* ── Mining: Coinbase input ──────────────────────────────────────── */

.pg-coinbase-wrap {
  margin: 0 0 16px;
}

.pg-coinbase-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.pg-coinbase-input-row {
  position: relative;
}

.pg-coinbase-input {
  width: 100%;
  padding: 8px 12px;
  padding-right: 50px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-family: var(--font-mono, monospace);
}

.pg-coinbase-input:focus {
  border-color: rgba(var(--color-accent-rgb), 0.4);
  outline: none;
}

.pg-char-counter {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--color-muted);
  font-family: var(--font-mono, monospace);
  pointer-events: none;
}

.pg-coinbase-desc {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* ── Mining: Mine button ─────────────────────────────────────────── */

.pg-mine-btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  border-radius: var(--radius);
  background: rgba(var(--color-accent-rgb), 0.15);
  border: 1px solid rgba(var(--color-accent-rgb), 0.3);
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.25s;
}

.pg-mine-btn:hover {
  background: rgba(var(--color-accent-rgb), 0.25);
  box-shadow: 0 4px 16px rgba(var(--color-accent-rgb), 0.2);
}

.pg-mine-btn--active {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.pg-mine-btn--active:hover {
  background: rgba(239, 68, 68, 0.25);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
}

/* ── Mining: Hash canvas ─────────────────────────────────────────── */

.pg-hash-canvas {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  display: block;
}

/* ── Mining: Configuration section ───────────────────────────────── */

.pg-config-section {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 0 0 20px;
}

.pg-config-section > summary {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pg-config-section > summary::-webkit-details-marker {
  display: none;
}

.pg-config-section > summary::after {
  content: '\u25B6';
  font-size: 0.65rem;
  transition: transform 0.2s;
  margin-left: auto;
}

.pg-config-section[open] > summary::after {
  transform: rotate(90deg);
}

.pg-config-section[open] > summary {
  margin-bottom: 16px;
}

@media (min-width: 641px) {
  .pg-config-section > summary {
    display: none;
  }
}

/* ── Mining: Success result card ─────────────────────────────────── */

.pg-mining-result {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
  animation: fadeInUp 0.4s ease-out both;
  grid-column: 1 / -1;
  overflow: hidden;
  transition: all 0.5s ease;
}

.pg-mining-result .pg-success-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.pg-mining-result .pg-success-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #22c55e;
  margin: 0 0 8px;
}

.pg-mining-result .pg-success-details {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pg-mining-result .pg-success-row {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  color: var(--color-text);
}

.pg-mining-result .pg-success-desc {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.pg-mining-result .pg-mine-another-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 24px;
  border-radius: var(--radius);
  background: rgba(var(--color-accent-rgb), 0.15);
  border: 1px solid rgba(var(--color-accent-rgb), 0.3);
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s;
}

.pg-mining-result .pg-mine-another-btn:hover {
  background: rgba(var(--color-accent-rgb), 0.25);
  box-shadow: 0 4px 16px rgba(var(--color-accent-rgb), 0.2);
}

.pg-mining-result-mini {
  padding: 8px 16px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg-mining-result-mini .pg-success-icon,
.pg-mining-result-mini .pg-success-details,
.pg-mining-result-mini .pg-success-desc,
.pg-mining-result-mini .pg-mine-another-btn {
  display: none;
}

.pg-mining-result-mini .pg-success-title {
  font-size: 0.85rem;
  margin: 0;
}

/* ── Coming Soon cards ────────────────────────────────────────────── */

.pg-coming-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.pg-coming-soon {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  opacity: 0.7;
}

.pg-coming-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.pg-coming-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 8px;
}

.pg-coming-desc {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.pg-coming-link {
  display: inline-block;
  font-size: var(--text-sm);
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: rgba(var(--color-accent-rgb), 0.3);
}

/* ── Explore section ──────────────────────────────────────────────── */

.pg-explore {
  margin: 32px 0 16px;
}

.pg-explore-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 16px;
}

/* ── Transaction Builder (Step 3) ─────────────────────────────────── */

:root {
  --pg-hex-version: rgba(59, 130, 246, 0.15);
  --pg-hex-count: rgba(168, 85, 247, 0.15);
  --pg-hex-txid: rgba(34, 197, 94, 0.15);
  --pg-hex-vout: rgba(34, 197, 94, 0.10);
  --pg-hex-script: rgba(156, 163, 175, 0.15);
  --pg-hex-unsigned: rgba(239, 68, 68, 0.15);
  --pg-hex-value: rgba(249, 115, 22, 0.15);
  --pg-hex-pubkey: rgba(234, 179, 8, 0.15);
}

.pg-gate {
  text-align: center;
  padding: 48px 24px;
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

.pg-gate-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.pg-gate-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 12px;
}

.pg-gate-desc {
  color: var(--color-muted);
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.pg-gate-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.pg-txbuilder {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pg-tx-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

/* Wallet Panel */

.pg-wallet-panel {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  position: sticky;
  top: 20px;
}

.pg-wallet-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 8px;
}

.pg-wallet-balance {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 16px;
  padding: 8px 12px;
  background: rgba(247, 147, 26, 0.08);
  border-radius: 8px;
}

.pg-wallet-keys {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pg-wallet-key {
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
}

.pg-wallet-key-header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  background: var(--color-card-bg);
  align-items: center;
}

.pg-wallet-key-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text);
}

.pg-wallet-key-addr {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--color-muted);
  cursor: help;
}

.pg-wallet-key-balance {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-accent);
}

.pg-wallet-utxos {
  display: flex;
  flex-direction: column;
}

.pg-wallet-empty {
  padding: 8px 12px;
  color: var(--color-muted);
  font-size: 0.8rem;
  font-style: italic;
}

.pg-wallet-key--empty .pg-wallet-key-header {
  opacity: 0.5;
}
.pg-wallet-key--empty .pg-wallet-utxos,
.pg-wallet-key--empty .pg-wallet-empty {
  display: none;
}

.pg-wallet-toggle-empty {
  display: block;
  width: 100%;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--color-muted);
  font-size: 0.78rem;
  cursor: pointer;
  text-align: center;
  transition: color 0.2s;
}
.pg-wallet-toggle-empty:hover {
  color: var(--color-accent);
}

.pg-utxo-item {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  cursor: pointer;
  border-top: 1px solid var(--glass-border);
  transition: background 0.15s, border-color 0.15s;
  align-items: center;
}

.pg-utxo-item:hover {
  background: rgba(247, 147, 26, 0.05);
}

.pg-utxo-item--selected {
  background: rgba(247, 147, 26, 0.1);
  border-left: 3px solid var(--color-accent);
  position: relative;
  padding-left: 28px;
}
.pg-utxo-item--selected::before {
  content: '\2713';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.85rem;
}

.pg-utxo-info {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--color-muted);
}

.pg-utxo-amount {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-text);
  margin-left: auto;
}

.pg-utxo-block {
  font-size: 0.7rem;
  color: var(--color-muted);
  width: 100%;
}

/* Builder Panel */

.pg-builder-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pg-tx-section {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
}

.pg-tx-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 12px;
}

.pg-tx-input-cards,
.pg-tx-output-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.pg-tx-empty {
  color: var(--color-muted);
  font-size: 0.85rem;
  font-style: italic;
  padding: 12px 0;
}

.pg-tx-input-card,
.pg-tx-output-card {
  background: var(--color-primary-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px 12px;
  position: relative;
}

.pg-tx-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pg-tx-card-outpoint {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--color-text);
  cursor: help;
}

.pg-tx-card-amount {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-accent);
  margin-top: 4px;
}

.pg-tx-card-addr {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--color-muted);
}

.pg-tx-card-remove {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.pg-tx-card-remove:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.pg-tx-addr-select {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.85rem;
  background: var(--color-primary-bg);
  color: var(--color-text);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  margin: 4px 0;
  font-family: inherit;
}

.pg-tx-amt-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.pg-tx-amt-input {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.9rem;
  background: var(--color-primary-bg);
  color: var(--color-text);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  font-family: monospace;
}

.pg-tx-amt-input:focus {
  border-color: var(--color-accent);
  outline: none;
}

.pg-tx-amt-label {
  font-size: 0.8rem;
  color: var(--color-muted);
  font-weight: 600;
}

.pg-tx-total {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 8px 0;
  border-top: 1px solid var(--glass-border);
}

.pg-tx-change-card {
  background: rgba(34, 197, 94, 0.05);
  border: 1px dashed rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
}

/* Fee display */

.pg-fee-display {
  padding: 12px;
  border-radius: 8px;
  margin-top: 12px;
}

.pg-fee-display--ok {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.pg-fee-display--warn {
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.pg-fee-display--error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.pg-fee-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.pg-fee-value {
  font-family: monospace;
  font-weight: 600;
}

.pg-fee-display--ok .pg-fee-value { color: #22c55e; }
.pg-fee-display--warn .pg-fee-value { color: #eab308; }
.pg-fee-display--error .pg-fee-value { color: #ef4444; }

.pg-fee-warning {
  font-size: 0.8rem;
  margin: 6px 0 0;
}

.pg-fee-display--warn .pg-fee-warning { color: #eab308; }
.pg-fee-display--error .pg-fee-warning { color: #ef4444; }

.pg-build-btn {
  width: 100%;
  font-size: 1rem;
  padding: 14px;
}

.pg-build-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Raw Hex View */

.pg-tx-hex-section {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
}

.pg-tx-hex-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 12px;
}

.pg-tx-hex-view {
  min-height: 60px;
}

.pg-tx-hex-empty {
  color: var(--color-muted);
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
  padding: 24px 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 18px,
    rgba(255,255,255,0.015) 18px,
    rgba(255,255,255,0.015) 19px
  );
  border: 1px dashed var(--glass-border);
  border-radius: 8px;
}

.pg-tx-hex-view--filled {
  animation: pgHexFadeIn 0.4s ease-out;
}
@keyframes pgHexFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.pg-tx-total {
  transition: color 0.3s ease;
}
.pg-tx-total--changed {
  color: var(--color-accent);
}

.pg-tx-unsigned-badge {
  display: inline-block;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pg-tx-hex-wrap {
  font-family: monospace;
  font-size: 0.78rem;
  line-height: 1.8;
  word-break: break-all;
}

.pg-tx-hex-segment {
  padding: 1px 2px;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s;
  position: relative;
}

.pg-tx-hex-segment:hover {
  opacity: 0.8;
  outline: 1px solid var(--color-accent);
}

.pg-hex-version { background: var(--pg-hex-version); color: #60a5fa; }
.pg-hex-count { background: var(--pg-hex-count); color: #c084fc; }
.pg-hex-txid { background: var(--pg-hex-txid); color: #4ade80; }
.pg-hex-vout { background: var(--pg-hex-vout); color: #86efac; }
.pg-hex-script { background: var(--pg-hex-script); color: #9ca3af; }
.pg-hex-unsigned { background: var(--pg-hex-unsigned); color: #f87171; }
.pg-hex-value { background: var(--pg-hex-value); color: #fb923c; }
.pg-hex-pubkey { background: var(--pg-hex-pubkey); color: #facc15; }

.pg-tx-hex-bytes {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 8px;
  text-align: right;
}

.pg-tx-result { margin-top: 16px; }

/* ── Signing Flow (Step 4) ───────────────────────────────────────── */

.pg-signing {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pg-signing-summary {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
}

.pg-signing-summary-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 12px;
}

.pg-signing-summary-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pg-signing-summary-row {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-family: monospace;
}

.pg-signing-phase {
  background: var(--color-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
}

.pg-signing-rawhex {
  max-height: 120px;
  overflow: hidden;
}

/* Digest flow */

.pg-digest-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.pg-digest-step {
  background: var(--color-primary-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  min-width: 120px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.pg-digest-step--active {
  border-color: var(--color-accent);
  box-shadow: 0 0 12px rgba(247, 147, 26, 0.15);
}

.pg-digest-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pg-digest-result {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--color-text);
  word-break: break-all;
  cursor: help;
}

.pg-digest-arrow {
  font-size: 1.4rem;
  color: var(--color-accent);
  font-weight: bold;
}

.pg-digest-final {
  min-width: 160px;
}

.pg-pulse {
  animation: pg-pulse-anim 0.4s ease;
}

@keyframes pg-pulse-anim {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ECDSA signing layout */

.pg-signing-ecdsa-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin: 16px 0;
}

.pg-signing-ecdsa-left,
.pg-signing-ecdsa-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pg-signing-ecdsa-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pg-signing-key-wrap {
  background: var(--color-primary-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 12px;
}

.pg-signing-key-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pg-signing-key-value {
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--color-text);
  overflow-wrap: anywhere;
  word-break: break-all;
  cursor: pointer;
}

.pg-signing-key-masked {
  color: var(--color-muted);
  letter-spacing: 1px;
  word-break: break-all;
}

.pg-sign-btn {
  min-width: 100px;
}

.pg-sign-icon {
  margin-left: 6px;
}

.pg-signing-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
}

.pg-signing-spinner--active {
  animation: pg-spin 0.6s linear infinite;
}

@keyframes pg-spin {
  to { transform: rotate(360deg); }
}

/* Signature result */

.pg-signature-result {
  background: var(--color-primary-bg);
  border: 1px solid var(--color-accent);
  border-radius: 8px;
  padding: 12px;
}

.pg-signature-result--glow {
  box-shadow: 0 0 16px rgba(247, 147, 26, 0.2);
  animation: pg-glow 0.5s ease;
}

@keyframes pg-glow {
  0% { box-shadow: 0 0 0 rgba(247, 147, 26, 0); }
  50% { box-shadow: 0 0 24px rgba(247, 147, 26, 0.35); }
  100% { box-shadow: 0 0 16px rgba(247, 147, 26, 0.2); }
}

.pg-sig-component-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
  font-family: monospace;
  margin-top: 4px;
}

.pg-sig-component-value {
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--color-text);
  word-break: break-all;
  cursor: help;
}

/* Verify layout */

.pg-signing-verify-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.pg-signing-verify-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pg-verify-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  background: var(--color-primary-bg);
  border-radius: 6px;
}

.pg-verify-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  min-width: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pg-verify-value {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--color-text);
  word-break: break-all;
}

.pg-verify-btn-wrap {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pg-verify-result {
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  transition: all 0.3s ease;
}

.pg-verify-result--valid {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.pg-verify-result--invalid {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.pg-verify-result-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.pg-verify-result-text {
  font-weight: 600;
  font-size: 0.95rem;
}

.pg-verify-result--valid .pg-verify-result-text { color: #22c55e; }
.pg-verify-result--invalid .pg-verify-result-text { color: #ef4444; }

/* Broadcast section */

.pg-signing-broadcast {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}

.pg-broadcast-btn {
  width: 100%;
  font-size: 1rem;
  padding: 14px;
  margin-top: 12px;
}

.pg-code-box--green {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.05);
}

.pg-code-box--accent {
  border-color: rgba(247, 147, 26, 0.3);
  background: rgba(247, 147, 26, 0.05);
}

.pg-success-banner--broadcast .pg-success-icon {
  font-size: 2.5rem;
}

/* ── Mempool in mining ───────────────────────────────────────────── */

.pg-mempool-wrap {
  margin-top: 16px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
}

.pg-mempool-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  padding: 10px 12px;
  background: var(--color-card-bg);
  border-bottom: 1px solid var(--glass-border);
}

.pg-mempool-list {
  max-height: 200px;
  overflow-y: auto;
}

.pg-mempool-empty {
  padding: 12px;
  color: var(--color-muted);
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
}

.pg-mempool-tx {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--glass-border);
  align-items: center;
}

.pg-mempool-tx:last-child { border-bottom: none; }

.pg-mempool-tx-flow {
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--color-text);
}

.pg-mempool-tx-amt {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-accent);
  margin-left: auto;
}

.pg-mempool-tx-fee {
  font-size: 0.75rem;
  color: var(--color-muted);
  width: 100%;
}

/* ── Step completion indicator ──────────────────────────────────────── */

.pg-step-complete .pg-step-num {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
}

.pg-step-check {
  font-size: 0.65rem;
  color: #22c55e;
  margin-left: 2px;
}

/* ── Difficulty Adjustment Simulator ───────────────────────────────── */

.pg-diff-canvas-wrap {
  width: 100%;
  margin: 16px 0;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.pg-diff-canvas {
  width: 100%;
  height: 300px;
  display: block;
}

.pg-diff-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 16px 0;
}

.pg-diff-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pg-diff-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pg-diff-slider-label {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.pg-diff-slider {
  width: 100%;
  accent-color: var(--color-accent);
}

.pg-diff-slider-value {
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
}

.pg-diff-event-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pg-diff-event-btn {
  padding: 6px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md, 8px);
  background: var(--color-card-bg, rgba(255,255,255,0.03));
  color: var(--color-text);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.pg-diff-event-btn:hover {
  border-color: var(--color-accent);
  background: rgba(247, 147, 26, 0.08);
}

.pg-diff-event-btn--down {
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}
.pg-diff-event-btn--down:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}
.pg-diff-event-btn--up {
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}
.pg-diff-event-btn--up:hover {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}

.pg-diff-speed-btns {
  display: flex;
  gap: 4px;
}

.pg-diff-speed-btn {
  padding: 4px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md, 8px);
  background: transparent;
  color: var(--color-muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.pg-diff-speed-btn--active {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(247, 147, 26, 0.08);
}

.pg-diff-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pg-diff-stat {
  background: var(--color-card-bg, rgba(255,255,255,0.03));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md, 8px);
  padding: 10px;
  text-align: center;
  min-width: 0;
  overflow: hidden;
}

.pg-diff-stat-value {
  font-family: var(--font-mono, monospace);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pg-diff-stat-label {
  font-size: 0.72rem;
  color: var(--color-muted);
  margin-top: 2px;
  word-break: keep-all;
  hyphens: none;
}

.pg-diff-adjust-overlay {
  background: var(--color-card-bg, rgba(255,255,255,0.03));
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-lg, 12px);
  padding: 24px;
  margin: 16px 0;
  text-align: center;
  box-shadow: 0 0 24px rgba(247, 147, 26, 0.15);
  animation: pg-glow 0.5s ease;
}

.pg-diff-adjust-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0 0 16px;
}

.pg-diff-adjust-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  max-width: 400px;
  margin: 0 auto 16px;
  text-align: left;
}

.pg-diff-adjust-label {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.pg-diff-adjust-value {
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  color: var(--color-text);
}

.pg-diff-adjust-direction {
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-md, 8px);
  margin-bottom: 16px;
  display: inline-block;
}

.pg-diff-adjust-direction--up {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.pg-diff-adjust-direction--down {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.pg-diff-adjust-direction--same {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.pg-diff-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px auto;
  max-width: 400px;
}

.pg-diff-bar {
  height: 28px;
  border-radius: var(--radius-md, 8px);
  display: flex;
  align-items: center;
  padding: 0 10px;
  min-width: 60px;
  transition: width 0.3s;
}

.pg-diff-bar--expected {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.pg-diff-bar--actual {
  background: rgba(247, 147, 26, 0.2);
  border: 1px solid rgba(247, 147, 26, 0.4);
}

.pg-diff-bar-label {
  font-size: 0.72rem;
  font-family: var(--font-mono, monospace);
  white-space: nowrap;
}

/* ── Lightning Channel Simulator ───────────────────────────────────── */

.pg-ln-canvas-wrap {
  width: 100%;
  margin: 16px 0;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.pg-ln-canvas {
  width: 100%;
  height: 350px;
  display: block;
}

.pg-ln-phases {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.pg-ln-phase-card {
  background: var(--color-card-bg, rgba(255,255,255,0.03));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg, 12px);
  padding: 20px;
  transition: border-color 0.3s, opacity 0.3s, box-shadow 0.3s;
}

.pg-ln-phase-card--locked {
  opacity: 0.4;
  pointer-events: none;
  padding: 12px 16px;
}
.pg-ln-phase-card--locked .pg-phase-desc,
.pg-ln-phase-card--locked .bl-callout,
.pg-ln-phase-card--locked .pg-ln-next-btn {
  display: none;
}
.pg-ln-phase-card--locked .pg-ln-phase-header {
  margin-bottom: 0;
}

.pg-ln-phase-active {
  border-color: var(--color-accent);
  box-shadow: 0 0 12px rgba(247, 147, 26, 0.08);
}

.pg-ln-phase-done {
  border-color: rgba(34, 197, 94, 0.3);
  opacity: 0.85;
  padding: 12px 16px;
}
.pg-ln-phase-done .pg-phase-desc,
.pg-ln-phase-done .bl-callout,
.pg-ln-phase-done .pg-ln-next-btn {
  display: none;
}
.pg-ln-phase-done .pg-ln-phase-header {
  margin-bottom: 0;
}

.pg-ln-phase-done .pg-ln-phase-status {
  color: #22c55e;
  font-weight: 700;
}

.pg-ln-phase-summary {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 4px;
}

.pg-ln-phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pg-ln-phase-status {
  font-size: 0.78rem;
  color: var(--color-muted);
}

.pg-ln-commitment {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-md, 8px);
  font-size: 0.78rem;
  font-family: var(--font-mono, monospace);
  background: rgba(247, 147, 26, 0.08);
  border: 1px solid rgba(247, 147, 26, 0.2);
  color: var(--color-accent);
  margin: 4px 2px;
}

.pg-ln-revoked {
  text-decoration: line-through;
  opacity: 0.5;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.pg-ln-progress-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 0 16px;
}
.pg-ln-progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--glass-border);
  transition: background 0.3s, box-shadow 0.3s;
}
.pg-ln-progress-dot--done {
  background: #22c55e;
}
.pg-ln-progress-dot--active {
  background: var(--color-accent);
  box-shadow: 0 0 6px rgba(247, 147, 26, 0.4);
}
.pg-ln-progress-connector {
  width: 20px;
  height: 2px;
  background: var(--glass-border);
}
.pg-ln-progress-connector--done {
  background: #22c55e;
}

.pg-ln-summary {
  background: var(--color-card-bg, rgba(255,255,255,0.03));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg, 12px);
  padding: 24px;
  margin: 16px 0;
}

.pg-ln-next-btn {
  display: block;
  width: 100%;
  padding: 10px 20px;
  margin-top: 12px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md, 8px);
  background: rgba(247, 147, 26, 0.08);
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.pg-ln-next-btn:hover {
  background: rgba(247, 147, 26, 0.15);
}

.pg-ln-next-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Achievement banner ────────────────────────────────────────────── */

.pg-complete-banner {
  text-align: center;
  padding: 32px 24px;
  margin: 24px 0;
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.05), rgba(251, 191, 36, 0.08));
  border: 2px solid rgba(247, 147, 26, 0.3);
  border-radius: var(--radius-lg, 12px);
  animation: pg-glow 1s ease;
}

.pg-complete-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.pg-complete-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0 0 8px;
}

.pg-complete-desc {
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.pg-complete-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.pg-complete-badge {
  text-align: center;
}

.pg-complete-badge-val {
  font-family: var(--font-mono, monospace);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

.pg-complete-badge-label {
  font-size: 0.72rem;
  color: var(--color-muted);
}

/* ── Flow navigation card ────────────────────────────────────────── */

.pg-flow-wrap {
  margin-top: var(--space-xl, 32px);
}

.pg-flow-top {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-bottom: 8px;
  font-family: inherit;
}

.pg-flow-top:hover {
  color: var(--color-text);
}

.pg-flow-card {
  padding: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-top: 3px solid var(--color-accent);
  border-radius: var(--radius);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.pg-flow-card-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0 0 16px;
}

.pg-flow-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: #fff;
  border: 1px solid var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}

.pg-flow-card-cta:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 10px rgba(var(--color-accent-rgb), 0.25);
}

/* ── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .pg-mining-dashboard {
    grid-template-columns: 1fr;
  }

  .pg-mining-action .bl-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pg-tx-layout {
    grid-template-columns: 1fr;
  }

  .pg-wallet-panel {
    position: static;
  }

  .pg-signing-ecdsa-layout {
    grid-template-columns: 1fr;
  }

  .pg-diff-layout {
    grid-template-columns: 1fr;
  }

  .pg-diff-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .pg-step-nav {
    flex-wrap: wrap;
    overflow-x: visible;
    -webkit-overflow-scrolling: auto;
    scrollbar-width: auto;
    padding: 12px 0;
    gap: 6px;
    -webkit-mask-image: none;
    mask-image: none;
    padding-left: 0;
    padding-right: 0;
  }

  .pg-step-pill {
    flex: 0 0 calc(33.33% - 4px);
    justify-content: center;
    padding: 10px 8px;
    font-size: 0.82rem;
    min-height: 44px;
    white-space: nowrap;
  }

  .pg-step-label-full {
    display: none;
  }

  .pg-step-label-short {
    display: inline;
  }

  .pg-flow-card {
    padding: 16px;
  }

  .pg-flow-card-cta {
    width: 100%;
    justify-content: center;
  }

  .pg-entropy-grid {
    max-width: 100%;
  }

  .pg-flow-diagram {
    flex-direction: column;
    align-items: stretch;
  }

  .pg-flow-arrow {
    transform: rotate(90deg);
    text-align: center;
    padding: 4px 0;
  }

  .pg-phase-card {
    padding: 16px;
  }

  .pg-chain-bar {
    flex-direction: column;
    gap: 8px;
  }

  .pg-coming-section {
    grid-template-columns: 1fr;
  }

  .pg-mining-action {
    flex-direction: column;
  }

  .pg-mining-action .pg-mine-btn {
    width: 100%;
    min-width: 0;
  }

  .pg-mining-action .bl-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pg-config-section {
    padding: 14px;
  }

  .pg-block-card-header {
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  .pg-block-field {
    padding: 6px 12px;
  }

  .pg-hash-canvas {
    height: 220px;
  }

  .pg-tx-layout {
    grid-template-columns: 1fr;
  }

  .pg-wallet-panel {
    position: static;
  }

  .pg-signing-ecdsa-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pg-digest-flow {
    flex-direction: column;
  }

  .pg-digest-arrow {
    transform: rotate(90deg);
  }

  .pg-verify-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .pg-verify-label {
    min-width: auto;
  }

  .pg-diff-canvas {
    height: 220px;
  }

  .pg-diff-stats {
    grid-template-columns: 1fr 1fr;
  }

  .pg-diff-event-btns {
    flex-direction: column;
  }

  .pg-diff-event-btn {
    padding: 10px 16px;
    min-height: 44px;
  }

  .pg-diff-speed-btn {
    padding: 10px 14px;
    min-height: 44px;
  }

  .pg-ln-next-btn {
    min-height: 44px;
  }

  .pg-ln-canvas {
    height: 250px;
  }
  .pg-ln-canvas--tall {
    height: 320px;
  }
  .pg-diff-stat-value {
    font-size: 0.78rem;
  }
  .pg-diff-stat-label {
    font-size: 0.65rem;
  }

  .pg-complete-stats {
    gap: 12px;
  }
}

/* ── Playground focus management ──────────────────────────────────── */
.pg-step-content:focus { outline: none; }

.pg-utxo-item:focus-visible,
.pg-tx-hex-segment:focus-visible,
.pg-signing-key-value:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .pg-confetti { animation: none; }
  .pg-phase-card { animation: none; }
  .pg-success-banner { animation: none; }
  .pg-mining-result { animation: none; }
  .pg-pulse { animation: none; }
  .pg-signing-spinner--active { animation: none; }
  .pg-signature-result--glow { animation: none; }
  .pg-diff-adjust-overlay { animation: none; }
  .pg-complete-banner { animation: none; }
  .pg-tx-hex-view--filled { animation: none; }
}

/* ========== Macro Redirect Notice ========== */
.macro-redirect-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  text-align: center;
  gap: 1rem;
  padding: 2rem;
}
.macro-redirect-notice h2 {
  font-size: 1.5rem;
  color: var(--accent);
  margin: 0;
}
.macro-redirect-notice p {
  color: var(--text-secondary, #aaa);
  max-width: 480px;
  line-height: 1.6;
  margin: 0;
}
.tab-external-hint {
  font-size: 0.75em;
  opacity: 0.6;
  margin-left: 0.25em;
}

/* ── Donation Banner ── */
.donate-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  margin: 24px 0 0 0;
  background: rgba(247, 147, 26, 0.04);
  border: 1px solid rgba(247, 147, 26, 0.12);
  border-radius: 12px;
}

.donate-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.donate-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.donate-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.donate-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.donate-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border: none;
}

.donate-btn-ln {
  background: rgba(var(--color-accent-rgb, 214, 160, 86), 0.15);
  color: var(--color-accent, #d6a056);
}

.donate-btn-ln:hover {
  background: rgba(var(--color-accent-rgb, 214, 160, 86), 0.25);
}

.donate-btn-onchain {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.donate-btn-onchain:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Compact one-liner */
.donate-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
  font-size: 11px;
  color: var(--text-dim);
}

.donate-line-link {
  color: var(--color-accent, #d6a056);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 640px) {
  .donate-banner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .donate-actions {
    margin-left: 0;
  }
}

/* ═══════════════════════════════════════════════════
   Frameworks Education Module
   ═══════════════════════════════════════════════════ */

.fw-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* Hero / Intro — module-hero handles base, fw-hero only adds specifics */
.fw-hero-body {
  color: var(--color-muted, #a0a0a0);
  line-height: 1.7;
  max-width: 700px;
  margin: 12px auto 0;
  font-size: 0.9rem;
}

/* Cards container */
.fw-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Single framework card */
.fw-card {
  background: var(--color-card, rgba(255,255,255,0.04));
  border: 1px solid var(--color-border, rgba(255,255,255,0.08));
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.fw-card:hover {
  border-color: var(--fw-color, var(--accent));
}

/* Card header */
.fw-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
}
.fw-card-header:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.fw-card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.fw-card-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.fw-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-heading, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fw-card-toggle {
  color: var(--color-muted, #a0a0a0);
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}

/* Card summary */
.fw-card-summary {
  padding: 0 20px 16px;
}
.fw-card-phase {
  font-size: 0.9rem;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.fw-card-desc {
  color: var(--color-muted, #a0a0a0);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card body (expanded) */
.fw-card-body {
  padding: 0 20px 24px;
  border-top: 1px solid var(--color-border, rgba(255,255,255,0.08));
}
.fw-card-body-hidden {
  display: none;
}

/* Phase progress bar */
.fw-phase-bar {
  display: flex;
  gap: 3px;
  margin: 16px 0 20px;
}
.fw-phase-block {
  flex: 1;
  height: 28px;
  border-radius: 4px;
  background: var(--color-border, rgba(255,255,255,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-muted, #a0a0a0);
  transition: background-color 0.2s;
}
.fw-phase-current {
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(255,255,255,0.15);
}
.fw-phase-past {
  color: rgba(255,255,255,0.6);
}

/* Sections within expanded card */
.fw-section {
  margin: 16px 0;
}
.fw-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted, #a0a0a0);
  margin: 0 0 6px;
}
.fw-section-text {
  color: var(--color-text, #e0e0e0);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0;
}

/* Thresholds section — warning style */
.fw-section-thresholds {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
}

/* BTC Relevance section — green accent */
.fw-section-btc {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
}

/* Phases list */
.fw-phases-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 16px;
}
.fw-phase-item {
  padding: 10px 12px;
  border-left: 3px solid var(--color-border, rgba(255,255,255,0.1));
  border-radius: 0 6px 6px 0;
  background: var(--color-card, rgba(255,255,255,0.02));
}
.fw-phase-item-current {
  background: rgba(255,255,255,0.05);
}
.fw-phase-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.fw-phase-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-border, rgba(255,255,255,0.15));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fw-phase-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-heading, #fff);
}
.fw-phase-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fw-phase-desc {
  color: var(--color-muted, #a0a0a0);
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0;
}

/* Track Live CTA */
.fw-track-live {
  display: inline-block;
  margin-top: 16px;
  color: var(--fw-color, var(--accent));
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: opacity 0.2s;
}
.fw-track-live:hover {
  opacity: 0.8;
}

/* Convergence section */
.fw-convergence {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--color-border, rgba(255,255,255,0.08));
  margin-top: 32px;
}
.fw-convergence-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-heading, #fff);
  margin: 0 0 12px;
}
.fw-convergence-body {
  color: var(--color-muted, #a0a0a0);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}

/* CTA */
.fw-cta {
  text-align: center;
  padding: 24px 0;
}
.fw-cta-link {
  display: inline-block;
  background: var(--accent, #f7931a);
  color: #fff;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}
.fw-cta-link:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Light theme */
:root.light .fw-card,
[data-theme="light"] .fw-card {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.1);
}
:root.light .fw-card:hover,
[data-theme="light"] .fw-card:hover {
  border-color: var(--fw-color, var(--accent));
}
:root.light .fw-phase-block,
[data-theme="light"] .fw-phase-block {
  background: rgba(0,0,0,0.06);
  color: #666;
}
:root.light .fw-phase-current,
[data-theme="light"] .fw-phase-current {
  color: #fff;
}
:root.light .fw-phase-item,
[data-theme="light"] .fw-phase-item {
  background: rgba(0,0,0,0.02);
  border-left-color: rgba(0,0,0,0.15);
}
:root.light .fw-phase-item-current,
[data-theme="light"] .fw-phase-item-current {
  background: rgba(0,0,0,0.05);
}
:root.light .fw-section-thresholds,
[data-theme="light"] .fw-section-thresholds {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.15);
}
:root.light .fw-section-btc,
[data-theme="light"] .fw-section-btc {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.15);
}

:root.light .fw-hero-title,
[data-theme="light"] .fw-hero-title,
:root.light .fw-card-title,
[data-theme="light"] .fw-card-title,
:root.light .fw-phase-name,
[data-theme="light"] .fw-phase-name,
:root.light .fw-convergence-title,
[data-theme="light"] .fw-convergence-title {
  color: #1a1a1a;
}

:root.light .fw-hero-body,
[data-theme="light"] .fw-hero-body,
:root.light .fw-section-title,
[data-theme="light"] .fw-section-title,
:root.light .fw-card-desc,
[data-theme="light"] .fw-card-desc,
:root.light .fw-phase-desc,
[data-theme="light"] .fw-phase-desc,
:root.light .fw-convergence-body,
[data-theme="light"] .fw-convergence-body,
:root.light .fw-card-toggle,
[data-theme="light"] .fw-card-toggle {
  color: #555;
}

:root.light .fw-section-text,
[data-theme="light"] .fw-section-text,
:root.light .fw-card-phase,
[data-theme="light"] .fw-card-phase {
  color: #333;
}

:root.light .fw-phase-past,
[data-theme="light"] .fw-phase-past {
  color: rgba(0,0,0,0.4);
}

:root.light .fw-phase-num,
[data-theme="light"] .fw-phase-num {
  background: rgba(0,0,0,0.12);
}

:root.light .fw-card-body,
[data-theme="light"] .fw-card-body {
  border-top-color: rgba(0,0,0,0.08);
}

:root.light .fw-convergence,
[data-theme="light"] .fw-convergence {
  border-top-color: rgba(0,0,0,0.08);
}

/* Responsive */
@media (max-width: 600px) {
  .fw-card-header { padding: 12px 14px; }
  .fw-card-summary { padding: 0 14px 12px; }
  .fw-card-body { padding: 0 14px 20px; }
  .fw-card-title { font-size: 0.95rem; }
  .fw-phase-block { height: 22px; font-size: 0.6rem; }
}

/* ── Maven bottom mascot ── */
@keyframes maven-float {
  0%, 100% { transform: translateY(0px) rotate(-0.5deg); }
  50%       { transform: translateY(-7px) rotate(0.5deg); }
}
@keyframes maven-glow-breathe {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(201, 160, 220, 0.40)); }
  50%       { filter: drop-shadow(0 0 28px rgba(201, 160, 220, 0.85)); }
}
.maven-bottom-mascot {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 36px 0 24px;
  margin-top: 24px;
}
.maven-bottom-mascot img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  will-change: transform, filter;
  animation: maven-float 4s ease-in-out infinite, maven-glow-breathe 3.5s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .maven-bottom-mascot img {
    animation: none;
    filter: drop-shadow(0 0 10px rgba(201, 160, 220, 0.40));
  }
}
