/* site-editorial-polish.20260917-v1.css
   Premium pass for the editorial pages (technical reference library, project case stories)
   plus one shared button fix. Page-scoped selectors only; shared bundles are untouched.
   Cascade note: the site declares `@layer pcba-polish, pcba-ds;`. `pcba-polish` is the
   earliest layer, so `!important` declared here outranks the design-system layer and any
   unlayered `!important` in the bundles. Everything that must beat a DS rule lives in that layer. */
@layer pcba-polish, pcba-ds;

@layer pcba-polish {
  /* ---------- shared ---------- */
  html:not(#ds):not(#ds) body main .btn-primary-inline span { color: inherit !important; }

  /* ---------- dark panels (library + case stories) ---------- */
  html:not(#ds):not(#ds) body main :is(.rfq-resource, .case-cta),
  html:not(#ds):not(#ds) body main :is(.rfq-resource, .case-cta):hover,
  html:not(#ds):not(#ds) body main :is(.rfq-resource, .case-cta):active {
    background: #0f0f10 !important;
    color: #fff !important;
    border-radius: 24px !important;
    box-shadow: none !important;
    transform: none !important;
    text-decoration: none !important;
  }
  html:not(#ds):not(#ds) body main :is(.rfq-resource, .case-cta) :is(h2, h3) { color: #fff !important; }
  html:not(#ds):not(#ds) body main :is(.rfq-resource, .case-cta) h2 {
    max-width: 22ch;
    margin-bottom: 16px !important;
    font-size: clamp(28px, 3vw, 40px) !important;
    line-height: 1.12 !important;
    font-weight: 600 !important;
  }
  html:not(#ds):not(#ds) body main :is(.rfq-resource, .case-cta) p:not(.section-kicker) {
    color: #b9b9bf !important;
    font-size: 17px !important;
    line-height: 1.55 !important;
  }
  html:not(#ds):not(#ds) body main :is(.rfq-resource, .case-cta) p a:not(#_) {
    color: #fff !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(255, 255, 255, .35) !important;
    text-underline-offset: 3px;
  }
  html:not(#ds):not(#ds) body main :is(.rfq-resource, .case-cta) p a:not(#_):hover { text-decoration-color: #fff !important; }
  html:not(#ds):not(#ds) body main :is(.rfq-resource, .case-cta) .section-kicker { color: #ffcf52 !important; }

  /* library: link grid inside the dark panels */
  html:not(#ds):not(#ds) body main .rfq-resource__actions .button {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    min-height: 56px !important;
    padding: 14px 18px !important;
    border-radius: 14px !important;
    text-align: left !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
  }
  html:not(#ds):not(#ds) body main .rfq-resource__actions .button--quiet {
    border: 1px solid rgba(255, 255, 255, .14) !important;
    background: rgba(255, 255, 255, .05) !important;
    color: #f3f3f5 !important;
  }
  html:not(#ds):not(#ds) body main .rfq-resource__actions .button--quiet:hover {
    border-color: rgba(255, 255, 255, .42) !important;
    background: rgba(255, 255, 255, .12) !important;
    color: #fff !important;
  }
  html:not(#ds):not(#ds) body main .rfq-resource__actions .button--dark {
    border: 1px solid #fff !important;
    background: #fff !important;
    color: #111 !important;
  }
  html:not(#ds):not(#ds) body main .rfq-resource__actions .button--dark:hover {
    background: #e9e9ec !important;
    border-color: #e9e9ec !important;
    color: #111 !important;
  }

  /* case stories: closing CTA button */
  html:not(#ds):not(#ds) body main .case-cta .button {
    flex: 0 0 auto;
    min-height: 52px !important;
    padding: 14px 22px !important;
    border: 1px solid #fff !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #111 !important;
    font-weight: 600 !important;
  }
  html:not(#ds):not(#ds) body main .case-cta .button:hover { background: #e9e9ec !important; border-color: #e9e9ec !important; color: #111 !important; }

  /* case stories: evidence lists — the DS reset zeroed the padding, so the "—" marker sat on the first letter */
  html:not(#ds):not(#ds) body main .evidence-list li {
    padding: 0 0 16px 30px !important;
    font-size: 17px !important;
    line-height: 1.55 !important;
  }
  html:not(#ds):not(#ds) body main .evidence-list li::before { top: 0.1em; font-weight: 600; }

  /* white, bordered, rounded photo tiles (replaces grey letterboxes) */
  html:not(#ds):not(#ds) body main :is(.featured-story__image, .story-card__media, .case-detail-hero__primary, .case-detail-hero__secondary, .detail-gallery__item, .related-card__image) {
    background: #fff !important;
    border-radius: 18px !important;
    box-shadow: none !important;
  }
  html:not(#ds):not(#ds) body main :is(.featured-story__image, .case-detail-hero__primary, .case-detail-hero__secondary, .detail-gallery__item) {
    border: 1px solid var(--line, #e2e2e6) !important;
  }
  html:not(#ds):not(#ds) body main :is(.story-card__media, .related-card__image) {
    border-radius: 0 !important;
  }
  html:not(#ds):not(#ds) body main .case-detail-hero__stack {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }
  html:not(#ds):not(#ds) body main :is(.detail-gallery__item, .related-card__image) img {
    background: #fff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  html:not(#ds):not(#ds) body main :is(.story-card, .related-card) {
    background: #fff !important;
    border: 1px solid var(--line, #e2e2e6) !important;
    border-radius: 18px !important;
    box-shadow: none !important;
  }
  html:not(#ds):not(#ds) body main :is(.story-card, .related-card):hover {
    border-color: #c9c9ce !important;
    box-shadow: 0 14px 38px rgba(17, 17, 17, .08) !important;
    transform: translateY(-2px) !important;
  }
}

/* =====================================================================
   technical-reference-library.html
   ===================================================================== */
main .library-hero { padding: 64px 0 48px; }
main .library-hero__proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-width: 760px;
  overflow: hidden;
  border: 1px solid var(--line, #e2e2e6);
  border-radius: 16px;
  background: #fff;
}
main .library-hero__proof span {
  display: grid;
  gap: 4px;
  padding: 20px 24px;
  border-right: 1px solid var(--line, #e2e2e6);
  color: #6e6e73;
  font-size: 14px;
}
main .library-hero__proof span:last-child { border-right: 0; }
main .library-hero__proof strong { font-size: 34px; line-height: 1; color: #111; }

main .featured-story { padding: 48px 0 88px; align-items: center; }
main .featured-story__media {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
  min-height: 0;
  align-content: start;
}
main .featured-story__image { aspect-ratio: 1; overflow: hidden; }
main .featured-story__image--1 { grid-row: 1 / 3; }
main .featured-story__image img { padding: 7%; object-fit: contain; }
main .featured-story__content h2 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.1; }
main .featured-story__facts span {
  border: 1px solid var(--line, #e2e2e6) !important;
  background: #fff !important;
}

main .case-explorer { padding: 88px 0 72px; }
main .case-toolbar { padding: 18px 0 32px; }
main .story-grid { gap: 24px; }
main .story-card { overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
main .story-card__media { aspect-ratio: 1; border-bottom: 1px solid var(--line, #e2e2e6); }
main .story-card__media img { padding: 30px; }
main .story-card__body { padding: 20px 22px 22px; }
main .story-card__title { font-size: 20px; letter-spacing: -.02em; }
main .story-card__summary { font-size: 15px; min-height: 0; }
main .story-card__footer { margin-top: 16px; padding-top: 14px; }
main .load-more-row { padding-top: 48px; }

main .rfq-resource { gap: 36px; padding: 56px 64px; }
main .rfq-resource + .rfq-resource { margin-top: 20px; }
main .rfq-resource__actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
main .rfq-resource__actions .button::after { content: "→"; flex: 0 0 auto; opacity: .55; }
main .rfq-resource__actions .button[download]::after { content: "↓"; }

/* =====================================================================
   case-studies/*.html — project story pages
   ===================================================================== */
main .case-story__header { padding: 72px 0 44px; }
main .case-story__header h1 { margin-bottom: 22px; font-size: clamp(38px, 4.4vw, 60px); line-height: 1.06; letter-spacing: -.03em; }
main .case-story__dek { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; color: #4a4a4c; }
main .case-story__actions { margin-top: 28px; }

main .case-detail-hero { grid-template-columns: 2fr 1fr; gap: 14px; min-height: 0; align-items: start; }
main .case-detail-hero__primary, main .case-detail-hero__secondary { aspect-ratio: 1; overflow: hidden; }
main .case-detail-hero__primary { align-self: stretch; }
main .case-detail-hero__stack { grid-template-rows: auto auto; gap: 14px; }
main .case-detail-hero__primary img, main .case-detail-hero__secondary img { padding: 7%; object-fit: contain; }

main .case-proof-strip {
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line, #e2e2e6);
  border-radius: 16px;
  background: #fff;
}
main .case-proof-strip span { padding: 20px 24px; color: #6e6e73; font-size: 15px; }
main .case-proof-strip strong { color: #86868b; font-size: 11px; }

main .case-story__body { padding: 88px 0; }
main .story-sections section { padding-bottom: 72px; }
main .story-sections h2 { margin-bottom: 18px; font-size: clamp(28px, 3vw, 40px); line-height: 1.12; }
main .story-sections p:not(.section-kicker) { font-size: 18px; line-height: 1.6; }
main .case-evidence-matrix { gap: 0; overflow: hidden; border-radius: 16px; background: #fff; }
main .case-evidence-item { border-bottom: 1px solid var(--line, #e2e2e6); }
main .case-evidence-item:nth-child(odd) { border-right: 1px solid var(--line, #e2e2e6); }
main .case-evidence-item:last-child { border-right: 0; border-bottom: 0; }
main .case-evidence-boundary { border-radius: 0 12px 12px 0; }

main .detail-gallery { padding: 84px 0; }
main .detail-gallery__item { overflow: hidden; }
main .detail-gallery__item img { padding: 8%; }
main .detail-gallery__item figcaption { padding: 12px 16px 14px; border-top: 1px solid var(--line, #e2e2e6); }

main .confidentiality-note { margin-bottom: 88px; border-radius: 0 16px 16px 0; }
main .confidentiality-note h2 { font-size: clamp(24px, 2.4vw, 30px); }

main .related-cases { padding: 84px 0; }
main .related-cases__grid { gap: 24px; }
main .related-card { overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
main .related-card__image { aspect-ratio: 1; border-bottom: 1px solid var(--line, #e2e2e6); }
main .related-card__image img { padding: 28px; }
main .related-card__meta { margin: 18px 22px 0; }
main .related-card strong { margin: 8px 22px 12px; font-size: 20px; }
main .related-card .text-link { display: block; margin: 0 22px 20px; }

main .case-cta { align-items: center; padding: 52px 56px; margin-top: 8px; }
main .case-cta > div { max-width: 720px; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  main .featured-story { padding: 36px 0 64px; }
  main .featured-story__media { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  main .featured-story__image--1 { grid-column: 1 / 3; grid-row: 1; aspect-ratio: 16 / 10; }
  main .case-detail-hero { grid-template-columns: 1fr; }
  main .case-detail-hero__stack { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
}
@media (max-width: 760px) {
  main .library-hero { padding: 44px 0 36px; }
  main .library-hero__proof { grid-template-columns: 1fr; }
  main .library-hero__proof span { border-right: 0; border-bottom: 1px solid var(--line, #e2e2e6); }
  main .library-hero__proof span:last-child { border-bottom: 0; }
  main .rfq-resource { padding: 36px 22px; }
  main .rfq-resource__actions { grid-template-columns: 1fr; }
  main .story-card__media img { padding: 22px; }
  main .case-story__header { padding: 48px 0 32px; }
  main .case-proof-strip span { padding: 16px 20px; }
  main .case-evidence-item:nth-child(odd) { border-right: 0; }
  main .case-cta { padding: 36px 22px; }
  main .related-card__image img { padding: 22px; }
  @layer pcba-polish {
    html:not(#ds):not(#ds) body main :is(.rfq-resource, .case-cta) { border-radius: 18px !important; }
  }
}
