:root {
  color-scheme: dark;
  --background: #171822;
  --surface: #1d1e2b;
  --navigation: #1f2024;
  --rule: #373947;
  --ink: #f5f6fa;
  --muted: #bec2d2;
  --accent: #76cfff;
  --brand: #00a3ff;
  --headings: Poppins, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: 16px/1.6 "Segoe UI", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: #fff; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { font-family: var(--headings); line-height: 1.23; }
h1, h2, h3 { text-wrap: balance; }
h1 { margin: 0; font-size: clamp(2rem, 3.4vw, 3rem); letter-spacing: -.025em; }
p { margin: 0 0 1rem; }

.wrap { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: var(--navigation); border-bottom: 1px solid var(--rule); }
.utility { background: #17181d; border-bottom: 1px solid var(--rule); }
.utility-inner, .masthead, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.utility-inner { min-height: 39px; color: var(--muted); font-size: .82rem; }
.utility nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.utility a, .site-footer a { color: var(--muted); }
.masthead { min-height: 73px; }
.brand-heading { font-size: 1.65rem; line-height: 1.1; }
.brand { display: block; flex: 0 0 auto; color: var(--ink); font: 750 1.65rem/1.1 var(--headings); letter-spacing: -.04em; }
.brand img { max-width: 260px; max-height: 34px; }
.brand, .site-header nav a, .site-footer nav a { text-decoration: none; }
.primary-menu { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.55rem; }
.primary-menu a { padding-block: .5rem; color: var(--ink); font-size: .875rem; font-weight: 650; }
.site-header nav a:hover, .site-header nav a[aria-current], .site-footer a:hover, .site-footer a[aria-current] { color: var(--accent); }
.primary-menu a[aria-current] { box-shadow: inset 0 -2px var(--brand); }
.site-footer { margin-top: 40px; border-top: 1px solid var(--rule); color: var(--muted); background: var(--navigation); }
.footer-inner { min-height: 75px; font-size: .86rem; }
.skip-link { position: absolute; z-index: 1; inset: .5rem auto auto .5rem; padding: .5rem .75rem; background: var(--surface); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.main { margin-block: 27px 48px; }
.featured { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(168px, auto)); gap: 8px; }
.feature {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: end;
  background-color: #222632;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}
.feature:first-child { grid-row: span 2; background-color: #212e48; }
.feature .feature-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature:has(.feature-image)::after { content: ""; position: absolute; inset: 0; background: #131722b5; }
.feature-text { position: relative; z-index: 1; padding: 1rem 1.15rem; }
.feature:first-child .feature-text { padding: clamp(1.25rem, 3vw, 2rem); }
.feature h2 { margin: .45rem 0 0; font-size: clamp(1rem, 1.6vw, 1.3rem); }
.feature:first-child h2 { font-size: clamp(1.65rem, 2.8vw, 2.5rem); }
.feature p { margin: .75rem 0 0; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .7rem; color: var(--muted); font-size: .79rem; }
.category-link { color: var(--accent); font-weight: 650; text-decoration: none; }
.category-link:hover { text-decoration: underline; }
.feature h2 a, .story h2 a, .story h3 a, .story-list a { color: var(--ink); text-decoration: none; }
.feature h2 a:hover, .story h2 a:hover, .story h3 a:hover, .story-list a:hover { color: var(--accent); }

.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: clamp(1rem, 3vw, 1.75rem); min-width: 0; }
.latest { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-block: 20px; }
.latest .panel { padding: 0; }
.latest .story { padding: 1rem 1.1rem; }
.latest h2 { margin: .3rem 0 0; font-size: 1.05rem; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 342px); gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; min-width: 0; }
.section-title { margin: 0; padding-bottom: .8rem; border-bottom: 1px solid var(--rule); font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; }
.section-title::after { display: block; content: ""; width: 2.25rem; height: 2px; position: relative; bottom: calc(-.8rem - 1px); background: var(--brand); }
.story-list { margin: 0; padding: 0; list-style: none; }
.story-list li { padding-block: .85rem; border-bottom: 1px solid var(--rule); }
.story-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.story-list li a { display: inline-block; line-height: 1.35; font-weight: 650; }
.listing { display: grid; gap: 0; }
.listing .story { padding-block: 1rem; border-bottom: 1px solid var(--rule); }
.listing .story:first-child { padding-top: 0; }
.listing .story:last-child { padding-bottom: 0; border-bottom: 0; }
.listing h2, .listing h3 { margin: .25rem 0 .45rem; font-size: clamp(1.15rem, 2vw, 1.5rem); }
.listing p { margin: 0; color: var(--muted); max-width: 73ch; }
.page-heading { margin-bottom: 20px; }
.page-heading p { max-width: 68ch; margin: .75rem 0 0; color: var(--muted); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .1rem .5rem; align-items: baseline; margin-bottom: .8rem; color: var(--muted); font-size: .82rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.article-heading { margin-bottom: 1.35rem; }
.article-heading .meta { margin-top: .75rem; }
.article-heading > .category-link { display: inline-block; margin-bottom: .55rem; font-size: .84rem; }
.prose { max-width: 72ch; line-height: 1.72; overflow-wrap: anywhere; }
.prose h2 { margin-block: 1.65em .5em; font-size: 1.47rem; }
.prose h3, .prose h4, .prose h5 { margin-block: 1.4em .5em; font-size: 1.15rem; }
.prose :is(ul, ol) { margin: 0 0 1.15rem; padding-inline-start: 1.55rem; }
.prose li + li { margin-top: .38rem; }
.prose #contents { border: 1px solid var(--rule); border-left: 3px solid var(--brand); border-radius: 4px; background: var(--background); padding: .9rem 1rem .9rem 2rem; }
.prose :is(table, pre) { display: block; max-width: 100%; overflow-x: auto; }
.prose table { border-collapse: collapse; }
.prose :is(td, th) { padding: .45rem .7rem; border: 1px solid var(--rule); text-align: left; }
.prose blockquote { margin-inline: 0; padding-inline-start: 1rem; border-inline-start: 3px solid var(--brand); }
.prose :is(h2, h3, h4, h5, p)[id] { scroll-margin-block: 1rem; }
.tag-list { color: var(--muted); margin: 1.65rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: .85rem; }
.story-navigation { display: flex; flex-wrap: wrap; gap: .7rem 2rem; }
.story-navigation a { flex: 1 1 240px; }
.page-body { max-width: 870px; }

@media (max-width: 1070px) {
  .masthead { flex-wrap: wrap; gap: .4rem 1.4rem; padding-block: .85rem; }
  .primary-menu { gap: .35rem 1.1rem; }
  .columns { grid-template-columns: minmax(0, 1fr) minmax(220px, 28%); }
}

@media (max-width: 770px) {
  .wrap { width: calc(100% - 36px); }
  .featured { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .feature { min-height: 145px; }
  .feature:first-child { grid-row: auto; grid-column: span 2; min-height: 220px; }
  .latest { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .columns { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .wrap { width: calc(100% - 28px); }
  .primary-menu { column-gap: .9rem; }
  .primary-menu a { font-size: .8rem; }
  .feature-text, .latest .story { padding: .8rem; }
  .feature { min-height: 150px; }
  .utility-inner, .footer-inner { gap: .5rem 1rem; flex-wrap: wrap; padding-block: .55rem; }
}
