:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #eef5f6;
  --text: #17212b;
  --muted: #5c6a76;
  --faint: #81909f;
  --border: #dfe7ee;
  --border-strong: #c4d2dc;
  --accent: #176b87;
  --accent-strong: #0d4f66;
  --accent-soft: #dff0f3;
  --green: #32765a;
  --shadow: 0 18px 45px rgba(23, 33, 43, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(223, 240, 243, 0.72) 0, rgba(247, 249, 252, 0) 320px),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui,
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(20px, 4vw, 52px);
  background: rgba(247, 249, 252, 0.88);
  border-bottom: 1px solid rgba(196, 210, 220, 0.74);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(23, 107, 135, 0.12);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.12;
  font-weight: 780;
}

.brand p,
.table-heading p,
.footer,
.quick-pick span,
.summary span {
  color: var(--muted);
}

.brand p {
  margin-top: 4px;
  font-size: 14px;
}

.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--accent-strong);
  background: var(--surface);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.layout {
  display: grid;
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
  gap: 24px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 26px clamp(18px, 4vw, 52px) 20px;
}

.side {
  position: sticky;
  top: 102px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.picker,
.summary,
.content {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.picker {
  padding: 18px;
}

.picker h2,
.table-heading h2 {
  font-size: 18px;
  line-height: 1.25;
}

.quick-pick {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.quick-pick button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfdfe;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.quick-pick button:hover,
.quick-pick button:focus-visible,
.tabs button:hover,
.tabs button:focus-visible,
.source-link:hover,
.source-link:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.quick-pick strong {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 720;
}

.quick-pick span {
  align-self: center;
  font-size: 12px;
  font-weight: 700;
}

.summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.summary div {
  padding: 16px;
}

.summary div + div {
  border-left: 1px solid var(--border);
}

.summary strong {
  display: block;
  color: var(--accent-strong);
  font-size: 28px;
  line-height: 1;
}

.summary span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

.content {
  min-width: 0;
  overflow: hidden;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.search-wrap {
  position: relative;
}

.search-wrap svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  color: var(--faint);
  transform: translateY(-50%);
}

.search-wrap input {
  width: 100%;
  min-height: 42px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fbfdfe;
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 135, 0.12);
}

.icon-button {
  display: grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent-strong);
  cursor: pointer;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 16px 0;
  scrollbar-width: thin;
}

.tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 680;
}

.tabs button[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.table-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 16px 14px;
}

.table-heading p {
  margin-top: 5px;
  font-size: 13px;
}

.table-heading select {
  min-height: 38px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

.table-shell {
  position: relative;
  overflow-x: auto;
  border-top: 1px solid var(--border);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

thead {
  background: #edf5f7;
}

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

th {
  color: #44515d;
  font-size: 12px;
  font-weight: 780;
}

td {
  font-size: 14px;
  line-height: 1.58;
}

tbody tr {
  background: rgba(255, 255, 255, 0.82);
}

tbody tr:nth-child(even) {
  background: #f8fbfc;
}

tbody tr:hover {
  background: #edf7f9;
}

.plugin-name {
  width: 18%;
  min-width: 180px;
  color: var(--accent-strong);
  font-weight: 780;
}

.category-cell {
  width: 13%;
  min-width: 128px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #c7dde3;
  border-radius: 6px;
  background: #f1fafb;
  color: var(--green);
  font-size: 12px;
  font-weight: 720;
}

.empty-state {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
}

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

.empty-state strong {
  color: var(--text);
  font-size: 18px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 16px clamp(18px, 4vw, 52px) 30px;
  font-size: 13px;
}

mark {
  border-radius: 4px;
  background: #fff1a8;
  color: inherit;
  padding: 0 2px;
}

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

  .side {
    position: static;
  }

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

}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    position: static;
  }

  .source-link {
    width: 100%;
  }

  .layout {
    padding-inline: 12px;
  }

  .quick-pick {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .table-heading {
    padding-inline: 12px;
  }

  .table-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .tabs {
    padding-inline: 12px;
  }

  .table-shell {
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody tr {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
  }

  td {
    padding: 0;
    border: 0;
  }

  td + td {
    margin-top: 8px;
  }

  td::before {
    display: block;
    margin-bottom: 3px;
    color: var(--faint);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 780;
  }

  .plugin-name,
  .category-cell {
    width: auto;
    min-width: 0;
  }

  .footer {
    flex-direction: column;
    padding-inline: 12px;
  }
}
