/* ==========================================================================
   NADIE — Editorial Theme
   Inspirado en diseño de periódico moderno
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES
   -------------------------------------------------------------------------- */
:root {
    /* Surface */
    --surface:               #F8F8F6;
    --surface-container:     #EEEEEC;
    --surface-container-high:#E4E4E2;
    --surface-dark:          #1A1A18;

    /* Ink */
    --ink:                   #1A1A18;
    --ink-mid:               #5A5A58;
    --ink-muted:             #8A8A88;

    /* Accent — neon yellow, sello satírico */
    --accent:                #DCFF00;
    --accent-on:             #1A1A18;

    /* Borders */
    --border:                #1A1A18;
    --border-light:          #D0D0CE;

    /* Fonts */
    --font-headline:  'Newsreader', Georgia, 'Times New Roman', serif;
    --font-body:      'Public Sans', system-ui, sans-serif;
    --font-label:     'Inter', system-ui, sans-serif;

    /* Layout */
    --page-pad:       1.5rem;
    --content-max:    1200px;
    --article-max:    740px;
    --gap:            1.5rem;
    --section-gap:    3rem;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: 1.2em;
    line-height: 1;
    vertical-align: middle;
    display: inline-block;
}

/* Paper texture */
.paper-texture {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.035;
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 999;
}

/* --------------------------------------------------------------------------
   3. LAYOUT
   -------------------------------------------------------------------------- */
.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
    padding: var(--section-gap) var(--page-pad);
    max-width: var(--content-max);
    width: 100%;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   4. HEADER — MASTHEAD + NAV
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--surface);
}

/* Masthead row */
.masthead {
    border-bottom: 1px solid var(--border-light);
}

.masthead-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem var(--page-pad);
    max-width: var(--content-max);
    margin: 0 auto;
    gap: 1rem;
}

.masthead-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.masthead-meta--right { justify-content: flex-end; }

.masthead-date {
    font-family: var(--font-label);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
}

.masthead-title {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.1s;
}

.masthead-title:hover { opacity: 0.7; }

.masthead-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: var(--ink-mid);
    transition: color 0.1s;
}

.masthead-search-btn:hover { color: var(--ink); }

/* Nav row */
.site-nav {
    border-top: 4px solid var(--border);
    border-bottom: 2px solid var(--border);
    background: var(--surface);
}

.site-nav-inner {
    display: flex;
    align-items: center;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--page-pad);
    position: relative;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0;
    color: var(--ink);
    margin-right: 0.5rem;
}

.nav-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
}

.nav-list li { border-right: 1px solid var(--border-light); }
.nav-list li:first-child { border-left: 1px solid var(--border-light); }

.nav-link {
    display: block;
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-mid);
    padding: 0.65rem 1rem;
    transition: background 0.1s, color 0.1s;
    white-space: nowrap;
}

.nav-link:hover { background: var(--surface-container); color: var(--ink); }
.nav-link--active { background: var(--accent); color: var(--accent-on); }

.ia-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--ink);
    color: var(--accent);
    font-family: var(--font-label);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.3rem 0.6rem;
    white-space: nowrap;
}

.ia-dot {
    width: 6px;
    height: 6px;
    background: #FF4444;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

/* --------------------------------------------------------------------------
   6. NEWS TICKER
   -------------------------------------------------------------------------- */
.news-ticker {
    display: flex;
    align-items: stretch;
    background: var(--accent);
    border-bottom: 2px solid var(--border);
    overflow: hidden;
    height: 2.25rem;
}

.ticker-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--ink);
    color: var(--accent);
    font-family: var(--font-label);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0 1rem;
    white-space: nowrap;
    flex-shrink: 0;
    z-index: 1;
}

.ticker-label .material-symbols-outlined {
    font-size: 0.9rem;
}

.ticker-track-wrapper {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
}

.ticker-track-wrapper::before,
.ticker-track-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2rem;
    z-index: 1;
    pointer-events: none;
}

.ticker-track-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--accent), transparent);
}

.ticker-track-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--accent), transparent);
}

.ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: ticker-scroll 40s linear infinite;
    gap: 3rem;
}

.ticker-track:hover { animation-play-state: paused; }

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.ticker-item {
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent-on);
    white-space: nowrap;
    transition: opacity 0.1s;
}

.ticker-item:hover { opacity: 0.65; }

/* --------------------------------------------------------------------------
   7. SECTION DIVIDER
   -------------------------------------------------------------------------- */
.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: var(--section-gap) 0 calc(var(--section-gap) * 0.6);
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--border);
}

.section-divider-label {
    font-family: var(--font-label);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    white-space: nowrap;
    padding: 0.2rem 0.75rem;
    border: 2px solid var(--border);
    background: var(--surface);
}

/* --------------------------------------------------------------------------
   8. HOME — HERO
   -------------------------------------------------------------------------- */
.hero-section {
    border-bottom: 4px solid var(--border);
    padding-bottom: var(--section-gap);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
}

/* Hero featured post */
.hero-main { display: flex; flex-direction: column; gap: 1rem; }

.hero-image-link { display: block; overflow: hidden; }

.hero-image {
    margin: 0;
    position: relative;
    background: var(--surface-container);
    border: 2px solid var(--border);
}

.hero-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    filter: grayscale(25%) brightness(0.95);
    transition: filter 0.3s ease, transform 0.3s ease;
    display: block;
}

.hero-image-link:hover img {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.01);
}

.hero-image-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--ink);
    color: var(--surface);
    font-family: var(--font-label);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
}

.hero-body { display: flex; flex-direction: column; gap: 0.75rem; }

.hero-tag {
    display: inline-block;
    font-family: var(--font-label);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-mid);
    transition: color 0.1s;
}

.hero-tag:hover { color: var(--ink); }

.hero-title {
    font-family: var(--font-headline);
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.08;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.hero-title a:hover { text-decoration: underline; text-underline-offset: 4px; }

.hero-deck {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--ink-mid);
    max-width: 65ch;
}

.hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--ink-muted);
}

.hero-meta .sep { color: var(--border-light); }

/* Hero sidebar */
.hero-sidebar { display: flex; flex-direction: column; gap: var(--gap); }

.hero-sidebar-box {
    background: var(--surface-container);
    border: 2px solid var(--border);
    padding: 1.25rem;
}

.sidebar-box-title {
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-box-title .material-symbols-outlined { font-size: 1rem; color: var(--ink-mid); }

.sidebar-post-list { display: flex; flex-direction: column; gap: 1rem; }

.sidebar-post-item { display: flex; flex-direction: column; gap: 0.25rem; }

.sidebar-post-tag {
    font-family: var(--font-label);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.sidebar-post-title {
    font-family: var(--font-headline);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
}

.sidebar-post-title a:hover { background: var(--accent); }

.sidebar-ad-space {
    border: 2px dashed var(--border-light);
    background: var(--surface-container);
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sidebar-ad-space span {
    font-family: var(--font-label);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-muted);
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   9. POSTS GRID
   -------------------------------------------------------------------------- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--section-gap) var(--gap);
}

.posts-grid--related { margin-top: 2rem; }

/* --------------------------------------------------------------------------
   10. POST CARD
   -------------------------------------------------------------------------- */
.post-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.post-card-image-link { display: block; overflow: hidden; }

.post-card-image {
    margin: 0;
    position: relative;
    background: var(--surface-container);
    border: 1px solid var(--border-light);
}

.post-card-image img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    filter: grayscale(20%) brightness(0.97);
    transition: filter 0.25s ease, transform 0.25s ease;
    display: block;
}

.post-card-image-link:hover img {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.03);
}

.post-card-image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    background: var(--ink-mid);
    color: var(--surface);
    font-family: var(--font-label);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
}

.post-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.post-card-tag {
    font-family: var(--font-label);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-mid);
    transition: color 0.1s;
}

.post-card-tag:hover { color: var(--ink); }

.post-card-title {
    font-family: var(--font-headline);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink);
}

.post-card-title a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-card-excerpt {
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--ink-mid);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    font-family: var(--font-label);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--ink-muted);
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.post-card-sep { color: var(--border-light); }

/* --------------------------------------------------------------------------
   11. SINGLE POST / ARTICLE
   -------------------------------------------------------------------------- */
.post-template { }

/* Article header */
.article-header {
    max-width: var(--article-max);
    margin: 0 auto 2rem;
}

.article-section-tag {
    display: inline-block;
    font-family: var(--font-label);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: var(--ink);
    color: var(--accent);
    padding: 0.25rem 0.6rem;
    margin-bottom: 1rem;
    transition: background 0.1s;
}

.article-section-tag:hover { background: var(--ink-mid); color: var(--accent); }

.article-title {
    font-family: var(--font-headline);
    font-size: clamp(1.8rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.article-deck {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.55;
    color: var(--ink-mid);
    margin-bottom: 1rem;
}

.article-rule {
    height: 2px;
    background: var(--border);
    margin: 1.25rem 0;
}

.article-byline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--ink-muted);
}

.byline-author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.byline-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-light);
    flex-shrink: 0;
}

.byline-author a:hover { color: var(--ink); }
.byline-sep { color: var(--border-light); }

/* Featured image — full width of the content wrapper */
.article-feature-image {
    margin: 0 calc(-1 * var(--page-pad)) 2.5rem;
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    background: var(--surface-container);
    position: relative;
}

.article-feature-image img {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    display: block;
    filter: grayscale(15%) brightness(0.97);
}

.article-feature-image figcaption {
    font-family: var(--font-label);
    font-size: 0.72rem;
    color: var(--ink-muted);
    padding: 0.5rem var(--page-pad);
    background: var(--surface-container);
    border-top: 1px solid var(--border-light);
    font-style: italic;
}

/* IA notice */
.article-ia-notice {
    max-width: var(--article-max);
    margin: 0 auto 2rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--surface-container);
    border-left: 4px solid var(--accent);
    border: 1px solid var(--border-light);
    border-left-width: 4px;
    border-left-color: var(--accent);
    padding: 0.875rem 1rem;
}

.article-ia-notice .material-symbols-outlined {
    font-size: 1.1rem;
    flex-shrink: 0;
    color: var(--ink-mid);
    margin-top: 0.05rem;
}

.article-ia-notice p {
    font-family: var(--font-label);
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--ink-mid);
}

.article-ia-notice strong { font-weight: 700; color: var(--ink); }

/* Article body */
.article-body { margin-bottom: 2.5rem; }

.article-content {
    max-width: var(--article-max);
    margin: 0 auto;
}

/* ── GH-CONTENT ───────────────────────────────────────── */
.gh-content h2,
.gh-content h3,
.gh-content h4,
.gh-content h5,
.gh-content h6 {
    font-family: var(--font-headline);
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
    margin: 2em 0 0.6em;
    letter-spacing: -0.01em;
}

.gh-content h2 { font-size: 1.6rem; }
.gh-content h3 { font-size: 1.3rem; }
.gh-content h4 { font-size: 1.1rem; }

.gh-content p {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.4em;
    color: var(--ink);
}

/* Drop cap */
.gh-content > p:first-of-type::first-letter {
    float: left;
    font-family: var(--font-headline);
    font-size: 4rem;
    font-weight: 800;
    line-height: 0.82;
    margin: 0.08em 0.1em 0 0;
    color: var(--ink);
}

.gh-content a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.gh-content a:hover {
    background: var(--accent);
    text-decoration: none;
}

.gh-content strong { font-weight: 700; }
.gh-content em { font-style: italic; }

.gh-content blockquote {
    border-left: 4px solid var(--border);
    margin: 2em 0;
    padding: 1rem 0 1rem 1.5rem;
    background: var(--surface-container);
}

.gh-content blockquote p {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--ink);
    margin: 0;
}

.gh-content ul,
.gh-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.4em;
}

.gh-content ul { list-style: disc; }
.gh-content ol { list-style: decimal; }

.gh-content li {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 0.5em;
}

.gh-content hr {
    border: none;
    border-top: 2px solid var(--border-light);
    margin: 2.5em 0;
}

.gh-content figure { margin: 2em 0; }

.gh-content figure img {
    width: 100%;
    border: 1px solid var(--border-light);
}

.gh-content figcaption {
    font-family: var(--font-label);
    font-size: 0.75rem;
    color: var(--ink-muted);
    text-align: center;
    padding: 0.5rem 0;
    font-style: italic;
}

.gh-content pre {
    background: var(--ink);
    color: var(--surface);
    padding: 1.25rem;
    overflow-x: auto;
    margin-bottom: 1.4em;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875em;
    line-height: 1.6;
}

.gh-content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875em;
    background: var(--surface-container);
    padding: 0.15em 0.35em;
    border: 1px solid var(--border-light);
}

.gh-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

/* Ghost card widths */
.gh-content .kg-width-wide {
    position: relative;
    width: calc(100% + 6rem);
    margin-left: -3rem;
}

.gh-content .kg-width-full {
    position: relative;
    width: calc(100% + calc(2 * var(--page-pad)));
    margin-left: calc(-1 * var(--page-pad));
}

.gh-content .kg-image-card { margin: 2em 0; }
.gh-content .kg-image-card img { width: 100%; border: 1px solid var(--border-light); }

.gh-content .kg-callout-card {
    border-left: 4px solid var(--accent);
    background: var(--surface-container);
    padding: 1rem 1.25rem;
    margin: 2em 0;
    font-size: 0.95rem;
    display: flex;
    gap: 0.75rem;
}

/* Article footer */
.article-footer {
    max-width: var(--article-max);
    margin: 0 auto;
    padding-top: 1.5rem;
}

.article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.tags-label {
    font-family: var(--font-label);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.tag-chip {
    font-family: var(--font-label);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--border);
    color: var(--ink-mid);
    transition: background 0.1s, color 0.1s;
}

.tag-chip:hover {
    background: var(--ink);
    color: var(--surface);
    border-color: var(--ink);
}

/* Author card */
.author-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
    background: var(--surface-container);
    border: 2px solid var(--border);
    margin-top: 1.5rem;
}

.author-card-img-link { flex-shrink: 0; }

.author-card-img-link img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid var(--border);
    filter: grayscale(30%);
}

.author-card-label {
    font-family: var(--font-label);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.2rem;
}

.author-card-info h4 {
    font-family: var(--font-headline);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.author-card-info h4 a:hover { text-decoration: underline; }

.author-card-bio {
    font-size: 0.875rem;
    color: var(--ink-mid);
    line-height: 1.55;
}

/* --------------------------------------------------------------------------
   12. RELATED POSTS
   -------------------------------------------------------------------------- */
.related-posts {
    border-top: 4px solid var(--border);
    padding-top: var(--section-gap);
    margin-top: var(--section-gap);
}

.related-posts .posts-grid {
    padding: 0;
}

/* --------------------------------------------------------------------------
   13. ARCHIVE (TAG / AUTHOR)
   -------------------------------------------------------------------------- */
.archive-header {
    border-bottom: 4px solid var(--border);
    padding-bottom: 2rem;
    margin-bottom: var(--section-gap);
}

.archive-header-inner { text-align: center; }

.archive-label {
    font-family: var(--font-label);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.75rem;
}

.archive-title {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.08;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
}

.archive-description {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--ink-mid);
    max-width: 55ch;
    margin: 0 auto 0.75rem;
    line-height: 1.6;
}

.archive-meta {
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--ink-muted);
    letter-spacing: 0.06em;
}

.archive-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-mid);
    border-bottom: 2px solid var(--border);
    padding-bottom: 2px;
    transition: color 0.1s;
}

.archive-link:hover { color: var(--ink); }

.archive-empty {
    grid-column: 1 / -1;
    text-align: center;
    font-family: var(--font-headline);
    font-style: italic;
    color: var(--ink-muted);
    padding: 4rem 0;
    font-size: 1.1rem;
}

.archive-author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
    margin: 0 auto 1.5rem;
}

.archive-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
}

/* --------------------------------------------------------------------------
   14. SEARCH PAGE
   -------------------------------------------------------------------------- */
.search-ui { padding: 2rem 0; }

.search-ui-inner {
    max-width: 680px;
    margin: 0 auto;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 2px solid var(--border);
    background: var(--surface);
    padding: 0.875rem 1rem;
    margin-bottom: 2rem;
    transition: border-color 0.1s;
}

.search-bar:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); }

.search-icon { flex-shrink: 0; color: var(--ink-muted); }

.search-input {
    flex: 1;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    outline: none;
}

.search-input::placeholder { color: var(--ink-muted); }

.search-hint {
    font-family: var(--font-headline);
    font-style: italic;
    color: var(--ink-muted);
    text-align: center;
    padding: 2rem 0;
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   15. 404 / ERROR PAGES
   -------------------------------------------------------------------------- */
.error-template {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem var(--page-pad);
}

.error-inner {
    max-width: 620px;
    width: 100%;
    text-align: center;
}

.error-code {
    font-family: var(--font-headline);
    font-size: clamp(6rem, 18vw, 10rem);
    font-weight: 800;
    line-height: 1;
    color: var(--surface-container-high);
    user-select: none;
    letter-spacing: -0.03em;
}

.error-rule {
    height: 4px;
    background: var(--border);
    margin: 1rem 0;
}

.error-title {
    font-family: var(--font-headline);
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
    margin: 1rem 0;
}

.error-subtitle {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 1rem;
    color: var(--ink-mid);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.error-paper-box {
    border: 2px solid var(--border);
    border-left-width: 4px;
    background: var(--surface-container);
    padding: 1.25rem 1.5rem;
    text-align: left;
    margin: 1.5rem 0 2rem;
}

.error-paper-dateline {
    font-family: var(--font-label);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--ink-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.error-paper-body {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--ink-mid);
    line-height: 1.7;
}

.error-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.error-btn {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--border);
    transition: background 0.1s, color 0.1s;
    cursor: pointer;
}

.error-btn--primary { background: var(--ink); color: var(--surface); }
.error-btn--primary:hover { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
.error-btn--secondary { background: var(--surface); color: var(--ink); }
.error-btn--secondary:hover { background: var(--surface-container); }

/* --------------------------------------------------------------------------
   16. PRIVATE / LOGIN
   -------------------------------------------------------------------------- */
.private-template {
    min-height: 100vh;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.private-wrapper { width: 100%; max-width: 420px; }

.private-paper {
    border: 2px solid var(--border);
    padding: 2.5rem;
    background: var(--surface);
}

.private-header-rule { height: 4px; background: var(--border); margin: 0.5rem 0; }

.private-site-title {
    font-family: var(--font-headline);
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    color: var(--ink);
    margin: 0.75rem 0 0.25rem;
    letter-spacing: -0.01em;
}

.private-site-tagline {
    text-align: center;
    font-family: var(--font-label);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.75rem;
}

.private-box { margin-top: 2rem; position: relative; }

.private-stamp {
    display: inline-block;
    border: 3px solid var(--accent);
    background: var(--accent);
    color: var(--accent-on);
    font-family: var(--font-label);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    padding: 0.2rem 0.75rem;
    transform: rotate(-4deg);
    position: absolute;
    top: -1.25rem;
    right: 0;
}

.private-title {
    font-family: var(--font-headline);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.private-description {
    font-size: 0.9rem;
    color: var(--ink-mid);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.private-error {
    background: #FEF2F2;
    border-left: 4px solid #DC2626;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    color: #DC2626;
    margin-bottom: 1rem;
    font-family: var(--font-label);
}

.private-form-group { margin-bottom: 1rem; }

.private-label {
    display: block;
    font-family: var(--font-label);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-mid);
    margin-bottom: 0.4rem;
}

.private-input {
    width: 100%;
    border: 2px solid var(--border-light);
    border-bottom-color: var(--border);
    background: var(--surface);
    padding: 0.7rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink);
    outline: none;
    transition: border-color 0.1s;
}

.private-input:focus { border-color: var(--border); outline: 2px solid var(--accent); outline-offset: 2px; }

.private-btn {
    display: block;
    width: 100%;
    background: var(--ink);
    color: var(--surface);
    font-family: var(--font-label);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.875rem;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: background 0.1s;
}

.private-btn:hover { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }

.private-footer-note {
    text-align: center;
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 0.85rem;
    color: var(--ink-muted);
    margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   17. PAGE (STATIC)
   -------------------------------------------------------------------------- */
.page-header {
    border-bottom: 4px solid var(--border);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.page-header-inner { text-align: center; }

.page-title {
    font-family: var(--font-headline);
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--ink);
}

.page-excerpt {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--ink-mid);
    margin-top: 0.75rem;
    max-width: 55ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.page-feature-image {
    margin: 0 0 2rem;
    border: 2px solid var(--border);
}

.page-feature-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.page-feature-image figcaption {
    font-family: var(--font-label);
    font-size: 0.72rem;
    font-style: italic;
    color: var(--ink-muted);
    padding: 0.5rem 0.75rem;
    background: var(--surface-container);
    border-top: 1px solid var(--border-light);
}

.page-content { max-width: var(--article-max); margin: 0 auto; }

/* --------------------------------------------------------------------------
   18. PAGINATION
   -------------------------------------------------------------------------- */
.pagination {
    padding: var(--section-gap) 0 1rem;
    border-top: 4px double var(--border);
    margin-top: var(--section-gap);
}

.pagination-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.6rem 1.25rem;
    border: 2px solid var(--border);
    color: var(--ink-mid);
    background: var(--surface);
    transition: background 0.1s, color 0.1s;
}

a.pagination-btn:hover { background: var(--ink); color: var(--surface); }

.pagination-btn--disabled { color: var(--border-light); border-color: var(--border-light); cursor: default; }

.pagination-info {
    font-family: var(--font-label);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    text-align: center;
    flex: 1;
}

/* --------------------------------------------------------------------------
   19. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--surface-dark);
    color: var(--surface);
    padding: 3rem var(--page-pad) 1.5rem;
    border-top: 4px solid var(--accent);
    margin-top: auto;
}

.footer-inner { max-width: var(--content-max); margin: 0 auto; }

.footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    padding-bottom: 2rem;
}

.footer-logo {
    display: block;
    font-family: var(--font-headline);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.01em;
    line-height: 1;
    transition: opacity 0.1s;
}

.footer-logo:hover { opacity: 0.75; }

.footer-tagline {
    font-family: var(--font-label);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(248, 248, 246, 0.4);
    margin-top: 0.4rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    align-items: flex-start;
}

.footer-nav a {
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(248, 248, 246, 0.55);
    transition: color 0.1s;
}

.footer-nav a:hover { color: var(--accent); }

.footer-divider {
    height: 1px;
    background: rgba(248, 248, 246, 0.12);
    margin: 1.5rem 0;
}

/* Disclaimer */
.footer-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(248, 248, 246, 0.05);
    border-left: 3px solid var(--accent);
    padding: 1rem 1.25rem;
}

.footer-disclaimer .material-symbols-outlined {
    font-size: 1.1rem;
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 0.1rem;
}

.footer-disclaimer p {
    font-family: var(--font-label);
    font-size: 0.7rem;
    line-height: 1.6;
    color: rgba(248, 248, 246, 0.5);
}

.footer-disclaimer strong { color: rgba(248, 248, 246, 0.75); font-weight: 700; }
.footer-disclaimer em { font-style: italic; }

/* Bottom bar */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: var(--font-label);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    color: rgba(248, 248, 246, 0.25);
    padding-top: 0.75rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(248, 248, 246, 0.25);
    transition: color 0.1s;
}

.footer-links a:hover { color: var(--accent); }

.footer-powered a {
    color: rgba(248, 248, 246, 0.25);
    transition: color 0.1s;
}

.footer-powered a:hover { color: rgba(248, 248, 246, 0.5); }

/* --------------------------------------------------------------------------
   20. MOBILE BOTTOM NAV
   -------------------------------------------------------------------------- */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: var(--surface);
    border-top: 2px solid var(--border);
    justify-content: space-around;
    align-items: stretch;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.6rem 0.5rem;
    font-family: var(--font-label);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-mid);
    flex: 1;
    transition: color 0.1s, background 0.1s;
    cursor: pointer;
    text-align: center;
    border: none;
    background: none;
    text-decoration: none;
}

.mobile-nav-item:hover,
.mobile-nav-item:active { color: var(--ink); background: var(--surface-container); }

.mobile-nav-item .material-symbols-outlined { font-size: 1.4rem; }

/* --------------------------------------------------------------------------
   21. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .masthead-date { display: block; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-sidebar { display: flex; }
    .hero-grid { grid-template-columns: 8fr 4fr; }
}

@media (max-width: 767px) {
    :root { --page-pad: 1rem; --section-gap: 2rem; --gap: 1rem; }

    .masthead-title { font-size: 2rem; }
    .masthead-meta--left { display: none; }
    .ia-badge { display: none; }

    .nav-list { display: none; width: 100%; flex-direction: column; }
    .nav-list.is-open { display: flex; }
    .nav-list li { border: none; border-bottom: 1px solid var(--border-light); }
    .nav-list li:first-child { border-left: none; }
    .nav-toggle { display: flex; }

    .mobile-nav { display: flex; }
    .site-main { padding-bottom: calc(var(--section-gap) + 4rem); }

    .hero-grid { grid-template-columns: 1fr; }
    .hero-sidebar { display: none; }
    .posts-grid { grid-template-columns: 1fr; }

    .article-feature-image {
        margin-left: calc(-1 * var(--page-pad));
        margin-right: calc(-1 * var(--page-pad));
    }

    .gh-content .kg-width-wide,
    .gh-content .kg-width-full {
        width: calc(100% + calc(2 * var(--page-pad)));
        margin-left: calc(-1 * var(--page-pad));
    }

    .footer-top { flex-direction: column; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .pagination-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .article-title { font-size: 1.6rem; }
    .archive-title { font-size: 1.8rem; }
    .gh-content > p:first-of-type::first-letter { font-size: 3rem; }
    .author-card { flex-direction: column; }
    .error-actions { flex-direction: column; }
    .error-btn { width: 100%; justify-content: center; }
}

/* --------------------------------------------------------------------------
   22. PRINT
   -------------------------------------------------------------------------- */
@media print {
    .site-header, .news-ticker, .site-footer,
    .mobile-nav, .related-posts, .pagination,
    .article-ia-notice, .article-tags, .author-card { display: none !important; }

    body { background: white; color: black; font-size: 11pt; }
    .site-main { padding: 1cm; max-width: none; }
    .article-title { font-size: 22pt; }
    .article-feature-image { margin: 0 0 1.5rem; }
    .article-feature-image img { filter: none; max-height: 200pt; }
    .gh-content p { font-size: 11pt; line-height: 1.5; }
    a { color: black; text-decoration: none; }
}

/* ── ADS ──────────────────────────────────────────────────────────────────── */
.ad-unit {
    display: none;
    margin: 2rem auto;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
}
.ad-unit ins { display: block; }
