:root {
  --paper: #f3efe6;
  --card: #fffdf8;
  --ink: #1c1915;
  --muted: #5e574e;
  --line: #e3dacb;
  --red: #9d1c2b;
  --navy: #17355c;
  --navy-2: #24548f;
  --good: #e7f2ea;
  --warn: #fff6e8;
  --bad: #fdecea;
  --shadow: 0 16px 40px rgba(28, 25, 21, 0.06);
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(157, 28, 43, 0.08), transparent 180px),
    var(--paper);
  color: var(--ink);
  line-height: 1.55;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy-2); }
a:hover { color: var(--red); }
:focus-visible {
  outline: 3px solid var(--navy-2);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 12px; }

.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(243, 239, 230, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}
.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--red);
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
}
.nav {
  display: flex;
  gap: 6px 14px;
  flex-wrap: wrap;
  margin-left: auto;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}
.nav a[aria-current="page"] { color: var(--red); font-weight: 700; }

.hero { padding: 28px 0 8px; }
.kicker {
  margin: 0 0 8px;
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
h1 {
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  font-weight: 650;
}
.lead { font-size: 1.08rem; max-width: 68ch; margin: 0 0 8px; }
.updated { color: var(--muted); font-size: 0.92rem; margin: 0 0 8px; }

.tool {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 18px 0 28px;
}
.tool h2 { margin-top: 0; }
.price { margin-top: 0; }
.docs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 0 0 14px;
}
.docs legend { font-weight: 700; width: 100%; margin-bottom: 4px; }
.docs label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  min-height: 44px;
}
.drop {
  border: 1.5px dashed #c8bba6;
  border-radius: 14px;
  padding: 18px;
  background: #faf7f1;
  text-align: center;
}
.drop.is-over { border-color: var(--navy); background: #eef3f8; }
.drop p { margin: 0 0 12px; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.btn, button.btn {
  appearance: none;
  border: 0;
  background: var(--navy);
  color: white;
  border-radius: 999px;
  min-height: 44px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-secondary { background: white; color: var(--navy); border: 1px solid var(--navy); }
.btn-ghost { background: white; color: var(--ink); border: 1px solid var(--line); }
button.btn:disabled { opacity: 0.6; cursor: progress; }
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
#estado {
  min-height: 1.4em;
  font-weight: 650;
}
.preview, .result-img {
  display: block;
  margin: 8px auto;
  max-height: 420px;
  background: white;
  box-shadow: var(--shadow);
}
.result-img { background: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.notice {
  background: var(--warn);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
}
.notice-bad { background: var(--bad); }
.notice-title { margin: 0 0 6px; font-weight: 700; }
.notice ul { margin: 0; padding-left: 18px; }
.privacy-note { color: var(--muted); font-size: 0.92rem; }

dialog {
  border: 0;
  border-radius: 16px;
  padding: 16px;
  width: min(520px, calc(100% - 24px));
}
dialog::backdrop { background: rgba(28, 25, 21, 0.55); }
video { width: 100%; background: #111; border-radius: 12px; }

.prose { max-width: 72ch; padding-bottom: 28px; }
.prose h2 {
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 1.6em 0 0.4em;
}
.prose h3 { font-size: 1.05rem; margin: 1.1em 0 0.25em; }
.qa { border-top: 1px solid var(--line); padding-top: 8px; }
.source-list { padding-left: 18px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--card);
}
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: #f7f1e6; }
.callout {
  background: var(--card);
  border-left: 4px solid var(--red);
  padding: 12px 14px;
  margin: 16px 0;
}
ol.steps { padding-left: 20px; }
ol.steps li { margin: 0.7em 0; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  gap: 18px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 0; margin: 0; list-style: none; }
.footer-links a { color: var(--ink); }

@media (min-width: 800px) {
  .tool-grid { display: grid; grid-template-columns: 1fr 0.9fr; gap: 18px; align-items: start; }
  .footer-grid { grid-template-columns: 1.4fr 1fr; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .nav-mobile { display: flex; }
}
.nav-mobile { display: none; }
@media (max-width: 640px) {
  .nav-mobile {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 0 10px;
    margin: 0;
    list-style: none;
  }
  .nav-mobile a { white-space: nowrap; color: var(--ink); text-decoration: none; font-size: 0.92rem; }
}
