.bfgt-page{--bfgt-text:#171b20;--bfgt-muted:#515a64;--bfgt-link:#1e3a62;--bfgt-rule:#d4d9df;box-sizing:border-box;max-width:1100px;width:calc(100% - 48px);margin:48px auto 72px;color:var(--bfgt-text);font-family:inherit;font-size:16px;line-height:1.8}
.bfgt-page *{box-sizing:border-box}
.bfgt-page ::selection{background:#dce6f1;color:#171b20}
.bfgt-page h1,.bfgt-page h2,.bfgt-page h3{color:var(--bfgt-text);font-weight:500;overflow-wrap:anywhere}
.bfgt-page h1{margin:0 0 16px;font-size:32px;line-height:1.35}
.bfgt-page h2{font-size:21px;line-height:1.5}
.bfgt-page p{margin:0 0 12px}
.bfgt-page a{color:var(--bfgt-link);text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px;overflow-wrap:anywhere}
.bfgt-page :is(a,button,input,select,textarea):focus-visible{outline:2px solid var(--bfgt-link);outline-offset:4px}
.bfgt-page-header{margin:0 0 32px}
.bfgt-page-header p{color:var(--bfgt-muted);max-width:72ch}
.bfgt-periods{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 20px}
.bfgt-periods a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:7px 24px;border:1px solid var(--bfgt-rule);text-decoration:none;background:#fff}
.bfgt-periods a[aria-current=page]{background:#25364b;color:#fff;border-color:#25364b;font-weight:500}
.bfgt-filters{display:flex;align-items:center;flex-wrap:wrap;gap:16px 24px;margin:0 0 20px}
.bfgt-filter-language{display:flex;align-items:center;gap:10px}
.bfgt-page :is(select,button){min-height:44px;padding:8px 14px;background:#fff;border:1px solid #87929f;border-radius:0;box-shadow:none;color:var(--bfgt-text);font:inherit;font-weight:500;line-height:1.4}
.bfgt-page button{cursor:pointer}
.bfgt-check{display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer}
.bfgt-check input{width:18px;height:18px;margin:0;accent-color:var(--bfgt-link)}
.bfgt-source-state{margin:0 0 28px;color:var(--bfgt-muted);font-size:14px}
.bfgt-source-state p{margin:2px 0}
.bfgt-source-state .bfgt-notice{margin:12px 0 0;padding:12px 16px;border:1px solid var(--bfgt-rule);background:#f5f6f7;color:var(--bfgt-text)}
.bfgt-repositories{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.bfgt-repository{display:grid;grid-template-columns:40px minmax(0,1fr);gap:20px;padding:24px;border:1px solid var(--bfgt-rule);background:#fff}
.bfgt-rank{font-size:20px;color:var(--bfgt-muted);font-variant-numeric:tabular-nums;line-height:1.6}
.bfgt-repository h2{margin:0 0 10px;font-size:20px}
.bfgt-summary{max-width:72ch;color:var(--bfgt-muted);overflow-wrap:anywhere}
.bfgt-metrics{display:flex;flex-wrap:wrap;gap:6px 22px;margin:14px 0;font-size:14px;font-variant-numeric:tabular-nums}
.bfgt-metrics div{display:flex;gap:7px}
.bfgt-metrics dt{color:var(--bfgt-muted);font-weight:400}
.bfgt-metrics dd{margin:0;color:var(--bfgt-text)}
.bfgt-repository-links{display:flex;align-items:center;flex-wrap:wrap;gap:8px 24px}
.bfgt-repository-links a{min-height:36px;display:inline-flex;align-items:center}
.bfgt-review-link{font-weight:500}
.bfgt-repository-links>span{color:var(--bfgt-muted);font-size:14px}
.bfgt-empty{padding:28px;border:1px solid var(--bfgt-rule);background:#fff}
.bfgt-empty h2{margin:0 0 12px}
.bfgt-recent{margin:48px 0}
.bfgt-recent h2,.bfgt-attribution h2{margin:0 0 16px}
.bfgt-recent ul{margin:0;padding:0;list-style:none;display:grid;gap:14px}
.bfgt-recent li{display:flex;justify-content:space-between;align-items:baseline;gap:12px 24px}
.bfgt-recent time,.bfgt-date{color:var(--bfgt-muted);font-size:14px;white-space:nowrap}
.bfgt-attribution{margin:48px 0 0;padding:24px;border:1px solid var(--bfgt-rule);background:#f7f8f9;font-size:14px}
.bfgt-attribution h2{font-size:18px}
.bfgt-article-list{display:grid;gap:20px}
.bfgt-article-preview{padding:24px;border:1px solid var(--bfgt-rule);background:#fff}
.bfgt-article-preview h2{margin:0 0 8px}
.bfgt-single{max-width:850px}
.bfgt-article-content{overflow-wrap:anywhere}
.bfgt-article-content h2{margin:40px 0 16px;font-size:26px}
.bfgt-article-content h3{margin:32px 0 12px;font-size:21px}
.bfgt-article-content p{margin:0 0 20px}
.bfgt-article-content pre{max-width:100%;overflow:auto}
.bfgt-article-content img{max-width:100%;height:auto}
.bfgt-article-content table{display:block;max-width:100%;overflow:auto}
.bfgt-github-visit{margin:40px 0 24px!important;padding:20px;border:1px solid var(--bfgt-rule)}
.bfgt-return-links{display:flex;flex-wrap:wrap;gap:16px 32px;margin:40px 0 0}
.bfgt-page .pagination{margin:32px 0}
@media(max-width:640px){.bfgt-page{width:calc(100% - 32px);margin:32px auto 48px}.bfgt-page h1{font-size:28px}.bfgt-filters{gap:10px 18px}.bfgt-periods{gap:8px}.bfgt-periods a{padding:7px 20px}.bfgt-repository{grid-template-columns:24px minmax(0,1fr);gap:12px;padding:18px 16px}.bfgt-rank{font-size:17px}.bfgt-repository h2{font-size:18px}.bfgt-repository-links{align-items:flex-start;gap:4px 20px}.bfgt-metrics{gap:4px 16px}.bfgt-recent li{flex-direction:column;gap:2px}.bfgt-empty,.bfgt-attribution,.bfgt-article-preview{padding:20px}.bfgt-article-content h2{font-size:23px}}

/* Rankings share the homepage's compact name, facts, purpose reading order. */
.bfgt-trending {
  --bfgt-text: #222;
  --bfgt-muted: #555;
  --bfgt-link: #222;
  margin: 32px auto 48px;
}

.bfgt-trending .bfgt-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  margin-bottom: 20px;
}

.bfgt-trending .bfgt-page-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.bfgt-trending .bfgt-page-header p { grid-column: 1; margin: 0; font-size: 14px; }
.bfgt-trending .bfgt-page-header > a { grid-column: 2; grid-row: 1 / 3; font-size: 14px; }
.bfgt-trending .bfgt-periods { gap: 4px; margin-bottom: 12px; }
.bfgt-trending .bfgt-periods a { padding: 8px 16px; border: 0; background: #f2f2f2; color: #555; }
.bfgt-trending .bfgt-periods a[aria-current=page] { background: #222; color: #fff; }
.bfgt-trending .bfgt-filters { gap: 4px 20px; margin-bottom: 12px; font-size: 14px; }
.bfgt-trending .bfgt-source-state { margin-bottom: 16px; font-size: 13px; }
.bfgt-trending .bfgt-source-state .bfgt-notice { margin: 4px 0 0; padding: 0; border: 0; background: none; color: var(--bfgt-muted); }
.bfgt-trending .bfgt-repositories { gap: 16px; }

.bfgt-trending .bfgt-repository {
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 0;
  border: 0;
}

.bfgt-trending .bfgt-rank { padding-top: 10px; font-size: 17px; line-height: 1.4; }
.bfgt-repository-body,
.bfgt-repository-primary,
.bfgt-repository-identity,
.bfgt-repository-detail,
.bfgt-leader-body { min-width: 0; }

.bfgt-repository-primary { display: flex; align-items: center; gap: 16px; }
.bfgt-repository-identity { display: flex; align-items: center; flex: 1; gap: 12px; }
.bfgt-trending .bfgt-repository-name { flex: 0 1 auto; min-width: 0; max-width: 100%; margin: 0; font-size: 16px; line-height: 1.55; }
.bfgt-repository-name > a,
.bfgt-repository-name > span { display: block; }
.bfgt-trending .bfgt-repository-name a { text-decoration: none; }
.bfgt-owner { color: #666; }
.bfgt-project { font-weight: 700; }
.bfgt-repository-detail { display: flex; align-items: center; flex-shrink: 0; gap: 16px; }

.bfgt-trending .bfgt-metrics {
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  margin: 0;
  color: var(--bfgt-muted);
  font-size: 13px;
  line-height: 1.65;
}

.bfgt-trending .bfgt-metrics div { gap: 4px; }
.bfgt-trending .bfgt-star-metrics { flex-shrink: 0; max-width: 100%; }
.bfgt-trending .bfgt-star-metrics div { white-space: nowrap; }
.bfgt-trending .bfgt-metrics dd { color: inherit; }
.bfgt-trending .bfgt-repository-links { justify-content: flex-end; flex-wrap: nowrap; gap: 12px; font-size: 14px; line-height: 1.65; }
.bfgt-trending .bfgt-repository-links a { min-height: 44px; white-space: nowrap; }
.bfgt-trending .bfgt-summary { margin: 0; max-width: 72ch; font-size: 14px; line-height: 1.6; word-break: keep-all; }

.bfgt-leader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 16px;
  margin-top: 24px;
  padding: 12px 16px;
  background: #f5f5f5;
}

.bfgt-leader h2,
.bfgt-leader h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.55; word-break: keep-all; }
.bfgt-leader > h2 { grid-column: 1; grid-row: 1; align-self: center; }
.bfgt-leader-body { grid-column: 1 / -1; grid-row: 2; }
.bfgt-leader > a { grid-column: 2; grid-row: 1; }
.bfgt-leader > a,
.bfgt-leader-link { font-size: 14px; line-height: 1.65; }
.bfgt-trending .bfgt-page-header > a,
.bfgt-leader a { display: inline-flex; align-items: center; min-height: 44px; }
.bfgt-trending .bfgt-attribution { margin-top: 24px; padding: 16px; font-size: 13px; }
.bfgt-trending .bfgt-attribution h2 { margin-bottom: 8px; font-size: 16px; }
.bfgt-trending .bfgt-attribution p { margin-bottom: 4px; }

@media (max-width: 1000px) {
  .bfgt-repository-detail { flex-shrink: 1; flex-wrap: wrap; justify-content: flex-end; gap: 0 12px; }
  .bfgt-trending .bfgt-metrics { flex-wrap: wrap; justify-content: flex-end; gap: 0 12px; }
}

@media (max-width: 700px) {
  .bfgt-trending { width: calc(100% - 32px); margin-top: 24px; }
  .bfgt-trending .bfgt-page-header { grid-template-columns: minmax(0, 1fr); gap: 4px; margin-bottom: 12px; }
  .bfgt-trending .bfgt-page-header h1 { font-size: 26px; }
  .bfgt-trending .bfgt-page-header > a { grid-column: auto; grid-row: auto; }
  .bfgt-trending .bfgt-filters { gap: 4px 16px; }
  .bfgt-trending .bfgt-repository { grid-template-columns: 20px minmax(0, 1fr); gap: 12px; }
  .bfgt-trending .bfgt-rank { padding-top: 1px; }
  .bfgt-repository-primary { flex-wrap: wrap; gap: 0; }
  .bfgt-repository-identity { flex-basis: 100%; flex-wrap: wrap; gap: 0 12px; }
  .bfgt-trending .bfgt-star-metrics { flex-wrap: wrap; gap: 0 12px; }
  .bfgt-repository-detail { justify-content: flex-start; }
  .bfgt-trending .bfgt-metrics { justify-content: flex-start; }
  .bfgt-trending .bfgt-repository-links { justify-content: flex-start; flex-wrap: wrap; }
  .bfgt-leader { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .bfgt-leader > a { grid-column: 1; grid-row: 3; }
}
