/* ============================================
   Digital Confidence Centre
   Core Styles
   ============================================ */
/* Cloudflare CDN ready — see /_docs/cloudflare-readiness.md */

/* CSS Custom Properties */
:root {
  /* Light Mode (Default) */
  --bg-primary: #FAFAF8;
  --bg-secondary: #F8F9FA;
  --bg-card: #FFFFFF;
  --bg-highlight: #EBF5FB;
  --bg-success: #E8F8F5;
  --bg-warning: #FEF9E7;
  --bg-danger: #FDEDEC;
  --text-primary: #2C3E50;
  --text-secondary: #5D6D7E;
  --text-muted: #5A6B78;       /* darkened: 5.3:1 on white, was 3.0:1 */
  --accent-primary: #1565C0;   /* darkened: 5.6:1 on light bg, was 3.0:1 */
  --accent-hover: #0D47A1;     /* darkened: 7.8:1 on light bg */
  --accent-success: #27AE60;
  --accent-warning: #F39C12;
  --accent-danger: #E74C3C;
  --border-color: #D5DBDB;
  --border-light: #EAEDED;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 24px;
  --spacing-lg: 36px;
  --spacing-xl: 48px;
  --font-size-base: 18px;
  --line-height: 1.6;
  --max-width: 900px;
  --sidebar-width: 280px;
  --nav-height: 64px;
  --tap-target: 60px;
  /* Animation tokens */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-primary: #1E1E1E;
  --bg-secondary: #2D2D2D;
  --bg-card: #333333;
  --bg-highlight: #1B2631;
  --bg-success: #1A2E25;
  --bg-warning: #2E2A1A;
  --bg-danger: #2E1A1A;
  --text-primary: #E0E0E0;
  --text-secondary: #B0B0B0;
  --text-muted: #9E9E9E;
  --accent-primary: #5DADE2;
  --accent-hover: #85C1E9;
  --accent-success: #58D68D;
  --accent-warning: #F7DC6F;
  --accent-danger: #F1948A;
  --border-color: #444444;
  --border-light: #383838;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}

/* ── Dark Mode AODA Contrast Overrides (WCAG AA / AODA compliant) ─── */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: #FFFFFF;
}

[data-theme="dark"] body,
[data-theme="dark"] p,
[data-theme="dark"] li {
  color: #E8E8E8;
}

[data-theme="dark"] a {
  color: #64B5F6;
}

[data-theme="dark"] a:hover {
  color: #90CAF9;
}

[data-theme="dark"] .story-block,
[data-theme="dark"] .story-box {
  background: #2A2A2A;
  color: #E8E8E8;
  border: 1px solid #444444;
}

[data-theme="dark"] .story-block h3,
[data-theme="dark"] .story-box h3,
[data-theme="dark"] .story-block .story-label {
  color: #FFFFFF;
}

[data-theme="dark"] .confidence-check {
  background: #1A2E25;
  color: #E8E8E8;
  border: 1px solid #2E5940;
}

[data-theme="dark"] .tip-block {
  background: #2E2A1A;
  color: #E8E8E8;
  border-color: #665500;
}

[data-theme="dark"] .tip-block .tip-label {
  color: #F7DC6F;
}

[data-theme="dark"] .warning-block {
  background: #2E1A1A;
  color: #E8E8E8;
  border-color: #773333;
}

[data-theme="dark"] .warning-block .warning-label {
  color: #F1948A;
}

[data-theme="dark"] .resource-card,
[data-theme="dark"] .podcast-card {
  background: #2A2A2A;
  color: #E8E8E8;
  border-color: #444444;
}

[data-theme="dark"] .video-note,
[data-theme="dark"] .video-timestamps,
[data-theme="dark"] .video-watch-link {
  color: #CCCCCC;
}

[data-theme="dark"] .read-aloud-tip {
  background: rgba(52,152,219,0.15);
  color: #E8E8E8;
  border-left-color: #5DADE2;
}

[data-theme="dark"] .read-aloud-tip h3 {
  color: #FFFFFF;
}

[data-theme="dark"] .read-aloud-tip p {
  color: #CCCCCC;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: var(--line-height);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
}

/* Global responsive media */
img {
  max-width: 100%;
  height: auto;
}
iframe, video {
  max-width: 100%;
}

/* Skip Navigation Link (keyboard / screen reader accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background: #1565C0;
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #FFD700;
  outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.6rem;
  font-weight: 600;
  padding-top: var(--spacing-md);
  border-top: 2px solid var(--border-light);
  margin-top: var(--spacing-xl);
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-primary);
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover, a:focus {
  color: var(--accent-hover);
}

a:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* Layout */
.page-wrapper {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
}

.main-content {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md);
  padding-bottom: 120px;
}

/* Sidebar Navigation */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease, background-color 0.3s ease;
  padding-top: var(--spacing-md);
}

.sidebar-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--spacing-sm);
}

.sidebar-header h2 {
  font-size: 1.1rem;
  margin: 0;
  padding: 0;
  border: none;
  color: var(--accent-primary);
}

.sidebar-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 4px 0 0 0;
}

.sidebar nav {
  padding: var(--spacing-xs);
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  min-height: var(--tap-target);
  transition: all 0.2s ease;
}

.sidebar nav a:hover {
  background: var(--bg-highlight);
  color: var(--accent-primary);
}

.sidebar nav a.active {
  background: var(--accent-primary);
  color: #FFFFFF;
  font-weight: 600;
}

.sidebar nav a .nav-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.sidebar nav a .nav-label {
  flex: 1;
}

.sidebar-close {
  display: none;
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.sidebar-close:hover {
  background: rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .sidebar-close {
  color: #e0e0e0;
}
[data-theme="dark"] .sidebar-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Top Bar */
.top-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  z-index: 99;
  padding: 0 var(--spacing-md);
  align-items: center;
  justify-content: space-between;
}

.top-bar .menu-btn {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 1.2rem;
  color: var(--text-primary);
  cursor: pointer;
  min-width: var(--tap-target);
  min-height: var(--tap-target);
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-bar .site-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Accessibility Controls — hidden at top-right; controls live in sidebar instead */
.accessibility-bar {
  display: none;
}

.a11y-btn {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 4px 10px;
}

.a11y-btn:hover, .a11y-btn:focus {
  border-color: var(--accent-primary);
  background: var(--bg-highlight);
}

.a11y-btn.active {
  background: var(--accent-primary);
  color: #FFFFFF;
  border-color: var(--accent-primary);
}

/* Module Cards (Home Page) */
.module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.module-card {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.module-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.module-card .card-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-highlight);
  border-radius: var(--radius-md);
}

.module-card .card-content h3 {
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

.module-card .card-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xs);
}

.module-card .card-progress {
  font-size: 0.85rem;
  color: var(--accent-success);
  font-weight: 600;
}

/* ── Module Grid Enhancements ── */
.mg-category-section { margin-bottom: 2rem; }

.mg-category-header {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-light, #e2e8f0);
}

.mg-category-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary, #1565C0);
  margin: 0 0 0.2rem;
}

.mg-category-desc {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  margin: 0;
}

.mg-sub-grid {
  margin: 0 !important;
}

.card-time {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
  margin-top: 0.35rem;
}

.card-complete-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #16A34A;
  margin-top: 0.35rem;
}

.card-done {
  border-color: #16A34A !important;
}

.card-done .card-icon {
  background: #F0FDF4;
}

[data-theme="dark"] .card-done {
  border-color: #22c55e !important;
}

[data-theme="dark"] .card-done .card-icon {
  background: #14532d;
}

.badge-start-here {
  background: #0F1B2D;
  color: #FFD700;
  border-radius: 100px;
  padding: 0.2rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0.4rem;
}

/* Sort toggle */
.mg-sort-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.mg-sort-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  white-space: nowrap;
}

.mg-sort-btn {
  background: var(--bg-secondary, #F8FAFC);
  border: 2px solid var(--border-light, #e2e8f0);
  border-radius: 100px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.mg-sort-btn:hover {
  border-color: var(--accent-primary, #1565C0);
  color: var(--accent-primary, #1565C0);
}

.mg-sort-btn.active {
  background: var(--accent-primary, #1565C0);
  border-color: var(--accent-primary, #1565C0);
  color: #fff;
}

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

[data-theme="dark"] .mg-sort-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

/* Content Blocks */
.story-block {
  background: var(--bg-highlight);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
  font-style: italic;
}

.story-block .story-label {
  font-style: normal;
  font-weight: 600;
  color: var(--accent-primary);
  display: block;
  margin-bottom: var(--spacing-xs);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.confidence-check {
  background: var(--bg-success);
  border: 2px solid var(--accent-success);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  text-align: center;
}

.confidence-check .check-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: var(--spacing-xs);
}

.confidence-check p {
  font-weight: 600;
  color: var(--accent-success);
  margin-bottom: 0;
}

.confidence-check .check-text {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: var(--spacing-xs);
}

.warning-block {
  background: var(--bg-warning);
  border-left: 4px solid var(--accent-warning);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.warning-block .warning-label {
  font-weight: 600;
  color: var(--accent-warning);
  display: block;
  margin-bottom: var(--spacing-xs);
}

.danger-block {
  background: var(--bg-danger);
  border-left: 4px solid var(--accent-danger);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.danger-block .danger-label {
  font-weight: 600;
  color: var(--accent-danger);
  display: block;
  margin-bottom: var(--spacing-xs);
}

.tip-block {
  background: var(--bg-highlight);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.tip-block .tip-label {
  font-weight: 600;
  color: var(--accent-primary);
  display: block;
  margin-bottom: var(--spacing-xs);
}

.try-it {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent-success);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--spacing-xs) var(--spacing-sm);
  margin-top: var(--spacing-xs);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* The 3-Second Rule */
.three-second-rule {
  background: linear-gradient(135deg, var(--bg-warning), var(--bg-highlight));
  border: 2px solid var(--accent-warning);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  text-align: center;
}

.three-second-rule h3 {
  color: var(--accent-warning);
  margin-bottom: var(--spacing-sm);
}

.three-second-rule .steps {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.three-second-rule .step {
  flex: 1;
  min-width: 120px;
  max-width: 180px;
  padding: var(--spacing-sm);
}

.three-second-rule .step .step-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: var(--spacing-xs);
}

.three-second-rule .step .step-name {
  font-weight: 600;
  display: block;
}

.three-second-rule .step .step-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ============================================
   Visual Callout Boxes
   ============================================ */

/* Tip Box — friendly blue hints */
.tip-box {
  background: var(--bg-highlight);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.tip-box .tip-box-label {
  font-weight: 600;
  color: var(--accent-primary);
  display: block;
  margin-bottom: var(--spacing-xs);
}

/* Warning Box — amber caution */
.warning-box {
  background: var(--bg-warning);
  border-left: 4px solid var(--accent-warning);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.warning-box .warning-box-label {
  font-weight: 600;
  color: var(--accent-warning);
  display: block;
  margin-bottom: var(--spacing-xs);
}

/* Three-Second Rule Box — prominent security reminder */
.three-second-rule-box {
  background: linear-gradient(135deg, var(--bg-warning), var(--bg-highlight));
  border: 2px solid var(--accent-warning);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  text-align: center;
}

.three-second-rule-box h4,
.three-second-rule-box h3 {
  color: var(--accent-warning);
  margin-bottom: var(--spacing-xs);
}

.three-second-rule-box p {
  margin-bottom: var(--spacing-xs);
}

/* Confidence Check Box — green encouragement */
.confidence-check-box {
  background: var(--bg-success);
  border: 2px solid var(--accent-success);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  text-align: center;
}

.confidence-check-box .check-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: var(--spacing-xs);
}

.confidence-check-box p {
  font-weight: 600;
  color: var(--accent-success);
  margin-bottom: 0;
}

.confidence-check-box .check-subtext {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: var(--spacing-xs);
}

/* Success State Box — exercise completion confirmation */
.success-state-box {
  background: var(--bg-success);
  border: 1px solid var(--accent-success);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-sm) 0;
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
}

.success-state-box .success-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.success-state-box p {
  margin: 0;
}

.success-state-box strong {
  color: var(--accent-success);
}

/* Feeling Stuck Box — help CTA */
.feeling-stuck-box {
  background: var(--bg-highlight);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.feeling-stuck-box h4,
.feeling-stuck-box h3 {
  color: var(--accent-primary);
  margin-bottom: var(--spacing-xs);
}

.feeling-stuck-box p {
  margin-bottom: var(--spacing-xs);
}

.feeling-stuck-box .resource-phone a {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Video Lab */
.video-lab {
  margin: var(--spacing-lg) 0;
}

.video-lab h2 {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.video-container {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
  border: 1px solid var(--border-light);
}

.video-container h4,
.video-container h3 {
  margin-bottom: var(--spacing-sm);
}

.video-container .video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-sm);
}

.video-container .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-container .video-note {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.video-container .video-timestamps {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
}

/* Exercise Blocks */
.exercise-block {
  background: var(--bg-card);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.exercise-block h3 {
  color: var(--accent-primary);
}

.exercise-block .success-state {
  background: var(--bg-success);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  margin-top: var(--spacing-md);
}

.exercise-block .success-state strong {
  color: var(--accent-success);
}

/* Progress Checkboxes */
.progress-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-light);
}

.progress-item:last-child {
  border-bottom: none;
}

.progress-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: var(--bg-card);
}

.progress-checkbox:checked {
  background: var(--accent-success);
  border-color: var(--accent-success);
}

.progress-checkbox:checked::after {
  content: "\2713";
  color: #FFFFFF;
  font-size: 1.2rem;
  font-weight: 700;
}

.progress-checkbox:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 3px;
}

.progress-label {
  font-size: 1rem;
  cursor: pointer;
}

.progress-label.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Quiz / Scam Simulation */
.quiz-container {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.quiz-question {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
}

.quiz-question:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.quiz-question h4,
.quiz-question h3 {
  margin-bottom: var(--spacing-sm);
}

.quiz-option {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  margin-bottom: var(--spacing-xs);
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-primary);
  transition: all 0.2s ease;
  min-height: var(--tap-target);
  font-family: inherit;
}

.quiz-option:hover {
  border-color: var(--accent-primary);
  background: var(--bg-highlight);
}

.quiz-option.correct {
  border-color: var(--accent-success);
  background: var(--bg-success);
}

.quiz-option.incorrect {
  border-color: var(--accent-danger);
  background: var(--bg-danger);
}

.quiz-option:disabled {
  cursor: default;
  opacity: 0.8;
}

.quiz-feedback {
  margin-top: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  display: none;
  font-weight: 500;
}

.quiz-feedback.show {
  display: block;
}

.quiz-feedback.correct {
  background: var(--bg-success);
  color: var(--accent-success);
}

.quiz-feedback.incorrect {
  background: var(--bg-danger);
  color: var(--accent-danger);
}

.quiz-score {
  text-align: center;
  padding: var(--spacing-md);
  background: var(--bg-highlight);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-md);
  display: none;
}

.quiz-score.show {
  display: block;
}

.quiz-score .score-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
}

/* Resource Cards */
.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-sm) 0;
  box-shadow: var(--shadow-sm);
}

.resource-card h4,
.resource-card h3 {
  color: var(--accent-primary);
  margin-bottom: var(--spacing-xs);
}

.resource-card .resource-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.resource-card .resource-phone {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.resource-card .efficacy-badge {
  display: inline-block;
  background: var(--bg-success);
  color: var(--accent-success);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: var(--spacing-xs);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: var(--tap-target);
  min-width: var(--tap-target);
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent-primary);
  color: #FFFFFF;
  border-color: var(--accent-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #FFFFFF;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-success {
  background: var(--accent-success);
  color: #FFFFFF;
  border-color: var(--accent-success);
}

/* Focus indicator for keyboard users — WCAG AA requirement */
.btn:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.btn-large {
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: 1.15rem;
  border-radius: var(--radius-md);
}

/* Module Navigation (Prev/Next) */
.module-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 2px solid var(--border-light);
}

.module-nav .btn {
  flex: 1;
  max-width: 280px;
}

.module-nav .btn-next {
  margin-left: auto;
}

/* Lists */
.content-list {
  padding-left: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.content-list li {
  margin-bottom: var(--spacing-sm);
  padding-left: var(--spacing-xs);
}

.numbered-list {
  counter-reset: item;
  list-style: none;
  padding-left: 0;
}

.numbered-list li {
  counter-increment: item;
  padding: var(--spacing-sm) 0;
  padding-left: 40px;
  position: relative;
  border-bottom: 1px solid var(--border-light);
}

.numbered-list li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: var(--spacing-sm);
  width: 28px;
  height: 28px;
  background: var(--accent-primary);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Red Flags List */
.red-flags {
  list-style: none;
  padding: 0;
}

.red-flags li {
  padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) 36px;
  position: relative;
  margin-bottom: var(--spacing-xs);
  background: var(--bg-danger);
  border-radius: var(--radius-sm);
}

.red-flags li::before {
  content: "\26A0";
  position: absolute;
  left: var(--spacing-sm);
  top: var(--spacing-sm);
}

/* Scam Example Block */
.scam-example {
  background: var(--bg-secondary);
  border: 2px dashed var(--accent-danger);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
}

.scam-example .example-label {
  font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Arial, sans-serif;
  font-weight: 600;
  color: var(--accent-danger);
  display: block;
  margin-bottom: var(--spacing-sm);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Welcome Hero */
.welcome-hero {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  background: linear-gradient(135deg, var(--bg-highlight), var(--bg-secondary));
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-lg);
}

.welcome-hero h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: var(--spacing-sm);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.welcome-hero .subtitle {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

.welcome-hero .tagline {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Progress Overview */
.progress-overview {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.progress-bar-container {
  background: var(--bg-secondary);
  border-radius: 20px;
  height: 20px;
  overflow: hidden;
  margin-top: var(--spacing-sm);
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-success));
  height: 100%;
  border-radius: 20px;
  transition: width 0.5s ease;
  min-width: 0;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: var(--spacing-xl);
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

.sidebar-overlay.show {
  display: block;
}

/* Podcast Section */
.podcast-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-sm) 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.podcast-card .podcast-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

/* Walkthrough Steps */
.walkthrough {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.walkthrough h4,
.walkthrough h3 {
  color: var(--accent-primary);
  margin-bottom: var(--spacing-sm);
}

.walkthrough-step {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-light);
}

.walkthrough-step:last-child {
  border-bottom: none;
}

.walkthrough-step .step-num {
  background: var(--accent-primary);
  color: #FFFFFF;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.walkthrough-step .step-text {
  flex: 1;
  padding-top: 2px;
}

/* Checklist block */
.checklist {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.checklist h3 {
  margin-bottom: var(--spacing-sm);
}

/* Print Styles */
@media print {
  .sidebar, .top-bar, .accessibility-bar, .module-nav, .sidebar-overlay {
    display: none !important;
  }
  .main-content {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }
  body {
    font-size: 14pt;
    color: #000000;
    background: #FFFFFF;
  }
  .page-wrapper {
    display: block;
  }
  a {
    color: #000000;
    text-decoration: underline;
  }
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
  /* Suppress tel: and mailto: URL display — number is already visible in the link text */
  a[href^="tel"]::after,
  a[href^="mailto"]::after {
    content: none;
  }
  .video-container .video-wrapper {
    display: none;
  }
  .video-container .video-note::before {
    content: "Video available online: ";
    font-weight: bold;
  }
  h2, h3 {
    page-break-after: avoid;
  }
  .story-block, .confidence-check, .warning-block, .danger-block, .tip-block, .exercise-block,
  .tip-box, .warning-box, .three-second-rule-box, .confidence-check-box, .success-state-box, .feeling-stuck-box {
    page-break-inside: avoid;
  }
  .setup-wizard-overlay, .device-filter-notice, .image-placeholder {
    display: none !important;
  }
  /* Dark mode: force white background and black text for all elements */
  [data-theme="dark"] body,
  [data-theme="dark"] .main-content,
  [data-theme="dark"] .page-wrapper {
    background: #ffffff !important;
    color: #000000 !important;
  }
  /* Callout boxes: use borders instead of coloured backgrounds */
  .warning-block, .danger-block, .tip-block, .exercise-block,
  .tip-box, .warning-box, .three-second-rule-box, .confidence-check,
  .confidence-check-box, .success-state-box, .feeling-stuck-box, .story-block {
    background: #ffffff !important;
    border: 2px solid #333333 !important;
    color: #000000 !important;
  }
  [data-theme="dark"] .warning-block,
  [data-theme="dark"] .danger-block,
  [data-theme="dark"] .tip-block,
  [data-theme="dark"] .exercise-block,
  [data-theme="dark"] .tip-box,
  [data-theme="dark"] .warning-box,
  [data-theme="dark"] .three-second-rule-box,
  [data-theme="dark"] .confidence-check,
  [data-theme="dark"] .story-block {
    background: #ffffff !important;
    border: 2px solid #333333 !important;
    color: #000000 !important;
  }
}

/* ============================================
   Setup Wizard
   ============================================ */
.setup-wizard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
}

.setup-wizard {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-lg) var(--spacing-lg) 0 var(--spacing-lg);
  position: relative;
  display: flex;
  flex-direction: column;
}

.setup-wizard h2 {
  border: none;
  margin-top: 0;
  padding-top: 0;
  text-align: center;
  font-size: 1.6rem;
}

.setup-wizard p {
  text-align: center;
  color: var(--text-secondary);
}

.wizard-progress {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.wizard-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
  transition: background 0.3s ease;
}

.wizard-dot.active {
  background: var(--accent-primary);
}

.wizard-dot.completed {
  background: var(--accent-success);
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

.wizard-step h3 {
  text-align: center;
  margin-bottom: var(--spacing-sm);
}

.wizard-step .step-explanation {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-md);
}

/* City dropdown */
.wizard-select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 1.1rem;
  font-family: inherit;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  min-height: var(--tap-target);
  margin-bottom: var(--spacing-md);
}

.wizard-select:focus {
  border-color: var(--accent-primary);
  outline: 3px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Device toggle buttons */
.wizard-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: center;
  margin-bottom: var(--spacing-md);
}

.wizard-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  min-height: var(--tap-target);
  min-width: 140px;
  transition: all 0.2s ease;
}

.wizard-option:hover {
  border-color: var(--accent-primary);
  background: var(--bg-highlight);
}

.wizard-option.selected {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: #FFFFFF;
  font-weight: 600;
}

.wizard-option.selected-none {
  border-color: var(--text-muted);
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-weight: 600;
}

/* Wizard step container — scrollable */
#wizard-step-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

/* Wizard navigation buttons — sticky footer */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-md);
  flex-shrink: 0;
  padding: var(--spacing-md) 0 var(--spacing-lg) 0;
  border-top: 1px solid var(--border-light);
  background: var(--bg-primary);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

.wizard-nav .btn {
  flex: 1;
  max-width: 200px;
  min-height: 60px;
  font-size: 1.05rem;
  font-weight: 600;
}

/* Geolocation button */
.wizard-geo-btn {
  display: block;
  margin: 0 auto var(--spacing-md);
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  padding: var(--spacing-xs) var(--spacing-sm);
}

.wizard-geo-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ============================================
   Image Placeholders
   ============================================ */
.image-placeholder {
  border: 2px solid #CCCCCC;
  border-radius: var(--radius-md);
  background: #F5F5F5;
  padding: var(--spacing-lg) var(--spacing-md);
  margin: var(--spacing-md) 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] .image-placeholder {
  border-color: #4A5568;
  background: #2D3748;
}

.placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--spacing-sm);
}

.placeholder-icon-wrap {
  font-size: 2.8rem;
  line-height: 1;
  opacity: 0.6;
}

.placeholder-text-wrap {
  min-width: 0;
}

/* Hide the "Screenshot needed" label — caption is self-descriptive */
.placeholder-label {
  display: none;
}

.placeholder-caption {
  display: none;
}

.placeholder-dims {
  display: none;
}

@media (max-width: 480px) {
  .placeholder-inner {
    flex-direction: column;
    text-align: center;
  }
  .placeholder-label {
    display: none;
  }
}

/* ============================================
   Device Content Filtering
   ============================================ */
.device-filter-notice {
  background: var(--bg-highlight);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.device-filter-notice p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--accent-primary);
}

.device-filter-notice a {
  font-size: 0.85rem;
  cursor: pointer;
}

.device-content.hidden {
  display: none;
}

/* ============================================
   Dynamic City Resources
   ============================================ */
#local-resources .city-section-title {
  color: var(--accent-primary);
  font-size: 1.4rem;
}

.city-footer-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Sidebar settings link */
.sidebar nav .settings-divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--spacing-sm) var(--spacing-md);
}

.local-help-dynamic:empty {
  display: none;
}

.local-help-dynamic {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

/* ============================================
   Sidebar Accessibility Controls
   ============================================ */
.sidebar-a11y-section {
  padding: var(--spacing-sm) var(--spacing-md);
  border-top: 1px solid var(--border-light);
  margin-top: var(--spacing-sm);
}

.sidebar-a11y-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 var(--spacing-xs) 0;
}

.sidebar-font-row {
  display: flex;
  gap: 6px;
  margin-bottom: var(--spacing-sm);
}

.sidebar-font-row .a11y-btn {
  flex: 1;
  min-width: unset;
  min-height: 48px;
  padding: 4px 2px;
}

.sidebar-theme-row {
  display: flex;
  gap: 6px;
}

.sidebar-theme-row .a11y-btn {
  flex: 1;
  min-height: 48px;
  font-size: 0.9rem;
  gap: 6px;
}

/* ============================================
   Welcome Hero Image
   ============================================ */
.welcome-hero-inner {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.welcome-hero-text {
  flex: 1;
  min-width: 0;
}

.welcome-hero-image {
  flex-shrink: 0;
  width: 260px;
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.welcome-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

@media (max-width: 768px) {
  .welcome-hero-inner {
    flex-direction: column;
  }
  .welcome-hero-image {
    width: 100%;
    height: 180px;
  }
}

/* ============================================
   Module Hero Image (top of module pages)
   ============================================ */
.module-hero-image {
  width: 100%;
  max-width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-lg);
  display: block;
}

@media (max-width: 600px) {
  .module-hero-image {
    height: 180px;
    object-position: center 20%;
    margin-bottom: var(--spacing-md);
  }
}

/* ============================================
   Phase 1 Polish — Visual Warmth
   ============================================ */

/* Module cards: warm amber left accent on hover */
.module-card:hover {
  border-left: 4px solid #E8B84B;
}

/* Story blocks: warm cream tone */
.story-block {
  background: #FFF8EC;
}

/* Confidence checks: warm cream-green tone */
.confidence-check {
  background: #F0FAF4;
}

/* Sidebar header: warm blue-to-indigo gradient */
.sidebar-header {
  background: linear-gradient(135deg, #3A8FC7 0%, #4A5BAD 100%);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: var(--spacing-md);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: var(--spacing-sm);
}

.sidebar-header h2 {
  color: #FFFFFF;
}

.sidebar-header p {
  color: rgba(255,255,255,0.8);
}

/* Welcome hero: soft warm gradient */
.welcome-hero {
  background: linear-gradient(135deg, #FFF8EC 0%, #EBF5FB 60%, #EAF4FF 100%);
}

/* Desktop: accessibility bar removed; no extra top padding needed */

/* ============================================
   Phase 1 Polish — Splash Overlay
   ============================================ */
.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(160deg, #FFF8EC 0%, #EBF5FB 50%, #EAF4FF 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  overflow-y: auto;
}

.splash-inner {
  background: rgba(255,255,255,0.95);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  padding: clamp(20px, 4vh, 40px) clamp(20px, 5vw, 48px);
  box-shadow: 0 12px 48px rgba(52,152,219,0.15);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.splash-icon {
  font-size: clamp(48px, 8vw, 72px);
  line-height: 1;
  margin-bottom: clamp(10px, 2vh, 20px);
}

.splash-inner h1 {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: #2C3E50;
  margin-bottom: clamp(8px, 1.5vh, 16px);
  line-height: 1.2;
}

.splash-inner .splash-sub {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: #5D6D7E;
  margin-bottom: clamp(8px, 2vh, 20px);
  font-style: italic;
  max-width: 480px;
}

.splash-desc {
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: #666;
  line-height: 1.6;
  max-width: 460px;
  margin-bottom: clamp(16px, 3vh, 32px);
}

/* Hide old bullet/note structure if present */
.splash-bullets, .splash-note {
  display: none;
}

.splash-btn-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #3498DB;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.15rem;
  font-weight: 700;
  font-family: inherit;
  padding: var(--spacing-sm) var(--spacing-lg);
  min-height: 60px;
  cursor: pointer;
  width: 100%;
  max-width: 380px;
  transition: background 0.2s ease;
  margin-bottom: var(--spacing-md);
  box-shadow: 0 4px 12px rgba(52,152,219,0.3);
}

.splash-btn-start:hover {
  background: #2980B9;
}

.splash-skip {
  display: block;
  font-size: 0.95rem;
  color: #85929E;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 8px;
}

.splash-skip:hover {
  color: #5D6D7E;
}

@media (max-width: 480px) {
  .splash-inner {
    border-radius: var(--radius-md);
  }
  .splash-overlay {
    padding: 12px;
  }
}

/* ============================================
   Phase 1 Polish — Wizard Current Selections Banner
   ============================================ */
.wizard-current-settings {
  background: #EBF5FB;
  border: 1px solid #AED6F1;
  border-radius: var(--radius-sm);
  padding: var(--spacing-xs) var(--spacing-md);
  margin-bottom: var(--spacing-md);
  font-size: 0.9rem;
  color: #2471A3;
  text-align: center;
}

/* ============================================
   Phase 1 Polish — Podcast Enhancements
   ============================================ */
.podcast-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin: var(--spacing-xs) 0;
}

.podcast-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: default;
}

.podcast-howto {
  margin-top: var(--spacing-sm);
}

.podcast-howto summary {
  cursor: pointer;
  color: var(--accent-primary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: var(--spacing-xs) 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.podcast-howto summary::before {
  content: "▶";
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.podcast-howto[open] summary::before {
  transform: rotate(90deg);
}

.podcast-howto-steps {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: var(--spacing-md);
  margin-top: var(--spacing-xs);
  font-size: 0.9rem;
}

.podcast-howto-steps h5 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  margin-top: var(--spacing-sm);
}

.podcast-howto-steps h5:first-child {
  margin-top: 0;
}

.podcast-howto-steps ol {
  margin: 0 0 var(--spacing-sm) var(--spacing-md);
  padding: 0;
}

.podcast-howto-steps ol li {
  margin-bottom: 4px;
}

/* ============================================
   Phase 1 Polish — App Store Guide
   ============================================ */
.appstore-guide {
  background: var(--bg-secondary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.appstore-guide > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-primary);
  padding: 4px 0;
}

.appstore-guide > summary::before {
  content: "▶";
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.appstore-guide[open] > summary::before {
  transform: rotate(90deg);
}

.appstore-platform {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-md);
  background: var(--bg-card);
}

.appstore-platform > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.appstore-platform > summary::before {
  content: "▶";
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.appstore-platform[open] > summary::before {
  transform: rotate(90deg);
}

.appstore-platform-body {
  padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md) var(--spacing-md);
  border-top: 1px solid var(--border-light);
}

.appstore-platform-body ol {
  margin: 0;
  padding-left: var(--spacing-md);
}

.appstore-platform-body ol li {
  margin-bottom: var(--spacing-xs);
  font-size: 0.95rem;
}

/* ============================================
   Device Tip Banner (shown after skipping setup)
   ============================================ */
.device-prompt-banner {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: #EBF5FB;
  border: 1px solid #AED6F1;
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
  color: #2471A3;
}

.device-prompt-icon {
  flex-shrink: 0;
  font-size: 1.2rem;
}

.device-prompt-text {
  flex: 1;
}

.device-prompt-text a {
  color: #2471A3;
  font-weight: 600;
}

.device-prompt-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #5D6D7E;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.device-prompt-dismiss:hover {
  background: rgba(0,0,0,0.08);
}

/* Podcast platform links — clickable */
.podcast-platform-badge[href] {
  cursor: pointer;
}

.podcast-platform-badge[href]:hover {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  text-decoration: none;
}



/* ── Read Aloud Tip ───────────────────────────────────────── */
.read-aloud-tip {
  background: #E8F4F8;
  border-left: 4px solid #3498DB;
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.read-aloud-tip h3 {
  margin: 0 0 10px 0;
  font-size: 1rem;
  color: #2C3E50;
}
.read-aloud-tip p {
  margin: 6px 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
[data-theme="dark"] .read-aloud-tip {
  background: rgba(52,152,219,0.12);
  border-left-color: #5DADE2;
}
[data-theme="dark"] .read-aloud-tip h3 {
  color: var(--text-primary);
}


/* ── Banking Module Hero (replaces photo) ──────────────────── */
.module-banking-hero {
  background: linear-gradient(135deg, #1A5276 0%, #2471A3 50%, #5DADE2 100%);
  min-height: 180px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--spacing-md) 0;
  gap: 16px;
  padding: var(--spacing-lg);
}

.module-banking-hero-icon {
  font-size: 4rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.module-banking-hero-text {
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.module-banking-hero-text h2 {
  color: #FFFFFF;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.module-banking-hero-text p {
  color: rgba(255,255,255,0.88);
  font-size: 0.95rem;
  margin: 0;
}

/* ── YouTube Fallback Watch Link ────────────────────────────── */
.video-watch-link {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 6px 0 0 0;
  text-align: center;
}

.video-watch-link a {
  color: var(--accent-primary);
  text-decoration: none;
}

.video-watch-link a:hover {
  text-decoration: underline;
}


/* ============================================================
   FINAL POLISH — appended 2026-02-26
   ============================================================ */

/* ── Image Placeholder Redesign ──────────────────────────── */
.image-placeholder {
  background: linear-gradient(135deg, #EEF2F7 0%, #E3E9F0 100%);
  border: 2px solid #B0BEC5;
  border-radius: 12px;
  padding: 48px 24px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 40px 0;
  transition: all 0.3s ease;
}
.image-placeholder:hover {
  background: linear-gradient(135deg, #E8EDF3 0%, #DDE5EC 100%);
  border-color: #90A4AE;
}
.placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}
.placeholder-icon-wrap {
  font-size: 72px;
  opacity: 0.75;
  line-height: 1;
}
.placeholder-text-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
[data-theme="dark"] .image-placeholder {
  background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
  border-color: #546E7A;
}

/* ── Video Search Cards ───────────────────────────────────── */
.video-section {
  margin: 48px 0;
  padding: 32px;
  background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.video-section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.video-section-icon { font-size: 48px; }
.video-section h3 {
  color: #1565C0;
  margin: 0;
  font-size: 1.5rem;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.video-card {
  background: #FFFFFF;
  border: 2px solid #2196F3;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.video-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, #2196F3, #1976D2);
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(33,150,243,0.25);
}
.video-card-thumbnail {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
}
.video-card-play-icon {
  font-size: 56px;
  transition: transform 0.3s;
}
.video-card:hover .video-card-play-icon { transform: scale(1.1); }
.video-card-topic-icon {
  position: absolute;
  bottom: 8px; right: 8px;
  font-size: 28px;
  opacity: 0.6;
}
.video-card h4,
.video-card h3 {
  color: #1565C0;
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.video-card p {
  color: #546E7A;
  margin: 0 0 20px 0;
  font-size: 0.9rem;
  line-height: 1.5;
}
.video-card-btn {
  display: inline-block;
  background: #2196F3;
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(33,150,243,0.3);
}
.video-card-btn:hover {
  background: #1976D2;
  color: #FFFFFF;
  transform: translateY(-1px);
}
.video-safety-note {
  background: #E8F5E9;
  border-left: 4px solid #4CAF50;
  padding: 14px 16px;
  margin-top: 24px;
  border-radius: 0 6px 6px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.video-safety-note-icon { font-size: 24px; flex-shrink: 0; }
.video-safety-note p {
  margin: 0;
  color: #2E7D32;
  font-size: 0.88rem;
  font-weight: 500;
}
[data-theme="dark"] .video-section {
  background: linear-gradient(135deg, #1E3A5F 0%, #2C5282 100%);
}
[data-theme="dark"] .video-section h3 { color: #90CAF9; }
[data-theme="dark"] .video-card { background: #2A2A2A; border-color: #5DADE2; }
[data-theme="dark"] .video-card::before { background: linear-gradient(90deg, #5DADE2, #42A5F5); }
[data-theme="dark"] .video-card-thumbnail { background: linear-gradient(135deg, #1E3A5F, #2C5282); }
[data-theme="dark"] .video-card h4, [data-theme="dark"] .video-card h3 { color: #90CAF9; }
[data-theme="dark"] .video-card p  { color: #B0BEC5; }
[data-theme="dark"] .video-card-btn { background: #5DADE2; }
[data-theme="dark"] .video-card-btn:hover { background: #42A5F5; }
[data-theme="dark"] .video-safety-note { background: #1A3320; border-color: #66BB6A; }
[data-theme="dark"] .video-safety-note p { color: #A5D6A7; }

/* ── Local Help Section ───────────────────────────────────── */
.local-help-section {
  background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
  padding: 40px 32px;
  border-radius: 16px;
  margin: 48px 0;
}
.local-help-section h3 {
  color: #E65100;
  text-align: center;
  font-size: 1.4rem;
  margin: 0 0 12px 0;
}
.local-help-section > p {
  text-align: center;
  color: #5D4037;
  margin: 0 0 28px 0;
}
.local-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.local-help-card {
  background: #FFFFFF;
  padding: 22px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}
.local-help-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.local-help-card-icon { font-size: 40px; margin-bottom: 10px; }
.local-help-card h4, .local-help-card h3 { color: #E65100; margin: 0 0 6px 0; font-size: 1rem; }
.local-help-card p  { color: #5D4037; margin: 0; font-size: 0.88rem; line-height: 1.6; }
.local-help-card a  { color: #BF360C; }
.local-help-card strong { color: #BF360C; font-weight: 700; }
[data-theme="dark"] .local-help-section { background: linear-gradient(135deg, #3E2723 0%, #4E342E 100%); }
[data-theme="dark"] .local-help-section h3 { color: #FFAB91; }
[data-theme="dark"] .local-help-section > p { color: #BCAAA4; }
[data-theme="dark"] .local-help-card { background: #2A2A2A; }
[data-theme="dark"] .local-help-card h4, [data-theme="dark"] .local-help-card h3 { color: #FFAB91; }
[data-theme="dark"] .local-help-card p  { color: #BCAAA4; }
[data-theme="dark"] .local-help-card strong,
[data-theme="dark"] .local-help-card a  { color: #FF8A65; }

/* ── Footer Links Bar ─────────────────────────────────────── */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
}
.footer-links a:hover { color: var(--accent-primary); text-decoration: underline; }
.footer-copyright p {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

/* ── Legal Pages ─────────────────────────────────────────── */
.legal-container { max-width: 800px; margin: 0 auto; padding: 40px 24px; }
.legal-header { margin-bottom: 40px; border-bottom: 2px solid var(--border-color); padding-bottom: 20px; }
.legal-header h1 { margin-bottom: 8px; }
.last-updated { color: var(--text-muted); font-size: 0.9rem; }
.legal-section { margin-bottom: 32px; }
.legal-section h2 { font-size: 1.2rem; margin-bottom: 12px; }
.legal-section ul { padding-left: 24px; }
.legal-section li { margin-bottom: 6px; line-height: 1.6; }
.legal-agreement {
  background: var(--bg-highlight);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin-top: 40px;
}
.legal-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.back-link { color: var(--accent-primary); text-decoration: none; font-weight: 600; }

/* ── FAQ Accordion ───────────────────────────────────────── */
.faq-intro { color: var(--text-secondary); margin-bottom: 32px; font-size: 1rem; }
.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 20px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  background: var(--bg-card);
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; color: var(--accent-primary); flex-shrink: 0; }
.faq-item[open] summary::after { content: '-'; }
.faq-item summary:hover { background: var(--bg-secondary); }
.faq-answer {
  padding: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  border-top: 1px solid var(--border-light);
  background: var(--bg-primary);
}
.faq-lang-switch {
  text-align: right;
  margin-bottom: 20px;
}
.faq-lang-switch a { color: var(--accent-primary); font-weight: 600; text-decoration: none; }
.faq-lang-switch a:hover { text-decoration: underline; }

/* ============================================================
   COMPREHENSIVE UPDATE — appended 2026-02-27
   ============================================================ */

/* ── Section Markers (intentional icon+context blocks) ────── */
.section-marker {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
  padding: 20px 28px;
  border-radius: 12px;
  border-left: 5px solid #2196F3;
  margin: 48px 0 32px 0;
  max-width: fit-content;
  box-shadow: 0 2px 8px rgba(33,150,243,0.15);
}
.section-marker-icon {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}
.section-marker-content h3 {
  margin: 0 0 4px 0;
  color: #1565C0;
  font-size: 20px;
  font-weight: 600;
}
.section-marker-content p {
  margin: 0;
  color: #455A64;
  font-size: 14px;
}
[data-theme="dark"] .section-marker {
  background: linear-gradient(135deg, #1E3A5F 0%, #2C5282 100%);
  border-left-color: #5DADE2;
}
[data-theme="dark"] .section-marker-content h3 {
  color: #90CAF9;
}
[data-theme="dark"] .section-marker-content p {
  color: #B0BEC5;
}

/* ── Image Placeholder: horizontal section-marker style ───── */
.image-placeholder {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 20px !important;
  background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%) !important;
  border: none !important;
  border-left: 5px solid #2196F3 !important;
  border-radius: 12px !important;
  padding: 20px 28px !important;
  min-height: unset !important;
  margin: 32px 0 !important;
  box-shadow: 0 2px 8px rgba(33,150,243,0.12) !important;
}
.image-placeholder:hover {
  background: linear-gradient(135deg, #D6EAF8 0%, #AED6F1 100%) !important;
  border-left-color: #1565C0 !important;
}
.image-placeholder .placeholder-inner {
  flex-direction: row !important;
  text-align: left !important;
  gap: 20px !important;
  width: 100% !important;
}
.image-placeholder .placeholder-icon-wrap {
  font-size: 36px !important;
  opacity: 0.9 !important;
  flex-shrink: 0 !important;
}
.image-placeholder .placeholder-text-wrap {
  flex-direction: column !important;
  align-items: flex-start !important;
}
.image-placeholder .placeholder-label {
  font-size: 11px !important;
  color: #1565C0 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
}
.image-placeholder .placeholder-caption {
  font-size: 16px !important;
  color: #1A237E !important;
  font-weight: 600 !important;
  margin: 2px 0 0 0 !important;
}
.image-placeholder .placeholder-dims {
  display: none !important;
}
[data-theme="dark"] .image-placeholder {
  background: linear-gradient(135deg, #1E3A5F 0%, #2C5282 100%) !important;
  border-left-color: #5DADE2 !important;
}
[data-theme="dark"] .image-placeholder:hover {
  background: linear-gradient(135deg, #172D4A 0%, #1E3A5F 100%) !important;
}
[data-theme="dark"] .image-placeholder .placeholder-label {
  color: #90CAF9 !important;
}
[data-theme="dark"] .image-placeholder .placeholder-caption {
  color: #E3F2FD !important;
}

/* ── Dark Mode: Welcome Hero Header Fix ───────────────────── */
[data-theme="dark"] .welcome-hero h1 {
  color: #FFFFFF;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
[data-theme="dark"] .welcome-hero {
  background: linear-gradient(135deg, #1B2631 0%, #1E3A5F 60%, #1B2631 100%);
}
[data-theme="dark"] .welcome-hero .subtitle {
  color: #B0BEC5;
}
[data-theme="dark"] .welcome-hero .tagline {
  color: #90A4AE;
}

/* ── Read Aloud Feature ───────────────────────────────────── */
.read-aloud-wrapper {
  position: relative;
  margin: 24px 0;
}
.read-aloud-controls {
  margin-bottom: 12px;
}
.read-aloud-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #E3F2FD;
  border: 2px solid #2196F3;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #1565C0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  min-width: 122px; /* prevents width jump between "Listen" and "Pause" */
}
.read-aloud-btn:hover {
  background: #2196F3;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(33,150,243,0.3);
}
/* Active/playing state */
.read-aloud-btn.playing {
  background: #1565C0;
  color: #ffffff;
  border-color: #0D47A1;
  box-shadow: 0 0 0 3px rgba(21,101,192,0.28), 0 4px 12px rgba(21,101,192,0.35);
  transform: translateY(-1px);
}
.read-aloud-icon {
  font-size: 18px;
  line-height: 1;
}
.being-read {
  background: #FFF9C4;
  border-radius: 8px;
  transition: background 0.3s;
  /* NOTE: No padding change here — padding shifts layout (the "pixel jump" bug).
     Background colour alone provides the visual reading indicator. */
}
.word-highlight {
  background: #FFEB3B;
  color: #000000;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 600;
}
[data-theme="dark"] .read-aloud-btn {
  background: #1E3A5F;
  border-color: #5DADE2;
  color: #90CAF9;
}
[data-theme="dark"] .read-aloud-btn:hover {
  background: #5DADE2;
  color: #1E1E1E;
}
[data-theme="dark"] .read-aloud-btn.playing {
  background: #1565C0;
  color: #ffffff;
  border-color: #90CAF9;
  box-shadow: 0 0 0 3px rgba(144,202,249,0.3), 0 4px 12px rgba(21,101,192,0.4);
}
[data-theme="dark"] .dc-sidebar-panic-banner {
  border-color: #FFD54F;
}
[data-theme="dark"] .being-read {
  background: #3E2723;
}
[data-theme="dark"] .word-highlight {
  background: #FDD835;
  color: #000000;
}

/* ── Video Help Link ──────────────────────────────────────── */
.video-help-link {
  background: #FFF3E0;
  border-left: 4px solid #FF9800;
  padding: 16px 20px;
  margin-top: 24px;
  border-radius: 0 6px 6px 0;
}
.video-help-link p {
  margin: 0;
  color: #E65100;
  font-size: 15px;
}
.video-help-link a {
  color: #F57C00;
  font-weight: 600;
  text-decoration: underline;
}
[data-theme="dark"] .video-help-link {
  background: #3E2723;
  border-color: #FFB74D;
}
[data-theme="dark"] .video-help-link p {
  color: #FFCC80;
}
[data-theme="dark"] .video-help-link a {
  color: #FFB74D;
}

/* ── Quiz Unlock Notification ─────────────────────────────── */
.quiz-unlock-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: white;
  border: 3px solid #4CAF50;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 9000;
  max-width: 340px;
  animation: slideInUp 0.4s ease;
}
@keyframes slideInUp {
  from { transform: translateY(100px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.quiz-unlock-content { text-align: center; }
.quiz-unlock-icon { font-size: 48px; margin-bottom: 12px; }
.quiz-unlock-content h3 { margin: 0 0 8px 0; color: #2E7D32; font-size: 20px; }
.quiz-unlock-content p { color: #546E7A; font-size: 15px; margin: 0 0 16px 0; }
.quiz-unlock-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: #90A4AE;
}
[data-theme="dark"] .quiz-unlock-notification { background: #2A2A2A; border-color: #66BB6A; }
[data-theme="dark"] .quiz-unlock-content h3 { color: #A5D6A7; }
[data-theme="dark"] .quiz-unlock-content p  { color: #B0BEC5; }

/* ── Final Quiz Banner on Home Page ──────────────────────── */
.final-quiz-banner {
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  border: 2px solid #4CAF50;
  border-radius: 16px;
  padding: 28px 32px;
  margin: 32px 0;
  display: none;
  align-items: center;
  gap: 24px;
}
.final-quiz-banner.visible {
  display: flex;
}
.fqb-icon { font-size: 56px; flex-shrink: 0; }
.fqb-text h2 { margin: 0 0 8px 0; color: #2E7D32; font-size: 22px; border: none; padding: 0; }
.fqb-text p  { margin: 0 0 16px 0; color: #388E3C; font-size: 15px; }
.btn-success {
  display: inline-block;
  background: #4CAF50;
  color: white;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-success:hover { background: #388E3C; }
[data-theme="dark"] .final-quiz-banner {
  background: linear-gradient(135deg, #1B2E1F 0%, #1A3320 100%);
  border-color: #66BB6A;
}
[data-theme="dark"] .fqb-text h2 { color: #A5D6A7; }
[data-theme="dark"] .fqb-text p  { color: #81C784; }

/* ── Search Guide Page ────────────────────────────────────── */
.guide-container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
.guide-header {
  text-align: center;
  margin-bottom: 48px;
  padding: 40px;
  background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
  border-radius: 16px;
}
.guide-header h1 { margin: 0 0 12px 0; color: #1565C0; }
.guide-header p  { margin: 0; color: #455A64; font-size: 18px; }
.guide-section { margin-bottom: 48px; }
.quality-indicator {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.indicator-icon { font-size: 36px; flex-shrink: 0; line-height: 1; }
.indicator-content h3 { margin: 0 0 8px 0; color: var(--text-primary); font-size: 18px; }
.ad-guide {
  background: var(--bg-warning);
  border: 2px solid var(--accent-warning);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}
.ad-tip { background: var(--bg-card); padding: 16px; border-radius: 8px; margin-top: 16px; }
.search-tip {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.search-tip h3 { margin: 0 0 8px 0; color: var(--accent-primary); }
.checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
  border: 2px solid var(--accent-success);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}
.checklist label { display: flex; align-items: center; gap: 12px; font-size: 17px; cursor: pointer; }
.checklist input[type="checkbox"] { width: 24px; height: 24px; cursor: pointer; }
.checklist-note { font-style: italic; color: var(--text-secondary); }
.guide-footer { text-align: center; padding: 40px 0 20px; }
.back-btn {
  display: inline-block;
  background: var(--accent-primary);
  color: white;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
}

/* ============================================================
   BETA REFINEMENT UPDATE — appended 2026-02-27
   ============================================================ */

/* ── CRITICAL: Dark Mode Button Contrast Fixes ──────────────
   In dark mode, accent-primary becomes #5DADE2 (light blue).
   White text on #5DADE2 = ~1.6:1 contrast (fails WCAG AA).
   Fix: force deep navy background so white text passes 4.5:1.
   ──────────────────────────────────────────────────────────── */

/* video-card-btn: was #5DADE2 bg, no explicit text color */
[data-theme="dark"] .video-card-btn {
  background: #1565C0 !important;
  color: #FFFFFF !important;
  border-color: #0D47A1 !important;
}
[data-theme="dark"] .video-card-btn:hover {
  background: #0D47A1 !important;
  color: #FFFFFF !important;
}

/* btn-primary dark mode */
[data-theme="dark"] .btn-primary {
  background: #1565C0;
  color: #FFFFFF;
  border-color: #0D47A1;
}
[data-theme="dark"] .btn-primary:hover {
  background: #0D47A1;
  color: #FFFFFF;
}

/* quiz primary button */
[data-theme="dark"] .quiz-btn-primary {
  background: #1565C0;
  color: #FFFFFF;
  border-color: #0D47A1;
}
[data-theme="dark"] .quiz-btn-primary:hover {
  background: #0D47A1;
  color: #FFFFFF;
}

/* back-btn and resource-btn */
[data-theme="dark"] .back-btn {
  background: #1565C0;
  color: #FFFFFF !important;
  border-color: #0D47A1;
}
[data-theme="dark"] .back-btn:hover {
  background: #0D47A1;
  color: #FFFFFF !important;
}

/* btn-success in dark mode */
[data-theme="dark"] .btn-success {
  background: #2E7D32;
  color: #FFFFFF;
  border-color: #1B5E20;
}
[data-theme="dark"] .btn-success:hover {
  background: #1B5E20;
  color: #FFFFFF;
}

/* module nav buttons */
[data-theme="dark"] .module-nav .btn-primary {
  background: #1565C0;
  color: #FFFFFF;
  border-color: #0D47A1;
}

/* read-aloud button */
[data-theme="dark"] .read-aloud-btn {
  background: #1565C0 !important;
  border-color: #0D47A1 !important;
  color: #FFFFFF !important;
}
[data-theme="dark"] .read-aloud-btn:hover {
  background: #0D47A1 !important;
  color: #FFFFFF !important;
}

/* Scam quiz buttons */
[data-theme="dark"] .scam-choice-btn {
  background: #2A3A5A;
  color: #E8E8E8;
  border-color: #3D5A80;
}

/* ── Icon Banner — contextual label variants ─────────────────── */
.icon-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
  padding: 20px 28px;
  border-radius: 12px;
  border-left: 5px solid #2196F3;
  margin: 32px 0;
  box-shadow: 0 2px 8px rgba(33,150,243,0.15);
}
.icon-banner .icon {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}
.banner-content { flex: 1; }
.banner-label {
  display: inline-block;
  background: #2196F3;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.banner-text {
  margin: 8px 0 0 0;
  color: #1565C0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

/* Variant: Action Required (orange) */
.icon-banner.action-required {
  background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
  border-left-color: #FF9800;
}
.icon-banner.action-required .banner-label { background: #FF9800; }
.icon-banner.action-required .banner-text  { color: #E65100; }

/* Variant: How-To (green) */
.icon-banner.how-to {
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  border-left-color: #4CAF50;
}
.icon-banner.how-to .banner-label { background: #4CAF50; }
.icon-banner.how-to .banner-text  { color: #2E7D32; }

/* Dark mode icon-banner */
[data-theme="dark"] .icon-banner {
  background: linear-gradient(135deg, #1E3A5F 0%, #2C5282 100%);
  border-left-color: #5DADE2;
}
[data-theme="dark"] .banner-label {
  background: #5DADE2;
  color: #1E1E1E;
}
[data-theme="dark"] .banner-text { color: #90CAF9; }

[data-theme="dark"] .icon-banner.action-required {
  background: linear-gradient(135deg, #3E2723 0%, #4E342E 100%);
  border-left-color: #FFB74D;
}
[data-theme="dark"] .icon-banner.action-required .banner-label {
  background: #FFB74D; color: #1E1E1E;
}
[data-theme="dark"] .icon-banner.action-required .banner-text { color: #FFCC80; }

[data-theme="dark"] .icon-banner.how-to {
  background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
  border-left-color: #66BB6A;
}
[data-theme="dark"] .icon-banner.how-to .banner-label {
  background: #66BB6A; color: #1E1E1E;
}
[data-theme="dark"] .icon-banner.how-to .banner-text { color: #A5D6A7; }

/* ── Module 2 gradient hero ──────────────────────────────────── */
.module-2-hero {
  background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.module-2-hero::before {
  content: '🛡️';
  font-size: 120px;
  opacity: 0.12;
  position: absolute;
  right: 40px;
  bottom: 20px;
}
.module-2-hero-content {
  text-align: center;
  color: white;
  padding: 40px;
  position: relative;
  z-index: 1;
}
.module-2-hero-icon {
  font-size: 80px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  display: block;
}
.module-2-hero h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ── Read-Aloud controls at bottom, right-aligned ─────────────── */
.read-aloud-controls {
  margin-top: 16px !important;
  margin-bottom: 0 !important;
  padding-top: 12px !important;
  border-top: 1px dashed #CFD8DC !important;
  text-align: right !important;
}
[data-theme="dark"] .read-aloud-controls {
  border-top-color: #546E7A !important;
}

/* ── Word highlight pulse animation ─────────────────────────── */
.word-highlight {
  background: linear-gradient(135deg, #FFEB3B 0%, #FDD835 100%) !important;
  color: #000000 !important;
  padding: 3px 6px !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
  animation: word-pulse 0.3s ease-in-out !important;
}
@keyframes word-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}
[data-theme="dark"] .word-highlight {
  background: linear-gradient(135deg, #FDD835 0%, #F9A825 100%) !important;
  color: #000000 !important;
}

/* ── Beta Feedback Widget ─────────────────────────────────── */
.beta-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.beta-feedback-trigger {
  background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,152,0,0.4);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.beta-feedback-trigger:hover {
  background: linear-gradient(135deg, #FB8C00 0%, #EF6C00 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,152,0,0.5);
}
.beta-feedback-panel {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  animation: slideUpPanel 0.3s ease-out;
}
@keyframes slideUpPanel {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}
.feedback-header {
  background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
  color: white;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.feedback-header h3 { margin:0; font-size:18px; font-weight:700; }
.feedback-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
  transition: background 0.2s;
}
.feedback-close:hover { background: rgba(255,255,255,0.2); }
.feedback-form { padding: 20px; }
.feedback-page-info {
  background: #FFF3E0;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  border-left: 4px solid #FF9800;
  font-size: 13px;
  color: #E65100;
}
.feedback-field { margin-bottom: 16px; }
.feedback-field label {
  display: block;
  color: #2C3E50;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}
.feedback-field select,
.feedback-field textarea,
.feedback-field input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
  background: white;
  color: #2C3E50;
}
.feedback-field select:focus,
.feedback-field textarea:focus,
.feedback-field input[type="email"]:focus {
  outline: none;
  border-color: #FF9800;
  box-shadow: 0 0 0 3px rgba(255,152,0,0.1);
}
.feedback-field textarea { resize: vertical; min-height: 90px; }
.feedback-actions { display:flex; gap:12px; margin-top:16px; }
.btn-feedback-submit {
  flex:1; background:#FF9800; color:white;
  border:none; padding:12px 20px; border-radius:8px;
  font-size:15px; font-weight:600; cursor:pointer; transition:background 0.2s;
}
.btn-feedback-submit:hover { background:#F57C00; }
.btn-feedback-cancel {
  background:#F5F5F5; color:#546E7A;
  border:none; padding:12px 20px; border-radius:8px;
  font-size:15px; font-weight:600; cursor:pointer; transition:background 0.2s;
}
.btn-feedback-cancel:hover { background:#EEEEEE; }
.feedback-success {
  background:#E8F5E9; border:2px solid #4CAF50; border-radius:8px;
  padding:16px; text-align:center; margin-top:12px;
}
.feedback-success p { margin:0; color:#2E7D32; font-weight:600; }

[data-theme="dark"] .beta-feedback-panel { background:#2A2A2A; }
[data-theme="dark"] .feedback-form { color:#E8E8E8; }
[data-theme="dark"] .feedback-field label { color:#E8E8E8; }
[data-theme="dark"] .feedback-field select,
[data-theme="dark"] .feedback-field textarea,
[data-theme="dark"] .feedback-field input[type="email"] {
  background:#1E1E1E; color:#E8E8E8; border-color:#424242;
}
[data-theme="dark"] .feedback-page-info { background:#3E2723; border-color:#FFB74D; color:#FFCC80; }
[data-theme="dark"] .btn-feedback-cancel { background:#37474F; color:#E8E8E8; }

@media (max-width:600px) {
  .beta-widget { bottom:16px; right:16px; }
  .beta-feedback-trigger { padding:12px 18px; font-size:14px; }
  .beta-feedback-panel  { bottom:70px; right:16px; width:calc(100vw - 32px); }
}


/* ============================================================
   VISUAL EXAMPLE CARDS (replaces image-placeholder style)
   ============================================================ */
.visual-example-card {
  background: linear-gradient(135deg, #1E3A5F 0%, #2C5282 100%);
  border: 2px solid #5DADE2;
  border-radius: 12px;
  padding: 32px;
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.example-icon {
  font-size: 72px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}
.example-content { max-width: 700px; }
.example-title {
  color: #90CAF9;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px 0;
}
.example-description {
  color: #B0BEC5;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}
[data-theme="light"] .visual-example-card {
  background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
  border-color: #2196F3;
}
[data-theme="light"] .example-title { color: #1565C0; }
[data-theme="light"] .example-description { color: #37474F; }
@media (max-width: 768px) {
  .visual-example-card { padding: 24px 16px; }
  .example-icon { font-size: 56px; }
  .example-title { font-size: 18px; }
  .example-description { font-size: 14px; }
}

/* ============================================================
   SPEECH / TTS SPEED CONTROLS
   ============================================================ */
.speech-controls {
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  border: 2px solid #4CAF50;
  border-radius: 12px;
  padding: 24px;
  margin: 40px 0;
}
.control-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.control-icon { font-size: 28px; }
.control-label { color: #2E7D32; font-size: 18px; font-weight: 700; }
.speed-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.speed-btn {
  background: white;
  border: 3px solid #81C784;
  border-radius: 10px;
  padding: 16px 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}
.speed-btn:hover {
  background: #F1F8F4;
  border-color: #4CAF50;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}
.speed-btn.active {
  background: #4CAF50;
  color: white;
  border-color: #388E3C;
  box-shadow: 0 4px 16px rgba(76,175,80,0.4);
}
.speed-icon { font-size: 32px; }
.speed-label { font-size: 14px; font-weight: 600; }
.speed-badge {
  position: absolute;
  top: -8px; right: -8px;
  background: #FF9800;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}
.speed-help { text-align: center; color: #2E7D32; font-size: 14px; margin: 0; font-style: italic; }
[data-theme="dark"] .speech-controls { background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%); border-color: #66BB6A; }
[data-theme="dark"] .control-label { color: #A5D6A7; }
[data-theme="dark"] .speed-btn { background: #2E7D32; border-color: #4CAF50; color: #E8F5E9; }
[data-theme="dark"] .speed-btn.active { background: #66BB6A; color: #1B5E20; }
[data-theme="dark"] .speed-help { color: #A5D6A7; }

/* ============================================================
   PERSONALIZATION / DEVICE-FILTER BANNERS
   ============================================================ */

/* Minimal device indicator — footnote style, zero visual weight */
.device-indicator,
.personalization-banner,
.device-profile-bar {
  font-size: 0.78rem;
  color: #888;
  padding: 0.25rem 0;
  margin: 0 0 0.75rem 0;
  background: none;
  border: none;
  border-left: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  line-height: 1.4;
}
.device-indicator .edit-btn,
.personalization-banner .edit-btn,
.device-profile-bar .edit-btn {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  background: none;
  color: #2C6FBF;
  border: 1px solid #2C6FBF;
  border-radius: 3px;
  cursor: pointer;
  min-height: 24px;
  text-decoration: underline;
}
.device-indicator-empty {
  font-style: italic;
}
[data-theme="dark"] .device-indicator,
[data-theme="dark"] .personalization-banner,
[data-theme="dark"] .device-profile-bar {
  color: #999;
}
[data-theme="dark"] .device-indicator .edit-btn,
[data-theme="dark"] .personalization-banner .edit-btn,
[data-theme="dark"] .device-profile-bar .edit-btn {
  color: #7fb3f5;
  border-color: #7fb3f5;
}

/* Keep large personalization card styles available for banner-content children */
.banner-content { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.banner-icon { font-size: 48px; margin: 0; line-height: 1; }
.banner-text { flex: 1; min-width: 200px; }
.banner-text strong { color: #E65100; font-size: 18px; display: block; margin-bottom: 4px; }
.banner-text p { color: #5D4037; margin: 0; font-size: 14px; }
.banner-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-personalize { background: #FF9800; color: white; border: none; padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.btn-personalize:hover { background: #F57C00; }
.btn-dismiss, .btn-show-all { background: transparent; color: #E65100; border: 2px solid #E65100; padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.btn-dismiss:hover, .btn-show-all:hover { background: #E65100; color: white; }
[data-theme="dark"] .banner-text strong { color: #FFCC80; }
[data-theme="dark"] .banner-text p { color: #BCAAA4; }
[data-theme="dark"] .btn-dismiss, [data-theme="dark"] .btn-show-all { color: #FFB74D; border-color: #FFB74D; }
[data-theme="dark"] .btn-dismiss:hover, [data-theme="dark"] .btn-show-all:hover { background: #FFB74D; color: #1E1E1E; }

/* ============================================================
   DYSLEXIC FONT TOGGLE
   ============================================================ */
@import url('https://cdn.jsdelivr.net/npm/opendyslexic@1.0.3/opendyslexic-regular.css');
body.dyslexic-font, body.dyslexic-font * { font-family: 'OpenDyslexic', Arial, sans-serif !important; }
.font-option { background: #E3F2FD; border: 2px solid #2196F3; border-radius: 8px; padding: 16px; margin: 16px 0; }
.toggle-label { display: flex; align-items: center; gap: 16px; cursor: pointer; user-select: none; }
.toggle-switch {
  width: 60px; height: 32px;
  background: #CFD8DC;
  border-radius: 16px;
  position: relative;
  transition: background 0.3s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 26px; height: 26px;
  background: white;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
/* Visually hidden (not display:none) so iOS Safari label taps still fire change events */
#dyslexic-font-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  pointer-events: none;
}
#dyslexic-font-toggle:checked + .toggle-switch { background: #4CAF50; }
#dyslexic-font-toggle:checked + .toggle-switch::after { transform: translateX(28px); }
.toggle-text { display: flex; flex-direction: column; gap: 4px; }
.toggle-text strong { color: #2C3E50; font-size: 16px; }
.toggle-text small { color: #546E7A; font-size: 13px; }
[data-theme="dark"] .font-option { background: #1E3A5F; border-color: #5DADE2; }
[data-theme="dark"] .toggle-switch { background: #455A64; }
[data-theme="dark"] .toggle-text strong { color: #E8E8E8; }
[data-theme="dark"] .toggle-text small { color: #B0BEC5; }

/* ============================================
   Visual Warmth — Phase 1 Polish
   Warm off-white body, amber card accents,
   cream story blocks, gradient sidebar header
   ============================================ */

/* Warm body background — light mode only */
[data-theme="light"] body {
  background-color: #FAFAF8;
}

/* Warm story blocks */
[data-theme="light"] .story-block {
  background: #FFFEF7;
  border-left-color: #E8B84B;
}

/* Warm confidence checks */
[data-theme="light"] .confidence-check {
  background: #FFFDF0;
}

[data-theme="light"] .confidence-check-box {
  background: #FFFDF0;
  border-color: #E8B84B;
}

/* Module card warm hover accent */
.module-card:hover {
  border-left: 4px solid #E8B84B;
  transform: translateY(-2px);
}

.module-card {
  transition: transform 0.15s ease, border-left 0.15s ease, box-shadow 0.15s ease;
  border-left: 4px solid transparent;
}

/* Sidebar header warm gradient */
[data-theme="light"] .sidebar-header {
  background: linear-gradient(135deg, #1565C0 0%, #283593 100%);
}

/* Warm tip block accent */
[data-theme="light"] .tip-block {
  background: #FFFBF0;
  border-left-color: #E8B84B;
}

/* Warm exercise block */
[data-theme="light"] .exercise-block {
  background: #F8FDF8;
}

/* Warm welcome hero on index */
[data-theme="light"] .welcome-hero {
  background: linear-gradient(135deg, #E3F2FD 0%, #FFF8E1 100%);
}

/* Dark mode: warmth disabled — keep cool tones */
[data-theme="dark"] .story-block,
[data-theme="dark"] .confidence-check,
[data-theme="dark"] .confidence-check-box,
[data-theme="dark"] .tip-block,
[data-theme="dark"] .exercise-block {
  /* dark mode styles unchanged — cool dark palettes preserved */
}

/* Demographics form styles */
.demographics-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.demographics-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-xl);
  margin-top: var(--spacing-lg);
}

.demo-field {
  margin-bottom: var(--spacing-lg);
}

.demo-field label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  font-size: 1.05rem;
}

.demo-field select,
.demo-field textarea,
.demo-field input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg-primary);
  color: var(--text-primary);
  box-sizing: border-box;
}

.demo-field select:focus,
.demo-field textarea:focus,
.demo-field input[type="text"]:focus {
  outline: 3px solid var(--accent-primary);
  border-color: var(--accent-primary);
}

.demo-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-checkbox-group label {
  font-weight: normal;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.demo-checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.demo-radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.demo-radio-group label {
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 14px;
  border: 2px solid var(--border-color);
  border-radius: 20px;
  background: var(--bg-secondary);
  transition: border-color 0.15s, background 0.15s;
}

.demo-radio-group input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.demo-radio-group label:has(input:checked) {
  border-color: var(--accent-primary);
  background: var(--bg-card);
  color: var(--accent-primary);
  font-weight: 600;
}

.demo-actions {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
  flex-wrap: wrap;
}

.demo-success-message {
  display: none;
  text-align: center;
  padding: var(--spacing-xl);
  background: #E8F5E9;
  border-radius: var(--radius-md);
  border: 2px solid #4CAF50;
  color: #2d7a2d;
  font-size: 1.1rem;
}

.demo-success-message.visible { display: block; }

.demo-privacy-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-primary);
}

[data-theme="dark"] .demo-success-message {
  background: #1B3A2E;
  border-color: #4CAF50;
  color: #81C784;
}

/* ── Inline per-instance speed controls ─────────────────────── */
.listen-controls-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.speed-controls-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #F0F4F8;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid #CFD8DC;
  flex-wrap: wrap;
}

.speed-label {
  font-size: 11px;
  font-weight: 600;
  color: #546E7A;
  margin-right: 2px;
  white-space: nowrap;
}

.speed-btn-inline {
  background: transparent;
  border: none;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #546E7A;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.15s;
  min-width: 34px;
  line-height: 1.4;
}

.speed-btn-inline:hover {
  background: #E0E7EF;
  color: #1565C0;
}

.speed-btn-inline.active {
  background: #1565C0;
  color: #FFFFFF;
  box-shadow: 0 1px 4px rgba(21, 101, 192, 0.35);
}

[data-theme="dark"] .speed-controls-inline {
  background: #1E2D3D;
  border-color: #37474F;
}

[data-theme="dark"] .speed-label {
  color: #90A4AE;
}

[data-theme="dark"] .speed-btn-inline {
  color: #90A4AE;
}

[data-theme="dark"] .speed-btn-inline:hover {
  background: #263238;
  color: #90CAF9;
}

[data-theme="dark"] .speed-btn-inline.active {
  background: #1565C0;
  color: #FFFFFF;
}

@media (max-width: 480px) {
  .speed-controls-inline {
    gap: 2px;
    padding: 4px 8px;
  }
  .speed-btn-inline {
    font-size: 10px;
    padding: 2px 6px;
    min-width: 28px;
  }
}

/* ---- Podcast Platform Badges ---- */
.podcast-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 6px;
}

.podcast-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}

.podcast-platform-badge:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  text-decoration: none;
}

.podcast-platform-badge.badge-apple {
  background: linear-gradient(135deg, #9B1FDC, #C05AF3);
  color: #ffffff;
}

.podcast-platform-badge.badge-spotify {
  background: #1DB954;
  color: #ffffff;
}

.podcast-platform-badge.badge-youtube {
  background: #FF0000;
  color: #ffffff;
}

.podcast-platform-note {
  margin: 4px 0 10px;
  color: #546E7A;
  font-size: 13px;
  line-height: 1.4;
}

[data-theme="dark"] .podcast-platform-note {
  color: #90A4AE;
}

[data-theme="dark"] .podcast-platform-badge.badge-apple {
  background: linear-gradient(135deg, #7B10B8, #A040D0);
}

[data-theme="dark"] .podcast-platform-badge.badge-spotify {
  background: #17A844;
}

[data-theme="dark"] .podcast-platform-badge.badge-youtube {
  background: #CC0000;
}

@media (max-width: 480px) {
  .podcast-platforms {
    gap: 6px;
  }
  .podcast-platform-badge {
    font-size: 12px;
    padding: 5px 11px;
  }
}

/* ---- Resource Card Enhancements ---- */
.resource-contact {
  background: #F5F7FA;
  padding: 14px 16px;
  border-radius: 8px;
  margin: 12px 0;
  border-left: 3px solid #2196F3;
}

.resource-contact p {
  margin: 6px 0;
  font-size: 15px;
  line-height: 1.5;
}

.resource-contact a {
  color: #1565C0;
  text-decoration: none;
  font-weight: 600;
}

.resource-contact a:hover {
  text-decoration: underline;
}

.resource-availability {
  font-size: 13px;
  color: #78909C;
  margin: 4px 0 10px;
  line-height: 1.4;
}

/* ---- Resource Guidance Box ---- */
.resource-guidance {
  background: #FFF9E6;
  border: 2px solid #F1C40F;
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0 24px;
}

.resource-guidance h3 {
  color: #E67E22;
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 20px;
}

.resource-guidance p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.resource-guidance ul {
  margin: 10px 0 16px 20px;
  line-height: 1.8;
}

.resource-guidance li {
  margin-bottom: 10px;
}

.resource-guidance a {
  color: #1565C0;
  font-weight: 600;
}

.resource-guidance-tip {
  background: white;
  padding: 14px 16px;
  border-radius: 8px;
  border-left: 4px solid #2196F3;
  margin-top: 16px !important;
  font-size: 15px;
}

[data-theme="dark"] .resource-contact {
  background: #1E2D3D;
  border-left-color: #42A5F5;
}

[data-theme="dark"] .resource-contact a {
  color: #90CAF9;
}

[data-theme="dark"] .resource-availability {
  color: #90A4AE;
}

[data-theme="dark"] .resource-guidance {
  background: #2A2200;
  border-color: #E67E22;
}

[data-theme="dark"] .resource-guidance h3 {
  color: #FFA726;
}

[data-theme="dark"] .resource-guidance a {
  color: #90CAF9;
}

[data-theme="dark"] .resource-guidance-tip {
  background: #1A2633;
  border-left-color: #42A5F5;
}

/* ================================================================
   FEEDBACK MODAL (feedback-github.js)
   ================================================================ */

/* Unified "Ideas & Feedback" button — bottom-right */
.dc-unified-feedback-btn {
  position: fixed !important;
  bottom: 80px !important;
  right: 16px !important;
  left: auto !important;
  background: linear-gradient(135deg, #1565C0, #1976D2);
  color: #fff;
  border: none;
  border-radius: 28px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(21, 101, 192, 0.45);
  display: flex;
  align-items: center;
  gap: 9px;
  transition: all 0.2s;
  z-index: 999996;
}
.dc-unified-feedback-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(21, 101, 192, 0.55);
}

.dc-fab-icon { font-size: 20px; }
.dc-fab-label { white-space: nowrap; }

/* Feedback modal overlay */
.dc-feedback-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.dc-modal-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: -1;
}

.dc-modal-content {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 28px 28px 24px;
  max-width: 580px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

.dc-modal-close {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  float: right;
  background: #f0f0f0;
  border: 1px solid #cccccc;
  border-radius: 20px;
  color: #333333;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.3rem 1rem;
  min-height: 44px;
  margin-bottom: 10px;
  z-index: 10;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.dc-modal-close:hover { background: #e0e0e0; color: #333333; border-color: #999999; }
[data-theme="dark"] .dc-modal-close { background: #333; color: #eee; border-color: #555; }

.dc-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #1A237E;
  margin: 0 0 6px;
  clear: both;
}

.dc-modal-subtitle {
  color: #546E7A;
  font-size: 14px;
  margin: 0 0 18px;
}

/* Fields */
.dc-feedback-field { margin-bottom: 18px; }
.dc-feedback-label {
  display: block;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  color: #2C3E50;
}
.dc-optional { font-weight: 400; color: #78909C; font-size: 13px; }

.dc-feedback-input,
.dc-feedback-textarea,
.dc-feedback-select {
  width: 100%;
  border: 2px solid #CFD8DC;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.dc-feedback-input:focus,
.dc-feedback-textarea:focus,
.dc-feedback-select:focus {
  outline: none;
  border-color: #1565C0;
  box-shadow: 0 0 0 3px rgba(21,101,192,0.15);
}
.dc-field-help { font-size: 12px; color: #90A4AE; margin: 5px 0 0; }

/* Feedback type radio buttons */
.dc-feedback-types { display: flex; flex-direction: column; gap: 8px; }
.dc-type-option {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
}
.dc-type-option input[type="radio"] { position: absolute; opacity: 0; width: 0; }
.dc-type-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid #E0E7EF;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
  background: #FAFBFC;
}
.dc-type-option input:checked + .dc-type-label {
  border-color: #1565C0;
  background: #E8F0FE;
}
.dc-type-option:hover .dc-type-label { border-color: #90A4AE; }
.dc-type-icon { font-size: 22px; flex-shrink: 0; }
.dc-type-text { font-weight: 600; font-size: 15px; flex: 1; }
.dc-type-help { font-size: 12px; color: #78909C; white-space: nowrap; }

/* Actions */
.dc-feedback-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.dc-btn-submit {
  background: #1565C0;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.dc-btn-submit:hover { background: #0D47A1; }
.dc-btn-submit:disabled { background: #90A4AE; cursor: not-allowed; }
.dc-btn-cancel {
  background: transparent;
  color: #546E7A;
  border: 2px solid #CFD8DC;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.dc-btn-cancel:hover { background: #F5F7FA; color: #2C3E50; }

/* Success & Error states */
.dc-feedback-success,
.dc-feedback-error {
  text-align: center;
  padding: 32px 20px;
}
.dc-success-icon, .dc-error-icon { font-size: 52px; margin-bottom: 16px; }
.dc-feedback-success h3 { color: #2E7D32; font-size: 24px; margin-bottom: 10px; }
.dc-feedback-error h3 { color: #E67E22; font-size: 22px; margin-bottom: 10px; }
.dc-reference-num { color: #546E7A; font-size: 14px; margin: 8px 0 20px; }

/* Dark mode — feedback */
[data-theme="dark"] .dc-modal-content {
  background: #1E2D3D;
  color: #E8EAF0;
}
[data-theme="dark"] .dc-modal-title { color: #90CAF9; }
[data-theme="dark"] .dc-modal-subtitle { color: #90A4AE; }
[data-theme="dark"] .dc-feedback-label { color: #CFD8DC; }
[data-theme="dark"] .dc-feedback-input,
[data-theme="dark"] .dc-feedback-textarea,
[data-theme="dark"] .dc-feedback-select {
  background: #263238; border-color: #37474F; color: #E8EAF0;
}
[data-theme="dark"] .dc-type-label { background: #263238; border-color: #37474F; }
[data-theme="dark"] .dc-type-option input:checked + .dc-type-label {
  background: #1A2F4A; border-color: #42A5F5;
}
[data-theme="dark"] .dc-type-text { color: #E8EAF0; }
[data-theme="dark"] .dc-unified-feedback-btn { background: linear-gradient(135deg, #0D47A1, #1565C0); }

/* Mobile — feedback */
@media (max-width: 600px) {
  .dc-unified-feedback-btn {
    position: fixed !important;
    bottom: 80px !important;
    right: 16px !important;
    left: auto !important;
    width: 56px; height: 56px;
    border-radius: 50%; padding: 0;
    justify-content: center;
  }
  .dc-unified-feedback-btn .dc-fab-label { display: none; }
  /* Show micro-label below bubble on mobile */
  .dc-unified-feedback-btn .dc-fab-mobile-label {
    display: block;
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #1565C0;
    white-space: nowrap;
    letter-spacing: 0.03em;
  }
  .dc-modal-content { padding: 20px 16px 18px; max-height: 95vh; max-width: calc(100vw - 32px); width: 100%; }
  .dc-type-help { display: none; }
  .dc-feedback-actions { flex-direction: column; }
  .dc-btn-submit, .dc-btn-cancel { width: 100%; text-align: center; }
}

/* High-zoom / high-DPI */
@media (min-resolution: 144dpi) {
  .dc-modal-content { max-height: 88vh; }
}

/* ================================================================
   SCAM PANIC BUTTON (panic-button.js)
   ================================================================ */

/* Scam panic banner — inside sidebar, below Scam Simulator link */
.dc-sidebar-panic-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 16px);
  margin: 6px 8px 4px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #C62828, #E53935);
  color: #fff;
  border: 2px solid #FFEB3B;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(198, 40, 40, 0.5);
  text-align: left;
  line-height: 1.3;
  animation: dc-pulse 2.2s ease-in-out infinite;
}
.dc-sidebar-panic-banner:hover {
  animation: none;
  transform: scale(1.02);
  box-shadow: 0 5px 16px rgba(198,40,40,0.7);
}
@keyframes dc-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 3px 10px rgba(198,40,40,0.5); }
  50%       { transform: scale(1.03); box-shadow: 0 5px 16px rgba(198,40,40,0.65); }
}
.dc-panic-icon {
  font-size: 20px;
  flex-shrink: 0;
  display: inline-block;
  animation: dc-shake 0.6s ease-in-out infinite;
}
@keyframes dc-shake {
  0%, 100% { transform: rotate(0deg); }
  25%       { transform: rotate(-6deg); }
  75%       { transform: rotate(6deg); }
}
.dc-sidebar-panic-text {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

/* Scam modal */
.dc-scam-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1000000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.dc-scam-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.82);
  z-index: -1;
}
.dc-scam-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  max-width: 760px;
  width: 100%;
  margin: 24px auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.dc-scam-close {
  position: absolute;
  top: 12px; right: 12px;
  background: #f0f0f0; border: 1px solid #ccc; border-radius: 20px;
  color: #333; font-size: 0.9rem; font-weight: 600;
  padding: 0.3rem 1rem; min-height: 44px;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.dc-scam-close:hover { background: #e0e0e0; border-color: #999; }
[data-theme="dark"] .dc-scam-close { background: #333; color: #eee; border-color: #555; }

.dc-scam-title {
  color: #B71C1C;
  font-size: 26px;
  margin: 0 0 24px;
  text-align: center;
  padding-right: 50px;
}

.dc-scam-step {
  display: flex;
  gap: 18px;
  background: #F5F5F5;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px;
  border-left: 5px solid #1565C0;
  align-items: flex-start;
}
.dc-scam-step.dc-step-urgent {
  background: #FFEBEE;
  border-left-color: #C62828;
}
.dc-step-num {
  flex-shrink: 0;
  width: 48px; height: 48px;
  background: #1565C0; color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
}
.dc-scam-step.dc-step-urgent .dc-step-num { background: #C62828; }
.dc-step-body { flex: 1; }
.dc-step-body h3 { font-size: 19px; color: #1A237E; margin: 0 0 10px; }
.dc-step-body p  { margin: 0 0 8px; line-height: 1.6; font-size: 16px; }
.dc-step-body ul { margin: 8px 0 0 20px; line-height: 1.8; }
.dc-urgent-action {
  background: #fff;
  border-left: 4px solid #C62828;
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  color: #B71C1C;
  margin: 10px 0;
}
.dc-contact-block {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 10px 0;
  line-height: 1.8;
}
.dc-contact-block a { color: #1565C0; font-weight: 600; }

.dc-scam-footer { margin-top: 20px; text-align: center; }
.dc-reassurance {
  background: #E8F5E9;
  border-radius: 8px;
  padding: 16px;
  color: #1B5E20;
  font-size: 17px;
  margin-bottom: 18px;
}
.dc-scam-close-btn {
  background: #1565C0; color: #fff;
  border: none; border-radius: 10px;
  padding: 16px 40px; font-size: 18px; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
}
.dc-scam-close-btn:hover { background: #0D47A1; }

/* Dark mode — scam */
[data-theme="dark"] .dc-scam-content { background: #1A1A2E; color: #E8EAF0; }
[data-theme="dark"] .dc-scam-title   { color: #EF9A9A; }
[data-theme="dark"] .dc-step-body h3 { color: #90CAF9; }
[data-theme="dark"] .dc-scam-step    { background: #1E2D3D; }
[data-theme="dark"] .dc-scam-step.dc-step-urgent { background: #2D1515; }
[data-theme="dark"] .dc-urgent-action { background: #2D1515; color: #EF9A9A; }
[data-theme="dark"] .dc-contact-block { background: #263238; }
[data-theme="dark"] .dc-contact-block a { color: #90CAF9; }
[data-theme="dark"] .dc-reassurance { background: #1B3320; color: #A5D6A7; }

/* Mobile — scam modal */
@media (max-width: 600px) {
  .dc-scam-content { padding: 20px 16px; margin: 12px auto; max-width: calc(100vw - 32px); width: 100%; }
  .dc-scam-title  { font-size: 20px; }
  .dc-scam-step   { flex-direction: column; gap: 10px; }
  .dc-step-num    { width: 40px; height: 40px; font-size: 18px; }
}

/* ============================================
   Location Prompt Banner (resources.html)
   ============================================ */
.lp-banner {
  background: linear-gradient(135deg, #EBF5FB 0%, #EAF4FF 100%);
  border: 2px solid #3498DB;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  padding: 32px 28px;
}
.lp-inner { text-align: center; max-width: 600px; margin: 0 auto; }
.lp-icon  { font-size: 2.4rem; margin-bottom: 12px; }
.lp-heading {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: 0 0 10px;
}
.lp-subtext {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 0 24px;
  line-height: 1.5;
}
.lp-city-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}
.lp-city-btn {
  background: #fff;
  border: 2px solid #3498DB;
  border-radius: var(--radius-md);
  color: #1565C0;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  min-width: 130px;
  padding: 14px 18px;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.lp-city-btn:hover {
  background: #3498DB;
  color: #fff;
  transform: translateY(-1px);
}
.lp-city-btn:focus {
  background: #3498DB;
  color: #fff;
  outline: 3px solid #005FCC;
  outline-offset: 2px;
  transform: translateY(-1px);
}
.lp-city-btn:active { transform: translateY(0); }

.lp-or-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 8px;
}
.lp-ontario-btn {
  background: none;
  border: none;
  color: var(--accent-primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 4px 0;
  text-decoration: underline;
}
.lp-ontario-btn:hover { color: var(--accent-hover); }

/* Change Location strip */
.lp-change-wrap {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.lp-city-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}
.lp-change-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 16px;
  transition: background 0.15s;
}
.lp-change-btn:hover { background: #D6EAF8; }

/* Dark mode */
[data-theme="dark"] .lp-banner {
  background: linear-gradient(135deg, #1A2A3A 0%, #1C2E40 100%);
  border-color: #5DADE2;
}
[data-theme="dark"] .lp-city-btn {
  background: #1E2D3D;
  border-color: #5DADE2;
  color: #90CAF9;
}
[data-theme="dark"] .lp-city-btn:hover,
[data-theme="dark"] .lp-city-btn:focus {
  background: #2471A3;
  color: #fff;
}
[data-theme="dark"] .lp-change-wrap { background: transparent; }
[data-theme="dark"] .lp-change-btn  { background: #1E2D3D; border-color: #4A6278; }
[data-theme="dark"] .lp-change-btn:hover { background: #2C3E50; }

/* Mobile */
@media (max-width: 600px) {
  .lp-banner   { padding: 24px 16px; }
  .lp-city-btn { min-width: 110px; font-size: 1rem; padding: 12px 12px; }
  .lp-heading  { font-size: 1.3rem; }
}

/* ============================================
   Setup Wizard — Reading Comfort Step
   ============================================ */
.reading-options {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.reading-option {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
  max-width: 240px;
  padding: 20px 16px;
  text-align: center;
}
.reading-sample {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  line-height: 1.6;
  padding: 12px 14px;
  width: 100%;
  text-align: left;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.dyslexic-preview {
  font-family: OpenDyslexic, sans-serif;
}

/* Dark mode */
[data-theme="dark"] .reading-sample {
  background: #1E2D3D;
  border-color: #4A6278;
  color: #E8EAF0;
}

/* Mobile */
@media (max-width: 600px) {
  .reading-options { flex-direction: column; }
  .reading-option  { max-width: 100%; width: 100%; }
}

/* ── Email Capture Banner (Phase 5) ── */
.email-invite-box {
  background: #f0f7ff;
  border: 1px solid #c0d8f0;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}
.email-invite-headline { font-size: 1.3rem; font-weight: bold; margin-bottom: 0.5rem; }
.email-invite-body { margin-bottom: 1rem; line-height: 1.6; }
.email-invite-form {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.75rem; margin-bottom: 0.75rem;
}
.email-invite-form input[type="email"] {
  width: 100%; max-width: 360px; padding: 0.75rem 1rem;
  font-size: 1rem; border: 2px solid #aaa; border-radius: 8px; min-height: 44px;
}
.email-invite-btn {
  background: #2C6FBF; color: white; border: none;
  padding: 0.75rem 1.5rem; border-radius: 8px; font-size: 1rem;
  cursor: pointer; min-height: 44px;
}
.email-invite-btn:hover { background: #1a5299; }
.email-invite-dismiss {
  background: none; border: none; color: #666; font-size: 0.9rem;
  cursor: pointer; text-decoration: underline; min-height: 44px;
}
[data-theme="dark"] .email-invite-box {
  background: #1a2a3a; border-color: #2a4a6a; color: #e0e0e0;
}
[data-theme="dark"] .email-invite-dismiss { color: #aaa; }

/* ── Trust Signals (Phase 7) ── */
.trust-signals { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 2rem 0; }
.trust-item {
  flex: 1 1 200px; background: #f9f9f9; border-radius: 10px;
  padding: 1.25rem; line-height: 1.6;
}
[data-theme="dark"] .trust-item { background: #2a2a2a; }

/* ── Module Intro Block (Phase 8) ── */
.module-intro { margin-bottom: 2rem; }
.module-time { font-size: 0.95rem; color: #666; margin-bottom: 1rem; }
[data-theme="dark"] .module-time { color: #aaa; }

@media print {
  .email-invite-box { display: none; }
  .trust-signals { display: none; }
}

/* ── Standard Footer Inner Layout (Phase 9 — footer standardisation) ── */
.footer-inner {
  max-width: 800px;
  margin: 0 auto;
}
.footer-brand {
  font-weight: bold;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.footer-support {
  font-size: 0.9rem;
  margin: 0.75rem 0 0.5rem;
}
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
[data-theme="dark"] .footer-brand { color: #e0e0e0; }
[data-theme="dark"] .footer-tagline { color: #aaa; }
[data-theme="dark"] .footer-support { color: #ccc; }
[data-theme="dark"] .footer-copy { color: #888; }
[data-theme="dark"] .footer-links a { color: #90CAF9; }
[data-theme="dark"] .site-footer { border-color: #333; }

/* ── Email Invite Dark Mode (input + button) ── */
[data-theme="dark"] .email-invite-form input[type="email"] {
  background: #1e1e1e; border-color: #4a6278; color: #e0e0e0;
}
[data-theme="dark"] .email-invite-btn {
  background: #1a5299;
}
[data-theme="dark"] .email-invite-headline { color: #e0e0e0; }

/* ── App Comparison Cards (Module 8 — Sprint 8) ── */
.app-comparison {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}
.app-card {
  background: #f9f9f9;
  border-left: 4px solid #2C6FBF;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  line-height: 1.7;
}
.app-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}
.app-card p {
  margin: 0.4rem 0;
}
[data-theme="dark"] .app-card {
  background: #1e2a38;
  border-color: #4a90d9;
}

/* ================================================================
   GLOSSARY PAGE STYLES
   digital-literacy-101.html
   ================================================================ */

/* Breadcrumb */
.breadcrumb ol {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-secondary, #666);
}
.breadcrumb li:not(:last-child)::after {
  content: " ›";
  margin-left: 0.4rem;
}
.breadcrumb a {
  color: var(--accent-color, #1565C0);
}

/* Language toggle */
.glossary-lang-toggle {
  display: flex;
  gap: 0.5rem;
  margin: 1.2rem 0 1rem;
  flex-wrap: wrap;
}
.lang-btn {
  padding: 0.45rem 1.3rem;
  border: 2px solid var(--accent-color, #1565C0);
  border-radius: 6px;
  background: transparent;
  color: var(--accent-color, #1565C0);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang-btn.active,
.lang-btn:hover {
  background: var(--accent-color, #1565C0);
  color: #fff;
}

/* Search bar */
.glossary-search-wrap {
  margin: 0.5rem 0 1rem;
}
.glossary-search-wrap label {
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
#glossary-search {
  width: 100%;
  max-width: 560px;
  padding: 0.8rem 1rem;
  font-size: 1.05rem;
  border: 2px solid var(--border-color, #c5cae9);
  border-radius: 8px;
  background: var(--bg-secondary, #f5f5f5);
  color: var(--text-primary, #222);
  display: block;
}
#glossary-search:focus {
  outline: 3px solid var(--accent-color, #1565C0);
  border-color: var(--accent-color, #1565C0);
}

/* Did You Mean */
#did-you-mean {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-secondary, #555);
}
#did-you-mean strong {
  margin-right: 0.3rem;
}
.dym-suggestion {
  background: none;
  border: 1px solid var(--accent-color, #1565C0);
  border-radius: 4px;
  color: var(--accent-color, #1565C0);
  padding: 0.2rem 0.6rem;
  font-size: 0.92rem;
  cursor: pointer;
  margin-right: 0.4rem;
  margin-top: 0.3rem;
}
.dym-suggestion:hover {
  background: var(--accent-color, #1565C0);
  color: #fff;
}

/* Category filter buttons */
.glossary-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 1.2rem;
}
.cat-btn {
  padding: 0.4rem 0.85rem;
  border: 2px solid var(--border-color, #c5cae9);
  border-radius: 20px;
  background: transparent;
  color: var(--text-primary, #222);
  cursor: pointer;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.cat-btn.active,
.cat-btn:hover {
  background: var(--accent-color, #1565C0);
  color: #fff;
  border-color: var(--accent-color, #1565C0);
}

/* Result count */
.glossary-result-count {
  font-size: 0.88rem;
  color: var(--text-secondary, #666);
  margin: 0 0 0.8rem;
  min-height: 1.2em;
}

/* Category section headings */
.glossary-category-section {
  margin-bottom: 2.5rem;
}
.glossary-category-heading {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent-color, #1565C0);
  color: var(--text-primary, #111);
}

/* Individual glossary entry card */
.glossary-entry {
  background: var(--bg-secondary, #f9f9f9);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 0.9rem;
  scroll-margin-top: 80px;
}
.glossary-entry h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: var(--accent-color, #1565C0);
}
.entry-plain {
  margin: 0 0 0.45rem;
  line-height: 1.55;
}
.entry-analogy {
  font-style: italic;
  color: var(--text-secondary, #555);
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  line-height: 1.5;
}
.entry-example {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  line-height: 1.5;
}
.entry-safety {
  background: #fff8e1;
  border-left: 4px solid #f9a825;
  padding: 0.5rem 0.8rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
  margin: 0.5rem 0 0.3rem;
  line-height: 1.5;
}
.entry-module-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--accent-color, #1565C0);
}

/* No-results block */
#glossary-no-results {
  padding: 1rem;
  font-size: 1rem;
}

/* Link button (inline) */
.link-btn {
  background: none;
  border: none;
  color: var(--accent-color, #1565C0);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
}

/* Admin analytics panel */
.glossary-admin-panel {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-primary, #fff);
  border: 2px solid #1565C0;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  max-height: 420px;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.glossary-admin-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.glossary-admin-panel td,
.glossary-admin-panel th {
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--border-color, #eee);
  text-align: left;
}
.glossary-admin-panel th {
  font-weight: 700;
  background: var(--bg-secondary, #f5f5f5);
}

/* Screen-reader-only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Dark mode overrides */
[data-theme="dark"] .glossary-entry {
  background: #1e2a38;
  border-color: #3a4e66;
}
[data-theme="dark"] .entry-safety {
  background: #2a2000;
  border-left-color: #f9a825;
}
[data-theme="dark"] .glossary-admin-panel {
  background: #1a1a2e;
  border-color: #4a90d9;
}
[data-theme="dark"] .dym-suggestion {
  border-color: #4a90d9;
  color: #4a90d9;
}
[data-theme="dark"] .dym-suggestion:hover {
  background: #4a90d9;
  color: #fff;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .glossary-category-nav { gap: 0.35rem; }
  .cat-btn { font-size: 0.8rem; padding: 0.35rem 0.65rem; }
  .glossary-entry { padding: 0.9rem 1rem; }
  .glossary-admin-panel { position: static; }
}

/* Font-size scaling for glossary entries */
[data-font-size="large"] .glossary-entry h3 { font-size: 1.25rem; }
[data-font-size="xl"]    .glossary-entry h3 { font-size: 1.4rem; }
[data-font-size="large"] .entry-plain,
[data-font-size="large"] .entry-example { font-size: 1.05rem; }
[data-font-size="xl"]    .entry-plain,
[data-font-size="xl"]    .entry-example { font-size: 1.15rem; }

/* Module-to-glossary cross-links */
.glossary-link {
  color: inherit;
  border-bottom: 1px dotted currentColor;
  text-decoration: none;
}
.glossary-link:hover {
  text-decoration: underline;
}

/* ── Card Status Badges ────────────────────────────────── */
.card-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--spacing-xs);
}
.badge-new      { background: var(--navy-light, #dce8f8); color: #1565C0; }   /* 5.7:1 ✓ */
.badge-updated  { background: #fff3e0; color: #7A5800; }                       /* 6.3:1 ✓ */
.badge-complete { background: #e8f5e9; color: #155724; }                       /* 7.8:1 ✓ */

[data-theme="dark"] .badge-new      { background: rgba(52,152,219,0.2); color: #5DADE2; }
[data-theme="dark"] .badge-updated  { background: rgba(243,156,18,0.2); color: #F7DC6F; }
[data-theme="dark"] .badge-complete { background: rgba(39,174,96,0.2); color: #58D68D; }

/* ── WCAG AA Label Contrast Overrides ──────────────────── */
/* Accent colours used as text on their matching light-coloured backgrounds
   fail WCAG AA. These overrides use accessible dark variants (4.5:1+). */
.warning-block .warning-label  { color: #7A5800; }  /* 6.3:1 on #FEF9E7 ✓ */
.danger-block .danger-label    { color: #A93226; }  /* 6.4:1 on #FDEDEC ✓ */
.confidence-check p            { color: #155724; }  /* 7.8:1 on #E8F8F5 ✓ */
.tip-block .tip-label          { color: #0D47A1; }  /* 8.1:1 on #EBF5FB ✓ */
/* Dark mode already compliant — no overrides needed */
[data-theme="dark"] .warning-block .warning-label { color: var(--accent-warning); }
[data-theme="dark"] .danger-block .danger-label   { color: var(--accent-danger);  }
[data-theme="dark"] .confidence-check p           { color: var(--accent-success); }
[data-theme="dark"] .tip-block .tip-label         { color: var(--accent-primary); }

/* ── Scroll Progress Indicator ─────────────────────────── */
#dc-scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  width: 3px;
  height: 0%;
  background: #00C9A7;
  z-index: 9999;
  pointer-events: none;
  transition: height 0.05s linear;
}

@media (max-width: 768px) {
  #dc-scroll-progress { width: 2px; }
}

/* ── Breadcrumb Navigation ─────────────────────────────── */
.breadcrumb-nav {
  padding: var(--spacing-xs) 0 0;
  margin-bottom: 0.5rem;
}
.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.breadcrumb li + li::before { content: '›'; margin-right: 0.2rem; opacity: 0.6; }
.breadcrumb a { color: var(--accent-primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text-secondary); }

/* ── Dyslexic Font Bar Button ──────────────────────────── */
.a11y-btn.dyslexic-font-btn { font-size: 1.1rem; }
.a11y-btn.dyslexic-font-btn.active { background: var(--accent-primary); color: #fff; border-color: var(--accent-primary); }

/* ── Module 2.5: Everyday Digital Tasks ────────────────── */
.file-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.file-type-card {
  background: #E3F2FD;
  padding: 20px 16px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #BBDEFB;
}
.file-type-card h4 {
  color: #1565C0;
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.file-type-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.file-type-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 10px;
}
.step-by-step {
  background: #F5F7FA;
  padding: 20px 24px;
  border-radius: 12px;
  margin: 20px 0;
  border-left: 4px solid var(--accent-primary);
}
.step-by-step h4 {
  margin: 0 0 12px;
  color: var(--accent-primary);
}
.step-by-step ol {
  padding-left: 24px;
  margin: 0;
}
.step-by-step li {
  font-size: 1rem;
  line-height: 1.8;
  margin: 8px 0;
  padding-left: 4px;
}
.platform-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  border-bottom: 2px solid #E1E8ED;
  flex-wrap: wrap;
}
.platform-tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -2px;
}
.platform-tab:hover { color: var(--accent-primary); }
.platform-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}
.platform-content { display: none; }
.platform-content.active { display: block; }
.scenario-card {
  background: #E8F5E9;
  border: 1px solid #A5D6A7;
  border-radius: 10px;
  padding: 20px 24px;
  margin: 20px 0;
}
.scenario-card h4 { color: #2E7D32; margin: 0 0 10px; }
.scenario-card .scenario-goal { font-weight: 600; margin-bottom: 6px; }
.scenario-card .scenario-success { color: #388E3C; font-style: italic; }
[data-theme="dark"] .file-type-card {
  background: #1A237E22;
  border-color: #3949AB44;
}
[data-theme="dark"] .file-type-card h4 { color: #90CAF9; }
[data-theme="dark"] .step-by-step { background: #2A2A2A; }
[data-theme="dark"] .scenario-card {
  background: #1B5E2022;
  border-color: #388E3C44;
}
[data-theme="dark"] .scenario-card h4 { color: #A5D6A7; }
[data-theme="dark"] .scenario-card .scenario-success { color: #81C784; }

/* ── Content Freshness Badges (Phase 8A) ── */
.dc-freshness-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  vertical-align: middle;
}
.dc-badge-verified { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.dc-badge-aging    { background: #FFF8E1; color: #6B4500; border: 1px solid #FFE082; }  /* 8.2:1 ✓ */
.dc-badge-stale    { background: #FFF3E0; color: #7B2D00; border: 1px solid #FFCC02; }  /* 9.4:1 ✓ */

/* ================================================================
   HOME BUTTON IN TOP BAR (accessibility.js — initTopBarHome)
   Simple text link, no pill shape, consistent with nav styling
   ================================================================ */
.top-bar-home {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.15s;
}
.top-bar-home:hover { color: var(--accent, #1565C0); text-decoration: none; }
.top-bar-home-label { font-size: 0.85rem; }
[data-theme="dark"] .top-bar-home { color: var(--text-primary); }

/* Note: dc-unified-feedback-btn is position: fixed !important on all screen sizes */

/* ============================================
   Sponsor Card — Phase 6A
   ============================================ */

.dc-sponsor-card {
  background: #f5f7fa;
  border: 1px solid #CFD8DC;
  border-radius: 12px;
  padding: 20px;
  margin: 32px 0 24px;
}

.dc-sponsor-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1565C0;
  background: #E3F2FD;
  border: 1px solid #BBDEFB;
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 12px;
}

.dc-sponsor-body {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dc-sponsor-logo-placeholder {
  font-size: 48px;
  line-height: 1;
  flex-shrink: 0;
  width: 56px;
  text-align: center;
}

.dc-sponsor-info {
  flex: 1;
  min-width: 160px;
}

.dc-sponsor-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dc-sponsor-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.dc-sponsor-cta {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent-primary);
  color: #FFFFFF !important;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.dc-sponsor-cta:hover,
.dc-sponsor-cta:focus {
  background: var(--accent-hover);
  color: #FFFFFF !important;
}

.dc-sponsor-disclosure {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid #E0E0E0;
  padding-top: 8px;
}

/* Responsive: stack on small screens */
@media (max-width: 480px) {
  .dc-sponsor-body {
    flex-direction: column;
    align-items: flex-start;
  }
  .dc-sponsor-cta {
    width: 100%;
    text-align: center;
  }
}

/* Dark mode */
[data-theme="dark"] .dc-sponsor-card {
  background: #252525;
  border-color: #3A3A3A;
}

[data-theme="dark"] .dc-sponsor-badge {
  background: #1A2E45;
  border-color: #1E3A5F;
  color: #64B5F6;
}

[data-theme="dark"] .dc-sponsor-disclosure {
  border-top-color: #3A3A3A;
  color: #9E9E9E;
}

/* ============================================
   Analytics Consent Banner — Phase 6C
   ============================================ */

#dc-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999990; /* Below feedback button (999996) and modals */
  background: #FFFFFF;
  border-top: 3px solid var(--accent-primary);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  padding: 0;
}

.dc-consent-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.dc-consent-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0;
  min-width: 200px;
}

.dc-consent-learn {
  color: var(--accent-primary);
  text-decoration: underline;
  white-space: nowrap;
}

.dc-consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.dc-consent-btn-ok {
  padding: 12px 28px;
  background: var(--accent-primary);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  transition: background 0.2s ease;
}

.dc-consent-btn-ok:hover,
.dc-consent-btn-ok:focus {
  background: var(--accent-hover);
  outline: 3px solid #FFD700;
  outline-offset: 2px;
}

#dc-consent-banner .dc-consent-btn-no {
  background: none;
  border: 1px solid #ccc;
  color: #666;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
}
#dc-consent-banner .dc-consent-btn-no:hover {
  border-color: #999;
  color: #333;
}

/* On mobile: full-width banner, larger touch targets */
@media (max-width: 600px) {
  .dc-consent-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }
  .dc-consent-btn-ok {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    min-height: 56px;
  }
  .dc-consent-actions {
    width: 100%;
  }
}

/* Dark mode */
[data-theme="dark"] #dc-consent-banner {
  background: #2D2D2D;
  border-top-color: var(--accent-primary);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .dc-consent-text {
  color: #E8E8E8;
}

/* ============================================
   Testimonials / Social Proof Section
   ============================================ */

.testimonials-section {
  padding: 40px 20px;
  background: #f0f4ff;
  text-align: center;
}

.testimonials-section h2 {
  font-size: 1.8em;
  margin-bottom: 24px;
  color: #1565C0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto 24px;
}

.testimonial-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: left;
}

.testimonial-stars {
  color: #f5a623;
  font-size: 1.3em;
  margin-bottom: 12px;
}

.testimonial-quote {
  font-size: 1.05em;
  line-height: 1.6;
  color: #333;
  margin: 0 0 16px;
  font-style: italic;
}

.testimonial-author {
  font-weight: bold;
  color: #1565C0;
  font-size: 0.95em;
}

.testimonial-location {
  color: #666;
  font-size: 0.9em;
}

.testimonials-disclaimer {
  font-size: 0.85em;
  color: #888;
  font-style: italic;
  margin-top: 8px;
}

/* Dark mode for testimonials */
[data-theme="dark"] .testimonials-section {
  background: #1a2035;
}

[data-theme="dark"] .testimonials-section h2 {
  color: #90CAF9;
}

[data-theme="dark"] .testimonial-card {
  background: #1e2a3a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

[data-theme="dark"] .testimonial-quote {
  color: #D0D8E8;
}

[data-theme="dark"] .testimonial-author {
  color: #90CAF9;
}

[data-theme="dark"] .testimonial-location {
  color: #8899AA;
}

[data-theme="dark"] .testimonials-disclaimer {
  color: #667788;
}

/* ── Phase 2: Scam Awareness Alert Card ── */
.alert-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #fff3cd;
  border: 2px solid #e6ac00;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 0 0 24px;
}
.alert-card .alert-icon { font-size: 2em; line-height: 1; }
.alert-card .alert-content p { margin: 6px 0 10px; font-size: 1.05em; line-height: 1.5; }
.alert-card .alert-link { color: #1565C0; font-weight: bold; text-decoration: underline; }

/* Related Modules */
.related-modules { margin: 32px 0 16px; padding-top: 24px; border-top: 2px solid #e0e7ff; }
.related-title { font-size: 1.1em; color: #1565C0; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.related-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: #f0f4ff; border: 1px solid #c7d2fe; border-radius: 10px; text-decoration: none; color: inherit; transition: background 0.2s; }
.related-card:hover { background: #e0e7ff; }
.related-num { font-size: 0.8em; color: #6366f1; font-weight: bold; text-transform: uppercase; }
.related-name { font-size: 1em; font-weight: bold; color: #1565C0; }
.related-desc { font-size: 0.88em; color: #555; line-height: 1.4; }

/* Module Complete Action */
.module-complete-action { text-align: center; margin: 24px 0 16px; position: relative; overflow: hidden; }
.btn-mark-complete { background: #1565C0; color: white; border: none; padding: 14px 32px; border-radius: 8px; font-size: 1.05em; font-weight: bold; cursor: pointer; transition: background 0.2s; min-height: 52px; }
.btn-mark-complete:hover { background: #0d47a1; }

/* Completion Banner */
.mc-complete-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border: 2px solid #16A34A;
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 0.75rem;
  text-align: left;
  animation: mc-slide-in 0.4s ease;
}
[data-theme="dark"] .mc-complete-banner {
  background: linear-gradient(135deg, #14532d 0%, #166534 100%);
  border-color: #22c55e;
}
.mc-complete-icon { font-size: 2.2rem; flex-shrink: 0; }
.mc-complete-msg { margin: 0 0 0.25rem; font-size: 1rem; color: #14532D; }
[data-theme="dark"] .mc-complete-msg { color: #bbf7d0; }
.mc-complete-sub { margin: 0; font-size: 0.88rem; color: #166534; }
[data-theme="dark"] .mc-complete-sub { color: #86efac; }

.mc-print-btn {
  background: #1565C0;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.mc-print-btn:hover { background: #0e4fa3; }
[data-theme="dark"] .mc-print-btn { background: #2563eb; }
[data-theme="dark"] .mc-print-btn:hover { background: #1d4ed8; }

@keyframes mc-slide-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Confetti */
.mc-confetti-wrap {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  overflow: hidden;
}
.mc-confetti-piece {
  position: absolute;
  top: -12px;
  animation: mc-confetti-fall linear forwards;
}
@keyframes mc-confetti-fall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(180px) rotate(360deg); opacity: 0; }
}

/* ── EEAT: Module Byline ── */
.module-byline {
  font-size: 0.82rem;
  color: var(--color-text-muted, #666);
  margin: -0.25rem 0 1.25rem;
  padding: 0;
  border: none;
}
[data-theme="dark"] .module-byline { color: #a0a0a0; }

/* ── EEAT: Trust Bar ── */
.eeat-trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0.65rem 1rem;
  background: #e8f0fe;
  border-radius: 10px;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.82rem;
  color: #1a3a6b;
  align-items: center;
}
.eeat-trust-bar span { white-space: nowrap; max-width: 100%; overflow-wrap: break-word; word-break: break-word; }
[data-theme="dark"] .eeat-trust-bar {
  background: #1a2744;
  color: #90c4f8;
}

/* ── EEAT: Sources Block ── */
.sources-block {
  border-top: 1px solid var(--color-border, #e0e0e0);
  margin-top: 2.5rem;
  padding-top: 1.25rem;
}
.sources-block h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted, #666);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  border: none;
}
.sources-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.82rem;
}
.sources-block ul li { margin-bottom: 0.25rem; }
.sources-block ul li a { color: var(--color-primary, #1565C0); }
[data-theme="dark"] .sources-block { border-color: #444; }
[data-theme="dark"] .sources-block h3 { color: #a0a0a0; }

/* ── EEAT: Credentials Bar ── */
.credentials-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.credential-badge {
  background: #e8f0fe;
  color: #1a3a6b;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
}
[data-theme="dark"] .credential-badge {
  background: #1a2744;
  color: #90c4f8;
}

/* ── Quick Answers Accordion ── */
.quick-answers-accordion {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--color-border, #e0e0e0);
}
.quick-answers-accordion h2 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}
.qa-item {
  border-bottom: 1px solid var(--color-border, #e0e0e0);
}
.qa-question {
  width: 100%;
  background: none;
  border: none;
  padding: 0.9rem 0;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text, #1a1a1a);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.4;
}
.qa-question:hover { color: var(--color-primary, #1565C0); }
.qa-question[aria-expanded="true"] .qa-chevron { transform: rotate(180deg); }
.qa-chevron {
  font-size: 0.7rem;
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--color-text-muted, #666);
}
.qa-answer {
  padding: 0.1rem 0 1rem 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-text, #1a1a1a);
}
.qa-answer p { margin: 0; }
[data-theme="dark"] .qa-question { color: #E0E0E0; }
[data-theme="dark"] .qa-question:hover { color: #5DADE2; }
[data-theme="dark"] .qa-item { border-color: #444; }
[data-theme="dark"] .quick-answers-accordion { border-color: #444; }

/* ── Module Interact Panel (notes, ratings, share) ─────────────────────── */
.module-interact-panel {
  max-width: 720px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0 1rem;
}
.mi-section {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
}
.mi-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--color-text, #1a1a1a);
}
/* Stars */
.mi-stars {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.mi-star {
  background: none;
  border: none;
  font-size: 1.9rem;
  color: #ccc;
  cursor: pointer;
  padding: 0.1rem;
  line-height: 1;
  transition: color 0.1s, transform 0.1s;
}
.mi-star.active { color: #f5a623; }
.mi-star:hover,
.mi-star:focus { color: #f5a623; transform: scale(1.15); outline: 2px solid #1565C0; outline-offset: 2px; }
.mi-rating-label {
  font-size: 0.82rem;
  color: #888;
  display: block;
}
/* Notes */
.mi-notes-area {
  width: 100%;
  border: 1px solid var(--color-border, #ccc);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  color: var(--color-text, #1a1a1a);
  background: var(--color-bg, #fff);
  margin-bottom: 0.75rem;
}
.mi-notes-area:focus { outline: 2px solid #1565C0; border-color: #1565C0; }
.mi-notes-actions,
.mi-share-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
/* Shared button style */
.mi-btn {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--color-border, #ccc);
  border-radius: 8px;
  background: var(--color-surface, #fff);
  color: var(--color-text, #1a1a1a);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.mi-btn:hover { background: #1565C0; color: #fff; border-color: #1565C0; }
.mi-btn:focus { outline: 2px solid #1565C0; outline-offset: 2px; }
/* Dark mode */
[data-theme="dark"] .mi-section { background: #1e2a38; border-color: #444; }
[data-theme="dark"] .mi-heading { color: #E0E0E0; }
[data-theme="dark"] .mi-notes-area { background: #152030; color: #E0E0E0; border-color: #555; }
[data-theme="dark"] .mi-btn { background: #1e2a38; color: #E0E0E0; border-color: #555; }
[data-theme="dark"] .mi-btn:hover { background: #1565C0; color: #fff; }

/* ── Homepage Personalisation Panel ─────────────────────────────────────── */
#dc-progress-personalise { margin: 0.75rem 0 1rem; }
.dp-banner {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  border: 1.5px solid;
  border-radius: 14px;
  padding: 1rem 1.25rem;
}
.dp-icon { font-size: 1.8rem; flex-shrink: 0; line-height: 1; margin-top: 0.1rem; }
.dp-text { flex: 1; }
.dp-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.dp-body { font-size: 0.9rem; line-height: 1.6; margin: 0 0 0.6rem; }
.dp-cta {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  margin-top: 0.2rem;
}
.dp-cta:hover { opacity: 0.88; }

/* ============================================
   Phase 6 — Senior UX Patterns
   March 2026
   ============================================ */

/* ── Milestone Banner ── */
#dc-milestone-banner {
  background: #E8F5E9;
  border: 2px solid #2E7D32;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
  color: #1b5e20;
  position: relative;
}
[data-theme="dark"] #dc-milestone-banner {
  background: #1a2e1a;
  border-color: #4caf50;
  color: #c8e6c9;
}

/* ── Help Button ── */
#dc-help-btn-wrapper {
  position: fixed;
  top: 5rem;
  right: 1rem;
  z-index: 9000;
  font-family: inherit;
}
#dc-help-btn {
  background: #1565C0;
  color: #fff;
  border: none;
  border-radius: 22px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.15s;
}
#dc-help-btn:hover,
#dc-help-btn:focus-visible {
  background: #0d47a1;
  outline: 3px solid #90caf9;
  outline-offset: 2px;
}
#dc-help-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  width: 230px;
  padding: 0.5rem 0;
  z-index: 9001;
}
#dc-help-popover a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 0.95rem;
  border-bottom: 1px solid #f0f0f0;
  font-family: inherit;
  transition: background 0.1s;
}
#dc-help-popover a:last-child { border-bottom: none; }
#dc-help-popover a:hover,
#dc-help-popover a:focus-visible { background: #f0f4ff; }
[data-theme="dark"] #dc-help-popover {
  background: #1e1e1e;
  border-color: #333;
}
[data-theme="dark"] #dc-help-popover a {
  color: #f5f5f5;
  border-bottom-color: #333;
}
[data-theme="dark"] #dc-help-popover a:hover { background: #2a2a2a; }

/* ── Confirm Dialog Overlay ── */
#dc-confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#dc-confirm-overlay.open { display: flex; }
[data-theme="dark"] #dc-confirm-overlay > div {
  background: #1e1e1e;
  color: #f5f5f5;
}

/* Print — hide interactive UI elements */
@media print {
  #dc-help-btn-wrapper,
  #dc-confirm-overlay,
  #dc-milestone-banner { display: none !important; }
}

/* Reduced motion — respect system accessibility preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
