/* ==========================================================================
   AutoVinder AI — Accessible Base Stylesheet
   Designed for clean semantics, high contrast, and keyboard accessibility.
   You can freely edit or replace these styles with your own CSS.
   ========================================================================== */

:root {
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-hover: #f1f5f9;
  --color-border: #e2e8f0;
  --color-border-focus: #2563eb;
  --color-text-main: #0f172a;
  --color-text-muted: #475569;
  --color-primary: #0284c7;
  --color-primary-dark: #0369a1;
  --color-accent: #10b981;
  --color-price: #047857;
  --color-focus-ring: rgba(37, 99, 235, 0.4);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 900px;
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ==========================================================================
   CSS View Transitions (Cross-Document / MPA Navigation)
   ========================================================================== */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 180ms cubic-bezier(0.4, 0, 1, 1) both vt-fade-out;
}

::view-transition-new(root) {
  animation: 220ms cubic-bezier(0, 0, 0.2, 1) 40ms both vt-fade-in;
}

@keyframes vt-fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}

@keyframes vt-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Morph and preserve header brand title smoothly across pages */
.brand-title {
  view-transition-name: brand-title;
}

/* Smooth View Transition for dynamic HTMX Car Results swap */
#car-results {
  view-transition-name: car-results;
}

::view-transition-old(car-results) {
  animation: 180ms cubic-bezier(0.4, 0, 1, 1) both vt-fade-out;
}

::view-transition-new(car-results) {
  animation: 240ms cubic-bezier(0, 0, 0.2, 1) 30ms both vt-fade-in;
}


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

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

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessible focus styling */
:focus-visible {
  outline: 3px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* Layout */
.app-layout {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex-grow: 1;
}

.app-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.brand-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text-main);
}

.badge-ai {
  background-color: var(--color-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  vertical-align: middle;
}

.brand-subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-top: 0.25rem;
}

.geo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Main Cards */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

/* Value Proposition / Pitch Card */
.pitch-card {
  background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 40%, #f0f9ff 100%);
  border: 1px solid #bae6fd;
  box-shadow: 0 4px 12px -2px rgba(2, 132, 199, 0.08);
  position: relative;
  overflow: hidden;
}

.pitch-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: #e0f2fe;
  color: #0369a1;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
  border: 1px solid #b9e6fe;
}

.pitch-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.35;
  color: #0f172a;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}

.pitch-intro {
  font-size: 1rem;
  color: #334155;
  line-height: 1.65;
  max-width: 800px;
}

.pitch-intro strong {
  color: #0f172a;
}

.pitch-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(186, 230, 253, 0.6);
}

.pitch-stat {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #ffffff;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pitch-stat-ai {
  background: #ecfdf5;
  border-color: #a7f3d0;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.08);
}

.stat-icon {
  font-size: 1.65rem;
  flex-shrink: 0;
  line-height: 1;
}

.stat-highlight {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.pitch-stat-ai .stat-highlight {
  color: #047857;
}

.stat-sub {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.2rem;
  line-height: 1.3;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.section-intro {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* Large Accessible Budget Slider */
.slider-group {
  margin-bottom: 2rem;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.slider-label {
  font-weight: 600;
  font-size: 1.1rem;
}

.budget-display {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-price);
  letter-spacing: -0.02em;
}

.slider-track-wrapper {
  position: relative;
  width: 100%;
}

.range-slider {
  width: 100%;
  height: 12px;
  border-radius: 6px;
  background: #cbd5e1;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid #fff;
  box-shadow: var(--shadow-md);
  cursor: grab;
  transition: transform 0.1s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  background: var(--color-primary-dark);
}

.range-slider::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid #fff;
  box-shadow: var(--shadow-md);
  cursor: grab;
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Payment Box */
.payment-box {
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.payment-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.payment-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  max-width: 480px;
}

.wallet-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 380px;
  margin-top: 0.5rem;
}

.wallet-btn-slot {
  width: 100%;
  min-height: 48px;
}

.apple-pay-button {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  -webkit-appearance: -apple-pay-button;
  -apple-pay-button-type: buy;
  -apple-pay-button-style: black;
}

@supports not (-webkit-appearance: -apple-pay-button) {
  .apple-pay-button {
    background-color: #000;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    justify-content: center;
    align-items: center;
  }
  .apple-pay-button::after {
    content: "Pay";
    font-size: 1.2rem;
  }
}

.restart-button {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.restart-button:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.restart-button:active {
  transform: translateY(0);
}

.fallback-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 440px;
}

.fallback-notice {
  font-size: 0.85rem;
  color: #854d0e;
  background: #fef9c3;
  border: 1px solid #fde047;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  line-height: 1.4;
}

.emulator-test-bar {
  margin-top: 0.5rem;
  width: 100%;
}

.btn-demo-test {
  background-color: #1e293b;
  color: #fff;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.15s ease;
  width: 100%;
  max-width: 360px;
}

.btn-demo-test:hover {
  background-color: #0f172a;
}

/* Direct AI Search Button & Budget Protection */
.search-action-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-direct-search {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  padding: 1rem 1.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-direct-search:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-direct-search:disabled,
.btn-direct-search.btn-disabled {
  background: #94a3b8 !important;
  color: #f1f5f9 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
  opacity: 0.75;
}

.budget-status-note {
  font-size: 0.85rem;
  color: #b45309;
  background-color: #fef3c7;
  border: 1px solid #fde68a;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  text-align: center;
  max-width: 420px;
}

/* HTMX Loading Indicator */
.loading-box {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: flex;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text strong {
  font-size: 1.1rem;
  color: var(--color-text-main);
}

.loading-text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Car Results Grid */
.car-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.placeholder-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

/* Individual Car Article (Accessibility Card) */
.car-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

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

.car-card-header {
  margin-bottom: 0.75rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.car-badge-rank {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  background: #e0f2fe;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.badge-electric {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.badge-fuel {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.badge-local-garage {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.car-card-electric {
  border-left: 4px solid #10b981;
}

.car-title {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text-main);
}

.car-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem 0;
  font-size: 0.95rem;
}

.car-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-price);
}

/* Accessible Definition List for Criteria */
.car-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 0.25rem;
}

.meta-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.meta-label {
  color: var(--color-text-muted);
  font-weight: 500;
}

.meta-value {
  color: var(--color-text-main);
  font-weight: 600;
}

.meta-cost .meta-value {
  color: #0369a1;
}

.cost-hint {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 400;
}

.meta-dealer .meta-value {
  color: #0f172a;
}

.vicinity-note {
  font-size: 0.8rem;
  color: #059669;
  font-style: normal;
  font-weight: 600;
}

.car-portal-tag {
  font-size: 0.8rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  align-self: flex-start;
}

.car-highlight {
  font-size: 0.9rem;
  color: #334155;
  background: #f0f9ff;
  border-left: 3px solid var(--color-primary);
  padding: 0.5rem 0.75rem;
  border-radius: 0 6px 6px 0;
}

.car-link {
  display: inline-block;
  text-align: center;
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
}

.car-link:hover {
  background-color: var(--color-primary-dark);
}

/* Footer */
.app-footer {
  margin-top: auto;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

.footer-nav {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-link.active {
  font-weight: 700;
  color: var(--color-text-main);
  text-decoration: underline;
}

.footer-separator {
  color: #cbd5e1;
}

/* Payment Terms Notice */
.payment-terms-notice {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: 0.35rem;
  max-width: 420px;
}

.payment-terms-notice a {
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: 600;
}

.payment-terms-notice a:hover {
  color: var(--color-primary-dark);
}

/* ==========================================================================
   Legal Document / Algemene Voorwaarden Page Styles
   ========================================================================== */
.brand-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.header-nav {
  display: flex;
  align-items: center;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-main);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-back:hover {
  background-color: var(--color-surface-hover);
  border-color: #cbd5e1;
  color: var(--color-primary-dark);
}

.legal-card {
  padding: 2.5rem;
  max-width: 860px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .legal-card {
    padding: 1.5rem 1rem;
  }
}

.legal-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1.5rem;
}

.legal-badge {
  display: inline-block;
  background-color: #e0f2fe;
  color: var(--color-primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.legal-main-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-text-main);
  margin-bottom: 0.5rem;
  text-wrap: balance;
}

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

/* Callout Alert Boxes */
.legal-callout {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.legal-callout .callout-icon {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.legal-callout-warning {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 5px solid #d97706;
}

.legal-callout-warning .callout-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 0.5rem;
}

.legal-callout-warning .callout-list {
  padding-left: 1.25rem;
  color: #78350f;
  font-size: 0.92rem;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.legal-callout-info {
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 5px solid var(--color-primary);
  color: #0369a1;
  font-size: 0.95rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.25rem 0;
}

.legal-callout-danger {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 5px solid #dc2626;
  color: #991b1b;
  font-size: 0.95rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.25rem 0;
}

/* Table of Contents */
.legal-toc {
  background-color: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
}

.toc-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--color-text-main);
}

.toc-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
}

.toc-list a {
  color: var(--color-primary);
  text-decoration: none;
}

.toc-list a:hover {
  text-decoration: underline;
  color: var(--color-primary-dark);
}

.legal-divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* Legal Sections */
.legal-section {
  margin-bottom: 2.25rem;
  scroll-margin-top: 2rem;
}

.legal-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 0.85rem;
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 0.35rem;
}

.legal-section p {
  color: #334155;
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 0.85rem;
}

.legal-section ul,
.legal-section ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.96rem;
  line-height: 1.6;
}

.legal-section strong {
  color: var(--color-text-main);
}

.legal-quote {
  background-color: #f8fafc;
  border-left: 4px solid var(--color-primary);
  padding: 0.75rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
  font-size: 1.05rem;
  color: var(--color-primary-dark);
}

.legal-footer-box {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.legal-footer-text {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary-action:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
}

/* Budget Warning Banner in Payment Box */
.budget-warning-box {
  background-color: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.budget-warning-text {
  color: #92400e;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}
