/* =============================================================
   SUPER DIGITAL TOOLS — hoja de estilos única de todo el sitio.

   Un solo archivo para todas las páginas: se descarga una vez y se
   reutiliza al pasar de una herramienta a otra.

   El color de cada herramienta se aplica con un atributo en la
   etiqueta <html>:
     <html data-tool="email">    → calculadora de email marketing
     <html data-tool="ingles">   → test de nivel de inglés
     (sin atributo)              → color de la casa, para la portada
   Los neutros, la tipografía, las sombras y los componentes son
   los mismos en todo el sitio.
   ============================================================= */

/* ----- 1. Tokens compartidos ----- */
:root {
  --bg:          #f3f1ed;
  --bg-tint:     #eceae4;
  --surface:     #ffffff;
  --surface-2:   #f6f4f0;
  --ink:         #15151c;
  --muted:       #6a6a78;
  --faint:       #9393a2;

  --line:        rgba(21, 21, 28, .09);
  --line-strong: rgba(21, 21, 28, .16);

  --good:        #1f7a45;
  --good-soft:   #e6f3ea;
  --bad:         #a8341f;
  --bad-soft:    #fbeae6;
  --warn:        #8a5a12;
  --warn-soft:   #fbf1de;

  --shadow-sm: 0 1px 2px rgba(21,21,28,.05), 0 2px 8px -4px rgba(21,21,28,.08);
  --shadow:    0 1px 2px rgba(21,21,28,.05), 0 12px 28px -12px rgba(21,21,28,.16);
  --shadow-lg: 0 1px 3px rgba(21,21,28,.06), 0 28px 60px -24px rgba(21,21,28,.24);

  --radius:    20px;
  --radius-sm: 13px;

  --sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1060px;

  /* Color de la casa (portada y páginas legales) */
  --accent:      #2c3557;
  --accent-lift: #4a5688;
  --accent-ink:  #ffffff;
  --accent-soft: #ebecf3;
  --accent-glow: rgba(44, 53, 87, .45);
}

[data-tool="email"] {
  --accent:      #0e5a70;
  --accent-lift: #1c8aa8;
  --accent-soft: #e5f1f4;
  --accent-glow: rgba(14, 90, 112, .5);
}
[data-tool="ingles"] {
  --accent:      #2e3a8f;
  --accent-lift: #4b56c4;
  --accent-soft: #ecedfa;
  --accent-glow: rgba(46, 58, 143, .5);
}

:root { --grad-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-lift) 100%); }

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0c0c11;
    --bg-tint:     #101017;
    --surface:     #14141d;
    --surface-2:   #1c1c27;
    --ink:         #f0efec;
    --muted:       #9a9aab;
    --faint:       #71717f;

    --line:        rgba(255, 255, 255, .09);
    --line-strong: rgba(255, 255, 255, .17);

    --good:        #4fd28a;
    --good-soft:   #10261a;
    --bad:         #ff8f74;
    --bad-soft:    #2a1713;
    --warn:        #e0ab5c;
    --warn-soft:   #2a2113;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px -4px rgba(0,0,0,.5);
    --shadow:    0 1px 2px rgba(0,0,0,.45), 0 12px 28px -12px rgba(0,0,0,.7);
    --shadow-lg: 0 1px 3px rgba(0,0,0,.5), 0 28px 60px -24px rgba(0,0,0,.8);

    --accent:      #8b95d6;
    --accent-lift: #aab2e8;
    --accent-ink:  #10131f;
    --accent-soft: #1c1f30;
  }
  [data-tool="email"] {
    --accent:      #5fc3dd;
    --accent-lift: #8ad8ec;
    --accent-ink:  #08202a;
    --accent-soft: #12242c;
  }
  [data-tool="ingles"] {
    --accent:      #8f95f0;
    --accent-lift: #b0b4f8;
    --accent-ink:  #10111d;
    --accent-soft: #1d1f33;
  }
}

/* ----- 2. Reset & base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
body {
  font-family: var(--sans); font-size: 16px; line-height: 1.62;
  color: var(--ink); background: var(--bg);
  font-feature-settings: "cv05" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip; overscroll-behavior-y: none;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ----- 3. Utilidades ----- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 1.15rem; }
.skip-link {
  position: fixed; top: -100px; left: 1rem; padding: .65rem 1.1rem;
  background: var(--ink); color: var(--bg); z-index: 9999;
  border-radius: 10px; font-weight: 600; font-size: .9rem;
}
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----- 4. Tipografía ----- */
h1 {
  font-family: var(--display); font-optical-sizing: auto; font-weight: 600;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-size: clamp(1.72rem, 5.4vw, 2.9rem);
  letter-spacing: -0.018em; line-height: 1.07;
}
h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.32rem, 2.9vw, 1.9rem);
  letter-spacing: -0.015em; line-height: 1.16; margin-bottom: .85rem;
}
h3 { font-family: var(--sans); font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; margin-bottom: .5rem; }
code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  background: var(--surface-2); border: 1px solid var(--line);
  padding: .1em .42em; border-radius: 6px; font-size: .88em;
}
.content a, .source-note a {
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.content a:hover { text-decoration-thickness: 2px; }

/* ----- 5. Botones ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .82rem 1.6rem; border-radius: 999px;
  font-weight: 600; font-size: .93rem; letter-spacing: -0.005em;
  white-space: nowrap; min-width: 0;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background .2s var(--ease), border-color .2s var(--ease);
}
.btn-primary {
  background: var(--grad-accent); color: #fff;
  box-shadow: 0 1px 2px rgba(21,21,28,.14), 0 10px 22px -10px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(21,21,28,.16), 0 16px 30px -12px var(--accent-glow); }
.btn-ghost {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }
.btn-ghost:disabled:hover { border-color: var(--line-strong); }
.btn-small { padding: .5rem 1.05rem; font-size: .85rem; }

/* ----- 6. Cabecera y pie (comunes a todo el sitio) ----- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }
/* El nombre de la marca es lo que cede espacio si la cabecera se queda
   estrecha, nunca la navegación: así es imposible que desborde a lo ancho
   por muy largas que sean las etiquetas. */
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: .98rem; letter-spacing: -0.02em; min-width: 0; }
.brand img { border-radius: 8px; flex: 0 0 auto; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.header-nav { display: flex; align-items: center; gap: .2rem; flex: 0 0 auto; }
.header-link {
  font-weight: 500; font-size: .85rem; color: var(--muted);
  padding: .35rem .75rem; border-radius: 999px;
  transition: background .18s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.header-link:hover { color: var(--ink); background: var(--bg-tint); }
.header-link[aria-current="page"] { color: var(--ink); background: var(--bg-tint); }

/* En móvil la cabecera no cabe con las etiquetas largas: se usan las
   cortas y, en pantallas muy estrechas, el nombre de la marca cede el
   sitio al icono. Así nunca desborda a lo ancho. */
.nav-short { display: none; }
@media (max-width: 620px) {
  .nav-full { display: none; }
  .nav-short { display: inline; }
  .header-link { padding-inline: .6rem; }
}
@media (max-width: 380px) {
  .brand-name { font-size: .88rem; }
  .header-inner { gap: .5rem; }
}

.site-footer { border-top: 1px solid var(--line); padding-block: 1.6rem; margin-top: 1.2rem; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .7rem; color: var(--faint); font-size: .83rem;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.footer-nav a { transition: color .16s var(--ease); }
.footer-nav a:hover { color: var(--ink); }

/* ----- 7. Hero ----- */
.hero { position: relative; padding-block: 1.35rem .9rem; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: -60% 10% 20% 10%;
  background: radial-gradient(50% 45% at 50% 60%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 72%);
  filter: blur(56px); pointer-events: none; z-index: -1;
}
.hero-sub { max-width: 48ch; margin: .55rem auto 0; color: var(--muted); font-size: .96rem; line-height: 1.5; }
.hero-meta {
  display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem .9rem;
  margin-top: .8rem; font-size: .78rem; color: var(--faint); font-weight: 500;
}
.hero-meta span { display: inline-flex; align-items: center; gap: .32rem; }
.hero-meta svg { width: 13px; height: 13px; opacity: .8; }

/* ----- 8. Panel (la caja principal de cada herramienta) ----- */
.tool-wrap { padding-bottom: 1.6rem; }
.panel {
  position: relative;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 1.2rem; overflow: hidden;
}
.panel::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent);
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  .panel::before { background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent); }
}
/* La cabecera es fija: sin esto, al llevar un destino a la vista le
   tapa las primeras líneas. */
.panel, #results, #result { scroll-margin-top: 5rem; }

.js-required, .empty-state p {
  margin-top: 1.05rem; padding: .9rem 1rem; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); font-size: .9rem; line-height: 1.55;
}
.js-required:first-child { margin-top: 0; }

.privacy-badge {
  margin-top: 1rem; font-size: .84rem; color: var(--faint);
  text-align: center; max-width: 54ch; margin-inline: auto; line-height: 1.5;
}

/* =============================================================
   9. CALCULADORA — componentes propios
   ============================================================= */
.sector-row { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.sector-row label { font-size: .82rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.sector-row select {
  font: inherit; font-size: .9rem; flex: 1; min-width: 0;
  padding: .55rem .7rem; border: 1px solid var(--line-strong);
  border-radius: 10px; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-sm); transition: border-color .16s var(--ease);
}
.sector-row select:hover { border-color: var(--accent); }

.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.field input {
  font: inherit; font-size: 1rem; width: 100%; font-variant-numeric: tabular-nums;
  padding: .62rem .75rem; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm);
  transition: border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.field input::placeholder { color: var(--faint); }
.field input:hover { border-color: var(--accent); }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.field input.is-bad { border-color: var(--bad); background: var(--bad-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 13%, transparent); }

.optional-block { margin-top: .95rem; border-top: 1px solid var(--line); padding-top: .95rem; }
.optional-block summary {
  font-size: .87rem; font-weight: 600; color: var(--accent); cursor: pointer;
  list-style: none; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
}
.optional-block summary::-webkit-details-marker { display: none; }
.optional-block summary::before {
  content: "+"; font-weight: 500; font-size: 1.1rem; line-height: 1;
  width: 19px; height: 19px; border-radius: 50%;
  border: 1px solid var(--line-strong); display: grid; place-items: center;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.optional-block[open] summary::before { transform: rotate(45deg); border-color: var(--accent); }
.opt-hint { font-weight: 400; color: var(--faint); font-size: .81rem; }
.optional-block .field-grid { margin-top: .9rem; }

.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.15rem; }
@media (max-width: 400px) { .form-actions .btn { padding-inline: 1.1rem; } }

.warnings {
  margin-top: 1.05rem; padding: .9rem 1.05rem; border-radius: var(--radius-sm);
  background: var(--warn-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 32%, transparent);
  border-left: 3px solid var(--warn);
}
.warn-title { font-weight: 700; color: var(--warn); font-size: .88rem; margin-bottom: .35rem; }
.warn-item { font-size: .88rem; color: var(--ink); margin-top: .35rem; line-height: 1.5; }

.results { margin-top: 1.4rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.diagnosis { margin-bottom: 1.3rem; }
.diagnosis h3 { margin-bottom: .65rem; }
.diag {
  font-size: .92rem; line-height: 1.55; padding: .8rem .95rem;
  border-radius: var(--radius-sm); margin-top: .55rem; border-left: 3px solid transparent;
}
.diag-good { background: var(--good-soft); border-left-color: var(--good); }
.diag-bad  { background: var(--bad-soft);  border-left-color: var(--bad); }
.diag-warn { background: var(--warn-soft); border-left-color: var(--warn); }
.diag-info { background: var(--surface-2); border-left-color: var(--accent); }

.results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.stat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .85rem .9rem;
  box-shadow: var(--shadow-sm); transition: border-color .16s var(--ease);
}
.stat-card:hover { border-color: var(--line-strong); }
.stat-card.is-missing { opacity: .62; }
.stat-card.is-invalid { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.stat-label { font-size: .76rem; color: var(--faint); font-weight: 600; line-height: 1.3; }
.stat-value {
  font-family: var(--display); font-optical-sizing: auto; font-weight: 600;
  font-size: 1.62rem; margin-top: .2rem; line-height: 1.08;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.stat-missing { color: var(--faint); }
.stat-invalid { color: var(--bad); font-size: 1.15rem; font-family: var(--sans); font-weight: 700; }
.stat-delta { font-size: .73rem; font-weight: 600; margin-top: .3rem; display: block; line-height: 1.35; }
.stat-delta.is-good { color: var(--good); }
.stat-delta.is-bad { color: var(--bad); }
.stat-delta.is-neutral { color: var(--faint); }

.chart-wrap { margin-top: 1.7rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
#chart { width: 100%; }
.chart-legend { margin-top: .5rem; font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-you { background: var(--accent); }
.dot-bench { background: var(--faint); opacity: .55; margin-left: .7rem; }
.source-note { margin-top: .6rem; font-size: .78rem; color: var(--faint); line-height: 1.45; }
.results-copy { margin-top: 1.3rem; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.copy-feedback { font-size: .84rem; color: var(--good); font-weight: 600; }

/* =============================================================
   10. TEST — componentes propios
   ============================================================= */
.progress { margin-bottom: 1.15rem; }
.progress-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .5rem;
  font-variant-numeric: tabular-nums;
}
.progress-level {
  background: var(--accent-soft); color: var(--accent);
  padding: .16rem .6rem; border-radius: 999px; font-weight: 700; font-size: .72rem; letter-spacing: .04em;
}
.progress-track {
  height: 5px; background: var(--bg-tint); border-radius: 999px;
  overflow: hidden; box-shadow: inset 0 1px 2px rgba(21,21,28,.07);
}
.progress-fill { display: block; height: 100%; border-radius: 999px; background: var(--grad-accent); transition: width .42s var(--ease); }

.q-topic { font-size: .69rem; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; color: var(--faint); }
.q-text {
  font-family: var(--display); font-optical-sizing: auto; font-weight: 600;
  font-size: clamp(1.28rem, 4.4vw, 1.72rem); line-height: 1.24;
  letter-spacing: -0.015em; margin-top: .45rem; margin-bottom: 1.15rem;
}
.options { display: grid; gap: .55rem; }
.option {
  display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left;
  padding: .88rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 1rem; line-height: 1.35; box-shadow: var(--shadow-sm);
  transition: border-color .16s var(--ease), background .16s var(--ease),
              box-shadow .16s var(--ease), transform .14s var(--ease);
}
.option:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.option:active { transform: translateY(0); }
.option.is-selected {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
.option-key {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-2); color: var(--faint); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.option:hover .option-key { color: var(--accent); border-color: var(--accent); }
.option.is-selected .option-key { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.option-text { min-width: 0; }
.nav { display: flex; gap: .5rem; margin-top: 1.15rem; }

.result { padding-top: .3rem; }
.result-head { display: flex; align-items: center; gap: 1.1rem; }
.level-badge {
  flex: 0 0 auto; width: 88px; height: 88px; border-radius: 22px;
  background: var(--grad-accent); color: #fff; display: grid; place-items: center;
  font-family: var(--display); font-optical-sizing: auto;
  font-weight: 600; font-size: 2.15rem; letter-spacing: -0.03em;
  box-shadow: 0 2px 4px rgba(21,21,28,.16), 0 18px 34px -14px var(--accent-glow);
  position: relative; overflow: hidden;
}
.level-badge::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,.22), transparent); pointer-events: none;
}
.result-titles h2 { margin-bottom: .2rem; font-size: clamp(1.3rem, 4.4vw, 1.85rem); }
.result-name { color: var(--muted); font-size: .88rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.result-text { margin-top: 1.05rem; font-size: .98rem; line-height: 1.62; }

.levels { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.lvl-row { display: flex; align-items: center; gap: .7rem; margin-top: .55rem; }
.lvl-name { flex: 0 0 30px; font-weight: 700; font-size: .82rem; color: var(--faint); }
.lvl-track { flex: 1; height: 8px; background: var(--bg-tint); border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(21,21,28,.07); }
.lvl-fill { display: block; height: 100%; border-radius: 999px; background: var(--line-strong); }
.lvl-fill.is-pass { background: var(--grad-accent); }
.lvl-score { flex: 0 0 36px; text-align: right; font-size: .8rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.levels-note { margin-top: .9rem; font-size: .8rem; color: var(--faint); line-height: 1.5; }

.share { margin-top: 1.9rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
#card { width: 100%; border-radius: var(--radius-sm); box-shadow: var(--shadow); background: var(--accent); }
.share-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .9rem; }
.copy-fb { font-size: .84rem; color: var(--good); font-weight: 600; }

.review { margin-top: 1.9rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.review-intro { color: var(--muted); font-size: .9rem; margin-bottom: .85rem; }
.rev {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .8rem .95rem; margin-top: .5rem; background: var(--surface);
  box-shadow: var(--shadow-sm); transition: border-color .16s var(--ease);
}
.rev:hover { border-color: var(--line-strong); }
.rev.is-ok { border-left: 3px solid var(--good); }
.rev.is-ko { border-left: 3px solid var(--bad); }
.rev summary { display: flex; align-items: center; gap: .65rem; cursor: pointer; font-size: .92rem; list-style: none; }
.rev summary::-webkit-details-marker { display: none; }
.rev-mark { flex: 0 0 auto; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font-size: .68rem; font-weight: 800; }
.rev.is-ok .rev-mark { background: var(--good-soft); color: var(--good); }
.rev.is-ko .rev-mark { background: var(--bad-soft); color: var(--bad); }
.rev-q { flex: 1; min-width: 0; font-weight: 500; }
.rev-lvl {
  flex: 0 0 auto; font-size: .68rem; font-weight: 700; color: var(--faint);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: .12rem .48rem; border-radius: 999px;
}
.rev-line { margin-top: .6rem; font-size: .89rem; }
.rev-yours { color: var(--bad); }
.rev-why { margin-top: .4rem; font-size: .89rem; color: var(--muted); line-height: 1.55; }
.result-actions { margin-top: 1.6rem; }

/* =============================================================
   11. PORTADA — rejilla de herramientas
   ============================================================= */
.tools-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.4rem; }
.tool-link {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  position: relative; overflow: hidden;
}
a.tool-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.tool-link::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--grad-accent);
}
.tool-link[data-tool="email"]  { --accent: #0e5a70; --accent-lift: #1c8aa8; --accent-soft: #e5f1f4; }
.tool-link[data-tool="ingles"] { --accent: #2e3a8f; --accent-lift: #4b56c4; --accent-soft: #ecedfa; }
@media (prefers-color-scheme: dark) {
  .tool-link[data-tool="email"]  { --accent: #5fc3dd; --accent-lift: #8ad8ec; --accent-soft: #12242c; }
  .tool-link[data-tool="ingles"] { --accent: #8f95f0; --accent-lift: #b0b4f8; --accent-soft: #1d1f33; }
}
.tool-icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft);
  color: var(--accent); display: grid; place-items: center; margin-bottom: .85rem;
}
.tool-icon svg { width: 21px; height: 21px; }
.tool-link h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.tool-link p { color: var(--muted); font-size: .91rem; line-height: 1.55; flex: 1; }
.tool-cta {
  margin-top: .9rem; font-size: .87rem; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: .35rem;
}
.tool-cta svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
a.tool-link:hover .tool-cta svg { transform: translateX(3px); }
.tool-link.is-soon { opacity: .72; }
.soon {
  display: inline-block; align-self: flex-start;   /* si no, el flex la estira */
  font-size: .66rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
  border: 1px solid var(--line-strong); padding: .12rem .48rem;
  border-radius: 999px; margin-bottom: .55rem;
}

/* =============================================================
   12. Contenido, FAQ, anuncios, legales
   ============================================================= */
.ad-slot {
  min-height: 90px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; margin-block: 1.8rem;
  color: var(--faint); font-size: .78rem; background: var(--bg-tint);
}
.ad-label { text-transform: uppercase; letter-spacing: .13em; font-weight: 700; opacity: .6; }

.content { padding-block: 1.2rem; max-width: 70ch; }
.content h2 { margin-top: 2.4rem; }
.content p { margin-top: .85rem; }
.steps { list-style: none; display: flex; flex-direction: column; gap: .65rem; }
.steps li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .95rem 1.05rem; font-size: .94rem; box-shadow: var(--shadow-sm); line-height: 1.55;
}
.level-cards { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-top: 1.15rem; }
.level-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1.05rem; box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.level-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lc-code {
  display: inline-block; font-weight: 700; font-size: .73rem; letter-spacing: .05em;
  background: var(--accent-soft); color: var(--accent);
  padding: .16rem .55rem; border-radius: 999px; margin-bottom: .5rem;
}
.level-card p { color: var(--muted); font-size: .89rem; margin-top: .25rem; line-height: 1.55; }

.faq { padding-block: 1.2rem 2rem; }
.faq-list { display: flex; flex-direction: column; gap: .55rem; }
.faq-list details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .95rem 1.1rem; box-shadow: var(--shadow-sm);
}
.faq-list summary {
  font-weight: 600; cursor: pointer; font-size: .95rem; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; flex: 0 0 auto; color: var(--faint);
  font-size: 1.15rem; font-weight: 400; line-height: 1;
  transition: transform .2s var(--ease), color .2s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq-list p { margin-top: .65rem; color: var(--muted); font-size: .92rem; line-height: 1.6; }

.more-tools { padding-block: 1.2rem 2.4rem; }

.legal { padding-block: 2.4rem; max-width: 66ch; }
.legal h1 { margin-bottom: 1.1rem; }
.legal h2 { margin-top: 1.9rem; }
.legal p, .legal li { color: var(--muted); margin-top: .7rem; }

/* =============================================================
   13. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .container { padding-inline: 1.35rem; }
  .hero { padding-block: 2.2rem 1.2rem; }
  .hero-sub { font-size: 1.03rem; }
  .panel { padding: 1.8rem; }
  .field-grid-core { grid-template-columns: repeat(4, 1fr); }
  .optional-block .field-grid { grid-template-columns: repeat(3, 1fr); }
  .results-grid { grid-template-columns: repeat(3, 1fr); }
  .options { grid-template-columns: repeat(2, 1fr); }
  .level-cards { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .level-badge { width: 100px; height: 100px; font-size: 2.5rem; }
}
@media (min-width: 720px) {
  .optional-block .field-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 960px) {
  .hero { padding-block: 2.8rem 1.4rem; }
  .panel { padding: 2.2rem; }
  .results-grid { grid-template-columns: repeat(5, 1fr); }
  .level-cards { grid-template-columns: repeat(3, 1fr); }
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =============================================================
   14. Impresión
   ============================================================= */
@media print {
  .site-header, .ad-slot, .form-actions, .optional-block summary, .nav, .progress,
  .share, .more-tools, .site-footer, .privacy-badge, .results-copy,
  .result-actions, .skip-link, .hero::before { display: none !important; }
  body { background: #fff; color: #000; }
  .panel { box-shadow: none; border: 1px solid #ccc; }
  .stat-card, .steps li, .rev { box-shadow: none; break-inside: avoid; }
}

/* =============================================================
   15. Reduced-motion — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-primary:hover, .option:hover, .level-card:hover, a.tool-link:hover { transform: none; }
  .progress-fill { transition: none; }
}
