/* ============ ShipKaro · Shipped wall ============ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-serif.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-serif-italic.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono.woff2") format("woff2");
}

/* Metric-matched fallbacks reduce layout shift while webfonts load */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.4%;
  ascent-override: 90%;
  descent-override: 22.4%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Instrument Serif Fallback";
  src: local("Georgia");
  size-adjust: 112%;
  ascent-override: 88%;
  descent-override: 22%;
  line-gap-override: 0%;
}

:root {
  /* Brand kit — match shipkaro.dev */
  --purple: #9B6DFF;
  --purple-deep: #7C45F5;
  --purple-soft: #F5F0FF;
  --paper: #FFFFFF;
  --soft: #FAF8F4;
  --ink: #0E0B14;
  --mute: #6B6677;
  --rule: #E8E5EE;

  /* Type accents — muted, semantic (not rainbow) */
  --t-android: #2FA968;
  --t-ios: #5B6470;
  --t-web: #9B6DFF;
  --t-ai-tool: #C159C9;
  --t-extension: #D9942B;
  --t-other: #6B6677;

  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;

  --shadow-hover: 0 14px 34px -18px rgba(28, 18, 56, 0.45);

  --maxw: 1120px;
  --gap: 22px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: light;
  -webkit-tap-highlight-color: rgba(155, 109, 255, 0.18);
}

button, a, input, select, .chip, .card { touch-action: manipulation; }

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: "Inter", "Inter Fallback", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 40px);
}

.visually-hidden,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-decoration: none;
}

a { color: var(--purple-deep); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

/* Pacome-inspired dot field — subtle spiral texture */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(155, 109, 255, 0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 70%);
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  inset: -40% 0 auto 0;
  height: 520px;
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(155, 109, 255, 0.20), transparent 70%),
    radial-gradient(40% 60% at 82% 8%, rgba(193, 89, 201, 0.12), transparent 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  padding-top: clamp(56px, 9vw, 104px);
  padding-bottom: clamp(40px, 6vw, 72px);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 8px 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple-deep);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 4px rgba(155, 109, 255, 0.22);
}

.hero__title {
  margin: 0 auto;
  max-width: 14ch;
  font-family: "Instrument Serif", "Instrument Serif Fallback", Georgia, serif;
  font-weight: 400;
  font-size: clamp(48px, 9vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.hero__title em {
  font-style: italic;
  color: var(--purple);
}

.hero__lead {
  margin: 22px auto 0;
  max-width: 56ch;
  color: var(--mute);
  font-size: clamp(16px, 2.2vw, 19px);
  text-wrap: pretty;
}

.hero__meta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
  justify-content: center;
}

.count-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  color: var(--mute);
}
.count-chip strong {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.text-link {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.text-link:hover { border-bottom-color: currentColor; }

/* Inkwell-inspired scroll hint */
.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  padding: 0;
  border: none;
  background: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.scroll-hint:hover { color: var(--purple); }
.scroll-hint:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 4px;
  border-radius: 2px;
}
.scroll-hint svg { animation: bob 2s var(--ease) infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Hero staggered reveal */
.hero__reveal {
  animation: hero-rise 0.7s var(--ease) both;
}
.hero__inner .eyebrow.hero__reveal { animation-delay: 0.05s; }
.hero__inner .hero__title.hero__reveal { animation-delay: 0.12s; }
.hero__inner .hero__lead.hero__reveal { animation-delay: 0.2s; }
.hero__inner .hero__meta .hero__reveal:nth-child(1) { animation-delay: 0.28s; }
.hero__inner .hero__meta .hero__reveal:nth-child(2) { animation-delay: 0.34s; }
.hero__inner .scroll-hint.hero__reveal { animation-delay: 0.42s; }
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Editorial section labels (Inkwell-style) */
.section-label {
  margin: 0 0 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.section-label--main { margin-top: 28px; }

/* ---------- Controls ---------- */
.controls {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 248, 244, 0.86);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.controls__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-block: 14px;
}

.search {
  position: relative;
  flex: 1 1 280px;
  min-width: 220px;
  display: flex;
  align-items: center;
}
.search__icon {
  position: absolute;
  left: 14px;
  color: var(--mute);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 42px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.search input::placeholder { color: var(--mute); }
.search input:focus-visible {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(155, 109, 255, 0.18);
}
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__kbd {
  position: absolute;
  right: 12px;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--soft);
  color: var(--mute);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease);
}
.chip:hover { border-color: var(--purple); }
.chip__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--dot, var(--mute));
}
.chip__n {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip[aria-pressed="true"] .chip__n { color: rgba(255,255,255,0.7); }

.sort {
  position: relative;
  margin-left: auto;
}
.sort select {
  height: 46px;
  padding: 0 38px 0 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.sort select:focus-visible {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(155, 109, 255, 0.18);
}
.sort__chev {
  position: absolute;
  right: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--mute);
  pointer-events: none;
}

/* ---------- Results line ---------- */
.results-line {
  margin: 26px 0 18px;
  color: var(--mute);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.results-line b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- Grid + cards ---------- */
.grid {
  list-style: none;
  margin: 0 0 64px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: auto 260px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--card-accent, var(--purple)), color-mix(in srgb, var(--card-accent, var(--purple)) 35%, transparent));
  z-index: 3;
  pointer-events: none;
}
.card__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  padding: 18px 20px 20px;
}
.card__preview {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--soft);
  border-bottom: 1px solid var(--rule);
}
.card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s var(--ease);
}
.card--has-preview:hover .card__preview img { transform: scale(1.03); }
.card--has-preview .card__body { padding-top: 16px; }

/* Invisible overlay button makes the whole card open the detail modal,
   while the Visit link and its own focus ring still work above it. */
.card__open {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
}
.card__open:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}
.card > *:not(.card__open) { position: relative; z-index: 2; }
.card .card__open ~ * { pointer-events: none; }
.card .visit, .card .soon, .card a { pointer-events: auto; }
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--card-accent, var(--purple)) 40%, var(--rule));
}

/* 21st.dev-inspired spotlight hover */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--card-accent, var(--purple)) 16%, transparent),
    transparent 42%
  );
  transition: opacity 0.25s var(--ease);
}
.card:hover::after { opacity: 1; }

.card__name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(47, 169, 104, 0.12);
  color: #1F8A52;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.live-badge__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2FA968;
  box-shadow: 0 0 0 3px rgba(47, 169, 104, 0.22);
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.card__top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  position: relative;
  flex: 0 0 auto;
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--avatar-bg, var(--purple-soft));
  color: var(--avatar-fg, var(--purple-deep));
  font-family: "Instrument Serif", "Instrument Serif Fallback", Georgia, serif;
  font-size: 26px;
  line-height: 1;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--card-accent, var(--purple)) 22%, transparent);
}
.avatar__letter { display: grid; place-items: center; width: 100%; height: 100%; }

.card__head { min-width: 0; }
.card__name {
  margin: 0;
  font-family: "Instrument Serif", "Instrument Serif Fallback", Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--badge-bg, var(--purple-soft));
  color: var(--badge-fg, var(--purple-deep));
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.card__desc {
  margin: 0;
  color: var(--mute);
  font-size: 14.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.card__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--card-accent, var(--purple)) 12%, var(--rule));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.builder {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.builder__label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.builder__name {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.builder__city { color: var(--mute); font-weight: 400; }

.visit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease);
}
.visit:hover { background: var(--purple-deep); }
.visit svg { transition: transform 0.18s var(--ease); }
.visit:hover svg { transform: translate(2px, -2px); }

.soon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--card-accent, var(--purple)) 40%, var(--rule));
  background: color-mix(in srgb, var(--card-accent, var(--purple)) 6%, transparent);
  color: var(--mute);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.03em;
}
.soon::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--card-accent, var(--purple)) 70%, var(--mute));
}
.soon--lg { height: auto; padding: 10px 16px; font-size: 13px; }

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 72px 20px 96px;
}
.empty__mark {
  font-family: "JetBrains Mono", monospace;
  font-size: 26px;
  color: var(--purple);
  margin-bottom: 14px;
}
.empty__title {
  margin: 0 0 8px;
  font-family: "Instrument Serif", "Instrument Serif Fallback", Georgia, serif;
  font-weight: 400;
  font-size: 32px;
}
.empty__text { margin: 0 auto 22px; max-width: 42ch; color: var(--mute); white-space: pre-line; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn--primary {
  background: linear-gradient(180deg, var(--purple) 0%, var(--purple-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(124, 69, 245, 0.7);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(124, 69, 245, 0.7); }
.btn--ghost {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.btn--ghost:hover { border-color: var(--purple); background: var(--purple-soft); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--rule);
  background: var(--paper);
}
.footer__inner {
  padding-block: 40px 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.footer__brand {
  margin: 0;
  font-family: "Instrument Serif", "Instrument Serif Fallback", Georgia, serif;
  font-size: 24px;
}
.footer__brand em { color: var(--purple); font-style: italic; }
.footer__tags {
  margin: 0;
  display: flex;
  gap: 10px;
}
.footer__tags span {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--purple-deep);
  background: var(--purple-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.footer__note { margin: 0; color: var(--mute); font-size: 13px; }
.footer__note code {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  background: var(--soft);
  padding: 2px 6px;
  border-radius: 6px;
}

/* ---------- Focus visibility ---------- */
:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

/* ---------- Entrance animation ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card { animation: rise 0.4s var(--ease) both; }

@keyframes scroll-x-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes scroll-x-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* ---------- Preview strip ---------- */
.velocity {
  padding-block: 24px 32px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.velocity .section-label { margin-bottom: 14px; }
.velocity__viewport {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.velocity__row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.velocity__row--b {
  padding-inline-start: clamp(28px, 8vw, 72px);
}
.velocity__empty {
  margin: 0;
  padding: 24px;
  font-size: 14px;
  color: var(--mute);
  text-align: center;
}
.velocity__track {
  display: flex;
  gap: 16px;
  width: max-content;
  will-change: transform;
  padding-inline: clamp(18px, 5vw, 40px);
}
.velocity__card {
  flex: 0 0 auto;
  width: clamp(200px, 28vw, 280px);
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.velocity__shot {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--soft);
  box-shadow: 0 16px 40px -24px rgba(28, 18, 56, 0.45);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.velocity__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.velocity__card:hover .velocity__shot,
.velocity__card:focus-visible .velocity__shot {
  transform: translateY(-4px) scale(1.02);
  border-color: color-mix(in srgb, var(--card-accent, var(--purple)) 45%, var(--rule));
  box-shadow: 0 22px 48px -20px color-mix(in srgb, var(--card-accent, var(--purple)) 35%, transparent);
}
.velocity__name {
  display: block;
  margin-top: 10px;
  font-family: "Instrument Serif", "Instrument Serif Fallback", Georgia, serif;
  font-size: 17px;
  line-height: 1.2;
  color: var(--ink);
}
.velocity--reduced .velocity__track--a {
  animation: scroll-x-left 90s linear infinite;
}
.velocity--reduced .velocity__track--b {
  animation: scroll-x-right 90s linear infinite;
}

/* ---------- Community pulse (bento grid) ---------- */
.pulse {
  background: var(--soft);
  border-bottom: 1px solid var(--rule);
  padding-block: 28px 32px;
}
.bento {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
}
.bento__cell {
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.bento__cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -16px rgba(28, 18, 56, 0.35);
  border-color: color-mix(in srgb, var(--purple) 35%, var(--rule));
}
.bento__cell--lead {
  justify-content: flex-end;
  background:
    radial-gradient(80% 80% at 100% 0%, rgba(155, 109, 255, 0.12), transparent 60%),
    var(--paper);
}
.bento__cell--lead .stat__num { font-size: clamp(56px, 8vw, 88px); }
.bento__hint {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--mute);
  line-height: 1.45;
  max-width: 28ch;
}
.stat__num {
  font-family: "Instrument Serif", "Instrument Serif Fallback", Georgia, serif;
  font-size: 38px;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
/* ---------- View toggle ---------- */
.controls__right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.viewtoggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
}
.viewtoggle__btn {
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mute);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.viewtoggle__btn[aria-pressed="true"] { background: var(--ink); color: #fff; }

.sort { position: relative; margin-left: 0; }

/* ---------- Builders view ---------- */
.grid--builders { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.builder-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: rise 0.4s var(--ease) both;
}
.builder-card__head { display: flex; align-items: center; gap: 14px; }
.builder-card__avatar {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--purple-deep);
  font-family: "Instrument Serif", "Instrument Serif Fallback", Georgia, serif;
  font-size: 22px;
}
.builder-card__meta { min-width: 0; }
.builder-card__name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.builder-card__stats {
  margin: 2px 0 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--mute);
}
.builder-card__stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.builder-card__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.bchip {
  border: 1px solid var(--rule);
  background: var(--soft);
  border-radius: 999px;
  padding: 5px 11px;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.bchip:hover { border-color: var(--card-accent, var(--purple)); background: var(--paper); }
.bchip--more { cursor: default; color: var(--mute); }

/* ---------- Modal ---------- */
.no-scroll { overflow: hidden; }

/* hidden must win over display:grid — otherwise palette/modal show on load and Esc can't close them */
.modal[hidden],
.palette[hidden] {
  display: none !important;
}

.modal:not([hidden]),
.palette:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
}
.modal__overlay, .palette__overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 11, 20, 0.42);
  backdrop-filter: blur(3px);
  animation: fade 0.2s var(--ease) both;
}
.modal { place-items: center; padding: 20px; }
.modal__panel {
  position: relative;
  width: min(580px, 100%);
  max-height: 88vh;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: 0 30px 80px -30px rgba(14, 11, 20, 0.6);
  animation: pop 0.24s var(--ease) both;
}
.modal__shell {
  position: relative;
}
.modal__shell::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--card-accent, var(--purple)), transparent);
  z-index: 2;
  pointer-events: none;
}
.modal__preview {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--soft);
  border-bottom: 1px solid var(--rule);
}
.modal__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 4;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.modal__close:hover { background: var(--soft); border-color: var(--purple); }
.modal__hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px 0;
  padding-right: 52px;
}
.modal__hero-text { min-width: 0; }
.modal__meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.modal__live { margin: 0; }
.modal__status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--mute);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.modal__hero .avatar { width: 64px; height: 64px; border-radius: 18px; font-size: 32px; flex-shrink: 0; }
.modal__title {
  margin: 10px 0 0;
  font-family: "Instrument Serif", "Instrument Serif Fallback", Georgia, serif;
  font-weight: 400;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.05;
}
.modal__desc {
  margin: 0;
  padding: 18px 28px 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}
.modal__facts {
  margin: 20px 28px 0;
  display: grid;
  gap: 12px;
  padding: 18px 0;
  border-block: 1px solid var(--rule);
}
.modal__facts div { display: flex; gap: 14px; }
.modal__facts dt {
  flex: 0 0 76px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  padding-top: 2px;
}
.modal__facts dd { margin: 0; font-size: 14.5px; font-weight: 500; }
.modal__actions {
  margin: 0;
  padding: 22px 28px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Command palette ---------- */
.palette { align-items: start; justify-items: center; padding: 12vh 20px 20px; }
.palette__panel {
  position: relative;
  width: min(560px, 100%);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -30px rgba(14, 11, 20, 0.6);
  overflow: hidden;
  animation: pop 0.2s var(--ease) both;
}
.palette__search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--mute);
}
.palette__search:focus-within { border-bottom-color: var(--purple); color: var(--purple-deep); }
.palette__search input {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}
.palette__search input:focus { outline: none; }
.palette__esc {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--mute);
  background: var(--paper);
  cursor: pointer;
}
.palette__esc:hover { border-color: var(--purple); color: var(--purple-deep); }
.palette__list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; overscroll-behavior: contain; }
.palette__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.palette__item.is-active { background: var(--purple-soft); }
.palette__dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.palette__name { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette__type {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.palette__empty { padding: 18px; text-align: center; color: var(--mute); }

.footer__note kbd {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1px 6px;
  background: var(--soft);
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- View transitions ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.25s; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .controls__inner { gap: 10px; }
  .search { flex-basis: 100%; order: -1; }
  .controls__right { margin-left: 0; width: 100%; justify-content: space-between; }
  .sort select { height: 44px; }
  .grid, .grid--builders { grid-template-columns: 1fr; }
  .stat__num { font-size: 30px; }
  .modal__hero { padding-inline: 22px; }
  .modal__desc { padding-inline: 22px; }
  .modal__facts { margin-inline: 22px; }
  .modal__actions { padding-inline: 22px; padding-bottom: 22px; }
  .bento { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .scroll-hint svg { animation: none; }
  .live-badge__dot { animation: none; }
}
