:root {
    --herald-ink: #111111;
    --herald-muted: #5c5c5c;
    --herald-rule: #d6d1c4;
    --herald-paper: #f7f4ee;
    --herald-card: #fffdf8;
    --herald-accent: #8b1e1e;
    --herald-serif: "Libre Baskerville", "Times New Roman", Times, serif;
    --herald-sans: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body.herald {
    background: var(--herald-paper);
    color: var(--herald-ink);
    font-family: var(--herald-sans);
    font-size: 17px;
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--herald-accent); }
img { max-width: 100%; display: block; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
.herald-skip {
    position: absolute;
    left: -999px;
    top: 0;
}

.herald-head {
    border-bottom: 3px solid var(--herald-ink);
    background: var(--herald-card);
}
.herald-head-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 10px 28px 8px;
    border-bottom: 1px solid var(--herald-rule);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--herald-muted);
}
.herald-signin {
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--herald-ink);
    border: 1px solid var(--herald-ink);
    padding: 4px 10px;
}
.herald-signin:hover { background: var(--herald-ink); color: #fff; }
.herald-edition { text-align: center; }
.herald-search input {
    border: 0;
    border-bottom: 1px solid var(--herald-rule);
    background: transparent;
    padding: 4px 0;
    width: min(220px, 32vw);
    font: inherit;
    text-transform: none;
    letter-spacing: 0;
}
.herald-brand {
    text-align: center;
    padding: 18px 20px 10px;
}
.herald-name {
    display: inline-block;
    font-family: var(--herald-serif);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.herald-tag {
    margin: 6px 0 0;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--herald-muted);
}
.herald-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 18px;
    padding: 8px 16px 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.herald-nav a.is-on { box-shadow: 0 2px 0 var(--herald-accent); }

.herald-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 64px;
}
.herald-lead {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--herald-rule);
    margin-bottom: 28px;
}
.herald-lead-visual .herald-visual {
    width: 100%;
    height: 420px;
}
.herald-visual {
    position: relative;
    display: block;
    overflow: hidden;
    background: #1c1c1c;
}
.herald-visual .herald-ph {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}
.herald-visual img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}
.herald-lead-copy h1 {
    font-family: var(--herald-serif);
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.18;
    margin: 8px 0 14px;
}
.herald-lead-copy p { font-size: 1.08rem; color: #333; }

.herald-kicker {
    display: inline-block;
    color: var(--herald-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.herald-meta { color: var(--herald-muted); font-size: 13px; }

.herald-grid-4,
.herald-grid-3 {
    display: grid;
    gap: 22px;
}
.herald-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 36px; }
.herald-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.herald-card .herald-visual,
.herald-row-img .herald-visual {
    width: 100%;
    height: 160px;
    margin-bottom: 10px;
}
.herald-row-img .herald-visual { margin-bottom: 0; }
.herald-hero .herald-visual {
    width: 100%;
    height: 460px;
    margin: 0;
}
.herald-card h2,
.herald-card h3 {
    font-family: var(--herald-serif);
    font-size: 1.15rem;
    line-height: 1.3;
    margin: 6px 0;
}
.herald-card p { color: #444; font-size: 0.95rem; }

.herald-ph { display: block; }
.herald-ph.cat-world { background: linear-gradient(135deg, #1d3557, #457b9d); }
.herald-ph.cat-business { background: linear-gradient(135deg, #283618, #606c38); }
.herald-ph.cat-technology { background: linear-gradient(135deg, #240046, #7b2cbf); }
.herald-ph.cat-sports { background: linear-gradient(135deg, #9b2226, #ee9b00); }
.herald-ph.cat-culture { background: linear-gradient(135deg, #3d405b, #e07a5f); }
.herald-ph.cat-science { background: linear-gradient(135deg, #014f86, #00b4d8); }

.herald-split {
    display: grid;
    grid-template-columns: 1.5fr 0.7fr;
    gap: 40px;
    margin-bottom: 40px;
}
.herald-section-title {
    font-family: var(--herald-serif);
    font-size: 1.4rem;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--herald-ink);
}
.herald-list { list-style: none; margin: 0; padding: 0; }
.herald-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--herald-rule);
}
.herald-list strong {
    display: block;
    font-family: var(--herald-serif);
    font-size: 1.12rem;
    font-weight: 700;
}
.herald-rail { margin-bottom: 22px; }
.herald-rail-head {
    display: block;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 8px;
    color: var(--herald-accent);
}
.herald-rail-item {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--herald-rule);
    font-family: var(--herald-serif);
}

.herald-band { margin: 36px 0; }
.herald-band-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid var(--herald-ink);
    margin-bottom: 16px;
}
.herald-band-head h2 { font-family: var(--herald-serif); margin: 0; }
.herald-band-head a { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }

.herald-page-head { margin-bottom: 24px; }
.herald-page-head h1 { font-family: var(--herald-serif); font-size: 2.4rem; margin: 6px 0 0; }
.herald-empty { color: var(--herald-muted); font-style: italic; }

.herald-section-list { display: grid; gap: 28px; }
.herald-row {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--herald-rule);
}
.herald-row h2 { font-family: var(--herald-serif); font-size: 1.6rem; margin: 0 0 8px; line-height: 1.25; }
.herald-pager { display: flex; gap: 16px; margin-top: 28px; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }

.herald-story { max-width: 760px; margin: 0 auto 48px; }
.herald-story h1 { font-family: var(--herald-serif); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; margin: 8px 0 12px; }
.herald-standfirst { font-size: 1.2rem; color: #333; }
.herald-byline { display: flex; flex-wrap: wrap; gap: 10px 16px; color: var(--herald-muted); font-size: 14px; margin: 16px 0 20px; }
.herald-hero img { width: 100%; max-height: 460px; object-fit: cover; }
.herald-body { font-family: var(--herald-serif); font-size: 1.12rem; line-height: 1.8; }
.herald-body p { margin: 0 0 1.1em; }
.herald-body a { text-decoration: underline; }
.herald-source { font-family: var(--herald-sans); font-size: 0.92rem; }

.herald-login { display: grid; place-items: start center; padding: 24px 0 48px; }
.herald-login-card {
    width: min(440px, 100%);
    padding: 32px 28px;
    background: var(--herald-card);
    border: 1px solid var(--herald-rule);
    box-shadow: 0 18px 40px rgba(17, 17, 17, 0.06);
}
.herald-login-card h1 { font-family: var(--herald-serif); font-size: 2rem; margin: 6px 0 10px; }
.herald-login-lead, .herald-login-note { color: var(--herald-muted); font-size: 0.95rem; }
.herald-login-card label { display: grid; gap: 6px; margin: 14px 0; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.herald-login-card input {
    border: 1px solid #cfc9bc;
    padding: 10px 12px;
    font: 16px var(--herald-sans);
    text-transform: none;
    letter-spacing: 0;
}
.herald-login-btn {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    border: 0;
    background: var(--herald-ink);
    color: #fff;
    font: 600 14px var(--herald-sans);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}
.herald-alert { background: #f8e1e1; color: #6b1212; padding: 10px 12px; margin-bottom: 12px; }
.herald-captcha { display: flex; gap: 10px; align-items: center; }
.herald-captcha img { height: 48px; background: #eee; }

.herald-foot {
    display: grid;
    gap: 6px;
    justify-items: center;
    padding: 28px 16px 40px;
    border-top: 3px solid var(--herald-ink);
    text-align: center;
    font-size: 13px;
    color: var(--herald-muted);
}

.herald-login-card button#captchaReload {
    border: 1px solid var(--herald-ink);
    background: transparent;
    padding: 8px 10px;
    font: 600 12px var(--herald-sans);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
}
.herald-hero { margin: 0 0 24px; }
.herald-hero figcaption {
    color: var(--herald-muted);
    font-size: 13px;
    margin-top: 8px;
}
.herald-brand {
    border-bottom: 1px solid var(--herald-rule);
}

@media (max-width: 960px) {
    .herald-lead, .herald-split, .herald-grid-4, .herald-grid-3, .herald-row {
        grid-template-columns: 1fr;
    }
    .herald-lead-visual img { height: 240px; }
    .herald-head-top { grid-template-columns: 1fr auto; }
    .herald-edition { display: none; }
}

@media print {
    .herald-signin, .herald-search, .herald-login { display: none; }
}
