:root {
  color-scheme: light;
  --primary: #4f46e5;
  --primary-2: #6366f1;
  --primary-3: #818cf8;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --surface: rgba(255, 255, 255, .84);
  --surface-solid: #ffffff;
  --surface-raised: #ffffff;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --success: #22c55e;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-md: 0 16px 48px rgba(15, 23, 42, .10);
  --shadow-lg: 0 32px 80px rgba(15, 23, 42, .14);
  --radius: 8px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07090f;
  --bg-soft: #0d111a;
  --surface: rgba(13, 17, 26, .84);
  --surface-solid: #0d111a;
  --surface-raised: #121826;
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --border: #243044;
  --border-strong: #334155;
  --code-bg: #020617;
  --code-text: #e2e8f0;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, .24);
  --shadow-md: 0 16px 48px rgba(0, 0, 0, .32);
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, .40);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(79, 70, 229, .06), transparent 320px),
    var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
.container { width: min(1184px, calc(100% - 32px)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  inset: 16px auto auto 16px;
  z-index: 80;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
}
:focus-visible {
  outline: 3px solid rgba(99, 102, 241, .40);
  outline-offset: 3px;
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  height: 3px;
  background: transparent;
}
.reading-progress span {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: right center;
  background: linear-gradient(90deg, var(--primary), var(--primary-3));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(160%);
  transition: background 200ms ease, border-color 200ms ease;
}
.nav-shell {
  width: min(1216px, calc(100% - 32px));
  min-height: 80px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-3));
  box-shadow: 0 16px 40px rgba(79, 70, 229, .28);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}
.nav-links a {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: color 180ms ease, background 180ms ease;
}
.nav-links a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  order: -1;
}
.theme-toggle, .menu-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.theme-toggle:hover, .menu-button:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.theme-toggle { grid-template-columns: 1fr 1fr; gap: 2px; padding: 6px; }
.theme-toggle span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: block;
}
.theme-toggle .sun { background: #f59e0b; }
.theme-toggle .moon {
  background: transparent;
  border: 3px solid #64748b;
  border-right-color: transparent;
}
.menu-button { gap: 4px; }
.menu-button span {
  width: 18px;
  height: 2px;
  display: block;
  background: currentColor;
  border-radius: 999px;
}
.mobile-only { display: none; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 80% 16%, rgba(79, 70, 229, .16), transparent 320px),
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 8%, transparent), transparent 70%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  align-items: center;
  gap: 64px;
}
.hero-copy { max-width: 720px; }
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.hero-tags span {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
}
.hero h1, .page-hero h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 80px);
  line-height: 1.18;
  letter-spacing: 0;
}
.hero p, .page-hero p {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--text-soft);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 2;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}
.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 16px 40px rgba(79, 70, 229, .28);
}
.btn-secondary {
  background: var(--surface-solid);
  color: var(--text);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.proof-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  color: var(--muted);
  font-weight: 700;
}
.avatar-stack { display: flex; direction: ltr; }
.avatar-stack i {
  width: 32px;
  height: 32px;
  margin-right: -8px;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}
.avatar-stack i:nth-child(2) { background: linear-gradient(135deg, #cffafe, #a5f3fc); }
.avatar-stack i:nth-child(3) { background: linear-gradient(135deg, #dcfce7, #86efac); }
.avatar-stack i:nth-child(4) { background: linear-gradient(135deg, #fef3c7, #fcd34d); }

.hero-visual {
  min-height: 480px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, var(--surface-solid)), var(--surface-solid)),
    var(--surface-solid);
  box-shadow: var(--shadow-lg);
}
.mesh {
  position: absolute;
  inset: 0;
  opacity: .72;
  background-image:
    linear-gradient(color-mix(in srgb, var(--primary) 12%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--primary) 12%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, #000, transparent 88%);
}
.ai-window {
  position: absolute;
  inset: 64px 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  padding: 24px;
}
.window-top { display: flex; gap: 8px; margin-bottom: 40px; }
.window-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--border-strong);
}
.signal-line {
  height: 12px;
  width: 56%;
  margin-bottom: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: .56;
  animation: pulse 2600ms ease-in-out infinite;
}
.signal-line.wide { width: 80%; animation-delay: 300ms; }
.agent-map {
  position: absolute;
  inset: 160px 32px 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.agent-map span, .agent-map strong {
  display: grid;
  place-items: center;
  min-height: 72px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  font-weight: 900;
}
.agent-map strong {
  grid-column: 1 / -1;
  min-height: 96px;
  color: #fff;
  background: linear-gradient(135deg, #111827, var(--primary));
}
@keyframes pulse {
  0%, 100% { opacity: .40; transform: scaleX(.92); transform-origin: right; }
  50% { opacity: .80; transform: scaleX(1); }
}

.stats-strip {
  padding: 24px 0;
  border-block: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(16px);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stats-grid div {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
}
.stats-grid strong {
  display: block;
  font-size: 32px;
  line-height: 1.2;
}
.stats-grid span { color: var(--muted); font-weight: 700; }

.section { padding: 96px 0; }
.surface {
  border-block: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 5%, transparent), transparent),
    var(--bg-soft);
}
.section-heading { margin-bottom: 40px; }
.section-heading h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.35;
  letter-spacing: 0;
}
.inline-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.text-link {
  color: var(--primary);
  font-weight: 900;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 8px; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.post-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
  box-shadow: var(--shadow-md);
}
.post-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #eef2ff;
  transition: transform 260ms ease, opacity 220ms ease;
}
.post-card:hover img { transform: scale(1.03); opacity: .92; }
.cover-link { display: block; overflow: hidden; }
.post-card-body { padding: 24px; }
.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
  border-radius: 999px;
  padding: 2px 12px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}
.post-card h3 {
  margin: 16px 0 8px;
  font-size: 21px;
  line-height: 1.55;
  letter-spacing: 0;
}
.post-card h3 a { transition: color 180ms ease; }
.post-card h3 a:hover { color: var(--primary); }
.post-card p {
  margin: 0 0 24px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.9;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.category-card {
  position: relative;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.category-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-3));
  transform: scaleX(.32);
  transform-origin: right;
  transition: transform 220ms ease;
}
.category-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
  box-shadow: var(--shadow-md);
}
.category-card:hover::after { transform: scaleX(1); }
.category-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--primary-3));
  color: #fff;
  font-weight: 900;
}
.category-card strong { font-size: 21px; }
.category-card small { color: var(--muted); font-weight: 800; }

.newsletter { padding: 96px 0; }
.newsletter-shell {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr minmax(320px, .75fr);
  gap: 32px;
  align-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
  border-radius: var(--radius);
  padding: 40px;
  background:
    linear-gradient(135deg, #111827, #312e81 60%, #4f46e5);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.newsletter-art {
  height: 176px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .10) 1px, transparent 1px);
  background-size: 24px 24px;
}
.newsletter-art span {
  display: block;
  width: 72px;
  height: 8px;
  margin: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
}
.newsletter-art span:nth-child(2) { width: 112px; opacity: .56; }
.newsletter-art span:nth-child(3) { width: 48px; opacity: .40; }
.newsletter h2 {
  margin: 0;
  max-width: 560px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.45;
}
.newsletter .eyebrow { color: #c7d2fe; }
.newsletter ul {
  display: grid;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: #e0e7ff;
  font-weight: 700;
}
.newsletter li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--success);
}
.newsletter-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
input, select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  background: var(--surface-solid);
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
input:hover, select:hover { border-color: var(--border-strong); }
input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .16);
  outline: 0;
}
.form-result {
  min-height: 24px;
  color: #bbf7d0;
  font-weight: 800;
}

.page-hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 8%, transparent), transparent),
    var(--bg-soft);
}
.compact h1 { font-size: clamp(40px, 6vw, 64px); }
.filters {
  display: grid;
  grid-template-columns: 1fr 240px auto;
  gap: 16px;
  margin-bottom: 40px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  color: var(--muted);
}
.pagination a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 14px;
  color: var(--primary);
  font-weight: 900;
  background: var(--surface-solid);
}
.empty { color: var(--muted); }

.article-header {
  padding: 80px 0 40px;
}
.article-header h1 {
  max-width: 960px;
  margin: 24px 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.28;
  letter-spacing: 0;
}
.article-header p {
  max-width: 760px;
  margin: 0;
  color: var(--text-soft);
  font-size: 20px;
  line-height: 2;
}
.article-header .meta-row { margin-top: 24px; }
.article-cover {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 760px);
  justify-content: center;
  gap: 64px;
  align-items: start;
  padding-bottom: 96px;
}
.toc {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface-solid);
  color: var(--muted);
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.toc strong {
  margin-bottom: 8px;
  color: var(--text);
}
.toc a {
  padding: 6px 0;
  transition: color 180ms ease, transform 180ms ease;
}
.toc a:hover {
  color: var(--primary);
  transform: translateX(-4px);
}
.prose {
  color: var(--text-soft);
  font-size: 18px;
  line-height: 2.1;
}
.prose h2 {
  scroll-margin-top: 112px;
  margin: 56px 0 16px;
  color: var(--text);
  font-size: 32px;
  line-height: 1.45;
  letter-spacing: 0;
}
.prose h2 a {
  opacity: 0;
  margin-left: 8px;
  color: var(--primary);
  transition: opacity 180ms ease;
}
.prose h2:hover a { opacity: 1; }
.prose p { margin: 0 0 24px; }
.prose blockquote {
  margin: 32px 0;
  border-right: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 24px;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--text);
  font-weight: 800;
}
.prose ul {
  margin: 24px 0;
  padding-right: 24px;
}
.code-shell {
  position: relative;
  margin: 32px 0;
}
.prose pre {
  direction: ltr;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 15px;
  line-height: 1.8;
  text-align: left;
}
.code-copy {
  position: absolute;
  top: 8px;
  left: 8px;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  padding: 4px 10px;
  background: rgba(255, 255, 255, .10);
  color: #fff;
  cursor: pointer;
}
.share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-weight: 800;
}
.share a, .socials a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  color: var(--text);
  font-weight: 900;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.share a:hover, .socials a:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  padding: 64px 0 40px;
}
.footer-brand p {
  max-width: 360px;
  margin: 24px 0 0;
}
.footer h3 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 16px;
}
.footer-links {
  display: grid;
  gap: 10px;
}
.footer-links a {
  width: fit-content;
  transition: color 180ms ease, transform 180ms ease;
}
.footer-links a:hover {
  color: var(--primary);
  transform: translateX(-4px);
}
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 960px) {
  .mobile-only { display: grid; }
  .nav-shell { min-height: 72px; }
  .nav-links {
    display: none;
    position: absolute;
    inset: 80px 16px auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-solid);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.is-open { display: grid; }
  .hero { padding: 64px 0; }
  .hero-grid, .newsletter-shell, .article-layout, .footer-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 400px; }
  .stats-grid, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr; }
  .toc { position: static; }
  .footer-grid { gap: 32px; }
}

@media (max-width: 640px) {
  .container, .nav-shell { width: min(100% - 24px, 1184px); }
  .hero { padding: 48px 0; }
  .hero h1, .page-hero h1 { font-size: 44px; }
  .actions .btn { width: 100%; }
  .hero-visual { min-height: 320px; }
  .ai-window { inset: 32px 24px; padding: 16px; }
  .agent-map { inset: 136px 16px 16px; grid-template-columns: 1fr; }
  .agent-map strong { min-height: 72px; }
  .stats-grid, .post-grid, .category-grid { grid-template-columns: 1fr; }
  .section, .newsletter { padding: 64px 0; }
  .newsletter-shell { padding: 24px; }
  .newsletter-art { display: none; }
  .article-header { padding: 56px 0 32px; }
  .article-header h1 { font-size: 40px; }
  .article-cover { aspect-ratio: 16 / 10; margin-top: 32px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 28px; }
  .footer-bottom { flex-direction: column; }
}
