/* ============================================================
   JOPE — Design System CSS
   Mobile-first, zero-dependency, CEO-grade maintainability
   ============================================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Color - Light (default) */
  --color-bg: #FAFAFA;
  --color-bg-elevated: #FFFFFF;
  --color-bg-subtle: #F0F0F5;
  --color-text: #1A1A2E;
  --color-text-muted: #6B6B7A;
  --color-text-inverse: #FFFFFF;
  --color-border: #E4E4EB;
  --color-border-strong: #D0D0DB;

  --color-brand: #0066CC;
  --color-brand-hover: #0052A3;
  --color-brand-light: #E8F0FE;
  --color-brand-text: #004499;

  --color-accent: #FF6B35;
  --color-accent-hover: #E85D2D;
  --color-accent-light: #FFF4F0;

  --color-success: #059669;
  --color-success-light: #ECFDF5;
  --color-warning: #D97706;
  --color-warning-light: #FFFBEB;
  --color-error: #DC2626;
  --color-error-light: #FEF2F2;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 28px rgba(0,0,0,.08);
  --shadow-xl: 0 20px 40px rgba(0,0,0,.10);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Spacing Scale */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --fs-display: clamp(2.5rem, 5vw + 1rem, 4rem);
  --fs-h1: clamp(2rem, 3vw + 1rem, 3rem);
  --fs-h2: clamp(1.5rem, 2vw + 1rem, 2.25rem);
  --fs-h3: clamp(1.25rem, 1.5vw + .5rem, 1.75rem);
  --fs-h4: clamp(1.125rem, 1vw + .75rem, 1.375rem);
  --fs-body: 1rem;
  --fs-sm: .875rem;
  --fs-xs: .75rem;
  --fs-xs2: .6875rem;

  --lh-tight: 1.15;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 720px;
  --header-height: 64px;

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;

  /* Z-index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;
  --z-tooltip: 500;
}

/* Dark Mode */
[data-theme="dark"] {
  --color-bg: #0A0A12;
  --color-bg-elevated: #12121C;
  --color-bg-subtle: #1A1A2A;
  --color-text: #F1F1F5;
  --color-text-muted: #9AA0A6;
  --color-border: #2A2A3E;
  --color-border-strong: #3A3A4E;
  --color-brand: #4D9FFF;
  --color-brand-hover: #7AB3FF;
  --color-brand-light: #1E3A5F;
  --color-brand-text: #B3D4FF;
  --color-accent: #FF8C5E;
  --color-accent-hover: #FFA87F;
  --color-accent-light: #3D251A;
  --color-success: #34D399;
  --color-success-light: #064E2E;
  --color-warning: #FBBF24;
  --color-warning-light: #3D3200;
  --color-error: #F87171;
  --color-error-light: #3D1A1A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 28px rgba(0,0,0,.5);
  --shadow-xl: 0 20px 40px rgba(0,0,0,.6);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--color-brand); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-brand-hover); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; border-radius: var(--radius-sm); }

:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }

/* --- Utility Classes --- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-3); }
.container-narrow { max-width: var(--container-narrow); }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* Typography */
h1, h2, h3, h4, h5, h6 { line-height: var(--lh-tight); font-weight: var(--fw-bold); color: var(--color-text); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin-bottom: var(--space-3); line-height: var(--lh-relaxed); }
p:last-child { margin-bottom: 0; }

.lead { font-size: clamp(1.125rem, 1.5vw + .75rem, 1.25rem); line-height: var(--lh-relaxed); color: var(--color-text-muted); font-weight: var(--fw-normal); }

.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-xs2 { font-size: var(--fs-xs2); }

.fw-medium { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold { font-weight: var(--fw-bold); }

/* Spacing */
.mt-1 { margin-top: var(--space-1); } .mt-2 { margin-top: var(--space-2); } .mt-3 { margin-top: var(--space-3); } .mt-4 { margin-top: var(--space-4); } .mt-5 { margin-top: var(--space-5); } .mt-6 { margin-top: var(--space-6); } .mt-7 { margin-top: var(--space-7); } .mt-8 { margin-top: var(--space-8); }
.mb-1 { margin-bottom: var(--space-1); } .mb-2 { margin-bottom: var(--space-2); } .mb-3 { margin-bottom: var(--space-3); } .mb-4 { margin-bottom: var(--space-4); } .mb-5 { margin-bottom: var(--space-5); } .mb-6 { margin-bottom: var(--space-6); } .mb-7 { margin-bottom: var(--space-7); } .mb-8 { margin-bottom: var(--space-8); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-5 { padding-top: var(--space-5); padding-bottom: var(--space-5); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-7 { padding-top: var(--space-7); padding-bottom: var(--space-7); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }

/* Flex/Grid Helpers */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ============================================================
   COMPONENTS
   ============================================================ */

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-family: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  line-height: 1.5; border: 2px solid transparent; border-radius: var(--radius-md);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: all var(--transition-fast);
}
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--color-brand); color: var(--color-text-inverse); border-color: var(--color-brand);
}
.btn-primary:hover:not(:disabled) { background: var(--color-brand-hover); border-color: var(--color-brand-hover); color: var(--color-text-inverse); text-decoration: none; }

.btn-secondary {
  background: transparent; color: var(--color-brand); border-color: var(--color-brand);
}
.btn-secondary:hover:not(:disabled) { background: var(--color-brand-light); color: var(--color-brand-text); text-decoration: none; }

.btn-accent {
  background: var(--color-accent); color: var(--color-text-inverse); border-color: var(--color-accent);
}
.btn-accent:hover:not(:disabled) { background: var(--color-accent-hover); border-color: var(--color-accent-hover); color: var(--color-text-inverse); text-decoration: none; }

.btn-ghost {
  background: transparent; color: var(--color-text); border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--color-bg-subtle); text-decoration: none; }

.btn-sm { padding: var(--space-1) var(--space-3); font-size: var(--fs-xs); }
.btn-lg { padding: var(--space-3) var(--space-5); font-size: var(--fs-body); }

.btn-block { width: 100%; }

/* --- Badges --- */
.badge {
  display: inline-flex; align-items: center; padding: var(--space-1) var(--space-2);
  font-size: var(--fs-xs2); font-weight: var(--fw-semibold); line-height: 1.4;
  border-radius: var(--radius-full); white-space: nowrap;
}
.badge-primary { background: var(--color-brand-light); color: var(--color-brand-text); }
.badge-accent { background: var(--color-accent-light); color: var(--color-accent); }
.badge-success { background: var(--color-success-light); color: var(--color-success); }
.badge-warning { background: var(--color-warning-light); color: var(--color-warning); }
.badge-neutral { background: var(--color-bg-subtle); color: var(--color-text-muted); }
.badge-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text-muted); }

/* --- Cards --- */
.card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-normal), border-color var(--transition-normal), transform var(--transition-fast);
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--color-border-strong); transform: translateY(-2px); }

.card-body { padding: var(--space-4); }

/* --- Product Card (Core Component) --- */
.product-card { display: flex; flex-direction: column; height: 100%; }
.product-card__image { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--color-bg-subtle); }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.product-card:hover .product-card__image img { transform: scale(1.04); }
.product-card__badges { position: absolute; top: var(--space-2); left: var(--space-2); display: flex; flex-direction: column; gap: var(--space-1); z-index: 1; }
.product-card__content { padding: var(--space-3); display: flex; flex-direction: column; flex: 1; }
.product-card__category { font-size: var(--fs-xs2); color: var(--color-brand); font-weight: var(--fw-medium); text-transform: uppercase; letter-spacing: .05em; margin-bottom: var(--space-1); }
.product-card__title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: var(--lh-tight); margin-bottom: var(--space-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__rating { display: flex; align-items: center; gap: var(--space-1); margin-bottom: var(--space-2); font-size: var(--fs-xs); color: var(--color-text-muted); }
.product-card__stars { color: var(--color-warning); letter-spacing: -1px; }
.product-card__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: auto; padding-top: var(--space-2); border-top: 1px solid var(--color-border); }
.product-card__price { font-size: var(--fs-body); font-weight: var(--fw-bold); color: var(--color-text); }
.product-card__price-old { font-size: var(--fs-xs); color: var(--color-text-muted); text-decoration: line-through; margin-left: var(--space-2); }
.product-card__cta { flex-shrink: 0; }

/* --- Comparison Table --- */
.comparison-table { width: 100%; overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--color-border); }
.comparison-table table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 600px; }
.comparison-table th, .comparison-table td { padding: var(--space-3); text-align: left; border-bottom: 1px solid var(--color-border); }
.comparison-table th { background: var(--color-bg-subtle); font-weight: var(--fw-semibold); color: var(--color-text); position: sticky; top: 0; z-index: 1; }
.comparison-table td { background: var(--color-bg-elevated); }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: var(--color-bg-subtle); }
.comparison-table .product-name { font-weight: var(--fw-semibold); white-space: nowrap; }
.comparison-table .badge { font-size: var(--fs-xs2); }
.comparison-table .check { color: var(--color-success); text-align: center; }
.comparison-table .price { font-weight: var(--fw-bold); white-space: nowrap; }
.comparison-table .cta-cell { text-align: center; }

/* --- Category Grid --- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); }
@media (max-width: 600px) { .category-grid { grid-template-columns: 1fr; } }

/* --- Header / Nav --- */
.header { position: sticky; top: 0; z-index: var(--z-sticky); background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border); height: var(--header-height); }
[data-theme="dark"] .header { background: rgba(18,18,28,.9); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-3); }
.header__logo { font-size: var(--fs-h3); font-weight: var(--fw-bold); color: var(--color-text); text-decoration: none; letter-spacing: -.02em; }
.header__logo:hover { color: var(--color-brand); text-decoration: none; }
.header__nav { display: none; gap: var(--space-1); }
@media (min-width: 768px) { .header__nav { display: flex; } }
.header__nav-link { padding: var(--space-1) var(--space-2); font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--color-text-muted); border-radius: var(--radius-md); transition: all var(--transition-fast); text-decoration: none; }
.header__nav-link:hover, .header__nav-link[aria-current="page"] { color: var(--color-brand); background: var(--color-brand-light); text-decoration: none; }
.header__actions { display: flex; align-items: center; gap: var(--space-2); }
.header__theme-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--color-border); background: var(--color-bg-elevated); border-radius: var(--radius-md); cursor: pointer; color: var(--color-text); transition: all var(--transition-fast); }
.header__theme-toggle:hover { background: var(--color-bg-subtle); border-color: var(--color-border-strong); }
.header__mobile-menu { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: none; background: transparent; cursor: pointer; color: var(--color-text); }
@media (min-width: 768px) { .header__mobile-menu { display: none; } }

/* Mobile Nav Drawer */
.mobile-nav { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--color-bg); transform: translateX(100%); transition: transform var(--transition-normal); display: flex; flex-direction: column; padding: var(--space-6) var(--space-4); overflow-y: auto; }
.mobile-nav.is-open { transform: translateX(0); }
.mobile-nav__close { position: absolute; top: var(--space-3); right: var(--space-3); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--color-border); background: var(--color-bg-elevated); border-radius: var(--radius-md); cursor: pointer; }
.mobile-nav__link { display: block; padding: var(--space-3) var(--space-2); font-size: var(--fs-body); font-weight: var(--fw-medium); color: var(--color-text); text-decoration: none; border-radius: var(--radius-md); }
.mobile-nav__link:hover { background: var(--color-bg-subtle); color: var(--color-brand); }

.mobile-nav-overlay { position: fixed; inset: 0; z-index: calc(var(--z-modal) - 1); background: rgba(0,0,0,.5); opacity: 0; visibility: hidden; transition: opacity var(--transition-normal), visibility var(--transition-normal); }
.mobile-nav-overlay.is-open { opacity: 1; visibility: visible; }

/* --- Hero --- */
.hero { padding: var(--space-8) 0; text-align: center; }
.hero__badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-3); background: var(--color-brand-light); color: var(--color-brand-text); border-radius: var(--radius-full); font-size: var(--fs-xs); font-weight: var(--fw-medium); margin-bottom: var(--space-4); }
.hero__title { font-size: var(--fs-display); font-weight: var(--fw-bold); line-height: var(--lh-tight); margin-bottom: var(--space-4); letter-spacing: -.02em; }
.hero__subtitle { font-size: clamp(1.125rem, 2vw + .75rem, 1.375rem); line-height: var(--lh-relaxed); color: var(--color-text-muted); max-width: var(--container-narrow); margin: 0 auto var(--space-6); }
.hero__cta-group { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-bottom: var(--space-6); }
.hero__trust { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-4); color: var(--color-text-muted); font-size: var(--fs-sm); }
.hero__trust-item { display: flex; align-items: center; gap: var(--space-1); }
.hero__trust-separator { color: var(--color-border); }

/* --- Section --- */
.section { padding: var(--space-7) 0; }
.section-header { text-align: center; max-width: var(--container-narrow); margin: 0 auto var(--space-6); }
.section-header__label { display: inline-block; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--color-brand); text-transform: uppercase; letter-spacing: .1em; margin-bottom: var(--space-2); }
.section-header__title { font-size: var(--fs-h2); margin-bottom: var(--space-2); }
.section-header__description { color: var(--color-text-muted); }

/* --- Feature/Value Props --- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-4); }
.feature-card { padding: var(--space-5); background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: var(--radius-lg); text-align: center; transition: all var(--transition-normal); }
.feature-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }
.feature-card__icon { width: 48px; height: 48px; margin: 0 auto var(--space-3); color: var(--color-brand); }
.feature-card__title { font-size: var(--fs-h4); margin-bottom: var(--space-2); }
.feature-card__description { color: var(--color-text-muted); font-size: var(--fs-sm); margin: 0; }

/* --- Newsletter Form --- */
.newsletter { background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-6); text-align: center; }
.newsletter__title { font-size: var(--fs-h3); margin-bottom: var(--space-1); }
.newsletter__description { color: var(--color-text-muted); margin-bottom: var(--space-4); max-width: 400px; margin-left: auto; margin-right: auto; }
.newsletter__form { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; max-width: 480px; margin: 0 auto; }
.newsletter__input { flex: 1; min-width: 240px; padding: var(--space-2) var(--space-3); font-family: inherit; font-size: var(--fs-body); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); color: var(--color-text); transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
.newsletter__input:focus { outline: none; border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-brand-light); }
.newsletter__submit { white-space: nowrap; }
.newsletter__disclaimer { margin-top: var(--space-3); font-size: var(--fs-xs); color: var(--color-text-muted); }
.newsletter__disclaimer a { color: var(--color-text-muted); }
.newsletter__disclaimer a:hover { color: var(--color-brand); }
.newsletter__success { display: none; text-align: center; padding: var(--space-4); color: var(--color-success); }
.newsletter__success.is-visible { display: block; }
.newsletter__form.is-hidden { display: none; }

/* --- Footer --- */
.footer { background: var(--color-bg-elevated); border-top: 1px solid var(--color-border); padding: var(--space-7) 0 var(--space-4); margin-top: var(--space-8); }
.footer__grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--space-6); margin-bottom: var(--space-6); }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand { max-width: 280px; }
.footer__logo { font-size: var(--fs-h3); font-weight: var(--fw-bold); color: var(--color-text); text-decoration: none; display: inline-block; margin-bottom: var(--space-3); }
.footer__tagline { color: var(--color-text-muted); font-size: var(--fs-sm); line-height: var(--lh-relaxed); margin: 0; }
.footer__column-title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); margin-bottom: var(--space-3); }
.footer__links { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.footer__link { color: var(--color-text); font-size: var(--fs-sm); text-decoration: none; transition: color var(--transition-fast); }
.footer__link:hover { color: var(--color-brand); text-decoration: none; }
.footer__bottom { padding-top: var(--space-4); border-top: 1px solid var(--color-border); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); font-size: var(--fs-xs); color: var(--color-text-muted); }
.footer__social { display: flex; gap: var(--space-3); }
.footer__social-link { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-text-muted); transition: all var(--transition-fast); }
.footer__social-link:hover { color: var(--color-brand); border-color: var(--color-brand); background: var(--color-brand-light); text-decoration: none; }

/* --- Disclosure (Affiliate) --- */
.disclosure { background: var(--color-warning-light); border: 1px solid var(--color-warning); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); margin: var(--space-4) 0; font-size: var(--fs-sm); line-height: var(--lh-normal); color: #7A5200; }
[data-theme="dark"] .disclosure { background: var(--color-warning-light); color: var(--color-warning); }
.disclosure__title { font-weight: var(--fw-semibold); margin-bottom: var(--space-1); display: flex; align-items: center; gap: var(--space-1); }
.disclosure a { color: inherit; text-decoration: underline; }
.disclosure a:hover { color: var(--color-brand); }

/* --- Author Box --- */
.author-box { display: flex; gap: var(--space-3); padding: var(--space-4); background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: var(--radius-lg); margin: var(--space-5) 0; }
.author-box__avatar { width: 64px; height: 64px; border-radius: var(--radius-full); object-fit: cover; flex-shrink: 0; }
.author-box__name { font-weight: var(--fw-semibold); margin-bottom: var(--space-1); }
.author-box__bio { font-size: var(--fs-sm); color: var(--color-text-muted); margin: 0 0 var(--space-2); }
.author-box__links { display: flex; gap: var(--space-3); }
.author-box__link { font-size: var(--fs-xs); color: var(--color-brand); font-weight: var(--fw-medium); }

/* --- Breadcrumb --- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); font-size: var(--fs-sm); color: var(--color-text-muted); margin-bottom: var(--space-4); }
.breadcrumb__item { display: flex; align-items: center; gap: var(--space-1); }
.breadcrumb__separator { color: var(--color-border); }
.breadcrumb__link { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb__link:hover { color: var(--color-brand); }
.breadcrumb__current { color: var(--color-text); font-weight: var(--fw-medium); }

/* --- Table of Contents --- */
.toc { position: sticky; top: calc(var(--header-height) + var(--space-4)); max-height: calc(100vh - var(--header-height) - var(--space-8)); overflow-y: auto; padding: var(--space-4); background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: var(--radius-lg); font-size: var(--fs-sm); }
.toc__title { font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); margin-bottom: var(--space-2); padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-border); }
.toc__list { list-style: none; display: flex; flex-direction: column; gap: var(--space-1); }
.toc__link { display: block; padding: var(--space-1) 0; color: var(--color-text-muted); text-decoration: none; border-left: 2px solid transparent; padding-left: var(--space-2); margin-left: calc(var(--space-2) * -1); transition: all var(--transition-fast); }
.toc__link:hover { color: var(--color-brand); border-left-color: var(--color-brand); background: var(--color-brand-light); }
.toc__link.is-active { color: var(--color-brand); border-left-color: var(--color-brand); font-weight: var(--fw-medium); }

/* --- Update Log / Changelog --- */
.update-log { list-style: none; border-left: 2px solid var(--color-border); padding-left: var(--space-4); margin: var(--space-5) 0; }
.update-log__item { position: relative; padding: var(--space-3) 0 var(--space-3) var(--space-4); margin-left: calc(var(--space-4) * -1); }
.update-log__item::before { content: ''; position: absolute; left: -5px; top: var(--space-3); width: 10px; height: 10px; border-radius: 50%; background: var(--color-brand); border: 2px solid var(--color-bg); }
.update-log__date { font-size: var(--fs-xs); color: var(--color-text-muted); font-weight: var(--fw-medium); margin-bottom: var(--space-1); }
.update-log__title { font-weight: var(--fw-semibold); margin-bottom: var(--space-1); }
.update-log__description { font-size: var(--fs-sm); color: var(--color-text-muted); margin: 0; }

/* --- Skip Link --- */
.skip-link { position: absolute; top: -100%; left: var(--space-3); z-index: var(--z-tooltip); padding: var(--space-2) var(--space-3); background: var(--color-brand); color: var(--color-text-inverse); font-weight: var(--fw-semibold); border-radius: var(--radius-md); }
.skip-link:focus { top: var(--space-3); }

/* --- Loading States --- */
.skeleton { background: linear-gradient(90deg, var(--color-bg-subtle) 25%, var(--color-border) 50%, var(--color-bg-subtle) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --- Print Styles --- */
@media print {
  .header, .footer, .btn, .newsletter, .toc, .mobile-nav, .mobile-nav-overlay { display: none !important; }
  .hero { padding: var(--space-4) 0; }
  .section { padding: var(--space-4) 0; }
  a { text-decoration: none; color: var(--color-text); }
  a[href]::after { content: " (" attr(href) ")"; font-size: var(--fs-xs); color: var(--color-text-muted); }
  .product-card { break-inside: avoid; box-shadow: none; border: 1px solid var(--color-border); }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .hero { padding: var(--space-6) 0; }
  .section { padding: var(--space-6) 0; }
  .newsletter { padding: var(--space-4); }
  .footer { padding: var(--space-5) 0 var(--space-3); }
}