/* D2 uses the shared palette preview rules. Only the hero and closing band
   change the tone of the continuous paper; wheat marks the quality heading. */
body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) {
  --study-paper:#F8F6EF;
  --study-hero:#F5F2EB;
  --study-surface:var(--study-paper);
  --study-ink:#2A352A;
  --study-title:var(--study-ink);
  --study-detail:var(--study-ink);
  --study-mark:#96998F;
  --study-action:#4A7C4E;
  --study-on-action:#FFFFFF;
  --study-band:#EEECE5;
  --study-on-band:var(--study-ink);
  --clear-reading:var(--study-ink);
  --paper-ink:var(--study-ink);
  --charcoal:var(--study-ink);
}

body.buyer-studio:is([data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) {
  --study-hero:#F7F7F5;
  --study-paper:#FAFAF8;
  --study-band:#EFEFEC;
}

body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #main-content :is(#ip-factory,#customization-options,#packaging-service,#service-roadmap,#quality-review,#testing-process,#cases,#certificates,#buyer-questions) {
  --block-bg:var(--study-paper);
  background:var(--study-paper)!important;
}
/* Extend the service background through the page gutters. */
body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]):has(.clear-products) #main-content>.clear-process {
  background:var(--study-paper)!important;
}
body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #main-content :is(#ip-factory,#customization-options,#packaging-service,#service-roadmap,#quality-review,#testing-process,#cases,#certificates,#buyer-questions) :is(h2,h3,h4,p,figcaption) {
  color:var(--study-ink)!important;
}
body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #quality-review .clear-quality-heading h2 {
  border-inline-start:3px solid #E6C068;
  padding-inline-start:12px;
}

/* Keep the original brand artwork legible on paper, including the footer
   which normally loads the reversed (white) mark. */
body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) :is(header,#site-footer) .brand-logo {
  content:url("/kaisight-logo.svg");
  /* Tint only the single-ink wordmark to the grass green of the study. */
  filter:brightness(0) invert(50%) sepia(100%) hue-rotate(74deg) saturate(172%) brightness(71%)!important;
}
body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #site-footer :is(h2,h3,p,a,nav,small,span,.footer-base) {
  color:var(--study-ink)!important;
}
body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #site-footer :is(.footer-column h2,.footer-base,.footer-inquiry) {
  border-color:#C8CAC0!important;
}
body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #site-footer a:not(.button):is(:hover,:focus-visible) {
  text-decoration:underline;
  text-underline-offset:4px;
}
body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #site-footer :focus-visible {
  outline:2px solid var(--study-ink);
  outline-offset:3px;
}
body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #main-content>.contact-strip .button.primary,
body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #site-footer .footer-inquiry .button {
  background:var(--study-action)!important;
  border-color:var(--study-action)!important;
  color:var(--study-on-action)!important;
}
body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #main-content>.contact-strip .button.primary:hover,
body.buyer-studio:is([data-study-palette="d2"],[data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #site-footer .footer-inquiry .button:hover {
  background:#3E6942!important;
  border-color:#3E6942!important;
}

/* Keep these refinements on the approved soft-white home only. */
body.buyer-studio:is([data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #main-content:has(>.clear-products) {
  padding-bottom:0;
  --shield-window:clamp(100px,24vw,340px);
}
body.buyer-studio:is([data-study-palette="d2-neutral"],[data-study-palette="pine-white"]):has(.clear-products) > #site-footer {
  border-block-start:1px solid #c8cac0;
}
@media (min-width:761px) {
  html:not(.scroll-scenes-active) body.buyer-studio:is([data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #main-content>#shield-study,
  html:not(.scroll-scenes-active) body.buyer-studio:is([data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #shield-study>[data-chapter-scene] {
    height:var(--shield-window);
  }
  html:not(.scroll-scenes-active) body.buyer-studio:is([data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #shield-study>[data-chapter-scene]>img {
    height:100%!important; object-fit:cover;
  }
}
@media (max-width:600px) {
  body.buyer-studio:is([data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #main-content>#quality-review {padding:28px 0!important}
  body.buyer-studio:is([data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #quality-review .quality-spread {gap:16px}
  body.buyer-studio:is([data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #quality-review .quality-steps {gap:10px}
  body.buyer-studio:is([data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #quality-review .quality-photo img {aspect-ratio:1.6}
}
@media (max-width:600px) {
  body.buyer-studio:is([data-study-palette="d2-neutral"],[data-study-palette="pine-white"]) #testing-process {
    & .clear-testing-heading {margin-bottom:14px}
    & .inspection-band {row-gap:15px; padding-block:14px 18px}
    & .inspection-method {
      display:grid;
      grid-template-columns:minmax(0,42%) minmax(0,1fr);
      gap:12px; align-items:center;
    }
    & .inspection-photo {height:auto; aspect-ratio:8/5}
    & .inspection-method:not(:last-child) {padding-bottom:8px}
    & .inspection-arrow {bottom:-9px; width:16px}
    & figcaption {padding:0}
  }
}
