@import url("site-chrome.css");

:root {
  /* Match OpenAPI index.html content column */
  --page-max: 1460px;
  --page-pad-x: 20px;
  --header-pad-y: 12px;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #152033;
  --muted: #5a6a7e;
  --line: #d7dee8;
  --accent: #1a4f8b;
  --accent-soft: #e8f0f8;
  --warn: #8a5a12;
  --warn-bg: #fff6e8;
  --ok: #1f6b45;
  --ok-bg: #e8f6ee;
  --shadow: 0 10px 30px rgba(21, 32, 51, 0.06);
  --radius: 14px;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #dfeaf7 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #e8f3ec 0%, transparent 45%),
    var(--bg);
  font-family: var(--sans);
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }


main {
  max-width: var(--page-max);
  width: 100%;
  margin: 0 auto;
  padding: 28px var(--page-pad-x) 64px;
}

.hero {
  margin-bottom: 28px;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 52rem;
}

/* Overview — executive / state narrative */
.exec-summary {
  margin: 0 0 28px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.exec-summary h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}
.exec-summary > p {
  margin: 0 0 12px;
  max-width: 52rem;
  color: var(--ink);
  font-size: 1.02rem;
}
.exec-summary > p:last-child { margin-bottom: 0; }
.exec-summary ol {
  margin: 8px 0 0;
  padding-left: 1.25rem;
  max-width: 52rem;
}
.exec-summary li { margin: 0 0 6px; }

.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 12px 0 8px;
}
.state-card {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.state-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}
.state-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}
.state-card ul {
  margin: 8px 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.state-card li { margin: 0 0 4px; }
.state-card.now { border-color: #efd6a8; background: var(--warn-bg); }
.state-card.target { border-color: #b9dfc8; background: var(--ok-bg); }
.state-card.gap { border-color: #c5d7ea; background: var(--accent-soft); }

.milestone-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 12px 0 8px;
}
.milestone-card {
  display: block;
  padding: 14px 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.milestone-card:hover {
  text-decoration: none;
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.milestone-card .mid {
  display: inline-block;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.milestone-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 6px;
  line-height: 1.25;
}
.milestone-card span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

/* Student portal screenshots & guides */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin: 8px 0 0;
}
.shot-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.shot-card a { display: block; }
.shot-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1440 / 900;
  object-fit: cover;
  object-position: top left;
  background: #0b1220;
}
.shot-card figcaption {
  padding: 12px 14px 14px;
  display: grid;
  gap: 4px;
}
.shot-card figcaption strong {
  font-size: 0.95rem;
}
.shot-card .shot-group {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.shot-card figcaption > span:last-child {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.guide-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 18px;
  align-items: start;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.guide-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}
.guide-card ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink);
}
.guide-card li { margin: 0 0 8px; }
.guide-links {
  margin: 12px 0 0;
  font-size: 0.9rem;
}
.guide-shot {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0b1220;
}
.guide-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1440 / 900;
  object-fit: cover;
  object-position: top left;
}
@media (max-width: 800px) {
  .guide-card { grid-template-columns: 1fr; }
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.82rem;
  color: var(--muted);
}
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: #b9dfc8; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: #efd6a8; }

.toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 24px 0 32px;
}
.toc a {
  display: block;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--ink);
}
.toc a:hover { border-color: #a9c2df; text-decoration: none; }
.toc strong { display: block; margin-bottom: 4px; }
.toc span { color: var(--muted); font-size: 0.88rem; }

.progress-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.progress-kpi {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 14px;
}
.progress-kpi strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--ink);
  margin: 2px 0 4px;
}
.progress-kpi span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}
.progress-kpi.warn strong { color: #9a3412; }
.progress-kpi.ok strong { color: #166534; }
.progress-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0 0 18px;
}
.progress-charts .card { margin: 0; }
.progress-charts .card-body {
  padding: 12px 16px 20px;
  overflow-x: auto;
}
.progress-charts .card-body pre.mermaid,
.progress-charts .card-body .mermaid {
  width: 100%;
  margin: 0;
  line-height: 0;
}
/* xyChart / pie: fill width, keep aspect ratio — do not force min-height (distorts plot) */
.progress-charts .card-body .mermaid svg {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
}
/* Bar chart: room for axis labels; colour legend lives in HTML below (not clipped in SVG) */
.progress-charts .card.progress-chart-wide:has(.progress-barchart) {
  overflow: visible;
}
.progress-charts .card.progress-chart-wide:has(.progress-barchart) .card-body {
  overflow: visible;
}
.progress-charts .progress-barchart {
  max-width: 860px;
  margin: 0 auto 8px;
  padding: 8px 16px 28px 12px;
  overflow: visible;
}
.progress-charts .progress-barchart .mermaid {
  line-height: normal;
  overflow: visible;
}
.progress-charts .progress-barchart .mermaid svg {
  width: 100% !important;
  max-width: 860px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
/* gantt viewBox is narrow (~300px); width:100% makes it absurdly tall — cap it */
.progress-charts .card-body .mermaid svg[aria-roledescription="gantt"],
.progress-charts .card-body .mermaid svg[id^="mermaid"][viewBox^="0 0 3"] {
  width: 100% !important;
  max-height: 560px;
  height: auto !important;
}
.progress-charts .series-swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin: 4px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f7fafc;
  font-size: 0.92rem;
  color: var(--ink);
}
.progress-charts .series-swatches-label {
  margin-right: 4px;
  font-size: 0.88rem;
}
.progress-charts .series-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.progress-charts .swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(21, 32, 51, 0.2);
  flex: 0 0 auto;
}
/* Match Mermaid xyChart cScale0 / cScale1 (set in index.html mermaid.initialize) */
.progress-charts .swatch-fe { background: #1a4f8b; }
.progress-charts .swatch-platform { background: #2f9e6f; }
.progress-charts .legend {
  margin: 12px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  line-height: 1.4;
}
.progress-charts .legend-totals {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #c5d7ea;
  background: linear-gradient(180deg, #f7fafc, #eef4fa);
  font-size: 0.9rem;
}
.progress-charts .legend-totals > strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}
.progress-charts .legend-totals-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  color: var(--muted);
}
.progress-charts .legend-totals-line strong {
  color: var(--ink);
  font-weight: 650;
}
.progress-charts .legend-totals-sep {
  color: #9aa8b8;
  user-select: none;
}
@media (max-width: 900px) {
  .progress-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.section {
  margin: 36px 0;
}
.section > h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.section > p.lead {
  margin: 0 0 16px;
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 18px;
}
.card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  background: linear-gradient(180deg, #fbfcfe, #f3f6fa);
}
.card-head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.card-body {
  padding: 8px 10px 16px;
  overflow-x: auto;
}
.mermaid {
  display: flex;
  justify-content: center;
  min-width: min(100%, 720px);
}

.note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid #c5d7ea;
  color: #243b55;
  font-size: 0.9rem;
}
.note.warn {
  background: var(--warn-bg);
  border-color: #efd6a8;
  color: #5c3d0d;
}

.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 16px 0 8px;
}
.legend-item {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.88rem;
}
.legend-item strong { display: block; margin-bottom: 4px; }
.legend-item span { color: var(--muted); }

/* Raisd ERD — CMS / LMS / shared domain colours */
.erd-domain-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 0 0 20px;
}
.erd-domain-legend .legend-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.erd-swatch {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid;
  margin-top: 2px;
}
.erd-swatch.cms {
  background: #e8f0f8;
  border-color: #1a4f8b;
}
.erd-swatch.lms {
  background: #e8f6ee;
  border-color: #1f6b45;
}
.erd-swatch.shared {
  background: #fff6e8;
  border-color: #8a5a12;
}
.erd-swatch.proposed {
  background: #f3eef8;
  border-color: #6b4f9a;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    rgba(107, 79, 154, 0.12) 3px,
    rgba(107, 79, 154, 0.12) 6px
  );
}
.card.erd-cms {
  border-color: #c5d7ea;
}
.card.erd-cms > .card-head {
  border-left: 4px solid #1a4f8b;
  background: linear-gradient(90deg, #e8f0f8 0%, transparent 48%);
}
.card.erd-lms {
  border-color: #b9dfc8;
}
.card.erd-lms > .card-head {
  border-left: 4px solid #1f6b45;
  background: linear-gradient(90deg, #e8f6ee 0%, transparent 48%);
}
.card.erd-shared {
  border-color: #efd6a8;
}
.card.erd-shared > .card-head {
  border-left: 4px solid #8a5a12;
  background: linear-gradient(90deg, #fff6e8 0%, transparent 48%);
}
.card.erd-proposed {
  border-color: #d4c6e8;
}
.card.erd-proposed > .card-head {
  border-left: 4px solid #6b4f9a;
  background: linear-gradient(90deg, #f3eef8 0%, transparent 48%);
}
.domain-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid;
  margin-left: 8px;
  vertical-align: middle;
}
.domain-chip.cms {
  color: #1a4f8b;
  background: #e8f0f8;
  border-color: #c5d7ea;
}
.domain-chip.lms {
  color: #1f6b45;
  background: #e8f6ee;
  border-color: #b9dfc8;
}
.domain-chip.shared {
  color: #8a5a12;
  background: #fff6e8;
  border-color: #efd6a8;
}
.domain-chip.proposed {
  color: #6b4f9a;
  background: #f3eef8;
  border-color: #d4c6e8;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 8px 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
table.attr {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 8px;
}
.table-wrap > table.attr { margin: 0; }
table.attr th,
table.attr td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.attr th {
  color: var(--muted);
  font-weight: 600;
  background: #f3f6fa;
}
table.attr tbody tr:last-child td { border-bottom: 0; }
table.attr tbody tr:hover td { background: #f8fafc; }
table.attr code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: #eef2f7;
  padding: 1px 5px;
  border-radius: 4px;
}

.footer {
  max-width: var(--page-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--page-pad-x) 40px;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 640px) {
  .card-body { padding: 4px 2px 10px; }
}


/* Abbreviation tooltips (native title + visual cue) */
abbr.raisd-abbr,
a.raisd-abbr {
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  cursor: help;
}
abbr.raisd-abbr {
  font-style: normal;
}

/* Mermaid SVG labels that match the glossary */
.mermaid svg [data-raisd-abbr="1"],
.mermaid svg text[data-raisd-abbr="1"] {
  cursor: help;
}

/* Per-diagram nomenclature legend (CAP / M / SDD / ADR) */
.mermaid-nomenclature-legend {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f6f8fb;
  font-size: 0.86rem;
  color: var(--ink);
}
.mermaid-nomenclature-legend-head {
  font-weight: 650;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.mermaid-nomenclature-legend ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 6px 14px;
}
.mermaid-nomenclature-legend li {
  line-height: 1.35;
  color: var(--muted);
}
.mermaid-nomenclature-legend a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.mermaid-nomenclature-legend a:hover {
  text-decoration: underline;
}
.mermaid-nomenclature-legend-foot {
  margin: 10px 0 0;
  font-size: 0.8rem;
}
.mermaid-nomenclature-legend-foot a {
  font-weight: 500;
}

/* Docs site auth gate (GitHub Pages) */
html:not(.raisd-auth-ok) body > *:not(#raisd-auth-overlay) {
  visibility: hidden !important;
}
#raisd-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 420px at 15% -10%, #dfeaf7 0%, transparent 55%),
    radial-gradient(700px 360px at 100% 0%, #e8f3ec 0%, transparent 45%),
    #f6f8fb;
  visibility: visible !important;
}
.raisd-auth-card {
  width: min(400px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 24px;
  border-radius: 16px;
  border: 1px solid var(--line, #d7dee8);
  background: #fff;
  box-shadow: var(--shadow, 0 10px 30px rgba(21, 32, 51, 0.06));
}
.raisd-auth-logo { display: block; height: 28px; width: auto; margin-bottom: 4px; }
.raisd-auth-card h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--ink, #152033);
}
.raisd-auth-lead {
  margin: 0 0 4px;
  color: var(--muted, #5a6a7e);
  font-size: 0.92rem;
}
.raisd-auth-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--ink, #152033);
}
.raisd-auth-label input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line, #d7dee8);
  font: inherit;
}
.raisd-auth-card button {
  margin-top: 4px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent, #1a4f8b);
  background: var(--accent, #1a4f8b);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.raisd-auth-card button:hover { filter: brightness(1.05); }
.raisd-auth-error {
  margin: 0;
  color: #8a1f1f;
  font-size: 0.88rem;
}

/* Obsidian 3D FSD knowledge graph */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.obsidian-section { margin-top: 8px; }
.obs-campus-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  margin: 4px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.obs-campus {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.92rem;
  text-decoration: none;
}
.obs-campus small {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.obs-campus:hover { background: var(--accent-soft); text-decoration: none; }
.obs-campus.is-active {
  background: var(--accent);
  color: #fff;
}
.obs-campus.is-active small { color: rgba(255, 255, 255, 0.8); }
.obsidian-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin-bottom: 14px;
}
.obsidian-search-row {
  display: flex;
  gap: 8px;
  flex: 1 1 220px;
  min-width: 0;
}
.obsidian-search-row input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font: inherit;
}
.obsidian-walk {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.obs-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.obs-btn:hover { filter: brightness(1.05); }
.obs-btn.ghost {
  background: transparent;
  color: var(--accent);
}
.obs-step {
  font-size: 0.9rem;
  color: var(--muted);
  min-width: 9rem;
  text-align: center;
}
.obs-status {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.obsidian-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: stretch;
  min-height: 560px;
}
.obsidian-graph {
  position: relative;
  min-height: 520px;
  height: 62vh;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #2a3648;
  background: #1a2332;
  box-shadow: var(--shadow);
}
.obsidian-graph canvas { display: block; }
.obsidian-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 20px;
  overflow: auto;
  max-height: 62vh;
}
.obs-panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 8px;
}
.obs-panel-head h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.obsidian-panel h3 {
  margin: 16px 0 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.obs-list {
  margin: 0;
  padding-left: 1.1rem;
}
.obs-list li { margin: 3px 0; }
.obs-list .muted,
.obs-links .muted { color: var(--muted); }
.obs-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.obs-related {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.86rem;
  text-decoration: none;
}
.obs-related:hover { border-color: #a9c2df; text-decoration: none; }
.obs-related.obs-open {
  background: var(--ok-bg);
  border-color: #b9dfc8;
  color: var(--ok);
}
.obsidian-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
}
.obs-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--muted);
}
.obs-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
@media (max-width: 960px) {
  .obsidian-layout {
    grid-template-columns: 1fr;
  }
  .obsidian-panel {
    max-height: none;
  }
  .obsidian-graph {
    height: 52vh;
    min-height: 420px;
  }
}

/* HTML labels projected onto 3D nodes (above WebGL canvas) */
.obs-label-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}
.obs-node-chip {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border-style: solid;
  box-sizing: border-box;
  padding: 6px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  word-break: break-word;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  will-change: transform;
  font-family: "Segoe UI", system-ui, sans-serif;
}
.obs-node-chip span {
  display: block;
  max-width: 100%;
}
