/* ============================================================
   GitDeck — design system (single source of truth)
   ============================================================ */
:root {
  --bg: #0a0b0e;
  --surface: #111318;
  --surface-2: #161a21;
  --surface-3: #1c212b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #edeff3;
  --muted: #98a1b3;
  --muted-2: #6b7280;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-ink: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --container: 1080px;
}

* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1000px 420px at 50% -140px, rgba(59, 130, 246, 0.09), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: -0.008em;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; }
::selection { background: rgba(59, 130, 246, 0.32); color: #fff; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
  border-radius: 8px;
}

/* Thin, theme-matched scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.28); background-clip: content-box; }

/* ============================================================
   Layout shell
   ============================================================ */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#site-footer { display: contents; }

.wrap {
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding: 0 20px;
}

main.main-col {
  flex: 1;
  width: 100%;
}

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 11, 14, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.brand img.logo-mark {
  display: block;
  height: 32px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}
.nav-links a {
  position: relative;
  padding: 7px 12px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.is-active { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ============================================================
   Buttons (single definition)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  will-change: transform;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
              transform 0.14s ease, box-shadow 0.2s ease;
}
.btn:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, 0.2); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }
.btn:active { transform: translateY(0) scale(0.97); box-shadow: none; }
.btn:disabled, .btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; box-shadow: 0 10px 26px rgba(37, 99, 235, 0.38); }
.btn.loading { pointer-events: none; opacity: 0.92; }
.btn.loading::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: gd-spin 0.7s linear infinite;
}
@keyframes gd-spin { to { transform: rotate(360deg); } }
.btn.ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--muted);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.btn.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.btn.danger:hover { background: rgba(239, 68, 68, 0.2); color: #fecaca; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 0.8125rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn svg, .btn i { width: 16px; height: 16px; flex-shrink: 0; }

.text-link {
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.text-link:hover { text-decoration: underline; }
.text-link .arrow { transition: transform 0.18s ease; }
.text-link:hover .arrow { transform: translateX(3px); }

/* ============================================================
   Forms
   ============================================================ */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { height: auto; padding: 10px 12px; min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { color: var(--muted); font-size: 0.85rem; }

/* ============================================================
   Landing — hero
   ============================================================ */
.hero {
  padding: 72px 0 44px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.05rem, 5.4vw, 3.3rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #fff;
}

.hero-lead {
  margin: 0 auto 28px;
  max-width: 54ch;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.6vw, 1.075rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.hero-actions .btn { height: 44px; padding: 0 20px; font-size: 0.9rem; border-radius: 11px; }

.hero-note {
  margin: 16px 0 0;
  font-size: 0.8rem;
  color: var(--muted-2);
}

/* ============================================================
   Landing — sections
   ============================================================ */
.section { margin: 0 auto; padding: 30px 0 22px; }

.section-head { margin: 0 0 22px; text-align: center; }
.section-head h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #fff;
}
.section-head p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.fcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.fcard:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}
.fcard h3 { margin: 0; font-size: 1.02rem; font-weight: 620; color: #fff; }
.fcard p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  flex: 1;
}

.fico {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  margin-bottom: 6px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 8px 16px rgba(0, 0, 0, 0.35);
}
.fico svg { width: 21px; height: 21px; }
.fico-blue { background: linear-gradient(160deg, #60a5fa 0%, #2563eb 60%, #1d4ed8 100%); }
.fico-violet { background: linear-gradient(160deg, #a78bfa 0%, #7c3aed 60%, #6d28d9 100%); }
.fico-teal { background: linear-gradient(160deg, #2dd4bf 0%, #0d9488 60%, #0f766e 100%); }
.fico-amber { background: linear-gradient(160deg, #fbbf24 0%, #d97706 60%, #b45309 100%); }

/* Steps */
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  counter-reset: gd-step;
}
.step-list li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px 16px;
}
.step-n {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  background: linear-gradient(160deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 6px 14px rgba(29, 78, 216, 0.35);
  margin-bottom: 12px;
}
.step-list h3 { margin: 0 0 4px; font-size: 0.96rem; font-weight: 620; color: #fff; }
.step-list p { margin: 0; color: var(--muted); font-size: 0.85rem; line-height: 1.55; }

/* CTA */
.cta { padding: 30px 0 14px; }
.cta-box {
  text-align: center;
  padding: 40px 24px 34px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    radial-gradient(640px 220px at 50% 0%, rgba(59, 130, 246, 0.13), transparent 62%),
    var(--surface);
}
.cta-box h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.6vw, 1.65rem);
  font-weight: 680;
  letter-spacing: -0.02em;
  color: #fff;
}
.cta-box > p { margin: 0 0 22px; color: var(--muted); }
.cta-checks {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 22px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
.cta-checks li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.87rem;
  color: var(--muted);
}
.cta-checks svg { width: 15px; height: 15px; color: var(--success); flex-shrink: 0; }

/* ============================================================
   Footer (mirrored in js ensureChromeStyle for pages without app.css)
   ============================================================ */
.gd-footer {
  margin-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.015));
}
.page .gd-footer { margin-top: auto; }
.gd-footer-inner {
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding: 38px 20px 26px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 30px;
}
.gd-footer-logo { display: inline-block; }
.gd-footer-logo img { height: 30px; width: auto; display: block; }
.gd-footer-tag {
  margin: 12px 0 16px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 36ch;
}
.gd-footer-social { display: flex; gap: 10px; }
.gd-footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.gd-footer-social a:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.18); }
.gd-footer-social img { width: 17px; height: 17px; opacity: 0.85; }
.gd-footer-col h4 {
  margin: 2px 0 13px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.gd-footer-col a {
  display: block;
  width: fit-content;
  padding: 4px 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.gd-footer-col a:hover { color: var(--text); }
.gd-footer-bar { border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 15px 20px 18px; }
.gd-footer-bar-in {
  width: min(var(--container), 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 8px 18px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted-2);
}

/* ============================================================
   Generic utilities
   ============================================================ */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.skel {
  background: linear-gradient(90deg, #161922 25%, #1c2030 50%, #161922 75%);
  background-size: 200% 100%;
  animation: gd-skel 1.2s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes gd-skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skel-card { height: 74px; margin-bottom: 10px; border-radius: 12px; }

.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.empty-state strong { display: block; color: var(--text); margin-bottom: 6px; font-size: 1rem; }

.muted { color: var(--muted); }

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20;
}
.modal-bg.open { display: flex; }
.modal-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow: auto;
}
.modal-card h3 { margin: 0 0 10px; font-size: 1.05rem; font-weight: 620; color: #fff; }

.drop-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(15, 23, 42, 0.72);
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--accent);
  color: #fff;
  font-weight: 650;
  font-size: 1.05rem;
}
.drop-overlay.on { display: flex; }

/* Diff / code-ish boxes */
.diff-box, .diff-col {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
  max-height: 280px;
  overflow: auto;
  background: #0d0d12;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.diff-add { color: #86efac; }
.diff-del { color: #fca5a5; }

/* Issues */
.issue-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.issue-item a { color: var(--text); }
.issue-item a:hover { color: var(--accent-ink); }
.issue-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.issue-label {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 500;
}
.issue-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.issue-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.group-head {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 14px 0 8px;
  padding-left: 2px;
}

.clone-box { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.clone-box input {
  flex: 1;
  min-width: 140px;
  height: 34px;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  color: var(--text);
  padding: 0 10px;
  font-size: 0.75rem;
  font-family: var(--mono);
}

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--success); }
.dot.fail { background: var(--danger); }
.dot.wait { background: #eab308; }
.dot.off { background: #3f3f46; }

/* ============================================================
   Profile page
   ============================================================ */
.gh-profile {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 30px;
  padding: 26px 0 56px;
  align-items: start;
}

.gh-sidebar { position: sticky; top: 76px; display: grid; gap: 0; min-width: 0; }
.gh-avatar {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
  background: var(--surface-2);
  display: block;
}
.gh-identity { margin-top: 14px; min-width: 0; }
.gh-display {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f4f4f5;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.gh-login { margin: 2px 0 0; font-size: 1.02rem; color: #8b949e; }
.gh-bio { margin: 12px 0 0; font-size: 0.92rem; line-height: 1.55; color: #c9d1d9; }
.gh-follow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.86rem;
  color: #8b949e;
}
.gh-follow a { color: #8b949e; }
.gh-follow a:hover { color: var(--accent-ink); }
.gh-follow b { color: #e6edf3; font-weight: 600; }
.gh-follow .dot-sep { color: #484f58; }
.gh-meta { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.gh-meta li { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: #c9d1d9; min-width: 0; }
.gh-meta li svg { flex: 0 0 auto; color: #8b949e; }
.gh-meta li span, .gh-meta li a { overflow-wrap: anywhere; }
.gh-meta a { color: var(--accent-ink); }
.gh-meta a:hover { text-decoration: underline; }

.gh-main { min-width: 0; display: grid; gap: 16px; }

.stat-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-pills span {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}
.stat-pills strong { color: var(--text); font-weight: 600; }

.share-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.gh-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px 18px;
}
.gh-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.gh-panel-head h2 { margin: 0; font-size: 1rem; font-weight: 620; color: #fff; }
.gh-panel-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gh-muted { font-size: 0.8rem; color: #8b949e; }
.gh-select {
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e4e4e7;
  border-radius: 8px;
  padding: 0 10px;
  height: 34px;
  font-size: 0.83rem;
}
.gh-empty { padding: 28px 12px; text-align: center; color: #8b949e; font-size: 0.92rem; }

/* Heatmap */
.heat-wrap { overflow-x: auto; padding-bottom: 6px; }
.heatmap {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-columns: minmax(7px, 1fr);
  gap: 3px;
  width: 100%;
  min-width: 620px;
}
.heat { aspect-ratio: 1; border-radius: 2.5px; background: #1b212b; }
.heat.blank { background: transparent; }
.heat.l1 { background: #0e4429; }
.heat.l2 { background: #006d32; }
.heat.l3 { background: #26a641; }
.heat.l4 { background: #39d353; }
.heatmap-note { font-size: 0.75rem; color: var(--muted-2); margin: 10px 0 0; }

/* Tabs */
.profile-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.profile-tabs button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 550;
  font-size: 0.9rem;
  white-space: nowrap;
}
.profile-tabs button:hover { color: var(--text); }
.profile-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }

/* Language bars */
.lang-bars { display: flex; flex-direction: column; gap: 9px; }
.lang-bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 42px;
  gap: 10px;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.lang-bar-track { height: 6px; background: #21262d; border-radius: 99px; overflow: hidden; }
.lang-bar-fill { height: 100%; border-radius: 99px; }

/* Repo list (profile/dashboard shared visual) */
.repo-list { display: grid; }
.repo-item {
  padding: 15px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.repo-item:first-child { border-top: 0; padding-top: 4px; }
.repo-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 620;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.repo-title a { color: var(--accent-ink); overflow-wrap: anywhere; }
.repo-title a:hover { text-decoration: underline; }
.repo-badge {
  font-size: 0.7rem;
  font-weight: 500;
  color: #8b949e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 1px 8px;
}
.repo-desc { margin: 5px 0 0; font-size: 0.86rem; color: #8b949e; line-height: 1.5; }
.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.78rem;
  color: #8b949e;
  align-items: center;
}
.repo-lang { display: inline-flex; align-items: center; gap: 6px; }
.repo-lang i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.repo-stat { display: inline-flex; align-items: center; gap: 4px; }
.repo-stat svg { opacity: 0.85; }

.follow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.follow-row img { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.follow-row a { color: var(--text); font-size: 0.875rem; }
.follow-row a:hover { color: var(--accent-ink); }

/* ============================================================
   Legal / error pages
   ============================================================ */
.legal { max-width: 720px; margin: 0 auto; padding: 30px 20px 40px; width: 100%; }
.legal h1 { margin: 0 0 8px; font-size: 1.6rem; letter-spacing: -0.02em; }
.legal h2 { margin: 22px 0 8px; font-size: 1.1rem; }
.legal p, .legal li { color: var(--muted); line-height: 1.65; }
.legal a { color: var(--accent-ink); }

.error-page { text-align: center; padding: 76px 16px 56px; }
.error-code {
  font-size: 3rem;
  font-weight: 700;
  margin: 0;
  color: var(--accent);
  letter-spacing: -0.04em;
}
.error-page h1 { margin: 8px 0; }
.error-page .btn { margin-top: 20px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .step-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .gh-profile { grid-template-columns: 1fr; gap: 20px; padding: 18px 0 48px; }
  .gh-sidebar {
    position: static;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 4px 16px;
    align-items: center;
  }
  .gh-avatar { max-width: 84px; grid-row: span 2; }
  .gh-identity { margin-top: 0; align-self: center; }
  .gh-display { font-size: 1.25rem; }
  .gh-login { font-size: 0.95rem; }
  .gh-bio, .gh-follow, .gh-meta { grid-column: 1 / -1; }
  .diff-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .hero { padding: 46px 0 36px; }
  .gd-footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .gd-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .step-list { grid-template-columns: 1fr; }
  .cta-checks { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .topbar-inner { flex-wrap: wrap; gap: 6px 10px; padding: 10px 16px; }
  .nav-links { order: 3; flex-basis: 100%; justify-content: space-evenly; gap: 0; }
  .nav-links a { padding: 7px 10px; font-size: 0.85rem; }
  .topbar-actions .btn { height: 36px; padding: 0 12px; font-size: 0.82rem; }
  .gd-footer-inner { grid-template-columns: 1fr; }
  .gd-footer-bar-in { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Motion & micro-interactions
   ============================================================ */

/* Gradient headline accent */
.grad {
  background: linear-gradient(92deg, #60a5fa 10%, #22d3ee 48%, #a78bfa 92%);
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gd-grad-shift 9s ease-in-out infinite;
}
@keyframes gd-grad-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Richer ambient background on the landing page */
body.home {
  background:
    radial-gradient(1100px 440px at 84% -120px, rgba(139, 92, 246, 0.10), transparent 62%),
    radial-gradient(1000px 420px at 10% -140px, rgba(59, 130, 246, 0.13), transparent 62%),
    radial-gradient(760px 380px at 50% 112%, rgba(34, 211, 238, 0.05), transparent 65%),
    var(--bg);
}

/* Soft glow behind the hero */
.hero { position: relative; }
.hero > * { position: relative; }
.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -46px;
  width: min(680px, 92vw);
  height: 340px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(59, 130, 246, 0.17), transparent 70%);
  filter: blur(28px);
  z-index: 0;
  pointer-events: none;
  animation: gd-glow 9s ease-in-out infinite;
}
@keyframes gd-glow {
  0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.07); }
}
.hero > * { z-index: 1; }

/* Scroll reveal (JS adds .in; graceful without JS) */
.gd-js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.19, 0.66, 0.3, 1);
  transition-delay: var(--d, 0ms);
}
.gd-js .reveal.in { opacity: 1; transform: none; }

/* Spotlight hover on feature cards */
.fcard { position: relative; overflow: hidden; }
.fcard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(190px circle at var(--mx, 50%) var(--my, 50%), rgba(96, 165, 250, 0.13), transparent 68%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.fcard:hover::before { opacity: 1; }
.fico { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.fcard:hover .fico {
  transform: translateY(-2px) rotate(-4deg) scale(1.05);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 12px 24px rgba(0, 0, 0, 0.45);
}

/* Step cards */
.step-list li {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.step-n { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.step-list li:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}
.step-list li:hover .step-n {
  transform: scale(1.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 8px 18px rgba(29, 78, 216, 0.5);
}

/* Checklist draw-in on reveal */
.cta-checks li:nth-child(1) { --i: 0; }
.cta-checks li:nth-child(2) { --i: 1; }
.cta-checks li:nth-child(3) { --i: 2; }
.cta-checks li:nth-child(4) { --i: 3; }
.cta-checks li:nth-child(5) { --i: 4; }
.cta-checks li:nth-child(6) { --i: 5; }
.gd-js .cta-checks li svg path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}
.gd-js .cta-box.in .cta-checks li svg path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.45s ease calc(var(--i, 0) * 70ms + 250ms);
}

/* Slow sheen sweep on the main CTA */
.btn.primary.shine { position: relative; overflow: hidden; }
.btn.primary.shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, 0.26) 50%, transparent 68%);
  transform: translateX(-130%);
  animation: gd-sheen 4.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes gd-sheen {
  0%, 55% { transform: translateX(-130%); }
  90%, 100% { transform: translateX(130%); }
}

/* Topbar shadow once the page is scrolled */
.topbar { transition: box-shadow 0.25s ease, background 0.25s ease; }
.topbar.scrolled { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); background: rgba(10, 11, 14, 0.88); }

/* Profile touches */
.gh-avatar { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.gh-avatar:hover { transform: scale(1.02); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45); }
.heat { transition: transform 0.12s ease, filter 0.12s ease; }
.heat:hover { transform: scale(1.35); filter: brightness(1.35); }
.repo-item {
  border-radius: 10px;
  margin-inline: -8px;
  padding-inline: 8px;
  transition: background 0.16s ease;
}
.repo-item:hover { background: linear-gradient(90deg, rgba(59, 130, 246, 0.06), transparent 70%); }
.stat-pills span { transition: border-color 0.16s ease, background 0.16s ease; }
.stat-pills span:hover { border-color: rgba(59, 130, 246, 0.32); background: var(--surface-2); }

/* Footer micro-interactions */
.gd-footer-col a { transition: color 0.15s ease, transform 0.15s ease; }
.gd-footer-col a:hover { color: var(--text); transform: translateX(3px); }
.gd-footer-social a { transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease; }
.gd-footer-social a:hover { transform: translateY(-2px); }
.gd-footer-logo img { transition: filter 0.2s ease; }
.gd-footer-logo:hover img { filter: brightness(1.12); }

/* Kicker dot already glows; add a light shimmer to the pill */
.hero-kicker { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.hero-kicker:hover { border-color: rgba(59, 130, 246, 0.35); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08); }
