:root {
  --page: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --ink: #17151f;
  --muted: #6c6875;
  --quiet: #9b98a5;
  --line: #e7e4ed;
  --line-strong: #d7d2df;
  --brand: #6c42f5;
  --brand-ink: #3c1aaf;
  --success: #16a05d;
  --danger: #c43b58;
  --shadow: 0 22px 55px rgba(44, 35, 71, 0.08);
  --radius: 14px;
  --mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  --sans: Inter, "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: var(--sans);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 247, 245, 0.94)),
    radial-gradient(circle at 50% -8%, rgba(108, 66, 245, 0.13), transparent 34%),
    var(--page);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(108, 66, 245, 0.28);
  outline-offset: 3px;
}

.site-shell {
  width: min(1280px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  padding: 0 18px;
}

.brand,
.topnav,
.top-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  text-decoration: none;
  color: #20192d;
}

.brand-logo {
  display: block;
  width: auto;
  height: 34px;
  object-fit: contain;
}

.topnav {
  gap: 18px;
  justify-content: center;
}

.topnav a,
.donate-link {
  text-decoration: none;
  color: #54505d;
  font-size: 13px;
  font-weight: 650;
}

.topnav a:hover,
.donate-link:hover {
  color: var(--brand-ink);
}

.top-actions {
  gap: 14px;
  justify-content: flex-end;
}

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  padding: 22px 18px;
}

.filter-group {
  display: grid;
  gap: 18px;
}

.filter-group summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  color: #22202b;
}

.filter-block {
  margin-top: 18px;
}

.filter-block h2 {
  margin: 0 0 10px;
  color: #777381;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chip {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f0eef5;
  color: #35313f;
  padding: 0 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.category-chip:hover,
.category-chip.is-active {
  border-color: #d7cffb;
  color: var(--brand-ink);
  background: #ebe6ff;
}

.check-row {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #36323f;
  font-size: 13px;
  font-weight: 600;
}

.check-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

.secure-card {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5fbf8;
  padding: 14px;
}

.secure-card span {
  display: block;
  color: var(--success);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.secure-card strong {
  display: block;
  margin-top: 8px;
  color: #272331;
  font-size: 12px;
  line-height: 1.35;
}

.main-panel {
  padding: 42px 38px 36px;
}

.standalone-page {
  max-width: 1180px;
  margin: 0 auto;
}

.hero {
  max-width: 920px;
}

.eyebrow {
  margin: 0;
  color: #8a8495;
  font-size: 13px;
  font-weight: 750;
}

h1 {
  margin: 8px 0 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  color: #15131c;
}

h1 span {
  color: #7b7784;
}

.subhead {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.search-wrap {
  width: min(620px, 100%);
  min-height: 48px;
  margin-top: 26px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 0 14px;
  color: #8a8495;
  box-shadow: 0 12px 36px rgba(51, 44, 69, 0.06);
}

.search-wrap span {
  font-size: 12px;
  font-weight: 800;
}

.search-wrap input {
  min-width: 0;
  min-height: 44px;
  border: 0;
  outline: 0;
  color: #211d2b;
  font-size: 14px;
}

.search-wrap input::placeholder {
  color: #aaa5b2;
}

.tools-card {
  margin-top: 34px;
}

.tools-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.tools-head h2 {
  margin: 0;
  color: #211d2b;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.tools-head p {
  margin: 4px 0 0;
  color: #8a8495;
  font-size: 13px;
}

.sort-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: #4c4658;
  padding: 0 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.sort-button:hover {
  border-color: #cec6f6;
  color: var(--brand-ink);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
}

.software-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 270px));
}

.tool-card {
  position: relative;
  min-height: 218px;
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: inherit;
  padding: 18px;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(44, 35, 71, 0.04);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.tool-card:hover,
.tool-card.is-featured {
  border-color: #cec6f6;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tool-card[hidden] {
  display: none;
}

.tool-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f4f2f8;
  color: #17151f;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 850;
}

.software-card {
  min-height: 336px;
}

.software-logo-frame {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(108, 66, 245, 0.08), transparent 48%),
    #fbfafc;
}

.software-logo-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.software-badge {
  color: #e26d20;
}

.software-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.software-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #faf9fc;
  color: #5f596b;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
}

.download-checksum {
  max-width: 820px;
  overflow-wrap: anywhere;
}

.download-checksum code {
  color: #3f394b;
  font-family: var(--mono);
  font-size: 11px;
}

.tool-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--success);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.api-badge {
  color: var(--brand);
}

.tool-name {
  display: block;
  margin-top: 8px;
  color: #201d2a;
  font-size: 15px;
  font-weight: 850;
}

.tool-copy {
  display: block;
  color: #7a7583;
  font-size: 12px;
  line-height: 1.45;
}

.tool-actions {
  align-self: end;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tool-actions span,
.tool-actions strong {
  font-size: 11px;
}

.tool-actions span {
  color: #9a95a5;
}

.tool-actions strong {
  color: #201d2a;
  font-weight: 850;
}

.empty-state {
  display: none;
  margin-top: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: #716b7d;
  padding: 20px;
  text-align: center;
  font-size: 14px;
}

.feature-panel {
  margin-top: 34px;
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(108, 66, 245, 0.08), transparent 42%),
    #ffffff;
  padding: 26px 28px;
  box-shadow: var(--shadow);
}

.panel-kicker {
  margin: 0 0 8px;
  color: #8d8796;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-panel h2 {
  margin: 0;
  color: #1c1926;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.feature-panel p:not(.panel-kicker) {
  margin: 8px 0 0;
  color: #706b7b;
  font-size: 14px;
}

#featured-version {
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: #5e5869;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
}

.footer-card {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.manifesto-grid {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.footer-card h2 {
  margin: 0;
  color: #201d2a;
  font-size: 18px;
}

.footer-card p {
  margin: 8px 0 0;
  color: #716b7d;
  font-size: 14px;
  line-height: 1.5;
}

.footer-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a,
.donate-box a {
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.footer-links a:hover,
.donate-box a:hover {
  text-decoration: underline;
}

.donate-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 12px;
}

.donate-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.donate-copy p {
  margin: 0;
}

.kofi-button {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  line-height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.kofi-button img {
  display: block;
  height: 36px;
  max-width: 100%;
  border: 0;
}

.btc-line,
.btc-link {
  overflow-wrap: anywhere;
}

.donate-box.blink-attention,
#donate:target {
  animation: donateBlink 0.55s ease-in-out 5;
}

@keyframes donateBlink {
  0%,
  100% {
    border-color: var(--line);
    box-shadow: none;
  }

  50% {
    border-color: var(--brand);
    box-shadow: 0 0 0 5px rgba(108, 66, 245, 0.18), var(--shadow);
  }
}

.donate-qr {
  width: 92px;
  height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 5px;
}

.copyright {
  grid-column: 1 / -1;
  margin: 0;
  color: #9a95a5;
  font-size: 12px;
}

.launch-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.launch-card {
  width: min(620px, 94vw);
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 24px;
  box-shadow: var(--shadow);
}

.launch-card h1 {
  margin: 0;
  color: #17151f;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.footer-copy {
  margin: 10px 0 0;
  color: #716b7d;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 1120px) {
  .tools-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
  }

  .topnav,
  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main-panel {
    padding: 28px 18px;
  }

  .tools-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .footer-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 38px;
  }

  .tools-head,
  .feature-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .donate-box {
    grid-template-columns: 1fr;
  }
}
