/* =====================================================================
   MOSTAJO VERIFICACIONES — mundo visual "Planilla del comisario técnico"
   Tokens: papel de formulario blanco, tinta azul registro, sello rojo,
   copia carbónica violeta, birome azul. Tipografía: Archivo (Omnibus-Type).
   ===================================================================== */
:root {
  --paper: #ffffff;
  --paper-2: #f2f4fa;
  --text: #141a33;
  --text-2: #4a5276;
  --ink: #0b2fb5;
  --ink-2: #0a28a0;
  --ink-soft: #b9c6f2;
  --rule: rgba(11, 47, 181, .30);
  --rule-soft: rgba(11, 47, 181, .14);
  --stamp: #d9262f;
  --stamp-deep: #b51e26;
  --carbon: #5b4fb3;
  --pen: #0a28a0;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --sheet-max: 1200px;
  --cell: 14px;
  --head-h: 56px;
  --measure: 72ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; color-scheme: light; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--text);
  font-family: var(--font); font-size: 1rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
h1, h2, h3, p, ol, ul, fieldset, figure { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
legend { padding: 0; }
a { color: inherit; }
button { font: inherit; }
img { max-width: 100%; display: block; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---- superficies del navegador, a la tinta del formulario ---- */
::selection { background: var(--ink); color: #fff; }
:root { caret-color: var(--stamp); scrollbar-color: var(--ink) var(--paper-2); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--ink); border: 2px solid var(--paper-2); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
a:not(.btn-stamp):not(.head-wa) { text-decoration-thickness: 1px; text-underline-offset: .18em; }

/* ---- etiquetas de formulario ---- */
.lbl {
  display: block; font-size: 0.6875rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink); line-height: 1.3;
}
.wrap { max-width: var(--sheet-max); margin-inline: auto; padding-inline: var(--gutter); }
main.wrap { width: 100%; flex: 1 0 auto; }
.sheet-head .wrap, .sheet-foot .wrap { width: 100%; }

/* =====================================================================
   CABECERA DE PLANILLA (banda azul)
   ===================================================================== */
.sheet-head { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 30; }
.head-grid {
  display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: stretch;
  border-inline: 1px solid rgba(255,255,255,.22);
}
.head-cell {
  padding: 8px var(--cell); border-right: 1px solid rgba(255,255,255,.22);
  display: flex; flex-direction: column; justify-content: center; min-height: var(--head-h);
  white-space: nowrap;
}
.head-cell:last-child { border-right: 0; }
.head-cell .lbl { color: var(--ink-soft); font-size: 0.6875rem; }
.head-cell strong { font-weight: 700; font-size: 0.875rem; letter-spacing: .01em; }
.head-title { padding-block: 6px; justify-content: center; }
.head-title img { display: block; height: 44px; width: auto; align-self: flex-start; }
.head-title h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.head-wa {
  text-decoration: none; background: var(--stamp); color: #fff; font-weight: 700; font-size: 0.8125rem;
  align-items: center; flex-direction: row; gap: 8px; justify-content: center;
}
.head-wa:hover { background: var(--stamp-deep); }
.head-wa svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 899px) {
  .head-grid { grid-template-columns: 1fr auto; border-inline: 0; }
  .head-title img { height: 36px; }
  .head-cell { min-height: 52px; }
  .head-cell.hide-m { display: none; }
  .head-cell { white-space: normal; }
  .head-title { border-right: 0; }
}

/* =====================================================================
   HOJA
   ===================================================================== */
.sheet { border-inline: 1px solid var(--rule); }
@media (max-width: 899px) { .sheet { border-inline: 0; } }
.sec { border-bottom: 1px solid var(--rule); }
.sec-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: stretch;
  border-bottom: 1px solid var(--ink); border-top: 2px solid var(--ink);
}
.sec-id {
  background: var(--ink); color: #fff; font-weight: 700; font-stretch: 112%;
  padding: 10px var(--cell); min-width: 56px; display: grid; place-items: center; font-size: 1.125rem;
}
.sec-head h2 {
  padding: 10px var(--cell); font-size: 0.8125rem; font-weight: 700; font-stretch: 112%;
  text-transform: uppercase; letter-spacing: .06em; align-self: center;
}
.sec-note { display: none; }
@media (max-width: 599px) { .sec-note { display: none; } }

/* celdas */
.cells { display: grid; }
.cell { padding: 12px var(--cell) 14px; border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); min-width: 0; }
.cell:last-child { border-right: 0; }
.cell .lbl { margin-bottom: 6px; }
.cell p { font-size: 0.9375rem; color: var(--text); }
.cell-num {
  font-weight: 800; font-stretch: 125%; font-size: 1.75rem; color: var(--ink); line-height: 1; margin-bottom: 10px;
}
.cell h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }

/* renglones vacíos (a completar) */
.ruled {
  height: calc(3 * 28px);
  background: repeating-linear-gradient(to bottom, transparent 0 27px, var(--rule) 27px 28px);
  margin-top: 8px;
}
.ruled-note { font-size: 0.6875rem; color: var(--carbon); margin-top: 6px; font-style: italic; }
.sys-list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); }
.sys-list li { display: grid; grid-template-columns: 34px 1fr; gap: 0 10px; align-items: baseline; padding: 12px var(--cell); border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); font-size: 0.9375rem; font-weight: 600; }
.sys-list li:nth-child(3n) { border-right: 0; }
.sys-list .n { font-size: 0.75rem; font-weight: 600; color: var(--text-2); }
.sys-list li small { display: block; font-size: 0.75rem; font-weight: 400; color: var(--text-2); }
@media (max-width: 699px) { .sys-list { grid-template-columns: 1fr; } .sys-list li { border-right: 0; } }
.sys-note { padding: 10px var(--cell) 14px; font-size: 0.8125rem; color: var(--text-2); }

/* =====================================================================
   SECCIÓN A — COTIZACIÓN (primer viewport)
   ===================================================================== */
.objeto { border-bottom: 1px solid var(--rule); }
.objeto .line {
  display: grid; grid-template-columns: 112px 1fr; gap: 4px 16px; align-items: baseline;
  padding: 22px var(--cell) 24px; border-bottom: 1px solid var(--rule-soft);
}
.objeto .line:last-child { border-bottom: 0; }
.objeto .lbl { padding-top: .3em; }
.objeto p { font-size: clamp(1.125rem, 1.7vw, 1.375rem); font-weight: 500; line-height: 1.4; letter-spacing: -.005em; color: var(--text); max-width: 60ch; }
.objeto p strong { font-weight: 700; color: var(--ink); }
.objeto-link { display: none; font-size: 0.875rem; font-weight: 600; color: var(--ink); white-space: nowrap; margin-left: 6px; padding: 14px 4px; margin-block: -14px; }
@media (max-width: 899px) { .objeto-link { display: inline; } }
.objeto-link:hover { color: var(--stamp); }
@media (max-width: 599px) { .objeto .line { grid-template-columns: 1fr; gap: 4px; } }

.quote-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.quote-form { border-right: 1px solid var(--rule); }
@media (max-width: 899px) {
  .quote-grid { grid-template-columns: 1fr; }
  .quote-form { border-right: 0; order: 1; }
  .quote-total { order: 2; background: var(--paper-2); border-top: 2px solid var(--ink); }
  .sheet-head { transition: transform .25s ease; }
  .sheet-head.is-hidden { transform: translateY(-100%); }
  .lines { border-top: 1px solid var(--rule-soft); }
  .lines li { font-size: 0.875rem; min-height: 42px; padding: 8px var(--cell); }
  .total-row { padding: 12px var(--cell); }
  .total-row strong { font-size: 1.125rem; }
  .sec-head h2 { font-size: 0.8125rem; }
  .row { min-height: 50px; }
  .row .txt { font-size: 0.9375rem; }
  .row .txt small { font-size: 0.75rem; }
  .row .amt { font-size: 0.75rem; }
  .objeto p { font-size: 1.0625rem; line-height: 1.45; }
  .objeto .line { padding: 16px var(--cell) 18px; }
  .sign-row { padding: 16px var(--cell) 20px; background: var(--paper-2); border-top: 0; }
}

/* casilleros */
.rows legend { padding: 14px var(--cell) 6px; width: 100%; border-bottom: 1px solid var(--rule-soft); }
.rows + .rows legend { border-top: 1px solid var(--rule); }
.row {
  display: grid; grid-template-columns: 36px 30px 1fr auto; align-items: center; gap: 0 12px;
  min-height: 54px; padding: 0 var(--cell); border-bottom: 1px solid var(--rule-soft); cursor: pointer;
  position: relative; transition: background .15s ease;
}
.row:hover { background: var(--paper-2); }
.row input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.row .num { font-size: 0.75rem; color: var(--text-2); font-weight: 600; }
.row .box {
  width: 22px; height: 22px; border: 1.5px solid var(--ink); position: relative; background: var(--paper);
  display: grid; place-items: center;
}
.row .tick { position: absolute; width: 34px; height: 30px; left: -4px; top: -10px; overflow: visible; pointer-events: none; }
.row .tick path {
  fill: none; stroke: var(--pen); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48;
}
.row input:checked ~ .box .tick path { stroke-dashoffset: 0; transition: stroke-dashoffset .32s cubic-bezier(.2, .8, .2, 1); }
.row input:focus-visible ~ .box { outline: 2px solid var(--ink); outline-offset: 3px; }
.row .txt { font-size: 1rem; font-weight: 500; }
.row .txt small { display: block; font-size: 0.75rem; font-weight: 400; color: var(--text-2); }
.row .amt { font-size: 0.8125rem; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.row input:checked ~ .txt { color: var(--ink); }
.row input:checked ~ .amt { color: var(--ink); font-weight: 600; }

/* sub-selector de localidad bajo un casillero */
.row-sub { padding: 6px var(--cell) 14px 78px; border-bottom: 1px solid var(--rule-soft); background: var(--paper-2); }
.row-sub[hidden] { display: none; }
.row-sub .lbl { margin-bottom: 6px; }
.row-sub .select-wrap { position: relative; max-width: 360px; }
.row-sub select { width: 100%; font: inherit; font-size: 0.9375rem; padding: 9px 32px 8px 10px; border: 1px solid var(--rule); background: var(--paper); color: var(--text); appearance: none; -webkit-appearance: none; border-radius: 4px; cursor: pointer; }
.row-sub .select-wrap svg { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.field[hidden] { display: none; }
@media (max-width: 599px) { .row-sub { padding-left: var(--cell); } }

/* total estampado */
.quote-total { display: flex; flex-direction: column; }
.stamp-wrap { padding: 26px var(--cell) 18px; display: grid; justify-items: start; gap: 8px; }

.stamp {
  display: inline-block; color: var(--stamp); font-weight: 700; font-stretch: 88%; letter-spacing: -.03em; line-height: 1;
  font-size: clamp(3rem, 5.6vw, 4.5rem); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.stamp.stamped { animation: price-settle .22s cubic-bezier(.22, 1, .36, 1); }
@keyframes price-settle { 0% { opacity: .2; transform: translateY(-3px); } 100% { opacity: 1; transform: none; } }
.stamp-wrap .lbl { color: var(--text-2); }
.stamp-wrap .stamp-note { font-size: 0.8125rem; color: var(--text-2); max-width: 36ch; }

.lines { list-style: none; counter-reset: none; border-top: 1px solid var(--rule); }
.lines li {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 0 10px; align-items: center;
  padding: 10px var(--cell); border-bottom: 1px solid var(--rule-soft); font-size: 0.875rem; min-height: 46px;
}
.lines .n { font-size: 0.75rem; font-weight: 600; color: var(--text-2); }
.lines .lbl-line { color: var(--text); }
.lines .lbl-line small { display: none; }
.lines .amt { font-weight: 600; white-space: nowrap; }
.lines li.off .lbl-line, .lines li.off .amt { color: var(--text-2); }
.lines li.off .amt { font-weight: 400; }
.lines li.on .amt { color: var(--ink); }
.total-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 14px var(--cell); border-top: 2px solid var(--ink); margin-top: auto;
}
.total-row span { font-weight: 700; font-stretch: 112%; text-transform: uppercase; letter-spacing: .06em; font-size: 0.8125rem; color: var(--ink); }
.total-row strong { font-size: 1.25rem; font-weight: 700; color: var(--ink); }

/* firma + botón sello */
.sign-row {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px 24px; align-items: center;
  padding: 22px var(--cell); border-top: 1px solid var(--rule);
}
.sign-line { display: none; }
.sign-line .lbl { color: var(--text-2); }
.sign-line .lbl small { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 6px; }
@media (max-width: 599px) {
  .sign-row .btn-stamp { width: 100%; white-space: normal; padding: 12px 18px; }
  .btn-stamp .price { display: none; }
}

.btn-stamp {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: 4px;
  background: var(--stamp); color: #fff; text-decoration: none; font-weight: 700; font-size: 0.875rem;
  text-transform: uppercase; letter-spacing: .05em; cursor: pointer; white-space: nowrap;
  transition: background .15s ease;
}
.btn-stamp:hover { background: var(--stamp-deep); }
.btn-stamp svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn-stamp .price { font-weight: 600; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.4); letter-spacing: 0; text-transform: none; }
.btn-stamp.outline { background: transparent; box-shadow: inset 0 0 0 1.5px #fff; }
.btn-stamp.outline:hover { background: #fff; color: var(--ink); }
.btn-stamp[disabled], .btn-stamp[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* =====================================================================
   SECCIÓN B — INFORME ADJUNTO
   ===================================================================== */
.report-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
@media (max-width: 899px) { .report-grid { grid-template-columns: minmax(0, 1fr); } }
.report-text { padding: 20px var(--cell) 24px; border-right: 1px solid var(--rule); }
@media (max-width: 899px) { .report-text { border-right: 0; border-bottom: 1px solid var(--rule); } }
.report-text p { font-size: 1.0625rem; max-width: 42ch; margin-bottom: 14px; }
.report-text ol { list-style: none; border-top: 1px solid var(--rule); margin-top: 14px; }
.report-text li { display: grid; grid-template-columns: 34px 1fr; padding: 9px 0; border-bottom: 1px solid var(--rule-soft); font-size: 0.875rem; }
.report-text li .n { font-size: 0.75rem; font-weight: 600; color: var(--text-2); }
.pages { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; align-items: start; min-width: 0; padding: 16px var(--cell); }
.pages .page { max-width: 300px; margin: 0 auto; border: 1px solid var(--rule); }
.page .doc { font-size: 0.625rem; line-height: 1.4; color: var(--text); display: grid; gap: 4px; }
.page .doc strong { font-size: 0.6875rem; font-weight: 700; font-stretch: 112%; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.page .doc .r { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--rule-soft); }
.page .doc .r span:last-child { color: var(--carbon); font-weight: 600; }
.page .muestra { position: absolute; right: 12px; bottom: 12px; color: var(--text-2); font-size: 0.625rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

.page {
  width: 100%; min-width: 0; aspect-ratio: 1 / 1.3; border-right: 1px solid var(--rule-soft); padding: 14px; display: flex; flex-direction: column; gap: 8px;
  background: var(--paper); position: relative;
}
.page:last-child { border-right: 0; }
.page .lbl { color: var(--text-2); }
  margin: auto; overflow-wrap: anywhere; border: 1.5px solid var(--carbon); color: var(--carbon); padding: 8px 10px; font-size: 0.6875rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; transform: rotate(-6deg); background: var(--paper); text-align: center; max-width: 80%;
}
.page img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* iPhone con el informe adentro */
.phone-wrap { padding: 28px var(--cell) 24px; display: grid; justify-items: center; gap: 14px; background: var(--paper-2); }
.phone {
  position: relative; width: 390px; max-width: 100%; aspect-ratio: 390 / 800; border-radius: 54px;
  background: #0b0d14; padding: 12px; box-shadow: 0 30px 60px -30px rgba(20,26,51,.55), 0 0 0 1px rgba(20,26,51,.25) inset;
}
.phone::before { content: ""; position: absolute; inset: 3px; border-radius: 51px; border: 1px solid rgba(255,255,255,.12); pointer-events: none; }
.phone-island { position: absolute; top: 22px; left: 50%; width: 110px; height: 30px; transform: translateX(-50%); background: #0b0d14; border-radius: 20px; z-index: 2; }
.phone-inner { position: absolute; inset: 12px; border-radius: 42px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.phone-status { flex: none; height: 46px; background: #fff; }
.phone-screen { display: block; width: 100%; flex: 1; min-height: 0; border: 0; background: #fff; }
.phone-caption { font-size: 0.75rem; color: var(--text-2); text-align: center; }
.report-cta { margin-top: 18px; font-size: 0.875rem; }
.report-cta a { color: var(--ink); font-weight: 600; display: inline-block; padding: 12px 0; margin-block: -12px; }
@media (max-width: 899px) { .phone-wrap { padding: 24px 12px; } .phone { width: min(318px, 100%); } }

/* =====================================================================
   SECCIÓN C — PUNTOS · D — PROCEDIMIENTO · E — COBERTURA
   ===================================================================== */
.systems { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 899px) { .systems { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .systems { grid-template-columns: 1fr; } .systems .cell { border-right: 0; } }
.systems .cell:nth-child(3n) { border-right: 0; }
@media (max-width: 899px) and (min-width: 600px) { .systems .cell:nth-child(3n) { border-right: 1px solid var(--rule-soft); } .systems .cell:nth-child(2n) { border-right: 0; } }

.proc { list-style: none; }
.proc li { display: grid; grid-template-columns: 44px 200px 1fr; gap: 0 14px; align-items: baseline; padding: 12px var(--cell); border-bottom: 1px solid var(--rule-soft); font-size: 0.9375rem; }
.proc li:last-child { border-bottom: 0; }
.proc .n { font-size: 0.75rem; font-weight: 600; color: var(--text-2); }
.proc h3 { font-size: 0.9375rem; font-weight: 700; }
.proc p { color: var(--text); max-width: 70ch; }
@media (max-width: 699px) { .proc li { grid-template-columns: 44px 1fr; } .proc p { grid-column: 2; } }

.coverage { grid-template-columns: 1fr 1fr 1fr 1.4fr; }
@media (max-width: 899px) { .coverage { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .coverage { grid-template-columns: 1fr; } .coverage .cell { border-right: 0; } }
.zone { font-size: 1.25rem; font-weight: 700; font-stretch: 112%; color: var(--ink); line-height: 1.1; }
.zone-tag { display: inline-block; margin-top: 6px; font-size: 0.8125rem; color: var(--text-2); }
.zone-tag.base { color: var(--ink); }

/* =====================================================================
   SECCIÓN F — AGENCIAS (banda azul a sangre)
   ===================================================================== */
.band { background: var(--ink); color: #fff; }
.band .sec-head { border-color: rgba(255,255,255,.35); }
.band .sec-id { background: #fff; color: var(--ink); }
.band .sec-note { color: var(--ink-soft); border-left-color: rgba(255,255,255,.2); }
.agency { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 34px var(--cell) 38px; }
.agency h3 { font-size: clamp(1.375rem, 2.6vw, 1.875rem); font-weight: 700; font-stretch: 112%; line-height: 1.1; letter-spacing: -.01em; max-width: 22ch; }
.agency p { margin-top: 10px; color: var(--ink-soft); font-size: 1rem; max-width: 48ch; }
@media (max-width: 699px) { .agency { grid-template-columns: 1fr; } .agency .btn-stamp { width: 100%; white-space: normal; } }

/* =====================================================================
   SECCIÓN G — REFERENCIAS · H — SOLICITUD · PIE
   ===================================================================== */
.refs { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 699px) { .refs { grid-template-columns: 1fr; } .refs .cell { border-right: 0; } }
.refs .cell { min-height: 120px; }

.closing { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 32px var(--cell) 36px; }
.closing h3 { font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 700; font-stretch: 112%; line-height: 1.08; letter-spacing: -.015em; max-width: 18ch; }
.closing p { margin-top: 10px; color: var(--text-2); max-width: 46ch; }
.closing .price-ref { font-weight: 700; color: var(--ink); }
@media (max-width: 699px) { .closing { grid-template-columns: 1fr; } .closing .btn-stamp { width: 100%; white-space: normal; } }

.sheet-foot { background: var(--ink); color: var(--ink-soft); font-size: 0.75rem; }
.foot-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding-block: 18px; align-items: center; }
.foot-grid strong { color: #fff; font-weight: 700; }
.foot-grid a { color: #fff; display: inline-block; padding: 13px 0; margin-block: -9px; }
@media (max-width: 599px) { .foot-grid { grid-template-columns: 1fr; gap: 6px; } }

/* barra fija mobile (ticket) */
.ticket-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none;
  background: var(--ink); color: #fff; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px -12px rgba(20, 26, 51, .5);
  grid-template-columns: 1fr auto; align-items: center; gap: 12px;
}
.ticket-bar .lbl { color: var(--ink-soft); font-size: 0.625rem; }
.ticket-bar strong { font-size: 1.25rem; font-weight: 700; font-stretch: 100%; letter-spacing: -.02em; display: block; line-height: 1.1; }
.ticket-bar .btn-stamp { min-height: 44px; padding: 0 14px; font-size: 0.75rem; letter-spacing: .04em; gap: 8px; }
.ticket-bar > div { min-width: 0; }
.ticket-bar.is-hidden { transform: translateY(110%); }
.ticket-bar { transition: transform .25s ease; }
@media (max-width: 899px) { .ticket-bar { display: grid; } body.has-ticket { padding-bottom: 84px; } }

/* =====================================================================
   PÁGINA AGENDAR
   ===================================================================== */
.form-sheet { max-width: 760px; margin-inline: auto; }
.form-sheet .sec { border-inline: 1px solid var(--rule); border-top: 0; }
@media (max-width: 899px) { .form-sheet .sec { border-inline: 0; } }
.back-link { display: inline-flex; align-items: center; gap: 8px; padding: 16px var(--cell); font-size: 0.8125rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.back-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.quote-box[hidden] { display: none; }
.quote-box {
  display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center;
  margin: 16px var(--cell) 0; padding: 12px 14px; border: 1px solid var(--rule); background: var(--paper-2); color: var(--text);
}
.quote-box .stamp { font-size: 1.875rem; }
@media (max-width: 599px) { .quote-box .stamp { font-size: 1.625rem; justify-self: start; } }
.quote-box .lbl { color: var(--text-2); margin-bottom: 2px; }
.quote-box a { font-size: 0.8125rem; color: var(--ink); display: inline-block; padding: 12px 8px; margin: -12px -8px; }
@media (max-width: 599px) { .quote-box { grid-template-columns: 1fr auto; gap: 8px 12px; } .quote-box .stamp { grid-column: 1 / -1; } }

.form-rows { display: grid; grid-template-columns: 1fr 1fr; }
.form-rows.c3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 599px) { .form-rows, .form-rows.c3 { grid-template-columns: 1fr; } .form-rows .field { border-right: 0; } }
.field { padding: 12px var(--cell) 10px; border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); min-width: 0; }
.field:last-child { border-right: 0; }
.field.full { grid-column: 1 / -1; border-right: 0; }
.field label { display: block; }
.field .req { color: var(--stamp); }
.field input, .field select, .field textarea {
  width: 100%; margin-top: 4px; padding: 11px 0 9px; border: 0; border-bottom: 1.5px solid var(--ink);
  background: transparent; font: inherit; font-size: 1.0625rem; color: var(--pen); border-radius: 0; font-weight: 500;
}
.field .select-wrap { position: relative; }
.field select { appearance: none; -webkit-appearance: none; background-image: none; cursor: pointer; padding-right: 32px; }
.field .select-wrap svg { position: absolute; right: 6px; bottom: 12px; width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.field select option { color: var(--text); font-weight: 400; }
.field textarea { min-height: 72px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-2); font-weight: 400; font-size: 0.875rem; opacity: 1; }
.field .hint { font-size: 0.75rem; color: var(--text-2); margin-top: 6px; }
.req-legend { padding: 10px var(--cell); font-size: 0.75rem; color: var(--text-2); border-bottom: 1px solid var(--rule-soft); }
.sent { padding: 14px var(--cell) 0; font-size: 0.875rem; color: var(--ink); grid-column: 1 / -1; }
.sent a { color: var(--stamp); font-weight: 600; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--stamp); background: var(--paper-2); }
.field.invalid input, .field.invalid select { border-bottom-color: var(--stamp); }
.field .err { display: none; font-size: 0.75rem; color: var(--stamp); margin-top: 6px; font-weight: 600; }
.field.invalid .err { display: block; }
.form-sheet .sign-row { padding-top: 30px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stamp.stamped { animation: none; }
  .row input:checked ~ .box .tick path { transition: none; }
  .btn-stamp, .row { transition: none; }
  .ticket-bar, .sheet-head { transition: none; }
}

/* Mobile: el precio vive en la barra fija; el bloque de precio y desglose se oculta */
@media (max-width: 899px) {
  .quote-total { display: none; }
  .sign-row { border-top: 1px solid var(--rule); }
}

/* Mobile: cabecera a todo el ancho, sin línea bajo la cabecera, barra fija siempre visible, sin CTA duplicado */
@media (max-width: 899px) {
  .sheet-head .wrap { padding-inline: 0; }
  .head-title { padding-left: var(--gutter); }
  .sheet-head.is-hidden { transform: none; }
  .ticket-bar.is-hidden { transform: none; }
  #cotizador .sign-row { display: none; }
}

/* Mobile: cabeceras de sección (A, B, C…) y banda de agencias a todo el ancho */
@media (max-width: 899px) {
  .sec-head { margin-inline: calc(var(--gutter) * -1); }
  .sec-head .sec-id { padding-inline: var(--gutter); min-width: 0; }
  .sec.band { margin-inline: calc(var(--gutter) * -1); }
  .sec.band .sec-head { margin-inline: 0; }
  .sec.band .agency { padding-inline: var(--gutter); }
}

/* Mobile: en la Sección B va el texto y enseguida el teléfono; la lista B.1–B.5 solo en desktop */
@media (max-width: 899px) {
  .report-text ol { display: none; }
  .report-text { padding-bottom: 8px; }
  .report-cta { margin-top: 6px; }
}

/* Primera sección: vuelve la línea superior y un pequeño respiro bajo la cabecera */
.sec:first-of-type .sec-head { border-top: 2px solid var(--ink); margin-top: 14px; }
