/* Responsa: "papel y tinta". Cream paper, navy ink, a terracotta seal used sparingly. */

/* Fonts (OFL, licenses in /fonts). Fraunces comes from @fontsource-variable/fraunces with SOFT fixed at 50 and
   WONK off (italic keeps WONK); Instrument Sans from @fontsource-variable/instrument-sans. Latin + latin-ext. */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 650; font-display: swap; src: url('/fonts/fraunces-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 650; font-display: swap; src: url('/fonts/fraunces-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 300 600; font-display: swap; src: url('/fonts/fraunces-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 300 600; font-display: swap; src: url('/fonts/fraunces-italic-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/instrument-sans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/instrument-sans-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Metric-matched fallbacks so the swap to the web fonts does not move text around. */
@font-face { font-family: 'Fraunces Fallback'; src: local('Georgia'); size-adjust: 103.5%; ascent-override: 94%; descent-override: 24.5%; line-gap-override: 0%; }
@font-face { font-family: 'Instrument Sans Fallback'; src: local('Arial'), local('Helvetica'); size-adjust: 100.5%; ascent-override: 96.5%; descent-override: 25%; line-gap-override: 0%; }

:root {
  --paper: #f8f3ea;
  --paper-deep: #f0e8da;
  --sheet: #fffcf6;
  --field: #fffdf9;
  --ink: #1c2848;
  --ink-soft: #3f4a66;
  --muted: #5d6476;
  --rule: #e2d9c8;
  --rule-strong: #cbbfa9;
  --field-line: #948873;
  --seal: #bf4e1d;
  --seal-deep: #a3421a;
  --seal-tint: #f8ebe1;
  --ok: #1f6f47;
  --ok-bg: #e5f1e8;
  --warn: #7d5300;
  --warn-bg: #fbf0d6;
  --error: #b42318;
  --error-bg: #fbe9e5;
  --wa: #157f45;
  --wa-deep: #116a39;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sheet: 0 1px 2px rgba(28, 40, 72, 0.05), 0 14px 34px -22px rgba(28, 40, 72, 0.28);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --serif: 'Fraunces', 'Fraunces Fallback', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', 'Instrument Sans Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  /* A barely-there paper grain. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .33 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 480; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.12rem; }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--seal); }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--seal-deep); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
code { font-family: var(--mono); font-size: max(0.82em, 12px); word-break: break-all; }
::selection { background: #f2d5c2; color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.main.container { padding-top: clamp(24px, 4vw, 44px); padding-bottom: 80px; min-height: calc(100vh - 220px); }
.v-public .main.container { max-width: 736px; }

/* Top bar */
.topbar { border-bottom: 1px solid var(--rule); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 6px 20px; min-height: 64px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand-name { font-family: var(--serif); font-weight: 560; font-size: 1.28rem; letter-spacing: -0.02em; line-height: 1; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 28px; height: 28px; color: var(--seal); flex: none; }
.nav { display: flex; align-items: center; gap: 4px 22px; flex-wrap: wrap; margin-left: auto; }
.logout { margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.nav a, .logout .linklike { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; text-underline-offset: 8px; text-decoration-thickness: 1.5px; transition: color 0.2s, text-decoration-color 0.2s; }
.nav a:not(.btn):hover, .logout .linklike:hover { color: var(--ink); text-decoration-line: underline; text-decoration-color: var(--rule-strong); }
.nav a.is-active { color: var(--ink); font-weight: 600; text-decoration-line: underline; text-decoration-color: var(--seal); }
.nav .btn, .nav .btn:hover { color: #fff; }
.inline { display: inline; margin: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px; border-radius: 8px; border: 1px solid var(--seal);
  background: var(--seal); color: #fff; font: 600 0.98rem/1.25 var(--sans); letter-spacing: 0.005em;
  text-decoration: none; text-align: center; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(28, 40, 72, 0.14);
  transition: background-color 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.12s;
}
.btn:hover { background: var(--seal-deep); border-color: var(--seal-deep); color: #fff; }
.btn:active { transform: translateY(1px); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12); }
.btn:focus-visible { outline-offset: 3px; border-radius: 8px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(28, 40, 72, 0.42); box-shadow: none; }
.btn-ghost:hover { background: rgba(28, 40, 72, 0.045); border-color: var(--ink); color: var(--ink); }
.btn-small { min-height: 38px; padding: 7px 15px; font-size: 0.9rem; }
.btn-large { min-height: 52px; padding: 14px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-whatsapp { background: var(--wa); border-color: var(--wa); }
.btn-whatsapp:hover { background: var(--wa-deep); border-color: var(--wa-deep); }
.btn.btn-danger { background: var(--error); border-color: var(--error); color: #fff; }
.btn.btn-danger:hover { background: #8f1c13; border-color: #8f1c13; }
.btn[disabled], .btn[disabled]:hover { background: #ece5d8; border-color: #ece5d8; color: var(--muted); cursor: default; transform: none; box-shadow: none; }
/* A quiet text link with a hairline that fills in with the seal color on hover. */
.arrow-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font-weight: 600; text-decoration: none;
  background: linear-gradient(var(--seal), var(--seal)) 0 calc(100% - 9px) / 0 1.5px no-repeat, linear-gradient(var(--rule-strong), var(--rule-strong)) 0 calc(100% - 9px) / 100% 1px no-repeat;
  transition: background-size 0.4s var(--ease-out), color 0.2s;
}
.arrow-link::after { content: ''; width: 14px; height: 10px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M1 5h11M8.5 1.5 12 5 8.5 8.5' fill='none' stroke='%23a3421a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 0.3s var(--ease-out); }
.arrow-link:hover { color: var(--ink); background-size: 100% 1.5px, 100% 1px; }
.arrow-link:hover::after { transform: translateX(3px); }

/* Sheets, layout helpers and small parts */
.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(18px, 3vw, 26px); }
.grid-2, .grid-3 { display: grid; gap: 16px; grid-template-columns: 1fr; padding: 0; margin: 0 0 20px; list-style: none; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.stack { display: grid; gap: 10px; margin: 20px 0; }
.row-2 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row-2 { grid-template-columns: 1fr 1fr; } }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sans { font-family: var(--sans); }
.pre { white-space: pre-line; overflow-wrap: anywhere; }
.is-hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font: 600 0.75rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.16em; color: var(--seal-deep); margin: 0 0 10px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { margin: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-head > a { white-space: nowrap; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--seal-tint); color: var(--seal-deep); font: 600 0.75rem/1.5 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.badge-muted { background: #ebe5da; color: var(--muted); }
.after-card { margin-top: 16px; }

/* Flash messages */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); border-left: 3px solid currentColor; background: var(--ok-bg); color: var(--ok); margin: 0 0 20px; }
.flash a { color: inherit; font-weight: 700; }
.flash-warn { background: var(--warn-bg); color: var(--warn); }
.flash-error { background: var(--error-bg); color: var(--error); }

/* Forms */
.field { display: block; margin-bottom: 18px; }
.field-label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.94rem; }
.field-help { display: block; color: var(--muted); margin-top: 5px; font-size: 0.86rem; }
.field-error { display: block; color: var(--error); margin-top: 5px; font-size: 0.88rem; font-weight: 600; }
input[type='text'], input[type='email'], input[type='password'], input[type='tel'], input[type='date'], input[type='time'], input[type='search'], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--field-line); border-radius: 8px;
  background: var(--field); color: var(--ink); font: 1rem/1.4 var(--sans);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:hover, select:hover, textarea:hover { border-color: #7a6f5c; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); border-radius: 8px; }
input[readonly] { background: #f5efe4; }
textarea { resize: vertical; line-height: 1.55; }
select { appearance: none; padding-right: 38px; background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%231c2848' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 12px 8px no-repeat; }
.has-error input, .has-error textarea, .has-error .sigpad { border-color: var(--error); }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--seal); flex: none; }
.fieldset { border: 0; border-top: 1px solid var(--rule); padding: 14px 0 0; margin: 8px 0 14px; min-width: 0; }
.fieldset legend { font: 500 1.08rem var(--serif); padding: 0 10px 0 0; }
.auth { max-width: 440px; margin: clamp(4px, 3vw, 32px) auto; }
.auth.card { box-shadow: var(--shadow-sheet); padding: clamp(22px, 5vw, 36px); }
.auth h1 { margin-bottom: 0.7em; }
.auth p.center { margin: 18px 0 0; }
.auth .link-row { text-align: right; margin: -8px 0 14px; font-size: 0.9rem; }
.terms-note, .privacy-note { margin: 14px 0 0; }
.auth-offer { margin: -0.3em 0 1.4em; padding: 10px 14px; border-radius: 8px; background: var(--seal-tint); color: var(--ink-soft); font-size: 0.92rem; }
.auth-offer strong { display: block; font-size: 1rem; color: var(--ink); }
.auth-next { margin: 12px 0 0; color: var(--ink-soft); }
.form-edit { max-width: 760px; }
.form-edit .btn { margin-top: 10px; }
form > .btn-large.btn-block, form > .btn-block:last-of-type { margin-top: 16px; }

/* Scroll reveals (classes are only ever added by app.js) */
.will-reveal { transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.will-reveal:not(.is-in) { opacity: 0; transform: translateY(18px); }

/* Landing: sections */
.main-landing { padding: 0; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
/* The hero already ends with generous space; the first section must not double it. */
.hero + .section { padding-top: clamp(24px, 3vw, 40px); }
.section-intro { max-width: 34rem; }
.section-intro h2, .pricing h2, .cierre h2 { font-size: clamp(2rem, 1.35rem + 2.5vw, 3.15rem); font-weight: 430; letter-spacing: -0.022em; line-height: 1.08; margin: 0; }
.section-intro .lead { margin-top: 20px; }
.band { background-color: var(--paper-deep); }
.split { display: grid; gap: 36px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; } }
.lead { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.22rem); line-height: 1.6; color: var(--ink-soft); max-width: 34em; }

/* Landing: hero */
.hero { padding: clamp(36px, 6vw, 84px) 0 clamp(56px, 8vw, 104px); overflow-x: clip; }
.hero-grid { display: grid; gap: clamp(44px, 6vw, 64px); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); } }
.display { font-size: clamp(2.5rem, 1.35rem + 4.6vw, 4.6rem); font-weight: 430; line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 24px; max-width: 12.5ch; }
.display em { font-weight: 380; letter-spacing: -0.02em; }
.hero .lead { margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.hero-note { margin: 18px 0 0; color: var(--muted); font-size: 0.92rem; }

/* Landing: hero illustration (phone, QR card and seal) */
.hero-art { --phone-w: clamp(236px, 24vw, 304px); --qr-w: 146px; --qr-peek: 106px; position: relative; display: flex; justify-content: center; padding: 12px 0 8px; }
.phone { position: relative; z-index: 1; width: var(--phone-w); padding: 11px; border-radius: 42px; background: linear-gradient(155deg, #2a375e, #151d36 60%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 46px 70px -36px rgba(28, 40, 72, 0.55), 0 18px 34px -20px rgba(28, 40, 72, 0.4); transform: rotate(2deg); animation: rise 0.9s var(--ease-out) both; }
.phone-screen { position: relative; display: grid; gap: 10px; padding: 34px 20px 20px; border-radius: 32px; background: var(--sheet); }
.phone-screen::before { content: ''; position: absolute; top: 11px; left: 50%; width: 62px; height: 6px; margin-left: -31px; border-radius: 4px; background: #e9e1d2; }
.ph-eyebrow { margin: 0; font: 600 0.75rem/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--seal-deep); }
.ph-title { margin: 0 0 4px; font: 500 1.2rem/1.2 var(--serif); letter-spacing: -0.01em; }
.ph-text { display: grid; gap: 7px; }
.ph-line { display: block; height: 5px; border-radius: 3px; background: #e5dccb; transform-origin: left center; animation: ink 0.6s var(--ease-out) both; }
.ph-short { width: 74%; }
.ph-shorter { width: 48%; }
.ph-clause { margin-top: 7px; width: 94%; }
.ph-line:nth-child(1) { animation-delay: 0.45s; }
.ph-line:nth-child(2) { animation-delay: 0.52s; }
.ph-line:nth-child(3) { animation-delay: 0.59s; }
.ph-line:nth-child(4) { animation-delay: 0.66s; }
.ph-line:nth-child(5) { animation-delay: 0.78s; }
.ph-line:nth-child(6) { animation-delay: 0.85s; }
.ph-line:nth-child(7) { animation-delay: 0.92s; }
.ph-line:nth-child(8) { animation-delay: 1.04s; }
.ph-line:nth-child(9) { animation-delay: 1.11s; }
.ph-sign { position: relative; height: 66px; margin-top: 10px; border-bottom: 1px solid rgba(28, 40, 72, 0.5); }
.ph-sig { position: absolute; inset: 2px 4px 4px; width: calc(100% - 8px); height: 60px; }
.ph-sig path { fill: none; stroke: var(--ink); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw 1.5s var(--ease-in-out) 1.2s both; }
.ph-sign-label { position: absolute; left: 0; top: calc(100% + 4px); font-size: 0.75rem; color: var(--muted); }
.ph-btn { display: block; margin-top: 22px; padding: 10px; border-radius: 8px; background: var(--seal); color: #fff; text-align: center; font: 600 0.82rem var(--sans); }
.hero-seal { position: absolute; z-index: 2; right: -38px; bottom: 92px; width: 116px; transform: rotate(-14deg); animation: press 0.75s cubic-bezier(0.2, 0.8, 0.25, 1) 2.75s both; }
.hero-seal .seal-check { animation: draw 0.45s var(--ease-out) 3.35s both; }
.qr-card { position: absolute; z-index: 0; top: 9%; left: calc(50% - var(--phone-w) / 2 - var(--qr-peek)); display: grid; gap: 8px; width: var(--qr-w); padding: 12px calc(var(--qr-w) - var(--qr-peek) + 18px) 12px 12px; border-radius: 10px; background: var(--sheet); box-shadow: 0 18px 30px -18px rgba(28, 40, 72, 0.35), 0 1px 2px rgba(28, 40, 72, 0.08); transform: rotate(-7deg); font: 600 0.75rem/1.25 var(--sans); color: var(--ink-soft); animation: slip 1s var(--ease-out) 0.25s both; }
.qr { display: block; width: 100%; height: auto; fill: var(--ink); }
.qr-card span { max-width: 4.6rem; }
@media (max-width: 599px) {
  /* Phones: the phone sits right so the QR card can peek out on the left. */
  .hero-art { --phone-w: 232px; justify-content: flex-end; padding-right: 40px; }
  .qr-card { left: max(0px, calc(100% - 40px - var(--phone-w) - var(--qr-peek))); }
  /* The seal overhangs the phone but always stays fully inside the screen. */
  .hero-seal { right: -32px; width: 96px; }
}
@media (max-width: 359px) { .hero-art { --phone-w: 220px; --qr-w: 104px; --qr-peek: 64px; } .qr-card span { display: none; } }

/* The seal (also on /listo) */
.seal { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 8px 12px rgba(120, 44, 12, 0.22)); }
.seal-disc { fill: var(--seal); }
.seal-ring { fill: none; stroke: #fbf5ea; stroke-opacity: 0.55; stroke-width: 1; }
.seal-text { fill: #fbf5ea; font: 600 10.5px var(--sans); letter-spacing: 0.08em; }
.seal-check { fill: none; stroke: #fbf5ea; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }

@keyframes rise { from { opacity: 0; transform: translateY(22px) rotate(2deg); } }
@keyframes slip { from { opacity: 0; transform: translate(26px, 14px) rotate(0deg); } }
@keyframes ink { from { transform: scaleX(0); opacity: 0.2; } }
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes press {
  0% { opacity: 0; transform: rotate(-4deg) scale(1.75); filter: blur(6px); }
  55% { opacity: 1; transform: rotate(-14deg) scale(0.94); filter: blur(0); }
  78% { transform: rotate(-14deg) scale(1.02); }
  100% { opacity: 1; transform: rotate(-14deg) scale(1); filter: blur(0); }
}

/* Landing: steps joined by a drawn line */
.steps-list { display: grid; gap: 40px; list-style: none; padding: 0; margin: clamp(40px, 5vw, 64px) 0 0; }
.step { position: relative; padding-left: 4.25rem; }
.step:not(:last-child)::after { content: ''; position: absolute; left: 1.05rem; top: 3.6rem; bottom: -32px; width: 1px; background: var(--rule-strong); transform-origin: top; transition: transform 0.9s var(--ease-in-out); }
.step-n { position: absolute; left: 0; top: -0.3rem; width: 2.1rem; text-align: center; font: italic 400 3rem/1 var(--serif); color: var(--seal); }
.step h3 { font-size: 1.35rem; font-weight: 500; margin: 0.15rem 0 0.45rem; }
.step p { color: var(--ink-soft); margin: 0; max-width: 30em; }
@media (min-width: 760px) {
  .steps-list { grid-template-columns: repeat(3, 1fr); gap: 48px; }
  .step { padding: 4.75rem 0 0; }
  .step:not(:last-child)::after { left: 3.4rem; right: -36px; top: 1.6rem; bottom: auto; width: auto; height: 1px; transform-origin: left; }
  .step-n { top: 0; width: auto; font-size: 3.4rem; text-align: left; }
}
.steps-list.will-reveal:not(.is-in) { opacity: 1; transform: none; }
.steps-list.will-reveal > .step { transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.steps-list.will-reveal > .step:nth-child(2) { transition-delay: 0.45s; }
.steps-list.will-reveal > .step:nth-child(3) { transition-delay: 0.9s; }
.steps-list.will-reveal > .step::after { transition-delay: 0.3s; }
.steps-list.will-reveal > .step:nth-child(2)::after { transition-delay: 0.75s; }
.steps-list.will-reveal:not(.is-in) > .step { opacity: 0; transform: translateY(14px); }
.steps-list.will-reveal:not(.is-in) > .step::after { transform: scaleY(0); }
@media (min-width: 760px) { .steps-list.will-reveal:not(.is-in) > .step::after { transform: scaleX(0); } }

/* Landing: business types */
.para { border-top: 1px solid var(--rule); }
.giros { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
@media (min-width: 640px) { .giros { display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; } }
.giros li { border-bottom: 1px solid var(--rule); padding: 4px 0; }
.giros a {
  display: inline-flex; align-items: center; min-height: 48px; color: var(--ink); text-decoration: none;
  font: 400 clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem)/1.25 var(--serif); letter-spacing: -0.01em;
  background: linear-gradient(var(--seal), var(--seal)) 0 calc(100% - 8px) / 0 1px no-repeat;
  transition: background-size 0.4s var(--ease-out), color 0.2s;
}
.giros a:hover { color: var(--seal-deep); background-size: 100% 1px; }
.giros-all { margin: 22px 0 0; }

/* Landing: what is kept of each signature, set like a ledger */
.ledger { position: relative; padding: 30px clamp(20px, 4vw, 40px) 24px; border-radius: 4px; background: var(--sheet); box-shadow: var(--shadow-sheet); }
.ledger-head { margin: 0 0 6px; padding-bottom: 14px; border-bottom: 3px double var(--rule-strong); font: 600 0.75rem/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); text-align: center; }
.ledger dl { margin: 0; }
.ledger-row { display: grid; gap: 2px; padding: 15px 0; border-bottom: 1px dashed var(--rule-strong); }
@media (min-width: 560px) { .ledger-row { grid-template-columns: 13.5rem minmax(0, 1fr); gap: 20px; align-items: baseline; } }
.ledger dt { font: 500 1.1rem/1.35 var(--serif); }
.ledger-n { display: inline-block; min-width: 2.1em; font: 600 0.75rem var(--sans); font-variant-numeric: tabular-nums; letter-spacing: 0.06em; color: var(--seal-deep); }
.ledger dd { margin: 0; color: var(--ink-soft); }
.ledger-hash { margin: 18px 0 0; font: 0.75rem/1.4 var(--mono); letter-spacing: 0.08em; color: var(--muted); text-align: center; }

/* Landing: pricing (also the panel plan page, through .plans) */
.pricing { padding: clamp(64px, 9vw, 120px) 0; }
.pricing-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; }
.country-picker label { display: flex; align-items: center; gap: 10px; font-size: 0.94rem; color: var(--ink-soft); }
.country-picker select { width: auto; min-height: 42px; padding-top: 7px; padding-bottom: 7px; }
.plans { display: grid; grid-template-columns: minmax(0, 1fr); margin: 24px 0 20px; border-top: 1px solid var(--ink); }
.pricing .plans { margin-top: 40px; }
.plans > .plan { position: relative; display: flex; flex-direction: column; padding: 26px 0 28px; background: none; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; }
.plans > .plan-featured::before { content: ''; position: absolute; top: -2px; left: 0; right: 0; height: 3px; background: var(--seal); }
@media (min-width: 760px) {
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
  .plans > .plan { padding: 30px 28px 30px; border-bottom: 0; border-left: 1px solid var(--rule); }
  .plans > .plan:first-child { border-left: 0; padding-left: 0; }
  .plans > .plan-featured:first-child { padding-left: 28px; }
  .plans > .plan-featured { background: linear-gradient(rgba(255, 252, 246, 0.75), rgba(255, 252, 246, 0)); }
}
.plan h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 4px; font-size: 1.45rem; font-weight: 500; }
.plan h3 .badge-soon { font-size: 0.75rem; padding: 2px 9px; }
.price { margin: 6px 0 16px; font: 400 2.6rem/1.1 var(--serif); letter-spacing: -0.02em; font-variant-numeric: lining-nums; }
.price span { margin-left: 4px; font: 400 0.95rem var(--sans); letter-spacing: 0; color: var(--muted); }
.plan .btn, .plan form { margin-top: auto; }
.plan .badge { align-self: flex-start; margin-top: auto; }
.plan-terms { margin: 0 0 10px; line-height: 1.45; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 7px; }
.ticks li::before { content: ''; position: absolute; left: 3px; top: 0.5em; width: 10px; height: 5px; border-left: 1.5px solid var(--seal); border-bottom: 1.5px solid var(--seal); transform: rotate(-45deg); }
.pricing-soon { margin: 18px 0 6px; font-weight: 600; color: var(--ink-soft); }
.pricing-legal { max-width: 46em; }
.plan-cancel { margin: 16px 0 6px; }
.plan-cancel .linklike { color: var(--muted); font-size: 0.9rem; text-decoration: underline; }
.plan-cancel .linklike:hover { color: var(--error); }

/* Landing: closing band */
.cierre { padding: clamp(72px, 10vw, 128px) 0; background: var(--ink); color: #e9e3d6; text-align: center; }
.cierre-inner { display: flex; flex-direction: column; align-items: center; }
.cierre h2 { color: #fbf6ee; max-width: 15ch; margin-bottom: 18px; }
.cierre h2 em { color: #ee9b72; }
.cierre p { max-width: 32em; color: #d9d1c3; font-size: 1.1rem; margin-bottom: 30px; }
.cierre .cierre-note { margin: 16px 0 0; font-size: 0.92rem; color: #b8b0a2; }
.cierre :focus-visible { outline-color: #fbf6ee; }

/* Panel: numbers, tables and lists */
.stats { display: grid; gap: 14px 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 32px; }
.stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px solid var(--ink); }
.stat-n { font: 400 clamp(1.7rem, 1.3rem + 1.5vw, 2.5rem)/1.1 var(--serif); letter-spacing: -0.02em; font-variant-numeric: lining-nums; }
.stat-n small { font: 400 0.9rem var(--sans); color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.stat-l { color: var(--muted); font-size: 0.88rem; line-height: 1.35; }
.empty { text-align: center; padding: 40px 22px; }
/* A table wider than its card scrolls sideways; soft shadows at the edges show there is more to see. */
.table-wrap {
  overflow-x: auto; margin: 0 -6px;
  background:
    linear-gradient(to right, var(--sheet) 30%, rgba(255, 252, 246, 0)) left center / 28px 100% no-repeat local,
    linear-gradient(to left, var(--sheet) 30%, rgba(255, 252, 246, 0)) right center / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(28, 40, 72, 0.16), rgba(28, 40, 72, 0)) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(28, 40, 72, 0.16), rgba(28, 40, 72, 0)) right center / 12px 100% no-repeat scroll;
}
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 11px 6px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table th { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); border-bottom-color: var(--rule-strong); }
.table tbody tr { transition: background-color 0.15s; }
.table tbody tr:hover { background: rgba(28, 40, 72, 0.025); }
.table tr:last-child td { border-bottom: 0; }
/* A name with one very long word wraps inside its cell instead of pushing "Ver" out of the card. */
.table .td-name { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .table { font-size: 0.9rem; }
  .table th, .table td { padding: 10px 5px; }
  .table th { letter-spacing: 0.04em; }
}
@media (max-width: 360px) {
  .table th, .table td { padding: 10px 4px; }
  .table th { letter-spacing: 0; }
}
@media (max-width: 340px) {
  .table th, .table td { padding: 10px 3px; }
}
.section-head h2 { margin-bottom: 12px; }
.search { display: flex; gap: 8px; margin-bottom: 18px; }
.search input { flex: 1; }
.search .btn { min-height: 48px; }
.pager { display: flex; justify-content: space-between; margin-top: 16px; }
.list { display: grid; gap: 10px; }
.list > .list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; color: inherit; text-decoration: none; transition: border-color 0.15s, background-color 0.15s; }
.list > .list-item strong { font: 500 1.1rem/1.3 var(--serif); }
.list > .list-item:hover { border-color: var(--rule-strong); background: #fffefb; }
.preset { display: flex; flex-direction: column; align-items: flex-start; transition: border-color 0.15s; }
.preset:hover { border-color: var(--rule-strong); }
.preset h3 { font-size: 1.2rem; font-weight: 500; }
.preset .btn { margin-top: auto; }
.share { margin-bottom: 20px; }
.pl-checklist { margin: -12px 0 36px; }
.cl-page { max-width: 760px; }
.cl-list { list-style: none; margin: 8px 0 28px; padding: 0; border-top: 1px solid var(--rule); }
.cl-list li { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.cl-box { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 3px; border: 2px solid var(--rule-strong); border-radius: 5px; background: var(--sheet); }
.cl-list h2 { font-size: 1.2rem; font-weight: 500; margin: 0 0 6px; }
.cl-list p { margin: 0; color: var(--ink-soft); }
.cl-actions { margin: 18px 0 32px; }
.cl-cta { margin: 0 0 40px; }
.ejemplo { margin: 0 0 36px; }
.steps .ejemplo { margin: clamp(48px, 6vw, 72px) 0 0; }
.ejemplo-head h2 { font-size: 1.45rem; font-weight: 500; margin: 8px 0 4px; }
.ejemplo-head p { margin: 0; }
.ejemplo-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--seal-tint); color: var(--seal); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.ejemplo-pasos { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.5vw, 28px); }
.ejemplo-shot { border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow-sheet); }
.ejemplo-shot img { display: block; width: 100%; height: auto; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.ejemplo-pasos p { margin: 12px 0 0; display: flex; gap: 10px; align-items: baseline; color: var(--ink-soft); }
.ejemplo-n { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--seal-tint); color: var(--seal); font-size: 0.85rem; font-weight: 600; transform: translateY(-1px); }
@media (max-width: 640px) {
  /* Phones: one screen at a time, swiped sideways, with the next one peeking in. */
  /* The row runs into the page gutter (the container's padding) so the next screen peeks from the screen edge. */
  .ejemplo-pasos { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * clamp(16px, 4vw, 32px)); padding: 0 clamp(16px, 4vw, 32px) 6px; scroll-padding-inline: clamp(16px, 4vw, 32px); }
  .ejemplo-pasos::-webkit-scrollbar { display: none; }
  .ejemplo-pasos li { scroll-snap-align: start; }
}
.guide { margin-bottom: 20px; }
.guide h2 { font-weight: 500; margin-bottom: 14px; }
.guide-steps { list-style: none; margin: 0; padding: 0; counter-reset: paso; display: grid; gap: 18px; }
.guide-steps li { counter-increment: paso; position: relative; padding-left: 42px; display: flex; flex-direction: column; }
.guide-steps li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--seal-tint); color: var(--seal); font-weight: 600; font-size: 0.95rem; display: grid; place-items: center; }
.guide-steps h3 { font-size: 1.05rem; font-weight: 600; margin: 3px 0 4px; font-family: inherit; letter-spacing: 0; }
.guide-steps p { margin: 0 0 10px; color: var(--ink-soft); }
.guide-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
@media (min-width: 860px) {
  .guide-steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
@media (max-width: 480px) { .guide-actions .btn { flex: 1 1 100%; } }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; }
.copy-row .btn { min-height: 48px; }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.account-block { margin-bottom: 20px; }
.account-block h2 { margin-bottom: 10px; font-weight: 500; }
.form-delete { margin-top: 20px; }
.danger-zone { border-color: #ebc6be; }
.admin-table { margin-bottom: 18px; }
@media (max-width: 600px) { .hide-sm { display: none; } }
@media (max-width: 860px) { .hide-md { display: none; } }
@media (max-width: 480px) {
  .copy-row { flex-direction: column; }
  .share-actions .btn { flex: 1 1 100%; }
}
@media (max-width: 640px) {
  /* Signed in: logo and "Salir" share the first row; the page links get their own row, which scrolls
     sideways without a visible scrollbar on the narrowest phones. */
  .logout { order: 1; }
  .nav-app { order: 2; width: 100%; margin-left: 0; flex-wrap: nowrap; justify-content: space-between; gap: 4px 12px; overflow-x: auto; scrollbar-width: none; }
  .nav-app::-webkit-scrollbar { display: none; }
  .nav a, .linklike { white-space: nowrap; }
}
@media (max-width: 360px) { .nav-app { gap: 4px 6px; font-size: 0.92rem; } }
/* Touch screens: links in the bars and text-style buttons get a finger-sized hit area. */
@media (pointer: coarse) {
  .nav a:not(.btn), .logout .linklike, .footer-nav a, .section-head > a, .copy-actions > a { display: inline-flex; align-items: center; min-height: 44px; }
  .nav a:not(.btn), .logout .linklike { min-width: 44px; justify-content: center; }
  .linklike { min-height: 44px; }
  .brand { min-height: 44px; }
}
/* Anonymous visitors on phones: brand, "Entrar" and the sign-up button only. */
@media (max-width: 559px) {
  .nav > a.nav-extra:not(.btn) { display: none; }
  .nav:not(.nav-app) { gap: 4px 14px; }
  .nav:not(.nav-app) .btn-small { padding: 7px 12px; font-size: 0.875rem; }
  .brand-name { font-size: 1.2rem; }
}

/* Signing page: the document on paper, then a calm form */
.sign-head { margin-bottom: 20px; }
.sign-head h1 { font-size: clamp(1.8rem, 1.35rem + 2vw, 2.4rem); margin-bottom: 0.3em; }
.sign-head p:last-child { margin: 0; }
.doc { background-color: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: clamp(22px, 5vw, 44px) clamp(20px, 5.5vw, 48px); font-family: var(--serif); font-size: 1.0625rem; line-height: 1.7; box-shadow: var(--shadow-sheet); }
.doc p { white-space: pre-line; max-width: 64ch; }
.doc p:last-child { margin-bottom: 0; }
.clause { position: relative; padding-left: 1.9em; }
.clause-n { position: absolute; left: 0; color: var(--seal-deep); font-weight: 500; font-variant-numeric: lining-nums; }
.clause strong { font-weight: 600; }
.doc-scroll {
  max-height: 52vh; overflow-y: auto; margin-bottom: 40px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent;
  /* Scroll shadows: a soft edge appears only where more text is hidden. */
  background: linear-gradient(var(--sheet) 30%, rgba(255, 252, 246, 0)) top / 100% 36px no-repeat local,
    linear-gradient(rgba(255, 252, 246, 0), var(--sheet) 70%) bottom / 100% 36px no-repeat local,
    radial-gradient(farthest-side at 50% 0, rgba(28, 40, 72, 0.13), transparent) top / 100% 12px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, rgba(28, 40, 72, 0.13), transparent) bottom / 100% 12px no-repeat scroll,
    var(--sheet);
}
.doc-scroll:focus-visible { outline-offset: 3px; border-radius: var(--radius-sm); }
.sign-form > h2 { font-size: 1.5rem; font-weight: 500; padding-top: 4px; margin-bottom: 18px; }
.minor-box { margin-bottom: 12px; }
.sigpad { position: relative; height: 200px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--field); }
.sigpad-line { position: absolute; left: 22px; right: 22px; bottom: 46px; border-bottom: 1px solid rgba(28, 40, 72, 0.5); }
.sigpad-line::before { content: '\00d7'; position: absolute; left: 0; bottom: 2px; font: 400 1.35rem/1 var(--serif); color: var(--muted); }
.sigpad-hint { position: absolute; left: 0; right: 0; bottom: 56px; text-align: center; font: 350 1.5rem/1 var(--serif); letter-spacing: 0.01em; color: #8a7f6c; pointer-events: none; transition: opacity 0.3s; }
.sigpad.has-ink .sigpad-hint { opacity: 0; }
.sigpad canvas { position: relative; z-index: 1; display: block; width: 100%; height: 100%; touch-action: none; border-radius: 8px; cursor: crosshair; }
.sigpad-clear { position: absolute; z-index: 2; top: 6px; right: 12px; font-size: 0.88rem; color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.sigpad-clear:hover { color: var(--ink); }
.sign-form .btn-large { margin-top: 20px; }
.made-with { text-align: center; margin-top: 28px; font-size: 0.9rem; }
.made-with a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; }
.made-with .brand-mark { width: 18px; height: 18px; }
.made-with-cta { color: var(--seal); text-decoration: underline; text-decoration-color: rgba(191, 78, 29, 0.35); text-underline-offset: 3px; }
.made-with a:hover .made-with-cta { text-decoration-color: currentColor; }
.copy .made-with { margin-top: 20px; }

/* Messages and the signed confirmation */
.message { text-align: center; max-width: 520px; margin: 32px auto; }
.message.card { box-shadow: var(--shadow-sheet); padding: clamp(24px, 5vw, 40px); }
.message .btn { margin-top: 6px; }
.done { margin-top: clamp(8px, 4vw, 40px); }
.done-seal { width: 132px; margin: 0 auto 26px; transform: rotate(-12deg); animation: press-soft 0.75s cubic-bezier(0.2, 0.8, 0.25, 1) 0.15s both; }
.done-seal .seal-check { animation: draw 0.45s var(--ease-out) 0.65s both; }
.done h1 { font-size: clamp(2rem, 1.6rem + 2vw, 2.6rem); }
.done p { color: var(--ink-soft); }
.done .stack { margin: 26px 0 22px; }
.done-meta { font-size: 0.875rem; color: var(--muted); }
.done-invite { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--rule); }
.done .done-invite p { margin: 0 0 6px; font-size: 0.95rem; }
.done .done-invite .done-invite-title { font: 500 1.2rem/1.3 var(--serif); color: var(--ink); margin-bottom: 6px; }
.done-invite .arrow-link { margin-top: 8px; }
@keyframes press-soft {
  0% { opacity: 0; transform: rotate(-2deg) scale(1.6); filter: blur(6px); }
  55% { opacity: 1; transform: rotate(-12deg) scale(0.95); filter: blur(0); }
  78% { transform: rotate(-12deg) scale(1.02); }
  100% { opacity: 1; transform: rotate(-12deg) scale(1); filter: blur(0); }
}

/* Signed copy */
.copy-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 14px; }
.copy-actions > a { white-space: nowrap; }
.doc-paper { padding: clamp(24px, 6vw, 52px); }
.doc-paper h1 { font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2rem); }
.meta { display: grid; gap: 10px 24px; grid-template-columns: 1fr; margin: 28px 0; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-family: var(--sans); font-size: 0.95rem; line-height: 1.5; }
@media (min-width: 560px) { .meta { grid-template-columns: 1fr 1fr; } }
.meta dt { color: var(--muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; }
.meta dd { margin: 0; }
.signature-img { margin: 0 0 22px; max-width: 360px; }
.signature-img img { display: block; width: 100%; border-bottom: 1px solid var(--ink); mix-blend-mode: multiply; }
.signature-img figcaption { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin-top: 6px; }
.hash { font-family: var(--sans); font-size: 0.85rem; line-height: 1.5; }

/* Poster */
.poster { text-align: center; padding: 30px 10px; }
.poster h1 { font-size: clamp(2rem, 6vw, 3rem); }
.poster-qr { width: min(80vw, 340px); margin: 26px auto; padding: 18px; background: #fff; border: 2px solid var(--ink); border-radius: 16px; }
.poster-qr svg { display: block; width: 100%; height: auto; }
.poster-hint { font-size: 1.2rem; }
.poster-url { font-family: var(--sans); color: var(--muted); }
.poster-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 34px 0 18px; font: 500 0.95rem/1.4 var(--sans); color: var(--muted); }
.poster-brand .brand-mark { width: 20px; height: 20px; flex: none; color: var(--seal); }

/* Footer */
.footer { border-top: 1px solid var(--rule); padding: 44px 0 36px; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px 40px; flex-wrap: wrap; }
.footer-brand .brand-name { font-size: 1.15rem; }
.footer-brand .brand-mark { width: 24px; height: 24px; }
.footer-lema { margin: 6px 0 0; }
.footer-nav { display: flex; gap: 6px 22px; flex-wrap: wrap; }
.footer-groups { display: flex; flex-wrap: wrap; gap: 24px 64px; }
.footer-group { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 150px; }
.footer-group-title { margin: 0 0 6px; font: 600 0.75rem/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.footer-group a { display: inline-flex; align-items: center; min-height: 32px; }
@media (pointer: coarse) { .footer-group a { min-height: 44px; } }
.footer a { color: var(--ink-soft); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-copy { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin: 8px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 0.85rem; }
.footer-compact { text-align: center; padding: 20px 16px 28px; }
.footer-compact .footer-nav { justify-content: center; }

/* Legal pages */
.legal { max-width: 720px; }
.legal h2 { margin-top: 34px; font-weight: 500; }
.legal li { margin-bottom: 6px; }
.legal .updated { color: var(--muted); }

/* Public template pages (/plantillas) */
.pl-crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; list-style: none; padding: 0; margin: 0 0 18px; font-size: 0.9rem; color: var(--muted); }
.pl-crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.pl-crumbs li + li::before { content: '/' / ''; margin: 0 9px; color: var(--rule-strong); }
.pl-crumbs a { color: var(--muted); }
.pl-crumbs a:hover { color: var(--ink); }
.pl-crumbs [aria-current] { color: var(--ink-soft); overflow-wrap: anywhere; }
.pl-head { margin-bottom: 28px; }
.pl-head h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); font-weight: 450; letter-spacing: -0.025em; line-height: 1.08; }
.pl-head .lead { max-width: 40em; }
.pl-layout { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
.pl-main { min-width: 0; }
.pl-aside { display: none; }
@media (min-width: 960px) {
  .pl-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
  .pl-aside { display: block; }
  .pl-cta-side { position: sticky; top: 24px; }
  .pl-cta-top, .pl-cta-bottom { display: none; }
}
.pl-cta-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 14px 16px; margin: 0 0 36px; border: 1px solid #ecd3c3; border-radius: 8px; background: var(--seal-tint); }
.pl-cta-top-text { flex: 1 1 220px; }
.pl-cta-top p { margin: 0; color: var(--ink-soft); font-weight: 600; }
.pl-cta-top .pl-cta-terms { margin-top: 4px; font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.pl-cta-top .btn { flex: 0 0 auto; }
@media (max-width: 480px) { .pl-cta-top .btn { width: 100%; } }
.pl-cta { border-top: 3px solid var(--seal); border-radius: 4px 4px var(--radius) var(--radius); box-shadow: var(--shadow-sheet); }
.pl-cta h2 { font-size: 1.45rem; font-weight: 500; }
.pl-cta .btn { margin: 4px 0 12px; }
.pl-cta p:last-child { margin: 0; }
.pl-cta-bottom { margin: 0 0 40px; }
.pl-section { margin: 0 0 40px; padding-top: 22px; border-top: 1px solid var(--rule); }
.pl-section > h2, .pl-template-head h2 { font-size: 1.55rem; font-weight: 480; }
.pl-list { padding-left: 1.2em; margin: 0; }
.pl-list li { margin-bottom: 7px; padding-left: 4px; }
.pl-list li::marker { color: var(--seal); }
.pl-template-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pl-template-head h2 { margin-bottom: 4px; }
.pl-template-head p { margin: 0; }
.pl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-doc-title { font-size: 1.3rem; font-weight: 520; text-align: center; margin: 0 auto 1.2em; max-width: 26em; }
.pl-doc-title::after { content: ''; display: block; width: 44px; height: 1px; margin: 16px auto 0; background: var(--seal); }
.pl-fields { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); font-family: var(--sans); font-size: 0.95rem; }
.pl-fields-title { font-weight: 700; margin-bottom: 10px; }
.pl-field { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 16px; }
.pl-field span { flex: none; max-width: 70%; }
.pl-field::after { content: ''; flex: 1; min-width: 40px; border-bottom: 1px solid var(--ink-soft); margin-bottom: 5px; }
@media (max-width: 480px) {
  .pl-doc { padding: 22px 18px; font-size: 1rem; }
  .pl-field { flex-direction: column; align-items: stretch; gap: 0; }
  .pl-field span { max-width: none; }
  .pl-field::after { min-height: 22px; margin-bottom: 0; }
}
.pl-disclaimer { margin: 16px 0 0; padding: 12px 16px; border-left: 3px solid currentColor; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn); }
.pl-index .pl-disclaimer { margin-top: 8px; }
.pl-faqs { border-top: 1px solid var(--rule-strong); }
.pl-faq { border-bottom: 1px solid var(--rule); }
.pl-faq summary { position: relative; display: flex; align-items: center; min-height: 52px; padding: 14px 44px 14px 0; font-weight: 600; list-style: none; cursor: pointer; }
.pl-faq summary::-webkit-details-marker { display: none; }
.pl-faq summary::after { content: '+' / ''; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 300 1.5rem/1 var(--serif); color: var(--seal); transition: transform 0.25s var(--ease-out); }
.pl-faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.pl-faq summary:hover { color: var(--seal-deep); }
.pl-faq p { margin: 0; padding: 0 0 18px; color: var(--ink-soft); max-width: 44em; }
.pl-cat { margin: 0 0 36px; }
.pl-cat h2 { font-size: 1.45rem; font-weight: 480; }
.pl-grid { display: grid; column-gap: 32px; grid-template-columns: minmax(0, 1fr); list-style: none; padding: 0; margin: 0 0 14px; border-top: 1px solid var(--ink); }
@media (min-width: 560px) { .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 860px) { .pl-index .pl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pl-grid li { border-bottom: 1px solid var(--rule); }
.pl-tile { display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 44px; padding: 13px 2px; color: var(--ink); text-decoration: none; }
.pl-tile strong { font: 500 1.1rem/1.3 var(--serif); transition: color 0.2s; }
.pl-tile span { font-size: 0.875rem; color: var(--muted); }
.pl-tile:hover strong { color: var(--seal-deep); }
@media (pointer: coarse) {
  .pl-crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  .pl-actions .btn { min-height: 44px; }
}

/* Carta responsiva generator (/carta-responsiva) */
.carta-tipos ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 28px; }
.carta-tipos a { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 15px; border: 1px solid var(--rule-strong); border-radius: 999px; color: var(--ink-soft); font-size: 0.92rem; font-weight: 600; text-decoration: none; transition: border-color 0.2s, color 0.2s, background-color 0.2s; }
.carta-tipos a:hover { border-color: var(--ink); color: var(--ink); }
.carta-tipos a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
@media (max-width: 480px) { .carta-tipos ul { gap: 6px; } .carta-tipos a { padding: 6px 13px; font-size: 0.88rem; } }
@media (pointer: coarse) { .carta-tipos a { min-height: 44px; } }
.carta-gen { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); margin: 0 0 40px; }
@media (min-width: 900px) {
  .carta-gen { grid-template-columns: 320px minmax(0, 1fr); gap: 40px; align-items: start; }
}
.carta-form { padding: 22px 20px 6px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--field); }
.carta-form h2 { font-size: 1.35rem; font-weight: 500; margin-bottom: 4px; }
.carta-form > .muted { margin: 0 0 18px; }
.carta-form .field { margin-bottom: 14px; }
.carta-form .btn { margin-bottom: 14px; }
.carta-privado { display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; color: var(--muted); }
.carta-privado::before { content: ''; flex: none; width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Crect x='2.5' y='6' width='9' height='6.5' rx='1.5' fill='none' stroke='%235d6476' stroke-width='1.3'/%3E%3Cpath d='M4.5 6V4.5a2.5 2.5 0 0 1 5 0V6' fill='none' stroke='%235d6476' stroke-width='1.3'/%3E%3C/svg%3E") center / contain no-repeat; }
.carta-preview { min-width: 0; }
.carta-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
@media (pointer: coarse) { .carta-actions .btn { min-height: 44px; } }
@media (max-width: 480px) { .carta-actions { justify-content: stretch; } .carta-actions .btn { flex: 1 1 0; white-space: nowrap; } }
.carta-doc h2.pl-doc-title { font-size: 1.3rem; font-weight: 520; }
.blank { color: var(--ink); background-image: linear-gradient(var(--seal-tint), var(--seal-tint)); background-size: 100% 100%; border-radius: 2px; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.blank:empty { display: inline-block; min-width: 8em; height: 1em; vertical-align: -0.15em; padding: 0; background: none; border-bottom: 1px solid var(--ink-soft); border-radius: 0; }
.blank-quiet, .blank-quiet:empty { background: none; border: 0; min-width: 0; padding: 0; }
.carta-firmas { display: grid; gap: 34px 40px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 52px; font-family: var(--sans); font-size: 0.92rem; }
.carta-firma { text-align: center; break-inside: avoid; }
.carta-firma-linea { display: block; height: 44px; border-bottom: 1px solid var(--ink); margin-bottom: 8px; }
.carta-firma p { margin: 0; color: var(--muted); }
.carta-firma .carta-firma-nombre { color: var(--ink); font-weight: 600; min-height: 1.4em; }
.carta-cta { margin: 0 0 40px; max-width: 560px; }
.aviso-opciones { border: 0; padding: 0; margin: 6px 0 16px; min-width: 0; }
.aviso-opciones legend { font-weight: 600; font-size: 0.94rem; margin-bottom: 8px; padding: 0; }
.aviso-opciones .check { margin-bottom: 6px; font-size: 0.94rem; }
.aviso-doc section { margin-bottom: 1.4em; }
.aviso-doc h3 { font: 600 1.02rem/1.35 var(--sans); margin: 0 0 0.5em; }
.aviso-doc ul { padding-left: 1.2em; margin: 0 0 1em; }
.aviso-doc li { margin-bottom: 0.4em; }
.aviso-doc li::marker { color: var(--seal); }
.aviso-doc [hidden] { display: none; }

/* Motion off when the visitor asks for it: every illustration is complete in its final state. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  body { background: #fff; }
  .topbar, .no-print, .copy-actions { display: none !important; }
  .doc, .card { box-shadow: none; border: 0; }
  .main.container { padding: 0; min-height: 0; }
  .pl-page .pl-crumbs, .pl-page .pl-aside, .pl-main > :not(.pl-template), .pl-template > :not(.pl-doc), .footer { display: none !important; }
  .pl-layout { display: block; }
  .pl-section { border: 0; padding: 0; }
  .pl-doc { padding: 0; font-size: 11.5pt; }
  .pl-field { break-inside: avoid; }
  .carta-page > :not(.carta-gen), .carta-form, .carta-preview > :not(.carta-doc) { display: none !important; }
  .carta-gen { display: block; margin: 0; }
  .blank { background: none; padding: 0; }
}
