:root {
    color-scheme: light;
    --paper: #fbf6e8;
    --ink: #241a20;
    --wine: #8e1e39;
    --yellow: #ffd344;
    --rule: #d6cabb;
    --muted: #60514f;
    --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --serif: Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--sans); }
a { color: inherit; }
:focus-visible { outline: 3px solid #145ea9; outline-offset: 4px; }
.shell { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.skip-link { position: absolute; z-index: 1; left: 1rem; top: -5rem; background: white; padding: .75rem 1rem; }
.skip-link:focus { top: .5rem; }

.edition-bar { background: var(--ink); color: var(--paper); }
.edition-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; align-items: center; min-height: 2.25rem; font-size: .76rem; font-weight: 650; }
.edition-line a { text-decoration: none; padding-block: .375rem; }
.edition-line a:hover { text-decoration: underline; }
.masthead { display: flex; justify-content: space-between; gap: 1rem; align-items: end; padding-block: .6rem .9rem; }
.wordmark { display: inline-block; color: var(--ink); font: 950 clamp(3.2rem, 8.2vw, 7rem)/.98 var(--sans); text-decoration: none; letter-spacing: -.085em; }
.wordmark span { color: var(--wine); }
.masthead p { margin: 0 0 .18rem; color: var(--muted); font: italic 700 clamp(1rem, 2.1vw, 1.5rem)/1.12 var(--serif); text-align: right; }
.section-nav { border-block: 2px solid var(--ink); }
.nav-line { display: flex; flex-wrap: wrap; }
.section-nav a { display: inline-flex; align-items: center; min-height: 2.85rem; padding-inline: .85rem; text-decoration: none; font-size: .91rem; font-weight: 780; white-space: nowrap; }
.section-nav a:hover { background: #f1e4cd; }
.section-nav a[aria-current] { background: var(--wine); color: white; }
.section-nav a:focus-visible { outline-offset: -4px; }

.cover { display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr); gap: 1.1rem; margin-block: 1.4rem 1.8rem; align-items: stretch; }
.lead-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 19rem; border: 2px solid var(--ink); }
.cover-photo { min-height: 17rem; position: relative; background: #e6a520; }
.cover-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 50% 51%; }
.lead-copy { align-self: center; padding: clamp(1rem, 2.15vw, 1.85rem); overflow-wrap: anywhere; }
.lead-copy h1 { font: 750 clamp(1.65rem, 3vw, 2.9rem)/1.03 var(--serif); letter-spacing: -.04em; margin: .65rem 0 .85rem; }
.lead-copy h1 a, .story h3 a { text-decoration: none; }
.lead-copy h1 a:hover, .story h3 a:hover { color: var(--wine); text-decoration: underline; text-underline-offset: .12em; text-decoration-thickness: .07em; }
.read-story { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; margin-top: .55rem; color: var(--wine); font-size: .88rem; font-weight: 800; text-underline-offset: .18em; }

.joke { background: #ffe47a; border: 2px solid var(--ink); padding: 1.2rem; }
.joke--featured { background: var(--yellow); padding: clamp(1.15rem, 2.6vw, 1.9rem); box-shadow: 4px 4px 0 var(--ink); }
.joke-label { margin: 0; font-size: .78rem; font-weight: 850; text-transform: uppercase; letter-spacing: .09em; }
.joke h2 { margin: .7rem 0 1rem; font: bold clamp(1.45rem, 2.65vw, 2.3rem)/1.12 var(--serif); letter-spacing: -.025em; }
.joke summary { width: fit-content; min-height: 2.75rem; padding: .58rem .82rem; border: 1px solid var(--ink); background: var(--paper); font-size: .88rem; font-weight: 800; cursor: pointer; }
.joke summary:hover { background: var(--ink); color: white; }
.joke details p { margin: .7rem 0 0; font-weight: 650; }
.joke details .hide, .joke details[open] .show { display: none; }
.joke details[open] .hide { display: inline; }
.originals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-block: 1rem 1.75rem; }
.originals h2 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); }

.section-title { font: 800 clamp(2.45rem, 6vw, 4.6rem)/1 var(--serif); letter-spacing: -.05em; margin: 1.45rem 0 1rem; }
.section-heading { border-top: 2px solid var(--ink); display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-block: .55rem .2rem; }
.section-heading h2 { font: 800 clamp(1.9rem, 4vw, 2.65rem)/1.1 var(--serif); letter-spacing: -.042em; margin: 0; }
.section-heading > span, .story-meta { font-size: .8rem; font-weight: 650; color: var(--muted); }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1.5rem; }
.story { border-top: 1px solid var(--rule); padding: .8rem 0 1rem; overflow-wrap: anywhere; }
.story h3 { font: bold clamp(1.2rem, 2vw, 1.58rem)/1.19 var(--serif); margin: .32rem 0 .55rem; letter-spacing: -.016em; }
.story-meta { margin: 0; }
.category { display: inline-flex; align-items: center; min-height: 2rem; padding: .21rem .52rem; width: fit-content; color: #51243e; background: #eedde7; text-decoration: none; font-weight: 850; font-size: .69rem; text-transform: uppercase; letter-spacing: .06em; }
.category:hover { text-decoration: underline; }
.category[data-section="weird-news"] { color: #6f1631; background: #f4d9de; }
.category[data-section="dad-jokes"], .category[data-section="jokes"] { color: #4f3112; background: #f9e3a7; }
.category[data-section="facepalm"] { color: #12483f; background: #d8e9de; }
.category[data-section="botched-crimes"] { color: #662c1e; background: #f3ded0; }
.category[data-section="cursed-social"] { color: #3d3066; background: #e7ddf4; }
.empty { padding: 1rem 0 2rem; }
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .85rem; margin-block: 1rem 2.15rem; font-size: .88rem; }
.pagination a { border: 1px solid var(--ink); padding: .65rem .85rem; text-decoration: none; font-weight: 750; }
.pagination a:hover { background: var(--ink); color: white; }

.site-footer { margin-top: 2rem; padding: 1.4rem 0 1.8rem; color: var(--paper); background: var(--ink); }
.footer-content { display: flex; flex-wrap: wrap; gap: .9rem 2rem; justify-content: space-between; }
.site-footer .wordmark { color: var(--paper); font-size: 1.8rem; }
.site-footer .wordmark span { color: var(--yellow); }
.site-footer p, .site-footer ul { margin: .3rem 0 0; font-size: .82rem; }
.site-footer details > summary { padding: .5rem 0; cursor: pointer; font-weight: 700; }
.site-footer li span { color: #ffdf88; margin-inline-start: .35rem; }

@media (max-width: 56rem) {
    .cover { grid-template-columns: minmax(0, 1fr) minmax(12rem, .48fr); }
    .lead-story { grid-template-columns: 1fr; }
    .cover-photo { min-height: 13rem; }
    .cover-photo img { object-position: 50% 33%; }
    .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 39rem) {
    .shell { width: calc(100% - 1.5rem); }
    .masthead { align-items: start; flex-direction: column; gap: .28rem; }
    .masthead p { text-align: left; }
    .masthead br { display: none; }
    .section-nav a { padding-inline: .6rem; font-size: .83rem; }
    .cover, .originals { grid-template-columns: 1fr; }
    .cover { margin-top: .9rem; }
    .lead-story { min-height: 0; }
    .cover-photo { min-height: 11rem; }
    .story-grid { grid-template-columns: 1fr; }
}
