@font-face {
  font-family: "Ubuntu Sans";
  src: url("/fonts/UbuntuSans.ttf") format("truetype");
  font-weight: 100 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
:root {
  --charcoal: #17191A;
  --raised: #202325;
  --raised-2: #272B2D;
  --line: #2E3335;
  --white: #FFFFFF;
  --soft: #E9ECEE;
  --fog: #969EA2;
  --good: #9BE3B4;
  --warn: #FFD27A;
  --bad: #FF8A80;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { background: var(--charcoal); color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--soft);
  font: 400 17px/1.55 "Ubuntu Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- top bar ---- */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgb(23 25 26 / .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms;
}
.bar.scrolled { border-bottom-color: var(--line); }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--white);
  font-weight: 500;
  font-size: 18px;
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; }
.nav a {
  position: relative;
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--fog);
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms, background 160ms;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:hover { color: var(--white); background: var(--raised); }
.nav a[aria-current="page"] { color: var(--white); background: var(--raised-2); }
.nav a.download {
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: var(--charcoal);
}
.nav a.download:hover { background: var(--soft); }
.nav a.download svg { width: 18px; height: 18px; }
@media (max-width: 560px) {
  .brand span { display: none; }
  .nav a { padding: 8px 12px; }
  .nav a.download .long { display: none; }
}

/* ---- shared pieces ---- */
.wrap { max-width: 980px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--charcoal);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms, transform 160ms var(--ease);
}
.pill:hover { background: var(--soft); }
.pill:active { transform: scale(.97); }
.pill.quiet { background: var(--raised); color: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.pill.quiet:hover { background: var(--raised-2); }
.pill.danger { background: var(--raised); color: var(--bad); box-shadow: inset 0 0 0 1px #4a3533; }
.pill[disabled] { opacity: .5; cursor: default; }
.muted { color: var(--fog); }
.footer { padding: 56px 24px 48px; text-align: center; color: var(--fog); font-size: 14px; }
.footer a { color: var(--soft); }

.search {
  position: relative;
  width: 100%;
}
.search svg {
  position: absolute;
  left: 20px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  color: var(--fog);
  pointer-events: none;
}
.search input {
  width: 100%;
  padding: 17px 22px 17px 56px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--raised);
  color: var(--white);
  font-size: 18px;
  transition: border-color 160ms, background 160ms;
}
.search input::placeholder { color: var(--fog); }
.search input:focus { outline: none; border-color: var(--fog); background: var(--raised-2); }
.search kbd {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--fog);
  font: 13px "Ubuntu Sans", sans-serif;
}
.search input:focus + kbd, .search input:not(:placeholder-shown) + kbd { display: none; }

/* ---- app rows ---- */
.apps { list-style: none; margin: 0; padding: 0; }
.app {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 2px 20px;
  align-items: center;
  padding: 16px 14px;
  margin: 0 -14px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 160ms;
}
.app:hover { background: var(--raised); }
.app img { width: 60px; height: 60px; border-radius: 15px; grid-row: span 2; background: var(--raised-2); }
.app h3 { margin: 0; color: var(--white); font-size: 19px; font-weight: 500; line-height: 1.25; }
.app p { margin: 0; color: var(--fog); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app .pill { grid-row: span 2; padding: 10px 20px; }
.app .tag { color: var(--fog); font-size: 13px; }
@media (max-width: 560px) {
  .app { grid-template-columns: 52px 1fr; }
  .app img { width: 52px; height: 52px; border-radius: 13px; }
  .app .pill { display: none; }
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 44px 0 8px;
}
.section-head h2 { margin: 0; color: var(--white); font-size: 24px; font-weight: 500; }
.section-head a { color: var(--fog); font-size: 15px; text-decoration: none; }
.section-head a:hover { color: var(--white); }
.empty { padding: 28px 0; color: var(--fog); }
.empty a { color: var(--white); }

/* ---- VirusTotal result ---- */
.vt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line);
}
.vt .ring {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  background:
    radial-gradient(closest-side, var(--raised) 78%, transparent 80%),
    conic-gradient(var(--ring, var(--fog)) calc(var(--p, 0) * 1%), var(--line) 0);
}
.vt.clean { --ring: var(--good); }
.vt.warn { --ring: var(--warn); }
.vt.bad { --ring: var(--bad); }
.vt.wait .ring { animation: spin 1.4s linear infinite; background:
    radial-gradient(closest-side, var(--raised) 78%, transparent 80%),
    conic-gradient(var(--fog) 25%, var(--line) 0); }
.vt b { color: var(--white); font-weight: 500; }
.vt div { line-height: 1.4; }
.vt a { color: var(--soft); font-size: 14px; }
@keyframes spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .vt.wait .ring { animation: none; } }

/* ---- app sheet ---- */
dialog.sheet {
  width: min(640px, 100vw);
  max-height: min(88vh, 900px);
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 28px 28px 0 0;
  background: var(--raised);
  color: var(--soft);
  box-shadow: 0 -1px 0 var(--line);
}
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 28px; } }
dialog.sheet::backdrop { background: rgb(10 11 12 / .6); backdrop-filter: blur(3px); }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: sheet-in 320ms var(--ease); }
  dialog.sheet[open]::backdrop { animation: fade-in 240ms ease; }
  dialog.sheet.closing { animation: sheet-out 200ms ease-in forwards; }
  dialog.sheet.closing::backdrop { animation: fade-in 200ms ease reverse forwards; }
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
@keyframes sheet-out { to { transform: translateY(30px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
.sheet .inner { padding: 28px clamp(20px, 5vw, 36px) 32px; }
.sheet header { display: flex; gap: 20px; align-items: center; }
.sheet header img { width: 88px; height: 88px; border-radius: 22px; }
.sheet h2 { margin: 0; color: var(--white); font-size: 28px; font-weight: 500; line-height: 1.15; }
.sheet .close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--raised-2);
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
}
.sheet .desc { white-space: pre-line; margin: 22px 0; max-width: 60ch; }
.sheet dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 20px 0; font-size: 15px; }
.sheet dt { color: var(--fog); }
.sheet dd { margin: 0; color: var(--soft); }
.sheet code, .mono { font: 13px/1.5 ui-monospace, "SF Mono", monospace; word-break: break-all; }
.sheet .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* ---- forms ---- */
.field { display: grid; gap: 8px; margin-bottom: 22px; }
.field label { color: var(--white); font-weight: 500; }
.field .hint { color: var(--fog); font-size: 14px; margin-top: -4px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--raised);
  color: var(--white);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--fog); }
.field .count { justify-self: end; color: var(--fog); font-size: 13px; margin-top: -4px; }
.error-text { color: var(--bad); }
