/* ============================================================
   TechLookup — design system
   ============================================================ */

:root {
  --bg: #070b14;
  --bg-soft: #0a101d;
  --surface: rgba(17, 26, 45, 0.72);
  --surface-solid: #111a2d;
  --surface-2: #0d1626;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.26);
  --text: #e8eefb;
  --muted: #9aa8bf;
  --muted-2: #6b7a93;
  --accent: #6366f1;
  --accent-2: #22d3ee;
  --accent-3: #a78bfa;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px rgba(2, 6, 23, 0.6);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 20%, transparent 75%);
  z-index: 0;
}

h1, h2, h3, h4, p, ul, ol {
  margin: 0;
}

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.025em;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(99, 102, 241, 0.45);
  color: #fff;
}

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

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: drift 22s ease-in-out infinite alternate;
}

.orb-a {
  width: 640px;
  height: 640px;
  top: -280px;
  left: 50%;
  transform: translateX(-60%);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.55), transparent 65%);
}

.orb-b {
  width: 480px;
  height: 480px;
  top: 180px;
  right: -160px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.28), transparent 65%);
  animation-delay: -7s;
}

.orb-c {
  width: 520px;
  height: 520px;
  top: 60px;
  left: -200px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.24), transparent 65%);
  animation-delay: -12s;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(40px, 30px, 0) scale(1.08); }
}

/* ---------------------------------------------------------- layout */
.shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.view {
  position: relative;
  z-index: 1;
  min-height: 62vh;
  outline: none;
}

.section {
  padding: 56px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.section-head p {
  color: var(--muted);
  margin-top: 6px;
  max-width: 60ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.eyebrow b {
  color: var(--text);
  font-weight: 600;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12); }
  50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.05); }
}

/* ---------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.08rem;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 2.5px;
  padding: 7px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.22), rgba(34, 211, 238, 0.12));
  border: 1px solid rgba(129, 140, 248, 0.35);
}

.brand-mark i {
  display: block;
  border-radius: 1.5px;
  background: linear-gradient(135deg, #a5b4fc, #22d3ee);
}

.brand-mark i:nth-child(2),
.brand-mark i:nth-child(4),
.brand-mark i:nth-child(8) { opacity: 0.45; }
.brand-mark i:nth-child(3),
.brand-mark i:nth-child(7) { opacity: 0.22; }

.brand-mark.small {
  grid-template-columns: repeat(3, 4px);
  grid-template-rows: repeat(3, 4px);
  padding: 6px;
}

.brand-name span {
  background: linear-gradient(100deg, #c7d2fe, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  overflow-x: auto;
  scrollbar-width: none;
}

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

.nav a {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 9px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(99, 102, 241, 0.12);
}

.nav .nav-cta {
  color: #dbeafe;
  border: 1px solid rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.12);
}

/* ---------------------------------------------------------- hero */
.hero {
  padding: clamp(52px, 9vw, 96px) 0 30px;
  text-align: center;
}

.hero h1 {
  margin: 22px auto 18px;
  max-width: 16ch;
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  font-weight: 760;
  letter-spacing: -0.04em;
}

.grad {
  background: linear-gradient(100deg, #818cf8 0%, #a78bfa 42%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lede {
  margin: 0 auto;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.14rem);
}

.lookup-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(720px, 100%);
  margin: 34px auto 0;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.lookup-form:focus-within {
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14), 0 18px 50px rgba(2, 6, 23, 0.45);
}

.lookup-form .globe {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.07);
  color: var(--muted);
  font-size: 1rem;
}

.lookup-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 4px;
  font-size: 1.02rem;
}

.lookup-form input::placeholder { color: var(--muted-2); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4f46e5 55%, #0891b2);
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(148, 163, 184, 0.07);
}

.btn-ghost:hover { background: rgba(148, 163, 184, 0.14); }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.samples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px auto 0;
  color: var(--muted-2);
  font-size: 0.82rem;
}

.chip {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.6);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.chip:hover {
  color: var(--text);
  border-color: rgba(129, 140, 248, 0.5);
  background: rgba(99, 102, 241, 0.12);
}

.trust {
  margin-top: 18px;
  color: var(--muted-2);
  font-size: 0.8rem;
}

/* ------------------------------------------------------- feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(17, 26, 45, 0.75), rgba(10, 16, 29, 0.6));
}

.feature .f-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 11px;
  font-size: 1.15rem;
  background: rgba(99, 102, 241, 0.13);
  border: 1px solid rgba(129, 140, 248, 0.25);
}

.feature h3 { font-size: 1rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.88rem; }

/* ----------------------------------------------------- recent lookups */
.recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(17, 26, 45, 0.55);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.recent-item:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.recent-item .site-avatar { width: 34px; height: 34px; font-size: 0.8rem; }
.recent-item strong { display: block; font-size: 0.9rem; }
.recent-item small { color: var(--muted-2); font-size: 0.75rem; }

/* ------------------------------------------------------ result header */
.result-head {
  padding: 44px 0 8px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 0.8rem;
  margin-bottom: 18px;
}

.crumbs a:hover { color: var(--text); }

.site-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(99, 102, 241, 0.12), transparent 70%),
    rgba(17, 26, 45, 0.66);
  box-shadow: var(--shadow);
}

.site-identity {
  display: flex;
  gap: 16px;
  min-width: 0;
}

.site-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #e0e7ff;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(34, 211, 238, 0.18));
  border: 1px solid rgba(129, 140, 248, 0.35);
}

.site-title h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  word-break: break-word;
}

.site-title h1 a:hover { color: #c7d2fe; }

.site-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 72ch;
}

.site-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.07);
}

.badge.ok { color: #a7f3d0; border-color: rgba(52, 211, 153, 0.32); background: rgba(52, 211, 153, 0.1); }
.badge.warn { color: #fde68a; border-color: rgba(251, 191, 36, 0.32); background: rgba(251, 191, 36, 0.1); }
.badge.bad { color: #fecaca; border-color: rgba(248, 113, 113, 0.32); background: rgba(248, 113, 113, 0.1); }
.badge.ghost { color: var(--muted-2); }

/* ------------------------------------------------------------- stats */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 8px;
}

.stat {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(13, 22, 38, 0.65);
}

.stat b {
  display: block;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat span {
  color: var(--muted-2);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 0.72rem; }

/* ---------------------------------------------------------- meta bar */
.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.05);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-chip b { color: var(--muted-2); font-weight: 600; }

/* ---------------------------------------------------------- category nav */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 26px 0 8px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--muted);
  font-size: 0.78rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.cat-pill:hover { color: var(--text); border-color: var(--line-strong); }
.cat-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--cat, var(--accent)); }
.cat-pill span { color: var(--muted-2); font-size: 0.72rem; }

/* ---------------------------------------------------------- tech cards */
.tech-group {
  margin-top: 30px;
  scroll-margin-top: 90px;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.group-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 0.95rem;
  background: color-mix(in srgb, var(--cat) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat) 34%, transparent);
}

.group-head h3 { font-size: 1.02rem; }

.group-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}

.tech-card {
  position: relative;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(165deg, rgba(17, 26, 45, 0.72), rgba(10, 16, 29, 0.62));
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.tech-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, var(--cat, var(--accent)), transparent);
  opacity: 0.7;
}

.tech-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.35);
}

.tech-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}

.tech-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #e2e8f0;
  background: color-mix(in srgb, var(--cat, var(--accent)) 18%, rgba(15, 23, 42, 0.9));
  border: 1px solid color-mix(in srgb, var(--cat, var(--accent)) 32%, transparent);
}

.tech-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tech-title h4 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 0.95rem;
}

.tech-title h4 a:hover { color: #c7d2fe; }

.version {
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
  color: #a5f3fc;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
}

.conf {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--muted-2);
}

.conf i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
}

.conf.high i { background: var(--ok); }
.conf.mid i { background: var(--warn); }
.conf.low i { background: var(--muted-2); }

.tech-card > p {
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.5;
}

.evidence {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.evidence summary {
  cursor: pointer;
  color: var(--muted-2);
  font-size: 0.73rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.evidence summary::-webkit-details-marker { display: none; }
.evidence summary::before {
  content: "▸";
  font-size: 0.65rem;
  transition: transform 0.15s ease;
}
.evidence[open] summary::before { transform: rotate(90deg); }
.evidence summary:hover { color: var(--muted); }

.evidence ul {
  list-style: none;
  padding: 8px 0 0;
  display: grid;
  gap: 6px;
}

.evidence li {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  word-break: break-word;
}

.ev-type {
  flex: 0 0 auto;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  text-transform: uppercase;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

/* ---------------------------------------------------------- skeletons */
.skeleton-head,
.skeleton-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(17, 26, 45, 0.55);
}

.skeleton-head { height: 120px; margin-top: 30px; }
.skeleton-card { height: 150px; }

.skeleton-head::after,
.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(148, 163, 184, 0.08) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.loading-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.86rem;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.25);
  border-top-color: #818cf8;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------- messages */
.notice,
.error-card {
  margin: 32px 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 26, 45, 0.7);
}

.error-card {
  border-color: rgba(248, 113, 113, 0.32);
  background:
    radial-gradient(400px 160px at 0% 0%, rgba(248, 113, 113, 0.12), transparent 70%),
    rgba(17, 26, 45, 0.7);
}

.error-card h2 { font-size: 1.2rem; margin-bottom: 6px; }
.error-card p { color: var(--muted); font-size: 0.9rem; }
.error-card code {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.1);
}
.error-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.empty-state {
  margin-top: 26px;
  padding: 40px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

.empty-state .big { font-size: 2rem; margin-bottom: 10px; }
.empty-state h3 { color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 0.88rem; max-width: 60ch; margin-inline: auto; }

/* ------------------------------------------------------- catalog page */
.page-head {
  padding: 54px 0 10px;
}

.page-head h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  letter-spacing: -0.04em;
  max-width: 20ch;
}

.page-head p {
  margin-top: 12px;
  max-width: 68ch;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 26px 0 16px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 280px;
  max-width: 420px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.7);
}

.search-box:focus-within { border-color: rgba(99, 102, 241, 0.6); }
.search-box span { color: var(--muted-2); }
.search-box input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 0.9rem; }

.select {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface-2);
  font-size: 0.85rem;
  color: var(--muted);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.catalog-item {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(17, 26, 45, 0.58);
}

.catalog-item h4 { font-size: 0.92rem; display: flex; justify-content: space-between; gap: 8px; }
.catalog-item h4 span { color: var(--muted-2); font-size: 0.68rem; font-family: var(--mono); }
.catalog-item p { margin-top: 6px; color: var(--muted); font-size: 0.79rem; }
.cat-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.cat-tag {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.64rem;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.09);
  border: 1px solid var(--line);
}

.result-count { color: var(--muted-2); font-size: 0.8rem; margin-left: auto; }

/* ------------------------------------------------------------- trends */
.coverage {
  display: grid;
  gap: 13px;
  margin-top: 22px;
}

.bar-row {
  display: grid;
  grid-template-columns: 190px 1fr 44px;
  gap: 12px;
  align-items: center;
  font-size: 0.82rem;
}

.bar-row .label { display: flex; align-items: center; gap: 8px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .label i { width: 8px; height: 8px; border-radius: 50%; background: var(--cat); flex: 0 0 auto; }
.bar-track { display: block; height: 8px; border-radius: 999px; background: rgba(148, 163, 184, 0.1); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--cat), color-mix(in srgb, var(--cat) 55%, #22d3ee)); }
.bar-row .num { text-align: right; color: var(--muted-2); font-family: var(--mono); font-size: 0.72rem; }

.trend-list { display: grid; gap: 8px; margin-top: 20px; }

.trend-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(17, 26, 45, 0.58);
}

.trend-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.13);
  color: #c7d2fe;
  font-family: var(--mono);
  font-size: 0.76rem;
}

.trend-item h4 { font-size: 0.92rem; }
.trend-item p { color: var(--muted-2); font-size: 0.74rem; }
.trend-count { font-family: var(--mono); font-size: 0.8rem; color: #a5f3fc; }

.callout {
  margin-top: 22px;
  padding: 20px 22px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: var(--radius);
  background:
    radial-gradient(420px 180px at 0% 0%, rgba(99, 102, 241, 0.12), transparent 70%),
    rgba(17, 26, 45, 0.6);
}

.callout h3 { font-size: 1rem; margin-bottom: 6px; }
.callout p { color: var(--muted); font-size: 0.86rem; }
.callout pre {
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #080d18;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: #c7d2fe;
  line-height: 1.6;
}

/* ------------------------------------------------------------ api panel */
.api-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(520px 260px at 0% 0%, rgba(99, 102, 241, 0.14), transparent 70%),
    radial-gradient(420px 220px at 100% 100%, rgba(34, 211, 238, 0.08), transparent 70%),
    rgba(17, 26, 45, 0.62);
  box-shadow: var(--shadow);
}

.api-copy h2 {
  margin-top: 16px;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  max-width: 24ch;
}

.api-copy > p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 56ch;
}

.api-points {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 8px;
}

.api-points li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.84rem;
}

.api-points li > span {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 2px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.3);
  font-size: 0.62rem;
}

.api-points code {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #dbeafe;
  background: rgba(148, 163, 184, 0.1);
  padding: 1px 6px;
  border-radius: 5px;
}

.api-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.api-code {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #070c16;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.4);
}

.code-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.04);
}

.code-dots {
  display: flex;
  gap: 5px;
  flex: 0 0 auto;
}

.code-dots i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
}

.code-dots i:nth-child(1) { background: #f87171; }
.code-dots i:nth-child(2) { background: #fbbf24; }
.code-dots i:nth-child(3) { background: #34d399; }

.code-title {
  flex: 1;
  min-width: 0;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.code-copy {
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
  border-radius: 7px;
  padding: 4px 9px;
  font-size: 0.68rem;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.code-copy:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.16);
}

.api-code pre {
  margin: 0;
  padding: 16px 16px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.75;
  color: #cbd5e1;
}

.api-code code { font: inherit; }
.tok-cmd { color: #a5b4fc; }
.tok-str { color: #fcd34d; }
.tok-url { color: #67e8f9; word-break: break-all; }

.code-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 0.68rem;
  font-family: var(--mono);
}

.ok-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
  flex: 0 0 auto;
}

/* -------------------------------------------------------------- about */
.prose { max-width: 780px; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-size: 1.35rem; margin-top: 40px; }
.prose h3 { font-size: 1.05rem; margin-top: 26px; }
.prose p, .prose li { color: var(--muted); font-size: 0.92rem; }
.prose ul, .prose ol { padding-left: 20px; display: grid; gap: 7px; }
.prose strong { color: var(--text); }
.prose code {
  font-family: var(--mono);
  font-size: 0.82em;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.12);
  color: #dbeafe;
}

.prose pre {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #080d18;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.77rem;
  line-height: 1.65;
  color: #c7d2fe;
}

.prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.flow-step {
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(17, 26, 45, 0.7);
  font-size: 0.78rem;
  color: var(--muted);
}

.flow-arrow { color: var(--muted-2); }

/* ------------------------------------------------------------- footer */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.6);
}

.footer-inner {
  padding: 40px 0 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
}

.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand p { color: var(--muted); font-size: 0.84rem; max-width: 52ch; }
.footer-brand strong { color: var(--text); }

.footer-links {
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: end;
  font-size: 0.84rem;
  color: var(--muted);
}

.footer-links a:hover { color: var(--text); }

.footer-fine {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 0.74rem;
}

/* -------------------------------------------------------------- toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #131e33;
  color: var(--text);
  font-size: 0.84rem;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 80;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: 1fr; }
  .api-panel { grid-template-columns: 1fr; padding: 24px; }
  .api-copy h2 { max-width: none; }
  .skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-items: start; }
  .bar-row { grid-template-columns: 130px 1fr 40px; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 28px, 1180px); }
  .header-inner { height: 60px; gap: 10px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 0.94rem; }
  .nav { gap: 1px; font-size: 0.78rem; }
  .nav a { padding: 6px; }
  .nav a:first-child,
  .nav .nav-cta { display: none; }
  .eyebrow {
    font-size: 0.7rem;
    gap: 6px;
    padding: 6px 11px;
    white-space: nowrap;
  }
  .eyebrow-note { display: none; }
  .lookup-form { flex-wrap: wrap; padding: 6px; }
  .lookup-form .globe { display: none; }
  .lookup-form input { flex-basis: 100%; padding: 10px 12px; }
  .lookup-form .btn { width: 100%; }
  .site-card { padding: 18px; }
  .site-actions { width: 100%; }
  .site-actions .btn { flex: 1; }
  .tech-grid, .skeleton-grid { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .api-panel { padding: 18px; gap: 22px; }
  .api-code pre {
    font-size: 0.7rem;
    padding: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .bar-row { grid-template-columns: 1fr; gap: 5px; }
  .bar-row .num { text-align: left; }
  .trend-item { grid-template-columns: 34px 1fr; }
  .trend-count { grid-column: 2; }
}

@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;
  }
}
