/* ============================================
   CRÉDITO COLOMBIA — UNIFIED PREMIUM DESIGN
   Professional fintech editorial platform
   Refined dark theme with enhanced readability
   ============================================ */

:root {
  /* Background Layers - Rich depth */
  --bg0: #0a0e14;
  --bg1: #0f1419;
  --bg2: #141922;
  --panel: rgba(20, 28, 40, 0.7);
  --panel2: rgba(25, 35, 50, 0.5);
  
  /* Text Hierarchy - High contrast */
  --text: #f0f2f5;
  --text-secondary: #b4bac4;
  --muted: #7a8290;
  
  /* Interactive & Accents - Purple-blue accents on neutral base */
  --accent: #8b5cf6;
  --accent2: #a78bfa;
  --accent-muted: #7c3aed;
  --link: #c1c9d2;
  --link-hover: #a5b4fc;
  
  /* Borders & Shadows */
  --border: rgba(80, 95, 115, 0.25);
  --border-solid: #2a3442;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  
  /* Semantic - Muted, not harsh */
  --warning-bg: rgba(40, 35, 25, 0.7);
  --warning-border: rgba(180, 140, 70, 0.4);
  --warning-accent: #d4a574;
  --info-bg: rgba(25, 35, 50, 0.7);
  --info-border: rgba(155, 163, 175, 0.4);
  --info-accent: #9ba3af;
  --success-bg: rgba(25, 40, 35, 0.7);
  --success-border: rgba(80, 180, 120, 0.4);
  --success-accent: #6bc49a;
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  
  /* Spacing */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Layout */
  --width-container: 1100px;
  --width-text: 68ch;
  
  /* Visual */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BASE & RESET
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  background: var(--bg0);
  overscroll-behavior-y: none;
}

body {
  font-family: var(--font-family);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg0);
  background-image: 
    radial-gradient(ellipse at 15% 20%, rgba(155, 163, 175, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(193, 201, 210, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(155, 163, 175, 0.015) 0%, transparent 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overscroll-behavior-y: none;
  position: relative;
  isolation: isolate;
}

/* Subtle decorative blobs */
body::before {
  content: '';
  position: fixed;
  top: -25%;
  left: -15%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(155, 163, 175, 0.04) 0%, transparent 60%);
  border-radius: 50%;
  filter: blur(80px);
  z-index: -2;
  pointer-events: none;
  opacity: 0.7;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(193, 201, 210, 0.03) 0%, transparent 60%);
  border-radius: 50%;
  filter: blur(70px);
  z-index: -2;
  pointer-events: none;
  opacity: 0.6;
}

:target {
  scroll-margin-top: 6rem;
}

/* ============================================
   TYPOGRAPHY - Clear hierarchy
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  line-height: 1.2;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: clamp(var(--text-3xl), 6vw, var(--text-4xl));
  font-weight: 800;
  margin-bottom: var(--space-8);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(var(--text-2xl), 5vw, var(--text-3xl));
  font-weight: 700;
  margin-top: var(--space-20);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-5);
  border-bottom: 2px solid var(--border-solid);
  line-height: 1.15;
}

h2:first-child {
  margin-top: 0;
}

h3 {
  font-size: clamp(var(--text-xl), 4vw, var(--text-2xl));
  font-weight: 600;
  margin-top: var(--space-16);
  margin-bottom: var(--space-6);
  color: var(--accent2);
  line-height: 1.25;
}

h4 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-top: var(--space-12);
  margin-bottom: var(--space-5);
  color: var(--text-secondary);
}

p {
  margin: var(--space-6) 0;
  max-width: var(--width-text);
  line-height: 1.75;
  color: var(--text-secondary);
}

a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

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

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

small {
  font-size: var(--text-sm);
  color: var(--muted);
}

code {
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 0.9em;
  background: var(--panel);
  color: var(--accent2);
  padding: 0.2em 0.5em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

ul, ol {
  margin: var(--space-8) 0;
  padding-left: var(--space-10);
  max-width: var(--width-text);
  line-height: 1.75;
}

li {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

li::marker {
  color: var(--accent-muted);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: var(--width-container);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.skip-link {
  position: absolute;
  top: -999px;
  left: var(--space-8);
  background: var(--accent);
  color: white;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  z-index: 1001;
  transition: top var(--transition);
}

.skip-link:focus {
  top: var(--space-8);
}

/* ============================================
   HEADER - Unified across all pages
   ============================================ */
.site-header {
  background: rgba(10, 14, 20, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5rem;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.site-name {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 50%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: all 0.3s ease;
  order: 1;
  position: relative;
  display: inline-block;
}

.site-name::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #8b5cf6, #6366f1, #3b82f6);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
  transition: width 0.4s ease;
}

a.site-name:hover::after {
  width: 100%;
}

a.site-name:hover {
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.4));
  text-decoration: none;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  order: 2;
  font-size: var(--text-sm);
  font-weight: 600;
}

.lang-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.lang-link:hover {
  color: var(--accent2);
  background: rgba(99, 102, 241, 0.1);
}

.lang-link--active {
  color: var(--accent2);
  background: rgba(99, 102, 241, 0.15);
}

.lang-separator {
  color: var(--border);
}

/* Mobile menu toggle button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  position: relative;
  order: 3;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-toggle:hover span {
  background: var(--accent2);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(9.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-9.5px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  order: 2;
  flex: 1;
  justify-content: flex-end;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #8b5cf6, #6366f1, #3b82f6);
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.4);
  transition: width 0.3s ease;
}

.nav__link:hover {
  color: var(--text);
  background: var(--panel2);
  text-decoration: none;
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.2));
}

.nav__link:hover::after {
  width: calc(100% - 2rem);
}

.nav__link--active,
.nav__link[aria-current="page"] {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(99, 102, 241, 0.4));
  color: #e0e7ff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.25);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.nav__link--active::after,
.nav__link[aria-current="page"]::after {
  display: none;
}

.nav__link--active:hover,
.nav__link[aria-current="page"]:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.55), rgba(99, 102, 241, 0.55));
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.35);
  border-color: rgba(139, 92, 246, 0.3);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.site-main {
  padding: var(--space-16) 0 var(--space-24);
  min-height: 70vh;
}

.page-header,
.page__header {
  margin-bottom: var(--space-16);
  max-width: var(--width-text);
  padding-bottom: var(--space-10);
  border-bottom: 1px solid var(--border-solid);
}

.page-header h1,
.page__header h1 {
  margin-bottom: var(--space-6);
}

.page-header p,
.page__header p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-top: var(--space-5);
  line-height: 1.7;
}

/* ============================================
   CREDIT CALCULATOR WIDGET
   ============================================ */
.calculator-widget {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  margin: var(--space-16) 0;
  box-shadow: var(--shadow);
}

.calculator-widget h2 {
  font-size: var(--text-2xl);
  margin: 0 0 var(--space-3);
  border: none;
  padding: 0;
  background: linear-gradient(135deg, #e0e7ff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.calculator-intro {
  color: var(--text-secondary);
  margin-bottom: var(--space-10);
  font-size: var(--text-base);
}

.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-8);
}

.calculator-inputs {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.input-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.label-text {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
}

.label-value {
  color: var(--accent2);
  font-size: var(--text-lg);
  font-weight: 700;
}

.input-group input[type="range"] {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 100%);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  opacity: 0.9;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.input-group input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 100%);
  border-radius: 3px;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.input-group input[type="range"]::-moz-range-track {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 100%);
  border-radius: 3px;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.input-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
  transition: transform 0.2s;
}

.input-group input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.6);
}

.input-group input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
  transition: transform 0.2s;
}

.input-group input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.6);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--muted);
}

.calculator-results {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  align-self: start;
}

.result-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.result-card--primary {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.15));
  border-color: rgba(139, 92, 246, 0.3);
}

.result-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 600;
}

.result-value {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.result-card--primary .result-value {
  background: linear-gradient(135deg, #a5b4fc, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.calculator-note {
  font-size: var(--text-sm);
  color: var(--muted);
  font-style: italic;
  margin-top: var(--space-4);
}

.calculator-cta {
  margin-top: var(--space-8);
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-base);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
  text-decoration: none;
}

h1 + p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-top: var(--space-8);
  margin-bottom: var(--space-12);
  max-width: var(--width-text);
  line-height: 1.7;
}

/* ============================================
   CARDS & PANELS - Unified component system
   ============================================ */
.toc,
.page-intro {
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin: var(--space-16) 0;
  max-width: var(--width-text);
  box-shadow: var(--shadow);
}

.toc h2,
.toc p strong {
  font-size: var(--text-sm);
  font-weight: 700;
  margin: 0 0 var(--space-6) 0;
  padding: 0;
  border: none;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li {
  margin: 0;
  padding: 0;
}

.toc li + li {
  margin-top: var(--space-3);
}

.toc a {
  display: block;
  padding: var(--space-3) var(--space-5);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.toc a:hover {
  background: var(--panel2);
  color: var(--link);
  border-left-color: var(--accent);
  text-decoration: none;
  transform: translateX(3px);
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */
.section {
  margin: var(--space-16) 0;
}

.section--related,
section[aria-labelledby*="relacionada"],
section[aria-labelledby*="temas"] {
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin: var(--space-16) 0;
  max-width: var(--width-text);
  box-shadow: var(--shadow);
}

.section--related h2,
section[aria-labelledby*="relacionada"] h2 {
  margin-top: 0;
  font-size: var(--text-xl);
  border: none;
  padding-bottom: var(--space-5);
  color: var(--text);
}

/* Warning/Important - Dark muted theme */
.content-section--warning,
section[aria-labelledby*="trust"],
section[aria-labelledby*="warning"],
section[aria-labelledby*="seguridad"],
section[aria-labelledby*="importante"],
section[aria-labelledby*="alert"],
section[aria-labelledby*="confianza"],
section[aria-labelledby*="riesgo"] {
  background: var(--warning-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--warning-border);
  border-left: 3px solid var(--warning-accent);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin: var(--space-16) 0;
  max-width: var(--width-text);
  box-shadow: var(--shadow);
}

.content-section--warning h2,
.content-section--warning h3,
section[aria-labelledby*="warning"] h2,
section[aria-labelledby*="importante"] h2 {
  margin-top: 0;
  color: var(--warning-accent);
  border: none;
  padding-bottom: 0;
}

.content-section--warning p,
section[aria-labelledby*="warning"] p {
  color: var(--text-secondary);
}

/* Info/Checklist - Dark muted theme */
section[aria-labelledby*="checklist"],
section[aria-labelledby*="verificacion"],
section[aria-labelledby*="verificación"],
section[aria-labelledby*="steps"],
section[aria-labelledby*="pasos"],
section[aria-labelledby*="como"],
section[aria-labelledby*="proceso"] {
  background: var(--info-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--info-border);
  border-left: 3px solid var(--info-accent);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin: var(--space-16) 0;
  max-width: var(--width-text);
  box-shadow: var(--shadow);
}

section[aria-labelledby*="checklist"] h2,
section[aria-labelledby*="steps"] h2 {
  margin-top: 0;
  color: var(--info-accent);
  border: none;
  padding-bottom: 0;
}

section[aria-labelledby*="checklist"] p,
section[aria-labelledby*="steps"] p {
  color: var(--text-secondary);
}

/* Success - Dark muted theme */
section[aria-labelledby*="ventaja"],
section[aria-labelledby*="beneficio"],
section[aria-labelledby*="consejo"] {
  background: var(--success-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--success-border);
  border-left: 3px solid var(--success-accent);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin: var(--space-16) 0;
  max-width: var(--width-text);
  box-shadow: var(--shadow);
}

section[aria-labelledby*="ventaja"] h2,
section[aria-labelledby*="beneficio"] h2 {
  margin-top: 0;
  color: var(--success-accent);
  border: none;
  padding-bottom: 0;
}

section[aria-labelledby*="ventaja"] p,
section[aria-labelledby*="beneficio"] p {
  color: var(--text-secondary);
}

/* ============================================
   FAQ / DETAILS
   ============================================ */
.faq,
.section--faq {
  margin: var(--space-20) 0;
}

details {
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

details:hover {
  border-color: var(--border-solid);
  box-shadow: var(--shadow);
}

details[open] {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

summary {
  padding: var(--space-6) var(--space-8);
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  transition: all var(--transition);
  color: var(--text);
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-weight: 600;
  font-size: var(--text-xl);
  color: var(--accent2);
  transition: all var(--transition);
}

summary:hover::before {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

details[open] summary::before {
  content: '−';
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: rotate(180deg);
}

summary:hover {
  background: var(--panel2);
}

summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

details[open] summary {
  border-bottom: 1px solid var(--border);
}

details p {
  padding: var(--space-6) var(--space-8);
  margin: 0;
  line-height: 1.75;
  color: var(--text-secondary);
}

details ul,
details ol {
  padding-left: var(--space-10);
  margin: var(--space-5) var(--space-8);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg1);
  border-top: 1px solid var(--border-solid);
  margin-top: var(--space-24);
  padding: var(--space-20) 0 var(--space-12);
}

.site-footer p {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin: var(--space-5) 0;
  max-width: var(--width-text);
}

.site-footer nav,
.nav--footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin: var(--space-12) 0 var(--space-6);
}

.site-footer .nav__link {
  padding: 0;
  font-size: var(--text-sm);
  color: var(--muted);
  background: transparent;
  font-weight: 500;
}

.site-footer .nav__link:hover {
  color: var(--link);
}

/* ============================================
   CUSTOM SCROLLBAR (subtle)
   ============================================ */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg0);
}

::-webkit-scrollbar-thumb {
  background: var(--border-solid);
  border-radius: 6px;
  border: 2px solid var(--bg0);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-muted);
}

/* ============================================
   UTILITIES
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  body::before,
  body::after {
    width: 450px;
    height: 450px;
  }
  
  .container {
    padding: 0 var(--space-5);
  }
  
  /* Улучшенный мобильный хедер */
  .site-header .container {
    min-height: auto;
    padding: var(--space-4) var(--space-5);
    position: relative;
  }
  
  .site-name {
    font-size: var(--text-xl);
    order: 1;
  }
  
  /* Show hamburger button on mobile */
  .nav-toggle {
    display: flex;
    order: 2;
  }
  
  /* Hide navigation by default on mobile */
  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 14, 20, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-16) var(--space-8);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 999;
    order: 3;
  }
  
  /* Show navigation when open */
  .site-nav.nav-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  
  .nav__link {
    padding: var(--space-5) var(--space-6);
    font-size: var(--text-lg);
    width: auto;
    min-width: 200px;
    justify-content: center;
    text-align: center;
    border-radius: var(--radius-lg);
  }
  
  /* Мобильный контент */
  .site-main {
    padding: var(--space-10) 0 var(--space-16);
  }
  
  .page-header,
  .page__header {
    margin-bottom: var(--space-12);
    padding-bottom: var(--space-6);
  }
  
  h1 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-6);
  }
  
  h2 {
    font-size: var(--text-xl);
    margin-top: var(--space-12);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
  }
  
  h3 {
    font-size: var(--text-lg);
    margin-top: var(--space-10);
    margin-bottom: var(--space-5);
  }
  
  p {
    font-size: var(--text-base);
  }
  
  /* Карточки и панели на мобильных */
  .toc,
  .section--related,
  .content-section--warning,
  .page-intro,
  section[aria-labelledby*="checklist"],
  section[aria-labelledby*="ventaja"],
  section[aria-labelledby*="beneficio"] {
    padding: var(--space-6);
    margin: var(--space-10) 0;
    border-radius: var(--radius-lg);
  }
  
  /* Офферы на мобильных */
  .offers-grid--2col {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .offer-card {
    padding: var(--space-6);
  }
  
  /* Calculator mobile styles */
  .calculator-widget {
    padding: var(--space-6);
  }
  
  .calculator-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .result-value {
    font-size: var(--text-2xl);
  }
  
  .calculator-cta {
    margin-top: var(--space-6);
  }
  
  .offer-card__header {
    padding-bottom: var(--space-4);
  }
  
  .offer-card__logo {
    width: 40px;
    height: 40px;
  }
  
  .offer-card__title {
    font-size: var(--text-base);
  }
  
  .offer-card__list li {
    font-size: var(--text-xs);
  }
  
  .offer-card__button {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
  }
  
  /* FAQ на мобильных */
  summary {
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-sm);
    gap: var(--space-4);
  }
  
  summary::before {
    width: 1.5rem;
    height: 1.5rem;
    font-size: var(--text-lg);
  }
  
  details p {
    padding: var(--space-5) var(--space-5);
    font-size: var(--text-sm);
  }
  
  details ul,
  details ol {
    padding-left: var(--space-8);
    margin: var(--space-4) var(--space-5);
  }
  
  /* Футер на мобильных */
  .site-footer {
    padding: var(--space-12) 0 var(--space-10);
  }
  
  .site-footer nav,
  .nav--footer {
    flex-direction: column;
    gap: var(--space-5);
  }
  
  .site-footer p {
    font-size: var(--text-xs);
  }
  
  /* Списки на мобильных */
  ul, ol {
    padding-left: var(--space-8);
    margin: var(--space-6) 0;
  }
  
  li {
    margin-bottom: var(--space-3);
    font-size: var(--text-sm);
  }
}

/* Очень маленькие экраны (< 400px) */
@media (max-width: 400px) {
  .container {
    padding: 0 var(--space-4);
  }
  
  .site-header .container {
    padding: var(--space-3) var(--space-4);
  }
  
  .site-name {
    font-size: var(--text-lg);
  }
  
  .nav__link {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }
  
  h1 {
    font-size: var(--text-xl);
  }
  
  .offer-card {
    padding: var(--space-5);
  }
  
  .offer-card__logo {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 700px) {
  .offers-grid--2col {
    grid-template-columns: 1fr;
  }
}

@media print {
  html, body {
    background: white !important;
    color: black !important;
  }
  
  .site-header,
  .site-footer {
    display: none;
  }
}
.offers-grid--2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-12);
}

.offer-card {
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.offer-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.offer-card__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: white;
  padding: var(--space-2);
}

.offer-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
}

.offer-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex-grow: 1;
}

.offer-card__list li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0;
}

.offer-card__button {
  width: 100%;
  text-align: center;
  justify-content: center;
  background: var(--success-accent);
  color: white !important;
  font-weight: 700;
  padding: var(--space-4) var(--space-6);
}

.offer-card__button:hover {
  background: var(--success-border);
  text-decoration: none;
  transform: translateY(-2px);
}

.offers-grid__note {
  margin-top: var(--space-8);
  font-size: var(--text-xs);
  color: var(--muted);
  text-align: center;
  max-width: 100%;
}

@media (max-width: 700px) {
  .offers-grid--2col {
    grid-template-columns: 1fr;
  }
}
