/* =========================================================================
   NetSereno · Asistente de denuncias digitales
   Misma identidad que el detector de phishing y el escáner OWASP: farol,
   navy, oro y crema; tipografía editorial sobre un lienzo cálido.
   El documento generado, en cambio, no lleva marca alguna.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --cream:       #F6F2E9;
    --cream-2:     #FBF8F1;
    --paper:       #FFFFFF;
    --navy:        #17294D;
    --navy-700:    #23406E;
    --navy-050:    rgba(23, 41, 77, 0.06);
    --gold:        #B58F4E;
    --gold-600:    #A07C3C;
    --gold-050:    #EFE6D2;
    --ink:         #1E2740;
    --text:        #3C4257;
    --muted:       #6B7183;
    --line:        #E7E0D0;
    --line-soft:   #EFEADC;

    --red:    #B4321F;  --red-bg:   #FBEAE7;  --red-line:   #F0C7C0;
    --amber:  #8A5D12;  --amber-bg: #FAF1DE;  --amber-line: #EEDCB5;
    --green:  #1F6340;  --green-bg: #E7F3EC;  --green-line: #C6E3D2;

    --serif: 'Cormorant Garamond', 'Georgia', serif;
    --sans:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono:  ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

    --shadow-sm: 0 1px 2px rgba(23, 41, 77, 0.05);
    --shadow:    0 10px 30px -12px rgba(23, 41, 77, 0.20);
    --radius:    16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--text);
    background: radial-gradient(1200px 600px at 50% -200px, #FCF9F1 0%, var(--cream) 55%) fixed;
    line-height: 1.62;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

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

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ------------------------------------------------------------------ Topbar */
.topbar {
    border-bottom: 1px solid var(--line);
    background: rgba(251, 248, 241, 0.82);
    backdrop-filter: blur(8px);
    position: sticky; top: 0; z-index: 30;
}
.topbar .wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; min-height: 68px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand:hover { text-decoration: none; }
.brand svg { height: 38px; width: auto; display: block; }
.wordmark {
    font-family: var(--serif); font-weight: 700; font-size: 27px;
    letter-spacing: 0.2px; line-height: 1;
}
.wordmark .net { color: var(--navy); }
.wordmark .sereno { color: var(--gold); }
.topbar-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.topbar-nav a {
    font-size: 14px; font-weight: 500; color: var(--muted);
    display: inline-flex; align-items: center; gap: 6px;
}
.topbar-nav a:hover { color: var(--navy); }

/* -------------------------------------------------------------------- Hero */
.hero { text-align: center; padding: 56px 0 26px; }
.eyebrow {
    font-family: var(--sans); font-weight: 600; font-size: 12.5px;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-600);
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
}
.eyebrow::before, .eyebrow::after {
    content: ""; width: 26px; height: 1px; background: var(--gold-050);
}
h1 {
    font-family: var(--serif); font-weight: 600;
    font-size: clamp(32px, 5.6vw, 50px); line-height: 1.08;
    color: var(--navy); margin: 0 0 16px;
}
h1 em { color: var(--gold); font-style: italic; }
.lead { max-width: 660px; margin: 0 auto; font-size: 17px; color: var(--text); }
.trust {
    display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center;
    margin-top: 24px;
}
.trust span {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13.5px; color: var(--muted); font-weight: 500;
}
.trust svg { width: 16px; height: 16px; color: var(--gold); flex: none; }

/* -------------------------------------------------------------------- Card */
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-top: 18px;
}
.card + .card { margin-top: 22px; }

/* ----------------------------------------------------------------- Stepper */
.stepper {
    display: flex; gap: 6px; flex-wrap: wrap;
    border-bottom: 1px solid var(--line-soft); padding-bottom: 18px; margin-bottom: 26px;
}
.step {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--muted);
    padding: 6px 12px; border-radius: 999px; background: var(--cream);
    border: 1px solid var(--line); white-space: nowrap;
}
.step .n {
    width: 20px; height: 20px; border-radius: 50%; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--line); color: var(--navy); font-size: 11.5px;
}
.step.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.step.active .n { background: var(--gold); color: #241A06; }
.step.done { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
.step.done .n { background: var(--green); color: #fff; }

/* ------------------------------------------------------------------ Pasos  */
.paso > h2 {
    font-family: var(--serif); font-size: 27px; font-weight: 600;
    color: var(--navy); margin: 0 0 6px; line-height: 1.2;
}
.paso > .paso-ayuda { margin: 0 0 22px; color: var(--muted); font-size: 14.5px; }

fieldset { border: 0; padding: 0; margin: 0 0 26px; }
legend {
    font-size: 16px; font-weight: 600; color: var(--ink); padding: 0;
    margin-bottom: 4px;
}
.campo-ayuda { font-size: 13.5px; color: var(--muted); margin: 0 0 14px; }

/* Tarjetas seleccionables */
.opciones { display: grid; gap: 10px; }
.opciones.dos { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.opcion {
    display: flex; gap: 12px; align-items: flex-start;
    border: 1.5px solid var(--line); border-radius: 12px;
    padding: 14px 16px; cursor: pointer; background: var(--cream-2);
    transition: border-color 0.15s ease, background 0.15s ease;
}
.opcion:hover { border-color: var(--gold); background: #FBF7EC; }
.opcion input { margin: 3px 0 0; width: 17px; height: 17px; accent-color: var(--navy); flex: none; }
.opcion:has(input:checked) {
    border-color: var(--navy); background: var(--paper); box-shadow: var(--shadow-sm);
}
.opcion-texto b { display: block; color: var(--ink); font-weight: 600; font-size: 15px; }
.opcion-texto small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* Tarjetas de categoría */
.categorias { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }
.categoria {
    text-align: left; width: 100%; cursor: pointer;
    border: 1.5px solid var(--line); border-radius: 14px; padding: 18px;
    background: var(--cream-2); font-family: var(--sans);
    display: flex; gap: 14px; align-items: flex-start;
    transition: border-color 0.15s ease, transform 0.06s ease, background 0.15s ease;
}
.categoria:hover { border-color: var(--gold); background: #FBF7EC; }
.categoria:active { transform: translateY(1px); }
.categoria.sel { border-color: var(--navy); background: var(--paper); box-shadow: var(--shadow-sm); }
.categoria .ic {
    width: 38px; height: 38px; border-radius: 10px; flex: none;
    background: var(--navy); color: var(--gold);
    display: flex; align-items: center; justify-content: center;
}
.categoria .ic svg { width: 20px; height: 20px; }
.categoria h3 {
    margin: 0 0 4px; font-size: 15.5px; font-weight: 600; color: var(--ink);
    font-family: var(--sans); line-height: 1.35;
}
.categoria p { margin: 0; font-size: 13.5px; color: var(--muted); }
.categoria ul { margin: 8px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--muted); }
.categoria ul li { margin-bottom: 2px; }

/* Selector territorial */
select, input[type=text], input[type=email], input[type=tel], input[type=date], textarea {
    width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
    padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--cream-2); line-height: 1.5;
}
textarea { min-height: 130px; resize: vertical; }
select:focus, input:focus, textarea:focus {
    outline: none; border-color: var(--navy-700);
    box-shadow: 0 0 0 3px rgba(35, 64, 110, 0.12);
}
.grid-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo.ancho { grid-column: 1 / -1; }
.campo label { font-size: 13px; font-weight: 600; color: var(--ink); }
.campo .pista { font-size: 12.5px; color: var(--muted); }

.grupo-campos { margin-bottom: 26px; }
.grupo-campos > h3 {
    font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--navy);
    margin: 0 0 4px;
}
.grupo-campos > .nota { font-size: 13px; color: var(--muted); margin: 0 0 14px; }

/* ---------------------------------------------------------------- Botones  */
.btn {
    font-family: var(--sans); font-weight: 600; font-size: 15px;
    border-radius: 11px; padding: 12px 22px; cursor: pointer;
    border: 1px solid transparent; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    transition: transform 0.05s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 8px 20px -8px rgba(23, 41, 77, 0.55); }
.btn-primary:hover:not(:disabled) { background: #12213E; color: #fff; text-decoration: none; }
.btn-gold { background: var(--gold); color: #241A06; box-shadow: 0 8px 20px -8px rgba(181, 143, 78, 0.6); }
.btn-gold:hover:not(:disabled) { background: var(--gold-600); color: #241A06; text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--navy); }
.btn-ghost:hover:not(:disabled) { border-color: var(--navy-700); background: var(--navy-050); text-decoration: none; }
.acciones { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.acciones .crece { flex: 1; }

/* ------------------------------------------------------------------ Avisos */
.aviso {
    border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px;
    padding: 14px 16px; margin-bottom: 12px; background: var(--cream-2);
    display: flex; gap: 12px; align-items: flex-start;
}
.aviso svg { width: 19px; height: 19px; flex: none; margin-top: 2px; }
.aviso h4 { margin: 0 0 3px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.aviso p { margin: 0; font-size: 13.8px; }
.aviso.bloqueo  { border-left-color: var(--red);   background: var(--red-bg);   border-color: var(--red-line); }
.aviso.bloqueo svg, .aviso.bloqueo h4 { color: var(--red); }
.aviso.urgente  { border-left-color: var(--amber); background: var(--amber-bg); border-color: var(--amber-line); }
.aviso.urgente svg, .aviso.urgente h4 { color: var(--amber); }
.aviso.info     { border-left-color: var(--navy-700); }
.aviso.info svg { color: var(--navy-700); }

.disclaimer {
    border: 1px solid var(--gold-050); background: #FDFAF3; border-radius: 12px;
    padding: 16px 18px; font-size: 13.5px; color: var(--text); margin-top: 18px;
}
.disclaimer b { color: var(--navy); }
.disclaimer.sticky { position: sticky; bottom: 0; z-index: 5; box-shadow: var(--shadow); }

.consentimiento {
    display: flex; gap: 11px; align-items: flex-start; margin: 18px 0;
    font-size: 13.5px; color: var(--text);
    border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
    background: var(--cream-2); cursor: pointer;
}
.consentimiento input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--navy); flex: none; }

/* ----------------------------------------------------------- Destinatarios */
.destinatarios { display: flex; flex-direction: column; gap: 14px; }
.destinatario {
    border: 1px solid var(--line); border-radius: 12px; padding: 18px;
    background: var(--cream-2); position: relative;
}
.destinatario.principal {
    border-color: var(--navy); background: var(--paper); box-shadow: var(--shadow-sm);
}
.destinatario-cabecera { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.orden {
    width: 28px; height: 28px; border-radius: 50%; flex: none;
    background: var(--navy); color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; font-family: var(--serif);
}
.destinatario h3 {
    margin: 0; font-size: 16.5px; font-weight: 600; color: var(--ink);
    font-family: var(--sans); line-height: 1.35; flex: 1; min-width: 200px;
}
.etiqueta {
    font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    padding: 3px 9px; border-radius: 6px;
    color: var(--navy); background: var(--gold-050); border: 1px solid #E2D3B3;
}
.destinatario .motivo { margin: 10px 0 0; font-size: 14px; }
.destinatario .via {
    margin: 10px 0 0; font-size: 13.5px; color: var(--muted);
    padding-top: 10px; border-top: 1px dashed var(--line);
}
.destinatario .plazo {
    margin: 8px 0 0; font-size: 13.5px; color: var(--amber); font-weight: 500;
    display: flex; gap: 7px; align-items: flex-start;
}
.destinatario .plazo svg { width: 15px; height: 15px; flex: none; margin-top: 3px; }
.destinatario ul { margin: 10px 0 0; padding-left: 18px; font-size: 13.2px; color: var(--muted); }
.destinatario ul li { margin-bottom: 4px; }

.apoyo { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.apoyo .destinatario { background: var(--cream); }

/* ------------------------------------------------------------ Documento    */
.doc-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.doc-tab {
    border: 1px solid var(--line); background: var(--cream); border-radius: 9px;
    padding: 8px 14px; font-family: var(--sans); font-size: 13.5px; font-weight: 600;
    color: var(--muted); cursor: pointer;
}
.doc-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.documento {
    border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
    padding: 26px 28px; max-height: 560px; overflow-y: auto;
    font-family: var(--mono); font-size: 13px; line-height: 1.7;
    white-space: pre-wrap; word-break: break-word; color: var(--ink);
}
.documento mark {
    background: var(--gold-050); color: var(--gold-600); font-weight: 600;
    padding: 0 3px; border-radius: 3px;
}
.recordatorio {
    font-size: 13.5px; color: var(--amber); background: var(--amber-bg);
    border: 1px solid var(--amber-line); border-radius: 10px;
    padding: 12px 14px; margin-bottom: 14px;
}

/* --------------------------------------------------------------- Checklist */
.checklist { list-style: none; padding: 0; margin: 0; counter-reset: paso; }
.checklist li {
    position: relative; padding: 0 0 16px 38px; counter-increment: paso;
}
.checklist li::before {
    content: counter(paso);
    position: absolute; left: 0; top: 1px;
    width: 25px; height: 25px; border-radius: 50%;
    background: var(--navy); color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}
.checklist b { display: block; color: var(--ink); font-size: 14.5px; }
.checklist span { font-size: 13.5px; color: var(--text); }

/* --------------------------------------------------------------------- CTA */
.cta {
    margin-top: 26px; border-radius: 14px; padding: 24px 26px;
    background: linear-gradient(120deg, var(--navy) 0%, #1E355F 100%); color: #EAE6DB;
    position: relative; overflow: hidden;
}
.cta::after {
    content: ""; position: absolute; right: -30px; top: -30px; width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(181, 143, 78, 0.35), transparent 70%);
}
.cta .cta-title { font-family: var(--serif); font-size: 21px; color: #fff; margin-bottom: 8px; }
.cta p { margin: 0 0 14px; font-size: 14.5px; position: relative; }
.cta a.btn { position: relative; }

/* ------------------------------------------------------------------ Cargando */
.cargando { text-align: center; padding: 48px 0; }
.farol { display: inline-block; transform-origin: 50% 6px; animation: swing 1.9s infinite ease-in-out; }
.farol svg { height: 66px; filter: drop-shadow(0 6px 14px rgba(181, 143, 78, 0.35)); }
.cargando p { margin-top: 14px; color: var(--navy); font-family: var(--serif); font-size: 20px; }
@keyframes swing {
    0%, 100% { transform: rotate(10deg); }
    50%      { transform: rotate(-10deg); }
}
@media (prefers-reduced-motion: reduce) {
    .farol { animation: none; }
    html { scroll-behavior: auto; }
}

.error {
    background: var(--red-bg); border: 1px solid var(--red-line); color: var(--red);
    padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-top: 16px;
}

/* -------------------------------------------------------------- Guías (SEO) */
.guia-cuerpo h2 {
    font-family: var(--serif); font-size: 29px; font-weight: 600; color: var(--navy);
    margin: 38px 0 12px; line-height: 1.2;
}
.guia-cuerpo h3 {
    font-size: 17px; font-weight: 600; color: var(--ink); margin: 24px 0 8px;
}
.guia-cuerpo p { font-size: 16px; }
.guia-cuerpo ul, .guia-cuerpo ol { font-size: 15.5px; padding-left: 22px; }
.guia-cuerpo li { margin-bottom: 7px; }
.faq details {
    border: 1px solid var(--line); border-radius: 11px; background: var(--cream-2);
    padding: 14px 18px; margin-bottom: 10px;
}
.faq summary {
    font-weight: 600; color: var(--ink); cursor: pointer; font-size: 15.5px;
    list-style: none; display: flex; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; font-size: 14.8px; }

.indice-guias { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.indice-guias a {
    display: block; border: 1px solid var(--line); border-radius: 12px;
    padding: 16px 18px; background: var(--cream-2); color: var(--ink);
}
.indice-guias a:hover { border-color: var(--gold); background: #FBF7EC; text-decoration: none; }
.indice-guias b { display: block; font-size: 15px; margin-bottom: 4px; color: var(--navy); }
.indice-guias span { font-size: 13.2px; color: var(--muted); }

.migas { font-size: 13px; color: var(--muted); padding: 22px 0 0; }
.migas a { color: var(--muted); }

/* ------------------------------------------------------------------ Footer */
footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--cream-2); }
footer .wrap { padding: 40px 20px; }
.footer-story {
    font-family: var(--serif); font-size: 18px; color: var(--navy);
    max-width: 660px; line-height: 1.5; margin: 0 0 18px;
}
.footer-story em { color: var(--gold); font-style: italic; }
.footer-cols {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 22px; margin-bottom: 26px;
}
.footer-cols h4 {
    font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--muted); margin: 0 0 10px;
}
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 6px; font-size: 13.5px; }
.footer-cols a { color: var(--text); }
.footer-meta {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    font-size: 12.5px; color: var(--muted); align-items: center;
    padding-top: 20px; border-top: 1px solid var(--line);
}
.footer-meta a { color: var(--muted); }

/* --------------------------------------------------------------- Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: #D9D1BE; border-radius: 6px; border: 2px solid var(--cream); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 720px) {
    .card { padding: 20px; }
    .hero { padding: 40px 0 18px; }
    .documento { padding: 18px; font-size: 12px; }
    .acciones .btn { width: 100%; }
    .stepper { gap: 4px; }
    .step { font-size: 12px; padding: 5px 10px; }
}

@media print {
    .topbar, footer, .acciones, .stepper, .cta, .disclaimer { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; border: 0; padding: 0; }
}

/* ----------------------------------------------------------- Utilidades
   Clases mínimas para sustituir los atributos «style» en línea, que la
   política de seguridad de contenido (style-src 'self') bloquea. */
.cabecera-pagina { padding: 26px 0 8px; }
.cabecera-pagina h1 { text-align: left; }
.cabecera-pagina .lead { margin: 0; }
.seccion-sup    { margin-top: 26px; }
.seccion-sup-l  { margin-top: 40px; }
.seccion-sup-xl { margin-top: 56px; }
.acciones-guia  { margin: 22px 0 10px; }
.acciones-centro { justify-content: center; margin-top: 26px; }
.disclaimer-sup { margin-top: 28px; }
.titulo-menor { font-size: 16px; color: var(--ink); margin-bottom: 12px; }
.titulo-seccion {
    font-family: var(--serif); font-size: 30px; font-weight: 600;
    color: var(--navy); margin: 0 0 6px;
}
.subtitulo-seccion { color: var(--muted); margin: 0 0 18px; }
.titulo-bloque {
    font-family: var(--serif); font-size: 24px; font-weight: 600;
    color: var(--navy); margin: 34px 0 6px;
}
.titulo-apoyo {
    margin-top: 28px; font-size: 16px; font-weight: 600; color: var(--ink);
}
.pagina-error { text-align: center; padding: 70px 20px 20px; }
