:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5f6673;
  --line: #d8dee8;
  --surface: #f6f7f4;
  --surface-strong: #eef1ea;
  --accent: #225ea8;
  --accent-soft: #e9f1f8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.62 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fbfbf8;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
code {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.08rem 0.28rem;
  overflow-wrap: anywhere;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 4.5rem;
  font-size: 0.92rem;
}
.site-nav a {
  color: var(--ink);
}
.site-nav a:not(.brand)::before {
  color: var(--accent);
  content: "→ ";
}
.brand {
  margin-right: auto;
  font-weight: 750;
  letter-spacing: 0.04em;
}
.section-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.85rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 248, 0.94);
  backdrop-filter: blur(10px);
}
.section-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
}
.section-nav a::before {
  content: "→";
  color: var(--accent);
  margin-right: 0.45rem;
}
.section-nav a:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.site-header, .term-header {
  padding: 1.25rem clamp(1.1rem, 5vw, 5rem) 4.2rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-header h1, .term-header h1 {
  margin: 0;
  max-width: 1020px;
  font-size: clamp(1.9rem, 3vw, 3.1rem);
  font-weight: 720;
  line-height: 1.12;
}
.site-header p, .term-header p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}
.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.status-pill {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.32rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--accent-soft);
  color: #17456f;
  font-size: 0.92rem;
  font-weight: 650;
}
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3rem clamp(1.1rem, 4vw, 2rem) 5rem;
}
section {
  margin: 0 0 3.2rem;
  padding-top: 0.2rem;
}
h2 {
  margin: 0 0 1.15rem;
  font-size: 1.55rem;
  font-weight: 720;
}
.center-section-title {
  text-align: center;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.summary-grid div {
  padding: 1.35rem 1rem;
  background: transparent;
  border-right: 1px solid var(--line);
}
.summary-grid div:last-child { border-right: 0; }
.summary-grid strong {
  display: block;
  font-size: 2.25rem;
  line-height: 1;
  font-weight: 760;
}
.summary-grid span { color: var(--muted); }
.metadata {
  display: grid;
  grid-template-columns: minmax(160px, 260px) 1fr;
  gap: 0.5rem 1rem;
}
.metadata dt {
  color: var(--muted);
  font-size: 0.94rem;
}
.metadata dd { margin: 0; overflow-wrap: anywhere; }
.people-list, .download-list {
  margin: 0;
  padding-left: 1.1rem;
}
.people-list li + li, .download-list li + li { margin-top: 0.25rem; }
.license-icon {
  display: block;
  margin-top: 0.45rem;
  max-width: 88px;
  height: auto;
}
.table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
table { width: 100%; border-collapse: collapse; }
.term-table .term-col { width: 22%; }
.term-table .iri-col { width: 34%; }
.term-table .definition-col { width: 44%; }
th, td { padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: var(--surface-strong); font-weight: 650; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.term-table td:nth-child(1) { font-weight: 600; }
.term-table td:nth-child(2) { overflow-wrap: anywhere; }
.term-table td:nth-child(3) { max-width: 54ch; overflow-wrap: break-word; }
#term-search {
  width: 100%;
  max-width: 680px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  background: #fff;
}
.search-results {
  display: grid;
  gap: 0;
  margin-top: 1rem;
  max-width: 840px;
  border-top: 1px solid var(--line);
}
.search-result {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.search-result small { color: var(--muted); display: block; }
.viz-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(360px, 1.08fr);
  gap: 2rem;
  align-items: start;
}
.viz-note {
  color: var(--muted);
  margin-top: -0.6rem;
}
.taxonomy-tree {
  max-height: 72vh;
  overflow: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
}
.taxonomy-tree ul {
  list-style: none;
  margin: 0;
  padding-left: 1rem;
}
.taxonomy-tree > ul { padding-left: 0; }
.tree-node {
  width: 100%;
  padding: 0.34rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.tree-node:hover { color: var(--accent); }
.tree-node span {
  display: inline-block;
  width: 1.2rem;
  color: var(--accent);
}
#viz-search, #focus-select {
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font: inherit;
}
.relation-graph {
  width: 100%;
  min-height: 420px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.relation-graph line {
  stroke: #98a4b3;
  stroke-width: 1.4;
}
.relation-graph marker path { fill: #98a4b3; }
.relation-graph circle {
  fill: #fff;
  stroke: var(--accent);
  stroke-width: 1.5;
}
.relation-graph .focus-node circle {
  fill: var(--accent-soft);
  stroke-width: 2;
}
.relation-graph text {
  fill: var(--ink);
  font-size: 11px;
  text-anchor: middle;
}
.relation-graph g > text:not(:last-child) {
  fill: var(--muted);
}
.relation-list {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
}
.relation-list p {
  margin: 0;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 700px) {
  .site-nav { margin-bottom: 3rem; }
  .brand { width: 100%; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid div:nth-child(2n) { border-right: 0; }
  .viz-layout { grid-template-columns: 1fr; }
  .metadata { grid-template-columns: 1fr; }
  .metadata dt { font-weight: 650; }
}