/**
 * 1. Reset
 */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ol, ul, figure { margin: 0; }
img, picture { display: block; }
img { max-width: 100%; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/**
 * 2. Design tokens
 */
@font-face {
    font-family: 'Jakarta';
    src: url('fonts/plus-jakarta-sans-variable-tr.woff2') format('woff2');
    font-weight: 200 800;
    font-display: swap;
}
:root {
    --ink: #15202d; --muted: #536172; --red: #b31e31; --line: #d9dfe4; --paper: #fff; --soft: #f3f5f7;
    --category-neutral: #465569; --category-accent: var(--category-neutral); --category-tint-weight: 8%;
    --category-keyline: .125rem;
    --night: #162536; --night-two: #21374c; --night-label: #e9c0bc; --on-night: #f6f7f8; --accent-rule: #c2283b;
    --faint: #e7eaee; --focus: #2464ad; --paper-warm: #f6f2ed; --interactive-light: #f9eef0;
    --font-sans: 'Jakarta', Arial, sans-serif;
    --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.25rem;
    --s6: 1.5rem; --s7: 2rem; --s8: 2.5rem; --s9: 3rem; --s10: 4rem;
    --container: 78rem; --gutter: clamp(1rem, 3vw, 2.25rem); --small-type: .8125rem; --label-type: .875rem;
    --body-type: 1rem; --section-type: clamp(1.24rem, 1.1rem + .55vw, 1.65rem);
    --lead-type: clamp(1.36rem, 1.05rem + 1.2vw, 2rem); --card-type: clamp(.99rem, .91rem + .4vw, 1.21rem);
    --mark-type: clamp(2.3rem, 1.65rem + 2.3vw, 3.75rem); --tracking: .065em; --compact: -.035em;
    --control: 2.65rem; --motion: 180ms ease-out; --focus-width: .1875rem;
}

/**
 * 3. Base styles
 */
body { background: var(--paper); color: var(--ink); font: 500 var(--body-type)/1.55 var(--font-sans); }
button { cursor: pointer; color: inherit; }
:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: .125rem; }
.icon { width: 1.12rem; height: 1.12rem; flex: none; }
picture img { width: 100%; height: 100%; object-fit: cover; }

/**
 * 4. Layout
 */
.shell { width: min(calc(100% - var(--gutter) * 2), var(--container)); margin-inline: auto; }
.content-wrap { padding-block: var(--s5) var(--s9); min-height: 50vh; }

/**
 * 5. News cards
 */
[data-category-id="0"] { --category-accent: var(--category-neutral); }
.story-card, .card-copy { min-width: 0; }
.story-card a { display: block; }
.card-photo { position: relative; overflow: hidden; aspect-ratio: 16/9; background: var(--soft); }
.card-photo picture, .card-photo img { width: 100%; height: 100%; object-fit: cover; }
.category-block .card-photo { border-block-end: var(--category-keyline) solid var(--category-accent); }
.card-photo img { transition: transform var(--motion); }
.card-copy { padding-block: var(--s2); }
.card-category { color: var(--category-accent); font-size: var(--small-type); font-weight: 750; letter-spacing: var(--tracking); text-transform: uppercase; }
.card-title { margin-top: var(--s1); font: 780 var(--card-type)/1.31 var(--font-sans); letter-spacing: -.024em; overflow-wrap: anywhere; }
.story-card:focus-within .card-title { text-decoration: underline; }
.story-card--compact > a, .story-card--brief > a { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); gap: var(--s3); align-items: center; }
.story-card--compact .card-copy, .story-card--brief .card-copy { padding: 0; }
.story-card--compact .card-title, .story-card--brief .card-title { font-size: var(--label-type); margin: 0; line-height: 1.4; }
.story-card--compact .card-photo, .story-card--brief .card-photo { aspect-ratio: 1.55; }
.video-indicator { position: absolute; bottom: var(--s2); left: var(--s2); display: grid; place-items: center; color: var(--paper); background: var(--red); width: 1.8rem; height: 1.8rem; }
.not-found { padding-block: var(--s9); }
.not-found a { color: var(--red); text-decoration: underline; }

/**
 * 6. Utilities
 */
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: .0625rem; height: .0625rem; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 10; padding: var(--s3) var(--s5); background: var(--paper); }

/**
 * 7. Media queries
 */
@media (hover: hover) {
    .story-card a:hover .card-title { color: var(--category-accent); }
    .story-card a:hover .card-photo img { transform: scale(1.035); }
}
@media (prefers-reduced-motion: reduce) {
    .card-photo img { transition: none; }
    .story-card a:hover .card-photo img { transform: none; }
}
@media (max-width: 36rem) {
    .content-wrap { padding-top: var(--s3); }
}
