/* Páginas públicas de contenido (guías, páginas de producto, generador). */
.seo-page { background: var(--bg); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--paper); padding: 8px 12px; border-radius: 8px; }
.seo-main { max-width: 780px; margin: 0 auto; padding: 8px 24px 40px; }
.seo-main.wide { max-width: 1160px; }
.crumbs { font-size: 13.5px; color: var(--muted); margin: 6px 0 18px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.prose { color: var(--ink-2); font-size: 17px; line-height: 1.7; }
.prose h1 { color: var(--ink); font-size: clamp(32px, 4.6vw, 48px); font-weight: 800; letter-spacing: -.03em; line-height: 1.06; margin: 0 0 16px; }
.prose h2 { color: var(--ink); font-size: clamp(23px, 2.8vw, 29px); margin: 46px 0 12px; }
.prose h3 { color: var(--ink); font-size: 19.5px; margin: 30px 0 8px; letter-spacing: -.01em; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin: 5px 0; }
.prose a { color: var(--cobalt-ink); text-underline-offset: 2px; }
.prose strong, .prose b { color: var(--ink); }
.seo-lead { font-size: 19.5px; line-height: 1.6; color: var(--ink-2); margin: 0 0 12px !important; }
.seo-meta { font-size: 13.5px; color: var(--muted); margin: 0 0 28px !important; }

.prose .table-wrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose th { text-align: left; background: #F7F8FB; color: var(--ink); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose td.r, .prose th.r { text-align: right; white-space: nowrap; }

.box { border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 18px 20px; margin: 0 0 22px; }
.box > :last-child { margin-bottom: 0; }
.box.tip { border-color: #C9D6FB; background: var(--cobalt-wash); }
.box.warn { border-color: #EBD9A6; background: var(--warn-wash); }
.box-title { display: block; color: var(--ink); font-weight: 800; margin-bottom: 4px; }
.example { font-variant-numeric: tabular-nums; }
.toc { border-left: 3px solid var(--cobalt); padding: 4px 0 4px 16px; margin: 0 0 30px; font-size: 15.5px; }
.toc b { display: block; color: var(--ink); margin-bottom: 4px; }
.toc ol { margin: 0; padding-left: 20px; }

.seo-faq { margin-top: 48px; }
.seo-faq details { border-bottom: 1px solid var(--line); }
.seo-faq summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 15px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-size: 17px; }
.seo-faq summary::-webkit-details-marker { display: none; }
.seo-faq summary::after { content: "+"; font-size: 21px; color: var(--muted); line-height: 1; }
.seo-faq details[open] summary::after { content: "−"; }
.seo-faq details > div { padding: 0 0 14px; }
.seo-faq details > div p:last-child { margin-bottom: 0; }

.seo-cta { margin: 44px 0 10px; display: flex; gap: 22px; align-items: center; justify-content: space-between; background: var(--ink); color: #fff; border-radius: 16px; padding: 26px 28px; }
.seo-cta h2 { color: #fff; font-size: 23px; margin: 0 0 6px; }
.seo-cta p { margin: 0; color: #C9D1E2; font-size: 15.5px; line-height: 1.55; }
.seo-cta .btn { flex: none; }
.seo-related { margin: 34px 0 0; }
.seo-related h2 { font-size: 19px; margin: 0 0 10px; }
.seo-related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.seo-related a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-weight: 650; text-decoration: none; font-size: 15px; }
.seo-related a:hover { border-color: var(--cobalt); color: var(--cobalt-ink); }

/* Páginas de producto */
.hero-mini { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 30px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 6px 0 26px; }
.feat-grid > div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; font-size: 15.5px; line-height: 1.55; }
.feat-grid h3 { margin: 0 0 6px; font-size: 17.5px; }
.feat-grid p { margin: 0; }
.checks { list-style: none; padding-left: 0 !important; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before { content: "✓"; position: absolute; left: 4px; top: 0; color: var(--paid); font-weight: 800; }

/* Índice de guías */
.guide-list { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.guide-list li { margin: 0; }
.guide-list a { display: block; height: 100%; box-sizing: border-box; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-decoration: none; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.guide-list a:hover { border-color: var(--cobalt); }
.guide-list b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 4px; font-family: var(--display); letter-spacing: -.01em; }

/* Pie */
.seo-foot { border-top: 1px solid var(--line); background: var(--paper); margin-top: 40px; }
.seo-foot-in { max-width: 1160px; margin: 0 auto; padding: 36px 24px 10px; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 26px; }
.seo-foot h3 { font-size: 14px; margin: 0 0 10px; color: var(--ink); font-family: var(--ui); letter-spacing: 0; }
.seo-foot ul { list-style: none; margin: 0; padding: 0; }
.seo-foot li { margin: 0 0 7px; }
.seo-foot a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.seo-foot a:hover { color: var(--cobalt-ink); }
.seo-foot-brand p { font-size: 14px; color: var(--muted); margin: 10px 0 0; max-width: 28ch; }
.seo-copy { max-width: 1160px; margin: 0 auto; padding: 8px 24px 30px; }

/* Generador de facturas */
.gen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 26px; align-items: start; margin: 10px 0 20px; }
.gen-form { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.gen-form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.gen-form legend { font-weight: 800; color: var(--ink); font-size: 16px; margin-bottom: 8px; }
.gen-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gen-form label { display: block; font-size: 13px; font-weight: 650; color: var(--ink-2); margin-bottom: 8px; }
.gen-form input, .gen-form select, .gen-form textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14.5px; background: #fff; color: var(--ink); }
.gen-form input:focus, .gen-form select:focus, .gen-form textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-wash); }
.gen-lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.gen-lines th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 650; padding: 0 4px 4px; }
.gen-lines td { padding: 3px 4px; vertical-align: top; }
.gen-lines td input, .gen-lines td select { margin: 0; padding: 7px 8px; }
.gen-lines .q { width: 62px; } .gen-lines .p { width: 92px; } .gen-lines .v { width: 74px; }
.gen-del { border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; padding: 4px 6px; }
.gen-preview { position: sticky; top: 16px; }
.gen-sheet { background: #fff; border-radius: 4px; box-shadow: var(--shadow-sheet); padding: 34px 34px 28px; color: #1e2430; font-size: 12.5px; line-height: 1.45; min-height: 560px; }
.gs-top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.gs-from b { font-size: 15px; color: #14213d; }
.gs-kind { font: 800 22px/1 var(--display); color: var(--cobalt); text-align: right; letter-spacing: -.02em; }
.gs-meta { text-align: right; margin-top: 8px; color: #5a6272; }
.gs-meta b { color: #1e2430; }
.gs-to { margin-bottom: 18px; }
.gs-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cobalt); display: block; margin-bottom: 2px; }
.gs-lines { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.gs-lines th { background: var(--cobalt); color: #fff; font-weight: 700; text-align: left; padding: 6px 8px; font-size: 11px; }
.gs-lines td { padding: 7px 8px; border-bottom: 1px solid #e8ebf1; }
.gs-lines .r { text-align: right; white-space: nowrap; }
.gs-tot { margin-left: auto; width: 62%; }
.gs-tot div { display: flex; justify-content: space-between; padding: 3px 0; }
.gs-tot .grand { border-top: 2px solid var(--cobalt); margin-top: 4px; padding-top: 7px; font-weight: 800; font-size: 15px; color: #14213d; }
.gs-notes { margin-top: 18px; color: #3d4860; white-space: pre-wrap; }
.gs-brand { margin-top: 26px; font-size: 10px; color: #9aa2b1; text-align: center; }
.gen-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

@media (max-width: 900px) {
  .gen { grid-template-columns: 1fr; }
  .gen-preview { position: static; }
  .seo-foot-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .seo-main { padding: 4px 16px 32px; }
  .prose { font-size: 16.5px; }
  .seo-cta { flex-direction: column; align-items: stretch; padding: 22px; }
  .seo-foot-in { grid-template-columns: 1fr; padding: 28px 16px 6px; }
  .gen-row { grid-template-columns: 1fr; }
  .gen-sheet { padding: 22px 18px; }
  .gen-lines .p { width: 76px; } .gen-lines .v { width: 64px; } .gen-lines .q { width: 48px; }
}
@media print {
  .seo-page .hnav, .seo-page .crumbs, .seo-page .seo-foot, .seo-page .seo-cta, .seo-page .seo-related, .seo-page .seo-faq,
  .seo-page .gen-form, .seo-page .gen-actions, .seo-page .no-print, .seo-page .prose > :not(.gen) { display: none !important; }
  .seo-page, .seo-page body { background: #fff; }
  .seo-main { max-width: none; padding: 0; }
  .gen { display: block; margin: 0; }
  .gen-sheet { box-shadow: none; padding: 0; min-height: 0; font-size: 11.5pt; }
  .gen-lines th, .gs-lines th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4; margin: 16mm 15mm; }
}
