/* Lifted from projectbluefin.io/server: its color tokens, the translucent
   blurred cards over the wallpaper, uppercase eyebrows, mono version chips,
   the pill tab strip and the window chrome around the app screenshot. */
:root {
  color-scheme: light;
  --bg: #f1f6f8;
  --bg-rgb: 241, 246, 248;
  --bg-raised: #fff;
  --text: #405467;
  --text-strong: #132b3a;
  --border: #b4c4ce;
  --border-strong: #a4b8c5;
  --blue: #2059ae;
  --blue-rgb: 32, 89, 174;
  --blue-light: #184985;
  --card: rgba(19, 43, 58, .03);
  --card-hover: rgba(19, 43, 58, .07);
  --tab-bg: #e2eaef;
  --wallpaper: url("https://projectbluefin.io/img/wallpapers/bluefin-08-day.webp");
  --danger: #c01c28;
  /* dataviz reference palette, light steps, fixed order */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --mono: "JetBrains Mono", ui-monospace, "Courier New", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c1016;
    --bg-rgb: 12, 16, 22;
    --bg-raised: #10151f;
    --text: #bdbdbd;
    --text-strong: #fff;
    --border: #272727;
    --border-strong: #616161;
    --blue: #4285f4;
    --blue-rgb: 108, 122, 233;
    --blue-light: #8a97f7;
    --card: rgba(255, 255, 255, .03);
    --card-hover: rgba(255, 255, 255, .07);
    --tab-bg: #303030;
    --wallpaper: url("https://projectbluefin.io/evening/august-night.webp");
    --danger: #ff6b6b;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1016; --bg-rgb: 12, 16, 22; --bg-raised: #10151f;
  --text: #bdbdbd; --text-strong: #fff; --border: #272727; --border-strong: #616161;
  --blue: #4285f4; --blue-rgb: 108, 122, 233; --blue-light: #8a97f7;
  --card: rgba(255, 255, 255, .03); --card-hover: rgba(255, 255, 255, .07);
  --tab-bg: #303030; --danger: #ff6b6b;
  --wallpaper: url("https://projectbluefin.io/evening/august-night.webp");
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-light); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd, .mono { font-family: var(--mono); }

/* navbar */
.navbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  height: 60px; padding: 0 24px;
  background: rgba(var(--bg-rgb), .85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand img { display: block; }
.nav-accent { color: var(--blue-light); font-weight: 500; }
.nav-links { margin-left: auto; display: flex; gap: 24px; }
.nav-links a { color: var(--text-strong); font-weight: 400; }
.nav-links a:hover { color: var(--blue-light); text-decoration: none; }

/* hero */
.hero {
  position: relative;
  min-height: 520px;
  display: grid; place-items: center;
  padding: 48px 16px 120px;
  background: var(--wallpaper) center 30% / cover no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 180px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  width: min(880px, 100%);
  padding: 20px 24px 24px;
  text-align: center;
  border-radius: 12px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero-inner {
    background: rgba(var(--bg-rgb), .72);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  }
}
.hero-top { display: flex; justify-content: space-between; text-align: left; }
.hero-tag { text-transform: uppercase; font-size: .9rem; color: var(--text-strong); }
.hero-motto { text-align: right; color: var(--text-strong); font-weight: 700; font-size: 1.15rem; line-height: 1.25; }
.hero-title {
  margin: 24px 0 18px;
  color: var(--text-strong);
  font-size: clamp(3.5rem, 11vw, 6.5rem);
  font-weight: 700; letter-spacing: -.04em; line-height: .9;
  text-shadow: 0 2px 18px rgba(var(--bg-rgb), .5);
}
.hero-title span {
  display: block;
  font-weight: 300; letter-spacing: .02em;
  font-size: .5em; color: var(--blue);
}
.hero-desc { color: var(--text-strong); font-size: 1.12rem; margin: 0 0 6px; }

main { width: min(1180px, 100%); margin: -70px auto 0; padding: 0 16px; position: relative; z-index: 2; }

.alpha {
  width: fit-content; margin: 0 auto 28px; padding: 4px 12px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  background: rgba(var(--bg-rgb), .8);
  color: var(--text-strong); font-size: .9rem;
}

/* release widgets */
.widgets { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; margin-bottom: 40px; }
.release-widget {
  position: relative;
  border: 1px solid var(--border-strong);
  background: rgba(var(--bg-rgb), .55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 24px 22px;
  min-width: 0;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text);
}
.group-label {
  margin: 20px 0 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--blue-light);
}
.muted { margin: 0 0 16px; font-size: .95rem; }
.chip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat {
  border: 1px solid var(--border-strong); border-radius: 4px;
  padding: 6px 9px; min-height: 52px; min-width: 0;
}
.stat .k { display: block; font-size: .78rem; color: var(--text); }
.stat .v {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 700 1.05rem var(--mono); color: var(--text-strong);
}
.stat a.v { color: var(--blue-light); }
.skeleton { animation: pulse 1.2s ease-in-out infinite; background: var(--card-hover); }
@keyframes pulse { 50% { opacity: .4; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: stretch; overflow: hidden;
  border: 1px solid var(--border-strong); border-radius: 3px;
  font-size: .85rem; line-height: 1; cursor: pointer;
  background: none; color: inherit; padding: 0;
  transition: border-color .15s, transform .15s;
}
.chip:hover { border-color: var(--blue-light); transform: translateY(-1px); text-decoration: none; }
.chip-k { padding: 5px 6px; font-weight: 600; color: var(--text); }
.chip-v {
  padding: 5px 6px; font: 700 .85rem var(--mono);
  background: rgba(var(--blue-rgb), .12); color: var(--blue-light);
}

.copy-block {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin-top: 20px; padding: 10px 14px;
  border: none; border-radius: 6px;
  background: var(--blue); color: #fff; cursor: pointer; text-align: left;
  transition: filter .2s;
}
.copy-block:hover { filter: brightness(1.1); }
.copy-block code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.copy-hint { font-size: .8rem; font-weight: 600; opacity: .85; }

/* shelf bar */
.shelf-bar { display: flex; gap: 2px; height: 34px; margin: 6px 0 16px; }
.shelf-bar button {
  border: none; padding: 0; cursor: pointer; min-width: 4px;
  background: var(--c); transition: filter .15s, opacity .15s;
}
.shelf-bar button:first-child { border-radius: 4px 0 0 4px; }
.shelf-bar button:last-child { border-radius: 0 4px 4px 0; }
.shelf-bar.filtered button:not(.on) { opacity: .25; }
.shelf-bar button:hover { filter: brightness(1.15); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.legend button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: none; background: none; padding: 3px 4px; border-radius: 4px;
  color: var(--text); font: inherit; font-size: .92rem; cursor: pointer; text-align: left;
}
.legend button:hover, .legend button.on { background: var(--card-hover); color: var(--text-strong); }
.legend .sw { width: 10px; height: 10px; border-radius: 2px; background: var(--c); flex: none; }
.legend .n { margin-left: auto; font: 600 .85rem var(--mono); color: var(--text); }
.tooltip {
  position: fixed; z-index: 30; pointer-events: none;
  padding: 6px 10px; border-radius: 6px;
  background: var(--bg-raised); border: 1px solid var(--border-strong);
  color: var(--text-strong); font-size: .85rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.search {
  flex: 1 1 320px; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; height: 44px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  background: rgba(var(--bg-rgb), .6);
}
.search:focus-within { border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(var(--blue-rgb), .2); }
.search svg { width: 18px; height: 18px; fill: var(--text); flex: none; }
.search input {
  flex: 1; min-width: 0; border: none; outline: none; background: none;
  color: var(--text-strong); font: inherit;
}
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
kbd {
  font-size: .75rem; padding: 1px 6px; border-radius: 4px;
  border: 1px solid var(--border-strong); color: var(--text);
}
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--tab-bg); }
.tabs button {
  position: relative;
  height: 32px; padding: 0 14px; border: none; border-radius: 8px;
  background: none; color: var(--text); cursor: pointer;
  font: 500 .9rem Inter, system-ui, sans-serif;
  transition: background .2s, color .2s;
}
.tabs button:hover { color: var(--text-strong); background: var(--card-hover); }
.tabs button.active {
  background: rgba(var(--blue-rgb), .18); color: var(--blue-light); font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.filter {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: none;
  color: var(--text); font: 500 .85rem Inter, system-ui, sans-serif; cursor: pointer;
}
.filter .sw { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.filter:hover { color: var(--text-strong); }
.filter.on { border-color: var(--c, var(--blue-light)); color: var(--text-strong); background: var(--card-hover); }
.result-count { margin: 0 0 14px; font-size: .9rem; }

/* package cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 14px; min-width: 0;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--c);
  border-radius: 8px;
  background: var(--card); color: inherit; text-align: left; font: inherit;
  cursor: pointer;
  transition: background .15s, transform .15s, border-color .15s;
  animation: rise .35s ease both;
}
.card:hover { background: var(--card-hover); transform: translateY(-2px); text-decoration: none; }
.card:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 2px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card-name { color: var(--text-strong); font-weight: 600; overflow-wrap: anywhere; }
.card-ver {
  flex: none; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 6px; border-radius: 3px;
  font: 700 .78rem var(--mono);
  background: rgba(var(--blue-rgb), .12); color: var(--blue-light);
}
.card-sum {
  margin: 0; font-size: .88rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; gap: 10px; margin-top: auto; font-size: .76rem; color: var(--text); }
.card-meta .cat { color: var(--text-strong); }
.badge-fail {
  color: var(--danger); font-weight: 600;
}
mark { background: rgba(var(--blue-rgb), .3); color: inherit; border-radius: 2px; }

/* table view */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-strong); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; color: var(--text); position: sticky; top: 0; background: var(--bg-raised); }
td.sum { white-space: normal; min-width: 240px; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--card-hover); }
td .name { color: var(--text-strong); font-weight: 600; }
.d-head .anchor {
  margin-left: 10px; color: var(--text); font-weight: 400; opacity: .5;
  transition: opacity .15s, color .15s;
}
.d-head .anchor:hover { opacity: 1; color: var(--blue-light); text-decoration: none; }
td .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.num { text-align: right; font-family: var(--mono); }

.empty { text-align: center; padding: 40px 0; font-size: 1.05rem; }

/* detail dialog, dressed as the browser window on the server page */
dialog {
  width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  padding: 0; border: none; background: none; color: inherit;
}
dialog::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .2s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
.window {
  display: flex; flex-direction: column; max-height: calc(100vh - 48px);
  border-radius: 12px; overflow: hidden;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
}
.window-bar {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 44px; flex: none; background: #2a2a2a;
}
.window-url {
  padding: 4px 60px; border-radius: 6px; background: #3a3a3a;
  color: rgba(255, 255, 255, .85); font-size: .85rem;
  max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.window-bar form { position: absolute; right: 10px; top: 10px; margin: 0; }
.win-close {
  width: 24px; height: 24px; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .75);
  cursor: pointer; font-size: .75rem;
}
.win-close:hover { background: #c01c28; color: #fff; }
.window-body { overflow-y: auto; padding: 24px 26px 28px; }
.d-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; }
.d-head h2 { margin: 0; color: var(--text-strong); font-size: 2rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.d-sum { margin: 6px 0 14px; color: var(--text-strong); font-size: 1.1rem; }
.d-desc { margin: 0 0 18px; white-space: pre-line; font-size: .93rem; }
.d-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.d-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 6px;
  background: var(--blue); color: #fff; font-weight: 600; font-size: .9rem;
  border: none; cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn.ghost { background: none; color: var(--blue-light); border: 1px solid var(--border-strong); }
.d-rpms td { white-space: normal; }
.d-rpms td:first-child { font-family: var(--mono); font-size: .85rem; color: var(--text-strong); white-space: nowrap; }
.d-rpms td.num { white-space: nowrap; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 40; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 600;
  animation: pop .2s ease;
}

footer { text-align: center; padding: 56px 16px 40px; font-size: .88rem; }
footer p { margin: 4px 0; }

@media (max-width: 860px) {
  .widgets { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .chip-grid, .d-grid { grid-template-columns: 1fr 1fr; }
  .hero-motto { display: none; }
  .legend { grid-template-columns: 1fr; }
  .window-url { padding: 4px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
