/* Journal frontend — editorial layout: masthead, section nav, story grid. */
:root {
    --ink: #161a26;
    --ink-soft: #3b4152;
    --muted: #666c7c;
    --paper: #ffffff;
    --paper-2: #f5f4f0;
    --rule: #e2e0da;
    --accent: #0d5f6a;
    --accent-ink: #ffffff;
    --kicker: #0d5f6a;
    --hero: #10232b;
    --f-display: "Newsreader", Georgia, "Times New Roman", serif;
    --f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --wrap: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.topbar { background: var(--ink); color: #c9ccd6; font-size: 12.5px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 34px; }
.topbar .tagline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.topbar nav { display: flex; gap: 18px; flex-shrink: 0; }
.topbar a { color: #fff; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 11.5px; }
.topbar a:hover { color: #9fd8de; }
.topbar .menu-item { position: relative; display: flex; align-items: center; align-self: stretch; }
.topbar .has-children > a::after { content: ""; display: inline-block; margin-left: 5px; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; vertical-align: 2px; }
.topbar .submenu { display: none; position: absolute; top: 100%; right: 0; z-index: 30; min-width: 220px; background: var(--ink); padding: 6px 0; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.topbar .has-children:hover .submenu, .topbar .has-children:focus-within .submenu { display: block; }
.topbar .submenu a { display: block; padding: 8px 16px; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; white-space: nowrap; }
.topbar .submenu a:hover { background: rgba(255,255,255,.08); }

.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo { display: block; max-height: 56px; max-width: 220px; width: auto; height: auto; }
.brand-mark { font-family: var(--f-display); font-weight: 700; font-size: 34px; letter-spacing: -.02em; line-height: 1; }
.footer .footer-logo { max-height: 48px; background: #fff; padding: 6px; border-radius: 4px; }
.brand-name { border-left: 1px solid var(--ink); padding-left: 12px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; line-height: 1.35; max-width: 220px; }
.masthead-tools { display: flex; align-items: center; gap: 18px; }
.search-box { display: flex; align-items: center; border-bottom: 1.5px solid var(--ink); }
.search-box input { border: 0; background: transparent; font: inherit; font-size: 14px; padding: 6px 2px; width: 190px; color: var(--ink); }
.search-box input:focus { outline: none; }
.search-box button { border: 0; background: none; cursor: pointer; padding: 4px; color: var(--ink); }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; padding: 10px 18px; border: 0; cursor: pointer; }
.btn:hover { background: var(--ink); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

.sitenav { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.sitenav .wrap { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; }
.sitenav a { font-size: 13.5px; font-weight: 500; padding: 12px 0; white-space: nowrap; border-bottom: 2px solid transparent; }
.sitenav a.active { border-bottom-color: var(--ink); }
.sitenav a.strong { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 12.5px; }

@media (max-width: 760px) {
    .topbar .tagline { display: none; }
    .topbar .wrap { justify-content: flex-end; }
    .topbar nav { gap: 6px 14px; flex-wrap: wrap; justify-content: flex-end; padding-block: 6px; flex-shrink: 1; min-width: 0; }
    .topbar .menu-item { align-self: auto; }
    .masthead .wrap { flex-wrap: wrap; }
    .masthead-tools { width: 100%; }
    .search-box { flex: 1; }
    .search-box input { width: 100%; }
    .brand-mark { font-size: 28px; }
}

/* ---------- Shared pieces ---------- */
.kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--kicker); }
.meta { font-size: 13px; color: var(--muted); }
.meta .dot::before { content: "·"; margin: 0 6px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 3px solid var(--ink); padding-top: 12px; margin-bottom: 22px; flex-wrap: wrap; row-gap: 4px; }
.section-head h2 { font-size: 26px; }
.section-head a { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.block { padding-block: 44px; }
.block + .block { padding-top: 8px; }
.badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; border: 1px solid currentColor; padding: 1px 6px; color: var(--muted); }

/* Generated artwork used when an article or issue has no cover image */
.art { position: relative; overflow: hidden; background:
    radial-gradient(120% 90% at 85% 10%, hsl(var(--h, 190) 45% 38% / .9), transparent 60%),
    repeating-linear-gradient(135deg, hsl(var(--h, 190) 30% 22%) 0 2px, hsl(var(--h, 190) 32% 18%) 2px 14px);
    background-color: hsl(var(--h, 190) 35% 16%); }
.art img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); background: var(--paper-2); }
.hero-main { min-height: 430px; display: flex; align-items: flex-end; padding: 44px 40px; color: #fff; }
.hero-main .kicker { color: #9fd8de; }
.hero-main h1 { font-size: clamp(30px, 4vw, 46px); margin: 10px 0 14px; }
.hero-main h1 a:hover { color: #cdeef1; }
.hero-main p { color: #d9dde5; font-size: 17px; max-width: 58ch; }
.hero-main .meta { color: #b8bfcc; }
.hero-side { padding: 28px 26px; }
.hero-side h2 { font-size: 22px; border-top: 3px solid var(--ink); padding-top: 10px; margin-bottom: 8px; }
.next-item { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.next-item:last-child { border-bottom: 0; }
.next-item h3 { font-size: 18px; margin-top: 4px; }
@media (max-width: 860px) {
    .hero { grid-template-columns: minmax(0, 1fr); }
    .hero-main { min-height: 340px; padding: 32px 20px; }
}

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

.card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card .art { aspect-ratio: 16 / 10; margin-bottom: 6px; }
.card h3 { font-size: 21px; }
.card p { color: var(--ink-soft); font-size: 15px; margin: 0; }
.card .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.list-item { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; padding: 22px 0; border-top: 1px solid var(--rule); }
.list-item:first-child { border-top: 0; padding-top: 0; }
.list-item .art { aspect-ratio: 4 / 3; }
.list-item h3 { font-size: 22px; margin: 4px 0 6px; }
.list-item p { color: var(--ink-soft); font-size: 15px; margin-bottom: 6px; }
@media (max-width: 600px) { .list-item { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Issue promo ---------- */
.issue-promo { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
.issue-cover { aspect-ratio: 3 / 4; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 22px 20px; box-shadow: 0 14px 30px -18px rgb(16 35 43 / .6); }
.issue-cover .ic-name { font-family: var(--f-display); font-weight: 700; font-size: 22px; line-height: 1.15; }
.issue-cover .ic-title { font-family: var(--f-display); font-size: 26px; line-height: 1.15; }
.issue-cover .ic-id { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #cfe9ec; }
.issue-promo .ident { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 6px 0 12px; }
.issue-promo h3 { font-size: 30px; }
@media (max-width: 700px) { .issue-promo { grid-template-columns: minmax(0, 1fr); } .issue-cover { max-width: 240px; } }

/* ---------- Article page ---------- */
.article-head { text-align: center; max-width: 820px; margin: 0 auto; padding: 48px 0 26px; }
.article-head h1 { font-size: clamp(32px, 4.6vw, 50px); margin: 12px 0 14px; }
.article-head .subtitle { font-size: 20px; color: var(--ink-soft); font-family: var(--f-display); font-style: italic; margin-bottom: 18px; }
.article-head .meta { border-top: 1px solid var(--rule); padding-top: 14px; }
.byline { font-size: 15.5px; margin-bottom: 12px; }
.byline strong { font-weight: 600; }
.article-art { aspect-ratio: 21 / 8; max-width: 1000px; margin: 0 auto; }
.article-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; max-width: 1000px; margin: 40px auto 0; }
.article-body .main { min-width: 0; font-size: 17.5px; line-height: 1.75; }
.article-body h2 { font-size: 24px; margin-bottom: 12px; }
.article-body aside { min-width: 0; font-size: 14.5px; }
.article-body aside h3 { font-family: var(--f-body); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.article-body aside section { border-top: 1px solid var(--rule); padding: 14px 0 18px; }
.authors-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.authors-list span { display: block; color: var(--muted); font-size: 13.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { background: var(--paper-2); padding: 3px 9px; font-size: 13px; }
.cite { background: var(--paper-2); padding: 16px 18px; font-size: 15px; line-height: 1.6; margin-top: 8px; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0; }
@media (max-width: 820px) { .article-body { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

/* ---------- Page headings, prose, pagination ---------- */
.page-head { padding: 40px 0 26px; border-bottom: 1px solid var(--rule); margin-bottom: 34px; }
.page-head h1 { font-size: clamp(32px, 4vw, 44px); margin-top: 6px; }
.page-head p { color: var(--ink-soft); max-width: 66ch; margin: 10px 0 0; font-size: 17px; }
.prose { max-width: 70ch; font-size: 17px; line-height: 1.75; }
.prose h2 { font-size: 26px; margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.topic-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.topic-list a { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--rule); padding: 16px 0; font-family: var(--f-display); font-size: 21px; }
.topic-list .count { font-family: var(--f-body); font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .topic-list { grid-template-columns: minmax(0, 1fr); } }
.toc-section { margin-bottom: 40px; }
.toc-section > h2 { font-size: 13px; font-family: var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--kicker); border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 4px; }
.toc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.toc-row h3 { font-size: 20px; margin-bottom: 4px; }
.toc-row .pages { font-size: 13px; color: var(--muted); white-space: nowrap; }
.empty { padding: 40px 0; color: var(--muted); font-size: 17px; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 40px; }
.pagination a, .pagination span { min-width: 38px; text-align: center; padding: 7px 10px; border: 1px solid var(--rule); font-size: 14px; }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .disabled { color: #b3b6be; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #c9ccd6; margin-top: 70px; padding: 48px 0 30px; font-size: 14px; }
.footer .cols { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 30px; }
.footer h4 { font-family: var(--f-body); color: #fff; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.footer a:hover { color: #9fd8de; }
.footer .brand-mark { color: #fff; font-size: 28px; }
.footer .legal { border-top: 1px solid #2c3242; margin-top: 34px; padding-top: 16px; font-size: 12.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer .cols > :first-child { grid-column: 1 / -1; } }
