.blog-archive,
.blog-search-page,
.blog-single {
  overflow-x: clip;
}

.blog-archive>.section:first-child,
.blog-search-page>.section:first-child {
  background: var(--ink);
  color: var(--white);
}

.blog-archive>.section:first-child h1,
.blog-search-page>.section:first-child h1 {
  color: var(--white);
}

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

.blog-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.blog-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink);
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.blog-card:hover .blog-card-media img {
  transform: scale(1.04);
}

.blog-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 26px;
}

.blog-card-content .eyebrow {
  margin: 0 0 12px;
}

.blog-card-content h3 {
  margin: 0 0 12px;
}

.blog-card-content h3 a:hover {
  color: var(--cobalt);
}

.blog-card-content>p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.blog-card-meta .button {
  min-height: 40px;
  padding: 0 14px;
  border-color: var(--line);
  color: var(--ink);
}

.blog-single .blog-single-header {
  max-width: 820px;
  margin: 0 auto 36px;
}

.blog-single .blog-single-header h1 {
  margin: 0 0 18px;
}

.blog-single .blog-single-meta {
  color: var(--muted);
}

.blog-single .blog-single-image {
  max-width: 100%;
  margin: 0 auto 48px;
  border-radius: 12px;
}

.blog-single .blog-single-content {
  width: min(820px, 100%);
  margin: 0 auto;
}

/* The hero is a wide photograph now, so it carries the top of the page instead of
   running the whole column height. */
.blog-single .blog-single-image {
  max-height: 460px;
  object-fit: cover;
}

.blog-single .blog-single-content p,
.blog-single .blog-single-content li {
  color: var(--muted);
  font-size: 1.08rem;
}

.blog-single .blog-single-content img {
  height: auto;
}

.blog-pagination {
  margin-top: 40px;
}

.blog-empty {
  color: var(--muted);
}

@media (max-width: 980px) {

  .blog-archive .blog-grid,
  .blog-search-page .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {

  .blog-archive .blog-grid,
  .blog-search-page .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* A phone mockup in an article reads as a phone: capped and centred, caption under it. */
.blog-single .blog-single-content figure.wiz-post-gif {
  margin: 28px 0 32px;
}

.blog-single .blog-single-content figure.wiz-post-gif figcaption {
  margin: 10px auto 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}


/*
 * THE ARTICLE PAGE.
 *
 * Modelled on the publishing layout Shopify uses for its own blog: a title block
 * that breathes, one wide hero, then a narrow measure with a sticky "on this page"
 * rail beside it, and cards underneath to keep the reader on the site.
 *
 * Every colour here is a theme token, so the article follows the light and dark
 * switch with the rest of the site instead of pinning its own palette.
 */

.post-shell {
  padding: 36px var(--gutter) 88px;
}

/* The article uses the same edges as the header: the gutter on both sides,
   so the logo, the title and the hero all start on one vertical line. */
.post-article {
  max-width: none;
  margin: 0;
}

/* Reading progress, pinned under the header. */
.post-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}

.post-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--cobalt);
  transition: width .1s linear;
}

/* ---------------------------------------------------------------- head */

.post-head {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

/* The masthead sits on one centred axis: breadcrumb, kicker, title, standfirst
   and byline all share it, above a full-width featured image. */
.post-crumbs {
  justify-content: center;
}

.post-meta {
  justify-content: center;
}

.post-head .post-share {
  margin-left: 0;
}

.post-crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.post-crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.post-crumbs a:hover {
  color: var(--cobalt);
}

.post-kicker {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--cobalt);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
}

.post-title {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: var(--ink);
}

.post-dek {
  margin: 20px auto 0;
  max-width: 700px;
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.45;
  color: var(--muted);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: .94rem;
  color: var(--muted);
}

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  margin-right: 4px;
}

.post-byline {
  color: var(--ink);
  font-weight: 700;
}

.post-meta-dates {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.post-dot {
  color: var(--line);
}

.post-share {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.post-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, transform .16s ease;
}

.post-share-btn:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------- hero */

.post-hero {
  margin: 40px auto 0;
  max-width: none;
}

.post-hero img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.post-hero figcaption {
  margin-top: 10px;
  font-size: .88rem;
  color: var(--muted);
  text-align: center;
}

/* ---------------------------------------------------------------- body */

.post-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 860px);
  justify-content: start;
  gap: 56px;
  max-width: none;
  margin: 56px auto 0;
  align-items: start;
}

/* Table of contents on the left, article on the right. */
.post-body {
  order: 2;
  min-width: 0;
}

.post-aside {
  order: 1;
}

.post-grid--plain {
  grid-template-columns: minmax(0, 1fr);
  max-width: 860px;
  justify-content: center;
}

.post-aside {
  position: sticky;
  top: 96px;
}

/* The rail reads as one quiet card, the way the reference site does it. */
.post-toc {
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.post-toc-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  list-style: none;
  cursor: default;
}

.post-toc-title::-webkit-details-marker {
  display: none;
}

/* The chevron only means anything when the rail can collapse, which is below
   the desktop breakpoint. */
.post-toc-title::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}

@media (max-width: 1180px) {
  .post-toc-title {
    margin-bottom: 0;
    cursor: pointer;
  }

  .post-toc-title::after {
    opacity: 1;
  }

  .post-toc[open] .post-toc-title {
    margin-bottom: 12px;
  }

  .post-toc[open] .post-toc-title::after {
    transform: rotate(-135deg);
  }
}

.post-toc-list,
.post-toc-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-toc-list > li > a {
  display: block;
  padding: 7px 0 7px 13px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.4;
  text-decoration: none;
}

.post-toc-list > li > a:hover {
  color: var(--ink);
}

.post-toc-list > li > a.is-active {
  border-left-color: var(--cobalt);
  color: var(--ink);
  font-weight: 700;
}

.post-toc-sub a {
  display: block;
  padding: 5px 0 5px 24px;
  color: var(--muted);
  font-size: .86rem;
  text-decoration: none;
}

.post-toc-sub a:hover {
  color: var(--cobalt);
}

.post-body {
  min-width: 0;
}

/* Article typography: one measure, generous leading, headings that step down. */
.post-content {
  font-size: 1.08rem;
  line-height: 1.78;
  color: var(--ink);
}

.post-content > * + * {
  margin-top: 1.15em;
}

.post-content p {
  margin: 0;
  color: var(--ink);
}

/* `.post-content p` outranks the `* + *` rhythm rule, so paragraphs need their
   own top margin or the copy reads as one solid block. */
.post-content p + p {
  margin-top: 1.15em;
}

.post-content h2 {
  margin: 2.1em 0 .55em;
  font-size: clamp(1.55rem, 2.6vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.post-content h3 {
  margin: 1.7em 0 .45em;
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  line-height: 1.3;
}

.post-content h2 + p,
.post-content h3 + p {
  margin-top: .2em;
}

.post-content a {
  color: var(--cobalt);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.post-content ul,
.post-content ol {
  padding-left: 1.25em;
  display: grid;
  gap: .45em;
}

.post-content li::marker {
  color: var(--cobalt);
}

.post-content blockquote {
  margin: 1.8em 0;
  padding: 6px 0 6px 22px;
  border-left: 4px solid var(--cobalt);
  font-size: 1.16em;
  line-height: 1.6;
  color: var(--ink);
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.post-content figure {
  margin: 2em 0;
}

.post-content figcaption {
  margin-top: .7em;
  font-size: .9rem;
  color: var(--muted);
  text-align: center;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: .96rem;
}

.post-content th,
.post-content td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.post-content code {
  padding: .12em .4em;
  border-radius: 6px;
  background: var(--surface);
  font-size: .92em;
}

/* Tags, then the call to action that closes the article. */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .84rem;
  text-decoration: none;
}

.post-tag:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
}

/* Author card: who wrote this, in the same voice as the byline at the top. */
.post-author {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  max-width: 860px;
  margin: 64px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.post-author-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
}

.post-author-body {
  min-width: 0;
  flex: 1 1 auto;
}

.post-author-eyebrow {
  margin: 0 0 3px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-author-name {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--ink);
}

.post-author-bio {
  margin: 6px 0 0;
  max-width: 58ch;
  font-size: .95rem;
  line-height: 1.55;
  color: var(--muted);
}

.post-share--end {
  margin-left: auto;
  flex: 0 0 auto;
  align-self: center;
}

.post-cta {
  max-width: 860px;
  margin: 64px auto 0;
  padding: 34px;
  border-radius: 20px;
  background: var(--ink);
  color: #fff;
}

/* FAQ block: one accordion row per question, above the author card. */
.post-faq {
  max-width: 860px;
  margin: 64px auto 0;
}

.post-faq-title {
  margin: 0 0 18px;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.post-faq-item {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}

.post-faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.post-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

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

.post-faq-item summary::after {
  content: '+';
  flex: 0 0 auto;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--cobalt);
}

.post-faq-item[open] summary::after {
  content: '\2212';
}

.post-faq-answer {
  padding: 0 0 16px;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.65;
}

.post-faq-answer > :first-child {
  margin-top: 0;
}

.post-faq-answer > :last-child {
  margin-bottom: 0;
}

.post-cta-kicker {
  margin: 0 0 10px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9db6ff;
}

.post-cta-title {
  margin: 0 0 10px;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  line-height: 1.25;
  color: #fff;
}

.post-cta-copy {
  margin: 0 0 20px;
  color: #cdd8e8;
  font-size: 1rem;
  line-height: 1.6;
}

.post-cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.post-btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: .94rem;
  text-decoration: none;
}

.post-btn--primary {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
}

.post-btn:hover {
  border-color: #fff;
}

/* ------------------------------------------------------------ related */

.post-related {
  max-width: 860px;
  margin: 64px auto 0;
}

.post-related-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.post-related-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  color: var(--ink);
}

.post-related-head a {
  color: var(--cobalt);
  font-weight: 700;
  font-size: .94rem;
  text-decoration: none;
}

.post-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.post-related-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  display: flex;
  flex-direction: column;
}

.post-related-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface);
}

.post-related-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.post-related-card:hover .post-related-media img {
  transform: scale(1.04);
}

.post-related-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-related-date {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-related-body h3 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.35;
}

.post-related-body h3 a {
  color: var(--ink);
  text-decoration: none;
}

.post-related-body h3 a:hover {
  color: var(--cobalt);
}

.post-related-body p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.55;
  color: var(--muted);
}

/* --------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .post-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    max-width: 860px;
    justify-content: center;
  }

  .post-aside {
    position: static;
    order: 0;
    margin-bottom: 30px;
  }

  .post-toc {
    padding: 16px 18px;
  }

  /* No rail and no wide frame left: every block below the header drops to the
     full width of the page so the masthead, hero, body and cards share edges. */
  .post-head,
  .post-grid,
  .post-faq,
  .post-author,
  .post-related,
  .post-cta {
    max-width: none;
    margin-inline: 0;
  }

  .post-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .post-shell {
    padding: 20px var(--gutter) 64px;
  }

  .post-meta {
    gap: 6px;
  }

  .post-share {
    margin-left: 0;
    width: 100%;
    margin-top: 12px;
  }

  /* The author card stacks: avatar and name first, share buttons underneath,
     so four pill buttons never push the page wider than the screen. */
  .post-author {
    flex-wrap: wrap;
    gap: 14px;
  }

  .post-share--end {
    margin-left: 0;
    width: 100%;
    align-self: flex-start;
  }

  .post-share--end::before {
    content: "Share this article";
    display: block;
    width: 100%;
    margin-bottom: 8px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
  }

  /* Keep the byline together and give the date + read time their own line, so a
     separator dot never dangles at the end of a wrapped row. */
  .post-meta .post-byline + .post-dot {
    display: none;
  }

  .post-meta-dates {
    flex: 1 0 100%;
  }

  .post-hero {
    margin-top: 26px;
  }

  .post-hero img {
    border-radius: 12px;
  }

  .post-grid {
    margin-top: 34px;
  }

  .post-content {
    font-size: 1.04rem;
    line-height: 1.72;
  }

  .post-cta {
    padding: 24px;
  }

  .post-related {
    margin-top: 56px;
  }

  .post-related-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
