:root {
  --blog-accent: #8758d7;
  --blog-accent-strong: #6e3fbd;
  --blog-accent-soft: #f4effc;
  --blog-ink: #17171a;
  --blog-body: #3f3f46;
  --blog-muted: #73737c;
  --blog-line: #e8e8ec;
  --blog-surface: #f7f7f9;
  --blog-max: 1180px;
  --blog-reading: 760px;
}

body.blog-page {
  background: #fff;
  color: var(--blog-ink);
}

.blog-page .nav {
  position: sticky;
}

.blog-nav-current {
  color: var(--blog-ink) !important;
  font-weight: 600;
}

.blog-index {
  width: min(var(--blog-max), calc(100% - 48px));
  margin: 0 auto;
  padding: 100px 0 120px;
}

.blog-heading {
  max-width: 680px;
  margin: 0 auto 72px;
  text-align: center;
}

.blog-heading h1 {
  font-size: clamp(46px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 760;
}

.blog-heading p {
  max-width: 580px;
  margin: 24px auto 0;
  color: var(--blog-muted);
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.55;
  letter-spacing: -0.012em;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(32px, 5vw, 72px);
  row-gap: 64px;
}

.post-card {
  min-width: 0;
}

.post-card-link {
  display: block;
  border-radius: 8px;
}

.post-card-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blog-accent) 40%, transparent);
  outline-offset: 8px;
}

.post-category {
  color: var(--blog-accent);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 750;
}

.post-card h2 {
  margin-top: 14px;
  font-size: clamp(24px, 2.35vw, 31px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 730;
  transition: color 180ms ease;
}

.post-card-link:hover h2 {
  color: var(--blog-accent-strong);
}

.post-excerpt {
  margin-top: 16px;
  color: var(--blog-muted);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.008em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: var(--blog-muted);
  font-size: 12px;
  line-height: 1.2;
}

.post-avatar {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
}

.post-author {
  color: var(--blog-ink);
  font-weight: 600;
}

.post-meta-divider {
  color: #b8b8bf;
}

.archive-note {
  margin-top: 82px;
  padding-top: 28px;
  border-top: 1px solid var(--blog-line);
  color: var(--blog-muted);
  font-size: 14px;
  text-align: center;
}

/* Article */
.article-header {
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 42px;
  text-align: center;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--blog-muted);
  font-size: 13px;
}

.breadcrumbs a {
  transition: color 160ms ease;
}

.breadcrumbs a:hover {
  color: var(--blog-accent-strong);
}

.article-category {
  display: inline-block;
  margin-top: 38px;
  color: var(--blog-accent);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.1em;
  font-weight: 750;
}

.article-header h1 {
  max-width: 900px;
  margin: 18px auto 0;
  font-size: clamp(40px, 6.2vw, 70px);
  line-height: 1.06;
  letter-spacing: -0.052em;
  font-weight: 760;
  text-wrap: balance;
}

.article-dek {
  max-width: 740px;
  margin: 26px auto 0;
  color: var(--blog-muted);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.58;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.article-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
  color: var(--blog-muted);
  font-size: 13px;
}

.article-byline .post-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.article-hero {
  width: min(var(--blog-max), calc(100% - 48px));
  margin: 0 auto;
}

.article-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 28px;
  background: #f7f5fb;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--blog-reading)) 220px;
  justify-content: center;
  gap: 72px;
  width: min(var(--blog-max), calc(100% - 48px));
  margin: 70px auto 120px;
}

.article-body {
  min-width: 0;
  color: var(--blog-body);
  font-size: 18px;
  line-height: 1.78;
  letter-spacing: 0.002em;
}

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

.article-body p {
  margin: 22px 0;
}

.article-body h2 {
  margin: 72px 0 22px;
  color: var(--blog-ink);
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.22;
  letter-spacing: -0.035em;
  font-weight: 720;
  scroll-margin-top: 90px;
}

.article-body h3 {
  margin: 42px 0 14px;
  color: var(--blog-ink);
  font-size: 23px;
  line-height: 1.32;
  letter-spacing: -0.024em;
  font-weight: 700;
  scroll-margin-top: 90px;
}

.article-body strong {
  color: var(--blog-ink);
  font-weight: 700;
}

.article-body a:not(.article-cta-button) {
  color: var(--blog-accent-strong);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--blog-accent) 38%, transparent);
  text-underline-offset: 4px;
  transition: text-decoration-color 160ms ease;
}

.article-body a:not(.article-cta-button):hover {
  text-decoration-color: currentColor;
}

.article-body ul,
.article-body ol {
  margin: 20px 0 24px 1.35em;
}

.article-body li {
  margin: 10px 0;
  padding-left: 4px;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.quick-answer {
  margin: 0 0 42px;
  padding: 28px 30px;
  border: 1px solid #e3d8f4;
  border-radius: 20px;
  background: linear-gradient(135deg, #faf7ff 0%, #f5f9ff 100%);
}

.quick-answer-label {
  margin: 0 0 8px !important;
  color: var(--blog-accent-strong);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: 0.1em;
}

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

.takeaways {
  margin: 36px 0;
  padding: 28px 30px;
  border-radius: 20px;
  background: var(--blog-surface);
}

.takeaways h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.takeaways ul {
  margin-bottom: 0;
}

.formula {
  margin: 30px 0;
  padding: 24px 28px;
  border-left: 4px solid var(--blog-accent);
  border-radius: 0 16px 16px 0;
  background: #faf9fc;
  color: var(--blog-ink);
  font-size: 20px;
  font-weight: 650;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0 34px;
}

.example-card {
  padding: 22px;
  border: 1px solid var(--blog-line);
  border-radius: 16px;
  background: #fff;
}

.example-card p {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.65;
}

.example-label {
  color: var(--blog-accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.trend-note {
  margin: 32px 0;
  padding: 28px 30px;
  border-radius: 20px;
  background: #17171a;
  color: #e6e6ea;
}

.trend-note h3 {
  margin-top: 0;
  color: #fff;
}

.trend-note strong {
  color: #fff;
}

.trend-note a {
  color: #d9c0ff !important;
}

.practice-list {
  counter-reset: practice;
  margin-left: 0 !important;
  list-style: none !important;
}

.practice-list li {
  counter-increment: practice;
  position: relative;
  min-height: 56px;
  margin: 18px 0;
  padding: 4px 0 0 68px;
}

.practice-list li::before {
  content: counter(practice);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--blog-accent-soft);
  color: var(--blog-accent-strong);
  font-weight: 750;
}

.article-cta {
  margin: 68px 0 54px;
  padding: 36px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 8%, rgba(84, 173, 255, 0.32), transparent 35%),
    radial-gradient(circle at 10% 100%, rgba(241, 81, 165, 0.3), transparent 38%),
    #17171a;
  color: #fff;
}

.article-cta h2 {
  margin: 0;
  color: #fff;
  font-size: 30px;
}

.article-cta p {
  color: #d5d5dc;
}

.article-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 6px;
  padding: 0 20px;
  border-radius: 999px;
  background: #fff;
  color: #17171a;
  font-size: 14px;
  font-weight: 700;
  transition: background 160ms ease;
}

.article-cta-button:hover {
  background: #eeeef2;
}

.faq-section details {
  border-top: 1px solid var(--blog-line);
}

.faq-section details:last-child {
  border-bottom: 1px solid var(--blog-line);
}

.faq-section summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 22px 40px 22px 0;
  color: var(--blog-ink);
  font-weight: 650;
  line-height: 1.5;
}

.faq-section summary::-webkit-details-marker {
  display: none;
}

.faq-section summary::after {
  content: "+";
  position: absolute;
  top: 19px;
  right: 4px;
  color: var(--blog-muted);
  font-size: 24px;
  font-weight: 300;
}

.faq-section details[open] summary::after {
  content: "–";
}

.faq-section details p {
  margin-top: 0;
  padding: 0 36px 22px 0;
}

.sources {
  margin-top: 72px;
  padding-top: 30px;
  border-top: 1px solid var(--blog-line);
}

.sources h2 {
  margin-top: 0;
  font-size: 26px;
}

.sources li {
  color: var(--blog-muted);
  font-size: 15px;
  line-height: 1.6;
}

.editorial-note {
  margin-top: 36px;
  color: var(--blog-muted);
  font-size: 14px;
  line-height: 1.65;
}

.article-toc {
  align-self: start;
  position: sticky;
  top: 94px;
  padding-left: 22px;
  border-left: 1px solid var(--blog-line);
}

.article-toc p {
  color: var(--blog-ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.09em;
}

.article-toc ol {
  margin-top: 16px;
}

.article-toc li + li {
  margin-top: 10px;
}

.article-toc a {
  display: block;
  color: var(--blog-muted);
  font-size: 13px;
  line-height: 1.45;
  transition: color 160ms ease;
}

.article-toc a:hover {
  color: var(--blog-accent-strong);
}

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

  .article-layout {
    grid-template-columns: minmax(0, var(--blog-reading));
    gap: 36px;
  }

  .article-toc {
    position: static;
    grid-row: 1;
    padding: 22px 24px;
    border: 1px solid var(--blog-line);
    border-radius: 16px;
    background: var(--blog-surface);
  }

  .article-toc ol {
    columns: 2;
    column-gap: 32px;
  }
}

@media (max-width: 640px) {
  .blog-index {
    width: min(100% - 36px, var(--blog-max));
    padding: 72px 0 88px;
  }

  .blog-heading {
    margin-bottom: 52px;
  }

  .post-grid {
    grid-template-columns: 1fr;
    row-gap: 48px;
  }

  .post-card {
    padding-bottom: 42px;
    border-bottom: 1px solid var(--blog-line);
  }

  .article-header,
  .article-hero,
  .article-layout {
    width: min(100% - 36px, var(--blog-max));
  }

  .article-header {
    padding-top: 48px;
  }

  .article-header h1 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .article-hero img {
    border-radius: 18px;
  }

  .article-layout {
    margin-top: 44px;
    margin-bottom: 88px;
  }

  .article-body {
    font-size: 17px;
    line-height: 1.75;
  }

  .article-body h2 {
    margin-top: 58px;
  }

  .example-grid {
    grid-template-columns: 1fr;
  }

  .quick-answer,
  .takeaways,
  .trend-note,
  .article-cta {
    padding: 24px;
  }

  .article-toc ol {
    columns: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-card h2,
  .article-cta-button,
  .article-body a,
  .article-toc a {
    transition: none;
  }
}
