:root {
  color-scheme: light;
  --ink: #1b3028;
  --forest: #19372e;
  --green: #215641;
  --muted: #52635b;
  --paper: #fafbf7;
  --rule: #d2d9cf;
  --serif: "Baskerville", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--sans);
}
button, input, select { font: inherit; }
a { color: var(--green); }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #9d5b09; outline-offset: 4px; }
.skip-link { position: fixed; z-index: 2; left: 1rem; top: -6rem; background: white; padding: .8rem; }
.skip-link:focus { top: .5rem; }
.wrap { width: min(100% - 3rem, 67rem); margin-inline: auto; }
.mast { color: white; background: var(--forest); border-bottom: 3px solid #b49b65; }
.mast-inner, .footer-inner, .actions, .result-actions, .receipt-header { display: flex; align-items: center; }
.mast-inner { min-height: 5.15rem; gap: 1.3rem; }
.brand, .receipt-brand { font: 600 2.3rem/.95 var(--serif); letter-spacing: -.07em; }
.brand { color: white; text-decoration: none; white-space: nowrap; }
.brand span { color: #cfb67e; }
.portal-name { border-left: 1px solid #708178; padding-left: 1.35rem; font-size: .9rem; color: #e2e8e1; }
.mode {
  margin-left: auto; display: inline-flex; align-items: center; gap: .48rem; white-space: nowrap;
  border: 1px solid #708274; border-radius: 2rem; padding: .26rem .72rem; font-size: .81rem; color: #f0f3e9;
}
.mode i { width: .45rem; height: .45rem; border-radius: 50%; background: #e3bf79; }
main { flex: 1; padding-block: clamp(2.3rem, 5.5vw, 4.4rem) 3.7rem; }
.heading { margin-bottom: 2.2rem; }
.step {
  display: flex; align-items: center; gap: .62rem;
  color: #4e614f; font-weight: 650; font-size: .84rem; margin: 0 0 .65rem;
}
.step::before { content: ""; width: 1.55rem; height: 2px; background: #947944; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; }
h1 { margin-bottom: .55rem; font-size: clamp(2.65rem, 5vw, 4.1rem); letter-spacing: -.06em; line-height: 1.05; }
.heading > p:last-child { margin-bottom: 0; color: var(--muted); font-size: 1.05rem; }
h2 { font-size: clamp(1.65rem, 2.5vw, 2rem); letter-spacing: -.045em; line-height: 1.14; margin-bottom: 1.7rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(17rem, 1fr); align-items: start; gap: clamp(1.25rem, 3vw, 2.3rem); }
.card { padding: clamp(1.35rem, 3.1vw, 2.55rem); border-radius: .65rem; border: 1px solid var(--rule); background: #fff; }
.flow { display: grid; gap: 1.45rem; }
.field { display: flex; flex-direction: column; gap: .42rem; min-width: 0; }
.receptores { border: 0; padding: 0; margin: 0; min-width: 0; }
.receptores legend { font-size: .94rem; font-weight: 650; margin-bottom: .7rem; }
.perfil { display: flex; gap: .7rem; padding: .8rem; margin-bottom: .55rem; border: 1px solid var(--rule); border-radius: .4rem; cursor: pointer; }
.perfil:has(:checked) { border-color: var(--green); background: #f3f7f2; }
.perfil input[type=radio] { width: 1.1rem; min-width: 1.1rem; height: 1.1rem; margin: .18rem 0 0; accent-color: var(--green); }
.perfil small { display: block; color: var(--muted); font-size: .87rem; font-weight: 400; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
label { font-weight: 620; font-size: .91rem; }
input:not([type=hidden]), select, .money {
  width: 100%; min-width: 0; height: 3rem; border: 1px solid #95a298; background: white;
  color: var(--ink); border-radius: .32rem; padding-inline: .8rem;
}
input::placeholder { color: #657169; opacity: 1; }
input[type=date] { appearance: none; -webkit-appearance: none; }
.money { display: flex; gap: .35rem; align-items: center; }
.money input:not([type=hidden]) { height: 100%; padding-inline: .15rem; border: 0; border-radius: 0; background: transparent; }
.money input:focus-visible { outline: none; }
.money:focus-within { outline: 3px solid #9d5b09; outline-offset: 3px; }
.money span { font-size: .88rem; color: var(--muted); }
select {
  appearance: none; padding-right: 2.8rem; background-image: linear-gradient(45deg, transparent 50%, #475e50 50%), linear-gradient(135deg, #475e50 50%, transparent 50%);
  background-size: 5px 5px; background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-repeat: no-repeat;
}
.primary, .quiet { display: inline-flex; align-items: center; justify-content: center; font-weight: 650; border-radius: .35rem; }
.primary {
  justify-self: start; min-height: 3rem; border: 1px solid var(--green); padding: .65rem 1.3rem;
  background: var(--green); color: #fff; text-decoration: none; text-align: center;
}
.primary:hover { background: #183b2f; }
.quiet { min-height: 2.6rem; min-width: 3.3rem; padding: .4rem .7rem; border: 1px solid #8e9f90; background: transparent; color: #294e3b; font-size: .89rem; }
.quiet:hover { background: #e0e8dc; }
.sample { position: relative; padding-bottom: 7px; border-radius: .55rem .55rem 0 0; overflow: hidden; background-color: #edf2e9; }
.sample::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 7px;
  background: linear-gradient(45deg, var(--paper) 25%, transparent 25%) 0 0 / 14px 14px,
              linear-gradient(-45deg, var(--paper) 25%, transparent 25%) 0 0 / 14px 14px;
}
.sample-inner { padding: clamp(1.35rem, 2.5vw, 2.05rem); }
.sample h2 { margin-bottom: .38rem; }
.sample p, .notice, .receipt-note, .result-actions p { color: var(--muted); }
.sample-inner > p { margin-bottom: 1.1rem; }
.sample-mark { border: 1.5px solid #6f836f; width: 1.43rem; height: 1.66rem; padding: .34rem .22rem; display: grid; gap: 2px; margin-bottom: 1rem; }
.sample-mark i { border-top: 1px solid #6f836f; }
.sample-mark i:last-child { width: 66%; }
.ticket-list { list-style: none; margin: 0; padding: 0; }
.ticket-list li {
  display: flex; align-items: center; justify-content: space-between; gap: .7rem;
  padding-block: .88rem; border-top: 1px dashed #abb9a9;
}
.ticket-list li:last-child { padding-bottom: .12rem; }
.ticket-list strong { font-size: .98rem; font-weight: 640; overflow-wrap: anywhere; }
.ticket-note { display: block; color: var(--muted); font-size: .86rem; }
.alert, .notice { padding: .86rem 1rem; border-radius: .28rem; margin-bottom: 0; }
.alert { border-left: 3px solid #994729; background: #fff2e9; color: #72351c; margin-bottom: 1.3rem; }
.notice { background: #f3f5ed; border-left: 3px solid #9ca687; }
.actions, .result-actions { flex-wrap: wrap; gap: 1rem; }
.text-link { text-underline-offset: .2em; font-size: .91rem; font-weight: 600; padding-block: .5rem; }
.facts { margin: 1.35rem 0 0; }
.facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-top: 1px dashed #afbcaf; padding-block: .8rem; }
.facts dt { color: var(--muted); font-size: .92rem; }
.facts dd { margin: 0; text-align: right; font-weight: 650; overflow-wrap: anywhere; }
.facts .amount { padding-top: 1.1rem; align-items: center; }
.amount dd { font-family: var(--serif); font-size: 1.6rem; letter-spacing: -.035em; }
.amount dd small { font: .75rem var(--sans); letter-spacing: .02em; }
.receipt { max-width: 40rem; }
.receipt-header { justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.receipt-brand { color: var(--green); font-size: 1.85rem; }
.stamp { border: 1px solid #97835a; border-radius: .25rem; padding: .23rem .6rem; font-size: .8rem; color: #745716; }
.receipt h2 { margin-bottom: 1rem; }
.folio { font-family: ui-monospace, Consolas, monospace; }
.receipt-note { font-size: .85rem; margin: 1rem 0 0; }
.result-actions { max-width: 40rem; margin-top: 1.3rem; align-items: flex-start; }
.result-actions p { max-width: 29rem; font-size: .88rem; margin: 0; }
.footer { border-top: 1px solid var(--rule); }
.footer-inner { min-height: 4.1rem; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .82rem; }
.footer-inner > :first-child { font-family: var(--serif); font-size: 1rem; color: var(--ink); }
@media (max-width: 48rem) {
  .layout { grid-template-columns: 1fr; }
  .sample, .card { max-width: none; }
  .mast-inner { min-height: 4.3rem; }
  .wrap { width: min(100% - 2.3rem, 37rem); }
}
@media (max-width: 34rem) {
  .portal-name { display: none; }
  .brand { font-size: 1.92rem; }
  .mode { font-size: .76rem; }
  .heading { margin-bottom: 1.45rem; }
  .field-pair { grid-template-columns: 1fr; gap: 1.2rem; }
  .primary { width: 100%; }
  .actions { justify-content: center; }
  .facts .amount { flex-wrap: wrap; }
  .footer-inner { flex-wrap: wrap; gap: .25rem .75rem; padding-block: 1rem; }
}
@media print {
  @page { margin: 20mm; }
  body { display: block; min-height: auto; background: white; color: black; }
  main.wrap { width: 100%; padding: 0; }
  .mast, .footer, .skip-link, .result-actions, .heading, .alert { display: none; }
  .receipt { width: 100%; max-width: none; box-shadow: none; break-inside: avoid; }
  .receipt *, .receipt { color: black; }
}
