:root {
  color-scheme: light;
  font: 100%/1.55 Inter, system-ui, sans-serif;
  color: #173444;
  background: #f8fafc;
  --navy: #023047;
  --teal: #086780;
  --muted: #4c6271;
  --line: #cbdbe3;
  --soft: #e6f3f7;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--teal); text-underline-offset: 0.18em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid #b45109; outline-offset: 4px; }
::selection { background: #c9eaf3; color: var(--navy); }

.shell { width: min(100% - 2rem, 47rem); margin-inline: auto; }
.site-header { background: var(--navy); }
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  min-height: 4rem;
  padding-block: 0.65rem;
}
.nav a { color: white; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 800; text-decoration: none; }
.brand img { border-radius: 0.45rem; }
main { padding-block: clamp(1.8rem, 6vw, 4rem) 2rem; }
h1, h2, h3 { color: var(--navy); line-height: 1.17; overflow-wrap: anywhere; }
h1 { margin: 0 0 0.85rem; font-size: clamp(2rem, 6vw, 3.6rem); letter-spacing: -0.035em; text-wrap: balance; }
h2 { margin: 0 0 0.65rem; font-size: clamp(1.3rem, 3vw, 1.65rem); letter-spacing: -0.02em; }
h3 { margin: 0; font-size: 1.18rem; }
p { margin: 0 0 0.85rem; }
.post-heading { margin-bottom: 1.8rem; }
.intro { max-width: 62ch; font-size: 1.1rem; }
.featured-date { color: var(--muted); font-weight: 650; }
.featured-date time { margin-inline-start: 0.35rem; color: var(--navy); }
.archive-note { padding: 0.85rem 1rem; background: var(--soft); border-radius: 0.75rem; color: var(--navy); }
.editions, .topic-links { margin: 0; padding: 0; list-style: none; }
.editions li { padding: 1.15rem 0; border-top: 1px solid var(--line); }
.editions li:last-child { border-bottom: 1px solid var(--line); }
.post-description { overflow-wrap: anywhere; }
.post-description :is(h2, h3, h4, h5, h6) { margin: 1.6em 0 0.45em; }
.post-description > :first-child { margin-top: 0; }
.post-description :is(ul, ol) { padding-inline-start: 1.45rem; }
.post-description hr { border: 0; border-top: 1px solid var(--line); }
.post-description pre, .table-scroll { max-width: 100%; overflow-x: auto; }
.post-description blockquote { margin-inline: 0; padding-inline-start: 1rem; border-inline-start: 1px solid var(--line); }
.table-scroll { margin-block: 1.3rem; }
.post-description table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.post-description table:has(tr > :nth-child(4)) { min-width: 32rem; }
.post-description :is(td, th) { padding: 0.63rem 0.7rem; border-bottom: 1px solid var(--line); text-align: start; }
.post-description th { background: var(--soft); color: var(--navy); }
.editions time { display: block; color: var(--muted); margin-top: 0.25rem; }
.editions p { margin-top: 0.35rem; }
section + section, .app { margin-top: 2rem; }
.topic-links li + li { margin-top: 0.4rem; }
.app { background: var(--soft); padding: clamp(1.1rem, 4vw, 1.8rem); border-radius: 0.85rem; }
.store-links { display: flex; gap: 0.65rem; flex-wrap: wrap; }
.store-links a { display: inline-block; padding: 0.55rem 0.95rem; border: 1px solid var(--teal); border-radius: 0.55rem; font-weight: 700; text-decoration: none; }
.store-links a:hover { background: var(--navy); border-color: var(--navy); color: white; }
.browse { margin-top: 1.35rem; }
.site-footer { display: flex; gap: 1.1rem; color: var(--muted); border-top: 1px solid var(--line); padding-block: 1.1rem 1.65rem; }

.header-image, .post-description img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem 0 1.65rem;
  border-radius: 0.75rem;
}
.header-image { width: 100%; max-height: 32rem; object-fit: cover; }
.social-links { display: flex; gap: 0.5rem 1rem; flex-wrap: wrap; }

@font-face { font-family: Inter; src: url('/assets/fonts/Inter-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root { --navy: #0f172a; --teal: #4f46e5; --soft: #f0edff; --surface: white; color: var(--navy); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.nav { width: min(100% - 2rem, 72rem); justify-content: flex-start; }
.nav a { color: var(--navy); display: inline-flex; align-items: center; min-height: 44px; }
.nav .brand { margin-right: auto; font-size: 23px; letter-spacing: -.065em; }
.nav .nav-download { border-radius: 99px; padding-inline: 18px; background: var(--navy); color: var(--surface); text-decoration: none; font-weight: 650; }
.topic-links,.editions { display: grid; gap: 12px; }
.topic-links { grid-template-columns: repeat(auto-fit,minmax(min(100%,14rem),1fr)); }
.topic-links li + li { margin: 0; }
.topic-links a,.editions li { display: block; background: var(--surface); padding: 16px 20px; border: 1px solid var(--line); border-radius: 16px; }
.topic-links a { font-weight: 650; }
.store-links a:hover { color: var(--surface); }
@media(prefers-color-scheme: dark) {
  :root { color-scheme: dark; background: #020617; --surface: #0f172a; --navy: #f1f5f9; --teal: #c4b5fd; --muted: #cbd5e1; --line: #334155; --soft: #211c38; }
}

nav + section[id] { margin-top: 2rem; }
