:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #1c2430;
  --muted: #657083;
  --line: #d8dde8;
  --accent: #256f8f;
  --accent-2: #8f5f21;
  --warning: #b33a2b;
  --gedcom: #2c7a59;
  --graph-bg: #fbfcfe;
  --control-bg: #ffffff;
  --node-bg: #ffffff;
  --node-stroke: #4d6475;
  --text-halo: #fbfcfe;
  --family-bg: #f8fafc;
  --family-text: #405064;
  --relation-bg: #f8fafc;
  --frontier-bg: #fff4cf;
  --collapsed-bg: #e9edf3;
  --selected: #111827;
  --edge-high: #173f52;
  --edge-medium: #5f7f90;
  --edge-low: #a27626;
  --details-width: 340px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(420px, 1fr) var(--details-width);
  height: 100vh;
  overflow: hidden;
}
.app-shell.controls-hidden { grid-template-columns: 0 minmax(420px, 1fr) var(--details-width); }
.app-shell.details-hidden { grid-template-columns: 300px minmax(420px, 1fr) 0; }
.app-shell.controls-hidden.details-hidden { grid-template-columns: 0 minmax(420px, 1fr) 0; }

.sidebar, .details-panel {
  background: var(--panel);
  border-color: var(--line);
  overflow: auto;
  padding: 18px;
}
.sidebar { border-right: 1px solid var(--line); }
.details-panel { border-left: 1px solid var(--line); }
.details-resize-handle {
  position: absolute;
  top: 0;
  right: calc(var(--details-width) - 5px);
  bottom: 0;
  width: 10px;
  cursor: col-resize;
  touch-action: none;
  z-index: 20;
}
.details-resize-handle::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 2px;
  background: transparent;
  transition: background-color .15s ease;
}
.details-resize-handle:hover::after,
.details-resize-handle:focus-visible::after,
.details-resize-handle.is-resizing::after { background: var(--accent); }
.details-resize-handle:focus-visible { outline: none; }
.app-shell.details-hidden .details-resize-handle { display: none; }
.app-shell.controls-hidden .sidebar,
.app-shell.details-hidden .details-panel {
  border: 0;
  overflow: hidden;
  padding: 0;
  visibility: hidden;
}

.brand h1, .details-panel h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: 0;
}
.brand p, .details-panel p { color: var(--muted); }

.control-section {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

label { display: block; color: var(--ink); font-weight: 600; }
.search-label { margin-bottom: 6px; }
input[type="search"] {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  font: inherit;
}
.switches label {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 8px 0;
  color: var(--muted);
  font-weight: 500;
}
input[type="range"] { width: 100%; }
button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  height: 34px;
  padding: 0 12px;
  font: inherit;
  cursor: pointer;
}
button:hover { border-color: var(--accent); color: var(--accent); }

.search-results { margin-top: 8px; display: grid; gap: 4px; }
.search-results button { width: 100%; text-align: left; height: auto; min-height: 32px; }

.legend h2 { font-size: 15px; margin: 0 0 10px; }
.legend div { display: flex; align-items: center; gap: 9px; margin: 8px 0; color: var(--muted); }
.legend-line { width: 42px; height: 0; border-top: 3px solid #555; display: inline-block; }
.legend-line.high { border-color: #1f5c75; }
.legend-line.medium { border-color: #7d93a0; }
.legend-line.low { border-color: #9c8d65; border-top-style: dashed; }
.legend-line.weak { border-color: var(--warning); border-top-style: dotted; opacity: .65; }

.graph-wrap { position: relative; min-width: 0; }
#graph { width: 100%; height: 100%; display: block; background: #fbfcfe; }
.toolbar {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.toolbar button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: #eef7fb;
}
.branch-guide {
  position: absolute;
  top: 58px;
  left: 14px;
  bottom: 14px;
  width: 210px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--ink) 12%, transparent);
  scrollbar-width: thin;
  pointer-events: none;
}
.branch-guide-title { color: var(--muted); font-size: 11px; font-weight: 700; text-shadow: 0 1px 0 var(--graph-bg); }
.branch-guide-item {
  min-height: 26px;
  height: auto;
  padding: 0 8px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 12%, transparent);
  text-align: left;
  white-space: normal;
  pointer-events: auto;
}
.branch-guide-item:hover, .branch-guide-item:focus-visible { color: var(--accent); border-color: var(--accent); }
.empty-state {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
}

.edge { stroke-width: 2.4; cursor: pointer; fill: none; }
.edge.parent_child { marker-end: none; }
.edge.confidence-high { stroke: #173f52; stroke-width: 4; opacity: .98; }
.edge.confidence-medium { stroke: #5f7f90; stroke-width: 3; opacity: .9; }
.edge.confidence-low { stroke: #a27626; stroke-width: 2.8; stroke-dasharray: 9 5; opacity: .78; }
.edge.confidence-weak { stroke: var(--warning); stroke-width: 2.5; stroke-dasharray: 2 6; opacity: .48; }
.edge.highlight-weak { stroke: #d01919; stroke-width: 4; filter: drop-shadow(0 0 5px rgba(208, 25, 25, .45)); opacity: .95; }
.edge.selected { stroke: #111827; stroke-width: 5; opacity: 1; }
.edge.highlight-strong, .spouse-companion.highlight-strong { stroke-width: 5px; opacity: 1; }
.edge.spouse { stroke-width: 2.2; stroke-linecap: round; }
.spouse-companion { fill: none; pointer-events: none; stroke-width: 2.2; stroke-linecap: round; opacity: .98; }
.spouse-companion.confidence-high { stroke: #173f52; }
.spouse-companion.confidence-medium { stroke: #5f7f90; }
.spouse-companion.confidence-low { stroke: #a27626; stroke-dasharray: 9 5; opacity: .78; }
.spouse-companion.confidence-weak { stroke: var(--warning); stroke-dasharray: 2 6; opacity: .48; }
.spouse-companion.highlight-weak { stroke: #d01919; stroke-width: 2.8; filter: drop-shadow(0 0 5px rgba(208, 25, 25, .45)); opacity: .95; }
.spouse-companion.selected { stroke: #111827; stroke-width: 2.8; opacity: 1; }

.time-scale {
  pointer-events: none;
}
.time-scale-axis {
  stroke: #6b7280;
  stroke-width: 2;
}
.time-scale-tick line {
  stroke: #6b7280;
  stroke-width: 1.5;
}
.time-scale text {
  fill: #4b5563;
  paint-order: stroke;
  stroke: #fbfcfe;
  stroke-width: 4px;
  font-weight: 700;
}
.time-scale-title {
  font-size: 13px;
  fill: #243447;
}
.time-scale-years {
  font-size: 12px;
}
.time-scale-year {
  font-size: 10px;
  fill: #6b7280;
}

.person-node { cursor: pointer; }
.person-node rect {
  fill: #ffffff;
  stroke: #4d6475;
  stroke-width: 2;
  rx: 7;
  ry: 7;
}
.person-node .node-flag-watermark {
  opacity: .12;
  pointer-events: none;
}
.person-node text {
  fill: var(--ink);
  paint-order: stroke;
  stroke: #fbfcfe;
  stroke-width: 4px;
  pointer-events: none;
}
.person-node .node-name { font-size: 12px; font-weight: 700; }
.person-node .node-life { fill: var(--ink); font-size: 11px; font-weight: 600; }
.person-node .node-place { fill: var(--muted); font-size: 10px; font-weight: 500; }
.person-node .node-confidence-badge { fill: #344154; font-size: 9px; font-weight: 800; stroke-width: 3px; }
.person-node.confidence-high rect { stroke-width: 3; }
.person-node.confidence-medium rect { stroke-width: 2; }
.person-node.confidence-low rect { stroke: #a27626; stroke-dasharray: 8 4; opacity: .82; }
.person-node.confidence-weak rect { stroke: var(--warning); stroke-dasharray: 2 5; opacity: .68; }
.person-node.frontier rect { fill: #fff4cf; stroke-width: 3; }
.person-node.selected rect, .person-node.search-focused rect { stroke: #111827; stroke-width: 4; }
.person-node.highlight-strong rect { stroke: var(--edge-high); stroke-width: 3px; }
.person-node.highlight-strong .node-name, .person-node.highlight-strong .node-confidence-badge { font-weight: 800; }
.person-node.collapsed rect { fill: #e9edf3; }
.person-node.missing-person { opacity: .38; }
.person-node.missing-person rect { fill: #f3f5f8; stroke: #b8c0cc; stroke-dasharray: 6 5; stroke-width: 1.5; }
.person-node.missing-person text { display: none; }
.family-node {
  pointer-events: all;
  cursor: pointer;
}
.family-node rect {
  fill: #f8fafc;
  stroke: #8b98aa;
  stroke-width: 1.4;
  stroke-dasharray: 5 4;
  rx: 6;
  ry: 6;
  opacity: .88;
}
.family-node text {
  fill: #405064;
  font-size: 10px;
  font-weight: 600;
  paint-order: stroke;
  stroke: #f8fafc;
  stroke-width: 3px;
}
.family-node.highlight-strong rect { stroke: var(--edge-high); stroke-width: 3px; stroke-dasharray: none; }
.family-node.dated-marriage rect { stroke: #0f766e; stroke-width: 2.4px; stroke-dasharray: none; opacity: 1; }
.family-node.dated-marriage text { font-weight: 800; }
.debug-layer { pointer-events: none; }
.debug-box {
  fill: none;
  stroke: #00a3a3;
  stroke-width: 1;
  stroke-dasharray: 5 4;
}
.debug-anchor {
  stroke: #ffffff;
  stroke-width: 1.5;
}
.debug-anchor.start { fill: #0f766e; }
.debug-anchor.end { fill: #b91c1c; }
.debug-mode .family-node {
  opacity: .9;
  fill: #f59e0b;
}

.details-panel dl {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 8px 12px;
  margin: 14px 0;
}
.details-panel dt { color: var(--muted); font-weight: 700; }
.details-panel dd { margin: 0; min-width: 0; }
.details-panel h3 { margin: 18px 0 8px; font-size: 15px; }
.profile-map-section { margin: 1rem 0 1.25rem; }
.profile-map {
  min-height: 260px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #e8e2d7;
}
.profile-map-status, .profile-map-legend {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.profile-map-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; }
.profile-map-legend span { display: inline-block; }
.profile-jurisdiction { margin: 10px 0 4px; }
.profile-jurisdiction-flags { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.profile-jurisdiction-row { display: flex; flex: 0 0 auto; flex-wrap: nowrap; gap: 8px; align-items: start; width: auto; min-height: 30px; }
.profile-jurisdiction-death-row { margin-top: 8px; }
.profile-jurisdiction-flag {
  display: block;
  width: 58px;
  height: 30px;
  border: 1px solid color-mix(in srgb, var(--ink) 26%, transparent);
  object-fit: cover;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 18%, transparent);
}
.profile-place-image { margin: 18px 0 4px; }
.profile-place-image figure { margin: 0; }
.profile-place-image img {
  display: block;
  width: 100%;
  max-height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}
.profile-place-image figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.profile-place-image-sources { display: block; margin-top: 4px; }
.historical-context-note {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.4;
}
.historical-context-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}
.historical-context-list li {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 2px 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 65%);
}
.historical-context-list li::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  opacity: .45;
}
.historical-context-years {
  grid-row: 1 / span 2;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.historical-context-list strong { font-size: 12px; }
.historical-context-list li > span:last-child {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.profile-family-chain { margin: 10px 0 2px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.profile-family-chain p { margin: 0 0 5px; font-size: 12px; }
.profile-family-chain-names {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 0;
  min-width: 0;
  line-height: 1.55;
}
/* A segment owns the separator immediately before its person.  Making each
   segment a wrapping flex item prevents a separator stranded at line end,
   while still allowing the chain itself to use multiple lines. */
.profile-family-chain-step {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
  max-width: 100%;
}
.profile-family-chain-person {
  display: inline;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.profile-family-chain-person:hover,
.profile-family-chain-person:focus-visible { color: var(--accent-2); }
.profile-family-chain-separator { margin: 0 6px; color: var(--muted); }
.profile-family-chain-spouse { font-size: 0.9em; font-style: italic; }
.profile-family-chain-note { color: var(--muted); }
.inference-note { color: var(--muted); font-size: 11px; line-height: 1.35; }
.muted { color: var(--muted); }
.relation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.relation-item {
  border-left: 4px solid var(--edge-medium);
  background: var(--relation-bg);
  border-radius: 6px;
  padding: 8px 9px;
  display: grid;
  gap: 3px;
}
.relation-item.confidence-high { border-left-color: var(--edge-high); }
.relation-item.confidence-medium { border-left-color: var(--edge-medium); }
.relation-item.confidence-low { border-left-color: var(--edge-low); }
.relation-item.confidence-weak {
  border-left-color: var(--warning);
  background: color-mix(in srgb, var(--warning) 11%, var(--relation-bg));
}
.relation-item button {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  text-align: left;
  font-weight: 700;
}
.relation-item span, .relation-item small {
  color: var(--muted);
  font-size: 12px;
}
.source-pill {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  margin: 0 4px 4px 0;
  color: var(--accent);
  text-decoration: none;
  background: var(--relation-bg);
}

@media (max-width: 980px) {
  .app-shell,
  .app-shell.controls-hidden,
  .app-shell.details-hidden,
  .app-shell.controls-hidden.details-hidden {
    grid-template-columns: 1fr;
    grid-template-rows: auto 60vh auto;
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }
  .app-shell.controls-hidden { grid-template-rows: 0 60vh auto; }
  .app-shell.details-hidden { grid-template-rows: auto 60vh 0; }
  .app-shell.controls-hidden.details-hidden { grid-template-rows: 0 60vh 0; }
  .details-resize-handle { display: none; }
  .sidebar, .details-panel { border: 0; border-bottom: 1px solid var(--line); }
  .toolbar { position: sticky; top: 10px; margin: 10px; }
  .branch-guide { position: absolute; top: 58px; left: 10px; bottom: 10px; width: 170px; }
  #graph { height: 60vh; }
}

/* Genview schemes mirror index.htm styles 0-7 and share its page-style preference. */
body.genview-theme-1 {
  color-scheme: dark; --bg:#07101f; --panel:#0d1a2e; --graph-bg:#081426; --ink:#eaf3ff;
  --muted:#b8cad8; --line:#29425d; --accent:#69e7ff; --accent-2:#a88cff; --warning:#ff8174;
  --control-bg:#101f35; --node-bg:#10233a; --node-stroke:#69d8ea; --text-halo:#10233a;
  --family-bg:#132942; --family-text:#d8efff; --relation-bg:#102238; --frontier-bg:#3b3358;
  --collapsed-bg:#25364b; --selected:#ffffff; --edge-high:#75efff; --edge-medium:#75a8c8; --edge-low:#e5bd69;
  background:radial-gradient(circle at 80% 5%,rgba(112,76,255,.28),transparent 34rem),radial-gradient(circle at 20% 75%,rgba(0,218,190,.16),transparent 30rem),#07101f;
}
body.genview-theme-2 {
  --bg:#f3ead7; --panel:#eee1c6; --graph-bg:#f8f0df; --ink:#25241f; --muted:#625a4b;
  --line:#c9b993; --accent:#173f73; --accent-2:#934f32; --warning:#a83227; --control-bg:#fff8e9;
  --node-bg:#fff8e9; --node-stroke:#5b4935; --text-halo:#fff8e9; --family-bg:#eee0c6;
  --family-text:#4e473b; --relation-bg:#f6eddc; --frontier-bg:#e8cf8f; --collapsed-bg:#d8ccb5;
  --selected:#172438; --edge-high:#3d4d47; --edge-medium:#6c796c; --edge-low:#9a6b32;
  font-family:Georgia,"Times New Roman",serif;
}
body.genview-theme-3 {
  color-scheme:dark; --bg:#061410; --panel:#081e18; --graph-bg:#04110d; --ink:#d8ffe9;
  --muted:#89c9a8; --line:#176a4e; --accent:#34f5a2; --accent-2:#ffd34d; --warning:#ff5c70;
  --control-bg:#0a2b20; --node-bg:#08251b; --node-stroke:#27d990; --text-halo:#08251b;
  --family-bg:#0b3024; --family-text:#bbf8d7; --relation-bg:#0a291f; --frontier-bg:#4a4220;
  --collapsed-bg:#173a2e; --selected:#ffffff; --edge-high:#34f5a2; --edge-medium:#45a781; --edge-low:#ffd34d;
  font-family:"Segoe UI",system-ui,sans-serif;
}
body.genview-theme-4 {
  --bg:#e8eef3; --panel:rgba(248,251,254,.82); --graph-bg:#edf3f6; --ink:#17212b;
  --muted:#526474; --line:#b5c4cf; --accent:#285f88; --accent-2:#695d7c; --warning:#a23e38;
  --control-bg:rgba(255,255,255,.72); --node-bg:rgba(255,255,255,.76); --node-stroke:#63859d;
  --text-halo:#f4f8fa; --family-bg:#e4ecf1; --family-text:#3e586c; --relation-bg:#edf3f6;
  --frontier-bg:#e9dfbd; --collapsed-bg:#d5e0e7; --selected:#10293c; --edge-high:#345e76;
  --edge-medium:#6d8798; --edge-low:#98743c;
  background:radial-gradient(circle at 80% 5%,rgba(255,255,255,.82),transparent 30rem),linear-gradient(145deg,#f4f7f9,#dce6ed 48%,#edf2f5);
}
body.genview-theme-5 {
  color-scheme:dark; --bg:#171815; --panel:rgba(38,39,33,.94); --graph-bg:#1c1e19; --ink:#ebe7dc;
  --muted:#c9c1ad; --line:#605b4d; --accent:#a9ccd2; --accent-2:#d2bd91; --warning:#ef8174;
  --control-bg:#313127; --node-bg:#292a24; --node-stroke:#b7a57c; --text-halo:#292a24;
  --family-bg:#303129; --family-text:#e4ddcd; --relation-bg:#2a2b25; --frontier-bg:#50462f;
  --collapsed-bg:#3c3c34; --selected:#fff; --edge-high:#b7cfc8; --edge-medium:#8c9c91; --edge-low:#d2bd91;
  background:radial-gradient(circle at 84% 6%,rgba(113,100,76,.16),transparent 32rem),linear-gradient(150deg,#12130f,#20211c 48%,#171815);
}
body.genview-theme-6 {
  color-scheme:dark; --bg:#40318d; --panel:#7869c4; --graph-bg:#2f236f; --ink:#ffffff;
  --muted:#d6d1ff; --line:#a5a5ff; --accent:#ffff55; --accent-2:#8ff7ff; --warning:#ff7777;
  --control-bg:#40318d; --node-bg:#40318d; --node-stroke:#a5a5ff; --text-halo:#40318d;
  --family-bg:#302477; --family-text:#ffffff; --relation-bg:#302477; --frontier-bg:#786900;
  --collapsed-bg:#2a205f; --selected:#ffff55; --edge-high:#ffffff; --edge-medium:#a5a5ff; --edge-low:#ffff55;
  font-family:"Courier New",monospace;
}
body.genview-theme-7 {
  color-scheme:dark; --bg:#000000; --panel:#0000aa; --graph-bg:#000000; --ink:#ffffff;
  --muted:#d7d7d7; --line:#00aaaa; --accent:#ffff55; --accent-2:#55ffff; --warning:#ff5555;
  --control-bg:#000055; --node-bg:#000080; --node-stroke:#55ffff; --text-halo:#000080;
  --family-bg:#000055; --family-text:#ffffff; --relation-bg:#000055; --frontier-bg:#555500;
  --collapsed-bg:#202060; --selected:#ffff55; --edge-high:#55ffff; --edge-medium:#00aaaa; --edge-low:#ffff55;
  font-family:"Courier New",Courier,monospace;
}

.theme-section { display:flex; align-items:center; gap:7px; margin:-8px 0 9px; min-height:24px; }
.theme-picker { display:flex; gap:1px; }
.theme-picker button {
  min-width:19px; width:19px; height:22px; padding:0; border:0; border-radius:0;
  background:transparent; color:var(--muted); font:700 10px/1 ui-monospace,"Cascadia Mono",monospace;
  opacity:.72;
}
.theme-picker button:hover { background:transparent; color:var(--accent); opacity:1; }
.theme-picker button[aria-current="true"] {
  color:var(--accent); opacity:1; box-shadow:inset 0 -2px 0 currentColor;
}
.theme-description { color:var(--muted); font-size:9px; white-space:nowrap; opacity:.72; }

input[type="search"], button { background:var(--control-bg); color:var(--ink); }
#graph { background:var(--graph-bg); }
.toolbar button[aria-pressed="true"] { background:var(--relation-bg); }
.edge.confidence-high,.spouse-companion.confidence-high { stroke:var(--edge-high); }
.edge.confidence-medium,.spouse-companion.confidence-medium { stroke:var(--edge-medium); }
.edge.confidence-low,.spouse-companion.confidence-low { stroke:var(--edge-low); }
.edge.selected,.spouse-companion.selected { stroke:var(--selected); }
.time-scale-axis,.time-scale-tick line { stroke:var(--muted); }
.time-scale text,.time-scale-title,.time-scale-year { fill:var(--muted); stroke:var(--graph-bg); }
.person-node rect { fill:var(--node-bg); stroke:var(--node-stroke); }
.person-node text { fill:var(--ink); stroke:var(--text-halo); }
.person-node .node-life { fill:var(--ink); }
.person-node .node-confidence-badge { fill:var(--muted); }
.person-node.confidence-low rect { stroke:var(--edge-low); }
.person-node.frontier rect { fill:var(--frontier-bg); }
.person-node.selected rect,.person-node.search-focused rect { stroke:var(--selected); }
.person-node.collapsed rect { fill:var(--collapsed-bg); }
.family-node rect { fill:var(--family-bg); stroke:var(--muted); }
.family-node text { fill:var(--family-text); stroke:var(--family-bg); }
.relation-item,.source-pill { background:var(--relation-bg); }
.relation-item.confidence-high { border-left-color:var(--edge-high); }
.relation-item.confidence-medium { border-left-color:var(--edge-medium); }
.relation-item.confidence-low { border-left-color:var(--edge-low); }
body.genview-theme-6 :is(button,input,.person-node rect,.family-node rect,.relation-item,.source-pill),
body.genview-theme-7 :is(button,input,.person-node rect,.family-node rect,.relation-item,.source-pill) { border-radius:0; }

/* Clipped-corner, undated family-history annotations. */
.family-roots-link { fill: none; stroke: var(--accent-2); stroke-width: 1.5; stroke-dasharray: 3 5; pointer-events: none; }
.family-roots-node { cursor: pointer; }
.family-roots-node > path { fill: var(--panel); stroke: var(--accent-2); stroke-width: 2; }
.family-roots-node .roots-flag-watermark { opacity: .22; pointer-events: none; clip-path: polygon(8% 0, 92% 0, 100% 20%, 100% 80%, 92% 100%, 8% 100%, 0 80%, 0 20%); }
.family-roots-node:hover > path, .family-roots-node:focus > path, .family-roots-node.selected > path { stroke: var(--selected); stroke-width: 3; }
.family-roots-node text { fill: var(--ink); pointer-events: none; }
.family-roots-node .roots-heading { font-size: 13px; font-weight: 700; fill: var(--accent-2); }
.family-roots-node .roots-surname { font-size: 14px; }
.family-roots-node .roots-caption { font-size: 11px; fill: var(--muted); }
.root-mention { border-left: 3px solid var(--accent-2); padding-left: 12px; margin: 18px 0; }
.legend-roots { display: inline-block; width: 24px; height: 15px; margin-right: 8px; vertical-align: middle; background: var(--accent-2); clip-path: polygon(20% 0,80% 0,100% 25%,100% 75%,80% 100%,20% 100%,0 75%,0 25%); }
