:root {
  color-scheme: light;
  --paper: #f4f5f7;
  --paper-raised: #ffffff;
  --ink: #15181d;
  --muted: #68707b;
  --line: #d8dce2;
  --accent: #2454d7;
  --accent-soft: #dbe5ff;
  --dark: #171b22;
  --dark-muted: #aeb7c5;
  --radius: 14px;
  --shadow: 0 16px 46px rgba(24, 35, 56, 0.12);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

[data-theme="dark"] { color-scheme: dark; --paper: #15181d; --paper-raised: #20252d; --ink: #f4f5f7; --muted: #abb3bf; --line: #343b46; --accent: #86a7ff; --accent-soft: #283b6c; --dark: #0d1014; --dark-muted: #aeb7c5; --shadow: 0 16px 46px rgba(0, 0, 0, 0.26); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; --paper: #15181d; --paper-raised: #20252d; --ink: #f4f5f7; --muted: #abb3bf; --line: #343b46; --accent: #86a7ff; --accent-soft: #283b6c; --dark: #0d1014; --dark-muted: #aeb7c5; --shadow: 0 16px 46px rgba(0, 0, 0, 0.26); } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, .button { cursor: pointer; }
.shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.site-nav { height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.wordmark, .site-footer > div { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; letter-spacing: -0.02em; }
.wordmark-mark { display: inline-grid; place-items: center; width: 27px; height: 27px; border: 1px solid currentColor; border-radius: 8px; font-size: 13px; }
nav { display: flex; align-items: center; gap: 28px; font-size: 13px; color: var(--muted); }
nav a:hover, nav a:focus-visible { color: var(--ink); }
.theme-toggle { justify-self: end; border: 1px solid var(--line); color: var(--muted); background: transparent; border-radius: 999px; padding: 7px 13px; font-size: 12px; }
.hero { min-height: calc(100dvh - 72px); padding: 62px 0 54px; display: grid; grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr); gap: 54px; align-items: center; }
.hero-copy { max-width: 545px; }
.eyebrow { margin: 0 0 17px; color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: 0.16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 9ch; margin-bottom: 23px; font-size: clamp(43px, 5.2vw, 75px); line-height: 0.98; letter-spacing: -0.065em; }
h2 { margin-bottom: 17px; font-size: clamp(32px, 4vw, 54px); line-height: 1.02; letter-spacing: -0.055em; }
h3 { margin-bottom: 5px; font-size: 20px; letter-spacing: -0.03em; }
.hero-lede, .section-heading > p:not(.eyebrow) { max-width: 48ch; color: var(--muted); font-size: 17px; line-height: 1.55; }
.hero-actions, .payment-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 31px; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 999px; padding: 0 19px; font-size: 13px; font-weight: 750; letter-spacing: -0.01em; transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(0.98); }
.button-primary { color: #fff; background: var(--accent); }
.button-primary:hover { background: #173fae; }
.button-quiet { color: var(--ink); border-color: var(--line); background: transparent; }
.button-quiet:hover { border-color: var(--ink); }
.button-dark { color: #fff; background: var(--dark); }
.button-wide { width: 100%; }
.hero-art { position: relative; overflow: hidden; min-height: 470px; border-radius: var(--radius); background: var(--dark); box-shadow: var(--shadow); }
.hero-art img { display: block; width: 100%; height: 100%; min-height: 470px; object-fit: cover; }
.hero-art::after { position: absolute; inset: 0; content: ""; pointer-events: none; background: linear-gradient(135deg, rgba(19, 31, 59, 0.14), transparent 58%); }
.hero-art-note { position: absolute; right: 19px; bottom: 18px; left: 19px; display: flex; justify-content: space-between; color: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.stats-band { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-band div { display: flex; flex-direction: column; gap: 3px; padding: 25px 0; }
.stats-band div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.stats-band strong { font-size: 27px; letter-spacing: -0.045em; }
.stats-band span { color: var(--muted); font-size: 12px; }
.section { padding: 144px 0; }
.section-heading { max-width: 690px; margin-bottom: 48px; }
.leaderboard { display: grid; gap: 10px; }
.leaderboard-controls { display: flex; justify-content: center; min-height: 42px; margin-top: 22px; }
.leader-row { display: grid; grid-template-columns: 48px 52px minmax(0, 1fr) auto auto; gap: 18px; align-items: center; border-top: 1px solid var(--line); padding: 18px 0; }
.leader-rank { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.avatar { width: 52px; height: 52px; object-fit: cover; border-radius: 12px; background: var(--accent-soft); }
.leader-name { margin: 0; font-size: 18px; font-weight: 750; letter-spacing: -0.035em; }
.leader-repo, .leader-meta { color: var(--muted); font-size: 13px; }
.leader-meta { text-align: right; }
.leader-support { font-size: 16px; font-weight: 750; white-space: nowrap; }
.leader-actions { display: flex; gap: 8px; }
.small-button { min-height: 34px; padding: 0 12px; font-size: 11px; }
.loading-row { display: grid; gap: 12px; }
.loading-row span { display: block; height: 72px; border-radius: 10px; background: linear-gradient(90deg, var(--line), var(--paper-raised), var(--line)); background-size: 220% 100%; animation: loading 1.4s linear infinite; }
@keyframes loading { to { background-position: -220% 0; } }
.empty-state, .error-state { border: 1px solid var(--line); border-radius: var(--radius); padding: 35px; background: var(--paper-raised); }
.empty-state p, .error-state p { margin-bottom: 0; color: var(--muted); }
.empty-mark { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); font-size: 22px; }
.publish-section { background: var(--dark); color: #f4f5f7; }
.publish-layout, .profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr); gap: clamp(48px, 9vw, 145px); align-items: start; }
.publish-section .section-heading { position: sticky; top: 40px; margin: 0; }
.publish-section .section-heading > p:not(.eyebrow) { color: var(--dark-muted); }
.publish-section .eyebrow { color: var(--accent); }
.form-panel { color: var(--ink); background: var(--paper-raised); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form-intro { display: flex; gap: 12px; align-items: center; margin-bottom: 27px; color: var(--muted); font-size: 12px; }
.form-index { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
label { display: block; margin: 17px 0 7px; font-size: 12px; font-weight: 750; }
input, textarea { display: block; width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 12px 13px; color: var(--ink); background: var(--paper); outline: none; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.92; }
input:focus, textarea:focus, button:focus-visible, a:focus-visible { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent); outline-offset: 2px; }
.field-help, .optional { color: var(--muted); font-size: 11px; }
.field-help { margin: 6px 0 0; }
.form-status { min-height: 20px; margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.profile-section { background: var(--paper); }
.profile-panel { min-height: 250px; }
.profile-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-raised); }
.profile-banner { height: 130px; background: var(--accent-soft); object-fit: cover; width: 100%; }
.profile-content { padding: 26px; }
.profile-head { display: flex; gap: 16px; align-items: end; margin-top: -55px; margin-bottom: 21px; }
.profile-head .avatar { width: 78px; height: 78px; border: 5px solid var(--paper-raised); border-radius: 17px; }
.profile-card p { color: var(--muted); }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.profile-link { border-bottom: 1px solid var(--accent); color: var(--accent); font-size: 12px; }
.editor { display: grid; gap: 5px; margin-top: 25px; padding-top: 25px; border-top: 1px solid var(--line); }
.editor-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog { width: min(100% - 28px, 520px); border: 0; padding: 0; color: var(--ink); background: transparent; }
.dialog::backdrop { background: rgba(10, 14, 20, 0.68); backdrop-filter: blur(5px); }
.dialog-panel { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; color: var(--ink); background: var(--paper-raised); box-shadow: var(--shadow); }
.dialog-close { position: absolute; top: 20px; right: 20px; border: 0; color: var(--muted); background: transparent; font-size: 12px; }
.payment-details { display: grid; gap: 10px; margin: 25px 0 5px; }
.payment-details div { display: grid; grid-template-columns: 82px 1fr; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.payment-details dt { color: var(--muted); font-size: 11px; }
.payment-details dd { overflow-wrap: anywhere; margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.site-footer { display: grid; grid-template-columns: 1fr 1fr auto; gap: 24px; align-items: center; min-height: 120px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer > div { color: var(--ink); }
.site-footer p { margin: 0; }
.site-footer a { color: var(--accent); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
@media (max-width: 760px) {
  .shell, .site-nav { width: min(100% - 32px, 620px); }
  .site-nav { grid-template-columns: 1fr auto; height: 64px; }
  nav { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 38px; padding: 45px 0 50px; }
  h1 { max-width: 11ch; font-size: clamp(43px, 13vw, 66px); }
  .hero-art, .hero-art img { min-height: 300px; }
  .stats-band { grid-template-columns: 1fr; }
  .stats-band div, .stats-band div + div { padding: 17px 0; border-left: 0; }
  .stats-band div + div { border-top: 1px solid var(--line); }
  .section { padding: 88px 0; }
  .leader-row { grid-template-columns: 29px 44px minmax(0, 1fr); gap: 11px; }
  .avatar { width: 44px; height: 44px; }
  .leader-meta, .leader-support { grid-column: 3; text-align: left; }
  .leader-actions { grid-column: 3; }
  .small-button { min-height: 32px; }
  .publish-layout, .profile-layout { grid-template-columns: 1fr; gap: 42px; }
  .publish-section .section-heading { position: static; }
  .form-panel { padding: 21px; }
  .site-footer { grid-template-columns: 1fr; gap: 9px; padding: 28px 0; }
}
