/* repo-radar theme */
:root {
  --bg: #f8f9fc;
  --surface: #ffffff;
  --text: #182230;
  --rr-muted: #788395;
  --rr-border: #e7eaf0;
  --rr-primary: #6558e8;
  --rr-primary-light: #efedff;
  --green: #159b72;
  --rr-radius: 14px;
  --font: 'DM Sans', sans-serif;
  --heading: 'Space Grotesk', sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #bcb5ff;
  outline-offset: 2px;
}
.topbar {
  height: 60px;
  padding: 0 5%;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--rr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font: 700 21px var(--heading);
  white-space: nowrap;
}
.brand-icon {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--rr-primary); color: white;
}
.brand em { color: var(--rr-primary); font-style: normal; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: #667085; font-weight: 600; }
.nav a:hover, .nav a.active { color: var(--rr-primary); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border: 1px solid var(--rr-border);
  border-radius: 9px; padding: 10px 14px;
  background: white; color: var(--text); font-weight: 600;
}
.btn:hover { border-color: #b9b1ff; }
.btn-primary { background: var(--rr-primary); color: white; border-color: var(--rr-primary); }
.btn-primary:hover { background: #5144d0; }
.icon { width: 17px; height: 17px; flex-shrink: 0; }

.hero {
  background:
    radial-gradient(ellipse at 75% 5%, #e8e4ff 0, transparent 38%),
    linear-gradient(135deg, #fff 0%, #f7f7ff 100%);
  padding: 34px 24px 24px;
  border-bottom: 1px solid var(--rr-border);
  text-align: center;
}
.eyebrow {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 7px 12px; border: 1px solid #e3dfff;
  background: #fff; color: var(--rr-primary);
  border-radius: 99px; font-size: 12px; font-weight: 700;
}
.hero h1 {
  font: 700 clamp(32px, 4.5vw, 52px)/1.13 var(--heading);
  letter-spacing: -2px; max-width: 760px;
  margin: 14px auto 10px;
}
.hero h1 span { color: var(--rr-primary); }
.hero p {
  color: var(--rr-muted); max-width: 580px;
  margin: 0 auto; line-height: 1.6; font-size: 15px;
}
.searchbar {
  margin: 18px auto 12px; max-width: 620px;
  display: flex; gap: 10px; background: white;
  border: 1px solid #e1e3ed; border-radius: 13px;
  padding: 7px; box-shadow: 0 8px 28px #342a6b0c;
}
.searchbar .icon { margin-left: 9px; color: var(--rr-muted); align-self: center; }
.searchbar input {
  border: 0; outline: 0; flex: 1; min-width: 0;
  padding: 8px 0; color: var(--text); background: transparent;
}
.searchbar input:focus-visible { outline: 0; }
.searchbar:focus-within { border-color: var(--rr-primary); }
.hero-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 1px solid var(--rr-border); border-radius: 99px;
  background: white; color: #667085; padding: 7px 12px;
  font-size: 12px; font-weight: 600;
}
.pill:hover, .pill.active { color: var(--rr-primary); border-color: #c8c1ff; background: var(--rr-primary-light); }

.layout {
  max-width: 1440px; margin: 0 auto;
  padding: 20px 5%; display: grid;
  grid-template-columns: 220px minmax(0, 1fr); gap: 24px;
}
.sidebar { min-width: 0; }
.side-group { margin-bottom: 16px; }
.side-heading {
  text-transform: uppercase; color: #929bad;
  font-size: 11px; letter-spacing: 1px;
  font-weight: 700; margin: 0 0 12px 10px;
}
.category {
  width: 100%; border: 0; background: transparent;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 10px; border-radius: 9px;
  color: #667085; text-align: left; font-weight: 500;
}
.category .icon { width: 16px; height: 16px; }
.category .count {
  margin-left: auto; font-size: 11px; color: #9ba3b2;
}
.category:hover, .category.active {
  background: var(--rr-primary-light); color: var(--rr-primary);
}
.sidebar-note {
  background: #f0efff; border: 1px solid #e2dfff;
  padding: 16px; border-radius: 12px;
}
.sidebar-note h4 { margin: 0 0 8px; font: 600 15px var(--heading); }
.sidebar-note p { margin: 0 0 13px; color: #777b91; line-height: 1.6; font-size: 12px; }

.section-head {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}
.section-head h2 { font: 700 23px var(--heading); margin: 0 0 2px; letter-spacing: -.6px; }
.section-head p { color: var(--rr-muted); margin: 0; }
.sort-select {
  padding: 10px 12px; background: white;
  border: 1px solid var(--rr-border); border-radius: 9px;
  color: #586174;
}
.stats-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.stat {
  border: 1px solid var(--rr-border); background: white;
  border-radius: 10px; padding: 9px 13px; flex: 1; min-width: 115px;
}
.stat strong { display: block; font: 700 20px var(--heading); margin-bottom: 2px; }
.stat span { color: var(--rr-muted); font-size: 12px; }

.repo-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.repo-card {
  background: white; border: 1px solid var(--rr-border);
  border-radius: var(--rr-radius); padding: 14px;
  min-width: 0; display: flex; flex-direction: column;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  cursor: pointer;
}
.repo-card:hover {
  transform: translateY(-3px); border-color: #d0caff;
  box-shadow: 0 12px 32px #25224d0b;
}
.repo-top { display: flex; align-items: flex-start; gap: 12px; }
.repo-avatar {
  width: 43px; height: 43px; border-radius: 11px;
  background: #f0efff; color: var(--rr-primary);
  display: grid; place-items: center; flex-shrink: 0;
}
.repo-avatar { position: relative; }
.repo-avatar svg { width: 21px; height: 21px; }
.trend-icon {
  position: absolute; right: -5px; bottom: -5px;
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e8590c; color: #fff; border: 2px solid #fff;
}
.repo-avatar .trend-icon svg { width: 10px; height: 10px; }
.repo-title-wrap { min-width: 0; flex: 1; }
.repo-name {
  font: 700 15px/1.3 var(--heading); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.repo-owner { color: #939bad; font-size: 11px; margin-top: 3px; }
.repo-desc {
  color: #667085; line-height: 1.5; margin: 10px 0;
  font-size: 13px;
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag {
  background: #f4f5f9; color: #697386;
  border-radius: 5px; padding: 5px 8px; font-size: 10px;
}
.repo-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 13px;
  border-top: 1px solid #f0f1f5; padding-top: 9px;
  color: #70798a; font-size: 11px; margin-top: auto;
}
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-item .icon { width: 14px; height: 14px; }
.language-dot { width: 8px; height: 8px; background: #e4a24c; border-radius: 50%; }
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 8px;
}
.updated { color: #9aa2b0; font-size: 11px; }
.open-link { color: var(--rr-primary); font-size: 12px; font-weight: 700; display: inline-flex; gap: 5px; align-items: center; }
.empty { text-align: center; padding: 60px 20px; color: var(--rr-muted); grid-column: 1/-1; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.page-btn { width: 36px; height: 36px; border: 1px solid var(--rr-border); background: white; border-radius: 8px; }
.page-btn.active { background: var(--rr-primary); color: white; border-color: var(--rr-primary); }

.footer {
  padding: 16px 5%; border-top: 1px solid var(--rr-border);
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 15px; color: var(--rr-muted); font-size: 12px;
}

/* Detail page */
.detail { max-width: 1180px; margin: auto; padding: 28px 24px 60px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; color: var(--rr-muted); font-size: 12px; margin-bottom: 24px; }
.breadcrumb a:hover { color: var(--rr-primary); }
.detail-head {
  background: white; border: 1px solid var(--rr-border);
  border-radius: 16px; padding: 28px; margin-bottom: 22px;
}
.detail-title-row { display: flex; gap: 15px; align-items: flex-start; }
.detail-title-row .repo-avatar { width: 56px; height: 56px; }
.detail-title { font: 700 clamp(23px,3vw,32px) var(--heading); overflow-wrap: anywhere; margin: 0 0 8px; }
.detail-desc { color: var(--rr-muted); line-height: 1.7; margin: 0; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.detail-stats { display: flex; flex-wrap: wrap; gap: 20px; padding-top: 20px; margin-top: 22px; border-top: 1px solid var(--rr-border); }
.detail-stat { color: var(--rr-muted); font-size: 12px; }
.detail-stat strong { color: var(--text); margin-right: 5px; font-size: 14px; }
.detail-columns { display: grid; grid-template-columns: minmax(0,1fr) 275px; gap: 22px; align-items: start; }
.panel { border: 1px solid var(--rr-border); border-radius: 14px; background: white; overflow: hidden; min-width: 0; }
.panel-head { padding: 17px 20px; border-bottom: 1px solid var(--rr-border); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head h3 { font: 700 15px var(--heading); margin: 0; display: flex; align-items: center; gap: 8px; }
.panel-body { padding: 22px; min-width: 0; }
.readme-content { line-height: 1.8; overflow-wrap: anywhere; }
.readme-content h1, .readme-content h2, .readme-content h3 { font-family: var(--heading); line-height: 1.35; margin-top: 1.7em; }
.readme-content h1 { font-size: 28px; }
.readme-content h2 { font-size: 22px; border-bottom: 1px solid var(--rr-border); padding-bottom: 8px; }
.readme-content h3 { font-size: 17px; }
.readme-content p, .readme-content li { color: #515c6d; }
.readme-content a { color: var(--rr-primary); text-decoration: underline; }
/* Inline (not Tailwind's block) so consecutive badges share a line and wrap only when they run out of room. */
.readme-content img { display: inline-block; vertical-align: middle; max-width: 100%; height: auto; }
.readme-content p > a > img, .readme-content p > img { margin: 2px 2px 2px 0; }
.readme-content pre { background: #161b27; color: #e6e9f2; padding: 16px; border-radius: 9px; overflow: auto; line-height: 1.6; }
.readme-content code { font-family: Consolas, monospace; font-size: 12px; }
.readme-content :not(pre)>code { background: #f0efff; color: #5b4be0; padding: 3px 5px; border-radius: 4px; }
.readme-content blockquote { border-left: 3px solid #c5befd; padding-left: 14px; margin-left: 0; color: var(--rr-muted); }
.readme-content table { display: block; overflow-x: auto; border-collapse: collapse; }
.readme-content th, .readme-content td { padding: 9px 12px; border: 1px solid var(--rr-border); text-align: left; }
.readme-content th { background: #f7f7fb; }
.readme-content details { margin: 10px 0; }
.readme-content summary { cursor: pointer; }
.info-list { margin: 0; }
.info-list > div { padding: 12px 0; border-bottom: 1px solid #f0f1f5; }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { color: var(--rr-muted); font-size: 11px; margin-bottom: 5px; }
.info-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.topic-list { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-list .tag { background: var(--rr-primary-light); color: var(--rr-primary); }
.contributor { display: flex; align-items: center; gap: 9px; margin: 12px 0; min-width: 0; }
.contributor img { width: 30px; height: 30px; border-radius: 50%; background: #eee; }
.contributor-info { min-width: 0; flex: 1; }
.contributor-info a { font-weight: 600; font-size: 12px; }
.contributor-info p { color: var(--rr-muted); margin: 3px 0 0; font-size: 11px; }
.hidden { display: none !important; }

@media(max-width: 1000px) {
  .nav { gap: 15px; }
  .layout { grid-template-columns: 180px minmax(0,1fr); gap: 20px; }
  .repo-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media(max-width: 700px) {
  .repo-grid { grid-template-columns: 1fr; }
  .topbar { height: 62px; padding: 0 16px; }
  .hero { padding: 45px 18px 32px; }
  .hero h1 { letter-spacing: -1px; }
  .layout { display: block; padding: 24px 16px; }
  .sidebar { margin-bottom: 28px; }
  .side-group { margin-bottom: 16px; }
  .side-group.categories { display: flex; flex-wrap: wrap; gap: 7px; }
  .side-group.categories .side-heading { display: none; }
  .side-group.categories .category { width: auto; flex-shrink: 0; border: 1px solid var(--rr-border); background: white; padding: 9px 12px; }
  .side-group.categories .category.active { background: var(--rr-primary-light); border-color: #c8c1ff; }
  .sidebar-note { display: none; }
  .stats-row { gap: 8px; }
  .stat { min-width: calc(50% - 8px); }
  .detail { padding: 20px 14px 40px; }
  .detail-head { padding: 18px; }
  .detail-columns { grid-template-columns: 1fr; }
  .detail-columns aside { order: -1; }
  .panel-body { padding: 17px; }
  .detail-title-row .repo-avatar { width: 44px; height: 44px; }
  .detail-stats { gap: 13px; }
  .searchbar .btn { padding: 10px; }
}

.repo-card { position: relative; color: inherit; }
.repo-link { color: inherit; text-decoration: none; }
.repo-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--rr-radius); }
.repo-card .tag { position: relative; z-index: 1; }
.repo-card .tag:hover { background: var(--rr-primary-light); color: var(--rr-primary); }
.trend-badge { color: #e8590c; font-weight: 700; }
.trending-grid { margin-bottom: 30px; }
.page-btn { display: inline-grid; place-items: center; text-decoration: none; color: inherit; }
.tag { text-decoration: none; }

/* Mobile menu: hamburger + dropdown with the CTAs inside */
.mobile-menu { position: relative; }
.menu-btn {
  display: none; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--rr-border); border-radius: 9px;
  background: white; color: var(--text); font-size: 20px;
}
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: min(280px, calc(100vw - 32px)); padding: 8px;
  background: white; border: 1px solid var(--rr-border);
  border-radius: 12px; box-shadow: 0 14px 36px #25224d1f;
  transform-origin: top right; z-index: 20;
}
.menu-panel > a:not(.btn) { display: block; padding: 11px 12px; border-radius: 8px; color: #667085; font-weight: 600; }
.menu-panel > a:not(.btn):hover { background: var(--rr-primary-light); color: var(--rr-primary); }
.menu-cta { display: grid; gap: 8px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--rr-border); }
[x-cloak] { display: none !important; }
.page-btn { flex-shrink: 0; }
.page-gap { align-self: center; color: var(--rr-muted); }

/* Tablet and below: the hamburger replaces the inline nav and CTAs */
@media(max-width: 1000px) {
  .nav, .top-actions { display: none; }
  .menu-btn { display: grid; }
}

/* Advero slots: collapse while empty (no ad / no config), centered and never wider than the column */
.ad-slot { margin: 12px 0; text-align: center; }
.ad-slot:empty { display: none; }
.ad-slot img { max-width: 100%; height: auto; }
.ad-slot-content { margin: 16px 0; }

.brand img { display: block; height: 30px; width: auto; }
.footer .brand img { height: 26px; }

/* Tailwind-based partials (floating widgets, forms) read these as "H S% L%" triplets, so the theme's accent is supplied in that form. */
:root { --primary: 247 76% 62%; --primary-foreground: 0 0% 100%; --ring: 247 76% 62%; }

/* Content pages: documents, FAQ, 404 */
.page-wrap { max-width: 1180px; margin: 0 auto; padding: 24px 5% 40px; }
.page-narrow { max-width: 820px; }
.page-head { margin-bottom: 18px; }
.page-head h1 { font: 700 28px/1.2 var(--heading); letter-spacing: -.8px; margin: 0 0 6px; }
.page-head p { color: var(--rr-muted); margin: 0; }
.page-head.center { text-align: center; padding-top: 8px; }

.doc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.doc-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: white; border: 1px solid var(--rr-border); border-radius: var(--rr-radius);
  color: inherit; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.doc-card:hover { transform: translateY(-3px); border-color: #d0caff; box-shadow: 0 12px 32px #25224d0b; }
.doc-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #f4f5f9; }
.doc-body { display: flex; flex-direction: column; flex: 1; padding: 14px; }
.doc-body h2 { font: 700 16px/1.3 var(--heading); margin: 0 0 6px; }
.doc-body p {
  color: #667085; line-height: 1.5; font-size: 13px; margin: 0 0 10px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.doc-body .open-link { margin-top: auto; }

.doc-article { background: white; border: 1px solid var(--rr-border); border-radius: 16px; padding: 24px 28px; }
.doc-hero { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 18px; }
.doc-article h1 { font: 700 clamp(24px, 3vw, 30px)/1.2 var(--heading); letter-spacing: -.6px; margin: 0 0 6px; }
.doc-meta { color: var(--rr-muted); font-size: 12px; margin: 0 0 16px; }

/* Rich text from the editor; Tailwind's reset strips these defaults, so they are restored here. */
.doc-content { line-height: 1.75; color: #3d4757; overflow-wrap: anywhere; }
.doc-content h2 { font: 700 19px/1.35 var(--heading); color: var(--text); margin: 1.6em 0 .5em; }
.doc-content h3 { font: 700 16px/1.35 var(--heading); color: var(--text); margin: 1.3em 0 .4em; }
.doc-content p { margin: 0 0 .9em; }
.doc-content ul, .doc-content ol { margin: 0 0 1em; padding-left: 1.4em; }
.doc-content ul { list-style: disc; }
.doc-content ol { list-style: decimal; }
.doc-content li { margin: .25em 0; }
.doc-content a { color: var(--rr-primary); text-decoration: underline; }
.doc-content strong { color: var(--text); }
.doc-content code { background: var(--rr-primary-light); color: #5b4be0; padding: 2px 5px; border-radius: 4px; font-size: 12px; }

.faq-list { display: grid; gap: 8px; }
.faq-item { background: white; border: 1px solid var(--rr-border); border-radius: 12px; transition: border-color .18s; }
.faq-item.open, .faq-item:hover { border-color: #c8c1ff; }
.faq-q {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border: 0; background: transparent; text-align: left;
  font: 600 14px/1.4 var(--font); color: var(--text);
}
.faq-q i { font-size: 18px; color: var(--rr-muted); transition: transform .18s; flex-shrink: 0; }
.faq-item.open .faq-q i { transform: rotate(180deg); color: var(--rr-primary); }
.faq-a { padding: 0 16px 14px; font-size: 14px; }
.faq-a p:last-child { margin-bottom: 0; }

.contact-card { margin-top: 24px; background: white; border: 1px solid var(--rr-border); border-radius: 16px; padding: 20px; }
.contact-card h3 { font: 700 17px var(--heading); margin: 0 0 4px; }
.contact-card > p { color: var(--rr-muted); margin: 0 0 14px; }
.form-ok { color: var(--green); margin: 8px 0 0; }
.form-error { color: #d92d20; margin: 8px 0 0; }

.not-found { text-align: center; padding-top: 60px; padding-bottom: 80px; }
.not-found h1 { font: 700 22px var(--heading); margin: 6px 0; }
.not-found p { color: var(--rr-muted); }
.not-found .nf-code { font: 700 64px/1 var(--heading); color: var(--rr-primary); margin: 0; }
.not-found .btn { margin-top: 18px; }

@media(max-width: 1000px) { .doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media(max-width: 700px) {
  .doc-grid { grid-template-columns: 1fr; }
  .page-wrap { padding: 16px 16px 32px; }
  .doc-article { padding: 18px; }
}
