:root {
    --sand: #e4e0d3;
    --paper: #f3f0e6;
    --ink: #1c1d19;
    --muted: #5d5e55;
    --olive: #34372d;
    --wine: #7a121c;
    --ok: #2e6b35;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--sand);
    color: var(--ink);
    font-family: "Courier New", Courier, monospace;
    font-size: 16px;
    line-height: 1.6;
}

.container {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
}

a { color: var(--wine); }

.top-strip {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--muted);
    border-bottom: 1px solid var(--muted);
}

#visitor-status { color: var(--wine); }

header { padding: 56px 0 32px; }

h1 {
    font-family: Impact, "Arial Black", sans-serif;
    font-weight: normal;
    font-size: clamp(56px, 14vw, 120px);
    line-height: .9;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.subtitle {
    margin: 0 0 16px;
    font-weight: bold;
    letter-spacing: 3px;
    color: var(--wine);
}

.lead { margin: 0; max-width: 560px; }

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    padding: 12px 0;
    border-top: 3px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a { color: var(--ink); text-decoration: none; }
nav a:hover { color: var(--wine); text-decoration: underline; }

section {
    padding: 40px 0 8px;
    scroll-margin-top: 16px;
}

h2 {
    font-size: 15px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0 0 20px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--muted);
}

.doctrine {
    margin: 0 0 24px;
    padding: 0 0 0 20px;
    border-left: 6px solid var(--wine);
    font-family: Impact, "Arial Black", sans-serif;
    font-size: clamp(28px, 6vw, 44px);
    line-height: 1.1;
    text-transform: uppercase;
}

.doctrine cite {
    display: block;
    margin-top: 12px;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    font-style: normal;
    text-transform: none;
    color: var(--muted);
}

.warning {
    padding: 12px 16px;
    background: var(--paper);
    border: 1px solid var(--ink);
    font-size: 14px;
}

.table-scroll { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #b9b5a6;
    vertical-align: top;
}

th {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--ink);
}

.ok { color: var(--ok); font-weight: bold; }
.bad { color: var(--wine); font-weight: bold; }

.dossier {
    background: var(--paper);
    border: 1px solid #b9b5a6;
    padding: 20px;
}

.redacted {
    background: var(--ink);
    color: var(--ink);
    cursor: pointer;
    padding: 0 3px;
    user-select: none;
}

.redacted.revealed { background: #ffd84d; }

.progress {
    height: 10px;
    margin-top: 16px;
    background: #d4d0c2;
}

#progress-fill {
    width: 0;
    height: 100%;
    background: var(--wine);
    transition: width .3s;
}

.small { font-size: 13px; color: var(--muted); }

.personnel { margin: 0; }
.personnel dt { font-weight: bold; text-transform: uppercase; letter-spacing: 1px; margin-top: 14px; }
.personnel dd { margin: 0; color: var(--muted); }

.stamp {
    display: inline-block;
    padding: 4px 10px;
    border: 2px solid var(--wine);
    color: var(--wine);
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 13px;
    transform: rotate(-2deg);
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
}

button {
    font: inherit;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    padding: 9px 16px;
    background: var(--ink);
    color: var(--paper);
    border: 2px solid var(--ink);
    transition: transform .15s;
}

button:hover { background: var(--wine); border-color: var(--wine); }
button:focus-visible, .redacted:focus-visible { outline: 3px dashed var(--wine); outline-offset: 3px; }

button.ghost { background: transparent; color: var(--ink); }
button.danger { background: var(--wine); border-color: var(--wine); }

footer {
    margin-top: 48px;
    padding: 24px 0 120px;
    border-top: 3px solid var(--ink);
    font-size: 14px;
}

/* Flotantes */

#drone {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    z-index: 50;
    pointer-events: none;
    opacity: .9;
}

.prop {
    transform-box: fill-box;
    transform-origin: center;
    animation: prop .12s linear infinite;
}

@keyframes prop { 50% { transform: scaleX(.15); } }

#cookie-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: 560px;
    margin: 0 auto;
    z-index: 60;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
    padding: 16px 18px 6px;
    font-size: 14px;
}

#cookie-bar p { margin: 0; }
#cookie-reject { position: relative; transition: left .15s, top .15s; }

#alert-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(380px, calc(100% - 32px));
    z-index: 70;
    background: var(--paper);
    border: 3px solid var(--wine);
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35);
    padding: 20px;
}

#alert-box h3 { margin: 0 0 8px; color: var(--wine); text-transform: uppercase; letter-spacing: 1px; }
#alert-close { position: relative; transition: left .15s, top .15s; }

#toast {
    position: fixed;
    left: 50%;
    top: 16px;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 32px);
    z-index: 80;
    background: var(--ink);
    color: var(--paper);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: bold;
}

[hidden] { display: none !important; }

@media (pointer: coarse) {
    #drone { width: 60px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .prop { animation: none; }
    button, #cookie-reject, #alert-close { transition: none; }
}

/* Verificación de entrada */

body.locked { overflow: hidden; }

#captcha {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.captcha-box {
    width: min(360px, 100%);
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
    padding: 20px;
}

.captcha-box h3,
#newsletter h3 {
    margin: 0 0 8px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.captcha-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin: 12px 0;
}

.captcha-grid button {
    font-size: 30px;
    padding: 12px 0;
    background: #fff;
    color: inherit;
    border: 2px solid #b9b5a6;
}

.captcha-grid button:hover { background: #fff; border-color: var(--ink); }
.captcha-grid button[aria-pressed="true"] { background: #f6dada; border-color: var(--wine); }

/* Boletín */

#newsletter {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(400px, calc(100% - 32px));
    z-index: 75;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35);
    padding: 20px;
}

#newsletter-no {
    font-size: 11px;
    font-weight: normal;
    border: none;
    padding: 4px;
    text-decoration: underline;
}

#newsletter-no:hover { background: transparent; color: var(--muted); }

#to-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 55;
}
