:root {
  --ink: #0f172a; --soft: #475569; --bg: #f6f8fb; --paper: #fff; --line: #e2e8f0;
  --brand: #0f766e; --brand-dark: #115e59; --brand-soft: #ccfbf1;
  --pdf: #dc2626; --pdf-soft: #fee2e2; --img: #2563eb; --img-soft: #dbeafe;
  --good: #15803d; --bad: #b91c1c; --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--font); }
a { color: var(--brand-dark); text-underline-offset: 2px; }
img, svg, canvas { max-width: 100%; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: clamp(1.8rem, 4.4vw, 2.6rem); margin: .2em 0 .3em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.65rem); margin: 1.9em 0 .5em; }
h3 { font-size: 1.12rem; margin: 1.4em 0 .4em; }
p, ul, ol { margin: 0 0 1em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 62px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo b { color: var(--brand); }
.site-nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.site-nav a, .dd > button { text-decoration: none; color: var(--ink); font: inherit; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 8px; background: none; border: 0; cursor: pointer; }
.site-nav a:hover, .dd > button:hover, .site-nav a[aria-current=page] { background: var(--brand-soft); color: var(--brand-dark); }
.dd { position: relative; }
.dd .menu { display: none; position: absolute; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; min-width: 240px; }
.dd:hover .menu, .dd:focus-within .menu { display: block; }
.dd .menu a { display: block; }
.menu-toggle { display: none; margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .site-nav.open { display: flex; }
  .dd > button { display: none; }
  .dd .menu { display: block; position: static; border: 0; box-shadow: none; padding: 0; min-width: 0; }
  .dd .menu .label { margin-top: 8px; }
}
.menu .label { display: block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); padding: 6px 12px 2px; }

.hero { background: linear-gradient(180deg, #e6fffb, var(--bg)); border-bottom: 1px solid var(--line); text-align: center; }
.hero .wrap { padding-top: 44px; padding-bottom: 36px; }
.hero p { font-size: 1.15rem; color: var(--soft); max-width: 40em; margin: 0 auto 1em; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: .92rem; color: var(--soft); list-style: none; padding: 0; margin: 0; }
.badges li::before { content: "✓ "; color: var(--good); font-weight: 800; }

.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0 0 8px; }
.tcard { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start; }
.tcard:hover { border-color: #94a3b8; transform: translateY(-1px); }
.tcard .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: .78rem; }
.tcard.pdf .ico { background: var(--pdf-soft); color: var(--pdf); }
.tcard.img .ico { background: var(--img-soft); color: var(--img); }
.tcard h3 { margin: 0 0 .2em; font-size: 1.05rem; }
.tcard h3 a { color: var(--ink); text-decoration: none; }
.tcard h3 a::after { content: ""; position: absolute; inset: 0; }
.tcard p { margin: 0; color: var(--soft); font-size: .92rem; line-height: 1.45; }

.crumbs { font-size: .86rem; color: var(--soft); margin-top: 16px; }
.crumbs a { color: var(--soft); }
.page-head { text-align: center; padding: 6px 0 4px; }
.page-head .lede { color: var(--soft); font-size: 1.1rem; max-width: 40em; margin: 0 auto .6em; }

/* herramienta */
.tool { max-width: 860px; margin: 18px auto 10px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: var(--paper); border: 2.5px dashed #94a3b8; border-radius: 18px; padding: 42px 20px; cursor: pointer; transition: background .15s, border-color .15s; }
.drop:hover, .drop.over { border-color: var(--brand); background: #f0fdfa; }
.drop strong { display: inline-block; background: var(--brand); color: #fff; padding: 13px 26px; border-radius: 999px; font-size: 1.08rem; }
.drop:hover strong { background: var(--brand-dark); }
.drop-icon { width: 48px; height: 48px; color: var(--brand); }
.drop-sub { color: var(--soft); }
.drop-priv { font-size: .85rem; color: var(--good); font-weight: 600; margin-top: 6px; }
.work { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-top: 14px; }
.opts { display: grid; gap: 12px; margin-bottom: 12px; }
.opts:empty { display: none; }
.grid2, .grid3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-weight: 600; font-size: .93rem; }
.field input[type=number], .field input[type=text], .field select { font: inherit; font-size: 1rem; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.field input.invalid { border-color: var(--bad); }
.field input[type=range] { width: 100%; accent-color: var(--brand); }
.field input[type=color] { width: 64px; height: 40px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.field output { color: var(--brand-dark); font-weight: 800; }
.help { font-size: .85rem; color: var(--soft); margin: 0; }
.check { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; font-size: .93rem; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .9rem; color: var(--soft); }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .88rem; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--brand); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 12px; }
.bar:empty { display: none; }
.status { margin: 0; font-weight: 600; }
.status.ok { color: var(--ink); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { border: 0; border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 700; cursor: pointer; background: var(--brand); color: #fff; }
.btn:hover { background: var(--brand-dark); }
.btn:disabled { background: #94a3b8; cursor: not-allowed; }
.btn.primary { background: #ea580c; }
.btn.primary:hover { background: #c2410c; }
.btn.primary:disabled { background: #94a3b8; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: #94a3b8; }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.icon { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 36px; height: 36px; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.icon:disabled { opacity: .35; cursor: default; }
.results { list-style: none; padding: 0; margin: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #f1f5f9; flex: none; display: grid; place-items: center; font-weight: 800; }
.thumb.pdf { background: var(--pdf-soft); color: var(--pdf); font-size: .8rem; }
.thumb.err { background: #fee2e2; color: var(--bad); }
.info { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .9rem; color: var(--soft); }
.info strong { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.good { color: var(--good); font-weight: 700; }
.bad { color: var(--bad); }
.muted { color: var(--soft); }
.item-btns { display: flex; gap: 6px; align-items: center; flex: none; }
@media (max-width: 480px) { .item { flex-wrap: wrap; } .item-btns { width: 100%; justify-content: flex-end; } }
.pages { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.page { background: #f8fafc; border: 2px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.page .ph { width: 100%; aspect-ratio: 3 / 4; display: grid; place-items: center; transition: transform .2s; }
.page canvas { box-shadow: 0 1px 4px rgba(0, 0, 0, .15); background: #fff; max-height: 100%; }
.page .num { font-size: .8rem; color: var(--soft); }
.page[role=button] { cursor: pointer; }
.page.gone { border-color: var(--bad); background: #fef2f2; }
.page.gone .ph { opacity: .35; }
.page.gone::after { content: "✕"; position: absolute; top: 6px; right: 8px; color: #fff; background: var(--bad); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; }
.rot-btns { display: flex; gap: 6px; }
.spin { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.crop-frame { position: relative; display: inline-block; max-width: 100%; touch-action: none; user-select: none; line-height: 0; }
.crop-frame img { max-width: 100%; max-height: 70vh; display: block; }
.crop-area { text-align: center; margin-bottom: 12px; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(15, 23, 42, .55); outline: 1px solid rgba(0, 0, 0, .4); cursor: move; touch-action: none; }
.crop-box .h { position: absolute; width: 22px; height: 22px; background: #fff; border: 2px solid var(--brand); border-radius: 50%; }
.crop-box .nw { left: -11px; top: -11px; cursor: nwse-resize; } .crop-box .ne { right: -11px; top: -11px; cursor: nesw-resize; }
.crop-box .sw { left: -11px; bottom: -11px; cursor: nesw-resize; } .crop-box .se { right: -11px; bottom: -11px; cursor: nwse-resize; }
.crop-frame { overflow: hidden; border-radius: 6px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 600; z-index: 99; max-width: calc(100vw - 32px); text-align: center; }
.toast.bad { background: var(--bad); }
.noscript { background: #fef3c7; padding: 14px; border-radius: 12px; }

.content { max-width: 760px; margin: 0 auto; }
.steps { list-style: none; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 16px 56px; position: relative; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; display: grid; place-items: center; }
.content table { border-collapse: collapse; width: 100%; background: #fff; font-size: .95rem; margin-bottom: 1.2em; }
.content th, .content td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
.content thead th { background: #f1f5f9; font-size: .88rem; }
.table-scroll { overflow-x: auto; }
.callout { background: #ecfdf5; border-left: 4px solid var(--good); border-radius: 0 10px 10px 0; padding: 12px 16px; margin: 1.2em 0; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 13px 0; }
.related { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.related a { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; text-decoration: none; font-weight: 600; font-size: .94rem; }
main { padding-bottom: 40px; }
.site-footer { background: var(--ink); color: #cbd5e1; padding: 30px 0; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; }
.site-footer p { margin: 0 0 6px; }
