:root {
    --kb-modal-width-compact: 38rem;
    --kb-modal-width-standard: 70rem;
    --kb-modal-width-large: 82rem;
    --kb-modal-width-wide: 92rem;
    --kb-modal-inset: 1rem;
    --kb-modal-max-height: calc(100dvh - 2rem);
    --kb-modal-radius: 1.125rem;
    --kb-modal-shadow: 0 30px 80px rgba(15, 39, 64, .22);
    --kb-modal-overlay: rgba(15, 39, 64, .46);
    --kb-modal-header-padding-top: 1.25rem;
    --kb-modal-header-padding-bottom: 1rem;
    --kb-modal-header-padding-inline: 2rem;
    --kb-modal-body-padding-top: .25rem;
    --kb-modal-body-padding: 2rem;
    --kb-modal-footer-padding-block: 1rem;
    --kb-modal-footer-padding-inline: 2rem;
    --kb-modal-icon-size: 3.375rem;
    --kb-modal-close-size: 2.5rem;
}

.kb-modal {
    box-sizing: border-box;
    width: min(var(--kb-modal-width), calc(100vw - (var(--kb-modal-inset) * 2)));
    min-width: 0;
    max-width: none;
    max-height: var(--kb-modal-max-height);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: var(--kb-modal-radius);
    background: linear-gradient(180deg, #f8fbff 0%, #f4f7fa 100%);
    box-shadow: var(--kb-modal-shadow);
    color: #52677d;
    overflow: hidden;
    overscroll-behavior: contain;
}

.kb-modal--compact { --kb-modal-width: var(--kb-modal-width-compact); }
.kb-modal--standard { --kb-modal-width: var(--kb-modal-width-standard); }
.kb-modal--large { --kb-modal-width: var(--kb-modal-width-large); }
.kb-modal--wide { --kb-modal-width: var(--kb-modal-width-wide); }
.kb-modal--results { height: var(--kb-modal-max-height); background:linear-gradient(180deg,#f8fbff 0%,#f4f7fa 100%); }
.kb-modal--results .kb-modal__header,.kb-modal--results .kb-modal__footer { background:transparent; }
.kb-modal--stacked-surfaces { background:linear-gradient(180deg,#f8fbff 0%,#f4f7fa 100%); }
.kb-modal--stacked-surfaces .kb-modal__header,.kb-modal--stacked-surfaces .kb-modal__footer { background:transparent; }

.kb-modal[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content:stretch;
}
.kb-modal--results[open],.transaction-wizard-dialog[open] { grid-template-rows:auto minmax(0,1fr) auto; align-content:stretch; }

.kb-modal::backdrop {
    background: var(--kb-modal-overlay);
    backdrop-filter: none;
}

.kb-modal:focus { outline: none; }

.kb-modal > form {
    grid-row: 2;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-content:stretch;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

.kb-modal__header {
    box-sizing: border-box;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    padding: var(--kb-modal-header-padding-top) var(--kb-modal-header-padding-inline) var(--kb-modal-header-padding-bottom);
    border: 0;
    background: transparent;
}

.kb-modal__heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.kb-modal__heading-copy { min-width: 0; }

.kb-modal__title {
    margin: 0;
    color: #273d52;
    font-size: clamp(1.625rem, 2.4vw, 2rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.035em;
}

.kb-modal__description {
    margin: .3rem 0 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-weight: 400;
    line-height: 1.45;
}

.kb-modal__icon {
    width: var(--kb-modal-icon-size);
    height: var(--kb-modal-icon-size);
    display: grid;
    flex: 0 0 var(--kb-modal-icon-size);
    place-items: center;
    border-radius: 1rem;
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.kb-modal__icon svg {
    width: 1.6rem;
    height: 1.6rem;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kb-modal--success .kb-modal__icon { background: #e8f8f1; color: #14966b; }
.kb-modal--warning .kb-modal__icon { background: #fff4dc; color: #d88b12; }
.kb-modal--danger .kb-modal__icon { background: #ffe9e9; color: #ef4b4b; }

.kb-modal__header-end,
.kb-modal__header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--space-3);
}

.kb-modal__count {
    min-width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    padding: 0 .75rem;
    border: 1px solid #9ed4d2;
    border-radius: .9375rem;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: .875rem;
    font-weight: 600;
}

.kb-modal__close {
    width: var(--kb-modal-close-size);
    height: var(--kb-modal-close-size);
    display: grid;
    flex: 0 0 var(--kb-modal-close-size);
    place-items: center;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.kb-modal__close svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
}

.kb-modal__close:hover {
    border-color: rgba(2, 146, 148, .34);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    box-shadow: 0 6px 16px rgba(15, 39, 64, .09);
}

.kb-modal__close:focus-visible {
    outline: 0;
    border-color: var(--color-accent);
    box-shadow: var(--focus-ring);
}

.kb-modal__body {
    box-sizing: border-box;
    min-height: 0;
    max-height:none;
    padding: var(--kb-modal-body-padding-top) var(--kb-modal-body-padding) .75rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #a7b5c3 transparent;
    scrollbar-width: thin;
    color: var(--color-text-muted);
    font: 400 var(--font-size-sm)/var(--line-height-normal) var(--font-family-sans);
}

.kb-modal__body :is(h2,h3) { color: var(--color-text); font-weight: 600; }
.kb-modal__body p { color: var(--color-text-muted); }
.kb-modal__content { display: grid; gap: 1rem; min-width: 0; color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: 400; line-height: var(--line-height-normal); }
.kb-modal__content :is(h2,h3) { margin: 0; color: var(--color-text); font-size: var(--font-size-md); font-weight: 600; line-height: 1.4; }
.kb-modal__content p { margin: 0; color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: 400; line-height: 1.65; }
.kb-modal__content .communication-subheading { color: var(--color-text); font-size: var(--font-size-sm); font-weight: 600; }
.kb-confirmation-content { gap: .75rem; }
.kb-confirmation-content .delete-warning { margin: 0; }

.kb-modal__body::-webkit-scrollbar { width: .55rem; }
.kb-modal__body::-webkit-scrollbar-track { background: transparent; }
.kb-modal__body::-webkit-scrollbar-thumb {
    border: .125rem solid transparent;
    border-radius: var(--radius-pill);
    background: #a7b5c3;
    background-clip: padding-box;
}

.kb-modal__footer {
    box-sizing: border-box;
    min-height: 4.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    padding: var(--kb-modal-footer-padding-block) var(--kb-modal-footer-padding-inline);
    border: 0;
    background: transparent;
}


@media (max-width: 42rem) {
    :root {
        --kb-modal-inset: .5rem;
        --kb-modal-max-height: calc(100dvh - 1rem);
        --kb-modal-header-padding-top: 1rem;
        --kb-modal-header-padding-bottom: 1rem;
        --kb-modal-header-padding-inline: 1rem;
        --kb-modal-body-padding: 1rem;
        --kb-modal-footer-padding-inline: 1rem;
        --kb-modal-icon-size: 3rem;
    }

    .kb-modal__header { min-height:0; gap: var(--space-3); }
    .kb-modal__heading { gap: var(--space-3); }
    .kb-modal__title { font-size: 1.5rem; }
    .kb-modal__header-actions { display: none; }
    .kb-modal__footer > :is(.button, .btn-primary, .button--submit, .button--danger) { flex: 1 1 12rem; }
}

/* Transaction timeline workspace: canonical timeline/card family extension. */
.kb-timeline--milestones { position:relative; display:flex; gap:0; margin:0; padding:var(--space-3) var(--space-2) var(--space-2); overflow-x:auto; scroll-snap-type:x proximity; scrollbar-width:thin; }
.kb-timeline--milestones::before { top:2.375rem; right:4rem; bottom:auto; left:4rem; width:auto; height:2px; background:var(--color-border); }
.kb-timeline--milestones .kb-timeline__item { min-width:8.25rem; grid-template-columns:1fr; justify-items:center; gap:var(--space-2); padding:0 var(--space-2); text-align:center; scroll-snap-align:center; }
.kb-timeline--milestones .kb-timeline__control { width:100%; display:grid; justify-items:center; gap:var(--space-2); padding:var(--space-2); border:1px solid transparent; border-radius:var(--radius-md); color:inherit; text-decoration:none; }
.kb-timeline--milestones .kb-timeline__control:hover { border-color:var(--color-border); background:#f7f9fb; }
.kb-timeline--milestones .kb-timeline__control:focus-visible { outline:3px solid color-mix(in srgb,var(--color-accent) 35%,transparent); outline-offset:2px; }
.kb-timeline--milestones .kb-timeline__item.is-selected .kb-timeline__control { border-color:transparent; background:var(--timeline-blue-soft,#eaf2ff); }
.kb-timeline--milestones .kb-timeline__marker { width:2.25rem; height:2.25rem; border-radius:var(--radius-pill); background:var(--color-surface); }
.kb-timeline--milestones .kb-timeline__marker svg { width:1rem; height:1rem; }
.kb-timeline--milestones .kb-timeline__copy { min-width:0; }
.kb-timeline--milestones .kb-timeline__item strong { color:var(--color-text); font-size:.72rem; line-height:1.25; }
.kb-timeline--milestones .kb-timeline__copy > span { display:block; font-size:.66rem; }
.kb-timeline--milestones .kb-timeline__item p { display:none; }
.kb-timeline--milestones .kb-timeline__item--complete .kb-timeline__marker { border-color:#8bd3a8; background:#e8f8ee; color:#1f9c55; }
.kb-timeline--milestones .kb-timeline__item--current .kb-timeline__marker { border-color:#3f7cff; background:#3f7cff; color:#fff; box-shadow:0 0 0 .25rem #eaf2ff; }
.kb-timeline--milestones .kb-timeline__item--waiting .kb-timeline__marker { border-color:#edb65f; background:#fff3dc; color:#b66f10; }
.kb-timeline--milestones .kb-timeline__item--ready .kb-timeline__marker { border-color:#9ed4d2; background:var(--color-accent-soft); color:var(--color-accent); }
.kb-timeline--milestones .kb-timeline__item--skipped { opacity:.62; }

.kb-transaction-workspace { --timeline-blue:#3f7cff; --timeline-blue-soft:#eaf2ff; gap:var(--space-5); }
.kb-transaction-workspace--refinance { --timeline-blue:var(--color-success); --timeline-blue-soft:var(--color-success-soft); }
.kb-transaction-workspace .kb-page-header { border-top:.25rem solid var(--timeline-blue); box-shadow:var(--shadow-card); }
.kb-transaction-workspace .kb-page-header__icon { background:var(--timeline-blue-soft); color:var(--timeline-blue); }
.kb-transaction-workspace__status { display:inline-flex; align-items:center; min-height:1.75rem; padding:0 .7rem; border-radius:var(--radius-pill); background:#e8f8ee; color:#1f8e4e; font-size:.72rem; font-weight:600; }
.kb-transaction-workspace > .kb-tabs-sample { margin-top:calc(var(--space-2) * -1); }
.kb-transaction-workspace__timeline { min-width:0; padding:var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-card); scroll-margin-top:var(--space-5); }
.kb-transaction-workspace__timeline-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:var(--space-4); padding:0 var(--space-2) var(--space-2); color:var(--color-text-muted); font-size:var(--font-size-xs); }
.kb-transaction-workspace__timeline-heading > div { display:grid; gap:.15rem; }
.kb-transaction-workspace__timeline-heading strong { color:var(--color-text); }
.kb-transaction-workspace__step-count { font-size:var(--font-size-sm); font-weight:600; }
.kb-transaction-workspace__grid { display:grid; grid-template-columns:minmax(0,1.75fr) minmax(19rem,.75fr); align-items:start; gap:var(--space-5); }
.kb-transaction-workspace__primary,.kb-transaction-workspace__secondary { min-width:0; display:grid; gap:var(--space-5); }
.kb-transaction-workspace [id] { scroll-margin-top:var(--space-5); }
.kb-current-milestone { --kb-workspace-accent:var(--timeline-blue); }
.kb-current-milestone .kb-workspace-card__body { padding:0; }
.kb-current-milestone .kb-empty-state { margin:var(--space-4); }
.kb-current-milestone .kb-workspace-card__actions form { margin:0; }
.kb-waiting-summary { display:grid; grid-template-columns:2.5rem minmax(0,1fr); gap:var(--space-3); margin:var(--space-4); padding:var(--space-3); border:1px solid #efc983; border-radius:var(--radius-md); background:#fff9ed; }
.kb-waiting-summary > span { width:2.5rem; height:2.5rem; display:grid; place-items:center; border-radius:var(--radius-md); background:#fff0cf; color:#b66f10; }
.kb-waiting-summary svg { width:1.15rem; height:1.15rem; stroke:currentColor; }
.kb-waiting-summary strong,.kb-waiting-summary p,.kb-waiting-summary small { display:block; }
.kb-waiting-summary p { margin:.2rem 0 0; color:var(--color-text-muted); font-size:var(--font-size-xs); line-height:1.45; }
.kb-waiting-summary small { margin-top:.35rem; color:var(--color-text-soft); }
.kb-timeline-task-list { border-top:1px solid var(--color-border-soft); overflow-x:auto; }
.kb-timeline-task-list__header,.kb-timeline-task { min-width:48rem; display:grid; grid-template-columns:2rem minmax(14rem,1fr) minmax(8rem,.28fr) minmax(8rem,.25fr) minmax(7.5rem,.2fr) 9.375rem; align-items:center; gap:var(--space-3); }
.kb-timeline-task-list__header { padding:.65rem var(--space-4); border-bottom:1px solid var(--color-border-soft); background:#f8fafc; color:var(--color-text-soft); font-size:.68rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase; }
.kb-timeline-task-list__header > span:first-child { grid-column:1 / 3; }
.kb-timeline-task { padding:.75rem var(--space-4); border-bottom:1px solid var(--color-border-soft); cursor:pointer; }
.kb-timeline-task:hover { background:#f7f9fb; }
.kb-timeline-task:focus-visible { outline:2px solid var(--color-accent); outline-offset:-2px; background:#f7f9fb; }
.kb-timeline-task:last-child { border-bottom:0; }
.kb-timeline-task__state { width:1.75rem; height:1.75rem; display:grid; place-items:center; border:1px solid var(--color-border); border-radius:var(--radius-pill); color:var(--color-text-soft); }
.kb-timeline-task__state svg { width:.95rem; height:.95rem; stroke:currentColor; }
.kb-timeline-task--complete .kb-timeline-task__state,.kb-timeline-task--waived .kb-timeline-task__state { border-color:#8bd3a8; background:#e8f8ee; color:#1f9c55; }
.kb-timeline-task--waiting .kb-timeline-task__state { border-color:#edb65f; background:#fff3dc; color:#b66f10; }
.kb-timeline-task--in_progress .kb-timeline-task__state { border-color:#9bbcff; background:#eaf2ff; color:#3f7cff; }
.kb-timeline-task__summary { min-width:0; display:grid; gap:.2rem; padding:.25rem; color:inherit; text-align:left; }
.kb-timeline-task__title-row { min-width:0; display:flex; align-items:center; gap:var(--space-2); }
.kb-timeline-task__summary strong { min-width:0; color:var(--color-text); font-size:var(--font-size-sm); font-weight:500; overflow-wrap:anywhere; }
.kb-timeline-task__summary em { margin-left:.35rem; color:var(--color-text-soft); font-size:.66rem; font-style:normal; font-weight:500; text-transform:uppercase; }
.kb-timeline-task__documents { display:inline-flex; align-items:center; gap:.25rem; color:var(--color-text-muted); font-size:var(--font-size-xs); }
.kb-timeline-task__documents svg { width:.9rem; height:.9rem; stroke:currentColor; }
.kb-timeline-task__owner,.kb-timeline-task__due { color:var(--color-text-muted); font-size:.75rem; }
.kb-timeline-task__actions { width:9.375rem; display:flex; align-items:center; justify-content:flex-end; gap:var(--space-1); }
.kb-timeline-task__actions > .kb-icon-action,.kb-timeline-task__actions > form { flex:0 0 2.875rem; }
.kb-timeline-task__actions form { margin:0; }
.kb-timeline-task__actions form .kb-icon-action { width:2.875rem; height:2.875rem; }
.kb-archived-custom-tasks { margin-top:var(--space-5); }
.kb-timeline-status { width:max-content; display:inline-flex; align-items:center; min-height:1.5rem; padding:0 .6rem; border-radius:var(--radius-pill); background:#eef2f6; color:#65778b; font-size:.75rem; font-weight:400; white-space:nowrap; }
.kb-timeline-status--complete,.kb-timeline-status--waived { background:#e8f8ee; color:#1f8e4e; }
.kb-timeline-status--waiting { background:#fff3dc; color:#b66f10; }
.kb-timeline-status--in_progress { background:#eaf2ff; color:#3f7cff; }
.kb-timeline-status--ready_to_complete { background:var(--color-accent-soft); color:var(--color-accent); }
.kb-task-status-form,.kb-task-status-form .field { margin:0; }
.kb-timeline-status-picker-field { width:max-content; }
.kb-timeline-status-picker { width:auto; min-height:1.75rem; padding:.1rem 1.75rem .1rem .65rem; border:1px solid var(--color-border); border-radius:var(--radius-pill); background-color:#eef2f6; color:#52677c; font-size:.75rem; font-weight:400; }
.kb-timeline-status-picker[data-status="not_started"] { background-color:#fff; color:#52677c; }
.kb-timeline-status-picker[data-status="in_progress"] { border-color:#9bbcff; background-color:#eaf2ff; color:#315fbd; }
.kb-timeline-status-picker[data-status="waiting"] { border-color:#edb65f; background-color:#fff3dc; color:#995c0a; }
.kb-timeline-status-picker[data-status="complete"],.kb-timeline-status-picker[data-status="waived"] { border-color:#8bd3a8; background-color:#e8f8ee; color:#187840; }
.kb-timeline-status-picker option { background:#fff; color:#52677c; }
.kb-timeline-status-picker option.kb-timeline-status-option--in_progress { background:#eaf2ff; color:#315fbd; }
.kb-timeline-status-picker option.kb-timeline-status-option--waiting { background:#fff3dc; color:#995c0a; }
.kb-timeline-status-picker option:is(.kb-timeline-status-option--complete,.kb-timeline-status-option--waived) { background:#e8f8ee; color:#187840; }
.kb-timeline-status-picker:focus-visible { outline:3px solid color-mix(in srgb,var(--color-accent) 25%,transparent); outline-offset:2px; }
.kb-overview-panel { min-width:0; padding:var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-card); }
.kb-overview-panel > header { display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); margin-bottom:var(--space-3); }
.kb-overview-panel > header h2 { margin:0; color:var(--color-text); font-size:1rem; }
.kb-overview-panel > header > span:not(.kb-timeline-status) { min-width:1.65rem; height:1.65rem; display:grid; place-items:center; padding:0 .35rem; border-radius:var(--radius-pill); background:#eef4ff; color:#587485; font-size:.7rem; font-weight:600; }
.kb-overview-panel__title { min-width:0; display:flex; align-items:center; gap:var(--space-2); }
.kb-overview-panel__count { min-width:1.65rem; height:1.65rem; display:grid; place-items:center; padding:0 .35rem; border-radius:var(--radius-pill); background:#eef4ff; color:#587485; font-size:.7rem; font-weight:600; }
.kb-overview-panel .kb-empty-state { padding:var(--space-4); }
.kb-attention-list,.kb-timeline-simple-list { display:grid; }
.kb-attention-item,.kb-timeline-simple-list article { display:grid; grid-template-columns:2.25rem minmax(0,1fr); align-items:start; gap:var(--space-3); padding:.75rem 0; border-bottom:1px solid var(--color-border-soft); }
.kb-attention-item:last-child,.kb-timeline-simple-list article:last-child { border-bottom:0; }
.kb-attention-item > span,.kb-timeline-simple-list article > span { width:2.25rem; height:2.25rem; display:grid; place-items:center; border-radius:var(--radius-md); background:#eef4ff; color:#587485; }
.kb-attention-item--waiting > span { background:#fff3dc; color:#b66f10; }
.kb-attention-item--overdue > span { background:#ffe9e9; color:#d84040; }
.kb-attention-item svg,.kb-timeline-simple-list svg { width:1rem; height:1rem; stroke:currentColor; }
.kb-attention-item strong,.kb-timeline-simple-list strong,.kb-timeline-simple-list small { display:block; }
.kb-attention-item strong,.kb-timeline-simple-list strong { color:var(--color-text); font-size:var(--font-size-xs); font-weight:500; }
.kb-attention-item p { margin:.2rem 0 0; color:var(--color-text-muted); font-size:.72rem; line-height:1.45; }
.kb-timeline-simple-list small { margin-top:.2rem; color:var(--color-text-muted); font-size:.7rem; line-height:1.35; }
.kb-transaction-activity > header { align-items:center; }
.kb-transaction-activity__filters { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:var(--space-2); }
.kb-transaction-activity__filter[aria-pressed="true"],.kb-transaction-activity__filter[aria-pressed="true"]:disabled { border-color:#cfd7df; background:#e5e9ed; color:#52677c; box-shadow:none; opacity:1; cursor:default; }
.kb-transaction-activity__viewport { height:auto; }
.kb-transaction-activity__viewport.is-scrollable { height:37.5rem; scrollbar-gutter:stable; }
.kb-transaction-activity__list article { min-height:3.75rem; }
.kb-transaction-activity__list article[hidden] { display:none; }
.kb-transaction-activity__viewport > [data-transaction-activity-empty] { width:100%; min-height:100%; display:grid; place-items:center; }
.kb-transaction-activity__viewport > [data-transaction-activity-empty] > .kb-empty-state { width:100%; box-sizing:border-box; }
.kb-transaction-activity__viewport > [data-transaction-activity-empty][hidden] { display:none; }
.kb-activity-list .kb-activity-row { grid-template-columns:2.25rem minmax(7.5rem,.3fr) minmax(12rem,1fr) minmax(7rem,.3fr); align-items:center; min-height:3.75rem; }
.kb-activity-row__date,.kb-activity-row__type { color:var(--color-text-muted); font-size:.7rem; line-height:1.35; }
.kb-activity-row__activity { min-width:0; }
.kb-activity-row__type { margin:0; }
.kb-task-activity__viewport { height:18.75rem; scrollbar-gutter:stable; }
.kb-task-activity__viewport > .kb-empty-state { min-height:100%; }
.kb-people-list article { grid-template-columns:2.25rem minmax(0,1fr) auto; align-items:center; }
.kb-people-list article > .kb-person-access-status { width:auto; height:auto; display:inline-flex; padding:.28rem .55rem; border-radius:var(--radius-pill); background:#eef2f6; color:var(--color-text-muted); font-size:.68rem; font-weight:400; white-space:nowrap; }
.kb-people-list article > .kb-person-access-status--allowed { border:1px solid #a6ddb9; background:var(--color-success-soft,#e8f8ee); color:#1f7a45; }
.kb-rate-lock { border-top:.22rem solid #36ad6a; }
.kb-rate-lock__heading { display:grid; gap:.15rem; }
.kb-rate-lock__header-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:var(--space-2); }
.kb-rate-lock__body { display:grid; gap:.25rem; margin:var(--space-3) 0; }
.kb-rate-lock__body strong { color:var(--color-text); font-size:var(--font-size-sm); }
.kb-rate-lock__body span { color:var(--color-text-muted); font-size:var(--font-size-xs); line-height:1.5; }
.kb-timeline-detail-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-3); margin:0; }
.kb-timeline-detail-list > div { padding:var(--space-3); border:1px solid var(--color-border-soft); border-radius:var(--radius-md); background:#f8fafc; }
.kb-timeline-detail-list dt { color:var(--color-text-soft); font-size:.68rem; font-weight:600; text-transform:uppercase; }
.kb-timeline-detail-list dd { margin:.35rem 0 0; color:var(--color-text); font-size:var(--font-size-sm); }
.kb-timeline-task-detail { display:grid; gap:var(--space-4); }
.kb-timeline-task-detail__description { padding:var(--space-3); border-top:1px solid var(--color-border-soft); }
.kb-timeline-task-detail__description p { margin:.4rem 0 0; color:var(--color-text-muted); line-height:1.6; }
.kb-timeline-document-link { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:var(--space-3); padding:var(--space-3); border:1px solid var(--color-border-soft); border-radius:var(--radius-md); }
.kb-timeline-document-link .field { margin:0; }
.kb-timeline-linked-documents { display:flex; align-items:center; flex-wrap:wrap; gap:var(--space-2); padding:var(--space-3); border:1px solid var(--color-border-soft); border-radius:var(--radius-md); }
.kb-timeline-linked-documents > strong { width:100%; color:var(--color-text); font-size:var(--font-size-xs); }
.kb-timeline-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-3); }
.transaction-card--historical { opacity:.82; }
.transaction-card--historical.transaction-card--cancelled { opacity:1; }
.transaction-card__headline .mini-pill--cancelled { border-color:#f3b4b4; background:#fff0f0; color:#b42318; }

@media (max-width:72rem) {
    .kb-transaction-workspace__grid { grid-template-columns:1fr; }
    .kb-transaction-workspace__secondary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:47.5rem) {
    .kb-transaction-workspace { padding-inline:var(--space-3); }
    .kb-transaction-workspace .kb-page-header__actions,.kb-transaction-workspace .kb-page-header__actions .kb-button { width:100%; }
    .kb-transaction-workspace > .kb-tabs-sample .kb-tabs-sample__list { overflow-x:auto; flex-wrap:nowrap; }
    .kb-transaction-workspace__timeline { padding:var(--space-3) 0; }
    .kb-transaction-workspace__timeline-heading { align-items:flex-start; flex-direction:column; padding-inline:var(--space-3); }
    .kb-timeline--milestones .kb-timeline__item { min-width:6.75rem; }
    .kb-transaction-workspace__secondary { grid-template-columns:1fr; }
    .kb-timeline-task-list { overflow-x:visible; }
    .kb-timeline-task-list__header { display:none; }
    .kb-timeline-task { min-width:0; grid-template-columns:2rem minmax(0,1fr) auto; gap:var(--space-2); padding:.8rem var(--space-3); }
    .kb-timeline-task__owner,.kb-timeline-task__due,.kb-timeline-task > .kb-timeline-status { grid-column:2; justify-self:start; }
    .kb-timeline-task__owner::before,.kb-timeline-task__due::before,.kb-timeline-task > .kb-timeline-status::before { margin-right:.35rem; color:var(--color-text-soft); content:attr(data-label) ":"; font-size:.66rem; font-weight:600; text-transform:uppercase; }
    .kb-timeline-task__actions { width:auto; grid-column:3; grid-row:1 / span 4; align-self:center; flex-direction:column; }
    .kb-timeline-detail-list,.kb-timeline-form-grid { grid-template-columns:1fr; }
    .kb-timeline-document-link { grid-template-columns:1fr; }
    .kb-timeline-document-link .kb-button { width:100%; }
}

/* Canonical record-detail workspace composition. */
.kb-client-workspace {
    --kb-client-stage-accent:#3f7cff;
    --kb-client-stage-soft:#eaf2ff;
    --kb-client-stage-ink:#245bb9;
    --kb-workspace-contact:#3f7cff;
    --kb-workspace-contact-soft:#eaf2ff;
    --kb-workspace-communication:#029294;
    --kb-workspace-communication-soft:#e5f7f6;
    --kb-workspace-follow-up:#2f8fbd;
    --kb-workspace-follow-up-soft:#e8f6fc;
    --kb-workspace-transaction:#1f9c55;
    --kb-workspace-transaction-soft:#e8f8ee;
    --kb-workspace-files:#c77b12;
    --kb-workspace-files-soft:#fff3dc;
    --kb-workspace-notes:#7157d9;
    --kb-workspace-notes-soft:#f1eaff;
    /* Compatibility aliases for approved content patterns inside the canonical shell. */
    --client-contact:var(--kb-workspace-contact);
    --client-contact-soft:var(--kb-workspace-contact-soft);
    --client-communication:var(--kb-workspace-communication);
    --client-communication-soft:var(--kb-workspace-communication-soft);
    --client-follow-up:var(--kb-workspace-follow-up);
    --client-follow-up-soft:var(--kb-workspace-follow-up-soft);
    --client-transaction:var(--kb-workspace-transaction);
    --client-transaction-soft:var(--kb-workspace-transaction-soft);
    --client-files:var(--kb-workspace-files);
    --client-files-soft:var(--kb-workspace-files-soft);
    --client-notes:var(--kb-workspace-notes);
    --client-notes-soft:var(--kb-workspace-notes-soft);
    display:grid;
    gap:var(--space-5);
    width:100%;
    padding:var(--space-6) var(--space-6) 0;
    color:var(--color-text);
}
.kb-client-workspace > .kb-page-header {
    margin-bottom:calc(var(--space-1) * -1);
    padding:var(--space-5) var(--space-8);
    border:1px solid var(--color-border);
    border-radius:var(--radius-lg);
    background:linear-gradient(110deg,var(--kb-client-stage-soft) 0%,color-mix(in srgb,var(--kb-client-stage-accent) 30%,var(--kb-client-stage-soft)) 100%);
    box-shadow:var(--shadow-card);
}
.kb-client-workspace > .kb-page-header .kb-page-header__icon { background:var(--kb-client-stage-soft); color:var(--kb-client-stage-accent); }
.kb-client-workspace > .kb-page-header h2 { font-size:clamp(1.75rem,2.2vw,2.35rem); font-weight:700; letter-spacing:-.035em; line-height:var(--line-height-tight); }
.kb-client-workspace__grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:var(--space-5); }
.kb-client-workspace__column { min-width:0; display:grid; gap:var(--space-5); }
.kb-client-workspace__favorite-form { display:flex; margin:0; }
.kb-client-workspace__favorite { background:var(--color-surface); color:var(--color-text-muted); }
.kb-client-workspace__favorite.is-saved { border-color:#efb6bc; background:#fffafa; color:#df7582; }
.kb-client-workspace__favorite.is-saved:hover { border-color:#e79aa3; background:#fff7f8; color:#d96674; }
.kb-client-workspace__favorite.is-saved svg { fill:currentColor; }
.kb-client-workspace--lead { --kb-client-stage-accent:#3f7cff; --kb-client-stage-soft:#eaf2ff; --kb-client-stage-ink:#245bb9; }
.kb-client-workspace--active_prospect { --kb-client-stage-accent:#5e9bff; --kb-client-stage-soft:#eaf2ff; --kb-client-stage-ink:#356aa8; }
.kb-client-workspace--pre_approved { --kb-client-stage-accent:#8f66e8; --kb-client-stage-soft:#f1eaff; --kb-client-stage-ink:#6244b5; }
.kb-client-workspace--active_file { --kb-client-stage-accent:#46bf6b; --kb-client-stage-soft:#e8f8ee; --kb-client-stage-ink:#1f7b45; }
.kb-client-workspace--closed { --kb-client-stage-accent:#d98b22; --kb-client-stage-soft:#fff3dc; --kb-client-stage-ink:#9a5a08; }
.kb-client-workspace--inactive { --kb-client-stage-accent:#d43d3d; --kb-client-stage-soft:#ffe9e9; --kb-client-stage-ink:#b42f2f; }
.kb-client-stage { min-height:1.7rem; display:inline-flex; align-items:center; padding:0 .7rem; border:1px solid var(--kb-client-stage-accent); border-radius:var(--radius-pill); background:var(--kb-client-stage-soft); color:var(--kb-client-stage-ink); font-size:var(--font-size-xs); font-weight:600; white-space:nowrap; }
.kb-client-workspace--preview { margin-top:var(--space-5); padding:0; }
.kb-form .kb-choice-row.kb-choice-list { display:grid; grid-template-columns:1fr; align-items:stretch; gap:var(--space-3); }
.kb-form .kb-choice-row.kb-choice-list label { min-height:0; display:block; padding:0; border:0; background:transparent; }
.kb-form .kb-choice-row.kb-choice-list input { position:absolute; width:1px; height:1px; margin:-1px; opacity:0; pointer-events:none; }
.kb-form .kb-choice-row.kb-choice-list .kb-choice-copy { min-height:4.25rem; display:grid; grid-template-columns:2.5rem minmax(0,1fr); grid-template-rows:auto auto; align-content:center; column-gap:var(--space-3); padding:var(--space-3) var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); color:var(--color-text); cursor:pointer; }
.kb-form .kb-choice-row.kb-choice-list .kb-choice-copy::before { grid-column:1; grid-row:1 / span 2; width:2.5rem; height:2.5rem; display:grid; place-items:center; align-self:center; border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-canvas); color:var(--color-accent); font-size:1.15rem; font-weight:700; content:""; }
.kb-form .kb-choice-row.kb-choice-list .kb-choice-copy strong { grid-column:2; color:var(--color-text); font-size:var(--font-size-sm); font-weight:600; }
.kb-form .kb-choice-row.kb-choice-list .kb-choice-copy small { grid-column:2; margin-top:.15rem; color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; line-height:1.5; }
.kb-form .kb-choice-row.kb-choice-list input:checked + .kb-choice-copy { border-color:#9ed4d2; background:var(--color-accent-soft); }
.kb-form .kb-choice-row.kb-choice-list input:checked + .kb-choice-copy::before { border-color:var(--color-accent); background:var(--color-accent); color:#fff; content:"✓"; }
.kb-form .kb-choice-row.kb-choice-list input:focus-visible + .kb-choice-copy { outline:0; box-shadow:var(--focus-ring); }
.kb-form .kb-choice-row.kb-choice-list--grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.kb-modal .kb-modal__body.kb-client-activity-workflow { min-height:0; margin:0 var(--kb-modal-body-padding); padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.kb-client-activity-workflow { display:grid; min-height:0; gap:var(--space-4); }
.kb-client-activity-filter { display:block; margin:0; }
.kb-client-activity-filter .kb-filter-bar { box-shadow:var(--shadow-card); }
.kb-client-activity-filter .field { width:min(22rem,100%); }
.kb-filter-bar--inline .kb-filter-bar__controls { justify-content:center; align-items:center; }
.kb-filter-bar--inline .kb-filter-bar__field { width:auto; display:flex; align-items:center; gap:var(--space-3); }
.kb-filter-bar--inline .kb-filter-bar__field > label { position:relative; top:.125rem; margin:0; white-space:nowrap; }
.kb-filter-bar--inline .kb-filter-bar__field > .field__control { width:min(22rem,52vw); flex:1 1 18rem; }
.kb-client-activity-results { min-height:16rem; max-height:min(34rem,calc(100dvh - 24rem)); border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-card); }
.kb-client-activity-results .table-shell { border:0; border-radius:var(--radius-lg); box-shadow:none; }
.kb-client-activity-table th:first-child,.kb-client-activity-table td:first-child { width:9rem; }
.kb-client-activity-table th:last-child,.kb-client-activity-table td:last-child { width:12rem; text-align:right; }
.kb-client-activity-table time span,.kb-client-activity-table time small { display:block; color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; line-height:1.5; }
.kb-client-activity-table td { font-weight:400; }
.kb-client-activity-workflow > .kb-pagination { margin-top:0; }
.kb-modal--stacked-surfaces :is(.kb-client-activity-filter .kb-filter-bar,.kb-client-activity-results,.kb-client-activity-workflow > .kb-pagination,.kb-user-activity__results,.kb-user-activity-workflow > .kb-date-navigator,.kb-user-activity-workflow > .kb-pagination) { box-shadow:none; }
.mini-pill--primary { border:1px solid rgba(63,124,255,.28); background:var(--kb-workspace-contact-soft); color:var(--kb-workspace-contact); }
.contact-reminder { color:var(--color-text-muted); font-size:var(--font-size-sm); font-weight:400; line-height:var(--line-height-normal); }

@media (max-width:42rem) {
    .kb-filter-bar--inline .kb-filter-bar__field { width:100%; display:grid; grid-template-columns:1fr; gap:var(--space-2); }
    .kb-filter-bar--inline .kb-filter-bar__field > .field__control { width:100%; }
    .kb-filter-bar--inline .kb-filter-bar__field > label { top:0; white-space:normal; }
}
.kb-workspace-card-showcase { margin-top:var(--space-5); }
.kb-workspace-card {
    --kb-workspace-accent:var(--kb-workspace-contact,#3f7cff);
    --kb-workspace-soft:var(--kb-workspace-contact-soft,#eaf2ff);
    min-width:0;
    border:1px solid var(--color-border);
    border-top:4px solid var(--kb-workspace-accent);
    border-radius:var(--radius-lg);
    background:var(--color-surface);
    box-shadow:var(--shadow-card);
    overflow:hidden;
}
.kb-workspace-card--communication { --kb-workspace-accent:var(--kb-workspace-communication,#029294); --kb-workspace-soft:var(--kb-workspace-communication-soft,#e5f7f6); }
.kb-workspace-card--follow-up { --kb-workspace-accent:var(--kb-workspace-follow-up,#2f8fbd); --kb-workspace-soft:var(--kb-workspace-follow-up-soft,#e8f6fc); }
.kb-workspace-card--transaction { --kb-workspace-accent:var(--kb-workspace-transaction,#1f9c55); --kb-workspace-soft:var(--kb-workspace-transaction-soft,#e8f8ee); }
.kb-workspace-card--files { --kb-workspace-accent:var(--kb-workspace-files,#c77b12); --kb-workspace-soft:var(--kb-workspace-files-soft,#fff3dc); }
.kb-workspace-card--notes { --kb-workspace-accent:var(--kb-workspace-notes,#7157d9); --kb-workspace-soft:var(--kb-workspace-notes-soft,#f1eaff); }
.kb-workspace-card__header { min-height:4.75rem; display:grid; grid-template-columns:2.75rem minmax(0,1fr) auto; align-items:center; gap:var(--space-3); padding:var(--space-4); border-bottom:1px solid var(--color-border-soft); background:var(--color-surface); }
.kb-workspace-card__icon { width:2.75rem; height:2.75rem; display:grid; place-items:center; border-radius:var(--radius-md); background:var(--kb-workspace-soft); color:var(--kb-workspace-accent); }
.kb-workspace-card__icon svg { width:1.3rem; height:1.3rem; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.kb-workspace-card__heading { min-width:0; display:grid; gap:.2rem; }
.kb-workspace-card__heading > div { display:flex; align-items:center; flex-wrap:wrap; gap:var(--space-2); }
.kb-workspace-card__heading h2 { margin:0; color:var(--color-text); font-size:var(--font-size-md); font-weight:600; line-height:1.3; }
.kb-workspace-card__heading p { margin:0; color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; line-height:1.4; }
.kb-workspace-card__count { min-width:1.75rem; height:1.75rem; display:inline-grid; place-items:center; padding:0 .5rem; border-radius:var(--radius-pill); background:var(--kb-workspace-soft); color:var(--kb-workspace-accent); font-size:var(--font-size-xs); font-weight:500; }
.kb-workspace-card__actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:var(--space-2); }
.kb-workspace-card__body { min-width:0; padding:var(--space-4); }
.kb-workspace-card.files-launcher-panel { margin-bottom:0; }

@media (max-width:70rem) {
    .kb-client-workspace__grid { grid-template-columns:1fr; }
}
@media (max-width:58rem) {
    .kb-client-workspace { gap:var(--space-4); padding:var(--space-4) var(--space-4) 0; }
    .kb-client-workspace > .kb-page-header { padding-inline:var(--space-4); }
    .kb-client-workspace__grid,.kb-client-workspace__column { gap:var(--space-4); }
    .kb-workspace-card__header { grid-template-columns:2.75rem minmax(0,1fr); align-items:start; }
    .kb-workspace-card__actions { grid-column:1 / -1; justify-content:flex-start; }
    .kb-workspace-card__actions .kb-button { flex:1 1 12rem; }
}

/* Canonical non-modal overlay geometries reuse the modal semantics and regions. */
.kb-drawer {
    --kb-modal-width: min(34rem, calc(100vw - 1rem));
    max-height: 100dvh;
    height: 100dvh;
    margin: 0 0 0 auto;
    border-radius: var(--kb-modal-radius) 0 0 var(--kb-modal-radius);
}
.kb-drawer[open] { animation: none; }
.kb-bottom-sheet { --kb-modal-width: min(42rem, calc(100vw - 1rem)); }
.kb-bottom-sheet__actions { display: grid; gap: var(--space-3); }

@media (max-width: 42rem) {
    .kb-drawer { width: calc(100vw - .5rem); }
    .kb-bottom-sheet {
        width: 100%;
        max-height: min(78dvh, 42rem);
        margin: auto 0 0;
        border-radius: var(--kb-modal-radius) var(--kb-modal-radius) 0 0;
    }
    .kb-bottom-sheet .kb-modal__header { align-items: flex-start; }
}

/* Internal component-gallery layout. Production components remain unchanged. */
.kb-gallery { width: min(76rem, calc(100% - 2rem)); margin: 2rem auto 4rem; }
.kb-gallery__intro { margin-bottom: 1.5rem; }
.kb-gallery__intro h1 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
.kb-gallery__intro p { width: 100%; max-width: none; margin: .75rem 0 0; color: var(--color-text-muted); }
.kb-foundations { margin: 1.5rem 0; padding: 1.5rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.kb-foundations__heading { margin-bottom: 1.25rem; }
.kb-foundations__heading h2 { margin: .2rem 0 0; color: var(--color-text); font-size: var(--font-size-xl); line-height: var(--line-height-tight); }
.kb-foundations__heading p { max-width: 52rem; margin: .45rem 0 0; color: var(--color-text-muted); font-size: var(--font-size-sm); }
.kb-foundations__heading--components { margin: 2rem 0 1rem; }
.kb-type-specimen { border: 1px solid var(--color-border-soft); border-radius: var(--radius-md); overflow: hidden; }
.kb-type-specimen__row { display: grid; grid-template-columns: 15rem minmax(0, 1fr); align-items: center; gap: 1.5rem; min-height: 5rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--color-border-soft); }
.kb-type-specimen__row:last-child { border-bottom: 0; }
.kb-type-specimen__meta { display: grid; gap: .2rem; }
.kb-type-specimen__meta code { color: var(--color-text); font: 600 var(--font-size-sm)/1.4 var(--font-family-sans); }
.kb-type-specimen__meta small { color: var(--color-text-muted); font-size: var(--font-size-xs); }
.kb-type-specimen__display { font-size: var(--font-size-2xl); line-height: var(--line-height-tight); letter-spacing: -.035em; }
.kb-type-specimen__modal { font-size: clamp(1.625rem, 2.4vw, 2rem); line-height: 1.15; letter-spacing: -.035em; }
.kb-type-specimen__section { font-size: var(--font-size-xl); line-height: var(--line-height-tight); }
.kb-type-specimen__body { font-size: var(--font-size-md); line-height: var(--line-height-normal); }
.kb-type-specimen__small { color: var(--color-text-muted); font-size: var(--font-size-sm); line-height: var(--line-height-normal); }
.kb-type-specimen__xs { color: var(--color-text-muted); font-size: var(--font-size-xs); font-weight: 600; letter-spacing: .04em; }
.kb-color-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.kb-color-swatch { min-width: 0; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); align-items: center; gap: .75rem; padding: .75rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-md); }
.kb-color-swatch__sample { width: 3.25rem; height: 3.25rem; border: 1px solid rgba(15, 39, 64, .09); border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32); }
.kb-color-swatch__sample--primary { background: var(--color-primary); }
.kb-color-swatch__sample--primary_strong { background: var(--color-primary-strong); }
.kb-color-swatch__sample--accent { background: var(--color-accent); }
.kb-color-swatch__sample--accent_soft { background: var(--color-accent-soft); }
.kb-color-swatch__sample--text { background: var(--color-text); }
.kb-color-swatch__sample--text_muted { background: var(--color-text-muted); }
.kb-color-swatch__sample--border { background: var(--color-border); }
.kb-color-swatch__sample--border_soft { background: var(--color-border-soft); }
.kb-color-swatch__sample--canvas { background: var(--color-canvas); }
.kb-color-swatch__sample--surface { background: var(--color-surface); }
.kb-color-swatch__sample--success { background: var(--color-success); }
.kb-color-swatch__sample--warning { background: var(--color-warning); }
.kb-color-swatch__sample--danger { background: var(--color-danger); }
.kb-color-swatch div { min-width: 0; display: grid; gap: .12rem; }
.kb-color-swatch strong { font-size: var(--font-size-sm); font-weight: 600; }
.kb-color-swatch code,.kb-color-swatch small { overflow: hidden; color: var(--color-text-muted); font-size: .68rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.kb-gallery__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.kb-gallery__card { padding: 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.kb-gallery__card h2 { margin: 0; font-size: var(--font-size-lg); }
.kb-gallery__card p { min-height: 2.8rem; margin: .5rem 0 1rem; color: var(--color-text-muted); font-size: var(--font-size-sm); }
.kb-gallery__trigger { min-height: 2.625rem; padding: 0 1rem; border: 1px solid var(--color-primary); border-radius: var(--radius-pill); background: var(--color-primary); color: #fff; cursor: pointer; font: inherit; font-size: var(--font-size-sm); font-weight: 600; transition: transform var(--transition-fast), box-shadow var(--transition-fast); }
.kb-gallery__trigger:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15, 39, 64, .14); }
.kb-warning-preview { display:grid; gap:var(--space-6); }
.kb-warning-preview__group { display:grid; gap:var(--space-4); }
.kb-warning-preview__heading { display:grid; gap:var(--space-1); }
.kb-warning-preview__heading :is(h3,p) { margin:0; }
.kb-warning-preview__heading h3 { color:var(--color-text); font-size:var(--font-size-lg); }
.kb-warning-preview__heading p { color:var(--color-text-muted); font-size:var(--font-size-sm); line-height:1.55; }
.kb-warning-preview__grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-4); }
.kb-warning-preview__grid > article { min-width:0; display:grid; align-content:start; gap:var(--space-3); padding:var(--space-4); border:1px solid var(--color-border-soft); border-radius:var(--radius-lg); background:#fbfcfd; }
.kb-warning-preview__tier { color:var(--color-text-muted); font-size:var(--font-size-sm); font-weight:600; }
.kb-warning-preview__grid small { color:var(--color-text-muted); font-size:var(--font-size-sm); line-height:1.5; }
.kb-warning-preview .kb-account-health { margin:0; }
.kb-warning-preview__mobile { width:min(20rem,100%); overflow:hidden; padding:var(--space-3); border:.45rem solid #dfe6ec; border-radius:1.4rem; background:var(--color-canvas); }
.kb-warning-preview__mobile .kb-account-health { align-items:stretch; flex-direction:column; margin:0; }
.kb-warning-preview__mobile .kb-account-health .kb-button { width:100%; }

/* Design-contract review surfaces. These force states for visual review only. */
.kb-state-matrix { overflow-x: auto; border: 1px solid var(--color-border-soft); border-radius: var(--radius-lg); }
.kb-state-matrix__head,.kb-state-matrix__row { min-width: 70rem; display: grid; grid-template-columns: 8rem repeat(7,minmax(7.5rem,1fr)); align-items: center; gap: .5rem; padding: .75rem; border-bottom: 1px solid var(--color-border-soft); }
.kb-state-matrix__row:last-child { border-bottom: 0; }
.kb-state-matrix__head { background: #f6f9fb; color: var(--color-text-muted); font-size: var(--font-size-xs); font-weight: 500; }
.kb-state-matrix__row > strong { color: #52677d; font-size: var(--font-size-sm); font-weight: 500; }
.kb-state-matrix__row :is(button,input,.kb-state-loading) { width: 100%; min-width: 0; }
.kb-state-matrix__row input { height: 2.75rem; padding: 0 .75rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); color: #52677d; font: 400 var(--font-size-xs)/1 var(--font-family-sans); }
.kb-button.is-hovered { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(51,92,125,.28); }
.kb-button.is-focused,.kb-state-matrix input.is-focused { outline: 0; border-color: var(--color-accent); box-shadow: var(--focus-ring); }
.kb-button.is-active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(51,92,125,.16); }
.kb-state-matrix input.is-hovered { border-color: #b8c6d3; }
.kb-state-matrix input.is-active { border-color: var(--color-primary); }
.kb-state-matrix :is(input.is-error,.is-error) { border-color: var(--color-danger); background: #fff8f8; }
.kb-state-loading { min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-text-muted); font-size: var(--font-size-xs); }
.kb-spinner { width: 1rem; height: 1rem; flex: 0 0 1rem; border: 2px solid rgba(255,255,255,.42); border-top-color: currentColor; border-radius: 50%; animation: kb-spin .7s linear infinite; }
.kb-state-loading .kb-spinner { border-color: #d8e0e7; border-top-color: var(--color-accent); }
@keyframes kb-spin { to { transform: rotate(360deg); } }

.kb-layer-stack { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.kb-layer-stack li { min-height: 3rem; display: grid; grid-template-columns: 1.25rem minmax(11rem,1fr) minmax(12rem,1fr) 4rem; align-items: center; gap: .75rem; padding: .65rem .875rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-md); background: #f9fbfc; }
.kb-layer-stack li span { width: 1rem; height: 1rem; border: 2px solid var(--color-accent); border-radius: .25rem; background: var(--color-accent-soft); }
.kb-layer-stack li strong { color: #52677d; font-size: var(--font-size-sm); font-weight: 500; }
.kb-layer-stack li code,.kb-layer-stack li em { color: var(--color-text-muted); font: 400 var(--font-size-xs)/1.4 var(--font-family-sans); font-style: normal; }

.kb-icon-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .75rem; }
.kb-icon-grid article { min-width: 0; display: flex; align-items: center; gap: .65rem; padding: .75rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-md); }
.kb-icon-grid span { width: 2.5rem; height: 2.5rem; display: grid; flex: 0 0 2.5rem; place-items: center; border-radius: var(--radius-md); background: var(--color-accent-soft); color: var(--color-accent); }
.kb-icon-grid svg { width: 1.25rem; height: 1.25rem; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kb-icon-grid code { overflow: hidden; color: #52677d; font: 400 var(--font-size-xs)/1.3 var(--font-family-sans); text-overflow: ellipsis; }

.kb-contract-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.kb-contract-card { min-width: 0; display: grid; align-content: start; gap: .75rem; padding: 1rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-lg); background: #fbfcfd; }
.kb-contract-card h3 { margin: 0; color: #52677d; font-size: var(--font-size-md); font-weight: 600; }
.kb-contract-card p,.kb-contract-card li,.kb-contract-card label,.kb-contract-card small { color: var(--color-text-muted); font-size: var(--font-size-xs); font-weight: 400; line-height: 1.55; }
.kb-contract-card ul { display: grid; gap: .35rem; margin: 0; padding-left: 1.15rem; }
.kb-contract-card :is(input,select) { width: 100%; min-height: 2.875rem; padding: 0 .875rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; color: #52677d; font: 400 var(--font-size-sm)/1 var(--font-family-sans); }
.kb-contract-card input.is-error { border-color: var(--color-danger); background: #fff8f8; }
.kb-skeleton { display: grid; gap: .5rem; }
.kb-skeleton i { height: .75rem; display: block; border-radius: var(--radius-pill); background: linear-gradient(90deg,#e8edf2,#f5f7f9,#e8edf2); background-size: 200% 100%; animation: kb-skeleton 1.4s linear infinite; }
.kb-skeleton i:nth-child(2) { width: 78%; }.kb-skeleton i:nth-child(3) { width: 56%; }
@keyframes kb-skeleton { to { background-position: -200% 0; } }
.kb-popover { position: relative; }
.kb-popover summary { width: max-content; min-height: 2.75rem; display: inline-flex; align-items: center; padding: 0 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; color: #52677d; font-size: var(--font-size-sm); cursor: pointer; list-style: none; }
.kb-popover summary::-webkit-details-marker { display: none; }
.kb-popover[open] summary { border-color: var(--color-accent); box-shadow: var(--focus-ring); }
.kb-popover > div { position: absolute; z-index: var(--layer-popover); top: calc(100% + .5rem); left: 0; width: 13rem; display: grid; padding: .35rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-card); }
.kb-popover > div button { min-height: 2.5rem; padding: 0 .75rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: #52677d; font: 400 var(--font-size-sm)/1 var(--font-family-sans); text-align: left; cursor: pointer; }
.kb-popover > div button:hover,.kb-popover > div button:focus-visible { background: var(--color-accent-soft); color: var(--color-accent); outline: 0; }
.kb-popover > div button.is-danger { color: var(--color-danger); }
.kb-selection-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.kb-selection-grid > article { min-width: 0; display: grid; align-content: start; gap: .55rem; padding: 1rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-lg); background: #fbfcfd; }
.kb-selection-grid h3 { margin: 0; color: #52677d; font-size: var(--font-size-md); font-weight: 600; }
.kb-selection-grid :is(label,small) { color: var(--color-text-muted); font-size: var(--font-size-xs); font-weight: 400; line-height: 1.5; }
.kb-selection-grid select,.kb-combobox > input { width: 100%; min-width: 0; min-height: 3rem; padding: 0 .875rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; color: #52677d; font: 400 var(--font-size-sm)/1 var(--font-family-sans); }
.kb-selection-grid :is(select,.kb-combobox > input):focus { border-color: var(--color-accent); outline: 0; box-shadow: var(--focus-ring); }
.kb-combobox { position: relative; min-width: 0; }
.kb-combobox [role="listbox"] { position: absolute; z-index: var(--layer-popover); top: calc(100% + .4rem); right: 0; left: 0; max-height: 13rem; padding: .35rem; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-card); }
.kb-combobox-field[data-kb-combobox-overlay="fixed"] .kb-combobox [role="listbox"] { position:fixed; top:var(--kb-combobox-overlay-top,auto); right:auto; bottom:var(--kb-combobox-overlay-bottom,auto); left:var(--kb-combobox-overlay-left,0); width:var(--kb-combobox-overlay-width,auto); max-height:var(--kb-combobox-overlay-height,13rem); }
.kb-combobox [role="option"] { width: 100%; min-height: 2.75rem; display: grid; gap: .12rem; padding: .55rem .75rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: #52677d; font: 400 var(--font-size-sm)/1.35 var(--font-family-sans); text-align: left; cursor: pointer; }
.kb-combobox [role="option"]:is(:hover,:focus-visible),.kb-combobox [role="option"].is-active { background: var(--color-accent-soft); color: var(--color-accent); outline: 0; }
.kb-combobox [role="option"] strong { font-weight: 500; }.kb-combobox [role="option"] small { color: var(--color-text-muted); }
.kb-combobox [data-kb-combobox-empty] { margin: 0; padding: .75rem; color: var(--color-text-muted); font-size: var(--font-size-xs); text-align: center; }
.kb-multi-select summary { width: 100%; justify-content: space-between; }
.kb-multi-select > div { width: min(20rem,calc(100vw - 4rem)); max-height: 13rem; gap: .15rem; overflow-y: auto; }
.kb-multi-select > div label { min-height: 2.5rem; display: flex; align-items: center; gap: .6rem; padding: .45rem .65rem; border-radius: var(--radius-sm); cursor: pointer; }
.kb-multi-select > div label:hover { background: var(--color-accent-soft); color: var(--color-accent); }
.kb-multi-select input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--color-accent); }
.kb-context-target { min-height: 5rem; display: grid; place-items: center; padding: 1rem; border: 1px dashed #b9c7d4; border-radius: var(--radius-md); background: #f6f9fb; color: var(--color-text-muted); font-size: var(--font-size-xs); text-align: center; cursor: context-menu; }
.kb-context-target:focus-visible { border-color: var(--color-accent); outline: 0; box-shadow: var(--focus-ring); }
.kb-context-menu { position: fixed; z-index: var(--layer-popover); width: 13rem; display: grid; padding: .35rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-card); }
.kb-context-menu button { min-height: 2.5rem; padding: 0 .75rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: #52677d; font: 400 var(--font-size-sm)/1 var(--font-family-sans); text-align: left; cursor: pointer; }
.kb-context-menu button:is(:hover,:focus-visible) { background: var(--color-accent-soft); color: var(--color-accent); outline: 0; }
.kb-format-list { display: grid; gap: .35rem; margin: 0; }
.kb-format-list div { display: grid; grid-template-columns: 6rem minmax(0,1fr); gap: .75rem; padding-bottom: .35rem; border-bottom: 1px solid var(--color-border-soft); }
.kb-format-list dt,.kb-format-list dd { margin: 0; color: var(--color-text-muted); font-size: var(--font-size-xs); }.kb-format-list dt { font-weight: 500; }.kb-format-list dd { text-align: right; }
.kb-stress-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.kb-stress-grid article { min-width: 0; display: grid; gap: .45rem; padding: 1rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-lg); }
.kb-stress-grid strong,.kb-stress-grid span,.kb-stress-grid small { overflow-wrap: anywhere; }.kb-stress-grid strong { color: #52677d; font-size: var(--font-size-sm); font-weight: 500; }.kb-stress-grid span,.kb-stress-grid small { color: var(--color-text-muted); font-size: var(--font-size-xs); }
.kb-stress-card--zoom { font-size: 200%; }
.kb-stress-card--zoom :is(strong,span) { font-size: .75em; }
.kb-stress-card--zoom .kb-button { width: max-content; max-width: 100%; white-space: normal; }
.kb-stress-navigation { display: flex; align-items: center; gap: .4rem; padding-bottom: .35rem; overflow-x: auto; }
.kb-stress-navigation a { flex: 0 0 auto; padding: .5rem .7rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); color: #52677d; font-size: var(--font-size-xs); text-decoration: none; }
.kb-stress-navigation a:hover { border-color: #9ed4d2; background: var(--color-accent-soft); color: var(--color-accent); }
.kb-stress-mobile { grid-column: 1 / -1; }
.kb-mobile-frame { width: min(20rem,100%); padding: .5rem; border: .45rem solid #dfe6ec; border-radius: 1.4rem; background: var(--color-canvas); }
.kb-mobile-frame .files-row { grid-template-columns: 2.75rem minmax(0,1fr); gap: .65rem; padding: .75rem; }
.kb-mobile-frame .files-row-actions { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
.kb-mobile-frame .files-row-actions time { display: none; }
.kb-status-announcement { padding: .7rem .8rem; border: 1px solid #9ed4d2; border-radius: var(--radius-md); background: var(--color-accent-soft); color: #356f70; font-size: var(--font-size-xs); }

@media (max-width: 58rem) {
    .kb-icon-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .kb-contract-grid,.kb-stress-grid,.kb-selection-grid,.kb-warning-preview__grid { grid-template-columns: 1fr; }
}
@media (max-width: 36rem) {
    .kb-icon-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .kb-layer-stack li { grid-template-columns: 1.25rem minmax(0,1fr) 3rem; }
    .kb-layer-stack li code { grid-column: 2 / 4; }
}
@media (prefers-reduced-motion: reduce) {
    .kb-spinner,.kb-skeleton i { animation: none; }
}

.kb-shell-gallery{display:grid;gap:var(--space-6)}
.kb-shell-gallery>article{min-width:0}
.kb-shell-gallery>article>h3{margin:0 0 var(--space-3);color:var(--color-text);font-size:var(--font-size-md);font-weight:600}
.kb-shell-preview{min-width:0;overflow:hidden;border:1px solid var(--color-border);border-radius:var(--radius-lg);background:var(--color-canvas);box-shadow:var(--shadow-card)}
.kb-shell-preview--mobile{width:min(100%,26rem);margin-inline:auto}
.kb-shell-preview .dashboard-hero{margin:0}
.kb-shell-preview__content{min-height:7rem;display:grid;align-content:center;gap:var(--space-2);padding:var(--space-6);color:var(--color-text-muted);background:var(--color-canvas)}
.kb-shell-preview__content strong{color:var(--color-text);font-weight:600}
.kb-shell-preview__content span{font-size:var(--font-size-sm)}
.kb-shell-preview__footer{margin:0;padding:var(--space-4)}
.kb-component-section { margin-top: 1rem; padding: 1.5rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.kb-button-showcase { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.kb-button { min-height: 2.875rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; margin: 0; padding: 0 1.25rem; border: 1px solid transparent; border-radius: var(--radius-pill); font: 600 var(--font-size-sm)/1 var(--font-family-sans); text-decoration: none; cursor: pointer; }
.kb-button__icon { width: 1rem; height: 1rem; display: inline-grid; place-items: center; flex: 0 0 1rem; line-height: 0; }
.kb-button__icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kb-button__label { display: inline-block; }
.kb-button:not(:disabled):hover { transform: translateY(-1px); }
.kb-button:focus-visible,.kb-icon-action:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.kb-button:disabled { opacity: .48; cursor: not-allowed; }
.kb-button--primary { border-color: var(--color-primary); background: linear-gradient(135deg, var(--color-primary), #3f6e94); color: #fff; box-shadow: 0 10px 22px rgba(51, 92, 125, .2); }
.kb-button--primary:not(:disabled):hover { box-shadow: 0 14px 28px rgba(51, 92, 125, .28); }
.kb-button--secondary { border-color: var(--color-border); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); }
.kb-button--secondary:not(:disabled):hover,.kb-button--ghost:not(:disabled):hover { border-color: rgba(2, 146, 148, .3); background: #f3fbfa; }
.kb-button--danger { border-color: #d93939; background: linear-gradient(135deg, #ef4b4b, #d93939); color: #fff; box-shadow: 0 10px 22px rgba(239, 75, 75, .2); }
.kb-button--danger:not(:disabled):hover { box-shadow: 0 14px 28px rgba(239, 75, 75, .28); }
.kb-button--ghost { border-color: transparent; background: transparent; color: var(--color-primary); }
.kb-button--small { min-height: 2.25rem; padding-inline: .875rem; font-size: var(--font-size-xs); }
.kb-icon-action { width: 2.875rem; height: 2.875rem; display: grid; place-items: center; padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text-muted); cursor: pointer; }
.kb-icon-action:hover { border-color: rgba(2, 146, 148, .3); background: var(--color-accent-soft); color: var(--color-accent); box-shadow: var(--shadow-sm); }
.kb-icon-action svg { width: 1.125rem; height: 1.125rem; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kb-icon-action--danger { color: var(--color-danger); }
.kb-button--communication { border-color: #91d8c6; background: #e4f8f1; color: #087a64; box-shadow: 0 8px 18px rgba(8,122,100,.08); }
.kb-button--communication svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kb-button--communication:not(:disabled):hover { border-color: #64c5ad; background: #d8f3ea; color:var(--color-text); box-shadow: 0 11px 22px rgba(8,122,100,.13); }
.kb-control-showcase { gap: 1rem; }
.kb-control-showcase input:disabled,.kb-control-showcase select:disabled,.kb-control-showcase textarea:disabled { border-color: #d8e0e7; background: #edf1f4; color: #8a98a7; cursor: not-allowed; opacity: 1; }
.kb-form .field { min-width: 0; }
.kb-form .field label { display: block; margin: 0 0 var(--space-2); color: var(--color-text); font-size: var(--font-size-sm); font-weight: 600; line-height: 1.45; }
.kb-form .field__required { color: var(--color-danger); }
.kb-form .field__control { width: 100%; min-height: var(--control-height); padding: 0 var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); font: 400 var(--font-size-md)/1.4 var(--font-family-sans); outline: 0; }
.kb-form .kb-password-field .field__control-shell { position:relative; }
.kb-form .kb-password-field .field__control-shell > .field__control { padding-right:5.5rem; }
.kb-form .kb-password-field .field__control-end { position:absolute; top:50%; right:.45rem; display:grid; place-items:center; transform:translateY(-50%); }
.kb-password-toggle { min-height:2.25rem; display:inline-flex; align-items:center; gap:.35rem; padding:0 .6rem; border:1px solid transparent; border-radius:var(--radius-sm); background:transparent; color:var(--color-primary); font:600 var(--font-size-xs)/1 var(--font-family-sans); cursor:pointer; }
.kb-password-toggle:hover { background:var(--color-accent-soft); }
.kb-password-toggle:focus-visible { outline:0; box-shadow:var(--focus-ring); }
.kb-password-toggle svg { width:1rem; height:1rem; stroke:currentColor; stroke-width:2; }
.kb-form textarea.field__control { min-height: 8rem; padding-block: var(--space-3); line-height: var(--line-height-normal); resize: vertical; }
.kb-form .field__control:is(:hover,:focus) { border-color: var(--color-accent); }
.kb-form .field__control:focus { box-shadow: var(--focus-ring); }
.date-picker { position:relative; }
.date-picker__trigger { position:absolute; top:50%; left:.875rem; width:1.25rem; height:1.25rem; display:grid; place-items:center; padding:0; border:0; background:transparent; color:#9aa8b7; transform:translateY(-50%); cursor:pointer; }
.date-picker__trigger svg { width:1.25rem; height:1.25rem; stroke:currentColor; stroke-width:2; }
.date-picker:focus-within .date-picker__trigger,.date-picker__trigger:hover { color:var(--color-accent); }
.date-picker__popover { position:absolute; top:calc(100% + .5rem); left:0; z-index:80; width:min(21.5rem,calc(100vw - 5rem)); padding:.875rem; border:1px solid #dce4ed; border-radius:.875rem; background:var(--color-surface); box-shadow:0 16px 34px rgba(15,39,64,.14); }
.overlay-date-picker .date-picker__popover { z-index:2147483647; }
.date-picker__header { display:grid; grid-template-columns:2.5rem minmax(0,1fr) 2.5rem; align-items:center; gap:.5rem; margin-bottom:.75rem; }
.date-picker__selectors { min-width:0; display:grid; grid-template-columns:minmax(0,1fr) 6.5rem; gap:.5rem; }
.date-picker__navigate { width:2.5rem; height:2.5rem; display:grid; place-items:center; padding:0; border:1px solid var(--color-border); border-radius:.6875rem; background:var(--color-surface); color:var(--color-text-muted); font:600 1.4rem/1 var(--font-family-sans); cursor:pointer; }
.date-picker__navigate:hover { border-color:color-mix(in srgb,var(--color-accent) 42%,var(--color-border)); background:var(--color-accent-soft); color:var(--color-accent); }
.date-picker__navigate:focus-visible { outline:0; box-shadow:var(--focus-ring); }
.date-picker__navigate:disabled { opacity:.42; cursor:default; }
.date-picker__header select { width:100%; min-height:2.5rem!important; padding:0 2rem 0 .75rem!important; border:1px solid #d8e2ec!important; border-radius:.6875rem!important; background-color:var(--color-surface)!important; color:var(--color-text-muted)!important; font-size:.8125rem!important; font-weight:400!important; box-shadow:none!important; }
.date-picker__header select:focus { border-color:#9ebfc0!important; box-shadow:0 0 0 3px rgba(2,146,148,.08)!important; }
.date-picker__weekdays,.date-picker__days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:.25rem; }
.date-picker__weekdays span { display:grid; place-items:center; height:1.75rem; color:#8a98aa; font-size:.6875rem; font-weight:600; }
.date-picker__day { width:100%; aspect-ratio:1; display:grid; place-items:center; padding:0; border:0; border-radius:.625rem; background:transparent; color:var(--color-text-muted); font:400 .75rem/1 var(--font-family-sans); cursor:pointer; transition:background .14s ease,color .14s ease,transform .14s ease; }
.date-picker__day:hover { background:var(--color-accent-soft); color:var(--color-accent); transform:translateY(-1px); }
.date-picker__day.is-selected { background:var(--color-accent); color:#fff; font-weight:500; }
.date-picker__day.is-today:not(.is-selected) { box-shadow:inset 0 0 0 1px var(--color-accent); color:var(--color-accent); }
.date-picker__blank { aspect-ratio:1; }
.kb-form .date-picker > input[data-date-display] { padding-left:2.875rem; padding-right:3rem; cursor:pointer; }
.kb-form .date-picker > .date-picker__clear { position:absolute; top:50%; right:.55rem; left:auto; width:2rem; height:2rem; min-height:0; display:grid; place-items:center; padding:0; border:1px solid var(--color-border); border-radius:var(--radius-sm); background:var(--color-surface); color:var(--color-text-muted); box-shadow:none; transform:translateY(-50%); }
.kb-form .date-picker > .date-picker__clear:hover { border-color:var(--color-accent); background:var(--color-accent-soft); color:var(--color-accent); transform:translateY(-50%); }
.kb-form .date-picker > .date-picker__clear[hidden] { display:none; }
.kb-form .field__control:disabled { border-color: var(--color-border); background: var(--color-disabled-surface); color: var(--color-disabled-text); cursor: not-allowed; opacity: 1; }
.kb-form .field__message { min-height: 0; margin-top: var(--space-1); color: var(--color-text-muted); font-size: var(--font-size-xs); font-weight: 400; line-height: 1.5; }
.kb-tts-preview { display:flex; align-items:center; flex-wrap:wrap; gap:var(--space-2) var(--space-3); margin-top:var(--space-2); }
.kb-tts-preview__button[aria-pressed="true"] { border-color:rgba(2,146,148,.35); background:var(--color-accent-soft); color:var(--color-accent); }
.kb-tts-preview__button svg { width:1rem; height:1rem; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.kb-tts-preview__status { min-width:0; color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; line-height:1.5; }
.kb-form .field--error .field__control { border-color: var(--color-danger); }
.kb-form .field--error .field__message { color: var(--color-danger); }
.kb-section-instruction { grid-column: 1 / -1; display: grid; gap: .125rem; padding: .65rem .9rem; border: 1px solid #d8e0e6; border-radius: var(--radius-sm); background: #f1f3f5; color: #3f5061; box-shadow: none; }
.kb-section-instruction h3 { margin: 0; color: var(--color-text); font-size: var(--font-size-sm); font-weight: 600; line-height: 1.35; }
.kb-section-instruction p { margin: 0; color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: 400; line-height: 1.4; }
.kb-section-instruction--heading-only { padding-block:.75rem; }
.kb-section-instruction--disclosure { width:100%; grid-template-columns:minmax(0,1fr) auto; align-items:center; text-align:left; cursor:pointer; list-style:none; }
.kb-section-instruction--disclosure::-webkit-details-marker { display:none; }
.kb-section-instruction__copy { min-width:0; display:grid; gap:.125rem; }
.kb-section-instruction__copy strong { color:var(--color-text); font-size:var(--font-size-sm); font-weight:600; line-height:1.35; }
.kb-section-instruction__copy small { color:var(--color-text-muted); font-size:var(--font-size-sm); font-weight:400; line-height:1.4; }
.kb-section-instruction__chevron { width:1.25rem; height:1.25rem; display:grid; place-items:center; color:var(--color-text); transition:transform .15s ease; }
.kb-section-instruction__chevron svg { width:1rem; height:1rem; stroke:currentColor; }
details[open] > .kb-section-instruction--disclosure .kb-section-instruction__chevron { transform:rotate(180deg); }
.kb-section-instruction--disclosure:focus-visible { outline:0; box-shadow:var(--focus-ring); }

/* Canonical public-product shell header used by legal pages and customer portals. */
.kb-public-header { position:relative; z-index:100; width:100%; min-height:6rem; box-sizing:border-box; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:var(--space-6); padding:.5rem 4.375rem; border-bottom:1px solid rgba(219,227,234,.8); background:rgba(255,255,255,.94); }
.kb-public-header--no-actions { grid-template-columns:auto minmax(0,1fr); }
.kb-public-header__brand { min-width:0; display:inline-flex; align-items:center; gap:var(--space-3); color:var(--color-text); text-decoration:none; }
.kb-public-header__brand img { width:auto; height:2.25rem; display:block; }
.kb-public-header__brand span { padding-left:var(--space-3); border-left:1px solid var(--color-border); color:var(--color-text-muted); font-size:var(--font-size-sm); font-weight:600; }
.kb-public-header__nav { min-width:0; display:flex; align-items:center; gap:var(--space-2); }
.kb-public-header--nav-start .kb-public-header__nav { justify-content:flex-start; }
.kb-public-header--nav-center .kb-public-header__nav { justify-content:center; }
.kb-public-header--nav-end .kb-public-header__nav { justify-content:flex-end; }
.kb-public-header__nav a,.kb-public-header__nav span { min-height:2.5rem; display:inline-flex; align-items:center; justify-content:center; padding:.55rem .75rem; border-radius:var(--radius-md); color:var(--color-text-muted); font-size:var(--font-size-sm); font-weight:600; text-decoration:none; white-space:nowrap; }
.kb-public-header__nav a,.kb-public-header__nav > span { gap:var(--space-2); }
.kb-public-header__nav .kb-public-header__nav-icon { min-height:0; padding:0; border-radius:0; color:currentColor; }
.kb-public-header__nav-icon svg { width:1rem; height:1rem; display:block; stroke:currentColor; stroke-width:2; }
.kb-public-header__nav .kb-public-header__nav-label { min-height:0; padding:0; border-radius:0; color:inherit; font:inherit; }
.kb-public-header__nav a:hover,.kb-public-header__nav a[aria-current="page"] { background:var(--color-accent-soft); color:var(--color-accent); }
.kb-public-header__nav span[aria-disabled="true"] { opacity:.55; }
.kb-public-header__nav .kb-public-header__primary { margin-left:var(--space-2); padding-inline:1rem; background:var(--color-primary-strong); color:#fff; }
.kb-public-header__nav .kb-public-header__primary:hover { background:var(--color-primary); color:#fff; }
.kb-public-header__nav .kb-public-header__outlined { border:1px solid #c7d0da; background:#fff; color:#52677d; box-shadow:none; }
.kb-public-header__nav .kb-public-header__outlined:hover { border-color:#aebac6; background:#f7f9fb; color:#34495e; }
.kb-public-header__actions { min-width:0; display:flex; align-items:center; justify-content:flex-end; gap:var(--space-4); }
.kb-public-header--account-dropdown .kb-public-header__actions { position:relative; overflow:visible; }
.kb-public-header .kb-account-menu { margin:0; padding:0; border:0; }
.kb-public-header .kb-account-menu::after { content:""; position:absolute; top:100%; right:0; width:100%; height:.35rem; }
.kb-public-header .kb-account-menu > summary { width:auto; min-width:3rem; min-height:var(--header-control-height); display:inline-flex; align-items:center; justify-content:center; gap:var(--space-2); padding:0 .625rem; border:1px solid #c7d0da; border-radius:var(--header-control-radius); background:#fff; color:#52677d; box-shadow:none; }
.kb-public-header .kb-account-menu > summary:hover { border-color:#aebac6; background:#f7f9fb; color:#34495e; box-shadow:none; }
.kb-public-header .kb-account-menu[open] > summary { border-color:#c7d0da; background:#fff; color:#52677d; box-shadow:none; }
.kb-public-header .kb-account-menu > summary:focus:not(:focus-visible) { outline:0; box-shadow:none; }
.kb-public-header .kb-account-menu > summary:focus-visible { outline:3px solid color-mix(in srgb,var(--color-accent) 32%,transparent); outline-offset:2px; box-shadow:none; }
.kb-public-header .kb-account-menu__trigger > svg { width:14px; height:14px; stroke:currentColor; stroke-width:2; }
.kb-public-header .kb-account-menu__chevron { display:inline-flex; align-items:center; }
.kb-public-header .kb-account-menu__chevron svg { width:12px; height:12px; stroke:currentColor; stroke-width:2; }
.kb-public-header .kb-account-menu__panel { z-index:60; top:calc(100% + .35rem); right:0; left:auto; width:min(16rem,calc(100vw - 2rem)); display:grid; gap:var(--space-3); padding:var(--space-3); border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); color:var(--color-text); box-shadow:var(--shadow-dialog); }
.kb-public-header .kb-account-menu__identity { min-width:0; display:grid; gap:var(--space-1); padding:var(--space-2); border-bottom:1px solid var(--color-border-soft); }
.kb-public-header .kb-account-menu__identity strong { color:var(--color-text); font-size:var(--font-size-sm); font-weight:600; }
.kb-public-header .kb-account-menu__identity span { color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; }
.kb-public-header .kb-account-menu__links { display:grid; gap:var(--space-1); padding-bottom:var(--space-2); border-bottom:1px solid var(--color-border-soft); }
.kb-public-header .kb-account-menu__links a { min-height:2.5rem; display:flex; align-items:center; gap:var(--space-2); padding:0 var(--space-3); border-radius:var(--radius-md); color:var(--color-text); font-size:var(--font-size-sm); font-weight:500; text-decoration:none; }
.kb-public-header .kb-account-menu__links a:hover { background:var(--color-accent-soft); color:var(--color-primary); }
.kb-public-header .kb-account-menu__links a:focus-visible { outline:0; box-shadow:var(--focus-ring); }
.kb-public-header .kb-account-menu__links svg { width:1rem; height:1rem; flex:0 0 1rem; stroke:currentColor; }
.kb-public-header .kb-account-menu__panel form { margin:0; }
.kb-public-header .kb-account-menu__panel .sign-out { width:100%; min-height:2.5rem; display:flex; align-items:center; justify-content:flex-start; gap:var(--space-2); padding:0 var(--space-3); border:1px solid transparent; border-radius:var(--radius-md); background:#3e8bd6; color:#fff; font:600 var(--font-size-sm)/1 var(--font-family-sans); cursor:pointer; box-shadow:none; }
.kb-public-header .kb-account-menu__panel .sign-out:hover,.kb-public-header .kb-account-menu__panel .sign-out:focus-visible { outline:0; background:#2f79c4; color:#fff; box-shadow:none; }
.kb-public-header .kb-account-menu__panel .sign-out svg { width:1rem; height:1rem; stroke:currentColor; }
.kb-public-header__mobile { display:none; }
.kb-public-header-preview { overflow:hidden; border:1px solid var(--color-border); border-radius:var(--radius-lg); }
.kb-public-header-preview .kb-public-header { position:static; }
@media (max-width:73.75rem) {
    .kb-public-header { padding-inline:2.375rem; }
}
@media (max-width:58rem) {
    .kb-public-header { min-height:0; grid-template-columns:minmax(0,1fr) minmax(8rem,auto); align-items:start; gap:var(--space-3); padding:1.125rem 1.375rem 1.375rem; }
    .kb-public-header__brand img { height:2rem; }
    .kb-public-header__nav { grid-column:1 / -1; grid-row:2; justify-content:flex-start!important; overflow-x:auto; padding-bottom:.25rem; }
    .kb-public-header--wrap-navigation .kb-public-header__nav { flex-wrap:wrap; overflow-x:visible; }
    .kb-public-header__nav a,.kb-public-header__nav span { min-height:2.75rem; }
    .kb-public-header__nav .kb-public-header__primary { margin-left:0; }
    .kb-public-header--mobile-dropdowns { position:relative; grid-template-columns:minmax(0,1fr) minmax(8rem,auto); }
    .kb-public-header--mobile-dropdowns > .kb-public-header__nav,.kb-public-header--mobile-dropdowns > .kb-public-header__actions { display:none; }
    .kb-public-header--mobile-dropdowns .kb-public-header__mobile { display:contents; }
    .kb-public-header__mobile-menu { min-width:0; position:relative; }
    .kb-public-header__mobile-menu--account { z-index:2; grid-column:2; grid-row:1; justify-self:end; width:min(100%,18rem); }
    .kb-public-header__mobile-menu--navigation { z-index:1; grid-column:1 / -1; grid-row:2; width:100%; }
    .kb-public-header__mobile-menu > summary { min-height:3.25rem; display:flex; align-items:center; justify-content:space-between; gap:.875rem; padding:0 1.125rem; border:1px solid var(--color-border); border-radius:1rem; background:var(--color-surface); color:var(--color-text); font-size:.875rem; font-weight:600; line-height:1.2; cursor:pointer; list-style:none; box-shadow:var(--shadow-sm); }
    .kb-public-header__mobile-menu > summary::-webkit-details-marker { display:none; }
    .kb-public-header__mobile-menu > summary span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .kb-public-header__mobile-menu-label { display:flex; align-items:center; gap:.625rem; }
    .kb-public-header__mobile-menu-icon { display:inline-flex; flex:0 0 1.375rem; overflow:visible!important; }
    .kb-public-header__mobile-menu-icon svg { width:1.375rem; height:1.375rem; display:block; stroke:currentColor; stroke-width:2; }
    .kb-public-header__mobile-chevron { width:.55rem; height:.55rem; flex:0 0 .55rem; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:translateY(-.15rem) rotate(45deg); transition:transform .15s ease; }
    .kb-public-header__mobile-menu[open] > summary { border-color:var(--color-border); box-shadow:none; }
    .kb-public-header__mobile-menu[open] > summary .kb-public-header__mobile-chevron { transform:translateY(.15rem) rotate(225deg); }
    .kb-public-header__mobile-menu > summary:focus-visible { outline:0; box-shadow:var(--focus-ring); }
    .kb-public-header__mobile-menu > summary:focus:not(:focus-visible) { outline:0; box-shadow:var(--shadow-sm); }
    .kb-public-header__mobile-panel { position:absolute; z-index:50; top:calc(100% + .25rem); margin:0; padding:var(--space-2); border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface); box-shadow:var(--shadow-card); }
    .kb-public-header__mobile-menu--account > .kb-public-header__mobile-panel { right:0; width:min(18rem,calc(100vw - 2rem)); }
    .kb-public-header__mobile-menu--navigation > .kb-public-header__mobile-panel { right:0; left:0; }
    .kb-public-header__mobile-navigation { display:grid; gap:var(--space-1); }
    .kb-public-header__mobile-navigation a,.kb-public-header__mobile-navigation > span { min-height:2.875rem; display:flex; align-items:center; gap:.625rem; padding:0 .75rem; border-radius:.75rem; color:var(--color-text-muted); font-size:.875rem; font-weight:600; text-decoration:none; }
    .kb-public-header__mobile-navigation .kb-public-header__nav-icon { flex:0 0 1.25rem; }
    .kb-public-header__mobile-navigation .kb-public-header__nav-icon svg { width:1.25rem; height:1.25rem; }
    .kb-public-header__mobile-navigation a:hover,.kb-public-header__mobile-navigation a:focus-visible,.kb-public-header__mobile-navigation a[aria-current="page"] { background:var(--color-accent-soft); color:var(--color-accent); }
    .kb-public-header__mobile-navigation > span[aria-disabled="true"] { opacity:.55; }
    .kb-public-header__mobile-actions-panel > div { display:grid; align-items:stretch; justify-content:stretch; gap:var(--space-1); }
    .kb-public-header__mobile-actions-panel > div > span { max-width:none; padding:.45rem .75rem; overflow:hidden; color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
    .kb-public-header__mobile-actions-panel form { width:100%; margin:0; }
    .kb-public-header__mobile-actions-panel .kb-button { width:100%; justify-content:flex-start; }
    .kb-public-account-actions,.kb-public-account-actions nav { display:grid; gap:var(--space-1); }
    .kb-public-account-actions__identity { padding:.45rem .75rem; overflow:hidden; color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
    .kb-public-account-actions nav a,.kb-public-account-actions form button { width:100%; min-height:2.75rem; display:flex; align-items:center; gap:var(--space-2); padding:.55rem .75rem; border:0; border-radius:var(--radius-sm); background:transparent; color:var(--color-text-muted); font:600 var(--font-size-sm)/1.2 var(--font-family-sans); text-align:left; text-decoration:none; cursor:pointer; }
    .kb-public-account-actions nav a:hover,.kb-public-account-actions nav a:focus-visible,.kb-public-account-actions form button:hover,.kb-public-account-actions form button:focus-visible { outline:0; background:var(--color-accent-soft); color:var(--color-accent); }
    .kb-public-account-actions svg { width:1rem; height:1rem; flex:0 0 1rem; stroke:currentColor; }
    .kb-public-header--account-dropdown > .kb-public-header__actions { display:flex; grid-column:2; grid-row:1; align-self:start; justify-self:end; }
}
@media (max-width:40rem) {
    .kb-public-header--mobile-dropdowns { grid-template-columns:minmax(0,1fr) minmax(7rem,42%); }
    .kb-public-header--mobile-dropdowns .kb-public-header__brand { gap:0; }
    .kb-public-header--mobile-dropdowns .kb-public-header__brand img { max-width:100%; height:1.75rem; object-fit:contain; object-position:left center; }
    .kb-public-header--mobile-dropdowns .kb-public-header__brand span { display:none; }
    .kb-public-header__mobile-menu--account > .kb-public-header__mobile-panel { right:0; width:min(18rem,calc(100vw - (2 * var(--space-3)))); }
    .kb-public-header__mobile-menu--navigation > .kb-public-header__mobile-panel { right:0; left:0; }
}
@media (max-width:35rem) {
    .kb-public-header { padding-inline:1rem; }
}
.kb-form .form-section-block { display:grid; gap:var(--space-4); padding-bottom:0; }
.kb-form .form-section-block + .form-section-block { margin-top:0; padding-top:var(--space-5); border-top:1px solid var(--color-border-soft); }
.kb-client-form .form-section-block + .form-section-block { border-top:0; }
.kb-admin-settings-form,.kb-admin-phone-form { align-content:start; gap:var(--space-4); }
.kb-admin-settings-form > .kb-button,.kb-admin-phone-form > .kb-button { width:max-content; justify-self:start; }
.kb-admin-settings-form .form-grid { align-items:start; gap:var(--space-5); }
.kb-admin-phone-form .admin-phone-tabs { margin:0; padding:0; border:0; background:transparent; }
.kb-admin-phone-form .admin-phone-panel { gap:var(--space-4); }
.kb-admin-phone-form .field > :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),select,textarea) { width:100%; min-height:var(--control-height); padding:0 var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface); color:var(--color-text); font:400 var(--font-size-md)/1.4 var(--font-family-sans); outline:0; }
.kb-admin-phone-form .field > textarea.field__control { min-height:8rem; display:block; box-sizing:border-box; padding:var(--space-3) var(--space-4); line-height:var(--line-height-normal); resize:vertical; }
.kb-modal .kb-admin-phone-form .field > textarea.field__control.kb-phone-fallback {
    display: block;
    box-sizing: border-box;
    padding-block: .875rem !important;
    padding-inline: var(--space-4) !important;
    line-height: var(--line-height-normal);
}
.kb-modal .kb-admin-phone-form .admin-blacklist-add {
    inline-size: 100%;
    justify-self: stretch;
}
.kb-modal .kb-admin-phone-form .admin-blacklist-add > .field {
    grid-column: 1 / -1;
    inline-size: 100%;
}
.kb-modal .kb-admin-phone-form .admin-blacklist-add__action {
    inline-size: 100%;
    display: grid;
    place-items: center;
    justify-self: stretch;
}
.kb-modal .kb-admin-phone-form .admin-blacklist-add__action > .kb-button {
    inline-size: max-content;
    justify-self: center;
    margin-inline: auto;
}
.kb-admin-phone-form .field > :is(input:not([type="hidden"]),select,textarea):is(:hover,:focus) { border-color:var(--color-accent); }
.kb-admin-phone-form .field > :is(input:not([type="hidden"]),select,textarea):focus { box-shadow:var(--focus-ring); }
.kb-admin-phone-form .field > small { display:block; margin-top:var(--space-1); color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; line-height:1.5; }
.kb-admin-phone-form .kb-recorder-sample { width:100%; min-width:0; }
.kb-setting-toggle { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 4.3rem; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; }
.kb-setting-toggle:hover { border-color: var(--color-border); background: #f8fbff; }
.kb-setting-toggle strong,.kb-setting-toggle small { display: block; }
.kb-setting-toggle strong { color: var(--color-text); font-size: var(--font-size-sm); font-weight: 600; line-height: 1.45; }
.kb-setting-toggle small { margin-top: var(--space-1); color: var(--color-text-muted); font-size: var(--font-size-xs); font-weight: 400; line-height: 1.5; }
.kb-setting-toggle__input { position: absolute; opacity: 0; }
.kb-setting-toggle__button { width:4.3rem; height:2.25rem; display:grid; place-items:center; justify-self:end; padding:0; border:0; background:transparent; cursor:pointer; }
.kb-setting-toggle > i,.kb-setting-toggle .kb-setting-toggle__button i { position: relative; width: 4.3rem; height: 2.25rem; display: block; justify-self: end; border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-disabled-surface); }
.kb-setting-toggle > i::after,.kb-setting-toggle .kb-setting-toggle__button i::after { position: absolute; top: .22rem; left: .22rem; width: 1.68rem; height: 1.68rem; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); content: ''; }
.kb-setting-toggle__input:checked + i { border-color: rgba(2,146,148,.3); background: var(--color-accent-soft); }
.kb-setting-toggle__input:checked + i::after { left: 2.28rem; background: var(--color-accent); }
.kb-setting-toggle__button[aria-pressed="true"] i { border-color: rgba(2,146,148,.3); background: var(--color-accent-soft); }
.kb-setting-toggle__button[aria-pressed="true"] i::after { left: 2.28rem; background: var(--color-accent); }
.kb-setting-toggle__input:focus-visible + i { outline: 0; box-shadow: var(--focus-ring); }
@media (max-width:42.5rem) { .kb-setting-toggle { grid-template-columns:minmax(0,1fr) auto; }.kb-setting-toggle > i,.kb-setting-toggle .kb-setting-toggle__button { justify-self:end; } }
.kb-choice-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.kb-form .kb-choice-row label { min-height: 2.625rem; display: grid; grid-template-columns: 1.125rem minmax(0,1fr); align-items: center; gap: .5rem; margin: 0; padding: .45rem .75rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-md); background: #f8fbff; color: var(--color-text); font: 400 var(--font-size-sm)/1.4 var(--font-family-sans); cursor: pointer; }
.kb-form .kb-choice-row input { position: static; width: 1.125rem; height: 1.125rem; min-height: 0; margin: 0; padding: 0; place-self: center; -webkit-appearance: auto; appearance: auto; accent-color: var(--color-accent); box-shadow: none; }
.kb-form .kb-choice-row input:focus { box-shadow: none; }
.kb-form .kb-choice-row input:focus-visible { outline: 2px solid rgba(2,146,148,.38); outline-offset: 2px; }
.kb-tooltip-showcase { min-height: 5rem; display: flex; align-items: center; gap: .6rem; color: var(--color-text-muted); font-size: var(--font-size-sm); }
.kb-tooltip { position: relative; display: inline-flex; }
.kb-tooltip > button { width: 2rem; height: 2rem; display: grid; place-items: center; padding: 0; border: 1px dotted #aebac5; border-radius: var(--radius-sm); background: #f8fafb; color: #718197; font: 600 .78rem/1 var(--font-family-sans); cursor: help; }
.kb-tooltip > button:hover,.kb-tooltip > button:focus-visible { border-color: #8f9daa; background: #eef1f3; color: #44566c; }
.kb-tooltip [role="tooltip"],.kb-tooltip-layer,.kb-guidance { padding: .65rem .75rem; border: 1px solid #d8e0e6; border-radius: var(--radius-sm); background: #f1f3f5; color: #3f5061; box-shadow: 0 10px 24px rgba(15,39,64,.09); font-size: var(--font-size-xs); font-weight: 400; line-height: 1.5; }
.kb-guidance { box-shadow: none; }
.kb-guidance strong { color: var(--color-text); }
.kb-guidance :is(span,p,small) { color: var(--color-text-muted); }
.kb-tooltip [role="tooltip"] { position: absolute; z-index: var(--layer-popover); bottom: calc(100% + .55rem); left: 50%; width: max-content; max-width: min(18rem,calc(100vw - 3rem)); opacity: 0; pointer-events: none; transform: translateX(-50%); visibility: hidden; }
.kb-tooltip:hover [role="tooltip"],.kb-tooltip:focus-within [role="tooltip"] { opacity: 1; visibility: visible; }
.kb-tooltip-layer { position:fixed; z-index:var(--layer-toast); width:max-content; max-width:min(18rem,calc(100vw - 2rem)); box-sizing:border-box; opacity:0; pointer-events:none; visibility:hidden; }
.kb-tooltip-layer.is-visible { opacity:1; visibility:visible; }
.kb-card-showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.kb-card-sample { min-width: 0; min-height: 10rem; padding: 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-card); text-align: left; }
.kb-card-sample > h3,.kb-card-sample > p,.kb-card-sample__head h3 { margin: 0; }
.kb-card-sample > h3,.kb-card-sample__head h3 { font-size: var(--font-size-lg); }
.kb-card-sample > p,.kb-card-sample > small { display: block; margin-top: .55rem; color: var(--color-text-muted); font-size: var(--font-size-sm); line-height: 1.55; }
.kb-card-sample--interactive { font: inherit; cursor: pointer; }
.kb-card-sample--interactive:hover { border-color: #b9c7d6; box-shadow: 0 16px 34px rgba(15, 39, 64, .09); }
.kb-card-sample--interactive strong { display: block; font-size: var(--font-size-lg); }
.kb-card-sample--link { display: block; text-decoration: none; }
.kb-card-sample--link strong { display: block; font-size: var(--font-size-lg); font-weight: 600; }
.kb-card-sample--link:hover { border-color: #9ed4d2; background: var(--color-accent-soft); color: var(--color-text); box-shadow: 0 14px 30px rgba(15,39,64,.08); text-decoration: none; }
.kb-card-sample__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.kb-card-counter { min-width: 2rem; height: 2rem; display: grid; place-items: center; padding: 0 .55rem; border: 1px solid #9ed4d2; border-radius: var(--radius-md); background: var(--color-accent-soft); color: var(--color-accent); font-size: var(--font-size-xs); font-weight: 600; }
.kb-card-sample--success { border-top: .25rem solid var(--color-success); }
.kb-card-sample--panel { min-height: 0; }
.kb-toast-showcase { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.kb-toast-sample { display: grid; gap: .2rem; padding: 1rem 1.125rem; border: 1px solid var(--color-border); border-left-width: .25rem; border-radius: var(--radius-lg); background: #fff; box-shadow: 0 12px 28px rgba(15, 39, 64, .1); }
.kb-toast-sample strong { font-size: var(--font-size-sm); }
.kb-toast-sample span { color: var(--color-text-muted); font-size: var(--font-size-xs); }
.kb-toast-sample--success { border-left-color: var(--color-success); }
.kb-toast-sample--info { border-left-color: var(--color-accent); }
.kb-toast-sample--warning { border-left-color: var(--color-warning); }
.kb-toast-sample--error { border-left-color: var(--color-danger); }
.kb-search,.kb-search-sample { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .75rem; }
.kb-search__icon,.kb-search-sample > span { position: absolute; z-index: 1; left: 1rem; top: 50%; width: 1.25rem; height: 1.25rem; color: var(--color-text-muted); transform: translateY(-50%); pointer-events: none; }
.kb-search svg,.kb-search-sample svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.kb-search input[type="search"],.kb-search-sample input { min-width: 0; height: 3.25rem; padding: 0 1rem 0 3rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; color: var(--color-text); font: 400 var(--font-size-sm)/1 var(--font-family-sans); outline: 0; }
.kb-search input[type="search"]:focus,.kb-search-sample input:focus { border-color: var(--color-accent); box-shadow: var(--focus-ring); }
.kb-search__clear,.kb-search-sample__clear { font-weight: 400; }
.kb-tabs-sample { border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.kb-tabs-sample__list { display: flex; gap: .375rem; padding: .375rem; background: #edf3f8; overflow-x: auto; }
.kb-tabs-sample__list button { min-height: 2.75rem; flex: 1 0 8rem; padding: .5rem .875rem; border: 1px solid transparent; border-radius: var(--radius-md); background: transparent; color: var(--color-text-muted); font: 600 var(--font-size-sm)/1 var(--font-family-sans); cursor: pointer; }
.kb-tabs-sample__list button:not(.is-active):hover { border-color: #9ed4d2; background: var(--color-accent-soft); color: var(--color-accent); }
.kb-tabs-sample__list button.is-active { border-color: var(--color-border); background: #fff; color: var(--color-text); box-shadow: var(--shadow-sm); cursor: default; }
.kb-tabs-sample__list button:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.kb-tabs-sample__panel { min-height: 7rem; padding: 1.25rem; }
.kb-tabs-sample__panel p { margin: .4rem 0 0; color: var(--color-text-muted); font-size: var(--font-size-sm); }
.kb-tabs-sample--links .kb-tabs-sample__list a { min-height:2.75rem; display:inline-flex; flex:1 0 8rem; align-items:center; justify-content:center; gap:var(--space-2); padding:.5rem .875rem; border:1px solid transparent; border-radius:var(--radius-md); background:transparent; color:var(--color-text-muted); font-size:var(--font-size-sm); font-weight:500; text-decoration:none; white-space:nowrap; }
.kb-tabs-sample--links .kb-tabs-sample__list a:not(.is-active):hover { border-color:#9ed4d2; background:var(--color-accent-soft); color:var(--color-accent); text-decoration:none; }
.kb-tabs-sample--links .kb-tabs-sample__list a.is-active { border-color:var(--color-border); background:var(--color-surface); color:var(--color-text); box-shadow:var(--shadow-sm); cursor:default; }
.kb-tabs-sample--links .kb-tabs-sample__list a:focus-visible { outline:0; box-shadow:var(--focus-ring); }
.kb-tabs-sample--links em { min-width:1.5rem; height:1.5rem; display:grid; place-items:center; padding:0 .4rem; border-radius:999px; background:var(--color-surface); color:var(--color-text-muted); font-size:.7rem; font-style:normal; font-weight:500; }
.kb-component-section .data-table th { color: #77889a; font-weight: 500; }
.kb-component-section .data-table td { color: #718197; font-weight: 400; }
.kb-component-section .data-table td strong { color: #52677d; font-weight: 400; }
.kb-table-action { border-color: var(--color-border); border-radius: var(--radius-md); background: #fff; color: #52677d; font-weight: 500; box-shadow: var(--shadow-sm); }
.kb-table-action:hover { border-color: #9ed4d2; background: var(--color-accent-soft); color: var(--color-accent); }
.kb-progress-showcase { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.kb-progress-sample { --kb-progress-accent: var(--color-accent); display: grid; gap: .7rem; padding: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; }
.kb-progress-sample--teal { --kb-progress-accent: #169c9c; }
.kb-progress-sample--warning { --kb-progress-accent: #d88b12; }
.kb-progress-sample > div { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.kb-progress-sample strong { font-size: var(--font-size-sm); font-weight: 600; }
.kb-progress-sample span,.kb-progress-sample small { color: var(--color-text-muted); font-size: var(--font-size-xs); font-weight: 400; }
.kb-progress-bar { --kb-progress-accent:var(--color-accent); width:100%; height:.45rem; display:block; overflow:hidden; border:0; border-radius:var(--radius-pill); background:#e8edf4; color:var(--kb-progress-accent); }
.kb-progress-bar::-webkit-progress-bar { border-radius:var(--radius-pill); background:#e8edf4; }
.kb-progress-bar::-webkit-progress-value { border-radius:var(--radius-pill); background:var(--kb-progress-accent); }
.kb-progress-bar::-moz-progress-bar { border-radius:var(--radius-pill); background:var(--kb-progress-accent); }
.kb-progress-sample--teal .kb-progress-bar { --kb-progress-accent:#169c9c; }
.kb-progress-sample--warning .kb-progress-bar { --kb-progress-accent:#d88b12; }
.kb-recorder-sample { display: grid; gap: .85rem; padding: 1rem; border: 1px solid #b9e4d5; border-radius: var(--radius-lg); background: linear-gradient(135deg,#f5fcf9,#fff); }
.kb-recorder-sample__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.kb-recorder-sample__heading span { display: grid; gap: .2rem; }
.kb-recorder-sample__heading strong { font-size: var(--font-size-sm); font-weight: 600; }
.kb-recorder-sample__heading small,.kb-recorder-sample__actions > span { color: var(--color-text-muted); font-size: var(--font-size-xs); font-weight: 400; }
.kb-recorder-sample__heading em { padding: .3rem .65rem; border-radius: var(--radius-pill); background: #e2f6ee; color: #158765; font-size: .65rem; font-style: normal; font-weight: 600; }
.kb-waveform-sample { height: 4.5rem; display: grid; place-items: center; overflow: hidden; border: 1px solid #cfe7df; border-radius: var(--radius-md); background: #fff; }
.kb-waveform-sample svg { width: 100%; height: 100%; }
.kb-waveform-sample path { fill: none; stroke: #15936d; stroke-width: 2; vector-effect: non-scaling-stroke; }
.kb-recorder-sample__actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.kb-button--record { border-color: #158765; background: #158765; color: #fff; }
.kb-button--stop { border-color: #e05d5d; background: #fff; color: #c43d3d; }
.kb-recorder-sample__actions > span { margin-left: auto; }
.voicemail-greeting-recorder.is-recording { border-color:#ef6a6a; background:linear-gradient(135deg,#fff5f5,#fff); }
.voicemail-greeting-recorder.is-recording .kb-recorder-sample__heading em { background:#ffe8e8; color:#d43f3f; }
.voicemail-greeting-waveform { width:100%; height:4.5rem; display:block; }
.voicemail-greeting-recorder.is-recording .voicemail-greeting-waveform { border-color:#8dd0ba; background:#f7fcfa; box-shadow:0 0 0 3px rgba(21,135,101,.08); }
.greeting-file-input[hidden] { display:none!important; }
.voicemail-greeting-recorder audio { width:100%; height:2.6rem; }
.voicemail-greeting-recorder audio[hidden],.voicemail-greeting-recorder button[hidden] { display:none!important; }
.voicemail-greeting-recorder .greeting-remove-button { margin-left:auto; color:var(--color-danger); }
.voicemail-greeting-recorder > p { margin:0; color:var(--color-text-muted); font-size:var(--font-size-xs); }
.voicemail-greeting-recorder > p.is-error { color:var(--color-danger); }
.kb-audio-showcase { display: grid; gap: .75rem; }
.kb-audio-player { display: grid; grid-template-columns: 2.75rem auto minmax(5rem,1fr) auto; align-items: center; gap: .7rem; padding: .75rem; border: 1px solid #cfe7df; border-radius: var(--radius-lg); background: #fff; }
.kb-audio-player button { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius-pill); background: #158765; color: #fff; line-height: 0; cursor: pointer; }
.kb-audio-player button svg { width: 1.45rem; height: 1.45rem; display: block; fill: currentColor; transform: translateX(.08rem); }
.kb-audio-player button span { display:grid; place-items:center; width:1.45rem; height:1.45rem; font-size:1.15rem; line-height:1; transform:translateX(.05rem); }
.kb-audio-player time,.kb-audio-player small { color: var(--color-text-muted); font-size: var(--font-size-xs); font-weight: 400; }
.kb-audio-player input[type="range"] { width: 100%; accent-color: #158765; }
.kb-audio-player--compact { grid-template-columns: 2.75rem minmax(0,1fr) auto; }
.kb-audio-player--compact div { display: grid; gap: .2rem; }
.kb-audio-player--compact strong { font-size: var(--font-size-sm); font-weight: 500; }
.kb-dialpad { width:min(27rem,100%); margin:0 auto; }
.kb-dialpad .field { margin:0; }
.kb-dialpad__number { min-height:3.5rem; font-size:1.15rem; font-weight:600; text-align:center; letter-spacing:.03em; }
.manual-dial-status { margin:.75rem 0; color:#148d6b; font-size:.82rem; font-weight:600; text-align:center; }
.manual-dial-pad { display:grid; grid-template-columns:repeat(3,4.25rem); justify-content:center; gap:.65rem; }
.manual-dial-pad button { width:4.25rem; height:3.65rem; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:#f9fbfd; color:var(--color-text); font:600 1.15rem var(--font-family-sans); cursor:pointer; }
.manual-dial-pad button:hover { transform:translateY(-1px); border-color:#7fcdb5; background:#effaf6; box-shadow:0 8px 18px rgba(21,153,111,.12); }
.manual-dial-pad .manual-dial-backspace { grid-column:2; display:grid; place-items:center; padding:0; color:var(--color-text-muted); line-height:0; }
.manual-dial-pad .manual-dial-backspace svg { width:1.5rem; height:1.5rem; display:block; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.manual-dial-message { min-height:1.25rem; margin:.75rem 0 0; color:var(--color-danger); font-size:var(--font-size-xs); text-align:center; }
.manual-dial-dialog .kb-modal__footer { gap:.65rem; }
.manual-dial-dialog .manual-dial-duration { min-width:3.5rem; color:#0e7373; font-size:var(--font-size-xs); font-weight:600; text-align:center; }
.manual-dial-dialog .manual-dial-duration[hidden],.manual-dial-transfer[hidden] { display:none!important; }
.manual-dial-transfer { width:auto; margin:0 2rem 1rem; }
.kb-file-showcase { display: grid; gap: 1rem; }
.kb-file-showcase .files-upload-card { margin-top: 0; }
.kb-file-showcase .files-folder-info strong,.kb-file-showcase .files-row-info strong { color: #52677d; font-weight: 500; }
.kb-file-showcase .files-row-actions em { font-style: normal; }
.kb-file-showcase .file-drop-zone strong { color: #52677d; font-weight: 500; }
.kb-upload-progress--64 { width: 64% !important; }
.kb-email-stage { padding: 1.5rem; border-radius: var(--radius-lg); background: #eef2f5; }
.kb-email-preview { width: min(37.5rem,100%); margin: 0 auto; overflow: hidden; border: 1px solid #dce4ea; border-radius: 1.125rem; background: #fff; color: #52677d; box-shadow: 0 18px 42px rgba(15,39,64,.09); font-family: Arial,"Segoe UI",sans-serif; }
.kb-email-preview header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid #edf1f4; }
.kb-email-preview header strong { color: #273d52; font-size: 1.15rem; font-weight: 600; }
.kb-email-preview header span { color: #8492a0; font-size: .75rem; }
.kb-email-preview__body { padding: 2rem 1.5rem; }
.kb-email-preview__body h3 { margin: .35rem 0 .75rem; color: #344b60; font-size: 1.35rem; font-weight: 600; }
.kb-email-preview__body p { margin: 0 0 1rem; color: #5f7182; font-size: .9rem; line-height: 1.65; }
.kb-email-preview__body p strong { color: #44596d; font-weight: 600; }
.kb-email-preview__body > a { display: inline-flex; align-items: center; min-height: 2.875rem; margin: .5rem 0 1.35rem; padding: 0 1.15rem; border-radius: .75rem; background: var(--color-primary); color: #fff; font-size: .85rem; font-weight: 600; text-decoration: none; }
.kb-email-preview__body small { display: block; color: #7c8b9a; font-size: .75rem; line-height: 1.6; }
.kb-email-preview footer { padding: 1rem 1.5rem; background: #f7f9fa; color: #8a98a5; font-size: .7rem; text-align: center; }
.kb-action-list { display: grid; gap: .75rem; }
.kb-action-row { display: grid; grid-template-columns: 2.75rem 8rem minmax(0,1fr) auto; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.kb-action-row--compact { grid-template-columns:2.75rem minmax(0,1fr) auto; }
.kb-action-row:hover { border-color: #b9c7d6; box-shadow: 0 9px 20px rgba(15,39,64,.06); }
.kb-action-row__icon { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: var(--radius-md); background: #fff4dc; color: #c77b12; }
.kb-action-row__icon svg { width: 1.25rem; height: 1.25rem; stroke: currentColor; stroke-width: 2; }
.kb-action-row time,.kb-action-row time strong,.kb-action-row time small,.kb-action-row__copy strong,.kb-action-row__copy span,.kb-action-row__copy small { display: block; }
.kb-action-row time strong,.kb-action-row__copy strong { color: var(--color-text); font-size: var(--font-size-sm); font-weight: 500; }
.kb-action-row time small,.kb-action-row__copy span,.kb-action-row__copy small { margin-top: .2rem; color: var(--color-text-muted); font-size: var(--font-size-xs); font-weight: 400; }
.kb-action-row__actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.kb-action-row .kb-button { font-weight: 400; }
.kb-action-row__actions .kb-icon-action { width: 2.35rem; height: 2.35rem; }
.kb-action-row__actions .kb-icon-action svg { width: 1rem; height: 1rem; }
.kb-action-row--completed { opacity: .76; }
.kb-settings-list { display: grid; gap: .75rem; }
.kb-settings-list__row { width: 100%; display: grid; grid-template-columns: 3.25rem minmax(0,1fr) auto; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-lg); background: #fff; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.kb-settings-list > :is(a,button).kb-settings-list__row:hover { border-color: #9ed4d2; background: var(--color-accent-soft); color: inherit; box-shadow: 0 9px 20px rgba(15,39,64,.06); text-decoration: none; }
.kb-settings-list__row.is-disabled { background:var(--color-disabled-surface); cursor:default; }
.kb-settings-list__row.is-disabled > span { opacity:.76; }
.kb-settings-list__icon { width: 3.25rem; height: 3.25rem; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--color-accent-soft); color: var(--color-accent); }
.kb-settings-list__icon svg { width: 1.35rem; height: 1.35rem; stroke: currentColor; stroke-width: 2; }
.kb-settings-list__row > span:nth-child(2) { display: grid; gap: .2rem; }
.kb-settings-list strong { font-size: var(--font-size-md); font-weight: 500; }
.kb-settings-list small { color: var(--color-text-muted); font-size: .8125rem; font-weight: 400; }
.kb-settings-list em { padding: .3rem .6rem; border-radius: var(--radius-pill); background: var(--color-accent-soft); color: var(--color-accent); font-size: .65rem; font-style: normal; font-weight: 500; }
.kb-settings-list__row > .kb-plan-badge { justify-self:end; }
.kb-settings-list__external { width:2.4rem; height:2.4rem; display:grid; place-items:center; border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface); color:var(--color-text-muted); }
.kb-settings-list__external svg { width:1rem; height:1rem; stroke:currentColor; stroke-width:2; }
.kb-settings-list > :is(a,button).kb-settings-list__row:hover .kb-settings-list__external { border-color:rgba(2,146,148,.3); background:#fff; color:var(--color-accent); }
.kb-settings-detail { display:grid; gap:var(--space-4); }
.kb-settings-detail__back { justify-self:start; }
.kb-settings-detail__content { display:grid; gap:var(--space-4); }
.kb-settings-detail__toggles { gap:var(--space-3); }
.kb-settings-phone-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:var(--space-4); }
.kb-settings-phone-grid > .kb-section-instruction,.kb-settings-phone-grid > .full,.kb-settings-phone-grid > .kb-recorder-sample,.kb-settings-phone-grid > .personal-voicemail-fallback { grid-column:1 / -1; }
.kb-settings-phone-grid .field { min-width:0; margin:0; }
.kb-settings-phone-grid .field__control { width:100%; box-sizing:border-box; }
@media (max-width:42.5rem) { .kb-settings-list__external { grid-column:2; justify-self:start; }.kb-settings-phone-grid > * { grid-column:1!important; } }
@media (max-width:42.5rem) { .kb-tts-preview { align-items:stretch; flex-direction:column; }.kb-tts-preview .kb-button { width:100%; }.kb-tts-preview__status { text-align:left; } }
.kb-admin-directory { display:grid; gap:var(--space-4); }
.kb-admin-directory__plan { display:grid; gap:var(--space-4); padding:var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-lg); background:linear-gradient(145deg,#f7faff 0%,#fff 52%,#f7fcfa 100%); box-shadow:var(--shadow-card); }
.kb-admin-directory__plan > header { display:flex; align-items:center; justify-content:space-between; gap:var(--space-4); }
.kb-admin-directory__plan > header > span { min-width:0; display:grid; gap:var(--space-1); }
.kb-admin-directory__plan > header strong { display:flex; align-items:center; gap:var(--space-2); color:var(--color-text); font-size:var(--font-size-md); font-weight:600; }
.kb-admin-directory__plan > header small { color:var(--color-text-muted); font-size:var(--font-size-xs); }
.kb-admin-directory__usage { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-3); }
.kb-admin-directory__usage .kb-progress-sample { min-width:0; margin:0; }
.app-main-content:has(> .kb-rolodex-directory) { min-height:0; }
@media (max-width:47.5rem) {
    .kb-settings-list__row { grid-template-columns:3rem minmax(0,1fr); }
    .kb-settings-list em,.kb-settings-list b,.kb-settings-list__row > .kb-plan-badge { grid-column:2; justify-self:start; }
    .kb-admin-directory__plan > header { align-items:flex-start; flex-direction:column; }
    .kb-admin-directory__usage { grid-template-columns:minmax(0,1fr); }
}
.kb-modal__icon--communication { background: #e7f8f7; color: #169c9c; }
.kb-identity-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; }
.kb-identity-card { --identity:#3f7cff; --identity-soft:#eaf2ff; min-height:5rem; display:grid; grid-template-columns:2.5rem minmax(0,1fr) auto; align-items:center; gap:.75rem; padding:.875rem; border:1px solid var(--color-border-soft); border-top:4px solid var(--identity); border-radius:var(--radius-lg); background:#fff; }
.kb-identity-card > span { width:2.5rem; height:2.5rem; display:grid; place-items:center; border-radius:var(--radius-md); background:var(--identity-soft); color:var(--identity); }
.kb-identity-card svg { width:1.2rem; height:1.2rem; stroke:currentColor; stroke-width:2; }
.kb-identity-card strong { color:#52677d; font-size:.82rem; font-weight:500; }
.kb-identity-card b { min-width:1.75rem; height:1.75rem; display:grid; place-items:center; padding:0 .4rem; border-radius:var(--radius-pill); background:var(--identity-soft); color:var(--identity); font-size:.7rem; font-weight:600; }
.kb-identity-card--communication { --identity:#169c9c; --identity-soft:#e7f8f7; }
.kb-identity-card--follow-up { --identity:#2f8fbd; --identity-soft:#e8f6fc; }
.kb-identity-card--transaction { --identity:#16a66a; --identity-soft:#e9fbf2; }
.kb-identity-card--files { --identity:#c77b12; --identity-soft:#fff3dc; }
.kb-identity-card--notes { --identity:#7157d9; --identity-soft:#f0edff; }
.kb-foundations__heading--subsection { margin-top:1.5rem; }
.kb-foundations__heading--subsection h3 { margin:0; color:#52677d; font-size:1rem; font-weight:600; }
.kb-identity-grid--pipeline { grid-template-columns:repeat(3,minmax(0,1fr)); }
.kb-pipeline-identity { --identity:#3f7cff; --identity-soft:#eaf2ff; display:flex; align-items:center; gap:.75rem; min-height:4.5rem; padding:.875rem; border:1px solid var(--color-border-soft); border-top:4px solid var(--identity); border-radius:var(--radius-lg); background:#fff; }
.kb-pipeline-identity i { width:2.5rem; height:2.5rem; flex:0 0 2.5rem; border-radius:var(--radius-md); background:var(--identity-soft); }
.kb-pipeline-identity strong,.kb-pipeline-identity small { display:block; }
.kb-pipeline-identity strong { color:#52677d; font-size:.8rem; font-weight:500; }
.kb-pipeline-identity small { margin-top:.15rem; color:var(--color-text-muted); font-size:.68rem; }
.kb-pipeline-identity--prospects { --identity:#72a8ff; --identity-soft:#eaf2ff; }
.kb-pipeline-identity--approved { --identity:#8f66e8; --identity-soft:#f1eaff; }
.kb-pipeline-identity--files { --identity:#46bf6b; --identity-soft:#e8f8ee; }
.kb-pipeline-identity--closed { --identity:#f2aa3c; --identity-soft:#fff3dc; }
.kb-pipeline-identity--dead { --identity:#ef4b4b; --identity-soft:#ffe9e9; }
.browser-softphone { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.75rem 1rem; margin-bottom:1.15rem; padding:1rem; border:1px solid #82c9c5; border-radius:.95rem; background:linear-gradient(135deg,var(--client-communication-soft,#e7f8f7),#f4fcfb); color:var(--client-communication,#169c9c); }
.browser-softphone__identity { display:flex; align-items:center; gap:.9rem; min-width:0; }
.browser-softphone__icon { width:2.7rem; height:2.7rem; display:grid; flex:0 0 2.7rem; place-items:center; border-radius:.8rem; background:#fff; box-shadow:var(--shadow-sm); }
.browser-softphone__icon svg { width:1.2rem; height:1.2rem; fill:none; stroke:currentColor; stroke-width:2; }
.browser-softphone__identity small,.browser-softphone__identity strong,.browser-softphone__identity em { display:block; }
.browser-softphone__identity small { color:#617b7c; font-size:.72rem; }
.browser-softphone__identity strong { margin-top:.1rem; color:#0e7373; font-size:1.05rem; }
.browser-softphone__identity em { margin-top:.18rem; color:#527273; font-size:.68rem; font-style:normal; }
.browser-softphone__controls { display:flex; align-items:center; justify-content:flex-end; gap:.45rem; }
.browser-softphone__controls time { min-width:3.5rem; color:#0e7373; font-size:.78rem; font-weight:700; text-align:center; }
.softphone-button { min-height:2.55rem; display:inline-flex; align-items:center; justify-content:center; gap:.4rem; padding:0 .85rem; border:1px solid transparent; border-radius:999px; font:700 .72rem/1 var(--font-family-sans); cursor:pointer; transition:transform var(--transition-fast),box-shadow var(--transition-fast),background var(--transition-fast),color var(--transition-fast); }
.softphone-button svg { width:1rem; height:1rem; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.softphone-button[hidden],.browser-softphone__controls time[hidden] { display:none!important; }
.softphone-button--start { background:var(--client-communication,#169c9c); color:#fff; box-shadow:0 9px 20px rgba(22,156,156,.2); }
.softphone-button--start:hover:not(:disabled) { transform:translateY(-1px); border-color:#64c5ad; background:#d8f3ea; color:var(--color-text); box-shadow:0 12px 24px rgba(22,156,156,.2); }
.softphone-button--mute { border-color:#aed9d6; background:#fff; color:#147f7f; }
.softphone-button--mute[aria-pressed="true"],.softphone-button--hold[aria-pressed="true"] { border-color:#e0ba69; background:#fff7df; color:#9b6509; }
.softphone-button--hold,.softphone-button--transfer { border-color:#8ccfc9; background:#fff; color:#0f7f78; }
.softphone-button--hold:hover:not(:disabled),.softphone-button--transfer:hover:not(:disabled) { transform:translateY(-1px); box-shadow:0 10px 20px rgba(22,156,156,.16); }
.softphone-button--end { background:#e14f4f; color:#fff; box-shadow:0 9px 20px rgba(210,52,52,.2); }
.softphone-button--end svg { transform:rotate(135deg); }
.softphone-button--end:hover { transform:translateY(-1px); box-shadow:0 12px 24px rgba(210,52,52,.28); }
.softphone-button:disabled { cursor:not-allowed; opacity:.65; }
.manual-dial-dialog .softphone-button { min-height:3.2rem; padding:0 1.5rem; font-size:.875rem; }
.manual-dial-dialog .softphone-button[hidden] { display:none!important; }
.kb-softphone-demo { margin-bottom:1rem; }
.kb-call-outcomes { margin-bottom:1rem; }
.kb-call-form { gap:.85rem; }
.kb-call-form .kb-softphone-demo,.kb-call-form .kb-call-outcomes { margin-bottom:0; }
.kb-call-form .communication-subheading,.kb-call-form .communication-subheading:not(:first-child) { margin:0; }
.kb-form .kb-choice-row.call-outcome-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; margin:0; }
.kb-form .kb-choice-row.call-outcome-grid label.call-outcome-option { min-height:0; display:block; margin:0; padding:0; border:0; border-radius:0; background:transparent; }
.kb-form .kb-choice-row.call-outcome-grid label.call-outcome-option input { position:absolute; width:1px; height:1px; margin:-1px; opacity:0; pointer-events:none; }
.kb-form .kb-choice-row.call-outcome-grid label.call-outcome-option span { width:100%; min-height:2.875rem; display:flex; align-items:center; padding:.72rem .85rem; border:1px solid var(--color-border); border-radius:.75rem; background:var(--color-surface); color:var(--color-text); font:400 var(--font-size-sm)/1.4 var(--font-family-sans); cursor:pointer; }
.kb-form .kb-choice-row.call-outcome-grid label.call-outcome-option input:checked + span { border-color:#74a4ff; background:#f2f7ff; box-shadow:var(--focus-ring); }
.kb-form .kb-choice-row.call-outcome-grid label.call-outcome-option input:focus-visible + span { outline:0; border-color:var(--color-accent); box-shadow:var(--focus-ring); }
.kb-incoming-demo-list { display:grid; gap:.75rem; }
.kb-incoming-demo { display:grid; grid-template-columns:3rem minmax(0,1fr) auto; align-items:center; gap:1rem; padding:1rem; border:1px solid #9fe1c9; border-radius:var(--radius-xl); background:#f2fcf8; color:#52677d; box-shadow:0 12px 28px rgba(8,37,52,.09); }
.kb-incoming-demo__icon { width:3rem; height:3rem; display:grid; place-items:center; border-radius:var(--radius-md); background:#d9f6eb; color:#13966d; }
.kb-incoming-demo__icon svg { width:1.35rem; height:1.35rem; stroke:currentColor; stroke-width:2; }
.kb-incoming-demo > div:nth-child(2) strong,.kb-incoming-demo > div:nth-child(2) span,.kb-incoming-demo > div:nth-child(2) small { display:block; }
.kb-incoming-demo > div:nth-child(2) strong { color:#11836a; font-size:var(--font-size-xs); font-weight:500; }
.kb-incoming-demo > div:nth-child(2) span { margin-top:.15rem; color:var(--color-text); font-size:var(--font-size-md); font-weight:500; }
.kb-incoming-demo > div:nth-child(2) small { margin-top:.15rem; color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; }
.kb-incoming-demo a { color:#005bea; text-decoration:none; }
.kb-incoming-demo__actions { display:flex; align-items:center; gap:.4rem; }
.kb-incoming-demo__actions .kb-button { font-weight:400; }
.kb-gallery__sample { display: grid; gap: .75rem; }
.kb-gallery__long-copy { display: grid; gap: 1rem; }
.kb-gallery__long-copy p { margin: 0; color: var(--color-text-muted); line-height: 1.7; }
.kb-pagination-sample { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; box-shadow:var(--shadow-card); overflow: hidden; }
body .kb-modal.kb-modal--results .kb-modal__body--results { display:flex; margin:0; padding:0 var(--kb-modal-body-padding); border:0; border-radius:0; background:linear-gradient(180deg,#f8fbff 0%,#f4f7fa 100%); box-shadow:none; overflow:hidden; }
body .kb-modal.kb-modal--results .kb-modal__footer { padding-top:.5rem; padding-bottom:.5rem; }
.kb-results-layout { width:100%; height:100%; max-height:100%; min-height:0; flex:1 1 auto; grid-template-rows:minmax(0,1fr) auto; gap:1rem; }
.kb-results-viewport { min-height:0; max-height:none; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-color:#a7b5c3 transparent; scrollbar-width:thin; }
.kb-results-viewport::-webkit-scrollbar { width:.55rem; }
.kb-results-viewport::-webkit-scrollbar-track { background:transparent; }
.kb-results-viewport::-webkit-scrollbar-thumb { border:.125rem solid transparent; border-radius:var(--radius-pill); background:#a7b5c3; background-clip:padding-box; }
.kb-pagination-sample__list { display: grid; }
.kb-pagination-sample__row { min-height: 4.25rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: .875rem 1rem; border-bottom: 1px solid var(--color-border-soft); }
.kb-pagination-sample__row:last-child { border-bottom: 0; }
.kb-pagination-sample__row strong { display: block; color: #52677d; font-size: .875rem; font-weight: 400; }
.kb-pagination-sample__row span { display: block; margin-top: .2rem; color: #7b8b9b; font-size: .75rem; font-weight: 400; }
.kb-pagination-sample__row time { color: #8795a4; font-size: .75rem; font-weight: 400; }
.kb-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: 1rem; padding: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; box-shadow:var(--shadow-card); color: var(--color-text-muted); font-size: .75rem; }
.kb-results-layout > .kb-pagination { margin-top:0; }
.kb-pagination__summary { justify-self: start; }
.kb-pagination__pages { display: flex; align-items: center; justify-content: center; gap: .375rem; }
.kb-pagination__button { min-width: 2.25rem; height: 2.25rem; display: inline-flex; align-items: center; justify-content: center; padding: 0 .625rem; border: 0; border-radius: .625rem; background: transparent; color: var(--color-text-muted); cursor: pointer; font: inherit; }
.kb-pagination__button:hover { background: var(--color-accent-soft); color: var(--color-accent); }
.kb-pagination__button.is-active { border: 1px solid #9ed4d2; background: var(--color-accent-soft); color: var(--color-accent); font-weight: 500; }
.kb-pagination__button:disabled { opacity: .42; cursor: default; }
.kb-pagination__per-page { justify-self: end; display: inline-flex; align-items: center; gap: .625rem; }
.kb-pagination__per-page select { height: 2.5rem; padding: 0 2rem 0 .75rem; border: 1px solid var(--color-border); border-radius: .7rem; background: #fff; color: var(--color-text); cursor: pointer; font: inherit; }

/* Canonical collection filter and sort surface. */
.kb-filter-bar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:1rem; padding:.875rem 1rem; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:#f5f8fb; }
.kb-filter-bar__controls { display:flex; align-items:end; gap:.75rem; min-width:0; }
.kb-filter-bar__field { width:min(18rem,100%); margin:0; }
.kb-filter-bar__field label { font-size:var(--font-size-xs); font-weight:500; }
.kb-filter-bar__field .field__control { min-height:2.75rem; height:2.75rem; }
.kb-filter-bar__summary { align-self:center; color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; white-space:nowrap; }

/* Canonical previous/date/next collection navigation. */
.kb-date-navigator { display:grid; grid-template-columns:1fr minmax(15rem,20rem) 1fr; align-items:center; gap:1rem; padding:.75rem; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:#f5f8fb; }
.kb-date-navigator__button { min-height:2.75rem; display:inline-flex; align-items:center; justify-content:center; justify-self:start; gap:.35rem; padding:0 1rem; border:1px solid var(--color-border); border-radius:var(--radius-pill); background:var(--color-surface); color:var(--color-text-muted); font:500 var(--font-size-xs)/1 var(--font-family-sans); text-decoration:none; cursor:pointer; }
.kb-date-navigator__button:hover { border-color:#9ed4d2; background:var(--color-accent-soft); color:var(--color-accent); box-shadow:var(--shadow-sm); text-decoration:none; }
.kb-date-navigator__button--next { justify-self:end; }
.kb-date-navigator__picker { width:100%; min-width:0; }
.kb-date-navigator__picker [data-date-display] { width:100%; height:2.75rem; padding:0 2.75rem; border:1px solid var(--color-border); border-radius:var(--radius-pill); background:var(--color-surface); color:var(--color-text); font:500 var(--font-size-sm)/1 var(--font-family-sans); text-align:center; cursor:pointer; }
.kb-date-navigator__picker .date-picker__trigger { left:.875rem; }

/* Account plans use one canonical badge family keyed by stable plan code. */
.kb-plan-badge { min-height:1.5rem; display:inline-flex; align-items:center; justify-content:center; padding:.2rem .55rem; border:1px solid var(--color-border); border-radius:var(--radius-pill); background:#f4f7f9; color:#536577; font-size:var(--font-size-xs); font-style:normal; font-weight:600; line-height:1; vertical-align:middle; white-space:nowrap; }
.kb-plan-badge--solo { border-color:#b9d8d6; background:#e9f5f4; color:#176d6e; }
.kb-plan-badge--team { border-color:#b9d0e8; background:#eaf2fa; color:#2d6596; }
.kb-plan-badge--pro { border-color:#d8cdfa; background:#f1eaff; color:#7157d9; }
.kb-plan-badge--enterprise { border-color:#e4cf9f; background:#fbf3df; color:#7b5a18; }
.kb-plan-badge-gallery { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; margin-bottom:1rem; }
.kb-plan-badge-gallery article { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:.85rem; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); }
.kb-plan-badge-gallery small { color:var(--color-text-muted); }

/* Notes retain the client Notes section identity in every opened surface. */
.kb-modal__icon--notes { background:#f1eaff; color:#7157d9; }
.kb-modal__count--notes { border-color:#d8cdfa; background:#f1eaff; color:#7157d9; }
.kb-notes-modal { gap:1rem; }
.kb-note-list { display:grid; gap:.75rem; }
.kb-note-card { display:block; padding:1rem; border:1px solid var(--color-border-soft); border-radius:var(--radius-lg); background:var(--color-surface); }
.kb-note-card--with-leading { display:grid; grid-template-columns:auto minmax(0,1fr); gap:.75rem; }
.kb-note-card:hover { border-color:#cfc5ef; background:#fdfcff; box-shadow:0 8px 18px rgba(15,39,64,.05); }
.kb-note-card__leading { padding-top:.05rem; }
.kb-note-card__main { min-width:0; display:grid; gap:.45rem; }
.kb-note-card__heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.kb-note-card__heading h3 { margin:0; color:var(--color-text); font-size:var(--font-size-sm); font-weight:500; }
.kb-note-card__heading span { display:block; margin-top:.2rem; color:#7b8b9b; font-size:var(--font-size-xs); font-weight:400; }
.kb-note-card p { margin:0; color:var(--color-text-muted); font-size:var(--font-size-sm); font-weight:400; line-height:1.6; overflow-wrap:anywhere; white-space:pre-wrap; }
.kb-note-card__actions { display:flex; align-items:center; justify-content:flex-end; gap:.4rem; }
.kb-note-card__actions .kb-icon-action { width:2.35rem; height:2.35rem; }
.kb-note-card__actions .kb-icon-action svg { width:1rem; height:1rem; }
.kb-note-pin-form { margin:0; }
.kb-note-pin { opacity:.48; }
.kb-note-pin.is-pinned { border-color:#d8cdfa; background:var(--client-notes-soft,#f1eaff); color:var(--client-notes,#7157d9); opacity:1; }
.kb-modal .kb-modal__body.kb-notes-workflow { display:grid; min-height:0; margin:0 var(--kb-modal-body-padding); padding:0; gap:var(--space-4); border:0; border-radius:0; background:transparent; box-shadow:none; overflow:visible; }
.kb-notes-workflow > .kb-filter-bar,.kb-notes-results { box-shadow:none; }
.kb-notes-results { min-height:0; max-height:calc(100dvh - 19rem); padding:var(--space-4); overflow-y:auto; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); }
.kb-modal .kb-modal__body.kb-communication-workflow { min-height:0; margin:0 var(--kb-modal-body-padding); padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; overflow:visible; }
.kb-communication-workflow > .communication-activity-body { min-height:0; max-height:calc(100dvh - 16.75rem); overflow-x:hidden; overflow-y:auto; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:none; }
.kb-communication-workflow .communication-activity-list { border:0; border-radius:0; background:transparent; box-shadow:none; }
.kb-modal .kb-modal__body.kb-follow-up-workflow { min-height:0; margin:0 var(--kb-modal-body-padding); padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; overflow:visible; }
.kb-follow-up-results { min-height:0; max-height:calc(100dvh - 18.5rem); padding:var(--space-4); overflow-x:hidden; overflow-y:auto; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:none; }
.kb-follow-up-results .follow-up-history-list { display:grid; gap:var(--space-3); }
.kb-confirmation-preview { display:grid; gap:.2rem; padding:var(--space-4); border:1px solid var(--color-border-soft); border-radius:var(--radius-md); background:var(--color-canvas); }
.kb-confirmation-preview strong { color:var(--color-text); font-size:var(--font-size-sm); font-weight:600; }
.kb-confirmation-preview span { color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; }

/* Canonical page header, timeline, and empty-result surfaces. */
.kb-page-header { display:grid; grid-template-columns:3rem minmax(0,1fr) auto; align-items:center; gap:1rem; padding:1rem; border:1px solid var(--color-border-soft); border-radius:var(--radius-lg); background:var(--color-surface); }
.kb-page-header--without-icon { grid-template-columns:minmax(0,1fr) auto; }
.kb-page-header__icon { width:3rem; height:3rem; display:grid; place-items:center; border-radius:var(--radius-md); background:var(--color-accent-soft); color:var(--color-accent); }
.kb-page-header__icon svg { width:1.35rem; height:1.35rem; stroke:currentColor; stroke-width:2; }
.kb-page-header h2,.kb-page-header p { margin:0; }
.kb-page-header__title { display:flex; align-items:center; gap:var(--space-3); min-width:0; }
.kb-page-header__count { min-width:2.35rem; height:2.35rem; display:grid; place-items:center; padding:0 .6rem; border:1px solid #9ed4d2; border-radius:var(--radius-md); background:var(--color-accent-soft); color:var(--color-accent); font-size:var(--font-size-xs); font-weight:600; }
.kb-page-header h2 { color:var(--color-text); font-size:var(--font-size-lg); font-weight:600; }
.kb-page-header p { margin-top:.2rem; color:var(--color-text-muted); font-size:var(--font-size-sm); line-height:1.55; }
.kb-page-header__actions { display:flex; align-items:center; justify-content:flex-end; gap:.5rem; }
.kb-timeline { position:relative; display:grid; gap:0; margin:0; padding:0; list-style:none; }
.kb-timeline::before { content:""; position:absolute; top:1.5rem; bottom:1.5rem; left:1.45rem; width:1px; background:var(--color-border); }
.kb-timeline__item { position:relative; display:grid; grid-template-columns:3rem minmax(0,1fr); gap:1rem; padding:.75rem 0; }
.kb-timeline__marker { position:relative; z-index:1; width:2.9rem; height:2.9rem; display:grid; place-items:center; border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface); color:var(--color-text-muted); }
.kb-timeline__marker svg { width:1.45rem; height:1.45rem; stroke:currentColor; stroke-width:2; }
.kb-timeline__item--complete .kb-timeline__marker,.kb-timeline__item--current .kb-timeline__marker { border-color:#9ed4d2; background:var(--color-accent-soft); color:var(--color-accent); }
.kb-timeline__item strong,.kb-timeline__item > div > span { display:block; }
.kb-timeline__item strong { color:var(--color-text); font-size:var(--font-size-sm); font-weight:500; }
.kb-timeline__item > div > span { margin-top:.15rem; color:var(--color-text-muted); font-size:var(--font-size-xs); }
.kb-timeline__item p { margin:.35rem 0 0; color:var(--color-text-muted); font-size:var(--font-size-sm); line-height:1.55; }
.kb-empty-state { display:grid; justify-items:center; gap:.5rem; padding:2rem 1rem; border:1px dashed var(--color-border); border-radius:var(--radius-lg); background:#f8fafc; text-align:center; }
.kb-empty-state__icon { width:3rem; height:3rem; display:grid; place-items:center; border-radius:var(--radius-md); background:var(--color-accent-soft); color:var(--color-accent); }
.kb-empty-state__icon svg { width:1.35rem; height:1.35rem; stroke:currentColor; stroke-width:2; }
.kb-empty-state h3,.kb-empty-state p { margin:0; }
.kb-empty-state h3 { color:var(--color-text); font-size:var(--font-size-md); font-weight:500; }
.kb-empty-state p { max-width:34rem; color:var(--color-text-muted); font-size:var(--font-size-sm); line-height:1.6; }
.kb-empty-state .kb-button { margin-top:.4rem; }

/* Canonical Dashboard composition. */
.kb-dashboard { width:100%; display:grid; gap:var(--space-8); padding:var(--space-8); color:var(--color-text); }
.kb-dashboard-metrics { display:grid; grid-template-columns:repeat(6,minmax(9.5rem,1fr)); gap:var(--space-5); }
.kb-dashboard-metric { --dashboard-accent:var(--color-accent); --dashboard-soft:var(--color-accent-soft); position:relative; min-width:0; min-height:9rem; display:flex; align-items:center; gap:var(--space-4); padding:var(--space-5); border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); color:var(--color-text); box-shadow:var(--shadow-card); text-decoration:none; overflow:hidden; }
.kb-dashboard-metric::before { position:absolute; inset:0 0 auto; height:.25rem; background:var(--dashboard-accent); content:""; }
.kb-dashboard-metric:hover { transform:translateY(-1px); border-color:color-mix(in srgb,var(--dashboard-accent) 35%,var(--color-border)); background:color-mix(in srgb,var(--dashboard-soft) 45%,var(--color-surface)); color:var(--color-text); box-shadow:0 17px 40px rgba(15,39,64,.09); text-decoration:none; }
.kb-dashboard-metric__icon { width:3.25rem; height:3.25rem; display:grid; flex:0 0 3.25rem; place-items:center; border-radius:var(--radius-md); background:var(--dashboard-soft); color:var(--dashboard-accent); }
.kb-dashboard-metric__icon svg { width:1.65rem; height:1.65rem; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.kb-dashboard-metric__copy { min-width:0; display:grid; gap:.18rem; }
.kb-dashboard-metric__copy strong { color:var(--color-text); font-size:var(--font-size-sm); font-weight:500; white-space:nowrap; }
.kb-dashboard-metric__copy b { color:var(--color-text); font-size:2rem; line-height:1.1; font-weight:600; letter-spacing:-.03em; }
.kb-dashboard-metric__copy small { margin-top:.35rem; color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; white-space:nowrap; }
.kb-dashboard-metric__copy small.is-positive { color:var(--color-success); }
.kb-dashboard-metric--leads { --dashboard-accent:#3f7cff; --dashboard-soft:#eaf2ff; }
.kb-dashboard-metric--prospects { --dashboard-accent:#72a8ff; --dashboard-soft:#eef5ff; }
.kb-dashboard-metric--approved { --dashboard-accent:#8f66e8; --dashboard-soft:#f1eaff; }
.kb-dashboard-metric--files { --dashboard-accent:#46bf6b; --dashboard-soft:#e8f8ee; }
.kb-dashboard-metric--closed { --dashboard-accent:#f2aa3c; --dashboard-soft:#fff3dc; }
.kb-dashboard-metric--dead { --dashboard-accent:#ef4b4b; --dashboard-soft:#ffe9e9; }

/* Canonical Clients directory */
.kb-client-directory { --client-stage:var(--color-accent); --client-stage-soft:var(--color-accent-soft); }
.kb-client-directory--leads { --client-stage:#3f7cff; --client-stage-soft:#eaf2ff; }
.kb-client-directory--all { --client-stage:#029294; --client-stage-soft:#e5f7f6; }
.kb-client-directory--prospects { --client-stage:#72a8ff; --client-stage-soft:#eef5ff; }
.kb-client-directory--approved { --client-stage:#8f66e8; --client-stage-soft:#f1eaff; }
.kb-client-directory--files { --client-stage:#46bf6b; --client-stage-soft:#e8f8ee; }
.kb-client-directory--closed { --client-stage:#f2aa3c; --client-stage-soft:#fff3dc; }
.kb-client-directory--dead { --client-stage:#ef4b4b; --client-stage-soft:#ffe9e9; }
.kb-client-directory .kb-page-header { border-top:.25rem solid var(--client-stage); box-shadow:var(--shadow-card); }
.kb-client-directory .kb-page-header__icon { background:var(--client-stage-soft); color:var(--client-stage); }
.kb-client-directory .kb-page-header h2 { font-size:clamp(1.75rem,2.2vw,2.35rem); font-weight:700; letter-spacing:-.035em; }
.kb-client-directory .kb-page-header__title { gap:var(--space-4); }
.kb-client-directory__count { border-color:color-mix(in srgb,var(--client-stage) 35%,var(--color-border)); background:var(--client-stage-soft); color:var(--client-stage); }
.kb-client-directory__header-actions { display:flex; align-items:center; justify-content:flex-end; gap:var(--space-4); }
.kb-client-directory__header-metrics { display:grid; grid-template-columns:repeat(3,minmax(6.5rem,1fr)); gap:var(--space-2); }
.kb-client-directory__header-metrics article { min-width:0; display:grid; gap:.15rem; padding:.6rem .75rem; border:1px solid color-mix(in srgb,var(--client-stage) 24%,var(--color-border)); border-radius:var(--radius-md); background:var(--client-stage-soft); }
.kb-client-directory__header-metrics span { color:var(--color-text-muted); font-size:.65rem; line-height:1.35; font-weight:500; }
.kb-client-directory__header-metrics strong { color:var(--client-stage); font-size:1rem; line-height:1.15; font-weight:600; }
.kb-client-directory__stages { min-width:0; }
.kb-client-directory__stages .kb-tabs-sample--links .kb-tabs-sample__list a.is-active { border-color:color-mix(in srgb,var(--client-stage) 42%,var(--color-border)); color:var(--client-stage); }
.kb-client-directory__stages .kb-tabs-sample--links .kb-tabs-sample__list a.is-active em { background:var(--client-stage-soft); color:var(--client-stage); }
.kb-client-directory__search { min-width:0; }
.kb-client-directory__results { min-width:0; }
.kb-client-directory__results .table-shell { box-shadow:var(--shadow-card); }
.kb-client-directory > .kb-pagination { margin-top:0; }
.kb-client-directory__table { min-width:82rem; }
.kb-client-directory__table th:first-child,.kb-client-directory__table td:first-child { width:7.5rem; text-align:center; }
.kb-client-directory__table th { color:#77889a; font-weight:500; }
.kb-client-directory__table th:last-child { text-align:right; }
.kb-client-directory__table td { color:#65778b; font-weight:400; }
.data-table__sort { display:inline-flex; align-items:center; gap:.4rem; color:inherit; text-decoration:none; }
.data-table__sort:hover { color:var(--color-accent); text-decoration:none; }
.data-table__sort span { color:#93a1af; font-size:.7rem; }
.data-table .clickable-row { cursor:pointer; }
.data-table .clickable-row:focus-visible { outline:2px solid var(--color-accent); outline-offset:-2px; }
.kb-client-directory__name { color:#52677d; font-weight:500; }
.kb-client-directory__contact { display:grid; gap:.25rem; min-width:12rem; }
.kb-client-directory__phone { color:#65778b; font-size:var(--font-size-xs); }
.kb-client-directory__contact a { width:max-content; max-width:100%; display:inline-flex; align-items:center; gap:.4rem; color:#426f91; font-size:var(--font-size-xs); text-decoration:none; overflow-wrap:anywhere; }
.kb-client-directory__contact a:hover { color:var(--color-accent); text-decoration:none; }
.kb-client-directory__contact svg { width:1rem; height:1rem; flex:0 0 1rem; stroke:currentColor; stroke-width:2; }
.kb-client-directory__contact small { color:#8391a0; font-size:var(--font-size-xs); line-height:1.45; white-space:normal; }
.kb-client-directory__status { min-height:1.65rem; display:inline-flex; align-items:center; padding:0 .65rem; border-radius:999px; background:var(--client-stage-soft); color:var(--client-stage); font-size:var(--font-size-xs); font-weight:500; }
.kb-client-directory__status--leads { background:#eaf2ff; color:#3f7cff; }
.kb-client-directory__status--prospects { background:#eef5ff; color:#4f88df; }
.kb-client-directory__status--approved { background:#f1eaff; color:#7157d9; }
.kb-client-directory__status--files { background:#e8f8ee; color:#1f9c55; }
.kb-client-directory__status--closed { background:#fff3dc; color:#a9640b; }
.kb-client-directory__status--dead { background:#ffe9e9; color:#d84040; }
.kb-client-directory__connected,.kb-rolodex-directory__connected { min-height:1.65rem; display:flex; align-items:center; justify-content:center; color:var(--color-text-soft); }
.kb-client-directory__note { max-width:18rem; display:block; color:#718197; font-size:var(--font-size-xs); line-height:1.5; white-space:normal; }
.kb-client-directory__actions { display:flex; align-items:center; justify-content:flex-end; gap:var(--space-2); white-space:nowrap; }
.kb-client-directory__actions .kb-button { min-height:2.4rem; font-weight:500; }
.kb-client-directory__actions .kb-icon-action { width:2.4rem; height:2.4rem; flex:0 0 2.4rem; }
.kb-client-directory__actions .kb-icon-action svg { width:1rem; height:1rem; }
.kb-pagination__button.is-disabled { opacity:.42; cursor:default; }
.kb-pagination__dots { padding:0 .2rem; color:var(--color-text-muted); }
.kb-pagination__button,.kb-pagination__button:hover,.kb-pagination__button.is-active { text-decoration:none; }

@media (max-width:56.25rem) {
    .kb-client-directory__table { min-width:0; }
    .kb-client-directory__results .table-shell { border:0; overflow:visible; }
    .kb-client-directory__table,.kb-client-directory__table thead,.kb-client-directory__table tbody,.kb-client-directory__table th,.kb-client-directory__table td,.kb-client-directory__table tr { display:block; }
    .kb-client-directory__table thead { display:none; }
    .kb-client-directory__table tbody { display:grid; gap:var(--space-4); }
    .kb-client-directory__table tr { border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-card); overflow:hidden; }
    .kb-client-directory__table td { display:grid; grid-template-columns:7rem minmax(0,1fr); gap:var(--space-4); padding:.8rem var(--space-4); border-bottom:1px solid var(--color-border-soft); text-align:right; }
    .kb-client-directory__table td:last-child { border-bottom:0; }
    .kb-client-directory__table td:first-child { width:auto; text-align:right; }
    .kb-client-directory__table td::before { color:#8795a4; font-size:.7rem; font-weight:500; text-align:left; text-transform:uppercase; content:attr(data-label); }
    .kb-client-directory__contact { justify-items:end; }
    .kb-client-directory__contact a { justify-content:flex-end; }
    .kb-client-directory__note { max-width:none; justify-self:end; }
    .kb-client-directory__actions { justify-content:flex-end; }
    .kb-client-directory__connected { justify-content:flex-end; }
}

@media (max-width:47.5rem) {
    .kb-client-directory { gap:var(--space-4); }
    .kb-client-directory__header-actions { width:100%; align-items:stretch; flex-direction:column; }
    .kb-client-directory__header-metrics { width:100%; grid-template-columns:repeat(3,minmax(0,1fr)); }
    .kb-client-directory__header-metrics article { text-align:center; }
    .kb-client-directory__stages .kb-tabs-sample__list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
    .kb-client-directory__stages .kb-tabs-sample__list a { width:100%; min-width:0; padding-inline:var(--space-2); text-align:center; white-space:normal; }
    .kb-client-directory__table td { grid-template-columns:5.75rem minmax(0,1fr); gap:var(--space-2); padding:.75rem; }
}
.kb-transaction-directory { --transaction-accent:var(--color-accent); --transaction-accent-soft:var(--color-accent-soft); }
.kb-transaction-directory--in_progress { --transaction-accent:#3f7cff; --transaction-accent-soft:#eaf2ff; }
.kb-transaction-directory--closing_soon { --transaction-accent:#c77b12; --transaction-accent-soft:#fff3dc; }
.kb-transaction-directory--funded { --transaction-accent:#1f9c55; --transaction-accent-soft:#e8f8ee; }
.kb-transaction-directory--cancelled { --transaction-accent:#d84040; --transaction-accent-soft:#ffe9e9; }
.kb-transaction-directory .kb-page-header { border-top:.25rem solid var(--transaction-accent); box-shadow:var(--shadow-card); }
.kb-transaction-directory .kb-page-header__icon { background:var(--transaction-accent-soft); color:var(--transaction-accent); }
.kb-transaction-directory .kb-page-header h2 { font-size:clamp(1.75rem,2.2vw,2.35rem); font-weight:700; letter-spacing:-.035em; }
.kb-transaction-directory .kb-page-header__title { gap:var(--space-4); }
.kb-transaction-directory__count { border-color:color-mix(in srgb,var(--transaction-accent) 35%,var(--color-border)); background:var(--transaction-accent-soft); color:var(--transaction-accent); }
.kb-transaction-directory__filters { min-width:0; }
.kb-transaction-directory__filters .kb-tabs-sample--links .kb-tabs-sample__list a.is-active { border-color:color-mix(in srgb,var(--transaction-accent) 42%,var(--color-border)); color:var(--transaction-accent); }
.kb-transaction-directory__filters .kb-tabs-sample--links .kb-tabs-sample__list a.is-active em { background:var(--transaction-accent-soft); color:var(--transaction-accent); }
.kb-transaction-directory__volume { min-width:10rem; display:grid; gap:.2rem; padding:.65rem .9rem; border:1px solid color-mix(in srgb,var(--transaction-accent) 25%,var(--color-border)); border-radius:var(--radius-md); background:var(--transaction-accent-soft); text-align:right; }
.kb-transaction-directory__volume span { color:var(--color-text-muted); font-size:.68rem; font-weight:500; text-transform:uppercase; }
.kb-transaction-directory__volume strong { color:var(--transaction-accent); font-size:1.05rem; line-height:1.2; font-weight:600; }
.kb-transaction-directory__search,.kb-transaction-directory__results { min-width:0; }
.kb-transaction-directory__results .table-shell { box-shadow:var(--shadow-card); }
.kb-transaction-directory > .kb-pagination { margin-top:0; }
.kb-transaction-directory__table { min-width:84rem; table-layout:fixed; }
.kb-transaction-directory__table th:first-child { width:24%; }
.kb-transaction-directory__table th:nth-child(2) { width:18%; }
.kb-transaction-directory__table th:nth-child(3) { width:30%; }
.kb-transaction-directory__table th:last-child,.kb-transaction-directory__table td:last-child { width:28%; text-align:right; }
.kb-transaction-directory__table td:last-child .kb-button { white-space:nowrap; }
.kb-transaction-directory__actions { display:flex; align-items:center; justify-content:flex-end; gap:var(--space-2); }
.kb-transaction-directory__actions .kb-button { min-height:2.4rem; font-weight:500; }
.kb-transaction-directory__table th { color:#77889a; font-weight:500; }
.kb-transaction-directory__table td { color:#65778b; font-weight:400; vertical-align:middle; }
.kb-transaction-directory__client,.kb-transaction-directory__loan,.kb-transaction-directory__date,.kb-client-transaction-card__progress { display:grid; gap:.3rem; }
.kb-transaction-directory__client { min-width:13rem; }
.kb-transaction-directory__client .kb-client-directory__name,.kb-transaction-directory__loan strong { color:#52677d; font-size:var(--font-size-sm); font-weight:500; }
.kb-transaction-directory__client small,.kb-transaction-directory__loan span,.kb-transaction-directory__loan small { color:#718197; font-size:var(--font-size-xs); line-height:1.45; }
.kb-transaction-directory__client a { width:max-content; max-width:100%; color:#426f91; font-size:var(--font-size-xs); text-decoration:none; overflow-wrap:anywhere; }
.kb-transaction-directory__client a:hover { color:var(--color-accent); text-decoration:none; }
.kb-transaction-directory__transaction { min-width:0; display:grid; grid-template-columns:2.75rem minmax(0,1fr); align-items:center; gap:var(--space-3); }
.kb-transaction-directory__transaction.transaction-card--purchase { --transaction-purpose:#3f7cff; --transaction-purpose-soft:#eaf2ff; }
.kb-transaction-directory__transaction.transaction-card--refinance { --transaction-purpose:var(--color-success); --transaction-purpose-soft:var(--color-success-soft); }
.kb-transaction-directory__transaction .transaction-card__icon { width:2.75rem; height:2.75rem; }
.kb-transaction-directory__transaction .transaction-card-context { display:grid; gap:.2rem; margin-top:.35rem; }
.kb-transaction-directory__transaction .transaction-card-context > span { color:#718197; font-size:var(--font-size-xs); line-height:1.4; }
.kb-transaction-directory__table .kb-client-transaction-card__progress { --kb-workspace-transaction:#1f9c55; min-width:14rem; padding:0; border:0; }
.kb-transaction-directory__table .kb-client-transaction-card__progress-heading > span { font-weight:400; }
.kb-transaction-directory__pills { display:flex; flex-wrap:wrap; gap:var(--space-2); }
.kb-transaction-directory__pill,.kb-transaction-directory__date-note { width:max-content; display:inline-flex; align-items:center; min-height:1.55rem; padding:0 .6rem; border-radius:var(--radius-pill); font-size:.7rem; line-height:1; font-style:normal; font-weight:500; white-space:nowrap; }
.kb-transaction-directory__pill--purchase { background:#eaf2ff; color:#3f7cff; }
.kb-transaction-directory__pill--refinance { background:#f1eaff; color:#8f66e8; }
.kb-transaction-directory__transaction .kb-transaction-directory__pill--progress { background:#eaf2ff; color:#3f7cff; }
.kb-transaction-directory__transaction .kb-transaction-directory__pill--funded { background:#e8f8ee; color:#1f8e4e; }
.kb-transaction-directory__transaction .kb-transaction-directory__pill--dead { background:#ffe9e9; color:#d84040; }
.kb-transaction-directory__property { max-width:18rem; display:block; color:#65778b; line-height:1.5; white-space:normal; }
.kb-transaction-directory__loan { min-width:11rem; }
.kb-transaction-directory__date { min-width:8.25rem; }
.kb-transaction-directory__date-note--neutral { background:#edf4ff; color:#587485; }
.kb-transaction-directory__date-note--warning { background:#fff3dc; color:#b66f10; }
.kb-transaction-directory__date-note--danger { background:#ffe9e9; color:#d84040; }
.kb-transaction-directory__date-note--funded { background:#e8f8ee; color:#1f8e4e; }
@media (max-width:72rem) {
    .kb-transaction-directory__table { min-width:0; }
    .kb-transaction-directory__results .table-shell { border:0; overflow:visible; }
    .kb-transaction-directory__table,.kb-transaction-directory__table thead,.kb-transaction-directory__table tbody,.kb-transaction-directory__table th,.kb-transaction-directory__table td,.kb-transaction-directory__table tr { display:block; }
    .kb-transaction-directory__table thead { display:none; }
    .kb-transaction-directory__table tbody { display:grid; gap:var(--space-4); }
    .kb-transaction-directory__table tr { border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-card); overflow:hidden; }
    .kb-transaction-directory__table td { display:grid; grid-template-columns:8rem minmax(0,1fr); gap:var(--space-4); padding:.8rem var(--space-4); border-bottom:1px solid var(--color-border-soft); text-align:right; }
    .kb-transaction-directory__table td:last-child { border-bottom:0; }
    .kb-transaction-directory__table td::before { color:#8795a4; font-size:.7rem; font-weight:500; text-align:left; text-transform:uppercase; content:attr(data-label); }
    .kb-transaction-directory__client,.kb-transaction-directory__loan,.kb-transaction-directory__date,.kb-client-transaction-card__progress { justify-items:end; min-width:0; }
    .kb-transaction-directory__transaction { justify-self:end; text-align:left; }
    .kb-transaction-directory__pills { justify-content:flex-end; }
    .kb-transaction-directory__client a { justify-self:end; }
    .kb-transaction-directory__property { max-width:none; justify-self:end; }
    .kb-transaction-directory__actions { justify-content:flex-end; flex-wrap:wrap; }
}
.kb-rolodex-directory { --rolodex-accent:var(--color-accent); --rolodex-accent-soft:var(--color-accent-soft); }
.kb-rolodex-directory .kb-page-header { border-top:.25rem solid var(--rolodex-accent); box-shadow:var(--shadow-card); }
.kb-rolodex-directory .kb-page-header__icon { background:var(--rolodex-accent-soft); color:var(--rolodex-accent); }
.kb-rolodex-directory .kb-page-header h2 { font-size:clamp(1.75rem,2.2vw,2.35rem); font-weight:700; letter-spacing:-.035em; }
.kb-rolodex-directory .kb-page-header__title { gap:var(--space-4); }
.kb-rolodex-directory__count { border-color:color-mix(in srgb,var(--rolodex-accent) 35%,var(--color-border)); background:var(--rolodex-accent-soft); color:var(--rolodex-accent); }
.kb-rolodex-directory__types,.kb-rolodex-directory__search,.kb-rolodex-directory__results { min-width:0; }
.kb-rolodex-directory__types .kb-tabs-sample--links .kb-tabs-sample__list a.is-active { border-color:color-mix(in srgb,var(--rolodex-accent) 42%,var(--color-border)); color:var(--rolodex-accent); }
.kb-rolodex-directory__types .kb-tabs-sample--links .kb-tabs-sample__list a.is-active em { background:var(--rolodex-accent-soft); color:var(--rolodex-accent); }
.kb-rolodex-directory__add .kb-button__icon svg { width:1rem; height:1rem; stroke-width:2.1; }
.kb-rolodex-directory__results .table-shell { box-shadow:var(--shadow-card); }
.kb-rolodex-directory > .kb-pagination { margin-top:0; }
.kb-rolodex-directory__table { min-width:86rem; }
.kb-rolodex-directory__table th:first-child,.kb-rolodex-directory__table td:first-child { width:7.5rem; text-align:center; }
.kb-rolodex-directory__table th { color:#77889a; font-weight:500; }
.kb-rolodex-directory__table td { color:#65778b; font-weight:400; vertical-align:top; }
.kb-rolodex-directory--has-actions .kb-rolodex-directory__table th:last-child,.kb-rolodex-directory--has-actions .kb-rolodex-directory__table td:last-child { width:6.75rem; text-align:right; }
.kb-rolodex-directory__company,.kb-rolodex-directory__name { display:block; color:#52677d; font-weight:500; }
.kb-rolodex-directory__job { display:block; margin-top:.2rem; color:#8391a0; font-size:var(--font-size-xs); font-weight:400; }
.kb-rolodex-directory__address-block { max-width:20rem; display:grid; gap:.35rem; }
.kb-rolodex-directory__address { display:block; color:#718197; line-height:1.5; white-space:normal; }
.kb-rolodex-directory__note { display:block; color:#718197; font-size:var(--font-size-xs); line-height:1.5; overflow-wrap:anywhere; white-space:pre-wrap; }
.kb-rolodex-directory__note strong { color:#52677d; font-weight:600; }
.kb-rolodex-directory__contact { min-width:12rem; display:grid; gap:.3rem; }
.kb-rolodex-directory__contact a { width:max-content; max-width:100%; color:#426f91; font-size:var(--font-size-xs); text-decoration:none; overflow-wrap:anywhere; }
.kb-rolodex-directory__contact a:hover { color:var(--color-accent); text-decoration:none; }
.kb-rolodex-directory__type { width:max-content; min-height:1.65rem; display:inline-flex; align-items:center; padding:0 .65rem; border-radius:var(--radius-pill); background:var(--color-accent-soft); color:var(--color-accent); font-size:var(--font-size-xs); font-weight:500; }
.kb-rolodex-directory__type--title { background:#f1eaff; color:#7157d9; }
.kb-rolodex-directory__type--escrow { background:#e9fbf2; color:#168b55; }
.kb-rolodex-directory__type--appraiser { background:#fff3dc; color:#a9640b; }
.kb-rolodex-directory__type--other { background:#f0f3f6; color:#66778b; }
.kb-rolodex-directory__actions { display:flex; align-items:center; justify-content:flex-end; gap:var(--space-2); }
.kb-rolodex-directory__actions .kb-icon-action { width:2.4rem; height:2.4rem; flex:0 0 2.4rem; }
.kb-rolodex-directory__actions .kb-icon-action svg { width:1rem; height:1rem; }
.kb-rolodex-directory__phone { color:var(--color-text-muted); }
.kb-rolodex-type-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-3); }
.kb-rolodex-type-option { width:100%; min-height:4rem; justify-content:flex-start; color:#52677d; font-weight:500; text-align:left; }
.kb-rolodex-form-modal form { min-height:0; display:grid; grid-template-rows:minmax(0,1fr) auto; }
.kb-rolodex-form__body { background:var(--color-surface); }
.kb-rolodex-form__sections { width:100%; min-width:0; display:grid; gap:var(--space-5); }
.kb-rolodex-form__section { width:100%; min-width:0; display:grid; gap:var(--space-4); }
.kb-rolodex-form__grid { width:100%; min-width:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-4); }
.kb-rolodex-form__grid > .field { width:100%; min-width:0; max-width:none; grid-column:auto; }
.kb-rolodex-form__grid > .field--full { width:auto; min-width:0; max-width:none; grid-column:1 / -1; justify-self:stretch; }
.kb-rolodex-form__grid .field__control { width:100%; min-width:0; max-width:none; box-sizing:border-box; }
.kb-rolodex-form__grid > .field.kb-rolodex-form__note { width:100%; min-width:0; max-width:none; grid-column:1 / -1; justify-self:stretch; }
.kb-rolodex-form__note textarea.field__control { display:block; width:100%; min-width:0; max-width:none; }
.kb-rolodex-linked-profile__details { margin-top:0; border-top:0; }
.kb-rolodex-delete-modal .kb-section-instruction { margin-bottom:var(--space-4); }

@media (max-width:62rem) {
    .kb-rolodex-directory__table { min-width:0; }
    .kb-rolodex-directory__results .table-shell { border:0; overflow:visible; }
    .kb-rolodex-directory__table,.kb-rolodex-directory__table thead,.kb-rolodex-directory__table tbody,.kb-rolodex-directory__table th,.kb-rolodex-directory__table td,.kb-rolodex-directory__table tr { display:block; }
    .kb-rolodex-directory__table thead { display:none; }
    .kb-rolodex-directory__table tbody { display:grid; gap:var(--space-4); }
    .kb-rolodex-directory__table tr { border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-card); overflow:hidden; }
    .kb-rolodex-directory__table td { display:grid; grid-template-columns:7rem minmax(0,1fr); gap:var(--space-4); padding:.8rem var(--space-4); border-bottom:1px solid var(--color-border-soft); text-align:right; }
    .kb-rolodex-directory__table td:last-child { width:auto; border-bottom:0; }
    .kb-rolodex-directory__table td:first-child { width:auto; text-align:right; }
    .kb-rolodex-directory__table td::before { color:#8795a4; font-size:.7rem; font-weight:500; text-align:left; text-transform:uppercase; content:attr(data-label); }
    .kb-rolodex-directory__address-block { max-width:none; justify-self:end; text-align:right; }
    .kb-rolodex-directory__contact { justify-items:end; }
    .kb-rolodex-directory__contact a { text-align:right; }
    .kb-rolodex-directory__connected { justify-content:flex-end; }
}

@media (max-width:47.5rem) {
    .kb-rolodex-directory { gap:var(--space-4); }
    .kb-rolodex-directory__types .kb-tabs-sample__list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
    .kb-rolodex-directory__types .kb-tabs-sample__list a { width:100%; min-width:0; padding-inline:var(--space-2); text-align:center; white-space:normal; }
    .kb-rolodex-directory__table td { grid-template-columns:5.75rem minmax(0,1fr); gap:var(--space-2); padding:.75rem; }
    .kb-rolodex-type-grid,.kb-rolodex-form__grid,.kb-rolodex-linked-profile__details { grid-template-columns:minmax(0,1fr); }
    .kb-rolodex-form__grid > .field--full { grid-column:auto; }
    .kb-rolodex-form__grid > .field.kb-rolodex-form__note { grid-column:1 / -1; }
}
@media (max-width:42rem) {
    .kb-form .kb-choice-row.kb-choice-list--grid { grid-template-columns:1fr; }
    .kb-transaction-directory__filters .kb-tabs-sample__list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
    .kb-transaction-directory__filters .kb-tabs-sample__list a { width:100%; min-width:0; padding-inline:var(--space-2); text-align:center; white-space:normal; }
    .kb-transaction-directory__volume { width:100%; text-align:left; }
    .kb-transaction-directory__table td { grid-template-columns:6.5rem minmax(0,1fr); gap:var(--space-2); padding:.75rem; }
}
.kb-dashboard-actions { display:flex; align-items:center; gap:var(--space-2); padding:var(--space-2); border:1px solid var(--color-border); border-radius:var(--radius-pill); background:#f3f6f8; box-shadow:var(--shadow-sm); }
.kb-dashboard-actions .kb-button { min-width:0; max-width:100%; box-sizing:border-box; text-decoration:none; }
.kb-dashboard-actions .kb-button--secondary { gap:.75rem; }
.kb-dashboard-actions .kb-button--secondary .kb-button__icon { width:1.25rem; height:1.25rem; flex-basis:1.25rem; place-items:center; }
.kb-dashboard-actions .kb-button--secondary svg { width:1.25rem; height:1.25rem; display:block; stroke:currentColor; stroke-width:2; }
.kb-dashboard-actions .kb-button--secondary .kb-button__label { line-height:1; }
.kb-dashboard-actions .kb-dashboard-actions__primary { margin-left:auto; }
.kb-dashboard-actions__primary .kb-button__icon { width:1rem; height:1rem; }
.kb-add-client-action .kb-button__icon svg { width:100%; height:100%; }
.kb-dashboard-panels { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-6); }
.kb-dashboard-panel { min-width:0; min-height:20rem; display:flex; flex-direction:column; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-card); overflow:hidden; }
.kb-dashboard-panel > header { min-height:4.5rem; display:flex; align-items:center; justify-content:space-between; gap:var(--space-4); padding:var(--space-4) var(--space-5); border-bottom:1px solid var(--color-border-soft); }
.kb-dashboard-panel > header h2 { display:flex; align-items:center; gap:var(--space-3); margin:0; color:var(--color-text); font-size:var(--font-size-md); font-weight:600; }
.kb-dashboard-panel__body { flex:1; min-width:0; padding:var(--space-5); }
.kb-dashboard-panel__period,.kb-dashboard-panel__link { min-height:2.25rem; display:inline-flex; align-items:center; justify-content:center; padding:.4rem .8rem; border:1px solid var(--color-border); border-radius:var(--radius-pill); background:var(--color-surface); color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; white-space:nowrap; }
.kb-dashboard-panel__link { text-decoration:none; cursor:pointer; }
.kb-dashboard-panel__link:hover { transform:translateY(-1px); border-color:#9ed4d2; background:var(--color-accent-soft); color:var(--color-text); text-decoration:none; }
.kb-dashboard-panel__count { min-width:1.75rem; height:1.75rem; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; padding:0 .45rem; border:1px solid #9ed4d2; border-radius:var(--radius-md); background:var(--color-accent-soft); color:var(--color-accent); font-size:var(--font-size-xs); line-height:1; font-weight:500; }
.kb-dashboard-panel__displaying { color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; white-space:nowrap; }
.kb-dashboard-pipeline { height:100%; display:grid; grid-template-columns:minmax(9rem,11rem) minmax(0,1fr); align-items:start; gap:var(--space-6); }
.kb-dashboard-pipeline__chart { position:relative; width:100%; aspect-ratio:1; display:grid; place-items:center; }
.kb-dashboard-pipeline__chart canvas { position:absolute; inset:0; width:100%; height:100%; }
.kb-dashboard-pipeline__chart > div { position:relative; z-index:1; display:grid; justify-items:center; gap:.15rem; }
.kb-dashboard-pipeline__chart span { color:var(--color-text-muted); font-size:var(--font-size-xs); }
.kb-dashboard-pipeline__chart strong { color:var(--color-text); font-size:1.5rem; font-weight:600; }
.kb-dashboard-pipeline__legend { display:grid; gap:.65rem; margin:0; padding:0; list-style:none; }
.kb-dashboard-pipeline__legend-item { display:grid; grid-template-columns:.65rem minmax(0,1fr) auto; align-items:center; gap:var(--space-3); padding:.25rem; border-radius:var(--radius-sm); }
.kb-dashboard-pipeline__legend-item:hover { background:#f5f8fa; }
.kb-dashboard-pipeline__legend-item > span { width:.6rem; height:.6rem; border-radius:50%; background:var(--dashboard-legend); }
.kb-dashboard-pipeline__legend-item em,.kb-dashboard-pipeline__legend-item strong { color:var(--color-text-muted); font-size:var(--font-size-xs); font-style:normal; font-weight:400; }
.kb-dashboard-pipeline__legend-item strong { color:var(--color-text); white-space:nowrap; }
.kb-dashboard-pipeline__legend-item--leads { --dashboard-legend:#3f7cff; }.kb-dashboard-pipeline__legend-item--prospects { --dashboard-legend:#72a8ff; }.kb-dashboard-pipeline__legend-item--approved { --dashboard-legend:#8f66e8; }.kb-dashboard-pipeline__legend-item--files { --dashboard-legend:#46bf6b; }.kb-dashboard-pipeline__legend-item--closed { --dashboard-legend:#f2aa3c; }.kb-dashboard-pipeline__legend-item--dead { --dashboard-legend:#ef4b4b; }
.kb-dashboard-summaries,.kb-follow-up-list { display:grid; gap:var(--space-3); }
.kb-dashboard-follow-ups .kb-empty-state { min-height:13rem; align-content:center; }
.kb-follow-up-card { display:grid; grid-template-columns:2.75rem 5.25rem minmax(0,1fr) auto; align-items:center; gap:var(--space-3); padding:var(--space-3); border:1px solid var(--color-border-soft); border-radius:var(--radius-md); background:var(--color-surface); color:var(--color-text); text-decoration:none; }
.kb-follow-up-card:hover { transform:translateY(-1px); border-color:#c8dce7; background:#f6fbfd; box-shadow:var(--shadow-sm); color:var(--color-text); text-decoration:none; }
.kb-follow-up-card__icon { width:2.75rem; height:2.75rem; display:grid; place-items:center; border-radius:var(--radius-md); background:#e8f6fc; color:#2f8fbd; }
.kb-follow-up-card__icon svg { width:1.25rem; height:1.25rem; stroke:currentColor; stroke-width:2; }
.kb-follow-up-card__date,.kb-follow-up-card__copy { min-width:0; display:grid; gap:.15rem; }
.kb-follow-up-card__date strong,.kb-follow-up-card__copy strong { color:var(--color-text); font-size:var(--font-size-sm); font-weight:500; }
.kb-follow-up-card__date span,.kb-follow-up-card__copy span { color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; overflow-wrap:anywhere; }
.kb-follow-up-card em { padding:.35rem .65rem; border-radius:var(--radius-pill); background:#ffe9e9; color:var(--color-danger); font-size:var(--font-size-xs); font-style:normal; font-weight:500; white-space:nowrap; }
.kb-follow-up-card.is-past-due .kb-follow-up-card__icon { background:#ffe9e9; color:var(--color-danger); }
.kb-follow-up-list--modal .kb-follow-up-card { grid-template-columns:2.75rem 7.5rem minmax(0,1fr) auto; }
.kb-follow-up-list--modal .kb-follow-up-card__date strong { white-space:nowrap; }
.kb-dashboard-summary { display:flex; align-items:center; justify-content:space-between; gap:var(--space-4); padding:var(--space-4); border:1px solid var(--color-border-soft); border-radius:var(--radius-md); background:#f8fafc; color:var(--color-text); text-decoration:none; }
.kb-dashboard-summary:hover { border-color:#c8d6e2; background:var(--color-surface); box-shadow:var(--shadow-sm); color:var(--color-text); text-decoration:none; }
.kb-dashboard-summary > span { min-width:0; display:grid; gap:.15rem; }
.kb-dashboard-summary strong { color:var(--color-text); font-size:var(--font-size-sm); font-weight:500; }
.kb-dashboard-summary small { color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; }
.kb-dashboard-summary em { min-width:3rem; min-height:2.25rem; display:inline-flex; align-items:center; justify-content:center; padding:0 .7rem; border-radius:var(--radius-pill); background:var(--dashboard-summary-soft); color:var(--dashboard-summary-accent); font-size:var(--font-size-sm); font-style:normal; font-weight:600; white-space:nowrap; }
.kb-dashboard-summary--blue { --dashboard-summary-soft:#eaf2ff; --dashboard-summary-accent:#3f7cff; }.kb-dashboard-summary--orange { --dashboard-summary-soft:#fff3dc; --dashboard-summary-accent:#c77b12; }.kb-dashboard-summary--green { --dashboard-summary-soft:#e8f8ee; --dashboard-summary-accent:#1f9c55; }.kb-dashboard-summary--purple { --dashboard-summary-soft:#f1eaff; --dashboard-summary-accent:#7157d9; }

/* Global Search and My Saved Clients modal compositions. */
.kb-search-directory,.kb-saved-client-directory { display:grid; gap:var(--space-4); }
.kb-search-directory__back { justify-self:start; }
.kb-search-directory__section-heading { display:flex; align-items:center; gap:.65rem; }
.kb-search-directory__section-heading h3,.kb-search-directory__quick > h3 { margin:0; color:var(--color-text); font-size:var(--font-size-md); font-weight:600; }
.kb-search-directory__section-heading > span { min-width:1.75rem; height:1.75rem; display:inline-grid; place-items:center; padding:0 .45rem; border-radius:var(--radius-pill); background:var(--color-accent-soft); color:var(--color-accent); font-size:var(--font-size-xs); font-weight:600; }
.kb-search-directory__results,.kb-search-directory__quick { display:grid; gap:var(--space-3); }
.kb-search-directory__list,.kb-saved-client-directory__list { display:grid; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-card); overflow:hidden; }
.kb-search-directory__row { display:grid; grid-template-columns:3rem minmax(0,1fr) 2.4rem; align-items:center; gap:var(--space-3); padding:var(--space-3) var(--space-4); border-bottom:1px solid var(--color-border-soft); color:var(--color-text); text-decoration:none; }
.kb-search-directory__row:last-child { border-bottom:0; }
.kb-search-directory__row:hover { background:#f6fbfd; color:var(--color-text); text-decoration:none; }
.kb-search-directory__row-icon,.kb-saved-client-directory__icon { width:3rem; height:3rem; display:grid; place-items:center; border-radius:var(--radius-md); background:#eaf2ff; color:#3f7cff; }
.kb-search-directory__row--contact .kb-search-directory__row-icon { background:#fff3dc; color:#b46d0d; }
.kb-search-directory__row--rolodex .kb-search-directory__row-icon { background:#f1eaff; color:#7157d9; }
.kb-search-directory__row-icon svg,.kb-saved-client-directory__icon svg,.kb-search-directory__view svg { width:1.25rem; height:1.25rem; stroke:currentColor; stroke-width:2; }
.kb-search-directory__row-copy { min-width:0; display:grid; gap:.2rem; }
.kb-search-directory__row-copy > span { display:flex; align-items:center; flex-wrap:wrap; gap:.55rem; }
.kb-search-directory__row-copy strong { color:var(--color-text); font-size:var(--font-size-sm); font-weight:500; }
.kb-search-directory__row-copy em,.kb-saved-client-directory__stage { padding:.2rem .55rem; border-radius:var(--radius-pill); background:var(--color-accent-soft); color:var(--color-accent); font-size:var(--font-size-xs); font-style:normal; font-weight:500; }
.kb-search-directory__row-copy small { color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; overflow-wrap:anywhere; }
.kb-search-directory__view { position:relative; width:2.4rem; height:2.4rem; display:grid; place-items:center; border:1px solid var(--color-border); border-radius:var(--radius-md); background:#fff; color:var(--color-text-muted); }
.kb-search-directory__view::after { position:absolute; z-index:var(--layer-popover); right:calc(100% + .45rem); bottom:50%; width:max-content; max-width:12rem; padding:.45rem .6rem; border:1px solid #d8e0e6; border-radius:var(--radius-sm); background:#f1f3f5; color:#3f5061; box-shadow:var(--shadow-sm); content:attr(data-kb-label); font-size:var(--font-size-xs); font-weight:400; line-height:1.3; opacity:0; pointer-events:none; transform:translateY(50%); visibility:hidden; }
.kb-search-directory__view:hover::after,.kb-search-directory__row:focus-visible .kb-search-directory__view::after { opacity:1; visibility:visible; }
.kb-search-directory__row:hover .kb-search-directory__view,.kb-search-directory__row:focus-visible .kb-search-directory__view { border-color:rgba(2,146,148,.3); background:var(--color-accent-soft); color:var(--color-accent); box-shadow:var(--shadow-sm); }
.kb-my-settings-directory .kb-settings-list { padding:.1rem; }
.kb-search-directory__quick-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-3); }
.kb-search-directory__quick-grid > a { display:grid; grid-template-columns:3rem minmax(0,1fr); align-items:center; gap:var(--space-3); padding:var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-lg); background:#fff; color:var(--color-text); text-decoration:none; }
.kb-search-directory__quick-grid > a:hover { border-color:#b9c7d6; background:#f6fbfd; box-shadow:var(--shadow-sm); color:var(--color-text); text-decoration:none; }
.kb-search-directory__quick-grid > a > span:first-child { width:3rem; height:3rem; display:grid; place-items:center; border-radius:var(--radius-md); background:var(--color-accent-soft); color:var(--color-accent); }
.kb-search-directory__quick-grid svg { width:1.25rem; height:1.25rem; stroke:currentColor; stroke-width:2; }
.kb-search-directory__quick-grid strong,.kb-search-directory__quick-grid small { display:block; }
.kb-search-directory__quick-grid strong { color:var(--color-text); font-size:var(--font-size-sm); font-weight:500; }
.kb-search-directory__quick-grid small { margin-top:.2rem; color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; }
.kb-saved-client-directory__row { display:grid; grid-template-columns:3rem minmax(0,1fr) auto; align-items:center; gap:var(--space-3); padding:var(--space-3) var(--space-4); border-bottom:1px solid var(--color-border-soft); color:var(--color-text); text-decoration:none; }
.kb-saved-client-directory__row:last-child { border-bottom:0; }
.kb-saved-client-directory__row:hover { background:#f6fbfd; color:var(--color-text); text-decoration:none; }
.kb-saved-client-directory__icon { background:#f1eaff; color:#7157d9; }
.kb-saved-client-directory__copy { min-width:0; display:grid; gap:.25rem; }
.kb-saved-client-directory__copy strong { color:var(--color-text); font-size:var(--font-size-sm); font-weight:500; }
.kb-saved-client-directory__copy > span { display:flex; flex-wrap:wrap; gap:.2rem .75rem; }
.kb-saved-client-directory__copy small,.kb-saved-client-directory__side small { color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; overflow-wrap:anywhere; }
.kb-saved-client-directory__side { display:grid; justify-items:end; gap:.35rem; }
.kb-saved-client-directory__stage--pre_approved { background:#f1eaff; color:#8f66e8; }.kb-saved-client-directory__stage--active_file { background:#e8f8ee; color:#1f9c55; }.kb-saved-client-directory__stage--closed { background:#fff3dc; color:#c77b12; }.kb-saved-client-directory__stage--inactive { background:#ffe9e9; color:#ef4b4b; }
.kb-saved-client-directory > .kb-pagination { margin-top:0; }

/* Users is an Admin Settings sub-workflow assembled from the canonical modal, tabs, search, table, form, and paging contracts. */
.kb-user-directory-modal .kb-modal__body { display:grid; gap:var(--space-4); }
.kb-user-directory { background:var(--color-surface); }
.kb-user-directory__counter { min-width:2.75rem; height:2.75rem; display:grid; place-items:center; padding:0 .7rem; border:1px solid #9ed4d2; border-radius:var(--radius-md); background:var(--color-accent-soft); color:var(--color-accent); font-size:var(--font-size-sm); font-weight:500; }
.kb-user-directory__toolbar { display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); }
.kb-user-directory__seats { display:flex; align-items:center; justify-content:space-between; gap:var(--space-4); padding:var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-canvas); }
.kb-user-directory__seats > div { display:flex; align-items:center; flex-wrap:wrap; gap:.35rem .75rem; }
.kb-user-directory__seats strong { color:var(--color-text); font-size:var(--font-size-sm); font-weight:600; }
.kb-user-directory__seats span { color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; }
.kb-user-directory__results { min-height:8rem; border-radius:var(--radius-lg); }
.kb-user-directory__results .table-shell { border-radius:var(--radius-lg); box-shadow:var(--shadow-card); }
.kb-user-directory__table th:last-child,.kb-user-directory__table td:last-child { width:1%; text-align:right; white-space:nowrap; }
.kb-user-directory__person,.kb-user-directory__email { display:grid; gap:.2rem; }
.kb-user-directory__person strong { color:var(--color-text); font-size:var(--font-size-sm); font-weight:500; }
.kb-user-directory__person small,.kb-user-directory__email { color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; }
.kb-user-directory__email { justify-items:start; }
.kb-user-directory__email .status-badge,.kb-user-directory__permission { padding:.25rem .55rem; font-size:.7rem; font-weight:400; }
.kb-user-directory__last-login { display:grid; gap:.15rem; color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; line-height:1.35; }
.kb-user-directory__last-login small { color:var(--color-text-soft); font-size:.7rem; font-weight:400; }
.kb-user-directory__actions { display:flex; align-items:center; justify-content:flex-end; gap:var(--space-2); }
.kb-user-directory__actions form { display:flex; margin:0; }
.kb-user-workflow .form-grid { gap:var(--space-4); }
.kb-user-workflow .kb-section-instruction { margin-bottom:var(--space-4); }
.kb-user-password-reset-instruction { margin-top:var(--space-4); }
.kb-user-workflow__back { display:flex; justify-content:flex-start; margin-bottom:var(--space-4); }
.kb-user-delete-preview { display:grid; gap:.2rem; margin-bottom:var(--space-4); padding:var(--space-4); border:1px solid var(--color-border-soft); border-radius:var(--radius-md); background:var(--color-canvas); }
.kb-user-delete-preview strong { color:var(--color-text); font-size:var(--font-size-sm); font-weight:600; }
.kb-user-delete-preview span { color:var(--color-text-muted); font-size:var(--font-size-xs); font-weight:400; }
.kb-user-delete-form .delete-warning + .field { margin-top:var(--space-4); }
.kb-user-activity__table td:first-child { color:var(--color-text); font-weight:400; }
.kb-user-activity__table a { color:var(--color-link); text-decoration:none; }
.kb-modal .kb-modal__body.kb-user-activity-workflow { min-height:0; margin:0 var(--kb-modal-body-padding); padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.kb-user-activity { display:grid; min-height:0; gap:var(--space-4); }
.kb-user-activity__results { max-height:min(32rem,calc(100dvh - 21rem)); border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-card); }
.kb-user-activity__results .table-shell { border:0; border-radius:var(--radius-lg); box-shadow:none; }
.kb-user-activity__results .kb-empty-state { min-height:16rem; }
.identity-email-locked { border-color:var(--color-border-soft) !important; background:var(--color-disabled-surface) !important; color:var(--color-text-muted) !important; cursor:not-allowed; }
@media (max-width:42rem) {
    .kb-user-directory__toolbar,.kb-user-directory__seats { align-items:stretch; flex-direction:column; }
    .kb-user-directory__toolbar .kb-button { width:100%; }
    .kb-user-directory__seats > div { display:grid; }
    .kb-user-directory__actions { flex-wrap:wrap; }
}
@media (max-width:93.75rem) { .kb-dashboard-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:80rem) { .kb-dashboard-panels { grid-template-columns:1fr; } }
@media (max-width:61.25rem) { .kb-dashboard-actions { flex-wrap:wrap; border-radius:var(--radius-lg); } .kb-dashboard-actions .kb-button { flex:1 1 12rem; } .kb-dashboard-actions .kb-dashboard-actions__primary { flex-basis:100%; margin-left:0; } }
@media (max-width:47.5rem) { .kb-dashboard { gap:var(--space-5); padding:var(--space-5) var(--space-4); } .kb-dashboard-metrics { grid-template-columns:1fr; gap:var(--space-4); } .kb-dashboard-metric { min-height:7.5rem; } .kb-dashboard-actions { align-items:stretch; flex-direction:column; } .kb-dashboard-actions .kb-button { width:100%; flex:none; } .kb-dashboard-panel > header { align-items:flex-start; flex-direction:column; } .kb-dashboard-panel > header h2 { flex-wrap:wrap; } .kb-dashboard-panel__period,.kb-dashboard-panel__link { width:100%; box-sizing:border-box; } .kb-dashboard-pipeline { grid-template-columns:1fr; } .kb-dashboard-pipeline__chart { width:min(12rem,70vw); margin:0 auto; } .kb-follow-up-card,.kb-follow-up-list--modal .kb-follow-up-card { grid-template-columns:2.75rem minmax(0,1fr); align-items:start; } .kb-follow-up-card__icon { grid-row:1 / span 3; } .kb-follow-up-card__date,.kb-follow-up-card__copy,.kb-follow-up-card em { grid-column:2; } .kb-follow-up-card em { justify-self:start; } }
@media (max-width: 48rem) { .kb-gallery__grid { grid-template-columns: 1fr; } }

@media (max-width: 62rem) { .kb-color-grid,.kb-card-showcase,.kb-progress-showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 42rem) {
    .kb-foundations { padding: 1rem; }
    .kb-component-section { padding: 1rem; }
    .kb-type-specimen__row { grid-template-columns: 1fr; gap: .75rem; }
    .kb-color-grid { grid-template-columns: 1fr; }
    .kb-button-showcase,.kb-button-showcase .kb-button { width: 100%; }
    .kb-button-showcase .kb-icon-action { width: 2.875rem; }
    .kb-card-showcase,.kb-toast-showcase,.kb-progress-showcase { grid-template-columns: 1fr; }
    .kb-search,.kb-search-sample { grid-template-columns: 1fr; }
    .kb-search__icon,.kb-search-sample > span { top: 1.625rem; }
    .kb-search .kb-button,.kb-search-sample .kb-button { width: 100%; }
    .kb-recorder-sample__heading { display: grid; }
    .kb-recorder-sample__heading em { justify-self: start; }
    .kb-recorder-sample__actions > span { width: 100%; margin-left: 0; }
    .kb-audio-player { grid-template-columns: 2.75rem auto minmax(4rem,1fr) auto; gap: .45rem; }
    .kb-email-stage { padding: .75rem; }
    .kb-email-preview__body { padding: 1.5rem 1rem; }
    .kb-email-preview header,.kb-email-preview footer { padding-inline: 1rem; }
    .kb-action-row { grid-template-columns: 2.75rem minmax(0,1fr); align-items: start; }
    .kb-action-row time { grid-column: 2; }
    .kb-action-row__copy { grid-column: 1 / -1; }
    .kb-action-row__actions,.kb-action-row > .status-badge { grid-column: 1 / -1; justify-content: flex-start; }
    .kb-action-row--compact .kb-action-row__copy { grid-column:2; }
    .kb-action-row--compact .kb-action-row__actions { grid-column:1 / -1; }
    .kb-identity-grid,.kb-identity-grid--pipeline { grid-template-columns:1fr; }
    .kb-incoming-demo { grid-template-columns:3rem minmax(0,1fr); }
    .kb-incoming-demo__actions { grid-column:1 / -1; justify-content:flex-end; flex-wrap:wrap; }
    .kb-settings-list__row { grid-template-columns: 3rem minmax(0,1fr); }
    .kb-settings-list em,.kb-settings-list b,.kb-settings-list__row > .kb-plan-badge { grid-column: 2; justify-self: start; }
    .kb-plan-badge-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .kb-modal .form-grid { grid-template-columns: minmax(0, 1fr); }
    .kb-modal .form-grid > .field,
    .kb-modal .form-grid > .field--full {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
    }
    .kb-modal .field textarea { width: 100%; min-width: 0; max-width: 100%; }
    .kb-pagination { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .kb-pagination__summary,
    .kb-pagination__per-page { justify-self: center; }
    .kb-pagination__pages { flex-wrap: wrap; }
    .kb-filter-bar { grid-template-columns:1fr; align-items:stretch; }
    .kb-filter-bar__controls { display:grid; grid-template-columns:1fr; }
    .kb-filter-bar__field { width:100%; }
    .kb-filter-bar__summary { white-space:normal; }
    .kb-date-navigator { grid-template-columns:1fr 1fr; }
    .kb-date-navigator__picker { grid-column:1 / -1; grid-row:1; }
    .kb-date-navigator__button { grid-row:2; width:100%; }
    .kb-note-card__heading { display:grid; }
    .kb-note-card__actions { justify-content:flex-start; }
    .kb-form .kb-choice-row.call-outcome-grid { grid-template-columns:1fr; }
    .kb-page-header { grid-template-columns:3rem minmax(0,1fr); align-items:start; }
    .kb-page-header--without-icon { grid-template-columns:minmax(0,1fr); }
    .kb-page-header__actions { grid-column:1 / -1; justify-content:flex-start; flex-wrap:wrap; }
    .kb-page-header__actions .kb-button { width:100%; }
    .kb-search-directory__quick-grid { grid-template-columns:1fr; }
    .kb-search-directory__row { grid-template-columns:3rem minmax(0,1fr); }
    .kb-search-directory__view { display:none; }
    .kb-saved-client-directory__row { grid-template-columns:3rem minmax(0,1fr); align-items:start; }
    .kb-saved-client-directory__side { grid-column:2; justify-items:start; }
}

/* The canonical shell owns one consistent visual gap between every modal header and body. */
body .kb-modal > .kb-modal__body,
body .kb-modal > form > .kb-modal__body {
    padding-top:var(--kb-modal-body-padding-top)!important;
}

/* Default modal content is one canonical white bubble; approved directory/result exceptions opt into plain. */
body .kb-modal--content-bubble > .kb-modal__body,
body .kb-modal--content-bubble > form > .kb-modal__body {
    box-sizing:border-box;
    margin:0 var(--kb-modal-body-padding);
    padding:var(--space-4)!important;
    border:1px solid var(--color-border);
    border-radius:var(--radius-lg);
    background:var(--color-surface)!important;
    box-shadow:var(--shadow-sm);
}
body .kb-modal--content-plain > .kb-modal__body,
body .kb-modal--content-plain > form > .kb-modal__body {
    border-color:transparent;
    background:transparent;
    box-shadow:none;
}

/* Canonical Krossbound Connect identity indicator and invitation summaries. */
.kb-person-name{display:inline-flex;align-items:center;gap:.375rem;min-width:0}
.kb-connect-status{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:1.5rem;height:1.5rem;padding:0;border:1px solid transparent;border-radius:var(--radius-pill);background:transparent;color:var(--color-text-muted);vertical-align:middle}
.kb-connect-status img{display:block;width:1rem;height:1rem;object-fit:contain}
button.kb-connect-status{gap:.3rem;min-width:auto;padding:0 .5rem 0 .35rem;border-color:var(--color-border);background:var(--color-surface);cursor:pointer;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}
button.kb-connect-status span{font-size:.6875rem;font-weight:400;line-height:1;letter-spacing:.01em}
button.kb-connect-status:hover{border-color:var(--color-accent);background:var(--color-accent-soft)}
button.kb-connect-status:focus-visible{outline:0;box-shadow:var(--focus-ring)}
.kb-connect-status.is-connected{background:var(--color-success-soft)}
.kb-connect-status.is-disconnected img{filter:grayscale(1);opacity:.55}
.kb-connect-invite-summary,.kb-connect-participants{display:grid;gap:var(--space-3)}
.kb-connect-invite-summary>span{color:var(--color-text-muted);overflow-wrap:anywhere}
.kb-connect-participant{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding:var(--space-3);border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface)}
.kb-connect-participant>div{display:grid;gap:var(--space-1);min-width:0}.kb-connect-participant small{color:var(--color-text-muted);overflow-wrap:anywhere}
.kb-connect-participant__actions{display:flex!important;align-items:center;justify-content:flex-end;grid-auto-flow:column;gap:var(--space-2)!important}.kb-connect-participant__actions form{margin:0}.kb-connect-participant__actions button.kb-connect-status{height:2.25rem;padding-inline:.875rem}.kb-connect-participant__registration-note{max-width:13rem;text-align:right}.mini-pill--success{border:1px solid #a6ddb9;background:var(--color-success-soft,#e8f8ee);color:#1f7a45}.kb-icon-action.kb-connect-remove-access{width:2rem;height:2rem;border-radius:var(--radius-sm)}.kb-connect-remove-access svg{width:1rem;height:1rem;stroke-width:1.9}
@media (max-width:640px){.kb-connect-participant{align-items:stretch;flex-direction:column}.kb-connect-participant__actions{align-items:stretch;grid-auto-flow:row;flex-wrap:wrap;justify-content:flex-start}.kb-connect-participant__registration-note{max-width:none;text-align:left}.kb-connect-participant form .kb-button{width:100%}.kb-people-list article{grid-template-columns:2.25rem minmax(0,1fr)}.kb-people-list article>.kb-person-access-status{grid-column:2;justify-self:start}}
@media (max-width:640px){.kb-transaction-activity>header{align-items:flex-start;flex-direction:column}.kb-transaction-activity__filters{width:100%;justify-content:flex-start}.kb-transaction-activity__filters .kb-button{flex:1 1 auto}}
@media (max-width:640px){.kb-activity-list .kb-activity-row{grid-template-columns:2.25rem minmax(0,1fr);align-items:start}.kb-activity-row__date,.kb-activity-row__activity,.kb-activity-row__type{grid-column:2}.kb-activity-row__activity{grid-row:auto}.kb-activity-row__type{margin-top:0}}
@media (max-width:640px){.kb-rate-lock>header{align-items:flex-start}.kb-rate-lock__header-actions{justify-content:flex-end}.kb-rate-lock__header-actions .kb-button{white-space:nowrap}}

/* Canonical centered footer for public products and central identity surfaces. */
.kb-skip-link{position:fixed;inset:.75rem auto auto .75rem;z-index:var(--layer-popover);transform:translateY(-160%);padding:.75rem 1rem;border-radius:var(--radius-md);background:var(--color-text);color:var(--color-surface)}
.kb-skip-link:focus{transform:translateY(0)}
.kb-public-footer{display:flex;align-items:center;justify-content:center;min-height:4rem;padding:var(--space-4) clamp(var(--space-4),4vw,var(--space-12));border-top:1px solid var(--color-border);background:var(--color-surface);color:var(--color-text-muted);font-size:var(--font-size-xs);text-align:center}

/* Keep the milestone modifier authoritative over the earlier vertical base contract. */
.kb-timeline.kb-timeline--milestones{width:100%;display:flex;box-sizing:border-box;margin:0;padding:var(--space-3) var(--space-2) var(--space-2);overflow-x:auto}
.kb-timeline.kb-timeline--milestones::before{top:2.375rem;right:4rem;bottom:auto;left:4rem;width:auto;height:2px}
.kb-timeline.kb-timeline--milestones .kb-timeline__item{min-width:0;flex:1 1 0}
@media (max-width:64rem){
    .kb-timeline.kb-timeline--milestones .kb-timeline__item{min-width:7rem;flex:0 0 7rem}
}
