/* fisco·claro — hoja única.
   Identidad: papel fiscal mexicano bien puesto (formato/CFDI reinterpretado).
   UNA firma visual: el resultado como "acuse de cálculo" — líneas punteadas
   conductoras, cinta guinda superior y sello informativo ladeado. */

:root {
  --paper: #f1ede1;
  --card: #faf8f0;
  --campo: #fffdf7;
  --ink: #23211b;
  --mut: #5f5947;
  --line: #d9d2bd;
  --line2: #a89f83;
  --sello: #8a2f3b;
  --sello-suave: #f3e4e0;
  --ok: #3d6b50;
  --ambar: #8a6410;
  --easing: cubic-bezier(0.25, 0.1, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  border-top: 5px solid var(--sello);
}

.wrap { max-width: 920px; margin-inline: auto; padding-inline: 20px; }

::selection { background: var(--sello); color: var(--paper); }

a { color: var(--sello); text-underline-offset: 2px; }
a:hover { color: var(--ink); }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 20;
  background: var(--ink); color: var(--paper); padding: 10px 14px;
  text-decoration: none; border-radius: 2px;
}
.skip:focus { left: 8px; top: 8px; }

/* ── Barra superior ─────────────────────────────────────────── */
.topbar { border-bottom: 1px solid var(--line); background: var(--card); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding-block: 13px; flex-wrap: wrap;
}
.brand {
  font-weight: 700; font-size: 19px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.brand .dot { color: var(--sello); }
.links { display: flex; gap: 2px; flex-wrap: wrap; }
.links a {
  padding: 7px 10px; font-size: 14px; color: var(--mut);
  text-decoration: none; border-radius: 2px;
  transition: color 0.15s var(--easing), background-color 0.15s var(--easing);
}
.links a:hover { color: var(--ink); background: rgba(35, 33, 27, 0.07); }
.links a[aria-current="page"] {
  color: var(--ink); font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--sello);
}

/* ── Encabezado de página ───────────────────────────────────── */
.hero { padding-top: 42px; }
h1 {
  font-size: clamp(30px, 6vw, 44px); line-height: 1.08;
  letter-spacing: -0.025em; font-weight: 700; margin: 0 0 18px;
}
.lede { max-width: 68ch; font-size: 17px; margin: 0 0 12px; }
.lede + .lede { color: var(--mut); }

h2 { font-size: 24px; letter-spacing: -0.015em; margin: 52px 0 16px; }

/* ── Herramienta: formato + acuse ───────────────────────────── */
.tool { display: grid; gap: 26px; margin-top: 34px; }
@media (min-width: 920px) {
  .tool { grid-template-columns: 5fr 6fr; align-items: start; }
}

.panel, .acuse {
  background: var(--card); border: 1px solid var(--line2);
  border-radius: 2px; padding: 20px;
}

.panel-head, .acuse-head {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px; font-weight: 500; line-height: 1.4;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--mut);
  border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 18px;
}

.field { margin-bottom: 16px; }
.field > label, fieldset legend {
  display: block; font-family: "IBM Plex Mono", monospace;
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
  text-transform: uppercase; margin-bottom: 7px;
}

.money {
  display: flex; align-items: center; background: var(--campo);
  border: 1px solid var(--line2); border-radius: 2px;
}
.money > span { padding-left: 12px; color: var(--mut); font-family: "IBM Plex Mono", monospace; }
.money input {
  border: 0; background: transparent; flex: 1; min-width: 0;
  font-family: "IBM Plex Mono", monospace; font-size: 20px; font-weight: 600;
  color: var(--ink); text-align: right; padding: 11px 12px;
  font-variant-numeric: tabular-nums;
}
.money input:focus { outline: none; }
.money:focus-within { outline: 2px solid var(--sello); outline-offset: 1px; }

.hint { font-size: 13px; color: var(--mut); margin: 5px 0 0; }

fieldset {
  border: 1px dashed var(--line2); border-radius: 2px;
  padding: 14px 14px 4px; margin: 20px 0;
}
fieldset legend { padding: 0 6px; margin-bottom: 0; }

.seg { display: flex; border: 1px solid var(--line2); border-radius: 2px; overflow: hidden; background: var(--campo); }
.seg label {
  flex: 1; text-align: center; padding: 10px 8px; cursor: pointer;
  font-family: "IBM Plex Mono", monospace; font-size: 13px;
  transition: background-color 0.15s var(--easing), color 0.15s var(--easing);
}
.seg label + label { border-left: 1px solid var(--line2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--ink); color: var(--paper); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--sello); outline-offset: -3px; }

.warnbox {
  border: 1px solid var(--sello); background: var(--sello-suave);
  border-radius: 2px; padding: 12px 14px; margin: 14px 0; font-size: 14px;
}
.warnbox strong {
  font-family: "IBM Plex Mono", monospace; font-size: 12px;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--sello);
}

button.calc, .kit-form button {
  background: var(--ink); color: var(--paper); border: 0; border-radius: 2px;
  padding: 12px 20px; font-family: "Archivo", sans-serif;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background-color 0.15s var(--easing);
}
button.calc:hover, .kit-form button:hover { background-color: #45412f; }

/* ── El acuse (la firma) ────────────────────────────────────── */
.acuse { position: relative; padding-top: 26px; }
.acuse::before {
  content: ""; position: absolute; top: 8px; left: 14px; right: 14px;
  border-top: 1px dashed var(--line2);
}

.row { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; font-size: 15px; }
.row .dots { flex: 1; min-width: 24px; border-bottom: 2px dotted var(--line2); transform: translateY(-4px); }
.row .amt {
  font-family: "IBM Plex Mono", monospace; font-size: 15px; font-weight: 600;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.row.sub { color: var(--mut); }
.row.sub .amt { font-weight: 400; }
.row.total {
  border-top: 4px double var(--ink); margin-top: 10px; padding-top: 13px; font-weight: 700;
}
.row.total .amt { font-size: 22px; }

.acuse-foot { font-size: 13px; color: var(--mut); margin: 10px 0 0; }
.acuse-nota { font-size: 13.5px; margin: 12px 0 0; padding: 10px 12px; background: var(--sello-suave); border-radius: 2px; }

.sello-nota {
  display: inline-block; margin-top: 18px; transform: rotate(-2.5deg);
  border: 1.5px solid var(--sello); color: var(--sello); border-radius: 2px;
  padding: 6px 10px; font-family: "IBM Plex Mono", monospace;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}

/* ── Semáforo ───────────────────────────────────────────────── */
.estado {
  display: inline-block; margin-bottom: 16px; border: 1.5px solid currentColor;
  border-radius: 2px; padding: 5px 9px;
  font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.estado.ok { color: var(--ok); }
.estado.ambar { color: var(--ambar); }
.estado.rojo { color: var(--sello); }
.estado.excedido { color: var(--paper); background: var(--ink); border-color: var(--ink); }

.gauge { margin: 4px 0 6px; }
.barra {
  position: relative; height: 26px; background: var(--campo);
  border: 1px solid var(--line2); border-radius: 2px;
}
.fill {
  position: absolute; top: 0; bottom: 0; left: 0; width: 0;
  transition: width 0.35s var(--easing), background-color 0.35s var(--easing);
}
.fill.ok { background: var(--ok); }
.fill.ambar { background: var(--ambar); }
.fill.rojo { background: var(--sello); }
.fill.excedido { background: var(--ink); }
.tick { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--ink); }
.tick-lbls {
  position: relative; height: 20px; margin-top: 4px;
  font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--mut);
}
.tick-lbls span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

/* ── Tabla de tarifas ───────────────────────────────────────── */
.table-scroll { overflow-x: auto; }
table.tabla {
  width: 100%; border-collapse: collapse;
  background: var(--card); border: 1px solid var(--line2);
}
.tabla th, .tabla td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 15px; }
.tabla thead th {
  font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--mut);
  border-bottom: 2px solid var(--ink);
}
.tabla .num {
  text-align: right; font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums; font-weight: 500;
}
.tabla .cifra {
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums; font-weight: 500;
}
.tabla tbody tr:last-child td { border-bottom: 0; }
.tabla-nota { font-size: 14px; color: var(--mut); max-width: 72ch; }

/* ── FAQ ────────────────────────────────────────────────────── */
.faq details { border: 1px solid var(--line); border-radius: 2px; background: var(--card); margin-bottom: 10px; }
.faq summary {
  cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: "IBM Plex Mono", monospace; color: var(--mut); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding: 0 16px 14px; max-width: 75ch; }
.faq details p + p { padding-top: 0; margin-top: -6px; }

/* ── Kit + servicios ────────────────────────────────────────── */
.kit { border: 1px solid var(--ink); background: var(--card); border-radius: 2px; padding: 24px; margin-top: 52px; }
.kit h2 { margin: 0 0 8px; font-size: 22px; }
.kit p { margin: 0; max-width: 68ch; }
.kit-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.kit-form input[type="email"] {
  flex: 1; min-width: 220px; padding: 12px; border: 1px solid var(--line2);
  border-radius: 2px; background: var(--campo);
  font-family: "Archivo", sans-serif; font-size: 15px; color: var(--ink);
}
.kit-ok { color: var(--ok); font-weight: 600; align-self: center; }

.services { color: var(--mut); font-size: 14px; margin: 18px 0 0; }
.services a { color: var(--ink); }

.otras { margin-top: 8px; padding-left: 20px; }
.otras li { margin-bottom: 8px; max-width: 75ch; }

/* ── Pie ────────────────────────────────────────────────────── */
footer { margin-top: 64px; border-top: 1px solid var(--line2); background: var(--card); }
footer .wrap { padding-block: 28px; font-size: 13.5px; color: var(--mut); }
footer p { margin: 0 0 10px; max-width: 90ch; }
footer a { color: var(--ink); }
.f-brand { font-weight: 600; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
