:root {
  --bg: #000;
  --fg: #ededed;
  --muted: #a0a0a0;
  --dim: #878787;
  --ascii: #8f8f8f;
  --line: #1f1f1f;
  --raise: #1a1a1a;
  --kbd: #2e2e2e;
  --hover: rgb(26 26 26 / 0.3);
  --sans: Geist, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fig: "Fira Mono", "Geist Mono", ui-monospace, monospace;
  --wrap: 72rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.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;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 60;
  background: var(--fg);
  color: var(--bg);
  padding: 8px 12px;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--fg); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
}
.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
}
@media (min-width: 640px) { .header-inner { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1024px) { .header-inner { padding-left: 32px; padding-right: 32px; } }

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.brand-name {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
@media (min-width: 1024px) { .wrap { padding: 0 32px; } }

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin: 16px auto 8px;
}
@media (min-width: 1024px) {
  .hero {
    grid-template-columns: auto 1fr;
    gap: 56px;
    margin-top: 28px;
    margin-bottom: 12px;
    align-items: start;
  }
}

.hero-brand { display: grid; gap: 4px; }
.wordmark-wrap {
  display: flex;
  justify-content: center;
  overflow: hidden;
}
@media (min-width: 1024px) { .wordmark-wrap { justify-content: flex-start; } }
.wordmark {
  margin: 0;
  color: var(--ascii);
  font-family: var(--fig);
  font-size: 12px;
  letter-spacing: -1px;
  line-height: 1.25;
  user-select: none;
}
@media (min-width: 1024px) { .wordmark { font-size: 15px; } }

.kicker {
  margin: 8px 0 0;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  text-align: center;
}
@media (min-width: 1024px) {
  .kicker { font-size: 19px; text-align: left; }
}

.lede {
  margin: 0 0 22px;
  color: var(--dim);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  text-wrap: pretty;
  text-align: center;
}
@media (min-width: 640px) { .lede { font-size: 24px; } }
@media (min-width: 1024px) {
  .lede { font-size: 30px; text-align: left; }
}

.section-label {
  margin: 0 0 14px;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}
.hero-copy .section-label { text-align: left; }
@media (min-width: 640px) and (max-width: 1023px) {
  .hero-copy .section-label { text-align: center; }
}

.try-cmd {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 420px;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 6px;
  background: rgb(26 26 26 / 0.8);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.4;
}
@media (min-width: 640px) and (max-width: 1023px) {
  .try-cmd { margin-left: auto; margin-right: auto; }
}
.try-dollar { color: var(--muted); margin-right: 1ch; }
.try-ph { color: var(--muted); }
.copy-ico,
.search-ico {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background: currentColor;
  opacity: 0.7;
}
.copy-ico {
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' fill-rule='evenodd' d='M2.75.5C1.78.5 1 1.28 1 2.25v7.5c0 .97.78 1.75 1.75 1.75H4.5V10H2.75a.25.25 0 0 1-.25-.25v-7.5c0-.14.11-.25.25-.25h5.5c.14 0 .25.11.25.25V3H10v-.75C10 1.28 9.22.5 8.25.5zm5 4C6.78 4.5 6 5.28 6 6.25v7.5c0 .97.78 1.75 1.75 1.75h5.5c.97 0 1.75-.78 1.75-1.75v-7.5c0-.97-.78-1.75-1.75-1.75zM7.5 6.25c0-.14.11-.25.25-.25h5.5c.14 0 .25.11.25.25v7.5q-.02.23-.25.25h-5.5a.25.25 0 0 1-.25-.25z' clip-rule='evenodd'/></svg>") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' fill-rule='evenodd' d='M2.75.5C1.78.5 1 1.28 1 2.25v7.5c0 .97.78 1.75 1.75 1.75H4.5V10H2.75a.25.25 0 0 1-.25-.25v-7.5c0-.14.11-.25.25-.25h5.5c.14 0 .25.11.25.25V3H10v-.75C10 1.28 9.22.5 8.25.5zm5 4C6.78 4.5 6 5.28 6 6.25v7.5c0 .97.78 1.75 1.75 1.75h5.5c.97 0 1.75-.78 1.75-1.75v-7.5c0-.97-.78-1.75-1.75-1.75zM7.5 6.25c0-.14.11-.25.25-.25h5.5c.14 0 .25.11.25.25v7.5q-.02.23-.25.25h-5.5a.25.25 0 0 1-.25-.25z' clip-rule='evenodd'/></svg>") center / contain no-repeat;
}


.hero-for {
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 13px;
}

.main { padding: 24px 0 64px; }
@media (min-width: 640px) { .main { padding-top: 32px; } }

.board-title { margin-bottom: 8px; }
.meta {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.search {
  position: relative;
  margin-bottom: 16px;
}
.search-ico {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
  pointer-events: none;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.34-4.34'/></svg>") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.34-4.34'/></svg>") center / contain no-repeat;
}
#search-input {
  width: 100%;
  min-height: 44px;
  padding: 12px 40px 12px 28px;
  border: 0;
  border-bottom: 1px solid var(--kbd);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 16px;
}
@media (min-width: 1024px) {
  #search-input {
    font-size: 14px;
    border-bottom-color: var(--fg);
  }
}
#search-input::placeholder { color: var(--dim); }
.search-kbd {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  pointer-events: none;
}
@media (min-width: 640px) { .search-kbd { display: inline-block; } }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 14px;
}
.tab {
  padding: 0 0 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--dim);
  font: inherit;
  cursor: pointer;
}
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.board-head, .row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1.1fr) minmax(0, 1.2fr) 88px 108px;
  gap: 16px;
  align-items: center;
}
.board-head {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--dim);
}
.board { list-style: none; margin: 0; padding: 0; }

.row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.row:hover { background: var(--hover); }

.col-rank {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--dim);
  font-size: 14px;
}
.col-skill, .col-desc { min-width: 0; }
@media (min-width: 1024px) {
  .col-skill {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }
}
.row-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-repo {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 1024px) { .row-repo { margin-top: 0; } }
.row-desc {
  margin: 0;
  font-size: 13px;
  color: var(--dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}
.kind-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ascii);
  white-space: nowrap;
}
.col-act {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--muted);
  border-radius: 6px;
}
.github-link:hover { color: var(--fg); background: var(--raise); }
.github-link svg { width: 16px; height: 16px; fill: currentColor; }

.install-btn {
  min-height: 32px;
  min-width: 56px;
  padding: 0 12px;
  border: 1px solid var(--fg);
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.install-btn:hover { background: var(--fg); color: var(--bg); }

.empty {
  padding: 36px 0;
  text-align: left;
  color: var(--dim);
}
.empty strong { display: block; color: var(--fg); font-weight: 500; margin-bottom: 6px; }

.site-footer {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 32px 16px calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--ascii);
  font-size: 13px;
}
.site-footer p { margin: 0; }
@media (min-width: 640px) { .site-footer { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1024px) { .site-footer { padding-left: 32px; padding-right: 32px; } }

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.72);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(80dvh, 680px);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.modal-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.modal-close {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}
.modal-desc {
  margin: 0 0 12px;
  color: var(--dim);
  font-size: 14px;
  text-wrap: pretty;
}
.modal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.modal-meta a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
}
.modal-meta a:hover { color: var(--fg); }

.install-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 14px;
  text-transform: uppercase;
}
.install-tabs {
  margin-left: auto;
  display: flex;
  gap: 4px;
  text-transform: none;
  font-size: 12px;
}
.install-tabs button {
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.install-tabs button:hover { background: var(--raise); color: var(--fg); }
.install-tabs button[aria-selected="true"] {
  background: var(--raise);
  color: var(--fg);
}

.copy-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: var(--raise);
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.copy-bar:hover { color: var(--fg); }
.copy-bar code {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.copy-bar .try-dollar { opacity: 0.5; }

@media (max-width: 1023px) {
  .board-head { display: none; }
  .row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-areas:
      "rank skill act"
      "rank desc  desc"
      "rank kind  kind";
    align-items: start;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .col-rank { grid-area: rank; padding-top: 2px; }
  .col-skill { grid-area: skill; }
  .col-desc { grid-area: desc; margin-top: 6px; }
  .col-kind { grid-area: kind; margin-top: 8px; }
  .col-act { grid-area: act; }
}

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