/* Rustrinth — community surface.
   Warm charcoal, burnt copper, editorial spacing, one palette with the studio.
   Tokens live in /tokens.css. */

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scrollbar-color: var(--surface-3) var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 10% -12%, rgba(227, 114, 58, 0.09), transparent 62%),
    radial-gradient(720px 420px at 96% -4%, rgba(143, 182, 212, 0.045), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.65 var(--font-sans);
  font-feature-settings: "cv11" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(227, 114, 58, 0.32); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border: 2px solid transparent;
  border-radius: 8px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

a { color: var(--accent-hi); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
svg { flex: 0 0 auto; }
.ri { width: 18px; height: 18px; }

h1, h2, h3, h4 {
  margin: 0 0 0.42em;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
h1 { font-size: clamp(2.15rem, 4vw, 3rem); letter-spacing: -0.045em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: 0.95rem; }
p { margin: 0 0 1em; }

code, .mono {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82em;
  line-height: 1.35;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.12em 0.42em;
  color: #f4c5a6;
  vertical-align: baseline;
}

.muted { color: var(--muted); }
.small { font-size: 12px; }
.dot { color: var(--dim); }
.inline { display: inline; margin: 0; }
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.divider::before, .divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 60;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
}
.skip:focus { left: 14px; }

/* top bar ------------------------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(15, 17, 21, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--top);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  flex: none;
}
.brand:hover { color: var(--text); }
.brand img { border-radius: 9px; }

.topsearch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 380px;
  height: 36px;
  margin-left: 6px;
  padding: 0 11px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.topsearch:focus-within {
  background: var(--surface);
  border-color: rgba(227, 114, 58, 0.55);
  box-shadow: 0 0 0 3px rgba(227, 114, 58, 0.1);
}
.topsearch .ri { width: 16px; height: 16px; color: var(--dim); }
.topsearch input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
}
.topsearch input::placeholder { color: var(--dim); }

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-link .ri { width: 15px; height: 15px; color: var(--dim); }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.nav-link.on .ri { color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 7px; margin-left: 2px; }
.nav-actions .btn { height: 34px; }
.nav-user { display: inline-flex; border-radius: 9px; }
.nav-user:hover { color: inherit; }
.nav-user .avatar { transition: box-shadow 0.15s; }
.nav-user:hover .avatar { box-shadow: 0 0 0 2px rgba(227, 114, 58, 0.4); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.icon-btn .ri { width: 15px; height: 15px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--line); }

.nav-toggle {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 15px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  position: relative;
  transition: transform 0.2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

/* buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn .ri { width: 16px; height: 16px; }
.btn:hover {
  background: var(--surface-3);
  border-color: #454d5a;
  color: var(--text);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn.primary,
.btn:not(.ghost):not(.danger) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.btn.primary:hover,
.btn:not(.ghost):not(.danger):hover {
  background: #f1844f;
  border-color: #f1844f;
  color: var(--accent-ink);
}
.btn.ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--muted);
}
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger {
  background: transparent;
  border-color: rgba(238, 124, 124, 0.34);
  color: #f3a4a4;
}
.btn.danger:hover { background: rgba(238, 124, 124, 0.1); border-color: rgba(238, 124, 124, 0.5); color: #ffc2c2; }
.btn.small { height: 30px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.btn:disabled, .btn[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}
.btn .tag, .tag {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(230, 178, 92, 0.12);
  border: 1px solid rgba(230, 178, 92, 0.22);
  color: var(--warn);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* layout ------------------------------------------------------------------- */
.main {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 80px;
  flex: 1;
}
.section { margin-top: 56px; }
.section.tight { margin-top: 30px; }
.section[id] { scroll-margin-top: calc(var(--top) + 18px); }
.section.narrow { max-width: 720px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.section-head h2 { margin: 2px 0 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow.tiny { font-size: 9.5px; }
.link-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.link-more .ri { width: 14px; height: 14px; }
.link-more:hover { color: var(--accent-hi); }
.lede { color: var(--muted); font-size: 15px; line-height: 1.65; }
.grad {
  background: linear-gradient(100deg, var(--accent-hi), var(--accent) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(227, 114, 58, 0.15);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(227, 114, 58, 0.04); } }

/* hero --------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(44px, 6vw, 76px) 0 38px;
}
.hero-copy h1 {
  max-width: 15ch;
  margin: 14px 0 16px;
  font-size: clamp(2.55rem, 5vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.hero-copy .lede { max-width: 50ch; margin-bottom: 24px; }
.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 520px;
  height: 50px;
  padding: 0 6px 0 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hero-search:focus-within {
  border-color: rgba(227, 114, 58, 0.6);
  box-shadow: 0 0 0 3px rgba(227, 114, 58, 0.1);
}
.hero-search .ri { width: 17px; height: 17px; color: var(--dim); }
.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
}
.hero-search input::placeholder { color: var(--dim); }
.hero-search .btn { height: 38px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.stats {
  display: flex;
  align-items: stretch;
  margin: 30px 0 0;
  padding: 0;
}
.stats > div {
  padding: 0 22px;
  border-left: 1px solid var(--line);
}
.stats > div:first-child { padding-left: 0; border-left: 0; }
.stats dt {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}
.stats dd {
  margin: 2px 0 0;
  color: var(--dim);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-side { min-width: 0; }
.spotlight {
  position: relative;
  overflow: hidden;
  padding: 22px;
  background:
    linear-gradient(160deg, rgba(227, 114, 58, 0.07), transparent 46%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 160, 107, 0.55), transparent);
}
.spotlight-top { display: flex; align-items: flex-start; gap: 14px; }
.spotlight-top h3 { margin: 3px 0 5px; font-size: 1.4rem; }
.spotlight-top p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.spotlight .chip-row { margin-top: 16px; }
.spotlight-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.spotlight-stats > div { padding-left: 14px; border-left: 1px solid var(--line); min-width: 0; }
.spotlight-stats > div:first-child { padding-left: 0; border-left: 0; }
.spotlight-stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spotlight-stats span {
  display: block;
  margin-top: 2px;
  color: var(--dim);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.spotlight > .btn { width: 100%; }
.hero-side .empty { min-height: 100%; }

/* chips + badges ----------------------------------------------------------- */
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
a.chip:hover { border-color: var(--line-strong); color: var(--text); background: var(--surface-3); }
.chip.big { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 8px; background: transparent; }
.chip.loader .chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(227, 114, 58, 0.12);
}
.chip.version { color: #c8beb2; }
.chip.warn { color: var(--warn); border-color: rgba(230, 178, 92, 0.24); background: var(--warn-soft); }
.browse-cats { gap: 7px; margin-top: 4px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge.ok { color: var(--green); background: var(--green-soft); border-color: rgba(79, 211, 154, 0.2); }
.badge.warn { color: var(--warn); background: var(--warn-soft); border-color: rgba(230, 178, 92, 0.2); }
.badge.accent { color: var(--accent-hi); background: var(--accent-soft); border-color: rgba(227, 114, 58, 0.24); }
.badge.title {
  color: #e8c7a6;
  background: rgba(227, 114, 58, 0.08);
  border-color: rgba(227, 114, 58, 0.2);
  letter-spacing: 0.01em;
  text-transform: none;
  font-size: 10px;
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.badge.plan-free { color: var(--muted); background: var(--surface-2); border-color: var(--line); }
.badge.plan-developer { color: var(--steel); background: rgba(143, 182, 212, 0.09); border-color: rgba(143, 182, 212, 0.2); }
.badge.plan-founder { color: var(--accent-hi); background: var(--accent-soft); border-color: rgba(227, 114, 58, 0.22); }

/* avatars ------------------------------------------------------------------ */
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background:
    linear-gradient(150deg, hsl(var(--h, 24) 24% 30%), hsl(var(--h, 24) 30% 17%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #f0e7df;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.avatar.big { width: 52px; height: 52px; font-size: 17px; border-radius: 13px; }
.avatar.xl { width: 84px; height: 84px; font-size: 26px; border-radius: 20px; }
.avatar.nav { width: 30px; height: 30px; font-size: 11px; border-radius: 8px; }
.avatar.img { object-fit: cover; background: var(--surface-2); }
.av-0 { --h: 22; }
.av-1 { --h: 32; }
.av-2 { --h: 42; }
.av-3 { --h: 12; }
.av-4 { --h: 88; }
.av-5 { --h: 158; }
.av-6 { --h: 196; }
.av-7 { --h: 212; }
.av-8 { --h: 36; }
.av-9 { --h: 6; }
.av-10 { --h: 104; }
.av-11 { --h: 178; }

/* project cards ------------------------------------------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.project-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 156px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.project-card:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  color: var(--text);
}
.pc-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pc-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pc-title h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.pc-summary {
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 10px;
  color: var(--dim);
  font-size: 11px;
}
.pc-meta .ri { width: 13px; height: 13px; }
.pc-meta strong { color: var(--muted); font-weight: 500; }
.pc-meta > span { display: inline-flex; align-items: center; gap: 4px; }

/* how it works ------------------------------------------------------------- */
.how { border-top: 1px solid var(--line); padding-top: 34px; }
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.how-card { position: relative; }
.how-card .ri { width: 21px; height: 21px; color: var(--accent); margin-bottom: 12px; }
.how-n {
  display: block;
  margin-bottom: 10px;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.how-card h3 { margin-bottom: 5px; font-family: var(--font-sans); font-size: 14.5px; }
.how-card p { max-width: 35ch; margin: 0; color: var(--muted); font-size: 12.5px; }

/* browse ------------------------------------------------------------------- */
.browse-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 0 24px;
  border-bottom: 1px solid var(--line);
}
.browse-head h1 { margin: 5px 0 0; font-size: clamp(2rem, 3.6vw, 2.7rem); }
.browse-search { display: flex; align-items: center; gap: 8px; }
.searchfield {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 38vw);
  height: 40px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.searchfield:focus-within {
  border-color: rgba(227, 114, 58, 0.55);
  box-shadow: 0 0 0 3px rgba(227, 114, 58, 0.1);
}
.searchfield .ri { width: 16px; height: 16px; color: var(--dim); }
.searchfield input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
}
.browse-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding-top: 24px;
}
.facets {
  position: sticky;
  top: calc(var(--top) + 18px);
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.facets > .facets-toggle { display: none; }
.facets > .facets-body { display: block; }
.facet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 6px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.facet-clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-hi);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.facet-clear .ri { width: 12px; height: 12px; }
.facet-group { padding: 9px 0; border-bottom: 1px solid var(--line); }
.facet-group:last-child { padding-bottom: 0; border-bottom: 0; }
.facet-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  list-style: none;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}
.facet-group summary::-webkit-details-marker { display: none; }
.facet-group summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-right: 1.5px solid var(--dim);
  border-bottom: 1.5px solid var(--dim);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}
.facet-group:not([open]) summary::after { transform: rotate(-45deg); }
.facet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 1px;
  padding: 6px 8px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12.5px;
  transition: background 0.13s, color 0.13s;
}
.facet:hover { background: var(--surface-2); color: var(--text); }
.facet.on { background: var(--accent-soft); color: var(--accent-hi); }
.facet-count { color: var(--dim); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.facet.on .facet-count { color: var(--accent-hi); }
.facet-empty { margin: 4px 8px; color: var(--dim); font-size: 11.5px; }

.browse-results { min-width: 0; }
.browse-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.type-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.type-tab {
  padding: 6px 13px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.type-tab:hover { color: var(--text); }
.type-tab.on { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow-sm); }
.sortbar { margin: 0; }
.sortsel { position: relative; display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 11px; }
.sortsel select {
  height: 34px;
  padding: 0 30px 0 11px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.sortsel select:focus { outline: none; border-color: rgba(227, 114, 58, 0.55); }
.sortsel::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--dim);
  border-bottom: 1.5px solid var(--dim);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--dim);
  font-size: 11.5px;
}
.active-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.active-filter {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 10.5px;
}
.browse-results .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.pager { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 28px; }
.page {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}
.page:hover { border-color: var(--line-strong); color: var(--text); }
.page.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.page-gap { color: var(--dim); padding: 0 4px; }

/* project page ------------------------------------------------------------- */
.project-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 42px 0 26px;
  border-bottom: 1px solid var(--line);
}
.project-head .avatar.xl { margin-top: 4px; }
.project-title { flex: 1; min-width: 0; }
.project-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--dim);
  font-size: 12px;
}
.project-kicker a { color: var(--muted); font-weight: 500; }
.project-kicker a:hover { color: var(--accent-hi); }
.project-head h1 { margin: 5px 0 8px; font-size: clamp(2.1rem, 4vw, 3rem); }
.project-head .lede { max-width: 66ch; margin: 0 0 14px; }
.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 40px;
  align-items: start;
  padding-top: 8px;
}
.project-main { min-width: 0; }
.subnav {
  position: sticky;
  top: var(--top);
  z-index: 15;
  display: flex;
  gap: 22px;
  margin-bottom: 8px;
  padding: 14px 0;
  background: rgba(15, 17, 21, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.subnav a {
  padding: 2px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: color 0.15s, border-color 0.15s;
}
.subnav a:hover, .subnav a.on { color: var(--text); border-color: var(--accent); }
.subnav a span {
  margin-left: 4px;
  color: var(--dim);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.section.tight h2 { margin-bottom: 12px; font-size: 1.3rem; }
.prose { color: var(--muted); font-size: 14px; line-height: 1.7; white-space: pre-wrap; }

.project-side {
  position: sticky;
  top: calc(var(--top) + 18px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.download-card, .panel {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.download-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.download-version { display: flex; align-items: baseline; gap: 8px; margin: 11px 0 10px; }
.download-version b {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.download-version span { color: var(--dim); font-size: 10.5px; }
.download-card .chip-row { margin-bottom: 4px; }
.dl-grid { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.dl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.dl-row:hover { background: var(--surface-3); border-color: var(--line-strong); color: var(--text); }
.dl-row.primary { background: var(--accent-soft); border-color: rgba(227, 114, 58, 0.3); }
.dl-row.primary:hover { background: rgba(227, 114, 58, 0.17); border-color: rgba(227, 114, 58, 0.45); }
.dl-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
}
.dl-row.primary .dl-ico { background: rgba(227, 114, 58, 0.14); border-color: rgba(227, 114, 58, 0.26); color: var(--accent-hi); }
.dl-ico .ri { width: 15px; height: 15px; }
.dl-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dl-text b { font-size: 11.5px; font-weight: 600; }
.dl-text small {
  color: var(--dim);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dl-size { display: flex; color: var(--dim); }
.dl-size .ri { width: 14px; height: 14px; }

.download-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.download-stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.download-stats span {
  display: block;
  margin-top: 1px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.panel-title .ri { width: 14px; height: 14px; color: var(--accent); }
.author-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.author-row:hover { color: var(--text); }
.author-row > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.author-row b { font-size: 12.5px; font-weight: 600; }
.meta-list { display: flex; flex-direction: column; margin-top: 6px; }
.meta-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
}
.meta-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-list span { color: var(--dim); }
.meta-list b { color: var(--text); font-weight: 500; text-align: right; }

.owner-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.icon-form { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 12px; }
.icon-form .file { flex: 1; }
.owner-panel .btn.danger { margin-top: 12px; }

/* versions ----------------------------------------------------------------- */
.version-card {
  margin-bottom: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.version-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.version-title { display: flex; align-items: center; gap: 8px; }
.version-title h3 { margin: 0; font-size: 19px; }
.version-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
  color: var(--dim);
  font-size: 11px;
}
.version-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.version-meta .ri { width: 13px; height: 13px; }
.changelog { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.version-card .dl-grid { margin-top: 14px; }
.version-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.version-details .panel { padding: 14px; background: var(--bg-soft); }
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table td { padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.table td:last-child { color: var(--text); font-weight: 500; text-align: right; }
.table th { padding: 6px 0; color: var(--dim); font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: 0.08em; }
.parity .muted, .breakdown .muted { margin: 10px 0 0; font-size: 11.5px; line-height: 1.55; }
.warn-text { margin: 10px 0 0; color: #e3c08a; font-size: 11.5px; line-height: 1.55; }
.details { margin-top: 12px; }
.details summary {
  padding: 9px 11px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.details[open] summary { border-radius: 8px 8px 0 0; }
.details .table { padding: 10px; }

.callout {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.55;
}
.callout.warn { background: var(--warn-soft); border-color: rgba(230, 178, 92, 0.24); color: #e7c994; }
.callout.info { background: rgba(143, 182, 212, 0.07); border-color: rgba(143, 182, 212, 0.2); color: #b9d3e5; }
.callout.small { margin-top: 10px; font-size: 11.5px; }
.callout b { color: inherit; }

.install-steps {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.step { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.step:first-child { padding-top: 0; }
.step:last-of-type { border-bottom: 0; padding-bottom: 0; }
.step-n {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  background: var(--accent-soft);
  border: 1px solid rgba(227, 114, 58, 0.24);
  border-radius: 50%;
  color: var(--accent-hi);
  font-size: 10.5px;
  font-weight: 600;
}
.step h4 { margin: 1px 0 2px; font-family: var(--font-sans); font-size: 12.5px; }
.step p { margin: 0; color: var(--muted); font-size: 12px; }

/* profile ------------------------------------------------------------------ */
.profile-cover {
  position: relative;
  overflow: hidden;
  margin-top: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
}
.profile-cover-art {
  position: relative;
  height: 150px;
  background:
    radial-gradient(620px 230px at 12% 0%, rgba(227, 114, 58, 0.24), transparent 64%),
    radial-gradient(520px 200px at 88% 22%, rgba(143, 182, 212, 0.08), transparent 62%),
    linear-gradient(180deg, #191c22, #14171c);
  border-bottom: 1px solid var(--line);
}
.profile-cover-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, #000 20%, transparent 78%);
}
.profile-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-top: -38px;
  padding: 0 24px;
}
.profile-head .avatar.xl { border: 4px solid var(--surface); border-radius: 24px; box-shadow: var(--shadow); }
.profile-id { flex: 1; min-width: 0; padding-bottom: 6px; }
.profile-id h1 { margin: 2px 0 6px; font-size: 2.2rem; }
.profile-actions { padding-bottom: 10px; }
.profile-stats {
  display: flex;
  margin: 18px 0 0;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}
.profile-stats > div { padding: 0 24px; border-left: 1px solid var(--line); }
.profile-stats > div:first-child { padding-left: 0; border-left: 0; }
.profile-stats dt {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.profile-stats dd {
  margin: 2px 0 0;
  color: var(--dim);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* plans -------------------------------------------------------------------- */
.plans-hero { max-width: 660px; padding: 52px 0 8px; }
.plans-hero h1 { margin: 8px 0 10px; font-size: clamp(2.2rem, 4vw, 3rem); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 24px 0 8px; }
.plan {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.plan-featured {
  border-color: rgba(227, 114, 58, 0.4);
  background:
    linear-gradient(180deg, rgba(227, 114, 58, 0.07), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow);
}
.plan-current { box-shadow: inset 0 0 0 1px rgba(79, 211, 154, 0.35); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.plan .eyebrow { color: var(--accent-hi); font-size: 10px; }
.price {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.price span { margin-left: 2px; color: var(--dim); font-family: var(--font-sans); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.plan > p.muted { margin: 0 0 4px; font-size: 12.5px; }
.plan ul { display: flex; flex-direction: column; gap: 9px; margin: 18px 0 22px; padding: 0; list-style: none; }
.plan li { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 12.5px; }
.plan li .ri { width: 14px; height: 14px; margin-top: 3px; color: var(--green); }
.plan > .btn, .plan > .current-plan { margin-top: auto; }
.current-plan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  border: 1px solid rgba(79, 211, 154, 0.24);
  border-radius: 9px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12.5px;
  font-weight: 600;
}
.current-plan .ri { width: 15px; height: 15px; }

/* forms -------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form > .btn { align-self: flex-start; }
.form h2 { margin: 0 0 2px; font-size: 15px; }
.form label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form textarea,
.form select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form textarea { height: auto; min-height: 92px; padding: 9px 12px; line-height: 1.55; resize: vertical; }
.form select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: rgba(227, 114, 58, 0.6);
  box-shadow: 0 0 0 3px rgba(227, 114, 58, 0.1);
}
.form input:disabled { color: var(--dim); background: rgba(19, 22, 27, 0.5); cursor: not-allowed; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
fieldset.checks, fieldset.radio { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
fieldset.checks legend, fieldset.radio legend { padding: 0 5px; color: var(--dim); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.checks-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 400; }
.form input[type="checkbox"], .form input[type="radio"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
fieldset.radio { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
fieldset.radio legend { float: left; width: 100%; margin-bottom: 6px; }
fieldset.radio label { flex-direction: row; align-items: center; gap: 7px; font-size: 12.5px; }
.form label.file,
.file {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.form label.file:hover,
.file:hover { color: var(--text); }
.file input[type="file"] {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: var(--bg-soft);
  color: var(--dim);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.file:hover input[type="file"] { border-color: rgba(227, 114, 58, 0.45); }
.file input[type="file"]::file-selector-button {
  height: 28px;
  margin-right: 10px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.file input[type="file"]::file-selector-button:hover {
  border-color: rgba(227, 114, 58, 0.6);
  color: var(--accent-hi);
}
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.avatar-edit > div { flex: 1; min-width: 0; }
.avatar-edit .muted { margin: 6px 0 0; }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 64px;
  align-items: center;
  max-width: 940px;
  margin: 64px auto 32px;
}
.auth-aside h1 { margin: 8px 0 10px; font-size: clamp(2.1rem, 4vw, 2.9rem); }
.auth-aside .lede { max-width: 44ch; }
.auth-points { display: flex; flex-direction: column; gap: 11px; margin: 24px 0 0; padding: 0; list-style: none; }
.auth-points li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.auth-points .ri { width: 16px; height: 16px; color: var(--accent); }
.auth-form {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.auth-form .btn { width: 100%; }
.auth-form .muted { margin: 0; text-align: center; }

.settings-head { padding: 42px 0 22px; border-bottom: 1px solid var(--line); }
.settings-head h1 { margin: 5px 0 6px; font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
.settings-head p { max-width: 70ch; margin: 0; font-size: 13px; }
.settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  padding-top: 24px;
}
.settings .form { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.side { display: flex; flex-direction: column; gap: 14px; }
.side .panel p { margin: 0 0 8px; font-size: 12.5px; }
.side .panel .small { font-size: 11.5px; line-height: 1.55; }
.narrow-form, .publish-form { max-width: 760px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.publish-form { margin-top: 18px; }

/* flash + empty ------------------------------------------------------------ */
.flash {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12.5px;
}
.flash .ri { width: 16px; height: 16px; }
.flash.ok { background: var(--green-soft); border-color: rgba(79, 211, 154, 0.24); color: #b2e9cc; }
.flash.bad { background: var(--bad-soft); border-color: rgba(238, 124, 124, 0.26); color: #f3b4b4; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 46px 24px;
  text-align: center;
  background: var(--bg-soft);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(227, 114, 58, 0.22);
  border-radius: 12px;
  color: var(--accent-hi);
}
.empty h3 { margin: 0 0 4px; font-family: var(--font-sans); font-size: 15px; }
.empty p { max-width: 42ch; margin: 0 0 14px; color: var(--muted); font-size: 12.5px; }

/* footer ------------------------------------------------------------------- */
.foot { margin-top: 64px; background: var(--bg-soft); border-top: 1px solid var(--line); }
.foot-in {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr);
  gap: 32px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px 24px;
}
.foot-brand p { max-width: 36ch; margin: 10px 0 0; color: var(--dim); font-size: 11.5px; line-height: 1.6; }
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-col strong {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.foot-col a, .foot-col span { color: var(--dim); font-size: 12px; }
.foot-col a:hover { color: var(--text); }
.foot-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px 24px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 10.5px;
}
.foot-base a { color: var(--dim); }
.foot-base a:hover { color: var(--muted); }

/* focus -------------------------------------------------------------------- */
.btn:focus-visible, .icon-btn:focus-visible, .nav-link:focus-visible, .nav-toggle:focus-visible,
.chip:focus-visible, .facet:focus-visible, .type-tab:focus-visible, .page:focus-visible,
.project-card:focus-visible, .dl-row:focus-visible, .link-more:focus-visible, .brand:focus-visible,
.facet-group summary:focus-visible, .subnav a:focus-visible, .file:focus-within {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 8px;
}

/* responsive --------------------------------------------------------------- */
@media (max-width: 1120px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .browse-results .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 30px; }
  .how-grid { gap: 24px; }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-top: 44px; }
  .hero-copy h1 { max-width: 18ch; }
  .hero-side { max-width: 560px; }
  .auth-shell { grid-template-columns: minmax(0, 1fr); gap: 30px; max-width: 460px; margin-top: 44px; }
  .auth-aside .lede, .auth-points { display: none; }
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 460px; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .settings .side { flex-direction: row; flex-wrap: wrap; }
  .settings .side .panel { flex: 1 1 260px; }
  .browse-layout { grid-template-columns: minmax(0, 1fr); }
  .facets { position: static; padding: 0; }
  .facets > .facets-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 16px;
    list-style: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
  }
  .facets > .facets-toggle::-webkit-details-marker { display: none; }
  .facets > .facets-toggle .ri { width: 15px; height: 15px; color: var(--accent); }
  .facets[open] > .facets-toggle { border-bottom: 1px solid var(--line); }
  .facets-count {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent-hi);
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
  }
  .facets-chevron { display: flex; margin-left: auto; transition: transform 0.18s ease; }
  .facets-chevron .ri { width: 14px; height: 14px; color: var(--dim); }
  .facets[open] .facets-chevron { transform: rotate(90deg); }
  .facets > .facets-body { display: none; padding: 4px 14px 12px; }
  .facets[open] > .facets-body { display: block; }
  .project-layout { grid-template-columns: 1fr; }
  .project-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .project-side .download-card { grid-row: span 2; }
  .version-details { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .topbar-in { flex-wrap: wrap; padding: 10px 18px; row-gap: 8px; }
  .topsearch { order: 9; flex: 1 1 100%; margin: 0; height: 38px; }
  .nav-toggle { display: inline-grid; place-items: center; order: 2; margin-left: auto; }
  .nav-links, .nav-actions { display: none; order: 8; flex-basis: 100%; }
  .topbar.nav-open .nav-links { display: flex; flex-wrap: wrap; gap: 4px; margin-left: 0; }
  .topbar.nav-open .nav-actions { display: flex; flex-wrap: wrap; margin-left: 0; padding-bottom: 2px; }
  .nav-links .nav-link, .nav-actions .btn { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .main { padding: 0 18px 60px; }
  .browse-head { flex-direction: column; align-items: stretch; gap: 16px; padding-top: 32px; }
  .browse-search { width: 100%; }
  .searchfield { flex: 1; width: auto; }
  .browse-top { flex-direction: column; align-items: stretch; gap: 10px; }
  .type-tabs { align-self: flex-start; }
  .sortbar { align-self: flex-end; }
  .cards, .browse-results .cards { grid-template-columns: minmax(0, 1fr); }
  .project-head { flex-direction: column; gap: 14px; padding-top: 32px; }
  .project-head .avatar.xl { width: 68px; height: 68px; font-size: 21px; border-radius: 16px; }
  .project-side { grid-template-columns: 1fr; }
  .project-side .download-card { grid-row: auto; }
  .profile-cover-art { height: 116px; }
  .profile-head { flex-wrap: wrap; margin-top: -30px; padding: 0 16px; }
  .profile-head .avatar.xl { width: 68px; height: 68px; font-size: 21px; border-radius: 18px; }
  .profile-id { flex-basis: calc(100% - 86px); }
  .profile-actions { padding-bottom: 0; }
  .profile-stats { padding: 14px 16px; }
  .profile-stats > div { padding: 0 16px; }
  .stats { flex-wrap: wrap; gap: 14px 0; }
  .stats > div { padding: 0 16px; }
  .how-grid { grid-template-columns: 1fr; gap: 22px; }
  .how-card p { max-width: none; }
  .foot-in { grid-template-columns: 1fr 1fr; gap: 24px; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-base { flex-direction: column; align-items: flex-start; }
  .form-row, .checks-grid { grid-template-columns: 1fr; }
  .avatar-edit { align-items: flex-start; }
  .result-line { flex-direction: column; align-items: flex-start; gap: 6px; }
  .browse-cats { margin-top: 8px; }
}

@media (max-width: 480px) {
  .hero-copy h1 { font-size: 2.2rem; }
  .hero-search { height: auto; padding: 6px; flex-wrap: wrap; }
  .hero-search input { flex-basis: calc(100% - 28px); height: 36px; }
  .hero-search .btn { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .spotlight { padding: 18px; }
  .spotlight-stats b { font-size: 15px; }
  .version-head { flex-direction: column; gap: 8px; }
  .version-title h3 { font-size: 17px; }
  .plan { padding: 18px; }
  .avatar-edit { flex-direction: column; align-items: stretch; gap: 12px; }
  .avatar-edit > div { flex: none; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ==========================================================================
   Surface polish: depth, motion, and the live Java -> Rust converter.
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* top bar: lifts off the page once you scroll --------------------------------- */
.topbar { transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.topbar.scrolled {
  background: rgba(12, 14, 18, 0.92);
  border-bottom-color: var(--line-strong);
  box-shadow: 0 14px 34px -22px rgba(0, 0, 0, 0.95);
}

/* nav links: a thin copper underline that grows from the centre ---------------- */
.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-hi), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav-link:hover::after,
.nav-link.on::after { transform: scaleX(1); }

/* buttons: layered depth, a real press, and a copper glow on the primary ------- */
.btn {
  position: relative;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 52%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 5px -3px rgba(0, 0, 0, 0.65);
  transition: background 0.15s, border-color 0.15s, color 0.15s,
    transform 0.18s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.18s ease;
}
.btn:hover {
  transform: translateY(-1.5px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 20px -12px rgba(0, 0, 0, 0.85);
}
.btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
  transition-duration: 0.06s;
}
.btn:not(.ghost):not(.danger) {
  background-image: linear-gradient(180deg, #f4905c, var(--accent) 52%, #cf612d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 0 #9b4720,
    0 12px 24px -14px rgba(227, 114, 58, 0.9);
}
.btn:not(.ghost):not(.danger):hover {
  background-image: linear-gradient(180deg, #ffa06b, #ef7c44 52%, #d96831);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 0 #9b4720,
    0 16px 30px -14px rgba(227, 114, 58, 0.85);
}
.btn:not(.ghost):not(.danger):active {
  box-shadow: inset 0 2px 5px rgba(120, 45, 10, 0.45), 0 1px 0 #7f3a19;
}
.btn.ghost { background-image: none; box-shadow: none; }
.btn.ghost:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 16px -12px rgba(0, 0, 0, 0.8);
}
.btn.danger { background-image: none; box-shadow: none; }
.icon-btn:hover { transform: translateY(-1px); }

/* cards and rows: a little lift, a warmer edge --------------------------------- */
.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(227, 114, 58, 0.28);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.95), inset 0 0 0 1px rgba(227, 114, 58, 0.05);
}
.spotlight, .converter, .panel, .download-card { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.spotlight:hover, .panel:hover, .download-card:hover { border-color: var(--line-strong); }
.chip { transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s; }
.chip:hover { transform: translateY(-1px); }

/* live converter --------------------------------------------------------------- */
.hero-spot { margin-top: 14px; }

.converter {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(420px 240px at 100% 0%, rgba(143, 182, 212, 0.06), transparent 62%),
    linear-gradient(160deg, rgba(227, 114, 58, 0.09), transparent 44%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.converter::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 160, 107, 0.6), transparent);
}
.converter::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(320px 190px at 88% 6%, rgba(227, 114, 58, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.converter:hover::after { opacity: 1; }
.converter > * { position: relative; z-index: 1; }
.converter-head .eyebrow { color: var(--accent-hi); }
.converter-head h3 { margin: 7px 0 5px; font-size: 1.22rem; letter-spacing: -0.025em; }
.converter-head p { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.conv-input {
  display: block;
  width: 100%;
  min-height: 140px;
  max-height: 300px;
  margin: 0 0 10px;
  padding: 11px 12px;
  background: #0c0e12;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #e7e2da;
  font: 11.5px/1.55 var(--font-mono);
  tab-size: 2;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.conv-input:focus {
  border-color: rgba(227, 114, 58, 0.6);
  box-shadow: 0 0 0 3px rgba(227, 114, 58, 0.1);
}
.conv-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.conv-actions .btn { flex: none; }
.conv-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--dim);
  font-size: 11px;
}
.conv-status::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}
.conv-status.busy { color: var(--warn); }
.conv-status.busy::before { animation: dot-pulse 0.9s ease-in-out infinite; }
.conv-status.ok { color: var(--green); }
.conv-status.bad { color: var(--bad); }
@keyframes dot-pulse { 50% { opacity: 0.25; transform: scale(0.7); } }
.conv-actions .btn.busy .ri { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.conv-result {
  margin-top: 12px;
  overflow: hidden;
  background: #0b0d10;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.conv-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 7px 5px 12px;
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.conv-result-bar .icon-btn { width: 26px; height: 26px; border-radius: 6px; }
.conv-out {
  margin: 0;
  padding: 12px;
  max-height: 210px;
  overflow: auto;
  color: #d9d4cc;
  font: 11px/1.6 var(--font-mono);
  white-space: pre;
  tab-size: 2;
}
.conv-out.pop { animation: pop-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes pop-in { from { opacity: 0.35; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* scroll reveal (JS adds .reveal only below the fold) -------------------------- */
@keyframes reveal-rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
.reveal { opacity: 0; }
.reveal.in { animation: reveal-rise 0.6s cubic-bezier(0.2, 0.75, 0.2, 1) both; }
.cards .reveal.in:nth-child(2) { animation-delay: 0.06s; }
.cards .reveal.in:nth-child(3) { animation-delay: 0.12s; }
.cards .reveal.in:nth-child(4) { animation-delay: 0.04s; }
.cards .reveal.in:nth-child(5) { animation-delay: 0.1s; }
.cards .reveal.in:nth-child(6) { animation-delay: 0.16s; }

@media (max-width: 760px) {
  .converter { padding: 15px; }
  .conv-input { min-height: 120px; }
  .conv-out { max-height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; }
  .conv-out.pop,
  .conv-status.busy::before,
  .conv-actions .btn.busy .ri { animation: none; }
}
