/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-7) 0; }

/* ── Color tokens ── */
:root {
  --zw-red: #FF2D2D;

  /* Dark mode (default): editorial dark */
  --bg: #0B0C10;
  --surface: #0F1117;
  --surface-2: #141824;
  --border: rgba(255,255,255,0.10);
  --border-2: rgba(255,255,255,0.08);

  --text: #E9ECF1;
  --text-2: rgba(255,255,255,0.82);
  --text-3: rgba(255,255,255,0.62);
  --text-4: rgba(255,255,255,0.45);

  --accent: #FF2D2D;
  --accent-hover: #FF4A4A;
  --accent-soft: rgba(255, 45, 45, 0.16);

  --link: rgba(255,255,255,0.88);
  --link-hover: #FF2D2D;
  --underline: rgba(233, 236, 241, 0.22);

  --selection-bg: rgba(255, 45, 45, 0.22);
  --focus-ring: rgba(255, 45, 45, 0.45);

  --callout-bg: rgba(255,255,255,0.05);
  --callout-border: rgba(255,255,255,0.10);

  --shadow: 0 1px 0 rgba(255,255,255,0.06);

  --topbar-height: 52px;
  --subnav-height: 44px;
  --sticky-height: calc(var(--topbar-height) + var(--subnav-height));
}

::selection { background: var(--selection-bg); }

/* ── Spacing scale ── */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --radius: 12px;
}

/* ── Typography ── */
html { font-size: 16px; }

body {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-2);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--font-sans);
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0;
}

h1 {
  font-size: 2.75rem;
  line-height: 1.08;
  font-weight: 750;
  margin-bottom: 14px;
  text-wrap: balance;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--border-2);
}

.article-header + .prose h2:first-of-type,
h2:first-child {
  border-top: none;
  padding-top: 0;
}

.prose h2 + p { margin-top: 0; }

h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 650;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p { margin: 0 0 1.125rem; }

.lede {
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 400;
  color: rgba(255,255,255,0.84);
  margin-bottom: var(--space-4);
}

.meta {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-3);
}

.small {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-4);
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,45,45,0.90);
  margin: 0 0 10px;
}

/* Home intro block */
.home-intro {
  margin-bottom: 56px;
  max-width: 720px;
}

/* ── Links ── */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid rgba(255,45,45,0.9);
  outline-offset: 3px;
  border-radius: 6px;
}

a:focus-visible {
  text-decoration: none;
}

/* Body link discoverability */
.prose a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,0.35);
}

.prose a:hover {
  text-decoration-color: rgba(255,45,45,0.85);
  color: var(--link-hover);
}

/* ── Inline code (rare — not a dev blog) ── */
code {
  font-family: var(--font-mono);
  font-size: 0.95em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.08em 0.35em;
  border-radius: 8px;
  color: var(--text);
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-4);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.9375rem;
  line-height: 1.6;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

/* ── Layout ── */
.page {
  min-height: calc(100vh - var(--sticky-height));
  padding: var(--space-7) var(--space-5);
  padding-top: calc(var(--sticky-height) + var(--space-7));
  scroll-padding-top: var(--sticky-height);
}

@media (max-width: 640px) {
  .page { padding: var(--space-6) var(--space-4); padding-top: calc(var(--sticky-height) + var(--space-6)); }
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
}

/* 404 layout — fill viewport height and center content */
.page:has(.not-found) {
  padding-top: var(--space-5);
  display: flex;
  flex-direction: column;
}
.page:has(.not-found) > .shell {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.page:has(.not-found) main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
@media (max-width: 640px) {
  .page:has(.not-found) {
    padding-top: var(--space-3);
  }
}

.prose {
  max-width: 960px;
}

/* External link indicator — render hook adds target="_blank" on external anchors */
.prose a[target="_blank"]::after {
  content: "\2197"; /* ↗ U+2197 NORTH EAST ARROW */
  display: inline-block;
  margin-left: 0.15em;
  font-size: 0.85em;
  color: var(--text-3);
  text-decoration: none;
  vertical-align: baseline;
}

.prose a[target="_blank"]:hover::after {
  color: var(--link-hover);
}

/* ── Global header (sticky, two tiers) ── */
.global-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* ── Topbar — copied verbatim from zwischen.ai ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(5,5,7,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.wordmark {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-shadow: 0 0 30px rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--text);
  text-decoration: none;
}

.wordmark-icon {
  height: 16px;
  width: auto;
  object-fit: contain;
  margin-top: -1px;
  margin-bottom: 1px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}

.topbar-link:hover {
  color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.topbar-cta {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border: 1px solid rgba(255,45,45,0.55);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.topbar-cta:hover {
  background: rgba(255,45,45,0.14);
  border-color: rgba(255,45,45,0.9);
  color: var(--accent);
  text-decoration: none;
}

.topbar-cta:focus-visible {
  outline: 2px solid rgba(255,45,45,0.55);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  body.is-blog .topbar { padding: 12px 16px; }
  /* On the blog, "Blog" link is redundant with the subnav row below; keep Early access visible. */
  body.is-blog .topbar-link { display: none; }
  body.is-blog .topbar-cta {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
  }
}

@media (max-width: 360px) {
  body.is-blog .topbar { padding: 10px 12px; }
  body.is-blog .topbar-cta { padding: 0 12px; }
}

/* Blog subnav */
.blog-nav {
  height: var(--subnav-height);
  background: rgba(7,8,10,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-7);
}

@media (max-width: 640px) {
  .blog-nav { padding: 0 var(--space-4); }
}

.blog-nav-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.blog-nav-title:hover {
  text-decoration: none;
  color: var(--text);
}

.mark { color: var(--accent); }

.blog-nav-links {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.blog-nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
  padding: 4px 0;
}

.blog-nav-links a:hover {
  color: var(--link-hover);
}

/* ── Post listing ── */
.listing {
  max-width: 1120px;
}

/* Featured post card */
.featured-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: var(--space-7);
  background: rgba(11,13,16,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color 0.15s, transform 0.15s;
  align-items: center;
  position: relative;
  cursor: pointer;
}

@media (min-width: 768px) {
  .featured-card {
    grid-template-columns: 1fr 320px;
  }
}

.featured-card:hover {
  border-color: rgba(255,45,45,0.45);
  transform: translateY(-1px);
}

.featured-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-title {
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 750;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.02em;
  border: none;
  padding: 0;
}

.featured-title a {
  color: var(--text);
  text-decoration: none;
}

.featured-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}

.featured-card:hover .featured-title a {
  color: var(--link-hover);
}

.featured-dek {
  margin: 0 0 var(--space-3);
  color: var(--text-2);
  font-size: 1rem;
}

.featured-hero {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
}

.featured-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
  display: block;
}

/* Standard post list items */
.post-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-2);
  position: relative;
  cursor: pointer;
}

.post-item:first-of-type {
  border-top: 1px solid var(--border-2);
}

.post-thumb {
  flex-shrink: 0;
  width: 96px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-2);
  transition: border-color 0.15s;
}

.post-item:hover .post-thumb {
  border-color: rgba(255,45,45,0.45);
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-item-text {
  flex: 1;
  min-width: 0;
}

.post-title {
  font-size: 1.375rem;
  line-height: 1.2;
  font-weight: 750;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.02em;
  border: none;
  padding: 0;
}

.post-title a {
  color: var(--text);
  text-decoration: none;
}

.post-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}

.post-item:hover .post-title a {
  color: var(--link-hover);
}

.post-dek {
  margin: 0 0 var(--space-3);
  color: var(--text-2);
}

.post-meta {
  margin: 0;
  color: var(--text-4);
  font-size: 0.8125rem;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: inline-block;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.62);
  text-decoration: none;
  margin-bottom: 12px;
}

.breadcrumb:hover {
  color: rgba(255,255,255,0.90);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

/* ── Article header ── */
.article-header {
  margin-bottom: var(--space-5);
}

.article-meta {
  margin-top: var(--space-3);
  margin-bottom: 12px;
  color: var(--text-4);
  font-size: 0.8125rem;
}

/* Tag pills row */
.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tag,
.prose .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  text-transform: capitalize;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.tag:hover,
.prose .tag:hover {
  background: rgba(255,45,45,0.18);
  border-color: rgba(255,45,45,0.60);
  color: rgba(255,255,255,0.92);
  text-decoration: none;
}

.tag:active {
  background: rgba(255,45,45,0.18);
  border-color: #FF2D2D;
}

/* ── Article hero image ── */
.article-hero {
  max-width: 960px;
  margin: var(--space-5) 0 var(--space-6);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  position: relative;
}

.article-hero img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 45%;
}

/* ── Article figures ── */
figure {
  margin: var(--space-6) 0;
}

figure img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

figcaption {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-3);
  margin-top: 10px;
}

/* ── Prose content ── */
.prose ul,
.prose ol {
  padding-left: 22px;
  margin: 14px 0 18px;
}

.prose li {
  margin: 10px 0;
  line-height: 1.65;
}

.prose li::marker {
  color: var(--text-3);
}

/* Blockquote — typographic pull-quote, no card */
blockquote {
  margin: 28px 0;
  padding: 6px 0 6px 22px;
  border-left: 3px solid var(--accent);
  background: none;
  border-radius: 0;
}

blockquote p {
  margin: 0;
  font-size: 1.3125rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.88);
  font-style: italic;
  font-weight: 450;
}

/* ── Callout shortcode — card with kicker ── */
.callout {
  margin: 28px 0;
  padding: var(--space-4);
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.14);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.callout .kicker {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: rgba(255,45,45,0.95);
  margin-bottom: 10px;
}

.callout p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-2);
}

.callout p:last-child { margin-bottom: 0; }

/* ── Tags page ── */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0;
}

.tag-item a {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.tag-item a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Homepage topic browse ── */
.topic-browse {
  margin-top: var(--space-6);
  padding: var(--space-4);
  background: #10141A;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.topic-browse-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.topic-browse-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  border: none;
  padding: 0;
}

.topic-browse-all {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.66);
  text-decoration: none;
  white-space: nowrap;
}

.topic-browse-all:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(255,45,45,0.65);
  text-underline-offset: 3px;
}

.topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Topics page (grid) ── */
.topic-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .topic-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.topic-card {
  display: block;
  background: #10141A;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.topic-card:hover {
  border-color: rgba(255,255,255,0.16);
  background: #0E1217;
  text-decoration: none;
}

.topic-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--space-1);
  border: none;
  padding: 0;
}

.topic-card-posts {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0;
}

.topic-card-posts li {
  font-size: 0.875rem;
  color: var(--text-2);
  padding: 4px 0;
  line-height: 1.4;
}

.topic-card-posts a {
  color: var(--text-2);
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.topic-card-posts a:hover {
  color: var(--link-hover);
}

.topic-card-cta {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.topic-card:hover .topic-card-cta,
.topic-card-cta:hover {
  text-decoration: underline;
  text-decoration-color: rgba(255,45,45,0.65);
  text-underline-offset: 3px;
}

/* ── Footer ── */
.site-footer {
  margin-top: var(--space-8);
  color: var(--text-4);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.site-footer a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--link-hover);
}

/* Blog sub-footer — brand + links */
.footer-blog {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
  .footer-blog {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-3);
  margin: 0 0 var(--space-1);
}

/* .mark is now global — see above */

.footer-tagline {
  margin: 0;
  color: var(--text-4);
  font-size: 0.8125rem;
  max-width: 40ch;
}

.footer-links {
  display: flex;
  gap: var(--space-4);
}

.footer-links a {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.60);
}

.footer-links a:hover {
  color: var(--link-hover);
}

/* Legal bar — matches zwischen.ai */
.footer-legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  font-family: var(--font-mono);
}

.footer-legal a {
  color: rgba(255,255,255,0.35);
  font-family: var(--font-mono);
}

.footer-legal a:hover {
  color: var(--text-3);
}

@media (max-width: 640px) {
  .footer-legal {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }
}

/* ── 404 ── */
.not-found {
  margin: auto;
  padding: var(--space-6) var(--space-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 720px;
  width: 100%;
}

@media (max-width: 480px) {
  .not-found {
    margin: 0 auto;
    padding: 8px 16px 24px;
  }
}

.not-found h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin: 8px 0 0;
}

.not-found p {
  color: rgba(255,255,255,0.78);
  margin: 10px 0 0;
  max-width: 56ch;
}

/* GIF frame */
.not-found-gif {
  margin: 20px 0 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gif-frame {
  width: min(520px, 100%);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 0 0 1px rgba(255,45,45,0.14),
    0 16px 50px rgba(0,0,0,0.55);
}

.gif-frame img {
  display: block;
  width: 100%;
  height: auto;
}


.not-found-gif figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
}

/* 404 action links */
.not-found-links {
  margin: 20px auto 0;
  max-width: 560px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.not-found-links a {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  white-space: nowrap;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.not-found-links a:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.92);
  text-decoration: none;
}

.not-found-links a:first-child {
  color: rgba(255,255,255,0.92);
  border-color: rgba(255,45,45,0.38);
  background: rgba(255,45,45,0.12);
}

.not-found-links a:first-child:hover {
  border-color: rgba(255,45,45,0.50);
  background: rgba(255,45,45,0.16);
}

@media (max-width: 520px) {
  .not-found-links a {
    width: 100%;
    justify-content: center;
    display: flex;
  }
}

/* ── Empty state ── */
.empty-state {
  margin-top: var(--space-7);
  margin-bottom: var(--space-7);
  color: var(--text-3);
}

.empty-state-links {
  margin-top: var(--space-5);
  font-size: 0.875rem;
}

.empty-state-links a {
  color: var(--text-3);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.empty-state-links a:hover {
  color: var(--text);
  border-bottom-color: var(--underline);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  h1 { font-size: 2.125rem; }
  .lede { font-size: 1.0625rem; line-height: 1.6; }
  .featured-title { font-size: 1.375rem; }

  /* Featured card: constrain image height */
  .featured-hero {
    max-height: 200px;
  }
  .featured-hero img {
    max-height: 200px;
  }

  /* Nav links: bigger touch targets */
  .blog-nav-links a {
    padding: 10px 8px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Footer links: bigger touch targets */
  .footer-links {
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-4);
  }
  .footer-links a {
    padding: 8px 0;
    font-size: 0.875rem;
  }

  /* Topic cards: single column, tighter spacing */
  .topic-grid {
    gap: var(--space-3);
  }

  /* Post row title: slightly smaller */
  .post-title {
    font-size: 1.1875rem;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
