/* questmarbleshop.com: blog index (/blog/) and single articles. Uses the home.css palette. */

.qb-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header: current item and the small nav on phones */
.masthead-nav a[aria-current="page"] {
  color: var(--rasp-deep);
  box-shadow: inset 0 -2px 0 var(--rasp-deep);
}

@media (max-width: 720px) {
  .qb-single .masthead-util,
  .qb-index .masthead-util {
    display: flex;
    justify-content: center;
  }

  .qb-single .masthead-nav,
  .qb-index .masthead-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 18px;
  }

  .qb-single .masthead-nav a,
  .qb-index .masthead-nav a {
    min-height: 40px;
  }
}

/* Breadcrumbs */
.qb-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.qb-crumbs a {
  color: var(--plum-deep);
  text-decoration: none;
}

.qb-crumbs a:hover {
  text-decoration: underline;
}

/* ---------- Single article ---------- */
.qb-head {
  padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 40px);
  background:
    linear-gradient(180deg, var(--cream) 0%, var(--page) 100%);
}

.qb-head-grid {
  max-width: 900px;
}

.qb-head h1 {
  margin: 14px 0 16px;
  font-size: var(--s-h1);
  color: var(--teal-deep);
  overflow-wrap: break-word;
}

.qb-dek {
  max-width: 62ch;
  margin: 0 0 18px;
  font-family: var(--f-head);
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  font-style: italic;
  line-height: 1.45;
  color: var(--muted);
}

.qb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  color: var(--plum-deep);
  font-size: 0.95rem;
  font-weight: 700;
}

.qb-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qb-meta .ico {
  width: 18px;
  height: 18px;
  color: var(--rasp);
}

.qb-hero {
  margin: 0 0 clamp(28px, 5vw, 48px);
  border-radius: var(--radius) var(--radius) 0 var(--radius);
  overflow: hidden;
  border-bottom: 8px solid var(--rasp);
  box-shadow: var(--shadow);
}

.qb-hero img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.qb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-bottom: clamp(36px, 6vw, 64px);
}

.qb-body {
  min-width: 0;
  max-width: 70ch;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--char);
}

.qb-body .post-lede {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink);
  padding-left: 18px;
  border-left: 4px solid var(--plum);
}

.qb-body h2 {
  margin: 1.8em 0 0.55em;
  font-size: clamp(1.55rem, 1.3rem + 1vw, 2.1rem);
  color: var(--teal-deep);
}

.qb-body h3 {
  margin: 1.5em 0 0.5em;
  font-size: var(--s-h3);
  color: var(--plum-deep);
}

.qb-body ul,
.qb-body ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

.qb-body li {
  margin-bottom: 0.5em;
  padding-left: 4px;
}

.qb-body ul li::marker {
  color: var(--rasp);
}

.qb-body ol li::marker {
  color: var(--rasp-deep);
  font-family: var(--f-head);
  font-weight: 700;
}

.qb-body strong {
  color: var(--ink);
}

.qb-body a {
  color: var(--rasp-deep);
}

.qb-body img {
  border-radius: 12px;
}

.qb-body h2:last-of-type + p {
  padding: 18px 20px;
  background: var(--teal-soft);
  border-radius: 12px;
}

.qb-rail {
  position: sticky;
  top: 24px;
}

.qb-rail-card {
  position: relative;
  padding: 26px 22px 16px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-top: 6px solid var(--plum);
  border-radius: 14px;
}

.qb-rail-mark {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--plum);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qb-rail-title {
  margin: 0 0 12px;
  font-family: var(--f-head);
  font-size: 1.3rem;
  color: var(--teal-deep);
}

.qb-rail-list {
  margin: 0 0 6px;
}

.qb-rail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
}

.qb-rail-list dt {
  color: var(--muted);
  font-size: 0.92rem;
}

.qb-rail-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.qb-rail-list a {
  color: var(--rasp-deep);
}

/* Offer strip */
.qb-offer {
  padding: clamp(28px, 4vw, 40px) 0;
  background: var(--plum-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.qb-offer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
}

.qb-offer-ico {
  width: 56px;
  height: 56px;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qb-offer h2 {
  margin: 0 0 4px;
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.85rem);
  color: var(--char);
}

.qb-offer p {
  margin: 0;
  color: var(--muted);
}

.qb-offer-cta {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.qb-offer-cta .btn .ico {
  width: 18px;
  height: 18px;
}

.qb-offer .cta-note {
  max-width: 30ch;
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: center;
}

/* More articles */
.qb-more {
  padding: clamp(40px, 6vw, 72px) 0;
}

.qb-more .section-head .text-link .ico {
  width: 18px;
  height: 18px;
}

/* ---------- Cards ---------- */
.qb-grid {
  display: grid;
  gap: clamp(18px, 2.5vw, 28px);
}

.qb-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.qb-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 14px 14px 14px 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.qb-card-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.qb-card-fig {
  display: block;
  aspect-ratio: 3 / 2;
  background: var(--plum-soft);
  overflow: hidden;
}

.qb-card-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qb-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 20px 20px;
}

.qb-card-title {
  font-family: var(--f-head);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--teal-deep);
}

.qb-card-link:hover .qb-card-title {
  color: var(--rasp-deep);
}

.qb-card-ex {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.qb-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
  color: var(--plum-deep);
  font-size: 0.88rem;
  font-weight: 700;
}

.qb-card-meta .ico {
  width: 16px;
  height: 16px;
}

/* Lead card on the first blog page */
.qb-grid--lead > .qb-card:first-child {
  grid-column: 1 / -1;
}

.qb-grid--lead > .qb-card:first-child .qb-card-link {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  border-radius: var(--radius) var(--radius) var(--radius) 0;
}

.qb-grid--lead > .qb-card:first-child .qb-card-fig {
  aspect-ratio: auto;
  min-height: 320px;
}

.qb-grid--lead > .qb-card:first-child .qb-card-body {
  justify-content: center;
  padding: clamp(22px, 3vw, 40px);
  background: var(--cream);
}

.qb-grid--lead > .qb-card:first-child .qb-card-title {
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem);
}

.qb-grid--lead > .qb-card:first-child .qb-card-meta {
  margin-top: 6px;
}

/* ---------- Blog index ---------- */
.qb-intro {
  padding: clamp(30px, 5vw, 60px) 0 clamp(22px, 3vw, 34px);
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.qb-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(20px, 4vw, 56px);
  align-items: end;
}

.qb-intro h1 {
  margin: 0 0 14px;
  font-size: var(--s-h1);
  color: var(--teal-deep);
}

.qb-intro .qb-dek {
  margin: 0;
}

.qb-intro-note {
  display: flex;
  gap: 12px;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-left: 5px solid var(--rasp);
  border-radius: 12px;
}

.qb-intro-note .ico {
  width: 26px;
  height: 26px;
  color: var(--plum);
}

.qb-intro-note p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--muted);
}

.qb-intro-note a {
  color: var(--rasp-deep);
  font-weight: 700;
}

.qb-list {
  padding: clamp(26px, 4vw, 44px) 0 clamp(44px, 6vw, 72px);
}

.qb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(22px, 3vw, 32px);
}

.qb-chips a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--char);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.qb-chips a:hover {
  background: var(--rasp-soft);
}

.qb-chips a[aria-current="page"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.qb-pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(28px, 4vw, 44px);
}

.qb-pages .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--teal-deep);
  font-weight: 700;
  text-decoration: none;
}

.qb-pages .page-numbers.current {
  background: var(--rasp-deep);
  border-color: var(--rasp-deep);
  color: #fff;
}

.qb-pages .page-numbers.dots {
  border-color: transparent;
  background: none;
}

.qb-empty {
  padding: 28px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .qb-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .qb-rail {
    position: static;
    max-width: 420px;
  }

  .qb-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qb-intro-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .qb-grid--lead > .qb-card:first-child .qb-card-link {
    grid-template-columns: minmax(0, 1fr);
  }

  .qb-grid--lead > .qb-card:first-child .qb-card-fig {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .qb-offer-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .qb-offer-ico {
    width: 44px;
    height: 44px;
  }

  .qb-offer-cta {
    justify-items: stretch;
  }

  .qb-offer .cta-note {
    max-width: none;
  }

  .qb-hero {
    border-radius: 12px 12px 0 12px;
    border-bottom-width: 6px;
  }

  .qb-hero img {
    max-height: 320px;
  }
}

@media (max-width: 640px) {
  .qb-grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .qb-body .post-lede {
    font-size: 1.1rem;
    padding-left: 14px;
  }

  .qb-rail {
    max-width: none;
  }
}
