/* Odkaz rodu – burgundy theme from the logo (design 09 A "Vývod", sharp corners), font Hanken Grotesk (SIL OFL 1.1, see fonts/OFL.txt). */
@font-face {
	font-family: "Hanken Grotesk";
	src: url("fonts/HankenGrotesk-wght.ttf") format("truetype");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
/* Caveat (SIL OFL 1.1, fonts/Caveat-OFL.txt): handwriting in the illustrations of the page Jak to funguje */
@font-face {
	font-family: "Caveat";
	src: url("fonts/Caveat-latin-ext.woff2") format("woff2");
	font-weight: 400 700;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Caveat";
	src: url("fonts/Caveat-latin.woff2") format("woff2");
	font-weight: 400 700;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--brand: #9b1b48;        /* logo burgundy */
	--brand-hover: #84163d;
	--brand-deep: #6c1332;
	--ink: #2a0f1d;          /* logo lettering */
	--text: #5a4651;
	--nav: #4a3a42;
	--muted: #6f5b66;
	--year: #5c2a40;
	--rose-500: #bb6483;     /* logo, middle fields */
	--rose-300: #d9a8b9;     /* logo, top fields */
	--tint-300: #dbadbd;
	--tint-200: #efdbe2;
	--tint-100: #f5e8ed;
	--tint-50: #fbf6f8;
	--line: #ebe0e5;
	--line-strong: #e2d5db;
	--line-soft: #f2ebee;
	--input: #d6c6ce;
	--bg: #ffffff;
	--green: #1f7a4d;
	--green-bg: #e2f4ea;
	--green-line: #7cc5a0;
	--amber: #9a6410;
	--amber-bg: #fdf1d8;
	--red: #b42318;
	--red-bg: #fde7e4;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(42, 15, 29, .05), 0 8px 24px rgba(42, 15, 29, .07);
	--sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; font: 16px/1.6 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--brand); }
a:hover { color: var(--brand-deep); }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; color: var(--ink); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.medium { max-width: 920px; }
.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; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--rose-300); outline-offset: 2px; }

/* Header & footer */
.site-header { background: #fff; border-bottom: 1px solid var(--line-soft); position: relative; z-index: 40; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 84px; } /* as wide as the page content (.container), so the logo lines up with it */
.logo { display: flex; flex-shrink: 0; }
.logo img { display: block; height: 30px; width: auto; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: 26px; flex: 1; }
.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a, .user-link { color: var(--nav); text-decoration: none; font-weight: 500; white-space: nowrap; }
.main-nav a:hover, .user-link:hover { color: var(--ink); }
.user-nav { display: flex; align-items: center; gap: 18px; }
.user-nav .btn { font-size: 1rem; padding: 11px 20px; }
.logout-link { display: inline-flex; align-items: center; gap: 8px; }
.logout-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.logout-link .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: auto; border: 1.5px solid var(--line-strong); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nav-toggle .icon-close, .nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }
@media (max-width: 1099px) {
	.header-inner { flex-wrap: wrap; min-height: 68px; gap: 0 16px; }
	.logo img { height: 26px; }
	.js-nav .nav-toggle { display: inline-flex; }
	.site-nav { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 0 0 18px; }
	.js-nav .site-nav { display: none; }
	.js-nav.nav-open .site-nav { display: flex; }
	.main-nav, .user-nav { flex-direction: column; align-items: stretch; gap: 0; }
	.main-nav a, .user-link { padding: 12px 2px; border-bottom: 1px solid var(--line-soft); font-size: 1.05rem; }
	.logout-link .label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
	.user-nav .btn { margin-top: 16px; }
}
.site-footer { background: var(--ink); color: #dcc9d2; margin-top: 64px; padding: 48px 0 32px; font-size: .92rem; }
.page-home .site-footer { margin-top: 0; }
.site-footer a { color: #f6eaef; }
.site-footer a:hover { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-brand img { height: 28px; width: auto; margin-bottom: 12px; }
.footer-nav { display: flex; flex-direction: column; gap: 6px; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink); font: 600 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .05s; }
.btn:hover { background: var(--tint-50); border-color: var(--tint-300); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.btn-light { background: #fff; border-color: #fff; color: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--tint-300); color: var(--brand); }
.btn-danger { background: #fff; border-color: #f0b4ad; color: var(--red); }
.btn-danger:hover { background: var(--red-bg); border-color: #e9958c; color: var(--red); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-lg { padding: 14px 28px; font-size: 1.0625rem; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.link-button { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; }

/* Flash messages & alerts */
.flashes { margin-top: 20px; }
.flash, .alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 10px; border: 1px solid var(--tint-200); background: var(--tint-50); }
.flash-success, .alert-success { border-color: var(--green-line); background: var(--green-bg); }
.flash-error, .alert-error { border-color: #f3b0a9; background: var(--red-bg); color: #7a1d14; }
.flash-warning, .alert-warning { border-color: #f1cf85; background: var(--amber-bg); color: #6b4609; }
.alert p:last-child { margin-bottom: 0; }

/* Home: hero with the "vývod" shield of the logo */
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8125rem; font-weight: 600; color: var(--brand); }
.lead { font-size: 1.15rem; color: var(--text); max-width: 640px; }
.hero { padding: 72px 0 88px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 64px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 24px; }
.hero-text > * { margin: 0; }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.125rem); line-height: 1.02; letter-spacing: -.035em; }
.hero .lead { max-width: 500px; font-size: 1.1875rem; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px !important; }
.hero-shield { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; margin: 0; padding: 0 14px; border-radius: 999px; background: var(--tint-100); color: var(--brand); font-size: .8125rem; font-weight: 600; }
.pill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shield { display: block; width: 100%; max-width: 420px; height: auto; }
.shield .f-top { fill: var(--tint-200); }
.shield .f-mid { fill: var(--tint-300); }
.shield .f-you { fill: var(--brand); }
.shield .f-figure { fill: var(--brand-deep); }
.shield text { font-family: var(--sans); text-anchor: middle; }
.shield .t-name { font-size: 13px; font-weight: 600; fill: var(--ink); }
.shield .t-year { font-size: 12px; font-weight: 500; fill: var(--year); }
.shield .t-parent { font-size: 17px; font-weight: 700; fill: var(--ink); }
.shield .t-parent-year { font-size: 13px; font-weight: 500; fill: var(--year); }
.shield .t-you { font-size: 36px; font-weight: 700; letter-spacing: -.02em; fill: #fff; }
/* "Ověřeno genealogem" rubber stamp: under the hero buttons and on the assurance card (--stamp-turn = its tilt) */
.stamp { display: block; height: auto; color: var(--brand); fill: currentColor; transform: rotate(var(--stamp-turn, -12deg)); mix-blend-mode: multiply; pointer-events: none; }
.stamp .s-bold { fill: none; stroke: currentColor; stroke-width: 3.5; }
.stamp .s-line { fill: none; stroke: currentColor; stroke-width: 1.3; }
.stamp text { font-family: var(--sans); font-weight: 800; text-anchor: middle; }
.stamp .s-arc { font-size: 16.5px; letter-spacing: 2.4px; }
.stamp .s-band { font-size: 30px; letter-spacing: 1.5px; }
@keyframes stamp-in { from { opacity: 0; transform: rotate(var(--stamp-turn, -12deg)) scale(1.5); } }
.hero-text > .hero-trust { display: flex; align-items: center; gap: 18px; margin-top: 8px; }
.hero-trust .stamp { flex-shrink: 0; width: 104px; --stamp-turn: -10deg; }
.hero-trust p { display: flex; flex-direction: column; gap: 2px; max-width: 380px; margin: 0; text-wrap: balance; }
.hero-trust strong { line-height: 1.4; }
.hero-trust span { font-size: .9375rem; line-height: 1.5; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
	.hero-trust .stamp { animation: stamp-in .45s cubic-bezier(.3, 1.35, .5, 1) .5s backwards; }
}
@media (max-width: 560px) {
	.hero-text > .hero-trust { gap: 14px; }
	.hero-trust .stamp { width: 88px; }
	.hero-trust strong { font-size: .9375rem; }
	.hero-trust span { font-size: .875rem; }
}
@media (max-width: 960px) {
	.hero { padding: 48px 0 64px; }
	.hero-inner { grid-template-columns: 1fr; gap: 44px; }
	.hero-shield { width: 100%; max-width: 360px; margin: 0 auto; }
}

/* Home: sections */
.section { padding: 80px 0; }
.section-tinted { background: var(--tint-50); }
.section-eyebrow { text-align: center; margin: 0 0 10px; }
.section-title { text-align: center; }
.section-lead { text-align: center; color: var(--text); max-width: 680px; margin: 0 auto 36px; }
@media (max-width: 760px) { .section { padding: 56px 0; } }
.variants { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 900px) { .variants { grid-template-columns: 1fr; } }
.variant-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.variant-card > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 14px; }
.variant-card > header h3 { font-size: 1.75rem; margin: 0; flex: 1; letter-spacing: -.025em; }
.price { font: 700 1.6rem/1 var(--sans); letter-spacing: -.02em; color: var(--brand); margin: 0; }
.price-sm { font-weight: 700; color: var(--brand); }
.variant-featured { border-color: var(--tint-300); }
.variant-card .btn-block { margin-top: auto; }
/* "Rodokmen na míru" under the two cards: the name and price across the card (the price on the right like in the other
   cards), below them the text, checks and button beside the diagram; one column like the cards on phones */
.variant-wide { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head head" "text figure" "checks figure" "cta figure"; grid-template-rows: auto auto auto 1fr; column-gap: 40px; }
.variant-wide > header { grid-area: head; }
.variant-wide > header h3 { flex: 1 1 auto; } /* the long "individuální cena" goes under the name rather than squeezing it */
.variant-wide > .variant-text { grid-area: text; }
/* the box runs from the top of the text to the bottom of the button, the diagram in its middle */
.variant-wide > .diagram-box { grid-area: figure; align-self: stretch; display: flex; align-items: center; margin: 0; }
.variant-wide > .checks { grid-area: checks; }
.variant-wide > .btn-block { grid-area: cta; align-self: end; }
@media (max-width: 900px) {
	.variant-wide { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "text" "figure" "checks" "cta"; grid-template-rows: none; }
	.variant-wide > .diagram-box { margin: 8px 0 16px; }
}
.diagram-box { margin: 8px 0 16px; background: var(--tint-50); border-radius: 14px; padding: 14px; }
.diagram { display: block; width: 100%; height: auto; }
.diagram .d-line { fill: none; stroke: #c9a8b6; stroke-width: 1.4; }
.diagram .d-marriage { stroke: var(--rose-500); stroke-width: 2; }
.diagram .d-bearer, .diagram .d-ancestor { fill: var(--brand); }
.diagram .d-start { fill: var(--brand-deep); }
.diagram .d-spouse { fill: var(--rose-500); }
.diagram .d-sibling { fill: #e4d6dc; }
.diagram .d-name { stroke: rgba(255, 255, 255, .75); stroke-width: 3; stroke-linecap: round; }
.diagram .d-gen { font: 700 14px var(--sans); fill: var(--brand-deep); }
.diagram .d-more { fill: var(--rose-300); }
.diagram .d-line-more { fill: none; stroke: #e5cfd8; stroke-width: 1.1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--muted); margin-top: 8px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.swatch-bearer { background: var(--brand); }
.swatch-spouse { background: var(--rose-500); }
.swatch-sibling { background: #e4d6dc; }
.checks { list-style: none; padding: 0; margin: 0 0 20px; }
.checks li { padding-left: 26px; position: relative; margin-bottom: 6px; }
.checks li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 12px; height: 7px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg); }
.features { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.features li { background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.features h3 { font-size: 1.05rem; }
.features p { color: var(--muted); font-size: .93rem; margin: 0; }
.feature-icon { width: 34px; height: 34px; fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.badge { display: inline-block; font: 600 .7rem/1.6 var(--sans); padding: 0 8px; border-radius: 999px; background: var(--tint-100); color: var(--brand-deep); margin-left: 8px; vertical-align: middle; letter-spacing: 0; }
/* The assurance sentence as a card with the stamp pressed over its left edge (the 120px leave room for the stamp's
   outer half); on phones the stamp sits on the top edge. */
.assurance { position: relative; max-width: min(820px, calc(100% - 120px)); margin: 0 auto; padding: 26px 34px 26px 96px; background: var(--tint-50); border: 1px solid var(--tint-200); border-radius: 20px; font-size: 1.05rem; }
.assurance p { margin: 0; }
.assurance .stamp { position: absolute; left: -68px; top: calc(50% - 68px); width: 136px; }
@media (max-width: 640px) {
	.assurance { max-width: none; margin-top: 88px; padding: 68px 22px 24px; text-align: center; }
	.assurance .stamp { left: calc(50% - 56px); top: -56px; width: 112px; --stamp-turn: -10deg; }
}
.help { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--tint-100); color: var(--brand); font: 700 .75rem/1 var(--sans); cursor: help; vertical-align: 1px; margin-left: 4px; }
/* A hidden bubble takes no space (a merely invisible one pushed narrow pages sideways); app.js shifts a shown one inside the window. */
.help .tooltip { display: none; position: absolute; bottom: calc(100% + 8px); left: calc(50% + var(--tip-shift, 0px)); transform: translateX(-50%); width: max-content; max-width: min(260px, calc(100vw - 24px)); background: var(--ink); color: #fff; font: 400 .85rem/1.45 var(--sans); padding: 10px 12px; border-radius: 8px; text-align: left; z-index: 20; box-shadow: var(--shadow); }
.help:hover .tooltip, .help:focus .tooltip, .help:focus-within .tooltip { display: block; animation: tip-in .15s; }
@keyframes tip-in { from { opacity: 0; } }
.addons-title { margin-top: 56px; }
.addons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.addon { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.steps li { counter-increment: step; background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.steps li::before { content: counter(step); width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; margin-bottom: 6px; }
.steps span { color: var(--muted); font-size: .93rem; }
.closing-cta { text-align: center; margin: 40px 0 0; }

/* Home: the sample family in the tree chart (styles in "Customer tree section") */
.sample-tree .chart-scroll { max-height: 660px; overflow-y: auto; }

/* How it works (Page:how) – illustrations in the style of a family photo album (Page/@how-art.latte) */
.page-how .site-footer { margin-top: 0; }
.page-how .section-title { margin-bottom: 40px; }
.how-hero { padding: 56px 0 64px; }
.how-hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px 56px; align-items: center; }
.how-hero-text { display: flex; flex-direction: column; gap: 22px; }
.how-hero-text > * { margin: 0; }
.how-hero h1 { font-size: clamp(2.4rem, 5vw, 3.5rem); line-height: 1.04; letter-spacing: -.035em; }
.how-hero .lead { max-width: 500px; font-size: 1.1875rem; line-height: 1.55; }
.how-hero-art { width: 100%; max-width: 540px; margin: 0 auto; }
@media (max-width: 900px) {
	.how-hero { padding: 40px 0 48px; }
	.how-hero-inner { grid-template-columns: 1fr; }
	.how-hero-art { max-width: 440px; }
}
.how-steps-section { padding-top: 24px; }
.how-steps { list-style: none; max-width: 1040px; margin: 0 auto; padding: 0; }
.how-steps > li { display: flex; flex-direction: column; align-items: center; }
.how-steps > li:not(:last-child)::after { content: ""; height: 56px; margin: 20px 0; border-left: 2px dashed var(--tint-300); }
.how-step { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 64px; }
.how-steps > li:nth-child(even) .how-step { flex-direction: row-reverse; }
.how-step > .album-art { flex: 1 1 360px; min-width: 0; max-width: 460px; }
.how-step-text { flex: 1 1 320px; min-width: 0; max-width: 460px; }
.how-step-text .how-step-no { margin: 0 0 8px; font-size: .9375rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.how-step-text h3 { margin: 0 0 10px; font-size: 1.625rem; line-height: 1.2; letter-spacing: -.02em; }
.how-step-text p { margin: 0 0 8px; font-size: 1.0625rem; color: var(--text); }
.how-step-text .how-step-note { margin: 0; font-size: .9375rem; color: var(--muted); }
@media (max-width: 760px) {
	.how-steps > li:not(:last-child)::after { height: 32px; margin: 12px 0; }
}
.how-faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 20px; }
.how-faq-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 24px; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: #fff; }
.how-faq-card > .album-art { flex: 0 0 170px; width: 170px; }
.how-faq-card > div { flex: 1 1 220px; min-width: 0; }
.how-faq-card h3 { margin: 0 0 8px; font-size: 1.3125rem; line-height: 1.25; }
.how-faq-card p { margin: 0; color: var(--text); }
.how-faq-periods { flex-direction: column; align-items: stretch; gap: 14px; }
.how-faq-periods h3 { margin: 0; }
.how-periods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.how-periods li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 4px 14px; border-radius: 16px; background: var(--tint-100); text-align: center; }
.how-periods svg { width: 30px; height: 30px; fill: none; stroke: var(--brand-deep); stroke-width: 1.8; stroke-linecap: round; }
.how-periods strong { font-size: 1.75rem; line-height: 1.1; letter-spacing: -.02em; color: var(--brand); white-space: nowrap; }
.how-periods small { font-size: .875rem; font-weight: 600; letter-spacing: 0; }
.how-periods span { font-size: .875rem; line-height: 1.3; color: var(--text); }
.how-outputs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.how-outputs li { padding: 4px 12px; border-radius: 999px; background: var(--tint-100); font-size: .875rem; font-weight: 600; color: var(--nav); }
@media (max-width: 560px) { .how-faq-card { padding: 22px 18px; } }
.how-cta { max-width: 860px; margin: 0 auto; padding: 56px 32px; border-radius: 28px; background: var(--tint-100); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.how-cta > * { margin: 0; }
.how-cta h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); line-height: 1.1; }
.how-cta > p { max-width: 520px; font-size: 1.125rem; color: var(--text); }
.how-cta .hero-actions { justify-content: center; }
@media (max-width: 560px) { .how-cta { padding: 40px 20px; } }
.hand { font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive; font-weight: 500; }
.album-art { position: relative; width: 100%; }
.album-art-hero { aspect-ratio: 520 / 400; }
.album-art-step { aspect-ratio: 360 / 260; }
.album-art-faq { aspect-ratio: 200 / 140; }
.album-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.album-art > .album-over { pointer-events: none; }
.album-photo { position: absolute; box-sizing: border-box; padding: 7px 7px 20px; background: #fbf7ee; box-shadow: 0 2px 3px rgba(58, 34, 40, .18), 0 10px 18px rgba(58, 34, 40, .16); }
.album-photo > img, .album-photo > svg { display: block; width: 100%; height: 100%; object-fit: cover; background: #e9dcc7; }
.album-photo > img { filter: sepia(.85) saturate(.75) contrast(1.05) brightness(1.02); }
.album-photo::after { /* black photo corners */
	content: ""; position: absolute; inset: -4px; pointer-events: none;
	background: linear-gradient(135deg, #3a2228 50%, transparent 50%) left top / 18px 18px no-repeat, linear-gradient(225deg, #3a2228 50%, transparent 50%) right top / 18px 18px no-repeat,
		linear-gradient(45deg, #3a2228 50%, transparent 50%) left bottom / 18px 18px no-repeat, linear-gradient(315deg, #3a2228 50%, transparent 50%) right bottom / 18px 18px no-repeat;
}
.album-art-faq .album-photo { padding: 4px 4px 11px; }
.album-art-faq .album-photo::after { inset: -2px; background-size: 10px 10px; }

/* Generic pages, cards, tables */
.page { padding-top: 40px; padding-bottom: 24px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-header h1 { margin: 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.card h2 { font-size: 1.35rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.prose h2 { margin-top: 1.6em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.3em; }
.prose li { margin-bottom: .35em; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; background: var(--tint-50); }
.table tr:hover td { background: #fdf9fb; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--tint-100); color: var(--brand-deep); white-space: nowrap; }
.status-completed, .status-paid, .status-matched, .status-approved, .status-answered, .status-active, .status-done, .status-auto_ok, .status-reviewed { background: var(--green-bg); color: var(--green); }
.status-failed, .status-unmatched, .status-rejected, .status-needs_review, .status-cancelled, .status-blocked { background: var(--red-bg); color: var(--red); }
.status-awaiting_payment, .status-pending, .status-review, .status-queued { background: var(--amber-bg); color: var(--amber); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 600; }
.tabs a.active, .tabs a:hover { color: var(--ink); border-bottom-color: var(--brand); }

/* Forms */
.form-fields { display: flex; flex-direction: column; gap: 14px; }
.field-label label { font-weight: 600; font-size: .93rem; }
.field.required .field-label label::after { content: " *"; color: var(--brand); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], select, textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--input); border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid var(--tint-100); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
.field-error, .error-text { color: var(--red); font-size: .85rem; display: block; margin-top: 4px; }
.hint { color: var(--muted); font-size: .82rem; display: block; margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; color: var(--brand-deep); }
.checkbox-field label, .field-control > label { font-weight: 400; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { flex: 1; min-width: 180px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
/* Questions with answers to pick (the chronicle: sources, stories read aloud) – large targets for customers 50+ */
fieldset.choices { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.choices legend { padding: 0; margin-bottom: 2px; font-weight: 600; font-size: .95rem; color: var(--ink); }
fieldset.choices .hint { margin: 0 0 4px; }
.choice { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 400; cursor: pointer; }
.choice:hover { border-color: var(--tint-300); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--tint-50); }
.choice input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--brand); }

/* Stories read aloud: links in the tree section (Tree:chronicle), the page opened by the QR code (Front:Listen), review */
.listen-links { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.listen-links h3 { font-size: 1rem; margin: 0 0 2px; }
.listen-links ul { margin: 8px 0 0; padding-left: 20px; }
.listen-links li { margin-bottom: 4px; }
.listen-page h1 { margin-bottom: 4px; }
.listen-years { color: var(--muted); margin: 0 0 20px; }
.listen-player { display: block; width: 100%; margin: 0 0 24px; }
.listen-text p { font-size: 1.1rem; line-height: 1.7; }
.narration-review { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.narration-review audio { display: block; width: 100%; margin: 6px 0; }

/* Order steps */
.order-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 28px; flex-wrap: wrap; counter-reset: os; }
.order-steps li { counter-increment: os; flex: 1; min-width: 150px; padding: 10px 14px; border-radius: 12px; background: var(--tint-50); color: var(--muted); font-size: .9rem; font-weight: 600; }
.order-steps li::before { content: counter(os) ". "; }
.order-steps li.active { background: var(--brand); color: #fff; }
.order-steps li.done { background: var(--tint-100); color: var(--brand-deep); }
.order-steps-long li { min-width: 120px; } /* five steps of "Rodokmen na míru" fit one row of a narrow page */
.summary-box { background: var(--tint-50); border-radius: var(--radius); padding: 20px; }
.payment-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; }
@media (max-width: 700px) { .payment-grid { grid-template-columns: 1fr; } }
.qr { background: #fff; padding: 10px; border-radius: 10px; border: 1px solid var(--line); width: 200px; }
.qr svg { display: block; width: 100%; height: auto; }

/* Pedigree form (order step 2) */
.pedigree-help { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; }
.pedigree-help div { background: var(--tint-50); border-radius: 12px; padding: 12px 14px; font-size: .9rem; }
.pedigree-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.pedigree-scroll { overflow-x: auto; padding-bottom: 10px; }
.pedigree { display: flex; flex-direction: column-reverse; gap: 22px; min-width: 980px; position: relative; }
.pedigree-lines { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 0; overflow: visible; }
.pedigree-lines path { fill: none; stroke: var(--input); stroke-width: 1.5; }
.pedigree-lines path.male { stroke: #c78da3; }
.pedigree-lines path.female { stroke: #e5c3d0; }
.pedigree-lines path.skipped { stroke: #f0a59c; stroke-dasharray: 4 4; opacity: .5; }
.pedigree-row, .gen-label { position: relative; z-index: 1; }
.pedigree.single { min-width: 0; }
.pedigree-row { display: grid; gap: 10px; position: relative; }
.pedigree-row[data-gen="1"] { grid-template-columns: minmax(240px, 340px); justify-content: center; }
.pedigree-row[data-gen="2"] { grid-template-columns: repeat(2, minmax(200px, 300px)); justify-content: space-around; }
.pedigree-row[data-gen="3"] { grid-template-columns: repeat(4, 1fr); }
.pedigree-row[data-gen="4"] { grid-template-columns: repeat(8, 1fr); }
.gen-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: -14px; }
.pcard { border: 2px solid var(--line); border-radius: 12px; background: #fff; padding: 10px 12px; font-size: .86rem; display: flex; flex-direction: column; gap: 4px; min-height: 112px; position: relative; transition: border-color .15s, background .15s; }
.pcard .role { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.pcard .role-detail { font-size: .72rem; color: var(--muted); margin-top: -4px; }
.pedigree-row[data-gen="4"] .pcard { padding: 8px 9px; }
.pedigree-row[data-gen="4"] .pcard .pactions button { font-size: .68rem; padding: 3px 6px; }
.pcard .pname { font-weight: 700; color: var(--ink); font-size: .95rem; line-height: 1.25; }
.pcard .pmeta { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.pcard .pstate { font-size: .76rem; font-weight: 600; }
.pcard .pactions { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.pcard .pactions button { font-size: .75rem; padding: 4px 8px; }
.pcard.empty-card { border-style: dashed; background: #fdfafb; }
.pcard.male { box-shadow: inset 4px 0 0 var(--brand); }
.pcard.female { box-shadow: inset 4px 0 0 var(--rose-300); }
.pcard.st-available { background: var(--green-bg); border-color: var(--green-line); }
.pcard.st-available .pstate { color: var(--green); }
.pcard.st-partial { background: #eef8f2; border-color: #a9d8bf; }
.pcard.st-partial .pstate { color: var(--green); }
.pcard.st-unavailable { background: var(--amber-bg); border-color: #efcf8a; }
.pcard.st-unavailable .pstate { color: var(--amber); }
.pcard.st-skipped { background: var(--red-bg); border-color: #f0a59c; }
.pcard.st-skipped .pstate { color: var(--red); }
.pcard.hidden-branch { opacity: .35; pointer-events: none; }
.pcard.checking::after { content: ""; position: absolute; inset: 0; border-radius: 10px; background: rgba(255, 255, 255, .6); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2.5px solid var(--tint-200); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.checking-note { display: none; gap: 8px; align-items: center; color: var(--brand); font-weight: 600; font-size: .85rem; }
.is-checking .checking-note { display: inline-flex; }
dialog.modal { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); box-shadow: 0 20px 60px rgba(42, 15, 29, .3); }
dialog.modal::backdrop { background: rgba(42, 15, 29, .45); }
.modal-head { padding: 18px 22px 0; }
.modal-head h3 { margin: 0 0 4px; }
.modal-body { padding: 12px 22px; display: flex; flex-direction: column; gap: 12px; }
.modal-foot { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.modal-body label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 4px; }
.alt-dates { display: none; background: var(--tint-50); border-radius: 12px; padding: 12px; }
.alt-dates.open { display: block; }
.ac { position: relative; }
.ac-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; margin: 4px 0 0; padding: 4px; list-style: none; display: none; }
.ac-list.open { display: block; }
.ac-list li { padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.ac-list li[aria-selected=true], .ac-list li:hover { background: var(--tint-100); }
.ac-list small { color: var(--muted); }
.evaluation { margin-top: 20px; }

/* Customer tree section: the family tree chart "vývod" and the list by generations (@treeChart.latte, initTreeChart
   in app.js); the four lines of the grandparents have a colour each (.lin-0 … .lin-3) */
.tree-intro { margin-bottom: 18px; }
.tree-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .tree-layout { grid-template-columns: minmax(0, 1fr); } }
.tree-chart { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.chart-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line-soft); }
.tree-chart [hidden] { display: none !important; }
.chart-toolbar:not(:has(> :not([hidden]))) { display: none; }
.chart-gens { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--tint-50); }
.chart-gens button { height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--nav); font: 600 .95rem var(--sans); cursor: pointer; }
.chart-gens button:hover { color: var(--ink); }
.chart-gens button[aria-pressed=true] { background: var(--brand); color: #fff; }
.chart-gens button:disabled { opacity: .4; cursor: default; }
.chart-switch, .chart-button { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--ink); font: 500 .95rem var(--sans); cursor: pointer; }
.chart-switch:hover, .chart-button:hover { background: var(--tint-50); }
.chart-switch .switch { position: relative; flex-shrink: 0; width: 34px; height: 20px; border-radius: 10px; background: var(--input); transition: background .2s; }
.chart-switch .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: left .2s; }
.chart-switch[aria-pressed=true] .switch { background: var(--brand); }
.chart-switch[aria-pressed=true] .switch::after { left: 16px; }
.chart-button svg, .chart-search svg { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chart-search { display: flex; align-items: center; gap: 8px; flex: 1 1 200px; max-width: 300px; height: 46px; margin: 0 0 0 auto; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--muted); font-weight: 400; }
.chart-search input { flex: 1; min-width: 0; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 1rem var(--sans); }
.chart-search:focus-within { border-color: var(--tint-300); box-shadow: 0 0 0 3px var(--tint-100); }
.chart-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; padding: 10px 14px; background: var(--tint-50); border-bottom: 1px solid var(--line-soft); font-weight: 600; }
.chart-status { margin: 0; padding: 12px 14px 0; color: var(--muted); }
.chart-noscript { padding: 16px; margin: 0; }
.chart-scroll { overflow-x: auto; }
.chart-canvas { position: relative; }
.chart-lines { position: absolute; left: 0; top: 0; pointer-events: none; }
.chart-edge { fill: none; stroke: #d8c3cc; stroke-width: 1.5; stroke-linejoin: round; }
.chart-edge.is-path { stroke: var(--brand); stroke-width: 2.6; stroke-linecap: round; }
.is-dimming .chart-edge:not(.is-path) { opacity: .55; }
.chart-band { position: absolute; top: 0; bottom: 0; background: #fcf8f9; }
.chart-head { position: absolute; top: 12px; display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.chart-head strong { color: var(--ink); font-size: .95rem; }
.chart-head span { color: var(--muted); font-size: .82rem; }
.chart-card { position: absolute; display: flex; flex-direction: column; justify-content: safe center; align-items: flex-start; gap: 2px; padding: 0 10px 0 11px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(42, 15, 29, .05); color: var(--ink); font-family: var(--sans); text-align: left; cursor: pointer; transition: left .35s ease, top .35s ease, opacity .25s, background .15s, border-color .15s; }
.chart-card:hover { border-color: var(--brand); }
.chart-card:focus-visible { outline: 3px solid var(--rose-300); outline-offset: 2px; }
.chart-card > span { max-width: 100%; }
.cc-name { flex-shrink: 0; font-weight: 700; line-height: 1.2; }
.cc-text { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.cc-line { flex-shrink: 0; overflow: hidden; color: var(--year); font-size: .8rem; font-weight: 600; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.cc-line.cc-muted { color: var(--muted); font-weight: 500; }
.cc-s { gap: 0; }
.cc-s .cc-name { font-size: .8rem; }
.cc-s .cc-text { display: block; text-overflow: ellipsis; white-space: nowrap; }
.cc-s .cc-line { font-size: .72rem; }
.cc-m .cc-name { font-size: .88rem; }
.cc-l .cc-name { font-size: 1.05rem; }
.cc-l .cc-line { font-size: .86rem; }
.cc-dot { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; vertical-align: -1px; }
.cc-s .cc-dot { width: 7px; height: 7px; margin-right: 4px; vertical-align: 0; }
.lin-0 { background: #9b1b48; }
.lin-1 { background: #d77a9c; }
.lin-2 { background: #6e3b7a; }
.lin-3 { background: #b596c5; }
.chart-card.is-start { background: var(--brand); border-color: var(--brand); color: #fff; }
.chart-card.is-start .cc-line { color: var(--tint-100); }
.chart-card.is-family { border-style: dashed; }
.chart-card.is-path { border: 2px solid var(--rose-500); }
.chart-card.is-selected { z-index: 2; border: 2px solid var(--brand); background: var(--tint-50); box-shadow: 0 0 0 4px rgba(155, 27, 72, .14), 0 6px 16px rgba(42, 15, 29, .14); }
.chart-card.is-start.is-selected { background: var(--brand); }
.chart-card.is-dim { opacity: .42; }
.chart-card.is-match { opacity: 1; box-shadow: 0 0 0 3px #f3b6ca; }
.chart-more { position: absolute; z-index: 3; width: 26px; height: 26px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; color: var(--brand); font: 700 1.05rem/1 var(--sans); cursor: pointer; }
.chart-more:hover { border-color: var(--brand); background: var(--tint-50); }
.chart-legend { position: absolute; display: flex; flex-direction: column; gap: 6px; font-size: .82rem; }
.chart-legend strong { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.chart-legend ul { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.chart-legend li { display: flex; align-items: center; gap: 7px; overflow: hidden; color: var(--ink); white-space: nowrap; }
/* the list by generations: the surname line (Nositelé příjmení) and every tree on a phone */
.chart-canvas.is-list { padding: 16px 14px 4px; }
.gen-list { position: relative; margin: 0; padding: 0; list-style: none; }
.gen-list::before { content: ""; position: absolute; left: 16px; top: 18px; bottom: 34px; width: 2px; background: var(--tint-200); }
.gen-row { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 12px; padding-bottom: 18px; }
.gen-num { position: relative; display: grid; place-items: center; width: 34px; height: 34px; box-sizing: border-box; border: 2px solid var(--brand); border-radius: 50%; background: #fff; color: var(--brand); font-size: .78rem; font-weight: 700; }
.gen-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gen-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; }
.gen-title { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.gen-chip { display: inline-flex; flex-shrink: 0; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border: 1px solid var(--tint-200); border-radius: 18px; background: #fff; color: var(--brand); font: 600 .88rem var(--sans); cursor: pointer; }
.gen-chip::after { content: "›"; font-size: 1.1rem; line-height: 1; transition: transform .2s; }
.gen-chip[aria-expanded=true] { border-color: var(--brand); background: var(--tint-100); }
.gen-chip[aria-expanded=true]::after { transform: rotate(90deg); }
.gen-couple { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line-soft); }
.gen-couple > .gen-person:last-child:nth-child(odd of .gen-person) { grid-column: 1 / -1; }
.gen-caption { grid-column: 1 / -1; margin: 0; padding: 8px 14px; background: #fff; color: var(--muted); font-size: .85rem; }
.gen-person { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: 58px; padding: 9px 14px; border: 0; background: #fff; color: var(--ink); font-family: var(--sans); text-align: left; cursor: pointer; }
.gen-person:hover { background: var(--tint-50); }
.gen-person:focus-visible { outline: 3px solid var(--rose-300); outline-offset: -3px; }
.gen-person.is-selected { background: var(--tint-50); box-shadow: inset 0 0 0 2px var(--brand); }
.gen-person.is-match { box-shadow: inset 0 0 0 2px #f3b6ca; }
.gp-name { font-size: 1rem; font-weight: 700; line-height: 1.25; }
.gp-sub { color: var(--year); font-size: .87rem; line-height: 1.35; }
/* person panel beside the chart; on a phone a sheet sliding up from the bottom */
.person-panel { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
@media (max-width: 980px) { .person-panel { position: static; max-height: none; } }
.panel-close { display: none; }
@media (max-width: 720px) {
	.tree-layout .person-panel { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 72vh; padding: 14px 20px 24px; border-width: 1px 0 0; border-radius: 18px 18px 0 0; box-shadow: 0 -12px 32px rgba(42, 15, 29, .2); transform: translateY(105%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
	.tree-layout .person-panel.is-open { transform: none; visibility: visible; transition: transform .25s ease; }
	.panel-close { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: center; float: right; width: 44px; height: 44px; margin: 0 -8px 0 8px; border: 0; border-radius: 50%; background: var(--tint-50); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }
}
.person-detail .eyebrow { margin: 0 0 4px; }
.person-detail h2 { margin-bottom: 4px; font-size: 1.45rem; }
.person-life { margin: 0 0 14px; color: var(--year); font-weight: 600; }
.person-detail dl.facts { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.kinship { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.panel-label { margin: 0 0 8px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.kin-chain { position: relative; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.kin-chain::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: var(--tint-200); }
.kin-chain li { position: relative; padding-left: 26px; }
.kin-chain li::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; box-sizing: border-box; border: 2px solid var(--brand); border-radius: 50%; background: #fff; }
.kin-chain li.current::before { background: var(--brand); }
.kin-chain li.current a { font-weight: 700; }
.kin-chain span { color: var(--muted); font-size: .9rem; }
.record { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.record img { border-radius: 8px; border: 1px solid var(--line); display: block; margin: 8px 0; }
.record .transcription { background: var(--tint-50); border-radius: 8px; padding: 8px 10px; font-size: .88rem; white-space: pre-wrap; }
.attachments { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.attachments figure { margin: 0; font-size: .8rem; }
.attachments img { width: 100%; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.template-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.template-choice label { border: 2px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; display: block; }
.template-choice input { margin-right: 6px; }
.template-choice label:has(input:checked) { border-color: var(--brand); background: var(--tint-50); }
.image-preview { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 12px; overflow: auto; }
.image-preview svg { width: 100%; height: auto; display: block; }
.print-thumb { display: block; width: 260px; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 8px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--tint-100); }
.timeline li { padding: 0 0 14px 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--tint-300); }
.timeline li.done::before { background: var(--brand); border-color: var(--brand); }
.timeline li.current::before { border-color: var(--brand); }
/* "Rodokmen na míru": the offer of the genealogist and the conversation (Order:summary, Admin:Tree:detail); the messages of
   whoever reads the page (.message-mine) sit on the right */
.status-negotiation { background: var(--amber-bg); color: var(--amber); }
.offer-card { border-color: var(--tint-300); }
.offer-card h2 { margin-top: 4px; }
.offer-scope { font-size: 1.05rem; }
.offer-facts { margin: 0 0 18px; }
.offer-price { font-weight: 700; color: var(--brand); font-size: 1.15rem; }
.messages { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.message { max-width: min(560px, 88%); padding: 12px 16px; border-radius: 14px 14px 14px 4px; background: var(--tint-50); border: 1px solid var(--tint-200); }
.message-mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: #fff; border-color: var(--tint-300); }
.message-meta { margin: 0 0 4px; font-size: .82rem; color: var(--muted); }
.message-meta strong { color: var(--ink); }
.message-event { margin: 0 0 4px; font-weight: 600; color: var(--brand-deep); }
.message-body { overflow-wrap: anywhere; }

/* Sharing with the family (Tree:share, Front:Share) */
.share-card { max-width: 780px; }
.share-card h3 { margin-top: 24px; }
.share-url { display: flex; gap: 10px; margin-bottom: 12px; }
.share-url input { flex: 1; min-width: 0; font: .9rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--tint-50); }
.share-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.share-about { margin: 20px 0 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 560px) { .share-url { flex-direction: column; } }

/* Admin */
.admin-body { background: #faf6f8; }
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-nav { background: var(--ink); color: #e6d6dd; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-nav img { height: 26px; width: auto; margin: 0 6px 22px; }
.admin-nav a { display: flex; justify-content: space-between; color: #e6d6dd; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .93rem; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-nav .count { background: var(--rose-500); color: #fff; border-radius: 999px; padding: 0 8px; font-size: .75rem; font-weight: 700; }
.admin-nav hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .12); margin: 14px 0; }
.admin-main { padding: 28px 32px; min-width: 0; }
@media (max-width: 860px) { .admin-shell { grid-template-columns: 1fr; } .admin-nav { position: static; height: auto; } .admin-main { padding: 20px 14px; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: inherit; }
.stat strong { display: block; font: 700 1.8rem/1.1 var(--sans); letter-spacing: -.02em; color: var(--brand-deep); }
.stat span { color: var(--muted); font-size: .88rem; }
.review-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
/* minmax(0, …): a wide table scrolls in its .table-wrap instead of widening the card past a phone screen */
@media (max-width: 1100px) { .review-grid { grid-template-columns: minmax(0, 1fr); } }
/* Tree questions (Tree:questions): what can be asked, with pictograms, and the steps shown while the list is empty */
.ask-topics { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ask-topics li, .ask-steps li { display: flex; gap: 14px; align-items: flex-start; color: var(--text); }
.ask-topics strong { display: block; color: var(--ink); }
.ask-icon { flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--tint-100); display: grid; place-items: center; }
.ask-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ask-empty { padding: 20px 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.ask-steps { counter-reset: ask-step; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.ask-steps li { counter-increment: ask-step; }
.ask-steps li::before { content: counter(ask-step); flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: .95rem; display: grid; place-items: center; }
.ask-steps strong { color: var(--ink); }
.ask-note { margin: 16px 0 0; }
.record .answer-label { margin: 0 0 4px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.prompt-log { display: flex; flex-direction: column; gap: 12px; }
.prompt-log .q { background: var(--tint-50); border-radius: 10px; padding: 10px 12px; }
.prompt-log .a { border-left: 3px solid var(--tint-300); padding: 4px 12px; white-space: pre-wrap; font-size: .92rem; }
pre.log { background: #1f1218; color: #f1dfe7; padding: 14px; border-radius: 10px; overflow: auto; max-height: 420px; font-size: .8rem; }
.pdf-frame { width: 100%; height: 780px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.voucher-print { max-width: 720px; margin: 40px auto; border: 2px solid var(--tint-300); border-radius: 20px; padding: 40px; text-align: center; background: linear-gradient(180deg, #fff, var(--tint-50)); }
.voucher-code { font: 700 2rem/1.2 ui-monospace, Menlo, monospace; letter-spacing: .1em; color: var(--brand-deep); background: #fff; display: inline-block; padding: 10px 20px; border-radius: 10px; border: 1px dashed var(--tint-300); }
@page tree { size: A4 landscape; margin: 10mm; }
@media print {
	.site-header, .site-footer, .no-print, .flashes { display: none !important; }
	body { background: #fff; }
	/* the tree chart (Tree:default, Share:default) prints alone on a landscape page */
	main:has(.tree-chart) { page: tree; }
	.tabs, .page-header .actions-row, .page-header .pill, .tree-layout .person-panel, .chart-more, .share-about { display: none !important; }
	.tree-layout { display: block; }
	.tree-chart { border: 0; overflow: visible; }
	.chart-scroll { overflow: visible; }
	.chart-card { box-shadow: none !important; transition: none; }
	.chart-card.is-dim { opacity: 1; }
	.chart-band, .chart-card.is-start, .cc-dot, .gen-num { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
