/* =====================================================================
   Herramientas PDF · estilos
   Tipografías alojadas localmente (sin peticiones a terceros).
   ===================================================================== */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/inter-latin-wght-normal.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: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.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: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.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: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  /* Colores de Humanity & Inclusion */
  --hi-blue: #0077C8;
  --hi-blue-dark: #005f9f;
  --hi-cyan: #00a3e0;
  --topbar: var(--hi-blue);
  --brand: #0077C8;
  --brand-2: #0068b0;
  --accent: #0077C8;
  --accent-hover: #005f9f;
  --accent-soft: #e6f2fb;
  --ok: #1f8a4c;
  --ok-soft: #e6f5ec;
  --bg: #f5f7fb;
  --bg-grad: radial-gradient(1200px 440px at 50% -120px, #d7eaf8 0%, rgba(215, 234, 248, 0) 70%);
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #eef1f7;
  --text: #151a26;
  --text-2: #3b4254;
  --muted: #667085;
  --border: #e4e7ee;
  --border-2: #d3d8e3;
  --ring: #7cc0ee;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .14);
  --radius: 16px;
  --radius-sm: 10px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Manrope", "Inter", system-ui, sans-serif;
  --tc: var(--accent);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #6fb8ee; --brand-2: #6fb8ee; --topbar: #075a96;
    --accent: #1a86d0; --accent-hover: #2b95e0; --accent-soft: #0f2a40;
    --ok: #4cc38a; --ok-soft: #13301f;
    --bg: #0e131d; --bg-grad: radial-gradient(1200px 420px at 50% -120px, #0d2a45 0%, rgba(13, 42, 69, 0) 70%);
    --surface: #161c28; --surface-2: #1b2230; --surface-3: #232b3b;
    --text: #e8ebf2; --text-2: #c3c9d6; --muted: #98a1b3;
    --border: #262f40; --border-2: #344056; --ring: #5b8ee0;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #6fb8ee; --brand-2: #6fb8ee; --topbar: #075a96;
  --accent: #1a86d0; --accent-hover: #2b95e0; --accent-soft: #0f2a40;
  --ok: #4cc38a; --ok-soft: #13301f;
  --bg: #0e131d; --bg-grad: radial-gradient(1200px 420px at 50% -120px, #0d2a45 0%, rgba(13, 42, 69, 0) 70%);
  --surface: #161c28; --surface-2: #1b2230; --surface-3: #232b3b;
  --text: #e8ebf2; --text-2: #c3c9d6; --muted: #98a1b3;
  --border: #262f40; --border-2: #344056; --ring: #5b8ee0;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); font-size: 16px; color: var(--text); background: var(--bg) var(--bg-grad) no-repeat; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px 56px; }
a { color: var(--brand-2); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.02em; color: var(--text); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin: 0 0 18px; }
h3 { font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
[hidden] { display: none !important; }
.ico, .ui-icon { display: inline-flex; flex: none; }
kbd { font: 600 .75rem/1 var(--sans); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--border-2); border-bottom-width: 2px; background: var(--surface); color: var(--text-2); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, .dropzone:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
@media (max-width: 600px) { main { padding: 0 16px 40px; } }

/* ---------- Barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--topbar); color: #fff; box-shadow: 0 2px 12px rgba(0, 60, 110, .18); }
.topbar-in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 24px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; }
.brand-logo { height: 42px; width: auto; display: block; }
.brand-sep { width: 1px; height: 30px; background: rgba(255, 255, 255, .45); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--display); font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.brand-text small { color: rgba(255, 255, 255, .85); font-size: .8rem; font-weight: 500; }
.spacer { flex: 1; }
.nav { position: relative; margin-left: 10px; }
.nav-btn { display: inline-flex; align-items: center; gap: 8px; font: 600 .92rem var(--sans); color: rgba(255, 255, 255, .92); background: transparent; border: 1px solid transparent; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.nav-btn:hover, .nav-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .16); color: #fff; }
.tools-menu { position: absolute; top: calc(100% + 10px); left: 0; width: min(860px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; z-index: 50; }
.menu-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px 8px; }
.menu-link { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .9rem; }
.menu-link:hover { background: var(--surface-3); }
.menu-ico { display: inline-flex; }
.privacy-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.icon-round { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .12); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-round:hover { background: rgba(255, 255, 255, .24); }
@media (max-width: 900px) { .privacy-pill { display: none; } }
@media (max-width: 700px) {
  .topbar-in { padding: 10px 16px; gap: 8px; }
  .nav { position: static; margin-left: 0; }
  .nav-btn span { display: none; }
  .tools-menu { left: 16px; right: 16px; width: auto; grid-template-columns: 1fr 1fr; max-height: calc(100vh - 90px); overflow: auto; top: 62px; position: fixed; }
}
@media (max-width: 520px) { .brand-sep { display: none; } .brand { gap: 10px; } .brand-logo { height: 36px; } .brand-text strong { font-size: .95rem; } .brand-text small { font-size: .72rem; } }
@media (max-width: 420px) { .tools-menu { grid-template-columns: 1fr; } }

/* ---------- Portada ---------- */
.hero { text-align: center; padding: 56px 0 26px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; font-size: .84rem; font-weight: 600; color: var(--brand-2); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--hi-blue) 22%, transparent); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.35rem); font-weight: 800; margin: 0 auto 16px; max-width: 900px; letter-spacing: -0.035em; }
.hero h1 .hl { background: linear-gradient(90deg, var(--hi-blue), var(--hi-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { max-width: 680px; margin: 0 auto; color: var(--muted); font-size: 1.1rem; }
.search { display: flex; align-items: center; gap: 10px; max-width: 520px; margin: 28px auto 0; padding: 0 16px; height: 54px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: var(--shadow); color: var(--muted); }
.search:focus-within { border-color: var(--ring); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ring) 30%, transparent); }
.search-input { flex: 1; border: 0; outline: 0; background: transparent; font: 500 1rem var(--sans); color: var(--text); min-width: 0; }
.search-input::placeholder { color: var(--muted); }
.tools-section { margin-top: 18px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 22px; }
.chip { font: 600 .88rem var(--sans); padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.chip:hover { border-color: var(--border-2); color: var(--text); }
.chip.active { background: var(--text); color: var(--surface); border-color: var(--text); }
.empty { text-align: center; color: var(--muted); padding: 30px; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tool-card { position: relative; display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px 20px; text-decoration: none; color: var(--text); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; overflow: hidden; }
.tool-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tc); opacity: 0; transition: opacity .18s; }
.tool-card:hover, .tool-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--tc) 35%, var(--border)); }
.tool-card:hover::before, .tool-card:focus-visible::before { opacity: 1; }
.tool-card h3 { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.01em; margin: 14px 0 6px; }
.tool-card p { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.45; }
.tool-icon { display: inline-flex; }
.tool-go { position: absolute; top: 22px; right: 20px; color: var(--tc); opacity: 0; transform: translateX(-6px); transition: opacity .18s, transform .18s; }
.tool-card:hover .tool-go, .tool-card:focus-visible .tool-go { opacity: 1; transform: none; }
.tool-grid.compact { grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .tool-grid.compact { grid-template-columns: 1fr 1fr; } }
.tool-grid.compact .tool-card { padding: 16px; }
.tool-grid.compact .tool-icon svg { width: 42px; height: 42px; }
.tool-grid.compact p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 520px) {
  .tool-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tool-card { padding: 16px 14px; }
  .tool-card p { display: none; }
  .tool-card h3 { font-size: .95rem; margin-top: 10px; }
  .tool-icon svg { width: 44px; height: 44px; }
}

/* Secciones informativas */
.steps-section, .faq-section, .more-tools, .band { margin-top: 64px; }
.steps-section h2, .faq-section h2, .more-tools h2, .band-head h2 { text-align: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.step-num { position: absolute; top: 18px; right: 20px; font: 800 2.2rem/1 var(--display); color: var(--surface-3); }
.step-ico { width: 46px; height: 46px; border-radius: 12px; align-items: center; justify-content: center; color: var(--tc, var(--accent)); background: color-mix(in srgb, var(--tc, var(--accent)) 12%, var(--surface)); }
.step h3 { margin: 16px 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: .93rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.band { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px); padding: 40px 32px; }
.band-head { max-width: 720px; margin: 0 auto 28px; text-align: center; }
.band-head p { color: var(--muted); margin: 0; }
.privacy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.privacy-item h3 { margin: 12px 0 6px; }
.privacy-item p { margin: 0; font-size: .92rem; color: var(--muted); }
.p-ico { width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; color: var(--ok); background: var(--ok-soft); }
@media (max-width: 600px) { .band { padding: 28px 18px; } }

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; padding: 16px 28px 16px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 2px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 0 16px; color: var(--text-2); }

/* ---------- Página de herramienta ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); padding: 18px 0 0; margin: 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs span:last-child { color: var(--text-2); max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-hero { display: flex; align-items: center; gap: 18px; }
.tool-hero-icon { display: inline-flex; flex: none; }
.tool-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; margin: 0 0 6px; }
.tool-hero p { margin: 0; color: var(--muted); font-size: 1.02rem; }
@media (max-width: 600px) { .tool-hero { gap: 12px; margin-top: 12px; } .tool-hero-icon svg { width: 52px; height: 52px; } .tool-hero p { font-size: .92rem; } }

.tool-shell { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow); padding: 14px; }
.dropzone { position: relative; border: 2px dashed color-mix(in srgb, var(--tc) 40%, var(--border-2)); border-radius: var(--radius); background: color-mix(in srgb, var(--tc) 4%, var(--surface)); padding: 44px 20px 34px; text-align: center; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.dropzone:hover { background: color-mix(in srgb, var(--tc) 8%, var(--surface)); }
.dropzone.is-over { background: color-mix(in srgb, var(--tc) 14%, var(--surface)); border-color: var(--tc); transform: scale(1.01); }
.drop-art { display: flex; justify-content: center; margin: 0 auto 18px; filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--tc) 30%, transparent)); }
.drop-hint { margin: 14px 0 0; color: var(--text-2); font-weight: 500; }
.kbd-hint { color: var(--muted); font-weight: 400; }
@media (hover: none) { .kbd-hint { display: none; } }
.formats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.fmt { font-size: .72rem; font-weight: 700; letter-spacing: .04em; padding: 3px 8px; border-radius: 6px; background: var(--surface-3); color: var(--muted); }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 14px 8px 4px; font-size: .86rem; color: var(--muted); }
.trust { display: inline-flex; gap: 7px; align-items: flex-start; }
.trust .ico { margin-top: 2px; }
.trust.ok { color: var(--ok); font-weight: 600; }
.tool-shell .note { margin: 12px 0 0; }
@media (max-width: 600px) { .dropzone { padding: 30px 14px 24px; } .drop-art svg { width: 64px; height: 64px; } .tool-shell { padding: 10px; } }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem var(--sans); padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-xl { font-size: 1.08rem; padding: 15px 28px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; color: var(--brand-2); cursor: pointer; font: inherit; padding: 4px; text-decoration: underline; }
.btn-sm { padding: 6px 11px; font-size: .82rem; border-radius: 8px; }
.icon-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0; color: var(--text); box-shadow: var(--shadow-sm); }
.icon-btn:hover:not(:disabled) { background: var(--surface-3); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.danger:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- Espacio de trabajo ---------- */
.workspace { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; margin-top: 14px; }
.ws-main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; min-height: 460px; min-width: 0; }
.ws-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow: auto; box-shadow: var(--shadow); }
.ws-side-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.ws-side-head span { display: inline-flex; }
.ws-side h2 { margin: 0; font-size: 1.2rem; text-align: left; }
.ws-action { margin-top: 20px; display: grid; gap: 8px; }
.ws-private { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: .78rem; color: var(--ok); margin: 4px 0 0; }
@media (max-width: 880px) {
  .workspace { grid-template-columns: 1fr; }
  .ws-side { position: static; max-height: none; }
  .ws-main { min-height: 0; }
}
.ws-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.ws-toolbar .spacer { flex: 1; }
.ws-wide.workspace { grid-template-columns: 1fr 270px; }
@media (max-width: 880px) { .ws-wide.workspace { grid-template-columns: 1fr; } }

/* Opciones */
.opt-group { margin-bottom: 18px; }
.opt-label { font-weight: 700; font-size: .86rem; margin-bottom: 8px; color: var(--text); }
.choice { display: flex; flex-wrap: wrap; gap: 6px; }
.choice-item { position: relative; cursor: pointer; }
.choice-item input { position: absolute; opacity: 0; pointer-events: none; }
.choice-item span { display: inline-block; padding: 8px 13px; border: 1px solid var(--border); border-radius: 9px; font-size: .86rem; font-weight: 500; background: var(--surface-2); color: var(--text-2); transition: all .12s; }
.choice-item:hover span { border-color: var(--border-2); }
.choice-item input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; box-shadow: inset 0 0 0 1px var(--accent); }
.choice-item input:focus-visible + span { outline: 3px solid var(--ring); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 10px 0; cursor: pointer; color: var(--text-2); }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.check small { display: block; color: var(--muted); font-size: .8rem; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-weight: 700; font-size: .86rem; margin-bottom: 6px; }
.field input[type=text], .field input[type=number], .field select { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); color: var(--text); }
.note { font-size: .84rem; padding: 11px 13px; border-radius: 10px; margin: 12px 0; background: color-mix(in srgb, var(--brand-2) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand-2) 22%, var(--surface)); color: var(--text-2); }
.note-warn { background: color-mix(in srgb, #d99a06 11%, var(--surface)); border-color: color-mix(in srgb, #d99a06 30%, var(--surface)); }
.note-error { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, var(--surface)); color: var(--text); }
.note-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, var(--surface)); }
.note p { margin: 0 0 5px; }
.note p:last-child { margin: 0; }

/* Tarjetas de archivos / páginas */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 14px; }
.file-card { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; text-align: center; user-select: none; transition: box-shadow .15s, border-color .15s; }
.file-card:hover { box-shadow: var(--shadow); }
.file-card.sortable { cursor: grab; }
.file-card.dragging { opacity: .4; }
.file-card.drag-over { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.file-card .thumb { height: 176px; display: flex; align-items: center; justify-content: center; background: var(--surface-3); border-radius: 8px; overflow: hidden; }
.file-card .thumb canvas, .file-card .thumb img { max-width: 100%; max-height: 168px; box-shadow: 0 2px 8px rgba(0,0,0,.18); background: #fff; }
.file-card .name { font-size: .8rem; font-weight: 600; margin-top: 9px; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.file-card .meta { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.card-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.file-card:hover .card-tools, .file-card:focus-within .card-tools { opacity: 1; }
@media (hover: none) { .card-tools { opacity: 1; } }
.order-badge { position: absolute; top: 8px; left: 8px; background: var(--text); color: var(--surface); border-radius: 999px; font-size: .72rem; font-weight: 700; min-width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; padding: 0 7px; z-index: 1; }
.add-card { border: 2px dashed var(--border-2); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 240px; color: var(--muted); cursor: pointer; border-radius: 12px; font: 600 .9rem var(--sans); transition: all .15s; }
.add-card:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.add-card b { font-size: 2rem; line-height: 1; font-weight: 400; }

.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
.page-card { position: relative; border: 2px solid transparent; border-radius: 10px; padding: 8px; background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .12s, background .12s; }
.page-card:hover { border-color: var(--border-2); }
.page-card .thumb { height: 152px; display: flex; align-items: center; justify-content: center; }
.page-card canvas { max-width: 100%; max-height: 152px; box-shadow: 0 2px 6px rgba(0,0,0,.18); background: #fff; }
.page-card .num { font-size: .76rem; font-weight: 600; color: var(--muted); margin-top: 6px; }
.page-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.page-card.selected::after { content: "✓"; position: absolute; top: 6px; right: 8px; background: var(--accent); color: #fff; width: 22px; height: 22px; border-radius: 50%; font-size: .78rem; display: flex; align-items: center; justify-content: center; }
.page-card.in-range { border-color: color-mix(in srgb, var(--brand-2) 55%, transparent); background: color-mix(in srgb, var(--brand-2) 8%, var(--surface)); }
.range-tag { position: absolute; top: 6px; left: 8px; background: var(--brand-2); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 5px; padding: 2px 6px; }

/* ---------- Resultado ---------- */
.result { text-align: center; max-width: 680px; margin: 34px auto 0; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px); padding: 40px 26px 30px; box-shadow: var(--shadow); }
.result-check { width: 70px; height: 70px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.result h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; margin: 4px 0 10px; }
.result-note { color: var(--muted); margin: 0 0 16px; }
.btn-download { margin-top: 10px; padding: 16px 30px; font-size: 1.12rem; }
.btn-download span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn-download small { font-weight: 500; font-size: .78rem; opacity: .85; }
.result-file { margin: 10px 0 0; font-size: .84rem; color: var(--muted); word-break: break-all; }
.result-auto { font-size: .78rem; color: var(--muted); margin: 14px 0 0; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.result-list { text-align: left; margin: 16px auto 0; max-width: 480px; font-size: .88rem; }
.result-list summary { cursor: pointer; color: var(--brand-2); font-weight: 600; text-align: center; }
.result-list ul { max-height: 260px; overflow: auto; padding: 0; list-style: none; margin: 10px 0 0; border: 1px solid var(--border); border-radius: 10px; }
.result-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--border); }
.result-list li:last-child { border-bottom: 0; }
.result-list li span { color: var(--muted); white-space: nowrap; }
.stat-row { display: flex; justify-content: center; gap: 10px; margin: 8px 0 18px; flex-wrap: wrap; }
.stat { text-align: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 18px; min-width: 120px; }
.stat b { display: block; font-family: var(--display); font-size: 1.35rem; }
.stat span { font-size: .78rem; color: var(--muted); }

/* ---------- Progreso ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 14, 24, .5); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 100; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.overlay-box { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px 30px 20px; width: min(400px, 90vw); text-align: center; box-shadow: var(--shadow-lg); }
.overlay-text { margin: 14px 0 12px; font-weight: 700; }
.overlay-sub { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 14px 0 0; font-size: .78rem; color: var(--ok); }
.spinner { width: 42px; height: 42px; margin: 0 auto; border: 4px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--hi-blue), var(--hi-cyan)); border-radius: 999px; transition: width .25s; }
.bar-fill.indeterminate { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- Avisos ---------- */
.toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: #1b2130; color: #fff; padding: 13px 38px 13px 15px; border-radius: 12px; font-size: .9rem; position: relative; box-shadow: var(--shadow-lg); animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateY(10px); opacity: 0; } }
.toast-error { background: #a3262b; }
.toast-warn { background: #7a5800; }
.toast-close { position: absolute; top: 7px; right: 9px; background: none; border: none; color: #fff; font-size: 1.15rem; cursor: pointer; opacity: .8; }

/* ---------- Pie ---------- */
.footer { background: var(--surface); font-size: .82rem; color: var(--muted); margin-top: 64px; }
.footer-in { max-width: 1200px; margin: 0 auto; padding: 22px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; }
.footer p { margin: 0; }
.footer a { color: var(--text-2); }
.footer-brand { background: var(--topbar); color: rgba(255, 255, 255, .88); }
.footer-brand .footer-in { justify-content: flex-start; gap: 22px; padding-top: 28px; padding-bottom: 28px; }
.footer-brand img { height: 96px; width: auto; }
.footer-brand p { font-size: .9rem; max-width: 620px; }
.footer-brand .footer-title { color: #fff; font-size: 1.05rem; margin-bottom: 4px; font-family: var(--display); }
.footer-meta { border-top: 1px solid var(--border); }
@media (max-width: 600px) { .footer-brand .footer-in { flex-direction: column; align-items: flex-start; } }

/* ---------- Página de privacidad ---------- */
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 18px 0 10px; }
.doc h2 { font-size: 1.2rem; margin: 30px 0 8px; }
.doc p { color: var(--text-2); }
.doc .lead { font-size: 1.1rem; color: var(--muted); }

/* Área oculta para renderizar documentos antes de convertirlos */
.render-stage { position: fixed; left: -100000px; top: 0; background: #fff; color: #000; }

/* ---------- Editor ---------- */
.editor-toolbar { position: sticky; top: 66px; z-index: 10; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px; margin-bottom: 16px; box-shadow: var(--shadow); }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--text); cursor: pointer; font: 500 .84rem var(--sans); }
.tool-btn:hover:not(:disabled) { border-color: var(--border-2); }
.tool-btn:disabled { opacity: .45; }
.tool-btn.active { background: color-mix(in srgb, #8e4ec6 14%, var(--surface)); border-color: #8e4ec6; color: #8e4ec6; font-weight: 700; }
.editor-toolbar .sep { width: 1px; height: 26px; background: var(--border); margin: 0 4px; }
.editor-toolbar label { font-size: .8rem; display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }
.editor-toolbar input[type=color] { width: 32px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 7px; background: none; }
.editor-toolbar select, .editor-toolbar input[type=number] { font: inherit; font-size: .82rem; padding: 5px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); }
.editor-toolbar input[type=number] { width: 58px; }
.editor-pages { display: flex; flex-direction: column; align-items: center; gap: 26px; overflow-x: auto; padding: 6px 0 20px; background: var(--surface-3); border-radius: 12px; }
.editor-page { position: relative; box-shadow: 0 3px 14px rgba(0,0,0,.18); background: #fff; flex: none; margin-top: 14px; }
.editor-page canvas { display: block; }
.editor-layer { position: absolute; inset: 0; overflow: hidden; }
.editor-layer.mode-whiteout, .editor-layer.mode-text, .editor-layer.mode-rect, .editor-layer.mode-ellipse, .editor-layer.mode-highlight, .editor-layer.mode-line { cursor: crosshair; }
.editor-layer.mode-draw { cursor: crosshair; touch-action: none; }
.editor-page-num { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: .72rem; color: var(--muted); }
.ed-obj { position: absolute; box-sizing: border-box; cursor: move; touch-action: none; }
.ed-obj.selected { outline: 2px dashed #8e4ec6; outline-offset: 2px; }
.ed-obj.t-text { white-space: pre; line-height: 1.2; min-width: 10px; padding: 0; }
.ed-obj.t-text[contenteditable=true] { cursor: text; outline: 2px solid #8e4ec6; }
.ed-obj.t-image img { width: 100%; height: 100%; display: block; pointer-events: none; }
.ed-obj svg { width: 100%; height: 100%; display: block; overflow: visible; pointer-events: none; }
.ed-handle { position: absolute; right: -7px; bottom: -7px; width: 13px; height: 13px; background: #8e4ec6; border: 2px solid #fff; border-radius: 4px; cursor: nwse-resize; display: none; }
.ed-obj.selected .ed-handle { display: block; }
.ed-obj.t-text .ed-handle { display: none !important; }
@media (max-width: 1100px) { .tb-label { display: none; } }

/* Movimiento reducido: solo se desactivan los efectos de desplazamiento */
@media (prefers-reduced-motion: reduce) {
  .tool-card, .tool-card:hover, .dropzone.is-over { transform: none; }
  .result-check, .overlay, .toast { animation: none; }
}

/* Página de herramienta: columna centrada y legible */
.tool-hero, .tool-shell, .tool-page > .steps-section, .tool-page > .faq-section, .tool-page > .more-tools { max-width: 960px; margin-left: auto; margin-right: auto; }
.tool-hero { margin-top: 22px; margin-bottom: 22px; }
