:root {
    --bg: #f6efe4;
    --panel: rgba(255, 252, 247, 0.9);
    --line: #d2c3ac;
    --ink: #1f1d1a;
    --muted: #6f6558;
    --accent: #0b6e4f;
    --accent-2: #d17b49;
    --accent-3: #264653;
    --danger: #9f2a2a;
    --shadow: 0 16px 50px rgba(38, 32, 24, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    direction: rtl;
    text-align: right;
    font-family: "Cairo", "Tahoma", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(209, 123, 73, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(11, 110, 79, 0.14), transparent 26%),
        linear-gradient(180deg, #fffaf2, var(--bg));
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
    position: relative;
    overflow: visible;
}

.hero-bar,
.panel,
.auth-card,
.flash,
.detail-card,
.search-results,
.person-node,
.close-chip {
    backdrop-filter: blur(14px);
}

.hero-bar,
.panel,
.auth-card {
    background: var(--panel);
    border: 1px solid rgba(210, 195, 172, 0.7);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-bar {
    display: grid;
    gap: 18px;
    padding: 28px;
    margin-bottom: 20px;
    position: relative;
    z-index: 300;
    overflow: visible;
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--accent-2);
}

.hero-bar h1 {
    margin: 0 0 10px;
    max-width: 700px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
}

.hero-copy {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
}

.hero-brand-block {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.site-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.site-brand-logo {
    width: 82px;
    height: 46px;
    flex: 0 0 auto;
    object-fit: contain;
}

.site-brand-copy strong,
.site-brand-copy small {
    display: block;
}

.site-brand-copy strong {
    font-size: 1.4rem;
    color: #172127;
}

.site-brand-copy small {
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-bar-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: nowrap;
    width: 100%;
    overflow-y: visible;
    overflow-x: visible;
}

.hero-family-stat {
    flex: 0 0 auto;
    min-width: 148px;
    max-width: 240px;
    display: inline-grid;
    gap: 4px;
    justify-items: center;
    padding: 10px 14px;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(38, 70, 83, 0.96), rgba(11, 110, 79, 0.92));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 30px rgba(38, 32, 24, 0.14);
}

.hero-family-stat-title {
    max-width: 100%;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
}

.hero-family-stat-value {
    font-size: 1.28rem;
    font-weight: 800;
    line-height: 1;
}

.hero-family-stat-label {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.04em;
}

.mobile-nav-toggle,
.mobile-nav-backdrop,
.mobile-nav-drawer {
    display: none;
}

.mobile-nav-toggle {
    width: 52px;
    height: 52px;
    padding: 0;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(210, 195, 172, 0.8);
}

.mobile-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent-3);
}

.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 850;
    background: rgba(31, 29, 26, 0.44);
    backdrop-filter: blur(2px);
}

.mobile-nav-backdrop[hidden] {
    display: none !important;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(84vw, 360px);
    z-index: 900;
    padding: 18px;
    background: rgba(255, 252, 247, 0.98);
    border-left: 1px solid rgba(210, 195, 172, 0.8);
    box-shadow: -16px 0 40px rgba(38, 32, 24, 0.16);
    transform: translateX(100%);
    transition: transform 180ms ease;
    overflow-y: auto;
}

.mobile-nav-drawer[aria-hidden="true"] {
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
}

.mobile-nav-drawer[aria-hidden="false"] {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.mobile-nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.mobile-nav-close {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 999px;
    background: rgba(38, 70, 83, 0.1);
    color: var(--accent-3);
    font-size: 1.4rem;
}

.mobile-nav-drawer-body {
    display: grid;
    gap: 10px;
}

.mobile-nav-drawer-body .top-nav,
.mobile-nav-drawer-body .nav-dropdown-menu {
    width: 100%;
}

.mobile-nav-drawer-body .nav-dropdown {
    width: 100%;
}

.mobile-nav-drawer-body .nav-dropdown-menu {
    position: static;
    min-width: 0;
    max-width: none;
    margin-top: 8px;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    display: none;
    box-shadow: none;
    background: rgba(246, 239, 228, 0.75);
}

.mobile-nav-drawer-body .nav-dropdown.is-open .nav-dropdown-menu,
.mobile-nav-drawer-body .nav-dropdown:hover .nav-dropdown-menu,
.mobile-nav-drawer-body .nav-dropdown:focus-within .nav-dropdown-menu {
    display: grid;
}

body.mobile-nav-open {
    overflow: hidden;
}

.top-nav a,
.nav-user,
.nav-dropdown-trigger {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(210, 195, 172, 0.8);
    white-space: nowrap;
    font-size: 0.84rem;
    line-height: 1.2;
}

.nav-dropdown {
    position: relative;
    flex: 0 0 auto;
}

.nav-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: 10px;
}

.nav-dropdown-trigger {
    cursor: pointer;
    user-select: none;
    font: inherit;
    color: inherit;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    min-width: 180px;
    max-width: min(240px, calc(100vw - 40px));
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(210, 195, 172, 0.8);
    box-shadow: 0 18px 40px rgba(32, 28, 23, 0.12);
    display: grid;
    gap: 8px;
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    pointer-events: none;
}

.nav-dropdown-user .nav-dropdown-menu {
    left: 0;
    right: auto;
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(248, 246, 240, 0.95);
    border: 1px solid rgba(210, 195, 172, 0.5);
    font-size: 0.85rem;
}

.nav-dropdown-menu form {
    margin: 0;
}

.nav-dropdown-action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(248, 246, 240, 0.95);
    border: 1px solid rgba(210, 195, 172, 0.5);
    font: inherit;
    font-size: 0.85rem;
    color: inherit;
    cursor: pointer;
    text-align: right;
}

.nav-dropdown-label {
    padding: 4px 6px 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

main {
    position: relative;
    z-index: 1;
}

.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown:focus-within .nav-dropdown-trigger,
.nav-dropdown.is-open .nav-dropdown-trigger {
    background: rgba(255, 255, 255, 0.9);
}

.nav-inbox-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
}

.nav-trigger-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 3px rgba(209, 123, 73, 0.18);
    flex: 0 0 auto;
}

.nav-cta {
    background: var(--accent);
    color: white;
}

.statistics-filter-form {
    margin-bottom: 20px;
}

.statistics-filter-grid,
.statistics-summary-grid,
.statistics-detail-grid {
    display: grid;
    gap: 14px;
}

.statistics-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 14px;
}

.statistics-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin-bottom: 18px;
}

.statistics-detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-bottom: 18px;
}

.statistics-subpanel {
    padding: 18px;
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.flash {
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
}

.flash-success {
    border-color: rgba(11, 110, 79, 0.35);
}

.flash-error {
    border-color: rgba(159, 42, 42, 0.35);
}

.flash.is-dismissing {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 220ms ease, transform 220ms ease;
}

.workspace-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
}

.landing-shell {
    display: grid;
    gap: 22px;
    padding-bottom: 18px;
}

.site-rating-banner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 18px;
    padding: 20px 22px;
    margin-bottom: 20px;
    background:
        radial-gradient(circle at top left, rgba(11, 110, 79, 0.12), transparent 30%),
        linear-gradient(145deg, rgba(255, 252, 247, 0.96), rgba(249, 243, 232, 0.95));
    border: 1px solid rgba(210, 195, 172, 0.78);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.site-rating-summary-block,
.site-rating-form {
    display: grid;
    gap: 12px;
    justify-items: start;
    text-align: right;
}

.site-rating-kicker {
    margin: 0;
    color: var(--accent-2);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.site-rating-summary-block h2,
.site-rating-copy {
    margin: 0;
}

.site-rating-copy,
.site-rating-form-head span,
.site-rating-form-meta,
.site-rating-score span,
.site-rating-count span {
    color: var(--muted);
}

.site-rating-metrics {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.site-rating-score,
.site-rating-count {
    min-width: 160px;
    padding: 14px 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(210, 195, 172, 0.72);
}

.site-rating-score strong,
.site-rating-count strong {
    display: block;
    font-size: 1.6rem;
    line-height: 1;
    margin-top: 10px;
}

.site-rating-visual {
    position: relative;
    display: inline-block;
    font-size: 1.35rem;
    line-height: 1;
    letter-spacing: 0.14em;
}

.site-rating-stars {
    display: block;
}

.site-rating-stars-base {
    color: rgba(111, 101, 88, 0.22);
}

.site-rating-stars-fill {
    position: absolute;
    inset: 0 auto 0 0;
    overflow: hidden;
    width: var(--rating-percent, 0%);
    color: #d17b49;
    white-space: nowrap;
}

.site-rating-form {
    padding: 16px 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(210, 195, 172, 0.72);
    justify-items: stretch;
}

.site-rating-form-head strong {
    display: block;
    font-size: 1.05rem;
}

.site-rating-star-picker {
    direction: ltr;
    display: flex;
    flex-direction: row-reverse;
    width: 100%;
    justify-content: flex-end;
    justify-self: stretch;
    align-self: start;
    gap: 4px;
}

.site-rating-star-button {
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    color: rgba(111, 101, 88, 0.26);
    transition: transform 120ms ease, color 120ms ease;
}

.site-rating-star-button.is-active,
.site-rating-star-button:hover,
.site-rating-star-button:focus-visible {
    color: #d17b49;
}

.site-rating-star-button:hover,
.site-rating-star-button:focus-visible {
    transform: translateY(-1px) scale(1.03);
    outline: none;
}

.site-rating-form textarea {
    width: 100%;
    min-height: 88px;
    resize: vertical;
    text-align: right;
}

.landing-topbar,
.landing-hero-panel,
.landing-feature-card,
.landing-story-card,
.landing-launch-card {
    background: rgba(255, 252, 247, 0.82);
    border: 1px solid rgba(210, 195, 172, 0.72);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.landing-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.landing-brand strong,
.landing-brand small {
    display: block;
}

.landing-brand small {
    color: var(--muted);
}

.brand-logo-image {
    display: block;
    flex: 0 0 auto;
}

.landing-brand-logo {
    width: 78px;
    height: 44px;
    object-fit: contain;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.landing-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(210, 195, 172, 0.8);
}

.landing-nav-cta {
    background: var(--accent) !important;
    color: white;
    border-color: rgba(11, 110, 79, 0.8) !important;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    gap: 20px;
    align-items: stretch;
}

.landing-hero-copy {
    padding: 18px 6px 8px;
}

.landing-kicker,
.landing-section-head p,
.landing-story-card p {
    margin: 0 0 10px;
    color: var(--accent-2);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.landing-hero-copy h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.landing-subcopy {
    margin: 16px 0 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.9;
}

.landing-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.landing-primary-action,
.landing-secondary-action,
.landing-login-button {
    min-width: 200px;
    justify-content: center;
}

.landing-proof-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.landing-proof-strip div {
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(210, 195, 172, 0.62);
}

.landing-proof-strip strong,
.landing-metrics strong,
.landing-feature-card strong,
.landing-story-card h2,
.landing-panel-head strong {
    display: block;
}

.landing-proof-strip span,
.landing-feature-card p,
.landing-story-card span,
.landing-login-card small {
    color: var(--muted);
}

.landing-hero-panel {
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(11, 110, 79, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 244, 234, 0.92));
}

.landing-panel-head {
    display: grid;
    gap: 4px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(210, 195, 172, 0.6);
}

.landing-panel-head span {
    color: var(--muted);
    font-size: 0.9rem;
}

.landing-panel-flow {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.landing-flow-step {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    align-items: start;
    padding: 14px 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(210, 195, 172, 0.64);
}

.landing-flow-step span {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 29, 26, 0.08);
    font-weight: 800;
}

.landing-flow-step small {
    color: var(--muted);
    line-height: 1.8;
}

.landing-flow-step.is-highlight {
    background: linear-gradient(135deg, rgba(11, 110, 79, 0.12), rgba(255, 255, 255, 0.82));
}

.landing-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.landing-metrics article {
    padding: 14px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(210, 195, 172, 0.62);
    text-align: center;
}

.landing-metrics span {
    color: var(--muted);
    font-size: 0.88rem;
}

.landing-section {
    display: grid;
    gap: 18px;
}

.landing-section-head {
    display: grid;
    gap: 8px;
    max-width: 760px;
}

.landing-section-head h2,
.landing-story-card h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    line-height: 1.15;
}

.landing-section-head span {
    color: var(--muted);
    line-height: 1.85;
}

.landing-section-head.is-tight h2 {
    font-size: 1.8rem;
}

.landing-feature-grid,
.landing-launch-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.landing-feature-card,
.landing-launch-card,
.landing-story-card {
    padding: 24px;
}

.landing-feature-card p {
    margin: 12px 0 0;
    line-height: 1.9;
}

.landing-section-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-story-card {
    display: grid;
    gap: 14px;
}

.landing-story-card.is-accent {
    background:
        radial-gradient(circle at top right, rgba(209, 123, 73, 0.14), transparent 24%),
        linear-gradient(180deg, rgba(255, 248, 240, 0.92), rgba(255, 252, 247, 0.9));
}

.landing-story-list,
.landing-story-points {
    margin: 0;
    padding: 0 18px 0 0;
    display: grid;
    gap: 10px;
    color: var(--ink);
}

.landing-story-list li,
.landing-story-points li {
    line-height: 1.9;
}

.landing-launch-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.landing-launch-card.is-soft {
    background: rgba(252, 248, 240, 0.88);
}

.landing-signup-form {
    margin-top: 18px;
}

.landing-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.landing-login-card {
    display: grid;
    gap: 14px;
    align-content: start;
    margin-top: 18px;
}

.landing-workflow-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.landing-flow-card {
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 252, 247, 0.82);
    border: 1px solid rgba(210, 195, 172, 0.72);
    box-shadow: var(--shadow);
}

.landing-flow-card strong {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    background: rgba(11, 110, 79, 0.12);
    color: var(--accent);
    margin-bottom: 12px;
}

.landing-flow-card p {
    margin: 0;
    line-height: 1.9;
    color: var(--muted);
}

.platform-status-notice {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(210, 195, 172, 0.75);
    background: rgba(255, 250, 242, 0.88);
}

.platform-status-notice.is-warning {
    background: linear-gradient(135deg, rgba(255, 246, 232, 0.96), rgba(248, 231, 210, 0.9));
    border-color: rgba(209, 123, 73, 0.45);
}

.platform-status-notice strong,
.platform-status-notice p {
    margin: 0;
}

.promo-shell {
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 54px;
}

.promo-topbar,
.promo-stage,
.promo-info-card,
.promo-role-card,
.promo-view-card,
.promo-cta-panel,
.promo-slide {
    background: rgba(255, 252, 247, 0.86);
    border: 1px solid rgba(210, 195, 172, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.promo-shell-slides {
    width: min(1440px, calc(100% - 24px));
}

.promo-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-radius: 26px;
    margin-bottom: 22px;
}

.promo-deck-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.promo-deck-intro h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.02;
    max-width: 10ch;
}

.promo-deck-note {
    color: var(--muted);
    line-height: 1.8;
    max-width: 320px;
    text-align: left;
}

.promo-slide-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(300px, 1fr);
    gap: 16px;
    overflow-x: auto;
    padding: 6px 4px 18px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}

.promo-slide {
    min-height: 620px;
    padding: 28px;
    border-radius: 34px;
    display: grid;
    align-content: start;
    gap: 18px;
    scroll-snap-align: start;
}

.promo-slide-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: stretch;
}

.promo-slide-copy {
    padding: 8px 2px;
}

.promo-slide-copy h2,
.promo-slide-head h2,
.promo-cta-copy h2 {
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 3.2vw, 3rem);
    line-height: 1.08;
}

.promo-slide-head {
    max-width: 760px;
}

.promo-slide-head span {
    color: var(--muted);
    line-height: 1.85;
}

.promo-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.promo-brand strong,
.promo-brand small {
    display: block;
}

.promo-brand small {
    color: var(--muted);
}

.promo-brand-logo {
    width: 62px;
    height: 62px;
}

.promo-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.promo-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(210, 195, 172, 0.75);
}

.promo-nav-cta {
    color: white !important;
    background: linear-gradient(135deg, var(--accent), #14825d) !important;
}

.promo-kicker,
.promo-section-head p,
.promo-slide-head p {
    margin: 0 0 10px;
    color: var(--accent-2);
    font-size: 0.84rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.promo-subcopy {
    margin: 0;
    max-width: 620px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.95;
}

.promo-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 22px 0 20px;
}

.promo-primary-action,
.promo-secondary-action {
    min-width: 190px;
    justify-content: center;
}

.promo-proof-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.promo-proof-grid article {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(210, 195, 172, 0.68);
}

.promo-proof-grid strong,
.promo-stat-card strong,
.promo-info-card strong,
.promo-role-card h3,
.promo-view-card strong,
.promo-privacy-grid strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.04rem;
}

.promo-proof-grid span,
.promo-stat-card small,
.promo-info-card p,
.promo-role-card li,
.promo-view-card p,
.promo-privacy-grid p,
.promo-cta-copy span {
    color: var(--muted);
    line-height: 1.85;
}

.promo-stage {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    padding: 24px;
    display: grid;
    gap: 18px;
}

.promo-stage-glow {
    position: absolute;
    inset: auto -60px -110px auto;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(209, 123, 73, 0.26), transparent 66%);
}

.promo-stat-stack,
.promo-tree-showcase {
    position: relative;
    z-index: 1;
}

.promo-stat-card {
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(38, 70, 83, 0.95), rgba(11, 110, 79, 0.92));
    color: white;
}

.promo-stat-card span,
.promo-cta-copy p {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.74);
}

.promo-stat-card strong {
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.promo-stat-card small {
    color: rgba(255, 255, 255, 0.8);
}

.promo-metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.promo-metric-row div {
    padding: 18px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.74);
    text-align: center;
}

.promo-metric-row strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.55rem;
    color: var(--accent-3);
}

.promo-metric-row span {
    color: var(--muted);
    font-size: 0.9rem;
}

.promo-tree-showcase {
    display: grid;
    gap: 14px;
}

.promo-tree {
    padding: 18px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(210, 195, 172, 0.66);
}

.promo-tree-main {
    display: grid;
    gap: 16px;
}

.promo-tree-branch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.promo-tree-secondary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.promo-tree-node {
    min-height: 58px;
    padding: 14px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 700;
}

.promo-tree-node.root {
    color: white;
    background: linear-gradient(135deg, var(--accent), #15906a);
}

.promo-tree-node.branch {
    background: rgba(11, 110, 79, 0.12);
    color: var(--accent);
    border: 1px dashed rgba(11, 110, 79, 0.34);
}

.promo-tree-node.mini {
    background: rgba(38, 70, 83, 0.1);
    color: var(--accent-3);
    border: 1px solid rgba(38, 70, 83, 0.16);
}

.promo-section-head {
    margin-bottom: 16px;
    max-width: 760px;
}

.promo-section-head span {
    color: var(--muted);
    line-height: 1.85;
}

.promo-infographic-grid,
.promo-role-grid,
.promo-views-grid,
.promo-privacy-grid {
    display: grid;
    gap: 16px;
}

.promo-infographic-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.promo-info-card,
.promo-role-card,
.promo-view-card {
    border-radius: 26px;
    padding: 22px;
}

.promo-info-card.is-accent {
    background: linear-gradient(150deg, rgba(38, 70, 83, 0.94), rgba(11, 110, 79, 0.9));
    color: white;
}

.promo-info-card.is-accent p {
    color: rgba(255, 255, 255, 0.82);
}

.promo-role-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.promo-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
    background: rgba(11, 110, 79, 0.1);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
}

.promo-role-card ul {
    margin: 0;
    padding: 0 18px 0 0;
}

.promo-role-card li + li {
    margin-top: 8px;
}

.promo-views-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.promo-slide-privacy {
    background: linear-gradient(145deg, rgba(38, 70, 83, 0.97), rgba(23, 54, 64, 0.96));
}

.promo-slide-head.is-light p,
.promo-slide-head.is-light h2,
.promo-slide-head.is-light span,
.promo-privacy-grid strong,
.promo-privacy-grid p {
    color: white;
}

.promo-slide-head.is-light span,
.promo-privacy-grid p {
    color: rgba(255, 255, 255, 0.8);
}

.promo-privacy-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.promo-privacy-grid article {
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.promo-slide-launch {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.promo-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.promo-cta-note {
    color: var(--muted);
    max-width: 280px;
    line-height: 1.8;
}

.platform-settings-shell,
.maintenance-shell {
    display: grid;
    place-items: center;
}

.platform-settings-card,
.maintenance-card {
    width: min(920px, 100%);
    padding: 30px;
    background: rgba(255, 252, 247, 0.9);
    border: 1px solid rgba(210, 195, 172, 0.72);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.platform-settings-head,
.maintenance-card {
    display: grid;
    gap: 12px;
}

.platform-settings-head p,
.platform-settings-head h2,
.platform-settings-head span,
.maintenance-card p,
.maintenance-card h1,
.maintenance-card span {
    margin: 0;
}

.platform-settings-head p,
.maintenance-card p {
    color: var(--accent-2);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.concept-shell {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 28px;
    padding: 20px 0 40px;
}

.concept-backdrop {
    position: absolute;
    border-radius: 999px;
    filter: blur(14px);
    pointer-events: none;
}

.concept-backdrop-one {
    top: -60px;
    right: -40px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(11, 110, 79, 0.18), transparent 70%);
}

.concept-backdrop-two {
    left: -80px;
    top: 340px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(209, 123, 73, 0.16), transparent 70%);
}

.concept-topbar,
.concept-hero,
.concept-section,
.concept-launch-panel {
    position: relative;
    z-index: 1;
}

.concept-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.concept-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.concept-brand strong,
.concept-brand small {
    display: block;
}

.concept-brand small {
    color: var(--muted);
}

.concept-brand-logo {
    width: 64px;
    height: 64px;
}

.concept-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.concept-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(210, 195, 172, 0.78);
}

.concept-nav-cta {
    color: white !important;
    background: linear-gradient(135deg, var(--accent-3), #132d39) !important;
}

.concept-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    gap: 22px;
    align-items: stretch;
}

.concept-hero-copy,
.concept-stage,
.concept-section,
.concept-launch-panel {
    border-radius: 34px;
    border: 1px solid rgba(210, 195, 172, 0.76);
    background: rgba(255, 252, 247, 0.84);
    box-shadow: var(--shadow);
}

.concept-hero-copy {
    padding: 34px;
    display: grid;
    gap: 18px;
}

.concept-kicker {
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(11, 110, 79, 0.1);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.concept-hero-copy h1,
.concept-section-head h2,
.concept-governance-copy h2,
.concept-launch-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.04;
}

.concept-hero-copy p,
.concept-section-head p,
.concept-governance-copy p,
.concept-launch-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.95;
    font-size: 1.03rem;
}

.concept-hero-actions,
.concept-launch-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.concept-proof-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.concept-proof-strip article,
.concept-value-card,
.concept-stack-card {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(210, 195, 172, 0.68);
}

.concept-proof-strip strong,
.concept-value-card strong,
.concept-tree-head strong,
.concept-stage-highlight strong,
.concept-governance-points strong,
.concept-stack-card strong,
.concept-trust-grid strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.02rem;
}

.concept-proof-strip span,
.concept-stage-highlight p,
.concept-tree-head span,
.concept-governance-points span,
.concept-stack-card p,
.concept-trust-grid p,
.concept-value-card p,
.concept-launch-note {
    color: var(--muted);
    line-height: 1.85;
}

.concept-stage {
    padding: 26px;
    display: grid;
    gap: 16px;
    background:
        radial-gradient(circle at top left, rgba(11, 110, 79, 0.1), transparent 32%),
        rgba(255, 250, 244, 0.9);
}

.concept-stage-highlight {
    padding: 20px;
    border-radius: 26px;
    background: linear-gradient(150deg, rgba(38, 70, 83, 0.96), rgba(11, 110, 79, 0.92));
    color: white;
}

.concept-stage-highlight span {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.72);
}

.concept-stage-highlight p {
    color: rgba(255, 255, 255, 0.82);
}

.concept-signal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.concept-signal-grid article {
    padding: 16px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(210, 195, 172, 0.64);
    text-align: center;
}

.concept-signal-grid strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.45rem;
    color: var(--accent-3);
}

.concept-signal-grid span {
    color: var(--muted);
    font-size: 0.92rem;
}

.concept-tree-card {
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(210, 195, 172, 0.68);
}

.concept-tree-layout {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.concept-tree-branch,
.concept-tree-mini-grid {
    display: grid;
    gap: 12px;
}

.concept-tree-branch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.concept-tree-mini-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.concept-tree-node {
    min-height: 58px;
    padding: 14px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 800;
}

.concept-tree-node.is-root {
    background: linear-gradient(135deg, var(--accent), #14906b);
    color: white;
}

.concept-tree-node.is-branch {
    color: var(--accent);
    background: rgba(11, 110, 79, 0.12);
    border: 1px dashed rgba(11, 110, 79, 0.34);
}

.concept-tree-node.is-mini {
    color: var(--accent-3);
    background: rgba(38, 70, 83, 0.1);
    border: 1px solid rgba(38, 70, 83, 0.16);
}

.concept-section {
    padding: 30px;
    display: grid;
    gap: 22px;
}

.concept-section-head {
    max-width: 860px;
    display: grid;
    gap: 12px;
}

.concept-value-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.concept-value-card.is-spotlight {
    background: linear-gradient(145deg, rgba(255, 241, 226, 0.96), rgba(255, 252, 247, 0.86));
    border-color: rgba(209, 123, 73, 0.36);
}

.concept-governance {
    grid-template-columns: minmax(0, 1.02fr) minmax(280px, 0.98fr);
    align-items: start;
}

.concept-governance-copy,
.concept-governance-stack {
    display: grid;
    gap: 18px;
}

.concept-governance-points {
    display: grid;
    gap: 12px;
}

.concept-governance-points div {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(210, 195, 172, 0.68);
}

.concept-stack-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--accent-2);
    font-size: 0.84rem;
    font-weight: 800;
}

.concept-trust {
    background: linear-gradient(145deg, rgba(22, 49, 59, 0.98), rgba(11, 110, 79, 0.9));
    border-color: rgba(255, 255, 255, 0.08);
}

.concept-section-head.is-light .concept-kicker,
.concept-section-head.is-light h2,
.concept-section-head.is-light p,
.concept-trust-grid strong,
.concept-trust-grid p {
    color: white;
}

.concept-section-head.is-light .concept-kicker {
    background: rgba(255, 255, 255, 0.12);
}

.concept-section-head.is-light p,
.concept-trust-grid p {
    color: rgba(255, 255, 255, 0.82);
}

.concept-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.concept-trust-grid article {
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.concept-launch-panel {
    padding: 30px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

@media (max-width: 1080px) {
    .concept-hero,
    .concept-governance,
    .concept-launch-panel {
        grid-template-columns: 1fr;
    }

    .concept-value-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .concept-proof-strip,
    .concept-signal-grid,
    .concept-value-grid,
    .concept-trust-grid,
    .concept-tree-mini-grid,
    .concept-tree-branch {
        grid-template-columns: 1fr;
    }

    .concept-hero-copy,
    .concept-stage,
    .concept-section,
    .concept-launch-panel {
        padding: 22px;
        border-radius: 26px;
    }

    .concept-hero-copy h1,
    .concept-section-head h2,
    .concept-governance-copy h2,
    .concept-launch-copy h2 {
        font-size: clamp(1.8rem, 7vw, 2.8rem);
    }
}

.test-deck-shell {
    position: relative;
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto;
    padding: 22px 0 54px;
    display: grid;
    gap: 20px;
    overflow: hidden;
}

.test-deck-backdrop {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(6px);
}

.test-deck-backdrop-one {
    top: -72px;
    left: -42px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(11, 110, 79, 0.16), transparent 70%);
}

.test-deck-backdrop-two {
    left: auto;
    right: -40px;
    top: 220px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(209, 123, 73, 0.18), transparent 70%);
}

.test-deck-topbar,
.test-deck-hero,
.test-slider {
    position: relative;
    z-index: 1;
    border-radius: 30px;
    border: 1px solid rgba(210, 195, 172, 0.78);
    background: rgba(255, 252, 247, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.test-deck-topbar {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.test-deck-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.test-deck-brand strong,
.test-deck-brand small {
    display: block;
}

.test-deck-brand small {
    color: var(--muted);
}

.test-deck-brand-logo {
    width: 90px;
    height: 50px;
    object-fit: contain;
}

.test-deck-topbar-actions,
.test-deck-hero-actions,
.test-slide-actions,
.test-slider-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.test-deck-hero {
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 18px;
    align-items: stretch;
}

.test-deck-hero-copy {
    display: grid;
    gap: 14px;
}

.test-deck-kicker {
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(11, 110, 79, 0.1);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.test-deck-hero-copy h1,
.test-slider-head h2,
.test-slide-copy h3 {
    margin: 0;
    line-height: 1.06;
}

.test-deck-hero-copy h1 {
    font-size: clamp(1.8rem, 3.4vw, 3rem);
}

.test-deck-hero-copy p,
.test-slide-copy p,
.test-launch-copy p,
.test-slide-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.test-deck-hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.test-deck-hero-metrics article,
.test-slide-panel {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(210, 195, 172, 0.72);
}

.test-deck-hero-metrics strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.3rem;
    color: var(--accent-3);
}

.test-deck-hero-metrics span {
    color: var(--muted);
    line-height: 1.7;
}

.test-slider {
    padding: 24px;
    display: grid;
    gap: 18px;
}

.test-slider-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.test-slider-head h2 {
    font-size: clamp(1.45rem, 2.4vw, 2.15rem);
}

.test-slider-arrow {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-3), #132d39);
    color: white;
    font-size: 1.6rem;
    font-weight: 800;
    cursor: pointer;
}

.test-slider-viewport {
    overflow: hidden;
    border-radius: 26px;
    direction: ltr;
}

.test-slider-track {
    display: flex;
    transition: transform 340ms ease;
    will-change: transform;
    direction: ltr;
}

.test-slide {
    min-width: 100%;
    padding: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: 18px;
    align-items: stretch;
    direction: rtl;
}

.test-slide-copy,
.test-slide-panel {
    min-height: 320px;
}

.test-slide-copy {
    padding: 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(11, 110, 79, 0.12), transparent 34%),
        linear-gradient(155deg, rgba(255, 247, 235, 0.98), rgba(255, 252, 247, 0.94));
    border: 1px solid rgba(210, 195, 172, 0.72);
    display: grid;
    align-content: start;
    gap: 14px;
}

.test-slide.is-active .test-slide-copy {
    box-shadow: 0 18px 40px rgba(84, 63, 27, 0.08);
}

.test-slide-index {
    color: var(--accent-2);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.2em;
}

.test-slide-copy h3 {
    font-size: clamp(1.35rem, 2.3vw, 2rem);
}

.test-slide-panel {
    display: grid;
    align-content: start;
    gap: 16px;
}


.test-slide-badge {
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(209, 123, 73, 0.12);
    color: var(--accent-2);
    font-size: 0.82rem;
    font-weight: 800;
}

.test-slide-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.test-slide-points li {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 252, 247, 0.92);
    border: 1px solid rgba(210, 195, 172, 0.62);
    color: var(--muted-strong);
    font-weight: 700;
}

.test-plan-grid,
.test-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.test-plan-card,
.test-stat-card {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 252, 247, 0.94);
    border: 1px solid rgba(210, 195, 172, 0.62);
    display: grid;
    gap: 6px;
}

.test-plan-card.is-highlighted {
    background: linear-gradient(145deg, rgba(255, 240, 225, 0.98), rgba(255, 252, 247, 0.94));
    border-color: rgba(209, 123, 73, 0.34);
}

.test-plan-card strong,
.test-stat-card strong {
    font-size: 1.08rem;
}

.test-plan-card span,
.test-stat-card span,
.test-plan-card small {
    color: var(--muted);
    line-height: 1.7;
}

.price-token-wrap,
.subscription-price-amount {
    white-space: nowrap;
}

.currency-token,
.price-period {
    white-space: nowrap;
    display: inline-block;
}

.currency-token {
    direction: rtl;
    font-family: "Noto Sans Symbols 2", "Segoe UI Symbol", "Geeza Pro", "Arial Unicode MS", "Cairo", sans-serif;
    font-weight: 700;
    line-height: 1;
}

.currency-token-image {
    width: 0.78em;
    height: 1.28em;
    object-fit: contain;
    vertical-align: -0.18em;
}

.test-slide-actions .btn-primary,
.test-slide-actions .btn-secondary {
    justify-content: center;
}

.test-slide-note {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(209, 123, 73, 0.08);
    border: 1px solid rgba(209, 123, 73, 0.18);
}

.test-slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.test-slider-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(210, 195, 172, 0.88);
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease;
}

.test-slider-dots button.is-active {
    background: var(--accent);
    transform: scale(1.18);
}

.test-launch-panel {
    position: relative;
    z-index: 1;
    padding: 24px;
    border-radius: 30px;
    border: 1px solid rgba(210, 195, 172, 0.78);
    background: linear-gradient(140deg, rgba(255, 248, 237, 0.94), rgba(255, 252, 247, 0.9));
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.test-launch-copy {
    display: grid;
    gap: 12px;
}

.test-launch-copy h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    line-height: 1.08;
}

.test-launch-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.test-launch-note {
    grid-column: 1 / -1;
    margin: 0;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(209, 123, 73, 0.08);
    border: 1px solid rgba(209, 123, 73, 0.18);
    color: var(--muted);
}

.signup-subscription-modal-card {
    display: grid;
    gap: 18px;
}

.signup-subscription-modal-copy {
    margin-top: -4px;
}

.signup-subscription-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.signup-subscription-plan {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(210, 195, 172, 0.72);
    background: rgba(255, 252, 247, 0.94);
    display: grid;
    gap: 6px;
}

.signup-subscription-plan.is-highlighted {
    background: linear-gradient(145deg, rgba(255, 240, 225, 0.98), rgba(255, 252, 247, 0.94));
    border-color: rgba(209, 123, 73, 0.34);
}

.signup-subscription-plan span,
.signup-subscription-plan small {
    color: var(--muted);
    line-height: 1.7;
}

.signup-subscription-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 980px) {
    .test-deck-hero,
    .test-launch-panel,
    .test-slide {
        grid-template-columns: 1fr;
    }

    .test-deck-hero-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .test-deck-topbar,
    .test-deck-hero,
    .test-slider,
    .test-launch-panel,
    .test-slide-copy,
    .test-slide-panel {
        padding: 18px;
        border-radius: 22px;
    }

    .test-deck-topbar-actions,
    .test-deck-hero-actions,
    .test-slide-actions,
    .test-launch-actions,
    .test-slider-controls {
        width: 100%;
    }

    .test-deck-topbar-actions .btn-primary,
    .test-deck-topbar-actions .btn-secondary,
    .test-deck-hero-actions .btn-primary,
    .test-deck-hero-actions .btn-secondary,
    .test-slide-actions .btn-primary,
    .test-slide-actions .btn-secondary,
    .test-launch-actions .btn-primary,
    .test-launch-actions .btn-secondary {
        width: 100%;
    }

    .test-slider-head {
        align-items: stretch;
        flex-direction: column;
    }

    .test-slider-controls {
        justify-content: stretch;
    }

    .test-slider-arrow {
        flex: 1 1 0;
    }

    .test-plan-grid,
    .test-stats-grid,
    .signup-subscription-modal-grid {
        grid-template-columns: 1fr;
    }

    .signup-subscription-modal-actions .btn-primary,
    .signup-subscription-modal-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

.platform-settings-head span,
.maintenance-card span {
    color: var(--muted);
    line-height: 1.9;
}

.platform-settings-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.platform-settings-section {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.9fr);
    gap: 18px;
    align-items: center;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(210, 195, 172, 0.55);
}

.platform-settings-section.is-stacked {
    grid-template-columns: minmax(0, 1fr);
}

.platform-settings-copy {
    display: grid;
    gap: 8px;
}

.platform-settings-copy strong,
.platform-settings-copy span {
    margin: 0;
}

.platform-settings-copy span {
    color: var(--muted);
    line-height: 1.8;
}

.platform-settings-options {
    display: grid;
    gap: 10px;
}

.platform-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(246, 239, 228, 0.82);
    border: 1px solid rgba(210, 195, 172, 0.6);
}

.platform-settings-section textarea {
    width: 100%;
    min-height: 120px;
}

.platform-settings-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.content-form-grid,
.contact-grid,
.site-footer-grid {
    display: grid;
    gap: 14px;
}

.content-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.content-field-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(210, 195, 172, 0.65);
}

.content-field-card span {
    font-weight: 700;
}

.contact-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.contact-card-item {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(210, 195, 172, 0.65);
}

.contact-card-item a {
    color: var(--accent-3);
    font-weight: 700;
}

.contact-card-item.is-fallback {
    background: rgba(246, 239, 228, 0.82);
}

.site-footer {
    margin-top: 28px;
    padding: 22px;
    border-radius: 28px;
    background: rgba(255, 252, 247, 0.88);
    border: 1px solid rgba(210, 195, 172, 0.72);
    box-shadow: var(--shadow);
}

.site-footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-footer-card {
    display: grid;
    gap: 10px;
}

.site-footer-card h3,
.site-footer-card p,
.site-footer-meta {
    margin: 0;
}

.site-footer-card p,
.site-footer-meta {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer-card a {
    color: var(--accent-3);
}

.site-footer-meta {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(210, 195, 172, 0.55);
}

.platform-mini-status {
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(210, 195, 172, 0.6);
    background: rgba(255, 255, 255, 0.58);
}

.platform-mini-status strong,
.platform-mini-status span {
    margin: 0;
}

.platform-mini-status span {
    color: var(--muted);
}

.platform-mini-status.is-open {
    border-color: rgba(11, 110, 79, 0.35);
    background: rgba(224, 245, 238, 0.75);
}

.platform-mini-status.is-closed {
    border-color: rgba(159, 42, 42, 0.28);
    background: rgba(253, 235, 235, 0.82);
}

.maintenance-card {
    justify-items: start;
    text-align: right;
}

.policy-shell {
    display: grid;
    place-items: center;
}

.policy-card {
    width: min(980px, 100%);
    padding: 28px;
    background: rgba(255, 252, 247, 0.88);
    border: 1px solid rgba(210, 195, 172, 0.72);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.policy-head h1,
.policy-section h2 {
    margin: 0;
}

.policy-head {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.policy-head p,
.policy-section p {
    margin: 0;
    color: var(--muted);
    line-height: 1.95;
}

.policy-section {
    display: grid;
    gap: 12px;
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid rgba(210, 195, 172, 0.55);
}

.policy-list {
    margin: 0;
    padding-right: 18px;
    display: grid;
    gap: 10px;
    line-height: 1.9;
}

.policy-warning {
    color: #4e2217 !important;
    font-weight: 700;
}

.policy-accept-box {
    display: grid;
    gap: 14px;
    margin-top: 24px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 237, 225, 0.88));
    border: 1px solid rgba(210, 195, 172, 0.75);
}

.policy-accept-box.is-static {
    justify-items: start;
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    border: 1px solid rgba(210, 195, 172, 0.6);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    padding: 0 18px;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 800;
    padding: 18px 0;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    margin: 0 0 18px;
}

.search-home-panel {
    width: min(900px, 100%);
    margin-inline: auto;
    position: relative;
    z-index: 30;
    overflow: visible;
}

.search-home-wrap {
    max-width: 720px;
    overflow: visible;
}

.search-home-results,
.person-page-layout {
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.person-primary-card,
.person-secondary-card {
    display: grid;
    align-content: start;
    gap: 14px;
}

.person-secondary-card {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
}

.panel {
    padding: 22px;
    margin-bottom: 20px;
}

.error-panel {
    max-width: 760px;
    margin: 48px auto;
}

.panel-header h2,
.auth-card h2 {
    margin: 0 0 6px;
    font-size: 1.6rem;
}

.panel-header p,
.auth-card p,
.muted-line {
    margin: 0;
    color: var(--muted);
}

.limit-warning {
    color: var(--danger);
    font-weight: 700;
}

.notes-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.summary-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(210, 195, 172, 0.8);
    color: var(--muted-strong);
    font-size: 0.9rem;
    font-weight: 700;
}

.summary-chip.is-alert {
    background: rgba(209, 123, 73, 0.14);
    border-color: rgba(209, 123, 73, 0.4);
    color: #8b2f19;
}

.active-subscription-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 0 0 18px;
    padding: 10px 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 249, 239, 0.96), rgba(247, 236, 214, 0.92));
    border: 1px solid rgba(210, 195, 172, 0.9);
    box-shadow: 0 14px 30px rgba(84, 63, 27, 0.08);
}

.active-subscription-banner__label {
    color: var(--muted-strong);
    font-size: 0.92rem;
    font-weight: 800;
}

.active-subscription-banner .subscription-plan-badge {
    background: rgba(176, 138, 89, 0.22);
}

.stack-form,
.inline-form,
.auth-card {
    display: grid;
    gap: 12px;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    direction: rtl;
    text-align: right;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.field-label {
    font-size: 0.9rem;
    color: var(--muted);
}

.field-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.field-check input {
    width: auto;
}

.calendar-date-field {
    position: relative;
    display: grid;
    gap: 10px;
}

.death-date-conditional[hidden] {
    display: none !important;
}

.calendar-date-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.calendar-date-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(210, 195, 172, 0.92);
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.calendar-date-toggle input {
    margin: 0;
}

.calendar-date-display {
    width: 100%;
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(210, 195, 172, 0.92);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    text-align: right;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.calendar-date-display:hover {
    border-color: rgba(30, 122, 92, 0.4);
}

.calendar-date-display:focus-visible {
    outline: none;
    border-color: rgba(11, 110, 79, 0.72);
    box-shadow: 0 0 0 4px rgba(11, 110, 79, 0.14);
}

.calendar-date-field.is-open .calendar-date-display {
    border-color: rgba(11, 110, 79, 0.72);
    box-shadow: 0 16px 34px rgba(11, 110, 79, 0.12);
}

.calendar-date-preview {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 700;
}

.calendar-date-display-hint {
    color: var(--muted);
    font-size: 0.82rem;
}

.calendar-date-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 40;
    width: min(100%, 360px);
    padding: 14px;
    border: 1px solid rgba(210, 195, 172, 0.96);
    border-radius: 20px;
    background: rgba(255, 252, 247, 0.98);
    box-shadow: 0 24px 48px rgba(31, 28, 23, 0.16);
    backdrop-filter: blur(14px);
}

.calendar-date-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.calendar-date-grid .calendar-date-select {
    margin: 0;
}

.calendar-date-select {
    text-align: center;
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(210, 195, 172, 0.96);
    background: rgba(255, 255, 255, 0.94);
}

.calendar-date-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.calendar-date-actions .btn-secondary,
.calendar-date-clear {
    min-height: 42px;
    border-radius: 14px;
}

.calendar-date-clear {
    padding: 0 16px;
    border: 1px solid rgba(210, 195, 172, 0.92);
    background: rgba(255, 255, 255, 0.9);
    color: var(--muted);
    font-weight: 700;
}

.embedded-form {
    margin-top: 14px;
}

.relative-form-feedback {
    margin: 0 0 12px;
}

.edit-modal-trigger-wrap {
    margin-top: 18px;
}

.section-head {
    display: grid;
    gap: 6px;
}

.section-head h4 {
    margin: 0;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.btn-primary,
.btn-secondary,
.btn-danger,
button {
    border: 0;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 16px;
    transition: transform 160ms ease, opacity 160ms ease;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-secondary {
    background: var(--accent-3);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.is-disabled-button,
.is-disabled-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submitted-notes-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.submitted-note-item {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(210, 195, 172, 0.8);
}

.submitted-note-item p {
    margin: 10px 0 0;
    white-space: pre-wrap;
}

.submitted-note-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    flex-wrap: wrap;
}

.compact-empty-state {
    padding: 16px;
    border-radius: 18px;
}

.inbox-table-wrap table {
    width: 100%;
    border-collapse: collapse;
}

.inbox-table-wrap th,
.inbox-table-wrap td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(210, 195, 172, 0.65);
    vertical-align: top;
}

.inbox-table-wrap th {
    color: var(--muted);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.55);
}

.inbox-note-cell {
    max-width: 420px;
    white-space: pre-wrap;
}

.is-unread-row {
    background: rgba(209, 123, 73, 0.08);
}

button:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover {
    transform: translateY(-1px);
}

.import-box,
.locked-box {
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 237, 225, 0.85));
    border: 1px solid var(--line);
}

.search-bar-wrap {
    position: relative;
    margin: 18px 0;
    z-index: 40;
    overflow: visible;
}

.person-picker {
    position: relative;
    display: grid;
    gap: 8px;
}

.search-results {
    position: absolute;
    inset: calc(100% + 8px) 0 auto 0;
    z-index: 1000;
    display: none;
    background: rgba(255, 252, 247, 0.98);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.search-result {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(210, 195, 172, 0.35);
    cursor: pointer;
    text-align: right;
}

.search-result:last-child {
    border-bottom: 0;
}

.search-result:hover {
    background: rgba(11, 110, 79, 0.08);
}

.search-result.is-male {
    border-right: 4px solid rgba(38, 70, 83, 0.7);
}

.search-result.is-female {
    border-right: 4px solid rgba(209, 123, 73, 0.8);
}

.search-result.is-deceased {
    background: rgba(159, 42, 42, 0.06);
}

.search-subline {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.92rem;
}

.person-picker-results {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    z-index: 12;
    display: none;
    background: rgba(255, 252, 247, 0.98);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.person-library {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    max-height: 190px;
    overflow: auto;
}

.person-pill,
.close-chip {
    font-family: "Cairo", "Tahoma", sans-serif;
}

.person-pill {
    display: inline-flex;
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
}

.login-account-pill {
    display: grid !important;
    gap: 4px;
    border-radius: 18px;
    padding: 12px 14px;
}

.login-account-pill-label {
    display: block;
    cursor: pointer;
}

.login-account-pill.is-blocked {
    background: rgba(209, 123, 73, 0.08);
    border-color: rgba(209, 123, 73, 0.32);
}

.login-account-status {
    color: #8b2f19;
    font-style: normal;
    font-size: 0.85rem;
    font-weight: 700;
}

.manage-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.compact-admin-form {
    min-width: 280px;
}

.compact-admin-form input,
.compact-admin-form select,
.compact-admin-form button {
    min-width: 220px;
}

.action-tile {
    display: grid;
    gap: 6px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    border-radius: 22px;
}

.action-tile span {
    color: var(--muted);
}

.family-directory-card {
    align-content: start;
}

.family-status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.family-directory-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.family-settings-form {
    display: grid;
    gap: 10px;
    min-width: min(100%, 300px);
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(210, 195, 172, 0.7);
}

.compact-check {
    font-size: 0.9rem;
    color: var(--muted-strong);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.5fr) minmax(0, 1.5fr);
    gap: 16px;
    min-width: 0;
}

.detail-card,
.graph-canvas {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    min-height: 260px;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.empty-state {
    color: var(--muted);
    padding: 16px 0;
}

.person-summary {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(248, 246, 240, 0.96);
    border: 1.5px solid rgba(210, 195, 172, 0.95);
    min-width: 0;
    max-width: 100%;
}

.person-summary-head {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: start;
}

.person-summary-head--stacked {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
}

.person-photo-card {
    display: grid;
    gap: 8px;
    align-content: start;
}

.person-photo-card--solo {
    justify-items: center;
    margin-bottom: 4px;
}

.person-photo-shell {
    position: relative;
    width: 176px;
    max-width: 100%;
}

.person-photo-frame {
    position: relative;
    width: 176px;
    height: 176px;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 28px;
    border: 1px solid rgba(210, 195, 172, 0.95);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 242, 233, 0.96));
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.person-photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: rgba(255, 255, 255, 0.9);
}

.person-photo-image.is-avatar-photo {
    object-fit: contain;
    padding: 14px;
    background: rgba(255, 255, 255, 0.96);
}

.person-photo-edit-trigger {
    position: absolute;
    left: 10px;
    bottom: 10px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, #0b6e4f, #16916a);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(11, 110, 79, 0.24);
}

.person-photo-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 248, 214, 0.96);
    color: #795700;
    border: 1px solid rgba(225, 190, 74, 0.6);
    font-size: 0.8rem;
    font-weight: 800;
}

.person-photo-meta {
    font-size: 0.88rem;
    color: var(--muted);
}

.person-summary.is-male {
    border-right: 5px solid rgba(74, 156, 220, 0.88);
}

.person-summary.is-female {
    border-right: 5px solid rgba(217, 112, 173, 0.9);
}

.person-summary.is-deceased {
    background: rgba(76, 80, 87, 0.2);
    color: #26282b;
}

.person-summary.focus-person-summary {
    border-color: rgba(11, 110, 79, 0.98);
    box-shadow: 0 0 0 2px rgba(11, 110, 79, 0.14);
}

.focused-tree-viewport {
    position: relative;
}

.focused-tree-action-dimmer {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(2px);
}

.focused-tree-action-panel {
    position: fixed;
    z-index: 2200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.focused-tree-action-panel[hidden] {
    display: none !important;
}

.focused-tree-action-card {
    width: min(100%, 460px);
    display: grid;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 24px;
    background: rgba(255, 252, 247, 0.96);
    border: 1px solid rgba(210, 195, 172, 0.9);
    box-shadow: 0 20px 50px rgba(38, 32, 24, 0.18);
    backdrop-filter: blur(18px);
}

.focused-tree-action-head {
    display: grid;
    gap: 4px;
    text-align: center;
}

.focused-tree-action-kicker {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--muted);
}

.focused-tree-action-name {
    margin: 0;
    font-size: 1.2rem;
    color: #1d2b22;
}

.focused-tree-action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.focused-tree-action-btn {
    min-width: 108px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    font-size: 0.92rem;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(38, 32, 24, 0.12);
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.focused-tree-action-btn.is-open {
    background: linear-gradient(135deg, #264653, #355f72);
    color: white;
}

.focused-tree-action-btn.is-add {
    background: linear-gradient(135deg, #0b6e4f, #16916a);
    color: white;
}

.focused-tree-action-btn.is-delete {
    background: linear-gradient(135deg, #9f2a2a, #c24646);
    color: white;
}

.focused-tree-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(38, 32, 24, 0.18);
}

.focused-tree-action-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1rem;
    line-height: 1;
}

.focused-tree-action-label {
    white-space: nowrap;
    font-size: 0.84rem;
}

.focused-tree-action-btn.is-disabled,
.focused-tree-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.person-state-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.state-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
}

.gender-badge {
    background: rgba(248, 246, 240, 0.96);
    color: var(--ink);
    border: 1px solid rgba(74, 156, 220, 0.88);
}

.life-badge {
    background: rgba(248, 246, 240, 0.96);
    color: var(--ink);
    border: 1px solid rgba(210, 195, 172, 0.95);
}

.marital-badge {
    background: rgba(11, 110, 79, 0.12);
    color: var(--accent);
    border: 1px solid rgba(11, 110, 79, 0.35);
}

.children-badge {
    background: rgba(38, 70, 83, 0.1);
    color: var(--accent-3);
    border: 1px solid rgba(38, 70, 83, 0.28);
}

.person-summary.is-female .gender-badge {
    border-color: rgba(217, 112, 173, 0.9);
}

.person-summary.is-deceased .life-badge {
    background: rgba(76, 80, 87, 0.2);
    color: #26282b;
    border-color: rgba(43, 46, 51, 0.92);
}

.detail-form-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(210, 195, 172, 0.55);
}

.section-head {
    margin-bottom: 12px;
}

.section-head h4 {
    margin: 0 0 6px;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.summary-name {
    margin: 0;
    font-size: 1.72rem;
    text-align: center;
    line-height: 1.5;
}

.mercy-line {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.98rem;
    font-weight: 700;
    text-align: center;
}

.person-summary-nickname {
    margin: 0;
    color: var(--muted);
    text-align: center;
}

.summary-meta {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.summary-meta--primary {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(210, 195, 172, 0.72);
}

.summary-meta--extra {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(210, 195, 172, 0.55);
}

.summary-stats-box {
    margin-top: 14px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(210, 195, 172, 0.75);
}

.summary-stats-title {
    margin-bottom: 10px;
    font-size: 0.98rem;
    font-weight: 800;
}

.summary-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    min-width: 0;
}

.summary-stat-item {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(248, 246, 240, 0.96);
    border: 1px solid rgba(210, 195, 172, 0.7);
    text-align: center;
}

.summary-stat-item strong {
    font-size: 1.15rem;
}

.summary-stat-item span {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.summary-actions {
    margin-top: 8px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.person-action-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(48px, 56px));
    justify-content: center;
    gap: 10px;
}

.person-action-btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    padding: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(210, 195, 172, 0.92);
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.person-action-btn:disabled,
.person-action-btn[aria-disabled="true"] {
    opacity: 0.58;
    cursor: not-allowed;
}

.person-action-btn.is-edit {
    color: var(--accent-3);
}

.person-action-btn.is-add,
.person-action-btn.is-bio,
.person-action-btn.is-note,
.person-action-btn.is-tree {
    color: var(--accent);
}

.person-action-btn.is-delete {
    color: var(--danger);
    border-color: rgba(159, 42, 42, 0.35);
    background: rgba(255, 241, 241, 0.92);
}

.person-action-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.person-action-svg {
    width: 1.2rem;
    height: 1.2rem;
    display: block;
}

.person-action-image-icon {
    width: 1.2rem;
    height: 1.2rem;
    display: block;
    object-fit: contain;
}

.person-action-limit-note {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(159, 42, 42, 0.18);
    background: rgba(255, 243, 243, 0.94);
    color: var(--danger);
    font-size: 0.92rem;
    line-height: 1.7;
}

.person-action-text {
    display: none;
}

.person-action-modal {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.person-photo-editor-stage {
    display: grid;
    gap: 12px;
    justify-items: center;
}

.person-photo-editor-preview {
    width: 192px;
}

.person-photo-editor-preview .person-photo-frame {
    width: 192px;
    height: 192px;
}

.person-photo-editor-meta {
    display: grid;
    gap: 4px;
    text-align: center;
}

.person-photo-form-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.person-photo-form-actions > * {
    flex: 1 1 180px;
}

.person-photo-feedback {
    text-align: center;
}

.person-photo-feedback.is-pending {
    color: #795700;
}

.person-photo-feedback.is-success {
    color: var(--accent);
}

.person-photo-feedback.is-error,
.person-photo-feedback.is-rejected {
    color: var(--danger);
}

.family-directory-card {
    gap: 14px;
}

.family-subscription-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.family-subscription-log {
    margin-top: -4px;
}

.subscription-overview-card {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(210, 195, 172, 0.76);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 237, 225, 0.74));
}

.family-directory-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.family-directory-actions > * {
    flex: 1 1 180px;
}

.family-settings-modal .modal-card {
    width: min(640px, 100%);
}

.inline-relative-composer .relative-composer-panel {
    margin-top: 4px;
}

.relation-chip-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 10px;
}

.relation-chip-option {
    display: block;
}

.relation-chip {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 14px;
    border: 1px solid rgba(210, 195, 172, 0.92);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    font-weight: 700;
    font-size: 0.92rem;
}

.relation-chip.is-active {
    background: rgba(11, 110, 79, 0.12);
    border-color: rgba(11, 110, 79, 0.65);
    color: var(--accent);
}

.summary-extra-details {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(210, 195, 172, 0.7);
    padding: 14px 16px;
}

.summary-extra-details summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--accent-3);
    list-style: none;
}

.summary-extra-details summary::-webkit-details-marker {
    display: none;
}

.summary-extra-details summary::before {
    content: "+";
    display: inline-block;
    margin-left: 8px;
    font-weight: 900;
}

.summary-extra-details[open] summary::before {
    content: "−";
}

.close-tree-grid {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.visual-tree-card {
    padding: 16px;
    border: 1px solid rgba(210, 195, 172, 0.7);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 237, 225, 0.72));
}

.visual-tree-header {
    margin-bottom: 14px;
}

.visual-tree-header h4 {
    margin: 0 0 6px;
}

.visual-tree-header p {
    margin: 0;
    color: var(--muted);
}

.visual-tree-stage {
    display: grid;
    gap: 16px;
    min-width: 0;
    max-width: 100%;
}

.mini-tree-canvas {
    overflow-x: auto;
    padding-bottom: 6px;
    max-width: 100%;
    touch-action: pan-x pan-y pinch-zoom;
}

.mini-tree-stage {
    position: relative;
    min-width: 980px;
    padding: 10px 0;
}

.mini-tree-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.mini-tree-line {
    fill: none;
    stroke: rgba(38, 70, 83, 0.5);
    stroke-width: 2.5;
    stroke-linecap: round;
}

.mini-tree-line.is-dashed {
    stroke-dasharray: 7 6;
}

.mini-tree-row {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 18px;
    justify-content: center;
    margin-bottom: 26px;
}

.row-grandparents,
.row-upper,
.row-focus {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    align-items: start;
}

.row-children,
.row-grandchildren {
    grid-template-columns: minmax(280px, 1fr);
}

.row-grandparents .slot-p-grand,
.row-focus .slot-spouses,
.row-upper .slot-p-uncles {
    grid-column: 1;
}

.row-grandparents .slot-grand-spacer,
.row-upper .slot-parents {
    grid-column: 2 / span 2;
}

.row-focus .slot-focus {
    grid-column: 2 / span 2;
}

.row-grandparents .slot-m-grand,
.row-focus .slot-siblings,
.row-upper .slot-m-uncles {
    grid-column: 4;
}

.mini-tree-group {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
    border: 1px dashed rgba(38, 70, 83, 0.22);
    background: rgba(255, 255, 255, 0.62);
}

.mini-tree-group-spacer {
    min-height: 1px;
}

.mini-tree-group-title {
    font-size: 0.95rem;
    color: var(--muted);
}

.mini-tree-subgroups {
    display: grid;
    gap: 12px;
}

.mini-tree-subgroup {
    display: grid;
    gap: 8px;
}

.mini-tree-subgroup-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
}

.mini-tree-subgroup-items {
    gap: 8px;
}

.mini-tree-items {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mini-tree-item {
    display: flex;
}

.mini-tree-focus-group {
    justify-content: center;
}

.mini-tree-focus-group .mini-tree-items {
    justify-content: center;
}

.visual-chip {
    background: rgba(248, 246, 240, 0.96);
}

.visual-chip.focus {
    border-color: rgba(11, 110, 79, 0.98);
    box-shadow: 0 0 0 2px rgba(11, 110, 79, 0.12);
}

.close-row {
    display: grid;
    gap: 10px;
}

.close-row h4 {
    margin: 0;
}

.chip-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.close-chip {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(248, 246, 240, 0.96);
    cursor: pointer;
}

.person-state-chip.is-male {
    border-color: rgba(74, 156, 220, 0.88);
}

.person-state-chip.is-female {
    border-color: rgba(217, 112, 173, 0.9);
}

.person-state-chip.is-deceased {
    background: rgba(76, 80, 87, 0.2);
    border-color: rgba(43, 46, 51, 0.92);
    color: #26282b;
}

.person-state-chip.focus {
    border-color: rgba(11, 110, 79, 0.98);
    box-shadow: 0 0 0 2px rgba(11, 110, 79, 0.12);
}

.relative-composer-actions {
    margin-bottom: 12px;
}

.relative-composer-panel {
    display: block;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 252, 247, 0.72);
    border: 1px solid rgba(210, 195, 172, 0.75);
}

.relative-composer-panel[hidden] {
    display: none !important;
}

.relation-chip-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
    margin-bottom: 0;
}

.relation-chip-option {
    position: relative;
    display: flex;
}

.relation-chip-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.relation-chip {
    min-height: 58px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 239, 228, 0.92));
    border: 1px solid rgba(210, 195, 172, 0.95);
    color: var(--ink);
    box-shadow: 0 8px 22px rgba(38, 32, 24, 0.06);
    font-weight: 700;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.relation-chip-option .relation-chip-input:checked + .relation-chip,
.relation-chip.is-active,
.relation-chip[aria-pressed="true"] {
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(11, 110, 79, 0.96), rgba(8, 92, 66, 0.96));
    color: white;
    border-color: var(--accent);
    box-shadow: 0 14px 28px rgba(11, 110, 79, 0.18);
}

.relation-chip-option .relation-chip-input:not(:checked) + .relation-chip:hover,
.relation-chip-option .relation-chip-input:not(:checked) + .relation-chip:focus,
.relation-chip-option .relation-chip-input:not(:checked) + .relation-chip:focus-visible,
.relation-chip[aria-pressed="false"]:hover,
.relation-chip[aria-pressed="false"]:focus,
.relation-chip[aria-pressed="false"]:focus-visible {
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(250, 244, 236, 0.96));
    color: var(--ink);
    border-color: rgba(38, 70, 83, 0.24);
    box-shadow: 0 10px 24px rgba(38, 70, 83, 0.1);
    outline: none;
}

.relation-chip-option .relation-chip-input:checked + .relation-chip:hover,
.relation-chip-option .relation-chip-input:checked + .relation-chip:focus,
.relation-chip-option .relation-chip-input:checked + .relation-chip:focus-visible,
.relation-chip.is-active:hover,
.relation-chip.is-active:focus,
.relation-chip.is-active:focus-visible,
.relation-chip[aria-pressed="true"]:hover,
.relation-chip[aria-pressed="true"]:focus,
.relation-chip[aria-pressed="true"]:focus-visible {
    background: linear-gradient(180deg, rgba(11, 110, 79, 0.96), rgba(8, 92, 66, 0.96));
    color: white;
    border-color: var(--accent);
    box-shadow: 0 14px 28px rgba(11, 110, 79, 0.18);
    outline: none;
}

.relation-chip-option .relation-chip-input:focus-visible + .relation-chip {
    box-shadow: 0 0 0 2px rgba(38, 70, 83, 0.12);
}

.relation-preview {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px dashed rgba(11, 110, 79, 0.35);
    background: rgba(11, 110, 79, 0.06);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(31, 29, 26, 0.45);
    display: grid;
    place-items: center;
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.modal-backdrop[hidden] {
    display: none !important;
}

.modal-card {
    width: min(720px, 100%);
    max-height: min(900px, calc(100dvh - 40px), calc(100svh - 40px), calc(100vh - 40px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 252, 247, 0.98);
    border: 1px solid rgba(210, 195, 172, 0.8);
    box-shadow: 0 18px 60px rgba(38, 32, 24, 0.2);
    margin-block: auto;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.modal-head h4 {
    margin: 0;
}

.modal-close {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 999px;
    background: rgba(38, 70, 83, 0.12);
    color: var(--accent-3);
    font-size: 1.5rem;
    line-height: 1;
}

.spouse-groups {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.spouse-group-card {
    padding: 12px;
    border: 1px solid rgba(210, 195, 172, 0.7);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    display: grid;
    gap: 12px;
}

.spouse-children-list {
    align-items: start;
}

.small-empty {
    padding: 4px 0;
    font-size: 0.95rem;
}

.graph-canvas {
    overflow: auto;
    cursor: grab;
    scroll-behavior: smooth;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
}

.graph-stage {
    position: relative;
    min-width: 1100px;
    min-height: 520px;
}

.graph-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.graph-layer,
.graph-node-slot {
    position: absolute;
}

.graph-generation-label {
    position: absolute;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(38, 70, 83, 0.08);
    color: var(--accent-3);
    font-size: 0.9rem;
    font-weight: 700;
}

.person-node {
    width: 170px;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 28px rgba(38, 32, 24, 0.08);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.person-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(38, 32, 24, 0.12);
}

.person-node.is-focus {
    background: linear-gradient(145deg, #0b6e4f, #1f8d68);
    color: white;
    width: 230px;
    min-height: 110px;
    transform: scale(1.04);
    box-shadow: 0 22px 40px rgba(11, 110, 79, 0.24);
}

.node-name {
    margin: 0 0 8px;
    font-size: 1rem;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.person-node.is-focus .node-name {
    font-size: 1.18rem;
}

.node-meta {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.person-node.is-focus .node-meta {
    color: rgba(255, 255, 255, 0.85);
}

.person-node.is-male {
    border-color: rgba(38, 70, 83, 0.45);
}

.person-node.is-female {
    border-color: rgba(209, 123, 73, 0.5);
}

.person-node.is-deceased {
    background: rgba(159, 42, 42, 0.08);
}

.graph-canvas.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.focused-tree-canvas {
    overflow: hidden;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.focused-tree-wrap {
    display: grid;
    gap: 16px;
    min-height: 100%;
}

.focused-tree-page {
    width: min(100vw - 24px, 1800px);
    min-height: calc(100dvh - 160px);
    max-height: calc(100dvh - 160px);
    margin-inline: calc(50% - 50vw + 12px);
    display: flex;
    padding: 18px;
    overflow: hidden;
    box-sizing: border-box;
}

.focused-tree-canvas {
    width: 100%;
    min-height: 100%;
    max-width: 100%;
}

.focused-tree-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.focused-tree-toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.focused-tree-toolbar-title {
    display: grid;
    gap: 4px;
    text-align: left;
}

.focused-tree-toolbar-kicker {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--muted);
}

.focused-tree-toolbar-title h3 {
    margin: 0;
    font-size: 1.35rem;
}

.focused-tree-toolbar-scope {
    display: grid;
    gap: 6px;
    min-width: min(100%, 220px);
}

.focused-tree-toolbar-scope label {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
}

.focused-tree-scope-select {
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(210, 195, 172, 0.85);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
}

.focused-tree-exit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.focused-tree-viewport {
    overflow: hidden;
    flex: 1;
    min-height: 0;
    height: calc(100vh - 280px);
    padding: 0;
    touch-action: none;
    cursor: grab;
    overscroll-behavior: contain;
    position: relative;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(210, 195, 172, 0.55);
}

.focused-tree-viewport.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.focused-tree-stage {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
}

.focused-tree-stage-svg {
    width: 100%;
    height: 100%;
}

.focused-tree-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.focused-tree-reveal-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 3;
    opacity: 1;
    transition: opacity 220ms ease;
}

.focused-tree-reveal-svg.is-fading {
    opacity: 0;
}

.focused-tree-reveal-cover {
    fill: rgba(255, 251, 245, 0.96);
}

.focused-tree-edge {
    stroke: rgba(38, 70, 83, 0.6);
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.focused-tree-edge.spouse-edge {
    stroke: rgba(209, 123, 73, 0.85);
    stroke-dasharray: 10 8;
}

.focused-tree-edge.partner-rail {
    stroke: rgba(209, 123, 73, 0.88);
    stroke-width: 3.5;
    stroke-dasharray: 10 8;
}

.focused-tree-edge.ancestor-edge {
    stroke: rgba(92, 108, 117, 0.74);
    stroke-width: 2.9;
}

.focused-tree-edge.cousin-edge {
    stroke: rgba(57, 89, 165, 0.78);
    stroke-width: 2.9;
}

.focused-tree-edge.descendant-edge {
    stroke: rgba(166, 96, 41, 0.82);
    stroke-width: 3.1;
}

.focused-tree-edge.ancestor-rail {
    stroke: rgba(92, 108, 117, 0.65);
    stroke-width: 2.8;
}

.focused-tree-edge.sibling-full-edge {
    stroke: rgba(11, 110, 79, 0.88);
    stroke-width: 3.4;
}

.focused-tree-edge.sibling-father-edge {
    stroke: rgba(38, 70, 163, 0.82);
    stroke-width: 3.2;
}

.focused-tree-edge.sibling-mother-edge {
    stroke: rgba(198, 110, 34, 0.84);
    stroke-width: 3.2;
}

.focused-tree-junction {
    fill: #264653;
}

.focused-tree-junction.sibling-full-junction {
    fill: rgba(11, 110, 79, 0.96);
}

.focused-tree-junction.sibling-father-junction {
    fill: rgba(38, 70, 163, 0.96);
}

.focused-tree-junction.sibling-mother-junction {
    fill: rgba(198, 110, 34, 0.96);
}

.focused-tree-node-svg {
    cursor: default;
    outline: none;
}

.focused-tree-node-svg rect {
    fill: rgba(248, 246, 240, 0.96);
    stroke: rgba(210, 195, 172, 0.95);
    stroke-width: 1.5;
    filter: drop-shadow(0 14px 28px rgba(38, 32, 24, 0.1));
    transition: filter 160ms ease, transform 160ms ease;
}

.focused-tree-node-svg:hover rect,
.focused-tree-node-svg:focus rect {
    filter: drop-shadow(0 18px 36px rgba(38, 32, 24, 0.14));
}

.focused-tree-node-svg.focus-node rect {
    stroke: rgba(11, 110, 79, 0.98);
    stroke-width: 3.8;
    filter: drop-shadow(0 18px 36px rgba(11, 110, 79, 0.2));
}

.focused-tree-node-svg.parent-node rect {
    stroke-width: 1.5;
}

.focused-tree-node-svg.is-male rect {
    stroke: rgba(74, 156, 220, 0.88);
}

.focused-tree-node-svg.is-female rect {
    stroke: rgba(217, 112, 173, 0.9);
}

.focused-tree-node-svg.is-deceased rect {
    fill: rgba(76, 80, 87, 0.28);
}

.focused-tree-node-svg.focus-node.is-deceased rect {
    fill: rgba(58, 61, 66, 0.92);
}

.focused-tree-node-svg.sibling-node rect {
    stroke-width: 1.5;
}

.focused-tree-node-svg.spouse-node rect {
    stroke-width: 1.5;
}

.focused-tree-node-svg.child-node rect {
    stroke-width: 1.5;
}

.focused-tree-node-tool {
    cursor: pointer;
}

.focused-tree-node-tool circle {
    fill: rgba(255, 255, 255, 0.98);
    stroke: rgba(27, 34, 42, 0.94);
    stroke-width: 1.9;
    transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
    filter: drop-shadow(0 5px 12px rgba(35, 31, 27, 0.14));
}

.focused-tree-node-tool-icon {
    fill: none;
    stroke: rgba(27, 34, 42, 0.94);
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.focused-tree-node-tool[data-node-action="add"] circle {
    fill: #0b6e4f;
    stroke: #0b6e4f;
}

.focused-tree-node-tool[data-node-action="add"] .focused-tree-node-tool-icon {
    stroke: #ffffff;
}

.focused-tree-node-tool[data-node-action="view"] circle {
    fill: #2d6cdf;
    stroke: #2d6cdf;
}

.focused-tree-node-tool[data-node-action="view"] .focused-tree-node-tool-icon {
    stroke: #ffffff;
}

.focused-tree-node-tool:hover circle,
.focused-tree-node-tool:focus circle {
    transform: translateY(-1px);
    filter: drop-shadow(0 8px 16px rgba(35, 31, 27, 0.18));
}

.focused-tree-node-tool.is-disabled,
.focused-tree-node-tool[aria-disabled="true"] {
    opacity: 0.42;
    cursor: not-allowed;
}

.focused-tree-avatar-ring {
    fill: rgba(255, 255, 255, 0.96);
    stroke: rgba(211, 196, 172, 0.92);
    stroke-width: 1.4;
}

.focused-tree-avatar-bg {
    fill: rgba(255, 255, 255, 0.98);
}

.focused-tree-avatar-photo {
    pointer-events: none;
}

.focused-tree-label {
    font-family: "Cairo", "Tahoma", sans-serif;
    font-size: 15px;
    font-weight: 700;
    fill: var(--ink);
    pointer-events: none;
}

.focused-tree-node-svg.focus-node.is-deceased .focused-tree-label {
    fill: white;
}

.focused-tree-search-card {
    width: min(100%, 640px);
}

.focused-tree-search-results {
    max-height: min(54vh, 480px);
    overflow-y: auto;
    display: grid;
    gap: 10px;
}

.traditional-tree-page {
    display: grid;
    gap: 20px;
}

.traditional-tree-controls {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(120px, auto));
    gap: 14px;
    align-items: end;
}

.traditional-tree-root-picker {
    position: relative;
}

.traditional-tree-layout-picker {
    display: grid;
    gap: 8px;
}

.traditional-tree-root-results {
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    width: 100%;
}

.traditional-tree-check {
    align-self: center;
    margin-top: 18px;
}

.traditional-tree-canvas {
    min-height: 70vh;
    padding: 20px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.28) 48%, rgba(190, 226, 255, 0.18) 72%),
        linear-gradient(180deg, #cfe8ff 0%, #eaf5ff 38%, #f6fbff 62%, #dff1c8 85%, #a8d56c 100%);
    border: 1px solid rgba(210, 195, 172, 0.65);
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

.traditional-tree-summary {
    margin-bottom: 18px;
    color: var(--muted);
    font-weight: 700;
}

.traditional-tree-image-shell {
    display: grid;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.traditional-tree-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.traditional-tree-toolbar-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.traditional-tree-tool,
.traditional-tree-download {
    min-width: 72px;
}

.traditional-tree-download-wrap {
    position: relative;
}

.traditional-tree-download-wrap summary {
    list-style: none;
}

.traditional-tree-download-wrap summary::-webkit-details-marker {
    display: none;
}

.traditional-tree-download-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    min-width: 100%;
    display: grid;
    gap: 6px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(210, 195, 172, 0.92);
    background: rgba(255, 252, 247, 0.98);
    box-shadow: var(--shadow);
}

.traditional-tree-download-wrap:not([open]) .traditional-tree-download-menu {
    display: none;
}

.traditional-tree-download-option {
    min-width: 92px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-weight: 700;
}

.traditional-tree-download-locked {
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px dashed rgba(176, 138, 89, 0.7);
    background: rgba(248, 237, 225, 0.72);
    color: var(--muted);
    font-weight: 700;
}

.person-picker-multi-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.subscriptions-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
    gap: 18px;
    margin-bottom: 22px;
    align-items: stretch;
}

.subscriptions-copy,
.subscriptions-note-card,
.subscription-card {
    border-radius: 28px;
    border: 1px solid rgba(210, 195, 172, 0.76);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 237, 225, 0.82));
    box-shadow: var(--shadow);
}

.subscriptions-copy {
    padding: 28px;
}

.subscriptions-kicker {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(11, 110, 79, 0.12);
    color: var(--accent);
    font-weight: 800;
}

.subscriptions-copy h2,
.subscriptions-note-card strong,
.subscription-card h3 {
    margin: 0 0 10px;
}

.subscriptions-copy p,
.subscriptions-note-card p,
.subscription-card p {
    margin: 0;
    color: var(--muted);
}

.subscriptions-current-plan {
    margin-top: 16px;
    display: inline-flex;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(38, 70, 83, 0.08);
    color: var(--accent-3);
    font-weight: 800;
}

.subscriptions-current-meta {
    margin-right: 10px;
    background: rgba(176, 138, 89, 0.12);
}

.subscriptions-note-card {
    padding: 24px;
    align-self: start;
}

.subscriptions-note-emphasis {
    margin-top: 12px !important;
    color: var(--accent-3) !important;
    font-weight: 800;
}

.subscriptions-grid,
.subscriptions-comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.subscriptions-mobile-hint {
    display: none;
    margin: 0 0 12px;
    color: var(--muted);
    font-weight: 700;
}

.subscription-card {
    padding: 22px;
    display: grid;
    gap: 18px;
    align-content: start;
}

.subscription-card.is-current {
    border-color: rgba(11, 110, 79, 0.54);
    box-shadow: 0 24px 48px rgba(11, 110, 79, 0.14);
}

.subscription-card-head {
    display: grid;
    gap: 10px;
}

.subscription-card-guide {
    background: linear-gradient(180deg, rgba(250, 244, 234, 0.96), rgba(244, 234, 218, 0.88));
}

.subscription-compare-rows {
    display: grid;
    gap: 0;
}

.subscription-compare-row {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    text-align: center;
}

.subscription-compare-row:last-child {
    border-bottom: 0;
}

.subscription-compare-guide .subscription-compare-row {
    justify-content: flex-start;
    padding-inline: 4px;
}

.subscription-compare-guide .subscription-compare-row span,
.subscription-feature-guide strong {
    color: var(--muted-strong);
    font-weight: 800;
}

.subscription-compare-title {
    justify-content: center;
}

.subscription-compare-title h3 {
    margin: 0;
}

.subscription-meta-value {
    color: var(--ink);
    font-weight: 800;
}

.subscription-plan-badge {
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(176, 138, 89, 0.16);
    color: var(--accent-3);
    font-weight: 800;
}

.subscription-price-amount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.subscription-price-amount,
.subscription-price-block strong {
    font-size: 2.15rem;
    color: var(--ink);
    line-height: 1;
}

.subscription-price-secondary {
    color: var(--ink);
    font-weight: 700;
    font-size: 1.2rem;
}

.subscription-price-saving {
    display: inline-flex;
    justify-content: center;
    color: var(--accent);
    font-weight: 800;
    text-align: center;
}

.subscription-price-yearly-stack {
    display: grid;
    justify-items: center;
    gap: 6px;
    align-content: center;
}

.subscription-compare-row-yearly-guide,
.subscription-compare-row-yearly-value {
    min-height: 92px;
    align-items: center;
}

.subscription-price-yearly-stack.is-single-line {
    min-height: 56px;
}

.subscription-feature-block {
    display: grid;
    gap: 12px;
    align-content: start;
}

.subscription-feature-block strong {
    margin: 0;
}

.subscription-feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.subscription-feature-list li {
    position: relative;
    padding-right: 18px;
    color: var(--ink);
}

.subscription-feature-list li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0.7em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.subscription-feature-guide {
    color: var(--muted);
}

.subscriptions-upgrade-form,
.subscriptions-plan-state {
    margin-top: auto;
}

.subscriptions-note-actions {
    margin-top: 16px;
}

.subscription-inline-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.subscriptions-downgrade-form {
    gap: 10px;
}

.subscriptions-plan-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(11, 110, 79, 0.1);
    color: var(--accent);
    font-weight: 800;
}

.subscriptions-plan-state.is-soft {
    background: rgba(176, 138, 89, 0.12);
    color: var(--accent-3);
    line-height: 1.7;
}

.subscriptions-manage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.subscription-legal-panel {
    margin-top: 20px;
}

.subscription-payment-summary {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(248, 237, 225, 0.75);
    border: 1px solid rgba(210, 195, 172, 0.65);
}

.subscription-payment-summary strong {
    color: var(--ink);
}

.subscription-payment-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.subscription-admin-plan-choices {
    display: grid;
    gap: 10px;
}

.subscription-admin-plan-choice {
    display: block;
    cursor: pointer;
}

.subscription-admin-plan-choice input {
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.subscription-admin-plan-choice__body {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(210, 195, 172, 0.76);
    background: rgba(255, 255, 255, 0.72);
}

.subscription-admin-plan-choice input:checked + .subscription-admin-plan-choice__body {
    border-color: rgba(11, 110, 79, 0.54);
    box-shadow: 0 14px 30px rgba(11, 110, 79, 0.12);
}

.subscription-admin-plan-choice__body strong {
    color: var(--ink);
}

.subscription-admin-plan-choice__body small {
    color: var(--muted);
}

@media (max-width: 860px) {
    .subscriptions-hero {
        grid-template-columns: 1fr;
    }

    .subscriptions-manage-grid,
    .subscription-payment-fields {
        grid-template-columns: 1fr;
    }
}

.traditional-tree-image-frame {
    position: relative;
    width: 100%;
    min-width: 0;
    padding: 12px;
    min-height: 60vh;
    max-height: min(78vh, 980px);
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    user-select: none;
    background: rgba(255, 255, 255, 0.24);
    border-radius: 18px;
    contain: layout paint;
}

.traditional-tree-image-frame.is-dragging {
    cursor: grabbing;
}

.traditional-tree-image-stage {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.traditional-tree-image {
    display: block;
    width: auto;
    max-width: none;
    height: auto;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.65);
}

.traditional-tree-gesture-hint {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.traditional-tree-list,
.traditional-tree-list ul {
    position: relative;
    padding-top: 54px;
    margin: 0;
    display: flex;
    justify-content: center;
    list-style: none;
}

.traditional-tree-list ul::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    width: 8px;
    height: 48px;
    background: linear-gradient(180deg, rgba(91, 48, 12, 0.95), rgba(120, 72, 30, 0.82));
    border-radius: 999px;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(64, 43, 12, 0.12);
}

.traditional-tree-node-item {
    position: relative;
    padding: 54px 12px 0;
    text-align: center;
}

.traditional-tree-node-item::before,
.traditional-tree-node-item::after {
    content: "";
    position: absolute;
    top: 4px;
    width: 50%;
    height: 46px;
    border-top: 8px solid rgba(101, 56, 18, 0.9);
}

.traditional-tree-node-item::before {
    right: 50%;
    border-right: 8px solid rgba(101, 56, 18, 0.9);
    border-top-right-radius: 44px;
}

.traditional-tree-node-item::after {
    left: 50%;
    border-left: 8px solid rgba(101, 56, 18, 0.9);
    border-top-left-radius: 44px;
}

.traditional-tree-list > .traditional-tree-node-item::before,
.traditional-tree-list > .traditional-tree-node-item::after,
.traditional-tree-node-item:only-child::before,
.traditional-tree-node-item:only-child::after {
    display: none;
}

.traditional-tree-node-item:first-child::before,
.traditional-tree-node-item:last-child::after {
    border: 0;
}

.traditional-tree-scene {
    min-width: max-content;
    padding: 18px 24px 0;
}

.traditional-tree-canopy {
    position: relative;
    padding-bottom: 0;
}

.traditional-tree-trunk-wrap {
    display: grid;
    justify-items: center;
    margin-top: -10px;
}

.traditional-tree-root-plaque {
    min-width: 180px;
    max-width: 260px;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, #fff2cf, #f2ddaf);
    border: 2px solid rgba(154, 112, 40, 0.55);
    box-shadow: 0 12px 24px rgba(64, 43, 12, 0.16);
    text-align: center;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.traditional-tree-root-kicker {
    display: block;
    font-size: 0.78rem;
    color: #7a613b;
    margin-bottom: 4px;
    font-weight: 800;
}

.traditional-tree-trunk {
    width: 140px;
    min-height: 240px;
    margin-top: -10px;
    border-radius: 36px 36px 20px 20px;
    background:
        linear-gradient(90deg, rgba(64, 31, 7, 0.95), rgba(117, 67, 18, 0.94) 20%, rgba(86, 45, 10, 0.92) 50%, rgba(126, 74, 23, 0.94) 78%, rgba(61, 31, 8, 0.95)),
        repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0 6px, rgba(0, 0, 0, 0.04) 6px 12px);
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.06), 0 18px 30px rgba(64, 43, 12, 0.18);
}

.traditional-tree-ground {
    width: min(90%, 520px);
    height: 36px;
    margin-top: -8px;
    border-radius: 999px;
    background: radial-gradient(circle at center, rgba(94, 140, 42, 0.88), rgba(124, 175, 53, 0.98));
    filter: blur(0.2px);
}

.traditional-tree-node {
    box-shadow: 0 10px 22px rgba(38, 32, 24, 0.1);
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.traditional-tree-node.is-branch {
    width: 88px;
    min-width: 88px;
    min-height: 88px;
    padding: 14px 10px;
    border-radius: 50%;
    background: linear-gradient(180deg, #fff7e7, #f0ddba);
    border: 3px solid rgba(159, 119, 53, 0.5);
    display: grid;
    align-content: center;
    justify-items: center;
    margin-inline: auto;
    transform: translateY(-12px);
    box-shadow: 0 14px 28px rgba(95, 69, 24, 0.18);
}

.traditional-tree-node.is-leaf {
    width: 76px;
    min-width: 76px;
    min-height: 76px;
    padding: 12px 10px;
    border-radius: 50%;
    background: linear-gradient(180deg, #b7da3f, #80b11d);
    border: 3px solid rgba(91, 126, 22, 0.55);
    color: #20300a;
    display: grid;
    align-content: center;
    justify-items: center;
    margin-inline: auto;
    box-shadow: 0 14px 24px rgba(82, 120, 20, 0.18);
}

.traditional-tree-node.is-leaf.is-female {
    background: linear-gradient(180deg, #b6df53, #85b827);
}

.traditional-tree-node.is-leaf.is-deceased {
    background: linear-gradient(180deg, #c7bf56, #a59b2d);
}

.traditional-tree-node.is-branch.is-deceased {
    background: linear-gradient(180deg, #ede1ca, #d3c3a2);
}

.traditional-tree-node-name {
    font-weight: 800;
    line-height: 1.2;
    font-size: 0.95rem;
}

.traditional-tree-node-meta {
    margin-top: 6px;
    color: rgba(32, 48, 10, 0.78);
    font-size: 0.7rem;
}

.auth-shell {
    display: grid;
    place-items: center;
    min-height: 60vh;
}

.auth-card {
    width: min(480px, 100%);
    padding: 28px;
}

.auth-legal-note {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(248, 237, 225, 0.8);
    border: 1px solid rgba(210, 195, 172, 0.74);
}

.auth-legal-note p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.admin-panel table {
    width: 100%;
    border-collapse: collapse;
}

.admin-panel th,
.admin-panel td {
    text-align: right;
    padding: 14px 10px;
    border-bottom: 1px solid rgba(210, 195, 172, 0.5);
}

.action-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-readonly-grid {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(210, 195, 172, 0.75);
}

.admin-readonly-grid div {
    color: var(--muted);
}

.history-panel {
    display: grid;
    gap: 18px;
}

.history-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.history-filter-form {
    margin-bottom: 16px;
}

.history-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.history-list {
    display: grid;
    gap: 14px;
}

.history-entry {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(210, 195, 172, 0.75);
    display: grid;
    gap: 14px;
}

.history-entry-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.history-entry-head h3 {
    margin: 0 0 6px;
}

.history-entry-meta {
    display: grid;
    gap: 6px;
    color: var(--muted);
    text-align: left;
}

.history-entry-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.history-table-wrap {
    overflow-x: auto;
}

.history-panel table {
    width: 100%;
    border-collapse: collapse;
}

.history-panel th,
.history-panel td {
    text-align: right;
    padding: 14px 10px;
    border-bottom: 1px solid rgba(210, 195, 172, 0.5);
}

.biography-card,
.biography-editor-card {
    margin-top: 18px;
}

.biography-header,
.biography-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.biography-title-block {
    display: grid;
    gap: 8px;
}

.biography-title-block h2 {
    margin: 0;
}

.biography-sections-list {
    display: grid;
    gap: 18px;
}

.biography-content {
    line-height: 2;
    color: var(--ink);
}

.biography-content > :first-child {
    margin-top: 0;
}

.biography-content > :last-child {
    margin-bottom: 0;
}

.biography-content p,
.biography-content div,
.biography-content blockquote,
.biography-content ul,
.biography-content ol,
.biography-content h3,
.biography-content h4 {
    margin: 0 0 12px;
}

.biography-content ul,
.biography-content ol {
    padding-inline-start: 22px;
}

.biography-content blockquote {
    margin-inline: 0;
    padding: 12px 16px;
    border-inline-start: 4px solid rgba(123, 63, 0, 0.35);
    background: rgba(255, 248, 235, 0.8);
    border-radius: 12px;
}

.biography-content img,
.biography-inline-image {
    display: block;
    max-width: min(100%, 520px);
    height: auto;
    margin: 14px auto;
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(68, 47, 24, 0.16);
}

.biography-meta-line {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: #7d766d;
    font-size: 0.84rem;
}

.biography-edit-form {
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid rgba(210, 195, 172, 0.45);
}

.biography-editor-shell {
    display: grid;
    gap: 12px;
}

.biography-editor-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 248, 235, 0.92);
    border: 1px solid rgba(201, 178, 141, 0.5);
}

.biography-toolbar-btn {
    min-width: 0;
}

.biography-toolbar-btn.is-active,
.biography-toolbar-btn[aria-pressed="true"] {
    background: linear-gradient(135deg, #7b3f00, #a95e1a);
    color: #fff;
    border-color: rgba(123, 63, 0, 0.95);
    box-shadow: 0 10px 22px rgba(123, 63, 0, 0.2);
}

.biography-toolbar-picker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    color: #6b5a45;
    font-size: 0.9rem;
}

.biography-toolbar-picker input[type="color"] {
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.biography-toolbar-picker select {
    min-width: 72px;
    padding: 6px 8px;
}

.biography-editor-surface {
    min-height: 220px;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(201, 178, 141, 0.55);
    background: #fffdfa;
    line-height: 2;
    color: var(--ink);
    outline: none;
}

.biography-editor-surface:focus {
    border-color: rgba(123, 63, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(123, 63, 0, 0.08);
}

.biography-editor-surface:empty::before {
    content: attr(data-placeholder);
    color: #a18e77;
}

.biography-editor-help {
    min-height: 1.4em;
}

@media (max-width: 980px) {
    .workspace-grid,
    .detail-layout,
    .hero-bar {
        grid-template-columns: 1fr;
        display: grid;
    }

    .site-brand-logo {
        width: 72px;
        height: 40px;
    }

    .site-brand-copy strong {
        font-size: 1.2rem;
    }

    .landing-topbar,
    .site-rating-banner,
    .landing-hero,
    .landing-feature-grid,
    .landing-workflow-grid,
    .landing-section-split,
    .landing-launch-grid,
    .landing-proof-strip,
    .landing-metrics,
    .landing-form-grid,
    .promo-slide-hero,
    .promo-proof-grid,
    .promo-infographic-grid,
    .promo-role-grid,
    .promo-views-grid,
    .promo-privacy-grid,
    .promo-metric-row,
    .promo-tree-branch,
    .promo-tree-secondary,
    .platform-settings-section,
    .platform-settings-status-grid,
    .site-footer-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .biography-header,
    .biography-section-head {
        align-items: stretch;
    }

    .biography-editor-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .biography-toolbar-picker {
        justify-content: space-between;
    }

    .landing-topbar {
        justify-items: start;
    }

    .site-rating-banner {
        padding: 18px;
    }

    .landing-nav {
        width: 100%;
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .top-nav {
        display: none;
    }

    .mobile-nav-drawer-body .top-nav {
        display: grid;
        gap: 10px;
    }

    .mobile-nav-backdrop,
    .mobile-nav-drawer {
        display: block;
    }

    .landing-nav a,
    .landing-primary-action,
    .landing-secondary-action,
    .landing-login-button,
    .site-rating-form .btn-primary {
        width: 100%;
    }

    .landing-hero-copy {
        padding: 6px 0 0;
    }

    .landing-hero-copy h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .landing-topbar,
    .promo-topbar,
    .landing-feature-card,
    .landing-launch-card,
    .landing-flow-card,
    .promo-stage,
    .promo-info-card,
    .promo-role-card,
    .promo-view-card,
    .promo-slide,
    .site-footer,
    .platform-settings-card,
    .policy-card,
    .panel,
    .auth-card {
        padding: 18px;
    }

    .landing-proof-strip div,
    .landing-metrics article,
    .site-rating-score,
    .site-rating-count,
    .promo-proof-grid article,
    .promo-metric-row div,
    .platform-settings-section,
    .content-field-card,
    .contact-card-item {
        padding: 14px;
    }

    .promo-deck-intro,
    .promo-slide-launch {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .promo-deck-intro {
        display: grid;
    }

    .promo-deck-intro h1 {
        max-width: none;
    }

    .promo-slide {
        min-height: auto;
        padding: 22px;
    }

    .promo-cta-actions {
        justify-content: stretch;
    }

    .promo-cta-actions .btn-primary,
    .promo-cta-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .page-shell {
        width: min(100%, calc(100% - 16px));
        padding: 14px 0 28px;
    }

    .hero-bar {
        padding: 18px;
    }

    .row-grandparents,
    .row-upper,
    .row-focus {
        grid-template-columns: repeat(4, minmax(180px, 1fr));
    }

    .graph-stage {
        min-width: 900px;
    }

    .mini-tree-stage {
        min-width: 720px;
    }

    .traditional-tree-controls {
        grid-template-columns: 1fr;
    }

    .traditional-tree-check {
        margin-top: 0;
    }

    .focused-tree-page {
        width: calc(100vw - 12px);
        min-height: calc(100dvh - 130px);
        max-height: calc(100dvh - 130px);
        margin-inline: calc(50% - 50vw + 6px);
        padding: 12px;
    }

    .focused-tree-toolbar {
        align-items: flex-start;
    }

    .focused-tree-toolbar-title {
        text-align: right;
    }

    .focused-tree-toolbar-scope {
        width: 100%;
    }

    .focused-tree-viewport {
        height: calc(100vh - 250px);
    }
}

@media (max-width: 760px) {
    .hero-bar-nav-row {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-family-stat {
        width: 100%;
    }

    .hero-bar h1,
    .landing-hero-copy h1,
    .promo-deck-intro h1 {
        line-height: 1.14;
    }

    .mobile-nav-drawer-body .top-nav {
        gap: 10px;
    }

    .mobile-nav-drawer-body .top-nav a,
    .mobile-nav-drawer-body .nav-dropdown,
    .nav-dropdown-trigger,
    .nav-dropdown-action,
    .nav-dropdown-menu a {
        justify-content: flex-start;
        min-height: 44px;
        width: 100%;
    }

    .panel,
    .auth-card,
    .detail-card,
    .search-results,
    .policy-card,
    .promo-topbar,
    .promo-stage,
    .promo-info-card,
    .promo-role-card,
    .promo-view-card,
    .promo-slide {
        border-radius: 22px;
    }

    .promo-slide-rail {
        grid-auto-columns: calc(100vw - 28px);
        padding-bottom: 12px;
    }

    .promo-nav a,
    .promo-nav-cta {
        width: 100%;
        text-align: center;
    }

    .table-wrap {
        overflow: visible;
    }

    .table-wrap table,
    .table-wrap thead,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap th,
    .table-wrap td {
        display: block;
        width: 100%;
    }

    .table-wrap thead {
        display: none;
    }

    .table-wrap tbody {
        display: grid;
        gap: 14px;
    }

    .table-wrap tr {
        padding: 14px;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.78);
        border: 1px solid rgba(210, 195, 172, 0.75);
    }

    .table-wrap td {
        border-bottom: 1px solid rgba(210, 195, 172, 0.4);
        padding: 10px 0;
    }

    .table-wrap td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .table-wrap td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: 0.82rem;
        font-weight: 700;
    }

    .action-row {
        display: grid;
        gap: 8px;
    }

    .action-row form,
    .action-row button,
    .action-row .btn-secondary,
    .action-row .btn-danger {
        width: 100%;
    }

    .subscriptions-mobile-hint {
        display: block;
    }

    .subscriptions-comparison-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(248px, 78vw);
        grid-template-columns: none;
        overflow-x: auto;
        overflow-y: visible;
        padding: 4px 4px 14px;
        margin-inline: -4px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .subscriptions-comparison-grid .subscription-card {
        min-height: 100%;
        scroll-snap-align: start;
    }

    .subscriptions-comparison-grid .subscription-card-guide {
        position: sticky;
        right: 0;
        z-index: 2;
        width: 118px;
        min-width: 118px;
        padding: 16px 12px;
        box-shadow: 0 18px 38px rgba(38, 32, 24, 0.16);
    }

    .subscriptions-comparison-grid .subscription-card-guide .subscription-compare-row {
        justify-content: flex-start;
        padding: 10px 0;
    }

    .subscriptions-comparison-grid .subscription-card-guide .subscription-compare-row span {
        font-size: 0.92rem;
    }

    .subscriptions-comparison-grid .subscription-card-guide .subscription-feature-guide p {
        font-size: 0.84rem;
        line-height: 1.55;
    }

    .modal-card {
        width: min(100%, calc(100vw - 20px));
        padding: 18px;
        max-height: min(calc(100dvh - 20px), calc(100svh - 20px), calc(100vh - 20px));
        overflow-y: auto;
    }

    .auth-shell,
    .platform-settings-shell,
    .policy-shell {
        align-items: start;
    }

    .search-home-panel {
        width: 100%;
    }

    .detail-layout {
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }

    .detail-card,
    .graph-canvas {
        min-height: 180px;
        padding: 14px;
        width: 100%;
        max-width: 100%;
    }

    .person-summary {
        padding: 12px;
        border-radius: 18px;
    }

    .person-summary-head {
        grid-template-columns: 1fr;
    }

    .person-primary-card,
    .person-secondary-card,
    .visual-tree-stage,
    .close-tree-grid,
    .summary-stats-grid,
    .spouse-groups {
        min-width: 0;
        max-width: 100%;
    }

    .person-secondary-card {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .person-photo-image {
        width: 100%;
        height: 100%;
    }

    .person-photo-shell,
    .person-photo-frame {
        width: min(100%, 168px);
        height: 168px;
    }

    .person-photo-editor-preview,
    .person-photo-editor-preview .person-photo-frame {
        width: min(100%, 176px);
        height: 176px;
    }

    .summary-name {
        font-size: 1.3rem;
    }

    .summary-actions,
    .history-actions,
    .family-directory-actions,
    .focused-tree-toolbar-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .summary-actions > *,
    .history-actions > *,
    .family-directory-actions > *,
    .focused-tree-toolbar-actions > * {
        width: 100%;
    }

    .person-library {
        max-height: none;
    }

    .person-pill,
    .close-chip,
    .action-tile,
    .summary-stat-item {
        width: 100%;
    }

    .graph-stage {
        min-width: 860px;
        min-height: 460px;
    }

    .person-node {
        width: 150px;
        padding: 12px;
    }

    .person-node.is-focus {
        width: 190px;
        min-height: 96px;
    }

    .focused-tree-page {
        width: calc(100vw - 8px);
        min-height: calc(100vh - 110px);
        margin-inline: calc(50% - 50vw + 4px);
        padding: 10px;
        border-radius: 20px;
    }

    .focused-tree-canvas {
        min-height: 560px;
    }

    .focused-tree-toolbar {
        gap: 10px;
    }

    .focused-tree-toolbar-title h3 {
        font-size: 1.1rem;
    }

    .focused-tree-viewport {
        height: calc(100vh - 210px);
        border-radius: 18px;
    }

    .traditional-tree-page {
        gap: 14px;
    }

    .traditional-tree-controls {
        gap: 10px;
    }

    .traditional-tree-root-picker,
    .traditional-tree-layout-picker,
    .traditional-tree-check,
    .traditional-tree-apply-button {
        width: 100%;
    }

    .traditional-tree-canvas {
        min-height: 52vh;
        padding: 10px;
        border-radius: 18px;
    }

    .traditional-tree-image-frame {
        padding: 4px;
    }

    .mini-tree-stage {
        min-width: 560px;
        padding: 6px 0;
    }

    .mini-tree-row {
        gap: 12px;
        margin-bottom: 18px;
    }

    .row-grandparents,
    .row-upper,
    .row-focus {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }

    .row-children,
    .row-grandchildren {
        grid-template-columns: minmax(210px, 1fr);
    }

    .mini-tree-group {
        gap: 8px;
        padding: 10px;
        border-radius: 16px;
    }

    .mini-tree-group-title {
        font-size: 0.8rem;
    }

    .mini-tree-items,
    .chip-list {
        gap: 6px;
    }

    .close-row {
        gap: 8px;
    }

    .close-row h4,
    .visual-tree-header h4 {
        font-size: 0.95rem;
    }

    .visual-tree-header p {
        font-size: 0.82rem;
    }

    .close-chip {
        padding: 7px 8px;
        border-radius: 12px;
        font-size: 0.72rem;
        line-height: 1.35;
    }

    .mini-tree-line {
        stroke-width: 2;
    }

    .person-secondary-card .mini-tree-stage {
        min-width: 420px;
        padding: 2px 0;
    }

    .person-secondary-card .mini-tree-row {
        gap: 8px;
        margin-bottom: 12px;
    }

    .person-secondary-card .row-grandparents,
    .person-secondary-card .row-upper,
    .person-secondary-card .row-focus {
        grid-template-columns: repeat(4, minmax(110px, 1fr));
    }

    .person-secondary-card .row-grandparents .slot-p-grand,
    .person-secondary-card .row-focus .slot-spouses,
    .person-secondary-card .row-upper .slot-p-uncles {
        grid-column: 1;
    }

    .person-secondary-card .row-grandparents .slot-grand-spacer,
    .person-secondary-card .row-upper .slot-parents {
        grid-column: 2 / span 2;
    }

    .person-secondary-card .row-focus .slot-focus {
        grid-column: 2 / span 2;
    }

    .person-secondary-card .row-grandparents .slot-m-grand,
    .person-secondary-card .row-focus .slot-siblings,
    .person-secondary-card .row-upper .slot-m-uncles {
        grid-column: 4;
    }

    .person-secondary-card .row-children,
    .person-secondary-card .row-grandchildren {
        grid-template-columns: minmax(160px, 1fr);
    }

    .person-secondary-card .mini-tree-group {
        gap: 6px;
        padding: 6px;
        border-radius: 12px;
    }

    .person-secondary-card .mini-tree-group-title,
    .person-secondary-card .visual-tree-header p {
        font-size: 0.68rem;
        line-height: 1.35;
    }

    .person-secondary-card .close-row h4,
    .person-secondary-card .visual-tree-header h4 {
        font-size: 0.78rem;
        line-height: 1.3;
    }

    .person-secondary-card .mini-tree-items,
    .person-secondary-card .chip-list {
        gap: 4px;
        justify-content: flex-start;
    }

    .person-secondary-card .close-chip {
        width: auto;
        max-width: 100%;
        flex: 0 0 auto;
        padding: 5px 6px;
        border-radius: 10px;
        font-size: 0.6rem;
        line-height: 1.2;
    }

    .person-secondary-card .mini-tree-line {
        stroke-width: 1.6;
    }

    .mini-tree-canvas,
    .graph-canvas,
    .traditional-tree-canvas,
    .focused-tree-canvas {
        overflow-x: auto;
        overflow-y: auto;
        max-width: 100%;
    }

    .search-results,
    .person-picker-results {
        max-height: 45vh;
        overflow-y: auto;
    }

    .approval-actions-grid {
        grid-template-columns: 1fr;
    }

    .calendar-date-popover {
        width: 100%;
    }

    .calendar-date-grid {
        grid-template-columns: 1fr;
    }

    .calendar-date-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .person-action-toolbar {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .person-action-toolbar > * {
        width: auto;
        flex: 0 0 auto;
    }

    .person-action-toolbar .person-action-btn {
        width: 48px;
        min-width: 48px;
    }

    .inline-relative-composer .relation-chip-list {
        grid-template-columns: repeat(auto-fit, minmax(72px, 88px));
        justify-content: center;
    }

    .inline-relative-composer .relation-chip-option {
        width: auto;
    }

    .inline-relative-composer .relation-chip {
        width: 100%;
    }
}
