:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #5b6670;
  --line: #d8e2e1;
  --paper: #ffffff;
  --soft: #f4f8f7;
  --leaf: #2f7d5a;
  --blue: #376b93;
  --coral: #c46a53;
  --violet: #725a91;
  --slate: #34424d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--soft);
  color: var(--ink);
  margin: 0;
}

a {
  color: inherit;
}

.index-topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 52px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  font-weight: 850;
  text-decoration: none;
}

.brand img {
  height: 34px;
  width: 34px;
}

.index-topbar nav,
.group-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.index-topbar nav a,
.group-tabs button {
  background: #eef4f3;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--slate);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  padding: 8px 10px;
  text-decoration: none;
}

.index-topbar nav a:hover,
.group-tabs button:hover,
.group-tabs button.active {
  background: var(--ink);
  color: #fff;
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(22px, 4vw, 46px) clamp(16px, 4vw, 28px) 56px;
}

.hero {
  align-items: stretch;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
  margin-bottom: 20px;
}

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

h1 {
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  letter-spacing: 0;
  line-height: 0.96;
  margin: 0 0 14px;
}

.hero-copy {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
  margin: 0;
  max-width: 760px;
}

.hero-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  min-height: 142px;
  padding: 20px;
}

.hero-panel span {
  color: var(--muted);
  font-weight: 750;
}

.hero-panel strong {
  color: var(--blue);
  font-size: 1.45rem;
}

.toolbar {
  align-items: end;
  background: #eaf1ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 0.4fr) minmax(0, 1fr);
  margin: 0 0 22px;
  padding: 14px;
}

.search-field {
  display: grid;
  gap: 6px;
}

.search-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-field input {
  background: #fff;
  border: 1px solid #cbd8d7;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

.route-groups {
  display: grid;
  gap: 18px;
}

.route-group {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.route-group header {
  align-items: center;
  background: #fbfdfc;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 15px 16px;
}

.route-group h2 {
  font-size: 1.05rem;
  letter-spacing: 0;
  margin: 0;
}

.count-badge {
  background: #eef4f3;
  border-radius: 8px;
  color: var(--slate);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 8px;
}

.route-list {
  display: grid;
}

.route-row {
  align-items: center;
  border-bottom: 1px solid #edf2f1;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(170px, 0.22fr) minmax(0, 1fr) minmax(130px, 0.18fr);
  padding: 13px 16px;
}

.route-row:last-child {
  border-bottom: 0;
}

.route-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.route-title strong {
  font-size: 0.96rem;
}

.route-title span,
.route-description {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.route-path {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.route-path a,
.route-path code {
  background: #f5f8f7;
  border: 1px solid #dfe7e5;
  border-radius: 8px;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
  padding: 6px 8px;
  text-decoration: none;
}

.route-path a:hover {
  border-color: var(--blue);
}

.meta {
  align-items: end;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pill {
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 850;
  padding: 5px 7px;
  text-transform: uppercase;
}

.pill.public,
.pill.public_file,
.pill.public_mock,
.pill.public_or_mock,
.pill.public_login_screen,
.pill.public_token {
  background: #e5f3ec;
  color: #246746;
}

.pill.login {
  background: #e7eef6;
  color: #28577a;
}

.pill.file_if_exists {
  background: #f6eadf;
  color: #8a4b32;
}

.pill.method {
  background: #eeeaf4;
  color: #624b7d;
}

.empty-state,
.error-state {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 20px;
}

@media (max-width: 780px) {
  .index-topbar,
  .hero,
  .toolbar,
  .route-row {
    grid-template-columns: 1fr;
  }

  .index-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .index-topbar nav,
  .group-tabs {
    justify-content: flex-start;
  }

  .meta {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
}
