:root {
  --bg: #0b1220;
  --bg-2: #0f1a33;
  --card: rgba(255, 255, 255, 0.06);
  --card-2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --muted-2: rgba(255, 255, 255, 0.52);
  --accent: #7c3aed;
  --accent-2: #22c55e;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-sm: 12px;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 15% -10%, rgba(124, 58, 237, 0.25), transparent 60%),
    radial-gradient(900px 700px at 85% 10%, rgba(34, 197, 94, 0.18), transparent 55%),
    linear-gradient(180deg, var(--bg), #070b15);
  line-height: 1.55;
}

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

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.sr-only {
  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;
  left: 0.75rem;
  top: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--border);
  border-radius: 10px;
  transform: translateY(-140%);
  transition: transform 140ms ease;
  z-index: 9999;
}
.skip-link:focus {
  transform: translateY(0);
  outline: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(11, 18, 32, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

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

.brand-text {
  font-size: 1rem;
}

/* "i" as first letter of iAgentBench: different font + subtle visual, reads as one word */
.brand-i {
  position: relative;
  display: inline;
  font-family: "Lora", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  color: #7dd3fc;
  margin-right: 0.02em;
  padding: 0 0.06em;
  letter-spacing: -0.03em;
}
.brand-i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1.12em;
  height: 1.12em;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.16);
  z-index: -1;
}
.brand-i-sm {
  padding: 0 0.04em;
}
.brand-i-sm::before {
  width: 1.05em;
  height: 1.05em;
}
.brand-i-hero {
  padding: 0 0.08em;
}
.brand-i-hero::before {
  width: 1.18em;
  height: 1.18em;
  background: rgba(56, 189, 248, 0.14);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
}

.nav-toggle-bars {
  display: block;
  width: 18px;
  height: 12px;
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after,
.nav-toggle-bars {
  background: transparent;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
}
.nav-toggle-bars::before {
  top: 1px;
}
.nav-toggle-bars::after {
  bottom: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 0.75rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  font-size: 0.92rem;
  border: 1px solid transparent;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}
.nav-link.is-active {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(124, 58, 237, 0.35);
  color: rgba(255, 255, 255, 0.95);
}

.hero {
  padding: 4.25rem 0 2.25rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 2.25rem;
  align-items: start;
}

.kicker {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0 0 0.65rem;
}

h1 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0 0 0.85rem;
}

.lead {
  margin: 0 0 1.25rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  max-width: 60ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.1rem 0 1.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  border-color: rgba(124, 58, 237, 0.45);
  background: rgba(124, 58, 237, 0.18);
}
.btn-secondary {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.16);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
}

/* Explorer Demo CTA: same size/font, stands out with accent and subtle glow */
.btn-explorer-demo {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.15);
}
.btn-explorer-demo:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.meta {
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.meta-label {
  color: var(--muted-2);
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}
.meta-value {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.hero-card {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.hero-card-title {
  margin-left: 0.35rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  opacity: 0.9;
}
.dot-red {
  background: #ef4444;
}
.dot-yellow {
  background: #f59e0b;
}
.dot-green {
  background: #22c55e;
}
.hero-card-body {
  padding: 1.1rem 1rem 1.25rem;
}

/* Standalone full-width button below pipeline image */
.hero-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.pipeline-demo-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.85rem 1.25rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #e0f2fe;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.22) 0%, rgba(56, 189, 248, 0.12) 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.pipeline-demo-btn:hover {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.3) 0%, rgba(56, 189, 248, 0.18) 100%);
  color: #fff;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.25);
}

.skeleton-line {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.6rem 0;
}
.skeleton-block {
  height: 140px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  margin: 1rem 0;
  border: 1px dashed rgba(255, 255, 255, 0.14);
}
.w-90 {
  width: 90%;
}
.w-95 {
  width: 95%;
}
.w-85 {
  width: 85%;
}
.w-75 {
  width: 75%;
}
.w-70 {
  width: 70%;
}
.w-60 {
  width: 60%;
}

.section {
  padding: 3rem 0;
}
.section.alt {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-head {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.4rem;
}

h2 {
  margin: 0;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 80ch;
}

.grid {
  display: grid;
  gap: 1rem;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  padding: 1.05rem 1.05rem 1.1rem;
}

.card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 0.9rem;
}

.list {
  padding-left: 1.1rem;
  margin: 0.45rem 0 0;
  color: rgba(255, 255, 255, 0.78);
}
.list li {
  margin: 0.35rem 0;
}

.callout {
  margin-top: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: rgba(124, 58, 237, 0.08);
  padding: 1rem 1.05rem;
  display: grid;
  gap: 0.25rem;
}
.callout-title {
  font-weight: 700;
  letter-spacing: -0.01em;
}
.callout-body p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.link-card {
  display: block;
  padding: 1rem 1rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.link-card:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}
.link-card-title {
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}
.link-card-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.code {
  margin: 0.75rem 0 0;
  padding: 0.9rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  overflow: auto;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
}
.code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
}

.table-wrap {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  overflow: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.table th,
.table td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  color: rgba(255, 255, 255, 0.82);
}
.table th {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.92rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
}

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-brand {
  font-weight: 800;
  letter-spacing: -0.02em;
}
.footer-muted {
  margin-left: 0.6rem;
  color: var(--muted);
}
.footer-link {
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.footer-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
}

/* Explorer Demo layout */
.explorer-main {
  min-height: 60vh;
}
.explorer-section {
  padding: 2rem 0 3rem;
}
.explorer-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
  align-items: start;
}
.explorer-qa-strip {
  position: sticky;
  top: 5rem;
}
.qa-strip-card {
  padding: 0.85rem 0.9rem;
}
.qa-strip-card h3 {
  margin-bottom: 0.2rem;
}
.qa-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 70vh;
  overflow-y: auto;
  margin-top: 0.5rem;
}
.qa-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  text-align: left;
  line-height: 1.35;
}
.qa-list-item .qa-list-item-preview {
  flex: 1;
  min-width: 0;
}
.qa-list-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}
.qa-list-item.is-selected {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.4);
}
.qa-list-item-id {
  font-weight: 600;
  margin-right: 0.4rem;
  flex-shrink: 0;
}
.qa-list-item-preview {
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.explorer-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.explorer-graph-area {
  flex-shrink: 0;
}
.explorer-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}
.detail-block {
  margin: 0;
  min-width: 0;
}
.detail-question { grid-column: 1; }
.detail-answer { grid-column: 2; }
.detail-metadata { grid-column: 1 / -1; }
.detail-communities { grid-column: 1 / -1; }
.detail-sources { grid-column: 1 / -1; }
.detail-judges { grid-column: 1 / -1; }
.detail-list-item .community-id {
  color: var(--muted-2);
  font-weight: 600;
  margin-right: 0.25rem;
}
.detail-text {
  margin: 0.3rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  font-size: 0.95rem;
}
.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.4rem 1rem;
  margin-top: 0.4rem;
}
.detail-meta-item {
  font-size: 0.875rem;
}
.detail-meta-item strong {
  color: var(--muted-2);
  font-weight: 500;
  margin-right: 0.35rem;
}
.detail-list {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 14em;
  overflow-y: auto;
}
.detail-communities .detail-list {
  max-height: none;
}
.detail-list-item {
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}
.card-title-standalone {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.detail-judges .judges-grid {
  margin-top: 0.25rem;
}
.judges-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 0.9rem;
}
.judge-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  padding: 0.9rem 0.95rem;
  min-width: 0;
}
.judge-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}
.judge-verdict {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.judge-verdict.pass {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}
.judge-verdict.fail {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}
.judge-criterion {
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  line-height: 1.35;
}
.judge-criterion-label {
  color: var(--muted-2);
  margin-right: 0.25rem;
}
.judge-criterion-reasoning {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.graph-placeholder {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.graph-placeholder-inner {
  text-align: center;
  padding: 0.75rem;
}
.graph-placeholder-inner p {
  margin: 0.2rem 0;
}

/* ── Interactive graph panel ─────────────────────────────────────────── */
.graph-panel {
  overflow: hidden;
  padding: 0;
}
.graph-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
  flex-wrap: wrap;
}
.graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.75rem;
}
.graph-legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.73rem;
  color: var(--muted);
  white-space: nowrap;
}
.graph-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.graph-controls {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}
.graph-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.28rem 0.52rem;
  transition: background 0.15s, color 0.15s;
}
.graph-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
}
.graph-canvas-wrap {
  position: relative;
  height: 420px;
}
.graph-cy {
  position: absolute;
  inset: 0;
  background: transparent;
}
.graph-placeholder-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 1rem;
  text-align: center;
}
.graph-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(10, 15, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 200px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  z-index: 10;
}
.graph-tip-name {
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}
.graph-tip-type {
  color: var(--muted-2);
  font-size: 0.72rem;
  margin-top: 0.15rem;
}
.graph-tip-comm {
  color: var(--muted-2);
  font-size: 0.72rem;
  margin-top: 0.1rem;
}
.graph-tip-deg {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.1rem;
}
.graph-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  color: var(--muted);
  background: rgba(11, 18, 32, 0.6);
  pointer-events: none;
  z-index: 5;
}
.graph-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  animation: graph-spin 0.75s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
  flex-shrink: 0;
}
@keyframes graph-spin {
  to { transform: rotate(360deg); }
}

/* ── Graph header additions ─────────────────────────────────────────── */
.graph-header {
  flex-wrap: nowrap;
  align-items: flex-start;
}
.graph-legend {
  max-height: 56px;
  overflow-y: auto;
  flex: 1;
  min-width: 0;
  cursor: default;
}
.graph-legend-label {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
}
.graph-legend-item {
  cursor: pointer;
  border-radius: 5px;
  padding: 0.1rem 0.3rem;
  transition: background 0.15s, opacity 0.15s;
}
.graph-legend-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.graph-legend-item.is-focused {
  background: rgba(255, 255, 255, 0.12);
  outline: 1px solid rgba(255, 255, 255, 0.28);
}
.graph-header-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
}
.graph-layout-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.graph-layout-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-right: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-family: inherit;
  padding: 0.27rem 0.55rem;
  transition: background 0.14s, color 0.14s;
  white-space: nowrap;
}
.graph-layout-btn:last-child {
  border-right: none;
}
.graph-layout-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}
.graph-layout-btn.is-active {
  background: rgba(124, 58, 237, 0.35);
  color: #c4b5fd;
}

/* ── Graph detail panel ──────────────────────────────────────────────── */
.graph-detail-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: rgba(7, 12, 26, 0.96);
  border-left: 1px solid transparent;
  overflow: hidden;
  transition: width 0.22s ease, border-color 0.22s;
  z-index: 8;
  border-radius: 0 0 var(--radius-sm) 0;
}
.graph-detail-panel.is-open {
  width: 268px;
  border-color: var(--border);
  overflow-y: auto;
}
.gdp-close {
  position: sticky;
  top: 0;
  float: right;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  margin: 0.55rem 0.55rem 0 0;
  padding: 0.18rem 0.5rem;
  transition: background 0.14s;
  z-index: 2;
}
.gdp-close:hover {
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
}
.gdp-body {
  padding: 0.7rem 0.85rem 1rem;
  overflow-wrap: break-word;
}
.gdp-header {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
  margin-top: 0.15rem;
}
.gdp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.25rem;
}
.gdp-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}
.gdp-edge-name {
  font-size: 0.82rem;
}
.gdp-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  padding: 0.1rem 0.45rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.gdp-comm {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
  font-style: italic;
}
.gdp-stat {
  font-size: 0.73rem;
  color: var(--muted-2);
  margin-bottom: 0.5rem;
}
.gdp-section-label {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0.7rem 0 0.3rem;
}
.gdp-desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.55;
}
.gdp-desc-full {
  max-height: 40em;
  overflow-y: auto;
}
.gdp-para {
  margin: 0 0 0.6rem;
}
.gdp-para:last-child {
  margin-bottom: 0;
}
.gdp-neighbors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.1rem;
}
.gdp-neighbor {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 0.12rem 0.4rem;
  color: var(--muted);
  word-break: break-word;
}
.gdp-muted {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.5rem 0;
}
.gdp-findings {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  list-style: disc;
}
.gdp-finding {
  font-size: 0.76rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.82);
}
.gdp-finding strong {
  display: block;
  color: var(--muted-2);
  margin-bottom: 0.15rem;
}
.gdp-finding-snippet {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.1rem;
}
.detail-sources .list {
  margin-top: 0.35rem;
  max-height: 8em;
  overflow-y: auto;
}
.detail-sources .list a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
}
.detail-sources .list a:hover {
  color: var(--accent-2);
}

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .explorer-layout {
    grid-template-columns: 1fr;
  }
  .explorer-qa-strip {
    position: static;
  }
  .qa-list {
    max-height: 220px;
  }
  .explorer-detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-question { grid-column: 1; }
  .detail-answer { grid-column: 1; }
  .judges-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .nav-links {
    position: absolute;
    right: 1rem;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    min-width: min(320px, calc(100vw - 2rem));
    padding: 0.55rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(11, 18, 32, 0.92);
    box-shadow: var(--shadow);
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-link {
    height: 42px;
    justify-content: flex-start;
  }
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .meta-row {
    grid-template-columns: 1fr;
  }
}
