:root {
  --bg: #f5f7fb;
  --bg-raised: #eef2f9;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --surface-3: #e9eef7;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #0b1222;
  --text-2: #33405a;
  --muted: #5d6a82;
  --accent: #2557e8;
  --accent-strong: #1d47c7;
  --accent-soft: rgba(37, 87, 232, 0.09);
  --cyan: #0891b2;
  --teal: #0b9f74;
  --official: #0b9f74;
  --official-soft: rgba(11, 159, 116, 0.1);
  --remote: #0284c7;
  --remote-soft: rgba(2, 132, 199, 0.09);
  --danger: #dc2626;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px -18px rgba(15, 23, 42, 0.25);
  --glow: 0 0 0 1px rgba(37, 87, 232, 0.45), 0 16px 36px -20px rgba(37, 87, 232, 0.45);
  --grid-line: rgba(15, 23, 42, 0.05);
  --logo-tile: #ffffff;
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --header-h: 60px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

code,
kbd,
pre {
  font-family: var(--mono);
}

code {
  font-size: 0.88em;
}

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

[hidden] {
  display: none !important;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(1240px, 100% - 40px);
  margin-inline: auto;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lede {
  color: var(--text-2);
  font-size: 17px;
  max-width: 62ch;
}

.grad {
  background: linear-gradient(92deg, var(--accent) 0%, var(--cyan) 55%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 14px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 20px -10px var(--accent);
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.08);
}

.btn-ghost {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
}

.btn .icon svg,
.btn > svg {
  width: 16px;
  height: 16px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: 500 13px var(--font);
  cursor: pointer;
}

.when-on,
[aria-pressed="true"] .when-off,
.is-done .when-off {
  display: none;
}

[aria-pressed="true"] .when-on,
.is-done .when-on {
  display: inline-flex;
}

.when-on,
.when-off {
  align-items: center;
  gap: 8px;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 17px;
  font-weight: 450;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 22px;
  height: 22px;
  flex: none;
}

.brand b {
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.nav-count {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font: 600 11px/16px var(--mono);
  text-align: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.palette-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  min-width: 210px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font: 14px var(--font);
  cursor: pointer;
}

.palette-trigger span {
  flex: 1;
  text-align: left;
}

.palette-trigger:hover {
  border-color: var(--border-strong);
  color: var(--text-2);
}

/* Hero -------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 12% 0%, rgba(59, 116, 255, 0.22), transparent 70%),
    radial-gradient(520px 280px at 88% 20%, rgba(34, 211, 238, 0.14), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero.is-fluid .hero-canvas {
  opacity: 1;
}

.hero.is-fluid .hero-bg {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  align-items: center;
  gap: 40px;
  padding: 72px 0 56px;
}

.hero-preview {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 40px 80px -40px rgba(34, 211, 238, 0.35), var(--shadow);
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
}

.hero-preview::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(140deg, var(--accent), transparent 40%, transparent 60%, var(--cyan));
  opacity: 0.5;
  filter: blur(18px);
}

.preview-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
}

.preview-chrome > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-3);
}

.preview-chrome .tab-list {
  margin: 0 0 -1px 10px;
  border: 0;
}

.preview-stack {
  display: grid;
  gap: 6px;
  padding: 14px 14px 4px;
}

.preview-stack a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.preview-stack a > span:not(.logo) {
  flex: 1;
}

.preview-stack a .icon {
  color: var(--official);
}

.hero-preview [role="tabpanel"] {
  padding: 10px 14px 0;
}

.hero-preview .code {
  margin-bottom: 0;
}

.hero-preview .code pre {
  max-height: 210px;
  font-size: 12px;
}

.preview-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.preview-cta .icon:last-child {
  margin-left: auto;
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--teal);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  from {
    opacity: 0.8;
    transform: scale(0.6);
  }
  to {
    opacity: 0;
    transform: scale(1.8);
  }
}

.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(36px, 5.4vw, 64px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 680px;
  height: 58px;
  margin-top: 30px;
  padding: 0 14px 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.hero-search .icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 17px var(--font);
}

.hero-search input::placeholder {
  color: var(--muted);
}

.hero-search input::-webkit-search-cancel-button {
  filter: grayscale(1);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, max-content));
  gap: 0;
  margin: 44px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  width: fit-content;
  max-width: 100%;
}

.stats div {
  padding: 14px 22px;
  border-right: 1px solid var(--border);
}

.stats div:last-child {
  border-right: 0;
}

.stats dt {
  color: var(--muted);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats dd {
  margin: 8px 0 0;
  font: 700 24px/1 var(--font);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Chips ------------------------------------------------------------------- */

.chips,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text-2);
  font: 500 12.5px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.chip[aria-pressed="true"],
.chip-active {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: var(--accent-soft);
  color: var(--text);
}

.chip .icon {
  width: 12px;
  height: 12px;
}

.chip i,
.lang i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lang);
}

.chip .count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.is-zero {
  opacity: 0.45;
}

/* Explorer ---------------------------------------------------------------- */

.explorer {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 32px;
  padding: 36px 0 24px;
}

.rail {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.rail-head h2 {
  font-size: 15px;
}

.facet {
  margin-bottom: 22px;
}

.facet h2 {
  margin-bottom: 10px;
  color: var(--muted);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.segmented button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: 500 13px var(--font);
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.segmented .count {
  font: 11px var(--mono);
  color: var(--muted);
}

.facet-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facet-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  font: 13.5px/1.25 var(--font);
  text-align: left;
  cursor: pointer;
}

.facet-row:hover {
  background: var(--surface-2);
  color: var(--text);
}

.facet-row[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft);
  color: var(--text);
}

.facet-row .icon {
  color: var(--muted);
}

.facet-row[aria-pressed="true"] .icon {
  color: var(--accent);
}

.facet-label {
  flex: 1;
}

.facet-row .count {
  color: var(--muted);
  font: 11.5px var(--mono);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  margin-bottom: 16px;
}

.rail-open {
  display: none;
}

.result-count {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.toolbar-end {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.select select {
  height: 34px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238693ab' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 9px center / 14px;
  color: var(--text);
  font: 13px var(--font);
  appearance: none;
  cursor: pointer;
}

.view-toggle {
  display: flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}

.view-toggle button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.view-toggle button[aria-pressed="true"] {
  background: var(--surface-3);
  color: var(--text);
}

/* Cards ------------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 70%, var(--bg)));
  box-shadow: var(--shadow);
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-title {
  flex: 1;
  min-width: 0;
}

.card h3 {
  overflow: hidden;
  font-size: 15.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-link {
  text-decoration: none;
}

.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card-link:hover {
  color: inherit;
}

.card-provider {
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-desc {
  display: -webkit-box;
  flex: 1;
  overflow: hidden;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
}

.card-cat {
  margin-left: auto;
  overflow: hidden;
  max-width: 48%;
  color: var(--muted);
  font: 11px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  font: 600 11px/1 var(--font);
  letter-spacing: 0.01em;
}

.badge .icon {
  width: 12px;
  height: 12px;
}

.badge-official {
  border-color: color-mix(in srgb, var(--official) 35%, transparent);
  background: var(--official-soft);
  color: var(--official);
}

.badge-remote {
  border-color: color-mix(in srgb, var(--remote) 35%, transparent);
  background: var(--remote-soft);
  color: var(--remote);
}

.stack-btn {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.stack-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.stack-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.stack-toggle[aria-pressed="true"].btn {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: var(--accent-soft);
}

/* List view */
.grid.is-list {
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.grid.is-list .card {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.grid.is-list .card:last-child {
  border-bottom: 0;
}

.grid.is-list .card:hover {
  background: var(--surface-2);
}

.grid.is-list .card-desc {
  -webkit-line-clamp: 1;
}

.grid.is-list .card-meta {
  flex-wrap: nowrap;
  padding: 0;
  border: 0;
}

.grid.is-list .card-cat {
  display: none;
}

.grid.is-list .card-head {
  min-width: 0;
}

/* Logos */
.logo {
  display: grid;
  flex: none;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--logo-tile);
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-sm {
  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 7px;
}

.logo-md {
  width: 42px;
  height: 42px;
  padding: 7px;
  border-radius: 11px;
}

.logo-lg {
  width: 76px;
  height: 76px;
  padding: 12px;
  border-radius: 18px;
}

.logo-mono {
  padding: 0;
  border-color: transparent;
  background: linear-gradient(135deg, hsl(var(--hue) 70% 52%), hsl(calc(var(--hue) + 40) 70% 38%));
  color: #fff;
  font: 700 14px/1 var(--font);
  letter-spacing: 0.02em;
}

.logo-sm.logo-mono {
  font-size: 10px;
}

.logo-lg.logo-mono {
  font-size: 26px;
}

.logo-glyph {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font: 600 13px var(--mono);
}

.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 64px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
}

.empty p {
  color: var(--muted);
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

/* Home sections ----------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 56px 0 20px;
}

.step {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-n {
  font: 600 12px var(--mono);
  color: var(--accent);
}

.step h2 {
  margin: 10px 0 8px;
  font-size: 18px;
}

.step p {
  color: var(--muted);
  font-size: 14px;
}

.band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-block: 20px 72px;
  padding: 28px 30px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: 18px;
  background:
    radial-gradient(400px 160px at 0% 0%, var(--accent-soft), transparent),
    radial-gradient(400px 160px at 100% 100%, rgba(34, 211, 238, 0.08), transparent),
    var(--surface);
}

.band h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.band p {
  color: var(--muted);
}

.band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Pages ------------------------------------------------------------------- */

.page {
  padding: 40px 0 72px;
}

.page.narrow {
  max-width: 860px;
}

.page-head {
  margin-bottom: 32px;
}

.page-head h1 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.page-head-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.page-head-row h1 {
  margin-top: 0;
}

.page-head-row .muted {
  margin-top: 10px;
  font-size: 14px;
}

.page-head-row .muted a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  text-decoration: none;
}

.page-head .eyebrow .icon {
  width: 14px;
  height: 14px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}

.crumbs a {
  text-decoration: none;
}

.crumbs [aria-current] {
  color: var(--text-2);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.cat-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.cat-tile:hover {
  color: inherit;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.cat-tile h2 {
  font-size: 17px;
}

.cat-tile p {
  flex: 1;
  color: var(--muted);
  font-size: 14px;
}

.cat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

.cat-icon .icon {
  width: 20px;
  height: 20px;
}

.cat-icon-lg {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

.cat-icon-lg .icon {
  width: 30px;
  height: 30px;
}

.cat-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.logo-stack {
  display: flex;
}

.logo-stack .logo {
  margin-right: -6px;
  box-shadow: 0 0 0 2px var(--surface);
}

.other-cats {
  margin-top: 48px;
}

.other-cats h2 {
  margin-bottom: 14px;
  font-size: 16px;
}

/* Server detail ----------------------------------------------------------- */

.detail {
  padding: 32px 0 72px;
}

.detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.detail-title {
  flex: 1;
  min-width: 240px;
}

.detail-title h1 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.detail-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
}

.detail-badges {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  margin-top: 28px;
}

.detail-main,
.detail-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 20px;
}

.panel {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel > h2,
.panel-head h2 {
  font-size: 16px;
}

.panel > h2 {
  margin-bottom: 14px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel > p + *,
.panel > .muted {
  margin-bottom: 14px;
}

.detail-desc {
  margin-bottom: 16px;
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.6;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-raised);
}

.endpoint code {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  color: var(--remote);
}

.install-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tab-list {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.tab-list button {
  height: 36px;
  padding: 0 12px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: 500 13.5px var(--font);
  white-space: nowrap;
  cursor: pointer;
}

.tab-list button:hover {
  color: var(--text);
}

.tab-list button[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.code {
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg-raised);
}

.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px 6px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font: 12px var(--mono);
}

.code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-2);
  font: 500 12px var(--font);
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.copy-btn.is-done {
  border-color: color-mix(in srgb, var(--official) 50%, transparent);
  color: var(--official);
}

.copy-btn .icon {
  width: 14px;
  height: 14px;
}

.copy-btn.btn {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
}

.facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}

.facts div:last-child {
  border-bottom: 0;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  text-align: right;
}

.facts a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--accent);
}

.facts .icon {
  width: 13px;
  height: 13px;
}

.side-links {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.side-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 14px;
  text-decoration: none;
}

.side-links a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.related {
  margin-top: 48px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 20px;
}

.section-head a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
}

/* Stack page -------------------------------------------------------------- */

.stack-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 72px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  text-align: center;
}

.stack-empty-art {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
}

.stack-empty-art .icon {
  width: 34px;
  height: 34px;
}

.stack-layout {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.stack-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
}

.stack-item-text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.stack-item-text a {
  overflow: hidden;
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack-item-text small {
  color: var(--muted);
}

.stack-config-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.stack-local-title {
  margin: 18px 0 6px;
  font-size: 15px;
}

.stack-local {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.stack-local li {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
}

/* Developers -------------------------------------------------------------- */

.page.narrow .panel + .panel {
  margin-top: 16px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font: 500 11px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

td a {
  color: var(--accent);
  text-decoration: none;
}

.notfound {
  display: grid;
  justify-items: start;
  gap: 14px;
  min-height: 50vh;
  align-content: center;
}

.notfound h1 {
  font-size: clamp(32px, 5vw, 52px);
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding: 44px 0 28px;
}

.footer-brand {
  max-width: 360px;
}

.footer-brand p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
}

.footer-cols div {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-cols h2 {
  margin-bottom: 4px;
  color: var(--muted);
  font: 500 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-cols a {
  color: var(--text-2);
  font-size: 14px;
  text-decoration: none;
}

.footer-cols a:hover {
  color: var(--accent);
}

.footer-legal {
  padding: 16px 0 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
}

/* Palette ----------------------------------------------------------------- */

.palette {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 12vh 16px 16px;
}

.palette-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(4px);
}

.palette-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  max-height: 70vh;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 30px 80px -20px rgba(15, 23, 42, 0.35);
  animation: rise 0.16s ease-out;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.palette-input {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.palette-input .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.palette-input input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 16px var(--font);
}

.palette-list {
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
}

.palette-list li[role="option"] {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.palette-list li[aria-selected="true"] {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}

.palette-text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.palette-text b {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-text small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-hint {
  color: var(--muted);
  font: 11px var(--mono);
}

.palette-empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.palette-foot {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.palette-foot kbd {
  height: 18px;
  min-width: 18px;
  margin-right: 2px;
  font-size: 10px;
}

/* Toast ------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1180px) {
  .stats div {
    padding: 12px 16px;
  }
}

@media (max-width: 1080px) {
  .palette-trigger {
    min-width: 0;
  }
  .palette-trigger span,
  .palette-trigger kbd {
    display: none;
  }
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-preview {
    display: none;
  }
  .explorer {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .rail {
    position: static;
    display: none;
    max-height: none;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
  }
  .rail.open {
    display: block;
  }
  .rail-open {
    display: inline-flex;
  }
  .detail-grid,
  .stack-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .grid.is-list .card {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .grid.is-list .card-desc {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 100px;
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 0 12px;
    height: auto;
    padding-top: 10px;
  }
  .nav {
    order: 3;
    width: 100%;
    padding: 6px 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav a {
    flex: none;
  }
  .header-actions .btn {
    display: none;
  }
  .hero-inner {
    padding: 48px 0 36px;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }
  .stats div {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
  }
  .stats dd {
    font-size: 20px;
  }
  .hero-search kbd {
    display: none;
  }
  .toolbar-end {
    width: 100%;
    margin-left: 0;
  }
  .toolbar-end .select {
    flex: 1;
  }
  .toolbar-end select {
    width: 100%;
  }
  .page-head-row {
    flex-direction: column;
  }
  .grid.is-list .card-meta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
