:root {
  color-scheme: light;
  --ink: #102033;
  --muted: #607184;
  --line: #dbe4ea;
  --surface: #ffffff;
  --page: #eef3f6;
  --teal: #008080;
  --green: #2f8f60;
  --gold: #b8791f;
  --red: #b54848;
  --blue: #3768b2;
  --violet: #6d5bd0;
  --shadow: 0 16px 44px rgba(16, 32, 51, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6f2ff;
  --muted: #8ea7c4;
  --line: #1c4770;
  --surface: #071322;
  --page: #030915;
  --teal: #16d4ff;
  --green: #8eea44;
  --gold: #e8b84d;
  --red: #ff6f7d;
  --blue: #49a3ff;
  --violet: #9a87ff;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 128, 128, 0.12), transparent 32rem),
    linear-gradient(180deg, #f8fbfc 0%, var(--page) 42rem);
}

body.has-start-screen {
  height: 100dvh;
  overflow: hidden;
}

body.has-start-screen .site-header,
body.has-start-screen #dashboard-main {
  display: none !important;
}

.hub-start {
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  padding: clamp(1.5rem, 5vw, 5rem);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 128, 128, 0.14), transparent 28rem),
    linear-gradient(180deg, #f8fbfc 0%, var(--page) 100%);
}

.hub-start[hidden] {
  display: none;
}

html[data-theme="dark"] .hub-start {
  background:
    radial-gradient(circle at 72% 7%, rgba(22, 212, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 18% 24%, rgba(142, 234, 68, 0.09), transparent 28rem),
    linear-gradient(180deg, #020713 0%, var(--page) 100%);
}

.hub-start-card {
  width: min(760px, 100%);
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hub-start-card h1 {
  margin: 0.25rem 0 0.75rem;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0;
}

.hub-demo-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.hub-conf-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin: 1.5rem 0 1rem;
}

.hub-conf-form label {
  display: grid;
  gap: 0.35rem;
}

.hub-conf-form input {
  width: 100%;
  min-height: 2.75rem;
}

@media (max-width: 640px) {
  .hub-conf-form {
    grid-template-columns: 1fr;
  }
}

.hub-demo-card {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: color-mix(in srgb, var(--surface) 92%, var(--teal));
}

.hub-demo-card:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 72% 7%, rgba(22, 212, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 18% 24%, rgba(142, 234, 68, 0.09), transparent 28rem),
    linear-gradient(180deg, #020713 0%, var(--page) 42rem);
}

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

button {
  border: 0;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--teal);
  cursor: pointer;
}

.link-button {
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.link-button:hover {
  color: var(--teal);
}

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

.site-header {
  position: relative;
  overflow: hidden;
  height: clamp(150px, 33.33vw, 520px);
  padding: 0;
  background: #fff var(--header-image) center / cover no-repeat;
  border-bottom: 1px solid var(--line);
  color: #fff;
}

html[data-theme="dark"] .site-header {
  background-image: var(--header-image-dark, var(--header-image));
  background-color: #020713;
}

.header-anim {
  display: none;
}

html[data-theme="dark"] .header-anim {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

html[data-theme="dark"] .header-anim::before,
html[data-theme="dark"] .header-anim::after {
  position: absolute;
  inset: 0;
  content: "";
}

html[data-theme="dark"] .header-anim::before {
  background:
    linear-gradient(100deg, transparent 0 42%, rgba(22, 212, 255, 0.18) 48%, transparent 56%),
    radial-gradient(circle at 74% 36%, rgba(142, 234, 68, 0.16), transparent 9rem),
    radial-gradient(circle at 79% 15%, rgba(22, 212, 255, 0.18), transparent 7rem);
  mix-blend-mode: screen;
  opacity: 0.72;
  animation: headerSweep 9s ease-in-out infinite;
}

html[data-theme="dark"] .header-anim::after {
  background-image:
    radial-gradient(circle, rgba(22, 212, 255, 0.82) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(142, 234, 68, 0.7) 0 1px, transparent 2px);
  background-position: 0 0, 24px 18px;
  background-size: 58px 58px, 88px 88px;
  opacity: 0.16;
  animation: headerDrift 16s linear infinite;
}

.header-pulse {
  position: absolute;
  width: clamp(18px, 2.4vw, 42px);
  aspect-ratio: 1;
  border: 1px solid rgba(22, 212, 255, 0.66);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(22, 212, 255, 0.42), inset 0 0 14px rgba(22, 212, 255, 0.22);
  opacity: 0;
  animation: headerPulse 4.8s ease-in-out infinite;
}

.header-pulse::before,
.header-pulse::after {
  position: absolute;
  inset: 26%;
  border-radius: inherit;
  background: rgba(22, 212, 255, 0.72);
  box-shadow: 0 0 18px rgba(22, 212, 255, 0.86);
  content: "";
}

.header-pulse::after {
  inset: -55%;
  border: 1px solid rgba(22, 212, 255, 0.26);
  background: transparent;
}

.header-pulse-1 {
  top: 10%;
  left: 84%;
}

.header-pulse-2 {
  top: 54%;
  left: 59%;
  border-color: rgba(142, 234, 68, 0.62);
  animation-delay: 0.9s;
}

.header-pulse-2::before {
  background: rgba(142, 234, 68, 0.72);
  box-shadow: 0 0 18px rgba(142, 234, 68, 0.86);
}

.header-pulse-3 {
  top: 20%;
  left: 48%;
  animation-delay: 1.8s;
}

.header-pulse-4 {
  top: 66%;
  left: 88%;
  animation-delay: 2.7s;
}

.header-scan {
  position: absolute;
  top: 9%;
  left: 47%;
  width: 42%;
  height: 58%;
  border: 1px solid rgba(22, 212, 255, 0.22);
  border-radius: 50%;
  opacity: 0.36;
  transform: rotate(-12deg);
  animation: headerOrbit 12s linear infinite;
}

@keyframes headerSweep {
  0%,
  100% {
    transform: translateX(-18%);
    opacity: 0.3;
  }
  48%,
  55% {
    transform: translateX(16%);
    opacity: 0.82;
  }
}

@keyframes headerDrift {
  to {
    background-position: 58px 58px, -64px 88px;
  }
}

@keyframes headerPulse {
  0%,
  100% {
    opacity: 0.18;
    transform: scale(0.82);
  }
  45% {
    opacity: 0.82;
    transform: scale(1.18);
  }
}

@keyframes headerOrbit {
  to {
    transform: rotate(348deg);
  }
}

.site-header .eyebrow,
.site-header .lede {
  color: rgba(255, 255, 255, 0.78);
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 0.75rem;
  font-size: clamp(2.25rem, 5vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.lede {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.6;
}

.panel,
.toolbar,
.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.toolbar span {
  display: block;
  margin-bottom: 0.24rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.42rem 0.62rem;
  color: var(--ink);
  background: var(--surface);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  color-scheme: dark;
}

main {
  display: flex;
  flex-direction: column;
  width: min(1500px, calc(100% - 2rem));
  margin: 1rem auto 3rem;
  --section-gap: 1.6rem;
  --section-gap-lg: 2rem;
}

.toolbar { order: 0; }
.graph-coverage-layout { order: 10; }
.active-filters { order: 20; }
.metrics { order: 30; }
.products-panel { order: 40; }
.projects-panel { order: 50; }
.dashboard-grid { order: 60; }
.pi-panel { order: 70; }
.attention-panel { order: 80; }
.operations-grid { order: 90; }
.publications-panel { order: 100; }
.detail-modal,
.json-modal { order: 110; }

main > section[id] {
  scroll-margin-top: 10.5rem;
}

main > section[hidden],
.graph-coverage-layout[hidden] {
  display: none !important;
}

.toolbar {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  display: grid;
  gap: 0.45rem;
  padding: 0.58rem 0.7rem;
}

.toolbar-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 0.75rem;
  align-items: end;
}

.toolbar-clear {
  min-width: 92px;
}

.toolbar-clear button {
  width: 100%;
}

.toolbar-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  border-top: 1px solid var(--line);
  padding-top: 0.45rem;
}

.toolbar-nav,
.toolbar-actions-row > .toolbar-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.toolbar-nav {
  justify-content: flex-start;
}

.toolbar-actions-row > .toolbar-actions {
  justify-content: flex-end;
}

.version-badge {
  align-self: end;
  margin: 0 0 0.42rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  padding: 0.38rem 0.62rem;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  font-size: 0.84rem;
}

button[hidden],
.secondary-button[hidden] {
  display: none;
}

.secondary-button:hover,
.secondary-button.is-active {
  color: #fff;
  background: var(--ink);
}

.hint {
  max-width: 420px;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 0;
  margin: 0.85rem 0 0;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
  color: #fff;
  background: var(--ink);
  font-size: 0.8rem;
  cursor: pointer;
}

.active-filter span:first-child {
  opacity: 0.68;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: var(--section-gap) 0;
}

.metric {
  position: relative;
  overflow: hidden;
  padding: 1.1rem;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--teal), var(--blue));
}

.metric strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 2rem;
  line-height: 1;
}

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

.attention-panel {
  margin-top: var(--section-gap);
  margin-bottom: var(--section-gap);
}

.attention-list {
  display: grid;
  gap: 1rem;
}

.attention-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.attention-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  background: #fbfdfc;
}

.attention-stat strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
}

.attention-stat span,
.attention-item > span {
  color: var(--muted);
  font-size: 0.86rem;
}

.attention-items {
  display: grid;
  gap: 0.75rem;
}

.attention-item {
  display: grid;
  gap: 0.35rem;
  border-left: 3px solid var(--gold);
  padding-left: 0.75rem;
}

.attention-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.attention-tags span {
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  color: #88510d;
  background: #fff0d1;
  font-size: 0.76rem;
  font-weight: 800;
}

.operations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: var(--section-gap);
}

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

.lifecycle-column {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem;
  background: #fbfdfc;
}

.ops-header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ops-list {
  display: grid;
  gap: 0.55rem;
}

.ops-row,
.ops-link {
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.ops-row {
  display: grid;
  gap: 0.16rem;
  border-left: 3px solid var(--teal);
  padding-left: 0.65rem;
}

.ops-link {
  color: var(--blue);
  font-size: 0.82rem;
  line-height: 1.3;
}

.ops-row strong,
.ops-link {
  overflow-wrap: anywhere;
}

.ops-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.ops-row:hover strong,
.ops-link:hover {
  color: var(--teal);
  text-decoration: underline;
}

.ops-overdue {
  border-left-color: var(--red);
}

.ops-soon,
.ops-missing {
  border-left-color: var(--gold);
}

.ops-planned {
  border-left-color: var(--green);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: var(--section-gap-lg);
}

.panel {
  min-width: 0;
  padding: 1rem;
}

.graph-coverage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.85fr);
  gap: 1rem;
  align-items: stretch;
  margin-top: var(--section-gap);
  margin-bottom: var(--section-gap);
}

.graph-area,
.radar-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.segmented-control .secondary-button {
  min-height: 34px;
  padding: 0.38rem 0.62rem;
  font-size: 0.78rem;
}

.panel-heading {
  display: flex;
  gap: 1rem;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.panel-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: flex-end;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: end;
}

.legend-item,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 26px;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  background: #edf2ef;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.legend-item {
  border: 1px solid var(--line);
  color: var(--muted);
  background: #edf2ef;
  opacity: 0.46;
}

.legend-item.is-active {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
  opacity: 1;
}

.swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
}

#network {
  width: 100%;
  height: 620px;
  flex: 1;
  min-height: 520px;
  overflow: visible;
  border-radius: 6px;
  background: #f8faf9;
  touch-action: none;
}

.node {
  cursor: grab;
}

.node:active {
  cursor: grabbing;
}

.node circle {
  stroke: #fff;
  stroke-width: 2;
  transition: stroke 0.15s, stroke-width 0.15s, filter 0.15s;
}

.node:hover circle,
.node.is-selected circle {
  stroke: var(--ink);
  stroke-width: 3;
  filter: drop-shadow(0 4px 8px rgba(19, 32, 27, 0.2));
}

.node text {
  fill: var(--ink);
  font-size: 0.72rem;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
}

.link {
  stroke: #aebbb5;
  stroke-width: 1.4;
}

.link-location {
  stroke: #d1a0a0;
  stroke-dasharray: 4 4;
}

.link-authorship {
  stroke: var(--gold);
  stroke-dasharray: 4 5;
}

.link-derived,
.link-produces {
  stroke: var(--teal);
  stroke-dasharray: 8 4;
}

.graph-inspector {
  display: grid;
  gap: 0.2rem;
  min-height: 58px;
  margin-top: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--muted);
  background: #fff;
  font-size: 0.88rem;
}

.graph-inspector strong {
  color: var(--ink);
}

.stack-item {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.domain-summary-item {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.stack-header {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 700;
}

.stack-bar {
  display: flex;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2ef;
}

.domain-summary-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
}

.domain-summary-facts div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem;
  background: #fbfdfc;
}

.domain-summary-facts dt {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.domain-summary-facts dd {
  margin: 0.2rem 0 0;
  font-weight: 800;
}

.stack-segment {
  border: 0;
  border-radius: 0;
  padding: 0;
  min-width: 2px;
}

.publication-list {
  display: grid;
  gap: 0.75rem;
}

.publication-item {
  width: 100%;
  border: 0;
  border-left: 3px solid var(--teal);
  border-radius: 0;
  padding-left: 0.75rem;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.publication-item strong {
  display: block;
}

.publication-key {
  display: inline-flex;
  margin-right: 0.4rem;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.86em;
}

.publication-item span {
  color: var(--muted);
  font-size: 0.88rem;
}

.publication-inline {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0.25rem 0;
  color: var(--blue);
  background: transparent;
  text-align: left;
}

.publication-inline:hover {
  text-decoration: underline;
}

.products-panel {
  margin-top: var(--section-gap);
}

.publications-panel {
  margin-top: var(--section-gap);
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 0.28fr) minmax(140px, 0.28fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.publication-warning {
  border: 1px solid #e7b65b;
  border-radius: 6px;
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  color: #7a4a00;
  background: #fff7e6;
  font-weight: 700;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: var(--ink);
  background: #f8faf9;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active,
.keyword-pill:hover,
.keyword-pill.is-active {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.keyword-pill {
  border: 1px solid #c6d7da;
  color: #005f66;
  background: #e8f6f5;
}

.standard-pill {
  border-color: #d6cbe8;
  color: #51408f;
  background: #f0edf8;
}

.readiness-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.readiness-ready {
  color: #1f6b44;
  background: #ddf3e6;
}

.readiness-review {
  color: #88510d;
  background: #fff0d1;
}

.readiness-attention {
  color: #8f1f1f;
  background: #fde2e2;
}

.product-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.product-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.85rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(0, 128, 128, 0.08), transparent 42%),
    linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  box-shadow: 0 1px 0 rgba(19, 32, 27, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--teal);
}

.product-card-ready::before {
  background: var(--green);
}

.product-card-review::before {
  background: var(--gold);
}

.product-card-attention::before {
  background: var(--red);
}

.load-error {
  display: grid;
  gap: 0.35rem;
  border: 1px solid #e3b1b1;
  border-radius: 8px;
  padding: 1rem;
  color: #8f1f1f;
  background: #fde2e2;
}

.product-card:hover {
  border-color: #9fb6c6;
  box-shadow: 0 12px 30px rgba(16, 32, 51, 0.1);
  transform: translateY(-2px);
}

.product-card h3 {
  margin: 0;
  padding-right: 2.45rem;
  font-size: 1.08rem;
  line-height: 1.3;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.product-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
  padding-right: 2.45rem;
}

.product-card-meta,
.product-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.product-card-meta {
  min-width: 0;
}

.registry-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.product-card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
  padding: 0;
}

.product-card-fact {
  display: grid;
  align-content: start;
  gap: 0.25rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.product-card-fact dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.product-card-fact dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.metadata-stat.score-low,
.metadata-badge.score-low {
  background: #fde2e2;
  color: #8f1f1f;
}

.metadata-stat.score-mid,
.metadata-badge.score-mid {
  background: #fff0d1;
  color: #88510d;
}

.metadata-stat.score-high,
.metadata-badge.score-high {
  background: #ddf3e6;
  color: #1f6b44;
}

.metadata-stat dd {
  font-weight: 800;
}

.metadata-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-weight: 800;
}

.projects-panel,
.pi-panel {
  margin-top: var(--section-gap);
}

.project-heatmap {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  flex: 1;
  overflow: hidden;
  padding: 0.75rem;
  background:
    radial-gradient(circle at center, rgba(0, 128, 128, 0.08), transparent 58%),
    #fbfdfc;
}

.project-radar {
  width: min(100%, 500px);
  height: auto;
}

.radar-backdrop {
  fill: url("#radarFill");
  stroke: #e4edf1;
  stroke-width: 1;
}

.radar-fill-start {
  stop-color: #eef8f7;
}

.radar-fill-end {
  stop-color: #ffffff;
}

.radar-grid circle {
  fill: none;
  stroke: rgba(96, 113, 132, 0.2);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.radar-spoke {
  stroke: rgba(96, 113, 132, 0.2);
  stroke-width: 1;
}

.radar-project {
  cursor: pointer;
}

.radar-bar {
  stroke: #008d8d;
  stroke-linecap: round;
  opacity: 0.82;
  filter: drop-shadow(0 3px 6px rgba(0, 128, 128, 0.18));
  transition: stroke 0.15s, opacity 0.15s, stroke-width 0.15s;
}

.radar-end {
  fill: #3768b2;
  stroke: #fff;
  stroke-width: 2;
}

.radar-project:hover .radar-bar,
.radar-project:focus .radar-bar {
  stroke: var(--ink);
  opacity: 1;
}

.radar-project:focus {
  outline: none;
}

.radar-project text {
  fill: var(--ink);
  font-size: 0.7rem;
  font-weight: 800;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 5px;
  stroke-linejoin: round;
}

.radar-project .radar-count {
  pointer-events: none;
  fill: #fff;
  font-size: 0.58rem;
  font-weight: 900;
  stroke: none;
}

.radar-tooltip {
  position: absolute;
  z-index: 8;
  max-width: min(24rem, calc(100% - 1.5rem));
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(12, 26, 43, 0.14);
  border-radius: 0.45rem;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(12, 26, 43, 0.18);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
}

.radar-tooltip[hidden] {
  display: none;
}

.radar-center circle {
  fill: #fff;
  stroke: var(--line);
  filter: drop-shadow(0 6px 14px rgba(16, 32, 51, 0.08));
}

.radar-center text {
  fill: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.radar-center text:first-of-type {
  fill: var(--ink);
  font-size: 1.05rem;
}

.radar-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.project-card {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 32, 51, 0.05);
}

.project-card-main {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.project-card-main:hover {
  color: var(--ink);
  background: transparent;
}

.project-card-main:hover h3 {
  color: var(--teal);
}

.project-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  border: 1px solid #8bc7a2;
  border-radius: 999px;
  padding: 0.24rem 0.58rem;
  color: #0f4d2c;
  background: #e6f6ec;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-ended,
.status-inactive {
  border-color: #e3a461;
  color: #7a3b12;
  background: #fff0df;
}

html[data-theme="dark"] .status-badge {
  border-color: #5fd18b;
  color: #dfffe9;
  background: #143d27;
}

html[data-theme="dark"] .status-ended,
html[data-theme="dark"] .status-inactive {
  border-color: #d89a50;
  color: #ffe3c2;
  background: #4a2a10;
}

.project-card-main h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.project-card-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.project-card-stat {
  padding: 0.7rem;
  background: #fbfdfc;
}

.project-card-stat + .project-card-stat {
  border-left: 1px solid var(--line);
}

.project-card-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card-stat strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.95rem;
}

.project-card-links {
  display: grid;
  gap: 0.7rem;
  padding-top: 0.1rem;
}

.product-card-links {
  display: grid;
  gap: 0.7rem;
  padding-top: 0.15rem;
}

.product-card-links section,
.project-card-links section {
  display: grid;
  gap: 0.35rem;
}

.product-card-links h4,
.project-card-links h4 {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.link-overflow {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.25rem 0.55rem;
  border: 1px dashed var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-list.is-collapsed,
.pi-list.is-collapsed,
.publication-list.is-collapsed {
  position: relative;
  overflow: hidden;
}

.section-toggle {
  flex: 0 0 auto;
}

.pi-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.pi-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
}

.pi-card h3 {
  margin: 0;
}

.person-card-links {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.person-card-links .product-card-foot,
.project-card-links .project-card-foot,
.product-card-links .product-card-foot {
  border-top: 0;
  padding-top: 0;
}

.person-card-links section {
  display: grid;
  gap: 0.35rem;
}

.person-card-links h4 {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pi-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--ink), var(--teal));
  font-weight: 800;
}

.pi-avatar svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compare-toggle {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.compare-toggle input {
  position: absolute;
  opacity: 0;
}

.compare-toggle:has(input:checked) {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.table-panel {
  margin-top: 1rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #f7fbfa;
}

th[data-sort] {
  cursor: pointer;
  user-select: none;
}

th[data-sort]::after {
  content: "";
  display: inline-block;
  margin-left: 0.35rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.28;
  vertical-align: middle;
}

th[data-dir="asc"]::after {
  border-top: 0;
  border-bottom: 5px solid currentColor;
  opacity: 1;
}

th[data-dir="desc"]::after {
  opacity: 1;
}

.status {
  color: #fff;
}

.status-production {
  background: var(--green);
}

.status-curation {
  background: var(--gold);
}

.status-draft {
  background: var(--red);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 1rem;
}

.detail-modal[hidden] {
  display: none;
}

.json-modal[hidden] {
  display: none;
}

body.has-modal-open {
  overflow: hidden;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.json-modal {
  position: fixed;
  inset: 0;
  z-index: 125;
}

.detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 51, 0.38);
  backdrop-filter: blur(8px) saturate(0.9);
  -webkit-backdrop-filter: blur(8px) saturate(0.9);
}

.detail-modal-dialog {
  position: relative;
  width: min(1120px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  margin: 1rem auto;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 24px 80px rgba(16, 32, 51, 0.28);
}

.json-modal-dialog {
  position: relative;
  width: min(1120px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  margin: 1rem auto;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 24px 80px rgba(16, 32, 51, 0.28);
}

.detail-modal-dialog .panel-heading {
  align-items: flex-start;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.json-content {
  display: grid;
  gap: 0.75rem;
}

.json-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.json-status {
  color: var(--muted);
  font-size: 0.85rem;
}

.json-file {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.json-file summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.json-file-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.json-download {
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

.json-file pre {
  max-height: 56vh;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border-top: 1px solid var(--line);
  padding: 1rem;
  color: #102033;
  background: #f5f8fa;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.json-file code {
  white-space: inherit;
}

.builder-form {
  display: grid;
  gap: 0.85rem;
}

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

.builder-batch {
  display: grid;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  background: #f7fafb;
}

.builder-batch[hidden] {
  display: none;
}

.builder-batch-header,
.builder-batch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.builder-batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.builder-batch-header strong,
.builder-batch-item strong {
  display: block;
}

.builder-batch-header span,
.builder-batch-item span {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.builder-batch-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.builder-batch-item {
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
}

.builder-batch-item button {
  min-height: 34px;
  padding: 0.35rem 0.6rem;
}

.builder-form label,
.builder-fields label {
  display: grid;
  gap: 0.4rem;
}

.builder-actions {
  grid-column: 1 / -1;
}

.builder-form span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.builder-form label.is-required > span {
  color: var(--ink);
}

.builder-form label.is-required > span::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.35rem;
  border-radius: 999px;
  background: var(--red);
  vertical-align: 0.05rem;
}

.builder-form label em {
  margin-left: 0.35rem;
  color: var(--red);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.builder-form select[multiple],
.builder-fields select[multiple] {
  min-height: 132px;
}

.builder-form textarea,
.builder-fields textarea {
  min-height: 8.5rem;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
}

.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.builder-actions-top {
  margin-left: auto;
}

#detail-title {
  margin-bottom: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

.detail-status-badge {
  margin-left: 0.45rem;
  vertical-align: middle;
  transform: translateY(-0.08rem);
}

.detail-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #fbfdfc;
}

.publication-author-box {
  grid-column: 1 / -1;
}

.publication-metadata-box {
  grid-column: 1;
  grid-row: 2;
}

.publication-side-stack {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  gap: 1rem;
  align-self: stretch;
}

.publication-persons-box,
.publication-projects-box,
.publication-products-box {
  align-self: stretch;
}

.publication-keywords-box {
  grid-column: 1;
  grid-row: 3;
}

.publication-products-box {
  grid-column: 2;
  grid-row: 3;
}

.detail-network-box {
  grid-column: 1 / -1;
  border: 0;
  padding: 0;
  background: transparent;
}

.authorship-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.authorship-list,
.authorship-person-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.publication-link-filter {
  display: grid;
  gap: 0.4rem;
  flex: 1 1 280px;
}

.publication-link-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.publication-link-controls button {
  min-height: 44px;
}

.detail-product-metadata-form .builder-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.builder-link-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.builder-link-section h3 {
  margin: 0;
}

.authorship-list li,
.authorship-person {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  background: var(--surface);
}

.authorship-person {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.55rem;
}

.authorship-person[hidden] {
  display: none;
}

.authorship-person input {
  width: auto;
  min-height: 0;
}

.authorship-person input[type="text"] {
  width: min(100%, 260px);
  min-height: 34px;
  margin-top: 0.4rem;
  padding: 0.35rem 0.45rem;
  font-size: 0.78rem;
}

.authorship-person select {
  width: min(100%, 220px);
  min-height: 34px;
  margin-top: 0.4rem;
  padding: 0.35rem 0.45rem;
  font-size: 0.78rem;
}

.authorship-person strong,
.authorship-person small {
  display: block;
}

.authorship-person small {
  color: var(--muted);
  font-size: 0.76rem;
}

.authorship-person.is-suggested {
  border-color: color-mix(in srgb, var(--green) 70%, var(--line));
}

.authorship-person.is-linked {
  background: color-mix(in srgb, var(--green) 12%, var(--surface));
}

.authorship-person.publication-link-row,
.authorship-person.relation-link-row {
  align-items: flex-start;
}

.publication-link-target,
.relation-link-target {
  display: block;
  min-width: 0;
  border-left: 3px solid var(--teal);
  padding-left: 0.75rem;
}

.publication-link-target strong,
.publication-link-target .publication-link-meta,
.relation-link-target strong,
.relation-link-target .publication-link-meta {
  display: block;
  overflow-wrap: anywhere;
}

.publication-link-target .publication-link-meta,
.relation-link-target .publication-link-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.authorship-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.85rem;
}

.detail-network-box {
  grid-column: 1 / -1;
}

.detail-network-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.detail-network-summary span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 800;
}

.detail-graph {
  width: 100%;
  min-height: 260px;
  display: block;
  touch-action: none;
}

.detail-graph-link {
  stroke: rgba(96, 113, 132, 0.34);
  stroke-width: 1.6;
}

.detail-graph-node circle {
  fill: var(--teal);
  stroke: var(--surface);
  stroke-width: 3;
}

.detail-graph-node {
  cursor: grab;
  user-select: none;
}

.detail-graph-node.is-dragging {
  cursor: grabbing;
}

.detail-graph-node.is-dragging circle {
  filter: drop-shadow(0 8px 14px rgba(16, 32, 51, 0.24));
}

.detail-graph-node text {
  fill: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.detail-graph-node.is-selected circle {
  fill: var(--ink);
}

.detail-graph-project circle {
  fill: var(--blue);
}

.detail-graph-person circle {
  fill: var(--green);
}

.detail-graph-publication circle {
  fill: var(--gold);
}

.detail-box h3 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
}

.detail-count {
  color: var(--muted) !important;
  font-size: 0.82em;
  font-weight: 700 !important;
}

.detail-box-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.detail-box-heading h3 {
  margin: 0;
}

.bibtex-box pre {
  margin: 0;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.85rem;
  color: #102033;
  background: #f5f8fa;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bibtex-box code {
  white-space: inherit;
}

.detail-content > .bibtex-box {
  grid-column: 1 / -1;
}

.detail-link-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.35rem 0 0.75rem;
}

.detail-link-list {
  display: grid;
  gap: 0.45rem;
  justify-items: start;
  margin: 0.35rem 0 0.75rem;
}

.detail-publication-tools {
  margin-top: 0.35rem;
}

.detail-publication-list {
  max-height: min(42vh, 24rem);
  overflow: auto;
  padding-right: 0.35rem;
}

.detail-publication-list [hidden] {
  display: none;
}

.detail-publication-row {
  width: 100%;
  text-align: left;
}

.detail-publication-row strong,
.detail-publication-row span {
  overflow-wrap: anywhere;
}

.detail-text-link {
  max-width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--blue);
  background: transparent;
  line-height: 1.35;
  text-align: left;
}

.detail-text-link:hover {
  color: var(--teal);
  text-decoration: underline;
}

.chart-clickable {
  cursor: pointer;
}

.chart-clickable:hover {
  filter: brightness(0.94);
}

.chart-clickable.is-active {
  outline: 2px solid var(--ink);
}

.compare-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(19, 32, 27, 0.22);
}

.compare-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  display: flex;
  flex-direction: column;
  width: min(960px, 94vw);
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -12px 0 34px rgba(19, 32, 27, 0.18);
  transform: translateX(101%);
  transition: transform 0.22s ease;
}

.compare-drawer.is-open {
  transform: translateX(0);
}

.compare-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  background: #f8faf9;
}

.compare-drawer-actions {
  display: flex;
  gap: 0.5rem;
}

.compare-grid {
  display: grid;
  overflow: auto;
  flex: 1;
}

.compare-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.75rem;
  color: var(--ink);
  background: #fff;
  font-size: 0.88rem;
  word-break: break-word;
}

.compare-cell-label {
  position: sticky;
  left: 0;
  z-index: 1;
  color: var(--muted);
  background: #f8faf9;
  font-weight: 800;
}

.compare-cell-head {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 2px solid var(--ink);
  background: #f8faf9;
  font-weight: 800;
}

.compare-empty {
  padding: 2rem;
  color: var(--muted);
  text-align: center;
}

.empty {
  color: var(--muted);
}

html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .link-button {
  color: var(--ink);
  background: #081a2e;
}

html[data-theme="dark"] .secondary-button:hover,
html[data-theme="dark"] .secondary-button.is-active {
  color: #03101e;
  background: var(--green);
}

html[data-theme="dark"] .attention-card,
html[data-theme="dark"] .attention-stat,
html[data-theme="dark"] .detail-box,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .product-card-fact,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .project-card-stat,
html[data-theme="dark"] .pi-card,
html[data-theme="dark"] .publication-card,
html[data-theme="dark"] .json-file,
html[data-theme="dark"] .person-card,
html[data-theme="dark"] .json-modal-dialog,
html[data-theme="dark"] .detail-modal-dialog,
html[data-theme="dark"] .compare-drawer,
html[data-theme="dark"] .builder-batch,
html[data-theme="dark"] .graph-inspector,
html[data-theme="dark"] .ops-card,
html[data-theme="dark"] .heatmap-cell,
html[data-theme="dark"] .lifecycle-column,
html[data-theme="dark"] .domain-summary-facts div,
html[data-theme="dark"] #network,
html[data-theme="dark"] .project-heatmap,
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .compare-toggle {
  border-color: var(--line);
  background: #071322;
}

html[data-theme="dark"] .radar-tooltip {
  border-color: rgba(225, 235, 247, 0.16);
  background: #0d1b2e;
  color: #f4f8fb;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .json-file pre,
html[data-theme="dark"] .bibtex-box pre,
html[data-theme="dark"] table,
html[data-theme="dark"] tbody tr:hover,
html[data-theme="dark"] .compare-cell,
html[data-theme="dark"] .compare-cell-label,
html[data-theme="dark"] .compare-cell-head,
html[data-theme="dark"] .compare-drawer-head,
html[data-theme="dark"] .product-metadata,
html[data-theme="dark"] .product-card-fact,
html[data-theme="dark"] .publication-meta,
html[data-theme="dark"] .project-meta,
html[data-theme="dark"] .project-card-stat,
html[data-theme="dark"] .attention-impact,
html[data-theme="dark"] .quality-row,
html[data-theme="dark"] .domain-row,
html[data-theme="dark"] .stack-bar {
  color: var(--ink);
  border-color: var(--line);
  background: #0a1a2c;
}

html[data-theme="dark"] .pill,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .active-filter,
html[data-theme="dark"] .legend-item,
html[data-theme="dark"] .keyword-pill,
html[data-theme="dark"] .standard-pill,
html[data-theme="dark"] .attention-tags span {
  border-color: #255b8d;
  color: #d9efff;
  background: #0d2742;
}

html[data-theme="dark"] .legend-item.is-active,
html[data-theme="dark"] .filter-chip:hover,
html[data-theme="dark"] .filter-chip.is-active,
html[data-theme="dark"] .keyword-pill:hover,
html[data-theme="dark"] .keyword-pill.is-active,
html[data-theme="dark"] .compare-toggle:has(input:checked) {
  border-color: var(--green);
  color: #03101e;
  background: var(--green);
}

html[data-theme="dark"] .readiness-ready,
html[data-theme="dark"] .metadata-stat.score-high,
html[data-theme="dark"] .metadata-badge.score-high {
  color: #dfffd4;
  background: rgba(142, 234, 68, 0.2);
}

html[data-theme="dark"] .readiness-review,
html[data-theme="dark"] .metadata-stat.score-mid,
html[data-theme="dark"] .metadata-badge.score-mid {
  color: #ffe7a3;
  background: rgba(232, 184, 77, 0.22);
}

html[data-theme="dark"] .readiness-attention,
html[data-theme="dark"] .metadata-stat.score-low,
html[data-theme="dark"] .metadata-badge.score-low,
html[data-theme="dark"] .load-error {
  color: #ffd6db;
  background: rgba(255, 111, 125, 0.18);
}

html[data-theme="dark"] .node circle,
html[data-theme="dark"] .radar-end {
  stroke: #071322;
}

html[data-theme="dark"] .node text,
html[data-theme="dark"] .radar-project text {
  fill: var(--ink);
  stroke: #071322;
}

html[data-theme="dark"] .link {
  stroke: #2d5f8f;
}

html[data-theme="dark"] .link-location {
  stroke: #6a4961;
}

html[data-theme="dark"] .link-authorship {
  stroke: var(--gold);
}

html[data-theme="dark"] .radar-backdrop {
  stroke: #234867;
}

html[data-theme="dark"] .radar-fill-start {
  stop-color: #0d2b45;
}

html[data-theme="dark"] .radar-fill-end {
  stop-color: #061120;
}

html[data-theme="dark"] .radar-grid circle,
html[data-theme="dark"] .radar-spoke {
  stroke: rgba(142, 167, 196, 0.24);
}

html[data-theme="dark"] .radar-center circle {
  fill: #0a1a2c;
  stroke: var(--line);
}

html[data-theme="dark"] .detail-graph {
  background: transparent;
}

html[data-theme="dark"] .detail-network-summary span {
  color: var(--ink);
  background: #0a1a2c;
}

html[data-theme="dark"] .detail-graph-link {
  stroke: rgba(142, 167, 196, 0.34);
}

html[data-theme="dark"] .detail-graph-node circle {
  stroke: #071322;
}

html[data-theme="dark"] .detail-graph-node text {
  fill: var(--ink);
  stroke: #071322;
}

html[data-theme="dark"] .builder-form label em {
  color: #ff9ba5;
}

html[data-theme="dark"] .metric::before {
  background: linear-gradient(180deg, var(--blue), var(--green));
}

html[data-theme="dark"] .product-card {
  background:
    linear-gradient(135deg, rgba(22, 212, 255, 0.12), transparent 46%),
    linear-gradient(180deg, #071322 0%, #06101d 100%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .product-card:hover {
  border-color: #3277af;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] .product-card-fact {
  background: rgba(10, 26, 44, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .product-card-foot {
  border-color: var(--line);
}

@media (max-width: 980px) {
  .site-header,
  .toolbar-filters,
  .filter-row,
  .graph-coverage-layout,
  .dashboard-grid,
  .operations-grid,
  .metrics,
  .detail-content,
  .project-list {
    grid-template-columns: 1fr;
  }

  .lifecycle-board {
    grid-template-columns: 1fr;
  }

  .toolbar {
    position: sticky;
    top: 0.5rem;
    max-height: calc(100dvh - 1rem);
    overflow: auto;
    padding-right: 0.7rem;
  }

  body.has-compact-toolbar .toolbar {
    gap: 0;
    padding: 0.45rem;
  }

  body.has-compact-toolbar .toolbar-filters {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
  }

  body.has-compact-toolbar .toolbar span,
  body.has-compact-toolbar .version-badge,
  body.has-compact-toolbar .toolbar-actions-row {
    display: none;
  }

  body.has-compact-toolbar .search input,
  body.has-compact-toolbar .toolbar-clear button {
    min-height: 36px;
  }

  .detail-modal-dialog,
  .json-modal-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding: 0.75rem;
  }

  .toolbar-actions-row {
    align-items: flex-start;
    flex-direction: column;
  }

  main > section[id] {
    scroll-margin-top: 15rem;
  }

  .toolbar-nav,
  .toolbar-actions-row > .toolbar-actions {
    justify-content: flex-start;
  }

  .filter-row {
    align-items: stretch;
  }

  .builder-fields {
    grid-template-columns: 1fr;
  }

  .authorship-layout {
    grid-template-columns: 1fr;
  }

  .product-card-head,
  .product-card-facts,
  .product-card-links {
    grid-template-columns: 1fr;
  }

  .publication-metadata-box,
  .publication-side-stack,
  .publication-persons-box,
  .publication-projects-box,
  .publication-products-box,
  .publication-keywords-box {
    grid-column: auto;
    grid-row: auto;
  }

  .product-card-head {
    padding-right: 2.45rem;
  }

  .hint {
    text-align: left;
  }

  #network {
    height: 460px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-anim,
  .header-anim::before,
  .header-anim::after,
  .header-pulse,
  .header-scan {
    animation: none !important;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 0;
  }

  main {
    width: min(100% - 1rem, 1500px);
  }

  .detail-modal-dialog .panel-heading,
  .json-modal-dialog .panel-heading {
    gap: 0.75rem;
  }

}
