:root {
  --ink: #101b26;
  --paper: #f3f5f7;
  --panel: #ffffff;
  --line: #d9dee4;
  --muted: #5b6773;
  --blue: #0b4f9e;
  --blue-ink: #083a75;
  --blue-wash: #e4edf8;
  --amber: #f2a900;
  --amber-wash: #fdf1d3;
  --green: #1c7c54;
  --green-wash: #dcf0e6;
  --red: #c8372d;
  --red-wash: #f9e1de;
  --font: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3 { line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--blue); }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  border: 2px solid var(--blue); background: var(--blue); color: #fff;
}
.btn:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
.btn.ghost { background: transparent; color: var(--blue); }
.btn.ghost:hover { background: var(--blue-wash); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn.danger:hover { background: var(--red-wash); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Botón de función Pro que aún no existe (fake door) */
.pro {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border-radius: 10px; border: 2px dashed var(--amber); background: var(--amber-wash); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer; text-align: left;
}
.pro:hover { background: #fbe6b0; }
.pro .tag {
  font-size: 12px; font-weight: 800; letter-spacing: 0.02em; background: var(--ink); color: var(--amber);
  padding: 2px 7px; border-radius: 6px;
}

/* Formularios */
label.f { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
label.f > span small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff; width: 100%;
  min-height: 44px; padding: 8px 12px; border: 1.5px solid #aab3bd; border-radius: 8px;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid #b9d2ee; outline-offset: 0; }
input[type="checkbox"] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.err { color: var(--red); font-weight: 600; font-size: 14px; }

/* Cuentakilómetros: el elemento memorable */
.odo {
  display: inline-flex; align-items: center; gap: 0.07em;
  font-size: var(--odo-size, 72px); font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.odo .rd {
  display: inline-block; width: 0.66em; height: 1.18em; overflow: hidden; position: relative;
  background: #0a121a; color: #f3f5f7; border-radius: 0.1em;
  box-shadow: inset 0 0.18em 0.22em -0.1em rgba(0,0,0,.7), inset 0 -0.18em 0.22em -0.1em rgba(0,0,0,.7);
}
.odo .rd.dec { background: var(--amber); color: #0a121a; }
.odo .rs {
  display: block; transform: translateY(calc(var(--d, 0) * -1.18em));
  transition: transform 1100ms cubic-bezier(.16, .84, .24, 1);
}
.odo .rs i { display: block; height: 1.18em; line-height: 1.18em; text-align: center; font-style: normal; }
.odo .sep { padding: 0 0.04em; align-self: flex-end; line-height: 1.1; }
@media (prefers-reduced-motion: reduce) { .odo .rs { transition: none; } }

/* Diálogo de fake door y de confirmación */
dialog.cw {
  border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 32px));
  background: var(--panel); color: var(--ink); box-shadow: 0 24px 60px rgba(16, 27, 38, 0.35);
}
dialog.cw::backdrop { background: rgba(16, 27, 38, 0.55); }
dialog.cw .in { padding: 26px; display: grid; gap: 14px; }
dialog.cw h2 { font-size: 24px; }
dialog.cw .lead { color: var(--muted); }
dialog.cw .row { display: flex; gap: 10px; flex-wrap: wrap; }
.feature-name { font-weight: 750; padding: 10px 12px; background: var(--amber-wash); border-left: 5px solid var(--amber); border-radius: 0 8px 8px 0; }
