/* ─────────────────────────────────────────────────────────────
   SNAPO BLOG — design tokens + components
   Editorial / premium / SEO-perfect.
   Light default, dark via [data-theme="dark"].
   ───────────────────────────────────────────────────────────── */

:root {
  /* ── PALETTE (light) ── */
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-light: #a78bfa;
  --accent-soft: #f3efff;
  --accent-tint: #ede5ff;

  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #2563eb;

  --bg: #fbfaf7;
  --bg-elevated: #ffffff;
  --bg-soft: #f3f1ec;
  --bg-card: #ffffff;
  --bg-inset: #f6f4ef;

  --ink: #0d0d15;
  --ink-2: #2a2a35;
  --ink-3: #4b4b58;
  --ink-4: #6b6b78;
  --ink-5: #9a9aa6;

  --border: rgba(13, 13, 21, 0.08);
  --border-strong: rgba(13, 13, 21, 0.14);
  --border-soft: rgba(13, 13, 21, 0.05);

  --shadow-sm: 0 1px 2px rgba(13, 13, 21, 0.04), 0 1px 1px rgba(13, 13, 21, 0.03);
  --shadow-md: 0 4px 16px rgba(13, 13, 21, 0.06), 0 1px 2px rgba(13, 13, 21, 0.04);
  --shadow-lg: 0 24px 48px -16px rgba(13, 13, 21, 0.18), 0 4px 12px rgba(13, 13, 21, 0.06);

  /* ── TYPE ── */
  --font-display: 'Cabinet Grotesk', 'Bricolage Grotesque', 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* ── RADII ── */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* ── LAYOUT ── */
  --measure: 68ch;
  --gutter: clamp(20px, 4cqw, 56px);
}

[data-theme="dark"] {
  --bg: #0d0d15;
  --bg-elevated: #14141d;
  --bg-soft: #1a1a25;
  --bg-card: #17171f;
  --bg-inset: #1d1d28;

  --ink: #f5f5f7;
  --ink-2: #d6d6dd;
  --ink-3: #a7a7b2;
  --ink-4: #8a8a96;
  --ink-5: #5e5e6a;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-soft: rgba(255, 255, 255, 0.05);

  --accent: #a78bfa;
  --accent-hover: #c4b5fd;
  --accent-light: #c4b5fd;
  --accent-soft: rgba(167, 139, 250, 0.12);
  --accent-tint: rgba(167, 139, 250, 0.18);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 24px 48px -16px rgba(0,0,0,0.55);
}

/* ─────────────────────────────────────────────────────────────
   BASE
   ───────────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

.blog-root {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
  line-height: 1.6;
  container-type: inline-size;
  container-name: blog;
  min-height: 100%;
  overflow-x: hidden;
}

.blog-root a { color: inherit; text-decoration: none; }
.blog-root img { max-width: 100%; display: block; }
.blog-root button { font-family: inherit; cursor: pointer; }

/* ─────────────────────────────────────────────────────────────
   READING PROGRESS BAR
   ───────────────────────────────────────────────────────────── */
.read-progress {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 3px;
  background: var(--border-soft);
  overflow: hidden;
}
.read-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transition: width 0.1s linear;
}

/* ─────────────────────────────────────────────────────────────
   HEADER / NAV
   ───────────────────────────────────────────────────────────── */
.blog-nav {
  position: sticky;
  top: 3px;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.blog-nav__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.blog-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.blog-nav__brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ink);
  display: grid;
  place-items: center;
  color: var(--bg);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.04em;
}
.blog-nav__brand-blog {
  color: var(--ink-4);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.blog-nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.blog-nav__links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  transition: color 0.15s;
  white-space: nowrap;
}
.blog-nav__links a:hover { color: var(--ink); }
.blog-nav__links a.is-active {
  color: var(--ink);
  position: relative;
}
.blog-nav__links a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 2px;
  background: var(--accent);
}
.blog-nav__right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.blog-nav__search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink-4);
  font-size: 13px;
  font-weight: 500;
  cursor: text;
  transition: border 0.15s, color 0.15s;
}
.blog-nav__search:hover { color: var(--ink-2); border-color: var(--border-strong); }
.blog-nav__search kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  background: var(--bg-soft);
  border-radius: 4px;
  color: var(--ink-3);
  border: 1px solid var(--border);
}
.blog-nav__cta {
  background: var(--ink);
  color: var(--bg) !important;
  padding: 9px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, background 0.15s;
}
.blog-nav__cta:hover { transform: translateY(-1px); background: var(--accent); }
.blog-nav__menu {
  display: inline-flex;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 38px; height: 38px;
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.blog-nav__menu:hover {
  background: var(--bg-soft);
  color: var(--accent);
  border-color: var(--border-strong);
}
/* Brand mark — image variant (sloth icon zamiast literki "s") */
.blog-nav__brand-mark--img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  display: inline-block;
  background: transparent;
  padding: 0;
  letter-spacing: 0;
}

/* Card media — featured image fills the slot */
.card__media-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Store cards — Google Play + App Store z QR (theme-aware, działa w light + dark) */
.snapo-store-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 560px;
}
.snapo-store-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.snapo-store-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.18);
}
.snapo-store-card__qr {
  width: 96px;
  height: 96px;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  flex-shrink: 0;
}
.snapo-store-card__qr img { display: block; width: 100%; height: 100%; }
.snapo-store-card__platform {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 4px;
}
.snapo-store-card__name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.018em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.snapo-store-card__cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.snapo-store-card__logo {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.snapo-store-card__logo svg { width: 100%; height: 100%; }
/* Apple logo — kolor zależnie od motywu (czarny w light, biały w dark) */
.snapo-store-card__logo--apple svg path { fill: var(--ink); }
@media (max-width: 600px) {
  .snapo-store-cards { grid-template-columns: 1fr; max-width: 360px; }
  /* więcej oddechu na mobile — treść nie przy samej krawędzi */
  :root { --gutter: 28px; }
}

/* Author bio (single post bottom) — initials avatar + clean "more posts" link */
.author-bio__avatar--initials {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #a78bfa 0%, #f59e0b 100%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 32px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.author-bio__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--bg) !important;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.15s;
}
.author-bio__more:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────────────────
   CATEGORY BAR
   ───────────────────────────────────────────────────────────── */
.cat-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.cat-bar__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-bar__inner::-webkit-scrollbar { display: none; }
.cat-pill {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  white-space: nowrap;
  transition: all 0.15s;
}
.cat-pill:hover { color: var(--ink); border-color: var(--border-strong); }
.cat-pill.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.cat-pill__count {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-5);
}
.cat-pill.is-active .cat-pill__count { color: rgba(255,255,255,0.5); }

/* ─────────────────────────────────────────────────────────────
   LAYOUT WRAPPER
   ───────────────────────────────────────────────────────────── */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap--narrow { max-width: 800px; }
.wrap--wide { max-width: 1320px; }

/* ─────────────────────────────────────────────────────────────
   HERO (homepage)
   ───────────────────────────────────────────────────────────── */
.hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: end;
}
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero__eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--accent);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 5.2cqw, 76px);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 28px;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
  font-weight: 900;
}
.hero__lede {
  font-size: clamp(17px, 1.6cqw, 21px);
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 48ch;
  margin-bottom: 28px;
}
.hero__meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  color: var(--ink-4);
  font-family: var(--font-mono);
}
.hero__meta-num {
  font-size: 28px;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.02em;
  display: block;
  line-height: 1;
  margin-bottom: 2px;
}
.hero__sloth {
  position: relative;
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 60%, var(--accent-tint), transparent 65%);
  display: grid;
  place-items: center;
}
.hero__sloth img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 40px rgba(124, 58, 237, 0.18));
}
.hero__sloth-tag {
  position: absolute;
  top: 8%;
  right: -2%;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 6px;
  transform: rotate(4deg);
  box-shadow: var(--shadow-md);
}
.hero__sloth-tag span { color: var(--accent-light); }

/* ─────────────────────────────────────────────────────────────
   FEATURED POST (homepage)
   ───────────────────────────────────────────────────────────── */
.featured {
  padding: 24px 0 56px;
}
.featured__card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.featured__card:hover {
  border-color: var(--border-strong);
}
.featured__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  overflow: hidden;
}
.featured__body {
  padding: clamp(28px, 3cqw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}
.featured__badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--bg-elevated);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.featured__badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.featured__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 3.4cqw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.featured__lede {
  font-size: clamp(15px, 1.4cqw, 17px);
  line-height: 1.6;
  color: var(--ink-3);
  margin-bottom: 24px;
}
.featured__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-4);
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.featured__category {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 14px;
  display: inline-block;
}

/* ─────────────────────────────────────────────────────────────
   POST GRID + CARDS
   ───────────────────────────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 40px 0 28px;
  gap: 20px;
}
.section-head__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(24px, 2.4cqw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.section-head__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  transition: color 0.15s, border-color 0.15s;
}
.section-head__link:hover { color: var(--accent); border-color: var(--accent); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
}
.grid--two { grid-template-columns: repeat(2, 1fr); }
.grid--four { grid-template-columns: repeat(4, 1fr); }

.card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform 0.25s;
}
.card:hover { transform: translateY(-2px); }
.card:hover .card__title { color: var(--accent); }
.card__media {
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}
.card__meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
}
.card__cat {
  color: var(--accent);
  font-weight: 700;
}
.card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(18px, 1.8cqw, 22px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: color 0.15s;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__lede {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__meta-bot {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-4);
  margin-top: auto;
}
.card__author-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}

/* Placeholder visual for media: subtle gradient + stripes */
.media-ph {
  width: 100%;
  height: 100%;
  background:
    repeating-linear-gradient(135deg,
      rgba(13,13,21,0.04) 0 1px,
      transparent 1px 14px),
    linear-gradient(135deg, var(--bg-soft), var(--bg-inset));
  display: grid;
  place-items: center;
  position: relative;
}
.media-ph__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-5);
  background: var(--bg-elevated);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.media-ph--purple {
  background:
    repeating-linear-gradient(135deg,
      rgba(124,58,237,0.06) 0 1px,
      transparent 1px 14px),
    linear-gradient(135deg, var(--accent-soft), var(--accent-tint));
}
.media-ph--ink {
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.04) 0 1px,
      transparent 1px 14px),
    linear-gradient(135deg, var(--ink), var(--ink-2));
}
.media-ph--ink .media-ph__label {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.12);
}

/* ─────────────────────────────────────────────────────────────
   NEWSLETTER INLINE
   ───────────────────────────────────────────────────────────── */
.newsletter {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-xl);
  padding: clamp(28px, 4cqw, 56px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: '';
  position: absolute;
  right: -120px; top: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167,139,250,0.35), transparent 65%);
  pointer-events: none;
}
.newsletter__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 14px;
  font-weight: 700;
}
.newsletter__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(24px, 2.6cqw, 36px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.newsletter__sub {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255,255,255,0.65);
  max-width: 46ch;
}
.newsletter__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 300px;
}
.newsletter__row {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 5px;
  align-items: center;
}
.newsletter__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font: inherit;
  padding: 8px 16px;
  font-size: 14px;
}
.newsletter__input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter__submit {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  transition: background 0.15s;
}
.newsletter__submit:hover { background: var(--accent-light); }
.newsletter__fine {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  padding-left: 16px;
  font-family: var(--font-mono);
}

/* ─────────────────────────────────────────────────────────────
   APP CTA BANNER (footer/section)
   ───────────────────────────────────────────────────────────── */
.app-banner {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(124,58,237,0.10), transparent 50%),
    radial-gradient(ellipse at 10% 80%, rgba(245,158,11,0.08), transparent 50%),
    var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(36px, 4cqw, 64px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.app-banner__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 3.2cqw, 44px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.app-banner__sub {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 50ch;
  margin-bottom: 28px;
}
.app-banner__sloth {
  width: clamp(160px, 22cqw, 280px);
}
.app-stores {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.15s;
}
.app-store-btn:hover { transform: translateY(-2px); }
.app-store-btn__icon { font-size: 22px; line-height: 1; }
.app-store-btn__small {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  display: block;
  letter-spacing: 0.04em;
}
[data-theme="dark"] .app-store-btn__small { color: rgba(0,0,0,0.5); }
.app-store-btn__big {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: block;
  line-height: 1.1;
}

/* ─────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────── */
.blog-foot {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 64px 0 32px;
  background: var(--bg);
}
.blog-foot__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.blog-foot__brand-line {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.blog-foot__tag {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
  max-width: 36ch;
  margin-bottom: 20px;
}
.blog-foot__col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-5);
  margin-bottom: 16px;
}
.blog-foot__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.blog-foot__col a {
  font-size: 14px;
  color: var(--ink-3);
  font-weight: 500;
  transition: color 0.15s;
}
.blog-foot__col a:hover { color: var(--ink); }
.blog-foot__bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--ink-4);
  font-family: var(--font-mono);
}

/* ─────────────────────────────────────────────────────────────
   SINGLE POST
   ───────────────────────────────────────────────────────────── */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  padding: 32px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--ink-3); transition: color 0.15s; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs__sep { color: var(--ink-5); }
.breadcrumbs__current { color: var(--ink); text-transform: none; letter-spacing: normal; font-family: var(--font-body); font-size: 12px; }

.post-header {
  padding: 32px 0 48px;
  max-width: 880px;
  margin: 0 auto;
}
.post-header__cat {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.post-header__cat::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}
.post-header__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(36px, 4.4cqw, 60px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
  text-wrap: balance;
}
.post-header__lede {
  font-size: clamp(18px, 1.8cqw, 23px);
  line-height: 1.5;
  color: var(--ink-3);
  margin-bottom: 36px;
  text-wrap: pretty;
}
.post-header__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.author-chip__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  font-family: var(--font-display);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--border);
}
.author-chip__name {
  font-weight: 700;
  font-size: 14px;
  display: block;
}
.author-chip__role {
  font-size: 12px;
  color: var(--ink-4);
  display: block;
}
.post-header__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-5); }
.post-header__meta-item {
  font-size: 13px;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-header__meta-item time { font-variant-numeric: tabular-nums; }

.post-hero {
  max-width: 1100px;
  margin: 0 auto 48px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.post-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-hero__caption {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-4);
  text-align: center;
  margin: -32px auto 48px;
  max-width: 800px;
  padding: 0 var(--gutter);
}

/* Article layout: TOC sidebar + content + share rail */
.post-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 60px;
  gap: 48px;
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
}

.toc {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.toc__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-5);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.toc__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc__item a {
  display: block;
  padding: 6px 0 6px 14px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-3);
  border-left: 2px solid var(--border);
  transition: all 0.15s;
}
.toc__item a:hover { color: var(--ink); border-color: var(--ink-4); }
.toc__item.is-active > a {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.toc__sub {
  list-style: none;
  margin-left: 14px;
  padding-left: 0;
}
.toc__sub a {
  font-size: 12px;
  color: var(--ink-4);
  padding: 4px 0 4px 12px;
}

.share-rail {
  position: sticky;
  top: 96px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}
.share-rail__label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-5);
  margin-bottom: 4px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  align-self: center;
}
.share-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  transition: all 0.15s;
}
.share-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.share-btn svg { width: 15px; height: 15px; }

/* ─────────────────────────────────────────────────────────────
   PROSE
   ───────────────────────────────────────────────────────────── */
.prose {
  max-width: var(--measure);
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink-2);
  font-feature-settings: 'kern', 'liga', 'ss01';
}
.prose > * + * { margin-top: 1.4em; }
.prose > .lead {
  font-size: 1.15em;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.6;
}
.prose > .lead::first-letter {
  font-family: var(--font-display);
  font-weight: 900;
  float: left;
  font-size: 4.2em;
  line-height: 0.86;
  padding: 0.05em 0.12em 0 0;
  color: var(--accent);
  letter-spacing: -0.04em;
}
.prose h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.85em;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-top: 2.2em;
  margin-bottom: 0.4em;
  color: var(--ink);
  scroll-margin-top: 100px;
}
.prose h2::before {
  content: '§ ';
  color: var(--accent);
  font-weight: 800;
  margin-right: 4px;
}
.prose h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35em;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 1.8em;
  margin-bottom: 0.3em;
  color: var(--ink);
  scroll-margin-top: 100px;
}
.prose h4 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.1em;
  margin-top: 1.5em;
  margin-bottom: 0.2em;
  color: var(--ink);
}
.prose p { text-wrap: pretty; }
.prose a {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid var(--accent-tint);
  transition: border-color 0.15s;
}
.prose a:hover { border-bottom-color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose em { font-style: italic; }
.prose ul, .prose ol {
  padding-left: 1.6em;
}
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { color: var(--accent); font-weight: 700; font-family: var(--font-mono); }
.prose li + li { margin-top: 0.5em; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.4em 0 0.4em 1.4em;
  margin: 1.8em 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4em;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  position: relative;
}
.prose blockquote::before {
  content: '"';
  position: absolute;
  left: -2px; top: -0.4em;
  font-size: 3em;
  color: var(--accent);
  line-height: 1;
  font-family: var(--font-display);
}
.prose blockquote cite {
  display: block;
  margin-top: 0.6em;
  font-family: var(--font-body);
  font-size: 0.45em;
  font-weight: 600;
  color: var(--ink-4);
  font-style: normal;
  letter-spacing: 0;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  color: var(--accent-hover);
}
[data-theme="dark"] .prose code { color: var(--accent-light); }
.prose pre {
  background: var(--ink);
  color: #e5e7eb;
  border-radius: var(--r-md);
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
  margin: 1.6em 0;
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.prose pre::before {
  content: attr(data-lang);
  position: absolute;
  top: 10px; right: 14px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  font-family: var(--font-mono);
}
.prose figure {
  margin: 2em 0;
}
.prose figure img,
.prose figure .media-ph {
  width: 100%;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
}
.prose figcaption {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-4);
  text-align: center;
  margin-top: 12px;
  letter-spacing: 0.02em;
}
.prose hr {
  border: none;
  margin: 2.4em auto;
  width: 80px;
  text-align: center;
}
.prose hr::after {
  content: '· · ·';
  color: var(--ink-5);
  letter-spacing: 0.4em;
  font-family: var(--font-mono);
}
.prose .pull-quote {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6em;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 1.4em -8% 1.4em;
  text-align: center;
  text-wrap: balance;
  padding: 0.6em 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Callout boxes */
.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  margin: 1.6em 0 !important;
  font-size: 0.95em;
  line-height: 1.6;
}
.callout__icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-mono);
}
.callout__body { color: var(--ink-2); }
.callout__title {
  font-weight: 800;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}
.callout--info { border-left: 3px solid var(--info); }
.callout--info .callout__icon { background: color-mix(in oklab, var(--info) 12%, transparent); color: var(--info); }
.callout--tip { border-left: 3px solid var(--success); }
.callout--tip .callout__icon { background: color-mix(in oklab, var(--success) 12%, transparent); color: var(--success); }
.callout--warn { border-left: 3px solid var(--warning); }
.callout--warn .callout__icon { background: color-mix(in oklab, var(--warning) 12%, transparent); color: var(--warning); }
.callout--imp { border-left: 3px solid var(--danger); }
.callout--imp .callout__icon { background: color-mix(in oklab, var(--danger) 12%, transparent); color: var(--danger); }

/* CTA inline (in post middle) */
.cta-inline {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  align-items: center;
  background:
    radial-gradient(circle at 100% 0%, rgba(124,58,237,0.10), transparent 60%),
    var(--accent-soft);
  border: 1px solid var(--accent-tint);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  margin: 2em 0 !important;
  position: relative;
  overflow: hidden;
}
.cta-inline__sloth {
  width: 110px;
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(124,58,237,0.15));
}
.cta-inline__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 6px;
}
.cta-inline__sub {
  font-size: 0.92em;
  color: var(--ink-3);
  line-height: 1.5;
  margin-bottom: 14px;
}
.cta-inline__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  border: none;
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: 0 4px 14px rgba(124,58,237,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.cta-inline__btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(124,58,237,0.4); border-bottom: none !important; }

/* Stat row */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 1.6em 0 !important;
  padding: 24px;
  background: var(--bg-soft);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.stat-row__cell { text-align: center; }
.stat-row__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2em;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
  display: block;
}
.stat-row__lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  margin-top: 8px;
  display: block;
}

/* ─────────────────────────────────────────────────────────────
   AUTHOR BIO (under post)
   ───────────────────────────────────────────────────────────── */
.author-bio {
  max-width: var(--measure);
  margin: 80px auto 0;
  padding: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}
.author-bio__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  font-family: var(--font-display);
}
.author-bio__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.author-bio__role {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.author-bio__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.author-bio__social {
  display: flex;
  gap: 8px;
}
.author-bio__social a {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  transition: all 0.15s;
}
.author-bio__social a:hover { color: var(--accent); border-color: var(--accent); }
.author-bio__social svg { width: 14px; height: 14px; }

/* ─────────────────────────────────────────────────────────────
   RELATED POSTS
   ───────────────────────────────────────────────────────────── */
.related {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────────────────────────
   STICKY BOTTOM NEWSLETTER BAR
   ───────────────────────────────────────────────────────────── */
.sticky-bar {
  position: absolute;
  left: 16px; right: 16px; bottom: 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 12px 32px rgba(13,13,21,0.25);
  z-index: 40;
  animation: barIn 0.4s ease-out;
}
@keyframes barIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.sticky-bar__sloth { width: 44px; height: 44px; }
.sticky-bar__text {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}
.sticky-bar__text small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}
.sticky-bar__form {
  display: flex;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 4px;
}
.sticky-bar__input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font: inherit;
  font-size: 13px;
  padding: 6px 14px;
  width: 200px;
}
.sticky-bar__input::placeholder { color: rgba(255,255,255,0.4); }
.sticky-bar__btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 700;
  font-size: 12px;
}
.sticky-bar__close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 18px;
  padding: 4px;
}

/* ─────────────────────────────────────────────────────────────
   CATEGORY ARCHIVE — Hero
   ───────────────────────────────────────────────────────────── */
.cat-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
}
.cat-hero__label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.cat-hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 4.2cqw, 60px);
  line-height: 1;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}
.cat-hero__desc {
  font-size: 18px;
  color: var(--ink-3);
  max-width: 56ch;
  line-height: 1.55;
  margin-bottom: 24px;
}
.cat-hero__stats {
  display: flex;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-4);
}
.cat-hero__stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.cat-hero__side {
  display: grid;
  gap: 16px;
}
.cat-hero__feat {
  padding: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.cat-hero__feat-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-5);
  margin-bottom: 8px;
}
.cat-hero__feat-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* ─────────────────────────────────────────────────────────────
   PAGINATION
   ───────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 64px 0 0;
  font-family: var(--font-mono);
}
.pagination__btn {
  min-width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  padding: 0 10px;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}
.pagination__btn:hover { color: var(--ink); border-color: var(--border-strong); }
.pagination__btn.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.pagination__dots { color: var(--ink-5); padding: 0 6px; }

/* ─────────────────────────────────────────────────────────────
   AUTHOR PAGE
   ───────────────────────────────────────────────────────────── */
.author-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.author-hero__avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  display: grid; place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 44px;
  font-family: var(--font-display);
  margin: 0 auto 24px;
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-md);
}
.author-hero__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(32px, 4cqw, 48px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 10px;
}
.author-hero__role {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  margin-bottom: 20px;
}
.author-hero__bio {
  font-size: 18px;
  color: var(--ink-3);
  max-width: 56ch;
  margin: 0 auto 24px;
  line-height: 1.55;
}
.author-hero__stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-top: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.author-hero__stat b {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.author-hero__stat span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  margin-top: 4px;
}

/* ─────────────────────────────────────────────────────────────
   SEARCH PAGE
   ───────────────────────────────────────────────────────────── */
.search-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}
.search-hero__label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  margin-bottom: 14px;
}
.search-hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(32px, 4cqw, 56px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 24px;
}
.search-hero__title em {
  font-style: normal;
  color: var(--accent);
}
.search-hero__count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-4);
}
.search-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-top: 24px;
  font-size: 16px;
}
.search-input input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font: inherit;
  color: var(--ink);
}
.search-input svg { width: 18px; height: 18px; color: var(--ink-4); }
.search-result {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.search-result__media {
  aspect-ratio: 16 / 10;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.search-result__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
}
.search-result__title mark {
  background: var(--accent-tint);
  color: var(--accent-hover);
  padding: 0 2px;
  border-radius: 3px;
}
[data-theme="dark"] .search-result__title mark { color: var(--accent-light); }
.search-result__lede {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
  margin-bottom: 12px;
}
.search-result__lede mark {
  background: var(--accent-tint);
  color: var(--accent-hover);
  padding: 0 2px;
  border-radius: 3px;
}
.search-result__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─────────────────────────────────────────────────────────────
   404 PAGE
   ───────────────────────────────────────────────────────────── */
.fourohfour {
  padding: 80px 0;
  text-align: center;
}
.fourohfour__sloth {
  width: clamp(180px, 26cqw, 320px);
  margin: 0 auto 16px;
  display: block;
  transform: rotate(-6deg);
}
.fourohfour__code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-4);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.fourohfour__big {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 9cqw, 140px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin-bottom: 24px;
}
.fourohfour__big em { font-style: normal; color: var(--accent); }
.fourohfour__quip {
  font-size: clamp(17px, 1.6cqw, 21px);
  color: var(--ink-3);
  max-width: 50ch;
  margin: 0 auto 36px;
  line-height: 1.5;
}
.fourohfour__actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.fourohfour__btn {
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}
.fourohfour__btn:hover { border-color: var(--ink); }
.fourohfour__btn--primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.fourohfour__btn--primary:hover { background: var(--accent); border-color: var(--accent); }
.fourohfour__sug {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.fourohfour__sug-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-5);
  margin-bottom: 24px;
}

/* ─────────────────────────────────────────────────────────────
   EMPTY STATE
   ───────────────────────────────────────────────────────────── */
.empty {
  padding: 64px 0;
  text-align: center;
}
.empty img { width: 180px; margin: 0 auto 16px; }
.empty h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.empty p { color: var(--ink-3); font-size: 15px; }

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — using container queries so it works inside frames
   ───────────────────────────────────────────────────────────── */
@container blog (max-width: 900px) {
  .blog-nav__links { display: none; }
  .blog-nav__search span { display: none; }
  .blog-nav__menu { display: inline-flex; }
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__sloth { display: none; }
  .featured__card { grid-template-columns: 1fr; }
  .featured__media { aspect-ratio: 16 / 10; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .newsletter { grid-template-columns: 1fr; }
  .newsletter__form { min-width: 0; }
  .app-banner { grid-template-columns: 1fr; }
  .app-banner__sloth { display: none; }
  .blog-foot__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .post-layout { grid-template-columns: 1fr; gap: 32px; }
  .toc, .share-rail { display: none; }
  .cat-hero { grid-template-columns: 1fr; }
}
@container blog (max-width: 560px) {
  .blog-nav__cta { display: none; }
  .hero { padding: 48px 0 32px; }
  .grid, .grid--two, .grid--four { grid-template-columns: 1fr; gap: 28px; }
  .blog-foot__grid { grid-template-columns: 1fr; gap: 32px; }
  .post-header__title { font-size: clamp(30px, 9cqw, 40px); }
  .post-header__lede { font-size: 17px; }
  .prose { font-size: 17px; line-height: 1.7; }
  .prose .pull-quote { font-size: 1.3em; margin-left: 0; margin-right: 0; }
  .cta-inline { grid-template-columns: 1fr; text-align: center; }
  .cta-inline__sloth { margin: 0 auto; width: 80px; }
  .featured__card { border-radius: var(--r-lg); }
  .author-bio { grid-template-columns: 1fr; text-align: center; padding: 24px; }
  .author-bio__avatar { margin: 0 auto; }
  .author-bio__social { justify-content: center; }
  .author-bio__name { justify-content: center; }
  .search-result { grid-template-columns: 1fr; }
  .sticky-bar { flex-wrap: wrap; }
  .sticky-bar__form { width: 100%; }
  .sticky-bar__input { width: auto; flex: 1; }
  .author-hero__stats { gap: 20px; }
  .author-hero__stats { flex-wrap: wrap; }
  .cat-bar__inner { padding: 12px 20px; }
  .stat-row { grid-template-columns: 1fr; }
  .breadcrumbs { padding: 20px 0 0; }
}

