/* stakk: the public download pages. Light and dark follow the system. */
@font-face {
  font-family: "Inter";
  src: url("/_stakk/static/fonts/inter-var.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --line: #e2e5ea;
  --line-strong: #cfd4dc;
  --text: #15181d;
  --muted: #5b6370;
  --accent: #2456d3;
  --accent-ink: #ffffff;
  --focus: #2456d3;
  --code-bg: #f0f2f5;
  --ok: #1b7339;
  --warn: #8f5300;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f13;
    --surface: #15181e;
    --surface-2: #1c2028;
    --line: #262b34;
    --line-strong: #353b47;
    --text: #e7e9ed;
    --muted: #9ba3b1;
    --accent: #7299f4;
    --accent-ink: #0d0f13;
    --focus: #7299f4;
    --code-bg: #1c2028;
    --ok: #5cc98a;
    --warn: #e8b04a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip { position: absolute; left: 16px; top: -48px; padding: 8px 12px; background: var(--surface); border-radius: 8px; z-index: 5; }
.skip:focus { top: 8px; }

.mono, code, pre {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
}

.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top .inner, .main, .foot {
  max-width: 920px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.top .inner { min-height: 64px; display: flex; align-items: center; }
.site { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 18px; }
.site .mark { width: 24px; height: 24px; flex: none; }
.site .mark .b1 { fill: var(--accent); }
.site .mark .b2 { fill: var(--accent); opacity: 0.62; }
.site .mark .b3 { fill: var(--accent); opacity: 0.32; }

.main { flex: 1 0 auto; width: 100%; padding-top: 44px; padding-bottom: 64px; }
.foot { width: 100%; }
h1 { margin: 0; font-size: 32px; font-weight: 400; letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.lead { margin: 6px 0 30px; color: var(--muted); }
.section { font-size: 13px; font-weight: 400; color: var(--muted); margin: 38px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }

.files, .list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.file { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.file:last-child, .list li:last-child { border-bottom: 0; }
.file-name { font-size: 15.5px; overflow-wrap: anywhere; }
.file-meta { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 3px; }
.list li { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.list a { overflow-wrap: anywhere; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 16px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.07); }

.cmd { margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--code-bg); overflow-x: auto; }
.cmd code { white-space: pre-wrap; overflow-wrap: anywhere; }

.foot { padding-top: 22px; padding-bottom: 34px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
  h1 { font-size: 26px; }
  .file { grid-template-columns: 1fr; gap: 10px; padding: 16px; }
  .btn { width: 100%; }
  .list li { padding: 14px 16px; }
}

/* The signature of a version. */
.sig { display: flex; align-items: center; gap: 8px; margin: -18px 0 30px; font-size: 0.95rem; }
.sig::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.sig.verified { color: var(--ok); }
.sig.verified::before { background: var(--ok); }
.sig.unverified { color: var(--warn); }
.sig.unverified::before { background: var(--warn); }
.sig .muted { color: var(--muted); }

/* The operator's imprint and privacy policy at the foot. */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.foot .legal { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot .legal a { color: var(--muted); }
.foot .legal a:hover { color: var(--text); }

/* The operator's imprint, privacy policy and terms of use. */
.legal-page { max-width: 46rem; }
.legal-page h2 { font-size: 17px; font-weight: 500; margin: 28px 0 8px; }
.legal-page p { margin: 0 0 12px; line-height: 1.6; overflow-wrap: anywhere; }

/* The index: one card per package, its newest version and date. */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; height: 100%;
  padding: 18px 44px 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); text-decoration: none;
}
.card:hover { border-color: var(--line-strong); }
.card:hover .card-go { color: var(--accent); }
.card-name { font-size: 16.5px; overflow-wrap: anywhere; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.card-go { position: absolute; right: 16px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--muted); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-size: 12.5px; }

/* Nothing here (yet), or not found: a calm note, not a bare line. */
.empty {
  margin-top: 28px; padding: 48px 24px; text-align: center;
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 14px;
}
.empty h1 { font-size: 26px; }
.empty h2 { margin: 0; font-size: 20px; font-weight: 400; }
.empty p { max-width: 34rem; margin: 10px auto 0; color: var(--muted); }
.empty .empty-actions { margin-top: 22px; }
.empty-mark { width: 44px; height: 44px; margin-bottom: 14px; }
.empty-mark rect { fill: var(--line-strong); }
.empty-mark rect:last-child { fill: var(--accent); opacity: 0.55; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
@media (max-width: 640px) {
  .empty { padding: 36px 18px; }
  .empty .btn { width: auto; }
}

/* E-mail and phone of the operator, shown on request. */
.link-btn { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-btn:hover { text-decoration-thickness: 2px; }
