:root {
    --charcoal-canvas: #0c0e0c;
    --charcoal-bg: rgba(20, 24, 22, 0.85);
    --glass-panel: rgba(15, 18, 16, 0.22); /* highly see-through glass */
    --glass-panel-strong: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.14); /* clean silver border line */
    --glass-border-strong: rgba(255, 255, 255, 0.22);
    --sage-accent: #c5a059; /* premium sandstone gold */
    --mint-accent: #ded5c6; /* warm sand */
    --coral-alert: #e08a85;
    --danger: var(--coral-alert);
    --success: #8fae9b;
    --border: var(--glass-border);
    --surface-elevated: var(--glass-panel-strong);
    --gold-glow: #ebd79e;
    --text-white: #ffffff;
    --text-muted: #e5e7eb; /* high-contrast light grey for readability */
    --text-dim: #9ca3af; /* silver/grey secondary label text */
    --shadow-glass: 0 20px 50px rgba(0, 0, 0, 0.45);
    --font-ui: "Inter", system-ui, sans-serif;
    --font-display: "Outfit", "Inter", sans-serif;
    --radius: 8px;
    --radius-lg: 12px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--charcoal-canvas);
}

body {
    position: relative;
    min-height: 100vh;
    margin: 0;
    color: var(--text-white);
    background: transparent; /* fix blocking background images */
    font-family: var(--font-ui);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background image with transparent charcoal overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image: url("assets/backgrounds/moss-digital-path.webp");
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    filter: saturate(0.55) brightness(0.55) contrast(1.15);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 75% 15%, rgba(197, 160, 89, 0.08), transparent 35%),
        linear-gradient(180deg, rgba(6, 9, 7, 0.35), rgba(6, 9, 7, 0.65) 75%, var(--charcoal-canvas) 100%);
}

.background-stage {
    position: fixed;
    inset: 0;
    z-index: -4;
    overflow: hidden;
    background: #0b0d0c;
    pointer-events: none;
}

.background-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 9, 7, 0.75), rgba(6, 9, 7, 0.35) 50%, rgba(6, 9, 7, 0.72)),
        linear-gradient(180deg, rgba(6, 9, 7, 0.35), rgba(6, 9, 7, 0.88));
}

.background-slide {
    position: absolute;
    inset: -5%;
    background-position: center;
    background-size: cover;
    filter: saturate(0.5) contrast(1.15) brightness(0.55);
    opacity: 0.18;
    transform: scale(1.02);
}

.slide-one {
    background-image: url("assets/backgrounds/tech-tree-circuit.jpg");
    opacity: 0.12;
}

.slide-two {
    background-image: url("assets/backgrounds/moss-digital-path.webp");
    opacity: 0.18;
    transform: translateX(6%) scale(1.03);
}

.slide-three {
    background-image: url("assets/backgrounds/holographic-tree.jpg");
    opacity: 0.1;
    transform: translateX(-8%) scale(1.04);
}

button {
    color: inherit;
    font: inherit;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1, h2, h3 {
    letter-spacing: -0.015em;
    font-family: var(--font-display);
    color: var(--text-white);
}

h1 {
    margin-bottom: 0.25em;
    font-size: 44px;
    line-height: 1.1;
    font-weight: 400;
}

h2 {
    margin-bottom: 0.3em;
    font-size: 23px;
    line-height: 1.25;
    font-weight: 500;
}

p {
    color: var(--text-muted);
    font-weight: 300;
}

.advisor-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
}

.workspace {
    width: 100%;
    margin: 0;
}

.auth-gate {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 32px));
    margin: 40px auto 0;
}

/* Glass Panels with Tech Corner Accents */
.auth-gate,
.context-bar,
.page-question,
.attention-lane,
.data-panel,
.connection-panel,
.directory-search,
.connection-summary,
.household-directory,
.detail-section,
.insight-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    background: var(--glass-panel);
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(40px) saturate(1.2);
    transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Asymmetric Tech Brackets in Corners */
.auth-gate::before, .top-nav::before, .context-bar::before, .page-question::before,
.attention-lane::before, .data-panel::before, .connection-panel::before,
.household-header::before, .directory-search::before, .detail-section::before,
.insight-card::before, .household-directory::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 6px; height: 6px;
    border-top: 1.5px solid var(--sage-accent);
    border-left: 1.5px solid var(--sage-accent);
    pointer-events: none;
    z-index: 2;
}

.auth-gate::after, .top-nav::after, .context-bar::after, .page-question::after,
.attention-lane::after, .data-panel::after, .connection-panel::after,
.household-header::after, .directory-search::after, .detail-section::after,
.insight-card::after, .household-directory::after {
    content: "";
    position: absolute;
    bottom: 0; right: 0;
    width: 6px; height: 6px;
    border-bottom: 1.5px solid var(--sage-accent);
    border-right: 1.5px solid var(--sage-accent);
    pointer-events: none;
    z-index: 2;
}

.data-panel:hover, .insight-card:hover, .detail-section:hover, .attention-lane:hover {
    border-color: var(--glass-border-strong);
    background: var(--glass-panel-strong);
    transform: translateY(-1px);
}

/* Auth Gate Grid */
.auth-gate {
    min-height: calc(100vh - 100px);
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) auto;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
    padding: clamp(24px, 6vw, 64px);
    background:
        linear-gradient(135deg, rgba(197, 160, 89, 0.12), rgba(14, 19, 16, 0.8) 50%, rgba(197, 160, 89, 0.02)),
        rgba(14, 19, 16, 0.5);
    border-color: rgba(197, 160, 89, 0.25);
}

.auth-copy {
    max-width: 760px;
}

.auth-gate[hidden],
.workspace[hidden],
.app-page,
.household-detail[hidden] {
    display: none;
}

.workspace {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    padding: 0;
    margin: 0;
    max-width: 100%;
    height: 100vh;
    overflow: hidden;
}

.workspace-sidebar {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px 24px;
    border-right: 1px solid var(--glass-border);
    border-top: none;
    border-left: none;
    border-bottom: none;
    border-radius: 0;
    background: rgba(14, 18, 16, 0.9);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(40px) saturate(1.1);
    overflow-y: auto;
    z-index: 10;
}

.workspace-sidebar::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 6px; height: 6px;
    border-top: 1.5px solid var(--sage-accent);
    border-left: 1.5px solid var(--sage-accent);
    pointer-events: none;
}

.workspace-sidebar::after {
    content: "";
    position: absolute;
    bottom: 0; right: 0;
    width: 6px; height: 6px;
    border-bottom: 1.5px solid var(--sage-accent);
    border-right: 1.5px solid var(--sage-accent);
    pointer-events: none;
}

.workspace-main-content {
    height: 100vh;
    overflow-y: auto;
    padding: 40px 48px;
    min-width: 0;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(197, 160, 89, 0.1);
}

.sidebar-session {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.email-badge {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-white);
    word-break: break-all;
    font-family: var(--font-display);
}

.status-indicator {
    font-size: 10px;
    color: var(--sage-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.meta-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 4px;
    font-size: 12px;
}

.meta-list span {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
}

.meta-list em {
    font-style: normal;
    color: var(--text-white);
    font-weight: 500;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-actions .status-chip {
    width: 100%;
    justify-content: center;
}

.btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.button.compact {
    min-height: 32px;
    padding: 4px 12px;
    font-size: 12px;
}

.brand-row,
.command-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-row {
    min-width: 0;
}

.brand-row strong,
.brand-row span,
.context-bar b,
.context-bar em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-row strong {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

.brand-row span {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 400;
}

.brand-mark {
    width: 40px;
    aspect-ratio: 1;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: var(--radius);
    color: var(--sage-accent);
    background:
        linear-gradient(135deg, rgba(197, 160, 89, 0.14), rgba(255, 255, 255, 0.01)),
        rgba(11, 15, 12, 0.6);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 500;
}

.auth-gate .brand-mark {
    width: 68px;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Navigation tabs in sidebar */
.workspace-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.workspace-sidebar .nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
}

.workspace-sidebar .nav-link:hover {
    color: var(--text-white);
    background: rgba(197, 160, 89, 0.08);
}

.workspace-sidebar .nav-link.active {
    background: rgba(197, 160, 89, 0.18);
    color: var(--text-white);
    border: 1px solid rgba(197, 160, 89, 0.25);
}

/* Household account overview */
.accounts-overview {
    gap: 22px;
}

.accounts-hero,
.holdings-account-filter {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 26px;
    border: 1px solid var(--border-color, rgba(143, 174, 155, 0.22));
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.1), rgba(120, 156, 133, 0.06));
}

.accounts-total > strong {
    display: block;
    margin-top: 5px;
    color: var(--text-white, #f5f1e8);
    font: 500 clamp(2.35rem, 5vw, 4.35rem)/1 var(--font-display);
    letter-spacing: -0.04em;
}

.accounts-total > p:last-child,
.holdings-account-filter span {
    display: block;
    margin-top: 9px;
    color: var(--text-muted, #a7aaa5);
    font-size: 0.79rem;
}

.accounts-total-change {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
    font-size: 0.78rem;
}

.accounts-total-change.up { color: #8fbd9d; }
.accounts-total-change.down { color: #e08a85; }

.accounts-range-filter {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(143, 174, 155, 0.22);
    border-radius: 999px;
    background: rgba(9, 14, 12, 0.45);
}

.accounts-range-filter button {
    min-width: 44px;
    padding: 8px 11px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted, #a7aaa5);
    font: inherit;
    font-size: 0.73rem;
    font-weight: 700;
    cursor: pointer;
}

.accounts-range-filter button:hover,
.accounts-range-filter button:focus-visible { color: var(--text-white, #fff); }
.accounts-range-filter button.active { background: #c5a059; color: #141413; }

.accounts-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.accounts-summary-grid article {
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid rgba(143, 174, 155, 0.18);
    border-radius: 14px;
    background: rgba(19, 26, 23, 0.65);
}

.accounts-summary-grid span,
.accounts-summary-grid em {
    display: block;
    color: var(--text-muted, #a7aaa5);
    font-size: 0.7rem;
    font-style: normal;
}

.accounts-summary-grid strong {
    display: block;
    margin: 7px 0 5px;
    color: var(--text-white, #f5f1e8);
    font-size: 1.24rem;
}

.account-value-panel { padding: 20px 22px 14px; }
.account-value-panel .panel-heading > span { color: #c5a059; font-weight: 700; }

.account-value-chart {
    min-height: 280px;
    margin-top: 8px;
}

.account-value-chart svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.account-chart-grid line { stroke: rgba(222, 213, 198, 0.12); stroke-width: 1; }
.account-chart-grid text { fill: var(--text-muted, #a7aaa5); font-size: 11px; }
.account-chart-area { fill: rgba(197, 160, 89, 0.1); }
.account-chart-line { fill: none; stroke: #c5a059; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.account-chart-end { fill: #c5a059; stroke: #171c19; stroke-width: 3; }

.account-chart-note {
    margin: 5px 0 0;
    color: var(--text-muted, #a7aaa5);
    font-size: 0.72rem;
}

.account-source-section {
    padding: 22px;
    border: 1px solid rgba(143, 174, 155, 0.18);
    border-radius: 18px;
    background: rgba(15, 21, 18, 0.54);
}

.account-source-section.client { border-color: rgba(197, 160, 89, 0.28); }

.account-source-heading,
.account-type-heading,
.account-card-main,
.account-card-trend,
.account-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.account-source-heading { align-items: flex-start; margin-bottom: 22px; }
.account-source-heading h2 { margin: 3px 0 5px; }
.account-source-heading p:last-child { max-width: 640px; margin: 0; color: var(--text-muted, #a7aaa5); font-size: 0.8rem; }
.account-source-heading > div:last-child { text-align: right; }
.account-source-heading > div:last-child strong { display: block; color: var(--text-white, #fff); font-size: 1.3rem; }
.account-source-heading > div:last-child span { color: var(--text-muted, #a7aaa5); font-size: 0.72rem; }

.account-type-group + .account-type-group { margin-top: 24px; }
.account-type-heading { margin-bottom: 10px; padding-bottom: 9px; border-bottom: 1px solid rgba(143, 174, 155, 0.14); }
.account-type-heading h3 { margin: 0; font-size: 0.92rem; }
.account-type-heading span { color: var(--text-muted, #a7aaa5); font-size: 0.68rem; }
.account-type-heading > strong { font-size: 0.9rem; }

.account-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.account-overview-card {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(143, 174, 155, 0.16);
    border-radius: 13px;
    background: rgba(25, 33, 29, 0.62);
}

.account-card-main { align-items: flex-start; }
.account-card-title { display: flex; min-width: 0; align-items: center; gap: 10px; }
.account-card-title > div { min-width: 0; }
.account-card-title strong,
.account-card-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card-title strong { color: var(--text-white, #fff); font-size: 0.86rem; }
.account-card-title span { margin-top: 3px; color: var(--text-muted, #a7aaa5); font-size: 0.66rem; }
.account-card-value { flex: 0 0 auto; text-align: right; }
.account-card-value strong { display: block; color: var(--text-white, #fff); font-size: 0.96rem; }
.account-card-value span { color: var(--text-muted, #a7aaa5); font-size: 0.62rem; }

.account-type-icon { width: 11px; height: 11px; flex: 0 0 auto; border-radius: 3px; background: #789c85; box-shadow: 0 0 0 4px rgba(120, 156, 133, 0.12); }
.account-type-icon.investment { background: #c5a059; box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.12); }
.account-type-icon.credit,
.account-type-icon.mortgage,
.account-type-icon.loan { background: #e08a85; box-shadow: 0 0 0 4px rgba(224, 138, 133, 0.12); }

.account-card-trend { margin-top: 14px; padding-top: 11px; border-top: 1px solid rgba(143, 174, 155, 0.11); }
.account-card-trend svg { width: 132px; max-width: 42%; height: 40px; }
.account-card-trend polyline { fill: none; stroke: #8fbd9d; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.account-card-trend.down polyline { stroke: #e08a85; }
.account-card-trend > div { text-align: right; }
.account-card-trend strong,
.account-card-trend span { display: block; }
.account-card-trend strong { color: #8fbd9d; font-size: 0.8rem; }
.account-card-trend.down strong { color: #e08a85; }
.account-card-trend span { color: var(--text-muted, #a7aaa5); font-size: 0.62rem; }

.account-card-footer { margin-top: 10px; justify-content: flex-start; color: var(--text-muted, #a7aaa5); font-size: 0.62rem; }
.account-card-footer > span:nth-child(2) { margin-left: auto; }
.source-chip { padding: 4px 7px; border-radius: 999px; background: rgba(120, 156, 133, 0.12); color: #9cc2aa; }
.source-chip.client { background: rgba(197, 160, 89, 0.12); color: #ddc481; }
.account-card-footer button { padding: 0; border: 0; background: none; color: #d8bf7f; font: inherit; font-weight: 700; cursor: pointer; }
.account-card-footer button:hover { color: #fff; }

.holdings-account-filter { align-items: center; }
.holdings-account-filter > div strong { display: block; color: var(--text-white, #fff); font-size: 1.15rem; }
.holdings-account-filter label { color: var(--text-muted, #a7aaa5); font-size: 0.68rem; }
.holdings-account-filter select { display: block; min-width: 230px; margin-top: 5px; padding: 9px 12px; border: 1px solid rgba(143, 174, 155, 0.26); border-radius: 9px; background: #141a17; color: var(--text-white, #fff); }

@media (max-width: 980px) {
    .accounts-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .accounts-hero,
    .holdings-account-filter,
    .account-source-heading { align-items: stretch; flex-direction: column; }
    .accounts-range-filter { align-self: flex-start; max-width: 100%; }
    .accounts-range-filter button { min-width: 38px; padding-inline: 8px; }
    .accounts-summary-grid { grid-template-columns: 1fr; }
    .account-source-heading > div:last-child { text-align: left; }
    .account-card-main { flex-direction: column; }
    .account-card-value { text-align: left; }
    .holdings-account-filter select { min-width: 0; width: 100%; }
}

/* Compact household shell and client-first insurance workspace */
.household-header-strip {
    gap: 0;
    margin-bottom: 14px;
}

.household-dossier-header {
    min-height: 0;
    grid-template-columns: auto minmax(260px, 1fr) minmax(380px, auto) auto;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 6px 6px 0 0;
}

.household-back-button,
.household-settings-button {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--book-line);
    border-radius: 50%;
    background: #fffdf8;
    color: var(--book-ink);
    cursor: pointer;
}

.household-back-button:hover,
.household-settings-button:hover,
.household-settings-button[aria-expanded="true"] {
    border-color: var(--book-gold);
    background: #f7ecd8;
    color: #725424;
}

.household-settings-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.household-dossier-header .dossier-title-group {
    min-width: 0;
}

.household-dossier-header .dossier-title-group h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(25px, 2.5vw, 36px);
    line-height: 1.05;
}

.household-tab-description {
    max-width: 720px;
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--book-muted);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.household-dossier-header .dossier-metrics-group {
    gap: 18px;
}

.household-dossier-header .dossier-metric-item {
    gap: 2px;
}

.household-dossier-header .net-worth-badge {
    color: var(--book-ink);
    font-size: 25px;
}

.household-dossier-header .dossier-metric-item.lede-item {
    max-width: 270px;
}

.household-settings-actions,
.household-settings,
.insurance-attestation-anchor {
    position: relative;
}

.household-settings-menu {
    position: absolute;
    z-index: 45;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    gap: 7px;
    width: 285px;
    padding: 10px;
    border: 1px solid var(--book-line-strong);
    border-radius: 6px;
    background: #fffdf8;
    box-shadow: 0 16px 44px rgba(55, 47, 34, 0.18);
}

.household-settings-menu[hidden] {
    display: none;
}

.household-settings-menu > strong {
    padding: 4px 6px 2px;
    color: var(--book-dim);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.household-settings-menu button {
    display: grid;
    gap: 3px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--book-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.household-settings-menu button:hover {
    background: #f7ecd8;
}

.household-settings-menu button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.household-settings-menu button span {
    color: var(--book-muted);
    font-size: 11px;
    font-weight: 500;
}

.household-tabs-root {
    min-width: 0;
}

.household-tabs-root .household-subtabs-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 8px;
    border: 1px solid var(--book-line);
    border-top: 0;
    border-radius: 0 0 6px 6px;
    background: #fffdf8;
    scrollbar-width: thin;
}

.household-tabs-root .household-subtabs-nav .household-tab {
    position: relative;
    flex: 1 0 auto;
    width: auto;
    min-width: max-content;
    min-height: 42px;
    padding: 9px 13px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--book-muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.1;
    white-space: nowrap;
}

.household-tabs-root .household-subtabs-nav .household-tab:hover {
    background: #fbf5e9;
    color: var(--book-ink);
}

.household-tabs-root .household-subtabs-nav .household-tab.active {
    background: transparent;
    color: #725424;
}

.household-tabs-root .household-subtabs-nav .household-tab.active::after {
    right: 10px;
    bottom: 0;
    left: 10px;
    height: 3px;
    background: var(--book-gold);
}

.insurance-premium-outlook,
.insurance-member-card,
.insurance-payment-evidence {
    border: 1px solid var(--book-line);
    border-radius: 6px;
    background: #fffdf8;
    color: var(--book-ink);
    box-shadow: none;
}

.insurance-premium-outlook {
    padding: 20px;
}

.insurance-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.insurance-section-heading h2,
.insurance-section-heading p,
.insurance-section-heading span {
    margin: 0;
}

.insurance-section-heading h2 {
    color: var(--book-ink);
    font-family: var(--font-ui);
    font-size: 22px;
    line-height: 1.15;
}

.insurance-section-heading > div > span {
    display: block;
    margin-top: 5px;
    color: var(--book-muted);
    font-size: 12px;
}

.insurance-status-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #ddb16a;
    border-radius: 50%;
    background: #fff4df;
    color: #8b5e18;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.insurance-status-icon.ok {
    border-color: #b8c9ad;
    background: #eff6ea;
    color: var(--book-green);
}

.insurance-attestation-popover {
    position: absolute;
    z-index: 42;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 48px));
    padding: 14px;
    border: 1px solid var(--book-line-strong);
    border-radius: 6px;
    background: #fffdf8;
    box-shadow: 0 16px 44px rgba(55, 47, 34, 0.18);
}

.insurance-attestation-popover strong {
    color: var(--book-ink);
}

.insurance-attestation-popover p {
    color: var(--book-muted);
    font-size: 12px;
    line-height: 1.45;
}

.insurance-attestation-popover select {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--book-line-strong);
    border-radius: 4px;
    background: #fffaf0;
    color: var(--book-ink);
}

.premium-outlook-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.premium-outlook-metrics article {
    display: grid;
    gap: 5px;
    padding: 13px 14px;
    border: 1px solid var(--book-line);
    border-radius: 4px;
    background: #fffaf1;
}

.premium-outlook-metrics article.needs-review {
    border-color: #e1be83;
    background: #fff8e9;
}

.premium-outlook-metrics span,
.premium-outlook-metrics em {
    color: var(--book-muted);
    font-size: 10px;
    font-style: normal;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.premium-outlook-metrics strong {
    color: var(--book-ink);
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 500;
}

.premium-fallback-warning {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #e1be83;
    border-radius: 4px;
    background: #fff8e9;
    color: #77551c;
    font-size: 11px;
    line-height: 1.45;
}

.premium-fallback-warning > span {
    display: grid;
    flex: 0 0 18px;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid #d3a861;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 900;
}

.premium-fallback-warning p {
    margin: 0;
}

.premium-fallback-warning strong {
    color: #654714;
}

.premium-outlook-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
    margin-top: 18px;
}

.premium-upcoming-list,
.premium-account-list {
    display: grid;
    align-content: start;
    gap: 8px;
}

.premium-subheading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--book-line);
}

.premium-subheading strong {
    color: var(--book-ink);
    font-size: 13px;
}

.premium-subheading span {
    color: var(--book-muted);
    font-size: 11px;
}

.premium-upcoming-list > article,
.premium-account-list > article {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--book-line);
    border-radius: 4px;
    background: #fffefa;
}

.premium-upcoming-list > article {
    grid-template-columns: minmax(0, 1fr) auto;
}

.premium-upcoming-list article > div,
.premium-account-list article > div:first-child {
    display: grid;
    gap: 3px;
}

.premium-upcoming-list article > div:last-child {
    text-align: right;
}

.premium-upcoming-list article strong,
.premium-account-list article strong {
    color: var(--book-ink);
    font-size: 12px;
}

.premium-upcoming-list article span,
.premium-account-list article span {
    color: var(--book-muted);
    font-size: 11px;
}

.premium-account-list > article {
    padding-right: 98px;
}

.premium-account-list > article.shortfall {
    border-color: #e4b4ad;
    background: #fff8f6;
}

.premium-account-list > article > b {
    position: absolute;
    top: 11px;
    right: 11px;
    padding: 4px 6px;
    border: 1px solid #b8c9ad;
    background: #eff6ea;
    color: var(--book-green);
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.premium-account-list > article.shortfall > b {
    border-color: #e4b4ad;
    background: #fff0ed;
    color: var(--book-red);
}

.premium-account-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.premium-account-values > span {
    display: grid;
    gap: 2px;
}

.premium-account-values em {
    color: var(--book-dim);
    font-size: 9px;
    font-style: normal;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.insurance-client-section {
    display: grid;
    gap: 13px;
    margin-top: 18px;
}

.insurance-add-policy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 9px;
    border: 0;
    background: transparent;
    color: #725424;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.insurance-add-policy:hover {
    background: #f7ecd8;
}

.insurance-member-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.insurance-member-card {
    min-width: 0;
    overflow: hidden;
}

.insurance-member-card.unassigned {
    border-color: #dfbd84;
}

.insurance-member-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 17px 13px;
}

.insurance-member-card > header h3,
.insurance-member-card > header p {
    margin: 0;
}

.insurance-member-card > header h3 {
    color: var(--book-ink);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
}

.insurance-member-card > header > span {
    color: var(--book-muted);
    font-size: 11px;
}

.insurance-member-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    padding: 0 12px;
    border-top: 1px solid var(--book-line);
    border-bottom: 1px solid var(--book-line);
    scrollbar-width: thin;
}

.insurance-member-tabs button {
    flex: 1 0 auto;
    min-width: max-content;
    padding: 10px 8px 9px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--book-muted);
    font: inherit;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
}

.insurance-member-tabs button span {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    margin-left: 3px;
    border-radius: 999px;
    background: #eee5d5;
    color: var(--book-muted);
    font-size: 9px;
}

.insurance-member-tabs button.active {
    border-bottom-color: var(--book-gold);
    color: #725424;
}

.insurance-member-policies {
    display: grid;
    gap: 10px;
    padding: 13px;
}

.insurance-household-policy {
    display: grid;
    gap: 13px;
    padding: 14px;
    border: 1px solid var(--book-line);
    border-left: 3px solid var(--book-gold);
    border-radius: 4px;
    background: #fffefa;
    color: var(--book-ink);
}

.insurance-policy-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.insurance-policy-heading h4 {
    margin: 5px 0 3px;
    color: var(--book-ink);
    font-size: 15px;
    line-height: 1.25;
}

.insurance-policy-heading > div > span {
    color: var(--book-muted);
    font-size: 11px;
}

.insurance-policy-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.insurance-policy-badges b {
    padding: 3px 5px;
    border: 1px solid #b8c9ad;
    background: #eff6ea;
    color: var(--book-green);
    font-size: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.insurance-policy-badges b.shared {
    border-color: #dac08c;
    background: #fff5df;
    color: #76571f;
}

.insurance-policy-badges b.policy-number-needed {
    border-color: #e3b6a6;
    background: #fff1eb;
    color: #913f31;
}

.insurance-policy-edit {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    padding: 0;
    border: 1px solid var(--book-line);
    border-radius: 50%;
    background: #fffdf8;
    color: var(--book-muted);
    cursor: pointer;
}

.insurance-policy-edit:hover {
    border-color: var(--book-gold);
    color: #725424;
}

.insurance-policy-edit svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.insurance-policy-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
}

.insurance-policy-details > span {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding-top: 7px;
    border-top: 1px solid #eee5d5;
}

.insurance-policy-details em {
    color: var(--book-dim);
    font-size: 8px;
    font-style: normal;
    font-weight: 750;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.insurance-policy-details strong {
    overflow-wrap: anywhere;
    color: var(--book-ink);
    font-size: 11px;
    font-weight: 650;
}

.insurance-policy-details .needs-review strong {
    color: #946116;
}

.insurance-compact-empty {
    padding: 16px;
    border: 1px dashed var(--book-line-strong);
    border-radius: 4px;
    background: #fffaf1;
    color: var(--book-muted);
    font-size: 11px;
    line-height: 1.45;
}

.insurance-payment-evidence {
    margin-top: 18px;
}

.insurance-payment-evidence > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    list-style: none;
    cursor: pointer;
}

.insurance-payment-evidence > summary::-webkit-details-marker {
    display: none;
}

.insurance-payment-evidence > summary > span:first-child {
    display: grid;
    gap: 3px;
}

.insurance-payment-evidence > summary b {
    color: var(--book-ink);
    font-size: 13px;
}

.insurance-payment-evidence > summary em {
    color: var(--book-muted);
    font-size: 10px;
    font-style: normal;
}

.insurance-payment-evidence[open] > summary > span:last-child {
    transform: rotate(45deg);
}

.insurance-payment-evidence-body {
    padding: 0 16px 16px;
    border-top: 1px solid var(--book-line);
}

.insurance-policy-modal-backdrop {
    position: fixed;
    z-index: 1300;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(45, 38, 28, 0.36);
}

.insurance-policy-modal {
    display: grid;
    width: min(880px, calc(100vw - 48px));
    max-height: calc(100vh - 56px);
    overflow: hidden;
    border: 1px solid var(--book-line-strong);
    border-radius: 8px;
    background: #fffdf8;
    color: var(--book-ink);
    box-shadow: 0 24px 70px rgba(45, 38, 28, 0.27);
}

.insurance-policy-modal > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--book-line);
    background: #fffaf0;
}

.insurance-policy-modal > header h2,
.insurance-policy-modal > header p {
    margin: 0;
}

.insurance-policy-modal > header h2 {
    color: var(--book-ink);
    font-size: 21px;
}

.insurance-policy-modal > header span {
    display: block;
    margin-top: 4px;
    color: var(--book-muted);
    font-size: 11px;
}

.insurance-policy-modal > header > button {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: var(--book-muted);
    font-size: 24px;
    cursor: pointer;
}

.insurance-policy-modal-body {
    display: grid;
    gap: 18px;
    overflow-y: auto;
    padding: 20px;
}

.insurance-policy-modal-body > section {
    display: grid;
    gap: 13px;
    padding: 15px;
    border: 1px solid var(--book-line);
    border-radius: 5px;
    background: #fffefa;
}

.insurance-modal-section-heading {
    display: grid;
    gap: 3px;
}

.insurance-modal-section-heading strong {
    color: var(--book-ink);
    font-size: 14px;
}

.insurance-modal-section-heading span {
    color: var(--book-muted);
    font-size: 11px;
}

.insurance-modal-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
}

.insurance-modal-form label {
    display: grid;
    gap: 5px;
    color: var(--book-dim);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.insurance-modal-form input,
.insurance-modal-form select,
.insurance-modal-form textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 9px;
    border: 1px solid var(--book-line-strong);
    border-radius: 4px;
    background: #fffaf0;
    color: var(--book-ink);
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.insurance-modal-form textarea {
    resize: vertical;
}

.insurance-modal-form .wide {
    grid-column: 1 / -1;
}

.insurance-modal-form-actions {
    display: flex;
    justify-content: space-between;
    gap: 9px;
    padding-top: 3px;
}

@media (max-width: 1120px) {
    .household-dossier-header {
        grid-template-columns: auto minmax(220px, 1fr) auto auto;
    }

    .household-dossier-header .dossier-metric-item.lede-item {
        display: none;
    }

    .premium-outlook-grid,
    .insurance-member-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .household-dossier-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 10px;
        padding: 11px;
    }

    .household-dossier-header .dossier-metrics-group {
        display: none;
    }

    .household-tab-description {
        max-width: 100%;
        font-size: 10px;
    }

    .household-settings-menu {
        position: fixed;
        top: 80px;
        right: 16px;
        left: 16px;
        width: auto;
    }

    .household-tabs-root .household-subtabs-nav .household-tab {
        flex: 0 0 auto;
        padding: 9px 11px;
        font-size: 11px;
    }

    .insurance-premium-outlook {
        padding: 15px;
    }

    .premium-outlook-metrics,
    .premium-account-values,
    .insurance-policy-details,
    .insurance-modal-form {
        grid-template-columns: 1fr;
    }

    .insurance-modal-form .wide {
        grid-column: auto;
    }

    .premium-account-list > article {
        padding-right: 12px;
        padding-top: 38px;
    }

    .insurance-policy-modal-backdrop {
        align-items: end;
        padding: 0;
    }

    .insurance-policy-modal {
        width: 100%;
        max-height: 92vh;
        border-radius: 10px 10px 0 0;
    }

    .insurance-policy-modal-body {
        padding: 14px;
    }

    .insurance-modal-form-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Household accounts: book-theme refinement */
.accounts-overview {
    gap: 16px;
}

.accounts-overview .eyebrow {
    color: var(--book-dim);
}

.accounts-hero {
    min-height: 0;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid var(--book-line);
    border-radius: 6px;
    background: var(--book-panel);
    box-shadow: 0 8px 24px rgba(55, 47, 34, 0.04);
}

.accounts-total > strong {
    margin-top: 2px;
    color: var(--book-ink);
    font: 500 clamp(2.15rem, 3.6vw, 3.25rem)/1 var(--font-display);
    letter-spacing: -0.035em;
}

.accounts-total > p:last-child {
    margin-top: 7px;
    color: var(--book-muted);
    font-size: 11px;
}

.accounts-total-change {
    margin-top: 8px;
    color: var(--book-green);
}

.accounts-total-change.down {
    color: var(--book-red);
}

.accounts-total-change.neutral {
    color: var(--book-muted);
}

.accounts-range-filter {
    border-color: var(--book-line);
    background: #eee7da;
}

.accounts-range-filter button {
    min-width: 42px;
    color: var(--book-muted);
}

.accounts-range-filter button:hover,
.accounts-range-filter button:focus-visible {
    color: var(--book-ink);
}

.accounts-range-filter button.active {
    background: var(--book-gold);
    color: #fffdf8;
}

.accounts-range-filter button:disabled {
    cursor: default;
    opacity: 0.48;
}

.accounts-summary-grid {
    gap: 10px;
}

.accounts-summary-grid article {
    padding: 14px 16px;
    border: 1px solid var(--book-line);
    border-radius: 5px;
    background: var(--book-panel);
    box-shadow: none;
}

.accounts-summary-grid span,
.accounts-summary-grid em {
    color: var(--book-muted);
}

.accounts-summary-grid strong {
    margin: 5px 0 3px;
    color: var(--book-ink);
    font-family: var(--font-display);
    font-size: 1.35rem;
}

.account-value-panel {
    padding: 16px 18px 12px;
    border: 1px solid var(--book-line);
    border-radius: 5px;
    background: var(--book-panel);
}

.account-value-panel .panel-heading {
    min-height: 0;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--book-line);
}

.account-value-panel .panel-heading h2 {
    color: var(--book-ink);
    font-size: 24px;
}

.account-value-panel .panel-heading > span {
    color: var(--book-gold);
}

.account-value-panel.no-history {
    padding-bottom: 16px;
}

.account-history-empty {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 4px 2px;
}

.account-history-empty strong,
.account-history-empty span {
    display: block;
}

.account-history-empty strong {
    color: var(--book-ink);
    font-size: 14px;
}

.account-history-empty span {
    max-width: 700px;
    margin-top: 4px;
    color: var(--book-muted);
    font-size: 12px;
}

.account-history-empty > b {
    flex: 0 0 auto;
    color: var(--book-ink);
    font-family: var(--font-display);
    font-size: 22px;
    text-align: right;
}

.account-history-empty > b span {
    margin-top: 1px;
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 500;
}

.account-value-chart {
    min-height: 220px;
}

.account-chart-grid line {
    stroke: var(--book-line);
}

.account-chart-grid text,
.account-chart-note {
    color: var(--book-muted);
    fill: var(--book-muted);
}

.account-chart-area {
    fill: rgba(170, 126, 54, 0.1);
}

.account-chart-line {
    stroke: var(--book-gold);
}

.account-chart-end {
    fill: var(--book-gold);
    stroke: var(--book-panel);
}

.account-source-section,
.account-source-section.client {
    padding: 18px;
    border: 1px solid var(--book-line);
    border-radius: 5px;
    background: var(--book-panel);
    box-shadow: none;
}

.account-source-section.client {
    border-left: 3px solid var(--book-gold);
}

.account-source-heading {
    margin-bottom: 16px;
}

.account-source-heading h2,
.account-type-heading h3,
.account-source-heading > div:last-child strong,
.account-type-heading > strong {
    color: var(--book-ink);
}

.account-source-heading h2 {
    font-size: 25px;
}

.account-source-heading p:last-child,
.account-source-heading > div:last-child span,
.account-type-heading span {
    color: var(--book-muted);
}

.account-type-heading {
    border-bottom-color: var(--book-line);
}

.account-card-grid {
    grid-template-columns: 1fr;
}

.account-overview-card {
    padding: 14px 16px;
    border: 1px solid var(--book-line);
    border-radius: 4px;
    background: #fffdf8;
    box-shadow: none;
}

.account-card-title strong,
.account-card-value strong {
    color: var(--book-ink);
}

.account-card-title span,
.account-card-value span,
.account-card-footer,
.account-card-trend span,
.account-history-pending span {
    color: var(--book-muted);
}

.account-card-trend {
    margin-top: 10px;
    padding-top: 9px;
    border-top-color: var(--book-line);
}

.account-card-trend.up strong {
    color: var(--book-green);
}

.account-card-trend.down strong {
    color: var(--book-red);
}

.account-history-pending {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
    padding: 9px 0 0;
    border-top: 1px solid var(--book-line);
}

.account-history-pending strong {
    color: var(--book-muted);
    font-size: 11px;
}

.account-history-pending span {
    font-size: 10px;
    text-align: right;
}

.source-chip {
    background: #edf3ec;
    color: #466b51;
}

.source-chip.client {
    background: #f5ead7;
    color: #7b5923;
}

.account-card-footer button {
    color: #7b5923;
}

.account-card-footer button:hover {
    color: var(--book-ink);
}

.account-category-list {
    display: grid;
    gap: 14px;
}

.account-type-group.account-category {
    margin-top: 0;
    padding: 18px;
    border: 1px solid var(--book-line);
    border-radius: 5px;
    background: var(--book-panel);
}

.account-category-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--book-line);
}

.account-category-title,
.account-category-title > div,
.account-category-value,
.account-category-value > span {
    display: flex;
    align-items: center;
}

.account-category-title {
    gap: 12px;
}

.account-category-title > div {
    align-items: baseline;
    gap: 9px;
}

.account-category-title h2 {
    margin: 0;
    color: var(--book-ink);
    font: 500 23px/1.1 var(--font-display);
}

.account-category-title > div > span,
.account-category-value > span {
    color: var(--book-muted);
    font-size: 12px;
}

.account-category-value {
    justify-content: flex-end;
    gap: 12px;
    text-align: right;
}

.account-category-value > strong {
    color: var(--book-ink);
    font: 500 21px/1 var(--font-display);
}

.account-category-change {
    gap: 5px;
    color: var(--book-green) !important;
}

.account-category-change.down {
    color: var(--book-red) !important;
}

.account-category-change b {
    padding: 3px 6px;
    border-radius: 999px;
    background: #edf3ec;
    font-size: 11px;
}

.account-category-change.down b {
    background: #f9e9e5;
}

.account-management-breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: -2px 0 12px;
}

.account-management-breakdown > span {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid var(--book-line);
    border-radius: 4px;
    background: #fbf8f1;
    color: var(--book-muted);
    font-size: 12px;
}

.account-management-breakdown i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--book-green);
}

.account-management-breakdown i.client {
    background: var(--book-gold);
}

.account-management-breakdown b {
    overflow: hidden;
    color: var(--book-ink);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-management-breakdown strong {
    color: var(--book-ink);
    font-weight: 600;
}

.account-management-breakdown em {
    min-width: 36px;
    color: var(--book-muted);
    font-style: normal;
    text-align: right;
}

.account-category .account-card-grid {
    gap: 7px;
}

.account-category .account-overview-card {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(130px, auto);
    align-items: center;
    gap: 12px 20px;
    padding: 12px 14px;
}

.account-category .account-card-main {
    min-width: 0;
}

.account-category .account-card-title strong {
    font-size: 14px;
}

.account-category .account-card-title span,
.account-category .account-card-value span,
.account-category .account-card-trend span,
.account-category .account-card-footer {
    font-size: 11px;
}

.account-category .account-card-trend,
.account-category .account-history-pending {
    margin: 0;
    padding: 0;
    border: 0;
}

.account-category .account-card-trend svg {
    width: 78px;
    height: 30px;
}

.account-category .account-card-trend > div {
    min-width: 62px;
}

.account-category .account-card-value {
    text-align: right;
}

.account-category .account-card-value strong {
    font-size: 17px;
}

.account-category .account-card-footer {
    grid-column: 1 / -1;
    margin-top: -4px;
}

.account-category .account-card-footer > span:nth-child(2),
.account-category .account-card-footer button {
    margin-left: 0;
}

.account-type-icon.real-estate {
    background: #a87b50;
    box-shadow: 0 0 0 4px rgba(168, 123, 80, 0.12);
}

.account-type-icon.retirement {
    background: #b38122;
    box-shadow: 0 0 0 4px rgba(179, 129, 34, 0.12);
}

.account-type-icon.education {
    background: #3978a8;
    box-shadow: 0 0 0 4px rgba(57, 120, 168, 0.12);
}

.account-type-icon.health {
    background: #278a7c;
    box-shadow: 0 0 0 4px rgba(39, 138, 124, 0.12);
}

.account-type-icon.insurance {
    background: #7256a6;
    box-shadow: 0 0 0 4px rgba(114, 86, 166, 0.12);
}

@media (max-width: 860px) {
    .account-category .account-overview-card {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .account-category .account-card-trend,
    .account-category .account-history-pending {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    .account-category .account-card-value {
        grid-column: 2;
        grid-row: 1;
    }

    .account-category .account-card-footer {
        grid-row: 3;
    }
}

@media (max-width: 640px) {
    .account-category-heading,
    .account-category-title > div,
    .account-category-value {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-category-value {
        gap: 5px;
        text-align: left;
    }

    .account-management-breakdown {
        grid-template-columns: 1fr;
    }

    .account-category .account-overview-card {
        grid-template-columns: 1fr;
    }

    .account-category .account-card-trend,
    .account-category .account-history-pending,
    .account-category .account-card-value,
    .account-category .account-card-footer {
        grid-column: 1;
        grid-row: auto;
    }

    .account-category .account-card-value {
        text-align: left;
    }
}

.holdings-account-filter {
    border-color: var(--book-line);
    border-radius: 5px;
    background: var(--book-panel);
}

.holdings-account-filter > div strong,
.holdings-account-filter select {
    color: var(--book-ink);
}

.holdings-account-filter span,
.holdings-account-filter label {
    color: var(--book-muted);
}

.holdings-account-filter select {
    border-color: var(--book-line-strong);
    background: #fffaf0;
}

@media (max-width: 760px) {
    .account-history-empty {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .account-history-empty > b {
        text-align: left;
    }
}

.workspace-sidebar a.nav-link {
    text-decoration: none;
}

.context-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.025);
}

.context-nav button {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: calc(var(--radius) - 2px);
    background: transparent;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

.context-nav button:hover {
    color: var(--text-white);
    background: rgba(197, 160, 89, 0.08);
}

.context-nav button.active {
    color: var(--text-white);
    border-color: rgba(197, 160, 89, 0.3);
    background: rgba(197, 160, 89, 0.16);
}

.workspace-sidebar .nav-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.nav-link,
.icon-button,
.button,
.text-button,
.household-row,
.household-tab {
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link {
    min-height: 32px;
    padding: 5px 18px;
    border-radius: 99px;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-white);
    background: rgba(197, 160, 89, 0.08);
}

.nav-link.active {
    background: rgba(197, 160, 89, 0.18);
    color: var(--text-white);
    border: 1px solid rgba(197, 160, 89, 0.25);
}

.button,
.icon-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 13.5px;
}

.button.primary {
    border-color: rgba(197, 160, 89, 0.5);
    background: linear-gradient(135deg, var(--sage-accent), var(--mint-accent));
    color: var(--charcoal-canvas);
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.15);
    font-weight: 600;
}

.button.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.35);
    filter: brightness(1.06);
}

.button.secondary,
.icon-button {
    border-color: var(--glass-border);
    background: rgba(197, 160, 89, 0.08);
    color: var(--text-white);
}

.button.secondary:hover,
.icon-button:hover {
    transform: translateY(-1px);
    background: rgba(197, 160, 89, 0.18);
    border-color: var(--glass-border-strong);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.35;
    transform: none !important;
    box-shadow: none !important;
}

.text-button {
    padding: 5px 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(197, 160, 89, 0.2);
    background: rgba(197, 160, 89, 0.04);
    color: var(--sage-accent);
    font-size: 12.5px;
    font-weight: 500;
}

.text-button:hover {
    background: rgba(197, 160, 89, 0.14);
    border-color: var(--sage-accent);
}

/* Status Telemetry chip */
.status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 12px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
    background: rgba(6, 9, 7, 0.35);
}

.status-chip.ok {
    color: var(--mint-accent);
    border-color: rgba(162, 196, 176, 0.25);
}

.status-chip.bad {
    color: var(--coral-alert);
    border-color: rgba(224, 138, 133, 0.25);
}

/* Context System Bar */
.context-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background: var(--glass-border);
}

.context-bar span {
    min-width: 0;
    padding: 10px 16px;
    background: rgba(14, 19, 16, 0.72);
}

.context-bar b {
    color: var(--text-white);
    font-size: 14px;
    font-weight: 500;
}

.context-bar em {
    margin-top: 2px;
    color: var(--text-dim);
    font-size: 9.5px;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-page.active {
    display: grid;
    gap: 20px;
}

.page-intro {
    max-width: 900px;
    padding: 16px 4px 4px;
}

.split-intro {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
    gap: 24px;
    align-items: end;
}

.workspace-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.workspace-choice {
    width: 100%;
    min-height: 190px;
    padding: 24px;
    text-align: left;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(197, 160, 89, 0.12), rgba(162, 196, 176, 0.05)),
        rgba(11, 15, 12, 0.62);
    color: var(--text-white);
    display: grid;
    align-content: space-between;
    gap: 16px;
}

.workspace-choice:hover,
.workspace-choice.active {
    border-color: var(--glass-border-strong);
    background:
        linear-gradient(135deg, rgba(197, 160, 89, 0.18), rgba(162, 196, 176, 0.08)),
        rgba(11, 15, 12, 0.76);
}

.workspace-choice span {
    color: var(--sage-accent);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.workspace-choice strong {
    display: block;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 500;
    letter-spacing: 0;
}

.workspace-choice em {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    font-style: normal;
    line-height: 1.5;
}

.directory-tools {
    display: grid;
    gap: 12px;
    align-items: end;
}

.directory-filter {
    justify-content: end;
}

.eyebrow,
.mini-heading {
    margin: 0 0 8px;
    color: var(--sage-accent);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mini-heading {
    display: block;
}

.lede {
    max-width: 800px;
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 16.5px;
}

/* Editorial narrative banner */
.narrative-strip {
    position: relative;
    overflow: hidden;
    padding: 16px 20px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(197, 160, 89, 0.08), transparent 75%),
        rgba(11, 15, 12, 0.5);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;
    display: grid;
    grid-template-columns: auto minmax(180px, 0.35fr) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.narrative-strip span {
    color: var(--sage-accent);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.narrative-strip strong {
    color: var(--text-white);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.35;
}

.narrative-strip p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13.5px;
}

/* Telemetry Grid Stats */
.metric-band {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background: var(--glass-border);
}

.metric-tile {
    min-width: 0;
    min-height: 114px;
    padding: 16px 18px;
    background:
        linear-gradient(135deg, rgba(197, 160, 89, 0.06), transparent 60%),
        rgba(11, 15, 12, 0.7);
}

.metric-tile strong {
    display: block;
    margin-top: 10px;
    overflow: hidden;
    color: var(--text-white);
    font-size: 32px;
    font-family: var(--font-display);
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-tile em {
    display: block;
    margin-top: 4px;
    color: var(--text-dim);
    font-size: 11px;
    font-style: normal;
}

.overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 0.85fr));
    gap: 16px;
    align-items: stretch;
}

/* Attention diagnostic alerts lane */
.attention-lane {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-color: rgba(197, 160, 89, 0.22);
    background: rgba(11, 15, 12, 0.5);
}

.lane-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.lane-heading h2 {
    margin: 0;
    font-size: 20px;
}

.lane-heading > span {
    color: var(--text-dim);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.attention-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.signal-card {
    min-width: 0;
    min-height: 112px;
    display: grid;
    align-content: space-between;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(197, 160, 89, 0.12);
    border-radius: var(--radius);
    background: rgba(197, 160, 89, 0.03);
}

.signal-card:hover {
    border-color: rgba(197, 160, 89, 0.3);
    background: rgba(197, 160, 89, 0.08);
}

.signal-card span {
    color: var(--sage-accent);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.signal-card strong {
    display: block;
    overflow: hidden;
    color: var(--text-white);
    font-size: 24px;
    font-family: var(--font-display);
    font-weight: 400;
}

.signal-card p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.35;
}

/* Visual panels */
.allocation-panel {
    min-height: 420px;
}

.panel-heading {
    padding: 18px 18px 4px;
}

.allocation-list,
.data-list,
.balance-sheet,
.household-detail-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.data-list.compact {
    align-content: start;
}

/* Ledger Rows */
.allocation-row,
.data-item,
.balance-row,
.asset-class-row,
.property-row,
.account-row,
.member-row,
.lineage-row,
.insurance-card {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid rgba(197, 160, 89, 0.1);
    border-radius: var(--radius);
    background: rgba(197, 160, 89, 0.03);
}

.allocation-row,
.data-item,
.balance-row,
.asset-class-row,
.property-row,
.account-row,
.lineage-row,
.insurance-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.allocation-row:hover,
.data-item:hover,
.balance-row:hover,
.asset-class-row:hover,
.property-row:hover,
.account-row:hover,
.member-row:hover,
.lineage-row:hover,
.insurance-card:hover {
    border-color: rgba(197, 160, 89, 0.3);
    background: rgba(197, 160, 89, 0.08);
}

.allocation-row strong,
.data-item strong,
.balance-row strong,
.asset-class-row strong,
.property-row strong,
.account-row strong,
.member-row strong,
.lineage-row strong,
.insurance-card strong {
    display: block;
    overflow: hidden;
    color: var(--text-white);
    font-size: 14px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.allocation-row span,
.data-item span,
.balance-row span,
.asset-class-row span,
.property-row span,
.account-row span,
.member-row span,
.lineage-row span,
.insurance-card span {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 300;
}

/* Fill lines */
.allocation-track {
    grid-column: 1 / -1;
    height: 6px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(197, 160, 89, 0.08);
}

.allocation-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sage-accent), var(--mint-accent));
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.2);
}

.money-cell,
.account-meta {
    color: var(--text-white);
    font-size: 14.5px;
    font-family: var(--font-display);
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
}

.money-cell.negative {
    color: var(--coral-alert);
}

.balance-row.total {
    border-color: rgba(197, 160, 89, 0.3);
    background: rgba(197, 160, 89, 0.08);
}

/* Search bar styling */
.directory-search {
    min-height: 56px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 300;
    border-color: var(--glass-border);
}

.directory-search::after {
    content: "";
    width: 10px;
    height: 10px;
    order: -1;
    margin-right: 10px;
    border: 1.5px solid var(--sage-accent);
    border-radius: 50%;
}

.household-directory {
    display: grid;
    gap: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: rgba(11, 15, 12, 0.45);
}

/* Families ledgers directory card rows */
.household-row {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) minmax(130px, 0.55fr) minmax(100px, 0.4fr) minmax(140px, 0.6fr);
    gap: 16px;
    align-items: center;
    min-height: 82px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.08);
    background: transparent;
    color: inherit;
    text-align: left;
    border-radius: 0;
}

.household-row:last-child {
    border-bottom: 0;
}

.household-row:hover,
.household-row.active {
    background: rgba(197, 160, 89, 0.08);
}

.household-row strong,
.household-row span,
.household-row b,
.household-row em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.household-row strong {
    font-size: 16px;
    color: var(--text-white);
}

.household-row span,
.household-row em {
    color: var(--text-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 300;
    margin-top: 3px;
}

.household-row b {
    color: var(--text-white);
    font-size: 15px;
    font-family: var(--font-display);
}

/* Directory count card */
.directory-summary {
    justify-self: end;
    min-width: 160px;
    padding: 12px 14px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    background: rgba(197, 160, 89, 0.06);
}

.directory-summary span,
.directory-summary em {
    display: block;
}

.directory-summary span {
    color: var(--text-white);
    font-size: 30px;
    line-height: 1;
    font-family: var(--font-display);
}

.directory-summary em {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 11.5px;
    font-style: normal;
}

/* Household Header Strip (Top dossier) */
.household-header-strip {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    background: var(--glass-panel);
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(30px);
    position: relative;
}

.household-header-strip::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 6px; height: 6px;
    border-top: 1.5px solid var(--sage-accent);
    border-left: 1.5px solid var(--sage-accent);
    pointer-events: none;
}

.household-dossier-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
}

.dossier-title-group h2 {
    font-size: 32px;
    line-height: 1.1;
    margin: 8px 0 0;
    font-weight: 500;
    color: var(--text-white);
    letter-spacing: -0.02em;
}

.dossier-metrics-group {
    display: flex;
    align-items: center;
    gap: 32px;
}

.dossier-metric-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dossier-metric-item.lede-item {
    max-width: 320px;
}

.net-worth-badge {
    font-size: 36px;
    font-family: var(--font-display);
    color: var(--text-white);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
}

.dossier-meta {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
    margin: 0;
}

.client-link-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
    padding: 16px 22px;
    border: 1px solid var(--book-line);
    border-radius: var(--radius);
    background: rgba(251, 248, 241, 0.62);
}

.client-link-copy {
    flex: 1 1 260px;
    min-width: 0;
}

.client-link-copy h2 {
    margin: 2px 0 4px;
    font-size: 18px;
    line-height: 1.2;
    color: var(--book-ink);
}

.client-link-copy span {
    display: block;
    color: var(--book-muted);
    font-size: 12.5px;
    line-height: 1.35;
}

.client-link-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.client-link-actions .button,
.client-link-modal-actions .button {
    min-width: 142px;
}

.client-link-actions .button.primary,
.client-link-modal-actions .button.primary {
    border-color: #b58a42;
    background: #f3d58e;
    color: #2b2115;
    box-shadow: none;
}

.client-link-actions .button.primary:hover,
.client-link-modal-actions .button.primary:hover {
    background: #e8c271;
    border-color: #9b7133;
    filter: none;
}

.client-link-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 32px;
    background: rgba(45, 38, 28, 0.32);
}

.client-link-modal {
    display: grid;
    width: min(720px, calc(100vw - 48px));
    max-height: calc(100vh - 64px);
    overflow: auto;
    border: 1px solid var(--book-line);
    border-radius: 8px;
    background: #fffdf8;
    color: var(--book-ink);
    box-shadow: 0 24px 70px rgba(45, 38, 28, 0.26);
}

.client-link-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--book-line);
    background: #fffaf0;
}

.client-link-modal-header h2 {
    margin: 2px 0 4px;
    font-family: var(--font-ui);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--book-ink);
}

.client-link-modal-header span,
.client-link-modal-body p {
    color: var(--book-muted);
}

.client-link-modal-body {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.client-link-modal-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.client-link-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--book-line);
    background: #fffdf8;
}

.client-link-recipient {
    flex: 1 1 360px;
    display: grid;
    gap: 12px;
    align-items: start;
}

.client-link-recipient.empty {
    display: block;
    padding: 12px;
    border: 1px dashed var(--book-line-strong);
    background: #fffaf0;
    color: var(--book-muted);
    font-size: 12.5px;
}

.client-link-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.client-link-field span,
.client-link-note {
    color: var(--book-dim);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.client-link-field select,
.client-link-field input {
    min-height: 36px;
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--book-line-strong);
    border-radius: 4px;
    background: #fffaf0;
    color: var(--book-ink);
    font: inherit;
    font-size: 13px;
}

.client-link-field select:focus,
.client-link-field input:focus {
    outline: 2px solid rgba(181, 138, 66, 0.34);
    outline-offset: 1px;
    border-color: #b58a42;
    background: #fffdf8;
}

.client-link-field input::placeholder {
    color: rgba(97, 87, 77, 0.6);
}

.client-link-note {
    line-height: 1.35;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}

.client-link-delivery {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #b6c7a8;
    border-radius: 6px;
    background: #f1f7eb;
}

.client-link-delivery.expired {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border-color: var(--book-line-strong);
    background: #fffaf0;
}

.client-link-delivery.expired div,
.client-link-delivery-heading > div {
    display: grid;
    gap: 4px;
}

.client-link-delivery.expired strong,
.client-link-delivery-heading strong {
    color: var(--book-ink);
    font-size: 14px;
}

.client-link-delivery.expired span,
.client-link-delivery-footnote span {
    color: var(--book-muted);
    font-size: 11.5px;
    line-height: 1.4;
}

.client-link-delivery-heading,
.client-link-delivery-footnote {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.client-link-delivery-countdown {
    flex: 0 0 auto;
    padding: 7px 9px;
    border: 1px solid #b6c7a8;
    border-radius: 4px;
    background: #fffdf8;
    color: var(--book-green);
    font-size: 11.5px;
}

.client-link-delivery-countdown b {
    font-variant-numeric: tabular-nums;
}

.client-link-delivery-value {
    display: grid;
    gap: 5px;
}

.client-link-delivery-value > span {
    color: var(--book-dim);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.client-link-delivery-value > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.client-link-delivery-value input {
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #b6c7a8;
    border-radius: 4px;
    background: #fffdf8;
    color: var(--book-ink);
    font: inherit;
    font-size: 12px;
}

.client-link-delivery-value input.access-code {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.client-link-invite-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

/* Shared household budget worksheet */
.household-budget-root {
    display: grid;
    gap: 18px;
}

.budget-status-line {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--book-muted);
    font-size: 11px;
}

.budget-status-line b {
    margin-left: auto;
    color: var(--book-ink);
}

.household-budget-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(310px, 0.72fr);
    gap: 18px;
    align-items: start;
}

.budget-workbook,
.budget-side-rail,
.budget-item-list,
.budget-share-form,
.budget-invite-list {
    display: grid;
    gap: 12px;
}

.budget-side-rail {
    position: sticky;
    top: 16px;
}

.budget-income-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 24px;
    border-left: 4px solid #1f7a72;
    background: linear-gradient(135deg, #f5fbf8, #fffdf8 72%);
}

.budget-income-card > div {
    display: grid;
    gap: 5px;
}

.budget-income-card h2,
.budget-group-section h2 {
    margin: 0;
    color: var(--book-ink);
}

.budget-income-card > div > span,
.budget-group-section header div > span {
    color: var(--book-muted);
    font-size: 12px;
    line-height: 1.45;
}

.budget-income-card > label {
    display: grid;
    grid-template-columns: auto minmax(130px, 190px) auto;
    align-items: center;
    gap: 7px;
    color: #1f7a72;
    font-size: 18px;
    font-weight: 800;
}

.budget-income-card input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #9cc7bd;
    background: white;
    color: var(--book-ink);
    font: inherit;
    font-size: 20px;
}

.budget-income-card em {
    color: var(--book-muted);
    font-size: 10px;
    font-style: normal;
    text-transform: uppercase;
}

.budget-group-section {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--book-line);
    border-top: 4px solid #24466f;
    background: rgba(255, 253, 248, 0.86);
}

.budget-group-section.discretionary {
    border-top-color: #2d9e96;
}

.budget-group-section.saving {
    border-top-color: #d99b19;
}

.budget-group-section > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.budget-group-section > header > strong {
    color: var(--book-ink);
    font-size: 20px;
}

.budget-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.budget-category-grid.one {
    grid-template-columns: 1fr;
}

.budget-category-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(72, 61, 45, 0.16);
    background: #fff;
}

.budget-category-card > header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(72, 61, 45, 0.12);
}

.budget-category-card h3 {
    margin: 0;
    color: var(--book-ink);
    font-size: 14px;
}

.budget-category-card > header span {
    color: var(--book-muted);
    font-size: 11px;
}

.budget-item-row {
    display: grid;
    grid-template-columns: minmax(125px, 1fr) minmax(82px, 0.5fr) minmax(105px, 0.62fr) minmax(72px, auto) 24px;
    align-items: center;
    gap: 8px;
}

.budget-item-label strong {
    color: var(--book-ink);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.25;
}

.budget-item-label input,
.budget-item-amount,
.budget-item-frequency select,
.budget-notes-card textarea,
.budget-share-form select,
.budget-delivery-card input {
    width: 100%;
    border: 1px solid var(--book-line);
    background: #fffdf8;
    color: var(--book-ink);
    font: inherit;
}

.budget-item-label input,
.budget-item-frequency select {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 11px;
}

.budget-item-amount {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    min-height: 34px;
    padding-left: 8px;
}

.budget-item-amount span {
    color: var(--book-muted);
    font-size: 11px;
}

.budget-item-amount input {
    width: 100%;
    min-width: 0;
    padding: 6px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--book-ink);
    font: inherit;
    font-size: 12px;
}

.budget-item-row > b {
    display: grid;
    justify-items: end;
    color: var(--book-ink);
    font-size: 11px;
}

.budget-item-row > b small {
    color: var(--book-muted);
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.budget-item-remove {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9a554b;
    cursor: pointer;
    font-size: 18px;
}

.budget-add-item {
    justify-self: start;
    padding: 7px 10px;
    border: 1px dashed var(--book-line-strong);
    background: transparent;
    color: var(--book-muted);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
}

.budget-notes-card label {
    display: grid;
    gap: 7px;
}

.budget-notes-card label > span,
.budget-share-form label > span,
.budget-delivery-card label > span {
    color: var(--book-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.budget-notes-card textarea {
    min-height: 90px;
    padding: 10px;
    resize: vertical;
}

.budget-live-summary,
.budget-share-panel {
    border-radius: 5px;
}

.budget-equation {
    display: grid;
}

.budget-equation > span {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(72, 61, 45, 0.12);
}

.budget-equation em {
    color: var(--book-muted);
    font-size: 11px;
    font-style: normal;
}

.budget-equation b {
    color: var(--book-ink);
    font-size: 12px;
}

.budget-equation .capacity {
    margin: 6px -10px;
    padding: 13px 10px;
    border: 1px solid #b5d3c2;
    background: #edf7f1;
}

.budget-equation .capacity b,
.budget-equation .remaining.up b {
    color: #287044;
}

.budget-equation .remaining.down b {
    color: #a4473c;
}

.budget-annual-callout {
    display: grid;
    gap: 5px;
    margin-top: 14px;
    padding: 16px;
    background: #152b46;
    color: white;
}

.budget-annual-callout span,
.budget-annual-callout small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 10px;
}

.budget-annual-callout strong {
    font-size: 25px;
}

.budget-save-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.budget-share-form label {
    display: grid;
    gap: 6px;
}

.budget-share-form select {
    min-height: 40px;
    padding: 8px;
}

.budget-share-attestation {
    grid-template-columns: 17px minmax(0, 1fr);
    align-items: start;
    padding: 10px;
    border: 1px solid #dac89d;
    background: #fff8e8;
}

.budget-share-attestation > span {
    color: var(--book-ink) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    line-height: 1.4;
    text-transform: none !important;
}

.budget-delivery-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #9cc7bd;
    background: #f0f8f5;
}

.budget-delivery-card label {
    display: grid;
    gap: 5px;
}

.budget-delivery-card label div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.budget-delivery-card input {
    min-width: 0;
    padding: 7px;
    font-size: 10px;
}

.budget-delivery-card button,
.budget-invite-list button {
    border: 1px solid #24466f;
    background: white;
    color: #24466f;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
}

.budget-delivery-card small,
.budget-invite-list > span {
    color: var(--book-muted);
    font-size: 10px;
}

.budget-invite-list {
    padding-top: 12px;
    border-top: 1px solid var(--book-line);
}

.budget-invite-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px;
    border: 1px solid var(--book-line);
    background: #fffdf8;
}

.budget-invite-list article div {
    display: grid;
    gap: 3px;
}

.budget-invite-list article b {
    font-size: 11px;
}

.budget-invite-list article span {
    color: var(--book-muted);
    font-size: 9px;
}

@media (max-width: 1180px) {
    .household-budget-layout {
        grid-template-columns: 1fr;
    }

    .budget-side-rail {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .budget-category-grid,
    .budget-side-rail {
        grid-template-columns: 1fr;
    }

    .budget-income-card {
        align-items: stretch;
        flex-direction: column;
    }

    .budget-item-row {
        grid-template-columns: minmax(110px, 1fr) minmax(80px, 0.55fr) 24px;
    }

    .budget-item-frequency,
    .budget-item-row > b {
        grid-column: span 1;
    }

    .budget-item-row > b {
        justify-items: start;
    }
}

/* Tax-aware household Savings Capacity */
.savings-capacity-root {
    display: grid;
    gap: 18px;
}

.savings-capacity-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.72fr);
    gap: 18px;
    align-items: start;
}

.savings-capacity-main,
.savings-breakdown-group,
.savings-plan-form,
.savings-warning-stack {
    display: grid;
    gap: 12px;
}

.savings-breakdown-panel,
.savings-observed-panel,
.savings-plan-panel {
    border-radius: 6px;
}

.savings-plan-panel {
    position: sticky;
    top: 16px;
}

.savings-breakdown-group {
    padding-top: 16px;
    border-top: 1px solid var(--book-line);
}

.savings-breakdown-group h3 {
    margin: 0;
    color: var(--book-muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.savings-breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 48px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(90, 75, 52, 0.12);
}

.savings-breakdown-row > div {
    display: grid;
    gap: 3px;
}

.savings-breakdown-row strong,
.savings-breakdown-row b {
    color: var(--book-ink);
    font-size: 14px;
}

.savings-breakdown-row span {
    color: var(--book-muted);
    font-size: 11px;
}

.savings-breakdown-row.tax b {
    color: #8a4b42;
}

.savings-breakdown-row.total {
    padding: 14px 12px;
    border: 1px solid #b9cfb5;
    background: #edf5ea;
}

.savings-breakdown-row.total b {
    color: #2f7642;
    font-size: 18px;
}

.savings-warning-stack p {
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #dcc89f;
    background: #fff8e8;
    color: #725421;
    font-size: 12px;
    line-height: 1.45;
}

.savings-observed-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--book-line);
}

.savings-observed-grid span {
    display: grid;
    gap: 5px;
    padding: 14px;
    border-right: 1px solid var(--book-line);
}

.savings-observed-grid span:last-child {
    border-right: 0;
}

.savings-observed-grid em,
.savings-plan-form label > span {
    color: var(--book-muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.savings-observed-grid strong {
    font-size: 15px;
}

.savings-plan-form label {
    display: grid;
    gap: 6px;
}

.savings-plan-form input,
.savings-plan-form select,
.savings-plan-form textarea,
.wizard-401k-split input {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--book-line);
    background: #fffdf8;
    color: var(--book-ink);
    font: inherit;
}

.savings-plan-form textarea {
    resize: vertical;
}

.savings-plan-checkbox {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    padding: 10px;
    border: 1px solid var(--book-line);
    background: #fffaf0;
}

.savings-plan-checkbox input {
    min-height: 0;
    margin-top: 2px;
}

.savings-plan-checkbox > span {
    color: var(--book-ink) !important;
    font-size: 11px !important;
    letter-spacing: normal !important;
    line-height: 1.4;
    text-transform: none !important;
}

.wizard-401k-split {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid #dcc89f;
    background: #fff8e8;
}

.wizard-401k-split[hidden] {
    display: none;
}

.wizard-401k-split label {
    display: grid;
    gap: 5px;
}

.wizard-401k-split label span {
    color: var(--book-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.wizard-401k-split p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--book-muted);
    font-size: 11px;
}

@media (max-width: 1050px) {
    .savings-capacity-layout {
        grid-template-columns: 1fr;
    }

    .savings-plan-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .savings-observed-grid,
    .wizard-401k-split {
        grid-template-columns: 1fr;
    }

    .savings-observed-grid span {
        border-right: 0;
        border-bottom: 1px solid var(--book-line);
    }

    .savings-observed-grid span:last-child {
        border-bottom: 0;
    }
}

/* Savings Capacity decision workspace */
.savings-capacity-v2 {
    gap: 14px;
}

.savings-context-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--book-line);
    background: rgba(255, 253, 248, 0.72);
}

.savings-context-bar article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 92px;
    padding: 17px 18px;
}

.savings-context-bar article + article {
    border-left: 1px solid var(--book-line);
}

.savings-context-bar article > div,
.savings-profile-heading > div,
.savings-member-profile header > div,
.savings-summary-heading > div {
    display: grid;
    gap: 4px;
}

.savings-context-bar p,
.savings-profile-heading p,
.savings-member-profile p,
.savings-summary-heading p {
    margin: 0;
}

.savings-context-bar strong {
    color: var(--book-ink);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.05;
}

.savings-context-bar article > div > span,
.savings-profile-heading > div > span,
.savings-member-profile header > div > span {
    color: var(--book-muted);
    font-size: 11px;
    line-height: 1.4;
}

.savings-tax-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 14px;
    border: 1px solid #dcc89f;
    background: #fff8e8;
    color: #725421;
}

.savings-tax-notice > div {
    display: grid;
    gap: 3px;
}

.savings-tax-notice strong {
    font-size: 12px;
}

.savings-tax-notice span {
    font-size: 11px;
    line-height: 1.45;
}

.savings-capacity-v2 .savings-capacity-layout {
    grid-template-columns: minmax(0, 1.42fr) minmax(340px, 0.68fr);
    gap: 16px;
}

.savings-profile-column {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.savings-profile-heading {
    padding: 17px 18px;
    border: 1px solid var(--book-line);
    background: rgba(255, 253, 248, 0.58);
}

.savings-profile-heading h2,
.savings-summary-heading h2 {
    margin: 0;
    color: var(--book-ink);
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 500;
    line-height: 1.1;
}

.savings-member-profile {
    overflow: hidden;
    border: 1px solid var(--book-line);
    background: #fffdf8;
}

.savings-member-profile > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--book-line);
    background: #faf5ea;
}

.savings-member-profile h3 {
    margin: 0;
    color: var(--book-ink);
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 500;
}

.savings-member-profile.empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px;
}

.savings-member-profile.empty > div {
    display: grid;
    gap: 5px;
}

.savings-member-profile.empty h3,
.savings-member-profile.empty span {
    margin: 0;
}

.savings-member-profile.empty span {
    color: var(--book-muted);
    font-size: 12px;
}

.savings-source-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.savings-source-card {
    display: grid;
    align-content: start;
    min-height: 190px;
    padding: 15px 16px 12px;
    border-bottom: 1px solid var(--book-line);
    box-shadow: inset 3px 0 0 #c7a96b;
}

.savings-source-card:nth-child(odd) {
    border-right: 1px solid var(--book-line);
}

.savings-source-card:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.savings-source-card.retirement {
    box-shadow: inset 3px 0 0 #758b73;
}

.savings-source-card.espp {
    box-shadow: inset 3px 0 0 #5f8d83;
}

.savings-source-card.equity {
    box-shadow: inset 3px 0 0 #9d7563;
}

.savings-source-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(90, 75, 52, 0.12);
}

.savings-source-card-heading > div {
    display: grid;
    gap: 2px;
}

.savings-source-card-heading > .savings-source-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.savings-source-card-heading > div > span {
    color: var(--book-ink);
    font-size: 14px;
    font-weight: 800;
}

.savings-source-card-heading small {
    color: var(--book-muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.savings-source-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 52px;
    padding: 8px 0;
}

.savings-source-line + .savings-source-line {
    border-top: 1px solid rgba(90, 75, 52, 0.09);
}

.savings-source-line > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.savings-source-line em,
.savings-source-line small {
    font-style: normal;
}

.savings-source-line em {
    color: var(--book-ink);
    font-size: 11px;
    font-weight: 700;
}

.savings-source-line small {
    color: var(--book-muted);
    font-size: 9px;
    line-height: 1.35;
}

.savings-source-line > strong {
    color: var(--book-ink);
    font-size: 13px;
    white-space: nowrap;
}

.savings-source-edit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 5px 7px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--book-muted);
    font: inherit;
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.savings-source-edit:hover,
.savings-source-edit:focus-visible {
    border-color: var(--book-line);
    background: #fffdf8;
    color: var(--book-ink);
    outline: none;
}

.savings-source-edit.icon-only {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
}

.savings-help {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 17px;
    height: 17px;
    padding: 0;
    border: 1px solid #8c8a83;
    border-radius: 50%;
    background: transparent;
    color: #6d6b65;
    font: 800 10px/1 var(--font-ui);
    vertical-align: middle;
    cursor: help;
}

.savings-help::after {
    position: absolute;
    z-index: 30;
    right: -8px;
    bottom: calc(100% + 9px);
    width: 248px;
    padding: 10px 11px;
    border-radius: 4px;
    background: #202a39;
    box-shadow: 0 8px 22px rgba(25, 30, 36, 0.2);
    color: #fff;
    content: attr(data-help);
    font: 600 11px/1.45 var(--font-ui);
    letter-spacing: normal;
    opacity: 0;
    pointer-events: none;
    text-align: left;
    text-transform: none;
    transform: translateY(3px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.savings-help:hover::after,
.savings-help:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.savings-help:focus-visible {
    outline: 2px solid #8b672e;
    outline-offset: 2px;
}

.savings-source-warning {
    padding: 11px 13px;
    border: 1px solid #e0b2aa;
    background: #fff1ef;
    color: var(--book-red);
    font-size: 12px;
}

.savings-summary-panel {
    position: sticky;
    top: 16px;
    overflow: visible;
    border: 1px solid var(--book-line);
    background: #fffdf8;
}

.savings-summary-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 18px;
    border-bottom: 1px solid var(--book-line);
    background: #faf5ea;
}

.savings-summary-stack {
    padding: 0 18px;
}

.savings-summary-row {
    display: grid;
    gap: 9px;
    padding: 16px 0;
    border-bottom: 1px solid var(--book-line);
}

.savings-summary-row > div {
    display: grid;
    gap: 4px;
}

.savings-summary-row > div > span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--book-ink);
    font-size: 11px;
    font-weight: 800;
}

.savings-summary-row small {
    color: var(--book-muted);
    font-size: 9px;
    line-height: 1.35;
}

.savings-summary-row > strong {
    color: var(--book-ink);
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
    line-height: 1;
    text-align: right;
}

.savings-summary-row.hero {
    margin: 0 -18px;
    padding: 18px;
    border-bottom-color: #b8cbb4;
    background: #edf5ea;
}

.savings-summary-row.hero > div > span,
.savings-summary-row.hero > strong {
    color: #2f7642;
}

.savings-summary-row.hero > strong {
    font-size: 31px;
}

.savings-summary-row.conservative > strong {
    font-size: 23px;
}

.savings-details {
    border-top: 1px solid var(--book-line);
}

.savings-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    color: var(--book-ink);
    font-size: 11px;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
}

.savings-details > summary::-webkit-details-marker {
    display: none;
}

.savings-details > summary:hover,
.savings-details > summary:focus-visible {
    background: #faf5ea;
    outline: none;
}

.savings-details > summary b {
    color: var(--book-muted);
    font-size: 16px;
    transition: transform 150ms ease;
}

.savings-details[open] > summary b {
    transform: rotate(45deg);
}

.savings-assumptions-details[open] > summary b {
    transform: none;
}

.savings-details-body,
.savings-assumptions-details .savings-plan-form {
    display: grid;
    gap: 12px;
    padding: 4px 18px 18px;
    border-top: 1px solid rgba(90, 75, 52, 0.1);
}

.savings-details-body section {
    display: grid;
    gap: 0;
}

.savings-details-body h3 {
    margin: 15px 0 4px;
    color: var(--book-muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.savings-details-body .savings-breakdown-row {
    min-height: 42px;
    padding: 7px 0;
}

.savings-details-body .savings-breakdown-row.total {
    margin-top: 5px;
}

.savings-assumptions-details .savings-plan-form {
    padding-top: 15px;
}

.savings-assumption-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 1050px) {
    .savings-capacity-v2 .savings-capacity-layout {
        grid-template-columns: 1fr;
    }

    .savings-summary-panel {
        position: static;
        order: -1;
    }

    .savings-summary-stack {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0;
    }

    .savings-summary-row {
        padding: 16px 18px;
    }

    .savings-summary-row:nth-child(odd) {
        border-right: 1px solid var(--book-line);
    }

    .savings-summary-row.hero {
        margin: 0;
    }
}

@media (max-width: 720px) {
    .savings-context-bar,
    .savings-source-grid,
    .savings-summary-stack,
    .savings-assumption-pair {
        grid-template-columns: 1fr;
    }

    .savings-context-bar article + article,
    .savings-source-card:nth-child(odd),
    .savings-summary-row:nth-child(odd) {
        border-left: 0;
        border-right: 0;
    }

    .savings-context-bar article + article {
        border-top: 1px solid var(--book-line);
    }

    .savings-tax-notice,
    .savings-member-profile.empty {
        align-items: stretch;
        flex-direction: column;
    }

    .savings-tax-notice .button {
        width: 100%;
    }

    .savings-source-card,
    .savings-source-card:nth-last-child(-n + 2) {
        min-height: 0;
        border-bottom: 1px solid var(--book-line);
    }

    .savings-source-card:last-child {
        border-bottom: 0;
    }

    .savings-summary-row > strong {
        text-align: left;
    }

    .savings-help::after {
        right: -18px;
        width: min(248px, calc(100vw - 64px));
    }
}

.client-link-attestation {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid #dcc89f;
    border-radius: 4px;
    background: #fff8e8;
    color: var(--book-ink);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}

.client-link-attestation input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: #9b7133;
}

.client-link-invites {
    display: grid;
    gap: 9px;
    padding-top: 4px;
    border-top: 1px solid var(--book-line);
}

.client-link-invites > strong {
    color: var(--book-ink);
    font-size: 13px;
}

.client-link-invites > span {
    color: var(--book-muted);
    font-size: 12.5px;
}

.client-link-invite-list {
    display: grid;
    gap: 8px;
}

.client-link-invite-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--book-line);
    border-radius: 4px;
    background: #fffaf0;
}

.client-link-invite-list article > div {
    display: grid;
    gap: 2px;
}

.client-link-invite-list b {
    color: var(--book-ink);
    font-size: 12.5px;
}

.client-link-invite-list span {
    color: var(--book-muted);
    font-size: 11.5px;
}

.client-link-status {
    padding: 10px 12px;
    border: 1px solid #e0b2aa;
    border-radius: 4px;
    background: #fff1ef;
    color: var(--book-red);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.35;
}

.client-link-status[data-status-level="success"] {
    border-color: #b6c7a8;
    background: #f1f7eb;
    color: var(--book-green);
}

@media (max-width: 720px) {
    .client-link-panel,
    .client-link-modal-header,
    .client-link-modal-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .client-link-modal-actions .button,
    .client-link-actions .button {
        width: 100%;
    }

    .client-link-delivery.expired {
        grid-template-columns: 1fr;
    }

    .client-link-delivery-heading,
    .client-link-delivery-footnote,
    .client-link-delivery-value > div {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .client-link-delivery-value .button,
    .client-link-delivery.expired .button {
        width: 100%;
    }

    .client-link-invite-list article {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Horizontal Sub-Tabs Row */
.household-subtabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1px;
    margin-bottom: 24px;
}

.household-subtabs-nav .household-tab {
    min-height: 40px;
    padding: 8px 24px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    background: transparent;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    transition: all 200ms ease;
}

.household-subtabs-nav .household-tab::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: all 200ms ease;
}

.household-subtabs-nav .household-tab:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.03);
}

.household-subtabs-nav .household-tab.active {
    color: var(--text-white);
    border: 1px solid var(--glass-border);
    border-bottom: 1px solid #060907; /* blend with background */
    background: rgba(14, 18, 16, 0.6);
}

.household-subtabs-nav .household-tab.active::after {
    background: var(--sage-accent);
    box-shadow: 0 -2px 10px var(--sage-accent);
}

.household-subtabs-nav .household-tab svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.household-detail {
    width: 100%;
}

/* SVG Shield HUD Diagnostics styles */
.shield-hud-container {
    display: grid;
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
    gap: 24px;
    align-items: center;
    border: 1px solid rgba(197, 160, 89, 0.16);
    border-radius: var(--radius-lg);
    background: var(--glass-panel);
    padding: 24px;
    box-shadow: var(--shadow-glass);
}

.shield-vector-box {
    display: grid;
    place-items: center;
    position: relative;
}

.shield-vector-box svg {
    width: 100%;
    max-width: 200px;
    height: auto;
    overflow: visible;
}

.shield-path {
    fill: none;
    stroke: var(--sage-accent);
    stroke-width: 2;
    filter: drop-shadow(0 0 8px rgba(197, 160, 89, 0.3));
}

.shield-pulse {
    stroke: var(--mint-accent);
    animation: shieldGlow 2s infinite alternate;
}

@keyframes shieldGlow {
    from {
        filter: drop-shadow(0 0 3px rgba(162, 196, 176, 0.25));
    }
    to {
        filter: drop-shadow(0 0 12px rgba(162, 196, 176, 0.6));
    }
}

/* Custodian Tree styles */
.custodian-node {
    border: 1px solid rgba(197, 160, 89, 0.16);
    border-radius: var(--radius-lg);
    background: rgba(14, 19, 16, 0.45);
    margin-bottom: 20px;
    overflow: hidden;
}

.custodian-node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(197, 160, 89, 0.08);
    border-bottom: 1px solid rgba(197, 160, 89, 0.15);
}

.custodian-node-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-white);
}

.custodian-node-header span {
    font-size: 11.5px;
    color: var(--sage-accent);
    font-family: var(--font-display);
}

.custodian-accounts-list {
    padding: 16px;
    display: grid;
    gap: 12px;
}

.tree-account-card {
    position: relative;
    padding-left: 24px;
}

.tree-connector-line {
    position: absolute;
    left: 8px;
    top: -16px;
    bottom: 24px;
    width: 1px;
    background: rgba(197, 160, 89, 0.15);
}

.tree-connector-line::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 12px;
    height: 1px;
    background: rgba(197, 160, 89, 0.15);
}

/* Transaction Bus Timeline styles */
.bus-timeline {
    position: relative;
    padding: 16px 0;
}

.bus-line {
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: repeating-linear-gradient(
        180deg,
        var(--sage-accent) 0 4px,
        transparent 4px 8px
    );
    opacity: 0.3;
}

.bus-node {
    position: relative;
    padding-left: 42px;
    margin-bottom: 20px;
}

.bus-node::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--charcoal-canvas);
    border: 1.5px solid var(--sage-accent);
    box-shadow: 0 0 6px var(--sage-accent);
    z-index: 2;
}

.bus-node.inflow::before {
    border-color: var(--mint-accent);
    box-shadow: 0 0 6px var(--mint-accent);
}

.bus-node.outflow::before {
    border-color: var(--coral-alert);
    box-shadow: 0 0 6px var(--coral-alert);
}

.household-detail-body,
.household-layout {
    gap: 16px;
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
}

.summary-strip.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-strip.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-strip .metric-tile {
    min-height: 104px;
}

.insight-grid,
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.detail-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-section,
.insight-card {
    position: relative;
    overflow: hidden;
    min-width: 0;
    border: 1px solid rgba(197, 160, 89, 0.16);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(145deg, rgba(197, 160, 89, 0.08), rgba(197, 160, 89, 0.02)),
        rgba(14, 19, 16, 0.55);
    backdrop-filter: blur(20px);
}

.insight-card {
    padding: 18px;
}

.insight-card p:last-child {
    margin-bottom: 0;
}

.detail-section {
    padding-top: 18px;
}

.detail-section > .mini-heading {
    padding: 0 18px;
    margin-bottom: 10px;
}

.detail-section.wide {
    grid-column: 1 / -1;
}

/* Verification LED badge */
.account-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 2px 8px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: var(--radius);
    color: var(--sage-accent);
    background: rgba(197, 160, 89, 0.06);
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Household funding planner */
.funding-empty,
.funding-error,
.funding-plan-root,
.funding-allocations-panel {
    min-width: 0;
    border: 1px solid rgba(197, 160, 89, 0.16);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(145deg, rgba(197, 160, 89, 0.08), rgba(197, 160, 89, 0.02)),
        rgba(14, 19, 16, 0.55);
    backdrop-filter: blur(20px);
}

.funding-empty,
.funding-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
}

.funding-empty h2,
.funding-empty p,
.funding-error strong,
.funding-error span {
    margin: 0;
}

.funding-empty h2 {
    color: var(--text-white);
    font-size: 22px;
}

.funding-empty p,
.funding-error span {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
}

.funding-plan-root {
    display: grid;
    gap: 16px;
    padding: 16px;
}

.funding-plan-toolbar,
.funding-board,
.funding-allocation-row {
    display: grid;
    gap: 12px;
}

.funding-plan-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.funding-plan-title,
.funding-plan-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.funding-plan-title label,
.funding-card label,
.funding-allocation-row label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.funding-plan-title label {
    min-width: 150px;
}

.funding-plan-title label:first-child {
    min-width: min(360px, 100%);
    flex: 1 1 240px;
}

.funding-plan-title span,
.funding-card label span,
.funding-allocation-row label span {
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.funding-plan-root input,
.funding-plan-root select,
.funding-plan-root textarea,
.funding-plan-select {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    border: 1px solid rgba(197, 160, 89, 0.16);
    border-radius: var(--radius);
    background: rgba(6, 9, 7, 0.56);
    color: var(--text-white);
    font: inherit;
    font-size: 13px;
    padding: 8px 10px;
}

.funding-plan-root textarea {
    resize: vertical;
}

.funding-plan-root input:focus,
.funding-plan-root select:focus,
.funding-plan-root textarea:focus {
    outline: 1px solid rgba(143, 174, 155, 0.55);
    border-color: rgba(143, 174, 155, 0.55);
}

.funding-summary-strip.summary-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.funding-board {
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(260px, 0.82fr);
    align-items: start;
}

.funding-column,
.funding-allocations-panel {
    min-width: 0;
    border: 1px solid rgba(197, 160, 89, 0.12);
    border-radius: var(--radius-lg);
    background: rgba(6, 9, 7, 0.26);
    overflow: hidden;
}

.funding-column-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.1);
}

.funding-column-heading h3 {
    margin: 2px 0 0;
    color: var(--text-white);
    font-size: 16px;
    font-weight: 500;
}

.funding-column-heading strong {
    color: var(--text-white);
    font-family: var(--font-display);
    font-size: 18px;
    white-space: nowrap;
}

.funding-source-list,
.funding-bucket-list,
.funding-allocation-list {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.funding-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(197, 160, 89, 0.12);
    border-radius: var(--radius);
    background: rgba(197, 160, 89, 0.035);
}

.funding-card-top,
.funding-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.funding-card-top {
    justify-content: space-between;
}

.funding-card-top strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text-white);
    font-size: 14px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.funding-card-top span,
.source-pill {
    color: var(--text-muted);
    font-size: 11px;
}

.funding-toggle input {
    width: 16px;
    min-height: 16px;
}

.source-pill {
    padding: 3px 7px;
    border: 1px solid rgba(143, 174, 155, 0.24);
    border-radius: 999px;
    background: rgba(143, 174, 155, 0.08);
    text-transform: capitalize;
    white-space: nowrap;
}

.source-pill.needs_review,
.source-pill.estimated {
    border-color: rgba(219, 184, 111, 0.34);
    background: rgba(219, 184, 111, 0.08);
}

.funding-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.funding-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
}

.funding-result-grid div,
.funding-warning,
.funding-ok {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(197, 160, 89, 0.1);
    border-radius: var(--radius);
    background: rgba(197, 160, 89, 0.035);
}

.funding-result-grid span,
.funding-warning span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
}

.funding-result-grid strong,
.funding-warning strong {
    display: block;
    overflow: hidden;
    color: var(--text-white);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.funding-warning-list {
    display: grid;
    gap: 8px;
    padding: 0 12px 12px;
}

.funding-warning {
    border-color: rgba(224, 138, 133, 0.22);
}

.funding-ok {
    color: var(--sage-accent);
    font-size: 13px;
}

.funding-allocation-row {
    grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(110px, 0.55fr) minmax(160px, 1fr) 38px;
    align-items: end;
    padding: 10px;
    border: 1px solid rgba(197, 160, 89, 0.12);
    border-radius: var(--radius);
    background: rgba(197, 160, 89, 0.035);
}

.funding-map-workspace {
    display: grid;
    grid-template-columns: minmax(720px, 1fr) minmax(300px, 0.32fr);
    gap: 14px;
    min-height: 720px;
}

.funding-map-canvas,
.funding-inspector {
    min-width: 0;
    border: 1px solid rgba(197, 160, 89, 0.14);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%),
        rgba(6, 9, 7, 0.34);
}

.funding-map-canvas {
    position: relative;
    min-height: 760px;
    overflow: hidden;
    background:
        linear-gradient(180deg, #f7f4ee, #eee8dc);
    padding: 0;
}

.funding-map-viewport {
    position: relative;
    width: 100%;
    height: min(78vh, 900px);
    min-height: 760px;
    overflow: hidden;
    border-radius: inherit;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.funding-map-viewport.is-panning {
    cursor: grabbing;
}

.funding-map-stage {
    --funding-zoom: 1;
    --funding-pan-x: 0px;
    --funding-pan-y: 0px;
    position: relative;
    width: 2400px;
    height: 1450px;
    overflow: hidden;
    transform: translate(var(--funding-pan-x), var(--funding-pan-y)) scale(var(--funding-zoom));
    transform-origin: top left;
    border: 1px solid rgba(12, 35, 70, 0.24);
    border-radius: 2px;
    background:
        linear-gradient(90deg, rgba(57, 78, 52, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, rgba(57, 78, 52, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 52% 50%, rgba(27, 50, 82, 0.05), transparent 16%),
        #f8f7f2;
    background-size: 96px 96px, 96px 96px, auto, auto;
    box-shadow: 0 16px 34px rgba(50, 44, 32, 0.18);
}

.funding-map-stage::before {
    content: "MOHAN FINANCIAL";
    position: absolute;
    top: 650px;
    left: 860px;
    z-index: 0;
    color: rgba(27, 50, 82, 0.055);
    font-size: 92px;
    font-weight: 800;
    letter-spacing: 0.16em;
    pointer-events: none;
}

.funding-map-axis {
    position: absolute;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    color: rgba(28, 35, 30, 0.72);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.funding-map-axis-top {
    display: none;
}

.funding-map-axis span {
    min-width: 0;
    text-align: center;
}

.funding-map-band {
    position: absolute;
    z-index: 1;
    right: 165px;
    left: auto;
    width: 430px;
    height: auto;
    display: flex;
    align-items: center;
    padding-left: 12px;
    border-top: 0;
    border: 1px solid rgba(12, 35, 70, 0.72);
    color: #1c211c;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    pointer-events: none;
}

.band-income {
    top: 82px;
    height: 42px;
    background: linear-gradient(180deg, #b9daa7, #98c47f);
    border-color: #7fb061;
    justify-content: center;
}

.band-service {
    top: 150px;
    right: 225px;
    width: 500px;
    height: 40px;
    background: linear-gradient(180deg, #ffe596, #ffc64f);
    border-color: #f1ad20;
    justify-content: center;
    font-size: 12px;
    letter-spacing: 0;
}

.band-purposed {
    top: 205px;
    right: 225px;
    width: 500px;
    height: 38px;
    background: linear-gradient(180deg, #fbfaf6, #e7dfcf);
    justify-content: center;
    letter-spacing: 0;
    text-transform: none;
}

.funding-map-section {
    position: absolute;
    z-index: 1;
    color: #1f211c;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    text-decoration: underline;
    text-transform: none;
    pointer-events: none;
}

.section-real-estate { display: none; }
.section-non-qualified { left: 332px; bottom: 64px; }
.section-cash-value { left: 1500px; bottom: 64px; color: #4d7d34; }
.section-retirement { left: 1910px; bottom: 64px; }

.funding-map-source-list,
.funding-map-bucket-list,
.funding-flow-list {
    display: contents;
    padding: 0;
}

.funding-node {
    position: absolute;
    z-index: 8;
    left: calc(var(--node-x) * 1%);
    top: calc(var(--node-y) * 1%);
    width: calc(var(--node-w) * 1%);
    min-width: 170px;
}

.funding-node-button,
.funding-flow-button {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(64, 93, 47, 0.75);
    border-radius: 0;
    color: #1f211c;
    background:
        linear-gradient(180deg, #c3dfa9, #99c580);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.74) inset, 0 7px 14px rgba(44, 39, 29, 0.14);
    cursor: pointer;
    text-align: left;
}

.funding-node-button {
    display: grid;
    gap: 5px;
    min-height: 70px;
    padding: 10px 12px;
}

.funding-node-button:hover,
.funding-flow-button:hover,
.funding-node.is-selected .funding-node-button,
.funding-flow-chip.is-selected .funding-flow-button {
    border-color: rgba(222, 213, 198, 0.58);
    background:
        linear-gradient(180deg, #fff0ba, #ffc86f);
    outline: 2px solid rgba(12, 35, 70, 0.55);
    outline-offset: 1px;
}

.funding-source-node .funding-node-button {
    border-color: #7fb061;
    background:
        linear-gradient(180deg, #c3dfa9, #98c47f);
}

.funding-bucket-node .funding-node-button {
    border-color: #ef9b52;
    background:
        linear-gradient(180deg, #ffcf9a, #ffab73);
}

.funding-source-node[data-source-type="connected_account"] .funding-node-button,
.funding-bucket-node[data-bucket-type="emergency_cash"] .funding-node-button,
.funding-bucket-node[data-bucket-type="taxable_non_qualified"] .funding-node-button {
    border-color: #6c9fd5;
    background:
        linear-gradient(180deg, #b7d4f3, #8dbbe8);
}

.funding-bucket-node[data-bucket-type*="tax"] .funding-node-button,
.funding-bucket-node[data-bucket-type="risk_management_premiums"] .funding-node-button {
    border-color: #c64f4c;
    background:
        linear-gradient(90deg, #e48383, #bf4849);
}

.funding-bucket-node[data-bucket-type="service_accounts"] .funding-node-button,
.funding-bucket-node[data-bucket-type="529"] .funding-node-button,
.funding-bucket-node[data-bucket-type="vul_cash_value"] .funding-node-button {
    border-color: #ef9b52;
    background:
        linear-gradient(180deg, #ffcf9a, #ffab73);
}

.funding-node.is-muted {
    opacity: 0.58;
}

.funding-node-kicker,
.funding-node-button span {
    display: block;
    color: rgba(31, 33, 28, 0.72);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-transform: uppercase;
}

.funding-node-button strong {
    display: -webkit-box;
    overflow: hidden;
    min-height: 34px;
    color: #171916;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.funding-node-button em {
    color: #1f211c;
    font-size: 19px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.2;
}

.funding-flow-svg {
    position: absolute;
    inset: 0;
    z-index: 4;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.funding-map-path {
    fill: none;
    stroke: rgba(88, 136, 56, 0.42);
    stroke-width: 0.55;
    cursor: pointer;
    pointer-events: stroke;
}

.funding-map-path.is-active {
    stroke: rgba(88, 136, 56, 0.82);
    stroke-width: 0.85;
}

.funding-map-path.is-muted {
    stroke-dasharray: 4 5;
    opacity: 0.22;
}

.funding-map-path:hover,
.funding-map-path.is-selected {
    stroke: rgba(214, 54, 46, 0.92);
    stroke-width: 1.3;
}

.funding-flow-chip {
    position: absolute;
    z-index: 7;
    left: calc(var(--flow-x) * 1%);
    top: calc(var(--flow-y) * 1%);
    width: 132px;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
}

.funding-flow-chip.is-selected {
    opacity: 1;
    pointer-events: auto;
}

.funding-flow-button {
    display: grid;
    gap: 2px;
    padding: 6px 7px;
    border-color: rgba(27, 31, 24, 0.24);
    background: rgba(255, 255, 255, 0.92);
    text-align: center;
}

.funding-flow-button span {
    overflow: hidden;
    color: #506047;
    font-size: 9px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.funding-flow-button strong {
    color: #1f211c;
    font-size: 12px;
    line-height: 1.15;
}

.funding-map-reference {
    position: absolute;
    top: 20px;
    right: 110px;
    z-index: 12;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 14px;
    width: 430px;
    min-height: 190px;
    padding: 12px 32px 18px;
    border: 2px solid #10284f;
    color: #111;
    font-size: 16px;
    text-align: center;
}

.funding-map-reference strong {
    grid-column: 1 / -1;
    color: #111;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

.funding-map-reference span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid transparent;
}

.key-mass { background: linear-gradient(180deg, #ffcf9a, #ffab73); border-color: #ef9b52; }
.key-self { background: linear-gradient(180deg, #b7d4f3, #8dbbe8); border-color: #6c9fd5; }
.key-income { background: linear-gradient(180deg, #c3dfa9, #98c47f); border-color: #7fb061; }
.key-expense { background: linear-gradient(90deg, #e48383, #bf4849); border-color: #c64f4c; }
.key-service { grid-column: 1 / -1; background: linear-gradient(180deg, #ffe596, #ffc64f); border-color: #f1ad20; }
.key-purpose { grid-column: 1 / -1; background: linear-gradient(180deg, #fbfaf6, #e7dfcf); border-color: #10284f; }

.funding-template-panel {
    position: absolute;
    z-index: 2;
    border: 1px solid #6aa8e6;
    background:
        linear-gradient(90deg, rgba(205, 185, 150, 0.09) 1px, transparent 1px),
        linear-gradient(180deg, rgba(205, 185, 150, 0.08) 1px, transparent 1px),
        #f6f2e8;
    background-size: 18px 18px;
}

.investment-panel {
    top: 30px;
    left: 36px;
    width: 700px;
    height: 500px;
    padding: 130px 28px 24px;
}

.investment-panel h4 {
    position: absolute;
    top: 34px;
    right: 0;
    left: 0;
    margin: 0;
    color: #1f211c;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    text-decoration: underline;
}

.property-row {
    position: relative;
    display: grid;
    grid-template-columns: 150px 54px 220px 54px 150px;
    align-items: center;
    gap: 8px;
    height: 58px;
    margin-bottom: 14px;
}

.template-node {
    position: absolute;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 8px 14px;
    border: 1px solid rgba(31, 33, 28, 0.18);
    color: #111;
    font-size: 18px;
    line-height: 1.25;
    text-align: center;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset, 0 6px 12px rgba(51, 43, 31, 0.12);
}

.property-row .template-node {
    position: static;
    min-height: 48px;
    padding: 6px 12px;
    font-size: 15px;
    box-shadow: none;
}

.node-income {
    border-color: #7fb061;
    background: linear-gradient(180deg, #c3dfa9, #98c47f);
}

.node-property {
    border-color: #beb8ab;
    background: linear-gradient(90deg, #e8e2d6, #c6c1b7);
}

.node-account {
    border-color: #6c9fd5;
    background: linear-gradient(180deg, #b7d4f3, #8dbbe8);
}

.node-tax,
.node-expense {
    border-color: #c64f4c;
    background: linear-gradient(90deg, #e48383, #bf4849);
}

.node-mass {
    border-color: #ef9b52;
    background: linear-gradient(180deg, #ffcf9a, #ffab73);
}

.node-service {
    border-color: #f1ad20;
    background: linear-gradient(180deg, #ffe596, #ffc64f);
}

.template-node strong {
    display: block;
    margin-top: 6px;
    font-weight: 800;
    text-decoration: underline;
}

.template-node em {
    display: block;
    margin-top: 6px;
    color: #2b65c7;
    font-style: normal;
}

.template-arrow {
    display: block;
}

.property-row .template-arrow {
    position: relative;
    height: 1px;
    background: #1f211c;
}

.property-row .template-arrow::after {
    content: "";
    position: absolute;
    top: -5px;
    right: -1px;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid #1f211c;
}

.template-arrow-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.template-arrow-layer .template-arrow {
    fill: none;
    stroke-width: 0.12;
}

.template-arrow.green {
    stroke: #5f9d3f;
    marker-end: url("#funding-arrow-green");
}

.template-arrow.black {
    stroke: #1f211c;
    marker-end: url("#funding-arrow-black");
}

.template-arrow.red {
    stroke: #d6362e;
    marker-end: url("#funding-arrow-red");
}

.template-note,
.service-note,
.deduction-note {
    position: absolute;
    z-index: 7;
    color: #4d7d34;
    font-size: 13px;
    line-height: 1.25;
}

.s-corp-note {
    top: 300px;
    left: 860px;
    color: #e20000;
    font-size: 12px;
}

.re-tax-node { top: 72px; left: 940px; width: 190px; }
.owner-distribution-node { top: 315px; left: 880px; width: 210px; min-height: 72px; }
.base-bonus-node { top: 210px; left: 1160px; width: 205px; }
.rsu-node { top: 210px; left: 1420px; width: 190px; }
.fidelity-node { top: 440px; left: 1410px; width: 230px; }
.joint-checking-node { top: 610px; left: 1040px; width: 230px; }
.monthly-expenses-node { top: 760px; left: 760px; width: 190px; }
.joint-savings-node { top: 790px; left: 1040px; width: 230px; }
.personal-tax-node { top: 610px; left: 1585px; width: 230px; }
.savings-capacity-node { top: 790px; left: 1570px; width: 240px; min-height: 95px; }
.cash-account-node { top: 1030px; left: 1510px; width: 270px; }
.sbloc-node { top: 990px; left: 150px; width: 260px; }

.service-panel {
    top: 430px;
    right: 80px;
    width: 720px;
    height: 350px;
    border-color: #10284f;
}

.service-account-node {
    top: 230px;
    left: 40px;
    width: 210px;
    min-height: 70px;
    background: linear-gradient(180deg, #ffcf9a, #ffab73);
    border-color: #ef9b52;
}

.cpa-node,
.law-node,
.fp-node {
    left: 190px;
    width: 270px;
    min-height: 58px;
}

.cpa-node { top: 28px; }
.law-node { top: 108px; }
.fp-node { top: 188px; }

.cpa-note { top: 48px; left: 485px; }
.law-note { top: 128px; left: 485px; }
.fp-note { top: 208px; left: 485px; }

.deduction-note {
    right: 36px;
    bottom: 28px;
    width: 310px;
    color: #e20000;
    font-size: 19px;
    text-align: center;
}

.template-bottom-axis {
    position: absolute;
    right: 110px;
    bottom: 62px;
    left: 90px;
    z-index: 3;
    height: 120px;
    color: #111;
}

.axis-line {
    position: absolute;
    top: 42px;
    right: 0;
    left: 0;
    height: 3px;
    background: #111;
}

.axis-line::after {
    content: "";
    position: absolute;
    top: -7px;
    right: -3px;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #111;
}

.axis-tick {
    position: absolute;
    top: 0;
    width: 160px;
    transform: translateX(-50%);
    text-align: center;
}

.axis-tick::before {
    content: "";
    display: block;
    width: 2px;
    height: 86px;
    margin: 0 auto 2px;
    background: #111;
}

.axis-tick strong {
    position: absolute;
    top: 76px;
    left: 50%;
    color: #111;
    font-size: 42px;
    font-weight: 400;
    transform: translateX(-50%);
}

.axis-tick em {
    display: block;
    margin-top: 10px;
    color: #111;
    font-size: 26px;
    font-style: normal;
    line-height: 1.25;
}

.tick-0 { left: 0; }
.tick-2 { left: 200px; }
.tick-10 { left: 840px; }
.tick-59 { left: 1320px; }
.tick-retirement { left: 1860px; }

.tick-10 em,
.tick-59 em {
    color: #4d7d34;
    font-size: 18px;
}

.tick-retirement::before,
.tick-retirement strong {
    display: none;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.legend-dot.source { background: rgba(143, 174, 155, 0.85); }
.legend-dot.bucket { background: rgba(197, 160, 89, 0.9); }

.legend-line {
    width: 18px;
    height: 2px;
    background: rgba(197, 160, 89, 0.7);
}

.funding-inspector {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
}

.funding-inspector-heading h3 {
    margin: 2px 0 0;
    font-size: 18px;
}

.funding-inspector label {
    display: grid;
    gap: 5px;
}

.funding-inspector label span {
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* AccountView Grid Layout */
.accountview-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 16px;
    min-height: 520px;
}

.connection-summary {
    margin-top: 20px;
}

.accountview-visual {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(145deg, rgba(11, 15, 12, 0.2), rgba(11, 15, 12, 0.95)),
        radial-gradient(circle at 50% 50%, rgba(197, 160, 89, 0.2), transparent 45%),
        url("assets/backgrounds/holographic-tree.jpg");
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(15px);
    filter: saturate(0.4) brightness(0.65);
}

.accountview-visual::before,
.accountview-visual::after,
.accountview-visual span {
    content: "";
    position: absolute;
    border: 1px solid rgba(197, 160, 89, 0.14);
    border-radius: 50%;
    transform: rotate(-18deg);
}

.accountview-visual::before {
    width: 74%;
    aspect-ratio: 1;
    left: 13%;
    top: 13%;
}

.accountview-visual::after {
    width: 46%;
    aspect-ratio: 1;
    right: 8%;
    bottom: 11%;
    opacity: 0.6;
}

.accountview-visual span {
    width: 52%;
    aspect-ratio: 1;
    left: 24%;
    bottom: -9%;
    opacity: 0.45;
}

.connection-panel {
    display: grid;
    align-content: end;
    padding: clamp(20px, 5vw, 44px);
}

.command-actions {
    flex-wrap: wrap;
    margin-top: 24px;
}

.empty-state {
    min-height: 120px;
    display: grid;
    place-items: center;
    padding: 20px;
    color: var(--text-muted);
    text-align: center;
    font-size: 13px;
    font-weight: 300;
}

/* Highlight banner */
.story-band {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 20px;
    border: 1px solid rgba(197, 160, 89, 0.22);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(120deg, rgba(197, 160, 89, 0.08), transparent 48%, rgba(232, 212, 160, 0.04)),
        rgba(14, 19, 16, 0.5);
    backdrop-filter: blur(20px);
}

.story-band h2 {
    max-width: 620px;
    font-size: 21px;
    color: var(--text-white);
}

.story-band p {
    margin-bottom: 0;
    font-size: 13.5px;
    line-height: 1.6;
}

.household-visuals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.log {
    display: none;
}

/* Donut & Sankey hybrid overrides */
.library-chart {
    width: 100%;
    min-width: 0;
}

.donut-library-chart {
    display: grid;
    grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1.2fr);
    gap: 20px;
    align-items: center;
}

.donut-canvas {
    min-width: 0;
    display: grid;
    place-items: center;
}

.donut-canvas svg {
    width: min(100%, 260px);
    aspect-ratio: 1;
    overflow: visible;
}

.donut-slice {
    stroke: rgba(11, 15, 12, 0.98);
    stroke-width: 2.5;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
    cursor: pointer;
}

.donut-slice:hover {
    filter: drop-shadow(0 0 10px rgba(197, 160, 89, 0.4)) brightness(1.08);
}

.donut-hole {
    fill: #0d120f;
    stroke: rgba(197, 160, 89, 0.15);
}

.donut-total {
    fill: var(--text-white);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
}

.donut-label {
    fill: var(--text-muted);
    font-family: var(--font-ui);
    font-size: 7px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.donut-callout {
    fill: none;
    stroke: rgba(197, 160, 89, 0.2);
    stroke-width: 1;
}

/* Donut legends */
.chart-legend {
    min-width: 0;
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chart-legend li {
    min-width: 0;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 5px 10px;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid rgba(197, 160, 89, 0.12);
    border-radius: var(--radius);
    background: rgba(11, 15, 12, 0.5);
}

.chart-legend li > span {
    width: 8px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--swatch);
    box-shadow: 0 0 6px var(--swatch);
}

.chart-legend strong {
    color: var(--text-white);
    font-size: 12.5px;
    font-weight: 500;
}

.chart-legend em {
    grid-column: 2;
    color: var(--text-muted);
    font-size: 11px;
    font-style: normal;
}

/* Sankey Layout */
.sankey-library-chart {
    min-height: 290px;
    display: grid;
    align-items: center;
    overflow: hidden;
}

.sankey-library-chart svg {
    width: 100%;
    min-width: 580px;
    height: auto;
    overflow: visible;
}

.sankey-link {
    mix-blend-mode: screen;
    stroke-linecap: round;
    opacity: 0.72;
}

.sankey-node rect {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

.sankey-title,
.sankey-value {
    pointer-events: none;
    font-family: var(--font-ui);
    paint-order: stroke;
    stroke: rgba(11, 15, 12, 0.9);
    stroke-width: 4px;
    stroke-linejoin: round;
}

.sankey-title {
    fill: var(--text-white);
    font-size: 13.5px;
    font-weight: 500;
}

.sankey-value {
    fill: var(--sage-accent);
    font-size: 11px;
    font-weight: 400;
}

/* Risk Shield Gaps Analyzer */
.insurance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 14px;
}

.insurance-card {
    min-height: 96px;
    position: relative;
    padding-left: 16px;
}

.insurance-card.locked {
    border-color: rgba(224, 138, 133, 0.22);
    background: rgba(224, 138, 133, 0.02);
}

.insurance-card.locked::before {
    content: "⚠️ SHIELD GAPS";
    position: absolute;
    right: 14px;
    top: 12px;
    font-size: 9.5px;
    color: var(--coral-alert);
    border: 1px solid rgba(224, 138, 133, 0.3);
    padding: 2px 6px;
    border-radius: var(--radius);
    background: rgba(224, 138, 133, 0.1);
}

.protection-banner {
    grid-column: span 2;
    padding: 22px;
    border: 1px dashed rgba(197, 160, 89, 0.35);
    border-radius: var(--radius-lg);
    background: rgba(197, 160, 89, 0.04);
    text-align: center;
    display: grid;
    place-items: center;
    gap: 12px;
}

.protection-banner h3 {
    margin: 0;
    font-size: 16px;
    color: var(--sage-accent);
}

.protection-banner p {
    margin: 0;
    font-size: 13.5px;
    max-width: 580px;
}

/* Savings telemetry milestones progress meters */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px 18px 18px;
}

.goal-item {
    border: 1px solid rgba(197, 160, 89, 0.14);
    border-radius: var(--radius);
    background: rgba(11, 15, 12, 0.4);
    padding: 12px 14px;
    display: grid;
    gap: 8px;
}

.goal-item:hover {
    border-color: var(--sage-accent);
    background: rgba(197, 160, 89, 0.06);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.goal-header strong {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-white);
}

.goal-header span {
    font-size: 12px;
    color: var(--sage-accent);
}

.goal-track {
    height: 8px;
    border-radius: 99px;
    background: rgba(197, 160, 89, 0.12);
    position: relative;
    border: 1px solid rgba(197, 160, 89, 0.2);
}

.goal-fill {
    height: 100%;
    /* Segmented clean ticks pattern */
    background: repeating-linear-gradient(
        90deg,
        var(--sage-accent) 0 4px,
        transparent 4px 6px
    );
    border-radius: inherit;
    box-shadow: 0 0 8px rgba(197, 160, 89, 0.2);
}

.goal-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

/* Chronological Cashflow Bus Timeline */
.cashflow-banner {
    margin: 16px;
    padding: 18px;
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(197, 160, 89, 0.04);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.cashflow-summary-box {
    text-align: right;
}

.cashflow-summary-box strong {
    display: block;
    font-size: 24px;
    color: var(--sage-accent);
}

.cashflow-summary-box span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.timeline-group {
    display: grid;
    gap: 6px;
    position: relative;
    padding-left: 16px;
    margin-left: 10px;
    border-left: 1px dashed rgba(197, 160, 89, 0.25);
}

.timeline-group::before {
    content: "";
    position: absolute;
    left: -4.5px;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sage-accent);
    box-shadow: 0 0 8px var(--sage-accent);
}

.timeline-date {
    padding: 4px 0 2px;
    color: var(--sage-accent);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-group .data-list {
    padding: 0 0 12px;
}

/* transaction pills */
.tx-type-pill {
    display: inline-flex;
    padding: 1px 6px;
    border-radius: var(--radius);
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 4px;
    border: 1px solid transparent;
}

.tx-type-pill.inflow {
    color: var(--mint-accent);
    background: rgba(162, 196, 176, 0.08);
    border-color: rgba(162, 196, 176, 0.25);
}

.tx-type-pill.outflow {
    color: var(--coral-alert);
    background: rgba(224, 138, 133, 0.08);
    border-color: rgba(224, 138, 133, 0.25);
}

/* Responsiveness overrides */
@media (max-width: 1120px) {
    .top-nav,
    .overview-grid.visual-grid,
    .household-visuals,
    .story-band,
    .insurance-grid,
    .funding-board,
    .goals-grid {
        grid-template-columns: 1fr;
    }

    .funding-plan-toolbar {
        grid-template-columns: 1fr;
    }

    .funding-plan-actions {
        justify-content: flex-start;
    }

    .funding-map-workspace {
        grid-template-columns: 1fr;
    }

    .funding-inspector {
        min-height: 0;
    }

    .protection-banner {
        grid-column: span 1;
    }

    .workspace-nav,
    .nav-actions,
    .directory-summary {
        justify-self: start;
    }

    .attention-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .top-nav {
        position: static;
        grid-template-columns: 1fr;
    }

    .workspace-nav {
        width: 100%;
        justify-content: space-around;
    }

    .nav-link {
        flex: 1 1 0;
        min-width: 0;
        text-align: center;
    }

    .context-bar,
    .metric-band,
    .summary-strip,
    .summary-strip.three,
    .summary-strip.four,
    .attention-grid,
    .donut-library-chart {
        grid-template-columns: 1fr;
    }

    .page-intro h1,
    .auth-copy h1,
    .household-header .page-intro h1 {
        font-size: 32px;
    }

    .household-header {
        min-height: 240px;
        padding: 16px;
    }

    .sankey-library-chart {
        overflow-x: auto;
        justify-content: start;
    }

    .sankey-library-chart svg {
        min-width: 580px;
    }

    .cashflow-banner {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: left;
    }

    .cashflow-summary-box {
        text-align: left;
    }

    .funding-empty,
    .funding-error {
        align-items: flex-start;
        flex-direction: column;
    }

    .funding-two-col,
    .funding-result-grid,
    .funding-allocation-row {
        grid-template-columns: 1fr;
    }

    .funding-plan-actions,
    .funding-plan-actions .button,
    .funding-plan-select {
        width: 100%;
    }

    .funding-map-workspace {
        min-height: 0;
    }

    .funding-map-canvas {
        min-height: 680px;
    }

    .funding-map-viewport {
        min-height: 680px;
        height: 72vh;
    }

    .funding-map-stage {
        width: 2400px;
        height: 1450px;
    }

    .funding-node {
        min-width: 170px;
    }

    .funding-source-node {
        left: calc((var(--node-x) * 1%));
    }

    .funding-flow-chip {
        width: 112px;
    }
}

/* Book UI cleanup pass */
.workspace {
    grid-template-columns: 264px minmax(0, 1fr);
}

.workspace-sidebar {
    overflow: auto;
    scrollbar-width: thin;
    padding: 28px 16px 18px;
}

.workspace-main-content {
    padding: 0;
}

.book-topbar {
    position: sticky;
    top: 0;
    z-index: 8;
    margin: 0;
    box-shadow: 0 14px 34px rgba(55, 47, 34, 0.06);
}

.app-page.active {
    width: min(1480px, calc(100% - 56px));
    margin: 0 auto;
    padding: 28px 0 40px;
}

.household-header-strip {
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.household-header-strip::before,
.household-header-strip::after {
    content: none;
}

.household-dossier-header {
    min-height: 148px;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
    align-items: center;
    padding: 28px 32px;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
    box-shadow: none;
}

.household-dossier-header h2 {
    color: var(--book-ink);
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1;
    white-space: normal;
}

.dossier-metrics-group {
    align-items: center;
    justify-content: end;
}

.dossier-metric-item {
    min-width: 0;
}

.dossier-metric-item.lede-item {
    max-width: 420px;
}

.net-worth-badge {
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.05;
    white-space: nowrap;
}

.dossier-meta {
    font-size: 15px;
    line-height: 1.45;
}

.summary-strip {
    box-shadow: none;
}

.summary-strip .metric-tile {
    min-width: 0;
}

.metric-tile {
    min-width: 0;
    min-height: 132px;
    padding: 20px 20px 14px;
}

.metric-tile strong {
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: clamp(28px, 2.3vw, 38px);
}

.metric-tile em {
    overflow-wrap: anywhere;
}

.metric-sparkline {
    max-width: 140px;
}

.detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.chart-panel {
    min-height: auto;
}

.chart-stage {
    min-height: 330px;
    padding: 18px 22px 24px;
}

.donut-library-chart {
    grid-template-columns: minmax(220px, 0.85fr) minmax(260px, 1fr);
    gap: 20px;
}

.donut-canvas svg {
    width: min(100%, 240px);
}

.donut-slice {
    stroke-width: 1.5;
    filter: none;
}

.donut-slice:hover {
    filter: none;
}

.donut-callout {
    display: none;
}

.chart-legend li {
    padding: 10px 12px;
    background: transparent;
}

.sankey-library-chart {
    min-height: 300px;
    overflow: hidden;
}

.sankey-library-chart svg {
    min-width: 0;
}

.sankey-link {
    opacity: 0.32;
    mix-blend-mode: multiply;
}

.sankey-node rect {
    filter: none;
}

.sankey-title,
.sankey-value {
    paint-order: normal;
    stroke: transparent;
}

.sankey-title {
    font-size: 13px;
}

.sankey-value {
    fill: var(--book-muted);
    font-size: 11px;
}

.story-band {
    padding: 22px 24px;
    background: #fbf8f1;
}

.story-band h2 {
    font-size: 24px;
}

.balance-sheet,
.data-list {
    background: transparent;
}

.balance-row,
.data-item,
.account-row,
.timeline-group .data-item {
    background: transparent;
}

.money-cell,
.account-meta {
    color: var(--book-ink);
}

.money-cell.negative {
    color: var(--book-red);
}

.timeline-group {
    margin: 0;
    padding-left: 16px;
    border-left: 1px solid var(--book-line);
}

.timeline-group::before {
    background: var(--book-gold);
    box-shadow: none;
}

@media (max-width: 1280px) {
    .household-dossier-header,
    .detail-grid,
    .donut-library-chart {
        grid-template-columns: 1fr;
    }

    .dossier-metrics-group {
        justify-content: start;
    }
}

/* Compact left rail: no internal scrollbar */
.workspace-sidebar {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
    padding: 14px 14px 10px;
}

.sidebar-top {
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.finn-brand {
    min-height: 38px;
    padding: 0 6px 8px;
}

.brand-row {
    gap: 10px;
}

.brand-mark {
    width: 30px;
    height: 30px;
}

.brand-row strong {
    font-size: 21px;
    line-height: 1;
}

.brand-row span {
    margin-top: 3px;
    font-size: 9px;
}

.workspace-nav {
    min-height: 0;
    align-content: start;
    gap: 1px;
    padding-top: 8px;
    overflow: hidden;
}

.nav-section-label {
    margin: 10px 8px 4px;
    font-size: 10px;
    letter-spacing: 0.24em;
}

.nav-link {
    min-height: 28px;
    padding: 0 9px;
    font-size: 13px;
}

.nav-link em {
    font-size: 11px;
}

.sidebar-bottom {
    min-width: 0;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-session,
.sidebar-actions {
    gap: 6px;
}

.email-badge,
.status-indicator,
.meta-list span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.25;
}

.meta-list {
    gap: 4px;
}

.meta-list b {
    font-size: 9px;
    letter-spacing: 0.14em;
}

.status-chip {
    justify-content: center;
    min-height: 22px;
    padding: 3px 7px;
    font-size: 10px;
}

.btn-group {
    gap: 6px;
}

.sidebar-actions .button,
.button.compact {
    min-height: 27px;
    padding: 0 10px;
    font-size: 10px;
    letter-spacing: 0.12em;
}

@media (max-height: 760px) {
    .workspace-sidebar {
        padding: 12px 10px 10px;
    }

    .finn-brand {
        min-height: 44px;
        padding-bottom: 10px;
    }

    .brand-mark {
        width: 28px;
        height: 28px;
    }

    .brand-row strong {
        font-size: 19px;
    }

    .workspace-nav {
        padding-top: 8px;
    }

    .nav-section-label {
        margin-top: 8px;
        margin-bottom: 4px;
        font-size: 9px;
    }

    .nav-link {
        min-height: 24px;
        font-size: 12px;
    }

    .sidebar-bottom {
        gap: 5px;
        padding-top: 6px;
    }

    .meta-list {
        display: none;
    }

    .email-badge,
    .status-indicator,
    .meta-list span {
        font-size: 10px;
    }

    .status-chip {
        min-height: 20px;
    }

    .sidebar-actions .button,
    .button.compact {
        min-height: 24px;
    }
}

@media (max-height: 860px) {
    .workspace-sidebar {
        padding-top: 12px;
        padding-bottom: 10px;
    }

    .workspace-nav {
        padding-top: 6px;
    }

    .nav-section-label {
        margin-top: 8px;
        margin-bottom: 3px;
    }

    .nav-link {
        min-height: 26px;
        font-size: 12.5px;
    }

    .email-badge {
        display: none;
    }
}

@media (max-height: 700px) {
    .sidebar-bottom {
        display: none;
    }

    .nav-link {
        min-height: 25px;
    }
}

@media (max-width: 1024px) {
    .workspace {
        grid-template-columns: 1fr;
    }
    .workspace-sidebar {
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }
    .household-dossier-header {
        grid-template-columns: 1fr;
    }
    .dossier-metrics-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* MFA book overview redesign */
:root {
    --book-bg: #eee8dd;
    --book-panel: #fbf8f1;
    --book-panel-soft: #f5efe5;
    --book-line: #d8cdbb;
    --book-line-strong: #c6b79f;
    --book-ink: #171716;
    --book-muted: #61574d;
    --book-dim: #786d60;
    --book-sidebar: #141414;
    --book-gold: #7a541e;
    --book-green: #4f6d52;
    --book-red: #a95243;
    --book-radius: 0;
    --text-white: var(--book-ink);
    --text-muted: #5f574e;
    --text-dim: #756c61;
    --font-ui: "Inter", "Segoe UI", system-ui, sans-serif;
    --font-display: "Playfair Display", Georgia, serif;
}

html,
body {
    background: var(--book-bg);
}

body {
    color: var(--book-ink);
    font-family: var(--font-ui);
    font-weight: 400;
}

body::before,
body::after,
.background-stage,
.background-slide {
    display: none;
}

h1,
h2,
h3 {
    color: var(--book-ink);
    font-family: var(--font-display);
    letter-spacing: 0;
}

h1 {
    font-size: clamp(42px, 5vw, 62px);
    line-height: 0.98;
    font-weight: 400;
}

h2 {
    font-size: 26px;
    font-weight: 400;
}

p {
    color: var(--book-muted);
}

.auth-gate {
    color: var(--book-ink);
    border: 1px solid var(--book-line);
    background: var(--book-panel);
    box-shadow: 0 20px 50px rgba(41, 35, 25, 0.12);
}

.auth-gate::before,
.auth-gate::after,
.data-panel::before,
.data-panel::after,
.detail-section::before,
.detail-section::after,
.household-directory::before,
.household-directory::after,
.insight-card::before,
.insight-card::after {
    content: none;
}

.workspace {
    height: 100vh;
    display: grid;
    grid-template-columns: 282px minmax(0, 1fr);
    overflow: hidden;
    background: var(--book-bg);
}

.workspace-sidebar {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px 18px;
    border: 0;
    border-right: 1px solid #262626;
    background: var(--book-sidebar);
    color: #f7f3ea;
}

.finn-brand {
    min-height: 70px;
    padding: 0 8px 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #f7f3ea;
    font-family: var(--font-display);
    font-size: 26px;
}

.brand-row strong {
    display: block;
    color: #f7f3ea;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand-row span {
    display: block;
    color: rgba(247, 243, 234, 0.48);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.workspace-nav {
    display: grid;
    gap: 4px;
    padding: 28px 0 0;
    border: 0;
    background: transparent;
}

.nav-section-label {
    margin: 24px 10px 10px;
    color: rgba(230, 204, 154, 0.58);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.nav-link {
    width: 100%;
    min-height: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: rgba(247, 243, 234, 0.72);
    text-align: left;
    cursor: pointer;
}

.workspace-sidebar .nav-link {
    color: #e9dfce;
}

.nav-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-link em {
    color: #c8baa3;
    font-style: normal;
    font-size: 12px;
}

.workspace-sidebar .nav-link.active {
    border-color: rgba(181, 138, 66, 0.6);
    background: #c5a059;
    color: #171716;
}

.workspace-sidebar .nav-link.active em {
    color: #3b3326;
}

.workspace-sidebar .nav-link:hover {
    color: #fffaf0;
}

.context-nav button {
    color: var(--book-muted);
}

.nav-link:hover {
    transform: none;
    color: #f7f3ea;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-session,
.sidebar-actions {
    display: grid;
    gap: 14px;
}

.email-badge,
.status-indicator,
.meta-list span {
    display: block;
    color: rgba(247, 243, 234, 0.66);
    font-size: 12px;
}

.meta-list {
    display: grid;
    gap: 8px;
}

.meta-list b,
.meta-list em {
    display: block;
    font-style: normal;
}

.meta-list b {
    color: rgba(230, 204, 154, 0.55);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.meta-list em {
    color: rgba(247, 243, 234, 0.72);
}

.status-chip {
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid rgba(247, 243, 234, 0.12);
    border-radius: 4px;
    color: rgba(247, 243, 234, 0.56);
    font-size: 11px;
}

.status-chip.ok {
    color: #aabf8c;
}

.status-chip.bad {
    color: #d48773;
}

.workspace-main-content {
    min-width: 0;
    height: 100vh;
    overflow: auto;
    background: var(--book-bg);
}

.book-topbar {
    min-height: 66px;
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.5fr) auto;
    align-items: center;
    gap: 14px;
    padding: 0 28px;
    border-bottom: 1px solid var(--book-line);
    background: #f4eee4;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--book-muted);
    font-size: 14px;
    white-space: nowrap;
}

.breadcrumbs strong {
    color: var(--book-ink);
}

.topbar-search {
    height: 40px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid var(--book-line);
    border-radius: 4px;
    background: var(--book-panel);
    color: var(--book-muted);
}

.topbar-search input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--book-ink);
    font: inherit;
}

.topbar-actions,
.segment-controls,
.panel-tabs,
.btn-group,
.command-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.utility-button,
.segment-controls button,
.overview-advisor-filter,
.button {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--book-line);
    border-radius: 3px;
    background: var(--book-panel);
    color: var(--book-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.button.primary,
.segment-controls button.active {
    border-color: #141414;
    background: #141414;
    color: #d8aa5d;
}

.button.secondary {
    background: var(--book-panel);
    color: var(--book-ink);
}

.button:hover,
.utility-button:hover,
.segment-controls button:hover {
    transform: none;
    border-color: var(--book-line-strong);
}

.app-page.active {
    display: grid;
    gap: 24px;
    padding: 30px 34px 40px;
}

.book-heading-row,
.split-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
}

.page-intro {
    max-width: none;
    padding: 0;
}

.eyebrow,
.mini-heading {
    margin: 0 0 12px;
    color: var(--book-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
}

.lede {
    margin: 8px 0 0;
    color: var(--book-muted);
    font-size: 16px;
}

.lede strong {
    color: var(--book-ink);
}

.metric-band {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
}

.metric-tile {
    min-height: 150px;
    padding: 22px 22px 16px;
    border: 0;
    border-right: 1px solid var(--book-line);
    border-radius: 0;
    background: var(--book-panel);
    box-shadow: none;
}

.metric-tile:last-child {
    border-right: 0;
}

.metric-tile .mini-heading {
    margin-bottom: 14px;
    color: var(--book-muted);
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.metric-tile strong {
    display: block;
    margin: 0;
    color: var(--book-ink);
    font-family: var(--font-display);
    font-size: 40px;
    line-height: 1;
    font-weight: 400;
}

.metric-tile.risk strong,
.metric-tile.warn strong,
.metric-tile.down strong {
    color: var(--book-red);
}

.metric-tile em {
    display: block;
    margin-top: 10px;
    color: var(--book-green);
    font-style: normal;
    font-size: 13px;
}

.metric-tile.risk em,
.metric-tile.warn em,
.metric-tile.down em {
    color: var(--book-red);
}

.metric-sparkline {
    width: 100%;
    height: 26px;
    margin-top: 10px;
}

.metric-sparkline polyline {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.book-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr);
    gap: 18px;
}

.data-panel,
.detail-section,
.insight-card,
.connection-panel,
.household-directory,
.connection-summary {
    overflow: hidden;
    border: 1px solid var(--book-line);
    border-radius: 0;
    background: var(--book-panel);
    box-shadow: none;
    backdrop-filter: none;
}

.detail-section {
    color: var(--book-ink);
}

.detail-section :is(strong, b, h2, h3) {
    color: var(--book-ink);
}

.detail-section :is(span, em, small, p, li) {
    color: #5f574e;
}

.detail-section .mini-heading {
    color: #756c61;
}

.detail-section .account-meta,
.detail-section .money-cell {
    color: var(--book-ink);
}

.detail-section .account-status {
    border-color: #c3aa7d;
    background: #eadabd;
    color: #5f431b;
}

.data-panel:hover,
.detail-section:hover,
.insight-card:hover {
    transform: none;
    background: var(--book-panel);
}

.panel-heading {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--book-line);
    background: #f8f3ea;
}

.panel-heading h2 {
    margin: 0;
    font-size: 26px;
}

.panel-tabs {
    color: var(--book-muted);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.panel-tabs b {
    color: var(--book-ink);
    border-bottom: 1px solid var(--book-ink);
    padding-bottom: 8px;
}

.aum-panel {
    min-height: 520px;
}

.alerts-panel {
    min-height: 520px;
}

.task-panel,
.meeting-panel,
.compliance-panel {
    min-height: 260px;
}

.chart-stage {
    min-height: 430px;
    padding: 14px 22px 22px;
}

.utility-chart {
    display: none;
}

.aum-grid line {
    stroke: #e2d7c5;
}

.flow-bars rect,
.flow-bars {
    opacity: 0.95;
}

.aum-line {
    fill: none;
    stroke: #20201f;
    stroke-width: 3;
}

.aum-endpoint {
    fill: var(--book-panel);
    stroke: #20201f;
    stroke-width: 3;
}

.aum-axis text {
    fill: var(--book-muted);
    font-size: 12px;
}

.aum-axis path,
.aum-axis line {
    stroke: transparent;
}

.chart-current-label {
    fill: var(--book-green);
    font-size: 13px;
    font-weight: 700;
}

.household-value-panel { grid-column: 1 / -1; } .household-value-panel .panel-heading { align-items: flex-end; } .household-value-panel .panel-heading .eyebrow { margin: 0 0 5px; } .household-value-panel .panel-heading-note { margin: 0; color: var(--book-muted); font-size: 13px; } .household-value-distribution { padding: 22px; } .household-value-summary { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(150px, 1fr) auto; gap: 12px; margin-bottom: 18px; } .household-value-summary > div, .household-value-summary > button { min-height: 66px; padding: 12px 16px; border: 1px solid var(--book-line); background: #fbf7ef; text-align: left; } .household-value-summary span, .household-value-summary > div > strong { display: block; } .household-value-summary span { color: var(--book-muted); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; } .household-value-summary > div > strong { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 23px; } .household-value-summary > button { min-width: 112px; color: var(--book-ink); cursor: pointer; font-weight: 800; text-align: center; } .household-value-summary > button.active { border-color: var(--book-green); background: var(--book-green); color: #fff; } .household-value-workspace { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(520px, 1fr); gap: 18px; } .household-value-map, .household-quartile-table { min-width: 0; border: 1px solid var(--book-line); background: #fbf7ef; } .household-value-map { padding: 16px; } .household-value-map-heading, .household-quartile-clients-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; } .household-value-map-heading > div > span, .household-quartile-clients-heading > div > span { display: block; color: var(--book-muted); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; } .household-value-map-heading > div > strong, .household-quartile-clients-heading > div > strong { display: block; margin-top: 3px; font-size: 15px; } .household-value-map-scale { display: flex; align-items: center; gap: 8px; color: var(--book-muted); font-size: 10px; } .household-value-map-scale i { width: 72px; height: 1px; overflow: hidden; background: var(--book-line); color: transparent; } .household-value-plot { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); min-height: 230px; margin-top: 15px; border: 1px solid var(--book-line); overflow: hidden; background: linear-gradient(90deg, rgba(43, 111, 78, 0.08), rgba(189, 150, 87, 0.04)); } .household-value-zone { position: relative; z-index: 1; padding: 12px; border: 0; border-right: 1px solid var(--book-line); background: transparent; color: var(--book-muted); cursor: pointer; text-align: left; } .household-value-zone:last-of-type { border-right: 0; } .household-value-zone.active { background: rgba(43, 111, 78, 0.1); color: var(--book-green); box-shadow: inset 0 3px 0 var(--book-green); } .household-value-zone span, .household-value-zone small { display: block; } .household-value-zone span { font-size: 12px; font-weight: 900; } .household-value-zone small { margin-top: 2px; font-size: 10px; } .household-value-node { position: absolute; z-index: 2; left: var(--node-x); top: var(--node-y); width: 13px; height: 13px; padding: 0; border: 2px solid #fbf7ef; border-radius: 50%; background: #9f8e74; box-shadow: 0 0 0 1px rgba(32, 32, 31, 0.22); cursor: pointer; opacity: 0.18; transform: translate(-50%, -50%); transition: opacity 140ms ease, transform 140ms ease, background 140ms ease; } .household-value-node.is-selected { background: var(--book-green); opacity: 0.92; } .household-value-node:hover, .household-value-node:focus-visible { z-index: 3; opacity: 1; transform: translate(-50%, -50%) scale(1.45); } .household-quartile-table { overflow: hidden; } .household-quartile-header, .household-quartile-row { display: grid; grid-template-columns: 0.65fr 0.8fr 0.9fr 1.25fr; gap: 10px; align-items: center; } .household-quartile-header { padding: 10px 14px; border-bottom: 1px solid var(--book-line); color: var(--book-muted); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; } .household-quartile-row { width: 100%; min-height: 57px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--book-line); background: transparent; color: var(--book-ink); cursor: pointer; text-align: left; } .household-quartile-row:last-child { border-bottom: 0; } .household-quartile-row:hover, .household-quartile-row.active { background: rgba(43, 111, 78, 0.08); } .household-quartile-row.active { box-shadow: inset 3px 0 0 var(--book-green); } .household-quartile-row span, .household-quartile-row strong, .household-quartile-row small { display: block; } .household-quartile-row strong { font-size: 12px; } .household-quartile-row small { margin-top: 2px; color: var(--book-muted); font-size: 10px; } .household-quartile-clients { margin-top: 18px; border: 1px solid var(--book-line); background: #fbf7ef; } .household-quartile-clients-heading { padding: 13px 16px; border-bottom: 1px solid var(--book-line); } .household-quartile-clients-heading > span { color: var(--book-muted); font-size: 12px; } .household-quartile-client-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 310px; overflow: auto; } .household-quartile-client-list > button { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; padding: 13px 16px; border: 0; border-right: 1px solid var(--book-line); border-bottom: 1px solid var(--book-line); background: transparent; color: var(--book-ink); cursor: pointer; text-align: left; } .household-quartile-client-list > button:nth-child(2n) { border-right: 0; } .household-quartile-client-list > button:hover { background: rgba(189, 150, 87, 0.09); } .household-quartile-client-list span, .household-quartile-client-list strong, .household-quartile-client-list small { display: block; } .household-quartile-client-list span { min-width: 0; } .household-quartile-client-list span:first-child strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .household-quartile-client-list span:last-child { flex: 0 0 auto; text-align: right; } .household-quartile-client-list strong { font-size: 12px; } .household-quartile-client-list small { margin-top: 3px; color: var(--book-muted); font-size: 10px; }

.attention-lane {
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.alert-list {
    max-height: 440px;
    overflow: auto;
}

.signal-card {
    min-height: 92px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
    padding: 18px 20px;
    border: 0;
    border-bottom: 1px solid var(--book-line);
    border-left: 4px solid var(--book-gold);
    border-radius: 0;
    background: var(--book-panel);
}

.signal-card.red {
    border-left-color: var(--book-red);
}

.signal-card.green {
    border-left-color: var(--book-green);
}

.signal-card strong {
    display: block;
    color: var(--book-ink);
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 700;
}

.signal-card p {
    margin: 6px 0 0;
    color: var(--book-muted);
    font-size: 14px;
}

.signal-card b {
    color: var(--book-gold);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.signal-card.red b {
    color: var(--book-red);
}

.data-list {
    display: grid;
    gap: 0;
    padding: 0;
}

.task-row,
.meeting-row,
.data-item,
.account-row,
.balance-row,
.lineage-row,
.member-row {
    min-width: 0;
    display: grid;
    gap: 10px;
    padding: 16px 22px;
    border: 0;
    border-bottom: 1px solid var(--book-line);
    border-radius: 0;
    background: transparent;
}

.task-row {
    grid-template-columns: 18px minmax(0, 1fr) 28px;
    align-items: start;
}

.checkbox {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    border: 1px solid var(--book-line-strong);
    background: var(--book-panel);
}

.task-row strong,
.meeting-row strong,
.data-item strong,
.account-row strong,
.balance-row strong,
.lineage-row strong,
.member-row strong {
    color: var(--book-ink);
    font-size: 15px;
    font-weight: 700;
}

.data-item span,
.account-row span,
.balance-row span,
.lineage-row span,
.member-row span,
.member-row em {
    color: var(--book-muted);
}

.account-status {
    border-color: #d4bd95;
    background: #f3e7d3;
    color: #725424;
    font-weight: 800;
}

.task-row p {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 0;
}

.task-row p b,
.task-row p em,
.meeting-row div b,
.meeting-row div em {
    padding: 3px 8px;
    border: 1px solid var(--book-line);
    background: #f4eadc;
    color: var(--book-ink);
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.task-row p b {
    color: var(--book-red);
    background: #f1ddd5;
}

.task-row i {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid var(--book-line);
    border-radius: 50%;
    background: #f4eadc;
    color: var(--book-muted);
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
}

.meeting-row {
    gap: 8px;
}

.meeting-row .eyebrow {
    margin: 0;
    font-size: 11px;
}

.meeting-row span {
    color: var(--book-muted);
}

.meeting-row div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 6px;
}

.meeting-row div b {
    color: var(--book-green);
    background: #e8efd9;
}

.compliance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 18px;
}

.compliance-card {
    min-height: 104px;
    padding: 18px;
    border: 1px solid var(--book-line);
    background: #f8f3ea;
}

.compliance-card span {
    color: var(--book-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.compliance-card strong {
    display: block;
    margin-top: 18px;
    color: var(--book-red);
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 400;
}

.compliance-card:last-child strong {
    color: var(--book-green);
}

.compliance-card em {
    color: var(--book-muted);
    font-style: italic;
}

.sync-note {
    color: var(--book-muted);
    font-size: 13px;
}

.directory-summary {
    min-width: 150px;
    padding: 18px;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
}

.directory-summary span {
    display: block;
    color: var(--book-ink);
    font-family: var(--font-display);
    font-size: 38px;
}

.directory-summary em {
    color: var(--book-muted);
    font-style: normal;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.household-directory {
    display: grid;
    gap: 0;
}

.household-row {
    min-height: 76px;
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(120px, 0.6fr) minmax(90px, 0.4fr) minmax(140px, 0.7fr);
    align-items: center;
    gap: 18px;
    padding: 16px 22px;
    border: 0;
    border-bottom: 1px solid var(--book-line);
    background: var(--book-panel);
    color: var(--book-ink);
    text-align: left;
}

.household-row:hover,
.household-row.active {
    background: #f4eee4;
}

.household-row strong,
.household-row b {
    color: var(--book-ink);
}

.household-row span,
.household-row em {
    color: var(--book-muted);
    font-style: normal;
}

.household-header-strip {
    display: grid;
    gap: 12px;
}

.text-button {
    justify-self: start;
    border: 0;
    background: transparent;
    color: var(--book-gold);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.household-dossier-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
}

.household-dossier-header h2 {
    margin: 0;
    max-width: 680px;
    font-size: 34px;
    line-height: 1.02;
}

.dossier-metrics-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.net-worth-badge {
    color: var(--book-ink);
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1;
}

.dossier-meta {
    max-width: 460px;
    margin: 0;
    color: var(--book-muted);
    font-size: 14px;
    line-height: 1.45;
}

.summary-strip,
.summary-strip.three,
.summary-strip.four {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
}

.summary-strip.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-strip.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-grid,
.household-visuals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.household-layout {
    display: grid;
    gap: 18px;
}

.story-band {
    border: 1px solid var(--book-line);
    border-radius: 0;
    background: var(--book-panel);
}

.story-band h2 {
    color: var(--book-ink);
}

.donut-hole {
    fill: var(--book-panel);
}

.donut-total,
.donut-label,
.sankey-title,
.sankey-value {
    fill: var(--book-ink);
    stroke: transparent;
}

.chart-legend li {
    border-color: var(--book-line);
    border-radius: 0;
    background: #f8f3ea;
}

.chart-legend strong {
    color: var(--book-ink);
}

.chart-legend em {
    color: var(--book-muted);
}

.accountview-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 18px;
}

.accountview-visual {
    min-height: 520px;
    border: 1px solid var(--book-line);
    background:
        linear-gradient(120deg, rgba(20, 20, 20, 0.72), rgba(20, 20, 20, 0.28)),
        url("assets/backgrounds/moss-digital-path.webp") center / cover;
}

.connection-panel {
    padding: 36px;
}

.empty-state {
    color: var(--book-muted);
}

@media (max-width: 1180px) {
    .workspace {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    .workspace-sidebar {
        height: auto;
        position: static;
    }

    .workspace-main-content {
        height: auto;
        overflow: visible;
    }

    .book-topbar,
    .book-heading-row,
    .split-intro,
    .book-dashboard-grid,
    .detail-grid,
    .household-dossier-header,
    .accountview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .app-page.active {
        padding: 20px 16px 28px;
    }

    .book-topbar {
        grid-template-columns: 1fr;
        padding: 14px 16px;
    }

    .topbar-actions,
    .segment-controls,
    .dossier-metrics-group {
        flex-wrap: wrap;
    }

    .metric-band,
    .summary-strip,
    .summary-strip.three,
    .summary-strip.four,
    .compliance-grid,
    .household-row {
        grid-template-columns: 1fr;
    }

    .metric-tile {
        border-right: 0;
        border-bottom: 1px solid var(--book-line);
    }

    .chart-stage {
        min-height: 320px;
        overflow-x: auto;
    }

    .household-value-panel .panel-heading,
    .household-value-map-heading,
    .household-quartile-clients-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .household-value-distribution {
        padding: 14px;
    }

    .household-value-summary,
    .household-value-workspace,
    .household-quartile-client-list {
        grid-template-columns: 1fr;
    }

    .household-value-summary > button {
        min-height: 46px;
    }

    .household-quartile-table {
        overflow-x: auto;
    }

    .household-quartile-header,
    .household-quartile-row {
        min-width: 560px;
    }

    .household-quartile-client-list > button {
        border-right: 0;
    }
}

/* Final left-rail density override */
.workspace {
    grid-template-columns: 264px minmax(0, 1fr);
}

.workspace-sidebar {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    justify-content: stretch;
    overflow: hidden;
    padding: 14px 14px 10px;
}

.sidebar-top {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.finn-brand {
    min-height: 0;
    padding: 0 6px 8px;
}

.brand-mark {
    width: 30px;
    height: 30px;
}

.brand-row {
    gap: 10px;
}

.brand-row strong {
    font-size: 21px;
    line-height: 1;
}

.brand-row span {
    margin-top: 3px;
    font-size: 9px;
}

.workspace-nav {
    min-height: 0;
    align-content: start;
    gap: 1px;
    padding: 7px 0 0;
    overflow: hidden;
}

.nav-section-label {
    margin: 7px 8px 3px;
    font-size: 10px;
    letter-spacing: 0.22em;
}

.workspace-nav .nav-section-label:first-child {
    margin-top: 6px;
}

.nav-link {
    min-height: 27px;
    padding: 0 9px;
    font-size: 13px;
}

.nav-link em {
    font-size: 11px;
}

.sidebar-bottom {
    min-width: 0;
    gap: 5px;
    padding-top: 7px;
}

.sidebar-session,
.sidebar-actions {
    gap: 5px;
}

.email-badge,
.status-indicator,
.meta-list span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.2;
}

.meta-list {
    gap: 3px;
}

.firm-switcher-field {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.firm-switcher-field[hidden] {
    display: none;
}

.firm-switcher-field select {
    width: 100%;
    min-width: 0;
    min-height: 28px;
    padding: 4px 26px 4px 8px;
    border: 1px solid rgba(230, 204, 154, 0.28);
    border-radius: 7px;
    color: #f7f3ea;
    background: #272723;
    font: inherit;
    cursor: pointer;
}

.firm-switcher-field select:focus-visible {
    outline: 2px solid var(--book-gold);
    outline-offset: 2px;
}

.firm-switcher-field select:disabled {
    cursor: wait;
    opacity: 0.7;
}

.meta-list b {
    font-size: 9px;
}

.status-chip {
    min-height: 21px;
    padding: 2px 7px;
    justify-content: center;
    font-size: 10px;
}

.sidebar-actions .button,
.button.compact {
    min-height: 25px;
    padding: 0 10px;
    font-size: 10px;
}

@media (max-height: 860px) {
    .workspace-sidebar {
        padding: 10px 10px 8px;
    }

    .finn-brand {
        padding-bottom: 6px;
    }

    .workspace-nav {
        padding-top: 4px;
    }

    .nav-section-label {
        margin-top: 5px;
        margin-bottom: 2px;
        font-size: 9px;
    }

    .nav-link {
        min-height: 24px;
        font-size: 12px;
    }

    .email-badge {
        display: none;
    }
}

@media (max-height: 760px) {
    .meta-list {
        display: none;
    }

    .sidebar-bottom {
        gap: 4px;
    }
}

/* Sidebar collapse and anti-squish canvas */
.workspace {
    grid-template-columns: 256px minmax(0, 1fr);
    transition: grid-template-columns 180ms ease;
}

.workspace-main-content {
    overflow: auto;
}

.book-topbar,
.app-page.active {
    min-width: 1080px;
}

.finn-brand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
}

.sidebar-toggle {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(181, 138, 66, 0.38);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(247, 243, 234, 0.8);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.sidebar-toggle:hover {
    border-color: rgba(181, 138, 66, 0.7);
    background: rgba(181, 138, 66, 0.14);
    color: #f7f3ea;
}

body.sidebar-collapsed .workspace {
    grid-template-columns: 68px minmax(0, 1fr);
}

body.sidebar-collapsed .workspace-sidebar {
    padding: 12px 9px 10px;
}

body.sidebar-collapsed .sidebar-top {
    grid-template-rows: auto minmax(0, 1fr);
}

body.sidebar-collapsed .finn-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0 0 8px;
    gap: 6px;
}

body.sidebar-collapsed .finn-brand > div {
    display: none;
}

body.sidebar-collapsed .brand-mark {
    width: 34px;
    height: 34px;
}

body.sidebar-collapsed .sidebar-toggle {
    width: 38px;
    height: 28px;
}

body.sidebar-collapsed .workspace-nav {
    justify-items: center;
    gap: 4px;
    padding-top: 6px;
}

body.sidebar-collapsed .nav-section-label {
    display: none;
}

body.sidebar-collapsed .nav-link {
    width: 42px;
    min-height: 34px;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 0;
    text-align: center;
}

body.sidebar-collapsed .nav-link span,
body.sidebar-collapsed .nav-link em {
    display: none;
}

body.sidebar-collapsed .nav-link::before {
    content: attr(data-short);
    color: currentColor;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
}

body.sidebar-collapsed .sidebar-bottom {
    display: none;
}

@media (max-width: 1180px) {
    .workspace,
    body.sidebar-collapsed .workspace {
        grid-template-columns: 1fr;
    }

    .book-topbar,
    .app-page.active {
        min-width: 0;
    }
}

/* Business overview shell expansion */
.metric-band,
.module-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-tile.unconnected strong,
.metric-tile.unconnected em {
    color: var(--book-gold);
}

.unconnected-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border: 1px solid #d4bb86;
    background: #f7edd9;
    color: #8a6426;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.unconnected-panel .panel-heading {
    align-items: start;
}

.module-shell {
    display: grid;
    gap: 24px;
}

.module-heading {
    align-items: center;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.module-grid > .employer-benefits-workbench {
    grid-column: 1 / -1;
}

.review-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.firm-admin-switcher {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 8px;
    border: 1px solid var(--book-line);
    background: #f3eee3;
}

.firm-admin-section-button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 82px;
    padding: 16px 18px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--book-ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.firm-admin-section-button:hover {
    transform: translateY(-1px);
    border-color: rgba(159, 119, 48, 0.35);
}

.firm-admin-section-button.active {
    border-color: var(--book-gold);
    background: var(--book-panel);
    box-shadow: 0 8px 20px rgba(35, 28, 18, 0.08);
}

.firm-admin-section-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--book-line);
    border-radius: 50%;
    color: var(--book-gold);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
}

.firm-admin-section-button.active .firm-admin-section-number {
    border-color: var(--book-gold);
    background: var(--book-gold);
    color: #fff;
}

.firm-admin-section-button > span:nth-child(2) {
    display: grid;
    gap: 4px;
}

.firm-admin-section-button strong {
    font-size: 15px;
}

.firm-admin-section-button em {
    color: var(--book-muted);
    font-size: 12px;
    font-style: normal;
}

.firm-admin-section-button > b {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(159, 119, 48, 0.12);
    color: var(--book-gold);
    font-size: 12px;
}

.firm-admin-panel {
    display: grid;
    gap: 18px;
}

.firm-admin-panel[hidden] {
    display: none !important;
}

.settings-panel[hidden],
.advisor-upload-panel[hidden] {
    display: none !important;
}

.advisor-upload-switcher {
    display: flex;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--book-line);
}

.advisor-upload-switcher button {
    display: grid;
    gap: 2px;
    min-width: 190px;
    padding: 13px 16px;
    border: 1px solid var(--book-line);
    background: #f6f1e8;
    color: var(--book-ink);
    text-align: left;
    cursor: pointer;
}

.advisor-upload-switcher button.active {
    border-color: var(--book-gold);
    background: var(--book-ink);
    color: #fff;
}

.advisor-upload-switcher span {
    font-size: 13px;
    font-weight: 800;
}

.advisor-upload-switcher em {
    color: var(--book-muted);
    font-size: 10px;
    font-style: normal;
}

.advisor-upload-switcher button.active em {
    color: rgba(255, 255, 255, 0.62);
}

#advisor-settings-uploads-panel {
    display: grid;
    gap: 18px;
}

.advisor-upload-access {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--book-line);
    background: #f8f5ee;
}

.advisor-upload-access > b {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--book-gold);
    color: #fff;
    font-size: 12px;
}

.advisor-upload-access.blocked {
    border-color: #d7aaa4;
    background: #fff5f3;
}

.advisor-upload-access.blocked > b {
    background: #9d4038;
}

.advisor-upload-access > div {
    display: grid;
    gap: 3px;
}

.advisor-upload-access strong {
    font-size: 12px;
}

.advisor-upload-access span {
    color: var(--book-muted);
    font-size: 11px;
}

.advisor-roster-upload-card {
    display: grid;
    gap: 18px;
}

.setup-flow {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
}

.setup-flow-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 20px;
    align-items: start;
}

.setup-flow-header h2,
.setup-flow-header p,
.setup-next-action strong,
.setup-next-action p {
    margin: 0;
}

.setup-flow-header h2 {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 500;
}

.setup-flow-header p {
    max-width: 720px;
    color: var(--book-muted);
    font-size: 14px;
    line-height: 1.5;
}

.setup-next-action {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-left: 3px solid var(--book-gold);
    background: #fbf7ef;
}

.setup-next-action span {
    color: var(--book-gold);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.setup-next-action strong {
    color: var(--book-ink);
    font-size: 15px;
}

.setup-next-action p {
    color: var(--book-muted);
    font-size: 12px;
    line-height: 1.45;
}

.setup-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.setup-stage-rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.setup-stage {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 10px;
    align-items: center;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e2d3ba;
    background: #f8f3ea;
}

.setup-stage span {
    display: inline-grid;
    grid-row: span 2;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid #d4bb86;
    background: #fffaf0;
    color: var(--book-gold);
    font-size: 11px;
    font-weight: 900;
}

.setup-stage strong,
.setup-stage em {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.setup-stage strong {
    color: var(--book-ink);
    font-size: 12px;
}

.setup-stage em {
    color: var(--book-muted);
    font-size: 11px;
    font-style: normal;
}

.setup-stage.done span {
    background: #edf3ec;
    color: #5f8368;
}

.setup-stage.waiting {
    opacity: 0.62;
}

.review-panel {
    margin-bottom: 18px;
}

.review-account-list {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.review-account-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--book-line);
    background: #f8f3ea;
    color: var(--book-ink);
    cursor: grab;
}

.review-account-card.compact {
    gap: 12px;
    cursor: default;
}

.review-account-card-highlight {
    border-color: var(--book-gold);
    box-shadow: 0 0 0 2px rgba(176, 136, 72, 0.22);
}

.review-account-card.dragging,
.roster-client-card.dragging,
.roster-mapped-account.dragging {
    opacity: 0.58;
}

.review-account-main,
.review-account-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.review-account-main h2,
.review-account-main p {
    margin: 0;
}

.review-account-main h2 {
    color: var(--book-ink);
    font-size: 21px;
}

.review-account-main p {
    margin-top: 4px;
    color: var(--book-muted);
    font-size: 13px;
}

.review-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid #dcccae;
    background: #fffaf0;
    color: var(--book-muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.review-account-value {
    text-align: right;
}

.review-account-value strong,
.review-account-value span,
.review-account-evidence span,
.review-account-evidence b {
    display: block;
}

.review-account-value strong {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
}

.review-account-value span,
.review-account-evidence span {
    color: var(--book-muted);
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.review-account-evidence {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
}

.review-account-evidence b {
    margin-bottom: 3px;
    color: var(--book-ink);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.review-decision-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #dcccae;
    background: #fffaf0;
}

.review-decision-strip strong,
.review-decision-strip span {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.review-decision-strip strong {
    color: var(--book-ink);
    font-size: 13px;
}

.review-decision-strip span {
    margin-top: 3px;
    color: var(--book-muted);
    font-size: 12px;
}

.review-decision-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.review-evidence-details {
    border-top: 1px solid var(--book-line);
    padding-top: 10px;
}

.review-evidence-details > summary {
    width: max-content;
    color: #7b5923;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.review-evidence-details[open] > summary {
    margin-bottom: 10px;
}

.review-client-profile {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--book-line);
    background: #fbf7ef;
}

.review-client-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.review-client-profile-header::-webkit-details-marker {
    display: none;
}

.review-client-profile-header strong,
.review-client-profile-header span {
    display: block;
}

.review-client-profile-header strong {
    font-size: 13px;
}

.review-client-profile-header span {
    color: var(--book-muted);
    font-size: 12px;
}

.review-client-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    color: var(--book-muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    white-space: nowrap;
}

.review-client-toggle input {
    width: 16px;
    height: 16px;
}

.review-client-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding-top: 12px;
}

.review-client-grid label {
    display: grid;
    gap: 6px;
    color: var(--book-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.review-client-grid input {
    min-height: 38px;
    width: 100%;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
    color: var(--book-ink);
    padding: 0 12px;
    font: inherit;
}

.review-account-actions {
    grid-template-columns: minmax(220px, 1.15fr) minmax(220px, 1fr) minmax(170px, 240px) auto;
    align-items: end;
    padding-top: 2px;
}

.review-account-actions label {
    display: grid;
    gap: 6px;
    color: var(--book-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.review-account-actions input,
.review-account-actions select {
    min-height: 38px;
    width: 100%;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
    color: var(--book-ink);
    padding: 0 12px;
    font: inherit;
}

.review-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.review-candidate-list {
    display: grid;
    gap: 8px;
}

.review-candidate-list.empty {
    padding: 12px;
    border: 1px dashed var(--book-line);
    color: var(--book-muted);
    font-size: 13px;
}

.review-candidate {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #dcccae;
    background: #fffaf0;
}

.review-candidate.blocked {
    border-color: #e4b4ad;
    background: #fff1ef;
}

.review-candidate strong,
.review-candidate span,
.review-candidate small {
    display: block;
}

.review-candidate strong {
    font-size: 13px;
}

.review-candidate span,
.review-candidate small {
    color: var(--book-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.review-candidate em {
    align-self: start;
    color: var(--book-gold);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.review-candidate small {
    grid-column: 1 / -1;
}

.review-candidate .button {
    min-height: 30px;
    padding: 0 10px;
}

.household-assignment-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(20, 18, 14, 0.56);
    backdrop-filter: blur(3px);
}

.household-assignment-modal {
    width: min(760px, 100%);
    max-height: min(820px, calc(100vh - 48px));
    overflow: hidden;
    border: 1px solid #d4c09a;
    border-radius: 6px;
    background: #f8f3ea;
    color: var(--book-ink);
    box-shadow: 0 24px 70px rgba(20, 18, 14, 0.28);
}

.household-assignment-modal > header,
.household-assignment-modal > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
}

.household-assignment-modal > header {
    border-bottom: 1px solid var(--book-line);
    background: #fffaf0;
}

.household-assignment-modal > header p,
.household-assignment-modal > header h2 {
    margin: 0;
}

.household-assignment-modal > header h2 {
    margin-top: 3px;
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 500;
}

.household-assignment-modal > header span {
    display: block;
    margin-top: 4px;
    color: var(--book-muted);
    font-size: 12px;
}

.household-assignment-modal > header > button {
    border: 0;
    background: transparent;
    color: var(--book-muted);
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

.household-assignment-modal > footer {
    justify-content: flex-end;
    border-top: 1px solid var(--book-line);
    background: #fffaf0;
}

.household-assignment-body {
    display: grid;
    gap: 14px;
    max-height: calc(100vh - 220px);
    overflow: auto;
    padding: 18px 20px;
}

.household-assignment-explainer,
.household-move-summary {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #dcccae;
    background: #fffaf0;
}

.household-assignment-explainer strong,
.household-move-summary strong {
    font-size: 13px;
}

.household-assignment-explainer span,
.household-move-summary span,
.household-move-summary em {
    color: var(--book-muted);
    font-size: 12px;
    font-style: normal;
}

.household-assignment-create-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(190px, 0.7fr);
    gap: 12px;
}

.household-assignment-field,
.household-choice-search,
.household-assignment-fixed-field {
    display: grid;
    gap: 6px;
    color: var(--book-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.household-assignment-field input,
.household-assignment-field select,
.household-choice-search input {
    min-height: 42px;
    width: 100%;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
    color: var(--book-ink);
    padding: 0 12px;
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
}

.household-assignment-fixed-field {
    padding: 9px 12px;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
}

.household-assignment-fixed-field strong {
    color: var(--book-ink);
    font-size: 13px;
    letter-spacing: normal;
    text-transform: none;
}

.household-choice-list {
    display: grid;
    gap: 8px;
    max-height: 280px;
    overflow: auto;
}

.household-choice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
    cursor: pointer;
}

.household-choice:hover,
.household-choice.selected {
    border-color: #b08748;
    background: #fffaf0;
}

.household-choice input {
    width: 17px;
    height: 17px;
    accent-color: #9b7133;
}

.household-choice strong,
.household-choice em {
    display: block;
}

.household-choice strong {
    font-size: 13px;
}

.household-choice em {
    margin-top: 3px;
    color: var(--book-muted);
    font-size: 11px;
    font-style: normal;
}

.household-choice b {
    color: #7b5923;
    font-size: 10px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.household-choice-empty,
.household-assignment-status {
    padding: 12px;
    border: 1px solid var(--book-line);
    color: var(--book-muted);
    font-size: 12px;
}

.household-assignment-status {
    border-color: #e0b2aa;
    background: #fff1ef;
    color: #8a3f35;
}

.household-assignment-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid #b9cfb5;
    background: #edf5ea;
    color: #355a3d;
    font-size: 13px;
    font-weight: 700;
}

.household-assignment-notice button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

@media (max-width: 720px) {
    .household-assignment-backdrop {
        align-items: end;
        padding: 0;
    }

    .household-assignment-modal {
        max-height: 92vh;
        border-radius: 6px 6px 0 0;
    }

    .household-assignment-create-grid,
    .review-client-grid {
        grid-template-columns: 1fr;
    }

    .review-decision-strip,
    .review-account-main {
        grid-template-columns: 1fr;
    }

    .review-decision-actions {
        justify-content: flex-start;
    }
}

.module-panel {
    min-height: 260px;
}

.module-panel .data-list {
    min-height: 0;
}

.module-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
}

.module-form label {
    display: grid;
    gap: 6px;
    color: var(--book-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-row .module-action-row {
    justify-content: flex-end;
}

.overview-advisor-filter {
    min-width: 170px;
    max-width: 240px;
}

.module-form input,
.module-form select,
.module-form textarea,
.module-search input {
    min-height: 38px;
    width: 100%;
    border: 1px solid var(--book-line);
    background: #f8f3ea;
    color: var(--book-ink);
    padding: 0 12px;
    font: inherit;
}

.module-form textarea {
    min-height: 170px;
    padding: 10px 12px;
    resize: vertical;
}

.module-form .module-checkbox {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    align-self: end;
    min-height: 38px;
}

.module-form .module-checkbox input {
    width: 18px;
    min-height: 18px;
    padding: 0;
}

.module-form .button {
    align-self: end;
}

.module-form.single-column {
    grid-template-columns: 1fr;
}

.roster-upload-form {
    grid-template-columns: minmax(220px, 320px) minmax(220px, 1fr);
}

.roster-csv-drawer {
    grid-column: 1 / -1;
    border: 1px solid var(--book-line);
    background: #fbf7ef;
}

.roster-csv-drawer summary {
    cursor: pointer;
    min-height: 44px;
    padding: 13px 14px;
    color: var(--book-ink);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.roster-csv-field {
    padding: 0 14px 14px;
}

.roster-preview-panel {
    display: grid;
    gap: 14px;
    min-height: 120px;
    margin: 0;
    padding: 16px;
    border-top: 1px solid var(--book-line);
    background: #f8f3ea;
    color: var(--book-ink);
}

.roster-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.roster-preview-section {
    display: grid;
    gap: 10px;
}

.roster-preview-section h3 {
    margin: 0;
    color: var(--book-muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.roster-preview-list {
    display: grid;
    gap: 8px;
}

.roster-preview-list article,
.roster-preview-empty,
.roster-preview-error {
    padding: 10px 12px;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
}

.roster-preview-list strong,
.roster-preview-list span,
.roster-preview-list em {
    display: block;
}

.roster-preview-list strong {
    font-size: 13px;
}

.roster-preview-list span,
.roster-preview-list em,
.roster-preview-empty {
    color: var(--book-muted);
    font-size: 12px;
}

.roster-preview-list em {
    margin-top: 3px;
    font-style: normal;
    overflow-wrap: anywhere;
}

.roster-preview-section.error .roster-preview-list article,
.roster-preview-error {
    border-color: #e4b4ad;
    background: #fff1ef;
    color: #8f3128;
}

.roster-preview-notice {
    padding: 10px 12px;
    border: 1px solid #dcccae;
    background: #fffaf0;
    color: var(--book-muted);
    font-size: 12px;
    font-weight: 700;
}

.roster-unmatched-lane {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #dcccae;
    background: #fffaf0;
}

.roster-unmatched-lane.clear {
    border-color: #d7e1d2;
    background: #f1f6ee;
}

.roster-unmatched-lane h3,
.roster-unmatched-lane p {
    margin: 0;
}

.roster-unmatched-lane h3 {
    color: var(--book-ink);
    font-size: 13px;
}

.roster-unmatched-lane p {
    margin-top: 3px;
    color: var(--book-muted);
    font-size: 12px;
}

.roster-unmatched-grid {
    display: grid;
    gap: 8px;
}

.roster-unmatched-account {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #e2d3ba;
    background: var(--book-panel);
}

.roster-unmatched-account strong,
.roster-unmatched-account span {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.roster-unmatched-account strong {
    color: var(--book-ink);
    font-size: 13px;
}

.roster-unmatched-account span {
    color: var(--book-muted);
    font-size: 12px;
}

.roster-unmatched-account b {
    color: var(--book-ink);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
}

.roster-workbench {
    display: grid;
    gap: 12px;
}

.roster-workbench-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
}

.roster-workbench-header h3,
.roster-workbench-header p,
.roster-household-card h4,
.roster-lane-heading h5,
.canonical-mini-table h6 {
    margin: 0;
}

.roster-workbench-header h3 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
}

.roster-workbench-header p {
    color: var(--book-muted);
    font-size: 13px;
}

.roster-household-board {
    display: grid;
    gap: 12px;
}

.roster-household-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.roster-household-card.drag-over {
    border-color: var(--book-gold);
    box-shadow: inset 0 0 0 1px var(--book-gold);
}

.roster-household-card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}

.roster-household-card h4 {
    color: var(--book-ink);
    font-size: 19px;
    line-height: 1.2;
}

.roster-household-summary,
.canonical-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.roster-household-summary span,
.canonical-detail-grid span {
    display: block;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #e8ddca;
    background: #fbf7ef;
    color: var(--book-muted);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.roster-household-summary b,
.canonical-detail-grid b {
    display: block;
    margin-bottom: 3px;
    color: var(--book-ink);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.roster-household-expanded {
    display: grid;
    gap: 12px;
}

.roster-lane {
    display: grid;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--book-line);
}

.roster-lane-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.roster-lane-heading h5 {
    color: var(--book-muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.roster-lane-heading span {
    color: var(--book-muted);
    font-size: 11px;
    font-weight: 800;
}

.roster-client-grid,
.roster-account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.roster-client-card,
.roster-mapped-account,
.canonical-mini-table article {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e2d3ba;
    background: #fffaf0;
    color: var(--book-ink);
}

.roster-client-card {
    cursor: grab;
}

.roster-client-card strong,
.roster-client-card span,
.roster-mapped-account strong,
.roster-mapped-account span,
.roster-mapped-account p,
.canonical-mini-table strong,
.canonical-mini-table span,
.canonical-mini-table em {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.roster-client-card strong,
.roster-mapped-account strong,
.canonical-mini-table strong {
    font-size: 13px;
}

.roster-client-card span,
.roster-mapped-account span,
.roster-mapped-account p,
.canonical-mini-table span,
.canonical-mini-table em {
    color: var(--book-muted);
    font-size: 12px;
    font-style: normal;
}

.roster-client-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
    margin: 0;
}

.roster-client-card dl div {
    min-width: 0;
}

.roster-client-card dt,
.roster-client-card dd {
    margin: 0;
}

.roster-client-card dt {
    color: var(--book-muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.roster-client-card dd {
    color: var(--book-ink);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.roster-move-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.roster-move-row select {
    min-height: 34px;
    width: 100%;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
    color: var(--book-ink);
    padding: 0 10px;
    font: inherit;
}

.roster-mapped-account.blocked {
    border-color: #e4b4ad;
    background: #fff1ef;
}

.roster-mapped-account b {
    color: var(--book-ink);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
}

.canonical-detail {
    background: #fbf7ef;
    padding: 12px;
}

.canonical-mini-table {
    display: grid;
    gap: 8px;
}

.canonical-mini-table h6 {
    color: var(--book-muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.module-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-self: end;
}

.firm-access-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.source-connection-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.people-role-list {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.people-role-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(160px, 220px) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--book-line);
    background: #f8f3ea;
}

.people-role-identity strong,
.people-role-identity span {
    display: block;
}

.people-role-identity strong {
    color: var(--book-ink);
    font-size: 14px;
}

.people-role-identity span {
    color: var(--book-muted);
    font-size: 12px;
}

.people-role-row select {
    min-height: 38px;
    width: 100%;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
    color: var(--book-ink);
    padding: 0 12px;
    font: inherit;
}

.danger-text {
    color: #b43a31;
}

.module-json-preview {
    max-height: 240px;
    overflow: auto;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--book-line);
    background: #f8f3ea;
    color: var(--book-muted);
    font-size: 12px;
    white-space: pre-wrap;
}

.module-search {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
}

.report-row {
    min-height: 74px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--book-line);
}

.report-row strong {
    display: block;
    color: var(--book-ink);
    font-size: 15px;
}

.report-row span {
    display: block;
    margin-top: 4px;
    color: var(--book-muted);
    font-size: 13px;
}

.report-row:last-child,
.module-panel .data-list > :last-child {
    border-bottom: 0;
}

.module-page .empty-state {
    min-height: 180px;
    display: grid;
    place-items: center;
    padding: 28px;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
}

@media (max-width: 1320px) {
    .book-topbar,
    .app-page.active {
        min-width: 0;
    }

    .metric-band,
    .module-metrics,
    .review-summary-grid,
    .setup-stage-rail,
    .review-client-grid,
    .roster-household-summary,
    .canonical-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .review-account-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .review-action-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .module-grid,
    .module-form,
    .people-role-row,
    .module-search,
    .report-row,
    .review-summary-grid,
    .setup-flow-header,
    .setup-stage-rail,
    .roster-preview-grid,
    .roster-upload-form,
    .review-account-main,
    .review-account-evidence,
    .review-decision-strip,
    .review-client-grid,
    .review-account-actions,
    .roster-unmatched-account,
    .roster-household-card-header,
    .roster-household-summary,
    .canonical-detail-grid,
    .roster-client-grid,
    .roster-account-grid,
    .roster-client-card dl,
    .roster-move-row {
        grid-template-columns: 1fr;
    }

    .review-account-value {
        text-align: left;
    }

    .setup-flow-header h2 {
        font-size: 24px;
    }

    .setup-next-action {
        border-left-width: 0;
        border-top: 3px solid var(--book-gold);
    }

    .review-client-profile-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .review-action-buttons {
        justify-content: flex-start;
    }

    .unconnected-chip {
        justify-self: start;
        white-space: normal;
    }
}

/* Household clarity pass */
.household-page,
.household-detail,
.household-detail-body,
.household-layout {
    color: var(--book-ink);
}

.household-subtabs-nav {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 2px 0;
}

.household-subtabs-nav .household-tab,
.household-tab {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--book-line);
    border-radius: 3px;
    background: var(--book-panel);
    color: var(--book-ink);
    white-space: normal;
    text-align: center;
}

.household-subtabs-nav .household-tab.active,
.household-subtabs-nav .household-tab:hover,
.household-tab.active,
.household-tab:hover {
    border-color: var(--book-gold);
    border-bottom-color: var(--book-gold);
    background: #f3e7d3;
    color: #725424;
}

.household-subtabs-nav .household-tab.active::after {
    background: var(--book-gold);
    box-shadow: none;
}

.narrative-strip,
.story-band,
.cashflow-banner,
.protection-banner,
.goal-item,
.custodian-node,
.shield-vector-box,
.insurance-card,
.workspace-choice,
.accountview-visual {
    border-color: var(--book-line);
    background: var(--book-panel);
    color: var(--book-ink);
    box-shadow: none;
}

.narrative-strip span,
.narrative-strip p,
.story-band p,
.goal-meta,
.goal-meta span,
.insurance-card span,
.custodian-node span,
.cashflow-banner p,
.protection-banner p {
    color: var(--book-muted);
}

.narrative-strip strong,
.story-band h2,
.goal-header strong,
.goal-header span,
.insurance-card strong,
.custodian-node h3,
.workspace-choice strong,
.cashflow-banner h2,
.cashflow-summary-box strong,
.protection-banner h3 {
    color: var(--book-ink);
}

.workspace-choice span,
.workspace-choice em {
    color: var(--book-muted);
}

.workspace-choice:hover {
    border-color: var(--book-gold);
    background: #fffaf0;
}

.insurance-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
    gap: 18px;
    align-items: start;
}

.insurance-command-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid var(--book-line);
    background: #fffdf8;
    color: var(--book-ink);
}

.insurance-command-row div:first-child {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.insurance-command-row .eyebrow {
    margin: 0;
    font-size: 11px;
}

.insurance-command-row strong {
    color: var(--book-ink);
    font-size: 19px;
    line-height: 1.2;
}

.insurance-command-row span {
    color: var(--book-muted);
    line-height: 1.45;
}

.insurance-command-row .insurance-action-buttons {
    justify-content: flex-end;
    min-width: 0;
}

.insurance-coverage-grid {
    display: grid;
    gap: 10px;
    padding: 0 18px 18px;
}

.insurance-coverage-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--book-line);
    border-left: 4px solid var(--book-green);
    background: #fffdf8;
    color: var(--book-ink);
}

.insurance-coverage-card.risk {
    border-color: #e4b4ad;
    border-left-color: var(--book-red);
    background: #fffaf8;
}

.insurance-card-top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.insurance-card-top div,
.insurance-coverage-values span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.insurance-card-top strong,
.insurance-coverage-values strong {
    display: block;
    min-width: 0;
    color: var(--book-ink);
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.insurance-card-top span,
.insurance-coverage-values em,
.insurance-card-footer span {
    color: var(--book-muted);
    font-style: normal;
    line-height: 1.45;
}

.insurance-card-top b {
    flex: 0 0 auto;
    padding: 5px 8px;
    border: 1px solid #d7e1d2;
    background: #f1f6ee;
    color: var(--book-green);
    font-size: 11px;
    text-transform: uppercase;
}

.insurance-coverage-card.risk .insurance-card-top b {
    border-color: #e4b4ad;
    background: #fff1ef;
    color: var(--book-red);
}

.insurance-coverage-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.insurance-coverage-values span {
    padding: 10px;
    border: 1px solid var(--book-line);
    background: #fffefa;
}

.insurance-coverage-values em {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.insurance-coverage-values strong {
    overflow-wrap: anywhere;
    font-size: 16px;
}

.insurance-progress {
    height: 6px;
    overflow: hidden;
    border: 1px solid var(--book-line);
    background: #eadabd;
}

.insurance-progress span {
    display: block;
    height: 100%;
    background: var(--book-green);
}

.insurance-coverage-card.risk .insurance-progress span {
    background: var(--book-red);
}

.insurance-card-footer {
    display: grid;
    gap: 4px;
    padding-top: 2px;
}

.insurance-card-footer span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.insurance-card-footer strong {
    color: var(--book-ink);
    font-size: 13px;
    line-height: 1.4;
}

.insurance-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.insurance-table {
    display: grid;
    padding: 0 18px 18px;
}

.insurance-table-row {
    display: grid;
    grid-template-columns: minmax(190px, 1.35fr) minmax(120px, 0.7fr) minmax(140px, 0.8fr) minmax(110px, 0.45fr);
    gap: 14px;
    align-items: center;
    min-width: 0;
    padding: 14px 0;
    border-top: 1px solid var(--book-line);
    color: var(--book-ink);
}

.insurance-table-row.header {
    border-top: 0;
    color: var(--book-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.insurance-table-row strong,
.insurance-table-row b {
    color: var(--book-ink);
}

.insurance-table-row b {
    justify-self: start;
    padding: 5px 8px;
    border: 1px solid #d7e1d2;
    background: #f1f6ee;
    font-size: 11px;
    text-transform: uppercase;
}

.insurance-table-row b.risk {
    border-color: #e4b4ad;
    background: #fff1ef;
    color: var(--book-red);
}

.insurance-table-row em,
.insurance-table-row span {
    color: var(--book-muted);
    font-style: normal;
    line-height: 1.45;
}

.insurance-actions-panel .empty-state {
    margin-top: 4px;
    border-color: var(--book-line);
    background: #fffdf8;
    color: var(--book-muted);
}

.insurance-actions-panel .data-item strong {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.employer-benefits-workbench,
.income-benefits-workbench {
    display: grid;
    gap: 18px;
    align-items: start;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
}

.employer-benefits-workbench:not(.compact) {
    grid-template-columns: minmax(0, 1fr);
}

.employer-benefits-workbench.compact {
    grid-template-columns: minmax(0, 1fr);
}

.employer-benefits-workbench [hidden] {
    display: none !important;
}

.employer-benefits-workbench .panel-heading h2,
.income-benefits-workbench .panel-heading h2,
.insurance-workbench .panel-heading h2 {
    max-width: 32ch;
    font-family: var(--font-ui);
    font-size: 22px;
    font-weight: 650;
    line-height: 1.15;
}

.insurance-upload-panel,
.insurance-review-panel,
.insurance-policy-panel,
.insurance-manual-panel,
.insurance-payment-panel {
    grid-column: 1 / -1;
}

.insurance-admin-callout {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(210px, auto);
    gap: 20px;
    align-items: center;
    border-color: rgba(159, 119, 48, 0.45);
    background: linear-gradient(120deg, #faf6ed 0%, #f1e7d3 100%);
}

.insurance-admin-callout-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--book-ink);
    color: #fff;
    font-size: 24px;
}

.insurance-admin-callout h2,
.insurance-admin-callout p {
    margin: 0;
}

.insurance-admin-callout > div:nth-child(2) {
    display: grid;
    gap: 6px;
}

.insurance-admin-callout > div:last-child {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    align-items: center;
}

.insurance-admin-callout > div:last-child > strong {
    grid-row: 1 / span 2;
    color: var(--book-gold);
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 500;
}

.insurance-admin-callout > div:last-child > span {
    color: var(--book-muted);
    font-size: 12px;
}

.insurance-admin-callout .button {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.insurance-admin-workspace {
    display: grid;
    gap: 18px;
}

.insurance-intake-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
    gap: 28px;
    align-items: end;
    min-height: 220px;
    padding: 32px;
    border: 1px solid #2b2a25;
    background:
        radial-gradient(circle at 88% 18%, rgba(200, 159, 80, 0.25), transparent 30%),
        linear-gradient(135deg, #171916 0%, #25251f 72%, #343126 100%);
    color: #fff;
}

.insurance-intake-hero::after {
    content: "";
    position: absolute;
    inset: auto -70px -130px auto;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.insurance-intake-hero-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
}

.insurance-intake-hero .eyebrow {
    color: #d3b36f;
}

.insurance-intake-hero h2,
.insurance-intake-hero p {
    margin: 0;
}

.insurance-intake-hero h2 {
    max-width: 18ch;
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 500;
    line-height: 1.02;
}

.insurance-intake-hero p:last-child {
    max-width: 68ch;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.55;
}

.insurance-intake-hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.insurance-intake-hero-stats span {
    display: grid;
    gap: 4px;
    padding: 18px 14px 0;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.insurance-intake-hero-stats span:first-child {
    border-left: 0;
    padding-left: 0;
}

.insurance-intake-hero-stats strong {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 500;
}

.insurance-intake-hero-stats em {
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
    font-style: normal;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.insurance-intake-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid var(--book-line);
    background: var(--book-line);
}

.insurance-intake-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 78px;
    padding: 15px 18px;
    background: #f5f1e8;
}

.insurance-intake-step b {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid #cfc5b4;
    border-radius: 50%;
    color: var(--book-muted);
    font-size: 11px;
}

.insurance-intake-step span {
    display: grid;
    gap: 3px;
}

.insurance-intake-step strong {
    font-size: 13px;
}

.insurance-intake-step em {
    color: var(--book-muted);
    font-size: 11px;
    font-style: normal;
}

.insurance-intake-step.current,
.insurance-intake-step.complete {
    background: var(--book-panel);
}

.insurance-intake-step.current b {
    border-color: var(--book-gold);
    background: var(--book-gold);
    color: #fff;
}

.insurance-intake-step.complete b {
    border-color: #3c7255;
    background: #3c7255;
    color: #fff;
}

.insurance-intake-panel {
    display: grid;
    gap: 24px;
    padding: 26px;
}

.insurance-intake-heading p,
.insurance-intake-heading h2 {
    margin: 0;
}

.insurance-intake-heading > div {
    display: grid;
    gap: 6px;
}

.insurance-source-badge,
.insurance-review-count {
    display: grid;
    place-items: center;
    min-width: 58px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(159, 119, 48, 0.12);
    color: var(--book-gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.insurance-source-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.insurance-source-option {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    min-height: 104px;
    padding: 16px;
    border: 1px solid var(--book-line);
    background: #faf8f2;
    color: var(--book-ink);
    cursor: pointer;
}

.insurance-source-option:hover,
.insurance-source-option:has(input:focus-visible) {
    border-color: rgba(159, 119, 48, 0.6);
}

.insurance-source-option:has(input:checked) {
    border-color: var(--book-gold);
    background: #fffaf0;
    box-shadow: inset 0 -3px 0 var(--book-gold);
}

.insurance-source-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.insurance-source-option-number {
    color: var(--book-gold);
    font-family: var(--font-mono);
    font-size: 10px;
}

.insurance-source-option > span:nth-of-type(2) {
    display: grid;
    gap: 6px;
}

.insurance-source-option strong {
    font-size: 14px;
}

.insurance-source-option em {
    color: var(--book-muted);
    font-size: 11px;
    font-style: normal;
    line-height: 1.45;
}

.insurance-source-option > b {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--book-line);
    border-radius: 50%;
    color: transparent;
    font-size: 11px;
}

.insurance-source-option:has(input:checked) > b {
    border-color: var(--book-gold);
    background: var(--book-gold);
    color: #fff;
}

.insurance-intake-config {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.insurance-intake-config label {
    display: grid;
    gap: 7px;
    color: var(--book-ink);
    font-size: 12px;
    font-weight: 700;
}

.insurance-intake-config label.muted {
    opacity: 0.58;
}

.insurance-intake-config input,
.insurance-intake-config select {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid var(--book-line);
    border-radius: 0;
    background: #fff;
    color: var(--book-ink);
}

.insurance-intake-config label > em {
    color: var(--book-muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 500;
}

.insurance-dropzone {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 124px;
    padding: 22px 24px;
    border: 1px dashed #b7aa94;
    background: #f8f5ee;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease;
}

.insurance-dropzone:hover,
.insurance-dropzone:focus-within,
.insurance-dropzone.has-file {
    border-color: var(--book-gold);
    background: #fffaf0;
}

.insurance-dropzone input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.insurance-dropzone-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--book-ink);
    color: #fff;
    font-size: 21px;
}

.insurance-dropzone.has-file .insurance-dropzone-icon {
    background: #3c7255;
}

.insurance-dropzone-copy {
    display: grid;
    gap: 5px;
}

.insurance-dropzone-copy strong {
    color: var(--book-ink);
    font-size: 15px;
}

.insurance-dropzone-copy em {
    color: var(--book-muted);
    font-size: 11px;
    font-style: normal;
    line-height: 1.45;
}

.insurance-dropzone > b {
    padding: 10px 14px;
    border: 1px solid var(--book-line);
    background: #fff;
    color: var(--book-ink);
    font-size: 11px;
}

.insurance-intake-actions {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    border-top: 1px solid var(--book-line);
}

.insurance-intake-actions > div:first-child {
    display: grid;
    gap: 3px;
}

.insurance-intake-actions > div:first-child strong {
    font-size: 12px;
}

.insurance-intake-actions > div:first-child span {
    color: var(--book-muted);
    font-size: 11px;
}

.insurance-preview-result {
    display: grid;
    gap: 16px;
    margin-top: 4px;
    padding: 22px;
    border: 1px solid var(--book-line);
    background: #f8f5ee;
}

.insurance-preview-heading {
    display: flex;
    gap: 18px;
    align-items: start;
    justify-content: space-between;
}

.insurance-preview-heading > div {
    display: grid;
    gap: 4px;
}

.insurance-preview-heading h3,
.insurance-preview-heading p {
    margin: 0;
}

.insurance-preview-heading h3 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 500;
}

.insurance-preview-heading span,
.insurance-preview-footnote {
    color: var(--book-muted);
    font-size: 11px;
}

.insurance-preview-heading > strong {
    color: var(--book-gold);
    font-size: 12px;
}

.insurance-preview-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
}

.insurance-preview-summary > span {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: baseline;
    padding: 10px 12px;
    border: 1px solid var(--book-line);
    border-radius: 0;
    background: #fff;
}

.insurance-preview-summary strong {
    font-size: 20px;
}

.insurance-preview-summary em {
    color: var(--book-muted);
    font-size: 10px;
    font-style: normal;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.insurance-preview-summary .ready strong {
    color: #3c7255;
}

.insurance-preview-summary .review strong {
    color: #9f7730;
}

.insurance-preview-summary .quick strong {
    color: #52714f;
}

.insurance-preview-summary .rejected strong {
    color: #9d4038;
}

.insurance-preview-row.header {
    min-height: auto;
    padding-block: 8px;
    border: 0;
    border-bottom: 1px solid var(--book-line);
    border-radius: 0;
    background: transparent;
    color: var(--book-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.insurance-decision-panel {
    padding: 26px;
}

.insurance-clear-state {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 22px;
    border: 1px solid #bfd0c3;
    background: #f3f8f4;
}

.insurance-clear-state > b {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #3c7255;
    color: #fff;
}

.insurance-clear-state > div {
    display: grid;
    gap: 4px;
}

.insurance-clear-state span {
    color: var(--book-muted);
    font-size: 11px;
}

.insurance-form-grid,
.insurance-manual-form,
.insurance-policy-edit-form,
.insurance-billing-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.insurance-form-grid label,
.insurance-manual-form label,
.insurance-policy-edit-form label,
.insurance-billing-form label,
.insurance-review-row label,
.insurance-attestation-controls {
    display: grid;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.insurance-form-grid input,
.insurance-form-grid select,
.insurance-manual-form input,
.insurance-manual-form select,
.insurance-manual-form textarea,
.insurance-policy-edit-form input,
.insurance-policy-edit-form select,
.insurance-billing-form input,
.insurance-billing-form select,
.insurance-review-row select,
.insurance-attestation-controls select {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-elevated);
    color: var(--text-white);
}

.insurance-manual-form .wide {
    grid-column: 1 / -1;
}

.insurance-policy-edit-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.insurance-policy-edit-form .wide {
    grid-column: span 2;
}

.insurance-preview-table,
.insurance-review-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.insurance-preview-table {
    overflow-x: auto;
    padding-bottom: 4px;
}

.insurance-preview-row,
.insurance-review-row,
.insurance-household-policy {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-elevated);
}

.insurance-preview-row {
    grid-template-columns: minmax(240px, 1.45fr) minmax(190px, 1.1fr) minmax(100px, 0.55fr) minmax(135px, 0.7fr) minmax(260px, 1.45fr);
    column-gap: 22px;
    align-items: center;
    min-width: 1050px;
}

.insurance-preview-row > * {
    min-width: 0;
}

.insurance-preview-household,
.insurance-preview-product {
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.insurance-preview-policy {
    font-family: var(--font-mono);
    white-space: nowrap;
}

.insurance-preview-status {
    justify-self: start;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.insurance-preview-evidence {
    overflow-wrap: anywhere;
    line-height: 1.45;
    white-space: normal;
}

.insurance-preview-row em,
.insurance-review-row em,
.insurance-caution {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-style: normal;
}

.insurance-preview-row .success {
    background: #e5f1e8;
    color: var(--success);
}

.insurance-preview-row .risk {
    background: #fff0ed;
    color: var(--danger);
}

.insurance-preview-row .quick {
    background: #eef6e9;
    color: #496c45;
}

.insurance-preview-error {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #d7aaa4;
    background: #fff5f3;
}

.insurance-preview-error strong {
    color: #8f352f;
    font-size: 12px;
}

.insurance-preview-error span {
    color: #79514d;
    font-size: 11px;
}

.insurance-dropzone.is-previewing {
    border-color: var(--book-gold);
    background: #fbf5e8;
    cursor: progress;
}

.insurance-dropzone.is-previewing .insurance-dropzone-icon {
    animation: insurance-preview-pulse 900ms ease-in-out infinite alternate;
}

@keyframes insurance-preview-pulse {
    from { transform: translateY(1px); opacity: 0.5; }
    to { transform: translateY(-2px); opacity: 1; }
}

.insurance-review-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
    gap: 28px;
    align-items: center;
    padding: 20px 22px;
    border: 1px solid var(--book-line);
    background: #fffdf9;
}

.insurance-review-card:hover {
    border-color: rgba(159, 119, 48, 0.58);
    box-shadow: 0 10px 28px rgba(60, 48, 30, 0.07);
}

.insurance-review-card.quick {
    border-left: 4px solid #688565;
    background: #fcfff9;
}

.insurance-review-card-main,
.insurance-review-card-status {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.insurance-review-card-main > strong {
    color: var(--book-ink);
    font-size: 16px;
}

.insurance-review-card-main > span:not(.insurance-review-card-kicker),
.insurance-review-card-status > span {
    color: var(--book-muted);
    font-size: 12px;
    line-height: 1.45;
}

.insurance-review-card-kicker {
    color: var(--book-gold);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.insurance-review-issue-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.insurance-review-issue-list em,
.insurance-reconcile-issues em {
    padding: 4px 7px;
    border: 1px solid #e7c6bf;
    background: #fff2ef;
    color: #8c443c;
    font-size: 9px;
    font-style: normal;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.insurance-review-card-status {
    justify-items: end;
    text-align: right;
}

.insurance-review-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.insurance-quick-review-error {
    color: var(--danger) !important;
    font-weight: 700;
}

.insurance-reconcile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(33, 28, 21, 0.58);
    backdrop-filter: blur(3px);
}

.insurance-reconcile-modal {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    width: min(1180px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border: 1px solid var(--book-line-strong);
    border-radius: 10px;
    background: #fffdf8;
    box-shadow: 0 32px 90px rgba(27, 23, 17, 0.34);
}

.insurance-reconcile-modal.loading {
    width: min(520px, calc(100vw - 48px));
    min-height: 260px;
    place-items: center;
}

.insurance-reconcile-loading {
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: 40px;
    text-align: center;
}

.insurance-reconcile-loading b {
    width: 30px;
    height: 30px;
    border: 3px solid #e4d8c5;
    border-top-color: var(--book-gold);
    border-radius: 50%;
    animation: insurance-review-spin 800ms linear infinite;
}

.insurance-reconcile-loading span {
    color: var(--book-muted);
    font-size: 12px;
}

@keyframes insurance-review-spin {
    to { transform: rotate(360deg); }
}

.insurance-reconcile-header {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--book-line);
    background: #fffaf0;
}

.insurance-reconcile-header h2,
.insurance-reconcile-step-heading h3,
.insurance-party-resolver h4,
.insurance-policy-review-form h4 {
    margin: 0;
    color: var(--book-ink);
}

.insurance-reconcile-header h2 {
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 500;
}

.insurance-reconcile-evidence {
    display: grid;
    grid-template-columns: minmax(210px, 0.75fr) minmax(0, 2fr);
    gap: 16px 24px;
    padding: 18px 22px;
    background: #191815;
    color: #fff;
}

.insurance-reconcile-evidence-title {
    display: grid;
    align-content: center;
    gap: 6px;
}

.insurance-reconcile-evidence-title span {
    color: #d3b271;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.insurance-reconcile-evidence-title strong {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.1;
}

.insurance-reconcile-policy-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 18px;
}

.insurance-reconcile-policy-grid > span,
.insurance-resolution-summary > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.insurance-reconcile-policy-grid em,
.insurance-resolution-summary em {
    color: #aaa196;
    font-size: 8px;
    font-style: normal;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.insurance-reconcile-policy-grid strong {
    overflow-wrap: anywhere;
    font-size: 12px;
    font-weight: 650;
}

.insurance-reconcile-issues {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 6px;
}

.insurance-reconcile-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--book-line);
    background: #f6f0e5;
}

.insurance-reconcile-progress > span {
    display: flex;
    gap: 9px;
    align-items: center;
    justify-content: center;
    padding: 11px 14px;
    color: var(--book-muted);
}

.insurance-reconcile-progress > span + span {
    border-left: 1px solid var(--book-line);
}

.insurance-reconcile-progress b {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border: 1px solid var(--book-line-strong);
    border-radius: 50%;
    font-size: 10px;
}

.insurance-reconcile-progress em {
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.insurance-reconcile-progress .current {
    background: #fffdf8;
    color: var(--book-ink);
}

.insurance-reconcile-progress .current b,
.insurance-reconcile-progress .complete b {
    border-color: var(--book-gold);
    background: var(--book-gold);
    color: #fff;
}

.insurance-reconcile-workflow {
    min-height: 0;
    overflow-y: auto;
}

.insurance-reconcile-step {
    display: grid;
    gap: 20px;
    padding: 22px;
}

.insurance-reconcile-step-heading {
    display: flex;
    gap: 20px;
    align-items: start;
    justify-content: space-between;
}

.insurance-reconcile-step-heading > div {
    display: grid;
    gap: 5px;
}

.insurance-reconcile-step-heading h3 {
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 500;
}

.insurance-reconcile-step-heading span,
.insurance-household-search-panel > div span,
.insurance-household-create-panel > div span,
.insurance-no-candidate span {
    color: var(--book-muted);
    font-size: 11px;
    line-height: 1.45;
}

.insurance-candidate-section,
.insurance-household-search-panel,
.insurance-household-create-panel,
.insurance-party-resolver,
.insurance-policy-review-form > section {
    display: grid;
    gap: 12px;
}

.insurance-candidate-section > strong,
.insurance-household-search-panel > div strong,
.insurance-household-create-panel > div strong {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.insurance-household-candidates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 9px;
}

.insurance-household-candidate,
.insurance-household-search-results button,
.insurance-member-choices button,
.insurance-same-party {
    border: 1px solid var(--book-line);
    background: #fff;
    color: var(--book-ink);
    cursor: pointer;
    text-align: left;
}

.insurance-household-candidate {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 13px;
}

.insurance-household-candidate > span,
.insurance-member-choices button > span {
    display: grid;
    gap: 4px;
}

.insurance-household-candidate > span:last-child {
    max-width: 180px;
    justify-items: end;
    text-align: right;
}

.insurance-household-candidate b {
    color: var(--book-gold);
    font-family: var(--font-display);
    font-size: 20px;
}

.insurance-household-candidate em,
.insurance-member-choices em,
.insurance-same-party em {
    color: var(--book-muted);
    font-size: 9px;
    font-style: normal;
    line-height: 1.35;
}

.insurance-household-candidate.selected,
.insurance-household-search-results button.selected,
.insurance-member-choices button.selected,
.insurance-same-party.selected,
.insurance-household-create-panel.selected {
    border-color: var(--book-gold);
    background: #fbf5e8;
    box-shadow: inset 3px 0 0 var(--book-gold);
}

.insurance-no-candidate {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid #d8c49f;
    background: #fbf5e8;
}

.insurance-household-choice-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    gap: 14px;
}

.insurance-household-search-panel,
.insurance-household-create-panel,
.insurance-party-resolver,
.insurance-policy-review-form > section {
    align-content: start;
    padding: 16px;
    border: 1px solid var(--book-line);
    background: #fffdf9;
}

.insurance-household-search-panel > div,
.insurance-household-create-panel > div {
    display: grid;
    gap: 3px;
}

.insurance-household-search-panel input,
.insurance-household-create-panel input,
.insurance-client-create-grid input,
.insurance-client-create-grid select,
.insurance-review-form-grid input,
.insurance-review-form-grid select,
.insurance-review-form-grid textarea {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--book-line-strong);
    border-radius: 4px;
    background: #fff;
    color: var(--book-ink);
}

.insurance-household-search-results {
    display: grid;
    gap: 5px;
    max-height: 190px;
    overflow-y: auto;
}

.insurance-household-search-results button {
    display: grid;
    gap: 3px;
    padding: 9px 10px;
}

.insurance-household-search-results button span {
    color: var(--book-muted);
    font-size: 9px;
}

.insurance-party-resolvers,
.insurance-policy-review-form {
    display: grid;
    gap: 14px;
}

.insurance-party-resolver-heading {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
}

.insurance-party-resolver-heading > div:first-child {
    display: grid;
    gap: 3px;
}

.insurance-party-resolver h4,
.insurance-policy-review-form h4 {
    font-size: 15px;
}

.insurance-mode-switch {
    display: flex;
    border: 1px solid var(--book-line);
}

.insurance-mode-switch button {
    min-height: 34px;
    padding: 7px 10px;
    border: 0;
    background: #fff;
    color: var(--book-muted);
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.insurance-mode-switch button + button {
    border-left: 1px solid var(--book-line);
}

.insurance-mode-switch button.selected {
    background: var(--book-ink);
    color: #fff;
}

.insurance-mode-switch button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.insurance-member-choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.insurance-member-choices button,
.insurance-same-party {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 11px 12px;
}

.insurance-member-choices button > b,
.insurance-same-party > b {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border: 1px solid var(--book-line-strong);
    border-radius: 50%;
    color: var(--book-gold);
}

.insurance-client-create-grid,
.insurance-review-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.insurance-client-create-grid label,
.insurance-review-form-grid label,
.insurance-household-create-panel label {
    display: grid;
    gap: 5px;
    color: var(--book-muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.insurance-client-create-grid label em,
.insurance-review-form-grid label em {
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.insurance-review-form-grid .wide {
    grid-column: span 2;
}

.insurance-resolution-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.insurance-resolution-summary > span {
    padding: 11px 12px;
    border: 1px solid var(--book-line);
    background: #f8f3ea;
}

.insurance-resolution-summary em {
    color: var(--book-muted);
}

.insurance-reconcile-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--book-line);
}

.insurance-reconcile-actions > span {
    margin-right: auto;
    color: var(--book-muted);
    font-size: 10px;
}

.insurance-reconcile-alert,
.insurance-reconcile-dismiss {
    margin: 16px 22px 0;
    padding: 12px 14px;
    border: 1px solid #d9aaa3;
    background: #fff2ef;
    color: #813d36;
}

.insurance-reconcile-dismiss {
    display: flex;
    gap: 12px;
    align-items: center;
}

.insurance-reconcile-dismiss > span {
    display: grid;
    gap: 3px;
    margin-right: auto;
}

.insurance-reconcile-dismiss em {
    font-size: 10px;
    font-style: normal;
}

.insurance-review-row {
    grid-template-columns: minmax(220px, 2fr) minmax(180px, 1fr) auto;
    align-items: end;
}

.insurance-review-row.policy {
    grid-template-columns: minmax(230px, 2fr) repeat(3, minmax(130px, 1fr));
    align-items: center;
}

.insurance-review-row.payment {
    grid-template-columns: minmax(240px, 2fr) minmax(150px, 0.8fr) auto;
}

.insurance-review-row > div:first-child,
.insurance-review-row.policy > div {
    display: grid;
    gap: 4px;
}

.insurance-review-row span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.insurance-household-policy {
    gap: 16px;
}

.insurance-attestation-controls {
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: center;
}

.module-heading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    justify-content: flex-end;
}

.module-heading.has-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
}

.module-heading.has-actions .page-intro {
    min-width: 0;
}

.module-heading.has-actions .page-intro h1 {
    font-size: clamp(44px, 5vw, 72px);
}

.insurance-book-scope {
    display: grid;
    gap: 5px;
    min-width: 210px;
}

.insurance-book-scope > span,
.insurance-upload-book > span {
    color: var(--book-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.insurance-book-scope select {
    min-height: 38px;
    padding: 8px 34px 8px 12px;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
    color: var(--book-ink);
    font-size: 12px;
    font-weight: 700;
}

.insurance-book-scope.readonly {
    min-width: 150px;
    padding: 7px 12px;
    border-left: 2px solid var(--book-gold);
}

.insurance-book-scope.readonly strong {
    font-size: 13px;
}

.insurance-book-panel,
.insurance-book-attention {
    grid-column: 1 / -1;
}

.insurance-book-panel {
    overflow: hidden;
    padding: 0;
}

.insurance-book-heading {
    padding: 20px 22px;
    border-bottom: 1px solid var(--book-line);
    background: linear-gradient(180deg, #fbf9f4 0%, #f5f0e7 100%);
}

.insurance-book-heading > div {
    display: grid;
    gap: 4px;
}

.insurance-book-heading h2,
.insurance-book-heading p {
    margin: 0;
}

.insurance-book-heading h2 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
}

.insurance-book-heading p:last-child {
    color: var(--book-muted);
    font-size: 11px;
}

.insurance-book-heading > span {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 30px;
    border-radius: 999px;
    background: var(--book-ink);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.insurance-book-table {
    overflow-x: auto;
}

.insurance-book-row {
    display: grid;
    grid-template-columns: minmax(190px, 1.25fr) minmax(210px, 1.35fr) minmax(120px, 0.7fr) minmax(130px, 0.8fr) minmax(170px, 1fr);
    gap: 18px;
    align-items: center;
    min-width: 940px;
    padding: 16px 22px;
    border-top: 1px solid rgba(82, 72, 57, 0.12);
    background: var(--book-panel);
}

.insurance-book-row.header {
    min-height: 36px;
    padding-block: 10px;
    border-top: 0;
    background: #eee8dc;
    color: var(--book-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

article.insurance-book-row {
    cursor: pointer;
    transition: background 140ms ease, transform 140ms ease;
}

article.insurance-book-row:hover,
article.insurance-book-row:focus-visible {
    background: #fcf8ef;
    outline: none;
    transform: translateX(2px);
}

.insurance-book-row > span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.insurance-book-row strong {
    overflow: hidden;
    color: var(--book-ink);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insurance-book-row em {
    overflow: hidden;
    color: var(--book-muted);
    font-size: 10px;
    font-style: normal;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insurance-status {
    justify-self: start;
    padding: 4px 8px;
    border-radius: 999px;
    background: #ece8df;
    color: #635c51;
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.insurance-status.inforce {
    background: #e0eee4;
    color: #2d6942;
}

.insurance-status.pending {
    background: #f7ead1;
    color: #8b631d;
}

.insurance-book-empty {
    display: grid;
    justify-items: start;
    gap: 8px;
    padding: 44px 22px;
}

.insurance-book-empty strong {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
}

.insurance-book-empty span {
    max-width: 62ch;
    color: var(--book-muted);
    font-size: 12px;
}

.insurance-book-attention {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    border-color: rgba(159, 119, 48, 0.38);
    background: #f8f3e8;
}

.insurance-book-attention h2,
.insurance-book-attention p {
    margin: 0;
}

.insurance-book-attention > div:first-child {
    display: grid;
    gap: 5px;
}

.insurance-book-attention h2 {
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 500;
}

.insurance-book-attention p:last-child {
    max-width: 70ch;
    color: var(--book-muted);
    font-size: 11px;
    line-height: 1.45;
}

.insurance-book-attention-stats {
    display: flex;
    gap: 18px;
}

.insurance-book-attention-stats span {
    display: grid;
    gap: 2px;
    min-width: 92px;
}

.insurance-book-attention-stats strong {
    color: var(--book-gold);
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 500;
}

.insurance-book-attention-stats em {
    color: var(--book-muted);
    font-size: 9px;
    font-style: normal;
    line-height: 1.3;
}

.insurance-upload-book {
    display: grid;
    gap: 5px;
    align-content: center;
    min-height: 78px;
    padding: 12px 14px;
    border: 1px solid rgba(159, 119, 48, 0.38);
    background: #f8f3e8;
}

.insurance-upload-book[hidden] {
    display: none !important;
}

.insurance-upload-book strong {
    font-size: 13px;
}

.insurance-upload-book em {
    color: var(--book-muted);
    font-size: 10px;
    font-style: normal;
}

@media (max-width: 1320px) {
    .module-heading.has-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .module-heading.has-actions .module-heading-actions {
        justify-content: flex-start;
    }

    .insurance-book-attention {
        grid-template-columns: minmax(0, 1fr) auto;
    }

}

@media (max-width: 900px) {
    .insurance-preview-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .insurance-review-card,
    .insurance-reconcile-evidence,
    .insurance-household-choice-grid {
        grid-template-columns: 1fr;
    }

    .insurance-review-card-status {
        justify-items: start;
        text-align: left;
    }

    .insurance-review-card-actions {
        justify-content: flex-start;
    }

    .insurance-reconcile-policy-grid,
    .insurance-client-create-grid,
    .insurance-review-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .insurance-preview-row,
    .insurance-review-row,
    .insurance-review-row.policy {
        grid-template-columns: 1fr;
    }

    .insurance-preview-row {
        min-width: 0;
    }

    .insurance-preview-row.header {
        display: none;
    }

    .insurance-review-row.payment {
        grid-template-columns: 1fr;
    }
}

.employer-editor-panel,
.plan-editor-panel,
.benefit-limits-panel {
    min-width: 0;
}

.employer-benefits-workbench:not(.compact) .employer-registry-panel {
    grid-column: 1 / -1;
    grid-row: auto;
}

.employer-workflow-drawer {
    display: grid;
    grid-column: 1 / -1;
    gap: 12px;
    min-width: 0;
}

.employer-workflow-drawer[hidden],
.workflow-panel[hidden] {
    display: none;
}

.workflow-drawer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 14px 18px;
    border: 1px solid var(--book-line);
    background: #f8f3ea;
}

.workflow-drawer-bar h2 {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 20px;
    line-height: 1.15;
}

.workflow-panel {
    min-width: 0;
}

.employer-workflow-drawer .employer-editor-panel > .panel-heading,
.employer-workflow-drawer .plan-editor-panel > .panel-heading {
    display: none;
}

.employer-workflow-drawer .employer-management-form {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.employer-workflow-drawer .employer-management-form .wide {
    grid-column: 1 / -1;
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.registry-search {
    display: grid;
    gap: 7px;
    padding: 0 18px 16px;
}

.registry-search span,
.employer-management-form label span {
    color: var(--book-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.registry-search input,
.employer-management-form input,
.employer-management-form select,
.employer-management-form textarea {
    width: 100%;
    border: 1px solid var(--book-line);
    background: var(--book-panel);
    color: var(--book-ink);
    font: inherit;
}

.registry-search input,
.employer-management-form input,
.employer-management-form select {
    min-height: 38px;
    padding: 8px 10px;
}

.employer-management-form textarea {
    min-height: 74px;
    padding: 10px;
    resize: vertical;
}

.employer-management-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 18px 18px;
}

.employer-management-form label {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.employer-management-form .wide {
    grid-column: 1 / -1;
}

.employer-card-grid,
.employment-card-list {
    display: grid;
    gap: 12px;
    padding: 0 18px 18px;
}

.employer-card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.employer-card-grid-standalone {
    grid-column: 1 / -1;
    padding: 0;
}

.market-quote-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 18px 16px;
}

.income-benefits-root > .market-quote-strip {
    padding: 0;
}

.market-quote-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #d7e1d2;
    background: #f1f6ee;
    color: var(--book-ink);
}

.market-quote-chip strong {
    color: var(--book-green);
}

.market-quote-chip.down strong,
.market-quote-chip.down em {
    color: var(--book-red);
}

.market-quote-chip.up strong,
.market-quote-chip.up em {
    color: var(--book-green);
}

.market-quote-chip em,
.market-quote-note {
    color: var(--book-muted);
    font-style: normal;
    font-size: 12px;
}

.market-quote-chip.is-unavailable {
    border-color: var(--book-line);
    background: #f8f3ea;
}

.market-quote-line {
    display: block;
    margin-top: 3px;
    font-size: 12px;
}

.employer-flow-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0 18px 16px;
}

.employer-flow-steps span,
.plan-create-prompt,
.employer-card-meta > span,
.plan-metric-row span {
    min-width: 0;
    border: 1px solid var(--book-line);
    background: #fffdf8;
}

.employer-flow-steps span {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 9px;
}

.employer-flow-steps strong {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid #d7e1d2;
    color: var(--book-green);
    font-size: 12px;
}

.employer-flow-steps em {
    color: var(--book-muted);
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.checkbox-field {
    align-content: center;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--book-line);
    background: #fffdf8;
}

.checkbox-field input {
    width: 16px;
    min-height: 16px;
    accent-color: var(--book-green);
}

.employer-benefit-card,
.employment-card {
    display: grid;
    gap: 16px;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--book-line);
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: 0 14px 30px rgba(61, 44, 25, 0.055);
    color: var(--book-ink);
}

.employer-card-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: start;
    min-width: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(199, 178, 143, 0.55);
}

.employment-card-main,
.employment-card-actions,
.employment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.employer-title-stack,
.plan-title-stack {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.employer-title-stack > strong {
    font-size: 22px;
    line-height: 1.15;
}

.employer-title-stack > span,
.employer-identity-row > span {
    font-size: 15px;
}

.employer-identity-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.employer-identity-edit {
    border: 0;
    background: transparent;
    color: var(--book-gold);
    cursor: pointer;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.employer-identity-edit:hover {
    color: var(--book-ink);
}

.employer-card-heading strong,
.employment-card-main strong,
.employer-benefit-card strong,
.employment-card strong {
    color: var(--book-ink);
}

.employer-card-heading span,
.employer-benefit-card p,
.benefit-plan-mini-list span,
.employment-card-main span,
.employment-card em,
.employment-form-actions span {
    color: var(--book-muted);
}

.employer-card-heading b {
    flex: 0 0 auto;
    padding: 5px 8px;
    border: 1px solid #d7e1d2;
    background: #f1f6ee;
    color: var(--book-green);
    font-size: 10px;
    text-transform: uppercase;
}

.employer-quote-badge {
    display: grid;
    flex: 0 0 auto;
    gap: 2px;
    min-width: 148px;
    padding: 10px 12px;
    border: 1px solid var(--book-line);
    border-radius: 8px;
    background: #fffdf8;
    text-align: right;
}

.employer-quote-badge strong {
    font-size: 15px;
}

.employer-quote-badge em {
    color: var(--book-muted);
    font-style: normal;
    font-size: 11px;
}

.employer-quote-badge.up {
    border-color: #cbdcc6;
    background: #f1f6ee;
}

.employer-quote-badge.up strong,
.employer-quote-badge.up em {
    color: var(--book-green);
}

.employer-quote-badge.down {
    border-color: #e4b4ad;
    background: #fff1ef;
}

.employer-quote-badge.down strong,
.employer-quote-badge.down em {
    color: var(--book-red);
}

.employer-quote-badge.private,
.employer-quote-badge.pending {
    color: var(--book-muted);
}

.employer-card-side {
    display: grid;
    justify-items: end;
    gap: 10px;
    min-width: 0;
}

.employer-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.employer-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.employer-card-meta > span,
.employer-meta-add-plan,
.plan-metric-row span {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    overflow: hidden;
}

.employer-card-meta > span,
.employer-meta-add-plan {
    min-height: 44px;
    min-width: 132px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: #f8f3ea;
}

.employer-meta-add-plan {
    grid-auto-flow: column;
    align-items: center;
    align-content: center;
    justify-content: center;
    gap: 7px;
    margin-left: auto;
    border-color: #c8d4dd;
    border-style: dashed;
    background: #f7fafb;
    color: var(--book-ink);
    cursor: pointer;
    text-align: center;
}

.employer-meta-add-plan > span {
    display: inline-grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    width: 17px;
    height: 17px;
    padding: 0;
    border: 1px solid #c8d4dd;
    border-radius: 50%;
    background: transparent;
    color: #436071;
    font-size: 12px;
    line-height: 1;
}

.employer-meta-add-plan:hover {
    border-color: #8aa6b5;
    background: #eef6f8;
}

.employer-card-meta strong,
.plan-metric-row strong {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    color: var(--book-ink);
    font-size: 16px;
    line-height: 1.1;
}

.employer-card-meta em,
.plan-metric-row em {
    color: var(--book-muted);
    font-style: normal;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.benefit-chip-row {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 6px;
}

.benefit-chip-row span {
    min-height: 24px;
    padding: 4px 8px;
    border: 1px solid var(--book-line);
    border-radius: 6px;
    background: #f6f0e4;
    color: var(--book-ink);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.vesting-tranche-list {
    display: grid;
    gap: 6px;
}

.vesting-tranche-list span {
    min-width: 0;
    padding: 8px 10px;
    border: 1px dashed var(--book-line-strong);
    background: #fbf7ed;
    color: var(--book-muted);
    font-size: 12px;
}

.vesting-tranche-list strong {
    margin-right: 6px;
    color: var(--book-ink);
}

.benefit-plan-mini-list {
    display: grid;
    gap: 8px;
}

.benefit-plan-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr));
    gap: 14px;
    align-items: start;
}

.benefit-plan-card {
    --plan-accent: var(--book-green);
    --plan-soft: #f1f6ee;
    display: grid;
    min-width: 0;
    border: 1px solid var(--book-line);
    border-radius: 8px;
    background: #fffefb;
    box-shadow: 0 8px 18px rgba(61, 44, 25, 0.045);
    overflow: hidden;
    align-self: start;
}

.benefit-plan-card[open] {
    display: grid;
    grid-column: auto;
}

.benefit-plan-card[open] summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    padding-bottom: 14px;
}

.benefit-plan-card[open] .plan-primary-metric {
    grid-column: 1 / -1;
    justify-items: start;
    padding-top: 4px;
}

.benefit-plan-card[open] .plan-primary-metric strong {
    font-size: 24px;
}

.benefit-plan-card[open] .plan-supporting-metrics {
    grid-column: 1 / -1;
    grid-row: auto;
}

.benefit-plan-card summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 16px;
    border-top: 4px solid var(--plan-accent);
    cursor: pointer;
    list-style: none;
}

.benefit-plan-card:not([open]) summary {
    min-height: 238px;
}

.benefit-plan-card summary::-webkit-details-marker {
    display: none;
}

.plan-type-badge {
    display: inline-grid;
    place-items: center;
    min-width: 52px;
    min-height: 36px;
    padding: 4px 7px;
    border: 1px solid color-mix(in srgb, var(--plan-accent) 24%, white);
    border-radius: 7px;
    background: var(--plan-soft);
    color: var(--plan-accent);
    font-size: 11px;
    font-weight: 900;
}

.plan-title-stack strong {
    overflow-wrap: break-word;
    word-break: normal;
}

.plan-title-stack em {
    color: var(--book-muted);
    font-style: normal;
    font-size: 12px;
}

.plan-primary-metric {
    display: grid;
    grid-column: 1 / -1;
    justify-items: start;
    gap: 3px;
    min-width: 0;
    padding-top: 4px;
}

.plan-primary-metric strong {
    color: var(--book-ink);
    font-size: 24px;
    line-height: 1.08;
    overflow-wrap: break-word;
    word-break: normal;
}

.plan-primary-metric em,
.plan-supporting-metrics em,
.plan-card-expand {
    color: var(--book-muted);
    font-style: normal;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.plan-supporting-metrics {
    display: flex;
    grid-column: 1 / -1;
    grid-row: auto;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.plan-supporting-metrics span {
    display: inline-grid;
    gap: 1px;
    min-width: 92px;
    padding: 7px 9px;
    border: 1px solid color-mix(in srgb, var(--plan-accent) 18%, var(--book-line));
    border-radius: 6px;
    background: #fbf8f1;
}

.plan-supporting-metrics strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--book-ink);
    font-size: 13px;
    line-height: 1.12;
    overflow-wrap: break-word;
    word-break: normal;
}

.plan-card-expand {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    grid-column: 1 / -1;
    justify-self: start;
    align-self: start;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--book-muted);
    font-size: 9px;
    letter-spacing: 0.06em;
}

.plan-card-expand span:last-child {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    color: color-mix(in srgb, var(--book-muted) 55%, white);
    font-size: 0;
    line-height: 0;
    transform: rotate(45deg) translateY(-1px);
}

.benefit-plan-card[open] .plan-card-expand {
    border-color: transparent;
    background: transparent;
    color: var(--plan-accent);
}

.benefit-plan-card[open] .plan-card-expand span:last-child {
    transform: rotate(225deg) translateY(-1px);
}

.plan-metric-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
    gap: 8px;
}

.benefit-plan-expanded {
    display: grid;
    gap: 8px;
    padding: 0 16px 14px;
}

.plan-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(199, 178, 143, 0.55);
}

.plan-detail-grid span {
    display: grid;
    grid-template-columns: minmax(96px, 0.45fr) minmax(0, 1fr);
    align-items: baseline;
    gap: 12px;
    min-width: 0;
    padding: 7px 0;
    border: 0;
    border-bottom: 1px solid rgba(199, 178, 143, 0.28);
    background: transparent;
}

.plan-detail-grid span.wide {
    grid-column: auto;
}

.plan-detail-grid strong {
    color: var(--book-ink);
    font-size: 11px;
    letter-spacing: 0.02em;
}

.plan-detail-grid em {
    color: var(--book-muted);
    font-style: normal;
    font-size: 12px;
    line-height: 1.32;
    overflow-wrap: anywhere;
}

.benefit-plan-mini-list div {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding-top: 8px;
    border-top: 1px solid var(--book-line);
}

.benefit-plan-mini-list div > span:first-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.benefit-plan-mini-list em {
    color: var(--book-muted);
    font-style: normal;
}

.plan-row-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    padding-top: 4px;
}

.plan-edit-link {
    border: 0;
    background: transparent;
    color: var(--plan-accent);
    cursor: pointer;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.plan-edit-link.danger {
    color: var(--book-red);
}

.plan-edit-link:hover {
    color: var(--book-ink);
}

.plan-empty-state {
    align-content: center;
    min-height: 142px;
    border-radius: 8px;
}

.plan-type-401k {
    --plan-accent: #4f7193;
    --plan-soft: #eef5fb;
}

.plan-type-espp {
    --plan-accent: #3b8f69;
    --plan-soft: #eff8f2;
}

.plan-type-hsa {
    --plan-accent: #3a8588;
    --plan-soft: #edf8f8;
}

.plan-type-rsu {
    --plan-accent: #7d6a9c;
    --plan-soft: #f4f0fa;
}

.plan-create-prompt {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin: 0 18px 16px;
    padding: 10px 12px;
}

.plan-create-prompt strong {
    color: var(--book-ink);
}

.plan-create-prompt span {
    color: var(--book-muted);
}

.employer-plan-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 32px;
    background: rgba(45, 38, 28, 0.34);
}

.employer-plan-modal {
    display: grid;
    width: min(980px, calc(100vw - 48px));
    max-height: calc(100vh - 64px);
    overflow: auto;
    border: 1px solid var(--book-line);
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: 0 24px 70px rgba(45, 38, 28, 0.26);
}

.plan-modal-header,
.plan-modal-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.plan-modal-header {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 16px 18px;
    border-bottom: 1px solid var(--book-line);
    background: #fffaf0;
}

.plan-modal-header h2,
.plan-modal-context h3 {
    margin: 0;
    font-family: var(--font-ui);
    line-height: 1.15;
}

.plan-modal-header h2 {
    font-size: 22px;
}

.plan-modal-context {
    padding: 16px 18px;
}

.plan-modal-context h3 {
    font-size: 16px;
}

.plan-type-chooser {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.plan-type-chooser-heading h3 {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 18px;
    line-height: 1.15;
}

.plan-type-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 10px;
}

.plan-type-choice {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 86px;
    padding: 12px;
    border: 1px solid var(--book-line);
    border-radius: 7px;
    background: #fffdf8;
    color: var(--book-ink);
    cursor: pointer;
    text-align: left;
}

.plan-type-choice:hover {
    border-color: #8aa6b5;
    background: #eef6f8;
}

.plan-type-choice strong {
    color: var(--book-ink);
    font-size: 16px;
    line-height: 1.1;
}

.plan-type-choice span,
.plan-type-choice em {
    color: var(--book-muted);
    font-style: normal;
    font-size: 11px;
    line-height: 1.2;
}

.plan-type-choice em {
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.plan-editor-panel-modal {
    display: grid;
    min-width: 0;
}

.plan-management-form-modal {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 0;
}

.plan-form-section {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--book-line);
    border-radius: 7px;
    background: #f8f3ea;
}

.plan-form-section.secondary {
    background: #fffaf0;
}

.plan-form-section strong {
    color: var(--book-ink);
    font-size: 13px;
}

.plan-form-section em {
    color: var(--book-muted);
    font-style: normal;
    font-size: 12px;
}

.plan-form-advanced {
    min-width: 0;
    padding: 10px 12px;
    border: 1px dashed var(--book-line-strong);
    border-radius: 7px;
    background: #fffdf8;
}

.plan-form-advanced summary {
    cursor: pointer;
    color: var(--book-ink);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.plan-form-advanced-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding-top: 12px;
}

.plan-modal-actions {
    padding: 0 18px 18px;
}

.modal-prompt {
    margin: 16px 18px 0;
}

.icon-text-button {
    border: 0;
    background: transparent;
    color: var(--book-gold);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.icon-text-button.danger,
.button.danger {
    color: var(--book-red);
}

.button.danger {
    border-color: #e4b4ad;
    background: #fff1ef;
}

.benefit-limit-table {
    display: grid;
    padding: 0 18px 18px;
}

.benefit-limits-panel {
    grid-column: 1 / -1;
}

.benefit-limits-panel > summary {
    cursor: pointer;
    list-style: none;
}

.benefit-limits-panel > summary::-webkit-details-marker {
    display: none;
}

.benefit-limits-summary .icon-text-button {
    align-self: center;
}

.benefit-limit-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(72px, auto) minmax(0, 0.9fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 12px 0;
    border-top: 1px solid var(--book-line);
    color: var(--book-ink);
}

.benefit-limit-row.header {
    border-top: 0;
    color: var(--book-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.benefit-limit-row strong,
.benefit-limit-row span {
    min-width: 0;
    color: var(--book-ink);
    overflow-wrap: anywhere;
}

.benefit-limit-row em {
    min-width: 0;
    color: var(--book-muted);
    font-style: normal;
    overflow-wrap: anywhere;
}

.income-benefits-root .employer-benefits-workbench {
    grid-template-columns: minmax(0, 1fr);
}

.income-benefits-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid var(--book-line);
    border-radius: 8px;
    background: #fffdf8;
}

.income-benefits-actions > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.income-benefits-actions > div:first-child {
    display: grid;
    gap: 3px;
}

.income-benefits-actions strong {
    color: var(--book-ink);
    font-size: 16px;
}

.income-benefits-actions span {
    color: var(--book-muted);
    font-size: 12px;
}

.income-empty-state {
    display: grid;
    justify-items: start;
    gap: 8px;
}

.income-empty-state strong {
    color: var(--book-ink);
}

/* Household directory: compact cards on a transparent canvas */
#households-view.app-page.active {
    gap: 14px;
    padding-top: 22px;
}

#households-view .advisor-page-header {
    align-items: center;
    padding-block: 0 4px;
}

#households-view .advisor-page-header h1 {
    font-size: clamp(38px, 3.6vw, 50px);
}

#households-view .advisor-page-header .lede {
    margin-top: 6px;
    font-size: 14px;
}

#households-view .advisor-page-header .eyebrow {
    margin-bottom: 7px;
}

#households-view .directory-summary {
    min-width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: right;
}

#households-view .directory-summary span {
    font-size: 30px;
    line-height: 1;
}

#households-view .household-directory {
    display: grid;
    gap: 11px;
    min-width: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

#households-view .household-directory-tabs {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 20px;
    min-width: 0;
    border: 0;
    background: transparent;
}

#households-view .household-directory-tabs button {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 1px 7px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--book-muted);
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

#households-view .household-directory-tabs button:hover {
    color: var(--book-ink);
}

#households-view .household-directory-tabs button.active {
    border-bottom-color: #9d732f;
    background: transparent;
    color: var(--book-ink);
    font-weight: 800;
}

#households-view .household-directory-tabs button:focus-visible {
    outline: 2px solid #b58a42;
    outline-offset: 2px;
}

#households-view .household-directory-toolbar {
    display: flex;
    padding: 0;
    border: 0;
    background: transparent;
}

#households-view .household-directory-search {
    width: min(460px, 100%);
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 1px;
    border: 0;
    border-bottom: 1px solid var(--book-line-strong);
    border-radius: 0;
    background: transparent;
}

#households-view .household-directory-search:focus-within {
    border-bottom-color: #9d732f;
    box-shadow: 0 1px 0 #9d732f;
}

#households-view .household-directory-search svg {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    fill: none;
    stroke: var(--book-muted);
    stroke-width: 1.8;
}

#households-view .household-directory-search input {
    width: 100%;
    min-width: 0;
    height: 32px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--book-ink);
    font: inherit;
    font-size: 13px;
}

#households-view .household-directory-search input::placeholder {
    color: var(--book-muted);
}

#households-view .household-directory-cards {
    display: grid;
    gap: 7px;
    min-width: 0;
    background: transparent;
}

#households-view .household-directory-grid-header,
#households-view .household-directory-card {
    display: grid;
    grid-template-columns:
        minmax(210px, 1.55fr)
        minmax(154px, 0.95fr)
        minmax(124px, 0.78fr)
        minmax(132px, 0.84fr)
        minmax(150px, 0.96fr)
        minmax(130px, 0.78fr);
    gap: 16px;
}

#households-view .household-directory-grid-header {
    align-items: end;
    padding: 0 14px 1px;
    color: var(--book-dim);
}

#households-view .household-directory-grid-header > span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

#households-view .household-directory-grid-header strong {
    overflow: hidden;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1.2;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

#households-view .household-directory-grid-header small {
    overflow: hidden;
    color: var(--book-muted);
    font-size: 8.5px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#households-view .household-directory-card {
    width: 100%;
    min-width: 0;
    min-height: 82px;
    align-items: start;
    padding: 10px 14px;
    border: 1px solid var(--book-line);
    border-radius: 8px;
    background: #fffdf8;
    color: var(--book-ink);
    box-shadow: 0 5px 15px rgba(58, 48, 35, 0.045);
    text-align: left;
}

#households-view .household-directory-card:hover,
#households-view .household-directory-card.active {
    border-color: var(--book-line-strong);
    background: #faf5ec;
    transform: none;
}

#households-view .household-directory-card:focus-visible {
    outline: 2px solid #b58a42;
    outline-offset: 2px;
}

#households-view .household-directory-primary,
#households-view .household-directory-field {
    min-width: 0;
}

#households-view .household-directory-primary {
    display: grid;
    gap: 4px;
}

#households-view .household-directory-primary > small,
#households-view .household-directory-field > small {
    display: none;
}

#households-view .household-directory-title-line {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
}

#households-view .household-directory-title-line > strong {
    min-width: 0;
    color: var(--book-ink);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.28;
    overflow-wrap: anywhere;
    white-space: normal;
}

#households-view .household-directory-primary > em {
    color: var(--book-muted);
    font-size: 10px;
    font-style: normal;
    line-height: 1.3;
    white-space: normal;
}

#households-view .household-directory-field {
    display: grid;
    gap: 3px;
}

#households-view .household-directory-primary > small,
#households-view .household-directory-field > small {
    color: var(--book-dim);
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1.2;
    text-transform: uppercase;
}

#households-view .household-directory-field > strong,
#households-view .household-directory-field > em {
    min-width: 0;
    line-height: 1.3;
    overflow-wrap: anywhere;
    white-space: normal;
}

#households-view .household-directory-field > strong {
    color: var(--book-ink);
    font-size: 11.5px;
    font-weight: 700;
}

#households-view .household-directory-field > em {
    color: var(--book-muted);
    font-size: 9.5px;
    font-style: normal;
}

#households-view .household-directory-inline-tags {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.household-directory-tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 22px;
    padding: 3px 7px;
    overflow: hidden;
    border-radius: 5px;
    background: #e9e5df;
    color: #524d47;
    font-size: 10.5px;
    font-weight: 750;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.household-directory-tag--status[data-value="active"] {
    background: #dcebdd;
    color: #285b3c;
}

.household-directory-tag--status[data-value="prospect"] {
    background: #e6e1d9;
    color: #57514a;
}

.household-directory-tag--status[data-value="assessment"] {
    background: #f5e2b8;
    color: #76520e;
}

.household-directory-tag--status[data-value="onboarding"] {
    background: #d9e6ef;
    color: #345b77;
}

.household-directory-tag--status[data-value="dead_file"] {
    background: #ecd6d3;
    color: #7d3530;
}

.household-directory-tag--segment[data-value="a"] {
    background: #d7e9dc;
    color: #275b3d;
}

.household-directory-tag--segment[data-value="b"] {
    background: #eee1b5;
    color: #71530f;
}

.household-directory-tag--segment[data-value="c"] {
    background: #efd7c6;
    color: #794421;
}

.household-directory-tag--segment[data-value="d"] {
    background: #f0ceca;
    color: #812e2b;
}

.household-directory-tag--tier[data-value="core"] {
    background: #e3d8eb;
    color: #5b3971;
}

.household-directory-tag--tier[data-value="ascend"] {
    background: #d9e6ef;
    color: #345b77;
}

.household-directory-tag--tier[data-value="summit"] {
    background: #d6e8de;
    color: #2e6047;
}

.household-directory-tag--tier[data-value="operator"] {
    background: #d4e3f2;
    color: #2d5882;
}

.household-directory-tag--tier[data-value="principal"] {
    background: #eee0ba;
    color: #6c4d0e;
}

.household-directory-tag--assessment[data-value="foundation"] {
    background: #ead8c2;
    color: #714b28;
}

.household-directory-tag--assessment[data-value="momentum"] {
    background: #d6e6ee;
    color: #315b70;
}

.household-directory-tag--assessment[data-value="legacy"] {
    background: #e3d9ea;
    color: #5b3c69;
}

.household-directory-tag[data-value="not_applicable"] {
    background: #e8e6e2;
    color: #625d57;
}

.household-directory-empty {
    padding: 32px 18px;
    color: var(--book-muted);
    font-size: 13px;
    text-align: center;
}

.household-profile-modal {
    width: min(760px, calc(100vw - 48px));
}

.household-member-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.household-member-section-heading .mini-heading {
    margin: 0;
}

.household-profile-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.household-profile-form label {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
    color: var(--book-dim);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.household-profile-form input,
.household-profile-form select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid var(--book-line-strong);
    border-radius: 6px;
    background: #fffdf8;
    color: var(--book-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 550;
    letter-spacing: 0;
    text-transform: none;
}

.household-profile-form input:focus,
.household-profile-form select:focus {
    border-color: #b58a42;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(181, 138, 66, 0.12);
}

.household-profile-form input[readonly] {
    background: #f2eee7;
    color: var(--book-muted);
}

.household-profile-form label > em {
    color: var(--book-muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
}

.household-profile-currency {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 42px;
    border: 1px solid var(--book-line-strong);
    border-radius: 6px;
    background: #fffdf8;
}

.household-profile-currency:focus-within {
    border-color: #b58a42;
    box-shadow: 0 0 0 3px rgba(181, 138, 66, 0.12);
}

.household-profile-currency > span {
    padding-left: 11px;
    color: var(--book-muted);
    font-size: 13px;
}

.household-profile-currency input {
    min-height: 40px;
    border: 0;
    box-shadow: none;
}

.household-profile-currency input:focus {
    box-shadow: none;
}

.household-profile-notice {
    padding: 10px 12px;
    border: 1px solid #e4b4ad;
    border-radius: 6px;
    background: #fff1ef;
    color: #832f28;
    font-size: 12px;
}

.household-profile-notice[hidden] {
    display: none;
}

@media (max-width: 1180px) {
    #households-view .household-directory-grid-header {
        display: none;
    }

    #households-view .household-directory-card {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px 20px;
        padding: 14px 16px;
    }

    #households-view .household-directory-primary {
        grid-column: 1 / -1;
    }

    #households-view .household-directory-primary > small,
    #households-view .household-directory-field > small {
        display: block;
    }
}

@media (max-width: 760px) {
    #households-view .household-directory-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #households-view .household-directory-primary,
    #households-view .household-directory-service {
        grid-column: 1 / -1;
    }

    .household-profile-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    #households-view .household-directory-card {
        grid-template-columns: 1fr;
    }

    #households-view .household-directory-primary,
    #households-view .household-directory-service {
        grid-column: auto;
    }
}
