/* ==========================================================================
   HIPOTECA CLARA - DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-app: #f8fafc;
  --bg-gradient: radial-gradient(circle at 50% 0%, #ecfdf5 0%, #f8fafc 65%);
  --surface: #ffffff;
  --surface-raised: #f1f5f9;
  --surface-muted: #f8fafc;
  
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #10b981;
  
  --brand-primary: #059669;
  --brand-primary-hover: #047857;
  --brand-primary-light: #ecfdf5;
  --brand-primary-glow: rgba(5, 150, 105, 0.15);
  
  --brand-accent: #2563eb;
  --brand-accent-light: #eff6ff;
  --brand-accent-glow: rgba(37, 99, 235, 0.12);

  --chart-capital: #059669;
  --chart-capital-bg: rgba(5, 150, 105, 0.12);
  --chart-interest: #6366f1;
  --chart-interest-bg: rgba(99, 102, 241, 0.12);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #475569;
  --text-inverse: #ffffff;

  --badge-green-bg: #d1fae5;
  --badge-green-text: #065f46;
  --badge-red-bg: #fee2e2;
  --badge-red-text: #991b1b;
  --badge-blue-bg: #dbeafe;
  --badge-blue-text: #1e40af;
  
  /* Typography */
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 32px -4px rgba(15, 23, 42, 0.08), 0 6px 12px -4px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 20px 40px -15px rgba(15, 23, 42, 0.07), 0 0 0 1px rgba(226, 232, 240, 0.8);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-app);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--brand-primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  z-index: 1000;
  text-decoration: none;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: 1rem;
}

/* Layout container */
main {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  flex: 1;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 0.85rem 1.25rem;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 10px var(--brand-primary-glow);
}

.brand-icon--small {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-raised);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-sub);
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(5, 150, 105, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
  }
}

/* ==========================================================================
   HERO & INTRO
   ========================================================================== */

.hero {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 2.5rem;
}

.hero-badge {
  display: inline-block;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border: 1px solid rgba(5, 150, 105, 0.2);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw + 0.5rem, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-main);
  max-width: 820px;
  margin: 0 auto 0.85rem;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.55;
}

/* ==========================================================================
   TOOL CARD (CALCULATOR WRAPPER)
   ========================================================================== */

.tool-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 2.25rem;
  text-align: left;
  margin: 0 auto 2rem;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-accent) 50%, var(--chart-interest) 100%);
}

/* Field Grid */
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 680px) {
  .field-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .tool-card {
    padding: 1.5rem 1.15rem;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  cursor: pointer;
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
}

.field-hint {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--brand-primary);
  background: var(--brand-primary-light);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.input-suffix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-suffix input[type="number"] {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  background: var(--surface-raised);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 3.5rem 0.75rem 1rem;
  transition: all var(--transition-fast);
  outline: none;
  -moz-appearance: textfield;
}

.input-suffix input[type="number"]::-webkit-outer-spin-button,
.input-suffix input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-suffix input[type="number"]:focus {
  background: var(--surface);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px var(--brand-primary-glow);
}

.input-suffix span {
  position: absolute;
  right: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

/* Range input slider */
.field-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  outline: none;
  margin-top: 0.25rem;
  transition: opacity var(--transition-fast);
  cursor: pointer;
}

.field-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-primary);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.field-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-primary);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.field-range:hover::-webkit-slider-thumb,
.field-range:focus::-webkit-slider-thumb {
  transform: scale(1.2);
  background: var(--brand-primary-hover);
}

/* Compare toggle */
.compare-container {
  margin: 1.5rem 0 1rem;
  padding: 0.85rem 1.15rem;
  background: var(--surface-raised);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
}

.compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.compare-toggle input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  position: relative;
  transition: background-color var(--transition-base);
  flex-shrink: 0;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: transform var(--transition-base);
}

.compare-toggle input:checked + .toggle-slider {
  background: var(--brand-accent);
}

.compare-toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-text {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

/* Scenario B */
.field-grid--b {
  margin-top: 1rem;
  padding: 1.5rem;
  background: var(--brand-accent-light);
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(37, 99, 235, 0.25);
  position: relative;
}

.scenario-badge {
  position: absolute;
  top: -12px;
  left: 1.5rem;
  background: var(--brand-accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ==========================================================================
   RESULTS SECTION & CARDS
   ========================================================================== */

.results {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.result-cards {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 860px) {
  .result-cards {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card--hero {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 60%, #047857 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 12px 28px -4px rgba(6, 78, 59, 0.35);
  position: relative;
  overflow: hidden;
}

.card--hero::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}

.card-title {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.card--hero .card-title {
  color: rgba(255, 255, 255, 0.8);
}

.card-value {
  font-family: var(--font-serif);
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.card--hero .card-value {
  color: #ffffff;
  font-size: 2.85rem;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.4;
}

.card--hero .card-desc {
  color: rgba(255, 255, 255, 0.85);
}

/* Comparison delta pill */
.delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  margin-top: 0.5rem;
  width: fit-content;
}

.delta-pill--positive {
  background: var(--badge-green-bg);
  color: var(--badge-green-text);
}

.delta-pill--negative {
  background: var(--badge-red-bg);
  color: var(--badge-red-text);
}

.delta-pill--neutral {
  background: var(--badge-blue-bg);
  color: var(--badge-blue-text);
}

/* Progress bar inside card */
.progress-bar-wrap {
  margin-top: 0.75rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.progress-bar {
  height: 8px;
  background: var(--chart-interest);
  border-radius: var(--radius-full);
  overflow: hidden;
  display: flex;
}

.progress-fill {
  height: 100%;
  background: var(--chart-capital);
  transition: width var(--transition-base);
}

/* ==========================================================================
   CHART SECTION
   ========================================================================== */

.chart-wrap {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.chart-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sub);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot--capital {
  background: var(--chart-capital);
}

.dot--interest {
  background: var(--chart-interest);
}

.canvas-container {
  position: relative;
  width: 100%;
  height: auto;
}

#chart {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  background: #ffffff;
}

.chart-tooltip {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  line-height: 1.4;
  backdrop-filter: blur(4px);
  z-index: 10;
  transition: opacity var(--transition-fast);
}

/* ==========================================================================
   AMORTIZATION TABLE
   ========================================================================== */

.table-wrap {
  margin-top: 2rem;
}

.table-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.table-head-row h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.table-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.table-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-ghost {
  font-family: var(--font-sans);
  background: var(--surface-raised);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--text-main);
}

.btn-primary-ghost {
  font-family: var(--font-sans);
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border: 1px solid rgba(5, 150, 105, 0.3);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-primary-ghost:hover {
  background: var(--brand-primary);
  color: #ffffff;
}

.table-scroll {
  max-height: 440px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.9rem;
}

thead {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 2;
  box-shadow: 0 1px 0 var(--border-subtle);
}

th {
  padding: 0.85rem 1.15rem;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

th:first-child, td:first-child {
  text-align: left;
}

td {
  padding: 0.75rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
}

tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.6);
}

tbody tr:hover {
  background: var(--brand-primary-light);
}

.table-footer-controls {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.table-rows-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Trust badges */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

@media (max-width: 680px) {
  .trust-strip {
    grid-template-columns: 1fr;
  }
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--surface);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.4;
}

.trust-icon {
  font-size: 1.25rem;
}

.limits-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
}

/* ==========================================================================
   ADS / SPONSOR PLACEMENTS
   ========================================================================== */

.ad-slot {
  margin: 3.5rem auto;
  max-width: 760px;
}

.ad-placeholder {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.ad-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.ad-text {
  font-size: 0.85rem;
}

/* ==========================================================================
   HOW IT WORKS & SEO SECTIONS
   ========================================================================== */

.how-it-works, .seo-copy, .faq {
  margin-bottom: 4rem;
}

.section-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-accent);
  background: var(--brand-accent-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.65rem;
}

.how-it-works h2, .seo-copy h2, .faq h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 1.75rem;
  letter-spacing: -0.02em;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.steps li {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.step-num {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--border-strong);
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.steps h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.steps p {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.5;
}

/* Copy Grid */
.copy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .copy-grid {
    grid-template-columns: 1fr;
  }
}

.copy-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.copy-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  color: var(--text-main);
}

.copy-card p {
  font-size: 0.92rem;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.copy-card p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item[open] {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 1.15rem 1.35rem;
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-base);
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  color: var(--brand-primary);
}

.faq-answer {
  padding: 0 1.35rem 1.25rem;
  font-size: 0.92rem;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 1.25rem;
  margin-top: auto;
  border-top: 1px solid #1e293b;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
}

.footer-copy {
  font-size: 0.85rem;
  color: #64748b;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
}

.footer-nav a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: #ffffff;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  .site-header, .site-footer, .ad-slot, .compare-container,
  .how-it-works, .faq, .table-actions, .table-footer-controls,
  .field-range, .skip-link {
    display: none !important;
  }

  main {
    padding: 0;
    max-width: 100%;
  }

  .tool-card {
    box-shadow: none;
    border: none;
    padding: 0;
  }

  .card--hero {
    background: #f1f5f9 !important;
    color: #000000 !important;
    border: 1px solid #ccc !important;
  }

  .card--hero .card-title,
  .card--hero .card-value,
  .card--hero .card-desc {
    color: #000000 !important;
  }

  .table-scroll {
    max-height: none !important;
    overflow: visible !important;
    border: none;
  }

  table {
    page-break-inside: auto;
  }

  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
}
