:root {
  color-scheme: light;
  --bg: #f6f6f1;
  --panel: #ffffff;
  --ink: #0a0a0a;
  --muted: #6b6b66;
  --soft: #e7e5dc;
  --line: #d4d2c8;
  --wash: #edede6;
  --ink-soft: #2e2e2a;
  --accent: #111111;
  --accent-soft: #f0f0ea;
  --dark: #050505;
  --dark-soft: #181815;
  --shadow: 0 22px 70px rgba(24, 24, 20, 0.1);
  --header-bg: color-mix(in srgb, var(--panel) 92%, transparent);
  --hero-base: #e7edf4;
  --hero-ink: #080807;
  --hero-muted: #3f4742;
  --hero-grid: rgba(8, 8, 7, 0.08);
  --hero-gradient:
    linear-gradient(118deg, rgba(255, 252, 237, 0.98) 0%, rgba(218, 232, 246, 0.94) 34%, rgba(225, 218, 241, 0.78) 58%, rgba(202, 223, 210, 0.86) 100%),
    linear-gradient(180deg, rgba(255, 255, 251, 0.4), rgba(255, 255, 251, 0));
  --control-bg: color-mix(in srgb, var(--panel) 82%, var(--bg));
  --card-bg: var(--panel);
  --input-bg: var(--panel);
  --subtle-panel-bg: color-mix(in srgb, var(--panel) 76%, var(--bg));
  --directory-card-bg: color-mix(in srgb, var(--panel) 86%, var(--bg));
  --row-bg: color-mix(in srgb, var(--panel) 94%, var(--bg));
  --row-hover-bg: var(--panel);
  --empty-row-bg: color-mix(in srgb, var(--panel) 88%, var(--bg));
  --metric-bg: color-mix(in srgb, var(--panel) 72%, var(--bg));
  --metric-lifetime-bg: var(--panel);
  --mobile-metric-bg: color-mix(in srgb, var(--panel) 86%, var(--bg));
  --top-row-bg: color-mix(in srgb, #fff8e4 72%, var(--panel));
  --blue-1: #eef4fb;
  --blue-2: #d9e8f8;
  --blue-3: #bed5f0;
  --blue-4: #8fb7e3;
  --blue-5: #4b8ece;
  --blue-6: #0872ce;
  --gold: #f4bd4d;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10110e;
  --panel: #191a16;
  --ink: #f4f0e7;
  --muted: #c4beb1;
  --soft: #30332b;
  --line: #44473d;
  --wash: #24271f;
  --ink-soft: #ded8cb;
  --accent: #f7f2e8;
  --accent-soft: #262a22;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --header-bg: rgba(22, 23, 20, 0.94);
  --hero-base: #111615;
  --hero-ink: #fff8eb;
  --hero-muted: #e1daca;
  --hero-grid: rgba(255, 248, 235, 0.075);
  --hero-gradient:
    linear-gradient(116deg, rgba(25, 37, 44, 0.96) 0%, rgba(36, 42, 49, 0.94) 38%, rgba(36, 52, 43, 0.88) 72%, rgba(24, 27, 23, 0.98) 100%),
    linear-gradient(180deg, rgba(255, 248, 235, 0.08), rgba(255, 248, 235, 0));
  --control-bg: #20221d;
  --card-bg: #171914;
  --input-bg: #141611;
  --subtle-panel-bg: #151711;
  --directory-card-bg: #171914;
  --row-bg: #181a15;
  --row-hover-bg: #20221d;
  --empty-row-bg: #171914;
  --metric-bg: #11130f;
  --metric-lifetime-bg: #1c1e18;
  --mobile-metric-bg: #12140f;
  --top-row-bg: #292515;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(100% - 56px, 1320px);
  min-width: 0;
  margin: 0 auto;
  padding-bottom: 56px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  width: 100vw;
  min-height: 58px;
  margin-left: calc(50% - 50vw);
  padding-inline: max(24px, calc((100vw - 1320px) / 2 + 24px));
  border-bottom: 1px solid var(--soft);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.brand {
  justify-self: start;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 680;
  text-decoration: none;
}

.top-links {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.top-links a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 560;
  text-decoration: none;
  white-space: nowrap;
}

.top-links a:hover {
  color: var(--ink);
}

.theme-toggle {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px 4px 5px;
  background: var(--control-bg);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 620;
}

.theme-toggle:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.theme-switch {
  width: 38px;
  height: 24px;
  border: 1px solid var(--soft);
  border-radius: 999px;
  padding: 2px;
  background: var(--wash);
}

.theme-switch span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 180ms ease;
}

html[data-theme="dark"] .theme-switch span {
  transform: translateX(14px);
}

.label-short {
  display: none;
}

.landing-hero {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100vw;
  margin: 0 0 0 calc(50% - 50vw);
  padding:
    clamp(28px, 3.4vw, 48px)
    max(24px, calc((100vw - 1320px) / 2 + 24px));
  background: var(--hero-base);
  color: var(--hero-ink);
  overflow: hidden;
  scroll-margin-top: 78px;
}

.hero-ambient {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--hero-gradient);
  mask-image: linear-gradient(to bottom, transparent 0, black 108px, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 108px, black 100%);
}

.hero-ambient::before,
.hero-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-ambient::before {
  background:
    linear-gradient(90deg, transparent 0, var(--hero-grid) 1px, transparent 1px),
    linear-gradient(180deg, transparent 0, var(--hero-grid) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.42;
}

.hero-ambient::after {
  background:
    linear-gradient(100deg, transparent 0 18%, rgba(255, 255, 255, 0.28) 22%, transparent 28% 52%, rgba(8, 8, 7, 0.08) 58%, transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 251, 0.42), rgba(255, 255, 251, 0));
  mix-blend-mode: soft-light;
  opacity: 0.68;
}

html[data-theme="dark"] .hero-ambient::after {
  background:
    linear-gradient(100deg, transparent 0 18%, rgba(255, 250, 240, 0.14) 22%, transparent 28% 52%, rgba(255, 250, 240, 0.08) 58%, transparent 64%),
    linear-gradient(180deg, rgba(255, 250, 240, 0.06), rgba(255, 250, 240, 0));
  opacity: 0.78;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: start;
  max-width: 820px;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.9), transparent 34%),
    linear-gradient(145deg, #e8e5dc, #bdb9ad 46%, #55534d);
  color: var(--panel);
  font-weight: 720;
}

.avatar {
  width: 118px;
  height: 118px;
  margin-bottom: 26px;
  font-size: 2rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 14px;
  font-size: clamp(2.45rem, 3.8vw, 4.1rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 span {
  display: block;
}

.hero-lede {
  max-width: 480px;
  margin-bottom: 0;
  color: var(--hero-muted);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.45;
}

.participation-section {
  display: grid;
  gap: 14px;
  border-bottom: 1px solid var(--soft);
  padding: clamp(20px, 2.4vw, 28px) 0;
  scroll-margin-top: 74px;
}

.participation-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.participation-heading .eyebrow {
  color: var(--muted);
}

.participation-heading h2 {
  max-width: 680px;
  font-size: clamp(1.35rem, 2.7vw, 2.2rem);
  line-height: 1.05;
}

.participation-heading a {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 580;
  text-decoration: none;
}

.participation-heading a:hover {
  border-color: var(--ink);
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  overflow: hidden;
}

.command-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
}

.command-card + .command-card {
  border-left: 1px solid var(--line);
}

.command-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.command-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.25;
}

.location-details {
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.location-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.location-summary span {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 620;
}

.location-summary small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.setup-helper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.setup-helper label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.setup-helper label span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 720;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.setup-helper input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--input-bg);
  color: var(--ink);
  outline: 0;
}

.setup-helper input::placeholder {
  color: var(--muted);
}

.setup-helper input:focus {
  border-color: var(--ink);
}

.setup-helper small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.save-note {
  grid-column: 1 / -1;
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.save-note code {
  color: var(--ink);
  font-size: 0.94em;
}

.inline-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.inline-command code {
  min-width: 0;
  overflow-x: auto;
  color: inherit;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  font-weight: 620;
  white-space: nowrap;
  scrollbar-width: none;
}

.inline-command code::-webkit-scrollbar {
  display: none;
}

.copy-button {
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--panel);
  font-weight: 580;
}

.generated-command {
  grid-column: 1 / -1;
  border: 1px solid var(--soft);
  border-radius: 8px;
  padding: 12px;
  background: var(--subtle-panel-bg);
}

.join-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 680px);
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: join-step;
}

.join-steps li {
  position: relative;
  min-height: 96px;
  border: 1px solid var(--soft);
  border-radius: 16px;
  padding: 38px 14px 14px;
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.32;
}

.join-steps li::before {
  counter-increment: join-step;
  content: counter(join-step);
  position: absolute;
  top: 12px;
  left: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.activity-section,
.board-section,
.entry-panel {
  margin-top: 44px;
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 560;
  letter-spacing: 0;
}

.section-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.section-note a {
  color: var(--ink);
  font-weight: 560;
  text-decoration: none;
}

.section-note a:hover {
  text-decoration: underline;
}

.directory-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0 5px;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--soft);
  border-radius: 999px;
  padding: 4px;
  background: var(--control-bg);
}

.sort-button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
}

.sort-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--panel);
  box-shadow: 0 6px 18px rgba(20, 20, 18, 0.12);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 22px;
  min-width: 0;
}

.board-section,
.entry-panel,
.directory-section {
  margin-top: 0;
  scroll-margin-top: 88px;
}

.directory-section {
  display: grid;
  gap: 18px;
}

.directory-heading {
  align-items: start;
}

.directory-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--control-bg);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 580;
}

.directory-toggle:hover {
  border-color: var(--ink);
}

.directory-toggle [aria-hidden="true"] {
  width: 1ch;
  font-size: 1rem;
  line-height: 1;
  text-align: center;
}

.directory-body {
  display: grid;
  gap: 12px;
}

.directory-body[hidden] {
  display: none;
}

.directory-search input {
  width: min(100vw - 48px, 320px);
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--input-bg);
  color: var(--ink);
  outline: 0;
}

.directory-search input:focus {
  border-color: var(--ink);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ambassador-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--soft);
  border-radius: 9px;
  padding: 14px;
  background: var(--directory-card-bg);
}

.ambassador-card p {
  margin-bottom: 3px;
  color: var(--ink);
  font-weight: 620;
  line-height: 1.2;
}

.ambassador-card span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.25;
}

.ambassador-card strong {
  border: 1px solid var(--soft);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.ambassador-card nav {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ambassador-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--soft);
  border-radius: 50%;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.ambassador-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.ambassador-link-site svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ambassador-link:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.ambassador-link:focus-visible {
  border-color: var(--ink);
  outline: 3px solid rgba(8, 114, 206, 0.18);
  outline-offset: 2px;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  background: transparent;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0 10px;
  table-layout: fixed;
}

th,
td {
  border-bottom: 0;
  padding: 16px 12px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  width: 58px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 230px;
}

th:last-child,
td:last-child {
  width: 116px;
}

th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

thead th {
  padding-top: 0;
  padding-bottom: 2px;
}

tbody td {
  border-top: 1px solid var(--soft);
  border-bottom: 1px solid var(--soft);
  background: var(--row-bg);
}

tbody td:first-child {
  border-left: 1px solid var(--soft);
  border-radius: 9px 0 0 9px;
}

tbody td:last-child {
  border-right: 1px solid var(--soft);
  border-radius: 0 9px 9px 0;
}

tbody tr:first-child td {
  border-color: color-mix(in srgb, var(--gold) 52%, var(--soft));
  background: var(--top-row-bg);
}

tbody tr:hover td {
  border-color: color-mix(in srgb, var(--ink) 24%, var(--soft));
  background: var(--row-hover-bg);
}

.empty-row td {
  border: 1px solid var(--soft);
  border-radius: 9px;
  padding: 28px;
  background: var(--empty-row-bg);
  text-align: center;
  white-space: normal;
}

.empty-row strong,
.empty-row span {
  display: block;
}

.empty-row strong {
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 620;
}

.empty-row span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.empty-row code {
  color: var(--ink);
  font-size: 0.94em;
}

tbody tr:last-child td {
  border-bottom: 1px solid var(--soft);
}

.rank {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--panel);
  font-weight: 560;
}

tbody tr:first-child .rank {
  background: var(--gold);
  color: var(--ink);
}

tbody tr:nth-child(2) .rank {
  background: #d8d9d4;
  color: var(--ink);
}

tbody tr:nth-child(3) .rank {
  background: #c88b55;
  color: var(--ink);
}

.person {
  display: inline-grid;
  align-items: center;
  color: var(--ink);
  text-align: left;
}

.person strong,
.person small {
  display: block;
}

.person strong {
  font-weight: 620;
}

.person small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.88rem;
}

.person .location {
  color: color-mix(in srgb, var(--muted) 84%, var(--ink));
  font-size: 0.78rem;
}

.metric {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--metric-bg);
}

.metric strong {
  font-weight: 580;
}

.metric span {
  display: none;
}

.metric-lifetime {
  border-color: color-mix(in srgb, var(--ink) 18%, var(--line));
  background: var(--metric-lifetime-bg);
}

button:focus-visible {
  outline: 3px solid rgba(8, 114, 206, 0.18);
  outline-offset: 2px;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  align-items: center;
  margin-top: 54px;
  padding-top: 18px;
  border-top: 1px solid var(--soft);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.footer-status {
  color: var(--ink-soft);
  font-weight: 560;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-links a {
  color: var(--ink);
  font-weight: 560;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.site-footer p {
  grid-column: 1 / -1;
  max-width: 58ch;
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 960px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 16px;
  }

  .sort-control {
    gap: 5px;
    padding: 3px;
  }

  .sort-button {
    min-height: 31px;
    padding: 0 9px;
    font-size: 0.8rem;
  }

  th,
  td {
    padding: 14px 8px;
  }

  th:first-child,
  td:first-child {
    width: 48px;
  }

  th:nth-child(2),
  td:nth-child(2) {
    width: 205px;
  }

  th:last-child,
  td:last-child {
    width: 96px;
  }

  th {
    font-size: 0.66rem;
    letter-spacing: 0.075em;
  }

  .rank {
    width: 32px;
    height: 32px;
  }

  .person small {
    font-size: 0.82rem;
  }

  .person .location {
    font-size: 0.74rem;
  }

  .metric {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.86rem;
  }

  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-hero {
    width: 100vw;
    min-height: auto;
  }

}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 560px);
  }

  .site-header {
    width: 100%;
    min-height: 58px;
    gap: 14px;
    grid-template-columns: 1fr auto auto;
    margin-left: 0;
    margin-right: 0;
    padding-inline: 12px;
  }

  .landing-hero {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 22px 12px;
  }

  .top-links {
    gap: 10px;
  }

  .top-links a:not(:last-child) {
    display: none;
  }

  .top-links a {
    font-size: 0.76rem;
  }

  .theme-toggle {
    min-height: 30px;
    padding: 3px 6px 3px 4px;
    font-size: 0.7rem;
  }

  .theme-switch {
    width: 32px;
    height: 20px;
  }

  .theme-switch span {
    width: 14px;
    height: 14px;
  }

  html[data-theme="dark"] .theme-switch span {
    transform: translateX(12px);
  }

  .label-full {
    display: none;
  }

  .label-short {
    display: inline;
  }

  h1 {
    margin-bottom: 8px;
    font-size: clamp(1.68rem, 8vw, 2.12rem);
    line-height: 1;
    max-width: 100%;
    text-wrap: balance;
  }

  .hero-lede {
    font-size: 0.84rem;
    line-height: 1.3;
  }

  .participation-section {
    gap: 14px;
    padding: 18px 0 20px;
  }

  .participation-heading {
    align-items: start;
    display: grid;
    gap: 10px;
  }

  .participation-heading h2 {
    font-size: 1.28rem;
    line-height: 1.08;
  }

  .participation-heading a {
    justify-self: start;
    min-height: 32px;
    padding: 6px 11px;
    font-size: 0.78rem;
  }

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

  .command-card {
    gap: 8px;
    padding: 12px;
  }

  .command-card + .command-card {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .command-card span {
    font-size: 0.64rem;
  }

  .command-card p {
    font-size: 0.82rem;
  }

  .join-steps {
    width: 100%;
  }

  .setup-helper {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .setup-helper input {
    min-height: 34px;
    padding: 0 11px;
    font-size: 0.84rem;
  }

  .setup-helper small {
    font-size: 0.72rem;
  }

  .inline-command code {
    overflow-x: auto;
    font-size: 0.78rem;
    line-height: 1.16;
    white-space: nowrap;
    word-break: normal;
  }

  .copy-button {
    justify-self: end;
    min-height: 32px;
    padding: 0 11px;
    font-size: 0.82rem;
  }

  .join-steps {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-note {
    display: grid;
    gap: 2px;
    max-width: 31ch;
  }

  .directory-search,
  .directory-search input {
    width: 100%;
  }

  .directory-toggle {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.78rem;
  }

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

  .ambassador-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .ambassador-card strong {
    justify-self: start;
  }

  .sort-control {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
  }

  .sort-button {
    min-height: 36px;
    min-width: 0;
    padding: 0 2px;
    font-size: 0.76rem;
  }

  .content-grid {
    gap: 24px;
    margin-top: 18px;
  }

  .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  table {
    border-collapse: separate;
    border-spacing: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  td {
    border-bottom: 0;
    padding: 0;
    white-space: normal;
  }

  .leaderboard-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-areas:
      "rank person"
      "rank lifetime"
      "rank secondary";
    gap: 8px 12px;
    align-items: start;
    border: 1px solid var(--soft);
    border-radius: 8px;
    padding: 14px;
    background: var(--row-bg);
  }

  #leaderboardRows .leaderboard-row:first-child {
    border-color: color-mix(in srgb, var(--gold) 52%, var(--soft));
    background: var(--top-row-bg);
  }

  .empty-row td {
    padding: 22px 16px;
  }

  .leaderboard-row td,
  .leaderboard-row td:first-child,
  .leaderboard-row td:last-child,
  #leaderboardRows .leaderboard-row td,
  #leaderboardRows .leaderboard-row:first-child td {
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .leaderboard-row td:first-child {
    grid-area: rank;
  }

  .leaderboard-row td:nth-child(2) {
    grid-area: person;
  }

  .leaderboard-row td:nth-child(3) {
    grid-area: lifetime;
    text-align: left;
  }

  .leaderboard-row td:nth-child(4) {
    grid-area: secondary;
  }

  .leaderboard-row td:nth-child(n + 3) {
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.1;
  }

  .leaderboard-row td:nth-child(3) {
    display: grid;
    gap: 3px;
  }

  .leaderboard-row td:nth-child(4),
  .leaderboard-row td:nth-child(5),
  .leaderboard-row td:nth-child(6),
  .leaderboard-row td:nth-child(7) {
    display: none;
  }

  #leaderboardRows[data-sort="peakTokens"] .leaderboard-row td:nth-child(4),
  #leaderboardRows[data-sort="longestTaskMinutes"] .leaderboard-row td:nth-child(5),
  #leaderboardRows[data-sort="currentStreak"] .leaderboard-row td:nth-child(6),
  #leaderboardRows[data-sort="longestStreak"] .leaderboard-row td:nth-child(7) {
    display: grid;
    grid-area: secondary;
    gap: 3px;
    text-align: left;
  }

  .leaderboard-row td:nth-child(n + 3)::before {
    content: none;
  }

  .leaderboard-row .metric {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    width: fit-content;
    min-height: 28px;
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-radius: 999px;
    padding: 4px 9px;
    background: var(--mobile-metric-bg);
  }

  .leaderboard-row .metric span {
    display: block;
    order: -1;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 680;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .leaderboard-row .metric strong {
    font-size: 0.94rem;
    line-height: 1;
  }

  .rank {
    width: 36px;
    height: 36px;
    margin-top: 2px;
  }

  .person {
    width: 100%;
    min-width: 0;
  }

  .person strong,
  .person small {
    overflow-wrap: anywhere;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 42px;
    padding-top: 16px;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .footer-links {
    gap: 12px;
  }

  .site-footer p {
    max-width: 30ch;
  }

}
