/* ═══════════════════════════════════════════════════════════════
 *  DESIGN-ARCHITECTURE.CSS — v3.0 · Complete Component Library
 *  ───────────────────────────────────────────────────────────
 *  Requires: tokens.css loaded first.
 *  All components in one file. No token definitions here
 *  (except Section 0 readability overrides).
 *
 *  SECTION INDEX:
 *   0. Readability Arch.  15. Breadcrumbs
 *   1. Buttons            16. Content blocks (legacy)
 *   2. Inputs (dark)      17. Cards (legacy)
 *   3. Inputs (light)     18. Footer
 *   4. Validation         19. Dashboard
 *   5. Toggle / Range     20. Metrics / Chart
 *   6. Surfaces           21. Prose
 *   7. Header / Nav       22. Callouts
 *   8. Mega menu          23. FAQ
 *   9. Mobile drawer      24. Hero
 *  10. Tables             25. USP row
 *  11. Badges             26. Trust panel
 *  12. Ad slots           27. Discovery
 *  13. Timeline           28. Misc utilities
 *  ─── NEW in v3.0 ───
 *  29. Related articles   33. Section headers
 *  30. Promo grid         34. Inline content ads
 *  31. Feature showcase   35. Card system
 *  32. Spotlight row      36. Hero subtitle fix
 * ═══════════════════════════════════════════════════════════════ */


/* ═══ 0. READABILITY ARCHITECTURE ═══════════════════════════════
 *  Site-wide readability overrides.
 *  Raises the typographic floor, strengthens contrast on light
 *  surfaces, and ensures WCAG-AA compliance everywhere.
 *
 *  These :root declarations override tokens.css values.
 *  They are the SINGLE source of truth for readable minimums.
 * ────────────────────────────────────────────────────────────── */
:root {
  /* --- Type-scale floor (light surfaces) --- */
  --text-xs:  0.9375rem; /* 12px → 15px — no UI text below this */
  --text-sm:  0.9375rem; /* 14px → 15px — nav, labels, meta     */

  /* --- Light-surface contrast (WCAG-AA on white) --- */
  --text-muted:      #334155; /* slate-700 — was gray-400 */
  --text-secondary:  #475569; /* slate-600 — was gray-600 */
  --text-placeholder: #64748b;/* slate-500 — inputs, subtle hints */
}


/* ═══ 1. BUTTONS ═══════════════════════════════════════════════ */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-family: var(--font-sans); font-weight: 600; font-size: var(--text-sm); line-height: 1.25; padding: 0.625rem 1.25rem; border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer; transition: all 200ms var(--ease); white-space: nowrap; text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--gray-950), 0 0 0 4px var(--accent); }
.btn-primary { background: var(--accent); color: var(--text-on-accent); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-accent-md); }
.btn-secondary { background: rgba(255,255,255,0.06); color: var(--text-on-dark); border-color: rgba(255,255,255,0.1); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.18); }
.btn-secondary-light { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-xs); }
.btn-secondary-light:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: rgba(255,255,255,0.6); border-color: transparent; }
.btn-ghost:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.btn-ghost-light { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost-light:hover { color: var(--text); background: var(--surface-2); }
.btn-danger { background: #DC2626; color: white; }
.btn-danger:hover { background: #B91C1C; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(220,38,38,0.4); }
.btn-outline { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.08); }
.btn-cta { display: inline-flex; align-items: center; gap: 0.375rem; background: var(--accent); color: var(--text-on-accent); font-weight: 700; padding: 0.4375rem 1rem; border-radius: var(--radius-full); font-size: 0.9375rem; text-decoration: none; border: none; cursor: pointer; transition: all 200ms var(--ease); white-space: nowrap; }
.btn-cta:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.35); }
.btn-cta:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--gray-950), 0 0 0 4px var(--accent); }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: var(--radius-md); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); cursor: pointer; transition: all 200ms var(--ease); }
.btn-icon:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.btn-icon-light { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all 200ms var(--ease); }
.btn-icon-light:hover { background: var(--surface-2); color: var(--text); }
.btn-loading { pointer-events: none; opacity: 0.7; }
.btn-loading .spinner { animation: spin 0.8s linear infinite; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: var(--text-base); border-radius: var(--radius-lg); }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.9375rem; }

/* Legacy button compat (old design-system.css) */
.btn-base { font-weight: 600; padding: 0.875rem 1.75rem; border-radius: 0.5rem; border: none; cursor: pointer; transition: all 0.3s ease; display: inline-block; text-decoration: none; }
.btn-base:hover { transform: translateY(-2px); }
.btn-pink { background: var(--accent); color: var(--text-on-accent); box-shadow: var(--shadow-btn); }
.btn-pink:hover { background: var(--accent-hover); box-shadow: var(--shadow-btn-hover); }


/* ═══ 2. INPUTS (DARK) ════════════════════════════════════════ */

.input-dark { width: 100%; font-family: var(--font-sans); font-size: var(--text-base); line-height: 1.5; padding: 0.625rem 0.875rem; background: rgba(255,255,255,0.06); color: var(--white); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); transition: all 200ms var(--ease); }
.input-dark::placeholder { color: rgba(255,255,255,0.3); }
.input-dark:hover { border-color: rgba(255,255,255,0.2); }
.input-dark:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.25); }
select.input-dark { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.5rem; }
select.input-dark option { background: var(--gray-800); color: var(--white); }
.label-dark { display: block; font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.5); margin-bottom: 0.5rem; }
.input-group-dark { display: flex; border-radius: var(--radius); overflow: hidden; }
.input-group-dark .input-dark { border-radius: 0; flex: 1; }
.addon-dark { display: flex; align-items: center; padding: 0 0.75rem; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.4); font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }
.input-group-dark .addon-dark:first-child { border-right: 0; }
.input-group-dark .addon-dark:last-child { border-left: 0; }

/* Legacy input compat */
.input-minimal { background: var(--bg-input); border: 1px solid var(--border-default); color: var(--text-primary); transition: all 0.2s ease; padding: 0.875rem; border-radius: 0.5rem; }
.input-minimal::placeholder { color: var(--text-faint); }
.input-minimal:focus { outline: none; border-color: var(--accent); background: var(--bg-input-focus); box-shadow: 0 0 0 4px rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.2); }
.label-minimal { font-size: 0.9375rem; color: var(--text-muted); font-weight: 600; margin-bottom: 0.5rem; display: block; text-transform: uppercase; letter-spacing: 0.1em; }


/* ═══ 3. INPUTS (LIGHT) ══════════════════════════════════════ */

.input-light { width: 100%; font-family: var(--font-sans); font-size: var(--text-base); line-height: 1.5; padding: 0.625rem 0.875rem; background: var(--white); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); transition: all 200ms var(--ease); }
.input-light::placeholder { color: var(--text-placeholder); }
.input-light:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.15); }
.label-light { display: block; font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.5rem; }


/* ═══ 4. VALIDATION ══════════════════════════════════════════ */

.input-error { border-color: #DC2626 !important; }
.input-error:focus { box-shadow: 0 0 0 3px rgba(220,38,38,0.2) !important; }
.input-warn { border-color: #D97706 !important; }
.input-warn:focus { box-shadow: 0 0 0 3px rgba(217,119,6,0.2) !important; }
.input-success { border-color: #059669 !important; }
.input-success:focus { box-shadow: 0 0 0 3px rgba(5,150,105,0.2) !important; }
.validation-msg { font-size: 0.9375rem; margin-top: 0.375rem; display: flex; align-items: center; gap: 0.375rem; }
.validation-msg.error { color: #F87171; }
.validation-msg.warn { color: #FBBF24; }
.validation-msg.success { color: #34D399; }


/* ═══ 5. TOGGLE / RANGE / CHECK ══════════════════════════════ */

.toggle-track { position: relative; width: 44px; height: 24px; background: rgba(255,255,255,0.12); border-radius: 12px; cursor: pointer; transition: background 200ms var(--ease); flex-shrink: 0; }
.toggle-track.active { background: var(--accent); }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: white; transition: transform 200ms var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.toggle-track.active .toggle-thumb { transform: translateX(20px); }

.range-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.1); outline: none; cursor: pointer; }
.range-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 0 0 4px rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.2); transition: box-shadow 200ms var(--ease); }
.range-slider::-webkit-slider-thumb:hover { box-shadow: 0 0 0 6px rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.3); }
.range-slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); cursor: pointer; border: none; }
.range-slider-light { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--gray-200); outline: none; cursor: pointer; }
.range-slider-light::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 0 0 4px rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.15); }

.custom-check { display: flex; align-items: center; gap: 0.625rem; cursor: pointer; font-size: var(--text-sm); color: rgba(255,255,255,0.7); }
.custom-check input { display: none; }
.custom-check .check-box { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.2); border-radius: 4px; display: flex; align-items: center; justify-content: center; transition: all 200ms var(--ease); flex-shrink: 0; }
.custom-check input:checked + .check-box { background: var(--accent); border-color: var(--accent); }
.custom-check .check-box svg { opacity: 0; transition: opacity 200ms var(--ease); }
.custom-check input:checked + .check-box svg { opacity: 1; }
.custom-radio .check-box { border-radius: 50%; }

/* Segmented toggle (pill switch) */
.seg-toggle { display: inline-flex; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-full); padding: 3px; gap: 2px; }
.seg-toggle-light { background: var(--surface-2); border-color: var(--border); }
.seg-btn { padding: 0.4375rem 1rem; border-radius: var(--radius-full); font-size: 0.9375rem; font-weight: 600; border: none; cursor: pointer; transition: all 200ms var(--ease); color: rgba(255,255,255,0.45); background: transparent; white-space: nowrap; }
.seg-btn.active { background: var(--accent); color: var(--text-on-accent); box-shadow: 0 2px 8px rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.3); }
.seg-btn:not(.active):hover { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.04); }
.seg-toggle-light .seg-btn { color: var(--text-muted); }
.seg-toggle-light .seg-btn.active { color: var(--text-on-accent); }
.seg-toggle-light .seg-btn:not(.active):hover { color: var(--text-secondary); background: var(--surface-3); }

/* Legacy keypad toggle (roman-numerals.php compat) */
.keypad-toggle { display: inline-flex; background: var(--calc-toggle-bg); border: 1px solid var(--calc-toggle-border); border-radius: 9999px; padding: 3px; gap: 2px; }
.keypad-toggle-btn { padding: 0.375rem 1rem; border-radius: 9999px; font-size: 0.9375rem; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s ease; color: var(--calc-toggle-text); background: transparent; white-space: nowrap; }
.keypad-toggle-btn.active { background: var(--accent); color: var(--text-on-accent); box-shadow: 0 2px 8px rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.3); }
.keypad-toggle-btn:not(.active):hover { color: var(--calc-toggle-hover-text); background: var(--calc-toggle-hover-bg); }


/* ═══ 6. SURFACES ════════════════════════════════════════════ */

.surface-dark { background: var(--gray-900); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius-xl); }
.surface-light { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); }
.surface-elevated { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius-xl); }


/* ═══ 7. HEADER / NAV ════════════════════════════════════════ */

.hdr-bg { background: rgba(0,0,0,0.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-dark-strong); position: sticky; top: 0; z-index: 50; }
.hdr-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.hdr-brand { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; min-width: 0; flex-shrink: 0; }
.hdr-logo { width: 30px; height: 30px; min-width: 30px; background: var(--accent); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 800; font-size: 11px; letter-spacing: -0.02em; }
.hdr-brand-text { font-weight: 600; font-size: var(--text-sm); color: #fff; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-link { font-size: var(--text-sm); font-weight: 500; color: #d1d5db; text-decoration: none; padding: 0.5rem 0.75rem; border-radius: var(--radius); background: none; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.3rem; transition: color 150ms var(--ease); }
.nav-link:hover { color: #fff; }
.nav-link:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); border-radius: var(--radius); }
.nav-chevron { width: 12px; height: 12px; min-width: 12px; opacity: 0.45; transition: transform 200ms var(--ease), opacity 200ms; }
.nav-link:hover .nav-chevron { opacity: 0.7; }

.hamburger-btn { width: 38px; height: 38px; background: none; border: 1px solid var(--border-default); border-radius: var(--radius); color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 150ms, border-color 150ms, color 150ms; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.hamburger-btn:hover { background: var(--bg-hover); border-color: rgba(255,255,255,0.12); color: var(--white); }
@media (min-width: 768px) { .hamburger-btn { display: none !important; } }
@media (max-width: 767px) { .brand-link { flex: 1 !important; margin-right: 0.75rem; } }


/* ═══ 8. MEGA MENU (light dropdowns) ═════════════════════════ */

.mega-menu { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); padding: 1.5rem; min-width: 460px; z-index: 60; }
.mega-col-title { font-size: 0.9375rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.75rem; }
.mega-menu a { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.625rem; border-radius: var(--radius); font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: background 100ms, color 100ms; }
.mega-menu a:hover { background: var(--surface-2); color: var(--text); }
.mega-icon { width: 32px; height: 32px; border-radius: var(--radius); background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.mega-menu a:hover .mega-icon { background: var(--accent-soft); }
.mega-desc { font-size: var(--text-xs); color: var(--text-muted); font-weight: 400; margin-top: 1px; }

/* Dark dropdown variant (Final-header-styles.html) */
.dd-panel { position: absolute; top: calc(100% + 6px); left: 0; background: var(--bg-elevated); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-lg); box-shadow: var(--shadow-dropdown); z-index: 60; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity 150ms var(--ease), visibility 0ms 150ms; }
.dd-panel.is-open { visibility: visible; opacity: 1; pointer-events: auto; transition: opacity 150ms var(--ease), visibility 0ms 0ms; }
.dd-bridge { position: absolute; top: 100%; left: 0; right: 0; height: 10px; display: none; }
.dd-item { display: block; padding: 0.5rem 1rem; border-radius: 6px; font-size: var(--text-sm); font-weight: 450; color: #d1d5db; text-decoration: none; transition: background 100ms, color 100ms; line-height: 1.5; }
.dd-item:hover { background: var(--bg-hover); color: #fff; }
.dd-item:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.dd-sub { font-size: var(--text-xs); color: #9ca3af; font-weight: 400; display: block; margin-top: 2px; }
.dd-item--accent { color: var(--accent-soft); font-weight: 600; font-size: var(--text-sm); }
.dd-item--accent:hover { color: #fff; background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.1); }
.dd-hr { height: 1px; background: rgba(255,255,255,0.08); margin: 0.5rem 0.75rem; }
.dd-vr { width: 1px; background: rgba(255,255,255,0.08); }
.dd-title { font-size: 0.9375rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #9ca3af; padding: 0.625rem 1rem 0.375rem; user-select: none; }

/* Legacy dropdown (old PHP header compat) */
.dropdown-container { position: relative; }
.dropdown-trigger { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; color: var(--text-secondary); font-weight: 500; transition: all 0.2s ease; font-size: 0.9375rem; white-space: nowrap; background: none; border: none; }
.dropdown-trigger:hover { color: var(--accent); }
.dropdown-chevron { width: 1.25rem; height: 1.25rem; transition: all 0.3s var(--ease); }
.dropdown-trigger:hover .dropdown-chevron { transform: translateY(3px) rotate(180deg); }
.dropdown-open .dropdown-chevron { transform: rotate(180deg); color: var(--accent); }
.dropdown-menu { position: absolute; top: 100%; left: 0; background: var(--bg-elevated); border: 1px solid rgba(255,255,255,0.12); border-radius: 0.75rem; padding: 0.5rem; min-width: 220px; margin-top: 1rem; z-index: 1000; box-shadow: var(--shadow-dropdown); }
.dropdown-item { display: block; width: 100%; padding: 0.875rem 1rem; text-align: left; background: transparent; border: none; color: var(--text-secondary); cursor: pointer; transition: all 0.2s ease; border-radius: 0.5rem; font-size: 0.9375rem; text-decoration: none; }
.dropdown-item:hover { background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.15); color: var(--accent); transform: translateX(4px); }


/* ═══ 9. MOBILE DRAWER ═══════════════════════════════════════ */

.mobile-panel { position: fixed; inset: 0; z-index: 100; }
.mobile-panel-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.mobile-panel-body { position: absolute; top: 0; right: 0; bottom: 0; width: 85%; max-width: 360px; background: var(--surface); padding: 1.5rem; overflow-y: auto; box-shadow: -8px 0 32px rgba(0,0,0,0.2); }
.mobile-nav-link { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; font-size: var(--text-lg); font-weight: 600; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border-subtle); }
.mobile-nav-link:last-child { border-bottom: none; }

/* Dark mobile drawer (Final-header variant) */
.mob-nav-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 1.125rem 0; font-size: var(--text-base); font-weight: 500; color: #d1d5db; background: none; border: none; cursor: pointer; text-align: left; transition: color 150ms; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.mob-nav-btn:hover { color: #fff; }
.mob-nav-link-dark,
.mob-nav-link { display: flex; align-items: center; justify-content: space-between; padding: 1.125rem 0; font-size: var(--text-base); font-weight: 500; color: #d1d5db; text-decoration: none; transition: color 150ms; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.mob-nav-link-dark:hover,
.mob-nav-link:hover { color: #fff; }
.mob-arrow { width: 16px; height: 16px; min-width: 16px; flex-shrink: 0; color: var(--text-muted); transition: transform 200ms var(--ease); }
.mob-sub-item { display: block; padding: 0.5rem 0.75rem; font-size: var(--text-sm); font-weight: 450; color: #9ca3af; text-decoration: none; border-radius: 6px; transition: background 100ms, color 100ms; margin-bottom: 1px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.mob-sub-item:hover { background: var(--bg-hover); color: #fff; }
.mob-hr { height: 1px; background: var(--border-default); margin: 0.375rem 0.75rem; }
.mob-sub-item--accent { color: var(--accent-soft); font-weight: 600; font-size: var(--text-sm); }
.mob-sub-item--accent:hover { color: #fff; }

/* Legacy mobile (old PHP header compat) */
.mobile-menu { background: var(--bg-elevated); backdrop-filter: blur(10px); border-top: 1px solid var(--border-default); }
.mobile-menu-item { display: block; padding: 1rem 1.5rem; color: var(--text-secondary); font-weight: 500; transition: all 0.2s ease; border-bottom: 1px solid rgba(255,255,255,0.05); text-decoration: none; }
.mobile-menu-item:hover { background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.1); color: var(--accent); }


/* ═══ 10. TABLES ═════════════════════════════════════════════ */

.table-dark { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table-dark th { text-align: left; padding: 0.75rem 1rem; font-weight: 600; font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(255,255,255,0.4); border-bottom: 1px solid rgba(255,255,255,0.08); }
.table-dark td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.04); color: rgba(255,255,255,0.7); font-variant-numeric: tabular-nums; }
.table-dark tr:hover td { background: rgba(255,255,255,0.02); }

.table-light { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table-light th { text-align: left; padding: 0.75rem 1rem; font-weight: 600; font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); border-bottom: 2px solid var(--border); background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.06); }
.table-light td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-subtle); font-variant-numeric: tabular-nums; }
.table-light tr:hover td { background: var(--gray-50); }

/* Legacy table compat */
.table-container { overflow-x: auto; border-radius: 0.75rem; border: 1px solid var(--border-default); }
.table-minimal { width: 100%; border-collapse: collapse; }
.table-minimal thead { background: var(--bg-inset); }
.table-minimal th { padding: 1rem 1.5rem; text-align: left; font-weight: 600; font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 1px solid var(--border-default); }
.table-minimal td { padding: 1rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text-secondary); }
.table-minimal tr:hover { background: var(--bg-inset); }


/* ═══ 11. BADGES ═════════════════════════════════════════════ */

.badge { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; border-radius: var(--radius-full); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.02em; }
.badge-accent { background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.12); color: var(--accent); }
.badge-neutral { background: var(--gray-100); color: var(--gray-600); }
.badge-success { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-warning { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-error { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-dark { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); }


/* ═══ 12. AD SLOTS ═══════════════════════════════════════════ */

.ad-slot { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; }
.ad-slot-label { font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: #9CA3AF; }
.ad-slot-box { background: var(--gray-50); border: 1px solid #ececee; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--text-placeholder); font-size: var(--text-xs); }
.ad-slot-inline .ad-slot-box { width: 100%; min-height: 90px; max-width: 728px; margin: 0 auto; }
.ad-slot-rail .ad-slot-box { width: 160px; min-height: 600px; }

/* Expanded ad system — new slot types */
.ad-slot-mobile-banner .ad-slot-box { width: 100%; min-height: 100px; max-width: 100%; }
.ad-slot-in-content .ad-slot-box { width: 100%; min-height: 250px; max-width: 336px; margin: 0 auto; }
.ad-slot-sticky-footer { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--white); border-top: 1px solid var(--border); padding: 0.5rem 0; text-align: center; transform: translateY(100%); transition: transform 300ms var(--ease); }
.ad-slot-sticky-footer.is-visible { transform: translateY(0); }
.ad-slot-sticky-footer .ad-slot-box { min-height: 50px; max-width: 320px; margin: 0 auto; }
.ad-slot-native { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.ad-slot-native .ad-slot-label { font-size: 0.6875rem; color: #9CA3AF; margin-bottom: 0.75rem; }

/* Ad break section (full-width separator) */
.ad-break { background: var(--bg-light-soft, var(--gray-50)); padding: 2rem 0; }
.ad-break-narrow { padding: 1.5rem 0; }

/* Responsive: show mobile-only or desktop-only slots */
@media (max-width: 767px) {
    .ad-slot-desktop-only { display: none !important; }
    .ad-slot-mobile-banner .ad-slot-box { min-height: 250px; }
}
@media (min-width: 768px) {
    .ad-slot-mobile-only { display: none !important; }
    .ad-slot-sticky-footer { display: none !important; }
}


/* ═══ 13. TIMELINE ═══════════════════════════════════════════ */

.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: rgba(255,255,255,0.08); }
.timeline-light::before { background: var(--gray-200); }
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker { position: absolute; left: -2rem; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--gray-950); z-index: 1; }
.timeline-light .timeline-marker { border-color: var(--white); }
.timeline-date { font-size: 0.9375rem; font-weight: 600; color: var(--accent); margin-bottom: 0.375rem; }
.timeline-content { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius-lg); padding: 1.25rem; }
.timeline-content-light { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-xs); }
.timeline-title { font-weight: 600; color: var(--white); margin-bottom: 0.25rem; }
.timeline-light .timeline-title { color: var(--text); }
.timeline-text { font-size: var(--text-sm); color: rgba(255,255,255,0.6); line-height: 1.6; }
.timeline-light .timeline-text { color: var(--text-secondary); }


/* ═══ 14. LOADING STATES ═════════════════════════════════════ */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes skeleton-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }
@keyframes dot-bounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

.loader-spinner { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
.loader-spinner-light { width: 32px; height: 32px; border: 3px solid var(--gray-200); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
.loader-spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.skeleton { border-radius: var(--radius); animation: skeleton-pulse 1.8s ease-in-out infinite; }
.skeleton-dark { background: rgba(255,255,255,0.06); }
.skeleton-light { background: var(--gray-200); }
.loader-dots { display: flex; gap: 4px; align-items: center; }
.loader-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: dot-bounce 1.2s ease-in-out infinite; }
.loader-dots span:nth-child(2) { animation-delay: 0.15s; }
.loader-dots span:nth-child(3) { animation-delay: 0.3s; }

/* Legacy spinner */
.spinner { width: 40px; height: 40px; border: 3px solid var(--border-default); border-top-color: var(--text-primary); border-radius: 50%; animation: spin 0.8s linear infinite; }


/* ═══ 15. BREADCRUMBS ════════════════════════════════════════ */

.breadcrumbs { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; color: var(--text-muted); }
.breadcrumb-item { transition: color 0.2s ease; color: var(--text-muted); text-decoration: none; }
.breadcrumb-item:hover { color: var(--accent); }
.breadcrumb-separator { color: var(--text-faint); }


/* ═══ 16. CONTENT BLOCKS (legacy PHP templates) ══════════════ */

.content-block { line-height: 1.7; padding: 1.5rem; border-radius: 0.75rem; }
.content-block h1 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; margin-top: 1.5rem; }
.content-block h1:first-child { margin-top: 0; }
.content-block h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.875rem; margin-top: 1.5rem; }
.content-block h2:first-child { margin-top: 0; }
.content-block h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; margin-top: 1rem; }
.content-block h3:first-child { margin-top: 0; }
.content-block p { margin-bottom: 1rem; font-size: 1rem; }
.content-block ul { list-style: none; padding-left: 1.5rem; margin-bottom: 1rem; }
.content-block ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.content-block li { margin-bottom: 0.5rem; position: relative; padding-left: 1rem; }
.content-block ul li::before { content: '•'; position: absolute; left: 0; color: var(--accent); }
.content-block ol li { padding-left: 0; }
.content-block blockquote { border-left: 3px solid var(--accent); padding-left: 1.5rem; margin: 1.5rem 0; font-style: italic; }
.content-block a { color: var(--accent); text-decoration: none; transition: all 0.2s ease; border-bottom: 1px solid transparent; }
.content-block a:hover { color: var(--accent-hover); border-bottom-color: var(--accent-hover); }
.content-block strong { font-weight: 700; color: inherit; }
.content-block code { background: var(--bg-surface-hover); padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-family: var(--font-mono); font-size: 0.875em; }
.content-block mark { background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.2); color: inherit; padding: 0.125rem 0.25rem; border-radius: 0.25rem; }

.content-dark { background: var(--bg-section-b); border: 1px solid var(--border-default); color: var(--text-secondary); }
.content-dark h1, .content-dark h2, .content-dark h3 { color: var(--text-primary); }
.content-white { background: var(--bg-contrast); border: 1px solid var(--border-contrast); color: var(--text-contrast); }
.content-white h1, .content-white h2, .content-white h3 { color: var(--text-contrast-heading); }
.content-white a { color: var(--text-contrast-link); }
.content-white a:hover { color: var(--text-contrast-link-hover); }
.content-light { background: var(--bg-contrast); border: 1px solid var(--border-contrast); color: var(--text-contrast); }
.content-light h1, .content-light h2, .content-light h3 { color: var(--text-contrast-heading); }
.section-alt { background: var(--bg-section-b); }


/* ═══ 17. CARDS (legacy) ═════════════════════════════════════ */

.card-minimal { background: var(--bg-surface); backdrop-filter: blur(10px); border: 1px solid var(--border-default); border-radius: 1rem; overflow: hidden; }
.card-white { background: var(--bg-contrast); border: 1px solid var(--border-contrast); border-radius: 1rem; color: var(--text-contrast); }
.card-white h1, .card-white h2, .card-white h3, .card-white h4 { color: var(--text-contrast-heading); }
.feature-card { padding: 2rem; border-radius: 0.75rem; background: var(--bg-inset); border: 1px solid var(--border-default); transition: all 0.3s ease; }
.feature-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.12); }
.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h4 { font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.9375rem; color: var(--text-muted); }


/* ═══ 18. FOOTER ═════════════════════════════════════════════ */

.footer-logo { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.footer-logo-link { display: flex; align-items: center; gap: 1rem; text-decoration: none; transition: opacity 0.2s ease; }
.footer-logo-link:hover { opacity: 0.8; }
.footer-logo-icon { width: 48px; height: 48px; background: var(--accent); border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 1.5rem; }
.footer-logo-text { font-size: 1.125rem; font-weight: 600; color: var(--text-primary); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-section h4 { font-size: 0.9375rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-primary); margin-bottom: 1rem; }
.footer-section a { display: block; font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 0.75rem; transition: color 0.2s ease; text-decoration: none; }
.footer-section a:hover { color: var(--accent); }
.parent-brand-bar { border-top: 1px solid rgba(255,255,255,0.05); padding: 1.5rem 0; text-align: center; }
.parent-brand-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-muted); text-decoration: none; font-size: 0.9375rem; transition: color 0.2s ease; }
.parent-brand-link:hover { color: var(--text-secondary); }
.parent-brand-icon { font-size: 1.25rem; }


/* ═══ 19. DASHBOARD ══════════════════════════════════════════ */

.dashboard { background: var(--gray-900); border: 1px solid rgba(255,255,255,0.06); border-radius: 24px; overflow: hidden; box-shadow: 0 32px 64px -16px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03); }


/* ═══ 20. METRICS / CHART ════════════════════════════════════ */

.metric { text-align: center; padding: 1.25rem 0.75rem; }
.metric-label { font-size: 0.9375rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.35); margin-bottom: 0.375rem; }
.metric-value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1; color: var(--white); }
.metric-primary .metric-value { font-size: 2.25rem; color: var(--accent); }
@media (max-width: 640px) { .metric-value { font-size: 1.125rem; } .metric-primary .metric-value { font-size: 1.5rem; } }

.chart-panel { padding: 1.25rem 1.5rem 1rem; border-top: 1px solid rgba(255,255,255,0.06); }
.chart-panel svg { display: block; width: 100%; }
.chart-label { font-size: 0.9375rem; fill: rgba(255,255,255,0.3); font-family: var(--font-sans); }
.chart-grid { stroke: rgba(255,255,255,0.04); }

/* Legacy calc display */
.calc-display { background: var(--bg-inset); border: 2px solid var(--accent); border-radius: 1rem; padding: 2.5rem; margin: 2rem 0; position: relative; overflow: hidden; }
.calc-number { color: var(--accent); font-weight: 700; font-size: 3.5rem; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1; margin: 1rem 0; }
.calc-label { font-size: 0.9375rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem; font-weight: 600; }
.calc-secondary-text { font-size: 1rem; color: var(--text-muted); line-height: 1.8; }
.calc-secondary-value { color: var(--accent); font-weight: 600; }
.calc-btn { padding: 0.875rem 0; border-radius: 0.5rem; font-weight: 600; font-size: 1.125rem; color: var(--calc-btn-text); transition: all 0.15s ease; border: none; cursor: pointer; min-height: 3.25rem; display: flex; align-items: center; justify-content: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; }


/* ═══ 21. PROSE ══════════════════════════════════════════════ */

.prose { font-size: var(--text-lg); line-height: 1.75; color: var(--text-body, var(--text-secondary)); }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: var(--text-2xl); font-weight: 700; color: var(--text); line-height: 1.3; margin-top: 2.5em; margin-bottom: 0.5em; letter-spacing: -0.025em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--text-xl); font-weight: 600; color: var(--text); line-height: 1.35; margin-top: 2em; margin-bottom: 0.375em; }
.prose strong { font-weight: 600; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin-bottom: 0.375em; }
.prose ul li::marker { color: var(--accent); }
.prose blockquote { border-left: 3px solid var(--accent); padding: 0.25rem 0 0.25rem 1.25rem; font-style: italic; }
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.prose a:hover { border-bottom-color: var(--accent); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-base); line-height: 1.5; }
.prose table th { text-align: left; padding: 0.75rem 1rem; font-weight: 600; font-size: 0.9375rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 2px solid var(--border); background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.06); }
.prose table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-subtle); font-variant-numeric: tabular-nums; color: var(--text-body, var(--text-secondary)); }


/* ═══ 22. CALLOUTS ═══════════════════════════════════════════ */

.callout { display: flex; gap: 0.75rem; padding: 1.25rem 1.5rem; border-radius: var(--radius-md); border-left: 3px solid var(--accent); background: var(--accent-soft); font-size: var(--text-base); line-height: 1.7; color: var(--text-body, var(--text-secondary)); }
.callout svg { flex-shrink: 0; color: var(--accent); margin-top: 3px; width: 20px; height: 20px; min-width: 20px; }
.callout strong { color: var(--text); font-weight: 600; }
.callout-warning { border-left-color: #D97706; background: #FFFBEB; }
.callout-warning svg { color: #D97706; }
.callout-success { border-left-color: #059669; background: #ECFDF5; }
.callout-success svg { color: #059669; }
.callout-error { border-left-color: #DC2626; background: #FEF2F2; }
.callout-error svg { color: #DC2626; }
.callout-dark { border-left-color: var(--accent); background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.06); color: rgba(255,255,255,0.6); }
.callout-dark strong { color: var(--white); }

.key-takeaway { background: var(--accent-soft); border: 1px solid var(--accent-muted); border-radius: var(--radius-lg); padding: 1.75rem 2rem; }
.key-takeaway .key-title { font-size: 0.9375rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.key-takeaway ul { padding-left: 1.25rem; margin: 0; }
.key-takeaway li { font-size: 1rem; font-weight: 500; color: var(--text-body, var(--text-secondary)); line-height: 1.75; margin-bottom: 0.5rem; }
.key-takeaway li:last-child { margin-bottom: 0; }
.key-takeaway li::marker { color: var(--accent); }

/* Legacy info panels */
.info-panel { background: var(--bg-inset); border: 1px solid var(--border-default); border-left: 3px solid var(--accent); border-radius: 0.5rem; padding: 1.25rem; display: flex; gap: 1rem; align-items: flex-start; }
.info-panel-success { border-left-color: #10b981; }
.info-panel-warning { border-left-color: #f59e0b; }
.info-panel-error { border-left-color: #ef4444; }
.info-icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); }
.info-text { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.6; }

/* Legacy alerts */
.alert { padding: 1rem 1.5rem; border-radius: 0.5rem; display: flex; align-items: center; gap: 1rem; }
.alert-info { background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.1); border: 1px solid rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.3); color: var(--accent); }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #10b981; }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #f59e0b; }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #ef4444; }


/* ═══ 23. FAQ ════════════════════════════════════════════════ */

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-trigger { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 1.375rem 0; background: none; border: none; cursor: pointer; font-size: 1.0625rem; font-weight: 500; color: var(--text); text-align: left; transition: color 200ms var(--ease); }
.faq-trigger:hover { color: var(--text-secondary); }
.faq-trigger svg { flex-shrink: 0; width: 1.25rem; height: 1.25rem; color: var(--text-muted); transition: transform 250ms var(--ease); }
.faq-body { padding-bottom: 1.5rem; font-size: var(--text-base); line-height: 1.75; color: var(--text-body, var(--text-secondary)); }

.faq-dark .faq-item { border-color: rgba(255,255,255,0.06); }
.faq-dark .faq-trigger { color: var(--white); }
.faq-dark .faq-trigger:hover { color: rgba(255,255,255,0.7); }
.faq-dark .faq-trigger svg { color: rgba(255,255,255,0.3); }
.faq-dark .faq-body { color: rgba(255,255,255,0.6); }

/* Legacy FAQ compat */
.faq-button { padding: 1.5rem; background: transparent; border: none; color: inherit; cursor: pointer; text-align: left; font-size: 1rem; font-weight: 600; width: 100%; transition: all 0.2s ease; }
.faq-button:hover { background: var(--bg-surface-hover); color: var(--accent); }
.faq-content { padding: 1.5rem; color: var(--text-secondary); font-size: 1rem; line-height: 1.7; background: var(--bg-inset); }
.chevron { transition: transform 0.2s ease; }
.chevron.open { transform: rotate(180deg); }


/* ═══ 24. HERO ═══════════════════════════════════════════════ */

.hero { padding: 6rem 0; text-align: center; }
.hero-title { font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.08; color: var(--white); margin-bottom: 0.75rem; }
.hero-subtitle { font-size: var(--text-lg); color: rgba(255,255,255,0.65); max-width: 32rem; margin: 0 auto 2rem; line-height: 1.6; }


/* ═══ 25. USP ROW ════════════════════════════════════════════ */

.usp-card { text-align: center; padding: 2.5rem 1.5rem; }
.usp-icon { width: 52px; height: 52px; border-radius: var(--radius-lg); background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.1); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; font-size: 1.375rem; }
.usp-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; line-height: var(--leading-snug); }
.usp-desc { font-size: 0.9375rem; color: var(--text-body, var(--text-secondary)); line-height: 1.6; }


/* ═══ 26. TRUST PANEL ════════════════════════════════════════ */

.trust-card { background: var(--gray-900); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius-xl); padding: 2rem; }
.trust-item { display: flex; gap: 0.75rem; align-items: flex-start; }
.trust-check { width: 20px; height: 20px; border-radius: 50%; background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }


/* ═══ 27. DISCOVERY ══════════════════════════════════════════ */

.discovery-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius-xl); padding: 1.75rem; text-decoration: none; display: block; transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease), background 200ms var(--ease); }
.discovery-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); }
.discovery-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.discovery-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.12); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 1rem; }
.discovery-title { font-weight: 700; font-size: 1.0625rem; color: var(--white); margin-bottom: 0.375rem; line-height: var(--leading-snug); }
.discovery-desc { font-size: 0.9375rem; color: rgba(255,255,255,0.6); line-height: 1.55; }
.discovery-arrow { margin-top: 0.75rem; font-size: var(--text-sm); font-weight: 600; color: var(--accent); opacity: 0; transform: translateX(-4px); transition: all 200ms var(--ease); display: flex; align-items: center; gap: 0.25rem; }
.discovery-card:hover .discovery-arrow { opacity: 1; transform: translateX(0); }
.discovery-scroll { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (min-width: 1024px) { .discovery-scroll { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 768px) { .discovery-scroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; gap: 0.875rem; padding-bottom: 0.5rem; } .discovery-scroll > * { flex: 0 0 260px; scroll-snap-align: start; } .discovery-scroll::-webkit-scrollbar { display: none; } }


/* ═══ 28. MISC UTILITIES ═════════════════════════════════════ */

/* Tabs */
.tabs-dark { display: flex; gap: 0; border-bottom: 1px solid rgba(255,255,255,0.06); overflow-x: auto; }
.tab-dark { padding: 0.75rem 1.25rem; font-size: var(--text-sm); font-weight: 500; color: rgba(255,255,255,0.4); background: none; border: none; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; transition: all 200ms var(--ease); margin-bottom: -1px; }
.tab-dark:hover { color: rgba(255,255,255,0.7); }
.tab-dark.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs-light { display: flex; gap: 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab-light { padding: 0.75rem 1.25rem; font-size: var(--text-sm); font-weight: 500; color: var(--text-muted); background: none; border: none; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; transition: all 200ms var(--ease); margin-bottom: -1px; }
.tab-light:hover { color: var(--text-secondary); }
.tab-light.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Legacy tabs compat */
.tabs-container { display: flex; gap: 1rem; border-bottom: 1px solid var(--border-default); margin-bottom: 1.5rem; }
.tab-button { padding: 1rem 1.5rem; background: transparent; border: none; color: var(--text-muted); font-weight: 500; cursor: pointer; transition: all 0.2s ease; font-size: 0.9375rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Progress bars */
.progress-track { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 300ms var(--ease); }
.progress-track-light { height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.progress-fill-light { height: 100%; background: var(--accent); border-radius: 3px; transition: width 300ms var(--ease); }

/* Legacy progress bar */
.progress-bar { height: 8px; background: var(--border-default); border-radius: 9999px; overflow: hidden; }
.progress-bar .progress-fill { background: var(--accent); }

/* Steppers */
.step-track { display: flex; align-items: center; gap: 0; }
.step-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 0.9375rem; font-weight: 600; color: rgba(255,255,255,0.3); flex-shrink: 0; transition: all 200ms var(--ease); }
.step-dot.active { border-color: var(--accent); color: var(--accent); }
.step-dot.done { border-color: var(--accent); background: var(--accent); color: var(--text-on-accent); }
.step-line { flex: 1; height: 2px; background: rgba(255,255,255,0.08); }
.step-line.done { background: var(--accent); }

/* TOC link */
.toc-link { font-size: 0.9375rem; font-weight: 600; color: var(--text-secondary); text-decoration: none; padding: 0.25rem 0.375rem; display: block; border-radius: var(--radius); transition: color 200ms var(--ease), background 200ms var(--ease); }
.toc-link:hover { color: var(--accent); background: var(--accent-soft, rgba(var(--accent-r),var(--accent-g),var(--accent-b),0.08)); }
.toc-link:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.toc-link.active { color: var(--accent); font-weight: 700; }

/* Kickers */
.kicker { font-size: 0.9375rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: rgba(255,255,255,0.6); margin-bottom: 1.25rem; }
.kicker-light { font-size: 0.9375rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); margin-bottom: 1.25rem; }
.kicker-accent { font-size: 0.9375rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--accent); margin-bottom: 1.25rem; }

/* Section divider */
.section-divider { height: 1px; background: linear-gradient(to right, transparent, rgba(255,255,255,0.08), transparent); margin: 3rem 0; border: none; }

/* Stat cards */
.stat-card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 0.75rem; padding: 1.5rem; }
.stat-value { font-size: 2.5rem; font-weight: 700; color: var(--text-primary); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.9375rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.5rem; }
.stat-change { font-size: 0.9375rem; font-weight: 600; margin-top: 0.5rem; }
.stat-change.positive { color: #10b981; }
.stat-change.negative { color: #ef4444; }

/* Pros & Cons */
.pros-cons-table { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.pros-cons-column { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 0.75rem; padding: 2rem; }
.pros-cons-column.pros { border-top: 3px solid #10b981; }
.pros-cons-column.cons { border-top: 3px solid #ef4444; }
.pros-cons-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.pros-cons-title { font-size: 1.25rem; font-weight: 600; }
.pros-cons-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.pros-cons-item:last-child { border-bottom: none; }
.pros-icon { color: #10b981; flex-shrink: 0; margin-top: 0.125rem; }
.cons-icon { color: #ef4444; flex-shrink: 0; margin-top: 0.125rem; }

/* Testimonials */
.testimonial-card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 0.75rem; padding: 2rem; }
.testimonial-quote { font-size: 1.125rem; line-height: 1.7; margin-bottom: 1.5rem; color: var(--text-secondary); }
.testimonial-author { display: flex; align-items: center; gap: 1rem; }
.testimonial-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); }
.testimonial-name { font-weight: 600; }
.testimonial-title { font-size: 0.9375rem; color: var(--text-muted); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(4px); z-index: 9998; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); background: var(--bg-elevated); border: 1px solid rgba(255,255,255,0.12); border-radius: 1rem; padding: 2rem; max-width: 32rem; width: 90%; z-index: 9999; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-title { font-size: 1.5rem; font-weight: 600; }
.modal-close { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 0.5rem; transition: color 0.2s ease; }
.modal-close:hover { color: var(--accent); }

/* Tooltip */
.tooltip-container { position: relative; display: inline-block; }
.tooltip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--bg-elevated); color: var(--text-primary); padding: 0.5rem 0.75rem; border-radius: 0.375rem; font-size: 0.9375rem; white-space: nowrap; margin-bottom: 0.5rem; border: 1px solid var(--border-default); }
.tooltip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 4px solid transparent; border-top-color: var(--bg-elevated); }

/* Theme toggle */
.theme-toggle { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0.5rem; transition: color 0.2s ease; display: flex; align-items: center; }
.theme-toggle:hover { color: var(--accent); }
.theme-toggle svg { width: 1.25rem; height: 1.25rem; }

/* Roman overline (roman-numerals.php) */
.roman-overline { position: relative; display: inline-block; }
.roman-overline::before { content: ''; position: absolute; top: -2px; left: 0; right: 0; height: 2px; background: currentColor; }


/* ═══ 29. RELATED ARTICLES ══════════════════════════════════
 *  Light-surface card grid for article/guide cross-links.
 *  Replaces inline-styled related tools sections.
 * ────────────────────────────────────────────────────────── */

.related-section { padding: 4rem 0; }
.related-section-header { margin-bottom: 0.375rem; }
.related-section-title { font-size: var(--text-2xl); font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.related-section-subtitle { font-size: 0.9375rem; color: var(--text-body, var(--text-secondary)); margin-top: 0.25rem; margin-bottom: 2rem; line-height: 1.5; }

.related-card { display: block; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; text-decoration: none; transition: box-shadow 200ms var(--ease), transform 200ms var(--ease), border-color 200ms var(--ease); }
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.related-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.related-card .badge { margin-bottom: 0.75rem; }
.related-card-title { font-weight: 600; font-size: 1.0625rem; color: var(--text); margin-bottom: 0.375rem; line-height: var(--leading-snug); }
.related-card-desc { font-size: 0.9375rem; color: var(--text-body, var(--text-secondary)); line-height: 1.55; }
.related-card-meta { font-size: 0.9375rem; color: var(--text-subtle, var(--text-muted)); margin-top: 0.75rem; }


/* ═══ 30. PROMO GRID (Apple "Why Apple" style) ═════════════
 *  Clean card grid for promoting tools / features.
 *  Generous whitespace, clear hierarchy, optional icon.
 * ────────────────────────────────────────────────────────── */

.promo-section { padding: 5rem 0; }
.promo-header { margin-bottom: 3rem; }
.promo-header-title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; color: var(--text); letter-spacing: -0.03em; line-height: var(--leading-tight); }
.promo-header-link { font-size: 1rem; font-weight: 500; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 0.25rem; }
.promo-header-link:hover { text-decoration: underline; }

.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
@media (min-width: 1024px) { .promo-grid--4 { grid-template-columns: repeat(4, 1fr); } }

.promo-card { background: var(--surface-2, var(--gray-50)); border-radius: var(--radius-xl); padding: 2rem 1.75rem; text-decoration: none; display: flex; flex-direction: column; transition: box-shadow 250ms var(--ease), transform 250ms var(--ease); position: relative; overflow: hidden; min-height: 220px; }
.promo-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.promo-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }

.promo-card-icon { width: 48px; height: 48px; margin-bottom: 1.5rem; font-size: 1.75rem; display: flex; align-items: center; justify-content: center; }
.promo-card-title { font-size: 1.25rem; font-weight: 700; color: var(--text); line-height: var(--leading-snug); margin-bottom: 0.5rem; }
.promo-card-desc { font-size: 1rem; color: var(--text-body, var(--text-secondary)); line-height: 1.6; flex: 1; }
.promo-card-action { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.9375rem; font-weight: 500; color: var(--accent); margin-top: 1.25rem; }

/* Dark variant (for dark sections) */
.promo-card-dark { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); }
.promo-card-dark:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
.promo-card-dark .promo-card-title { color: var(--white); }
.promo-card-dark .promo-card-desc { color: rgba(255,255,255,0.6); }


/* ═══ 31. FEATURE SHOWCASE (Apple "Get to know" style) ═════
 *  Large hero-cards with kicker + bold headline.
 *  Designed for visual impact sections.
 * ────────────────────────────────────────────────────────── */

.showcase-section { padding: 5rem 0; }
.showcase-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; color: var(--text); letter-spacing: -0.03em; margin-bottom: 2rem; }

.showcase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
@media (min-width: 1024px) { .showcase-grid--2 { grid-template-columns: repeat(2, 1fr); } }

.showcase-card { border-radius: var(--radius-xl); padding: 2.5rem 2rem; min-height: 300px; text-decoration: none; display: flex; flex-direction: column; justify-content: flex-start; position: relative; overflow: hidden; transition: transform 250ms var(--ease), box-shadow 250ms var(--ease); }
.showcase-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.showcase-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }

.showcase-card--light { background: var(--gray-50); color: var(--text); }
.showcase-card--dark { background: var(--gray-900); color: var(--white); }
.showcase-card--accent { background: var(--accent); color: var(--text-on-accent); }

.showcase-kicker { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.375rem; opacity: 0.7; }
.showcase-card--light .showcase-kicker { color: var(--text-body, var(--text-secondary)); }
.showcase-card--dark .showcase-kicker { color: rgba(255,255,255,0.6); }

.showcase-headline { font-size: clamp(1.375rem, 2.5vw, 1.75rem); font-weight: 700; line-height: var(--leading-snug); letter-spacing: -0.02em; }
.showcase-card--dark .showcase-headline { color: var(--white); }

.showcase-body { font-size: 1rem; line-height: 1.6; margin-top: 0.75rem; }
.showcase-card--light .showcase-body { color: var(--text-body, var(--text-secondary)); }
.showcase-card--dark .showcase-body { color: rgba(255,255,255,0.6); }

.showcase-cta { display: inline-flex; align-items: center; gap: 0.375rem; margin-top: auto; padding-top: 1.5rem; font-size: 1rem; font-weight: 500; color: var(--accent); text-decoration: none; }
.showcase-cta:hover { text-decoration: underline; }
.showcase-card--dark .showcase-cta { color: var(--accent); }
.showcase-card--accent .showcase-cta { color: var(--white); }


/* ═══ 32. SPOTLIGHT ROW (Apple "Essentials" style) ═════════
 *  2-column side-by-side cards with centered text + media.
 *  For "Essentials" or "Go deeper" sections.
 * ────────────────────────────────────────────────────────── */

.spotlight-section { padding: 5rem 0; }
.spotlight-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; color: var(--text); letter-spacing: -0.03em; margin-bottom: 2rem; }

.spotlight-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 768px) { .spotlight-grid { grid-template-columns: repeat(2, 1fr); } }

.spotlight-card { background: var(--gray-50); border-radius: var(--radius-xl); padding: 2.5rem 2rem; text-align: center; text-decoration: none; display: flex; flex-direction: column; align-items: center; transition: box-shadow 250ms var(--ease), transform 250ms var(--ease); overflow: hidden; }
.spotlight-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.spotlight-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.spotlight-card-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 0.375rem; }
.spotlight-card-desc { font-size: 1rem; color: var(--text-body, var(--text-secondary)); line-height: 1.6; max-width: 28rem; }
.spotlight-card-link { font-size: 1rem; font-weight: 500; color: var(--accent); margin-top: 0.75rem; display: inline-flex; align-items: center; gap: 0.25rem; }
.spotlight-card-link:hover { text-decoration: underline; }
.spotlight-card-media { margin-top: 2rem; max-width: 100%; border-radius: var(--radius-lg); }


/* ═══ 33. SECTION HEADERS ═══════════════════════════════════
 *  Reusable section intro pattern: title + subtitle.
 *  Replaces scattered inline-styled section intros.
 * ────────────────────────────────────────────────────────── */

.section-header { margin-bottom: 2.5rem; }
.section-header-kicker { font-size: 0.9375rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); margin-bottom: 0.5rem; }
.section-header-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--text); letter-spacing: -0.03em; line-height: var(--leading-tight); }
.section-header-subtitle { font-size: 1rem; color: var(--text-body, var(--text-secondary)); margin-top: 0.375rem; line-height: 1.55; max-width: 36rem; }

/* Dark variant */
.section-header-dark .section-header-title { color: var(--white); }
.section-header-dark .section-header-subtitle { color: rgba(255,255,255,0.6); }


/* ═══ 34. INLINE CONTENT ADS ════════════════════════════════
 *  Ad slots designed to sit inside article body without
 *  breaking reading flow. Matches editorial spacing.
 * ────────────────────────────────────────────────────────── */

.ad-inline-article { margin: 2.5rem auto; padding: 1.5rem 0; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); text-align: center; }
.ad-inline-article .ad-slot-label { font-size: 0.6875rem; color: #9CA3AF; margin-bottom: 0.5rem; }
.ad-inline-article .ad-slot-box { max-width: 336px; min-height: 280px; margin: 0 auto; }

/* Sidebar ad (sticky within article sidebar) */
.ad-sidebar { position: sticky; top: 80px; }
.ad-sidebar .ad-slot-box { width: 100%; min-height: 250px; }

/* Between-section ad */
.ad-between { background: var(--bg-light-soft, var(--gray-50)); padding: 2.5rem 0; text-align: center; }
.ad-between .ad-slot-box { max-width: 728px; min-height: 90px; margin: 0 auto; }

/* Mobile interstitial (large mobile block, Daily-Mail style) */
@media (max-width: 767px) {
    .ad-mobile-block { margin: 2rem -1.25rem; padding: 1.5rem 1.25rem; background: var(--gray-50); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
    .ad-mobile-block .ad-slot-label { margin-bottom: 0.5rem; }
    .ad-mobile-block .ad-slot-box { width: 100%; min-height: 300px; max-width: 100%; }
}


/* ═══ 35. CARD SYSTEM (universal light cards) ═══════════════
 *  Standard .card class for any light-surface card.
 *  The Content-page-early-example uses .card inline —
 *  this formalises that pattern.
 * ────────────────────────────────────────────────────────── */

.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); overflow: hidden; }
.card:hover { box-shadow: var(--shadow-sm); }
.card-body { padding: 1.5rem; }
.card-title { font-size: 1.0625rem; font-weight: 600; color: var(--text); line-height: var(--leading-snug); margin-bottom: 0.25rem; }
.card-desc { font-size: 0.9375rem; color: var(--text-body, var(--text-secondary)); line-height: 1.55; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-subtle); }


/* ═══ 36. INLINE HERO SUBTITLE FIX ═════════════════════════
 *  Many PHP templates use inline rgba(255,255,255,0.35) for
 *  hero subtitles. These selectors catch common patterns and
 *  boost contrast without HTML changes.
 * ────────────────────────────────────────────────────────── */

/* Calculator hero subtitle (inside dark section > container > p) */
.hero-subtitle,
.hero p,
section[style*="bg-dark"] p[style*="rgba(255"] {
    color: rgba(255,255,255,0.65) !important;
}
