:root {
  color-scheme: dark;
  --bg: #07161b;
  --bg-soft: #0a2024;
  --panel: #0d2429;
  --panel-raised: #112d31;
  --line: #224148;
  --line-strong: #326068;
  --text: #f3faf9;
  --muted: #9fb8b8;
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --accent-ink: #032b29;
  --lime: #a3e635;
  --warning: #f8c15c;
  --danger: #ff8a80;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f8f7;
  --bg-soft: #e5f2f0;
  --panel: #ffffff;
  --panel-raised: #f7fbfa;
  --line: #c9dcda;
  --line-strong: #a5c6c2;
  --text: #102b2d;
  --muted: #526f71;
  --accent: #087f74;
  --accent-strong: #076a62;
  --accent-ink: #ffffff;
  --lime: #4d7c0f;
  --warning: #8a5a00;
  --danger: #b42318;
  --shadow: 0 24px 70px rgba(26, 71, 72, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% -12%, rgba(45, 212, 191, 0.18), transparent 32rem),
    radial-gradient(circle at 92% 8%, rgba(163, 230, 53, 0.07), transparent 26rem),
    var(--bg);
  color: var(--text);
}

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

a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
}

button,
.button {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-raised);
  color: var(--text);
  cursor: pointer;
}

button:hover,
.button:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(45, 212, 191, 0.36);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.skip-link:focus {
  top: 16px;
}

.site-header,
main,
.site-footer {
  width: min(1420px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.site-brand:hover {
  text-decoration: none;
}

.site-brand img {
  flex: 0 0 auto;
}

.site-brand span {
  display: grid;
  gap: 1px;
}

.site-brand strong {
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.site-brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav a,
nav button {
  color: var(--muted);
  font-size: 0.92rem;
}

nav button {
  min-height: 38px;
  padding: 0 12px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.72fr);
  gap: clamp(30px, 5vw, 86px);
  align-items: center;
  min-height: 570px;
  padding: 62px clamp(30px, 5vw, 78px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(13, 36, 41, 0.96), rgba(7, 22, 27, 0.78));
  box-shadow: var(--shadow);
  overflow: hidden;
}

:root[data-theme="light"] .hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(229, 242, 240, 0.82));
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.025em;
}

h1 {
  max-width: 840px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 6.4vw, 6.2rem);
  line-height: 0.98;
}

.lede {
  max-width: 760px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.6vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-weight: 700;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.button.secondary {
  background: transparent;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px;
  margin: 46px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.metrics div {
  padding-right: 16px;
}

.metrics div + div {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.metrics dt {
  color: var(--accent-strong);
  font-size: 2rem;
  font-weight: 800;
}

.metrics dd {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.trust-card {
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(17, 45, 49, 0.82);
}

:root[data-theme="light"] .trust-card {
  background: rgba(255, 255, 255, 0.86);
}

.trust-card img {
  display: block;
  margin-bottom: 22px;
}

.card-kicker {
  margin-bottom: 6px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.trust-card h2 {
  margin-bottom: 14px;
  font-size: 2rem;
}

.trust-card p {
  color: var(--muted);
  line-height: 1.6;
}

.catalog-section {
  padding: 116px 0 38px;
  scroll-margin-top: 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.section-heading h2,
.catalog-notes h2 {
  margin-bottom: 0;
  font-size: clamp(2.1rem, 4vw, 3.6rem);
}

.section-heading > p {
  max-width: 440px;
  margin-bottom: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.toolbar {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(13, 36, 41, 0.9);
}

:root[data-theme="light"] .toolbar {
  background: rgba(255, 255, 255, 0.92);
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 0 13px;
}

.search-field input {
  min-height: 58px;
  padding-inline: 17px;
  font-size: 1.02rem;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.quick-filters > span {
  margin-right: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.quick-filter {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.84rem;
}

.results-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  color: var(--muted);
}

.results-summary strong {
  color: var(--accent-strong);
  font-size: 1.08rem;
}

.results-summary button {
  padding: 0 15px;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(13, 36, 41, 0.76);
  overflow: hidden;
}

:root[data-theme="light"] .table-wrap {
  background: rgba(255, 255, 255, 0.92);
}

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

th:nth-child(1),
td:nth-child(1) { width: 29%; }
th:nth-child(2),
td:nth-child(2) { width: 14%; }
th:nth-child(3),
td:nth-child(3) { width: 17%; }
th:nth-child(4),
td:nth-child(4) { width: 11%; }
th:nth-child(5),
td:nth-child(5) { width: 12%; }
th:nth-child(6),
td:nth-child(6) { width: 17%; }

thead {
  background: var(--panel-raised);
}

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

th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr:hover {
  background: rgba(45, 212, 191, 0.055);
}

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

.app-name {
  margin-bottom: 6px;
  font-size: 1.02rem;
  font-weight: 750;
}

.desc,
.meta {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 3px 7px;
  color: var(--muted);
  background: rgba(7, 22, 27, 0.42);
  font-size: 0.78rem;
}

:root[data-theme="light"] .tag {
  background: var(--bg-soft);
}

a.tag.install {
  border-color: rgba(45, 212, 191, 0.46);
  color: var(--accent-strong);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.status.active .dot { background: var(--accent); }
.status.stale .dot,
.status.deprecated .dot,
.status.archived .dot { background: var(--warning); }

.empty {
  display: grid;
  gap: 7px;
  padding: 42px;
  color: var(--muted);
  text-align: center;
}

.empty[hidden] {
  display: none;
}

.empty strong {
  color: var(--text);
  font-size: 1.1rem;
}

.catalog-notes {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.4fr);
  gap: clamp(32px, 6vw, 100px);
  padding: 112px 0;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.note-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.note-grid h3 {
  margin-bottom: 12px;
  font-size: 1.12rem;
}

.note-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.site-footer p {
  margin: 0;
}

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

  .trust-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 24px;
    align-items: center;
  }

  .trust-card img {
    grid-row: 1 / 5;
    margin: 0;
  }

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

  th:nth-child(4),
  td:nth-child(4) {
    display: none;
  }

  .catalog-notes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 24px, 1420px);
  }

  .site-header,
  nav,
  .section-heading,
  .results-summary,
  .site-footer {
    align-items: stretch;
  }

  .site-header,
  .section-heading,
  .site-footer {
    display: grid;
  }

  nav {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  nav button {
    margin-left: auto;
  }

  .hero {
    min-height: 0;
    padding: 42px 24px;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 4.3rem);
  }

  .metrics {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .metrics div + div {
    padding: 18px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .trust-card {
    display: block;
    padding: 24px;
  }

  .trust-card img {
    width: 82px;
    height: 82px;
    margin-bottom: 20px;
  }

  .catalog-section {
    padding-top: 84px;
  }

  .filters,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .results-summary {
    display: flex;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

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

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

  th:nth-child(n),
  td:nth-child(n) {
    display: block;
    width: 100%;
  }

  td {
    border: 0;
    padding: 8px 14px;
  }

  td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
