/* ==========================================================================
   FacturasOnlineGratis.com – estilos
   Modo normal (claro) y oscuro mediante [data-theme] en <html>.
   ========================================================================== */

/* ---------- Tokens de color ---------- */
:root {
  --bg: #f3f7f6;
  --bg-alt: #e9f1ef;
  --surface: #ffffff;
  --surface-2: #f2f6f5;
  --text: #1c2a31;
  --muted: #586a72;
  --border: #d6e1de;
  --primary: #0d7a6f;
  --primary-hover: #0a655c;
  --primary-soft: #dff2ee;
  --on-primary: #ffffff;
  --accent: #f2a03d;
  --danger: #c2410c;
  --danger-soft: #fdeee6;
  --success: #15803d;
  --success-soft: #e5f6eb;
  --focus: #2b7de9;
  --shadow: 0 1px 2px rgba(16, 42, 38, .06), 0 8px 24px rgba(16, 42, 38, .08);
  --shadow-paper: 0 2px 4px rgba(16, 42, 38, .06), 0 18px 40px rgba(16, 42, 38, .12);
  --radius: 14px;
  --radius-sm: 9px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1719;
    --bg-alt: #131e21;
    --surface: #172225;
    --surface-2: #1d2b2f;
    --text: #e4edef;
    --muted: #9db0b5;
    --border: #2a3b40;
    --primary: #36c2b1;
    --primary-hover: #5fd3c5;
    --primary-soft: #133a36;
    --on-primary: #05221f;
    --accent: #f5b25e;
    --danger: #fb8a5c;
    --danger-soft: #3a2018;
    --success: #4ade80;
    --success-soft: #133222;
    --focus: #79b0ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-paper: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1719;
  --bg-alt: #131e21;
  --surface: #172225;
  --surface-2: #1d2b2f;
  --text: #e4edef;
  --muted: #9db0b5;
  --border: #2a3b40;
  --primary: #36c2b1;
  --primary-hover: #5fd3c5;
  --primary-soft: #133a36;
  --on-primary: #05221f;
  --accent: #f5b25e;
  --danger: #fb8a5c;
  --danger-soft: #3a2018;
  --success: #4ade80;
  --success-soft: #133222;
  --focus: #79b0ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-paper: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 40px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.85rem); }
h3 { font-size: 1.2rem; margin-top: 1.8em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-primary); }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.container--wide { max-width: 1040px; }
.container--narrow { max-width: 820px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, transparent)) { .site-header { background: var(--surface); } }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.12rem; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand__logo { width: 34px; height: 34px; color: var(--primary); }
.brand__name span { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 6px; order: 2; }
.site-nav { order: 1; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 500; font-size: .93rem; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 42px; height: 42px; padding: 0 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text);
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.theme-toggle .icon--sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon--sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon--moon { display: none; }
.nav-toggle { display: none; }

.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); font-weight: 600; font-size: .9rem;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { border-color: var(--primary); color: var(--primary); }
.lang-menu__list {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); z-index: 60;
}
.lang-menu__list a { display: block; padding: 8px 12px; border-radius: 7px; color: var(--text); text-decoration: none; }
.lang-menu__list a:hover { background: var(--surface-2); }
.lang-menu__list a[aria-current="true"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { order: 3; flex-basis: 100%; display: none; padding-bottom: 12px; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 11px 12px; }
}
@media (max-width: 480px) {
  .header-inner { gap: 8px; min-height: 58px; }
  .brand { font-size: .98rem; gap: 7px; }
  .brand__logo { width: 30px; height: 30px; }
  .header-actions { gap: 4px; }
  .lang-menu summary { padding: 0 9px; height: 38px; }
  .lang-menu summary .icon { display: none; }
  .icon-btn { min-width: 38px; height: 38px; padding: 0 7px; }
}
@media (max-width: 350px) {
  .brand__name { font-size: .9rem; }
  .brand__logo { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 44px 0 26px; text-align: center; background:
  radial-gradient(1100px 380px at 50% -120px, var(--primary-soft), transparent 70%); }
.hero h1 { max-width: 800px; margin-left: auto; margin-right: auto; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 720px; margin: 0 auto 1.2em; }
.badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.badges li {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-size: .9rem; font-weight: 500;
}
.badges .icon { width: 16px; height: 16px; color: var(--success); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .05s;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover:not(:disabled) { background: var(--primary-hover); color: var(--on-primary); }
.btn--secondary { background: var(--surface); border-color: var(--primary); color: var(--primary); }
.btn--secondary:hover { background: var(--primary-soft); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn--sm .icon { width: 17px; height: 17px; }
.btn--lg { min-height: 50px; padding: 12px 24px; font-size: 1.05rem; }

/* ---------- Herramienta ---------- */
.tool-section { padding: 10px 0 30px; }
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow);
}
.toolbar__group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.field-inline { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 600; }
.field-inline select {
  height: 38px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); padding: 0 8px; max-width: 150px;
}
.field-inline input[type="color"] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); cursor: pointer; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--border); transition: background .15s; flex: none; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--focus); outline-offset: 2px; }
.tool-hint { text-align: center; color: var(--muted); font-size: .92rem; margin: 14px 0; }

/* Hoja (siempre blanca, como el papel) */
.paper {
  --inv-accent: #0d7a6f;
  --ink: #1f2a30;
  --ink-muted: #66747b;
  --line: #e2e7ea;
  --edit: #f3f8f7;
  position: relative;
  background: #fff; color: var(--ink);
  border-radius: 6px; box-shadow: var(--shadow-paper);
  padding: 44px 46px 30px;
  max-width: 900px; margin: 0 auto;
  color-scheme: light;
}
.paper input, .paper textarea {
  width: 100%; border: 1px dashed transparent; border-radius: 6px; background: transparent; color: var(--ink);
  padding: 4px 7px; transition: background .12s, border-color .12s;
}
.paper input::placeholder, .paper textarea::placeholder { color: #9aa6ac; opacity: 1; }
.paper input:hover, .paper textarea:hover { border-color: #c9d3d7; background: var(--edit); }
.paper input:focus, .paper textarea:focus { outline: none; border-style: solid; border-color: var(--inv-accent); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-accent) 18%, transparent); }
.paper textarea { resize: vertical; min-height: 34px; line-height: 1.45; overflow: hidden; }
.paper input[aria-invalid="true"], .paper textarea[aria-invalid="true"] { border-color: #dc2626; background: #fef2f2; }

.paper__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 330px); gap: 24px; align-items: start; }
.logo-box { position: relative; width: 220px; max-width: 100%; min-height: 96px; }
.logo-drop {
  width: 100%; min-height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 2px dashed #c3ced3; border-radius: 10px; background: #f7f9fa; color: #5b6970; cursor: pointer; padding: 10px;
}
.logo-drop:hover, .logo-box.is-dragover .logo-drop { border-color: var(--inv-accent); color: var(--inv-accent); background: #f1f8f7; }
.logo-drop .icon { width: 26px; height: 26px; }
.logo-drop__title { font-weight: 600; font-size: .95rem; }
.logo-drop__hint { font-size: .75rem; color: #7d8a90; }
.logo-img { display: block; max-width: 220px; max-height: 100px; width: auto; height: auto; cursor: pointer; border-radius: 4px; }
.logo-remove {
  position: absolute; top: -10px; right: -10px; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d5dde0; background: #fff; color: #b42318; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.logo-remove .icon { width: 16px; height: 16px; }

.paper__meta { display: flex; flex-direction: column; gap: 2px; }
.inv-title { font-size: 1.85rem !important; font-weight: 800; color: var(--inv-accent) !important; text-align: right; letter-spacing: .02em; padding: 2px 7px !important; margin-bottom: 6px; }
.meta-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 6px; }
.meta-row .lbl { text-align: right; color: var(--ink-muted); font-size: .9rem; }
.meta-row .val { font-weight: 600; font-size: .95rem; }
.meta-row input[type="date"] { min-height: 32px; }

.paper__parties { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 34px 0 26px; }
.party textarea { font-size: .95rem; }
.lbl { font-size: .9rem; }
.lbl--accent { color: var(--inv-accent) !important; font-weight: 700; font-size: .8rem !important; text-transform: uppercase; letter-spacing: .06em; }

.items__head, .item-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 72px 104px 72px 116px 34px; gap: 6px; align-items: start;
}
.items__head { background: var(--inv-accent); border-radius: 6px; padding: 6px 6px; }
.items__head .lbl--head { color: #fff; font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.items__head .lbl--head:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); }
.items__head .lbl--head:focus { background: rgba(255,255,255,.95); color: var(--ink); }
.items__head.on-light .lbl--head { color: #1f2a30; }
.lbl--num, .cell--num input, .cell--num output { text-align: right; }
.item-row { padding: 7px 6px; border-bottom: 1px solid var(--line); }
.item-row:nth-child(even) { background: #fafbfb; }
.cell { display: block; min-width: 0; }
.cell__lbl { display: none; }
.cell textarea { min-height: 34px; }
.cell output { display: block; padding: 5px 7px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-remove {
  width: 30px; height: 30px; margin-top: 2px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: #9aa6ac; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.item-remove:hover { color: #b42318; background: #fdecea; }
.item-remove .icon { width: 16px; height: 16px; }
.btn--add { margin-top: 10px; background: transparent; border: 1px dashed #b9c5ca; color: var(--inv-accent); min-height: 38px; padding: 6px 14px; font-size: .92rem; }
.btn--add:hover { border-style: solid; border-color: var(--inv-accent); background: #f4faf9; }
.btn--add .icon { width: 17px; height: 17px; }

.paper__bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 28px; margin-top: 22px; align-items: start; }
.paper__notes { display: flex; flex-direction: column; gap: 14px; }
.note-block textarea { font-size: .92rem; }
.totals { display: flex; flex-direction: column; }
.totals__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.totals__row output { font-variant-numeric: tabular-nums; font-weight: 600; padding-right: 7px; white-space: nowrap; }
.totals__row .lbl { color: var(--ink-muted); }
.totals__tax { display: flex; align-items: center; gap: 4px; min-width: 0; }
.totals__tax .lbl { flex: 1 1 auto; min-width: 0; }
.totals__tax .lbl--short { flex: 0 1 90px; }
.totals__rates { color: var(--ink-muted); font-size: .85rem; white-space: nowrap; }
.totals__breakdown { font-size: .82rem; color: var(--ink-muted); }
.totals__breakdown div { display: flex; justify-content: space-between; padding: 2px 7px 2px 14px; }
.paper .pct { width: 56px; flex: none; text-align: right; font-weight: 600; }
.pct-sign { color: var(--ink-muted); font-size: .9rem; }
.totals__row--total { margin-top: 8px; background: var(--inv-accent); border-radius: 6px; padding: 6px 4px; border: 0; }
.totals__row--total output { color: #fff; font-size: 1.15rem; font-weight: 800; }
.totals__row--total .lbl--total { color: #fff !important; font-weight: 800; font-size: 1.05rem; }
.totals__row--total .lbl--total:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); }
.totals__row--total .lbl--total:focus { background: #fff; color: var(--ink) !important; }
.paper.on-light-accent .items__head .lbl--head,
.paper.on-light-accent .totals__row--total output,
.paper.on-light-accent .totals__row--total .lbl--total { color: #1f2a30 !important; }
.paper.on-light-accent .lbl--accent,
.paper.on-light-accent .inv-title,
.paper.on-light-accent .cell--amount output { color: color-mix(in srgb, var(--inv-accent) 50%, #000) !important; }

.paper__footer { margin-top: 28px; text-align: center; font-size: .82rem; color: var(--ink-muted) !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important; padding-top: 12px !important; }

.tool-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.tool-privacy { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: .9rem; margin-top: 14px; text-align: center; }
.tool-privacy .icon { color: var(--success); width: 18px; height: 18px; }
.tool-error { max-width: 640px; margin: 14px auto 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); text-align: center; font-weight: 600; }

.result-card {
  max-width: 680px; margin: 22px auto 0; padding: 20px; text-align: center; border-radius: var(--radius);
  background: var(--success-soft); border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
}
.result-card h3 { margin: 0 0 6px; display: inline-flex; align-items: center; gap: 8px; color: var(--success); }
.result-card h3 .icon { width: 24px; height: 24px; }
.result-card:focus { outline: none; }

/* Editor en móvil: la hoja se apila */
@media (max-width: 760px) {
  .paper { padding: 22px 14px 18px; border-radius: 10px; }
  .paper__head { grid-template-columns: 1fr; gap: 16px; }
  .logo-box { width: 100%; }
  .inv-title { text-align: left; font-size: 1.5rem !important; }
  .meta-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .meta-row .lbl { text-align: left; }
  .paper__parties { grid-template-columns: 1fr; gap: 16px; margin: 22px 0 18px; }
  .items__head { display: none; }
  .item-row {
    grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px 40px 12px 10px; position: relative;
    border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: #fff !important;
  }
  .cell--desc { grid-column: 1 / -1; }
  .cell__lbl { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); padding: 0 7px; }
  .cell input, .cell textarea { border-color: #dfe5e8; background: #fafcfc; }
  .lbl--num, .cell--num input, .cell--num output { text-align: left; }
  .cell--amount output { font-size: 1.05rem; color: var(--inv-accent); }
  .item-remove { position: absolute; top: 6px; right: 6px; }
  .paper__bottom { grid-template-columns: 1fr; gap: 18px; }
  .totals { order: -1; }
  .toolbar { padding: 12px; }
  .toolbar__group:last-child { width: 100%; }
  .toolbar__group:last-child .btn { flex: 1 1 0; }
  .tool-actions .btn { flex: 1 1 100%; }
}

/* ---------- Compartir ---------- */
.share-section { padding: 26px 0 34px; text-align: center; }
.share-section h2 { font-size: 1.3rem; }
.share-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; text-decoration: none; color: #fff; border: 0; cursor: pointer; transition: filter .15s, transform .05s;
}
.share-btn:hover { filter: brightness(1.08); color: #fff; }
.share-btn:active { transform: translateY(1px); }
.share-btn .icon { width: 20px; height: 20px; }
.share-btn--facebook { background: #1877f2; }
.share-btn--whatsapp { background: #128c4b; }
.share-btn--x { background: #111; }
:root[data-theme="dark"] .share-btn--x { background: #2b2f33; }
.share-btn--telegram { background: #1d8acb; }
.share-btn--copy { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.share-btn--copy:hover { color: var(--primary); border-color: var(--primary); }
.share-btn--copy.is-done { color: var(--success); border-color: var(--success); }

/* ---------- Contenido ---------- */
.content-section { padding: 48px 0; }
.content-section--alt { background: var(--bg-alt); }
.prose { font-size: 1.03rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45em; }
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps li { position: relative; padding: 12px 14px 12px 56px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.steps li::before {
  counter-increment: step; content: counter(step); position: absolute; left: 14px; top: 11px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: .95rem;
}
.features { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.features li { margin: 0; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); border-top: 3px solid var(--accent); }
.features strong { display: block; margin-bottom: 4px; }
.features span { color: var(--muted); font-size: .95rem; }

.faq { display: flex; flex-direction: column; gap: 10px; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.faq__item summary {
  cursor: pointer; padding: 14px 46px 14px 16px; font-weight: 600; position: relative; list-style: none; border-radius: var(--radius-sm);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg); transition: transform .15s;
}
.faq__item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq__item summary:hover { color: var(--primary); }
.faq__answer { padding: 0 16px 6px; color: var(--muted); }

/* ---------- Páginas interiores ---------- */
.page-section { padding: 32px 0 48px; }
.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.page-section .lead { margin-left: 0; text-align: left; }
.breadcrumb a { color: var(--muted); }
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.updated { color: var(--muted); font-size: .92rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
@media (max-width: 520px) { .card { padding: 18px 14px; } }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); }
.notice--warn { background: var(--danger-soft); color: var(--danger); font-weight: 600; }

.email-img { display: inline-block; vertical-align: middle; line-height: 0; }
.email-img img { height: 1.25em; width: auto; }
.email-img__dark { display: none; }
:root[data-theme="dark"] .email-img__light { display: none; }
:root[data-theme="dark"] .email-img__dark { display: inline; }

/* ---------- Formulario ---------- */
.contact-form { margin-top: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-field input[type="text"], .form-field input[type="email"], .form-field select, .form-field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.form-field textarea { resize: vertical; min-height: 140px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.form-field [aria-invalid="true"] { border-color: var(--danger) !important; }
.form-field--check { display: flex; align-items: flex-start; gap: 10px; }
.form-field--check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--primary); flex: none; }
.form-field--check label { font-weight: 400; margin: 0; }
.form-help { display: block; color: var(--muted); font-size: .88rem; margin-top: 6px; }
.form-legal { font-size: .8rem; color: var(--muted); line-height: 1.5; }
.captcha__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.captcha__img { width: 220px; height: 70px; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.captcha input { max-width: 220px; text-transform: uppercase; letter-spacing: .3em; font-weight: 700; }
.form-actions { margin-top: 10px; }
.form-status { margin: 14px 0 0; font-weight: 600; min-height: 1.5em; }
.form-status.is-ok { color: var(--success); background: var(--success-soft); padding: 12px 14px; border-radius: var(--radius-sm); }
.form-status.is-error { color: var(--danger); background: var(--danger-soft); padding: 12px 14px; border-radius: var(--radius-sm); }
.hp-field { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }
.contact-alt { margin-top: 18px; color: var(--muted); }

/* ---------- Publicidad (zonas reservadas, ocultas hasta activarlas) ---------- */
.ad-slot { display: none; }
.ad-slot.is-active { display: block; max-width: 1120px; margin: 18px auto; padding: 0 16px; text-align: center; min-height: 100px; }
.ad-slot.is-active::before { content: "Publicidad"; display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
:lang(en) .ad-slot.is-active::before { content: "Advertisement"; }
:lang(pt) .ad-slot.is-active::before { content: "Publicidade"; }
:lang(de) .ad-slot.is-active::before { content: "Anzeige"; }
:lang(fr) .ad-slot.is-active::before { content: "Publicité"; }
:lang(nl) .ad-slot.is-active::before { content: "Advertentie"; }

/* ---------- Pie ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 32px 0 24px; margin-top: 0; font-size: .93rem; }
.disclaimer { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.disclaimer p { margin: 0; font-size: .88rem; }
.disclaimer__icon { color: var(--accent); width: 24px; height: 24px; margin-top: 1px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; margin: 22px 0 10px; }
.footer-nav, .footer-langs { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.footer-nav a { font-weight: 600; color: var(--text); text-decoration: none; }
.footer-nav a:hover { color: var(--primary); text-decoration: underline; }
.footer-langs { color: var(--muted); gap: 6px 12px; }
.footer-langs a { color: var(--muted); text-decoration: none; }
.footer-langs a:hover, .footer-langs a[aria-current="true"] { color: var(--primary); }
.copyright { color: var(--muted); font-size: .85rem; margin: 10px 0 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; }
.notfound .brand { justify-content: center; margin: 0 auto 10px; }
.notfound__code { font-size: 5rem; font-weight: 800; color: var(--primary); margin: 10px 0; line-height: 1; }
.notfound__list { list-style: none; padding: 0; text-align: left; display: grid; gap: 10px; }
.notfound__list li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }

/* ---------- Impresión: solo la hoja ---------- */
@media print {
  .site-header, .site-footer, .hero, .toolbar, .tool-hint, .tool-actions, .tool-privacy, .result-card, .share-section,
  .content-section, .ad-slot, .btn--add, .item-remove, .logo-drop, .logo-remove { display: none !important; }
  body { background: #fff; }
  .paper { box-shadow: none; padding: 0; max-width: none; }
  .paper input, .paper textarea { border: 0 !important; }
}
