/* style.css — quienmellama.net
   Mobile-first, sin frameworks. Variables CSS para theming claro/oscuro. */

:root {
  --bg: #f7f8fb;
  --bg-elevated: #ffffff;
  --text: #1a1d29;
  --text-muted: #5b6270;
  --brand: #2563eb;          /* fondo de botones: blanco encima = 5,2:1 */
  --brand-dark: #1d4fbf;
  --link: #1d5bd6;           /* texto de enlaces: ≥ 5,5:1 sobre fondos claros */
  --success-text: #11734f;   /* texto verde: ≥ 5:1 sobre fondos claros */
  --border: #e6e8ee;
  --success: #1a9e6b;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(20, 24, 40, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root:where([data-theme="dark"]) {
    --bg: #12141c;
    --bg-elevated: #1b1e29;
    --text: #eef0f5;
    --text-muted: #9aa1b1;
    --border: #2a2e3c;
    --shadow: 0 4px 20px rgba(0, 0, 0, .35);
    --link: #8db4ff;           /* enlaces legibles sobre fondo oscuro */
    --success-text: #4fd6a0;
  }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 720px; }

/* ---- Header ---- */
.site-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); display: flex; align-items: center; gap: 6px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 900;
}
.brand-tld { color: var(--text-muted); font-weight: 600; }
.main-nav { display: flex; align-items: center; gap: 18px; font-size: .92rem; }
.country-select { position: relative; }
.country-current {
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; font-size: .9rem; cursor: pointer; color: var(--text);
}
.country-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; min-width: 200px; padding: 6px;
}
.country-dropdown.open { display: block; }
.country-dropdown a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.country-dropdown a:hover { background: var(--bg); text-decoration: none; }

/* ---- Hero / search ---- */
.hero { padding: 56px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 8px; }
.hero .sub { color: var(--text-muted); margin: 0 0 28px; }
.search-box { display: flex; max-width: 520px; margin: 0 auto; gap: 8px; }
.search-box input {
  flex: 1; padding: 14px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text); font-size: 1rem;
}
.search-box button {
  padding: 14px 22px; border-radius: 999px; border: none; background: var(--brand);
  color: #fff; font-weight: 700; cursor: pointer; font-size: 1rem;
}
.search-box button:hover { background: var(--brand-dark); }
.trust-badges { margin-top: 20px; color: var(--text-muted); font-size: .88rem; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- Cards / grid ---- */
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 760px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card .ico { font-size: 1.6rem; }
.card h3 { margin: 10px 0 6px; font-size: 1rem; }
.card p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.features { padding: 30px 0; }

/* ---- How it works ---- */
.how-it-works { padding: 40px 0; }
.how-it-works h2, .articles h2 { text-align: center; margin-bottom: 28px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { text-align: center; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff;
  font-weight: 800; margin-bottom: 10px;
}

/* ---- Articles list ---- */
.articles { padding: 30px 0 60px; }
.article-list { list-style: none; padding: 0; margin: 0 auto; max-width: 640px; }
.article-list li { border-bottom: 1px solid var(--border); padding: 12px 0; }

/* ---- Phone page ---- */
.phone-head { padding: 40px 0 20px; text-align: center; }
.phone-head h1 { font-size: clamp(1.4rem, 3.6vw, 2rem); }
.risk-box {
  display: inline-flex; align-items: center; gap: 12px; margin: 16px auto;
  background: var(--bg-elevated); border: 2px solid var(--risk-color, var(--border));
  border-radius: 999px; padding: 10px 22px;
}
.risk-score { font-size: 1.6rem; font-weight: 900; color: var(--risk-color, var(--text)); }
.risk-score span { font-size: .9rem; color: var(--text-muted); font-weight: 500; }
.risk-label { font-weight: 700; }
.phone-stats { color: var(--text-muted); font-size: .92rem; }
.owner-box, .claim-link {
  display: inline-block; margin-top: 14px; padding: 10px 18px; border-radius: 10px;
}
.owner-box { background: rgba(26,158,107,.1); border: 1px solid var(--success); }
.claim-link { border: 1px dashed var(--border); color: var(--text); }

.comments { padding: 20px 0 60px; }
.comment-list { list-style: none; padding: 0; max-width: 680px; margin: 0 auto 40px; }
.comment { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.comment-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--link); font-weight: 700; }
.comment time { display: block; margin-top: 8px; color: var(--text-muted); font-size: .8rem; }
.empty { text-align: center; color: var(--text-muted); }

.comment-form { max-width: 680px; margin: 0 auto; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.comment-form h2 { margin-top: 0; font-size: 1.1rem; }
.comment-form label { display: block; margin-bottom: 12px; font-size: .9rem; color: var(--text-muted); }
.comment-form select, .comment-form textarea {
  width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: .95rem;
}
.comment-form textarea { min-height: 110px; resize: vertical; }
.comment-form button {
  background: var(--brand); color: #fff; border: none; padding: 12px 20px; border-radius: 10px;
  font-weight: 700; cursor: pointer;
}
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ---- Legal / articles / api generic pages ---- */
.legal-page, .article-page, .topic-page, .api-page { padding: 40px 0 70px; }
.legal-body, .article-body { color: var(--text); }
.api-page pre { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; padding: 16px; overflow-x: auto; }
.api-page .btn {
  display: inline-block; margin-top: 10px; background: var(--brand); color: #fff; padding: 12px 22px;
  border-radius: 10px; font-weight: 700;
}

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 30px 0; margin-top: 30px; color: var(--text-muted); font-size: .88rem; }
.footer-links { margin-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; }

.not-found { padding: 80px 0; text-align: center; }

/* ==== Bloque 1: accesibilidad, avisos, formularios, portada global ==== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.nowrap { white-space: nowrap; }

.alert { margin: 18px 0 0; padding: 12px 16px; border-radius: 10px; font-weight: 600; }
.alert-success { background: rgba(26,158,107,.12); border: 1px solid var(--success); }
.alert-error { background: rgba(229,72,77,.1); border: 1px solid #e5484d; }

.breadcrumbs { padding-top: 18px; font-size: .88rem; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--text-muted); }

.search-box { position: relative; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 999px; padding: 5px; box-shadow: var(--shadow); gap: 4px; align-items: center; }
.search-box input { border: none; background: transparent; padding: 12px 10px; min-width: 0; }
.search-box input:focus { outline: none; }
.search-box:focus-within { border-color: var(--brand); }
.search-prefix { padding-left: 14px; color: var(--text-muted); font-weight: 600; }
.search-box button { padding: 12px 20px; white-space: nowrap; }
@media (max-width: 480px) { .search-box button { padding: 12px 14px; font-size: .92rem; } }

.phone-e164 { color: var(--text-muted); margin: 0; font-variant-numeric: tabular-nums; }
.owner-box { text-align: left; }
.owner-badge { display: block; color: var(--success-text); font-size: .8rem; font-weight: 700; margin-bottom: 4px; }
.comments-title { text-align: center; font-size: 1.15rem; }

.recent-numbers { padding: 10px 0 20px; }
.recent-numbers h2 { text-align: center; font-size: 1.1rem; }
.number-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.number-chips a { display: inline-block; padding: 7px 12px; border-radius: 999px; background: var(--bg-elevated); border: 1px solid var(--border); border-left: 4px solid var(--risk-color, var(--border)); color: var(--text); font-variant-numeric: tabular-nums; }
.number-chips small { color: var(--text-muted); margin-left: 4px; }

.form-page { padding: 30px 0 70px; }
.back-link { margin: 0 0 8px; }
.lead { color: var(--text-muted); }
.form-card { max-width: 680px; margin: 0 auto; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.form-card h2 { margin-top: 0; font-size: 1.1rem; }
.form-card label { display: block; margin-bottom: 14px; font-size: .9rem; color: var(--text-muted); }
.form-card label small { display: block; margin-top: 4px; }
.form-card input[type=text], .form-card input[type=email], .form-card input[type=tel], .form-card select, .form-card textarea {
  width: 100%; margin-top: 6px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 1rem;
}
.form-card textarea { min-height: 110px; resize: vertical; }
.form-card label.check { display: flex; gap: 8px; align-items: flex-start; color: var(--text); }
.form-card button { background: var(--brand); color: #fff; border: none; padding: 13px 22px; border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 1rem; }
.form-card button:hover { background: var(--brand-dark); }
.form-hint { font-size: .82rem; color: var(--text-muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn { display: inline-block; background: var(--brand); color: #fff; padding: 12px 22px; border-radius: 10px; font-weight: 700; }
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.article-meta { color: var(--text-muted); font-size: .85rem; margin-top: -6px; }
.article-body h2 { margin-top: 1.8em; }
.cta-box { margin-top: 40px; padding: 22px; border-radius: var(--radius); background: var(--bg-elevated); border: 1px solid var(--border); text-align: center; }

.country-grid-section { padding: 0 0 60px; }
.country-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.country-card { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.country-card-main { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.country-card .flag { font-size: 1.4rem; }
.country-card-en { font-size: .78rem; color: var(--text-muted); }
.footer-copy { margin-top: 12px; }
@media (max-width: 560px) { .nav-api { display: none; } .country-name { display: none; } }

/* ==== Bloque 2: ladas y prefijos ==== */
.prefix-head { padding: 26px 0 10px; }
.prefix-head h1 { font-size: clamp(1.5rem, 3.8vw, 2.1rem); margin-bottom: 12px; }
.answer-box { font-size: 1.12rem; background: var(--bg-elevated); border: 1px solid var(--border); border-left: 5px solid var(--brand); border-radius: 12px; padding: 16px 18px; margin: 0 0 18px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0 0 22px; }
.facts div { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.facts dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.facts dd { margin: 4px 0 0; font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.localities { color: var(--text-muted); }
.prefix-notes { margin: 18px 0; }
.search-inline { margin: 24px 0 8px; }
.phone-prefix { margin: 4px 0 0; }

.prefix-numbers { padding: 16px 0; }
.number-table { list-style: none; padding: 0; margin: 0 0 30px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-elevated); }
.number-table li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); border-left: 4px solid var(--risk-color, var(--border)); }
.number-table li:last-child { border-bottom: none; }
.number-table a { font-weight: 700; font-variant-numeric: tabular-nums; }
.nt-risk { font-size: .82rem; color: var(--risk-color); font-weight: 700; text-align: right; }
.nt-count { grid-column: 1 / -1; font-size: .82rem; color: var(--text-muted); }
@media (min-width: 620px) { .number-table li { grid-template-columns: 1fr 160px 170px; align-items: center; } .nt-count { grid-column: auto; text-align: right; } }
.comment-number { font-weight: 700; margin-right: 8px; }

.faq { padding: 10px 0 20px; }
.faq details { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style-position: outside; }
.faq details p { margin: 0 0 14px; color: var(--text-muted); }

.related-prefixes { padding: 10px 0 50px; }
.prefix-chips { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.prefix-chips a { display: inline-block; padding: 7px 12px; border-radius: 999px; background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text); font-size: .9rem; }
.prefix-chips a:hover { border-color: var(--brand); text-decoration: none; }
.prefix-chips strong { color: var(--link); margin-right: 4px; font-variant-numeric: tabular-nums; }
.prefix-group h3 { font-size: .95rem; margin: 18px 0 8px; color: var(--text-muted); }
.prefix-filter input { width: 100%; max-width: 420px; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); font-size: 1rem; margin: 6px 0 10px; }
.prefix-cta { padding: 4px 0 10px; }
.prefix-cta-card { display: flex; gap: 14px; align-items: center; max-width: 620px; margin: 0 auto; color: var(--text); }
.prefix-cta-card:hover { border-color: var(--brand); text-decoration: none; }
.intl-countries { list-style: none; padding: 0; display: grid; gap: 10px; }
.intl-countries .card { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.intl-countries .flag { font-size: 1.6rem; }
.intl-countries p { flex-basis: 100%; margin: 0; }

/* ==== Ajustes tras revisión visual (Bloque 2) ==== */
.brand { gap: 8px; }
.faq summary { list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--link); font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.prefix-numbers .comment-list { margin-bottom: 10px; }
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr 1fr; gap: 8px; }
  .facts div { padding: 10px 12px; }
  .facts dd { font-size: .95rem; }
}

/* ==== Bloque 3: códigos compartidos (+1, +7) ==== */
.intl-compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.intl-compact .card { padding: 12px 14px; }

/* ==== Bloque 4: números oficiales de empresas ==== */
.big-number { display: block; font-size: 1.7rem; font-weight: 900; margin-top: 6px; font-variant-numeric: tabular-nums; }
.verified-line { font-size: .85rem; color: var(--success-text); margin: -8px 0 20px; }
.verified-line a { margin-left: 6px; }
.official-numbers { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.official-numbers li { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.on-main { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; align-items: baseline; }
.on-label { font-weight: 600; }
.on-number { font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.on-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; color: var(--text-muted); margin-top: 6px; }
.on-reports { display: inline-block; font-size: .82rem; margin-top: 8px; }
.scam-box { border: 1px solid #e5484d; background: rgba(229,72,77,.06); border-radius: 12px; padding: 16px 18px; margin: 10px 0 20px; }
.scam-box h2 { font-size: 1.05rem; margin: 0 0 8px; }
.scam-box p { margin: 6px 0; }
.disclaimer { font-size: .82rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 12px; }
.official-badge { display: grid; gap: 4px; max-width: 560px; margin: 14px auto 0; text-align: left; background: rgba(26,158,107,.08); border: 1px solid var(--success); border-radius: 12px; padding: 12px 16px; }
.official-badge strong { color: var(--success-text); }
.official-badge small { color: var(--text-muted); }
.company-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.company-grid .card { display: grid; gap: 4px; color: var(--text); padding: 14px 16px; }
.company-grid .card:hover { border-color: var(--brand); text-decoration: none; }
.company-grid span { font-size: .82rem; color: var(--text-muted); }

/* ==== Bloque 5: legales y denuncia de comentarios ==== */
.comment-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.comment-foot time { margin-top: 0; }
.report-link { font-size: .78rem; color: var(--text-muted); }
.legal-body h2 { font-size: 1.15rem; margin-top: 1.8em; }
.legal-body li { margin-bottom: 6px; }

/* ==== Bloque 6: colores de riesgo con contraste AA (texto ≥ 4.5:1) ==== */
.risk-high    { --risk-color: #b42318; }
.risk-medium  { --risk-color: #b54708; }
.risk-low     { --risk-color: #8a6100; }
.risk-unknown { --risk-color: #5b6270; }
:where([data-theme="dark"]) .risk-high { --risk-color: #ff8a80; }
:where([data-theme="dark"]) .risk-medium { --risk-color: #ffb366; }
:where([data-theme="dark"]) .risk-low { --risk-color: #f2d06b; }
:where([data-theme="dark"]) .risk-unknown { --risk-color: #aab2c2; }

.footer-country { margin-bottom: 4px; font-weight: 600; }

/* ==== Retoque final: indicador de riesgo como punto (la barra lateral se deformaba en las píldoras) ==== */
.number-chips a { border-left: 1px solid var(--border); display: inline-flex; align-items: center; gap: 6px; }
.number-chips a::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--risk-color, var(--border)); flex: none; }

/* =====================================================================
   DISEÑO 2026 (capa final): identidad nueva, hero oscuro con degradado,
   tarjetas con relieve, iconos SVG, pie oscuro y aviso de país.
   ===================================================================== */
:root {
  --brand: #4f46e5;          /* botones: blanco encima = 6,3:1 */
  --brand-dark: #4338ca;
  --brand-2: #2563eb;
  --accent: #fbbf24;
  --link: #3f37c9;           /* ≥ 7:1 sobre claro */
  --bg: #f5f6fb;
  --border: #e4e6f0;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 64, .04), 0 8px 24px rgba(16, 24, 64, .06);
  --shadow-lg: 0 20px 50px rgba(20, 20, 80, .18);
  --hero-1: #0b1033;
  --hero-2: #1e1b6b;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root:where([data-theme="dark"]) {
    --bg: #0d1020; --bg-elevated: #151a31; --border: #262c4a;
    --link: #a5b4fc; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --hero-1: #070a1f; --hero-2: #1b1760;
  }
body { letter-spacing: -.005em; }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.2; }

/* ---- Cabecera ---- */
.site-header { background: color-mix(in srgb, var(--bg-elevated) 88%, transparent); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); }
.site-header .wrap { height: 66px; }
.brand { font-size: 1.12rem; gap: 10px; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 4px 12px rgba(79,70,229,.35); }
.brand-name { font-weight: 800; }
.brand-tld { color: var(--brand); font-weight: 800; }
.main-nav a { color: var(--text); font-weight: 600; }
.main-nav a:hover { color: var(--brand); text-decoration: none; }
.country-current { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.country-current::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .6; }
.country-dropdown { border-radius: 14px; min-width: 230px; max-height: 380px; }
.country-dropdown .dd-all { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; color: var(--link); font-weight: 600; }
.lang-switch { border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; }

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  padding: 64px 0 72px;
  background:
    radial-gradient(700px 380px at 85% -10%, rgba(99,102,241,.55), transparent 70%),
    radial-gradient(600px 360px at 5% 110%, rgba(37,99,235,.45), transparent 70%),
    linear-gradient(160deg, var(--hero-1), var(--hero-2));
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: radial-gradient(rgba(255,255,255,.55) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #e0e7ff;
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.25); }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.3rem); font-weight: 850; margin: 0 0 14px; color: #fff; }
.hero h1 .hl { background: linear-gradient(90deg, #fcd34d, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { color: #c7d2fe; font-size: 1.1rem; margin: 0 auto 30px; max-width: 620px; }
.hero .search-box { max-width: 640px; padding: 7px; border: none; box-shadow: var(--shadow-lg); background: #fff; }
.hero .search-box input { color: #111827; font-size: 1.08rem; padding: 14px 10px; }
.hero .search-box input::placeholder { color: #6b7280; }
.hero .search-prefix { color: #374151; font-size: 1.05rem; }
.search-box button { background: linear-gradient(135deg, #6d5dfc, var(--brand-2)); padding: 14px 26px; font-size: 1.02rem; box-shadow: 0 6px 16px rgba(79,70,229,.35); transition: transform .15s ease, box-shadow .15s ease; }
.search-box button:hover { background: linear-gradient(135deg, #5b4bf0, #1d4ed8); transform: translateY(-1px); }
.hero .trust-badges { color: #e0e7ff; margin-top: 22px; gap: 10px; }
.hero .trust-badges span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-weight: 600; }
.hero .trust-badges svg { width: 16px; height: 16px; }

/* ---- Accesos rápidos bajo el hero ---- */
.quick-links { margin-top: -34px; position: relative; z-index: 2; padding-bottom: 8px; }
.quick-links .wrap { display: grid; gap: 14px; }
@media (min-width: 760px) { .quick-links .wrap { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
.prefix-cta { padding: 0; }
.prefix-cta .wrap { padding: 0; }
.quick-links .prefix-cta-card { max-width: none; height: 100%; }
.prefix-cta-card { transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.prefix-cta-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.prefix-cta-card .ico, .feature-ico {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; font-size: 1.3rem;
  background: linear-gradient(135deg, rgba(109,93,252,.14), rgba(37,99,235,.12)); color: var(--brand);
}
.prefix-cta-card .ico svg, .feature-ico svg { width: 24px; height: 24px; }
.prefix-cta-card .arrow { margin-left: auto; color: var(--text-muted); font-size: 1.3rem; }

/* ---- Tarjetas y secciones ---- */
.card { border-radius: var(--radius); transition: transform .15s ease, box-shadow .15s ease; }
.features { padding: 56px 0 24px; }
.features .card { padding: 24px; }
.features .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.features .card h3 { margin: 14px 0 6px; font-size: 1.05rem; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 30px; }
.section-head .eyebrow, .eyebrow { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
:where([data-theme="dark"]) .section-head .eyebrow, :where([data-theme="dark"]) .eyebrow { color: #a5b4fc; }
.section-head h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head p { margin: 0; color: var(--text-muted); }
.how-it-works { padding: 48px 0; }
.steps li { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); }
.step-n { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #6d5dfc, var(--brand-2)); font-size: 1.05rem; }
.steps h3 { margin: 6px 0 6px; }
.steps p { margin: 0; color: var(--text-muted); }
.articles { padding: 32px 0 72px; }
.article-list { max-width: 760px; display: grid; gap: 10px; }
.article-list li { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elevated); padding: 0; box-shadow: var(--shadow); }
.article-list a { display: flex; align-items: center; gap: 12px; padding: 16px 18px; color: var(--text); font-weight: 600; }
.article-list a::after { content: "→"; margin-left: auto; color: var(--brand); }
.article-list a:hover { text-decoration: none; color: var(--brand); }

/* ---- Portada global ---- */
.hero-global { padding-bottom: 96px; }
.country-grid-section { margin-top: -56px; position: relative; z-index: 2; }
.country-card { padding: 0; overflow: hidden; }
.country-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.country-card-main { flex: 1; padding: 16px; }
.country-card-main:hover { text-decoration: none; color: var(--brand); }
.country-card-en { padding: 16px 14px; border-left: 1px solid var(--border); font-weight: 600; }
.country-card .flag { font-size: 1.6rem; }

/* ---- Botones y formularios ---- */
.btn, .form-card button, .comment-form button { background: linear-gradient(135deg, #6d5dfc, var(--brand-2)); border-radius: 12px; }
.btn:hover, .form-card button:hover, .comment-form button:hover { background: linear-gradient(135deg, #5b4bf0, #1d4ed8); }
.form-card input:focus, .form-card select:focus, .form-card textarea:focus, .comment-form select:focus, .comment-form textarea:focus, .prefix-filter input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79,70,229,.15); }
.answer-box { border-left-color: var(--brand); }
.phone-head { padding-top: 48px; }
.risk-box { box-shadow: var(--shadow); }

/* ---- Pie ---- */
.site-footer { background: #0b1033; color: #b4bdd8; border-top: none; margin-top: 40px; padding: 44px 0 28px; }
.site-footer a { color: #e0e7ff; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.08rem; margin-bottom: 8px; }
.footer-brand img { width: 30px; height: 30px; border-radius: 8px; }
.footer-links { gap: 10px 18px; }
.footer-copy { border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .82rem; }
.footer-copy a { color: #b4bdd8; }

/* ---- Aviso de país ("¿Estás en…?") ---- */
.geo-banner {
  position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%); z-index: 90;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  width: min(560px, calc(100% - 24px)); padding: 14px 16px; border-radius: 16px;
  background: var(--bg-elevated); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
}
.geo-banner.show { transform: translate(-50%, 0); }
.geo-banner .geo-flag { font-size: 1.5rem; }
.geo-banner .geo-text { flex: 1 1 200px; font-weight: 600; font-size: .95rem; }
.geo-banner .geo-go { background: linear-gradient(135deg, #6d5dfc, var(--brand-2)); color: #fff; padding: 9px 16px; border-radius: 10px; font-weight: 700; }
.geo-banner .geo-go:hover { text-decoration: none; filter: brightness(1.08); }
.geo-banner .geo-close { background: none; border: none; color: var(--text-muted); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 4px 6px; }
@media (prefers-reduced-motion: reduce) { .geo-banner, .card, .search-box button, .prefix-cta-card { transition: none; } }
@media (max-width: 560px) {
  .hero { padding: 44px 0 64px; }
  .hero .search-box { flex-wrap: nowrap; }
  .hero .search-box button { padding: 12px 14px; }
  .lang-switch { padding: 5px 10px; }
}
:where([data-theme="dark"]) .brand-tld,
:where([data-theme="dark"]) .prefix-cta-card .ico,
:where([data-theme="dark"]) .feature-ico { color: #a5b4fc; }
.site-footer .brand-tld { color: #fbbf24; }
.country-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.country-card-en { padding: 16px 12px; font-size: .75rem; }
@media (max-width: 480px) {
  .hero .search-box { flex-wrap: wrap; border-radius: 18px; padding: 8px; }
  .hero .search-box input { flex: 1 1 60%; }
  .hero .search-box button { flex: 1 1 100%; border-radius: 12px; padding: 13px; }
}
.phone-extra { padding: 10px 0 40px; }
.phone-extra h2 { font-size: 1.2rem; margin: 30px 0 8px; }
.variant-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.variant-list li { padding: 6px 12px; border-radius: 999px; background: var(--bg-elevated); border: 1px solid var(--border); font-variant-numeric: tabular-nums; font-size: .9rem; }
.tips-grid { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 620px) { .tips-grid { grid-template-columns: 1fr 1fr; } }
.tips-grid .card { padding: 16px 18px; }
.tips-grid h3 { margin: 0 0 4px; font-size: 1rem; }

/* =====================================================================
   DISEÑO AMIGABLE (v13): tipografía Nunito, portada clara con ilustración,
   tarjetas de artículos con imagen y huecos de anuncio con altura reservada.
   ===================================================================== */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --font: "Nunito", ui-rounded, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --bg: #f7f8ff; --bg-elevated: #ffffff; --text: #1e1b4b; --text-muted: #555a78;
  --border: #e6e8f7; --brand: #5b4bf0; --brand-dark: #4a3bd6; --link: #4338ca;
  --mint: #34d399; --mint-soft: #e7f8f0; --sun: #fbbf24; --sun-soft: #fff4e0; --coral: #fb7185;
  --radius: 20px;
  --shadow: 0 2px 4px rgba(40, 36, 120, .04), 0 12px 30px rgba(40, 36, 120, .08);
  --shadow-lg: 0 24px 60px rgba(40, 36, 120, .16);
}
:root:where([data-theme="dark"]) { --bg: #11132a; --bg-elevated: #1a1d3a; --text: #eef0ff; --text-muted: #aab0d6; --border: #2b2f57; --link: #b4b9ff; --mint-soft: #133a30; --sun-soft: #3a2f12; }
body { font-size: 17px; line-height: 1.6; letter-spacing: 0; }
h1, h2, h3 { font-weight: 900; letter-spacing: -.01em; }

/* Cabecera */
.site-header { background: color-mix(in srgb, var(--bg-elevated) 92%, transparent); border-bottom: 1px solid var(--border); }
.brand { font-size: 1.2rem; }
.brand-name { font-weight: 900; }
.brand-tld { color: var(--brand); }
.country-current, .lang-switch { border-radius: 999px; background: var(--bg); border: 1px solid var(--border); font-weight: 800; }

/* Portada: clara, con ilustración */
.hero {
  color: var(--text);
  background:
    radial-gradient(520px 320px at 90% 10%, rgba(109,93,252,.16), transparent 70%),
    radial-gradient(420px 300px at 0% 100%, rgba(52,211,153,.16), transparent 70%),
    linear-gradient(180deg, #eef0ff, var(--bg));
  padding: 56px 0 64px;
}
.hero::after { display: none; }
:where([data-theme="dark"]) .hero { background: radial-gradient(520px 320px at 90% 10%, rgba(109,93,252,.28), transparent 70%), linear-gradient(180deg, #171a3a, var(--bg)); }
.hero h1 { color: var(--text); font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.08; }
.hero .sub { color: var(--text-muted); font-size: 1.15rem; }
.hero-eyebrow { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow); font-weight: 800; }
.hero .search-box { background: var(--bg-elevated); box-shadow: var(--shadow-lg); border: 2px solid transparent; }
.hero .search-box:focus-within { border-color: var(--brand); }
.hero .search-box input { color: var(--text); font-family: var(--font); font-weight: 700; }
.hero .search-prefix { color: var(--text-muted); font-weight: 900; }
.search-box button { font-family: var(--font); font-weight: 900; background: var(--brand); box-shadow: 0 8px 20px rgba(91,75,240,.35); }
.search-box button:hover { background: var(--brand-dark); }
.hero .trust-badges { color: var(--text); }
.hero .trust-badges span { background: var(--mint-soft); border: 1px solid transparent; color: var(--text); font-weight: 800; }
.hero .trust-badges svg { color: #059669; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.hero-art img { width: 100%; height: auto; max-width: 480px; margin: 0 auto; display: block; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr .9fr; text-align: left; }
  .hero-friendly .sub { margin-left: 0; }
  .hero-friendly .search-box { margin: 0; }
  .hero-friendly .trust-badges { justify-content: flex-start; }
}
@media (max-width: 899px) { .hero-art { display: none; } }

/* Secciones y tarjetas */
.card { border-radius: var(--radius); border: 1px solid var(--border); }
.features .card { text-align: left; }
.feature-ico, .prefix-cta-card .ico { border-radius: 16px; width: 52px; height: 52px; }
.features .card:nth-child(1) .feature-ico { background: #ecebff; color: var(--brand); }
.features .card:nth-child(2) .feature-ico { background: var(--mint-soft); color: #059669; }
.features .card:nth-child(3) .feature-ico { background: var(--sun-soft); color: #b45309; }
.features .card:nth-child(4) .feature-ico { background: #ffe4ea; color: #e11d48; }
.section-head .eyebrow, .eyebrow { text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 900; color: var(--brand); background: #ecebff; padding: 4px 12px; border-radius: 999px; }
:where([data-theme="dark"]) .section-head .eyebrow, :where([data-theme="dark"]) .eyebrow { background: #262a5a; color: #c7c9ff; }
.step-n { background: var(--sun); color: #1e1b4b; border-radius: 14px; }
.steps li { border-radius: var(--radius); }

/* Artículos con imagen */
.article-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.article-card { display: flex; flex-direction: column; height: 100%; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.article-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.article-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.ac-body { display: grid; gap: 6px; padding: 16px 18px 20px; }
.ac-topic { justify-self: start; font-size: .8rem; font-weight: 900; color: var(--brand); background: #ecebff; padding: 2px 10px; border-radius: 999px; }
:where([data-theme="dark"]) .ac-topic { background: #262a5a; color: #c7c9ff; }
.ac-body strong { font-size: 1.08rem; line-height: 1.3; }
.ac-excerpt { color: var(--text-muted); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Preguntas frecuentes de la portada */
.home-faq { padding: 20px 0 50px; }
.home-faq .section-head { margin-bottom: 18px; }
.faq details { border-radius: 16px; }

/* Página de artículo */
.article-hero { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius); margin: 8px 0 22px; box-shadow: var(--shadow); }
.article-body { font-size: 1.05rem; }
.article-body h2 { font-size: 1.4rem; }
.article-body li { margin-bottom: 6px; }
.cta-box { background: linear-gradient(135deg, #ecebff, var(--mint-soft)); border: none; border-radius: var(--radius); }
:where([data-theme="dark"]) .cta-box { background: #1e2248; }

/* Ficha de número */
.risk-box { border-width: 3px; background: var(--bg-elevated); }
.comment { border-radius: 18px; }
.comment-form, .form-card { border-radius: var(--radius); }
.btn, .form-card button, .comment-form button { background: var(--brand); border-radius: 999px; font-family: var(--font); font-weight: 900; }
.btn:hover, .form-card button:hover, .comment-form button:hover { background: var(--brand-dark); }

/* Huecos de anuncio: altura reservada para que la página no salte */
.ad-slot { max-width: 1080px; margin: 24px auto; padding: 0 20px; min-height: 280px; text-align: center; }
.ad-slot .ad-label { display: block; font-size: .72rem; color: var(--text-muted); margin-bottom: 4px; }
.ad-slot ins { display: block; min-height: 250px; }
@media (min-width: 760px) { .ad-slot { min-height: 120px; } .ad-slot ins { min-height: 100px; } }

/* Pie */
.site-footer { background: #1e1b4b; }
@media (max-width: 440px) {
  .site-header .wrap { padding: 0 14px; }
  .brand { font-size: 1rem; gap: 7px; }
  .brand-logo { width: 30px; height: 30px; }
  .main-nav { gap: 8px; }
  .country-current { padding: 5px 9px; }
  .lang-switch { padding: 5px 10px; font-size: .85rem; }
}
/* Números más buscados y datos del número */
.top-searched { padding: 26px 0 8px; text-align: center; }
.top-searched h2 { margin: 0 0 6px; }
.top-searched .lead { max-width: 640px; margin: 0 auto 16px; }
.searched-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.searched-chips a { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 9px 14px; border-radius: 14px; background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow); font-weight: 800; }
.searched-chips a:hover { text-decoration: none; border-color: var(--brand); }
.searched-chips small { color: var(--text-muted); font-weight: 700; font-size: .78rem; }
.interest-line { margin: 10px 0 0; font-weight: 800; color: var(--text); }
.number-facts { padding: 10px 0 6px; }
.number-facts h2 { font-size: 1.25rem; }
.facts-note { font-size: .85rem; color: var(--text-muted); }

/* =====================================================================
   SELECTOR DE PAÍS DEL BUSCADOR (bandera + prefijo + panel con buscador)
   - Sin JS: <select> nativo transparente encima de la bandera.
   - Con JS (main.js añade .sc-on): la bandera es un botón que abre el panel.
   Las reglas llevan 3 clases a propósito: así ganan a ".search-box button"
   y ".search-box input" (los estilos del botón morado "Buscar número").
   ===================================================================== */
.search-country { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; margin-left: 4px; border-radius: 999px 0 0 999px; }
.search-box .search-country .search-country-face {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  width: auto; height: auto; min-width: 0; margin: 0; padding: 10px 12px 10px 14px;
  border: 0; border-right: 1px solid var(--border); border-radius: 999px 0 0 999px;
  background: transparent; box-shadow: none; transform: none; transition: background-color .15s ease, color .15s ease;
  color: var(--text); font-family: var(--font); font-size: 1rem; font-weight: 800; line-height: 1.2; letter-spacing: 0; text-align: left;
  white-space: nowrap; cursor: pointer; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.hero .search-box .search-country .search-country-face { font-size: 1.05rem; }
.search-box .search-country:hover .search-country-face,
.search-box .search-country .search-country-face:hover,
.search-box .search-country .search-country-face[aria-expanded="true"] { background: rgba(91, 75, 240, .08); color: var(--brand); box-shadow: none; transform: none; }
.search-box .search-country.sc-on .search-country-face { pointer-events: auto; }
.search-box .search-country .search-country-face:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.search-country img.sc-flag { display: block; flex: none; width: 24px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .14); object-fit: cover; }
.search-country span.sc-flag { font-size: 1.25rem; line-height: 1; }
.search-country .sc-prefix { font-variant-numeric: tabular-nums; }
.search-country .sc-caret { flex: none; width: 0; height: 0; margin-left: 1px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .6; transition: transform .2s ease; }
.search-country .search-country-face[aria-expanded="true"] .sc-caret { transform: rotate(180deg); }
.search-country-select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; border: 0; appearance: none; -webkit-appearance: none; }
.search-country.sc-on .search-country-select { display: none; }
.search-country:not(.sc-on):focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 480px) {
  .search-box .search-country .search-country-face { padding: 10px 8px 10px 10px; gap: 5px; }
  .hero .search-box .search-country .search-country-face { font-size: .98rem; }
}
:where([data-theme="dark"]) .search-box .search-country:hover .search-country-face,
:where([data-theme="dark"]) .search-box .search-country .search-country-face:hover,
:where([data-theme="dark"]) .search-box .search-country .search-country-face[aria-expanded="true"] { background: rgba(180, 185, 255, .12); color: #c7c9ff; }
:where([data-theme="dark"]) .search-country img.sc-flag { box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }

/* Panel de países: main.js lo pone al final de <body>, así nunca queda cortado ni tapado por otras secciones. */
.sc-pop {
  position: absolute; top: 0; left: 0; z-index: 1000;
  display: flex; flex-direction: column;
  width: 340px; max-width: calc(100vw - 24px); max-height: 460px;
  background: var(--bg-elevated); color: var(--text);
  border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(30, 27, 75, .22), 0 2px 6px rgba(30, 27, 75, .08);
  font-family: var(--font); font-size: 1rem; line-height: 1.3; text-align: left; overflow: hidden;
}
.sc-pop[hidden], .sc-backdrop[hidden], .sc-pop [hidden] { display: none; }
.sc-pop:focus { outline: none; }
.sc-pop-head { display: none; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 0 18px; }
.sc-pop-title { margin: 0; font-size: 1.1rem; font-weight: 900; }
.sc-pop-close {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 12px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.sc-pop-close:hover { background: rgba(91, 75, 240, .1); color: var(--brand); }
.sc-pop-search { position: relative; padding: 12px 12px 10px; border-bottom: 1px solid var(--border); }
.sc-pop-search svg { position: absolute; left: 25px; top: 50%; width: 18px; height: 18px; margin-top: 1px; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.sc-pop-search input {
  display: block; width: 100%; height: 46px; margin: 0; padding: 0 12px 0 40px;
  border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; font-weight: 700; box-shadow: none; -webkit-appearance: none; appearance: none;
}
.sc-pop-search input::placeholder { color: var(--text-muted); font-weight: 600; opacity: 1; }
.sc-pop-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91, 75, 240, .16); }
.sc-pop-list { position: relative; flex: 1 1 auto; min-height: 0; margin: 0; padding: 6px 8px 10px; list-style: none; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sc-group { padding: 10px 10px 4px; color: var(--text-muted); font-size: .78rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.sc-opt { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 10px; border-radius: 12px; cursor: pointer; font-weight: 700; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.sc-opt img { display: block; flex: none; width: 24px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .14); }
.sc-opt .sc-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-opt .sc-code { flex: none; color: var(--text-muted); font-size: .92rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sc-opt .sc-check { flex: none; display: inline-flex; width: 18px; height: 18px; color: var(--brand); visibility: hidden; }
.sc-opt .sc-check svg { width: 18px; height: 18px; }
.sc-opt.is-active { background: rgba(91, 75, 240, .09); }
.sc-opt[aria-selected="true"] { color: var(--brand); }
.sc-opt[aria-selected="true"] .sc-check { visibility: visible; }
.sc-empty { margin: 0; padding: 18px 16px 24px; color: var(--text-muted); font-size: .95rem; text-align: center; }
:where([data-theme="dark"]) .sc-pop { box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
:where([data-theme="dark"]) .sc-pop-close:hover { background: rgba(180, 185, 255, .12); color: #c7c9ff; }
:where([data-theme="dark"]) .sc-opt.is-active { background: rgba(180, 185, 255, .12); }
:where([data-theme="dark"]) .sc-opt[aria-selected="true"],
:where([data-theme="dark"]) .sc-opt .sc-check { color: #c7c9ff; }
:where([data-theme="dark"]) .sc-opt img { box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }
/* Celular: el panel ocupa casi toda la pantalla, con el fondo oscurecido detrás. */
.sc-backdrop { position: fixed; inset: 0; z-index: 999; background: rgba(17, 19, 42, .5); touch-action: none; }
.sc-pop.sc-sheet {
  position: fixed; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px;
  width: auto; max-width: none; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 20px;
}
.sc-pop.sc-sheet .sc-pop-head { display: flex; }
.sc-pop.sc-sheet .sc-opt { min-height: 52px; font-size: 1.02rem; }
html.sc-lock, html.sc-lock body { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .sc-pop:not([hidden]) { animation: sc-pop-in .14s ease-out; }
}
@keyframes sc-pop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.country-card.country-suggested { order: -1; outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- Secciones de contenido: blog, listas, operadoras, guías, contacto ---- */
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.topic-chips a { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); font-size: .9rem; font-weight: 600; }
.topic-chips a:hover { border-color: var(--brand); text-decoration: none; }
.topic-chips small { color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.number-table.ranked { counter-reset: rank; }
.number-table.ranked li, .number-table.ranked li:nth-child(n) { grid-template-columns: 2.2em 1fr auto; align-items: center; }
.number-table.ranked .nt-count { grid-column: auto; text-align: right; }
.number-table.official li { grid-template-columns: minmax(7.5em, auto) 1fr; align-items: center; gap: 4px 18px; }
.number-table.official .nt-count { grid-column: auto; text-align: left; font-size: .92rem; }
@media (max-width: 480px) { .number-table.official li { grid-template-columns: 1fr; } }
.number-table.ranked li::before { counter-increment: rank; content: counter(rank); color: var(--text-muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.empty-note { padding: 18px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-muted); text-align: center; }
.see-also, .see-all { margin: 22px 0 0; color: var(--text-muted); }
.see-all { text-align: center; font-weight: 700; }
.info-box { margin: 26px 0; padding: 18px 20px; border-radius: var(--radius); background: var(--bg-elevated); border: 1px solid var(--border); border-left: 4px solid var(--brand); }
.info-box h2 { margin: 0 0 6px; font-size: 1.05rem; }
.info-box p { margin: 0; }
.guide-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.guide-grid .card { padding: 18px 20px; gap: 8px; }
.guide-grid strong { font-size: 1.05rem; line-height: 1.3; }
.help-guides { padding: 30px 0 40px; }
.comment-date { display: inline !important; margin-left: 8px; }
.article-body h3 { margin: 22px 0 6px; font-size: 1.05rem; }
.about-page .lead { font-size: 1.1rem; color: var(--text); }
.nowrap { white-space: nowrap; }

/* =====================================================================
   MODO CLARO / OSCURO (botón sol y luna de la cabecera)
   Por defecto se ve claro. La luna pone data-theme="dark" en <html> y lo recuerda;
   theme.js lo aplica en <head> antes de pintar la página, así no hay parpadeo.
   ===================================================================== */
:root { color-scheme: light; }
:root:where([data-theme="dark"]) { color-scheme: dark; }
.theme-toggle {
  display: none; align-items: center; justify-content: center; flex: none;
  width: 38px; height: 38px; margin: 0; padding: 0;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text);
  cursor: pointer; transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.js .theme-toggle { display: inline-flex; } /* sin JavaScript el botón no serviría: no se muestra */
.theme-toggle:hover { color: var(--brand); border-color: var(--brand); }
.theme-toggle svg { display: block; width: 19px; height: 19px; }
.theme-toggle .ico-sun { display: none; }
:where([data-theme="dark"]) .theme-toggle { color: #fcd34d; }
:where([data-theme="dark"]) .theme-toggle:hover { border-color: #fcd34d; color: #fde68a; }
:where([data-theme="dark"]) .theme-toggle .ico-sun { display: block; }
:where([data-theme="dark"]) .theme-toggle .ico-moon { display: none; }
@media (max-width: 440px) {
  .theme-toggle { width: 34px; height: 34px; }
  .theme-toggle svg { width: 17px; height: 17px; }
}
/* Celulares muy angostos (320-360 px): la cabecera cabe sin moverse hacia los lados. */
@media (max-width: 360px) {
  .site-header .wrap { padding: 0 10px; }
  .brand { font-size: .94rem; gap: 6px; }
  .brand-logo { width: 28px; height: 28px; }
  .main-nav { gap: 6px; }
  .country-current { padding: 5px 7px; }
  .lang-switch { padding: 5px 8px; font-size: .8rem; }
  .theme-toggle { width: 32px; height: 32px; }
}
