/* GitVerse - Aurora-inspired design system
   Dark, minimal, polished. No decorative noise. */

/* ─── Fonts ─────────────────────────────────────────────── */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-700.ttf") format("truetype");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  /* Core palette - always dark */
  --bg:        #0a0a0b;
  --surface:   #111113;
  --surface-2: #18181b;
  --ink:       #f2f2f0;
  --ink-2:     #a1a1aa;
  --ink-3:     #71717a;
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(255,255,255,0.05);

  /* Accents */
  --gold:      #c9971f;
  --gold-2:    #e2b53a;
  --silver:    #8a96a0;
  --bronze:    #b5754a;
  --metal-ink: #0a0a0b;

  /* Utility */
  --code-bg:   #111113;
  --danger:    #ef4444;
  --focus:     rgba(255,255,255,0.6);
  --radius:    10px;
  --radius-sm: 7px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  color-scheme: dark;
}

/* ─── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  /* Subtle star-field noise */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255,255,255,0.03) 0%, transparent 100%);
}

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); margin: 0 0 0.5em; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 0.3em; }
p  { margin: 0 0 1em; }

a {
  color: inherit;
  text-decoration: none;
}

a:hover { opacity: 0.75; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.lede {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 56ch;
}

.meta {
  font-size: 0.82rem;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

.hint {
  font-size: 0.82rem;
  color: var(--ink-3);
  margin-bottom: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

code {
  font: 0.85em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface-2);
  color: var(--ink-2);
  padding: 0.15em 0.4em;
  border-radius: 5px;
  border: 1px solid var(--line);
}

pre {
  background: var(--surface);
  color: #c9d1d9;
  padding: 20px 22px;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.6;
  border: 1px solid var(--line);
  font-size: 0.88rem;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 0 64px;
}

/* Page heading for prose pages (About, Privacy) - centered & uppercase */
main > h1:first-child:has(+ .prose),
main > h1:first-of-type {
  text-align: center;
}

.prose p {
  color: var(--ink-2);
  line-height: 1.85;
  margin-bottom: 1.3em;
  font-size: 1rem;
}

.prose-section {
  margin-bottom: 44px;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line-2);
}

.prose-section:last-child {
  border-bottom: none;
}

.prose-section h2,
.prose h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 0;
  margin-bottom: 14px;
}

.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 1.3em; }
.prose li { color: var(--ink-2); line-height: 1.75; margin-bottom: 0.45em; font-size: 0.95rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); }
.prose a:hover { color: var(--gold-2); text-decoration-color: var(--gold-2); }

.prose-bullets {
  list-style: none !important;
  padding: 0 !important;
  margin: 16px 0 0 !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.prose-bullets li {
  position: relative;
  padding-left: 24px !important;
  color: var(--ink-2);
  line-height: 1.65;
  font-size: 0.96rem;
  margin: 0;
}

.prose-bullets li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 8px rgba(226, 181, 58, 0.4);
}

.prose-bullets li strong {
  color: var(--ink);
  font-weight: 600;
}
.prose pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 1.2em 0 1.6em;
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
}

/* ─── Layout ─────────────────────────────────────────────── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.section:first-child { border-top: none; }

/* ─── Navigation ─────────────────────────────────────────── */
.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
}

.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  background: rgba(10, 10, 11, 0.60);
  backdrop-filter: blur(11px) saturate(180%);
  -webkit-backdrop-filter: blur(11px) saturate(180%);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 10px 10px 10px 20px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-wordmark {
  height: 22px;
  width: auto;
  display: block;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top nav a {
  color: var(--ink-3);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.top nav a:hover {
  color: var(--ink);
  background: rgba(255,255,255,0.06);
  opacity: 1;
}

.top nav a[aria-current="page"] {
  color: var(--ink);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--bg) !important;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.nav-cta:hover { opacity: 0.85 !important; background: var(--ink) !important; }

.theme-btn { display: none !important; }

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

body { padding-top: 86px; }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.btn:hover {
  border-color: rgba(255,255,255,0.18);
  background: var(--surface);
  opacity: 1;
}

.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.btn.primary:hover {
  background: rgba(242,242,240,0.9);
  border-color: rgba(242,242,240,0.9);
}

.btn.small {
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn.big {
  padding: 13px 26px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
}

.btn.ghost:hover {
  background: rgba(255,255,255,0.04);
}

.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.9;
  cursor: wait;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.65s linear infinite;
  vertical-align: middle;
  flex-shrink: 0;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ─── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: clamp(28px, 4vw, 52px) 0 clamp(48px, 8vw, 96px);
  text-align: left;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 28px;
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-2);
  flex-shrink: 0;
}

.hero h1 {
  max-width: 14ch;
  margin-bottom: 24px;
}

.hero .lede {
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

#check-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
}

#check-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s;
  outline: none;
}

#check-form input::placeholder { color: var(--ink-3); }
#check-form input:focus { border-color: rgba(255,255,255,0.25); }

.signin {
  font-size: 0.82rem;
  color: var(--ink-3);
  margin: 0;
}
.signin a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); }
.signin a:hover { color: var(--ink); opacity: 1; }

/* ─── Badge shelf ─────────────────────────────────────────── */
.vitrine.home-shelf {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.home-shelf {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1080px;
  margin: 56px auto 20px;
  padding: 0;
}

.home-shelf li {
  display: flex;
  flex: 0 1 calc(12.5% - 18px);
  min-width: 106px;
  max-width: 124px;
}

.home-shelf .medal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  padding: 22px 10px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.25s ease, 
              border-color 0.25s ease, 
              box-shadow 0.25s ease;
  text-align: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.home-shelf .medal:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45), 0 0 1px rgba(255, 255, 255, 0.2);
  opacity: 1;
}

.home-shelf .medal-img {
  width: 66px;
  height: 66px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.45));
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), filter 0.28s ease;
}

.home-shelf .medal:hover .medal-img {
  transform: scale(1.08);
  filter: drop-shadow(0 8px 20px rgba(226, 181, 58, 0.3));
}

.home-shelf .medal-name {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.35;
  letter-spacing: 0.01em;
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.home-shelf .medal:hover .medal-name {
  color: #fff;
}

.home-shelf + .meta {
  text-align: center;
  margin: 30px auto 0;
  font-size: 0.88rem;
  color: var(--ink-3);
}

.home-shelf + .meta a {
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.15s ease;
}

.home-shelf + .meta a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
}

/* ─── Feature Grid ────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 34px 0 0;
}

.feature-section { margin-top: clamp(64px, 9vw, 112px); }

.feature-intro { max-width: 650px; }

.feature-eyebrow {
  margin: 0 0 12px;
  color: #96a3ae;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .13em;
}

.feature-intro h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
  letter-spacing: -.055em;
}

.feature-intro > p:last-child {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 1rem;
}

.feature-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 32px 28px;
  background: rgba(19, 20, 23, .76);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), border-color .28s ease, background-color .28s ease, box-shadow .28s ease;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(circle at 18% 0%, rgba(152, 169, 185, .14), transparent 54%);
  transition: opacity .28s ease;
}

.feature-card:hover {
  transform: translateY(-7px);
  border-color: rgba(202, 214, 225, .30);
  background: rgba(28, 30, 34, .88);
  box-shadow: 0 20px 38px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .07);
}

.feature-card:hover::before { opacity: 1; }
.feature-card:hover .feature-num { color: #d8e2eb; }
.feature-card:hover h3 { color: #fff; }

.feature-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #83909b;
  margin-bottom: 20px;
  transition: color .28s ease;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.65;
  margin: 0;
}

/* ─── Terminal Section ────────────────────────────────────── */
.terminal-section {
  margin-top: clamp(80px, 12vw, 130px);
  padding-top: clamp(48px, 6vw, 72px);
  border-top: 1px solid var(--line-2);
}

.terminal-intro {
  max-width: 650px;
  margin-bottom: 28px;
}

.terminal-eyebrow {
  margin: 0 0 12px;
  color: #96a3ae;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .13em;
}

.terminal-intro h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
  letter-spacing: -.055em;
}

.terminal-intro > p:last-child {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 1rem;
}

/* ─── Install block ───────────────────────────────────────── */
.install-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.install-block pre {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
  flex: 1;
}

.install-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.install {
  position: relative;
  background: rgba(18, 18, 21, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 24px 0 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s ease;
}

.install:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.install pre {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink);
  flex: 1;
  overflow-x: auto;
}

.install .btn {
  flex-shrink: 0;
  padding: 9px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: all 0.2s ease;
}

.install .btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

/* ─── FAQ ─────────────────────────────────────────────────── */
.faq {
  margin: 24px 0;
  display: grid;
  gap: 1px;
}

.faq dt {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  padding: 20px 0 8px;
  letter-spacing: -0.01em;
}

.faq dd {
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.7;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-2);
  margin: 0;
}

.faq dd:last-child { border-bottom: none; }

/* ─── Star banner ─────────────────────────────────────────── */
.star-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s;
  margin: 48px 0 16px;
}

.star-banner:hover {
  border-color: rgba(255,255,255,0.14);
  opacity: 1;
}

.star-banner strong {
  font-size: 1rem;
  font-weight: 600;
}

.star-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
}

.star-count {
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

/* ─── Notice / alert ──────────────────────────────────────── */
.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.notice.error { border-color: rgba(239,68,68,0.3); }
.notice p:last-child { margin: 0; }

/* ─── Achievement list page section headings ──────────────── */
/* Page-level h1 injected by layout (outside hero) is scoped here */
main > h1 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  margin-bottom: 20px;
}

/* The hero section overrides back to full size */
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
}

/* Spacing for "Profile highlights" and "Check your own progress" h2 on list page */
.medal-grid + h2,
ul + h2 {
  margin-top: 56px;
}

/* List page section wrappers */
.list-highlights,
.list-install {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--line-2);
}

.list-highlights h2,
.list-install h2 {
  margin-bottom: 16px;
}

.list-highlights ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-highlights li {
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.65;
}

.list-install pre {
  margin: 20px 0 16px;
}

/* ─── Breadcrumbs ─────────────────────────────────────────── */
.crumbs {
  margin-bottom: 20px;
}

.crumbs ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--ink-3);
  flex-wrap: wrap;
}

.crumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crumbs a {
  color: var(--ink-3);
  text-decoration: none;
}

.crumbs a:hover { color: var(--ink); opacity: 1; }
.crumbs span[aria-hidden] { color: var(--ink-3); }

/* ─── Achievement detail - badge hero area ────────────────── */
.badge-top {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 36px 40px !important;
  border-radius: var(--radius-lg) !important;
  margin: 0 0 40px !important;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
}

.badge-hero {
  width: 120px;
  height: 120px;
  object-fit: contain;
  flex-shrink: 0;
}

.tier-strip {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.tier-strip li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.tier-strip .medal-img {
  width: 56px;
  height: 56px;
}

/* ─── Facts table (achievement detail) ───────────────────── */
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
  margin: 0 0 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.facts dt {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}

.facts dd {
  font-size: 0.88rem;
  color: var(--ink-2);
  padding: 16px 24px;
  margin: 0;
  background: transparent;
  border-bottom: 1px solid var(--line-2);
  line-height: 1.6;
}

.facts dt:last-of-type,
.facts dd:last-of-type {
  border-bottom: none;
}

/* ─── Tiers table ─────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 40px;
  font-size: 0.9rem;
}

table thead tr {
  border-bottom: 1px solid var(--line);
}

table th {
  text-align: left;
  padding: 12px 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

table td {
  padding: 14px 20px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
}

table tbody tr:last-child td { border-bottom: none; }

table tbody tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* ─── Pager (prev/next between achievements) ──────────────── */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--line-2);
  margin-top: 48px;
}

.pager a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--ink-3);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.pager a:hover {
  color: var(--ink);
  border-color: rgba(255,255,255,0.15);
  background: var(--surface);
  opacity: 1;
}

.pager a[href="../"] {
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ─── Achievement list page section headings ──────────────── */
/* Page-level h1 injected by layout (outside hero) is scoped here */
main > h1 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  margin-bottom: 20px;
}

/* The hero section overrides back to full size */
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
}

/* Spacing for "Profile highlights" and "Check your own progress" h2 on list page */
.medal-grid + h2,
ul + h2 {
  margin-top: 56px;
}

/* List page section wrappers */
.list-highlights,
.list-install {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--line-2);
}

.list-highlights h2,
.list-install h2 {
  margin-bottom: 16px;
}

.list-highlights ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-highlights li {
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.65;
}

.list-install pre {
  margin: 20px 0 16px;
}

/* ─── Breadcrumbs ─────────────────────────────────────────── */

/* ─── Medal Grid (achievements page) ─────────────────────── */
.medal-grid {
  list-style: none;
  display: grid;
  gap: 2px;
  margin: 20px 0 40px;
}

.medal-grid li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 20px;
  margin: 0 -20px;
  border-top: 1px solid var(--line-2);
  border-radius: var(--radius);
  transition: background 0.18s ease;
  cursor: pointer;
}

.medal-grid li:first-child { border-top: none; }

.medal-grid li:hover {
  background: rgba(255, 255, 255, 0.035);
}

.medal-grid .medal-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.medal-grid li:hover .medal-img {
  transform: scale(1.06);
}

.medal-grid h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 4px;
}

.medal-grid h3 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

/* Stretched link: makes the entire row and column clickable */
.medal-grid h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}

.medal-grid li:hover h3 a {
  color: #fff;
}

.medal-grid p {
  font-size: 0.88rem;
  color: var(--ink-2);
  margin: 0 0 4px;
  line-height: 1.55;
}

.medal-grid p.meta {
  color: var(--ink-3);
  font-size: 0.82rem;
  margin-bottom: 0;
}

/* ─── Progress check card ─────────────────────────────────── */
.progress-check-card {
  margin: 28px 0;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.progress-check-form {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.progress-check-input {
  flex: 1;
  min-width: 220px;
  padding: 11px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}

.progress-check-input:focus { border-color: rgba(255,255,255,0.25); }
.progress-check-input::placeholder { color: var(--ink-3); }

.progress-check-btn {
  padding: 11px 22px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.progress-check-btn:hover { opacity: 0.88; }

.progress-local-hint {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--ink-3);
  flex-wrap: wrap;
}

/* ─── Check / Track page ───────────────────────────────────── */
.track-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(36px, 5vw, 68px) 0 clamp(48px, 8vw, 96px);
  max-width: 680px;
  margin: 0 auto;
}

.track-hero .hero-eyebrow {
  margin-bottom: 24px;
}

.track-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  text-align: center;
}

.track-hero .lede {
  text-align: center;
  max-width: 48ch;
  margin: 0 auto 36px;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--ink-2);
}

.track-hero .choice {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.track-hero .choice #check-form {
  width: 100%;
  max-width: 480px;
  margin-bottom: 20px;
}

.track-hero .signin {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.6;
}

.track-hero .signin-link,
.signin-link {
  color: var(--ink) !important;
  font-weight: 700;
  text-decoration: underline !important;
  text-decoration-color: rgba(255, 255, 255, 0.45) !important;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.track-hero .signin-link:hover,
.signin-link:hover {
  color: #fff !important;
  text-decoration-color: #fff !important;
}

.track-hero .signin-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-3);
  letter-spacing: 0.01em;
  line-height: 1.5;
}

/* ─── Explore & Prose heroes ────────────────────────────────────────── */
.explore-hero,
.prose-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(36px, 5vw, 68px) 0 clamp(36px, 5vw, 56px);
  max-width: 760px;
  margin: 0 auto;
}

.explore-hero .hero-eyebrow,
.prose-hero .hero-eyebrow {
  margin-bottom: 24px;
}

.explore-hero h1,
.prose-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  text-align: center;
}

.explore-hero .lede,
.prose-hero .lede {
  text-align: center;
  max-width: 56ch;
  margin: 0 auto;
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  color: var(--ink-2);
  line-height: 1.6;
}
  color: var(--ink-2);
}

.track-terminal {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.track-terminal-label {
  font-size: 0.8rem;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.terminal-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 8px 18px;
  background: rgba(18, 18, 21, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: 100%;
}

.terminal-pill code {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink-2);
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-pill .btn {
  padding: 6px 14px;
  font-size: 0.78rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.terminal-pill .btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.check-hero {
  text-align: center;
  align-items: center;
}

.check-hero h1 {
  max-width: 20ch;
}

.check-hero .lede {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.choice {
  max-width: 480px;
  margin: 32px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.choice .lede {
  margin-bottom: 24px;
  text-align: center;
  max-width: 42ch;
}
.choice .btn.big { margin-bottom: 10px; width: 100%; justify-content: center; }
.choice .meta { text-align: center; }
.choice #check-form { width: 100%; }
.or {
  position: relative;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.82rem;
  margin: 20px 0;
}

.or::before, .or::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--line);
}

.or::before { left: 0; }
.or::after { right: 0; }

/* ─── Result page - profile header ──────────────────────────── */
.result-hero {
  padding: 36px 0 32px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 40px;
}

.result-hero-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  flex-wrap: wrap;
}

.result-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex: 1;
  min-width: 280px;
}

.result-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex-shrink: 0;
  object-fit: cover;
}

.result-hero-info {
  flex: 1;
  min-width: 0;
}

.result-user {
  font-size: clamp(2rem, 5vw, 3.2rem) !important;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 8px !important;
  line-height: 1 !important;
}

.result-sum {
  font-size: 0.95rem;
  color: var(--ink-2);
  margin: 0 0 8px;
}

.result-next-box {
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  flex-shrink: 0;
  min-width: 240px;
}

.result-next-box-label {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.result-next-box-val {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.result-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  color: var(--ink-3);
  margin: 0;
  background: var(--surface);
}

.result-next strong {
  color: var(--gold-2);
  font-weight: 600;
}

.result-scope {
  font-size: 0.84rem;
  color: var(--ink-3);
  margin: 0 0 36px;
}

.result-scope a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line);
}

.result-scope a:hover { color: var(--ink); opacity: 1; }

/* ─── Result sections ─────────────────────────────────────── */
.result-section {
  margin-bottom: 48px;
}

.result-shelf-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}

/* Badge card progress bar */
.badge-progress {
  width: 100%;
  max-width: 110px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px auto 4px;
  flex-shrink: 0;
}

.badge-progress-placeholder {
  width: 100%;
  max-width: 110px;
  height: 3px;
  margin: 8px auto 4px;
  visibility: hidden;
  flex-shrink: 0;
}

.badge-progress-fill {
  height: 100%;
  background: #e3b341;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.result-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.result-section-sub {
  font-size: 0.84rem;
  color: var(--ink-3);
  margin: 0 0 20px;
}

/* ─── Badge shelf (result page) ───────────────────────────── */
.result-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.result-shelf--archive {
  opacity: 0.6;
  margin-top: 16px;
}

/* ─── Archive (collapsed) ────────────────────────────────── */
.result-archive {
  margin-bottom: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.result-archive > summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-archive > summary::-webkit-details-marker { display: none; }

.result-archive-hint {
  color: var(--ink-3);
  font-weight: 400;
  font-size: 0.8rem;
}

/* ─── Badge card (result) ─────────────────────────────────── */
.badge-card {
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.badge-card summary {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 12px 18px;
  text-align: center;
  cursor: pointer;
  flex: 1 1 auto;
  height: 100%;
  min-height: 200px;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.badge-card summary::-webkit-details-marker { display: none; }

.badge-card:hover summary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.badge-card.earned summary {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.badge-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  display: block;
}

.badge-img.placeholder {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}

.badge-name {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-3);
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  margin-bottom: auto;
}

.badge-line {
  font-size: 0.72rem;
  color: var(--ink-3);
  line-height: 1.3;
  min-height: 1.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-card progress {
  width: 100%;
  height: 2px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  overflow: hidden;
  border: none;
}

.badge-card progress::-webkit-progress-bar { background: rgba(255,255,255,0.08); }
.badge-card progress::-webkit-progress-value { background: var(--ink-2); }
.badge-card progress::-moz-progress-bar { background: var(--ink-2); }

.badge-detail {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line-2);
  font-size: 0.84rem;
  color: var(--ink-2);
  line-height: 1.65;
}

.badge-detail p { margin: 0 0 8px; }
.badge-detail p:last-child { margin: 0; }

.badge-detail-link {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line);
  font-size: 0.8rem;
}

.badge-detail-link:hover { color: var(--ink); opacity: 1; }

.milestones {
  font-size: 0.8rem;
  color: var(--ink-3);
  padding-left: 1.2em;
  margin: 8px 0 0;
}

.milestones li { margin-bottom: 2px; }
.milestones a { color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--line-2); }

/* ─── Highlights list ────────────────────────────────────── */
.highlights {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.highlights li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-3);
  background: var(--surface);
}

.highlights li.on {
  color: var(--ink-2);
  border-color: rgba(255,255,255,0.12);
}

.highlight-check { color: var(--gold-2); font-size: 0.75rem; }
.highlight-dot { opacity: 0.4; }

/* ─── Result actions ─────────────────────────────────────── */
.result-actions {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--line-2);
}

.result-meta {
  margin-top: 24px;
  line-height: 1.8;
  color: var(--ink-3);
  font-size: 0.82rem;
}

.result-install-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--ink-3);
}

.result-install-cmd {
  white-space: nowrap;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

/* ─── Vitrine (result page badge layout - legacy) ─────────── */
.vitrine {
  margin: 32px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 20px;
  background: transparent;
}

.shelf-head {
  padding: 20px 24px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-top: 1px solid var(--line-2);
}

.shelf-head:first-child { border-top: none; }

/* Result page badge styling is defined above under "Badge card (result)" */

/* Duplicate badge rules cleaned up */

.tier-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tier-gold    { background: rgba(201,151,31,0.15); color: var(--gold-2); }
.tier-silver  { background: rgba(138,150,160,0.15); color: var(--silver); }
.tier-bronze  { background: rgba(181,117,74,0.15); color: var(--bronze); }
.tier-default { background: rgba(255,255,255,0.08); color: var(--ink-3); }

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--ink-2);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Points/features list */
.points {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin: 32px 0;
}

.points li {
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.points h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.points p {
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.65;
  margin: 0;
}

.points a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); }

/* Archive (collapsed sections) */
.archive {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.archive > summary {
  cursor: pointer;
  padding: 14px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  list-style: none;
  user-select: none;
}

.archive > summary::-webkit-details-marker { display: none; }
.archive .shelf { padding: 14px; }

/* Highlights */
.highlights {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
}

.highlights li {
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-2);
  background: var(--surface);
}

.highlights .off {
  color: var(--ink-3);
  background: transparent;
  border-style: dashed;
}

/* Actions group */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

/* Scope (profile stats) */
.scope {
  font-size: 0.82rem;
  color: var(--ink-3);
}

/* Login consent */
#consent {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.84rem;
  color: var(--ink-2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 1000;
  max-width: 500px;
  flex-wrap: wrap;
}

#consent p { margin: 0; flex: 1; min-width: 200px; }
#consent .btn { padding: 7px 16px; font-size: 0.82rem; }

/* ─── Footer ──────────────────────────────────────────────── */
html, body { overflow-x: hidden; max-width: 100%; }

footer.aurora-footer,
.aurora-footer {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  box-sizing: border-box !important;
  margin: 120px 0 0 0 !important;
  padding: 0 !important;
  position: relative !important;
  left: 0 !important;
  right: 0 !important;
  /* Fade from the shared contour field into the footer rather than cutting it off. */
  background: linear-gradient(
    180deg,
    rgba(6, 6, 7, 0) 0%,
    rgba(6, 6, 7, 0.62) 38%,
    #060607 76%,
    #060607 100%
  ) !important;
  border-top-color: transparent !important;
  overflow: hidden !important;
}

.aurora-footer-top {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.aurora-footer-top a.footer-privacy-link {
  color: var(--ink-3);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.15s;
}

.aurora-footer-top a.footer-privacy-link:hover {
  color: var(--ink);
  opacity: 1;
}

.aurora-footer-top .footer-copyright {
  color: var(--ink-3);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.aurora-footer-watermark {
  width: 100%;
  box-sizing: border-box;
  user-select: none;
  pointer-events: none;
  overflow: hidden;
  height: clamp(4.5rem, 13vw, 17.5rem);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  line-height: 0.82;
  mask-image: linear-gradient(180deg, #000 0%, #000 40%, rgba(0,0,0,0.65) 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 40%, rgba(0,0,0,0.65) 72%, transparent 100%);
}

.aurora-footer-watermark span {
  display: block;
  width: 100%;
  font-family: "Space Grotesk", "Bricolage Grotesque", system-ui, sans-serif;
  font-size: clamp(6.2rem, 18.5vw, 24rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.82;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateY(15%);
  margin: 0;
  padding: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.14) 0%,
    rgba(255,255,255,0.08) 35%,
    rgba(255,255,255,0.03) 65%,
    transparent 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

@media (max-width: 640px) {
  .aurora-footer-top {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 24px 16px 12px;
  }
}

/* ─── Privacy Policy Page ─────────────────────────────────── */
body.privacy-page {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.privacy-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 100px !important;
}

.privacy-header {
  text-align: center;
  margin-bottom: 56px;
}

.privacy-header h1 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 14px;
}

.privacy-header .last-updated {
  font-size: 0.85rem;
  color: var(--ink-3);
  letter-spacing: 0.03em;
}

.privacy-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink-2);
}

.privacy-content p.intro-lede {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink-2);
  margin-bottom: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-2);
}

.privacy-section {
  margin-bottom: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-2);
}

.privacy-section:last-child {
  border-bottom: none;
}

.privacy-section h2 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 16px;
}

.privacy-section p {
  margin-bottom: 14px;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.8;
}

.privacy-list {
  list-style: none;
  margin: 16px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.privacy-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-2);
}

.privacy-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--ink-3);
}

.privacy-list strong {
  color: var(--ink);
  font-weight: 600;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .points { grid-template-columns: repeat(2, 1fr); }
  .home-shelf li { flex: 0 1 calc(25% - 14px); }
}

@media (max-width: 760px) {
  body { padding-top: 76px; }

  .top { padding: 10px 14px; }
  .top-in { padding: 8px 8px 8px 16px; }
  .top nav { display: none; }
  .menu-btn { display: flex; }

  h1 { font-size: 2.2rem; }

  main { padding: 0 16px; }

  .hero { padding: 24px 0 48px; }

  #check-form { flex-direction: column; }
  #check-form input { width: 100%; }

  .home-shelf li { flex: 0 1 calc(25% - 10px); min-width: 76px; }
  .home-shelf .medal { padding: 12px 6px; }
  .home-shelf .medal-img { width: 50px; height: 50px; }

  .feature-grid { grid-template-columns: 1fr; }
  .points { grid-template-columns: 1fr; }

  .install-block {
    flex-direction: column;
    padding: 24px 20px;
  }

  .star-banner { flex-direction: column; align-items: flex-start; }

  .badge-card { flex: 0 0 calc(25% - 2px); min-width: 80px; }
  .badge-img { width: 44px; height: 44px; }

  .badge-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 24px !important;
  }

  .medal-grid li {
    padding: 16px 12px;
    margin: 0 -12px;
    gap: 16px;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .facts dt {
    padding-bottom: 4px;
    border-bottom: none;
  }

  .facts dd {
    padding-top: 4px;
  }

  .pager {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .home-shelf li { flex: 0 1 calc(25% - 8px); min-width: 68px; }
  .home-shelf .medal { padding: 10px 4px; }
  .home-shelf .medal-img { width: 44px; height: 44px; }
  .home-shelf .medal-name { font-size: 0.68rem; }

  .badge-card { flex: 0 0 calc(33.33% - 2px); min-width: 0; }
  .points { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
}

/* ─── Home clarity accordion ─────────────────────────────────────────── */
.clarity {
  margin: clamp(64px, 9vw, 120px) 0 0;
}

.clarity-intro {
  max-width: 740px;
  margin-bottom: 42px;
}

.clarity-intro h2 {
  margin: 0;
  color: #f6f7f8;
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -.055em;
  line-height: .98;
}

.clarity-intro p {
  margin: 15px 0 0;
  color: #a8abb2;
  font-size: 1rem;
}

.clarity-list {
  counter-reset: clarity;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.clarity-list > li {
  counter-increment: clarity;
  border-bottom: 1px solid rgba(255, 255, 255, .13);
}

.clarity-item { margin: 0; }

.clarity-item summary {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 14px 18px;
  cursor: pointer;
  color: #ebedf0;
  font-size: clamp(1rem, 1.55vw, 1.24rem);
  font-weight: 500;
  letter-spacing: -.025em;
  list-style: none;
  transition: background-color .2s ease, color .2s ease;
}

.clarity-item summary::-webkit-details-marker { display: none; }

.clarity-item summary::before {
  content: counter(clarity, decimal-leading-zero);
  color: #8ca1b1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .68rem;
  letter-spacing: .08em;
}

.clarity-item summary::after {
  content: "+";
  justify-self: end;
  color: #cdd3d9;
  font-family: Arial, sans-serif;
  font-size: 1.45rem;
  font-weight: 300;
  line-height: 1;
  transition: transform .2s ease, color .2s ease;
}

.clarity-item summary:hover,
.clarity-item[open] summary {
  background: rgba(255, 255, 255, .028);
  color: #ffffff;
}

.clarity-item summary:hover::after,
.clarity-item[open] summary::after { color: #fff; }
.clarity-item[open] summary::after { transform: rotate(45deg); }

.clarity-answer {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 28px;
  gap: 18px;
  padding: 0 18px 24px;
}

.clarity-answer p {
  grid-column: 2;
  max-width: 790px;
  margin: 0;
  color: #aeb2b9;
  font-size: .96rem;
  line-height: 1.75;
}

@media (max-width: 640px) {
  .clarity { margin-top: 72px; }
  .clarity-intro { margin-bottom: 28px; }
  .clarity-item summary { grid-template-columns: 38px minmax(0, 1fr) 20px; gap: 10px; min-height: 70px; padding: 12px 4px; }
  .clarity-answer { grid-template-columns: 38px minmax(0, 1fr) 20px; gap: 10px; padding: 0 4px 20px; }
}

/* ─── Global topographic backdrop ────────────────────────────────────── */
body,
body.privacy-page {
  background-color: #090a0c !important;
  background-image:
    radial-gradient(ellipse 85% 60% at 50% -10%, rgba(76, 83, 92, .10), transparent 70%),
    url("data:image/svg+xml,%3Csvg width='1800' height='1200' viewBox='0 0 1800 1200' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cfilter id='s'%3E%3CfeGaussianBlur stdDeviation='1.25'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23s)' fill='none' stroke='%23919aa5' stroke-opacity='.105' stroke-width='1.4'%3E%3Cpath d='M-190 223C37 18 201 407 490 206S903-35 1128 230s400 37 844-232'/%3E%3Cpath d='M-214 310C42 94 221 505 510 292s408-239 644 27 386 31 818-244'/%3E%3Cpath d='M-223 400C57 168 243 600 540 374s407-240 644 31 378 27 788-244'/%3E%3Cpath d='M-198 773c227-281 420 96 650-82s381-377 675-101 390 76 845-244'/%3E%3Cpath d='M-180 873c245-286 416 104 664-86s380-370 674-94 382 81 814-253'/%3E%3Cpath d='M-147 977c255-290 409 107 676-91s378-363 672-86 375 86 771-258'/%3E%3Cpath d='M1277-122c-194 237 266 288 83 555s-492 80-284 387 420 205 168 500'/%3E%3Cpath d='M1390-126c-191 230 252 292 73 546s-475 83-272 381 408 205 159 498'/%3E%3Cpath d='M1501-131c-186 225 237 296 62 538s-459 86-261 375 396 206 151 495'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-size: 100% 100%, 1800px 1200px;
  background-position: center top, center top;
  background-attachment: fixed, fixed;

}

/* ─── GitVerse arrival ─────────────────────────────────────────────────── */
.gv-loader {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #050506;
  opacity: 0;
  transition: opacity .38s ease, visibility .38s step-end;
}

.gv-loader--visible { opacity: 1; transition: opacity .18s ease; }
.gv-loader--exit { opacity: 0; visibility: hidden; pointer-events: none; }

.gv-loader::before,
.gv-loader::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background: repeating-radial-gradient(ellipse at 50% 50%, transparent 0 52px, rgba(221, 231, 240, .055) 53px 54px, transparent 55px 78px);
  filter: blur(2px);
  opacity: .66;
  animation: gv-loader-orbit 8s linear infinite;
}

.gv-loader::after {
  inset: -35%;
  opacity: .28;
  transform: rotate(23deg);
  animation-direction: reverse;
  animation-duration: 12s;
}

.gv-loader__center {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 17px;
  width: min(440px, calc(100vw - 48px));
  text-align: center;
  animation: gv-loader-rise .72s cubic-bezier(.16, 1, .3, 1) .05s both;
}

.gv-loader__eyebrow,
.gv-loader__status {
  color: rgba(224, 229, 234, .62);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .61rem;
  font-weight: 600;
  letter-spacing: .20em;
  margin-right: -0.20em;
  text-align: center;
  display: block;
}

.gv-loader__wordmark {
  width: min(276px, 68vw);
  height: auto;
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, .12));
}

.gv-loader__line {
  width: min(206px, 56vw);
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, .14);
}

.gv-loader__line i {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  box-shadow: 0 0 12px rgba(255,255,255,.75);
  animation: gv-loader-track 3s cubic-bezier(.65, 0, .35, 1) .08s both;
}

@keyframes gv-loader-rise {
  from { opacity: 0; transform: translateY(13px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gv-loader-track { from { transform: translateX(-120%); } to { transform: translateX(290%); } }
@keyframes gv-loader-orbit { to { transform: rotate(360deg) scale(1.06); } }

@media (prefers-reduced-motion: reduce) {
  .gv-loader { display: none; }
}

/* ─── Auth / Connect page ─────────────────────────────────────────── */
.auth-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

.auth-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(36px, 5vw, 64px) 0 clamp(32px, 4vw, 48px);
}

.auth-hero .hero-eyebrow {
  margin-bottom: 24px;
}

.auth-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  text-align: center;
}

.auth-hero .lede {
  text-align: center;
  max-width: 54ch;
  margin: 0 auto;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--ink-2);
  line-height: 1.6;
}

.auth-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: clamp(22px, 4vw, 32px);
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.auth-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.auth-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-badge.gold {
  background: rgba(226, 181, 58, 0.12);
  color: var(--gold-2);
  border: 1px solid rgba(226, 181, 58, 0.25);
}

.auth-badge.silver {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-card-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

.auth-card-desc {
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 8px 0 20px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.auth-btn {
  width: 100%;
  justify-content: center;
  padding: 13px 20px;
  font-weight: 700;
  font-size: 0.94rem;
  margin-top: 4px;
}

.auth-card-footer {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--ink-3);
  line-height: 1.5;
}

.auth-card-footer a {
  color: var(--gold-2);
  text-decoration: underline;
  text-decoration-color: rgba(226, 181, 58, 0.4);
}

.auth-card-footer a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.auth-security-note {
  margin-top: 36px;
  padding: 18px 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.auth-security-note p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-3);
  line-height: 1.6;
}

.auth-security-note strong {
  color: var(--ink-2);
}
