/* Cversus — estilos de la web pública y de la aplicación.
   Identidad visual de la familia Sapindex (Sapindex AI): magenta #A3166B, títulos en EB Garamond y texto en Inter.
   Las tipografías se sirven desde este mismo servidor (sin Google Fonts ni cookies de terceros). */
@font-face { font-family: "EB Garamond"; src: url("fonts/eb-garamond.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
    --brand: #A3166B;
    --brand-dark: #8A1259;
    --brand-deep: #6E0D47;
    --tint: #FCF4F8;
    --tint-2: #FBEFF5;
    --tint-line: #E3BFD4;
    --ink: #1D2226;
    --text: #384347;
    --muted: #5F686D;
    --line: #E4DDE1;
    --line-soft: #EEE8EB;
    --field-line: #D9CED4;
    --bg: #F4F1F3;
    --white: #FFFFFF;
    --green: #18794E;
    --red: #B42318;
    --radius: 14px;
    --radius-sm: 8px;
    --serif: "EB Garamond", Georgia, "Times New Roman", serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --shadow: 0 1px 2px rgba(29, 34, 38, .04), 0 8px 24px rgba(29, 34, 38, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--white); line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
a:hover { color: var(--brand-deep); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--ink); letter-spacing: 0; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.eyebrow { display: inline-block; color: var(--brand); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }

/* Botones y formularios */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; background: var(--brand); color: var(--white); border: 1px solid transparent; border-radius: var(--radius-sm); padding: 0 20px; font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--brand-dark); color: var(--white); }
.btn-secondary, .btn-ghost { background: var(--white); color: var(--ink); border-color: var(--field-line); }
.btn-secondary:hover, .btn-ghost:hover { background: var(--white); color: var(--brand); border-color: var(--brand); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #912018; }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
button.link:hover { color: var(--brand); }
label { display: block; font-weight: 600; font-size: 13px; color: var(--ink); margin: 0 0 6px; }
input[type=text], input[type=email], input[type=password], select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: var(--radius-sm); font: inherit; font-size: 15px; background: var(--white); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(163, 22, 107, .2); border-color: var(--brand); }
input[type=checkbox] { accent-color: var(--brand); }
.field { margin-bottom: 16px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--text); }
.check input { margin-top: 3px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--brand); }
.pw-toggle:focus-visible { outline: 2px solid rgba(163, 22, 107, .35); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.flash { margin: 16px 0; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 15px; }
.flash-success { background: #ECF7F1; color: var(--green); border: 1px solid #BFE3CF; }
.flash-error { background: #FEF3F2; color: var(--red); border: 1px solid #F5C2BE; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }

/* Marca */
.brand { display: inline-flex; align-items: center; background: var(--brand); color: var(--white); font-family: var(--serif); font-weight: 500; font-size: 25px; line-height: 1; letter-spacing: .01em; padding: 6px 14px 8px; border-radius: 6px; text-decoration: none; box-shadow: 0 1px 2px rgba(110, 13, 71, .25); }
.brand:hover { color: var(--white); background: var(--brand-dark); }
.brand-c { color: inherit; }
.brand-ai { position: relative; top: .17em; margin-left: .28em; font-family: var(--sans); font-size: .62em; font-weight: 700; line-height: 1; letter-spacing: .06em; padding: .15em .36em .07em; border: 1px solid rgba(255, 255, 255, .7); border-radius: 4px; }

/* Cabecera y pie */
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--white); position: sticky; top: 0; z-index: 10; }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a { text-decoration: none; color: var(--text); font-weight: 500; font-size: 15px; }
.site-nav a:hover { color: var(--brand); }
.site-nav a.btn { color: var(--white); }
/* Pie: fondo liso en el magenta corporativo, con todo el texto en blanco. */
.site-footer { background: var(--brand); color: var(--white); margin-top: 0; padding: 48px 0 44px; font-size: 14px; }
.site-footer p { color: var(--white); }
.site-footer nav a { color: var(--white); text-decoration: none; font-weight: 500; }
.site-footer nav a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.site-footer a.brand { background: var(--white); color: var(--brand); text-decoration: none; box-shadow: 0 0 0 1px var(--white); transition: background-color .15s, color .15s; }
.site-footer a.brand .brand-ai { border-color: rgba(163, 22, 107, .7); }
.site-footer a.brand:hover { background: var(--brand); color: var(--white); text-decoration: none; }
.site-footer a.brand:hover .brand-ai { border-color: rgba(255, 255, 255, .7); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer-inner p { margin: 14px 0 0; }
.footer-inner nav { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.brand-footer { font-size: 21px; }

/* Portada */
.hero { padding: 72px 0 56px; background: linear-gradient(110deg, #FFFFFF 0%, var(--tint-2) 55%, #F2D3E4 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: 52px; font-weight: 500; margin: 0 0 20px; line-height: 1.08; }
.hero h1 em { font-style: italic; color: var(--brand); }
.hero .lead { font-size: 19px; color: var(--text); margin: 0 0 28px; max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: 14px; color: var(--muted); margin-top: 14px; }
.ba { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.ba-arrow { font-size: 26px; color: var(--brand); font-weight: 600; }
.doc { background: var(--white); border-radius: 6px; box-shadow: 0 10px 30px rgba(29, 34, 38, .14); padding: 14px 12px; aspect-ratio: 1 / 1.414; font-size: 6.5px; line-height: 1.45; overflow: hidden; position: relative; }
.doc-before { font-family: "Comic Sans MS", "Trebuchet MS", sans-serif; color: #333; transform: rotate(-1.5deg); }
.doc-before .b-name { font-size: 13px; font-weight: 700; color: #2E7D32; }
.doc-before .b-contact { color: #0645AD; text-decoration: underline; margin-bottom: 5px; }
.doc-before .b-title { background: #FFE066; display: inline-block; font-weight: 700; margin: 5px 0 2px; padding: 0 2px; }
.doc-before .b-cols { display: grid; grid-template-columns: 1fr 2fr; gap: 6px; }
.doc-before .b-side { background: #E3F2FD; padding: 3px; }
.line { height: 3px; background: #DDD7DA; border-radius: 2px; margin: 3px 0; }
.line.s { width: 55%; } .line.m { width: 78%; }
.doc-after { padding: 16px 14px; }
.doc-after .a-head { padding: 0; }
.doc-after .a-logo { display: flex; justify-content: space-between; align-items: center; font-size: 6px; margin-bottom: 8px; color: var(--ink); font-weight: 600; letter-spacing: .1em; }
.doc-after .a-logo span:first-child { background: var(--brand); color: var(--white); font-family: var(--serif); font-size: 7px; letter-spacing: 0; padding: 2px 5px; border-radius: 2px; }
.doc-after .a-title { font-family: var(--serif); font-size: 11px; font-weight: 500; color: var(--ink); letter-spacing: .03em; padding-bottom: 5px; border-bottom: 1px solid var(--brand); }
.doc-after .a-body { padding: 4px 0 0; }
.doc-after .a-h { color: var(--brand); font-family: var(--serif); font-weight: 600; font-size: 8px; margin: 7px 0 3px; text-transform: uppercase; }
.doc-after .a-chip { display: inline-block; background: var(--tint); border: 1px solid var(--tint-line); color: var(--ink); border-radius: 6px; padding: 0 3px; margin: 0 2px 2px 0; }
.doc-after .a-badge { position: absolute; right: 8px; bottom: 8px; background: var(--ink); color: var(--white); font-size: 6px; padding: 1px 6px; border-radius: 6px; }
.doc-label { position: absolute; top: -26px; left: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.section { padding: 80px 0; }
.section-alt { background: var(--bg); }
.section h2 { font-size: 38px; font-weight: 500; margin: 0 0 12px; }
.section .intro { font-size: 18px; color: var(--muted); max-width: 720px; margin: 0 0 40px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step::before { counter-increment: step; content: counter(step); display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: var(--tint); border: 1px solid var(--tint-line); color: var(--brand); font-family: var(--serif); font-size: 19px; font-weight: 600; align-items: center; justify-content: center; margin-bottom: 14px; }
.step h3 { margin: 0 0 8px; font-size: 23px; }
.step p { margin: 0; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 36px; }
.feature h3 { font-size: 22px; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); }
.feature-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--tint); border: 1px solid var(--tint-line); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); text-align: left; font-size: 15px; }
.compare tr:last-child td { border-bottom: 0; }
.compare th { background: var(--bg); color: var(--ink); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.compare td:first-child { color: var(--ink); font-weight: 500; }
.compare td.yes { color: var(--brand); font-weight: 600; }
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.pricing-5 { grid-template-columns: repeat(5, 1fr); gap: 14px; }
.pricing-5 .price-card { padding-left: 18px; padding-right: 18px; }
@media (max-width: 1100px) { .pricing-5 { grid-template-columns: repeat(3, 1fr); } }
.price-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--brand); position: relative; box-shadow: var(--shadow); }
.price-card.featured::after { content: attr(data-badge); position: absolute; top: -12px; left: 24px; background: var(--brand); color: var(--white); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.price-card h3 { margin: 0 0 6px; font-size: 22px; }
.price { font-family: var(--serif); font-size: 44px; font-weight: 500; color: var(--ink); margin: 4px 0 2px; line-height: 1.1; }
.per-cv { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.price-card ul { padding-left: 18px; margin: 0 0 22px; color: var(--text); font-size: 15px; flex: 1; }
.price-card li::marker { color: var(--brand); }
.price-card .btn { width: 100%; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 10px; }
.faq details[open] { border-color: var(--tint-line); }
.faq summary { font-weight: 600; cursor: pointer; color: var(--ink); }
.faq summary::marker { color: var(--brand); }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.cta-band { background: linear-gradient(110deg, #FFFFFF 0%, var(--tint-2) 45%, #F2D3E4 100%); border: 1px solid #EBCFDE; border-radius: var(--radius); padding: 48px 40px; text-align: center; }
.cta-band h2 { color: var(--ink); }
.cta-band p { color: var(--muted); font-size: 18px; margin: 0 0 24px; }

/* Formularios de acceso */
.auth-page { background: var(--bg); padding: 56px 0 72px; }
.auth { max-width: 460px; margin: 0 auto; padding: 0 24px; }
.auth h1 { font-size: 36px; font-weight: 500; margin: 0 0 6px; }
.auth .card { margin-top: 20px; padding: 28px; }
.auth .btn { width: 100%; }

/* Páginas legales */
.legal { max-width: 780px; margin: 48px auto; padding: 0 24px; }
.legal h1 { font-size: 40px; font-weight: 500; }
.legal h2 { font-size: 24px; margin-top: 32px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; }
.legal td, .legal th { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal th { background: var(--bg); color: var(--ink); }

/* Aplicación */
.app { background: var(--bg); }
.app-header { background: var(--white); border-bottom: 1px solid var(--line); }
.app-header .brand { font-size: 22px; }
.app-nav { display: flex; gap: 4px; flex: 1; margin-left: 28px; }
.app-nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: var(--radius-sm); }
.app-nav a:hover { color: var(--ink); background: var(--bg); }
.app-nav a.active { color: var(--brand); background: var(--tint); }
.app-main { padding-top: 28px; padding-bottom: 56px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 34px; font-weight: 500; }
.balance { background: var(--tint); border: 1px solid var(--tint-line); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 14px; color: var(--ink); }
.balance strong { color: var(--brand); }
.app .card h2 { font-size: 24px; }
.grid-2 { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.dropzone { display: block; border: 2px dashed var(--tint-line); border-radius: var(--radius); padding: 30px 16px; text-align: center; background: var(--tint); cursor: pointer; transition: border-color .15s, background .15s; font-weight: 400; }
.dropzone.drag, .dropzone:hover { border-color: var(--brand); background: var(--tint-2); }
.dropzone strong { display: block; color: var(--ink); margin-bottom: 4px; font-size: 15px; }
.dropzone input { display: none; }
.file-name { font-size: 14px; color: var(--brand); margin-top: 8px; font-weight: 600; word-break: break-all; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); text-align: left; font-size: 14px; vertical-align: middle; }
.table th { background: var(--white); color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.table tr:last-child td { border-bottom: 0; }
.table a { color: var(--ink); text-decoration: none; }
.table a:hover { color: var(--brand); }
.status { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.status-done { background: #ECF7F1; color: var(--green); }
.status-queued, .status-processing { background: var(--tint); color: var(--brand); }
.status-failed { background: #FEF3F2; color: var(--red); }
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .sep { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.toolbar .save-state { font-size: 13px; color: var(--muted); margin-left: auto; }
/* Barra de formato del CV: centrada, con las herramientas en una fila y el guardado debajo. */
.editor-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.editor-bar .save-state { font-size: 13px; color: var(--muted); }
.editor-bar .editor-save { justify-self: end; }
.editor-bar .editor-link { grid-column: 1 / -1; }
.editor-tools { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px; padding: 5px 8px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.editor-tools .sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.tool { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 7px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.tool:hover { background: var(--tint); color: var(--brand); }
.tool.is-active { background: var(--tint); color: var(--brand); box-shadow: inset 0 0 0 1px var(--tint-line); }
.tool-select { height: 32px; padding: 0 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.tool-select:hover, .tool-select:focus { border-color: var(--field-line); outline: none; }
.tool-font { width: 150px; }
.tool-size { width: 98px; }
.editor-link { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.editor-link[hidden] { display: none; }
.editor-link input { width: 300px; max-width: 70vw; min-height: 38px; padding: 0 10px; border: 1px solid var(--field-line); border-radius: 8px; font: inherit; font-size: 14px; }
/* CV editable: una hoja A4 que es el espejo del PDF, dentro de una caja de altura fija con desplazamiento. */
.editor-viewport { height: calc(100vh - 260px); min-height: 240px; overflow: auto; background: #E9ECEF; border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.editor-sheet { position: relative; box-sizing: border-box; width: 210mm; min-height: 297mm; margin: 0 auto; background-color: var(--white); background-image: var(--page-bg, none); background-size: 210mm 297mm; background-repeat: repeat-y; box-shadow: 0 2px 12px rgba(0, 0, 0, .16); }
.sheet-header, .sheet-footer { position: absolute; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-header { font-size: 8pt; color: #666666; }
.sheet-header img { max-height: 12mm; max-width: 55mm; display: block; }
.sheet-footer { font-size: 7.5pt; color: #888888; }
/* Se marca solo el bloque sobre el que se está (o se va a) escribir, con el mismo trazo fino que el CV ciego de
   Sapindex Cloud: 1 px al pasar el ratón y 2 px al editar. */
#cv-editor { outline: none; }
#cv-editor p, #cv-editor li, #cv-editor h1, #cv-editor h2, #cv-editor h3, #cv-editor td { border-radius: 3px; cursor: text; transition: background-color .15s, box-shadow .15s; }
#cv-editor p:hover, #cv-editor li:hover, #cv-editor h1:hover, #cv-editor h2:hover, #cv-editor h3:hover, #cv-editor td:not(:has(p, li, table)):hover { background-color: rgba(163, 22, 107, .04); box-shadow: 0 0 0 1px rgba(163, 22, 107, .3); }
#cv-editor .is-editing, #cv-editor .is-editing:hover { background-color: transparent; box-shadow: 0 0 0 2px rgba(163, 22, 107, .55); }
.toolbar-center { justify-content: center; margin-top: 12px; margin-bottom: 0; }
.toolbar-center form { margin: 0; display: flex; align-items: center; gap: 8px; }
.toolbar-center .select-small { min-height: 38px; }
/* Cabecera del CV en una sola línea: nombre del archivo y cuándo se convirtió. */
.cv-head-line { align-items: baseline; margin-bottom: 12px; }
.cv-head-line h1 { font-size: 26px; line-height: 1.25; }
.cv-head-meta { font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 10px; white-space: nowrap; }
.processing { text-align: center; padding: 64px 20px; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--tint-line); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
.template-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 24px; align-items: start; }
/* La vista previa acompaña al formulario mientras se baja por él. */
.template-preview { position: sticky; top: 16px; }
.preview-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 2px 8px; color: var(--ink); }
.preview-frame { display: block; width: 100%; height: calc(100vh - 110px); min-height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: #E9E4E7; }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; background: var(--white); min-width: 0; }
/* Título de bloque dentro de la tarjeta (no sobre el borde): flotar el legend lo saca del hueco del borde. */
.fieldset legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.2; color: var(--brand); padding: 0 0 14px; margin: 0 0 18px; border-bottom: 1px solid var(--line-soft); }
.fieldset legend + * { clear: both; }
.numbered-blocks { counter-reset: block; }
.numbered-blocks .fieldset legend::before { counter-increment: block; content: counter(block); flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--white); font-family: var(--sans); font-size: 14px; font-weight: 700; }
.colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
input[type=range].range { width: 100%; height: 28px; margin: 2px 0 0; padding: 0; accent-color: var(--brand); cursor: pointer; }
.range-ends { display: flex; justify-content: space-between; gap: 12px; margin: 2px 0 0; }
label output { color: var(--brand); font-weight: 700; }
.hint-list { margin: 12px 0 16px; padding-left: 18px; }
.hint-list li { margin-bottom: 4px; }
.hint-list strong { color: var(--ink); }
.file-clear { display: inline-block; margin: 8px 0 0; padding: 4px 10px; background: var(--white); border: 1px solid var(--field-line); border-radius: 999px; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.file-clear:hover { border-color: var(--brand); color: var(--brand); }
.file-clear[hidden] { display: none; }
.colors input[type=color] { width: 100%; height: 42px; border: 1px solid var(--field-line); border-radius: var(--radius-sm); padding: 3px; background: var(--white); }
.sections-list { list-style: none; padding: 0; margin: 0; }
.sections-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.sections-list li:last-child { border-bottom: 0; }
.sections-list .move { display: flex; gap: 4px; }
.sections-list .move button { background: var(--white); border: 1px solid var(--field-line); color: var(--ink); border-radius: 6px; width: 30px; height: 30px; cursor: pointer; }
.sections-list .move button:hover { border-color: var(--brand); color: var(--brand); }
.sections-list input[type=text] { min-height: 38px; padding: 6px 10px; font-size: 14px; }
.sections-list .sec-name { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.logo-thumb { max-height: 48px; max-width: 200px; display: block; margin-bottom: 8px; background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50% / 12px 12px; }
.danger-zone { border-color: #F5C2BE; }

@media (max-width: 900px) {
    .hero { padding: 48px 0 40px; }
    .hero-grid, .grid-2, .template-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 38px; }
    .section { padding: 56px 0; }
    .section h2 { font-size: 30px; }
    .steps, .features { grid-template-columns: 1fr; }
    .pricing { grid-template-columns: 1fr 1fr; }
    .site-nav a:not(.btn) { display: none; }
    .app-nav { margin-left: 0; overflow-x: auto; }
    .editor-viewport { padding: 10px; }
    .template-preview { position: static; }
    .preview-frame { height: 600px; min-height: 0; }
}
@media (max-width: 560px) {
    .wrap { padding: 0 16px; }
    .pricing { grid-template-columns: 1fr; }
    .header-inner { flex-wrap: wrap; padding: 10px 0; }
    .cta-band { padding: 32px 20px; }
}

/* Selector de idioma: enlaces normales, sin JavaScript. */
.lang-menu { position: relative; }
.lang-menu summary { display: flex; align-items: center; gap: 7px; list-style: none; cursor: pointer; font-weight: 600; font-size: 13px; letter-spacing: .04em; color: var(--text); padding: 6px 10px; border: 1px solid var(--line, #E5DCE2); border-radius: 999px; user-select: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: "▾"; font-size: 10px; }
.flag { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); flex: none; }
.lang-menu[open] summary { border-color: var(--brand); color: var(--brand); }
.lang-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 150px; background: var(--white, #fff); border: 1px solid var(--line, #E5DCE2); border-radius: 12px; box-shadow: 0 12px 30px rgba(40, 10, 30, .12); padding: 6px; z-index: 20; display: grid; }
.lang-list a, .site-nav .lang-list a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: 14px; text-decoration: none; }
.lang-list a:hover { background: rgba(160, 20, 110, .07); }
.footer-langs { display: flex; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .28); font-size: 14px; }
.lang-menu-footer summary { background: var(--white); color: var(--brand); border-color: var(--white); letter-spacing: 0; font-size: 14px; padding: 7px 12px; transition: background-color .15s, color .15s; }
.lang-menu-footer summary:hover, .lang-menu-footer[open] summary { background: var(--brand); color: var(--white); border-color: var(--white); }
.lang-menu-footer .lang-list { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; }
.site-footer .lang-list a, .site-footer .lang-list a:hover { color: var(--ink); text-decoration: none; }
.lang-list a[aria-current="true"], .site-footer .lang-list a[aria-current="true"] { font-weight: 700; color: var(--brand); }
@media (max-width: 900px) {
    .site-nav .lang-list a:not(.btn) { display: flex; }
}

/* Editor de plantilla: zonas de texto y desplegable de tipografías con muestra. */
.type-slot { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 2px; margin: 0 0 14px; background: #FBFAFB; }
.type-slot-title { margin: 0 0 12px; font-family: var(--sans, inherit); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.font-picker { position: relative; }
.font-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.font-current, .font-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: var(--white); cursor: pointer; }
.font-current { border: 1px solid var(--field-line); border-radius: 10px; padding: 9px 34px 9px 14px; min-height: 46px; position: relative; }
.font-current::after { content: "▾"; position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); }
.font-current:focus-visible, .font-option:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.font-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: 380px; overflow-y: auto; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(40, 10, 30, .16); padding: 6px; }
.font-group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); padding: 10px 10px 4px; }
.font-option { border: 0; border-radius: 8px; padding: 6px 10px; min-height: 40px; }
.font-option:hover, .font-option[aria-selected="true"] { background: var(--tint-2); }
.font-name { flex: 0 1 46%; min-width: 0; font-size: 13px; line-height: 1.25; }
.font-sample { flex: 0 0 auto; height: 24px; width: auto; max-width: 54%; object-fit: contain; object-position: right center; }
#decoration-options[hidden], #decoration-second[hidden], #decoration-corner[hidden] { display: none; }
.pricing-title { font-family: var(--sans, inherit); font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin: 34px 0 14px; }
.price-period { font-family: var(--sans, inherit); font-size: 15px; color: var(--muted); margin-left: 4px; }
.btn.is-disabled { opacity: .6; cursor: default; pointer-events: none; }
.plan-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.plan-box h2 { margin: 0 0 6px; font-size: 22px; }
.plan-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.plan-actions form { margin: 0; }

/* Espera de la conversión: una hoja que se va escribiendo y consejos que se relevan con un fundido. */
.sheet { width: 150px; height: 196px; margin: 0 auto 26px; padding: 16px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 14px 34px rgba(40, 10, 30, .12); display: flex; flex-direction: column; gap: 7px; }
.sheet-head { display: block; height: 16px; width: 58%; border-radius: 3px; background: var(--brand); margin-bottom: 6px; }
.sheet-line { display: block; height: 6px; width: var(--w); border-radius: 3px; background: linear-gradient(90deg, var(--tint-line), var(--tint-2), var(--tint-line)); background-size: 200% 100%; transform-origin: left center; animation: sheet-write 5.6s ease-in-out var(--d) infinite both, sheet-shine 1.8s linear infinite; }
.sheet-gap { height: 4px; visibility: hidden; }
@keyframes sheet-write { 0% { transform: scaleX(0); opacity: 0; } 12% { transform: scaleX(1); opacity: 1; } 82% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes sheet-shine { from { background-position: 200% 0; } to { background-position: 0 0; } }
.tips { position: relative; height: 56px; max-width: 520px; margin: 18px auto 0; }
.tip { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--ink); font-size: 15px; opacity: 0; animation: tip-fade 25s linear calc(var(--i) * 5s) infinite; }
@keyframes tip-fade { 0% { opacity: 0; transform: translateY(6px); } 3% { opacity: 1; transform: none; } 18% { opacity: 1; transform: none; } 21% { opacity: 0; transform: translateY(-6px); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .sheet-line { animation: none; }
    .tip { animation: none; }
    .tip:first-child { opacity: 1; }
}

/* Plantillas: pestañas para pasar de una a otra, crear una nueva y ver cuántas incluye el plan. */
.template-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; }
.template-tabs form { margin: 0; }
.template-tab { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.template-tab:hover { border-color: var(--brand); }
.template-tab.is-current { background: var(--brand); border-color: var(--brand); color: var(--white); }
.template-tab.is-locked { color: var(--muted); background: transparent; border-style: dashed; }
.template-tab.is-locked[disabled], span.template-tab.is-locked { cursor: default; }
.template-tab.is-new { color: var(--brand); border-color: var(--brand); background: transparent; }
.template-count { margin-left: 6px; }
.template-keep { margin-bottom: 18px; }
.select-small { padding: 6px 10px; font-size: 14px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--white); }
/* Una viñeta centrada o a la derecha lleva el punto junto al texto, como en el PDF. */
#cv-editor li[style*="text-align: center"], #cv-editor li[style*="text-align:center"], #cv-editor li[style*="text-align: right"], #cv-editor li[style*="text-align:right"] { list-style-position: inside; }
@media (max-width: 1000px) {
    .editor-bar { grid-template-columns: 1fr auto; }
    .editor-bar .editor-tools { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
