:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f2f2f4;
  --text: #141418;
  --muted: #62626e;
  --border: #e4e4ea;
  --on-accent: #ffffff;
  --error: #c0362c;
  --ok: #1f8a4c;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f12;
    --surface: #18181d;
    --surface-2: #222229;
    --text: #ededf2;
    --muted: #a0a0ad;
    --border: #2d2d36;
    --on-accent: #0f0f12;
    --error: #ff7a6e;
    --ok: #5fd08f;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* Barra superior */
.topbar { border-bottom: 1px solid var(--border); background: var(--surface); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-tagline { font-size: 0.72rem; font-weight: 500; color: var(--muted); }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent); color: var(--on-accent); }
.topnav { display: flex; gap: 18px; }
.topnav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.topnav a:hover { color: var(--text); }
@media (max-width: 640px) {
  .topnav { gap: 14px; }
  .topnav .hide-sm { display: none; }
  .topnav a { font-size: 0.9rem; font-weight: 600; color: var(--text); }
}
@media (max-width: 360px) { .logo-tagline { display: none; } }

/* Portada */
.hero { padding: 48px 0 32px; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 6vw, 2.7rem); margin: 0 0 12px; }
.hero .lead { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin: 0 auto 28px; }

.tool {
  max-width: 640px; margin: 0 auto; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}
.input-row { display: flex; gap: 8px; }
.input-wrap { position: relative; flex: 1; }
.input-wrap input {
  width: 100%; height: 52px; padding: 0 84px 0 14px; font-size: 1rem;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text);
}
.input-wrap input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.paste-btn {
  position: absolute; right: 6px; top: 6px; height: 40px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  color: var(--text); font-size: 0.9rem; cursor: pointer;
}
.btn-primary {
  height: 52px; padding: 0 22px; border: 0; border-radius: 10px;
  background: var(--accent); color: var(--on-accent);
  font-size: 1rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
@media (max-width: 560px) {
  .input-row { flex-direction: column; }
  .btn-primary { width: 100%; }
}

.modes { display: flex; gap: 6px; margin-top: 12px; }
.mode {
  flex: 1; height: 40px; border: 1px solid var(--border); border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 0.92rem; cursor: pointer;
}
.mode[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 600; background: var(--surface-2); }

.status { margin-top: 14px; min-height: 0; }
.status:empty { display: none; }
.status.error { color: var(--error); }
.status.ok { color: var(--ok); }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.6s ease; }

.trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--muted); font-size: 0.9rem; }
.trust span::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* Secciones */
.section { padding: 40px 0; border-top: 1px solid var(--border); }
.section h2 { font-size: 1.6rem; margin: 0 0 20px; text-align: center; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 10px;
  border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700;
}
.steps h3 { margin: 0 0 6px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.feature h3 { margin: 0 0 4px; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.faq { max-width: 720px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

.guide-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.guide-links a {
  display: block; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600;
}
.guide-links a:hover { border-color: var(--accent); }
.more-link { text-align: center; margin: 18px 0 0; font-weight: 600; }
.about { max-width: 720px; }
.about p { color: var(--muted); margin: 0 0 14px; }

/* Páginas de texto (guías y legal) */
.article { max-width: 720px; margin: 0 auto; padding: 36px 16px 48px; }
.article h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); margin: 0 0 12px; }
.article h2 { font-size: 1.3rem; margin: 32px 0 8px; }
.article p, .article li { color: var(--text); }
.article .meta { color: var(--muted); font-size: 0.9rem; }
.article .byline { color: var(--muted); font-size: 0.88rem; margin: -4px 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.article .cta {
  display: inline-block; margin-top: 8px; padding: 12px 20px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none;
}
.pending { background: #fff3c4; color: #5c4400; padding: 0 4px; border-radius: 4px; }

/* Pie */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 32px 0 24px; margin-top: 24px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.footer-brand { font-weight: 700; margin: 0 0 4px; }
.footer-title { font-weight: 600; margin: 0 0 6px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 4px 0; }
.footer li a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.footer li a:hover { color: var(--text); }
.disclaimer { color: var(--muted); font-size: 0.82rem; margin: 24px 0 6px; }
