:root {
  color-scheme: light;
  --ink: #16171a;
  --muted: #656970;
  --paper: #fff;
  --soft: #f5f6f7;
  --line: #d9dce1;
  --blue: #1557d6;
  font-family: "Anek Latin", Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.5; }
img { display: block; max-width: 100%; background: var(--soft); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .16em; }
a:hover { color: var(--blue); }
.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 20; padding: .75rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.wordmark { display: inline-flex; align-items: baseline; gap: .12rem; font-size: 1.5rem; text-decoration: none; white-space: nowrap; }
.wordmark span, .wordmark strong { font-weight: 700; }
.wordmark span { color: var(--blue); }
.primary-nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 1.75rem); font-size: .9rem; font-weight: 600; }
.primary-nav a { text-decoration: none; }

.lead-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr) 210px; gap: 30px; padding-block: 40px 52px; }
.section-label { margin: 0; padding: 0 0 .7rem; border-bottom: 1px solid var(--ink); font-size: 1.3rem; line-height: 1.25; font-weight: 600; }
.compact-post { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.compact-post h3 { margin: 0 0 .55rem; font-size: 1rem; line-height: 1.3; font-weight: 600; }
.compact-post h3 a { text-decoration: none; }
.post-date { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.rail-link { display: inline-block; margin-top: 1rem; font-size: .9rem; font-weight: 600; }
.lead-story { min-width: 0; }
.lead-story > a { display: block; text-decoration: none; }
.lead-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lead-copy { padding-top: 1.25rem; }
.lead-copy h1 { max-width: 20ch; margin: 0 0 .7rem; font-size: clamp(2rem, 3.2vw, 2.75rem); line-height: 1.06; font-weight: 700; }
.lead-copy h1 a { text-decoration: none; }
.lead-copy > p { max-width: 62ch; margin: 0; color: #3c3f44; font-size: 1rem; line-height: 1.55; }
.byline { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: 1rem; color: var(--muted); font-size: .8rem; }

.story-section { padding-bottom: 72px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--ink); padding: 1rem 0 1.25rem; }
.section-heading h2 { margin: 0; font-size: 1.55rem; line-height: 1.25; font-weight: 600; }
.section-heading a { font-size: .9rem; font-weight: 600; }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 24px; }
.story-card { min-width: 0; }
.story-image-link { display: block; margin-bottom: 1rem; overflow: hidden; }
.story-image { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .2s ease; }
.story-image-link:hover .story-image { transform: scale(1.012); }
.story-card h2 { margin: 0 0 .55rem; font-size: 1.25rem; line-height: 1.18; font-weight: 600; }
.story-card h2 a { text-decoration: none; }
.story-card p { margin: .8rem 0 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }

.archive-page { padding-block: 48px 80px; }
.archive-header { margin-bottom: 32px; padding-bottom: 1rem; border-bottom: 1px solid var(--ink); }
.archive-header h1 { margin: 0; font-size: clamp(2.25rem, 4vw, 3.25rem); line-height: 1.1; font-weight: 700; }

.article-rule { height: 4px; background: var(--blue); }
.article-shell { display: grid; grid-template-columns: minmax(0, 760px) 220px; justify-content: center; gap: 40px; align-items: start; padding-block: 40px 88px; }
.article-shell.content-page { grid-template-columns: minmax(0, 760px); }
.article-main { min-width: 0; }
.article-header { padding: 1rem 0 1.75rem; }
.article-header h1 { max-width: 19ch; margin: 0; font-size: clamp(2.25rem, 4vw, 3.25rem); line-height: 1.06; font-weight: 700; }
.article-byline { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: 1rem; color: var(--muted); font-size: 1rem; }
.article-header > p { max-width: 42rem; margin: 1.1rem 0 0; color: #3c3f44; font-size: 1.1rem; line-height: 1.55; }
.article-hero { width: 100%; max-height: 560px; object-fit: cover; margin-bottom: 2rem; }
.article-body { font-size: 1.08rem; line-height: 1.7; }
.article-body h2, .article-body h3 { margin: 2.25rem 0 .75rem; line-height: 1.2; font-weight: 600; }
.article-body h2 { font-size: 1.75rem; }
.article-body h3 { font-size: 1.35rem; }
.article-body p, .article-body ul, .article-body ol, .article-body figure, .article-body blockquote { margin: 0 0 1.2rem; }
.article-body img { width: auto; height: auto; max-height: 620px; margin: 1.8rem auto; object-fit: contain; }
.article-body a[href] { color: #174eae; }
.article-body blockquote { border-left: 3px solid var(--blue); padding-left: 1.2rem; font-size: 1.08rem; }
.article-body pre { font: inherit; white-space: normal; }
.article-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .9rem; }
.article-body th, .article-body td { padding: .65rem; border: 1px solid var(--line); text-align: left; }
.related-rail { position: sticky; top: 24px; }

.missing { height: 50vh; padding-block: 72px; }
.missing h1 { margin: 0 0 1rem; font-size: 3rem; line-height: 1.1; }
.site-footer { border-top: 1px solid var(--ink); background: var(--ink); color: white; }
.footer-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; padding-block: 40px 60px; }
.footer-grid nav { display: grid; grid-template-columns: repeat(2, auto); gap: .65rem 2rem; font-size: .85rem; }
.footer-mark span { color: #80a5ef; }

@media (max-width: 950px) {
  .lead-layout { grid-template-columns: 170px minmax(0, 1fr); }
  .topic-rail { display: none; }
  .article-shell { grid-template-columns: minmax(0, 1fr) 190px; }
  .article-main { grid-column: 1; }
  .related-rail { grid-column: 2; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 28px, 680px); }
  .masthead { height: auto; align-items: flex-start; flex-direction: column; padding-block: 16px; gap: .8rem; }
  .primary-nav { width: 100%; gap: .8rem 1.2rem; overflow-x: auto; padding-bottom: 2px; font-size: .85rem; }
  .lead-layout { display: flex; flex-direction: column; gap: 30px; padding-top: 24px; }
  .lead-story { order: -1; }
  .lead-copy h1 { font-size: 2.1rem; }
  .latest-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .latest-rail .section-label, .latest-rail .rail-link { grid-column: 1 / -1; }
  .story-grid { grid-template-columns: 1fr; gap: 28px; }
  .story-card { display: grid; grid-template-columns: 36% 1fr; gap: 16px; }
  .story-image-link { margin: 0; }
  .story-image { height: 100%; aspect-ratio: 4 / 3; }
  .story-card h2 { font-size: 1.1rem; }
  .story-card p { display: none; }
  .archive-page { padding-block: 36px 64px; }
  .archive-header { margin-bottom: 26px; }
  .archive-header h1 { font-size: 2.25rem; }
  .article-shell { display: block; padding-top: 26px; }
  .related-rail { position: static; margin-top: 3rem; }
  .article-header h1 { font-size: 2.25rem; }
  .article-header > p { font-size: 1.05rem; }
  .article-body { font-size: 1.03rem; line-height: 1.68; }
  .footer-grid { flex-direction: column; }
}
