/* Shared navigation and responsive layout. Wide data surfaces scroll locally. */
.intake-practice-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--heirlo-border, #e2e7f0); }
.intake-practice-filters, .intake-practice-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.intake-practice-filters button { background: #fff; border: 1px solid var(--heirlo-border, #e2e7f0); border-radius: 6px; color: var(--heirlo-text-secondary, #475569); padding: 9px 12px; font-size: 14px; }
.intake-practice-filters button[aria-pressed="true"] { border-color: var(--heirlo-primary, #a41f35); color: var(--heirlo-primary, #a41f35); background: #faedf0; }
.intake-practice-filters span { margin-left: 8px; font-variant-numeric: tabular-nums; }
.intake-practice-toolbar [hidden], .intake-matter-fields [hidden] { display: none !important; }
.intake-practice-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 7px; border-radius: 4px; background: #edf2f6; color: #475467; margin-bottom: 6px; }
.intake-practice-badge--probate { background: #edf4ff; color: #245b96; }
.intake-practice-badge--planning { background: #e9f5f0; color: #256b54; }
body.heirlo-docked { --heirlo-drawer-width: 380px; }
body.heirlo-docked-wide { --heirlo-drawer-width: 520px; }
body.heirlo-docked #appShell { margin-right: var(--heirlo-drawer-width); }
body.heirlo-docked #appShell > .content { min-width: 0; container-type: inline-size; container-name: heirlo-workspace; }
body.heirlo-docked #appShell main { min-width: 0; }
body.heirlo-docked .heirlo-fab { display: none; }
body.heirlo-docked #heirloPanel {
  position: fixed; inset: 0 0 0 auto; width: var(--heirlo-drawer-width) !important;
  height: 100dvh !important; max-width: none !important; max-height: none !important;
  right: 0 !important; border: 0; border-left: 1px solid var(--heirlo-border, #e2e7f0); border-radius: 0;
  background: #fff; backdrop-filter: none; transform: none; transition: none;
  box-shadow: none;
}
#heirloPanel .heirlo-chat { min-height: 0; overflow-wrap: anywhere; }
#heirloPanel .heirlo-header, #heirloPanel .heirlo-status, #heirloPanel .heirlo-input-area { flex-shrink: 0; }
#heirloPanel .heirlo-suggestions { max-height: 25dvh; overflow: auto; flex-shrink: 0; }
#heirloPanel .heirlo-input-area { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
#heirloPanel .heirlo-back { display: none; }
@container heirlo-workspace (max-width: 1100px) {
  #appShell .search-shell--wide { grid-template-columns: auto minmax(0, 1fr) auto; padding-inline: 16px; gap: 10px; }
  #appShell .header-center { min-width: 0; }
  #appShell .header-quick-actions { display: none; }
  #appShell .wo-columns, #appShell .wo-chart-grid, #appShell .ed-layout { grid-template-columns: minmax(0, 1fr); }
  #appShell .wo-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #appShell .wo-metric:nth-child(2n) { border-right: 0; }
  #appShell .wo-metric:nth-child(n + 3) { border-top: 1px solid #e6e8ec; }
  #appShell .ed-aside { border-left: 0; padding-left: 0; }
  #appShell .mp-tabs__buttons { min-width: 0; overflow-x: auto; }
  #appShell .mp-tab { flex-shrink: 0; }
  #appShell .workflow-stepper-wrapper { overflow-x: auto; }
  #appShell .workflow-stepper { min-width: 600px; }
}
@container heirlo-workspace (max-width: 700px) {
  #appShell .search-shell--wide { grid-template-columns: auto minmax(0, 1fr); }
  #appShell .header-left { grid-column: 1; grid-row: 1; }
  #appShell .header-right { grid-column: 2; grid-row: 1; }
  #appShell .header-center { grid-column: 1 / -1; grid-row: 2; }
  #appShell .ed-table-head { display: none; }
  #appShell .ed-row { grid-template-columns: minmax(0, 1fr) minmax(100px, .65fr); }
  #appShell .ed-toolbar { flex-wrap: wrap; }
}
@media (min-width: 900px) and (max-width: 1199px) {
  body.heirlo-docked { --heirlo-drawer-width: 340px; }
  body.heirlo-docked-wide { --heirlo-drawer-width: 400px; }
}
@media (max-width: 899px) {
  body.heirlo-docked { --heirlo-drawer-width: 100%; overflow: hidden; }
  body.heirlo-docked #appShell { display: none; }
  body.heirlo-docked #heirloPanel .heirlo-back { display: block; flex-shrink: 0; text-align: left; padding: 12px 16px; margin: 0; border: 0; border-radius: 0; background: #fff; color: var(--heirlo-primary, #a41f35); font-size: 14px; }
  body.heirlo-docked #heirloExpandBtn { display: none !important; }
}
#retainedPromptModal .modal__content { width: 720px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; border-radius: 8px !important; }
#retainedPromptModal .modal__body { overflow-y: auto; min-height: 0; }
#retainedPromptModal .retention-select { position: relative; min-width: 0; }
#retainedPromptModal .retention-select__trigger { position: relative; width: 100%; min-height: 44px; padding: 12px 36px 12px 14px; text-align: left; font: inherit; font-weight: 400; color: #172033 !important; background: #fff !important; border: 1px solid var(--heirlo-border-strong, #cbd3e1) !important; border-radius: 6px !important; white-space: normal; }
#retainedPromptModal .retention-select__trigger::after { content: ""; position: absolute; right: 16px; top: 17px; width: 7px; height: 7px; border-right: 2px solid var(--heirlo-muted, #5d6b82); border-bottom: 2px solid var(--heirlo-muted, #5d6b82); transform: rotate(45deg); }
#retainedPromptModal .retention-select__trigger:focus-visible, #retainedPromptModal .retention-select__trigger[aria-expanded="true"] { outline: 2px solid var(--heirlo-primary, #a41f35); outline-offset: 2px; }
#retainedPromptModal .retention-select__trigger[aria-invalid="true"] { border-color: var(--heirlo-primary, #a41f35) !important; }
#retainedPromptModal .retention-select__menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; overflow-y: auto; padding: 4px; background: #fff; border: 1px solid #d4dce6; border-radius: 6px; box-shadow: 0 8px 24px #17203326; }
#retainedPromptModal .retention-select__menu[hidden] { display: none; }
#retainedPromptModal .retention-select__menu.opens-up { top: auto; bottom: calc(100% + 6px); }
#retainedPromptModal .retention-select__menu [role="option"] { padding: 10px 12px; min-height: 40px; cursor: pointer; font-size: 14px; font-weight: 400; line-height: 20px; border-radius: 4px; color: #172033; }
#retainedPromptModal .retention-select__menu [role="option"]:hover, #retainedPromptModal .retention-select__menu .is-active { background: #f3f4f6; }
#retainedPromptModal .retention-select__menu [aria-selected="true"] { background: #faedf0; color: var(--heirlo-primary, #a41f35); font-weight: 600; }
#retainedPromptModal #retainedProbateFields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px !important; }
#retainedPromptModal #retainedPlanningFields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; margin-top: 20px; align-items: stretch; }
#retainedPromptModal #retainedPlanningFields.hidden { display: none; }
#retainedPlanningFields > label { display: grid; grid-template-rows: 1fr auto; gap: 8px; min-width: 0; margin: 0; font-size: 14px; line-height: 20px; }
#retainedPlanningFields > label:last-child { grid-column: 1 / -1; }
#retainedPlanningFields input, #retainedPlanningFields textarea, #retainedPlanningFields .retention-select__trigger { box-sizing: border-box; width: 100%; min-width: 0; margin: 0; font-size: 14px; }
#retainedPlanningFields input, #retainedPlanningFields .retention-select__trigger { height: 46px; }
#retainedPlanningFields textarea { min-height: 110px; resize: vertical; }
#retainedProbateFields label { display: grid; gap: 6px; min-width: 0; font-size: 14px; }
#retainedProbateFields .form-control { width: 100%; min-width: 0; font-size: 16px; min-height: 44px; }
#retainedProbateFields select { border: 1px solid #d4dce6; border-radius: 6px; padding: 10px; background-color: #fff; color: #172033; }
#retainedPromptModal #cancelRetainedPrompt { background: #fff !important; border: 1px solid #d4dce6 !important; color: var(--heirlo-text-secondary, #475569) !important; }
#retainedWorkflowNotice, #retainedHomeProceedingLabel { grid-column: 1 / -1; }
#retainedProbateFields [hidden] { display: none !important; }
#retainedPromptModal .modal__actions { flex-shrink: 0; }
@media (max-width: 600px) {
  #retainedPromptModal #retainedProbateFields { grid-template-columns: minmax(0, 1fr); }
  #retainedPromptModal #retainedPlanningFields { grid-template-columns: minmax(0, 1fr); }
  #retainedPlanningFields input, #retainedPlanningFields textarea, #retainedPlanningFields .retention-select__trigger { font-size: 16px; }
}
@media (min-width: 1280px) {
  #appShell > .sidebar {
    width: 80px;
    padding: 24px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1100;
    transition: width 160ms ease;
  }
  #appShell > .content { margin-left: 80px; }
  #appShell > .sidebar:hover,
  #appShell > .sidebar:focus-within { width: 260px; }
  #appShell .sidebar__brand { padding: 24px 6px !important; }
  #appShell .sidebar__logo-wrapper { flex: 0 0 44px; }
  #appShell .nav__item { padding: 13px 16px; flex-shrink: 0; }
  #appShell .sidebar .label,
  #appShell .sidebar__brand-text,
  #appShell #sidebarSignOutBtn {
    opacity: 0;
    white-space: nowrap;
    flex-shrink: 0;
  }
  #appShell .sidebar:hover .label,
  #appShell .sidebar:focus-within .label,
  #appShell .sidebar:hover .sidebar__brand-text,
  #appShell .sidebar:focus-within .sidebar__brand-text,
  #appShell .sidebar:hover #sidebarSignOutBtn,
  #appShell .sidebar:focus-within #sidebarSignOutBtn { opacity: 1; }
  #appShell .sidebar-user .avatar { flex-shrink: 0; }
  #appShell .workflow-advance-widget,
  #appShell .intake-prospects-fab { left: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  #appShell > .sidebar { transition: none; }
}
#appShell .calendar-shell { grid-template-columns: 280px minmax(0, 1fr); }
#appShell .calendar-shell > * { min-width: 0; }
@media (max-width: 1279px) {
  #appShell .content { min-width: 0; }
  #appShell .search-shell--wide { grid-template-columns: auto minmax(0, 1fr) auto; padding: 0 16px; }
  #appShell .intake-prospects-fab { left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
  #appShell .view { min-width: 0; max-width: 100%; }
  #appShell .mp-tabs { padding: 0 12px; }
  #appShell .mp-tabs__buttons { min-width: 0; overflow-x: auto; flex: 1; }
  #appShell .mp-tab { flex-shrink: 0; width: auto !important; }
  #appShell .mp-tabs__case-info { max-width: 25%; min-width: 0; }
  #appShell .workflow-stepper-wrapper { overflow-x: auto; }
  #appShell .workflow-stepper { min-width: 600px; }
  #appShell .marketing-toolbar { flex-wrap: wrap; }
  #appShell .marketing-toolbar__actions { flex-wrap: wrap; min-width: 0; }
}

@media (max-width: 1024px) {
  #appShell > .content { padding: 0 !important; }
  #appShell main { padding: 16px 16px 88px; min-width: 0; }
  #appShell .search-shell--wide { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
  #appShell .header-left { grid-column: 1; grid-row: 1; }
  #appShell .header-right { grid-column: 2; grid-row: 1; min-width: 0; }
  #appShell .header-center { grid-column: 1 / -1; grid-row: 2; margin: 0; }
  #appShell .header-right .header-divider { display: none; }
  #appShell .header-quick-actions { display: none; }
  #appShell .mp-header__top,
  #appShell .ep-profile-header,
  #appShell .contacts-header,
  #appShell .documents-header,
  #appShell .reports-hero,
  #appShell .reports-toolbar,
  #appShell .activities-header { flex-wrap: wrap; gap: 16px; }
  #appShell .mp-header__text,
  #appShell .ep-profile-header > div,
  #appShell .documents-header > div { min-width: 0; max-width: 100%; }
  #appShell .mp-header__title { overflow-wrap: anywhere; }
  #appShell .contacts-header__actions,
  #appShell .contacts-actions,
  #appShell .documents-actions__controls,
  #appShell .documents-header__actions,
  #appShell .reports-actions,
  #appShell .reports-filters,
  #appShell .activities-header__actions { flex-wrap: wrap; min-width: 0; max-width: 100%; }
  #appShell .documents-actions__search { width: 100%; min-width: 0; }
  #appShell .documents-summary-strip { flex-wrap: wrap; }
  #appShell .start-here-grid { grid-template-columns: minmax(0, 1fr); }
  #appShell .contacts-master-detail { flex-direction: column; height: auto; }
  #appShell .contacts-master-list { width: 100%; max-height: 360px; border-right: 0; }
  #appShell .contacts-detail-panel { min-width: 0; padding: 16px; }
  #appShell .intake-master-detail { height: auto; min-height: 0; }
  #appShell .intake-detail-panel { min-width: 0; padding: 16px; overflow: visible; }
  #appShell .calendar-tabs-row { overflow-x: auto; }
  #appShell .calendar-tab-btn { flex: 0 0 auto; }
  #appShell .mp-tabs__case-info { display: none !important; }
  #appShell .matter-profile__body { padding: 16px; min-width: 0; }
  #appShell .mp-header { padding: 16px !important; }
  #appShell .mp-header__top { padding: 12px 0; }
  #appShell .mp-breadcrumb { padding: 0; flex-wrap: wrap; }
  #appShell .ep-profile { min-width: 0; width: 100%; padding: 16px; }
  #appShell .ep-profile-body > * { min-width: 0; max-width: 100%; }
  #appShell .contacts-filters { flex-wrap: wrap; }
  #appShell .documents-tabs { overflow-x: auto; max-width: 100%; }
  #appShell .documents-tabs .tab { flex-shrink: 0; }
  #appShell .reports-toolbar { grid-template-columns: minmax(0, 1fr); }
  #appShell .reports-view { grid-template-columns: minmax(0, 1fr); }
  #appShell .builder-grid { grid-template-columns: minmax(0, 1fr); }
  #appShell .builder-header { flex-wrap: wrap; }
  #appShell .calendar-shell { grid-template-columns: minmax(0, 1fr); }
  #appShell .canvas-grid { grid-template-columns: minmax(0, 1fr); }
  #appShell .canvas-card--wide { grid-column: 1; }
  #appShell .ep-profile-body { grid-template-columns: minmax(0, 1fr); }
  #appShell .table-wrap,
  #appShell .table-wrapper,
  #appShell .matters-table-wrap,
  #appShell .settings-table-wrap,
  #appShell .ep-table-wrap,
  #appShell .workflow-table-wrap { max-width: 100%; overflow-x: auto; }
  .modal:not(.hidden) { padding: 12px; }
  .modal .modal__content { min-width: 0; max-width: calc(100vw - 24px) !important; max-height: calc(100dvh - 24px); overflow-y: auto !important; overscroll-behavior: contain; }
  .modal .modal__header { gap: 12px; }
  .modal .modal__header h3 { min-width: 0; overflow-wrap: anywhere; }
  .modal .modal__close { flex-shrink: 0; }
  .modal .modal__actions { flex-wrap: wrap; }
  .modal .form-grid > * { min-width: 0; }
  .modal .pipeline-form__row > label { min-width: 0; }
  .modal .pipeline-form__row input, .modal .pipeline-form__row select { min-width: 0; max-width: 100%; }
}

@media (max-width: 600px) {
  #appShell main { padding: 12px 12px 88px; }
  #appShell .hero--searchbar { padding: 10px 0; }
  #appShell .mp-header__title { font-size: 24px; line-height: 1.3; }
  #appShell .workflow-advance-fab { max-width: calc(100vw - 160px); white-space: normal; font-size: 12px !important; padding: 10px 12px !important; }
  .heirlo-widget { right: 12px !important; bottom: max(16px, env(safe-area-inset-bottom)) !important; }
  #appShell .search-shell--wide { padding: 0 12px; }
  #appShell .header-left #quickIntakeBtn { min-width: 44px; min-height: 44px; }
  #appShell .header-right { gap: 8px; }
  #appShell .header-right button { min-height: 44px; }
  #appShell .start-here-header,
  #appShell .activities-date { flex-wrap: wrap; }
  #appShell .start-here-progress { min-width: 0; max-width: 100%; }
  #appShell .start-here-header__actions { grid-template-columns: minmax(0, 1fr); width: 100%; }
  #appShell .start-here-progress { grid-template-columns: minmax(0, 1fr); }
  #appShell .canvas-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  #appShell .marketing-sub-view,
  #appShell .marketing-date-range { min-width: 0; max-width: 100%; }
  #appShell .marketing-date-range__presets,
  #appShell .marketing-date-range__custom { flex-wrap: wrap; min-width: 0; }
  #superadminProfileModal .modal__header + div { overflow-x: auto; }
  #superadminProfileModal .superadmin-profile-tab { flex-shrink: 0; }
  #superadminProfileModal #panel-overview > div { grid-template-columns: minmax(0, 1fr) !important; }
  #appShell .contacts-header__actions input,
  #appShell .activities-header__actions input,
  #appShell .activities-header__actions select { min-width: 0; max-width: 100%; }
  #appShell .intake-profile-workspace .intake-profile-sidebar,
  #appShell .intake-preview__grid { grid-template-columns: minmax(0, 1fr); }
  #appShell .intake-workstation-header__actions { flex-wrap: wrap; }
  #appShell .intake-profile-workspace { padding: 0; }
  #appShell .intake-preview { padding: 0; }
  #appShell .intake-preview__actions { flex-wrap: wrap; }
  #appShell .intake-preview__actions button,
  #appShell .intake-filter-btn,
  #appShell .intake-lifecycle-tabs button,
  #appShell .intake-profile-workspace button { min-height: 44px; }
  #appShell .mp-header__actions { flex-wrap: wrap; }
  #appShell .ep-profile-header { padding: 16px; }
  #appShell .reports-filters label { max-width: 100%; }
  .modal .modal__content { padding: 16px !important; border-radius: 8px !important; }
  .modal .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .modal .form-grid > * { grid-column: 1 / -1 !important; }
  #profileModal .profile-layout { grid-template-columns: minmax(0, 1fr); }
  #profileModal .profile-card { min-width: 0; }
  #profileModal .profile-field { flex-wrap: wrap; gap: 6px; overflow-wrap: anywhere; }
  .modal input:not([type="checkbox"]):not([type="radio"]),
  .modal select, .modal textarea,
  #appShell input:not([type="checkbox"]):not([type="radio"]),
  #appShell select, #appShell textarea { min-width: 0; max-width: 100%; font-size: 16px; }
  .modal input:not([type="checkbox"]):not([type="radio"]), .modal select { min-height: 44px; }
  .modal .modal__actions button { min-height: 44px; }
  .heirlo-panel, .heirlo-panel.expanded { max-width: calc(100vw - 24px) !important; max-height: calc(100dvh - 96px) !important; right: 12px !important; }
}
.planning-profile .mp-info-section,
.planning-profile .matter-health-panel__body { min-width: 0; }
.planning-profile .mp-info-row strong { min-width: 0; overflow-wrap: anywhere; }
.planning-profile .matter-health-panel__summary { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 768px) {
  .planning-profile .mp-info-grid { grid-template-columns: minmax(0, 1fr); }
  .planning-profile .mp-info-row { flex-wrap: wrap; gap: 8px; }
  .planning-profile .mp-info-row strong { flex: 1 1 150px; }
}
/* Estate identity review uses a native modal for keyboard focus containment. */
.estate-identity-dialog { position: fixed; inset: 0; margin: auto; width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box; overflow: auto; border: 1px solid #d6dce3; border-radius: 8px; padding: 24px; color: #20252b; background: #fff; }
.estate-identity-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.estate-identity-dialog header, .estate-identity-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.estate-identity-dialog h3 { font-size: 20px; margin: 0; }
.estate-identity-dialog label { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; font-size: 14px; }
.estate-identity-dialog input, .estate-identity-dialog select { width: 100%; min-width: 0; box-sizing: border-box; padding: 10px; border: 1px solid #cbd2da; border-radius: 4px; font-size: 16px; background: #fff; color: #20252b; }
.estate-identity-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.estate-identity-fields label:has([name="address"]) { grid-column: 1 / -1; }
.estate-identity-dialog button { padding: 10px 14px; border: 1px solid #cbd2da; border-radius: 4px; background: #fff; color: #20252b; cursor: pointer; }
.estate-identity-dialog button[type="submit"] { background: #a51c38; color: #fff; border-color: #a51c38; }
.estate-identity-dialog button:disabled { opacity: .5; cursor: default; }
.estate-identity-dialog header h3 { flex: 1; min-width: 0; }
.estate-identity-dialog header button[data-close] { flex: 0 0 40px; width: 40px; min-width: 40px; height: 40px; padding: 0; margin: 0; font-size: 22px; }
.estate-identity-dialog footer { flex-wrap: wrap; }
.estate-identity-dialog footer button { flex: 0 1 auto; min-width: 0; white-space: normal; }
.estate-identity-dialog [data-review-status] { font-size: 14px; overflow-wrap: anywhere; }
.estate-identity-dialog label[hidden] { display: none; }
.estate-identity-dialog .certificate-same-person { flex-direction: row; align-items: center; gap: 10px; }
.estate-identity-dialog .certificate-same-person input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: #a51c38; }
@media (max-width: 480px) { .estate-identity-fields { grid-template-columns: minmax(0, 1fr); } .estate-identity-dialog { padding: 16px; } }

#retainedCertificatePanel { grid-column: 1 / -1; min-width: 0; border: 1px solid #d4dce6; border-radius: 8px; padding: 16px; }
#retainedCertificatePanel legend { font-weight: 600; padding: 0 6px; }
#retainedCertificatePanel p { font-size: 13px; line-height: 1.5; }
#retainedCertificatePanel > label { margin: 10px 0; }
#retainedCertificatePanel input[type="file"] { max-width: 100%; font-size: 14px; }
#retainedCertificatePanel .retention-certificate-fact { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; overflow-wrap: anywhere; }
#retainedCertificatePanel .retention-certificate-fact input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; }
.retention-certificate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.estate-timeline { margin-top: 24px; padding: 24px; background: #fff; border: 1px solid var(--heirlo-border, #e2e7f0); border-radius: 10px; }
.estate-timeline:empty { display: none; }
.estate-timeline-header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.estate-timeline-header h2 { margin-right: auto; }
.estate-timeline-header select { margin-left: 8px; padding: 8px; border: 1px solid var(--heirlo-border-strong, #cbd3e1); border-radius: 6px; background: white; }
.estate-timeline-day { border-bottom: 1px solid var(--heirlo-border, #e2e7f0); padding-bottom: 10px; margin-top: 28px; color: var(--heirlo-text-secondary, #475569); font-size: 15px; }
.estate-timeline-event { border-left: 3px solid var(--heirlo-primary, #a41f35); padding: 8px 0 18px 20px; margin: 0 0 12px 8px; overflow-wrap: anywhere; }
.estate-timeline-event h4 { margin: 7px 0; font-size: 17px; }
.estate-timeline-event p { white-space: pre-wrap; }
.estate-timeline-event time, .estate-timeline-actor, .estate-timeline-event small { color: var(--heirlo-muted, #5d6b82); font-size: 13px; }
.estate-timeline-event button { display: block; margin-top: 10px; }
.estate-timeline-category { color: var(--heirlo-primary, #a41f35); font-size: 12px; font-weight: 600; text-transform: uppercase; }
.estate-timeline-upcoming { background: var(--heirlo-canvas, #f5f7fb); border-radius: 8px; padding: 0 12px; }
.estate-timeline-due { display: block; text-align: left; width: 100%; padding: 10px; border: 0; background: none; color: var(--heirlo-text-secondary, #475569); cursor: pointer; }
@media (max-width: 600px) { .estate-timeline { padding: 14px; } .estate-timeline-header { gap: 8px; } }

/* Guided intake certificate review */
.certificate-steps { display:flex; gap:8px; list-style:none; padding:0; flex-wrap:wrap; }
.certificate-steps li { flex:1; min-width:100px; padding:10px; background:#f1f4f9; border:1px solid var(--heirlo-border, #e2e7f0); border-radius:8px; color:#44536a; font-weight:600; }
.certificate-steps li[aria-current=step] { background:#fff3f5; border-color:var(--heirlo-primary, #a41f35); color:var(--heirlo-primary, #a41f35); }
.certificate-review { background:#fff; padding:16px; border:1px solid var(--heirlo-border, #e2e7f0); border-radius:12px; }
.certificate-preview { min-height:240px; background:#f4f6fa; border:1px solid var(--heirlo-border, #e2e7f0); border-radius:8px; overflow:auto; }
.certificate-preview iframe { display:block; width:100%; height:520px; border:0; }
.certificate-preview img { display:block; max-width:100%; height:auto; margin:auto; }
#retainedCertificateChecks label { display:flex; gap:10px; align-items:flex-start; margin:14px 0; line-height:1.5; color:var(--heirlo-navy, #172033); }
#retainedCertificateChecks input[type=checkbox] { width:20px; height:20px; min-height:20px; flex:0 0 20px; margin-top:2px; }
#retainedCertificateChecks label:has(textarea) { display:block; }
.certificate-progress { display:flex; align-items:center; gap:10px; padding:12px; background:#fff; color:var(--heirlo-navy, #172033); }
#retainedCertificatePanel [hidden] { display:none !important; }
.certificate-spinner { width:20px; height:20px; flex:0 0 20px; border:3px solid #ead5db; border-top-color:var(--heirlo-primary, #a41f35); border-radius:50%; animation:certificate-spin .8s linear infinite; }
@keyframes certificate-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .certificate-spinner { animation:none; } }
@media(max-width:600px) { .certificate-preview iframe { height:400px; } .certificate-review { padding:10px; } }
#retainedCertificatePanel > label { display:block; color:var(--heirlo-navy, #172033); }
#retainedCertificateDocument { display:block; width:100%; margin-top:6px; padding:10px; background:#fff; border:1px solid var(--heirlo-border, #e2e7f0); border-radius:8px; color:var(--heirlo-navy, #172033); }
#retainedCertificateStatus { margin:14px 0; }
#retainedCertificateReviewPanel h3 { margin:0 0 12px; }
#retainedCertificateDecision { margin:12px 0; }
/* A readable certificate workspace within the actual retention dialog. */
#retainedPromptModal:has(#retainedCertificateReviewPanel:not([hidden])) .modal__content { width:1280px; max-width:calc(100vw - 32px); }
.certificate-review-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:20px; align-items:start; }
.certificate-review-checklist { min-width:0; background:#fff; padding:0 4px; }
.certificate-preview:has(.certificate-viewer-toolbar) { overflow:hidden; min-width:0; background:#e9edf2; }
.certificate-viewer-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:6px; padding:10px; background:#fff; border-bottom:1px solid var(--heirlo-border, #e2e7f0); }
#retainedCertificatePanel .certificate-viewer-toolbar button { width:auto; min-height:36px; margin:0; padding:6px 10px; border:1px solid #d2d9e4; border-radius:7px; background:#fff; color:#25344b; font-size:13px; font-weight:600; box-shadow:none; }
#retainedCertificatePanel .certificate-viewer-toolbar button:hover { background:var(--heirlo-primary-soft, #f8edf0); border-color:var(--heirlo-primary, #a41f35); }
#retainedCertificatePanel .certificate-viewer-toolbar button:disabled { opacity:.4; cursor:default; }
.certificate-page-number { color:#25344b; font-size:13px; white-space:nowrap; }
.certificate-viewer-page { height:clamp(340px,58dvh,760px); padding:16px; overflow:auto; overscroll-behavior:contain; }
.certificate-viewer-page canvas { display:block; margin:0 auto; background:white; box-shadow:0 2px 10px #17203326; max-width:none; }
#retainedCertificatePanel .certificate-viewer-status { margin:0; padding:8px 12px; font-size:12px; background:#fff; color:#44536a; }
#retainedCertificateChecks .retention-certificate-actions { display:flex; flex-direction:column; gap:8px; }
#retainedCertificateChecks .retention-certificate-actions button { width:fit-content; margin:0; }
#retainedCertificateReviewPanel:fullscreen { padding:24px; overflow:auto; background:#f4f6fa; }
#retainedCertificateReviewPanel:fullscreen .certificate-viewer-page { height:calc(100dvh - 170px); }
#retainedCertificateReviewPanel:fullscreen .certificate-review-checklist { padding:16px; border-radius:10px; }
@media(max-width:900px) {
 .certificate-review-layout { grid-template-columns:minmax(0,1fr); gap:12px; }
 .certificate-viewer-page { height:52dvh; min-height:300px; }
 #retainedCertificateReviewPanel:fullscreen { padding:12px; }
 #retainedCertificateReviewPanel:fullscreen .certificate-viewer-page { height:55dvh; }
}
#retainedCertificateReject { background:#fff !important; color:var(--heirlo-primary, #a41f35) !important; border:1px solid #dab5bd !important; }
@media(max-width:600px) {
 #retainedCertificatePanel { padding:8px; }
 .certificate-viewer-page { height:auto; min-height:220px; max-height:52dvh; }
 .certificate-viewer-toolbar { gap:4px; padding:8px; }
 #retainedCertificatePanel .certificate-viewer-toolbar button { padding:6px 8px; }
}
/* Intake guidance separates today's review from estate onboarding and communications. */
.intake-next-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:18px; }
.intake-next-header h3 { margin:0 0 6px; color:var(--heirlo-navy, #172033); font-size:20px; }
.intake-next-header p, .intake-next-action p, .intake-next-card p { margin:6px 0 12px; color:var(--heirlo-text-secondary, #475569); font-size:14px; line-height:1.55; }
.intake-next-action { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px; border:1px solid #ecd4da; background:#fff8fa; border-radius:12px; margin-bottom:18px; }
.intake-next-action h4 { margin:6px 0; color:var(--heirlo-navy, #172033); font-size:18px; }
.intake-next-eyebrow { color:#941c36; font-size:12px; font-weight:700; }
.intake-next-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:16px; }
.intake-next-card { min-width:0; background:white; border:1px solid var(--heirlo-border, #e2e7f0); padding:20px; border-radius:12px; }
.intake-next-card h4 { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:0 0 12px; font-size:16px; color:var(--heirlo-navy, #172033); }
.intake-next-card h4 > span { font-size:13px; padding:3px 9px; border-radius:20px; background:#f1f4f8; color:var(--heirlo-text-secondary, #475569); }
.intake-next-list { padding:0; margin:12px 0 0; list-style:none; }
.intake-next-list li { padding:12px 0; border-top:1px solid var(--heirlo-surface-muted, #eef2f6); overflow-wrap:anywhere; }
.intake-next-list strong { color:#25344b; font-size:14px; }
.intake-next-list p { margin:4px 0 0; color:var(--heirlo-text-secondary, #475569); line-height:1.5; font-size:13px; }
.intake-request-notice { padding:12px; border-radius:8px; background:#fff6e5; color:#764c13; }
#intakeOutstandingRequests .intake-request-tracking { padding-top:24px; margin-top:20px; border-top:1px solid #e3e8ef; }
.intake-next-action .pill, .intake-next-header .pill { flex-shrink:0; }
@media(max-width:760px) { .intake-next-columns { grid-template-columns:1fr; } .intake-next-action,.intake-next-header { flex-direction:column; align-items:stretch; } .intake-next-card,.intake-next-action { padding:16px; } }

.estate-will-choice { margin: 16px 0; padding: 16px; border: 1px solid #dce3ed; border-radius: 12px; background: #fff; color: #172033; }
.estate-will-choice p { margin: 8px 0 12px; color: var(--heirlo-text-secondary, #475569); line-height: 1.5; }
.estate-will-choice > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.estate-will-choice .estate-will-option { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; margin: 0; padding: 16px; border: 1px solid #dce3ed; border-radius: 12px; background: #fff; color: #172033; text-align: left; box-shadow: 0 1px 2px #17203308; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.estate-will-choice .estate-will-option:hover:not(:disabled) { border-color: #b46a78; background: #fdfafb; box-shadow: 0 3px 10px #1720330a; }
.estate-will-choice .estate-will-option[aria-pressed="true"] { border-color: var(--heirlo-primary, #a41f35); background: #fff8fa; box-shadow: 0 0 0 1px var(--heirlo-primary, #a41f35); }
.estate-will-choice .estate-will-option:focus-visible { outline: 3px solid #a41f3566; outline-offset: 3px; }
.estate-will-choice .estate-will-option:disabled { opacity: .6; cursor: wait; }
.estate-will-option__icon { display: grid; place-items: center; flex: 0 0 38px; height: 42px; border-radius: 10px; background: #f1f4f8; color: #526179; }
.estate-will-option__icon svg { width: 22px; height: 22px; }
.estate-will-option__text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
.estate-will-option__text strong { font-size: 15px; font-weight: 650; line-height: 1.3; }
.estate-will-option__text > span { font-size: 13px; font-weight: 400; line-height: 1.4; color: #526179; }
.estate-will-option__indicator { display: grid; place-items: center; flex: 0 0 20px; height: 20px; border: 1.5px solid #c5ceda; border-radius: 50%; }
.estate-will-option__indicator svg { width: 14px; height: 14px; visibility: hidden; }
.estate-will-option[aria-pressed="true"] .estate-will-option__icon { background: #f7e6eb; color: var(--heirlo-primary, #a41f35); }
.estate-will-option[aria-pressed="true"] .estate-will-option__indicator { background: var(--heirlo-primary, #a41f35); border-color: var(--heirlo-primary, #a41f35); color: #fff; }
.estate-will-option[aria-pressed="true"] .estate-will-option__indicator svg { visibility: visible; }
@media (max-width: 600px) { .estate-will-choice > div { grid-template-columns: 1fr; } }
.estate-will-choice [role="status"]:empty { display: none; }

.heirs-party-card__top { grid-template-columns: 34px minmax(0, 1fr) auto; }
.heirs-party-card .heirs-party-edit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-height: 40px; margin: 0; padding: 9px 14px; border: 1px solid #e6c5cd; border-radius: 10px; background: #fff; color: var(--heirlo-primary, #a41f35); font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 2px #17203308; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.heirs-party-edit svg { width: 16px; height: 16px; flex-shrink: 0; }
.heirs-party-card .heirs-party-edit:hover { background: #fff5f7; border-color: var(--heirlo-primary, #a41f35); box-shadow: 0 2px 6px #a41f3512; }
.heirs-party-card .heirs-party-edit:focus-visible { outline: 3px solid #a41f3555; outline-offset: 3px; }
@media (max-width: 600px) { .heirs-party-card__top { grid-template-columns: 34px minmax(0, 1fr); } .heirs-party-card .heirs-party-edit { grid-column: 2; justify-self: start; min-height: 44px; margin-top: 3px; } }

/* Heir share review keeps family facts and legal approval in one focused dialog. */
.intestate-dialog { width: min(940px, 94vw); max-height: 90vh; padding: 0; border: 1px solid #dbe3ef; border-radius: 18px; color: #172033; background: #fff; box-shadow: 0 24px 80px #17203340; }
.intestate-dialog::backdrop { background: #17203399; }
.intestate-form { padding: 28px; display: grid; gap: 18px; }
.intestate-form header { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.intestate-form h2, .intestate-form p { margin: 0; }
.intestate-form p { line-height: 1.6; }
.intestate-form fieldset { border: 1px solid #dbe3ef; border-radius: 12px; padding: 20px; display: grid; gap: 16px; min-width: 0; }
.intestate-form legend { font-weight: 700; padding: 0 6px; }
.intestate-form label { display: grid; gap: 7px; font-size: 14px; color: var(--heirlo-text-secondary, #475569); }
.intestate-form input:not([type=checkbox]), .intestate-form select { width: 100%; min-width: 0; border: 1px solid var(--heirlo-border-strong, #cbd3e1); border-radius: 8px; padding: 10px; background: white; color: #172033; }
.intestate-form button { width: auto; justify-self: start; border: 1px solid var(--heirlo-border-strong, #cbd3e1); border-radius: 9px; padding: 11px 16px; background: white; color: var(--heirlo-text-secondary, #475569); font-weight: 600; cursor: pointer; }
.intestate-form button:disabled { opacity: .55; cursor: wait; }
.intestate-form .intestate-primary { background: var(--heirlo-primary, #a41f35); color: white; border-color: var(--heirlo-primary, #a41f35); }
.intestate-form :focus-visible { outline: 3px solid var(--heirlo-accent-strong, #50588f); outline-offset: 2px; }
.intestate-form .intestate-check { display: flex; align-items: start; gap: 10px; line-height: 1.5; }
.intestate-check input { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--heirlo-primary, #a41f35); }
.intestate-scope { background: var(--heirlo-canvas, #f5f7fb); padding: 14px; border-radius: 10px; }
.intestate-person { padding: 16px; border: 1px solid #dbe3ef; border-radius: 10px; margin: 12px 0; }
.intestate-person small { display: block; color: #52627b; margin-top: 4px; }
.intestate-person-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.intestate-table { overflow-x: auto; }
.intestate-table table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.intestate-table th, .intestate-table td { text-align: left; padding: 12px; border-bottom: 1px solid #dbe3ef; }
.intestate-form [data-error] { color: var(--heirlo-primary, #a41f35); }
.intestate-form [data-result]:not([hidden]) { display: grid; gap: 14px; }
@media (max-width: 640px) { .intestate-person-grid { grid-template-columns: 1fr; } .intestate-form { padding: 16px; } }

.heirs-template-preview-start { display: grid; justify-items: center; align-content: center; gap: 16px; min-height: 260px; padding: 32px; text-align: center; color: var(--heirlo-text-secondary, #475569); }
.heirs-template-preview-start p { margin: 0; }

.retention-welcome { padding: 16px 24px; border-top: 1px solid #dbe3ef; background: var(--heirlo-canvas, #f5f7fb); }
.retention-welcome label { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.retention-welcome input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--heirlo-primary, #a41f35); }
.retention-welcome p { margin: 8px 0 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }

/* Keep document actions content-sized instead of inheriting full-width form buttons. */
.heirs-workstation .affidavit-draft__toolbar,
.heirs-workstation .heirs-preview-actions {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 16px 0;
}
.heirs-workstation .affidavit-draft__toolbar button,
.heirs-workstation .heirs-preview-actions button,
.heirs-workstation .heirs-template-preview-start button {
  display: inline-flex;
  width: auto;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  margin: 0;
  min-height: 42px;
  padding: 10px 16px;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
  white-space: normal;
  border-radius: 8px;
}
.heirs-workstation .affidavit-draft__toolbar button[hidden] { display: none; }
.heirs-workstation .heirs-preview-actions a { font-size: 14px; color: var(--heirlo-primary, #a41f35); padding: 10px 0; }
.heirs-workstation .heirs-template-preview-start { min-height: 200px; gap: 12px; }
.heirs-workstation .heirs-template-preview-start p { max-width: 560px; }
.heirs-workstation .affidavit-draft__toolbar button span { background: transparent; color: inherit; width: 20px; height: 20px; }

.heirs-workstation .heirs-share-actions { margin-top: 16px; }
.heirs-workstation .heirs-share-actions button {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 10px 16px;
  min-height: 42px;
  gap: 8px;
  font-size: 14px;
  border-radius: 8px;
}
.heirs-workstation .heirs-share-actions button:disabled { background: var(--heirlo-surface-muted, #eef2f6); color: var(--heirlo-text-secondary, #475569); border-color: var(--heirlo-border-strong, #cbd3e1); cursor: not-allowed; opacity: 1; }
.heirs-workstation .heirs-share-actions button:disabled span { background: var(--heirlo-border, #e2e7f0); color: var(--heirlo-text-secondary, #475569); }
.heirs-workstation .heirs-share-actions p { margin: 8px 0 0; max-width: 640px; font-size: 13px; line-height: 1.5; }

.heirs-template-settings { position: relative; }
.heirs-template-settings > summary { cursor: pointer; padding: 11px 14px; border: 1px solid var(--heirlo-border, #e2e7f0); border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--heirlo-text-secondary, #475569); background: #fff; }
.heirs-template-settings__actions { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: grid; gap: 8px; padding: 12px; min-width: 230px; background: #fff; border: 1px solid var(--heirlo-border, #e2e7f0); border-radius: 10px; box-shadow: 0 8px 24px #18223018; }
.heirs-linked-file > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--heirlo-text-secondary, #475569); overflow-wrap: anywhere; }
.heirs-preview-actions > span { color: var(--heirlo-text-secondary, #475569); font-size: 13px; }
.heirs-workstation .heirs-preview-actions button { border: 1px solid var(--heirlo-border, #e2e7f0); background: #fff; color: #25344b; font-weight: 600; }
.heirs-workstation .heirs-preview-actions .heirs-file-delete { color: var(--heirlo-primary, #a41f35); border-color: #f0c7cf; }
@media (max-width: 680px) { .heirs-template-settings__actions { right: auto; left: 0; } }
@media (max-width: 680px) {
  .heirs-workstation .heirs-template-settings { flex-basis: 100%; }
  .heirs-workstation .heirs-template-settings > summary { width: fit-content; }
}
.heirs-workstation .heirs-linked-file { min-height: 0; }
.heirs-workstation [data-heirs-template-preview] { min-height: 200px; height: auto; }
.heirs-workstation [data-heirs-template-preview]:has(iframe) { min-height: 400px; height: clamp(400px, 70vh, 900px); }

/* Compact certificate intake actions keep the final retention action prominent. */
#retainedCertificatePanel .retention-optional { margin-left: 6px; color: var(--heirlo-muted, #5d6b82); font-size: 12px; font-weight: 400; }
#retainedCertificatePanel > p { color: var(--heirlo-muted, #5d6b82); margin: 8px 0 14px; }
#retainedCertificatePanel .certificate-steps { gap: 20px; margin: 12px 0 20px; }
#retainedCertificatePanel .certificate-steps li { flex: 0 1 auto; min-width: 0; padding: 0 0 6px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--heirlo-muted, #5d6b82); font-size: 12px; font-weight: 500; }
#retainedCertificatePanel .certificate-steps li[aria-current=step] { color: var(--heirlo-primary, #a41f35); border-bottom-color: var(--heirlo-primary, #a41f35); }
#retainedCertificatePanel .retention-certificate-row { display: flex; align-items: flex-end; gap: 12px; margin: 14px 0; }
#retainedCertificatePanel .retention-certificate-row label { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; margin: 0; color: var(--heirlo-text-secondary, #475569); font-size: 13px; }
#retainedCertificatePanel .retention-certificate-row input,
#retainedCertificatePanel .retention-certificate-row select { width: 100%; min-width: 0; min-height: 40px; margin: 0; box-sizing: border-box; font-size: 13px; }
#retainedCertificatePanel .retention-certificate-row input { padding: 6px; background: #fff; }
#retainedCertificateFile::file-selector-button { padding: 5px 8px; margin-right: 8px; border: 0; border-radius: 4px; background: var(--heirlo-surface-muted, #eef2f6); color: var(--heirlo-text-secondary, #475569); font: inherit; cursor: pointer; }
#retainedCertificatePanel .retention-certificate-row button { flex: 0 0 auto; width: auto; min-height: 40px; margin: 0; padding: 8px 14px; border: 1px solid #d4dce6; border-radius: 6px; background: #fff; color: var(--heirlo-text-secondary, #475569); box-shadow: none; font-size: 13px; font-weight: 500; white-space: nowrap; }
#retainedCertificatePanel #retainedCertificateUpload { color: var(--heirlo-primary, #a41f35); border-color: #e6c9d0; background: #fdf7f8; }
#retainedCertificatePanel .retention-certificate-row button:hover { background: var(--heirlo-surface-muted, #eef2f6); }
#retainedCertificatePanel .retention-certificate-row button:focus-visible,
#retainedCertificatePanel .retention-certificate-help summary:focus-visible { outline: 2px solid var(--heirlo-primary, #a41f35); outline-offset: 3px; }
#retainedCertificatePanel .retention-certificate-row button:disabled { opacity: .5; cursor: wait; }
#retainedCertificateStatus:empty { display: none; }
#retainedCertificatePanel .retention-certificate-help { margin-top: 16px; color: var(--heirlo-muted, #5d6b82); font-size: 12px; }
#retainedCertificatePanel .retention-certificate-help summary { cursor: pointer; }
#retainedPromptModal .retention-welcome { padding: 14px 24px; background: var(--heirlo-canvas, #f5f7fb); }
#retainedPromptModal .retention-welcome label { font-size: 14px; }
#retainedPromptModal .retention-welcome p { font-size: 12px; margin-left: 28px; }
@media (max-width: 600px) {
  #retainedCertificatePanel .retention-certificate-row { flex-wrap: wrap; }
  #retainedCertificatePanel .retention-certificate-row label { flex-basis: 100%; }
  #retainedCertificatePanel .retention-certificate-row button { min-height: 44px; }
  #retainedCertificatePanel .certificate-steps { gap: 14px; }
}

/* Heir Information: one focused section at a time. */
.checklist-workstation-document:has(.heirs-workstation) { display:block; }
.heirs-workstation { width:100%; max-width:1180px; margin:0 auto; grid-template-columns:minmax(0,1fr); align-content:start; }
.heirs-workstation > [hidden] { display:none !important; }
.heirs-workspace-tabs { display:flex; gap:24px; border-bottom:1px solid #dce3ed; padding:0 4px; }
.heirs-workspace-tabs button { background:transparent; color:#52617a; border:0; border-bottom:3px solid transparent; border-radius:0; margin:0; padding:14px 0; box-shadow:none; white-space:normal; }
.heirs-workspace-tabs button[aria-selected=true] { color:var(--heirlo-primary,#a41f35); border-bottom-color:var(--heirlo-primary,#a41f35); }
.heirs-workspace-tabs button:hover { transform:none; background:transparent; box-shadow:none; }
.heirs-workspace-tabs button:focus-visible { outline:3px solid #8585c9; outline-offset:3px; }
.heirs-workstation .heirs-party-panel__summary { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-bottom:16px; }
.heirs-workstation .heirs-party-panel__summary > div { display:flex; align-items:baseline; gap:6px; min-height:0; padding:0 12px 0 0; border:0; background:transparent; }
.heirs-workstation .heirs-party-panel__summary > div strong { font-size:16px; }
.heirs-workstation .heirs-party-panel__summary > div span { font-size:12px; text-transform:none; }
.heirs-workstation .heirs-party-panel__summary > div:nth-child(3) { display:none; }
.heirs-workstation .heirs-party-panel__summary > button { grid-column:auto; width:auto; min-height:42px; }
.heirs-workstation .heirs-party-panel__summary > button[data-workstation-action=primary] { margin-left:auto; background:var(--heirlo-primary,#a41f35); border-color:var(--heirlo-primary,#a41f35); color:#fff; }
.heirs-workstation .heirs-party-panel__summary > button[data-workstation-action=primary] span { background:transparent; color:inherit; }
.heirs-support-panel { min-width:0; padding:20px; background:#fff; border:1px solid #dce3ed; border-radius:10px; display:grid; gap:16px; }
.heirs-support-panel h2 { margin:0; font-size:18px; }.heirs-workspace-muted { color:#52617a; }
.heirs-workspace-disclosure, .heirs-workstation .heirs-template-settings { margin-top:16px; border:1px solid #dce3ed; border-radius:9px; padding:14px; }
.heirs-workspace-disclosure > summary, .heirs-workstation .heirs-template-settings > summary { cursor:pointer; color:#263246; font-weight:600; padding:0; border:0; background:transparent; }
.heirs-workstation .heirs-template-settings__actions { position:static; display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; padding:0; min-width:0; border:0; box-shadow:none; }
.heirs-workstation .heirs-template-settings__actions button { max-width:100%; width:auto; white-space:normal; background:#fff; border:1px solid #dce3ed; color:#263246; padding:10px 14px; }
.heirs-workstation .heirs-template-settings p { margin-top:12px; font-size:13px; color:#52617a; }
.heirs-workstation .affiant-selection { margin:0 0 20px; background:#fafbfc; }
.heirs-workstation .affiant-selection select, .heirs-workstation .affiant-selection input:not([type=checkbox]) { padding:10px 12px; border:1px solid #ccd5e2; border-radius:8px; background:#fff; font:inherit; }
.heirs-workstation .affiant-selection dl { grid-template-columns:repeat(3,minmax(0,1fr)); }
.heirs-workstation .affiant-selection form { margin-top:14px; }
@media(max-width:600px) {
 .heirs-workspace-tabs { gap:20px; }.heirs-workspace-tabs button { font-size:13px !important; }
 .heirs-workstation .heirs-party-panel__summary > button[data-workstation-action=primary] { margin-left:0; }
 .heirs-workstation .affiant-selection dl { grid-template-columns:1fr; }
 .heirs-support-panel { padding:16px; }
}
