:root{--paper: #f6f4ec;--card: #fffdf7;--card-2: #f1eee2;--ink: #22322c;--ink-2: #5a6b63;--ink-3: #8a968f;--line: #ddd8c6;--line-strong: #c8c2ab;--emerald: #0d6a4c;--emerald-soft: #e3efe7;--gold: #a8842c;--gold-bright: #c9a227;--gold-soft: #f4ecd7;--danger: #a03d2e;--c-desc: #0d8a57;--c-spouse: #3e6fb4;--c-asc: #a8842c;--c-sib: #6c4fa8;--c-ext: #9a3f63;--c-bm: #7a7668;--font-display: "Cormorant Garamond", "Times New Roman", serif;--font-body: "Plus Jakarta Sans", system-ui, sans-serif;--font-mono: "IBM Plex Mono", ui-monospace, monospace;--radius: 10px;--shadow: 0 1px 2px rgb(34 50 44 / .06), 0 6px 24px -12px rgb(34 50 44 / .18)}@media(prefers-color-scheme:dark){:root{--paper: #14201c;--card: #1b2a25;--card-2: #22332d;--ink: #e8e4d8;--ink-2: #a4b2aa;--ink-3: #74847c;--line: #2e3e37;--line-strong: #3d5048;--emerald: #4fae8c;--emerald-soft: #1e3a31;--gold: #c9a24a;--gold-bright: #d8b558;--gold-soft: #33301f;--danger: #d07a63;--c-desc: #2e9573;--c-spouse: #5588c7;--c-asc: #ad852f;--c-sib: #8468c0;--c-ext: #b05580;--c-bm: #8a8676;--shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 28px -12px rgb(0 0 0 / .5)}}:root[data-theme=dark]{--paper: #14201c;--card: #1b2a25;--card-2: #22332d;--ink: #e8e4d8;--ink-2: #a4b2aa;--ink-3: #74847c;--line: #2e3e37;--line-strong: #3d5048;--emerald: #4fae8c;--emerald-soft: #1e3a31;--gold: #c9a24a;--gold-bright: #d8b558;--gold-soft: #33301f;--danger: #d07a63;--c-desc: #2e9573;--c-spouse: #5588c7;--c-asc: #ad852f;--c-sib: #8468c0;--c-ext: #b05580;--c-bm: #8a8676;--shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 28px -12px rgb(0 0 0 / .5)}:root[data-theme=light]{--paper: #f6f4ec;--card: #fffdf7;--card-2: #f1eee2;--ink: #22322c;--ink-2: #5a6b63;--ink-3: #8a968f;--line: #ddd8c6;--line-strong: #c8c2ab;--emerald: #0d6a4c;--emerald-soft: #e3efe7;--gold: #a8842c;--gold-bright: #c9a227;--gold-soft: #f4ecd7;--danger: #a03d2e;--c-desc: #0d8a57;--c-spouse: #3e6fb4;--c-asc: #a8842c;--c-sib: #6c4fa8;--c-ext: #9a3f63;--c-bm: #7a7668;--shadow: 0 1px 2px rgb(34 50 44 / .06), 0 6px 24px -12px rgb(34 50 44 / .18)}*{box-sizing:border-box}.corner-controls{position:fixed;top:14px;right:16px;z-index:50;display:inline-flex;align-items:center;gap:8px}.theme-toggle{width:36px;height:36px;border-radius:50%;border:1px solid var(--line-strong);background:var(--card);color:var(--ink);font-size:16px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-shadow:var(--shadow)}.lang-toggle{display:inline-flex;border:1px solid var(--line-strong);border-radius:8px;background:var(--card);box-shadow:var(--shadow);overflow:hidden}.lang-toggle button{border:none;background:transparent;color:var(--ink);font-size:12px;font-weight:600;padding:8px 10px;cursor:pointer;line-height:1}.lang-toggle button+button{border-left:1px solid var(--line-strong)}.lang-toggle button:hover{color:var(--emerald)}.lang-toggle button.active{background:var(--emerald-soft);color:var(--emerald)}.theme-toggle:hover{border-color:var(--emerald);color:var(--emerald)}html,body,#root{margin:0;min-height:100%}body{background-color:var(--paper);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23a8842c' stroke-opacity='0.07'%3E%3Cpath d='M48 18 L56 40 L78 48 L56 56 L48 78 L40 56 L18 48 L40 40 Z'/%3E%3Crect x='34' y='34' width='28' height='28' transform='rotate(45 48 48)'/%3E%3C/g%3E%3C/svg%3E");color:var(--ink);font-family:var(--font-body);font-size:15px;line-height:1.5}.app{max-width:1440px;margin:0 auto;padding:20px clamp(14px,3vw,36px) 60px}.masthead{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;padding:8px 0 14px;border-bottom:3px double var(--line-strong)}.masthead h1{font-family:var(--font-display);font-weight:700;font-size:clamp(30px,4vw,44px);letter-spacing:.01em;margin:0}.masthead h1 .star{color:var(--gold-bright);font-size:.7em;vertical-align:.2em}.masthead .sub{color:var(--ink-2);font-size:14px;max-width:80ch}.controls{display:flex;flex-wrap:wrap;align-items:flex-end;gap:14px 22px;padding:16px 0}.field{display:flex;flex-direction:column;gap:4px}.field>label{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-2)}.field input[type=text],.field input[type=number],.field select{font-family:var(--font-body);font-size:15px;line-height:1.4;color:var(--ink);background:var(--card);border:1px solid var(--line-strong);border-radius:8px;padding:8px 10px;min-width:130px;height:38px}.field select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235a6b63' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;padding-right:28px}.field input.estate{font-family:var(--font-mono);font-weight:600;font-size:16px;width:190px}.field input:focus-visible,.field select:focus-visible,button:focus-visible,.tip-trigger:focus-visible{outline:2px solid var(--emerald);outline-offset:2px}.toggle{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:var(--ink);background:var(--card);border:1px solid var(--line-strong);border-radius:8px;padding:8px 12px;cursor:pointer}.toggle input{accent-color:var(--emerald);width:16px;height:16px}.workbench{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(340px,1fr);gap:20px;align-items:start}@media(max-width:980px){.workbench{grid-template-columns:1fr}}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.card>header{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:14px 18px 10px;border-bottom:1px solid var(--line)}.card>header h2{font-family:var(--font-display);font-size:22px;font-weight:600;margin:0}.card>header .hint{font-size:12px;color:var(--ink-3)}.header-actions{display:flex;align-items:baseline;gap:10px}.btn-fullscreen{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:1px solid var(--line);border-radius:6px;background:var(--card);color:var(--ink-2);font-size:14px;line-height:1;cursor:pointer}.btn-fullscreen:hover{background:var(--line)}.tree-wrap{position:relative}.tree-wrap:fullscreen{background:var(--card);padding:18px;display:flex;flex-direction:column}.tree-wrap:fullscreen .tree-svg{flex:1;height:auto}.tree-svg{display:block;width:100%;height:clamp(420px,58vh,640px);cursor:grab;touch-action:none}.tree-svg:active{cursor:grabbing}.tree-svg .link{fill:none;stroke:var(--line-strong);stroke-width:1.2}.tree-svg .link.marriage{stroke:var(--gold);stroke-width:2;stroke-dasharray:1 4;stroke-linecap:round}.tree-svg .node{cursor:pointer}.tree-svg .node .halo{fill:none;stroke:var(--gold-bright);stroke-width:2;opacity:0}.tree-svg .node:hover .halo,.tree-svg .node:focus-visible .halo{opacity:1}.tree-svg .node:focus{outline:none}.tree-svg .node .body{fill:var(--card-2);stroke:var(--line-strong);stroke-width:1.4}.tree-svg .node.inherits .body{fill:var(--emerald-soft);stroke:var(--emerald)}.tree-svg .node.blocked .body{fill:var(--card-2);stroke:var(--ink-3);stroke-dasharray:4 3}.tree-svg .node.ghost .body{fill:transparent;stroke:var(--line-strong);stroke-dasharray:3 4}.tree-svg .node.deceased .body{fill:var(--gold-soft);stroke:var(--gold);stroke-width:2}.tree-svg .glyph{font-size:15px;text-anchor:middle;dominant-baseline:central;fill:var(--ink-2);pointer-events:none}.tree-svg .node.ghost .glyph{fill:var(--ink-3)}.tree-svg .name{font-family:var(--font-body);font-size:11px;font-weight:600;text-anchor:middle;fill:var(--ink);pointer-events:none}.tree-svg .node.ghost .name{fill:var(--ink-3);font-weight:500}.tree-svg .pct{font-family:var(--font-mono);font-size:10.5px;font-weight:600;text-anchor:middle;fill:var(--emerald);pointer-events:none}.tree-svg .node.blocked .pct{fill:var(--ink-3)}.tree-svg .count-badge circle{fill:var(--emerald);stroke:var(--card);stroke-width:1.5}.tree-svg .count-badge text{font-family:var(--font-mono);font-size:10px;font-weight:600;fill:#fff;text-anchor:middle;dominant-baseline:central}.tree-svg .stepper circle{fill:var(--card);stroke:var(--line-strong)}.tree-svg .stepper:hover circle{stroke:var(--emerald);fill:var(--emerald-soft)}.tree-svg .stepper text{font-size:13px;font-weight:700;fill:var(--ink-2);text-anchor:middle;dominant-baseline:middle;pointer-events:none}.tree-legend{display:flex;flex-wrap:wrap;gap:6px 16px;padding:10px 18px 14px;border-top:1px solid var(--line);font-size:12px;color:var(--ink-2)}.tree-legend .swatch{display:inline-block;width:11px;height:11px;border-radius:50%;margin-right:6px;vertical-align:-1px;border:1.5px solid var(--line-strong)}.tree-legend .swatch.inherits{background:var(--emerald-soft);border-color:var(--emerald)}.tree-legend .swatch.blocked{border-style:dashed;border-color:var(--ink-3)}.tree-legend .swatch.ghost{border-style:dotted}.tree-legend .swatch.deceased{background:var(--gold-soft);border-color:var(--gold)}.float-tip{position:fixed;z-index:40;max-width:300px;background:var(--ink);color:var(--paper);font-size:12.5px;line-height:1.45;border-radius:8px;padding:9px 11px;pointer-events:none;box-shadow:var(--shadow)}.float-tip .tip-head{font-weight:700;margin-bottom:2px}.float-tip .tip-figures{font-family:var(--font-mono);font-size:12px;color:var(--gold-bright);margin-top:4px}.heir-groups{padding:8px 12px 14px;columns:260px 2;column-gap:20px}.heir-group{break-inside:avoid}.heir-group>h3{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.09em;color:var(--gold);margin:12px 6px 4px}.heir-row{display:flex;align-items:center;gap:10px;padding:5px 6px;border-radius:8px}.heir-row:hover{background:var(--card-2)}.heir-row .who{flex:1;min-width:0}.heir-row .who .en{font-weight:600;font-size:13.5px}.heir-row .who .bm{display:block;font-size:11.5px;color:var(--ink-3)}.heir-row .state-dot{width:10px;height:10px;border-radius:50%;flex:none;background:transparent;border:1.5px solid transparent}.heir-row .state-dot.inherits{background:var(--emerald);border-color:var(--emerald)}.heir-row .state-dot.blocked{border-color:var(--ink-3);border-style:dashed}.stepper-ctl{display:inline-flex;align-items:center;gap:2px}.stepper-ctl button{width:26px;height:26px;border-radius:7px;border:1px solid var(--line-strong);background:var(--card);color:var(--ink);font-size:15px;font-weight:700;line-height:1;cursor:pointer}.stepper-ctl button:hover:not(:disabled){border-color:var(--emerald);color:var(--emerald)}.stepper-ctl button:disabled{opacity:.35;cursor:default}.stepper-ctl .n{font-family:var(--font-mono);font-weight:600;min-width:26px;text-align:center}.results{margin-top:20px}.badges{display:flex;gap:8px;flex-wrap:wrap}.badge{font-size:11px;font-weight:700;letter-spacing:.04em;padding:3px 9px;border-radius:99px;border:1px solid var(--gold);color:var(--gold);background:var(--gold-soft)}.badge.quiet{border-color:var(--line-strong);color:var(--ink-2);background:var(--card-2)}.share-bar{display:flex;height:34px;border-radius:8px;overflow:hidden;margin:16px 18px 6px;background:var(--card-2)}.share-bar .seg{position:relative;min-width:3px;margin-right:2px;display:flex;align-items:center;justify-content:center;overflow:hidden}.share-bar .seg:last-child{margin-right:0}.share-bar .seg span{color:#fff;font-family:var(--font-mono);font-size:11px;font-weight:600;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / .35)}.bar-legend{display:flex;flex-wrap:wrap;gap:4px 14px;padding:0 18px 6px;font-size:11.5px;color:var(--ink-2)}.bar-legend .key{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}.results-table-wrap{overflow-x:auto;padding:6px 10px 14px}table.results-table{width:100%;border-collapse:collapse;font-size:13.5px}.results-table th{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--ink-2);text-align:left;padding:8px 8px 6px;border-bottom:1.5px solid var(--line-strong);white-space:nowrap}.results-table td{padding:8px;border-bottom:1px solid var(--line);vertical-align:top}.results-table td.num,.results-table th.num{text-align:right;font-family:var(--font-mono);font-weight:500;white-space:nowrap}.results-table .heir-name{font-weight:600}.results-table .heir-name .bm{display:block;font-size:11.5px;font-weight:400;color:var(--ink-3)}.results-table tr.is-zero td{color:var(--ink-3)}.results-table .frac{font-family:var(--font-mono);font-weight:600;color:var(--emerald)}.results-table tr.is-zero .frac{color:var(--ink-3)}.results-table .status-word{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase}.results-table tfoot td{font-weight:700;border-top:2px solid var(--line-strong);border-bottom:none}.tip{position:relative;display:inline-flex}.tip-trigger{width:20px;height:20px;border-radius:50%;border:1px solid var(--line-strong);background:var(--card-2);color:var(--ink-2);font-size:11px;font-weight:700;line-height:1;cursor:help;display:inline-flex;align-items:center;justify-content:center}.tip-bubble{position:absolute;bottom:calc(100% + 8px);right:-8px;width:max-content;max-width:min(320px,74vw);background:var(--ink);color:var(--paper);font-size:12.5px;font-weight:400;line-height:1.45;text-transform:none;letter-spacing:normal;border-radius:8px;padding:9px 11px;box-shadow:var(--shadow);opacity:0;visibility:hidden;transition:opacity .15s ease;z-index:30;text-align:left;white-space:normal}.tip:hover .tip-bubble,.tip:focus-within .tip-bubble{opacity:1;visibility:visible}.footnote{margin-top:26px;font-size:12.5px;color:var(--ink-3)}.footnote a{color:var(--ink-2)}.export-row{display:flex;justify-content:center;margin-top:28px}.btn-export{font-family:var(--font-body);font-size:14px;font-weight:700;letter-spacing:.02em;color:#fff;background:var(--emerald);border:none;border-radius:999px;padding:12px 28px;cursor:pointer;box-shadow:var(--shadow)}.btn-export:hover:not(:disabled){background:var(--gold)}.btn-export:disabled{opacity:.6;cursor:wait}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;display:flex;align-items:center;justify-content:center;background:#14201c73;padding:20px}.modal-card{width:100%;max-width:380px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px 24px 20px}.modal-card h2{font-family:var(--font-display);font-size:22px;font-weight:600;margin:0 0 6px}.modal-hint{font-size:12.5px;color:var(--ink-2);margin:0 0 14px}.modal-card input[type=text]{width:100%;font-family:var(--font-body);font-size:15px;line-height:1.4;color:var(--ink);background:var(--paper);border:1px solid var(--line-strong);border-radius:8px;padding:8px 10px;height:38px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.btn-ghost{font-family:var(--font-body);font-size:14px;font-weight:600;color:var(--ink-2);background:transparent;border:1px solid var(--line-strong);border-radius:999px;padding:11px 20px;cursor:pointer}.btn-ghost:hover{border-color:var(--ink-2);color:var(--ink)}@media(prefers-reduced-motion:no-preference){.card{animation:rise .45s cubic-bezier(.22,1,.36,1) both}.card:nth-child(2){animation-delay:.06s}@keyframes rise{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.share-bar .seg{transition:flex-basis .4s cubic-bezier(.22,1,.36,1)}}.kufi{font-family:Reem Kufi,sans-serif;font-optical-sizing:auto;font-weight:400;font-style:normal}
