/* =============================================================
   1. Tokens — monocromo cálido, estética editorial minimalista
   ============================================================= */
:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #787774;
  --line: #eaeaea;
  --accent: #111111;
  --accent-soft: #f1f0ed;
  --accent-ink: #ffffff;
  --pastel-green-bg: #edf3ec;
  --pastel-green-tx: #346538;
  --warn: #956400;
  --danger: #9f2f2d;
  --radius: 10px;
  --sans: "Instrument Sans", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131311;
    --surface: #1b1b1a;
    --ink: #ededea;
    --muted: #a3a39e;
    --line: #2a2a28;
    --accent: #fafaf8;
    --accent-soft: #262624;
    --accent-ink: #111111;
    --pastel-green-bg: #1e2b1e;
    --pastel-green-tx: #9cc184;
    --warn: #d6a94c;
    --danger: #e39b9b;
  }
}
/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background: var(--bg); color: var(--ink); overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.1; letter-spacing: -0.02em; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--ink); color: var(--bg); z-index: 9999; border-radius: 6px; }
.skip-link:focus { top: 1rem; }
/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: min(880px, 100% - 2.5rem); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* =============================================================
   4. Header / hero
   ============================================================= */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: .9rem 0; gap: .6rem 1rem; }
.logo { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; letter-spacing: -0.02em; text-decoration: none; }
.logo-dot { color: var(--muted); }
.logo-md { font-family: var(--mono); font-size: .68rem; font-weight: 500; background: var(--accent-soft); color: var(--ink); border: 1px solid var(--line); border-radius: 9999px; padding: .15rem .55rem; vertical-align: middle; margin-left: .45rem; letter-spacing: .05em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-size: .92rem; }
@media (max-width: 560px) {
  .site-header nav { font-size: .88rem; gap: .3rem .9rem; }
  .logo { font-size: 1.2rem; }
}
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--ink); }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 5.4vw, 3.4rem); letter-spacing: -0.03em; margin: 2.2rem 0 .6rem; }
.subtitle { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.4rem; max-width: 62ch; }
.subtitle strong { color: var(--ink); font-weight: 600; }
/* =============================================================
   5. Tool card
   ============================================================= */
.tool-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
@media (prefers-reduced-motion: no-preference) {
  .tool-card { animation: rise .5s var(--ease-out) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
.dropzone { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; border: 1px dashed var(--line); border-radius: 8px; padding: 2rem 1rem; cursor: pointer; color: var(--ink); transition: border-color .2s var(--ease-out), background .2s var(--ease-out); }
.dropzone:hover, .dropzone.is-over, .dropzone:focus-visible, .dropzone:focus-within { border-color: var(--ink); background: var(--accent-soft); }
.drop-title { font-weight: 600; }
.drop-title .link { text-decoration: underline; text-underline-offset: 3px; }
.drop-sub { font-size: .85rem; color: var(--muted); max-width: 60ch; }
.tool-options { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: .9rem 0 .2rem; font-size: .9rem; color: var(--muted); }
.check { display: flex; gap: .45rem; align-items: center; }
.check input { accent-color: var(--ink); }
.state { display: none; margin-top: .8rem; }
.tool-card[data-state="loading"] .state-loading { display: block; }
.tool-card[data-state="error"] .state-error { display: block; }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: var(--ink); transition: width .25s var(--ease-out); }
.state-loading p { font-size: .9rem; color: var(--muted); margin-top: .4rem; }
.state-error p { color: var(--danger); margin-bottom: .5rem; }
.file-list { display: flex; flex-direction: column; gap: .7rem; margin-top: .8rem; }
.file-item { border: 1px solid var(--line); border-radius: 8px; padding: .8rem .9rem; transition: box-shadow .2s var(--ease-out); }
.file-item:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .04); }
.file-item header { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-meta { font-size: .82rem; color: var(--muted); font-family: var(--mono); }
.file-preview { font-size: .82rem; font-family: var(--mono); background: var(--accent-soft); border: 1px solid var(--line); border-radius: 6px; padding: .6rem .7rem; margin-top: .5rem; max-height: 9rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.file-warn { font-size: .82rem; color: var(--warn); margin-top: .35rem; }
.file-row-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .6rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 6px; padding: .65rem 1.1rem; font-weight: 600; font-size: .92rem; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(.92); }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { background: var(--accent-soft); }
.tool-actions { display: flex; gap: .6rem; margin-top: .9rem; flex-wrap: wrap; }
.noscript-note { margin-top: .7rem; font-size: .9rem; color: var(--warn); }
.privacy-line { margin: 1rem 0 1.2rem; font-size: .92rem; color: var(--muted); }
.lock-icon { display: inline-block; vertical-align: -2px; color: var(--muted); }
.local-badge { display: inline-block; font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; background: var(--pastel-green-bg); color: var(--pastel-green-tx); border-radius: 9999px; padding: .2rem .6rem; margin-inline: .2rem; white-space: nowrap; }
/* =============================================================
   6. Ads / SEO / footer
   ============================================================= */
.ad-slot { border: 1px dashed var(--line); border-radius: 8px; min-height: 90px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem; margin: 1rem 0; background: var(--surface); }
.seo-block { margin: 2.4rem 0; }
.seo-block h2 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; letter-spacing: -0.02em; margin-bottom: .7rem; }
.seo-block p { margin-bottom: .7rem; color: var(--ink); opacity: .82; max-width: 68ch; }
.steps { padding-left: 1.2rem; display: grid; gap: .4rem; color: var(--ink); opacity: .82; max-width: 68ch; }
details { border-bottom: 1px solid var(--line); padding: .8rem 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: baseline; gap: .6rem; min-height: 44px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; font-family: var(--mono); font-weight: 500; color: var(--muted); flex: none; width: 1.2em; }
details[open] summary::before { content: "–"; }
details p { margin-top: .4rem; color: var(--ink); opacity: .82; font-size: .95rem; }
.more-grid { display: grid; gap: .6rem; }
.more-grid a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; text-decoration: none; transition: box-shadow .2s var(--ease-out); }
.more-grid a:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .04); }
.more-grid strong { display: block; }
.more-grid span { font-size: .88rem; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); margin-top: 2.5rem; padding: 1.6rem 0 2.2rem; color: var(--muted); font-size: .9rem; }
.site-footer a { color: var(--ink); }
/* =============================================================
   7. Responsive
   ============================================================= */
@media (min-width: 720px) { .more-grid { grid-template-columns: 1fr 1fr 1fr; } }
/* =============================================================
   8. Reduced motion
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .btn:active { transform: none; }
}
