:root {
    --paper: #fdfaf5;
    --ink: #111;
    --ink-muted: #555;
    --rule: #222;
    --rule-light: #ccc;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Lora", Georgia, "Times New Roman", serif;
    margin: 0;
    padding: 0;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ——— Cabecera ——— */
.site-header {
    background: var(--paper);
    padding: 2rem 1rem 0;
    text-align: center;
}

.masthead-title {
    margin: 0;
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.masthead-title a {
    color: var(--ink);
}

.masthead-title a:hover {
    text-decoration: none;
    opacity: 0.85;
}

.masthead-tagline {
    margin: 0.65rem 0 0;
    font-size: 1rem;
    font-style: italic;
    font-weight: 400;
    color: var(--ink-muted);
}

.site-nav {
    margin-top: 1.75rem;
}

.site-nav-lines {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 0.65rem 0.5rem;
}

.site-nav-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
}

.site-nav-link {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink);
    padding: 0.15rem 0;
}

.site-nav-link:hover {
    text-decoration: underline;
}

.site-nav-link.active {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nav-sep {
    color: var(--ink-muted);
    font-size: 0.75rem;
    user-select: none;
}

/* ——— Contenido ——— */
main {
    margin: 0;
    background: var(--paper);
    padding: 2rem 1rem 3rem;
}

.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem 3rem;
    align-items: start;
}

.main .main-column {
    min-width: 0;
}

.main .secondary-column {
    min-width: 0;
    padding-left: 0;
    border-left: none;
}

@media screen and (max-width: 900px) {
    .main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .secondary-column {
        border-top: 1px solid var(--rule-light);
        padding-top: 1.5rem;
    }

    .sidebar-article.has-divider {
        border-top: 1px solid var(--rule-light);
        padding-top: 1.25rem;
        margin-top: 1.25rem;
    }
}

@media screen and (min-width: 901px) {
    .secondary-column {
        border-left: 1px solid var(--rule-light);
        padding-left: 2rem;
    }
}

/* Destacado y listados */
.new {
    padding: 0;
    max-width: none;
}

.featured-article {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--rule-light);
}

.featured-article h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
}

.featured-article .lead {
    margin: 0.85rem 0 0;
    font-size: 1.05rem;
}

.new-metadata {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sub-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
}

@media screen and (max-width: 700px) {
    .sub-columns {
        grid-template-columns: 1fr;
    }
}

.sub-article {
    padding-top: 1rem;
    border-top: 1px solid var(--rule-light);
}

.sub-article:first-child {
    padding-top: 0;
    border-top: none;
}

.sub-column .sub-article:first-child {
    padding-top: 0;
    border-top: none;
}

.sub-article h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
}

.sub-article p:not(.new-metadata) {
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
}

.sidebar-article h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}

.sidebar-article p:not(.new-metadata) {
    margin: 0.5rem 0 0;
    font-size: 0.92rem;
}

.sidebar-article.has-divider {
    border-top: 1px solid var(--rule-light);
    padding-top: 1.25rem;
    margin-top: 1.25rem;
}

.new-summary h2 a:hover,
.new-summary h3 a:hover {
    text-decoration: underline;
}

.new-summary p a {
    color: var(--ink);
}

/* Artículo completo y páginas legales */
.main.article-page,
.main.legal-page {
    grid-template-columns: 1fr;
    max-width: 48rem;
}

.main.article-page .main-column,
.main.legal-page .main-column {
    max-width: none;
}

.article-title {
    margin: 0;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
}

.article-page .article-body {
    margin-top: 1rem;
}

.article-body :is(p, ul, ol, blockquote) {
    margin: 0.85rem 0;
}

.article-body h1,
.article-body h2,
.article-body h3 {
    margin: 1.25rem 0 0.5rem;
    line-height: 1.25;
}

.article-original {
    display: inline-block;
    margin-top: 2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 2px;
}

.article-original:hover {
    text-decoration: none;
    opacity: 0.8;
}

.legal-page h1 {
    font-size: 1.75rem;
    margin: 0 0 1rem;
}

.legal-page h2 {
    font-size: 1.2rem;
    margin: 1.75rem 0 0.5rem;
}

.legal-page ul {
    padding-left: 1.25rem;
}

/* Cookie banner */
#cookie-banner {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    max-width: 520px;
    margin: 0 auto;
    background: var(--ink);
    color: var(--paper);
    padding: 14px 16px;
    text-align: center;
    display: none;
    border: 1px solid var(--rule-light);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    font-size: 0.9rem;
    line-height: 1.45;
}

#cookie-banner a {
    color: var(--paper);
    text-decoration: underline;
}

#cookie-banner a:hover {
    opacity: 0.9;
}

#cookie-banner button {
    cursor: pointer;
    margin: 8px 6px 0;
    padding: 6px 14px;
    font-family: inherit;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--paper);
    background: transparent;
    color: var(--paper);
}

#cookie-banner button.accept {
    background: var(--paper);
    color: var(--ink);
}

#cookie-banner button:hover {
    opacity: 0.92;
}
