/* Family Galaxy — shared styles for the public site, sign-in pages and dashboard. */
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/fraunces-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/fraunces-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night: #08101f;       /* page background */
  --ink: #0f1a33;         /* raised surfaces */
  --ink-2: #16234a;       /* borders, wells */
  --star: #e6ecf7;        /* main text */
  --slate: #9aa7c7;       /* secondary text */
  --gold: #e3b04b;        /* the bloodline — used only for bloodline, links and primary actions */
  --gold-soft: #f2d48c;
  --dusk: #a48ad6;        /* relatives by marriage */
  --sky: #7fb2ff;         /* blood relatives off the direct line */
  --danger: #ff8a7a;
  --ok: #8fd3a8;
  --radius-lg: 18px;
  --radius: 10px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Atkinson", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--star);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: var(--gold-soft); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.muted { color: var(--slate); }
.eyebrow { color: var(--gold); font-size: .95rem; margin: 0 0 .5rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--night); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.4em; border-radius: 999px; border: 1px solid var(--gold);
  background: var(--gold); color: #1b1404; font: 700 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--gold-soft); color: #1b1404; }
.btn.ghost { background: transparent; color: var(--star); border-color: #3a4a78; }
.btn.ghost:hover { border-color: var(--gold); color: #fff; }
.btn.small { min-height: 38px; padding: 0 1em; font-size: .92rem; }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn[disabled] { opacity: .55; cursor: progress; }
.linkish { background: none; border: 0; color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; font: inherit; cursor: pointer; padding: 0; }

label { display: block; font-weight: 700; margin: 0 0 .35rem; }
.field { margin-bottom: 1.1rem; }
.field small { display: block; color: var(--slate); margin-top: .3rem; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=search], textarea, select {
  width: 100%; min-height: 48px; padding: .7rem .9rem; border-radius: var(--radius);
  background: #0a1430; color: var(--star); border: 1px solid #2c3b66; font: inherit;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(227,176,75,.25); }
.form-msg { min-height: 1.5em; margin: .5rem 0 0; }
.form-msg.error { color: var(--danger); }
.form-msg.ok { color: var(--ok); }
.hp { position: absolute; left: -5000px; }

/* ---------- header & footer ---------- */
.site-head { position: sticky; top: 0; z-index: 40; background: rgba(8,16,31,.86); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(58,74,120,.45); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--star); text-decoration: none; font-family: var(--serif); font-size: 1.3rem; }
.logo svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--star); text-decoration: none; font-size: .98rem; }
.nav a:hover, .nav a[aria-current=page] { color: var(--gold-soft); }
.nav .btn { color: #1b1404; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid #3a4a78; color: var(--star); border-radius: 8px; min-height: 42px; padding: 0 12px; font: inherit; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
         background: var(--night); border-bottom: 1px solid var(--ink-2); padding: 8px 16px 18px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--ink); }
  .nav .btn { margin-top: 12px; }
}
.site-foot { border-top: 1px solid var(--ink-2); margin-top: 96px; padding: 56px 0 40px; color: var(--slate); font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.foot-grid h2 { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: var(--star); margin-bottom: .8rem; letter-spacing: 0; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: .45rem; }
.foot-grid a { color: var(--slate); text-decoration: none; }
.foot-grid a:hover { color: var(--gold-soft); }
.foot-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--ink); display: flex; flex-wrap: wrap; gap: 8px 24px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- home: hero ---------- */
.hero { position: relative; min-height: min(88vh, 820px); display: grid; align-items: center; overflow: hidden; isolation: isolate; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(8,16,31,.94) 0%, rgba(8,16,31,.72) 38%, rgba(8,16,31,0) 70%), linear-gradient(0deg, var(--night) 0%, rgba(8,16,31,0) 22%); }
.hero-copy { max-width: 600px; padding: 72px 0; }
.hero h1 { margin-bottom: .35em; }
.hero .lede { font-size: 1.25rem; color: #cfd7ea; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-note { margin-top: 18px; color: var(--slate); font-size: .95rem; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 30px; font-size: .92rem; color: var(--slate); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: 0; background: currentColor; box-shadow: 0 0 10px currentColor; }
.legend .l-gold { color: var(--gold); } .legend .l-sky { color: var(--sky); } .legend .l-dusk { color: var(--dusk); }
.legend .lt { color: var(--slate); }

/* ---------- home: sections ---------- */
.section { padding: 96px 0 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: #c7d0e6; font-size: 1.12rem; }

.views { display: grid; gap: 88px; }
.view-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.view-row:nth-child(even) { grid-template-columns: 1fr 1.25fr; }
.view-row:nth-child(even) .shot { order: 2; }
.shot { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid #24345f; background: var(--ink); box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); }
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.view-row h3 { font-size: 2rem; }
.view-row p { color: #c7d0e6; }
.view-row ul { padding-left: 1.1em; color: #c7d0e6; }
.view-row li { margin-bottom: .35em; }
@media (max-width: 860px) {
  .view-row, .view-row:nth-child(even) { grid-template-columns: 1fr; gap: 24px; }
  .view-row:nth-child(even) .shot { order: 0; }
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; border-top: 1px solid var(--ink-2); }
.steps li { padding: 28px 28px 8px 0; counter-increment: step; position: relative; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--ink-2); }
.steps li::before { content: counter(step); font-family: var(--serif); font-size: 3rem; color: var(--gold); line-height: 1; display: block; margin-bottom: 14px; }
.steps h3 { font-size: 1.35rem; }
.steps p { color: #c7d0e6; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } .steps li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--ink-2); } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding: 14px 0 14px 34px; border-bottom: 1px solid var(--ink-2); position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 22px; width: 12px; height: 7px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }
.ticks strong { display: block; }
.ticks span { color: var(--slate); }

.cta-band { margin-top: 96px; padding: 64px 0; border-block: 1px solid var(--ink-2);
  background: radial-gradient(60% 120% at 85% 50%, rgba(227,176,75,.14), transparent 60%), var(--ink); }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.cta-band h2 { margin: 0; max-width: 18em; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 920px; }
.plan { border: 1px solid #2a3a68; border-radius: var(--radius-lg); padding: 32px; background: var(--ink); }
.plan.featured { border-color: var(--gold); }
.plan h2 { font-size: 1.9rem; margin-bottom: .2em; }
.plan .price { font-family: var(--serif); font-size: 2.6rem; margin: .4em 0 .1em; }
.plan .price small { font-family: var(--sans); font-size: 1rem; color: var(--slate); }
.plan .ticks li { padding-block: 10px; }
.plan .ticks li::before { top: 18px; }
.plan .btn { width: 100%; margin-top: 24px; }
.badge { display: inline-block; border: 1px solid var(--gold); color: var(--gold-soft); border-radius: 999px; padding: 2px 12px; font-size: .85rem; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.inline-form input { flex: 1 1 220px; }

/* ---------- long-form pages ---------- */
.page-head { padding: 72px 0 32px; }
.page-head p { font-size: 1.2rem; color: #c7d0e6; max-width: 36em; }
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.85rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.6em; }
.prose p, .prose li { color: #d3dbee; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose .note { border-left: 3px solid var(--gold); padding: 6px 0 6px 18px; color: #c7d0e6; }
.toc { border: 1px solid var(--ink-2); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 32px; max-width: 70ch; }
.toc ul { margin: 0; padding-left: 1.1em; columns: 2; }
@media (max-width: 600px) { .toc ul { columns: 1; } }

.faq details { border-bottom: 1px solid var(--ink-2); padding: 6px 0; max-width: 76ch; }
.faq summary { cursor: pointer; padding: 16px 30px 16px 0; font-family: var(--serif); font-size: 1.3rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-family: var(--sans); font-size: 1.5rem; color: var(--gold); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: #d3dbee; }

/* ---------- auth & dashboard ---------- */
.auth { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 48px 16px; }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: 2.4rem; }
.auth-card .btn { width: 100%; margin-top: 8px; }
.auth-alt { margin-top: 22px; color: var(--slate); }
.dash { padding: 56px 0; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }
.panel-box { border: 1px solid #24345f; border-radius: var(--radius-lg); padding: 28px; background: var(--ink); }
.panel-box + .panel-box { margin-top: 28px; }
.panel-box h2 { font-size: 1.6rem; }
.drop { border: 2px dashed #3a4a78; border-radius: var(--radius-lg); padding: 36px 24px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--gold); background: rgba(227,176,75,.06); }
.drop strong { display: block; font-size: 1.15rem; margin-bottom: 4px; }
.progress { height: 8px; background: var(--ink-2); border-radius: 999px; overflow: hidden; margin-top: 16px; }
.progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.tree-summary { display: flex; flex-wrap: wrap; gap: 28px; margin: 4px 0 22px; }
.tree-summary div strong { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.tree-summary div span { color: var(--slate); font-size: .92rem; }
.view-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.view-links a { display: block; padding: 16px; border: 1px solid #2a3a68; border-radius: var(--radius); text-decoration: none; color: var(--star); }
.view-links a:hover { border-color: var(--gold); }
.view-links a strong { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 400; }
.view-links a span { color: var(--slate); font-size: .9rem; }
.coming { border-style: dashed; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* refresh from Ancestry or another site */
.rf-steps { list-style: none; counter-reset: rf; margin: 20px 0 0; padding: 0; }
.rf-steps > li { counter-increment: rf; position: relative; padding: 0 0 18px 44px; border-left: 1px solid var(--ink-2); margin-left: 14px; }
.rf-steps > li:last-child { border-left-color: transparent; }
.rf-steps > li::before { content: counter(rf); position: absolute; left: -15px; top: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #1b1404; font-weight: 700; display: grid; place-items: center; }
.rf-steps h3 { font-size: 1.15rem; margin: 0 0 8px; }
.rf-steps ul { padding-left: 1.1em; margin: 0 0 8px; }
.preview:focus { outline: none; }
.pv-warn { border: 1px solid var(--danger); background: rgba(255,138,122,.08); border-radius: var(--radius); padding: 12px 16px; margin: 12px 0 16px; color: #ffd2cb; }
.pv-warn p { margin: 0 0 6px; } .pv-warn p:last-child { margin: 0; }
.pv-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.pv-counts div { border: 1px solid #2a3a68; border-radius: var(--radius); padding: 12px; text-align: center; }
.pv-counts strong { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.pv-counts span { color: var(--slate); font-size: .9rem; }
.pv-add strong { color: var(--ok); } .pv-upd strong { color: var(--gold-soft); } .pv-rem strong { color: var(--danger); }
@media (max-width: 520px) { .pv-counts { grid-template-columns: repeat(2, 1fr); } }
.pv-group { border-top: 1px solid var(--ink-2); padding: 4px 0; }
.pv-group summary { cursor: pointer; padding: 10px 0; font-weight: 700; }
.pv-group > ul { list-style: none; padding: 0; margin: 0 0 10px; max-height: 360px; overflow: auto; }
.pv-group > ul > li { padding: 7px 0; border-bottom: 1px solid var(--ink); }
.pv-changes { margin: 4px 0 0; padding-left: 1.2em; color: #c7d0e6; font-size: .94rem; }
.pv-root { border: 1px solid var(--gold); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 14px; }
.pv-root-list { list-style: none; padding: 0; margin: 8px 0 0; }
.pv-root-list button { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--ink-2); color: var(--star); padding: 9px 4px; font: inherit; cursor: pointer; }
.pv-root-list button:hover { color: var(--gold-soft); }
.pv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 10px; }
.versions { list-style: none; padding: 0; margin: 0; }
.versions li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ink-2); }
.versions li span { display: block; font-size: .9rem; }

/* signed-in visitors on the public pages */
html.fg-in .when-out, html:not(.fg-in) .when-in { display: none !important; }
