/* ============================================================
   Site Navigation — personal launchpad
   Dark, local-first, keyboard-aware.
   ============================================================ */

:root {
  color-scheme: dark;
  --bg: #05070b;
  --bg-soft: #080b11;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(255, 255, 255, 0.065);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef2f8;
  --muted: #9aa5b7;
  --dim: #6f7a8d;
  --cyan: #5eead4;
  --cyan-rgb: 94, 234, 212;
  --violet: #8b5cf6;
  --violet-rgb: 139, 92, 246;
  --lime: #a3e635;
  --danger: #fb7185;
  --logo-stop-1: #94a3b8;
  --logo-stop-2: #e2e8f0;
  --logo-stop-3: #5eead4;
  --logo-wing-1: #8b5cf6;
  --logo-wing-2: #5eead4;
  --logo-orbit: #9aa5b7;
  --logo-strut: #cbd5e1;
  --logo-core-bg: #080d15;
  --logo-accent: #5eead4;
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-sans: "Inter", "Segoe UI Variable", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --bg-soft: #ebf0f7;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --line: rgba(15, 23, 42, 0.085);
  --line-strong: rgba(15, 23, 42, 0.18);
  --text: #0f172a;
  --muted: #475569;
  --dim: #64748b;
  --cyan: #0d9488;
  --cyan-rgb: 13, 148, 136;
  --violet: #7c3aed;
  --violet-rgb: 124, 58, 237;
  --lime: #65a30d;
  --danger: #e11d48;
  --logo-stop-1: #64748b;
  --logo-stop-2: #334155;
  --logo-stop-3: #0d9488;
  --logo-wing-1: #7c3aed;
  --logo-wing-2: #0d9488;
  --logo-orbit: #475569;
  --logo-strut: #475569;
  --logo-core-bg: #ffffff;
  --logo-accent: #0d9488;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

input,
textarea,
select,
[contenteditable="true"] {
  user-select: text;
  -webkit-user-select: text;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: rgba(var(--cyan-rgb), 0.24);
  color: #fff;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid rgba(var(--cyan-rgb), 0.85);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--cyan);
  color: #04110e;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- ambient background ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.11) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.34;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, #000 0%, transparent 78%);
}

.ambient__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.9;
}

.ambient__glow--a {
  top: -34vw;
  left: -18vw;
  width: 68vw;
  height: 68vw;
  background: radial-gradient(circle, rgba(var(--cyan-rgb), 0.14), transparent 64%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.ambient__glow--b {
  top: 8vh;
  right: -24vw;
  width: 58vw;
  height: 58vw;
  background: radial-gradient(circle, rgba(var(--violet-rgb), 0.15), transparent 64%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

.spotlight {
  position: fixed;
  top: var(--py, 18vh);
  left: var(--px, 50vw);
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--cyan-rgb), 0.075), transparent 62%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 600ms ease;
  mix-blend-mode: screen;
}

.has-pointer .spotlight {
  opacity: 1;
}

@keyframes drift-a {
  to {
    transform: translate3d(8vw, 6vh, 0) scale(1.08);
  }
}

@keyframes drift-b {
  to {
    transform: translate3d(-7vw, -4vh, 0) scale(0.94);
  }
}

/* ---------- shell ---------- */

.shell {
  position: relative;
  z-index: 1;
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 70px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.brand__mark svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 7px rgba(var(--cyan-rgb), 0.14));
  transition: filter 240ms var(--ease), transform 320ms var(--ease);
}

.brand__mark:hover svg {
  filter: drop-shadow(0 0 10px rgba(var(--cyan-rgb), 0.26));
  transform: translateY(-0.5px);
}

.brand__mark:active svg {
  transform: scale(0.92);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand__text strong {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.15;
  white-space: nowrap;
}

.brand__text span {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  line-height: 1.2;
  white-space: nowrap;
}

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

.clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
  font-family: var(--font-mono);
  line-height: 1.25;
}

.clock__time {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.clock__date {
  color: var(--dim);
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 27px;
  padding: 0 9px;
  border: 1px solid rgba(var(--cyan-rgb), 0.16);
  border-radius: 999px;
  background: rgba(var(--cyan-rgb), 0.035);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.privacy-badge svg {
  width: 12px;
  height: 12px;
  color: var(--cyan);
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 180ms, background 180ms, color 180ms;
}

.search-trigger:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.search-trigger > svg {
  width: 15px;
  height: 15px;
  opacity: 0.8;
}

.search-trigger__label {
  font-size: 12px;
  white-space: nowrap;
}

.kbd-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 19px;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 180ms, background 180ms, color 180ms;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  padding: 34px 0 26px;
}

.hero__copy {
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 12px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow__sep {
  color: rgba(255, 255, 255, 0.2);
}

.live-dot,
.status-dot {
  position: relative;
  display: inline-block;
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.8);
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(var(--cyan-rgb), 0.45);
  border-radius: 50%;
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    opacity: 0.8;
    transform: scale(0.7);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

.hero h1 {
  width: fit-content;
  margin: 0;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 520;
  letter-spacing: -0.045em;
  line-height: 1.07;
}

.gradient-text {
  background: linear-gradient(100deg, #5eead4 0%, #7dd3fc 42%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  max-width: 520px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.stats {
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  margin: 0;
}

.stat {
  min-width: 86px;
  padding: 0 19px;
  border-left: 1px solid var(--line);
}

.stat:last-child {
  padding-right: 0;
}

.stat dt {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  line-height: 1.3;
}

.stat dd {
  margin: 3px 0 0;
  font-family: var(--font-mono);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#statReferrer {
  padding-top: 2px;
  color: var(--cyan);
  font-size: 17px;
  letter-spacing: 0.02em;
}

/* ---------- launchpad ---------- */

.launchpad {
  padding-bottom: 6px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 34px;
  margin-bottom: 13px;
}

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.section-index {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  font-size: 11.5px;
  cursor: pointer;
  transition: color 180ms, background 180ms, border-color 180ms;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.chip.is-active {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.92);
  color: #070a0f;
}

.chip__count {
  font-family: var(--font-mono);
  font-size: 8.5px;
  opacity: 0.52;
}

.chip.is-active .chip__count {
  opacity: 0.66;
}

/* ---------- grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 176px;
  gap: 14px;
}

.grid--solo {
  grid-template-columns: 1fr;
  grid-auto-rows: 270px;
}

.site-card {
  position: relative;
  display: flex;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018) 58%, rgba(255, 255, 255, 0.008));
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 320ms var(--ease),
    border-color 320ms,
    box-shadow 320ms,
    opacity 320ms,
    filter 320ms;
}

.site-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid rgba(var(--accent-rgb), 0.55);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms;
}

.site-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(
    230px circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--accent-rgb), 0.95),
    transparent 68%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms;
  mix-blend-mode: screen;
}

.site-card:hover::before,
.site-card:focus-within::before {
  opacity: 1;
}

.site-card:hover::after,
.site-card:focus-within::after {
  opacity: 0.085;
}

@media (hover: hover) {
  .site-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 60px -38px rgba(var(--accent-rgb), 0.9);
  }
}

.site-card--featured {
  grid-column: span 2;
  grid-row: span 2;
  padding: 24px;
  background:
    radial-gradient(115% 115% at 100% 0%, rgba(var(--accent-rgb), 0.105), transparent 56%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015) 62%, rgba(255, 255, 255, 0.008));
}

.site-card.is-dimmed {
  opacity: 0.17;
  filter: grayscale(0.8) saturate(0.3);
  pointer-events: none;
}

.site-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 17px;
  pointer-events: none;
}

.site-card--featured .site-card__content {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0;
}

.site-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  height: 19px;
  margin-left: auto;
  padding: 0 7px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.06);
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.site-card__body {
  margin-top: 13px;
  min-width: 0;
}

.site-card__name {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 0;
  font-size: 16px;
  font-weight: 590;
  letter-spacing: -0.015em;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-card__name::after {
  content: "↗";
  color: var(--accent);
  font-size: 12px;
  font-weight: 400;
  opacity: 0;
  transform: translate(-2px, 2px);
  transition: opacity 180ms, transform 220ms var(--ease);
}

.site-card:hover .site-card__name::after {
  opacity: 0.9;
  transform: translate(0, 0);
}

.site-card__desc {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
}

.site-card__domain {
  flex: 1;
  overflow: hidden;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-index {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
}

.tag::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.6);
}

.site-card__hit {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  text-decoration: none;
}

.site-card__hit:focus-visible {
  outline: 2px solid rgba(var(--cyan-rgb), 0.9);
  outline-offset: -3px;
}

/* featured card */

.site-card--featured .site-card__top {
  align-items: center;
}

.site-card--featured .site-card__body {
  align-self: center;
  margin-top: 0;
  padding-top: 0;
}

.site-card--featured .site-card__name {
  display: block;
  font-size: clamp(24px, 2.25vw, 32px);
  font-weight: 540;
  letter-spacing: -0.035em;
  line-height: 1.05;
  white-space: normal;
}

.site-card--featured .site-card__name::after {
  display: none;
}

.site-card--featured .site-card__desc {
  max-width: 92%;
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
}

.site-card__tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 13px;
}

.site-card__tags span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.site-card--featured .site-card__foot {
  justify-content: flex-start;
  gap: 14px;
  margin-top: 0;
  padding-top: 17px;
}

.pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.pin-badge svg {
  width: 11px;
  height: 11px;
}

.site-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 33px;
  padding: 0 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  border-radius: 7px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.site-card__cta span {
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
}

.site-card__watermark {
  position: absolute;
  right: -18px;
  bottom: -24px;
  z-index: 0;
  width: 188px;
  height: 188px;
  color: var(--accent);
  opacity: 0.055;
  transform: rotate(-9deg);
  pointer-events: none;
}

.site-card__watermark svg {
  width: 100%;
  height: 100%;
}

.site-card__watermark .monogram {
  display: block;
  font-family: var(--font-mono);
  font-size: 124px;
  font-weight: 700;
  letter-spacing: -0.12em;
  line-height: 1;
}

/* icon */

.site-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.2), rgba(255, 255, 255, 0.018));
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.site-icon svg {
  width: 21px;
  height: 21px;
}

.site-card--featured .site-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.site-card--featured .site-icon svg {
  width: 28px;
  height: 28px;
}

.site-icon--monogram {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.site-card--featured .site-icon--monogram {
  font-size: 17px;
}

/* pin */

.pin-btn {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(5, 7, 11, 0.62);
  color: var(--dim);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-3px);
  transition:
    opacity 180ms,
    transform 200ms var(--ease),
    color 180ms,
    border-color 180ms,
    background 180ms;
}

.pin-btn svg {
  width: 13px;
  height: 13px;
}

.site-card:hover .pin-btn,
.site-card:focus-within .pin-btn,
.pin-btn.is-active {
  opacity: 1;
  transform: translateY(0);
}

.pin-btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.pin-btn.is-active {
  border-color: rgba(var(--accent-rgb), 0.36);
  background: rgba(var(--accent-rgb), 0.11);
  color: var(--accent);
}

/* add card */

.add-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.012);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 240ms,
    background 240ms,
    transform 280ms var(--ease),
    color 240ms;
}

.add-card:hover {
  border-color: rgba(var(--cyan-rgb), 0.48);
  background: rgba(var(--cyan-rgb), 0.045);
  color: var(--text);
}

@media (hover: hover) {
  .add-card:hover {
    transform: translateY(-3px);
  }
}

.add-card__plus {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 5px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cyan);
  transition: transform 300ms var(--ease), border-color 240ms, background 240ms;
}

.add-card:hover .add-card__plus {
  transform: rotate(90deg);
  border-color: rgba(var(--cyan-rgb), 0.4);
  background: rgba(var(--cyan-rgb), 0.08);
}

.add-card__plus svg {
  width: 15px;
  height: 15px;
}

.add-card__title {
  font-size: 12.5px;
  font-weight: 550;
}

.add-card__meta {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.add-card.is-full .add-card__plus {
  color: var(--lime);
  border-color: rgba(163, 230, 53, 0.3);
}

.grid--solo .add-card {
  border-style: solid;
  background:
    radial-gradient(80% 100% at 50% 0%, rgba(var(--cyan-rgb), 0.06), transparent 70%),
    rgba(255, 255, 255, 0.012);
}

/* privacy tile — completes the 8-site / 4-column bento */

.privacy-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 17px;
  border: 1px solid rgba(var(--cyan-rgb), 0.17);
  border-radius: var(--radius);
  background:
    radial-gradient(115% 115% at 100% 0%, rgba(var(--cyan-rgb), 0.1), transparent 58%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  overflow: hidden;
  isolation: isolate;
}

.privacy-tile::before {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -48px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(var(--cyan-rgb), 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 18px rgba(var(--cyan-rgb), 0.028),
    0 0 0 42px rgba(var(--cyan-rgb), 0.018);
  pointer-events: none;
}

.privacy-tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.privacy-tile__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(var(--cyan-rgb), 0.24);
  border-radius: 9px;
  background: rgba(var(--cyan-rgb), 0.08);
  color: var(--cyan);
}

.privacy-tile__icon svg {
  width: 15px;
  height: 15px;
}

.privacy-tile__label {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.privacy-tile__body strong {
  display: block;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.privacy-tile__body p {
  max-width: 145px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.privacy-tile__foot {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 6.8px;
  letter-spacing: 0.08em;
}

.empty-state {
  display: flex;
  align-items: center;
  gap: 14px;
  grid-column: 1 / -1;
  min-height: 150px;
  padding: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.012);
}

.empty-state__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(var(--cyan-rgb), 0.22);
  border-radius: 11px;
  background: rgba(var(--cyan-rgb), 0.06);
  color: var(--cyan);
}

.empty-state__icon svg {
  width: 19px;
  height: 19px;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 550;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.empty-state a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

.grid.is-entering .site-card,
.grid.is-entering .add-card {
  animation: card-in 520ms var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 38ms);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- footer ---------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
}

.footer__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  white-space: nowrap;
}

.status-dot {
  width: 4px;
  height: 4px;
  background: var(--lime);
  box-shadow: 0 0 7px rgba(163, 230, 53, 0.7);
}

.footer__keys {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin: 0;
}

.footer__keys span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.footer__keys kbd {
  height: 17px;
  min-width: 16px;
  font-size: 8px;
}

.footer__link,
.text-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 180ms, text-decoration-color 180ms;
}

.footer__link:hover,
.text-btn:hover {
  color: var(--text);
  text-decoration-color: var(--cyan);
}

.footer--minimal {
  justify-content: space-between;
  min-height: 42px;
  margin-top: 16px;
  padding: 12px 0 22px;
}

.footer__updated {
  margin: 0;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.footer__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .footer--minimal {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .footer__updated {
    font-size: 7px;
  }

  .footer__actions {
    gap: 10px;
  }
}

/* ---------- dialogs, shared ---------- */

dialog {
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background: #090d14;
  color: var(--text);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 44px 120px rgba(0, 0, 0, 0.7);
}

dialog::backdrop {
  background: rgba(2, 4, 8, 0.7);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}

dialog[open] {
  animation: panel-in 210ms var(--ease) both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- command palette ---------- */

.palette {
  width: min(640px, calc(100vw - 32px));
  margin: 11vh auto auto;
  overflow: hidden;
  background:
    radial-gradient(90% 90% at 50% 0%, rgba(var(--cyan-rgb), 0.05), transparent 60%),
    #090d14;
}

.palette__search {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 62px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
}

.palette__search > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--muted);
}

.palette__search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  letter-spacing: -0.01em;
}

.palette__search input::placeholder {
  color: var(--dim);
}

.palette__esc {
  flex: 0 0 auto;
  color: var(--dim);
  border-color: var(--line);
  background: transparent;
}

.palette__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px 7px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.palette__results {
  max-height: 354px;
  padding: 2px 8px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.palette-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 52px;
  padding: 7px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.palette-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent, var(--cyan));
  opacity: 0;
}

.palette-item.is-active {
  background: rgba(255, 255, 255, 0.055);
}

.palette-item.is-active::before {
  opacity: 1;
}

.palette-item__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent, var(--text));
}

.palette-item__icon svg {
  width: 16px;
  height: 16px;
}

.palette-item__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.palette-item__main strong {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-item__main span {
  overflow: hidden;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-item__main mark {
  background: transparent;
  color: var(--cyan);
}

.palette-item__hint {
  flex: 0 0 auto;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
}

.palette-item__enter {
  flex: 0 0 auto;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0;
}

.palette-item.is-active .palette-item__enter {
  opacity: 1;
}

.palette__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 42px 20px 46px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.palette__empty strong {
  color: var(--text);
  font-weight: 500;
}

.palette__empty span {
  color: var(--dim);
  font-size: 10.5px;
}

.palette__footer {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  min-height: 38px;
  padding: 0 17px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.palette__footer span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.palette__footer kbd {
  height: 16px;
  min-width: 15px;
  font-size: 8px;
}

/* ---------- registry ---------- */

.registry {
  width: min(910px, calc(100vw - 32px));
  max-height: min(760px, 88vh);
  margin: 6vh auto auto;
  overflow: hidden;
}

.registry[open] {
  display: flex;
  flex-direction: column;
}

.registry__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex: 0 0 auto;
  padding: 21px 24px 17px;
  border-bottom: 1px solid var(--line);
}

.registry__head .eyebrow {
  margin-bottom: 7px;
}

.registry__head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 530;
  letter-spacing: -0.03em;
}

.registry__body {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* form */

.add-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 0;
  padding: 20px 24px 22px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
}

.form-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.form-head h3,
.list-head h3 {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.form-capacity {
  margin-left: auto;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > span {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}

.field em {
  color: var(--dim);
  font-size: 8.5px;
  font-style: normal;
}

.field input,
.field select {
  width: 100%;
  height: 37px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-size: 12px;
  transition: border-color 180ms, background 180ms;
}

.field input::placeholder {
  color: #4f5868;
}

.field input:focus,
.field select:focus {
  border-color: rgba(var(--cyan-rgb), 0.45);
  background: rgba(255, 255, 255, 0.04);
}

.field select {
  appearance: none;
  padding-right: 28px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--dim) 50%),
    linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 16px,
    calc(100% - 10px) 16px;
  background-repeat: no-repeat;
  background-size: 4px 4px;
}

.field-row {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 10px;
}

.form-error {
  min-height: 14px;
  margin: 0;
  color: var(--danger);
  font-size: 10px;
  line-height: 1.4;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 550;
  cursor: pointer;
  transition: background 180ms, border-color 180ms, color 180ms, opacity 180ms;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn--primary {
  background: var(--cyan);
  color: #04110e;
}

.btn--primary:hover {
  background: #8af5e4;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.form-note {
  margin: -2px 0 0;
  color: var(--dim);
  font-size: 9px;
  line-height: 1.5;
}

/* registry list */

.registry-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(0, 0, 0, 0.12);
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 20px 20px 12px;
}

.list-head > span {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

.registry-list__items {
  flex: 1;
  min-height: 0;
  padding: 0 12px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.registry-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 49px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 160ms;
}

.registry-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.registry-item__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--accent);
}

.registry-item__icon svg {
  width: 15px;
  height: 15px;
}

.registry-item__icon .monogram {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
}

.registry-item__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.registry-item__text strong {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registry-item__text strong .pinned-mark {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.registry-item__text span {
  overflow: hidden;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-btn {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color 160ms, border-color 160ms, background 160ms;
}

.remove-btn svg {
  width: 12px;
  height: 12px;
}

.remove-btn:hover {
  border-color: rgba(251, 113, 133, 0.25);
  background: rgba(251, 113, 133, 0.08);
  color: var(--danger);
}

.registry-empty {
  margin: 0;
  padding: 28px 16px;
  color: var(--dim);
  font-size: 10.5px;
  text-align: center;
}

.registry__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 12px 20px 14px;
  border-top: 1px solid var(--line);
}

.text-btn.is-danger {
  color: var(--danger);
  text-decoration-color: rgba(251, 113, 133, 0.5);
}

.list-note {
  color: #454e5e;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  top: auto;
  right: auto;
  bottom: 24px;
  left: 50%;
  z-index: 1000;
  display: none;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 9px 10px 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(14, 19, 28, 0.96);
  color: var(--text);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  font-size: 11.5px;
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.toast:popover-open,
.toast.is-visible {
  display: flex;
  animation: toast-in 220ms var(--ease) both;
}

.toast::backdrop {
  background: transparent;
}

.toast button {
  padding: 5px 9px;
  border: 1px solid rgba(var(--cyan-rgb), 0.28);
  border-radius: 999px;
  background: rgba(var(--cyan-rgb), 0.08);
  color: var(--cyan);
  font-size: 10px;
  cursor: pointer;
}

.toast button:hover {
  background: rgba(var(--cyan-rgb), 0.14);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .shell {
    padding: 0 24px;
  }

  .hero h1 {
    font-size: clamp(34px, 3.8vw, 44px);
  }

  .stat {
    min-width: 78px;
    padding: 0 15px;
  }
}

@media (max-width: 1020px) {
  .clock {
    display: none;
  }

  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    gap: 24px;
  }

  .stat {
    min-width: 70px;
    padding: 0 12px;
  }

  .stat dd {
    font-size: 22px;
  }
}

@media (max-width: 820px) {
  .shell {
    padding: 0 20px;
  }

  .privacy-badge span {
    display: none;
  }

  .privacy-badge {
    width: 27px;
    padding: 0;
    justify-content: center;
  }

  .search-trigger__label {
    display: none;
  }

  .search-trigger {
    padding: 0 8px;
  }

  .search-trigger .kbd-group {
    display: none;
  }

  .hero {
    padding-top: 28px;
  }

  .hero__lede {
    max-width: 440px;
  }

  .stats {
    align-self: flex-end;
  }

  .stat {
    min-width: 62px;
    padding: 0 10px;
  }

  .stat dt {
    font-size: 7px;
  }

  .stat dd {
    font-size: 20px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .filters {
    justify-content: flex-start;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-card--featured {
    grid-column: span 2;
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 0 16px;
  }

  .topbar {
    height: 62px;
  }

  .brand__text span {
    display: none;
  }

  .brand__mark {
    width: 27px;
    height: 27px;
  }

  .topbar__right {
    gap: 8px;
  }

  .hero {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 25px 0 22px;
  }

  .hero h1 {
    font-size: clamp(31px, 9vw, 38px);
  }

  .hero__lede {
    font-size: 12px;
  }

  .stats {
    align-self: stretch;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 13px;
  }

  .stat {
    flex: 1;
    min-width: 0;
    padding: 0 12px;
  }

  .stat:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .stat:last-child {
    padding-right: 0;
  }

  .stat dd {
    font-size: 21px;
  }

  #statReferrer {
    padding-top: 1px;
    font-size: 14px;
  }

  .grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(148px, auto);
    gap: 11px;
  }

  .privacy-tile {
    min-height: 142px;
  }

  .site-card--featured {
    grid-column: auto;
    grid-row: auto;
    min-height: 226px;
    padding: 19px;
  }

  .site-card__content {
    padding: 15px;
  }

  .site-card--featured .site-card__content {
    padding: 0;
  }

  .site-card--featured .site-card__name {
    font-size: 25px;
  }

  .site-card--featured .site-card__desc {
    max-width: 100%;
  }

  .site-card--featured .site-card__foot {
    flex-wrap: wrap;
  }

  .site-card__desc {
    font-size: 11.5px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
    padding-bottom: 22px;
  }

  .footer__keys {
    gap: 10px;
  }

  .palette {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .palette[open] {
    display: flex;
    flex-direction: column;
  }

  .palette__search {
    height: 66px;
    flex: 0 0 auto;
    padding: 0 16px;
  }

  .palette__results {
    flex: 1;
    max-height: none;
  }

  .palette__footer {
    flex: 0 0 auto;
    padding: 0 16px;
  }

  .registry {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .registry[open] {
    display: flex;
  }

  .registry__head {
    padding: 16px 16px 14px;
  }

  .registry__body {
    display: block;
    flex: 1;
    overflow-y: auto;
  }

  .add-form {
    overflow: visible;
    padding: 18px 16px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .registry-list {
    min-height: 230px;
  }

  .registry-list__items {
    overflow: visible;
  }

  .list-head {
    padding: 17px 16px 9px;
  }

  .registry__foot {
    padding: 12px 16px 16px;
  }

  .toast {
    bottom: 16px;
  }
}

@media (max-width: 390px) {
  .hero h1 {
    font-size: 30px;
  }

  .stat {
    padding: 0 8px;
  }

  .stat dd {
    font-size: 19px;
  }

  .chip {
    padding: 0 9px;
  }
}

@media (hover: none) {
  .pin-btn {
    opacity: 1;
    transform: none;
  }

  .site-card__name::after {
    display: none;
  }
}

/* ---------- light theme ---------- */

:root[data-theme="light"] ::selection {
  background: rgba(var(--cyan-rgb), 0.18);
  color: var(--text);
}

:root[data-theme="light"] .skip-link {
  color: #ffffff;
}

:root[data-theme="light"] .ambient__grid {
  background-image: radial-gradient(rgba(15, 23, 42, 0.14) 1px, transparent 1px);
  opacity: 0.42;
}

:root[data-theme="light"] .ambient__glow--a {
  background: radial-gradient(circle, rgba(var(--cyan-rgb), 0.1), transparent 64%);
}

:root[data-theme="light"] .ambient__glow--b {
  background: radial-gradient(circle, rgba(var(--violet-rgb), 0.085), transparent 64%);
}

:root[data-theme="light"] .spotlight {
  background: radial-gradient(circle, rgba(var(--cyan-rgb), 0.065), transparent 62%);
  mix-blend-mode: normal;
}

:root[data-theme="light"] .brand__mark svg {
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.08));
}

:root[data-theme="light"] .brand__mark:hover svg {
  filter: drop-shadow(0 3px 8px rgba(var(--cyan-rgb), 0.22));
}

:root[data-theme="light"] .privacy-badge {
  border-color: rgba(var(--cyan-rgb), 0.22);
  background: rgba(var(--cyan-rgb), 0.055);
}

:root[data-theme="light"] .search-trigger,
:root[data-theme="light"] .icon-btn {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

:root[data-theme="light"] .search-trigger:hover,
:root[data-theme="light"] .icon-btn:hover {
  border-color: var(--line-strong);
  background: #ffffff;
}

:root[data-theme="light"] kbd {
  border-color: rgba(15, 23, 42, 0.12);
  border-bottom-color: rgba(15, 23, 42, 0.22);
  background: rgba(15, 23, 42, 0.045);
  color: var(--muted);
}

:root[data-theme="light"] .eyebrow__sep {
  color: rgba(15, 23, 42, 0.22);
}

:root[data-theme="light"] .live-dot,
:root[data-theme="light"] .status-dot {
  box-shadow: 0 0 6px rgba(var(--cyan-rgb), 0.45);
}

:root[data-theme="light"] .gradient-text {
  background: linear-gradient(100deg, #0d9488 0%, #0284c7 46%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

:root[data-theme="light"] .chip:hover {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.045);
}

:root[data-theme="light"] .chip.is-active {
  border-color: #0f172a;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
}

:root[data-theme="light"] .site-card {
  border-color: rgba(15, 23, 42, 0.08);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82));
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.04),
    0 10px 26px -16px rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .site-card[data-site-id="grok"],
:root[data-theme="light"] #palette-opt-grok {
  --accent: #1e293b !important;
  --accent-rgb: 30, 41, 59 !important;
}

:root[data-theme="light"] .site-card::before {
  border-color: rgba(var(--accent-rgb), 0.45);
}

:root[data-theme="light"] .site-card::after {
  mix-blend-mode: normal;
}

:root[data-theme="light"] .site-card:hover::after,
:root[data-theme="light"] .site-card:focus-within::after {
  opacity: 0.07;
}

@media (hover: hover) {
  :root[data-theme="light"] .site-card:hover {
    box-shadow:
      0 20px 44px -26px rgba(var(--accent-rgb), 0.36),
      0 4px 14px rgba(15, 23, 42, 0.06);
  }
}

:root[data-theme="light"] .site-card.is-dimmed {
  opacity: 0.28;
}

:root[data-theme="light"] .site-icon {
  border-color: rgba(15, 23, 42, 0.08);
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.13), rgba(255, 255, 255, 0.92));
  color: color-mix(in srgb, var(--accent) 72%, #0f172a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(15, 23, 42, 0.04);
}

:root[data-theme="light"] .site-card__name::after {
  color: color-mix(in srgb, var(--accent) 74%, #0f172a);
}

:root[data-theme="light"] .tag::before {
  background: color-mix(in srgb, var(--accent) 78%, #0f172a);
  box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.35);
}

:root[data-theme="light"] .local-badge {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
}

:root[data-theme="light"] .empty-state {
  border-color: rgba(15, 23, 42, 0.15);
  background: rgba(255, 255, 255, 0.68);
}

:root[data-theme="light"] .footer__link,
:root[data-theme="light"] .text-btn {
  text-decoration-color: rgba(15, 23, 42, 0.2);
}

:root[data-theme="light"] dialog {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.04),
    0 32px 90px rgba(15, 23, 42, 0.18);
}

:root[data-theme="light"] dialog::backdrop {
  background: rgba(15, 23, 42, 0.26);
}

:root[data-theme="light"] .palette {
  background:
    radial-gradient(90% 90% at 50% 0%, rgba(var(--cyan-rgb), 0.06), transparent 60%),
    #ffffff;
}

:root[data-theme="light"] .palette-item.is-active {
  background: rgba(15, 23, 42, 0.055);
}

:root[data-theme="light"] .palette-item__icon {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.035);
  color: color-mix(in srgb, var(--accent, var(--text)) 72%, #0f172a);
}

:root[data-theme="light"] .field input,
:root[data-theme="light"] .field select {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
}

:root[data-theme="light"] .field input::placeholder {
  color: #94a3b8;
}

:root[data-theme="light"] .field input:focus,
:root[data-theme="light"] .field select:focus {
  border-color: rgba(var(--cyan-rgb), 0.55);
  background: #ffffff;
}

:root[data-theme="light"] .btn--primary {
  background: var(--cyan);
  color: #ffffff;
}

:root[data-theme="light"] .btn--primary:hover {
  background: #0f766e;
}

:root[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .ambient__glow {
    animation: none;
  }

  .spotlight {
    display: none;
  }
}
