/* ==========================================================================
   Magazine theme: plain CSS, no framework, no JS.
   Colours and fonts live in custom properties at the top.
   ========================================================================== */

:root {
    --red: #f70d28;
    --red-dark: #d40a21;
    --ink: #1c1c21;         /* headings, menu bar */
    --black: #111114;       /* top bar */
    --text: #555a64;        /* body copy */
    --muted: #8a8f99;
    --line: #ebebeb;
    --grey: #f5f5f7;
    --footer: #222226;
    --footer-line: #34343a;
    --radius: 4px;
    --max: 1200px;
    --head: "Poppins", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --body: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* ---------- Fonts: self-hosted (SIL Open Font License, see assets/fonts/OFL-*.txt) ---------- */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/open-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/open-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--text); font: 15px/1.7 var(--body); overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--head); color: var(--ink); line-height: 1.3; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.25rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.05rem; }
button, input { font: inherit; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }

.visually-hidden {
    position: absolute !important; 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; background: var(--red); color: #fff; padding: 8px 12px; z-index: 20; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Small shared pieces ---------- */
.meta { color: var(--muted); font-size: .8rem; margin: 0; }
.meta--light { color: rgba(255, 255, 255, .8); }

.cat-label {
    display: inline-block; font: 600 .7rem/1 var(--head); text-transform: uppercase; letter-spacing: .05em;
    color: var(--red); margin-bottom: 6px;
}
.cat-label--solid { background: var(--red); color: #fff; padding: 5px 9px; border-radius: 2px; }
.cat-label--solid:hover { background: var(--ink); color: #fff; }


.social { display: flex; gap: 14px; align-items: center; }
.social a { display: inline-flex; color: inherit; }
.social a:hover { color: var(--red); }
.social--boxed, .social--share { gap: 8px; }
.social--boxed a, .social--share a { width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 2px; color: #fff; }
.social--boxed a { background: var(--footer-line); }
.social--share a { background: var(--ink); }
.social--boxed a:hover, .social--share a:hover { background: var(--red); color: #fff; }

/* Section heading with a red underline under the text */
.section { margin: 0 0 40px; }
.section-title {
    display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
    font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em;
    border-bottom: 2px solid var(--line); margin-bottom: 24px;
}
.section-title > span { position: relative; padding-bottom: 10px; }
.section-title > span::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px; background: var(--red); }
.section-title__more { font: 600 .75rem var(--body); text-transform: none; color: var(--muted); padding-bottom: 12px; }

/* ---------- Header promo banner (728x90 slot) ---------- */
.promo {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px;
    width: 100%; max-width: 728px; height: 90px; padding: 0 18px;
    background: var(--ink); color: #fff; border-radius: 4px;
}
.promo::before { /* red diagonal accent on the right */
    content: ""; position: absolute; right: -40px; top: -20px; width: 220px; height: 130px;
    background: var(--red); transform: skewX(-20deg); opacity: .12;
}
.promo:hover { color: #fff; }
.promo__icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; outline: 1px solid #3a3a42; }
.promo__text { display: flex; flex-direction: column; flex-shrink: 0; line-height: 1.2; }
.promo__brand { font: 700 1.25rem var(--head); letter-spacing: -.02em; }
.promo__brand span { color: var(--red); }
.promo__tag { font-size: .75rem; color: #b9b9c2; margin-top: 3px; }
.promo__topics { position: relative; display: flex; flex-wrap: wrap; gap: 6px; flex: 1; justify-content: center; min-width: 0; }
.promo__topics span {
    font: 600 .7rem/1 var(--head); text-transform: uppercase; letter-spacing: .05em;
    padding: 6px 9px; border: 1px solid #45454e; border-radius: 20px; color: #e6e6ea;
}
.promo__topics span:first-child { border-color: var(--red); color: #fff; background: var(--red); }
.promo__cta {
    position: relative; flex-shrink: 0; background: var(--red); color: #fff; font: 600 .8rem var(--head);
    text-transform: uppercase; padding: 10px 14px; border-radius: 2px; transition: background .2s;
}
.promo:hover .promo__cta { background: var(--red-dark); }
@media (max-width: 1100px) { .promo__tag { display: none; } }

/* ---------- Sidebar promo box (300x250 slot) ---------- */
.promo-box {
    position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px;
    width: 100%; aspect-ratio: 300 / 250; padding: 24px; margin-bottom: 30px;
    background: var(--ink); color: #fff; border-radius: 4px;
}
.promo-box::before { /* red diagonal accent, same as the header banner */
    content: ""; position: absolute; right: -60px; bottom: -40px; width: 200px; height: 200px;
    background: var(--red); transform: skewX(-20deg); opacity: .14;
}
.promo-box:hover { color: #fff; }
.promo-box > * { position: relative; }
.promo-box__head { display: flex; align-items: center; gap: 10px; }
.promo-box__head img { border-radius: 9px; outline: 1px solid #3a3a42; }
.promo-box__title { font: 600 1.3rem/1.25 var(--head); }
.promo-box__topics { display: flex; flex-wrap: nowrap; gap: 5px; max-width: 100%; }
.promo-box__topics span {
    font: 600 .62rem/1 var(--head); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
    padding: 6px 7px; border: 1px solid #45454e; border-radius: 20px; color: #e6e6ea;
}
.promo-box__topics span:first-child { border-color: var(--red); background: var(--red); color: #fff; }
.promo-box:hover .promo__cta { background: var(--red-dark); }

/* ---------- Header ---------- */
.topbar { background: var(--black); color: #c9c9cf; font-size: .8rem; }
.topbar__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; min-height: 42px; padding-top: 6px; padding-bottom: 6px; }
.topbar__links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.topbar__links a:hover, .topbar .social a:hover { color: #fff; }

.brandbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.logo { display: inline-block; flex-shrink: 0; }
.logo img { height: 50px; width: auto; }
@media (max-width: 575px) { .logo img { height: 42px; } }

.menubar { background: var(--ink); }
.menubar__inner { position: relative; display: flex; align-items: center; min-height: 54px; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle__btn { display: inline-flex; align-items: center; gap: 8px; color: #fff; cursor: pointer; font: 600 .9rem var(--head); text-transform: uppercase; }
.nav-toggle:focus-visible + .nav-toggle__btn { outline: 2px solid var(--red); outline-offset: 4px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; color: #fff; font: 600 .9rem var(--head); text-transform: uppercase; letter-spacing: .02em; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--red); color: #fff; }

@media (max-width: 991px) {
    .promo { display: none; }
    .brandbar { justify-content: center; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--ink); border-top: 1px solid #333; z-index: 10; }
    .nav-toggle:checked ~ .main-nav { display: block; }
    .main-nav a { padding: 12px 16px; border-bottom: 1px solid #2c2c33; }
}
@media (min-width: 992px) {
    .nav-toggle__btn { display: none; }
    .main-nav ul { display: flex; }
    .main-nav a { padding: 17px 20px; }
    .main-nav li:first-child a { margin-left: -4px; }
}

/* ---------- Breaking news ticker (one headline at a time, see js/ticker.js) ---------- */
.breaking { display: flex; align-items: stretch; border: 1px solid #dcdce0; background: #fff; margin: 24px 0; min-height: 50px; }
.breaking__label {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: var(--red); color: #fff; font: 600 .9rem var(--head); text-transform: uppercase;
    padding: 0 20px; min-width: 200px;
}
.breaking__list { position: relative; flex: 1; min-width: 0; list-style: none; margin: 0; padding: 0; }
.breaking__list li {
    position: absolute; inset: 0; display: flex; align-items: center; padding: 0 24px;
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .4s, transform .4s, visibility .4s;
}
.breaking__list li.is-active { opacity: 1; visibility: visible; transform: none; }
.breaking__list a { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text); font-size: .95rem; }
.breaking__list a:hover { color: var(--red); }

.breaking__nav { flex-shrink: 0; display: flex; align-items: center; gap: 2px; padding: 0 12px 0 4px; }
.breaking__nav[hidden] { display: none; }
.breaking__nav button { display: inline-flex; padding: 4px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.breaking__nav button:hover { color: var(--red); }
.breaking__nav button:focus-visible { outline: 2px solid var(--red); }

@media (max-width: 575px) {
    .breaking__label { min-width: 0; padding: 0 12px; font-size: .75rem; }
    .breaking__label-extra { display: none; }
    .breaking__list li { padding: 0 10px; }
    .breaking__list a { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: .85rem; line-height: 1.35; }
}
@media (prefers-reduced-motion: reduce) {
    .breaking__list li { transition: none; }
}

/* ---------- Hero (overlay cards) ---------- */
.hero { display: grid; gap: 4px; margin-bottom: 40px; }
@media (min-width: 768px) {
    .hero { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; height: 460px; }
    .overlay--lg { grid-row: span 2; }
}

.overlay { position: relative; overflow: hidden; min-height: 220px; background: var(--ink); }
.overlay img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.overlay:hover img { transform: scale(1.04); }
.overlay::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.1) 60%); }
.overlay__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; z-index: 1; }
.overlay__title { color: #fff; font-size: 1.1rem; margin: 4px 0 6px; }
.overlay__title a:hover { color: #fff; text-decoration: underline; }
.overlay--lg .overlay__title { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.9rem); }
.overlay--lg { min-height: 300px; }
.overlay--lg .overlay__body { padding: 28px; }

/* ---------- Two-column layout ---------- */
.layout { display: grid; gap: 40px; align-items: start; }
@media (min-width: 992px) { .layout { grid-template-columns: minmax(0, 1fr) 340px; } }
.layout__main { min-width: 0; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 30px; }
@media (min-width: 600px) { .grid--2, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card__thumb { position: relative; display: block; overflow: hidden; }
.card__thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .4s; }
.card:hover .card__thumb img { transform: scale(1.04); }
.card__cat { position: absolute; left: 12px; top: 12px; margin: 0; }
.card__body { padding-top: 12px; }
.card__title { font-size: 1.05rem; margin: 4px 0 8px; }
.card__excerpt { margin: 0; font-size: .9rem; }

/* Category block on the home page: one big card + small list */
.block { display: grid; gap: 24px; }
@media (min-width: 700px) { .block { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.block__list .mini:first-child { padding-top: 0; }

.mini { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mini:last-child { border-bottom: 0; }
.mini__thumb { flex-shrink: 0; width: 100px; }
.mini__thumb img { width: 100px; height: 75px; object-fit: cover; }
.mini .cat-label { margin-bottom: 2px; }
.mini__title { font-size: .9rem; font-weight: 500; margin: 0 0 4px; }

/* ---------- Sidebar ---------- */
.sidebar { min-width: 0; }
.widget { border: 1px solid var(--line); padding: 24px; margin-bottom: 30px; }
.widget__title { font-size: 1rem; text-transform: uppercase; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 2px solid var(--line); position: relative; }
.widget__title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 50px; height: 2px; background: var(--red); }
.widget p { font-size: .9rem; }

.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: .9rem; }
.cat-list li:last-child a { border-bottom: 0; }
.cat-list span { color: var(--muted); font-weight: 400; }

.widget-form input, .newsletter__form input {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 0;
}
.widget-form button, .newsletter__form button {
    width: 100%; margin-top: 10px; padding: 12px; border: 0; background: var(--red); color: #fff;
    font: 600 .85rem var(--head); text-transform: uppercase; cursor: pointer;
}
.widget-form button:hover, .newsletter__form button:hover { background: var(--red-dark); }

.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.tagcloud span, .article__tags span { border: 1px solid var(--line); padding: 4px 12px; font-size: .8rem; color: var(--ink); }

/* ---------- Page band + breadcrumb ---------- */
.page-band { background: var(--grey); border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0; margin: 0; font-size: .85rem; }
.breadcrumb li { color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #c5c5cc; }
.breadcrumb a { color: var(--ink); font-weight: 600; }

.cat-heading { background: var(--grey); text-align: center; padding: 36px 16px; margin-bottom: 40px; }
.cat-heading h1 { text-transform: uppercase; margin-bottom: 6px; }
.cat-heading p { margin: 0 auto; max-width: 60ch; }

.pagination { display: flex; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; border: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.pagination [aria-current="page"], .pagination a:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Article ---------- */
.article__header h1 { margin: 10px 0 12px; }
.article__meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .85rem; color: var(--muted); margin: 0 0 18px; }
.article__meta a { color: var(--ink); font-weight: 600; }
.article__updated { color: var(--ink); font-weight: 600; }

.answer-box { background: var(--grey); border-left: 4px solid var(--red); padding: 18px 22px; margin: 26px 0; }
.answer-box p { margin: 0; color: var(--ink); }
.answer-box__label { font: 600 .75rem var(--head) !important; text-transform: uppercase; letter-spacing: .06em; color: var(--red) !important; margin-bottom: 6px !important; }

.article__image { margin: 0 0 28px; }
.article__image img { width: 100%; }

.prose { font-size: 1rem; line-height: 1.85; }
.prose h2 { font-size: 1.45rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.4em; }
.prose a { color: var(--red); text-decoration: underline; }
.prose blockquote { margin: 1.8em 0; padding: 22px 28px; background: var(--grey); border-left: 4px solid var(--red); font: italic 500 1.05rem/1.7 var(--head); color: var(--ink); }
.prose blockquote p { margin: 0; }
.prose img { margin: 1.5em 0; }

.faq { margin-top: 40px; }
.faq h3 { margin: 22px 0 6px; }
.faq p { margin: 0; }

.article__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 32px 0; padding-top: 24px; border-top: 1px solid var(--line); }
.article__tags strong { color: var(--ink); font-family: var(--head); margin-right: 4px; }

.author-box { display: flex; gap: 22px; align-items: flex-start; border: 1px solid var(--line); padding: 28px; margin: 0 0 40px; }
.author-box img { border-radius: 50%; flex-shrink: 0; }
.author-box p { margin: 0; font-size: .92rem; }
.author-box__name { font: 600 1.05rem var(--head) !important; color: var(--ink); margin-bottom: 6px !important; }
.author-box--page h1 { margin-bottom: 6px; }
@media (max-width: 479px) { .author-box { flex-direction: column; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: #a9a9b0; margin-top: 60px; font-size: .9rem; }
.newsletter { display: grid; gap: 20px; align-items: center; padding: 50px 0; border-bottom: 1px solid var(--footer-line); }
@media (min-width: 900px) { .newsletter { grid-template-columns: auto 1fr minmax(0, 420px); gap: 40px; } }
.newsletter__title { margin: 0; font: 600 1.4rem var(--head); color: #fff; text-transform: capitalize; }
.newsletter__form { display: flex; }
.newsletter__form input { border: 0; min-width: 0; }
.newsletter__form button { width: auto; margin: 0; padding: 12px 22px; flex-shrink: 0; }

.site-footer__grid { display: grid; gap: 30px; padding: 50px 0; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
@media (min-width: 900px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer__about p { margin: 0 0 18px; }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }

.copyright { background: var(--ink); text-align: center; padding: 20px 0; font-size: .85rem; }
.copyright p { margin: 0; }

/* ---------- Admin preview bar (only on /admin/posts/{id}/preview) ---------- */
.preview-bar { background: #fff4e0; border-bottom: 1px solid #f1d9a8; color: #6b4200; font-size: .9rem; padding: 10px 0; }
.preview-bar a { color: #6b4200; font-weight: 600; text-decoration: underline; margin-left: 12px; }

/* ---------- Empty states + author extras ---------- */
.empty-state { text-align: center; padding: 50px 20px; background: var(--grey); color: var(--text); margin: 24px 0 40px; }
.empty-state h2 { margin-bottom: 6px; }
.empty-state p { margin: 0; }
.author-box__job { color: var(--red) !important; font: 600 .85rem var(--head) !important; margin: -2px 0 8px !important; }
.author-box__links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px !important; font-size: .85rem; }
.author-box__links a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Newsletter forms ---------- */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.newsletter-msg { margin: 8px 0 0 !important; font-size: .85rem; font-weight: 600; min-height: 0; }
.newsletter-msg:empty { display: none; }
.newsletter-msg.is-ok { color: #1c7c3a; }
.newsletter-msg.is-error { color: var(--red); }
.site-footer .newsletter-msg.is-ok { color: #7ee2a0; }
.newsletter__form { flex-wrap: wrap; }
.newsletter__form input[type="email"] { flex: 1; }
.newsletter__form .newsletter-msg { flex-basis: 100%; }
.widget-form button[disabled], .newsletter__form button[disabled] { opacity: .6; cursor: wait; }
.btn-link { color: var(--red); font-weight: 600; }

/* ---------- Static pages (About, Contact, legal) ---------- */
.container--narrow { max-width: 792px; }
.static-page { padding-bottom: 20px; }
.static-page .article__header h1 { margin-top: 0; }
.static-page .prose > p:first-child { font-size: 1.1rem; }

/* ---------- 404 page ---------- */
.not-found { text-align: center; padding: 60px 16px 50px; }
.not-found__code { font: 800 clamp(4rem, 3rem + 6vw, 7.5rem)/1 var(--head); color: var(--red); margin: 0 0 10px; letter-spacing: -.04em; }
.not-found h1 { margin-bottom: 10px; }
.not-found p { max-width: 520px; margin: 0 auto 20px; }
.not-found__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.not-found__btn { background: var(--red); color: #fff; padding: 11px 20px; font: 600 .85rem var(--head); text-transform: uppercase; }
.not-found__btn:hover { background: var(--red-dark); color: #fff; }
.not-found__link { border: 1px solid var(--line); padding: 10px 16px; font: 600 .85rem var(--head); color: var(--ink); }
.not-found__link:hover { border-color: var(--red); }

/* ---------- Article content: tables and lists ---------- */
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.4em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--red); font-weight: 700; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .95rem; }
@media (max-width: 600px) { .prose table { display: block; overflow-x: auto; } }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
.prose thead th { background: var(--ink); color: #fff; font-family: var(--head); font-weight: 600; border-color: var(--ink); }
.prose tbody tr:nth-child(even) { background: var(--grey); }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 8px; }

/* ---------- Contact form ---------- */
.contact-form { margin-top: 40px; padding: 28px; border: 1px solid var(--line); background: #fff; }
.contact-form h2 { font-size: 1.3rem; margin-bottom: 18px; }
.contact-form__row { display: grid; gap: 0 18px; }
@media (min-width: 640px) { .contact-form__row { grid-template-columns: 1fr 1fr; } }
.contact-form__field { margin-bottom: 16px; }
.contact-form label { display: block; font: 600 .85rem var(--head); color: var(--ink); margin-bottom: 6px; }
.contact-form label span { color: var(--red); }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 12px 14px; border: 1px solid #d9d9de; border-radius: 0; font: inherit; color: var(--ink); background: #fff;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(28, 28, 33, .1); }
.contact-form [aria-invalid="true"] { border-color: var(--red); }
.contact-form__error { margin: 5px 0 0; color: var(--red); font-size: .82rem; font-weight: 600; }
.contact-form__error:empty { display: none; }
.contact-form button { background: var(--red); color: #fff; border: 0; padding: 13px 26px; font: 600 .85rem var(--head); text-transform: uppercase; cursor: pointer; }
.contact-form button:hover { background: var(--red-dark); }
.contact-form button[disabled] { opacity: .6; cursor: wait; }
.contact-form__status { margin: 14px 0 0; font-weight: 600; }
.contact-form__status:empty { display: none; }
.contact-form__status.is-ok { color: #1c7c3a; }
.contact-form__status.is-error { color: var(--red); }
.contact-form__note { margin: 14px 0 0; font-size: .82rem; color: var(--muted); }
.contact-form__note a { color: var(--ink); text-decoration: underline; }

/* ---------- Table of contents ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.prose h2[id], .prose h3[id] { scroll-margin-top: 20px; }
.toc { border: 1px solid var(--line); border-left: 4px solid var(--ink); background: #fff; padding: 16px 20px; margin: 0 0 30px; }
.toc__title { cursor: pointer; font: 600 .95rem var(--head); color: var(--ink); text-transform: uppercase; letter-spacing: .03em; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc__title::-webkit-details-marker { display: none; }
.toc__title::after { content: "–"; color: var(--red); font-size: 1.2rem; line-height: 1; }
.toc:not([open]) .toc__title::after { content: "+"; }
.toc ol { margin: 12px 0 0; padding-left: 1.2em; counter-reset: none; }
.toc ol ol { margin: 4px 0 6px; font-size: .92em; }
.toc li { margin: 5px 0; }
.toc li::marker { color: var(--red); font-weight: 700; }
.toc a { color: var(--ink); }
.toc a:hover { color: var(--red); text-decoration: underline; }

/* ---------- Key takeaways (inside the answer box) ---------- */
.answer-box__label--list { margin-top: 14px !important; }
.takeaways { margin: 0; padding-left: 1.2em; color: var(--ink); }
.takeaways li { margin: 5px 0; }
.takeaways li::marker { color: var(--red); }

/* ---------- Tag links (post footer + sidebar cloud) ---------- */
.tagcloud a, .article__tags a { border: 1px solid var(--line); padding: 4px 12px; font-size: .8rem; color: var(--ink); }
.tagcloud a:hover, .article__tags a:hover { border-color: var(--red); background: var(--red); color: #fff; }
.cat-heading__kicker { margin: 0 0 4px !important; font: 600 .75rem var(--head) !important; text-transform: uppercase; letter-spacing: .08em; color: var(--red) !important; }

/* ---------- Cookie consent ---------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; padding: 8px 16px; background: var(--ink); color: #d6d8dd; box-shadow: 0 -2px 12px rgba(0,0,0,.3); font-size: 13px; line-height: 1.4; }
.cookie-banner[hidden] { display: none; }
.cookie-banner__text { flex: 0 1 auto; }
.cookie-banner__text p { margin: 0; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 8px; }
.cookie-btn { font: 600 13px var(--head); padding: 6px 14px; border: 1px solid var(--red); border-radius: var(--radius); background: var(--red); color: #fff; cursor: pointer; }
.cookie-btn:hover { background: var(--red-dark); }
.cookie-btn--ghost { background: transparent; border-color: #6a6e78; color: #fff; }
.cookie-btn--ghost:hover { background: #34343a; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.link-button:hover { text-decoration: underline; }
