.buyer-entry,
.buyer-service-section {
  --buyer-text: #17231b;
  --buyer-muted: #44564a;
  --buyer-accent: #22573d;
  --buyer-border: #d4dfd3;
  --buyer-surface: #f0f4eb;
  color: var(--buyer-text);
}
.buyer-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(26px, 5vw, 76px);
  padding-block: clamp(32px, 5vw, 72px) clamp(28px, 4vw, 52px);
}
.buyer-entry-copy { align-self: center; min-width: 0; }
.buyer-entry h1 {
  font-size: clamp(2.6rem, 4.35vw, 4.65rem);
  line-height: 1.12;
  letter-spacing: -.045em;
  margin: 0 0 20px;
}
.buyer-intro {
  max-width: 38em;
  color: var(--buyer-muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.75;
  margin: 0 0 24px;
}
.buyer-actions, .buyer-contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.buyer-actions > a:not(.button), .buyer-contact a, .buyer-brief a, .buyer-directory-link {
  color: var(--buyer-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .23em;
}
.buyer-contact { margin: 19px 0 0; font-size: .9rem; }
.buyer-contact span { color: var(--buyer-muted); }
.buyer-team-search.home-team-search { margin-top: 24px; }
.buyer-feature {
  position: relative;
  display: grid;
  min-height: 330px;
  overflow: hidden;
  border-radius: 18px;
  margin: 0;
  background: #d9e4d9;
}
.buyer-feature img { width: 100%; height: 100%; position: absolute; object-fit: cover; }
.buyer-feature figcaption {
  position: relative;
  align-self: end;
  background: linear-gradient(transparent, #101913ea);
  color: white;
  padding: 60px 24px 22px;
}
.buyer-feature figcaption div { display: grid; gap: 5px; }
.buyer-feature figcaption span { font-size: .88rem; }
.buyer-feature figcaption a { color: white; font-weight: 700; }
.buyer-service-section { padding-block: 22px 28px; scroll-margin-top: 100px; }
.buyer-section-heading { margin-bottom: 18px; }
.buyer-section-heading h2, .buyer-answer h2 { font-size: clamp(1.55rem, 2.8vw, 2.6rem); margin: 0 0 8px; line-height: 1.24; }
.buyer-section-heading p, .buyer-service-links p, .buyer-role-grid p, .buyer-answer p, .buyer-brief p { color: var(--buyer-muted); line-height: 1.75; margin: 0; }
.buyer-service-links, .buyer-role-grid, .buyer-reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 14px;
}
.buyer-service-links a, .buyer-role-grid article, .buyer-brief, .buyer-reference-grid article {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--buyer-border);
  border-radius: 14px;
  background: var(--buyer-surface);
}
.buyer-service-links a:hover { border-color: var(--buyer-accent); }
.buyer-service-links h3, .buyer-role-grid h3 { margin: 0 0 8px; font-size: 1.1rem; }
.buyer-directory-link { display: inline-block; margin: 15px 0 0; }
.buyer-crumb { display: flex; gap: 8px; margin-bottom: 15px; color: var(--buyer-muted); font-size: .86rem; }
.buyer-brief { align-self: center; padding: clamp(20px, 3vw, 35px); }
.buyer-brief h2 { margin: 0 0 10px; font-size: 1.35rem; }
.buyer-brief a { display: inline-block; margin-top: 14px; }
.buyer-reference-grid article { padding: 0; overflow: hidden; }
.buyer-reference-grid img { display: block; width: 100%; aspect-ratio: 16/7; object-fit: cover; }
.buyer-reference-grid article div { padding: 14px 18px; }
.buyer-reference-grid h3, .buyer-reference-grid p { margin: 0; }
.buyer-reference-grid p { color: var(--buyer-muted); font-size: .85rem; margin-bottom: 4px; }
@media (max-width: 800px) {
  .buyer-entry { grid-template-columns: 1fr; gap: 22px; }
  .buyer-entry h1 { font-size: clamp(2.2rem, 7vw, 3.5rem); }
  .buyer-feature { min-height: 0; aspect-ratio: 16/8; }
  .buyer-team-search.home-team-search { margin-top: 18px; }
  .buyer-actions .button { min-height: 46px; }
}
@media (max-width: 420px) {
  .buyer-intro { margin-bottom: 15px; }
  .buyer-entry h1 { margin-bottom: 14px; }
  .buyer-actions { gap: 10px 13px; }
  .buyer-feature figcaption { padding: 35px 14px 12px; }
}

@media (max-width: 760px) {
  .craft-site .team-directory-intro.section { padding-top: 16px; }
  .craft-site .team-directory-intro > h1 { margin: 6px 0; }
  .craft-site .team-directory-intro > .library-filters { margin-top: 12px; }
  .directory-team-grid .utility-team-card { display: flex; flex-direction: column; }
  .directory-team-grid .utility-team-card > .team-cover { aspect-ratio: 16/9; }
}

.service-team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 980px) {
  .service-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .service-team-grid { grid-template-columns: 1fr; }
}
.service-team-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--buyer-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(23, 35, 27, .04);
}
.service-team-card:hover { border-color: var(--buyer-accent); }
.service-team-card h3 { margin: 0; font-size: 1.12rem; line-height: 1.4; }
.service-team-card h3 a, .service-team-actions a, .service-team-ref a { color: var(--buyer-accent); text-decoration: underline; text-underline-offset: .2em; }
.service-team-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--buyer-muted); margin: 0; }
.service-team-meta .team-origin-tag { padding: 2px 8px; border-radius: 999px; font-size: .75rem; background: var(--buyer-surface); color: var(--buyer-accent); }
.service-team-meta .team-origin-owner { background: #1e4d36; color: #fff; }
.service-team-ref { font-size: .88rem; margin: 4px 0 0; }
.service-team-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: auto; padding-top: 10px; border-top: 1px solid #eef2eb; font-size: .9rem; font-weight: 700; }
.directory-scope-note { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 10px 0 16px; font-size: .92rem; color: var(--buyer-muted, #44564a); }
.directory-scope-note a { font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.supplier-citable-facts { margin: 14px 0 0; padding-left: 18px; display: grid; gap: 6px; line-height: 1.65; }
.supplier-profile-status.status-owner { background: #1e4d36; color: #fff; padding: 2px 10px; border-radius: 999px; font-weight: 600; border-color: #1e4d36; }
.case-source-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 18px; }
.case-source-tabs a { padding: 7px 15px; border-radius: 999px; border: 1px solid #d4dfd3; font-size: .9rem; text-decoration: none; background: #fff; }
.case-source-tabs a[aria-current="page"] { background: #22573d; color: #fff; border-color: #22573d; font-weight: 600; }

/* Case attribution badges */
.case-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line, #d8ded7); }
.case-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.5; }
.case-badge-owned { background: #1e4d36; color: #fff; }
.case-badge-ref { background: #eef2eb; color: #35473b; border: 1px solid #cfd9cc; }
.case-publisher { font-size: 11px; color: var(--muted, #5e6a69); }

/* Receipt lookup inline desktop layout */
.demand-lookup summary { font-weight: 600; font-size: 15px; }
.demand-lookup form {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}
.demand-lookup form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; min-width: 0; }
.demand-lookup form .button { min-height: 46px; white-space: nowrap; }
@media (max-width: 760px) {
  .demand-lookup form { grid-template-columns: 1fr; }
  .demand-lookup form .button { width: 100%; }
}

/* Supplier mobile overview & field hint polish */
.field-hint { display: block; font-size: 12px; font-weight: 400; color: var(--muted, #5e6a69); margin-top: 2px; }
@media (max-width: 560px) {
  .craft-supplier .supplier-quick-facts dl { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 760px) {
  .res-stats { align-items: start; }
  .res-stats span { display: block; font-size: 11px; line-height: 1.45; margin-top: 2px; }
}

/* Copy summary micro-interaction */
.copy-summary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--buyer-border, #d4dfd3);
  border-radius: 5px;
  background: #fff;
  color: var(--buyer-text, #17231b);
  font-size: 13px;
  font-weight: 600;
}
.copy-summary-button:hover { border-color: var(--buyer-accent, #22573d); color: var(--buyer-accent, #22573d); background: #f6f9f4; }
.copy-summary-button.is-copied { border-color: #1e4d36; background: #eaf3ec; color: #1e4d36; }

/* Graceful broken external image fallback */
.is-image-fallback > img { display: none !important; }
.is-image-fallback .image-fallback-card {
  width: 100%;
  height: 100%;
  min-height: 140px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, #e7ede2 0%, #dce5d6 100%);
  color: #1f3126;
  text-decoration: none;
}
.is-image-fallback .image-fallback-card small { font-size: 11px; color: #4a5d50; letter-spacing: .03em; }
.is-image-fallback .image-fallback-card strong {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 650;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mobile sticky consultation bar on long buyer pages */
.mobile-sticky-cta { display: none; }
@media (max-width: 760px) {
  body:has(.mobile-sticky-cta) .craft-footer { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .mobile-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 48;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(247, 247, 242, .96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line, #d8ded7);
    box-shadow: 0 -6px 22px rgba(25, 38, 39, .08);
    transition: transform .22s ease, opacity .22s ease;
  }
  .mobile-sticky-cta.is-hidden {
    transform: translateY(115%);
    opacity: 0;
    pointer-events: none;
  }
  .mobile-sticky-cta > .button,
  .mobile-sticky-cta > .copy-summary-button {
    flex: 1;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
  .mobile-sticky-cta > .button:first-child { flex: 1.35; }
}
