body:has(.resource-hub) {
  --md-primary-fg-color: #202c42;
  --md-accent-fg-color: #4560d5;
}
body:has(.resource-hub) .md-main { background: #f6f7fb; }
body:has(.resource-hub) .md-main__inner { width: 100%; max-width: 66rem; margin: 0 auto; }
body:has(.resource-hub) .md-content__inner { max-width: none; margin: 0; padding: 2rem clamp(.85rem, 3vw, 1.7rem) 1.5rem; }
body:has(.resource-hub) .md-content__inner::before { display: none; }
body:has(.resource-hub) .md-tabs__item--active .md-tabs__link { color: #fff; box-shadow: 0 2px #a5b9ff; }
.resource-hub { --rh-ink: #253149; --rh-muted: #647087; --rh-line: #e0e5ef; color: var(--rh-ink); }
.resource-hub [hidden] { display: none !important; }
.resource-hub svg { width: 1rem; height: 1rem; fill: currentColor; }
.rh-hero { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-bottom: 1.6rem; }
.rh-eyebrow { display: block; margin-bottom: .4rem; color: #566587; font-size: .7rem; letter-spacing: .14em; }
.resource-hub h1 { margin: 0; color: #202c42; font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.2; font-weight: 800; letter-spacing: -.05em; }
.rh-intro h1 > span { color: #5470df; margin-left: .1rem; }
.rh-search { display: flex; align-items: center; gap: .45rem; width: min(24rem, 48%); padding: .65rem .75rem; border: 1px solid #dce1ed; border-radius: .6rem; background: #fff; box-shadow: 0 .15rem .5rem #24385604; transition: border-color .2s, box-shadow .2s; }
.rh-search:focus-within { border-color: #607bdd; box-shadow: 0 0 0 3px #5470df18; }
.rh-search label { display: flex; color: #78849c; }
.rh-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--rh-ink); font: inherit; font-size: .8rem; }
.rh-search input::placeholder { color: #788397; }
.rh-search kbd { flex-shrink: 0; padding: .03rem .32rem; border: 1px solid #e0e5ed; border-radius: .2rem; background: #f7f8fc; box-shadow: none; color: #7b8598; font-size: .7rem; }
.rh-section-heading, .rh-results-heading { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; min-height: 1.5rem; }
.resource-hub h2 { margin: 0; font-size: .9rem; font-weight: 700; letter-spacing: 0; }
.rh-section-heading > span { color: var(--rh-muted); font-size: .65rem; }
.rh-featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.rh-picks { margin-bottom: 1.8rem; }
.resource-hub .rh-card {
  --rh-art-bg: #e8edfc; --rh-art-ink: #3955ae;
  --rh-title-height: 2.9rem;
  position: relative; min-width: 0; overflow: hidden;
  border: 1px solid var(--rh-line); border-radius: .65rem; background: #fff; color: var(--rh-ink);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.resource-hub .rh-card-link { display: block; color: inherit; text-decoration: none; }
.resource-hub .rh-card-link:hover { color: inherit; }
.rh-card-link:focus-visible { outline-offset: -3px !important; }
.rh-card[data-tone="violet"] { --rh-art-bg: #ede8fb; --rh-art-ink: #7452b6; }
.rh-card[data-tone="green"] { --rh-art-bg: #e0eee8; --rh-art-ink: #34745b; }
.rh-card[data-tone="orange"] { --rh-art-bg: #f7ebdc; --rh-art-ink: #9f6833; }
.rh-card[data-tone="rose"] { --rh-art-bg: #f4e5ed; --rh-art-ink: #aa527b; }
.rh-card[data-tone="teal"] { --rh-art-bg: #dfeff1; --rh-art-ink: #327d89; }
.rh-art { position: relative; display: grid; place-items: center; isolation: isolate; height: 6.6rem; overflow: hidden; background: var(--rh-art-bg); color: var(--rh-art-ink); }
.rh-art-pattern { position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(currentColor .6px, transparent .7px); background-size: .65rem .65rem; opacity: .12; mask-image: linear-gradient(120deg, transparent 25%, #000); }
.rh-art::before, .rh-art::after { content: ""; position: absolute; z-index: -1; width: 7rem; height: 7rem; border: 1px solid currentColor; border-radius: 50%; opacity: .13; }
.rh-art::before { left: -3.5rem; bottom: -5rem; width: 13rem; height: 13rem; }
.rh-art::after { top: -5rem; right: -2rem; }
.rh-monogram { font-family: Georgia, "Times New Roman", serif; font-size: 2.8rem; font-weight: 600; line-height: 1; letter-spacing: -.07em; transition: transform .3s; }
.rh-art img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; background: var(--rh-art-bg); }
.rh-card-body { position: relative; z-index: 4; display: flex; align-items: center; gap: .5rem; height: var(--rh-title-height); padding: .5rem .75rem; border-top: 1px solid #25314906; background: #fff; }
.resource-hub h3 { margin: 0; color: var(--rh-ink); font-size: .8rem; font-weight: 650; line-height: 1.45; letter-spacing: 0; }
.rh-card h3 { display: -webkit-box; min-width: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.rh-external { display: flex; flex-shrink: 0; margin-left: auto; color: #8b96ac; }
.rh-external svg { width: .8rem; height: .8rem; }
.rh-card-reveal {
  position: absolute; z-index: 3; right: 0; bottom: var(--rh-title-height); left: 0;
  padding: 1.5rem .75rem .65rem; pointer-events: none;
  opacity: 0; transform: translateY(1.3rem);
  transition: opacity .28s ease, transform .38s cubic-bezier(.2, .75, .25, 1);
}
/* 背景与模糊层单独羽化，文字保持清晰；浮层始终覆盖封面，不撑开卡片。 */
.rh-card-reveal::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(to bottom, #ffffff00, #fffffff0 1.4rem, #fffffffa);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  mask-image: linear-gradient(to bottom, transparent, #000 1.35rem);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 1.35rem);
}
.rh-card-reveal .rh-description { display: -webkit-box; overflow: hidden; margin: 0 0 .5rem; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: #44536c; font-size: .7rem; line-height: 1.6; }
.rh-card-reveal .rh-description:empty { display: none; }
.rh-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.rh-tags { display: flex; flex-wrap: wrap; gap: .25rem; }
.rh-tags > span { padding: .1rem .3rem; border-radius: .2rem; background: #edf1f8; color: #5e6d86; font-size: .6rem; line-height: 1.5; }
.rh-domain { max-width: 100%; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #748096; font-size: .6rem; }
.rh-card.is-expanded .rh-card-reveal, .rh-card:has(.rh-card-link:focus-visible) .rh-card-reveal { opacity: 1; transform: translateY(0); }
.rh-info-toggle { position: absolute; z-index: 5; right: .35rem; bottom: .35rem; display: none; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: .4rem; color: #64789d; cursor: pointer; }
.rh-info-toggle[aria-expanded="true"] { background: #e8edfc; color: #3b56ad; }
.rh-card--featured .rh-art { height: 7.8rem; }
.rh-card--featured .rh-monogram { font-size: 3.6rem; }
@media (hover: hover) {
  .rh-card:hover { transform: translateY(-2px); border-color: #bcc9ee; box-shadow: 0 .45rem 1.1rem #26385e12; }
  .rh-card:hover .rh-card-reveal { opacity: 1; transform: translateY(0); }
  .rh-card:hover .rh-monogram { transform: scale(1.04); }
}
.rh-browser { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1.3rem; padding-top: 1.3rem; border-top: 1px solid var(--rh-line); }
.rh-sidebar h2 { padding: .2rem .55rem .7rem; color: #738097; font-size: .7rem; font-weight: 500; }
.rh-categories { display: grid; gap: .25rem; }
.rh-categories button { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 2.2rem; padding: .5rem .6rem; border: 1px solid transparent; border-radius: .4rem; color: #58677f; text-align: left; font-size: .75rem; cursor: pointer; transition: background .2s; }
.rh-categories button:hover { background: #eceff7; }
.rh-categories button[aria-pressed="true"] { border-color: #dce3fa; background: #e8edfc; color: #3b56ad; font-weight: 650; }
.rh-category-count { font-size: .65rem; font-variant-numeric: tabular-nums; opacity: .8; }
.rh-count { color: #748096; font-size: .65rem; }
.rh-reset { margin-left: auto; padding: .15rem .3rem; color: #4661b6; font-size: .7rem; cursor: pointer; }
.rh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.rh-api-directory { min-width: 0; }
.rh-grid:not([hidden]) + .rh-api-directory { margin-top: 1.6rem; }
.rh-api-heading { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.rh-api-count { font-size: .65rem; color: #748096; }
.rh-api-columns, .rh-api-row { display: grid; grid-template-columns: minmax(9rem, 1.1fr) minmax(0, 1.8fr) minmax(6.5rem, .85fr) .85rem; align-items: center; gap: .8rem; padding: .65rem .7rem; }
.rh-api-columns { padding-top: .45rem; padding-bottom: .45rem; border-top: 1px solid var(--rh-line); border-bottom: 1px solid var(--rh-line); color: #748096; font-size: .65rem; }
.resource-hub .rh-api-directory .rh-api-list { margin: 0; padding: 0; list-style: none; }
.resource-hub .rh-api-directory .rh-api-list > li { margin: 0; padding: 0; border-bottom: 1px solid var(--rh-line); }
.resource-hub .rh-api-row { min-height: 3.5rem; border-radius: .25rem; color: var(--rh-ink); text-decoration: none; transition: background .2s; }
.resource-hub .rh-api-row:hover { background: #eaf0fc; color: #3653a2; }
.rh-api-identity { display: grid; min-width: 0; gap: .3rem; }
.rh-api-name { color: inherit; font-size: .8rem; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.rh-api-row .rh-description { display: -webkit-box; overflow: hidden; margin: 0; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #65728a; font-size: .7rem; line-height: 1.6; }
.rh-api-row .rh-tags > span { padding: 0; background: none; color: #77839a; font-size: .6rem; }
.rh-api-row .rh-tags > span + span::before { content: "/"; padding-right: .25rem; color: #a2acbd; }
.rh-api-row .rh-domain { justify-self: start; margin-left: 0; color: #647696; font-size: .65rem; }
.rh-api-row:focus-visible { outline-offset: -3px !important; }
.rh-state { display: grid; justify-items: center; gap: .6rem; padding: 2.5rem .7rem; color: #65738b; text-align: center; }
.rh-state-icon { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; background: #e9eefb; color: #6880c7; }
.rh-state-icon svg { width: 1.4rem; height: 1.4rem; }
.rh-state p { margin: 0; font-size: .8rem; }
.rh-retry { padding: .4rem .8rem; border: 1px solid #d5deee; border-radius: .35rem; background: #fff; color: #405da5; font-size: .75rem; cursor: pointer; }
.rh-footer { display: flex; justify-content: space-between; gap: .7rem; margin-top: 2rem; padding-top: .85rem; border-top: 1px solid var(--rh-line); color: #718098; font-size: .65rem; }
.resource-hub :is(a, button):focus-visible { outline: 3px solid #5c78db; outline-offset: 3px; }
.rh-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 65rem) {
  .rh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rh-browser { grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; }
  .rh-api-columns, .rh-api-row { grid-template-columns: minmax(8rem, 1fr) minmax(0, 1.7fr) .85rem; gap: .6rem; }
  .rh-api-columns > :nth-child(3), .rh-api-row > .rh-domain { display: none; }
}
@media (max-width: 44rem) {
  .rh-hero { align-items: stretch; flex-direction: column; gap: 1.1rem; }
  .rh-search { width: 100%; }
  .rh-search kbd { display: none; }
  .rh-featured-grid { grid-template-columns: repeat(3, minmax(12.5rem, 1fr)); gap: .65rem; overflow-x: auto; padding: 0 .15rem .6rem; scroll-snap-type: x mandatory; }
  .rh-featured-grid > article { scroll-snap-align: start; }
  .rh-browser { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .rh-sidebar h2 { display: none; }
  .rh-categories { display: flex; overflow-x: auto; padding: .15rem .15rem .5rem; }
  .rh-categories button { flex-shrink: 0; min-height: 2.2rem; }
  .rh-footer { flex-direction: column; }
}
@media (max-width: 27rem) {
  .rh-grid { gap: .6rem; }
  .rh-grid .rh-art { height: 7rem; }
  .rh-card-reveal { padding-right: .55rem; padding-left: .55rem; }
  .rh-card-reveal .rh-domain { display: none; }
  .rh-card-reveal .rh-description { font-size: .7rem; -webkit-line-clamp: 4; }
  .rh-api-columns { display: none; }
  .resource-hub .rh-api-row { grid-template-columns: minmax(0, 1fr) .85rem; gap: .25rem .6rem; padding: .75rem .35rem; }
  .rh-api-identity { grid-column: 1; grid-row: 1; }
  .rh-api-row > .rh-description { grid-column: 1; grid-row: 2; margin-top: .15rem; }
  .rh-api-row > .rh-external { grid-column: 2; grid-row: 1 / 3; }
}
@media (max-width: 44rem), (hover: none), (pointer: coarse) {
  .rh-info-toggle { display: grid; }
  .rh-card-body { padding-right: 2.6rem; }
  .rh-card-body > .rh-external { display: none; }
}
@media (prefers-reduced-motion: reduce) { .resource-hub *, .resource-hub *::before, .resource-hub *::after { transition: none !important; } }
