/* LandingQA blog and article pages.
   Loads after styles.css and reuses the marketing site's exact design tokens. */

.blog-page {
  background:
    radial-gradient(circle at 14% 5%, rgba(78, 205, 192, 0.055), transparent 25rem),
    radial-gradient(circle at 87% 15%, rgba(244, 96, 60, 0.05), transparent 24rem),
    var(--bg);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus { transform: translateY(0); }

.blog-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.blog-nav .brand { color: var(--paper); }
.blog-nav .nav-links { gap: 34px; }
.blog-nav .nav-links a[aria-current="page"] { color: var(--teal-bright); }

/* ---------- blog index hero ---------- */

.blog-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 50px;
  align-items: center;
  min-height: 455px;
  margin: 18px 0 22px;
  padding: 68px 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(75, 68, 112, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75, 68, 112, 0.075) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to right, black, transparent 92%);
}

.blog-hero > * { position: relative; z-index: 1; }

.blog-hero h1 {
  max-width: 750px;
  margin: 0 0 22px;
  font-size: clamp(48px, 5.8vw, 70px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}

.blog-hero > div > p:not(.eyebrow) {
  max-width: 690px;
  margin: 0;
  color: var(--paper-3);
  font-size: 18px;
  line-height: 1.65;
}

.blog-hero-art {
  width: 100%;
  max-width: 360px;
  justify-self: end;
}

.blog-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.blog-topics li {
  padding: 7px 11px;
  border: 1px solid var(--line-inner);
  border-radius: 999px;
  color: var(--paper-4);
  font-size: 12px;
}

/* ---------- blog sections and cards ---------- */

.blog-featured,
.blog-latest,
.related { margin: 22px 0; }

.blog-section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin: 0 4px 16px;
}

.blog-section-head .eyebrow { margin-bottom: 6px; }

.blog-section-head h2 {
  margin: 0;
  color: var(--paper);
  font-size: 30px;
  font-weight: 800;
}

.blog-section-head > a {
  padding-bottom: 4px;
  color: var(--teal-bright);
  font-size: 14px;
  font-weight: 700;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.blog-card {
  overflow: hidden;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--cream-line);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink);
  transition: transform 160ms ease, border-color 160ms ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: #f0a890;
}

.blog-card-image,
.blog-card-art {
  overflow: hidden;
  display: block;
  height: 185px;
  border-bottom: 1px solid var(--cream-line);
  background: var(--panel);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-art {
  position: relative;
  padding: 38px;
  background:
    linear-gradient(rgba(75, 68, 112, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75, 68, 112, 0.12) 1px, transparent 1px),
    var(--panel);
  background-size: 28px 28px;
}

.blog-card-art span {
  display: block;
  width: 72%;
  height: 6px;
  margin-bottom: 13px;
  border-radius: 3px;
  background: var(--sketch);
}

.blog-card-art span:nth-child(2) { width: 88%; }
.blog-card-art span:nth-child(3) { width: 58%; }

.blog-card-art i {
  position: absolute;
  right: 34px;
  bottom: 30px;
  width: 58px;
  height: 42px;
  border: 1.5px dashed var(--orange);
  border-radius: 6px;
}

.blog-card-art i::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -16px;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--teal-bright);
  border-radius: 50%;
}

.blog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-5);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.blog-card-meta span {
  color: var(--orange-deep);
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.blog-card h2 {
  margin: 15px 0 10px;
  font-size: 24px;
  line-height: 1.2;
}

.blog-card h2 a { color: var(--ink); }
.blog-card h2 a:hover { color: var(--orange-deep); }

.blog-card-body > p {
  margin: 0 0 20px;
  color: var(--ink-4);
  font-size: 14px;
  line-height: 1.6;
}

.blog-card-foot {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--cream-line-4);
  color: var(--ink-5);
  font-size: 12px;
}

.blog-card-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--teal-badge-ink);
  font-weight: 700;
}

.blog-card-featured {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
}

.blog-card-featured .blog-card-image,
.blog-card-featured .blog-card-art {
  height: auto;
  min-height: 350px;
  border-right: 1px solid var(--cream-line);
  border-bottom: 0;
}

.blog-card-featured .blog-card-body { padding: 42px; }
.blog-card-featured h2 { max-width: 680px; font-size: 38px; }
.blog-card-featured .blog-card-body > p { max-width: 720px; font-size: 16px; }

.blog-empty {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin: 22px 0;
  padding: 55px;
}

.blog-empty-mark {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 1px dashed var(--orange);
  border-radius: 50%;
  color: var(--orange-deep);
  font-family: var(--mono);
  font-size: 24px;
}

.blog-empty h2 {
  margin: 0 0 12px;
  font-size: 38px;
}

.blog-empty p:not(.eyebrow) {
  max-width: 700px;
  margin: 0 0 24px;
  color: var(--ink-3);
  line-height: 1.65;
}

.blog-empty .btn,
.blog-cta .btn { padding: 15px 24px; border-radius: 9px; }

.blog-guide {
  margin: 36px 0 22px;
  padding: 54px;
}

.blog-guide-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 20px 54px;
  align-items: end;
  margin-bottom: 32px;
}

.blog-guide-head .eyebrow { grid-column: 1 / -1; margin-bottom: -8px; }

.blog-guide-head h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.08;
}

.blog-guide-head > p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-3);
  line-height: 1.7;
}

.blog-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--cream-line);
  border-radius: 12px;
  overflow: hidden;
}

.blog-guide-grid article {
  min-width: 0;
  padding: 28px;
  background: var(--cream-card);
}

.blog-guide-grid article + article { border-left: 1px solid var(--cream-line); }

.blog-guide-grid article > span {
  color: var(--orange-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.blog-guide-grid h3 {
  margin: 14px 0 10px;
  font-size: 20px;
}

.blog-guide-grid p,
.blog-guide-foot p {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.7;
}

.blog-guide-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--cream-line);
}

.blog-guide-foot > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-end;
}

.blog-guide-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--teal-badge-ink);
  font-size: 13px;
  font-weight: 700;
}

.blog-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  align-items: center;
  margin: 40px 0 46px;
  padding: 38px 42px;
}

.blog-cta .eyebrow { margin-bottom: 8px; }
.blog-cta h2 { margin: 0 0 8px; font-size: 30px; }
.blog-cta p:not(.eyebrow) { margin: 0; color: var(--paper-4); line-height: 1.55; }
.blog-footer { margin-top: 0; }

/* ---------- article ---------- */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 38px;
  color: var(--paper-7);
  font-size: 13px;
}

.breadcrumbs a { color: var(--paper-4); }

.article-hero {
  max-width: 970px;
  margin: 34px auto 26px;
  padding: 58px 0 40px;
  text-align: center;
}

.article-kicker {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  color: var(--paper-6);
  font-family: var(--mono);
  font-size: 11px;
}

.article-kicker span:first-child {
  padding: 6px 9px;
  border: 1px solid #4a2c1f;
  border-radius: 4px;
  background: #1d1109;
  color: var(--orange);
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-hero h1 {
  margin: 0 auto 22px;
  font-size: clamp(46px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.article-description {
  max-width: 780px;
  margin: 0 auto;
  color: var(--paper-3);
  font-size: 19px;
  line-height: 1.65;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: center;
  margin-top: 28px;
  color: var(--paper-6);
  font-size: 13px;
}

.article-byline span { color: var(--paper-3); font-weight: 700; }
.article-byline a { color: var(--teal-bright); }

.article-cover {
  overflow: hidden;
  max-width: 1080px;
  margin: 0 auto 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.article-cover img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: cover;
}

.article-cover figcaption {
  padding: 10px 16px;
  color: var(--paper-7);
  font-size: 11px;
}

.article-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}

.article-toc {
  position: sticky;
  top: 18px;
  overflow-y: auto;
  max-height: calc(100vh - 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-deep);
}

.article-toc > p {
  margin: 0;
  padding: 19px 20px 13px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.article-toc ol {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  counter-reset: article-toc;
}

.article-toc li { counter-increment: article-toc; }

.article-toc a {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 7px;
  padding: 8px 20px;
  color: var(--paper-4);
  font-size: 12px;
  line-height: 1.4;
}

.article-toc li.level-3 a,
.article-toc li.level-4 a { padding-left: 30px; }

.article-toc li a::before {
  content: counter(article-toc, decimal-leading-zero);
  color: var(--line-mute);
  font-family: var(--mono);
  font-size: 9px;
}

.article-toc a:hover { background: var(--line-soft); color: var(--paper); }

.article-toc-back {
  border-top: 1px solid var(--line-soft);
  color: var(--teal-bright) !important;
  font-weight: 700;
}

.article-toc-back::before { content: none !important; }

.article-content {
  overflow: hidden;
  padding: 54px 66px 66px;
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink);
}

.article-summary {
  margin: -10px 0 42px;
  padding: 20px 22px;
  border: 1px solid #cfe4e1;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: #e9f3f2;
}

.article-summary span {
  display: block;
  margin-bottom: 7px;
  color: var(--teal-badge-ink);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.article-summary p { margin: 0; color: #264d49; font-size: 15px; line-height: 1.65; }

.article-content > h2,
.article-content > h3,
.article-content > h4 { scroll-margin-top: 22px; }

.article-content > h2 {
  margin: 54px 0 16px;
  padding-top: 10px;
  border-top: 1px solid var(--cream-line);
  font-size: 31px;
  line-height: 1.2;
}

.article-content > h2:first-of-type { margin-top: 0; }

.article-content > h3 {
  margin: 34px 0 12px;
  font-family: var(--sans);
  font-size: 21px;
  line-height: 1.3;
}

.article-content > h4 {
  margin: 28px 0 10px;
  font-family: var(--sans);
  font-size: 17px;
}

.article-content > p,
.article-content > li,
.article-content blockquote p {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.78;
}

.article-content > p { margin: 0 0 20px; }

.article-content > ul,
.article-content > ol {
  display: grid;
  gap: 10px;
  margin: 20px 0 24px;
  padding-left: 24px;
}

.article-content > ul li,
.article-content > ol li {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.72;
}

.article-content li::marker { color: var(--teal); font-weight: 700; }

.article-content a {
  color: var(--teal-badge-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content a:hover { color: var(--orange-deep); }

.article-content blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--orange);
  background: #fff0eb;
}

.article-content blockquote p { margin: 0; color: #714337; }

.article-content code {
  padding: 2px 5px;
  border: 1px solid var(--cream-line-2);
  border-radius: 4px;
  background: #f2eee5;
  font-family: var(--mono);
  font-size: 0.88em;
}

.article-content pre {
  overflow-x: auto;
  margin: 26px 0;
  padding: 20px;
  border-radius: 9px;
  background: var(--panel-deep);
  color: var(--paper-2);
}

.article-content pre code { padding: 0; border: 0; background: transparent; color: inherit; }

.article-content > p img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 28px auto;
  border: 1px solid var(--cream-line);
  border-radius: 10px;
}

.article-content hr { margin: 46px 0; border: 0; border-top: 1px solid var(--cream-line); }

.article-method {
  margin-top: 58px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--paper);
}

.article-method .eyebrow { margin-bottom: 8px; }
.article-method h2 { margin: 0 0 9px; font-size: 26px; }
.article-method p:not(.eyebrow) { margin: 0 0 14px; color: var(--paper-4); font-size: 14px; line-height: 1.6; }
.article-method a { color: var(--teal-bright); font-size: 13px; }

.related { max-width: 1080px; margin: 44px auto 0; }

.blog-not-found {
  margin: 60px auto;
  padding: 60px;
  text-align: center;
}

.blog-not-found h1 { margin: 0 0 12px; color: var(--ink); font-size: 48px; }
.blog-not-found p:not(.eyebrow) { margin: 0 0 24px; color: var(--ink-4); }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .blog-shell { padding: 0 16px; }
  .blog-hero { grid-template-columns: 1fr; padding: 48px 34px; min-height: 0; }
  .blog-hero-art { max-width: 280px; justify-self: center; }
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-guide-head { grid-template-columns: 1fr; }
  .blog-guide-grid { grid-template-columns: 1fr; }
  .blog-guide-grid article + article { border-top: 1px solid var(--cream-line); border-left: 0; }
  .blog-guide-foot { grid-template-columns: 1fr; }
  .blog-guide-foot > div { align-items: flex-start; }
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { position: static; max-height: none; }
  .article-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; }
  .article-toc-back { display: none !important; }
}

@media (max-width: 760px) {
  .blog-hero { gap: 28px; padding: 38px 22px 26px; margin-top: 8px; }
  .blog-hero h1 { font-size: 43px; }
  .blog-hero > div > p:not(.eyebrow) { font-size: 16px; }
  .blog-hero-art { max-width: 245px; }
  .blog-section-head { align-items: start; }
  .blog-section-head h2 { font-size: 25px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card-featured { display: flex; }
  .blog-card-featured .blog-card-image,
  .blog-card-featured .blog-card-art { height: 210px; min-height: 0; border-right: 0; border-bottom: 1px solid var(--cream-line); }
  .blog-card-featured .blog-card-body { padding: 24px; }
  .blog-card-featured h2 { font-size: 27px; }
  .blog-card-featured .blog-card-body > p { font-size: 14px; }
  .blog-empty { grid-template-columns: 1fr; padding: 34px 24px; }
  .blog-empty-mark { width: 78px; height: 78px; }
  .blog-empty h2 { font-size: 29px; }
  .blog-guide { padding: 34px 22px; }
  .blog-guide-head h2 { font-size: 29px; }
  .blog-guide-grid article { padding: 22px; }
  .blog-cta { grid-template-columns: 1fr; padding: 30px 24px; }
  .blog-cta .btn { width: 100%; }
  .article-hero { margin-top: 8px; padding: 34px 12px 26px; text-align: left; }
  .breadcrumbs { margin-bottom: 28px; }
  .article-kicker,
  .article-byline { justify-content: flex-start; }
  .article-hero h1 { font-size: 43px; }
  .article-description { font-size: 17px; }
  .article-toc ol { grid-template-columns: 1fr; }
  .article-content { padding: 38px 22px 44px; }
  .article-content > h2 { font-size: 27px; }
  .article-content > h3 { font-size: 20px; }
  .article-content > p,
  .article-content > ul li,
  .article-content > ol li { font-size: 15px; }
  .article-method { padding: 22px; }
  .blog-not-found { padding: 40px 22px; }
  .blog-not-found h1 { font-size: 34px; }
}

@media (max-width: 390px) {
  .blog-section-head { flex-direction: column; gap: 8px; }
  .blog-card-foot { align-items: flex-start; flex-direction: column; }
}
