/* family.mimirlineage.com (B316, B317) – the app's look (B79) and the logo's colours, fonts bundled (B67). */
@font-face { font-family: 'Ubuntu Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('fonts/ubuntu-sans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Ubuntu Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('fonts/ubuntu-sans-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light dark;
  --ink: #0b2d4d; --muted: #3d5368; --paper: #f6f7f9; --card: #ffffff; --border: #dfe3e8;
  --primary: #046395; --teal: #0b5f69; --leaf: #117783; --focus: #005fcc;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e2ecf3; --muted: #a9bccb; --paper: #12161b; --card: #1c2229; --border: #2f3842; --primary: #5bb4e0; --teal: #78d4ca; --leaf: #78d4ca; --focus: #7fb8ff; }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Ubuntu Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; line-height: 1.55; }
a { color: var(--primary); }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--card); padding: 0.5rem; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.top { background: var(--card); border-bottom: 1.5px solid var(--border); }
.top-row { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding-top: 10px; padding-bottom: 10px; font-size: 0.9rem; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--ink); }
.brand .ink { fill: var(--ink); }
.brand .leaf { fill: var(--leaf); }
.spacer { flex: 1 1 auto; }
.button { display: inline-block; padding: 9px 14px; border-radius: 8px; background: var(--primary); color: #ffffff; font-weight: 600; text-decoration: none; }
@media (prefers-color-scheme: dark) { .button { color: #0b2d4d; } }

main.wrap { padding-top: 28px; padding-bottom: 48px; }
.crumb { margin: 0 0 12px; font-size: 0.95rem; }
.hero h1 { margin: 0 0 10px; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; letter-spacing: -0.02em; font-weight: 800; }
.kicker { margin: 0 0 6px; font-size: 0.9rem; font-weight: 700; color: var(--teal); letter-spacing: 0.05em; }
.lead { margin: 0 0 12px; font-size: 1.15rem; color: var(--muted); max-width: 44rem; }

.card { background: var(--card); border: 1.5px solid var(--border); border-radius: 16px; padding: 22px; margin-top: 20px; }
.card h2 { margin: 0 0 12px; font-size: 1.2rem; }
.card h3 { margin: 14px 0 6px; font-size: 1rem; }
.people { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 18px; }
.side-column .people { grid-template-columns: 1fr; }
.picks { margin: 24px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.picks a { display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--border); text-decoration: none; color: var(--ink); }
.picks span { color: var(--muted); font-size: 0.9rem; }
.picks em { color: var(--muted); }
.columns { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.main-column { flex: 999 1 520px; min-width: 0; }
.side-column { flex: 1 1 280px; min-width: 0; }
.facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.facts li { padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.story { font-size: 1.05rem; line-height: 1.7; }

.foot { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 20px; padding-bottom: 32px; border-top: 1.5px solid var(--border); font-size: 0.875rem; color: var(--muted); }
.foot .end { margin-left: auto; }

/* Step 5a (B317): figures, generations, charts, the life line */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section-title { margin: 32px 0 0; font-size: 1.3rem; }
.tiles { margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tiles div { background: var(--card); border: 1.5px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.tiles dt { font-size: 0.85rem; color: var(--muted); }
.tiles dd { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.01em; }
.tiles dd.sub { font-size: 0.9rem; font-weight: 400; }
.generation { border-top: 1px solid var(--border); padding: 10px 0; }
.generation summary { cursor: pointer; }
.generation .people { margin-top: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.button.secondary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.switch { display: flex; gap: 6px; margin: 16px 0; flex-wrap: wrap; }
.switch a { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--border); text-decoration: none; color: var(--ink); background: var(--card); }
.switch a[aria-current='page'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chart-scroll { overflow-x: auto; background: var(--card); border: 1.5px solid var(--border); border-radius: 16px; padding: 16px; }
.pedigree .link { stroke: var(--border); stroke-width: 2; fill: none; }
.pedigree .box { fill: var(--paper); stroke: var(--border); stroke-width: 1.5; }
.pedigree .box.root { fill: var(--card); stroke: var(--primary); stroke-width: 2.5; }
.pedigree .box.empty { fill: none; stroke-dasharray: 5 4; }
.pedigree a:hover .box, .pedigree a:focus .box { stroke: var(--primary); }
.pedigree .name { font-size: 14px; font-weight: 700; fill: var(--ink); }
.pedigree .years { font-size: 12px; fill: var(--muted); }
.descendants, .descendants ul { list-style: none; margin: 0; padding-left: 1.4rem; border-left: 2px solid var(--border); }
.descendants { padding-left: 0; border-left: 0; }
.descendants li { margin: 8px 0; }
.couple .partner { margin-left: 0.6rem; }
.lifeline { width: 100%; height: auto; margin: 4px 0 14px; }
.lifeline .bar { fill: var(--primary); }
.lifeline .mark { fill: var(--card); stroke: var(--teal); stroke-width: 3; }
.lifeline .tick { font-size: 22px; fill: var(--muted); text-anchor: middle; }
.lifeline .tick.end { text-anchor: end; }

/* Step 5b (B317): status and sources per fact */
.fact-row { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: baseline; }
.status { font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.status-proven, .status-corroborated { background: #e5efe8; color: #1e5b37; }
.status-sourced { background: #e3eef6; color: #04466a; }
.status-disputed, .status-disproven { background: #fdebd9; color: #7a3a00; }
.status-unsourced { background: transparent; color: var(--muted); border: 1.5px solid var(--border); }
@media (prefers-color-scheme: dark) {
  .status-proven, .status-corroborated { background: #1f3a2a; color: #9fe0b8; }
  .status-sourced { background: #1d3a50; color: #a9d4ef; }
  .status-disputed, .status-disproven { background: #3d2a14; color: #f5c58f; }
}
.sources { margin-top: 6px; font-size: 0.95rem; }
.sources summary { cursor: pointer; color: var(--primary); }
.sources ul { margin: 6px 0 0; padding-left: 1.2rem; }

/* Step 6 (B316): the message forms */
.message { display: flex; flex-direction: column; gap: 8px; max-width: 40rem; }
.message label { font-weight: 600; }
.message textarea, .message input[type='email'] { font: inherit; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--muted); background: var(--card); color: var(--ink); }
.message .button { align-self: flex-start; margin-top: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-color: #9fcfca; }
.warning { border-color: #f0b27a; }
.contact .button { margin-top: 6px; }

/* Round 3 (B317): the map */
.map { height: 340px; border-radius: 12px; margin-bottom: 14px; }
.place-list { margin: 0; padding-left: 1.4rem; columns: 2 220px; }

/* The fan (B317) */
.fan .segment { stroke: var(--card); stroke-width: 2; }
.fan .segment.father { fill: #d9e9f3; }
.fan .segment.mother { fill: #f5dde6; }
.fan .segment.empty { fill: none; stroke: var(--border); stroke-dasharray: 5 4; }
.fan a:hover .segment, .fan a:focus .segment { fill: #b9d9ec; }
.fan .hub { fill: var(--ink); }
.fan .label { font-size: 13px; fill: #0b2d4d; text-anchor: middle; font-weight: 600; }
.fan .label.g3 { font-size: 11px; }
.fan .label.root { fill: var(--paper); font-size: 15px; }
@media (prefers-color-scheme: dark) {
  .fan .segment.father { fill: #1d3a50; }
  .fan .segment.mother { fill: #3a2430; }
  .fan .label { fill: #e2ecf3; }
}
.chart-scroll svg { display: block; margin: 0 auto; }

/* Photos from the app (B318): the cover over the tree's front page, portraits on the person and under "Begynn her". */
.hero .cover { display: block; width: 100%; height: clamp(160px, 28vw, 320px); object-fit: cover; border-radius: 16px; margin: 0 0 20px; background: var(--border); }
.portrait { border-radius: 50%; object-fit: cover; background: var(--border); }
.hero.with-portrait { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; }
.hero.with-portrait > :not(.portrait) { grid-column: 1; }
.hero.with-portrait > .portrait { grid-column: 2; grid-row: 1 / span 4; width: 132px; height: 132px; border: 4px solid var(--card); }
.picks .portrait.small { width: 56px; height: 56px; margin-bottom: 8px; }
@media (max-width: 600px) {
  .hero.with-portrait { display: block; }
  .hero.with-portrait > .portrait { display: block; width: 96px; height: 96px; margin-bottom: 12px; }
}

/* The person page's parts (B317): jump links on a wide screen, tabs on a phone (person-tabs.js). */
.tabs { display: none; }
.plain { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 700px) {
  .tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; margin: 16px -24px 0; padding: 8px 24px; overflow-x: auto; background: var(--paper); border-bottom: 1.5px solid var(--border); }
  .tabs a { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; }
  .tabs a[aria-selected="true"] { background: var(--primary); color: #ffffff; }
  .columns > div, .columns > aside { flex-basis: 100%; }
}
@media (max-width: 700px) and (prefers-color-scheme: dark) { .tabs a[aria-selected="true"] { color: #0b2d4d; } }

/* The owner's photos (B318). */
.photos { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.photos img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--border); }
.photos p { margin: 6px 0 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
