/* GitFinds Dual-Mode Design System (Light default + Dark option).
   Loaded before tailwind.css so component classes govern layout cleanly. */
:root,
[data-mode="light"] {
  --bg: #f6f7fa;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --surface-3: #e3e7f0;
  --line: #dce1ea;
  --line-2: #b9c3d4;
  --text: #101521;
  --muted: #495469;
  --dim: #66738a;
  --accent: #18f278;
  --accent-hover: #3df790;
  --accent-ink: #04150b;
  --accent-text: #047857;
  --accent-soft: rgba(24, 242, 120, 0.14);
  --ok: #047857;
  --ok-soft: rgba(4, 120, 87, 0.1);
  --cyan: #0369a1;
  --cyan-soft: rgba(3, 105, 161, 0.09);
  --purple: #6d28d9;
  --purple-soft: rgba(109, 40, 217, 0.1);
  --err: #dc2626;
  --code-bg: #111520;
  --code-text: #e8edf6;
  --hdr-bg: rgba(255, 255, 255, 0.96);
  --ftr-bg: #eef1f6;
  --shadow-card: 0 1px 2px rgba(16, 21, 33, 0.05), 0 8px 22px rgba(16, 21, 33, 0.04);
  --shadow-lift: 0 6px 20px rgba(16, 21, 33, 0.09);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --r: 12px;
  --r-lg: 16px;
  color-scheme: light;
}

[data-mode="dark"] {
  --bg: #0b0c10;
  --surface: #13151b;
  --surface-2: #1b1e27;
  --surface-3: #232734;
  --line: #272c3a;
  --line-2: #3a4154;
  --text: #f2f4f8;
  --muted: #a6aec0;
  --dim: #8892a6;
  --accent: #18f278;
  --accent-hover: #42f893;
  --accent-ink: #04150b;
  --accent-text: #22f580;
  --accent-soft: rgba(24, 242, 120, 0.14);
  --ok: #22f580;
  --ok-soft: rgba(34, 245, 128, 0.12);
  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, 0.12);
  --purple: #c084fc;
  --purple-soft: rgba(192, 132, 252, 0.14);
  --err: #f87171;
  --code-bg: #0b0d12;
  --code-text: #dce3ee;
  --hdr-bg: rgba(11, 12, 16, 0.94);
  --ftr-bg: #0f1116;
  --shadow-card: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  --shadow-lift: inset 0 0 0 1px rgba(24, 242, 120, 0.3);
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}
body.gf {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.gf *, .gf *::before, .gf *::after { box-sizing: border-box; }
.gf a { color: inherit; }
.gf :focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
.gf .skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; font-weight: 700; z-index: 100; text-decoration: none; }
.skip:focus { top: 12px; }
.ic { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.15em; }
.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.main { flex: 1; width: 100%; }
.tabular { font-variant-numeric: tabular-nums; }

/* Top announcement bar */
.banner {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  padding: 7px 0;
}
.banner .wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; text-align: center; }
.banner a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }

/* Sticky Header (bigger, crisp contrast) */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--hdr-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid var(--line-2);
}
.hdr-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
@media (min-width: 720px) { .hdr-row { height: 74px; } }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 800; letter-spacing: -0.025em; font-size: 19px; flex: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; border: 1px solid rgba(4, 21, 11, 0.18); }
.brand-mark .ic { width: 18px; height: 18px; stroke-width: 2.4; }
.brand-sub { font: 700 11px/1 var(--mono); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); background: var(--surface-2); }
.nav { display: flex; gap: 4px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 9px 13px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); font-weight: 700; }
.nav-scroll { display: none; }
@media (max-width: 1080px) {
  .nav { display: none; }
  .nav-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 11px; scrollbar-width: none; }
  .nav-scroll::-webkit-scrollbar { display: none; }
  .nav-scroll a { white-space: nowrap; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 600; background: var(--surface); }
  .gf .nav-scroll a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }
}

/* Theme switch button */
.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  font: 600 13px/1 var(--sans);
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.theme-btn:hover { background: var(--surface-2); border-color: var(--accent-text); }
[data-mode="light"] .theme-ico-sun { display: none; }
[data-mode="dark"] .theme-ico-moon { display: none; }

/* Buttons (Neon Green + Bigger Mobile-Friendly Tap Targets) */
.gf .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: 11px;
  border: 1px solid rgba(4, 21, 11, 0.22);
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 15px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}
.gf .btn:hover { background: var(--accent-hover); color: var(--accent-ink); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.gf .btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.gf .btn-ghost:hover { background: var(--surface-2); border-color: var(--text); color: var(--text); }
.gf .btn-deploy { background: var(--cyan-soft); color: var(--cyan); border-color: rgba(3, 105, 161, 0.35); }
.gf .btn-deploy:hover { background: var(--cyan); color: #ffffff; border-color: var(--cyan); }
[data-mode="dark"] .gf .btn-deploy:hover { color: #0b0e17; }
.gf .btn-sm { min-height: 42px; padding: 9px 16px; font-size: 14px; border-radius: 9px; }
.gf .btn-xs { min-height: 38px; padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: 0.55; cursor: wait; }
.gf .btn-hdr { min-height: 40px; padding: 9px 15px; font-size: 14px; }
@media (max-width: 520px) {
  .theme-lbl, .hdr-cmdk-kbd { display: none; }
  .gf .btn-hdr { padding: 8px 12px; font-size: 13.5px; }
  .ra .btn { flex: 1 1 calc(50% - 7px); }
}

/* Clean Focused Hero (Mobile-First, Zero Globe Clutter) */
.hero {
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 50% 0%, var(--accent-soft), transparent 58%);
  text-align: center;
}
@media (min-width: 720px) { .hero { padding: 40px 0 32px; } }
.hero-copy { max-width: 720px; margin: 0 auto; text-align: center; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font: 600 13px/1 var(--sans);
  color: var(--muted);
}
.hero-badge b { color: var(--accent-text); font-weight: 700; }
.h1 {
  margin: 14px auto 12px;
  font-size: clamp(1.95rem, 5vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.032em;
  font-weight: 800;
  max-width: 21ch;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.hero-sub {
  color: var(--muted);
  font-size: clamp(0.98rem, 2.2vw, 1.12rem);
  max-width: 54ch;
  margin: 0 auto 20px;
}
.hero-sub b { color: var(--text); }
.hero-search-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 580px;
  margin: 0 auto;
}
@media (min-width: 540px) { .hero-search-form { flex-direction: row; } }
.hero-search-form .search { flex: 1; min-width: 0; }
.kbd { font: 600 11px/1 var(--mono); color: var(--dim); padding: 4px 7px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface-2); }

/* Cloud Partners & Sponsors Strip */
.sponsors { padding: 20px 0 6px; }
.sec-eyebrow { font: 600 12px/1 var(--sans); color: var(--dim); margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.sponsor-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sponsor-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .sponsor-grid { grid-template-columns: repeat(4, 1fr); } }
.slot {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  text-decoration: none;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 76px;
}
.slot:hover { border-color: var(--accent-text); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.slot-open { border-style: dashed; border-color: var(--line-2); flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 3px; background: var(--surface-2); box-shadow: none; }
.slot-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font: 800 13px var(--mono); color: var(--accent-text); flex: none; }
.slot-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.slot-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.slot-head b { font-size: 14px; color: var(--text); }
.slot-desc { font-size: 12.5px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* AdSense / Ad containers */
.ad-slot { margin: 14px 0; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--surface); padding: 10px; text-align: center; min-height: 90px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
.ad-label { font: 600 11px/1 var(--sans); color: var(--dim); }

/* Two-column main workspace */
.workspace { display: grid; gap: 24px; padding: 20px 0 40px; align-items: start; }
@media (min-width: 1060px) { .workspace { grid-template-columns: minmax(0, 1fr) 316px; } }
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.h2 { font-size: clamp(1.25rem, 2.8vw, 1.65rem); letter-spacing: -0.022em; font-weight: 800; margin: 0; }
.sub { color: var(--muted); margin: 3px 0 0; font-size: 14px; }
.mode-pills { display: flex; gap: 7px; flex-wrap: wrap; }

/* Controls + filter bars */
.controls { display: grid; gap: 10px; margin: 0 0 14px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.seg { display: inline-flex; gap: 4px; flex-wrap: wrap; background: var(--surface-2); padding: 4px; border-radius: 11px; border: 1px solid var(--line); }
.seg .chip { border-color: transparent; background: transparent; min-height: 32px; padding: 6px 12px; border-radius: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 36px;
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: 600 13.5px/1 var(--sans);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.12s ease, color 0.12s ease, background-color 0.12s ease;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.gf .chip[aria-pressed="true"], .gf .chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.chip-gems[aria-pressed="true"], .chip-gems.is-active { background: var(--purple); border-color: var(--purple); color: #ffffff; }
[data-mode="dark"] .chip-gems[aria-pressed="true"], [data-mode="dark"] .chip-gems.is-active { color: #0b0e17; }
.chip-rising[aria-pressed="true"], .chip-rising.is-active { background: var(--ok); border-color: var(--ok); color: #ffffff; }
[data-mode="dark"] .chip-rising[aria-pressed="true"], [data-mode="dark"] .chip-rising.is-active { color: #0b0e17; }
.chip[disabled] { opacity: 0.45; cursor: not-allowed; }
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
@media (min-width: 720px) { .select-row { display: flex; width: auto; } }
.input, .select, .textarea {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 13px;
  font: 500 16px/1.3 var(--sans);
  min-height: 44px;
}
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.search { position: relative; }
.search .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--dim); width: 17px; height: 17px; }
.search .input { padding-left: 39px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-text); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 120px; resize: vertical; }
.select {
  width: 100%;
  appearance: none;
  padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  font-size: 14px;
  font-weight: 600;
}
@media (min-width: 720px) { .select { width: auto; min-width: 160px; } }
.count { color: var(--muted); font-size: 13.5px; margin: 4px 0 12px; }
.count b { color: var(--text); }

/* Distinct GitFinds Workbench Cards */
.list { display: grid; gap: 12px; }
.card-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
  display: grid;
  gap: 11px;
  min-width: 0;
}
.card-row:hover { border-color: var(--line-2); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.card-row.is-top1 { border-left: 4px solid var(--accent); }
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.card-ident { display: flex; align-items: center; gap: 12px; min-width: 0; }
.av { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); object-fit: cover; flex: none; }
.card-title-block { min-width: 0; display: grid; gap: 3px; }
.rl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.rk-pill { font: 700 11.5px/1 var(--mono); padding: 3px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.rk-pill.is-hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.repo-link { font: 700 16px/1.25 var(--mono); text-decoration: none; color: var(--text); word-break: break-word; }
.repo-link:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.lang-dot { display: inline-flex; align-items: center; gap: 5px; font: 600 12.5px var(--sans); color: var(--muted); }
.lang-dot i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--lang-color, var(--accent)); }
.lang-python { --lang-color: #3572a5; }
.lang-typescript { --lang-color: #3178c6; }
.lang-javascript { --lang-color: #eab308; }
.lang-rust { --lang-color: #dea584; }
.lang-go { --lang-color: #00add8; }
.lang-docker { --lang-color: #2496ed; }
.lang-cpp { --lang-color: #f34b7d; }
.lang-shell { --lang-color: #89e051; }
.tag { font: 600 11.5px/1 var(--sans); padding: 4px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag-new { background: var(--ok-soft); color: var(--ok); border-color: rgba(15, 138, 75, 0.25); font-weight: 700; }
.tag-ad { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.tag-partner { background: var(--cyan-soft); color: var(--cyan); border-color: rgba(3, 105, 161, 0.25); }
.tag-kw { background: var(--accent-soft); color: var(--accent-text); border-color: rgba(255, 204, 0, 0.35); font-family: var(--mono); }

.star-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font: 700 13px/1 var(--mono);
  color: var(--text);
}
.star-pill .ic { color: var(--accent-text); }
.gain { font: 700 12px/1 var(--mono); color: var(--muted); }
.gain.up { color: var(--ok); }

.rd { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.topic-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.topic-chip { display: inline-flex; align-items: center; gap: 4px; font: 500 12px var(--mono); color: var(--dim); background: none; border: 0; padding: 0; cursor: pointer; }
.topic-chip:hover { color: var(--accent-text); }

/* Card Workbench Dual-Tab (Terminal | AI Prompt) */
.wb { background: var(--code-bg); border-radius: 10px; border: 1px solid var(--line); overflow: hidden; }
.wb-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.wb-tabs { display: flex; gap: 4px; }
.wb-tab { background: transparent; border: 0; color: #94a3b8; font: 600 11.5px/1 var(--sans); padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.wb-tab[aria-selected="true"] { background: rgba(255, 214, 0, 0.16); color: #ffd600; }
.wb-body { display: flex; align-items: center; gap: 8px; padding: 7px 10px; min-width: 0; }
.wb-body code { font: 12px/1.4 var(--mono); color: var(--code-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.wb-copy { background: rgba(255, 255, 255, 0.08); color: #f8fafc; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 6px; padding: 4px 9px; font: 600 11.5px/1 var(--sans); cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: 5px; }
.wb-copy:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.ra { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }

/* Inline sponsored row + flashing highlight showcase */
.row-ad { border: 1px dashed var(--accent-text); background: linear-gradient(90deg, var(--accent-soft), var(--surface)); border-radius: 14px; padding: 15px 18px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.slot-featured,
.row-ad-featured {
  border: 2px solid var(--accent);
  background: linear-gradient(120deg, var(--accent-soft), var(--surface) 65%);
  animation: gfSponsorPulse 2s ease-in-out infinite;
}
.tag-ad-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-color: var(--accent);
}
.ad-pulse {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-text);
  box-shadow: 0 0 0 0 rgba(24, 242, 120, 0.7);
  animation: gfDotBlink 1.3s ease-in-out infinite;
  flex: none;
}
@keyframes gfSponsorPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(24, 242, 120, 0.25), var(--shadow-card); border-color: var(--accent); }
  50% { box-shadow: 0 0 0 5px rgba(24, 242, 120, 0.14), 0 0 18px rgba(24, 242, 120, 0.22); border-color: var(--accent-text); }
}
@keyframes gfDotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}
@media (prefers-reduced-motion: reduce) {
  .slot-featured, .row-ad-featured, .ad-pulse { animation: none; }
}

/* Sidebar */
.sidebar { display: grid; gap: 16px; position: relative; }
@media (min-width: 1060px) { .sidebar { position: sticky; top: 76px; } }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-card); }
.side-card-reach { border-color: var(--accent); }
.side-card-promo { background: linear-gradient(180deg, var(--accent-soft), var(--surface)); border-color: var(--accent); }
.side-reach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.side-reach-cell { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.side-reach-num { font: 800 19px var(--sans); color: var(--text); }
.side-reach-num-accent { color: var(--accent-text); }
.side-reach-num-ok { color: var(--ok); }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.side-head h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.side-head a { font: 600 12.5px var(--sans); color: var(--accent-text); text-decoration: none; }
.side-head a:hover { text-decoration: underline; }
.topic-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.topic-list a, .topic-list button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--text);
  font: 600 13px var(--sans);
  text-decoration: none;
  cursor: pointer;
  text-transform: capitalize;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.topic-list a:hover, .topic-list button:hover { border-color: var(--line-2); background: var(--surface); }
.topic-list b { font: 700 12px var(--mono); color: var(--accent-text); }
.lang-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.lang-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 600 12.5px var(--sans); text-decoration: none; cursor: pointer; }
.lang-pill:hover { border-color: var(--line-2); background: var(--surface); }
.lang-pill i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--lang-color, var(--accent)); }

/* Stat cards, charts, tables */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-card); }
.panel h2, .panel h3 { margin: 0 0 12px; font-size: 16.5px; letter-spacing: -0.01em; font-weight: 700; }
.cols { display: grid; gap: 14px; }
@media (min-width: 760px) { .cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cols-stat { grid-template-columns: 1fr 1fr; }
@media (min-width: 760px) { .cols-stat { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-card); }
.stat-accent { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface)); }
.stat .n { font: 800 clamp(1.65rem, 4.2vw, 2.35rem)/1.05 var(--sans); letter-spacing: -0.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-accent .n { color: var(--accent-text); }
.stat .l { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 5px; }
.stat .s { color: var(--dim); font: 500 12px var(--mono); margin-top: 4px; }
.bars { display: grid; gap: 11px; }
.bar-h { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 4px; }
.bar-h span:last-child { color: var(--muted); font-family: var(--mono); font-size: 12.5px; }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; min-width: 4px; }
.bar-ok i { background: var(--ok); }
.bar-cyan i { background: var(--cyan); }
.week { display: flex; align-items: flex-end; gap: 8px; height: 124px; }
.week div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; font: 600 11px var(--mono); color: var(--muted); }
.week i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 4px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font: 600 12px var(--sans); color: var(--dim); padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.num { text-align: right !important; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.note { color: var(--dim); font-size: 13px; margin: 12px 0 0; }

/* Repo detail page & Prose */
.page-head { padding: 34px 0 18px; }
@media (min-width: 720px) { .page-head { padding: 48px 0 22px; } }
.page-head .h1 { margin: 10px 0 10px; text-align: left; max-width: 24ch; font-size: clamp(1.85rem, 4.5vw, 2.85rem); }
.page-head .lede { color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.12rem); max-width: 64ch; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font: 600 12.5px var(--mono); color: var(--dim); margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); }
.prose { max-width: 72ch; }
.prose h2 { font-size: 20px; letter-spacing: -0.01em; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { list-style: disc; padding-left: 20px; margin: 8px 0; }
.prose ol { list-style: decimal; padding-left: 20px; margin: 8px 0; }
.prose a, .link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.prose strong { color: var(--text); }
.pre-code { background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font: 13px/1.55 var(--mono); color: var(--code-text); white-space: pre-wrap; word-break: break-word; margin: 0; }

/* Promote / Forms / FAQ */
.promo { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 22px; display: grid; gap: 22px; box-shadow: var(--shadow-card); }
@media (min-width: 860px) { .promo { padding: 30px; grid-template-columns: 1fr 1.15fr; align-items: start; } }
.give { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--muted); }
.give li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); margin-right: 10px; }
.steps { display: grid; gap: 12px; counter-reset: s; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-card); }
.steps li::before { content: "0" counter(s); font: 700 13px var(--mono); color: var(--accent-text); }
.steps b { display: block; margin: 6px 0 4px; font-size: 15.5px; }
.steps span { color: var(--muted); font-size: 13.5px; }
.form { display: grid; gap: 14px; width: 100%; max-width: 640px; }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.form-msg { border-radius: 12px; padding: 14px 16px; font-size: 14.5px; }
.form-ok { background: var(--ok-soft); border: 1px solid var(--ok); color: var(--ok); }
.form-err { background: rgba(220, 38, 38, 0.1); border: 1px solid var(--err); color: var(--err); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent-text); font: 700 18px var(--mono); }
.faq details[open] summary::after { content: "\2212"; }
.faq p { color: var(--muted); margin: 8px 0 0; }
.pkg { display: flex; flex-direction: column; gap: 8px; }
.pkg .price { font: 800 20px var(--sans); letter-spacing: -0.02em; color: var(--accent-text); }
.num-sec { display: grid; gap: 8px; padding: 24px 0; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .num-sec { grid-template-columns: 90px 1fr; } }
.num-n { font: 700 14px var(--mono); color: var(--accent-text); }
.num-sec .prose h2 { margin-top: 0; }

/* Modals (⌘K Search + AI Prompt Viewer) */
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(11, 14, 23, 0.65); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 52px 16px 24px; }
.modal { width: 100%; max-width: 680px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28); overflow: hidden; display: flex; flex-direction: column; max-height: 82vh; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px 18px; overflow-y: auto; display: grid; gap: 12px; }
.modal-hit { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: var(--surface-2); }
.modal-hit:hover { border-color: var(--accent-text); background: var(--surface); }

/* Footer */
.ftr { border-top: 1px solid var(--line); margin-top: 52px; padding: 34px 0 42px; color: var(--muted); font-size: 13.5px; background: var(--ftr-bg); }
.ftr-grid { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
@media (min-width: 760px) { .ftr-grid { grid-template-columns: 2fr 1fr 1fr; } }
.ftr a { text-decoration: none; color: var(--muted); } .ftr a:hover { color: var(--accent-text); }
.ftr ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; }
.ftr h2 { margin: 0; font: 700 12px var(--sans); color: var(--text); }
.ftr p { margin: 8px 0 0; max-width: 44ch; }
.ftr .follow { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.gf .ftr .btn { color: var(--accent-ink); }
.ftr-bot { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: 12.5px; color: var(--dim); }

.section { padding: 30px 0; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 13px; }
.empty { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 34px 18px; text-align: center; color: var(--muted); }
.empty h3 { margin: 0 0 6px; color: var(--text); font-size: 18px; }
.more { display: flex; justify-content: center; margin-top: 18px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skeleton { height: 142px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: sh 1.4s infinite linear; }
@keyframes sh { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
