  /* ==========================================================================
     Página de inicio (index.html) e ingreso (ingresar.html). Se cargan
     después de styles.css y usan sus mismos tokens (--bg, --panel, --accent,
     --sev-*), así que siguen el tema claro/oscuro y la estética Nocturne del
     panel. Mismas reglas de CSP: nada inline, nada de CDNs.
     ========================================================================== */

  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--divider);
  }

  .site-header-row {
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
  }

  .site-nav { display: flex; gap: 20px; margin-left: auto; }
  .site-nav a { color: var(--text-dim); text-decoration: none; font-size: 13.5px; }
  .site-nav a:hover { color: var(--text); }

  .site-actions { display: flex; align-items: center; gap: 10px; }
  /* Sin menú (ingresar.html), las acciones van igual a la derecha. */
  .brand-link + .site-actions { margin-left: auto; }

  /* Botón principal (relleno): solo en las llamadas a la acción de estas páginas. */
  .cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 9px 18px;
    font: 500 14.5px var(--sans);
    text-decoration: none;
    cursor: pointer;
  }
  .cta-btn:hover { background: color-mix(in srgb, var(--accent) 86%, #000); color: #fff; }
  :root[data-theme="light"] .cta-btn:hover { background: color-mix(in srgb, var(--accent) 86%, #fff); }

  .outline-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--divider);
    color: var(--text);
    border-radius: 8px;
    padding: 9px 18px;
    font: 500 14.5px var(--sans);
    text-decoration: none;
  }
  .outline-btn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }

  .header-btn { padding: 6px 14px; font-size: 13.5px; }

  /* styles.css define `main` para el panel (ancho máximo sin centrar y un
     brillo de fondo): estas páginas lo pisan. */
  .site-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px 64px;
    background: none;
  }

  .site-section { padding: 64px 0 0; }
  .site-section h2 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }
  /* ---------- páginas de texto (privacidad) ---------- */

  .legal { max-width: 760px; }
  .legal h1 { margin: 6px 0 12px; font-size: 34px; font-weight: 500; letter-spacing: -0.01em; }
  .legal h2 { margin: 32px 0 8px; font-size: 20px; }
  .legal p, .legal li { color: var(--text-dim); font-size: 15px; line-height: 1.6; }
  .legal ul { padding-left: 20px; }
  .legal li { margin: 4px 0; }
  .legal strong { color: var(--text); }

  .section-lede { margin: 0 0 28px; color: var(--text-dim); font-size: 15px; max-width: 680px; line-height: 1.55; }

  /* ---------- hero ---------- */

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    padding: 72px 0 24px;
  }

  /* El brillo del hero va en el fondo de la página entera: puesto en el
     hero, se cortaba en su borde izquierdo y se veía un rectángulo. */
  .landing { background: radial-gradient(900px 420px at 18% 40px, color-mix(in srgb, var(--accent) 11%, transparent), transparent 70%) no-repeat, var(--bg); }

  .hero h1 {
    margin: 0 0 16px;
    font-size: 44px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .hero-lede { margin: 0 0 28px; font-size: 16.5px; line-height: 1.6; color: var(--text-dim); max-width: 560px; }
  .hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
  .hero-note { margin-top: 16px; font-size: 12.5px; color: var(--text-dim); }

  /* Tarjeta de ejemplo: un aviso real del producto (texto fijo de ejemplo). */
  .sample-alert {
    background: var(--panel);
    box-shadow: var(--shadow-md);
    border-radius: 12px;
    padding: 18px 20px;
  }
  .sample-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 12px; color: var(--text-dim); }
  .sample-head .icon { font-size: 16px; color: var(--accent); }
  .sample-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--sev-critical);
    background: color-mix(in srgb, var(--sev-critical) 12%, transparent);
  }
  .sample-from { font-weight: 500; margin-bottom: 2px; }
  .sample-subject { color: var(--text-dim); font-size: 13px; margin-bottom: 14px; }
  .sample-reason {
    display: flex;
    gap: 8px;
    font-size: 13px;
    line-height: 1.45;
    padding: 8px 10px;
    border-radius: 8px;
    margin-top: 6px;
  }
  .sample-reason .icon { margin-top: 2px; }
  .sample-reason.danger { color: var(--sev-critical); background: color-mix(in srgb, var(--sev-critical) 9%, transparent); }
  .sample-reason.warn { color: var(--sev-medium); background: color-mix(in srgb, var(--sev-medium) 9%, transparent); }
  .sample-caption { margin-top: 10px; font-size: 11.5px; color: var(--text-dim); text-align: right; }

  /* ---------- tarjetas ---------- */

  .card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .card-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .site-card {
    background: var(--panel);
    box-shadow: var(--shadow-sm);
    border-radius: 10px;
    padding: 20px;
  }
  .site-card h3 { margin: 12px 0 6px; font-size: 15.5px; font-weight: 500; }
  .site-card p { margin: 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.55; }
  .card-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--tint-accent);
    color: var(--accent);
    font-size: 18px;
  }
  .card-icon.danger { background: color-mix(in srgb, var(--sev-critical) 14%, transparent); color: var(--sev-critical); }

  .steps { counter-reset: step; margin-bottom: 16px; }
  .steps .site-card { position: relative; }
  .step-label { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }

  /* ---------- números de la evaluación ---------- */

  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .stat { background: var(--panel); box-shadow: var(--shadow-sm); border-radius: 10px; padding: 20px; }
  .stat-value { font-size: 34px; font-weight: 500; letter-spacing: -0.02em; color: var(--tx-accent); }
  .stat-label { margin-top: 4px; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
  .fine-print { margin-top: 14px; font-size: 12.5px; color: var(--text-dim); max-width: 760px; line-height: 1.55; }

  /* ---------- seguridad ---------- */

  .check-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
  .check-list li { display: flex; gap: 10px; font-size: 14px; line-height: 1.55; }
  .check-list .icon { color: var(--sev-low); font-size: 17px; margin-top: 2px; }
  .check-list strong { font-weight: 500; }
  .check-list span { color: var(--text-dim); }

  .final-cta {
    margin-top: 64px;
    padding: 36px;
    border-radius: 14px;
    background: var(--panel);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  .final-cta h2 { margin: 0 0 6px; font-size: 24px; font-weight: 500; }
  .final-cta p { margin: 0; color: var(--text-dim); }

  .site-footer {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 24px 40px;
    color: var(--text-dim);
    font-size: 12.5px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 -1px 0 var(--divider);
  }

  .footer-links { display: flex; gap: 18px; }
  .footer-links a { color: var(--text-dim); text-decoration: none; }
  .footer-links a:hover { color: var(--text); }

  /* ---------- planes ---------- */

  .plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
  .plan {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--panel);
    box-shadow: var(--shadow-sm);
    border-radius: 12px;
    padding: 24px;
  }
  .plan.featured { box-shadow: 0 0 0 1px var(--accent), 0 8px 24px color-mix(in srgb, var(--accent) 18%, transparent); }
  .plan-badge {
    position: absolute;
    top: -11px;
    left: 24px;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
  }
  .plan-name { font-size: 13px; font-weight: 500; color: var(--tx-accent); text-transform: uppercase; letter-spacing: 0.08em; }
  .plan-price { margin-top: 10px; font-size: 30px; font-weight: 500; letter-spacing: -0.02em; }
  .plan-price span { font-size: 13px; font-weight: 400; color: var(--text-dim); letter-spacing: 0; }
  .plan-note { margin-top: 2px; font-size: 12.5px; color: var(--text-dim); }
  .plan-list { list-style: none; margin: 18px 0 22px; padding: 0; display: grid; gap: 8px; flex: 1; }
  .plan-list li { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.45; }
  .plan-list .icon { color: var(--sev-low); margin-top: 3px; }
  .plan-btn { justify-content: center; }

  /* ---------- contacto ---------- */

  .contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .contact-btn { margin-top: 16px; }
  .contact-warning { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sev-medium) 45%, transparent); }

  /* ---------- ingreso ---------- */

  .auth-page {
    max-width: none;
    min-height: calc(100vh - 56px);
    display: grid;
    place-items: center;
    padding: 40px 16px;
    background: radial-gradient(700px 320px at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
  }

  .auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    box-shadow: var(--shadow-md);
    border-radius: 14px;
    padding: 32px 28px;
  }
  .auth-card h1 { margin: 0 0 8px; font-size: 26px; font-weight: 500; letter-spacing: -0.01em; }
  .auth-lede { margin: 0 0 24px; color: var(--text-dim); font-size: 14px; line-height: 1.55; }

  .microsoft-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 8px;
    border: 1px solid var(--divider);
    background: var(--bg);
    color: var(--text);
    font: 500 15px var(--sans);
  }
  .microsoft-btn:hover { background: color-mix(in srgb, var(--text) 7%, var(--bg)); }
  .microsoft-btn .icon { font-size: 18px; }
  .microsoft-btn[hidden] { display: none; }

  .auth-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
  .auth-remember { margin-top: 14px; }

  .auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
    color: var(--text-dim);
    font-size: 12px;
  }
  .auth-divider::before,
  .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--divider); }

  .auth-alt summary { cursor: pointer; font-size: 13.5px; color: var(--text); }
  .auth-alt summary:hover { color: var(--tx-accent); }
  .auth-alt[open] summary { margin-bottom: 12px; }
  .auth-form { display: grid; gap: 10px; }
  .auth-form input[type="password"] {
    width: 100%;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--divider);
    border-radius: 8px;
    padding: 8px 10px;
    font: 14px/1.5 var(--mono);
  }
  .auth-form input[type="password"]:focus { outline: none; border-color: var(--accent); }
  .auth-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
  .auth-row { display: flex; flex-wrap: wrap; gap: 8px; }

  .auth-notice { display: none; margin-bottom: 18px; padding: 10px 14px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
  .auth-notice.visible { display: block; }
  .auth-notice.error {
    color: var(--sev-critical);
    background: color-mix(in srgb, var(--sev-critical) 9%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sev-critical) 50%, transparent);
  }
  .auth-notice.info { color: var(--text); background: var(--tint-accent); }

  .auth-token-box { display: grid; gap: 10px; margin-top: 12px; }
  .auth-token-box[hidden] { display: none; }
  .auth-token {
    font: 12.5px var(--mono);
    color: var(--tx-accent);
    background: var(--bg);
    border-radius: 8px;
    padding: 10px;
    word-break: break-all;
    user-select: all;
  }
  .auth-warning { font-size: 12.5px; color: var(--sev-medium); line-height: 1.5; }
  .auth-footer { margin-top: 22px; font-size: 12px; color: var(--text-dim); line-height: 1.55; }

  /* ---------- responsive ---------- */

  @media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding-top: 48px; gap: 32px; }
    .hero h1 { font-size: 34px; }
    .card-grid, .card-grid.four, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .plans { grid-template-columns: 1fr; max-width: 520px; }
    .site-nav { display: none; }
    .site-nav + .site-actions { margin-left: auto; }
  }

  @media (max-width: 600px) {
    .site-header-row, .site-main, .site-footer { padding-left: 16px; padding-right: 16px; }
    .card-grid, .card-grid.four, .stats, .check-list, .contact-grid { grid-template-columns: 1fr; }
    .contact-btn { word-break: break-all; }
    .final-cta { flex-direction: column; align-items: flex-start; padding: 24px; }
    .site-footer { flex-direction: column; }
    .auth-card { padding: 24px 18px; }
  }
