/* Blog pages (templates/blog). Header/footer rules mirror the landing page in frontend/index.html. */

:root {
  --brand-color: #287c75;
  --brand-logo: #308881;
  --brand-hover: #22726b;
  --brand-tint: rgba(48, 136, 129, 0.08);
  --text-primary: #0a0a0a;
  --text-body: #262626;
  --text-secondary: #6b6b6b;
  --background: #ffffff;
  --surface: #f5f5f5;
  --border: #e5e5e5;
  --cover-gradient: linear-gradient(135deg, #263a4d 0%, #2a7c75 100%);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand-color);
  outline-offset: 3px;
  border-radius: 4px;
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--brand-logo);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--brand-logo);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.site-nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--brand-color);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-dropdown-trigger:hover {
  color: var(--brand-color);
}

.nav-dropdown-trigger svg {
  width: 0.7rem;
  height: 0.7rem;
  margin-right: -0.35rem;
  transition: transform 0.2s;
}

.nav-dropdown:hover .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.75rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
}

/* Bridges the gap between trigger and menu so hover isn't lost. */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.75rem;
  height: 0.75rem;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
}

.nav-dropdown-menu a:hover {
  background: var(--brand-tint);
}

.nav-dropdown-menu svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.try-free-btn,
.login-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.2s;
}

.try-free-btn {
  background: var(--brand-color);
  border: 1.5px solid var(--brand-color);
  color: white;
}

.try-free-btn:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.login-btn {
  background: white;
  border: 2px solid var(--brand-color);
  color: var(--brand-color);
}

.login-btn:hover {
  background: var(--brand-tint);
}

.mobile-menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: white;
  border: 1px solid var(--border);
  cursor: pointer;
}

.mobile-menu-button svg {
  width: 20px;
  height: 20px;
  color: var(--text-primary);
}

html.mobile-menu-open {
  overflow: hidden;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 2000;
}

.mobile-menu-overlay[data-open="true"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 92vw);
  background: white;
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0.5rem;
}

.mobile-menu-overlay[data-open="true"] .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

.mobile-menu-title {
  font-weight: 700;
}

.mobile-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
}

.mobile-menu-close svg {
  width: 18px;
  height: 18px;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.25rem 0;
}

.mobile-menu-link {
  padding: 0.75rem;
  border-radius: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
}

.mobile-menu-link:hover {
  background: var(--brand-tint);
  color: var(--brand-color);
}

.mobile-menu-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.mobile-menu-actions .try-free-btn,
.mobile-menu-actions .login-btn {
  display: block;
  width: 100%;
  text-align: center;
}

/* Shared blog building blocks */
.blog-main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

.blog-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.post-cover {
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--surface);
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cover-gradient);
}

.post-cover--placeholder svg {
  width: 18%;
  max-width: 72px;
  fill: rgba(255, 255, 255, 0.92);
}

.post-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-color);
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Blog index */
.blog-head {
  padding: 4rem 0 2.5rem;
}

.blog-head h1 {
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.blog-head-sub {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.blog-head-sub a {
  color: var(--brand-color);
  font-weight: 600;
}

.blog-tabs {
  display: flex;
  gap: 0.5rem;
  margin-top: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.blog-tabs::-webkit-scrollbar {
  display: none;
}

.blog-tab {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.925rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s;
}

.blog-tab:hover {
  background: var(--surface);
  color: var(--text-primary);
}

.blog-tab[aria-current="page"] {
  border-color: var(--border);
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
  font-weight: 600;
}

.blog-empty {
  padding: 1rem 0;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.post-featured {
  margin-bottom: 3.5rem;
}

.post-featured-link {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s;
}

.post-featured-link:hover {
  border-color: rgba(48, 136, 129, 0.4);
}

.post-featured-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
}

.post-featured-text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-featured-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: wrap;
  transition: color 0.2s;
}

.post-featured-link:hover .post-featured-title {
  color: var(--brand-color);
}

.post-featured-excerpt {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* Image runs flush to the card's left edge and fills its height. */
.post-featured .post-cover {
  height: 100%;
  border-radius: 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3.5rem 1.5rem;
}

.post-card-link {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

/* Taller than 16:9 so cards read as image-led rather than wide strips. */
.post-card .post-cover {
  aspect-ratio: 5 / 4;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.post-card-link:hover .post-cover img,
.post-featured-link:hover .post-cover img {
  transform: scale(1.02);
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0 1rem;
}

.post-card .post-kicker {
  font-size: 0.75rem;
}

.post-card-title {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-wrap: balance;
  transition: color 0.2s;
}

.post-card-link:hover .post-card-title {
  color: var(--brand-color);
}

.post-card-body .post-card-meta {
  margin-top: auto;
  padding-top: 0.25rem;
}

/* Call to action band */
.blog-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 5rem;
  padding: 2.5rem 3rem;
  border-radius: 1rem;
  background: var(--cover-gradient);
  color: white;
}

.blog-cta h2 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: wrap;
}

.blog-cta p {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
}

.cta-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  background: white;
  color: var(--brand-color);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.2s;
}

.cta-btn:hover {
  background: #eef6f5;
}

.cta-icon {
  width: 1rem;
  height: 1rem;
}

/* Article */
.blog-main:has(.post) {
  max-width: 1264px;
}

.post {
  padding-top: 3.5rem;
}

.post-header {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.post-header--with-cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  column-gap: 2rem;
  align-items: start;
}

.post-header--with-cover .post-breadcrumb {
  grid-column: 1 / -1;
}

.post-heading {
  min-width: 0;
  max-width: 872px;
}

/* Next to a thumbnail, the meta line sits level with the image's bottom edge. */
.post-header--with-cover .post-heading {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.post-header--with-cover .post-meta {
  margin-top: auto;
  padding-top: 1.5rem;
}

.post-thumbnail {
  width: 100%;
  max-width: 360px;
  border-radius: 1rem;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-breadcrumb {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.post-breadcrumb a {
  color: var(--brand-color);
  font-weight: 500;
  text-decoration: none;
}

.post-breadcrumb a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-header h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.032em;
  text-wrap: pretty;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.925rem;
  color: var(--text-secondary);
}

.post-meta> :first-child {
  color: var(--text-primary);
  font-weight: 600;
}

.post-author-role {
  color: var(--text-secondary);
  font-weight: 400;
}

.post-media {
  margin-bottom: 3rem;
  border-radius: 1rem;
  overflow: hidden;
}

.post-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #0a0a0a;
}

.post-media.video-embed {
  border-radius: 1rem;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 4rem;
  margin-top: 3rem;
}

.post-content {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.post-body {
  min-width: 0;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text-body);
}

.post-aside {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

/* The aside spans the article so navigation can stick throughout reading. */
.post-aside-inner {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Sidebar product card */
.post-promo {
  padding: 1.5rem;
  border: 1px solid rgba(48, 136, 129, 0.18);
  border-radius: 1rem;
  background: linear-gradient(180deg, #f2f8f7 0%, #ffffff 100%);
}

.post-promo-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand-logo);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.post-promo-brand svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.post-promo-title {
  margin-top: 0.75rem;
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.post-promo-list {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-body);
  font-size: 0.9rem;
  line-height: 1.45;
}

.post-promo-list li {
  position: relative;
  padding-left: 1.5rem;
}

.post-promo-list li + li {
  margin-top: 0.45rem;
}

.post-promo-list li::before {
  content: "";
  position: absolute;
  top: 0.2em;
  left: 0.3rem;
  width: 0.35rem;
  height: 0.7rem;
  border: solid var(--brand-color);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.post-promo-btn {
  display: block;
  margin-top: 1.25rem;
  padding: 0.7rem 1rem;
  border-radius: 0.6rem;
  background: var(--brand-color);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s;
}

.post-promo-btn:hover {
  background: var(--brand-hover);
}

.post-promo-note {
  margin-top: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-align: center;
}

.post-toc-disclosure > summary {
  list-style: none;
  pointer-events: none;
}

.post-toc-disclosure > summary::-webkit-details-marker {
  display: none;
}

.post-toc-title {
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.post-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--border);
}

.post-toc a {
  display: block;
  margin-left: -1px;
  padding: 0.35rem 0 0.35rem 1rem;
  border-left: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.post-toc a:hover {
  color: var(--text-primary);
}

.post-toc a.is-active {
  border-left-color: var(--brand-color);
  color: var(--brand-color);
  font-weight: 500;
}

.post-body>*+* {
  margin-top: 1.25rem;
}

.post-body h2,
.post-body h3 {
  color: var(--text-primary);
  font-weight: 700;
  scroll-margin-top: 96px;
}

.post-body h2 {
  margin-top: 3.5rem;
  font-size: 1.65rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.post-body h3 {
  margin-top: 2.25rem;
  font-size: 1.25rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.post-body h2+*,
.post-body h3+* {
  margin-top: 0.75rem;
}

.post-body p,
.post-body ul,
.post-body ol {
  margin-bottom: 0;
}

.post-body a {
  color: var(--brand-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.post-body a:hover {
  color: var(--brand-hover);
}

.post-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.post-body ul,
.post-body ol {
  padding-left: 1.4rem;
}

.post-body li+li {
  margin-top: 0.4rem;
}

.post-body li::marker {
  color: var(--brand-color);
}

.post-body blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--brand-color);
  border-radius: 0 0.5rem 0.5rem 0;
  background: var(--surface);
  color: var(--text-primary);
}

.post-body blockquote> :first-child {
  margin-top: 0;
}

.post-body img {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

/* Images narrower than the column, like small UI screenshots, sit centred above their caption. */
.post-body figure img {
  margin-inline: auto;
}

.post-body figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  text-align: center;
  color: var(--text-secondary);
}

.post-body code {
  padding: 0.1em 0.35em;
  border-radius: 0.3rem;
  background: var(--surface);
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.9em;
}

.post-body pre {
  overflow-x: auto;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.post-body pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.post-body hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

/* Wrap a TL;DR or key takeaway in <div class="callout"> ... </div> (blank lines around the Markdown inside).
   Start it with <p class="callout-label">Short answer</p> for the small uppercase label. */
.post-body .callout {
  padding: 1.75rem 2rem;
  border: 1px solid #dde8e5;
  border-radius: 1rem;
  background: #f7faf9;
  line-height: 1.65;
}

/* Give boxes, tables and images room to breathe, except straight after a heading. */
.post-body> :not(h2, h3)+ :is(.callout, .table-scroll, figure),
.post-body> :is(.callout, .table-scroll, figure)+ :not(h2, h3) {
  margin-top: 2.25rem;
}

.post-body .callout> :first-child {
  margin-top: 0;
}

.post-body .callout>*+* {
  margin-top: 0.75rem;
}

.post-body .callout li+li {
  margin-top: 0.3rem;
}

.post-body .callout .callout-label {
  color: var(--brand-color);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.post-body .callout .callout-label+* {
  margin-top: 0.85rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.5;
}

.post-body th,
.post-body td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.post-body thead th {
  background: var(--surface);
  color: var(--text-primary);
  font-weight: 600;
}

.post-body tbody tr:last-child td {
  border-bottom: 0;
}

.post-body td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

/* Wide screens keep the sticky sidebar card beside the article, so the bottom band only shows on narrow ones. */
.post + .blog-cta {
  display: none;
  max-width: 872px;
  margin-inline: auto;
}

.post-related {
  max-width: 1200px;
  margin-top: 5rem;
  margin-inline: auto;
}

/* Footer */
.site-footer {
  margin-top: 5rem;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  background: #fafafa;
  text-align: center;
}

.site-footer p {
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--brand-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Responsive */
@media (max-width: 1024px) {
  .post-header--with-cover {
    grid-template-columns: minmax(0, 1fr) 280px;
    column-gap: 2rem;
  }

  .post-layout {
    grid-template-columns: minmax(0, 872px);
    justify-content: center;
    gap: 1.5rem;
  }

  .post-content {
    grid-column: 1;
    grid-row: 2;
  }

  .post-layout:not(:has(.post-aside)) .post-content {
    grid-row: 1;
  }

  .post-aside {
    grid-column: 1;
    grid-row: 1;
    margin-left: 0;
  }

  .post-aside-inner {
    position: static;
  }

  /* On narrow screens the bottom download band does the card's job. */
  .post-promo,
  .post-aside:not(:has(.post-toc-disclosure)) {
    display: none;
  }

  .post + .blog-cta {
    display: flex;
  }

  .post-layout:not(:has(.post-toc-disclosure)) .post-content {
    grid-row: 1;
  }

  .post-toc-disclosure {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
  }

  .post-toc-disclosure > summary {
    display: list-item;
    margin-bottom: 0;
    pointer-events: auto;
    cursor: pointer;
  }

  .post-toc-disclosure > summary::-webkit-details-marker {
    display: inline;
  }

  .post-toc-disclosure[open] > summary {
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .post-featured-link {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-featured .post-cover {
    height: auto;
  }

  .post-featured-body {
    padding: 1.75rem;
  }

  .blog-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .post-header--with-cover {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-thumbnail {
    margin-top: 1.5rem;
  }

  .site-nav,
  .header-actions {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .blog-head h1 {
    font-size: 2.5rem;
  }

  .post-header h1 {
    font-size: 2.25rem;
  }
}

@media (max-width: 640px) {
  .header-container {
    padding: 0.75rem 1.25rem;
  }

  .logo-icon {
    width: 28px;
    height: 28px;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .blog-main {
    padding: 0 1.25rem;
  }

  .blog-head {
    padding: 3rem 0 2rem;
  }

  .blog-head h1 {
    font-size: 2.1rem;
  }

  /* Let the tab row scroll to the screen edge. */
  .blog-tabs {
    margin: 1.5rem -1.25rem 0 0;
    padding-right: 1.25rem;
  }

  .post-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2.75rem;
  }

  .post-card-body {
    padding: 0 0.5rem;
  }

  .post-card-title {
    font-size: 1.25rem;
  }

  .post-featured-body {
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .post-featured-title {
    font-size: 1.5rem;
  }

  .post {
    padding-top: 2.5rem;
  }

  .post-header h1 {
    font-size: 1.85rem;
  }

  .post-media {
    margin-bottom: 2rem;
    border-radius: 0.75rem;
  }

  .post-layout {
    margin-top: 2rem;
  }

  .post-body {
    font-size: 1.0625rem;
  }

  .post-body .callout {
    padding: 1.25rem;
  }

  .post-body h2 {
    margin-top: 2.5rem;
    font-size: 1.4rem;
  }

  /* Keep all comparison columns on screen at phone widths. */
  .post-body table {
    font-size: 0.85rem;
  }

  .post-body th,
  .post-body td {
    padding: 0.6rem 0.6rem;
  }

  .blog-cta {
    margin-top: 3.5rem;
    padding: 2rem 1.5rem;
  }

  .blog-cta h2 {
    font-size: 1.35rem;
  }

  .site-footer {
    padding: 2.5rem 1.25rem;
  }
}
