/* McCarthy family tree — research-desk style (B). Desktop-first; folds down for the phone. */
:root {
  --focus-bg: #e6eff5; --hover-bg: #eef4f8;
  --paper: #f4f5f7; --card: #ffffff; --ink: #1f242b; --muted: #6b7280; --soft: #4b5563;
  --rule: #c8cfd7; --rule-soft: #dde1e6; --accent: #1f5f8b; --accent-dark: #123e5c;
  --side: #1f242b; --side-ink: #cfd6de; --side-on: #2a323c;
  --good-bg: #dcefe3; --good: #1d5a36; --bad-bg: #fbe7e0; --bad: #8a3b1f;
  --serif: "Source Sans 3", "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.45 var(--serif); min-height: 100vh; display: flex; }
a { color: var(--accent); text-decoration: none; } a:hover { color: var(--accent-dark); text-decoration: underline; }
h1 { font-size: 26px; font-weight: 600; margin: 0 0 6px; line-height: 1.15; }
h1 small { color: var(--muted); font-size: .6em; }
.mono, .ref, .life, .count, .tl-date { font-family: var(--mono); }
.ref { font-size: 11px; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.dim { color: var(--muted); }
.label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.label.sub { display: block; margin-top: 12px; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #e8ebef; color: #374151; }
.pill.proven { background: var(--good-bg); color: var(--good); }
.pill.candidate { background: #fbeed7; color: #7a5312; }
.pill.disproven { background: var(--bad-bg); color: var(--bad); }

/* sidebar */
.side { width: 220px; flex-shrink: 0; background: var(--side); color: var(--side-ink); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; }
.side .brand { display: flex; flex-direction: column; margin: 0 8px 18px; }
.side .brand a { color: #fff; font-size: 16px; }
.side .brand .dim { color: #8b95a1; font-size: 11px; }
.side > a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--side-ink); border-radius: 4px; font-weight: 500; }
.side > a:hover, .side > a.on { background: var(--side-on); color: #fff; text-decoration: none; }
.side > a .count { margin-left: auto; font-size: 11px; background: #3b4452; color: #fff; padding: 1px 6px; border-radius: 999px; }
.side .recent { margin-top: 22px; display: flex; flex-direction: column; gap: 4px; padding: 0 10px; }
.side .recent .label { color: #8b95a1; margin-bottom: 4px; }
.side .recent a { color: var(--side-ink); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .signout { margin-top: auto; padding: 0 10px; }
.side .signout button { background: none; border: 1px solid #3b4452; color: #8b95a1; font: 12px var(--mono); padding: 4px 8px; cursor: pointer; }

/* main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 12px 28px; border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.search { position: relative; flex: 0 1 520px; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--rule-soft); border-radius: 4px; padding: 0 10px; }
.search svg { color: var(--muted); flex-shrink: 0; }
.search input { flex: 1; border: 0; background: transparent; font: 14px var(--serif); color: var(--ink); padding: 8px 0; min-width: 0; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--accent); }
.dropdown { position: absolute; left: -1px; right: -1px; top: 100%; margin: 0; padding: 4px 0; list-style: none; background: var(--card); border: 1px solid var(--rule); box-shadow: 0 6px 18px rgba(43,37,32,.12); max-height: 60vh; overflow: auto; z-index: 10; }
.dropdown li a { display: flex; gap: 10px; align-items: baseline; padding: 7px 12px; color: var(--ink); }
.dropdown li a:hover, .dropdown li.sel a { background: var(--paper); text-decoration: none; }
.dropdown .name { flex: 1; } .dropdown .life { color: var(--muted); font-size: 12px; }
.topbar .dim { margin-left: auto; font-size: 12px; white-space: nowrap; }
main { padding: 24px 28px 60px; max-width: 1400px; width: 100%; }
main.bare { margin: 0 auto; }

.card { background: var(--card); border: 1px solid var(--rule-soft); border-radius: 4px; padding: 14px 16px; }
.cardhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.cardhead a { font-size: 12px; }
.cols { display: grid; gap: 16px; align-items: start; }
.cols.home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols.person { grid-template-columns: minmax(0, 1.4fr) minmax(260px, .9fr) minmax(260px, .9fr); }
.cols.gaps { grid-template-columns: minmax(280px, 1fr) 2fr; }
.family, .aside { display: flex; flex-direction: column; gap: 16px; }

.hero { margin: 8px 0 22px; max-width: 720px; }
.hero h1 { font-size: 32px; }
.hero .start { margin: 8px 0 0; }

.prow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; }
.prow:last-child { border-bottom: 0; }
.prow a { flex: 1; min-width: 0; } .prow .self { flex: 1; font-weight: 600; }
.prow .life { color: var(--muted); font-size: 12px; white-space: nowrap; }
.prow .dim { font-size: 12px; }
.results .prow { padding: 9px 0; }

/* person header */
.phead { margin-bottom: 18px; }
.phead .titles { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.phead .summary { display: flex; gap: 16px; flex-wrap: wrap; color: var(--soft); margin-top: 2px; }
.phead .alt { font-size: 13px; margin-top: 4px; } .phead .alt span { margin-right: 10px; }

/* timeline */
.tl { display: grid; grid-template-columns: 96px 16px minmax(0, 1fr); column-gap: 12px; }
.tl-date { font-size: 12px; color: var(--muted); padding-top: 12px; text-align: right; }
.tl-dot { display: flex; flex-direction: column; align-items: center; }
.tl-dot span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 16px; flex-shrink: 0; }
.tl-dot i { width: 1px; flex-grow: 1; background: var(--rule); }
.tl-dot.weak span { background: var(--rule); }
.tl-item { padding: 9px 0 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tl-title { font-size: 15px; font-weight: 600; } .tl-title .sub { color: var(--soft); font-size: 14px; }
.tl-place { color: var(--soft); }
.note { color: var(--soft); font-size: 13px; white-space: pre-line; }
.cite { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.q { font-family: var(--mono); font-size: 10px; padding: 1px 5px; border: 1px solid transparent; border-radius: 4px; background: #e8ebef; color: #374151; white-space: nowrap; }
.q.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.q.none { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.famfact { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--soft); padding: 4px 0; }

.src { padding: 6px 0; border-bottom: 1px solid var(--rule-soft); display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.src:last-child { border-bottom: 0; }
.src > div { display: flex; justify-content: space-between; gap: 8px; }
.src .dim { font-size: 12px; }
.docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.doc { height: 84px; border: 1px solid var(--rule-soft); border-radius: 4px; background: var(--paper); display: flex; flex-direction: column; justify-content: flex-end; padding: 8px; gap: 2px; color: var(--ink); font-size: 12px; overflow: hidden; }
.doc span:not(.ref) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc svg { color: var(--muted); }
.doc:hover { text-decoration: none; border-color: var(--accent); }
.doc.empty { border-style: dashed; background: transparent; justify-content: center; align-items: center; color: var(--muted); }
.notes { white-space: pre-line; font-size: 13px; }
.tofind { background: #fbf6ec; }
.tofind > .small { padding: 3px 0; }

.gap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule-soft); }
.gap:last-child { border-bottom: 0; }
.gap > div { display: flex; flex-direction: column; } .gap .dim { font-size: 12px; }
.gap .count { font-size: 15px; color: var(--accent); }
.gap.on a { font-weight: 700; }
.placegroup { padding: 8px 0; border-bottom: 1px solid var(--rule); } .placegroup:last-child { border-bottom: 0; }

/* login */
.login { max-width: 340px; margin: 12vh auto; display: flex; flex-direction: column; gap: 12px; padding: 0 16px; }
.login label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.login input { font: 16px var(--serif); padding: 9px 10px; border-radius: 4px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); }
.login button { font: 15px var(--serif); font-weight: 600; padding: 10px; border: 0; border-radius: 4px; background: var(--accent); color: #fff; cursor: pointer; }
.error { color: var(--bad); }

/* phone */
@media (max-width: 900px) {
  body { display: block; }
  /* touch targets: 44px minimum on the controls a phone actually uses */
  .btn, .capture button, .inline button { min-height: 44px; padding: 10px 14px; }
  .zoomers .btn, .treebar select.btn { min-height: 40px; }
  .linkbtn { padding: 12px 8px; }
  .fcentre, .pcard .pcentre, .chip .ccentre { min-width: 44px; }
  .factedit > summary { display: inline-block; padding: 12px 0; }
  .viewnav .tabs { overflow-x: auto; max-width: 100%; }
  .pedscroll { max-height: none; min-height: 60vh; }
  .docs { grid-template-columns: 1fr; }
  .side { position: static; height: auto; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 10px 12px; }
  .side .brand { margin: 0 12px 0 0; flex-basis: 100%; flex-direction: row; gap: 10px; align-items: baseline; margin-bottom: 6px; }
  .side > a { padding: 8px 10px; font-size: 13px; min-height: 40px; }
  .side .recent { display: none; }
  .side .signout { margin: 0 0 0 auto; padding: 0; }
  .topbar { padding: 10px 12px; }
  .search { flex: 1; }
  .topbar .dim { display: none; }
  main { padding: 16px 12px 50px; }
  h1 { font-size: 24px; }
  .cols.home, .cols.person, .cols.gaps { grid-template-columns: minmax(0, 1fr); }
  .tl { grid-template-columns: 68px 14px minmax(0, 1fr); column-gap: 8px; }
  .tl-date { font-size: 11px; }
  .prow { padding: 9px 0; }
  .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* buttons, relations, tree */
.btn { display: inline-block; padding: 5px 11px; border-radius: 4px; border: 1px solid var(--rule); background: var(--card); font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; font-family: var(--serif); }
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.anchorform { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.anchorform input { font: 13px var(--mono); padding: 5px 8px; border: 1px solid var(--rule-soft); border-radius: 4px; }
.verdict { font-size: 17px; margin: 6px 0 14px; }
.chain { display: flex; flex-direction: column; gap: 2px; max-width: 520px; }
.chainrow { display: flex; gap: 10px; align-items: baseline; padding: 6px 10px; border: 1px solid var(--rule-soft); border-radius: 4px; background: var(--paper); }
.chainrow a { flex: 1; }
.chainrel { font-size: 12px; padding: 2px 12px; }
/* family view */
.treebar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.fview { display: flex; flex-direction: column; gap: 22px; max-width: 980px; }
.gen { display: flex; flex-direction: column; gap: 8px; }
.gen > .label, .gen summary.label { cursor: default; }
summary.label { cursor: pointer; list-style: none; } summary.label::-webkit-details-marker { display: none; }
summary.label::before { content: "▸ "; } details[open] > summary.label::before { content: "▾ "; }
.pair-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair.wide { max-width: 640px; }
.fcard { display: flex; align-items: stretch; min-height: 56px; background: var(--card); border: 1px solid var(--rule-soft); border-radius: 4px; color: var(--ink); border-left-width: 3px; overflow: hidden; }
.fcard:hover { border-color: var(--accent); }
.fmain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--ink); }
.fmain:hover { background: var(--hover-bg); text-decoration: none; }
.fcentre { width: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); border-left: 1px solid var(--rule-soft); }
.fcentre:hover { background: var(--accent); color: #fff; text-decoration: none; }
.fcard.m { border-left-color: #7fa7c7; } .fcard.f { border-left-color: #d79aa8; }
.fcard .avatar { width: 34px; height: 34px; border-radius: 50%; background: #e8ebef; color: var(--soft); display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.fcard.m .avatar { background: #dfe9f2; } .fcard.f .avatar { background: #f6e3e7; }
.fcard .body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fcard .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcard .life { font-size: 11px; color: var(--muted); }
.fcard .badges { display: flex; gap: 4px; }
.badge { font-family: var(--mono); font-size: 10px; padding: 1px 6px; border-radius: 999px; background: #e8ebef; color: var(--soft); }
.fcard.sm { min-height: 44px; padding: 5px 8px; } .fcard.sm .avatar { width: 26px; height: 26px; font-size: 12px; }
.fcard.empty { border-style: dashed; color: var(--muted); justify-content: center; font-size: 12px; }
.fcard.focus { background: var(--focus-bg); border-color: var(--accent); min-height: 68px; }
.fcard.focus .avatar { width: 44px; height: 44px; background: var(--accent); color: #fff; }
.fcard.focus .name { font-size: 16px; }
.focusrow { padding: 14px 16px; background: var(--card); border: 1px solid var(--rule-soft); border-radius: 4px; }
.couple { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; max-width: 720px; }
.couple .link { font-size: 12px; color: var(--muted); white-space: nowrap; padding: 0 4px; }
.marriages { display: flex; gap: 6px; flex-wrap: wrap; }
.pill.on { background: var(--accent); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: stretch; background: var(--paper); border: 1px solid var(--rule-soft); border-radius: 4px; font-size: 13px; min-height: 36px; overflow: hidden; }
.chip > a:first-child { padding: 7px 10px; color: var(--ink); display: flex; gap: 6px; align-items: baseline; }
.chip > a:first-child:hover { background: var(--hover-bg); text-decoration: none; }
.chip .ccentre { display: flex; align-items: center; padding: 0 7px; color: var(--muted); border-left: 1px solid var(--rule-soft); }
.chip .ccentre:hover { background: var(--accent); color: #fff; text-decoration: none; }
.chip:hover { border-color: var(--accent); }
.chip .life { font-size: 11px; color: var(--muted); }
.children .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
@media (max-width: 900px) {
    .pair-row { grid-template-columns: 1fr; }
  .couple { grid-template-columns: 1fr; } .couple .link { padding: 0 0 0 12px; }
  .children .grid { grid-template-columns: 1fr; }
  .grand { display: block; } .grand:not([open]) .pair-row { display: none; }
}

/* pedigree chart */
.charthint { margin: 0 0 10px; font-size: 13px; }
.zoomers { display: inline-flex; gap: 4px; }
.zoomers .btn { min-width: 30px; text-align: center; }
.pedscroll { overflow: auto; border: 1px solid var(--rule-soft); border-radius: 4px; background: var(--card);
  background-image: radial-gradient(var(--rule-soft) 1px, transparent 1px); background-size: 22px 22px;
  max-height: calc(100vh - 220px); }
.ped { position: relative; }
.pedlines { position: absolute; inset: 0; }
.pedlines path { fill: none; stroke: #b6bec7; stroke-width: 1.5; }
.pcard { position: absolute; display: flex; align-items: stretch; background: var(--card); border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--rule); border-radius: 4px; overflow: hidden; }
.pcard.m { border-left-color: #6f9fc4; } .pcard.f { border-left-color: #c98fa0; }
.pcard.focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(31,95,139,.15); background: var(--focus-bg); }
.pcard .pmain { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px;
  padding: 6px 8px; color: var(--ink); }
.pcard .pmain:hover { background: var(--hover-bg); text-decoration: none; }
.pcard .name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .life { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.pcard .life .ref { font-size: 10px; }
.pcard .pcentre { width: 26px; display: flex; align-items: center; justify-content: center; color: var(--muted);
  border-left: 1px solid var(--rule-soft); font-size: 13px; }
.pcard .pcentre:hover { background: var(--accent); color: #fff; text-decoration: none; }
.pcard.empty { border-style: dashed; border-left-style: dashed; border-left-color: var(--rule); background: transparent;
  flex-direction: column; justify-content: center; padding: 6px 8px; color: var(--muted); }
.pcard.empty:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pcard.empty .name { font-weight: 400; font-style: italic; }

/* capture (phase 2) */
.flash { background: var(--focus-bg); border: 1px solid #bfd4e3; border-radius: 4px; padding: 8px 12px; margin-bottom: 14px; }
.capture { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.capture input[type=text], .capture textarea { font: 14px var(--serif); padding: 8px 10px; border: 1px solid var(--rule-soft); border-radius: 4px; width: 100%; }
.capture input[type=file] { font-size: 13px; }
.capture .row { display: flex; gap: 8px; } .capture .row > * { flex: 1; min-width: 0; }
.capture .kinds label { display: flex; gap: 6px; align-items: center; font-size: 13px; padding: 6px 0; }
.capture .btn { align-self: flex-start; }
.doc.pic { background-size: cover; background-position: center; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.doc.pic .ref { color: #eee; }
.adddoc { height: auto; min-height: 84px; display: block; padding: 8px; }
.adddoc summary { cursor: pointer; list-style: none; text-align: center; padding: 24px 0; }
.adddoc[open] summary { padding: 4px 0; text-align: left; }
.adddoc summary::-webkit-details-marker { display: none; }
.adddoc[open] { grid-column: 1 / -1; }
.qnote { padding: 8px 0; border-bottom: 1px solid var(--rule-soft); display: flex; flex-direction: column; gap: 4px; }
.qnote .qhead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 12px; }
.qnote .qtext { white-space: pre-line; }
.qnote.done .qtext, .qnote.walled .qtext { color: var(--muted); text-decoration: line-through; }
.inline { display: flex; gap: 6px; }
.leads { margin-bottom: 16px; }
@media (max-width: 900px) { .capture .row { flex-direction: column; } }


/* gaps + graves (phase 3) */
.gaprow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule-soft); flex-wrap: wrap; }
.gaprow:last-child { border-bottom: 0; }
.gaprow > a:first-child { flex: 1; min-width: 140px; }
.gaprow > div:first-child { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.gaprow .inline { margin-left: auto; }
.gaprow.done > a, .gaprow.walled > a, .gaprow.done > div span:first-child, .gaprow.walled > div span:first-child { color: var(--muted); text-decoration: line-through; }
.gaprow.todo { background: #fffaf3; }
.small { font-size: 12px; }
.tabs { display: flex; gap: 6px; }
.tabs .pill.on { background: var(--accent); color: #fff; }
.tabs .pill { color: var(--ink); }
.grave { margin-bottom: 14px; }
.tofind .gaprow .btn { padding: 3px 8px; font-size: 12px; }


/* editing (phase 4) */
.editbox { margin-top: 10px; }
.editbox > summary { display: inline-block; list-style: none; cursor: pointer; }
.editbox > summary::-webkit-details-marker { display: none; }
.editbox[open] > summary { margin-bottom: 6px; }
.editbox.card { padding: 10px 12px; }
.factedit { margin-top: 4px; }
.factedit > summary { list-style: none; cursor: pointer; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.factedit > summary::-webkit-details-marker { display: none; }
.factedit > summary:hover { color: var(--accent); }
.factedit[open] { border-left: 2px solid var(--rule); padding: 6px 0 6px 10px; margin: 6px 0; }
.factedit .capture { margin-bottom: 8px; }
.capture select { font: 14px var(--serif); padding: 7px 8px; border: 1px solid var(--rule-soft); border-radius: 4px; background: var(--card); }
.linkbtn { background: none; border: 0; color: var(--muted); font: 11px var(--mono); cursor: pointer; padding: 0 4px; }
.linkbtn:hover { color: var(--bad); text-decoration: underline; }
.btn.danger-btn { border-color: #d9b4a6; color: var(--bad); }
.btn.danger-btn:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.card.danger { border-color: #d9b4a6; }
hr.rule { border: 0; border-top: 1px solid var(--rule-soft); margin: 12px 0; }
.flash.warn { background: var(--bad-bg); border-color: #e3c3b4; color: var(--bad); }
.flash code { font-family: var(--mono); font-size: .9em; }

/* one view switcher, on every page that shows a person */
.viewnav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.viewnav .who { font-size: 18px; font-weight: 600; }
.viewnav .who .ref { font-weight: 400; }
.viewnav .tabs { display: inline-flex; border: 1px solid var(--rule-soft); border-radius: 4px; overflow: hidden; background: var(--card); }
.viewnav .tab { padding: 6px 13px; font-size: 13px; font-weight: 500; color: var(--soft); border-right: 1px solid var(--rule-soft); white-space: nowrap; }
.viewnav .tab:last-child { border-right: 0; }
.viewnav .tab:hover { background: var(--paper); text-decoration: none; }
.viewnav .tab.on { background: var(--accent); color: #fff; }
.viewnav .home { margin-left: auto; }
@media (max-width: 900px) {
  .viewnav { gap: 8px; }
  .viewnav .who { flex-basis: 100%; font-size: 16px; }
  .viewnav .tab { padding: 8px 10px; }
  .viewnav .home { margin-left: 0; }
}
.side .navsep { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #8b95a1; margin: 16px 10px 4px; }
.side > a.sub { padding-left: 12px; }

/* fan chart */
.fanwrap { overflow: auto; border: 1px solid var(--rule-soft); border-radius: 4px; background: var(--card); padding: 12px; text-align: center; }
.fan { max-width: 100%; height: auto; }
.fan .seg { fill: #e8ebef; stroke: var(--card); stroke-width: 1.5; }
.fan .seg.m { fill: #dbe6ee; } .fan .seg.f { fill: #f2e0e4; } .fan .seg.u { fill: #e8ebef; }
.fan .seg.empty { fill: transparent; stroke: var(--rule-soft); stroke-dasharray: 3 3; }
.fan a:hover .seg { fill: var(--accent); }
.fan a:hover .seg.empty { fill: rgba(31,95,139,.08); stroke: var(--accent); }
.fan a:hover text { fill: #fff; }
.fan text { fill: var(--ink); text-anchor: middle; dominant-baseline: middle; font-family: var(--serif); pointer-events: none; }
.fan text.s1 { font-size: 12px; font-weight: 600; }
.fan text.s2 { font-size: 10px; }
.fan text.s3 { font-size: 8px; }
.fan text .yr { font-family: var(--mono); font-size: .82em; fill: var(--muted); font-weight: 400; }
.fan a:hover text .yr { fill: #dbe6ee; }
.fan .hub { fill: var(--accent); }
.fan .hubtext { fill: #fff; font-size: 13px; font-weight: 600; }
.fan .hubtext .yr { fill: #cfe0ec; font-size: 10px; font-weight: 400; }
.fan .spin circle { fill: var(--card); stroke: var(--rule); stroke-width: 1; }
.fan .spin text { font-size: 11px; fill: var(--muted); pointer-events: none; }
.fan .spin:hover circle { fill: var(--accent); stroke: var(--accent); }
.fan .spin:hover text { fill: #fff; }

/* form labels — every box says what belongs in it */
.capture label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--soft); }
.capture label .hint { font-weight: 400; color: var(--muted); font-size: 11px; }
.capture .kinds label { flex-direction: row; font-weight: 400; }
.capture label input, .capture label select, .capture label textarea { font-weight: 400; font-size: 14px; color: var(--ink); }
.pill.kin { font-size: 10px; text-transform: lowercase; }
.pill.kin.ancestor, .pill.kin.me { background: var(--good-bg); color: var(--good); }
.pill.kin.distant, .pill.kin.unconnected, .pill.kin.by-marriage { background: transparent; color: var(--muted); border: 1px solid var(--rule-soft); }
.places .placenode { margin: 2px 0; }
.places summary { cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--rule-soft); list-style: none; }
.places summary::-webkit-details-marker { display: none; }
.places summary::before { content: "▸ "; color: var(--muted); }
.places details[open] > summary::before { content: "▾ "; }
.places .pname { font-weight: 600; }
.places .placekids { padding-left: 18px; border-left: 1px solid var(--rule-soft); margin-left: 4px; }
.proof { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.proof.record { background: var(--good); }
.proof.oral { background: #b58a2b; }
.proof.hint { background: #b0b7bf; }
.proof.unknown { background: transparent; border: 1px solid var(--rule); }
.prooflegend { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; align-items: center; }
.longform { white-space: pre-wrap; font-size: 15px; line-height: 1.6; max-width: 40rem; }
.docs.wide { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.unatt { display: flex; flex-direction: column; gap: 6px; }
.unatt .inline input { font: 12px var(--mono); padding: 4px 6px; border: 1px solid var(--rule-soft); border-radius: 4px; width: 100%; }
.hsec { margin-top: 26px; }
.healthcard { margin-bottom: 14px; }
.count.bad { color: var(--bad); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.good { background: var(--good-bg); color: var(--good); }
.reviewform { margin-left: auto; }
.reviewnote { margin: -4px 0 8px 0; padding-left: 12px; border-left: 2px solid var(--rule-soft); }
.mergegroup { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.mergegroup:last-of-type { border-bottom: 0; }
.mergepick { display: inline-flex; gap: 4px; align-items: center; font-size: 11px; color: var(--muted); }
.mergegroup .btn { margin-top: 6px; }
