/* MaxQs icon browser — self-contained styles (no CDN). */

:root {
  --banner-h: 56px;
  --bg: #f7f8fa;
  --bg-soft: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --border: #e3e7ed;
  --border-strong: #cfd6df;
  --text: #111827;
  --text-2: #4b5563;
  --muted: #6b7280;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-weak: #eef0ff;
  --accent-text: #4338ca;
  --danger: #dc2626;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas,
    "Liberation Mono", monospace;
}

html[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-soft: #111827;
  --surface: #121a26;
  --surface-2: #1a2433;
  --border: #223044;
  --border-strong: #33445c;
  --text: #e8edf5;
  --text-2: #b6c2d2;
  --muted: #8b9bb0;
  --accent: #818cf8;
  --accent-2: #a78bfa;
  --accent-weak: #1b2140;
  --accent-text: #c7d2fe;
  --danger: #f87171;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-top: var(--banner-h);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.skip-link:focus {
  top: 12px;
}

/* ------------------------------------------------------------------ */
/* Fixed promo banner                                                  */
/* ------------------------------------------------------------------ */

.promo {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--banner-h);
  z-index: 60;
  color: #f8fafc;
  background:
    radial-gradient(1200px 200px at 15% -40%, rgb(99 102 241 / 0.55), transparent 60%),
    radial-gradient(900px 180px at 85% -60%, rgb(14 165 233 / 0.35), transparent 60%),
    linear-gradient(100deg, #0b1220, #111a2e 55%, #1b1740);
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.promo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6 40%, #06b6d4);
  opacity: 0.85;
}

.promo-inner {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.promo-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.brand-mark i {
  border-radius: 3px;
  background: #fff;
  opacity: 0.92;
}

.brand-mark i:nth-child(2) {
  opacity: 0.55;
}

.brand-mark i:nth-child(3) {
  opacity: 0.72;
}

.brand-mark i:nth-child(4) {
  opacity: 0.38;
}

.brand-text {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-text small {
  font-weight: 500;
  color: rgb(226 232 240 / 0.62);
}

.brand-page {
  margin-left: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(226 232 240 / 0.9);
}

.promo-label {
  flex: none;
  font-size: 12px;
  color: rgb(203 213 225 / 0.62);
  white-space: nowrap;
}

.promo-products {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.promo-product {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 9px;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.promo-product:hover,
.promo-product:focus-visible {
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.12);
  outline: none;
}

.promo-product svg {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: 0.92;
}

.promo-product strong {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.promo-product span {
  font-size: 11.5px;
  color: rgb(203 213 225 / 0.62);
}

.promo-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 9px;
  background: rgb(255 255 255 / 0.06);
  color: #e2e8f0;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgb(255 255 255 / 0.14);
}

.icon-btn:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 1px;
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.lang-select {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-select select {
  appearance: none;
  height: 34px;
  padding: 0 30px 0 11px;
  border-radius: 9px;
  border: 1px solid rgb(255 255 255 / 0.14);
  background: rgb(255 255 255 / 0.06);
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.lang-select select:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 1px;
}

.lang-select::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #cbd5e1;
  border-bottom: 1.5px solid #cbd5e1;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Hero + search                                                       */
/* ------------------------------------------------------------------ */

.hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 18px 18px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 760px;
  margin: 12px 0 22px;
  color: var(--text-2);
  font-size: 15.5px;
}

.search-wrap {
  position: relative;
  max-width: 820px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 14px 0 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
}

.search-box:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.search-box > svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--muted);
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.search-box input::placeholder {
  color: var(--muted);
}

/* Hide the browser's native search clear button; we render our own. */
.search-box input[type="search"]::-webkit-search-cancel-button,
.search-box input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-box input[type="search"]::-ms-clear,
.search-box input[type="search"]::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

.kbd-hint {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
}

.search-clear {
  flex: none;
  width: 26px;
  height: 26px;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.search-clear:hover {
  color: var(--text);
}

.search-clear svg {
  width: 14px;
  height: 14px;
}

.search-wrap.has-value .search-clear {
  display: grid;
}

.search-wrap.has-value .kbd-hint {
  display: none;
}

.quick-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12.5px;
}

.quick-row .quick-label {
  margin-right: 2px;
}

.search-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.search-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.lang-request {
  flex: none;
  color: var(--accent-text);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.lang-request:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Library switcher under the banner                                   */
/* ------------------------------------------------------------------ */

.lib-nav {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.lib-nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 7px 18px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.lib-nav-inner::-webkit-scrollbar {
  display: none;
}

.lib-nav a {
  flex: none;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 12.5px;
  text-decoration: none;
  white-space: nowrap;
}

.lib-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.lib-nav a[aria-current="page"] {
  border-color: var(--accent);
  background: var(--accent-weak);
  color: var(--accent-text);
}

.lib-nav a span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.lib-nav a[aria-current="page"] span {
  color: var(--accent-text);
  opacity: 0.7;
}

.lib-nav-all {
  font-weight: 650;
}

.quick-chip {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
}

.quick-chip:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent-weak);
}

/* ------------------------------------------------------------------ */
/* Sticky filter bar                                                   */
/* ------------------------------------------------------------------ */

.filters {
  position: sticky;
  top: var(--banner-h);
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.filters-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.lib-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  min-width: 0;
}

.lib-chips::-webkit-scrollbar {
  display: none;
}

.lib-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: none;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}

.lib-chip b {
  font-weight: 500;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.lib-chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.lib-chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-weak);
  color: var(--accent-text);
}

.lib-chip[aria-pressed="true"] b {
  color: var(--accent-text);
  opacity: 0.7;
}

.result-meta {
  flex: none;
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Grid                                                                */
/* ------------------------------------------------------------------ */

.grid-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 18px 56px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(106px, 1fr));
  gap: 8px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 104px;
  padding: 12px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.card:hover {
  border-color: var(--accent);
}

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.card .glyph {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 27px;
  line-height: 1;
  color: var(--text);
}

.card .glyph svg {
  width: 28px;
  height: 28px;
  display: block;
}

.card .glyph svg [fill="#333"],
.card .glyph svg [fill="#333333"] {
  fill: currentColor;
}

.card .name {
  max-width: 100%;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card .lib {
  max-width: 100%;
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card .style-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* skeleton */

.skeleton {
  min-height: 104px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  overflow: hidden;
  position: relative;
}



.empty {
  padding: 64px 16px 48px;
  text-align: center;
}

.empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--muted);
}

.empty-icon svg {
  width: 26px;
  height: 26px;
}

.empty h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.empty p {
  margin: 0;
  color: var(--muted);
}

.sentinel {
  height: 1px;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 18px 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12.5px;
}

.footer-note {
  max-width: 640px;
  margin: 0;
  line-height: 1.7;
}

.footer-libs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-libs a {
  text-decoration: none;
  color: var(--text-2);
}

.footer-libs a:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

.footer-rights {
  margin: 0;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Detail dialog                                                       */
/* ------------------------------------------------------------------ */

.detail {
  width: min(720px, calc(100vw - 32px));
  max-height: min(86vh, 780px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
}

.detail::backdrop {
  background: rgb(2 6 23 / 0.55);
}

.detail[open] {
  display: flex;
  flex-direction: column;
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border);
}

.detail-glyph {
  flex: none;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 58px;
  line-height: 1;
}

.detail-glyph svg {
  width: 56px;
  height: 56px;
  display: block;
}

.detail-glyph svg [fill="#333"],
.detail-glyph svg [fill="#333333"] {
  fill: currentColor;
}

.detail-title {
  min-width: 0;
  flex: 1;
}

.detail-title h2 {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 19px;
  line-height: 1.3;
  word-break: break-word;
}

.detail-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.detail-title p a {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.detail-title p a:hover {
  text-decoration: underline;
}

.detail-close {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.detail-close:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.detail-close svg {
  width: 16px;
  height: 16px;
}

.detail-body {
  padding: 18px 22px 22px;
  overflow-y: auto;
}

.detail-section-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.snippet {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 8px;
}

.snippet code {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-soft);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
}

.snippet button {
  flex: none;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.snippet button:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent-weak);
}

.meta-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 7px 16px;
  margin: 16px 0 0;
  font-size: 12.5px;
}

.meta-grid dt {
  color: var(--muted);
}

.meta-grid dd {
  margin: 0;
  color: var(--text-2);
  font-family: var(--mono);
  word-break: break-word;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-list span {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 11.5px;
}

/* ------------------------------------------------------------------ */
/* Toast                                                               */
/* ------------------------------------------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  transform: translateX(-50%);
  padding: 9px 16px;
  border-radius: 999px;
  background: #111827;
  color: #f9fafb;
  font-size: 13px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.toast.show {
  visibility: visible;
  opacity: 1;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1080px) {
  .promo-label {
    display: none;
  }
}

@media (max-width: 900px) {
  .promo-product span {
    display: none;
  }
  .promo-products {
    gap: 2px;
  }
  .promo-product {
    padding: 6px 8px;
  }
}

@media (max-width: 720px) {
  .promo-inner {
    gap: 10px;
    padding: 0 12px;
  }
  .brand-text small,
  .brand-page {
    display: none;
  }
  .promo-actions {
    gap: 6px;
  }
  .icon-btn,
  .lang-select select {
    height: 32px;
  }
  .lang-select select {
    padding-left: 9px;
    padding-right: 26px;
    max-width: 96px;
  }
  .hero {
    padding: 26px 14px 14px;
  }
  .hero-lead {
    margin-bottom: 16px;
    font-size: 14.5px;
  }
  .search-box {
    height: 50px;
  }
  .filters-inner {
    padding: 8px 14px;
    gap: 10px;
  }
  .result-meta {
    display: none;
  }
  .grid-wrap {
    padding: 14px 14px 44px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 6px;
  }
  .card {
    min-height: 96px;
  }
  .detail-head {
    padding: 16px;
    gap: 14px;
  }
  .detail-glyph {
    width: 64px;
    height: 64px;
    font-size: 44px;
  }
  .detail-glyph svg {
    width: 42px;
    height: 42px;
  }
  .detail-body {
    padding: 14px 16px 18px;
  }
  .footer-inner {
    padding: 22px 14px 30px;
  }
}

@media (max-width: 480px) {
  .promo-product strong {
    font-size: 12px;
  }
  .promo-product svg {
    width: 15px;
    height: 15px;
  }
  .brand-text {
    font-size: 14px;
  }
  .hero h1 {
    font-size: 26px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  }
  .card .glyph {
    font-size: 24px;
  }
}

@media (max-width: 600px) {
  .promo-product svg {
    display: none;
  }
  .promo-product {
    padding: 5px 6px;
  }
  .promo-product strong {
    font-size: 11.5px;
  }
  .promo-inner {
    gap: 8px;
    padding: 0 10px;
  }
  .lang-select select {
    max-width: 78px;
    font-size: 11.5px;
    padding-left: 8px;
  }
}


/* ------------------------------------------------------------------ */
/* Hub: library cards + grouped search results                         */
/* ------------------------------------------------------------------ */

[hidden] {
  display: none !important;
}

.breadcrumb {
  margin: 0 0 10px;
  font-size: 12.5px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 14px;
}

.lib-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 18px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.lib-card:hover {
  border-color: var(--accent);
}

.lib-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lib-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lib-card-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.lib-card-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.lib-card-count {
  flex: none;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-weak);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.lib-card-samples {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  color: var(--text-2);
}

.lib-card-samples svg {
  width: 30px;
  height: 30px;
  flex: none;
}

.lib-card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  color: var(--muted);
  font-size: 11.5px;
}

.lib-card-browse {
  color: var(--accent-text);
  font-weight: 650;
  white-space: nowrap;
}

.hub-loading {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
}

.result-group {
  margin-bottom: 30px;
}

.result-group:last-child {
  margin-bottom: 0;
}

.result-group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
}

.result-group-head h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.result-group-head span {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.result-group-head a {
  margin-left: auto;
  color: var(--accent-text);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.result-group-head a:hover {
  text-decoration: underline;
}

.result-group .grid {
  grid-template-columns: repeat(auto-fill, minmax(106px, 1fr));
}

@media (max-width: 720px) {
  .library-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
  }
  .lib-card {
    padding: 15px;
  }
  .result-group .grid {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  }
}

/* ------------------------------------------------------------------ */
/* Language request page                                               */
/* ------------------------------------------------------------------ */

.localization {
  max-width: 760px;
  margin: 0 auto;
  padding: 46px 18px 72px;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

.localization h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
}

.localization-lead {
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 16px;
}

.localization-hint {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13.5px;
}

.support-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.support-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.email-img {
  display: block;
  width: auto;
  height: 32px;
  max-width: 100%;
}

html[data-theme="dark"] .email-img {
  filter: invert(1);
}

.mail-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.mail-btn:hover {
  background: var(--accent-2);
}

@media (max-width: 720px) {
  .localization {
    padding: 30px 14px 56px;
  }
}
