/* ver-cual-es-mi-ip.com — hoja de estilos única
   Modo oscuro fijo, tipografía del sistema (como cual-es-mi-ip.net) y medidas fluidas con clamp() y max().
   Si en el futuro se añade modo claro, basta con redefinir estos tokens bajo [data-theme="light"]. */

:root {
  color-scheme: dark;

  --bg: #13171f;
  --surface: #161a22;
  --surface-2: #1c212c;
  --line: #262d3b;
  --line-strong: #2f3748;
  --ink: #f0f1f3;
  --ink-2: #c2c7d0;
  --muted: #8a93a5;
  --accent: #0172ad;
  --accent-hover: #01649a;
  --accent-ink: #01aaff;
  --accent-soft: rgba(1, 114, 173, .16);
  --accent-line: rgba(1, 170, 255, .35);
  --ip: #79c0ff;
  --warn: #f2b35e;
  --warn-soft: #2a2010;
  --warn-line: #5a4420;
  --error: #ff8a80;
  --error-soft: #2b1515;
  --card: #181c25;
  --card-top: #181c25;
  --field: #1c212c;
  --header-bg: rgba(19, 23, 31, .9);
  --on-ink: #13171f;
  --ink-hover: #ffffff;
  --icon-muted: #6f788b;
  --faint: #6f788b;
  --info-ink: #b8dcf5;
  --warn-ink: #f6d29f;
  --error-line: #5c2727;
  --skel-mid: #252c3a;
  --dot-warn: #f2a33a;
  --cta-a: #172433;
  --cta-b: #181c25;
  --glow-a: transparent;
  --glow-b: transparent;

  --font: system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, Helvetica, Arial, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --mono: "Courier New", Courier, monospace;

  --radius: 8px;
  --radius-sm: 6px;
  --radius-btn: 4px;
  --shadow: 0 1px 2px rgba(7, 9, 12, .2), 0 8px 24px -12px rgba(7, 9, 12, .5);
  --shadow-lg: rgba(7, 9, 12, .016) 0 .5px 3px, rgba(7, 9, 12, .03) 0 2px 12px, rgba(7, 9, 12, .06) 0 16px 96px, rgba(7, 9, 12, .016) 0 0 0 1px;

  --gutter: max(16px, 4vw);
  --wrap: 1180px;
  --prose: 760px;
  --section: max(64px, 7vw);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(16px, 0.95rem + 0.15vw, 17.5px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
code, kbd, pre { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: .08em .38em; border-radius: 6px; }
kbd { background: var(--card); border: 1px solid var(--line-strong); border-bottom-width: 2px; padding: .05em .4em; border-radius: 6px; font-size: .85em; }
strong { font-weight: 600; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--on-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; margin-inline: auto; padding-inline: 16px; }
/* Mismos anchos de contenedor que cual-es-mi-ip.net */
@media (min-width: 576px) { .wrap { max-width: 510px; padding-inline: 0; } }
@media (min-width: 768px) { .wrap { max-width: 700px; } }
@media (min-width: 1024px) { .wrap { max-width: 950px; } }
@media (min-width: 1280px) { .wrap { max-width: 1200px; } }
@media (min-width: 1536px) { .wrap { max-width: 1450px; } }

/* Contenido central: 1040 px en escritorio (la cabecera mantiene 1200 px) */
@media (min-width: 1024px) { main .wrap { max-width: 950px; } }
@media (min-width: 1280px) { main .wrap { max-width: 1040px; } }
.layout-main { min-width: 0; }

/* Bloques de contenido como tarjetas */
.component { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-btn); padding: max(20px, 2.2vw); box-shadow: var(--shadow-lg); }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; gap: 12px 16px; min-height: 64px; padding-block: 10px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { font-weight: 700; color: var(--accent-ink); }
.brand span { font-size: 17px; }

/* Botones de herramientas */
.toolbar { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 8px 12px; border-radius: var(--radius-btn);
  border: 1px solid var(--accent); background: var(--accent);
  color: #fff; text-decoration: none; font-size: 15px; font-weight: 400; line-height: 1.2; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.pill svg { width: 15px; height: 15px; color: #fff; flex: none; opacity: .9; }
.pill:hover { border-color: var(--accent-hover); background: var(--accent-hover); color: #fff; }
.pill:active { transform: translateY(1px); }
.pill[aria-current="page"] { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--on-ink); font-weight: 600; }
.pill[aria-current="page"] svg { color: var(--on-ink); opacity: 1; }

/* Pantallas medianas y móviles: los botones bajan a una fila desplazable */
@media (max-width: 1279px) {
  .head-row { flex-wrap: wrap; padding-bottom: 0; }
  .toolbar {
    order: 3; flex: 1 0 100%; padding: 4px 0 12px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .toolbar::-webkit-scrollbar { display: none; }
}

/* ---------- Héroe y herramienta principal ---------- */
.hero { position: relative; padding-block: max(20px, 2.4vw) max(8px, 1vw); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -120px 0 auto 0; height: 620px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 55% at 22% 30%, var(--glow-a), transparent 70%),
    radial-gradient(35% 50% at 82% 20%, var(--glow-b), transparent 70%);
}
.hero-head { text-align: center; max-width: 820px; margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 5px 12px; border-radius: 999px; margin: 0 0 18px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-ink); }

h1, h2, h3 { color: var(--ink); letter-spacing: -.025em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.5rem + 3vw, 4.1rem); font-weight: 650; margin: 0 0 16px; }
h2 { font-size: clamp(1.65rem, 1.25rem + 1.4vw, 2.4rem); font-weight: 620; margin: 0 0 18px; }
h3 { font-size: clamp(1.15rem, 1.05rem + .4vw, 1.35rem); font-weight: 600; margin: 34px 0 10px; letter-spacing: -.015em; }
.lead { font-size: clamp(1.06rem, .98rem + .35vw, 1.25rem); color: var(--muted); margin: 0 auto; max-width: 680px; text-wrap: pretty; }

.ip-card {
  margin-top: max(32px, 3vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.ip-main { padding: max(26px, 3vw) max(20px, 3vw) max(22px, 2.4vw); text-align: center; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--card-top) 0%, var(--card) 100%); }
.ip-label { margin: 0 0 6px; font-size: 15px; color: var(--muted); font-weight: 500; }
.ip-h1 { margin: 0 0 2px; font-size: clamp(1.05rem, .95rem + .45vw, 1.35rem); font-weight: 620; letter-spacing: -.01em; color: var(--ink); line-height: 1.3; }
.ip-h1 span { color: var(--muted); font-weight: 450; }
.hero-note { text-align: center; color: var(--muted); max-width: 720px; margin: 22px auto 0; font-size: 15.5px; text-wrap: pretty; }
.hero .ip-card { margin-top: 0; }
.ip-value {
  font-family: var(--mono); font-weight: 700; letter-spacing: 0; color: var(--ip);
  font-size: clamp(2.1rem, 1rem + 5vw, 4.6rem); line-height: 1.1; margin: 0;
  overflow-wrap: anywhere; min-height: 1.15em;
}
.ip-value.is-v6 { font-size: clamp(1.2rem, .6rem + 2.4vw, 2.4rem); }
.ip-value .skeleton { display: inline-block; width: min(420px, 70%); height: .9em; border-radius: 12px; vertical-align: middle; }

.ip-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; padding: 4px 10px; border-radius: var(--radius-btn); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.tag.is-accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.tag.is-warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.tag svg { width: 14px; height: 14px; }

.ip-actions { display: inline-flex; justify-content: center; margin-top: 20px; border-radius: var(--radius-btn); overflow: hidden; }
.ip-actions .btn { border-radius: 0; border: 0; border-right: 1px solid rgba(255, 255, 255, .18); padding: 13px 20px; }
.ip-actions .btn:last-child { border-right: 0; }
@media (max-width: 560px) {
  .ip-actions { display: flex; flex-direction: column; width: 100%; }
  .ip-actions .btn { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .18); width: 100%; }
  .ip-actions .btn:last-child { border-bottom: 0; }
}

.btn {
  appearance: none; border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 16px; font-weight: 400; line-height: 1.2;
  padding: 12px 18px; border-radius: var(--radius-btn); text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-ghost { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent-ink); color: var(--ink); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.is-done { background: var(--accent-ink); color: var(--on-ink); border-color: var(--accent-ink); }

.ip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); margin: 0; }
.ip-cell { padding: 18px max(18px, 1.6vw); background: var(--card); min-width: 0; }
.ip-cell dt { font-size: 13px; color: var(--muted); font-weight: 500; margin: 0 0 4px; display: flex; align-items: center; gap: 6px; }
.ip-cell dt svg { width: 15px; height: 15px; color: var(--icon-muted); }
.ip-cell dd { margin: 0; font-weight: 550; color: var(--ink); overflow-wrap: anywhere; line-height: 1.4; }
.ip-cell dd.mono { font-family: var(--mono); font-weight: 500; font-size: .95em; }
.ip-cell dd .sub { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; margin-top: 2px; font-family: var(--font); }
.ip-cell dd .na { color: var(--faint); font-weight: 400; font-family: var(--font); font-size: 15px; }
.ip-cell.is-wide { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .ip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ip-cell:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 359px) { .ip-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .ip-cell { padding: 14px 14px; } .ip-cell dd { font-size: 15px; } .eyebrow { margin-bottom: 12px; } }

.ip-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 14px max(18px, 1.6vw); background: var(--surface); border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.ip-foot p { margin: 0; }
.ip-foot a { color: var(--muted); }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 15px; line-height: 1.55; margin: 0; }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.notice.is-warn { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn-ink); }
.notice.is-info { background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--info-ink); }
.notice.is-error { background: var(--error-soft); border: 1px solid var(--error-line); color: var(--error); }
.ip-notice { padding: 0 max(18px, 1.6vw) 18px; }
.ip-notice:empty { display: none; }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--skel-mid) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; border-radius: 6px; display: inline-block; height: 1em; width: 70%; vertical-align: middle; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* Bloque para programadores */
.dev { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; font-size: 14.5px; color: var(--muted); }
.dev code { font-size: 13.5px; background: var(--card); padding: 6px 10px; border-radius: 8px; }

/* ---------- Herramientas (páginas internas) ---------- */
.tool-card { margin-top: max(20px, 2vw); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-btn); box-shadow: var(--shadow-lg); padding: max(18px, 2vw); }
.tool-form { display: flex; gap: 10px; flex-wrap: wrap; }
.tool-form .field { flex: 1 1 260px; position: relative; }
.tool-form input, .tool-form select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-btn); background: var(--field);
  padding: 13px 16px; min-height: 50px; transition: border-color .15s, box-shadow .15s;
}
.tool-form input { font-family: var(--mono); }
.tool-form input::placeholder { color: var(--faint); font-family: var(--font); }
.tool-form input:focus, .tool-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tool-form select { flex: 0 0 auto; width: auto; min-width: 120px; padding-right: 36px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235b6577' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.tool-form .btn { min-height: 50px; padding-inline: 22px; }
.tool-hint { margin: 12px 2px 0; font-size: 14px; color: var(--muted); }
.tool-hint button { font: inherit; color: var(--accent-ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tool-result { margin-top: 18px; }
.tool-result:empty { display: none; }

.kv { width: 100%; border-collapse: collapse; font-size: 15px; }
.kv th, .kv td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv th { width: 34%; color: var(--muted); font-weight: 500; }
.kv td { overflow-wrap: anywhere; font-weight: 500; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.kv-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }

.records { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.records th, .records td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.records th { font-size: 13px; color: var(--muted); font-weight: 500; background: var(--surface); }
.records td.mono, .kv td.mono { font-family: var(--mono); font-weight: 400; font-size: 13.5px; overflow-wrap: anywhere; word-break: break-word; }
.records tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.badge { display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--faint); }
.dot.ok { background: var(--accent); }
.dot.warn { background: var(--dot-warn); }
.dot.err { background: var(--error); }

.map { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16 / 7; background: var(--surface); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px) { .map { aspect-ratio: 4 / 3; } }

.raw { margin-top: 14px; }
.raw summary { cursor: pointer; font-size: 14.5px; color: var(--accent-ink); }
.raw pre { margin: 10px 0 0; max-height: 420px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }

/* ---------- Contenido ---------- */
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }
.prose { max-width: none; margin-inline: auto; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--faint); }
.prose h2 { margin-top: max(56px, 5vw); padding-top: 4px; }
.prose h2:first-child { margin-top: 0; }
.prose .table-scroll { margin: 22px 0 24px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { background: var(--surface); font-size: 14px; color: var(--ink); font-weight: 600; }
.prose tbody tr:last-child td, .prose tbody tr:last-child th { border-bottom: 0; }
.prose tbody th { font-weight: 600; color: var(--ink); }

.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; margin-bottom: 12px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 650; display: grid; place-items: center; }

.os-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 22px 0 8px; }
@media (max-width: 720px) { .os-grid { grid-template-columns: minmax(0, 1fr); } }
.os { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--card); }
.os h3 { margin: 0 0 8px; font-size: 1.08rem; display: flex; align-items: center; gap: 10px; }
.os h3 svg { width: 20px; height: 20px; color: var(--accent-ink); }
.os p, .os ol { font-size: 15px; margin: 0 0 8px; }
.os ol { padding-left: 1.2em; }
.os p:last-child, .os ol:last-child { margin-bottom: 0; }

.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; background: var(--surface); margin: 0 0 8px; }
.toc p { margin: 0 0 10px !important; font-weight: 600; color: var(--ink) !important; font-size: 15px; }
.toc ol { columns: 2 260px; column-gap: 32px; margin: 0 !important; padding-left: 1.2em; font-size: 15px; }
.toc li { break-inside: avoid; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent-ink); text-decoration: underline; }

.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 20px 0; color: var(--info-ink); font-size: 15.5px; }
.callout p { margin: 0 !important; color: inherit !important; }

/* Preguntas frecuentes */
.faq { max-width: none; margin: 20px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 4px max(20px, 2.2vw); box-shadow: var(--shadow-lg); }
.faq details:first-of-type { border-top: 0 !important; }
.faq details:last-of-type { border-bottom: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font-weight: 580; font-size: 1.04rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; 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 .answer { padding: 0 0 18px; color: var(--ink-2); }
.faq .answer p { margin: 0 0 12px; }
.faq .answer p:last-child { margin: 0; }

/* Tarjetas de herramientas */
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tools { grid-template-columns: minmax(0, 1fr); } }
.tool-link { display: block; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--card); transition: border-color .15s, box-shadow .15s, transform .15s; }
.tool-link:hover { border-color: var(--accent-line); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.tool-link svg { width: 26px; height: 26px; color: var(--accent-ink); margin-bottom: 12px; }
.tool-link strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.tool-link span { color: var(--muted); font-size: 14.5px; line-height: 1.5; display: block; }

.section-head { text-align: center; max-width: 680px; margin: 0 auto max(28px, 2.4vw); }
.section-head p { color: var(--muted); margin: 0; }

/* Llamada a la acción (DonDigital) */
.cta { background: linear-gradient(135deg, var(--cta-a) 0%, var(--cta-b) 100%); border: 1px solid var(--accent-line); border-radius: var(--radius-btn); padding: max(28px, 3.4vw); display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 24px; align-items: center; }
.cta h2 { margin: 0 0 8px; font-size: clamp(1.45rem, 1.15rem + 1.1vw, 2.1rem); }
.cta p { margin: 0; color: var(--ink-2); max-width: 640px; }
.cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cta-actions small { color: var(--muted); font-size: 14.5px; }
.cta-actions small a { color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.cta-actions small a:hover { color: var(--accent-ink); }
@media (max-width: 760px) { .cta { grid-template-columns: minmax(0, 1fr); } }

/* Migas de pan */
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }

/* Páginas legales */
.legal h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.legal .updated { color: var(--muted); font-size: 14.5px; }

/* Huecos publicitarios (se activan más adelante) */
.ad-slot { display: none; }
.ad-slot.is-on { display: block; margin: 32px auto; text-align: center; min-height: 100px; }

/* ---------- Pie ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: max(16px, 2vw); padding-block: max(44px, 4vw) 28px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.foot-grid p { color: var(--muted); margin: 12px 0 0; max-width: 380px; }
.foot-grid h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid a { color: var(--ink-2); text-decoration: none; }
.foot-grid a:hover { color: var(--accent-ink); text-decoration: underline; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; color: var(--muted); font-size: 14px; }
.foot-bottom p { margin: 0; }
.foot-bottom a { color: var(--muted); }
.foot-bottom a:hover { color: var(--accent-ink); }

/* Aviso al copiar */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--on-ink); padding: 10px 18px; border-radius: 999px; font-size: 14.5px; box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; z-index: 80; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }

.cta-section { padding-top: 0; }
.section + .ad-slot + .section { padding-top: 0; }

@media (max-width: 560px) { .tool-form .btn { flex: 1 1 140px; } }

/* Cabecera compacta de las herramientas: protagonismo para la caja */
.hero-head.compact h1 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.5rem); margin-bottom: 8px; }
.hero-head.compact .lead { font-size: clamp(.98rem, .94rem + .2vw, 1.08rem); max-width: 720px; }
.hero-head.compact + .tool-card, .tool-card { margin-top: max(18px, 1.6vw); }
.crumbs { margin-bottom: 8px; }

.dev code { max-width: 100%; overflow-wrap: anywhere; }
.prose code, .faq code { overflow-wrap: anywhere; }

/* Aviso de cookies */
.cookie-banner {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(720px, calc(100% - 32px));
  display: flex; gap: 14px 20px; align-items: center; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius-btn);
  box-shadow: var(--shadow-lg); padding: 16px 18px; color: var(--ink-2); font-size: .92rem;
}
.cookie-banner p { margin: 0; flex: 1 1 320px; min-width: 0; }
.cookie-actions { display: flex; gap: 10px; flex: none; }
.cookie-actions .btn { min-width: 110px; justify-content: center; }
@media (max-width: 480px) { .cookie-actions { width: 100%; } .cookie-actions .btn { flex: 1; } }
