/* The service hall uses the same red-and-gold artwork and warm accents as the chamber pages. */
#root .gb-service-hub {
  --gb-hub-paper: #fffdfc;
  --gb-hub-ink: #242020;
  --gb-hub-muted: #655a56;
  --gb-hub-focus: #a2000e;
  container-type: inline-size;
  padding-bottom: 10px;
  background: var(--gr-page-canvas);
  color: var(--gb-hub-ink);
}

#root .gb-service-hub > .gb-header {
  height: auto;
  min-height: calc(52px + env(safe-area-inset-top, 0px));
  padding-block-start: env(safe-area-inset-top, 0px);
  background: transparent;
}

#root .gb-service-hub > .gb-header :is(h1, .gb-back) {
  color: var(--gb-hub-ink);
}

#root .gb-service-hub > .gb-header h1 {
  font-size: var(--gr-page-title-size);
}

.gb-service-hub .gb-hub-hero {
  display: grid;
  min-block-size: clamp(130px, 36cqi, 154px);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 10px var(--gr-page-gutter) 0;
  padding: 18px clamp(16px, 5cqi, 22px);
  border-radius: 15px;
  background:
    linear-gradient(95deg, rgb(108 12 14 / 61%) 0%, rgb(118 11 13 / 52%) 60%, rgb(134 13 10 / 15%)),
    #bd1611 url('./assets/member-reference-header.png') center / cover no-repeat;
  color: #fffaf4;
  overflow-wrap: anywhere;
}

.gb-service-hub .gb-hub-hero h2 {
  color: inherit;
  font-size: clamp(1.375rem, calc(.875rem + 2.5cqi), 1.75rem);
  font-weight: 750;
  line-height: 1.25;
  text-wrap: balance;
}

.gb-hub-hero h2 span {
  display: inline-block;
  max-inline-size: 100%;
}

.gb-service-hub .gb-hub-tagline {
  display: inline-block;
  max-inline-size: 100%;
  margin-block-start: 8px;
  padding: 5px 11px;
  border-radius: 12px;
  background: rgb(255 236 207 / 17%);
  color: #fff4e5;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.45;
  text-wrap: balance;
}

.gb-hub-hero img {
  display: block;
  inline-size: clamp(48px, 15cqi, 64px);
  block-size: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgb(255 221 163 / 32%);
}

@container (width < calc(15rem + 60px)) {
  .gb-service-hub .gb-hub-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .gb-hub-hero img {
    display: none;
  }
}

.gb-service-hub .gb-hub-group {
  container: gb-hub-group / inline-size;
  margin: 12px var(--gr-page-gutter) 0;
  padding: 15px clamp(10px, 3cqi, 14px);
  border: 1px solid #f0e5e1;
  border-radius: 14px;
  background: var(--gb-hub-paper);
}

.gb-hub-hero + .gb-hub-group {
  margin-block-start: 16px;
}

.gb-hub-group > h2 {
  margin: 0 0 9px 3px;
  color: var(--gb-hub-ink);
  font-size: var(--gr-section-heading-size);
  font-weight: 750;
  line-height: 1.4;
}

.gb-hub-group > .gb-empty {
  padding: 10px 3px;
  color: var(--gb-hub-muted);
  text-align: start;
}

.gb-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 8px;
}

@container gb-hub-group (width >= calc(16rem + 32px)) {
  .gb-hub-group[aria-labelledby="gb-hub-about"] > .gb-hub-grid {
    grid-template-columns: repeat(4, minmax(max-content, 1fr));
  }
}

@container gb-hub-group (width < calc(14rem + 32px)) {
  .gb-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container gb-hub-group (width < calc(7rem + 12px)) {
  .gb-hub-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.gb-hub-grid button {
  --gb-hub-tile: linear-gradient(150deg, #fff1ec, #fbd9d5);
  --gb-hub-glyph: #b8211a;
  display: flex;
  min-inline-size: 0;
  min-block-size: 78px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 5px 1px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--gb-hub-ink);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.gb-hub-grid button span {
  inline-size: 100%;
  text-align: center;
  text-wrap: balance;
}

.gb-hub-group:not([aria-labelledby="gb-hub-about"]) button:nth-child(even) {
  --gb-hub-tile: linear-gradient(150deg, #fff3df, #f9e0c7);
  --gb-hub-glyph: #984713;
}

.gb-hub-grid button .gb-icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 12px;
  background: var(--gb-hub-tile);
  color: var(--gb-hub-glyph);
  stroke-width: 1.85;
}

@media (hover: hover) {
  .gb-hub-grid button:hover {
    background: #fff3ef;
  }
}

.gb-hub-grid button:active {
  background: #fde8e4;
}

#root .gb-service-hub button:focus-visible {
  outline: 2px solid var(--gb-hub-focus);
  outline-offset: 1px;
}

#root .gb-service-hub .gb-footer {
  margin: 12px var(--gr-page-gutter) 0;
  color: var(--gb-hub-muted);
}

/* Directory and member detail share the same controls and identity tiles. */
main.gb-page:has(.gb-search[aria-label="搜索名录"]) > .gb-tabs {
  background: #eef1fa;
  border-color: #e3e8f6;
}

main.gb-page:has(.gb-search[aria-label="搜索名录"]) > .gb-tabs button[aria-selected="true"] {
  color: var(--gr-visual-navy, #193367);
  background: var(--gr-visual-surface, #fff);
  border-bottom-color: var(--gr-visual-blue, #2c58a1);
}

main.gb-page:has(.gb-search[aria-label="搜索名录"]) > p.gb-muted {
  color: var(--gr-visual-muted, #626c81);
  background: #eef1fa;
}

main.gb-page:has(.gb-search[aria-label="搜索名录"]) > .gb-card :is(.gb-logo, .gb-avatar),
main.gb-page:has(> .gb-card > .gb-nav-links) > .gb-card > .gb-row > .gb-logo,
main.gb-page > .gb-contact-card .gb-avatar {
  color: var(--gr-visual-blue, #2c58a1);
  background: var(--gr-visual-tile, #e9edfd);
}

main.gb-page:has(.gb-search[aria-label="搜索名录"]) > .gb-card .gb-logo > .gb-icon,
main.gb-page:has(> .gb-card > .gb-nav-links) > .gb-card > .gb-row > .gb-logo > .gb-icon {
  color: var(--gr-visual-blue, #2c58a1);
}

main.gb-page > .gb-contact-card {
  border-color: #e3e8f6;
  background: var(--gr-visual-surface, #fff);
}

main.gb-page:has(> .gb-card > .gb-nav-links) > .gb-card > .gb-nav-links a {
  color: var(--gr-visual-navy, #193367);
  background: #eef1fa;
  border-color: #e3e8f6;
}

main.gb-page:not(:where(.gb-ops-page, .gb-ops-login)) > .gb-card .gb-form :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--gr-visual-blue, #2c58a1);
  outline-offset: 2px;
}
