/* Blog pages only. Visual values match the landing page; this file is not used there. */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: #111A27;
  font-family: "Libre Franklin", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.625;
}

img { max-width: 100%; height: auto; }

a { color: #C4321C; }
a:hover { color: #9A2413; }
a:focus-visible { outline: 2px solid #C4321C; outline-offset: 3px; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

.skip {
  position: absolute;
  left: 16px;
  top: 8px;
  transform: translateY(-150%);
  background: #0B1F3A;
  color: #fff;
  padding: 8px 12px;
  z-index: 2;
  text-decoration: none;
}
.skip:focus { transform: none; color: #fff; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.site-header { border-bottom: 1px solid #D9DEE5; background: #fff; }
.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: inherit;
}
.logo:hover { color: inherit; }
.logo-mark {
  width: 35px;
  height: 35px;
  background: #0B1F3A;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 25px;
  line-height: 1;
  flex: none;
}
.logo-mark.inverse { background: #fff; color: #0B1F3A; }
.logo-word {
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #0B1F3A;
}
.logo-word.inverse { color: #fff; }
.logo-dot { color: #C4321C; }
.logo-word.inverse .logo-dot { color: #F0624B; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 36px;
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav a {
  color: #111A27;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav a:hover { color: #C4321C; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 #C4321C; }

.header-tools { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.langs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
.langs a {
  color: #5A6474;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.langs a[aria-current="true"] { color: #0B1F3A; font-weight: 500; }
.langs a:hover { color: #C4321C; }

.btn {
  min-height: 44px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  background: #0B1F3A;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: 6px;
}
a.btn:hover { color: #fff; }

.section { padding-top: 72px; padding-bottom: 104px; }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 40rem; }
.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #C4321C;
}
.section-head h1,
.post-header h1 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: #0B1F3A;
}
.section-head h1 { font-size: clamp(1.875rem, 3.2vw, 2.625rem); }
.post-header h1 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.lead, .dek {
  margin: 0;
  color: #3D4756;
  font-size: 1.25rem;
  line-height: 1.5;
  max-width: 40rem;
}
.empty { margin: 32px 0 0; color: #3D4756; max-width: 36rem; }

.posts { list-style: none; margin: 48px 0 0; padding: 0; }
.posts > li { border-top: 1px solid #D9DEE5; }
.post-link {
  display: block;
  padding: 28px 0;
  color: inherit;
  text-decoration: none;
}
.post-link.with-cover {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.post-thumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.posts h2 {
  margin: 8px 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #0B1F3A;
}
.post-link:hover h2 { color: #C4321C; }
.post-link p { margin: 0; color: #3D4756; }
.meta, .byline, .updated { color: #5A6474; font-size: 0.9375rem; }
.byline, .updated, .reviewed { margin: 0; }
.post-header { display: flex; flex-direction: column; gap: 14px; max-width: 40rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px 14px; list-style: none; margin: 0; padding: 0; }
.tags li {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C4321C;
}
.reviewed { color: #0B1F3A; }

.post { padding-top: 40px; padding-bottom: 80px; }
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  font-size: 0.875rem;
  color: #5A6474;
}
.crumbs a { color: #0B1F3A; text-decoration: none; }
.crumbs a:hover { color: #C4321C; }
.crumbs [aria-current="page"] { color: #111A27; }

.cover, .inline-figure { margin: 28px 0 0; }
.cover img, .inline-figure img { width: 100%; display: block; border-radius: 10px; }
.cover img { max-height: 640px; object-fit: cover; object-position: center 20%; }
.cover figcaption, .inline-figure figcaption { margin-top: 8px; color: #5A6474; font-size: 0.8125rem; }
.video-facade {
  display: grid;
  place-items: center;
  width: 100%;
  margin: 1.5rem 0;
  padding: 0;
  border: 0;
  background: #0B1F3A;
  color: #fff;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  min-height: 180px;
}
.video-facade img { width: 100%; display: block; }
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  color: #0B1F3A;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
}
.video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; margin: 1.5rem 0; }
.translation { margin: 0; font-size: 0.9375rem; }

.post-grid { display: grid; gap: 32px; margin-top: 36px; }
@media (min-width: 960px) {
  .post-grid.has-toc {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
  }
  .toc { position: sticky; top: 24px; }
}

.toc { border-top: 2px solid #0B1F3A; padding-top: 14px; }
.toc-title {
  margin: 0 0 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5A6474;
}
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.toc a { color: #111A27; text-decoration: none; font-size: 0.9375rem; }
.toc a:hover { color: #C4321C; }

.prose { font-size: 1.0625rem; line-height: 1.7; max-width: 40rem; }
.prose h2, .prose h3 {
  margin: 2rem 0 0.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #0B1F3A;
}
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.25rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.prose li + li { margin-top: 0.35rem; }
.prose img { display: block; border-radius: 10px; margin: 1rem 0; }
.prose blockquote {
  margin: 0 0 1rem;
  padding: 12px 16px;
  border-left: 3px solid #C4321C;
  background: #F3F5F7;
  color: #3D4756;
}
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-top: 1px solid #D9DEE5; vertical-align: top; }
.prose th { color: #0B1F3A; font-weight: 600; }
.prose pre {
  overflow: auto;
  background: #0B1F3A;
  color: #fff;
  padding: 16px 18px;
  border-radius: 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}
.prose code { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.9em; }
.prose :not(pre) > code { background: #F3F5F7; padding: 0.1em 0.35em; border-radius: 4px; }

.sources { margin-top: 48px; padding-top: 28px; border-top: 1px solid #D9DEE5; max-width: 40rem; }
.sources h2, .related h2 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0B1F3A;
}
.sources ol { margin: 16px 0 0; padding-left: 1.25rem; }

.related { background: #F3F5F7; padding: 64px 0; }
.related-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.related h3 { margin: 0 0 8px; font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.related a { color: #0B1F3A; text-decoration: none; }
.related a:hover { color: #C4321C; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid #D9DEE5;
  color: #5A6474;
}
.pager a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #0B1F3A;
  font-weight: 500;
  text-decoration: none;
}
.pager a:hover { color: #C4321C; }

.site-footer { background: #071629; color: #8FA0B6; }
.footer-inner { padding-top: 72px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 48px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; max-width: 18rem; }
.footer-tagline { font-size: 0.875rem; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; }
.footer-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #8FA0B6;
  padding-bottom: 6px;
}
.site-footer a {
  color: #fff;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-footer a:hover { color: #fff; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
  justify-content: space-between;
  border-top: 1px solid #1E3050;
  padding-top: 20px;
  font-size: 0.875rem;
}

@media (max-width: 720px) {
  .post-link.with-cover { grid-template-columns: 1fr; }
  .nav { gap: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
