.lineage-view { display: grid; gap: 18px; }
.lineage-view .page-head { margin-bottom: 0; }
.lineage-view h2 { font-size: clamp(1.7rem, 4vw, 2.55rem); }
.lineage-view [data-lineage-content] { display: grid; gap: 17px; }
.lineage-view label { display: grid; gap: .35rem; font-size: .86rem; font-weight: 680; }
.lineage-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.lineage-search [data-lineage-search-results] { grid-column: 1 / -1; }
.lineage-search [data-lineage-search-results]:empty { display: none; }
.lineage-search [data-lineage-search-results] > a { display: inline-block; margin-top: 8px; }
.lineage-focus-panel { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.lineage-focus-panel p { margin-top: .36rem; color: var(--muted); }
.lineage-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lineage-pages [aria-current="page"] { border-color: var(--accent-dark); color: var(--accent-dark); }
.lineage-network {
  overflow: hidden;
  margin: 0;
  padding: 6px clamp(14px, 3vw, 28px) 16px;
  border: 1px solid #315950;
  border-radius: 16px;
  color: #e9f7ed;
  background: radial-gradient(ellipse at center, #193b35 0%, #102423 55%, #0b171b 100%);
  box-shadow: 0 12px 30px #102c251f;
}
.lineage-network svg { width: 100%; max-height: 440px; display: block; }
.lineage-network figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px; }
.lineage-network figcaption span { color: #bad1c7; font-size: .85rem; }
.lineage-orbit { fill: none; stroke: #80bdab42; stroke-dasharray: 3 9; }
.lineage-edge { fill: none; stroke: currentColor; stroke-width: 1.65; }
.lineage-network marker path { fill: currentColor; }
.lineage-network .lineage-depends_on, .lineage-key .lineage-depends_on { color: #9eddfa; }
.lineage-network .lineage-supports, .lineage-key .lineage-supports { color: #a5f2ba; }
.lineage-network .lineage-challenges, .lineage-key .lineage-challenges { color: #ffabaf; }
.lineage-network .lineage-replicates, .lineage-key .lineage-replicates { color: #f8d390; }
.lineage-network .lineage-challenges { stroke-dasharray: 4 3; }
.lineage-node { outline: none; }
.lineage-node circle { fill: #537764; stroke: #d9f5dc; stroke-width: 1.5; }
.lineage-node:hover circle { fill: #e1f4ce; stroke: #fffdf1; stroke-width: 2.5; }
.lineage-focus circle { fill: #e9f4c0; stroke: #fbfbe8; stroke-width: 4; }
.lineage-node text {
  fill: #eefbf2;
  stroke: #102523;
  stroke-width: 4px;
  paint-order: stroke;
  text-anchor: middle;
  font: 640 14px var(--sans);
}
.lineage-focus text { fill: #eef6ce; font-size: 17px; }
.lineage-key, .lineage-records, .lineage-relations ul {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
}
.lineage-key { display: flex; flex-wrap: wrap; gap: 8px 15px; margin-top: 10px; font-size: .8rem; }
.lineage-key li { display: inline-flex; align-items: center; gap: 6px; }
.lineage-key i { display: inline-block; width: 18px; border-top: 2px solid currentColor; }
.lineage-key .lineage-challenges { border-top-style: dashed; }
.lineage-relations { display: grid; gap: 10px; }
.lineage-relations ul, .lineage-records { grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 9px; }
.lineage-record {
  display: grid;
  height: 100%;
  gap: 2px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  text-decoration: none;
}
.lineage-record:hover { border-color: var(--accent-dark); }
.lineage-record span { color: var(--muted); font-size: .86rem; }
.lineage-record small { color: var(--accent-dark); font-size: .79rem; }
.lineage-link { padding: 13px; overflow-wrap: anywhere; }
.lineage-link-head, .lineage-link-records { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.lineage-link-head { justify-content: space-between; }
.lineage-link-head small { color: var(--muted); }
.lineage-relation { padding: 4px 8px; border-radius: 30px; font-size: .78rem; font-weight: 740; }
.lineage-relation.lineage-depends_on { color: #224f61; background: #dceef1; }
.lineage-relation.lineage-supports { color: #205439; background: #dcefe0; }
.lineage-relation.lineage-challenges { color: #792f3d; background: #f7e2e4; }
.lineage-relation.lineage-replicates { color: #734815; background: #f3eacd; }
.lineage-link-records { margin-top: 10px; font-weight: 680; }
.lineage-link p { margin-top: .45rem; white-space: pre-wrap; }
.lineage-link > a { display: inline-block; margin-top: .45rem; }
.lineage-review { margin-top: .65rem; }
.lineage-review summary, .lineage-editor summary { cursor: pointer; font-weight: 700; }
.lineage-review summary:hover, .lineage-editor summary:hover { color: var(--accent-dark); }
.lineage-form { display: grid; justify-items: start; gap: 10px; margin-top: 12px; }
.lineage-form label { width: min(100%, 55ch); }
.lineage-form output { color: #8b302e; }
.lineage-form output:empty { display: none; }
.lineage-limit { color: var(--muted); }
@media (max-width: 620px) {
  .lineage-focus-panel { align-items: flex-start; flex-direction: column; }
  .lineage-network { padding-inline: 12px; }
  .lineage-node text { font-size: 20px; }
  .lineage-focus text { font-size: 22px; }
}
