:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b0d0e;
  color: #f2f1ed;
  font-synthesis: none;
  --surface: #141719;
  --surface-raised: #1b1f21;
  --line: #303538;
  --muted: #9ba2a5;
  --amber: #e0a849;
  --green: #5fc18d;
  --red: #e06c66;
  --blue: #65a9d7;
  --content: min(1240px, calc(100% - 40px));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background: #0b0d0e;
}

img { max-width: 100%; }
header, main, section, footer { min-width: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.ui-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  display: inline-block;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.icon-activity { -webkit-mask-image: url("/assets/icons/activity.svg"); mask-image: url("/assets/icons/activity.svg"); }
.icon-book-open { -webkit-mask-image: url("/assets/icons/book-open.svg"); mask-image: url("/assets/icons/book-open.svg"); }
.icon-boxes { -webkit-mask-image: url("/assets/icons/boxes.svg"); mask-image: url("/assets/icons/boxes.svg"); }
.icon-code-2 { -webkit-mask-image: url("/assets/icons/code-2.svg"); mask-image: url("/assets/icons/code-2.svg"); }
.icon-download { -webkit-mask-image: url("/assets/icons/download.svg"); mask-image: url("/assets/icons/download.svg"); }
.icon-discord { -webkit-mask-image: url("/assets/icons/discord.svg"); mask-image: url("/assets/icons/discord.svg"); }
.icon-external-link { -webkit-mask-image: url("/assets/icons/external-link.svg"); mask-image: url("/assets/icons/external-link.svg"); }
.icon-heart { -webkit-mask-image: url("/assets/icons/heart.svg"); mask-image: url("/assets/icons/heart.svg"); }
.icon-images { -webkit-mask-image: url("/assets/icons/images.svg"); mask-image: url("/assets/icons/images.svg"); }
.icon-map { -webkit-mask-image: url("/assets/icons/map.svg"); mask-image: url("/assets/icons/map.svg"); }
.icon-message-circle { -webkit-mask-image: url("/assets/icons/message-circle.svg"); mask-image: url("/assets/icons/message-circle.svg"); }
.icon-monitor-cog { -webkit-mask-image: url("/assets/icons/monitor-cog.svg"); mask-image: url("/assets/icons/monitor-cog.svg"); }
.icon-refresh-cw { -webkit-mask-image: url("/assets/icons/refresh-cw.svg"); mask-image: url("/assets/icons/refresh-cw.svg"); }
.icon-server { -webkit-mask-image: url("/assets/icons/server.svg"); mask-image: url("/assets/icons/server.svg"); }
.icon-settings { -webkit-mask-image: url("/assets/icons/settings.svg"); mask-image: url("/assets/icons/settings.svg"); }
.icon-users { -webkit-mask-image: url("/assets/icons/users.svg"); mask-image: url("/assets/icons/users.svg"); }

.hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-bottom: 1px solid #463a27;
  background: #101214;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  background: url("/assets/desert-header.webp") center 55% / cover no-repeat;
  opacity: .72;
}

.hero-overlay { background: rgba(8, 10, 11, .68); }

.hero-inner {
  position: relative;
  z-index: 1;
  width: var(--content);
  min-height: 430px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand strong {
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

.brand small {
  color: #d5c7aa;
  font-size: 12px;
}

.topbar-links {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #d8dddf;
  font-size: 13px;
  text-decoration: none;
}

.topbar-links a:hover { color: #f1c97f; }

.hero-content {
  max-width: 760px;
  padding: 48px 0 46px;
  align-self: center;
}

.eyebrow,
.section-label {
  margin: 0 0 10px;
  color: #efbd68;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  color: #fff;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 720px;
  margin: 20px 0 0;
  color: #e2e5e5;
  font-size: 19px;
  line-height: 1.55;
}

.hero-actions,
.start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.primary-action,
.secondary-action,
.support-action {
  min-height: 42px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.primary-action {
  background: #d9a246;
  color: #17120b;
}

.primary-action:hover { background: #ebbb68; }

.secondary-action {
  background: #d9a246;
  color: #17120b;
}

.secondary-action:hover {
  background: #ebbb68;
}

.support-action {
  border-color: #bd5bc4;
  background: radial-gradient(circle at 0 0, #d89bdc 0%, #ce82d3 36%, #c167c8 60%, #a943b0 82%, #8f2e95 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(31, 7, 34, .68);
}

.support-action:hover {
  border-color: #ce70d3;
  background: radial-gradient(circle at 0 0, #e0aae3 0%, #d68edb 36%, #ca72d0 60%, #b74dbd 82%, #9c35a2 100%);
}

.support-action .ui-icon {
  filter: drop-shadow(0 1px 1px rgba(31, 7, 34, .58));
}

.hero-note {
  margin: 15px 0 0;
  color: #b9c0c2;
  font-size: 12px;
}

.summary-band {
  border-bottom: 1px solid var(--line);
  background: #101315;
}

.summary-grid {
  width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-grid div {
  min-height: 84px;
  padding: 18px 22px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-right: 1px solid var(--line);
}

.summary-grid div:first-child { border-left: 1px solid var(--line); }
.summary-grid div > span { color: var(--muted); font-size: 12px; }
.summary-grid strong { font-size: 25px; font-variant-numeric: tabular-nums; }

.summary-label {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.summary-icon {
  width: 15px;
  height: 15px;
}

.summary-label.total .summary-icon { color: #d9a246; }
.summary-label.online .summary-icon { color: var(--green); }
.summary-label.degraded .summary-icon { color: var(--amber); }
.summary-label.offline .summary-icon { color: var(--red); }
.summary-label.players .summary-icon { color: var(--blue); }

.directory {
  width: var(--content);
  margin: 0 auto;
  padding: 48px 0 64px;
  scroll-margin-top: 20px;
}

.directory-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 10px;
}

.directory-heading > div:first-child { min-width: 0; }

h2 {
  margin: 0;
  color: #f5f4f0;
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: 0;
}

.directory-heading p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.directory-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.directory-health {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d8dddf;
  font-size: 13px;
}

.health-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(224, 168, 73, .14);
}

.health-dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(95, 193, 141, .14);
}

.health-dot.bad {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(224, 108, 102, .14);
}

.directory-intro {
  max-width: 780px;
  margin: 0 0 24px;
  color: #aeb5b8;
  font-size: 14px;
  line-height: 1.6;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: #f4d39a;
  font-size: 23px;
}

.icon-button .ui-icon { width: 18px; height: 18px; }
.icon-button:hover { border-color: var(--amber); }
.icon-button.loading .ui-icon { animation: spin .8s linear infinite; }

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 16px;
}

.filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 12px;
  background: var(--surface);
  color: #f2f1ed;
  outline: none;
}

input:focus,
select:focus { border-color: var(--amber); }

.status-filter {
  display: grid;
  grid-template-columns: repeat(4, auto);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.status-filter button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 0 13px;
  background: var(--surface);
  color: var(--muted);
}

.status-filter button:last-child { border-right: 0; }
.status-filter button:hover { color: #fff; }
.status-filter button.active { background: #332a1d; color: #f3c87e; }

.table-shell {
  position: relative;
  max-width: 100%;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
  scrollbar-color: #5a6266 #171a1c;
  scrollbar-width: thin;
}

.table-shell::-webkit-scrollbar { height: 10px; }
.table-shell::-webkit-scrollbar-track { background: #171a1c; }
.table-shell::-webkit-scrollbar-thumb {
  border: 2px solid #171a1c;
  border-radius: 8px;
  background: #5a6266;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.table-column-region { width: 130px; }
.table-column-status { width: 115px; }
.table-column-players { width: 100px; }
.table-column-population { width: 120px; }
.table-column-image { width: 105px; }
.table-column-sietches { width: 95px; }
.table-column-discord { width: 82px; }
.table-column-ping { width: 135px; }

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid #292d2f;
  text-align: left;
  vertical-align: middle;
}

th:last-child,
td:last-child { padding-right: 22px; }

th {
  background: #111416;
  color: #9ba2a5;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.sort-button {
  min-width: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  white-space: nowrap;
}

.sort-button span {
  width: 10px;
  color: #687074;
  font-size: 12px;
  line-height: 1;
}

.sort-button:hover,
.sort-button.active { color: #f3c87e; }
.sort-button.active span { color: #f3c87e; }
.sort-button:disabled { cursor: wait; opacity: .72; }

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #1a1e20; }
td { color: #d9dddf; font-size: 13px; }

.server-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.server-name strong {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-name small { color: var(--muted); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-transform: capitalize;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.status.online::before { background: var(--green); }
.status.degraded::before { background: var(--amber); }
.status.offline::before { background: var(--red); }

.population { color: var(--muted); }
.population.Low { color: var(--green); }
.population.Medium { color: var(--amber); }
.population.High { color: var(--red); }
.numeric { font-variant-numeric: tabular-nums; }
.discord-column-header { text-align: center; }
.discord-column { width: 72px; color: var(--muted); text-align: center; }
.server-discord-link {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  display: inline-grid;
  place-items: center;
  color: #8c9eff;
  text-decoration: none;
}
.server-discord-link:hover { color: #b8c2ff; }
.server-discord-link .ui-icon { width: 19px; height: 19px; }
.ping-column { min-width: 98px; }

.ping {
  display: inline-flex;
  white-space: nowrap;
}

.ping-reading {
  display: inline-flex;
  align-items: flex-end;
  gap: 7px;
}

.ping-value {
  min-width: 43px;
  height: 18px;
  display: inline-flex;
  align-items: flex-end;
  text-align: right;
  line-height: 1;
}

.ping-meter {
  width: 29px;
  height: 18px;
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
}

.ping-meter > span {
  width: 5px;
  border-radius: 1px 1px 0 0;
  background: #3d4651;
}

.ping-meter > span:nth-child(1) { height: 5px; }
.ping-meter > span:nth-child(2) { height: 9px; }
.ping-meter > span:nth-child(3) { height: 13px; }
.ping-meter > span:nth-child(4) { height: 17px; }
.ping.good .ping-meter > .active { background: var(--green); }
.ping.fair .ping-meter > .active { background: var(--amber); }
.ping.poor .ping-meter > .active { background: var(--red); }
.ping.unavailable { color: var(--muted); }

.ping-mode {
  min-width: 8px;
  color: #778087;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
}

.ping.stale { opacity: .82; }

.ping-legend {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 100%;
  min-height: 38px;
  margin-top: auto;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  border-top: 1px solid #292d2f;
  box-sizing: border-box;
  background: #111416;
  color: #7f888c;
  font-size: 10px;
  line-height: 1.3;
  text-transform: uppercase;
}

.ping-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ping-legend strong { color: #c8ced0; }

.ping-info {
  position: relative;
  width: 17px;
  height: 17px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid #697276;
  border-radius: 50%;
  background: transparent;
  color: #aeb5b8;
  font: 700 11px/1 Arial, sans-serif;
}

.ping-info:hover,
.ping-info:focus-visible {
  border-color: #d9a246;
  color: #f3c87e;
  outline: none;
}

.ping-tooltip {
  position: absolute;
  right: -3px;
  bottom: calc(100% + 9px);
  z-index: 10;
  width: min(310px, calc(100vw - 48px));
  padding: 11px 13px;
  border: 1px solid #41484c;
  border-radius: 5px;
  background: #171b1d;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .38);
  color: #b8c0c3;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
  text-transform: none;
  white-space: normal;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.ping-tooltip::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 100%;
  border: 5px solid transparent;
  border-top-color: #41484c;
}

.ping-tooltip strong { color: #eef0f0; }

.ping-info:hover .ping-tooltip,
.ping-info:focus-visible .ping-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.empty-state,
.error-state {
  min-height: 260px;
  padding: 36px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}

.empty-state[hidden],
.error-state[hidden] { display: none; }

.empty-state img {
  width: auto;
  height: 54px;
  object-fit: contain;
  opacity: .7;
}
.empty-state span,
.error-state span { color: var(--muted); font-size: 13px; }
.error-state strong { color: #f0a19d; }

.pagination {
  min-height: 58px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #111416;
}

.pagination[hidden],
.pagination nav[hidden] { display: none; }

.pagination p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.pagination nav,
.page-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination button {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: #d8dddf;
  font-size: 12px;
}

.pagination button:hover:not(:disabled),
.pagination button.active {
  border-color: var(--amber);
  color: #f3c87e;
}

.pagination button.active { background: #332a1d; }
.pagination button:disabled { cursor: default; opacity: .42; }

.page-ellipsis {
  width: 24px;
  color: var(--muted);
  text-align: center;
}

.content-width {
  width: var(--content);
  margin: 0 auto;
}

.project-band,
.start-band,
.faq-band,
.community-band {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.project-band { background: #111416; }
.start-band { background: #0b0d0e; }
.faq-band { background: #131718; }
.community-band { background: #0d1112; }

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .85fr);
  gap: 72px;
  align-items: start;
}

.project-copy p:not(.section-label) {
  max-width: 680px;
  margin: 18px 0 0;
  color: #bac0c2;
  font-size: 15px;
  line-height: 1.75;
}

.project-links {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.text-link {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #e4b562;
  font-size: 14px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.feature-list div {
  min-height: 150px;
  padding: 24px 22px 24px 0;
  display: grid;
  align-content: start;
  gap: 9px;
  border-bottom: 1px solid var(--line);
}

.feature-list div:nth-child(even) {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.feature-list .feature-icon {
  width: 23px;
  height: 23px;
  margin-bottom: 8px;
  color: #e0a849;
}

.feature-list strong { color: #f0d19a; font-size: 15px; }
.feature-list div > span:last-child { color: var(--muted); font-size: 13px; line-height: 1.6; }

.steps {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.steps > div {
  position: relative;
  min-height: 230px;
  padding: 28px 30px;
  border-right: 1px solid var(--line);
}

.steps > div:first-child { padding-left: 0; }
.steps > div:last-child { padding-right: 0; border-right: 0; }

.step-number {
  display: block;
  margin-bottom: 34px;
  color: #dca64b;
  font-size: 12px;
  font-weight: 700;
}

.step-icon {
  position: absolute;
  top: 27px;
  right: 30px;
  width: 26px;
  height: 26px;
  color: #6e777b;
}

.steps strong { display: block; color: #f3f1ec; font-size: 17px; }
.steps p { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.faq-layout {
  display: grid;
  grid-template-columns: minmax(280px, .55fr) minmax(0, 1fr);
  gap: 72px;
}

.faq-list { border-top: 1px solid var(--line); }

.faq-list details { border-bottom: 1px solid var(--line); }

.faq-list summary {
  padding: 20px 36px 20px 0;
  color: #eeece6;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.faq-list p {
  max-width: 760px;
  margin: -4px 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.community-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .8fr);
  gap: 72px;
}

.community-layout > div:first-child > p:last-child {
  max-width: 680px;
  margin: 18px 0 0;
  color: #b8bfc1;
  font-size: 15px;
  line-height: 1.7;
}

.community-links { border-top: 1px solid var(--line); }

.community-links a {
  min-height: 100px;
  padding: 22px 0;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.community-links a:hover strong { color: #efbd68; }
.community-links .community-icon { width: 23px; height: 23px; color: #d9a246; }
.community-links a > span:last-child {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.community-links strong { color: #f3f1ec; font-size: 15px; }

footer {
  width: var(--content);
  margin: 0 auto;
  padding: 32px 0 38px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px 40px;
  color: var(--muted);
  font-size: 12px;
}

footer > div:first-child { display: grid; gap: 4px; }
footer > div:first-child strong { color: #e7e5df; font-size: 14px; }

.footer-links {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

footer a { color: #d9b36e; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer p { max-width: 820px; margin: 0; line-height: 1.6; }

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

@media (max-width: 1180px) {
  .project-layout,
  .faq-layout,
  .community-layout { gap: 48px; }

  .project-layout,
  .community-layout {
    grid-template-columns: minmax(0, 1fr) minmax(380px, .85fr);
  }
}

@media (max-width: 980px) {
  .topbar-links { gap: 15px; }
  .topbar-links a:nth-child(2) { display: none; }
  .project-layout,
  .faq-layout,
  .community-layout { grid-template-columns: 1fr; gap: 42px; }
  .filters { grid-template-columns: 1fr 180px; }
  .status-filter { grid-column: 1 / -1; justify-self: start; }
  table { min-width: 1200px; }
  .table-shell {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  th:first-child,
  tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 190px;
    background: var(--surface);
    box-shadow: 1px 0 0 #34393c;
  }

  thead th:first-child {
    z-index: 3;
    background: #111416;
  }

  tbody tr:hover td:first-child { background: #1a1e20; }
}

@media (max-width: 820px) {
  .summary-grid div { padding-inline: 14px; }

  .status-filter {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .status-filter button { padding-inline: 10px; }

  .project-band,
  .start-band,
  .faq-band,
  .community-band { padding-block: 64px; }
}

@media (max-width: 760px) {
  :root { --content: min(100% - 28px, 1240px); }
  .hero,
  .hero-inner { min-height: 520px; }
  .topbar { min-height: 78px; }
  .topbar-links a:first-child,
  .topbar-links a:nth-child(2),
  .topbar-links a:nth-child(3) { display: none; }
  .hero-content { padding: 40px 0; }
  .hero h1 { font-size: 38px; }
  .hero-lead { font-size: 17px; }

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

  .summary-grid div {
    min-height: 72px;
    grid-column: span 2;
    border-left: 0;
  }

  .summary-grid div:first-child { border-left: 1px solid var(--line); }

  .summary-grid div:nth-child(4) {
    grid-column: 1 / span 3;
    border-left: 1px solid var(--line);
  }

  .summary-grid div:nth-child(5) { grid-column: span 3; }

  .directory-heading { align-items: flex-start; }
  .directory-actions { padding-top: 23px; }
  .directory-health span:last-child { display: none; }

  input,
  select,
  .status-filter button { min-height: 44px; }

  .icon-button { width: 44px; height: 44px; }
  .pagination { align-items: flex-start; flex-direction: column; }
  .pagination button { height: 40px; }
  .feature-list { grid-template-columns: 1fr; }
  .feature-list div,
  .feature-list div:nth-child(even) {
    min-height: 0;
    padding: 22px 0;
    border-left: 0;
  }
  .steps { grid-template-columns: 1fr; }
  .steps > div,
  .steps > div:first-child,
  .steps > div:last-child {
    min-height: 0;
    padding: 26px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .steps > div:last-child { border-bottom: 0; }
  .step-number { margin-bottom: 16px; }
  footer { grid-template-columns: 1fr; }
  .footer-links { grid-row: 2; }
}

@media (max-width: 640px) {
  .filters { grid-template-columns: 1fr; }
  .status-filter { grid-column: auto; }
  .directory-intro { max-width: none; }
}

@media (max-width: 560px) {
  .brand strong { font-size: 17px; }
  .brand small { font-size: 11px; }
  .topbar-links { gap: 13px; }
  .topbar-links a { font-size: 12px; }
  .hero h1 { font-size: 34px; }
  .hero-actions,
  .start-actions { display: grid; grid-template-columns: 1fr; }
  .primary-action,
  .secondary-action,
  .support-action { width: 100%; }

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

  .summary-grid div,
  .summary-grid div:nth-child(4),
  .summary-grid div:nth-child(5) {
    grid-column: auto;
    border-left: 0;
  }

  .summary-grid div:nth-child(odd) { border-left: 1px solid var(--line); }
  .summary-grid div:last-child { grid-column: 1 / -1; }

  .directory { padding-top: 40px; }
  .directory-heading { gap: 12px; }
  h2 { font-size: 25px; }
  .status-filter { width: 100%; grid-template-columns: repeat(2, 1fr); }
  .status-filter button:nth-child(2) { border-right: 0; }
  .status-filter button:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .pagination nav { width: 100%; justify-content: space-between; }
  .pagination p { width: 100%; }
  .page-buttons { gap: 3px; }
  .pagination button { min-width: 38px; padding: 0 9px; }

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

  .project-links { display: grid; gap: 14px; }
  .text-link { align-items: flex-start; }

  .community-links a {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
  }

  .project-band,
  .start-band,
  .faq-band,
  .community-band { padding: 54px 0; }
  .footer-links { flex-wrap: wrap; gap: 14px 20px; }
}

@media (max-width: 380px) {
  :root { --content: min(100% - 20px, 1240px); }
  .topbar { gap: 12px; }
  .brand { gap: 8px; }
  .brand img { height: 38px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .topbar-links { gap: 9px; }
  .topbar-links a { font-size: 11px; }
  .hero h1 { font-size: 31px; }
  .hero-lead { font-size: 16px; }

  .primary-action,
  .secondary-action,
  .support-action {
    min-height: 44px;
    padding-inline: 12px;
  }

  .summary-grid div { padding-inline: 11px; }
  .summary-grid span { font-size: 11px; }
  .directory { padding-bottom: 52px; }

  .empty-state,
  .error-state { padding-inline: 20px; }

  .pagination { padding-inline: 10px; }
  .pagination nav { gap: 4px; }
  .page-buttons { gap: 2px; }
  .pagination button { min-width: 36px; padding-inline: 7px; }
  .faq-list summary { padding-right: 22px; }
}
