
:root {
  --bg: #f6f8fb;
  --paper: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --line: rgba(15, 23, 42, .1);
  --brand: #0f172a;
  --accent: #22c55e;
  --accent-dark: #16a34a;
  --blue: #2563eb;
  --warning: #f59e0b;
  --radius: 26px;
  --shadow: 0 24px 70px rgba(15, 23, 42, .11);
  --shadow-soft: 0 14px 40px rgba(15, 23, 42, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, rgba(34, 197, 94, .10), transparent 28%), var(--bg);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 900; letter-spacing: -0.04em; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 16px; background: var(--brand); color: #fff; font-size: 14px; box-shadow: 0 12px 30px rgba(15, 23, 42, .18); }
.brand-text { font-size: 21px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; color: #334155; font-weight: 700; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; box-shadow: 0 8px 22px rgba(15,23,42,.06); }
.menu-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--line); background: #fff; border-radius: 16px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; cursor: pointer; }
.menu-toggle span { width: 20px; height: 2px; border-radius: 8px; background: var(--ink); }
.hero { padding: 78px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 42px; align-items: center; }
.eyebrow, .tag { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: #334155; border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 800; }
.pulse { width: 9px; height: 9px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
h1 { margin: 18px 0; font-size: clamp(42px, 7vw, 78px); line-height: .92; letter-spacing: -0.08em; }
h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1; letter-spacing: -0.065em; margin: 10px 0 14px; }
h3 { letter-spacing: -0.035em; line-height: 1.1; }
.hero-subtitle { font-size: 19px; color: var(--muted); max-width: 660px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 16px; padding: 14px 18px; font-weight: 900; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 18px 38px rgba(15,23,42,.22); }
.btn-primary:hover { background: #1e293b; }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(15,23,42,.07); }
.btn-route { background: #ecfdf5; color: #166534; border: 1px solid rgba(22, 163, 74, .18); width: 100%; }
.btn.full { width: 100%; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; color: #475569; font-size: 13px; font-weight: 800; }
.trust-row span { background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
.hero-card, .calculator-panel, .results-panel, .white-card, .article-card, .route-card, .legal-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-card { padding: 24px; }
.route-preview { display:flex; justify-content:space-between; gap:14px; align-items:center; }
.label { display: block; color: var(--muted); font-size: 13px; font-weight: 800; }
.distance-pill { padding: 10px 13px; border-radius: 999px; background: #ecfdf5; color: #166534; font-weight: 900; }
.mini-map { height: 235px; position: relative; overflow: hidden; border-radius: 24px; margin: 22px 0; background:
  linear-gradient(90deg, rgba(15,23,42,.06) 1px, transparent 1px),
  linear-gradient(rgba(15,23,42,.06) 1px, transparent 1px),
  radial-gradient(circle at 20% 20%, rgba(37,99,235,.16), transparent 18%),
  radial-gradient(circle at 70% 74%, rgba(34,197,94,.18), transparent 22%), #f8fafc;
  background-size: 38px 38px, 38px 38px, auto, auto, auto;
}
.route-line { position:absolute; left: 19%; top: 52%; width: 64%; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--accent)); transform: rotate(-18deg); box-shadow: 0 18px 35px rgba(37,99,235,.24); }
.pin { position:absolute; width: 22px; height: 22px; background: var(--brand); border: 5px solid #fff; box-shadow: 0 10px 24px rgba(15,23,42,.25); border-radius: 50%; z-index: 2; }
.pin-a { left: 18%; top: 62%; } .pin-b { right: 16%; top: 31%; background: var(--accent-dark); }
.metric-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric-grid div, .result-card, .stat { background: #f8fafc; border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.metric-grid span, .result-card span, .stat span { display:block; color: var(--muted); font-size: 12px; font-weight: 850; margin-bottom: 5px; }
.metric-grid strong, .result-card strong, .stat strong { font-size: 22px; letter-spacing: -.04em; }
.calculator-section { padding: 42px 0; }
.calculator-layout { display: grid; grid-template-columns: 1.12fr .88fr; gap: 26px; align-items: start; }
.calculator-panel, .results-panel { padding: 28px; }
.results-panel { position: sticky; top: 102px; background: linear-gradient(180deg, #0f172a, #172033); color: #fff; }
.section-heading { max-width: 760px; margin-bottom: 26px; }
.section-heading.center { text-align:center; margin-left:auto; margin-right:auto; }
.section-heading.compact { margin-bottom: 18px; }
.section-heading p, .prose p, .prose li { color: var(--muted); }
.calculator-form { display:grid; gap: 16px; }
.two-cols { display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { font-size: 13px; color: #334155; font-weight: 900; }
input, select, textarea { width:100%; margin-top: 8px; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 14px 14px; color: var(--ink); font: inherit; outline: none; }
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(37,99,235,.55); box-shadow: 0 0 0 4px rgba(37,99,235,.08); }
.input-unit { position: relative; }
.input-unit input { padding-right: 82px; }
.input-unit span { position:absolute; right: 14px; top: 50%; transform: translateY(-23%); color: var(--muted); font-size: 13px; font-weight: 900; }
.range-label small { display:block; margin-top: 5px; color: var(--muted); font-weight: 600; }
.route-tools { display:grid; gap: 8px; }
.route-status { margin: 0; color: var(--muted); font-size: 13px; }
.route-status.ok { color: #15803d; } .route-status.error { color: #dc2626; }

.map-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #f8fafc;
  box-shadow: var(--shadow-soft);
}
.route-map {
  width: 100%;
  height: 320px;
  min-height: 320px;
  border-radius: 24px;
  z-index: 1;
}
.map-note {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 410;
  padding: 10px 12px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(15,23,42,.12);
  backdrop-filter: blur(10px);
}
.leaflet-container {
  font: inherit;
  background: #eef2f7;
}
.leaflet-control-zoom a {
  color: var(--ink) !important;
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  box-shadow: 0 14px 35px rgba(15,23,42,.18);
}

.result-top .tag.dark { background: rgba(255,255,255,.08); color: #dbeafe; border-color: rgba(255,255,255,.16); }
.result-top h2 { font-size: clamp(46px, 7vw, 72px); color: #fff; }
.result-top p { color: #cbd5e1; }
.result-cards { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.result-card { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.result-card span { color: #cbd5e1; } .result-card strong { color: #fff; }
.saving-tip { padding: 16px; border-radius: 20px; background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.28); color: #dcfce7; font-weight: 700; }
.feature-strip, .content-section { padding: 56px 0; }
.feature-grid, .route-grid, .article-grid, .stats-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-grid article, .white-card, .article-card, .route-card { padding: 22px; }
.feature-grid article { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-soft); }
.feature-grid span { color: var(--accent-dark); font-weight: 900; }
.feature-grid p, .article-card p, .route-card p { color: var(--muted); }
.muted { background: rgba(255,255,255,.46); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.route-grid { grid-template-columns: repeat(2, 1fr); }
.route-card, .article-card { display:flex; flex-direction: column; min-height: 190px; }
.card-meta { display:flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.card-meta span { border: 1px solid var(--line); background: #f8fafc; color: #475569; border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 850; }
.card-link { margin-top:auto; color: #166534; font-weight: 950; }
.split-section { display:grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items:start; }
.formula-box { background: #0f172a; color: #fff; padding: 26px; border-radius: 26px; box-shadow: var(--shadow); }
.formula-box code { display:block; white-space: normal; font-size: 20px; line-height:1.35; margin: 12px 0; color: #dcfce7; }
.prose { max-width: 900px; }
.prose h1 { font-size: clamp(40px, 6vw, 68px); }
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 26px; }
.prose .lead { font-size: 19px; color: #475569; }
.prose a { color: #166534; font-weight: 900; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.table-wrap { overflow-x:auto; }
table { border-collapse: collapse; width:100%; background:#fff; border:1px solid var(--line); border-radius: 18px; overflow:hidden; }
th, td { padding: 14px; border-bottom: 1px solid var(--line); text-align:left; }
th { background:#f8fafc; font-size:13px; color:#475569; }
tr:last-child td { border-bottom:0; }
.callout { padding: 20px; border-radius: 22px; background: #ecfdf5; border: 1px solid rgba(22,163,74,.2); color:#14532d; font-weight: 750; }
.breadcrumb { margin: 22px 0 0; color: var(--muted); font-size: 13px; font-weight: 800; }
.page-hero { padding: 54px 0 30px; }
.page-layout { padding: 24px 0 64px; }
.legal-card { padding: 34px; max-width: 920px; margin: 0 auto; }
.legal-card h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1; letter-spacing: -0.07em; }
.legal-card h2 { margin-top: 28px; }
.legal-card p, .legal-card li { color: var(--muted); }
.site-footer { padding: 50px 0; background: #0f172a; color: #cbd5e1; }
.footer-grid { display:grid; grid-template-columns: 1.3fr .7fr .7fr .7fr; gap: 24px; }
.footer-brand { color:#fff; }
.site-footer p { max-width: 450px; color:#94a3b8; }
.site-footer h4 { color:#fff; margin: 0 0 12px; }
.site-footer a:not(.brand) { display:block; color:#cbd5e1; margin: 8px 0; }
.note { font-size: 13px; color: var(--muted); }
@media (max-width: 960px) {
  .menu-toggle { display:flex; }
  .nav-links { position:absolute; left:16px; right:16px; top:82px; display:none; flex-direction:column; align-items:stretch; background:#fff; padding:18px; border:1px solid var(--line); border-radius:24px; box-shadow: var(--shadow); }
  .nav-links.active { display:flex; }
  .nav-links a { padding: 10px 4px; }
  .hero-grid, .calculator-layout, .split-section { grid-template-columns:1fr; }
  .results-panel { position:static; }
  .feature-grid, .article-grid, .route-grid, .stats-grid { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 620px) {
  .route-map { height: 260px; min-height: 260px; }
  .map-note { position: static; margin: 10px; }
  .hero { padding-top: 46px; }
  .two-cols, .metric-grid, .result-cards { grid-template-columns:1fr; }
  .calculator-panel, .results-panel { padding:20px; border-radius:24px; }
  .footer-grid { grid-template-columns:1fr; }
  .btn { width:100%; }
}

/* V4: mapa ampliable + autocompletado de direcciones */
.place-field {
  position: relative;
  z-index: 30;
}
.place-field:focus-within {
  z-index: 80;
}
.place-suggestions {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 999;
  max-height: 290px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 22px 55px rgba(15,23,42,.16);
  backdrop-filter: blur(12px);
}
.place-suggestions.active {
  display: grid;
  gap: 6px;
}
.place-suggestion {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.place-suggestion:hover,
.place-suggestion.is-active {
  background: #f1f5f9;
}
.suggestion-title {
  font-weight: 900;
  font-size: 14px;
  color: #0f172a;
}
.suggestion-subtitle {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 700;
}
.place-loading,
.place-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.map-expand-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 430;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255,255,255,.94);
  color: #0f172a;
  box-shadow: 0 12px 28px rgba(15,23,42,.12);
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.map-expand-btn:hover {
  background: #fff;
  transform: translateY(-1px);
}
body.map-expanded {
  overflow: hidden;
}
.map-card.is-expanded {
  position: fixed;
  inset: 18px;
  z-index: 3000;
  border-radius: 28px;
  box-shadow: 0 40px 120px rgba(15,23,42,.35);
}
.map-card.is-expanded .route-map {
  height: calc(100vh - 36px);
  min-height: calc(100vh - 36px);
  border-radius: 28px;
}
.map-card.is-expanded .map-note {
  left: 18px;
  right: auto;
  max-width: min(560px, calc(100vw - 120px));
}
.leaflet-control-zoom a {
  font-weight: 900;
}

@media (max-width: 700px) {
  .place-suggestions {
    max-height: 250px;
  }
  .map-card.is-expanded {
    inset: 8px;
    border-radius: 22px;
  }
  .map-card.is-expanded .route-map {
    height: calc(100vh - 16px);
    min-height: calc(100vh - 16px);
    border-radius: 22px;
  }
  .map-card.is-expanded .map-note {
    left: 10px;
    right: 10px;
    max-width: none;
  }
}


/* V5: selector de vehículo y consumo aproximado */
.vehicle-card {
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 24px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 18px 45px rgba(15,23,42,.06);
}
.vehicle-head {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.vehicle-head h3 {
  margin: 8px 0 0;
  font-size: 19px;
  letter-spacing: -.03em;
}
.vehicle-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}
.vehicle-selects label {
  position: relative;
}
.vehicle-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}
.btn-ghost {
  background: #fff;
  color: #0f172a;
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
}
.vehicle-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.vehicle-status.ok { color: #15803d; }
.vehicle-status.error { color: #dc2626; }
input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

@media (max-width: 700px) {
  .vehicle-actions {
    grid-template-columns: 1fr;
  }
  .vehicle-card {
    padding: 16px;
  }
}


/* V6: datos externos de vehículos y precios oficiales de carburante */
.vehicle-source {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(37, 99, 235, .06);
  border: 1px solid rgba(37, 99, 235, .12);
  color: #475569;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}
.fuel-price-tools {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 22px;
  background: #f8fafc;
}
.fuel-price-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}
.fuel-price-status.ok { color: #15803d; }
.fuel-price-status.error { color: #dc2626; }
.btn:disabled {
  opacity: .62;
  cursor: wait;
  transform: none !important;
}
@media (max-width: 700px) {
  .fuel-price-tools { grid-template-columns: 1fr; }
}


/* V9: orden por pasos + validación visual */
.form-block {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 24px;
  background: rgba(248,250,252,.72);
}
.block-heading,
.vehicle-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.block-heading > div,
.vehicle-head > div { min-width: 0; }
.block-heading h3,
.vehicle-head h3 { margin: 0 0 5px; letter-spacing: -.04em; }
.block-heading p,
.vehicle-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}
.step-pill {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(15,23,42,.18);
}
.vehicle-head .step-pill { margin-right: 8px; vertical-align: middle; }
.field-error {
  min-height: 18px;
  margin-top: 7px;
  color: #dc2626;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 900;
}
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: #dc2626 !important;
  background: #fff7f7;
  box-shadow: 0 0 0 4px rgba(220,38,38,.10) !important;
}
select:required:invalid { color: #94a3b8; }
select option { color: var(--ink); }
.trip-block .fuel-price-tools { margin-top: -4px; }
@media (max-width: 620px) {
  .form-block { padding: 14px; border-radius: 20px; }
  .block-heading,
  .vehicle-head { display: grid; }
  .step-pill { width: 34px; }
}

.form-submit-note {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

/* V13: política de privacidad profesional */
.privacy-hero {
  padding: 58px 0 34px;
  background:
    radial-gradient(circle at 12% 8%, rgba(34,197,94,.13), transparent 28%),
    radial-gradient(circle at 86% 24%, rgba(37,99,235,.10), transparent 30%);
}
.privacy-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center;
}
.breadcrumb-link,
.breadcrumb-current,
.breadcrumb-separator {
  display: inline-block;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}
.breadcrumb-link { color: #166534; }
.breadcrumb-separator { margin-inline: 7px; color: #94a3b8; }
.privacy-eyebrow { margin: 0; }
.privacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.privacy-status-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.92));
  box-shadow: var(--shadow);
}
.privacy-status-card::before {
  content: "";
  position: absolute;
  inset: auto -22% -28% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,197,94,.18), transparent 68%);
}
.status-dot {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(34,197,94,.12);
}
.privacy-status-card h2 {
  font-size: clamp(28px, 3vw, 42px);
  margin: 18px 0 10px;
}
.privacy-status-card p,
.privacy-status-card li {
  color: var(--muted);
  font-weight: 700;
}
.privacy-status-card ul {
  position: relative;
  margin: 18px 0 0;
  padding-left: 20px;
}
.privacy-layout { padding: 30px 0 72px; }
.privacy-grid-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  align-items: start;
}
.privacy-toc {
  position: sticky;
  top: 100px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.90);
  box-shadow: var(--shadow-soft);
}
.privacy-toc h2 {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: -.04em;
}
.privacy-toc a {
  display: block;
  padding: 9px 10px;
  border-radius: 12px;
  color: #475569;
  font-size: 13px;
  font-weight: 850;
}
.privacy-toc a:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.privacy-document {
  max-width: none;
  padding: 34px;
}
.privacy-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.privacy-meta-bar span {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}
.privacy-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.privacy-summary-grid div,
.legal-info-box,
.rights-card,
.privacy-closing-card {
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 22px;
  background: #f8fafc;
}
.privacy-summary-grid div { padding: 16px; }
.privacy-summary-grid span,
.external-service-card span {
  display: block;
  margin-bottom: 6px;
  color: #15803d;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.privacy-summary-grid strong {
  display: block;
  font-size: 18px;
  letter-spacing: -.04em;
}
.privacy-summary-grid p { margin: 7px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.privacy-section {
  position: relative;
  padding: 34px 0;
  border-top: 1px solid rgba(15,23,42,.08);
  scroll-margin-top: 110px;
}
.privacy-section h2 {
  font-size: clamp(28px, 3vw, 42px);
  margin-top: 0;
}
.section-number {
  display: inline-flex;
  margin-bottom: 12px;
  border: 1px solid rgba(22,163,74,.18);
  border-radius: 999px;
  padding: 7px 10px;
  background: #ecfdf5;
  color: #166534;
  font-size: 12px;
  font-weight: 950;
}
.legal-info-box {
  padding: 18px;
  margin: 18px 0;
}
.legal-info-box p { margin: 8px 0; }
.privacy-note {
  padding: 14px 16px;
  border-left: 4px solid var(--warning);
  border-radius: 16px;
  background: rgba(245,158,11,.08);
  color: #92400e !important;
  font-weight: 750;
}
.privacy-list-grid,
.external-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.privacy-list-grid > div,
.external-service-card {
  padding: 18px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15,23,42,.04);
}
.privacy-list-grid h3,
.external-service-card h3,
.rights-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}
.privacy-list-grid ul,
.check-list {
  margin: 0;
  padding-left: 20px;
}
.privacy-list-grid li,
.check-list li { margin: 8px 0; }
.check-list li::marker { color: var(--accent-dark); }
.privacy-table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}
.privacy-table-wrap table {
  min-width: 620px;
}
.rights-card {
  padding: 20px;
  margin: 18px 0;
  background: linear-gradient(180deg, #ecfdf5, #f8fafc);
}
.privacy-closing-card {
  padding: 26px;
  margin-top: 22px;
  background: linear-gradient(135deg, #0f172a, #172033);
  color: #fff;
}
.privacy-closing-card h2 { color: #fff; margin-top: 0; }
.privacy-closing-card p { color: #cbd5e1; max-width: 760px; }
.privacy-closing-card .btn { margin-top: 10px; background: #fff; color: #0f172a; }

@media (max-width: 980px) {
  .privacy-hero-grid,
  .privacy-grid-layout { grid-template-columns: 1fr; }
  .privacy-toc { position: static; }
  .privacy-summary-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .privacy-hero { padding: 36px 0 20px; }
  .privacy-status-card,
  .privacy-document { padding: 20px; border-radius: 24px; }
  .privacy-list-grid,
  .external-services-grid { grid-template-columns: 1fr; }
  .privacy-section { padding: 26px 0; }
  .privacy-actions .btn { width: 100%; }
}


/* V17: modo oscuro / claro */
html {
  color-scheme: light;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #020617;
  --paper: #0f172a;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --soft: #1e293b;
  --line: rgba(148, 163, 184, .20);
  --brand: #f8fafc;
  --accent: #22c55e;
  --accent-dark: #4ade80;
  --blue: #60a5fa;
  --warning: #fbbf24;
  --shadow: 0 24px 70px rgba(0, 0, 0, .42);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, .26);
}
html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 197, 94, .16), transparent 30%),
    radial-gradient(circle at 90% 12%, rgba(37, 99, 235, .14), transparent 28%),
    var(--bg);
  color: var(--ink);
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  color: #0f172a;
  box-shadow: 0 8px 22px rgba(15,23,42,.06);
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .18s, background .18s, border-color .18s, color .18s, box-shadow .18s;
}
.theme-toggle:hover { transform: translateY(-1px); }
.theme-toggle-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  line-height: 1;
}
.theme-toggle-text { white-space: nowrap; }
html[data-theme="dark"] .theme-toggle {
  background: rgba(15,23,42,.84);
  color: #f8fafc;
  border-color: rgba(148,163,184,.24);
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
}
html[data-theme="dark"] .theme-toggle-icon {
  background: #f8fafc;
  color: #0f172a;
}
html[data-theme="dark"] .site-header {
  background: rgba(2, 6, 23, .86);
  border-bottom-color: var(--line);
}
html[data-theme="dark"] .brand-mark {
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 12px 30px rgba(0,0,0,.26);
}
html[data-theme="dark"] .nav-links {
  color: #cbd5e1;
}
html[data-theme="dark"] .nav-links a:hover {
  color: #fff;
}
html[data-theme="dark"] .nav-cta,
html[data-theme="dark"] .menu-toggle,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .trust-row span,
html[data-theme="dark"] .privacy-toc,
html[data-theme="dark"] .privacy-meta-bar span,
html[data-theme="dark"] .card-meta span {
  background: rgba(15, 23, 42, .86);
  color: #e2e8f0;
  border-color: var(--line);
}
html[data-theme="dark"] .menu-toggle span {
  background: #f8fafc;
}
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .calculator-panel,
html[data-theme="dark"] .white-card,
html[data-theme="dark"] .article-card,
html[data-theme="dark"] .route-card,
html[data-theme="dark"] .legal-card,
html[data-theme="dark"] .privacy-status-card,
html[data-theme="dark"] .privacy-document,
html[data-theme="dark"] .feature-grid article {
  background: rgba(15, 23, 42, .88);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .results-panel,
html[data-theme="dark"] .formula-box,
html[data-theme="dark"] .privacy-closing-card {
  background: linear-gradient(180deg, #020617, #0f172a);
  border-color: rgba(148, 163, 184, .18);
}
html[data-theme="dark"] .hero-subtitle,
html[data-theme="dark"] .section-heading p,
html[data-theme="dark"] .prose p,
html[data-theme="dark"] .prose li,
html[data-theme="dark"] .feature-grid p,
html[data-theme="dark"] .article-card p,
html[data-theme="dark"] .route-card p,
html[data-theme="dark"] .legal-card p,
html[data-theme="dark"] .legal-card li,
html[data-theme="dark"] .vehicle-head p,
html[data-theme="dark"] .block-heading p,
html[data-theme="dark"] .vehicle-status,
html[data-theme="dark"] .fuel-price-status,
html[data-theme="dark"] .route-status,
html[data-theme="dark"] .note,
html[data-theme="dark"] .privacy-summary-grid p,
html[data-theme="dark"] .privacy-status-card p,
html[data-theme="dark"] .privacy-status-card li,
html[data-theme="dark"] .prose .lead,
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .breadcrumb-link,
html[data-theme="dark"] .breadcrumb-current,
html[data-theme="dark"] .breadcrumb-separator {
  color: var(--muted);
}
html[data-theme="dark"] label,
html[data-theme="dark"] .label,
html[data-theme="dark"] .trust-row,
html[data-theme="dark"] .privacy-toc a,
html[data-theme="dark"] .card-meta span,
html[data-theme="dark"] .privacy-meta-bar span,
html[data-theme="dark"] .vehicle-source {
  color: #cbd5e1;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: rgba(2, 6, 23, .74);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, .22);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #64748b;
}
html[data-theme="dark"] input:disabled {
  background: rgba(15, 23, 42, .62);
  color: #64748b;
}
html[data-theme="dark"] select:required:invalid {
  color: #64748b;
}
html[data-theme="dark"] select option {
  background: #0f172a;
  color: #f8fafc;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: rgba(96,165,250,.70);
  box-shadow: 0 0 0 4px rgba(96,165,250,.14);
}
html[data-theme="dark"] input.is-invalid,
html[data-theme="dark"] select.is-invalid,
html[data-theme="dark"] textarea.is-invalid {
  background: rgba(127, 29, 29, .22);
}
html[data-theme="dark"] .field-error,
html[data-theme="dark"] .route-status.error,
html[data-theme="dark"] .vehicle-status.error,
html[data-theme="dark"] .fuel-price-status.error {
  color: #fca5a5;
}
html[data-theme="dark"] .route-status.ok,
html[data-theme="dark"] .vehicle-status.ok,
html[data-theme="dark"] .fuel-price-status.ok {
  color: #86efac;
}
html[data-theme="dark"] .metric-grid div,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .form-block,
html[data-theme="dark"] .vehicle-card,
html[data-theme="dark"] .fuel-price-tools,
html[data-theme="dark"] .privacy-summary-grid div,
html[data-theme="dark"] .legal-info-box,
html[data-theme="dark"] .rights-card,
html[data-theme="dark"] .privacy-list-grid > div,
html[data-theme="dark"] .external-service-card,
html[data-theme="dark"] table,
html[data-theme="dark"] th,
html[data-theme="dark"] .map-card {
  background: rgba(2, 6, 23, .48);
  border-color: rgba(148,163,184,.18);
}
html[data-theme="dark"] .vehicle-card,
html[data-theme="dark"] .rights-card {
  background: linear-gradient(180deg, rgba(15,23,42,.94), rgba(2,6,23,.62));
}
html[data-theme="dark"] .muted {
  background: rgba(15, 23, 42, .48);
  border-color: var(--line);
}
html[data-theme="dark"] .mini-map {
  background:
    linear-gradient(90deg, rgba(148,163,184,.10) 1px, transparent 1px),
    linear-gradient(rgba(148,163,184,.10) 1px, transparent 1px),
    radial-gradient(circle at 20% 20%, rgba(96,165,250,.20), transparent 18%),
    radial-gradient(circle at 70% 74%, rgba(34,197,94,.20), transparent 22%),
    #020617;
}
html[data-theme="dark"] .pin {
  border-color: #0f172a;
}
html[data-theme="dark"] .distance-pill,
html[data-theme="dark"] .btn-route,
html[data-theme="dark"] .section-number,
html[data-theme="dark"] .callout {
  background: rgba(34,197,94,.12);
  color: #bbf7d0;
  border-color: rgba(34,197,94,.28);
}
html[data-theme="dark"] .card-link,
html[data-theme="dark"] .prose a,
html[data-theme="dark"] .breadcrumb-link,
html[data-theme="dark"] .feature-grid span,
html[data-theme="dark"] .privacy-summary-grid span,
html[data-theme="dark"] .external-service-card span {
  color: #86efac;
}
html[data-theme="dark"] .map-note,
html[data-theme="dark"] .map-expand-btn,
html[data-theme="dark"] .place-suggestions {
  background: rgba(15,23,42,.94);
  color: #e2e8f0;
  border-color: rgba(148,163,184,.24);
  box-shadow: 0 20px 55px rgba(0,0,0,.38);
}
html[data-theme="dark"] .place-suggestion {
  color: #f8fafc;
}
html[data-theme="dark"] .place-suggestion:hover,
html[data-theme="dark"] .place-suggestion.is-active,
html[data-theme="dark"] .privacy-toc a:hover {
  background: rgba(30,41,59,.92);
  color: #fff;
}
html[data-theme="dark"] .suggestion-title {
  color: #f8fafc;
}
html[data-theme="dark"] .suggestion-subtitle,
html[data-theme="dark"] .place-loading,
html[data-theme="dark"] .place-empty {
  color: #94a3b8;
}
html[data-theme="dark"] .leaflet-container {
  background: #0f172a;
}
html[data-theme="dark"] .leaflet-control-zoom a,
html[data-theme="dark"] .leaflet-control-attribution {
  background: rgba(15,23,42,.94) !important;
  color: #e2e8f0 !important;
  border-color: rgba(148,163,184,.22) !important;
}
html[data-theme="dark"] .leaflet-popup-content-wrapper,
html[data-theme="dark"] .leaflet-popup-tip {
  background: #0f172a;
  color: #f8fafc;
}
html[data-theme="dark"] .privacy-note {
  background: rgba(245,158,11,.12);
  color: #fde68a !important;
  border-left-color: #fbbf24;
}
html[data-theme="dark"] th {
  color: #cbd5e1;
}
html[data-theme="dark"] td,
html[data-theme="dark"] th {
  border-bottom-color: rgba(148,163,184,.16);
}
html[data-theme="dark"] .site-footer {
  background: #020617;
  border-top: 1px solid rgba(148,163,184,.14);
}
html[data-theme="dark"] .site-footer p {
  color: #94a3b8;
}
html[data-theme="dark"] .privacy-hero {
  background:
    radial-gradient(circle at 12% 8%, rgba(34,197,94,.14), transparent 28%),
    radial-gradient(circle at 86% 24%, rgba(37,99,235,.16), transparent 30%);
}
@media (max-width: 960px) {
  html[data-theme="dark"] .nav-links {
    background: rgba(15,23,42,.96);
    border-color: rgba(148,163,184,.22);
  }
  .theme-toggle {
    justify-content: flex-start;
    width: 100%;
  }
}

/* V18: corrección de contraste en modo oscuro para botones principales claros */
html[data-theme="dark"] .btn-primary {
  background: #f8fafc;
  color: #020617;
  border: 1px solid rgba(248, 250, 252, .22);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
}

html[data-theme="dark"] .btn-primary:hover {
  background: #e2e8f0;
  color: #020617;
}

html[data-theme="dark"] .btn-primary:disabled,
html[data-theme="dark"] .btn-primary[disabled] {
  color: #020617;
  background: #f8fafc;
  opacity: .72;
}
