/* =========================================================
   DevSpireHub — AI Resource Intelligence
   Design tokens, components, and responsive layout
   ========================================================= */

:root {
  --bg: #01081C;
  --surface: #071225;
  --surface-2: #0B1830;
  --surface-3: #10213D;
  --surface-hover: #091830;
  --surface-deep: #050D1D;

  --accent: #8B5CF6;
  --accent-hover: #A78BFA;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --btn: #7C3AED;
  --btn-hover: #6D28D9;
  --cyan: #38BDF8;

  --text: #F1F5F9;
  --text-2: #A7B4C8;
  --muted: #7F90AA;

  --border: #20314D;
  --border-soft: rgba(32, 49, 77, 0.62);

  --success: #34D399;
  --warning: #FBBF24;
  --error: #F87171;

  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --container: 1408px;
  --content: 1360px;
  --gutter: 24px;
  --header-h: 56px;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body::selection,
body *::selection {
  background: rgba(139, 92, 246, 0.35);
  color: var(--text);
}

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

ul {
  padding: 0;
  list-style: none;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-11 { width: 11px; height: 11px; }
.icon-12 { width: 12px; height: 12px; }
.icon-14 { width: 14px; height: 14px; }
.icon-15 { width: 15px; height: 15px; }
.icon-16 { width: 16px; height: 16px; }
.icon-18 { width: 18px; height: 18px; }
.icon-20 { width: 20px; height: 20px; }

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

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 10px;
}

:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 2px;
}

/* =========================
   Buttons & chips
   ========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--btn);
  color: #fff;
}

.btn-primary:hover {
  background: var(--btn-hover);
}

.btn-secondary {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
}

.btn-xs {
  height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
}

.key-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.mono-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}

.code-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  white-space: nowrap;
}

.tag-chip.is-accent {
  color: var(--cyan);
}

/* =========================
   Header
   ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: var(--header-h);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: var(--btn);
  color: #fff;
  transition: background-color 0.15s ease;
}

.brand:hover .brand-mark {
  background: var(--accent);
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.version-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  animation: soft-pulse 2.8s ease-in-out infinite;
}

@keyframes soft-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.primary-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 22px;
}

.nav-link {
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-find {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.quick-find:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.quick-find .key-hint {
  height: 18px;
  background: var(--surface);
}

.docs-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.docs-link:hover {
  color: var(--text);
}

.menu-toggle {
  display: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text-2);
}

.menu-toggle:hover {
  color: var(--text);
  border-color: var(--cyan);
}

.mobile-menu {
  position: absolute;
  inset: 100% 0 auto;
  z-index: 59;
  padding: 8px var(--gutter) 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-2);
  font-size: 14px;
  text-decoration: none;
}

.mobile-nav a:last-child {
  border-bottom: 0;
}

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

.mobile-menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mobile-menu-actions .quick-find {
  flex: 1 1 100%;
  justify-content: space-between;
  height: 38px;
}

.mobile-docs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  text-decoration: none;
}

.mobile-menu-actions .btn {
  flex: 1 1 auto;
}

/* =========================
   Page rhythm
   ========================= */

.page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding-top: 26px;
  padding-bottom: 0;
}

#taxonomy,
#featured,
#telemetry,
#infrastructure {
  scroll-margin-top: calc(var(--header-h) + 18px);
}

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

.section-title {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.section-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

/* =========================
   Hero
   ========================= */

.hero {
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  padding: 16px 0 4px;
  text-align: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.035em;
}

.badge-pill .icon {
  flex: none;
}

.hero h1 {
  max-width: 760px;
  margin: 17px auto 12px;
  font-size: clamp(27px, 2.2vw + 7px, 34px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 27px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.search-shell {
  max-width: 640px;
  margin-inline: auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 50px;
  padding: 0 8px 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon {
  display: inline-flex;
  color: var(--muted);
}

#resource-search {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}

#resource-search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

#resource-search::placeholder {
  color: var(--muted);
  opacity: 1;
}

#resource-search:focus-visible {
  outline: none;
}

.search-clear {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--muted);
}

.search-clear:hover {
  background: var(--surface-3);
  color: var(--text);
}

.search-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
}

.query-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
}

.preset-label {
  color: var(--muted);
  font-size: 11px;
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.preset-chip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.preset-chip.is-active {
  border-color: rgba(139, 92, 246, 0.55);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

/* =========================
   Resource type cards
   ========================= */

.type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.type-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.type-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: var(--surface-hover);
}

.type-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--cyan);
}

.icon-tile.tone-amber { color: var(--warning); }
.icon-tile.tone-green { color: var(--success); }

.type-title {
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.type-desc {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.62;
}

.type-card:hover .type-title {
  color: var(--cyan);
}

.type-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.type-card-foot .mono-meta {
  font-size: 11px;
  letter-spacing: 0.01em;
}

.card-arrow {
  display: inline-flex;
  color: var(--muted);
  transition: transform 0.15s ease, color 0.15s ease;
}

.type-card:hover .card-arrow {
  color: var(--cyan);
  transform: translateX(2px);
}

/* =========================
   Taxonomy
   ========================= */

.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.taxonomy-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.taxonomy-item:hover {
  border-color: var(--cyan);
  background: var(--surface-3);
}

.taxonomy-item.is-spotlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.taxonomy-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.taxonomy-label .icon {
  width: 17px;
  height: 17px;
  flex: none;
}

.accent-cyan { color: var(--cyan); }
.accent-violet { color: var(--accent-hover); }
.accent-green { color: var(--success); }
.accent-amber { color: var(--warning); }

.taxonomy-count {
  flex: none;
  min-width: 22px;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  text-align: center;
}

/* =========================
   Featured resources
   ========================= */

.sample-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.sample-note .status-sep {
  color: var(--border);
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button[aria-pressed="true"] {
  border-color: var(--border);
  background: var(--surface-3);
  color: var(--text);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.filter-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 4px 0 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
}

.filter-chip .chip-key {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.filter-chip button {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
}

.filter-chip button:hover {
  background: var(--surface-3);
  color: var(--error);
}

.link-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-hover);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  text-decoration: none;
}

.link-btn:hover {
  text-decoration: underline;
}

.results-status {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.resource-card:hover {
  border-color: rgba(56, 189, 248, 0.32);
}

.resource-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.resource-identity {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}

.res-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-2);
}

.res-logo.tone-green { color: var(--success); }
.res-logo.tone-cyan { color: var(--cyan); }
.res-logo.tone-amber { color: var(--warning); }
.res-logo.tone-red { color: var(--error); }

.resource-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.resource-title {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.07);
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.verified-pill .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--success);
}

.resource-classification {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.license-chip {
  flex: none;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.license-chip.warning {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.06);
  color: var(--warning);
}

.license-chip.neutral {
  color: var(--text-2);
}

.resource-desc {
  display: -webkit-box;
  min-height: calc(1.6em * 2);
  margin-bottom: 12px;
  overflow: hidden;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.param-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.param-label {
  display: block;
  margin-bottom: 2px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.param-value {
  display: block;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.param-value.is-accent {
  color: var(--cyan);
}

.resource-card .tag-row {
  margin-bottom: 13px;
}

.resource-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.verified-meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Dense table */

.resource-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.resource-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  text-align: left;
}

.resource-table th {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.resource-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-2);
  font-size: 12px;
  vertical-align: middle;
}

.resource-table tbody tr:last-child td {
  border-bottom: 0;
}

.resource-table tbody tr:hover td {
  background: rgba(16, 33, 61, 0.45);
}

.table-res {
  display: flex;
  align-items: center;
  gap: 9px;
}

.res-logo-sm {
  width: 28px;
  height: 28px;
  font-size: 9px;
}

.table-name {
  display: block;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.table-sub {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.table-params {
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  min-width: 240px;
}

.table-verified {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

.table-empty {
  padding: 30px 12px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

/* Empty state */

.empty-state {
  grid-column: 1 / -1;
  padding: 36px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: rgba(11, 24, 48, 0.35);
  text-align: center;
}

.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
}

.empty-title {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
}

.empty-copy {
  max-width: 430px;
  margin: 0 auto 14px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* =========================
   Telemetry feed
   ========================= */

.feed-panel {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.feed-title-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--success);
}

.feed-title {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.sample-chip {
  padding: 2px 5px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 3px;
  background: rgba(251, 191, 36, 0.06);
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.feed-head .mono-meta {
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.feed-note {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.feed-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.feed-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.feed-name {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.feed-status {
  flex: none;
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.feed-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.feed-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 7px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.4;
}

/* =========================
   Infrastructure panel
   ========================= */

.infra-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.infra-copy {
  max-width: 720px;
}

.infra-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 3px 7px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: var(--radius-xs);
  background: rgba(251, 191, 36, 0.05);
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.infra-title {
  max-width: 640px;
  margin-bottom: 6px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.infra-desc {
  max-width: 630px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.62;
}

.infra-tags {
  gap: 7px;
}

.infra-tags .tag-chip {
  padding: 4px 8px;
  font-size: 10px;
}

.infra-actions {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 9px;
  width: 238px;
}

.infra-actions .btn {
  justify-content: flex-start;
  width: 100%;
  height: 38px;
  padding: 0 14px;
  font-size: 12.5px;
}

/* =========================
   Footer
   ========================= */

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-block: 26px;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.prod-chip {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.footer-note {
  max-width: 640px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 18px;
}

.footer-links a,
.footer-links button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11.5px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

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

.noscript-note {
  margin: 0;
  padding: 12px var(--gutter);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--warning);
  font-size: 12px;
  text-align: center;
}

/* =========================
   Dialogs
   ========================= */

.modal {
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.modal[open] {
  display: flex;
  flex-direction: column;
  animation: modal-in 0.16s ease-out;
}

.modal::backdrop {
  background: rgba(1, 8, 28, 0.78);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-head-main {
  min-width: 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.modal-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}

.icon-btn:hover {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  min-height: 0;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.detail-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.detail-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.detail-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.detail-desc {
  margin-bottom: 14px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.65;
}

.detail-note {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.detail-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.submit-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.preview-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 16px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1.55;
}

.preview-note .icon {
  margin-top: 2px;
  color: var(--cyan);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field .optional {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 78px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-status {
  margin-top: 4px;
  padding: 9px 10px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 12px;
  line-height: 1.55;
}

.notice-copy {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.65;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 1279px) {
  .version-chip {
    display: none;
  }

  .header-actions .quick-find {
    padding: 0 7px;
  }

  .header-actions .quick-find > span:not(.key-hint) {
    display: none;
  }
}

@media (max-width: 1099px) {
  .header-actions .quick-find {
    display: none;
  }
}

@media (max-width: 1023px) {
  .primary-nav {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .docs-link {
    display: none;
  }

  .infra-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .infra-actions {
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
  }

  .infra-actions .btn {
    flex: 1 1 210px;
    justify-content: center;
  }

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

@media (max-width: 919px) {
  .type-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 819px) {
  .feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  .resource-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  :root {
    --gutter: 18px;
  }

  .page-main {
    gap: 38px;
    padding-top: 18px;
  }

  .hero {
    padding-top: 10px;
  }

  .hero-sub {
    font-size: 14px;
    margin-bottom: 22px;
  }

  .badge-pill {
    font-size: 9.5px;
    letter-spacing: 0.02em;
  }

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

  .section-tools {
    align-self: flex-start;
  }

  .section-title {
    font-size: 21px;
  }

  .feed-head {
    flex-wrap: wrap;
  }

  .infra-panel {
    padding: 20px;
  }

  .infra-title {
    font-size: 20px;
  }

  .footer-inner {
    gap: 16px;
  }

  .footer-links {
    gap: 8px 16px;
  }
}

@media (max-width: 639px) {
  .header-cta {
    display: none;
  }

  .brand-name {
    font-size: 15px;
  }

  #resource-search {
    font-size: 16px;
  }

  .search-box {
    height: 48px;
    padding-left: 11px;
  }

  .hero h1 {
    font-size: clamp(26px, 7.4vw, 32px);
  }

  .query-presets {
    gap: 6px;
  }

  .preset-chip {
    padding: 0 8px;
    font-size: 10px;
  }

  .results-status {
    margin-left: 0;
  }

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

  .infra-actions .btn {
    flex: 1 1 100%;
  }

  .footer-links {
    gap: 8px 14px;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-inline: 16px;
  }
}

@media (max-width: 519px) {
  .taxonomy-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .preset-label {
    width: 100%;
    text-align: center;
  }

  .param-label {
    letter-spacing: 0.04em;
  }

  .resource-head {
    gap: 8px;
  }

  .resource-desc {
    min-height: 0;
  }

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

@media (max-width: 399px) {
  .brand-name {
    font-size: 14px;
  }

  .brand-mark {
    width: 24px;
    height: 24px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .segmented button {
    padding: 0 6px;
    font-size: 9.5px;
  }

  .tag-chip {
    white-space: normal;
  }

  .footer-links a,
  .footer-links button {
    white-space: normal;
  }
}

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

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