/* Cuidamos Tu Negocio — estilos. Sin fuentes externas: se usa la tipografía del sistema. */
:root {
  --azul: #0f2547;
  --verde: #1fbf8f;
  --verde-texto: #0b7a59;
  --ambar: #f5a524;
  --rojo: #d6343a;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --texto: #1b2433;
  --texto-2: #5b6678;
  --linea: #e2e7ef;
  --sombra: 0 1px 2px rgba(15, 37, 71, .06), 0 8px 24px rgba(15, 37, 71, .06);
  --radio: 12px;
  --ancho: 1080px;
  --lectura: 720px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1730;
    --surface: #13244a;
    --texto: #eef2f8;
    --texto-2: #aab6cc;
    --linea: #24376a;
    --verde-texto: #35d4a4;
    --rojo: #ff6b70;
    --sombra: 0 1px 2px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--texto);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
img, svg { max-width: 100%; }
a { color: var(--verde-texto); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ambar); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ambar); color: #111; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 16px; }
.lectura { max-width: var(--lectura); margin: 0 auto; }

/* Cabecera */
.site-header { background: var(--azul); color: #fff; position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; color: #fff; text-decoration: none; }
.brand img { display: block; height: 40px; width: auto; }
.brand-wide { display: none !important; }
@media (min-width: 760px) { .brand-wide { display: block !important; } .brand-compact { display: none !important; } }
.foot-logo { display: block; height: 44px; width: auto; margin-bottom: 14px; }
.hero .wrap { position: relative; }
.hero-logo { display: none; }
@media (min-width: 900px) {
  .hero-logo { display: block; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 280px; height: 280px; }
}
.nav { display: none; gap: 4px; align-items: center; }
.nav a { color: #dbe5f5; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border-radius: 8px; font-weight: 700; border: 1px solid rgba(255, 255, 255, .35); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: rgba(255, 255, 255, .12); }
.menu-panel { position: absolute; right: 0; top: 48px; background: var(--azul); border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--radio); padding: 8px; min-width: 220px; display: grid; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.menu-panel a { color: #fff; text-decoration: none; padding: 12px; border-radius: 8px; font-weight: 600; }
.menu-panel a:hover, .menu-panel a[aria-current="page"] { background: rgba(255, 255, 255, .12); }
@media (min-width: 860px) {
  .nav { display: flex; }
  .menu { display: none; }
}

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 10px; border: 0; background: var(--verde); color: var(--azul); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.05); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn.sec { background: transparent; color: var(--texto); border: 2px solid var(--linea); }
.btn.sec:hover { border-color: var(--verde); }
.btn.soon { background: var(--linea); color: var(--texto-2); cursor: default; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--azul) 0%, #17335f 100%); color: #fff; padding: 48px 0 56px; }
.hero h1 { margin: 0 0 12px; font-size: clamp(1.9rem, 5vw, 2.9rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; max-width: 18ch; }
.hero p.lead { margin: 0 0 24px; font-size: 1.15rem; color: #cfdbf0; max-width: 54ch; }
.hero .lead a, .hero .form-note a { color: #fff; }
.m0 { margin: 0; }
.mb8 { margin-bottom: 8px; }
.mt20 { margin-top: 20px; }
.mt28 { margin-top: 28px; }
.aviso.grande { font-size: 1.05rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.chips li { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 4px 12px; font-size: .92rem; color: #e6eefb; }

/* Formulario correo */
.email-form { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.email-form input[type="email"] { min-height: 52px; border-radius: 10px; border: 2px solid transparent; padding: 0 16px; font: inherit; font-size: 1.05rem; background: #fff; color: #111; width: 100%; }
.email-form input[type="email"]:focus-visible { border-color: var(--ambar); outline: none; }
.email-form .btn { width: 100%; }
@media (min-width: 560px) {
  .email-form { flex-direction: row; }
  .email-form .btn { width: auto; white-space: nowrap; }
}
.form-note { font-size: .92rem; color: #b8c7e2; margin: 10px 0 0; max-width: 56ch; }
.panel .form-note { color: var(--texto-2); }

/* Resultado */
.result { margin-top: 20px; max-width: 760px; }
.result:empty { display: none; }
.card { background: var(--surface); color: var(--texto); border: 1px solid var(--linea); border-radius: var(--radio); padding: 20px; box-shadow: var(--sombra); }
.card h2, .card h3 { margin-top: 0; line-height: 1.25; }
.card.ok { border-left: 6px solid var(--verde); }
.card.warn { border-left: 6px solid var(--ambar); }
.card.bad { border-left: 6px solid var(--rojo); }
.card ul { padding-left: 1.2rem; }
.breach-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 !important; list-style: none; }
.breach-list li { background: var(--bg); border: 1px solid var(--linea); border-radius: 8px; padding: 2px 10px; font-size: .95rem; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--linea); border-top-color: var(--verde); border-radius: 50%; animation: giro .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } html { scroll-behavior: auto; } }

/* Secciones */
section.block { padding: 48px 0; }
section.block.alt { background: var(--surface); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px 24px; margin-bottom: 20px; }
.sec-head h2 { margin: 0; font-size: 1.7rem; line-height: 1.2; letter-spacing: -.01em; }
.sec-head p { margin: 4px 0 0; color: var(--texto-2); }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.c2, .grid.c3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.c3 { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--linea); border-radius: var(--radio); padding: 18px; text-decoration: none; color: var(--texto); box-shadow: var(--sombra); }
a.tile:hover { border-color: var(--verde); }
.tile h3 { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.tile p { margin: 0; color: var(--texto-2); font-size: .98rem; }
.tile .meta { font-size: .85rem; color: var(--texto-2); }
.tile .num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--azul); color: #fff; font-weight: 800; font-size: .95rem; }
.tile.hecho .num { background: var(--verde); color: var(--azul); }
.tile .estado { font-size: .85rem; font-weight: 700; color: var(--verde-texto); min-height: 1.2em; }

/* Alertas */
.alertas { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.alerta { background: var(--surface); border: 1px solid var(--linea); border-left: 6px solid var(--ambar); border-radius: var(--radio); padding: 14px 16px; display: grid; gap: 4px; }
.alerta .codigo { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; color: var(--texto-2); font-weight: 700; }
.alerta a { color: var(--texto); font-weight: 700; text-decoration: none; display: block; padding: 6px 0; overflow-wrap: anywhere; }
.alerta a:hover { text-decoration: underline; }
.alertas-meta { font-size: .9rem; color: var(--texto-2); margin: 12px 0 0; }

/* Bloques Chile / Mundo */
section.chile, section.mundo-bloque { scroll-margin-top: 80px; }
section.chile h2, section.mundo-bloque h2 { margin: 0 0 8px; font-size: 1.5rem; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.origen { margin: 0 0 10px; }
.origen span { display: inline-block; font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 4px 12px; border: 1px solid var(--linea); background: var(--surface); color: var(--texto-2); }
.origen-cl { border-left: 6px solid var(--ambar); }
.origen-mundo { border-left: 6px solid var(--verde); }
.atribucion { margin-top: 14px; overflow-wrap: anywhere; }

/* Mundo (noticias internacionales) */
.mundo { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.mundo-item { background: var(--surface); border: 1px solid var(--linea); border-left: 6px solid var(--verde); border-radius: var(--radio); padding: 14px 16px; display: grid; gap: 4px; overflow-wrap: anywhere; }
.mundo-item a.titulo { color: var(--texto); font-weight: 700; text-decoration: none; display: block; padding: 6px 0; }
.mundo-item a.titulo:hover { text-decoration: underline; }
.mundo-meta { margin: 0; font-size: .85rem; font-weight: 700; color: var(--texto-2); }
.mundo-resumen { margin: 2px 0 0; font-size: .95rem; color: var(--texto-2); }
.vacio { background: var(--surface); border: 1px dashed var(--linea); border-radius: var(--radio); padding: 18px; color: var(--texto-2); }

/* Progreso */
.progreso { height: 10px; background: var(--linea); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.progreso > span { display: block; height: 100%; width: 0; background: var(--verde); transition: width .3s; }

/* Artículos */
.articulo { padding: 36px 0 56px; }
.articulo h1 { font-size: clamp(1.8rem, 4.5vw, 2.5rem); line-height: 1.2; letter-spacing: -.02em; margin: 8px 0 12px; }
.articulo .meta { color: var(--texto-2); font-size: .95rem; margin-bottom: 24px; }
.crumbs { font-size: .92rem; color: var(--texto-2); }
.crumbs a { color: var(--texto-2); }
.prose h2 { margin: 2em 0 .5em; font-size: 1.5rem; line-height: 1.25; }
.prose h3 { margin: 1.6em 0 .4em; font-size: 1.2rem; }
.prose p, .prose li { max-width: 68ch; }
.prose li { margin: .35em 0; }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-left: 6px solid var(--verde); background: var(--surface); border-radius: 0 var(--radio) var(--radio) 0; }
.prose blockquote p { margin: .3em 0; }
.prose code { background: var(--surface); border: 1px solid var(--linea); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
.prose hr { border: 0; border-top: 1px solid var(--linea); margin: 2em 0; }
.prose ul.check { list-style: none; padding-left: 0; }
.prose ul.check li { padding-left: 32px; position: relative; }
.prose ul.check li::before { content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border: 2px solid var(--verde-texto); border-radius: 5px; }
.lec-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 32px; }
.cta { background: var(--azul); color: #fff; border-radius: var(--radio); padding: 24px; margin-top: 40px; }
.cta h2, .cta h3 { margin: 0 0 6px; color: #fff; }
.cta p { margin: 0 0 14px; color: #cfdbf0; }
.cta a:not(.btn) { color: #fff; }
.aviso { font-size: .92rem; color: var(--texto-2); }

/* Pie */
.site-footer { background: var(--azul); color: #cfdbf0; padding: 40px 0 32px; margin-top: 0; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .site-footer .cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 { font-size: 1rem; color: #fff; margin: 0 0 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer .legal { border-top: 1px solid rgba(255, 255, 255, .18); margin-top: 24px; padding-top: 16px; font-size: .88rem; color: #aebbd3; }
.lista-pasos { counter-reset: paso; list-style: none; padding: 0; display: grid; gap: 12px; }
.lista-pasos li { counter-increment: paso; padding-left: 44px; position: relative; }
.lista-pasos li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--verde); color: var(--azul); font-weight: 800; display: grid; place-items: center; }

/* Mundo: selector por fuente (mobile-first) + paridad con tarjetas de Chile.
 * Las tarjetas reutilizan .alertas/.alerta tal cual (mismos bordes, espaciados
 * y tipografías que las alertas del CSIRT). Aquí solo se suma la fecha y el
 * resumen con el mismo lenguaje visual, y el estilo del desplegable. */
.mundo-filtro { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.mundo-filtro-etiqueta { font-weight: 800; font-size: .95rem; }
.mundo-select {
  min-height: 48px;
  width: 100%;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--texto);
  background: var(--surface);
  border: 2px solid var(--linea);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color .2s ease;
}
.mundo-select:hover { border-color: var(--verde); }
.mundo-conteo { margin: 0; font-size: .9rem; color: var(--texto-2); }
.mundo-resultado { display: grid; }
@media (min-width: 640px) {
  .mundo-filtro { flex-direction: row; align-items: center; gap: 12px; }
  .mundo-filtro-etiqueta { white-space: nowrap; }
  .mundo-select { width: auto; min-width: 280px; max-width: 420px; }
  .mundo-conteo { margin-left: auto; text-align: right; }
}
/* Fecha y resumen dentro de la tarjeta .alerta (mismo tono que el resto). */
.alerta-meta { margin: 0; font-size: .85rem; font-weight: 700; color: var(--texto-2); }
.alerta-resumen { margin: 2px 0 0; font-size: .95rem; color: var(--texto-2); overflow-wrap: anywhere; }
