:root {
    --ink: #0b1d3a;
    --ink-soft: #31435f;
    --muted: #6f7f96;
    --line: #d8e0ea;
    --line-strong: #b9c6d7;
    --canvas: #f4f7fa;
    --surface: #ffffff;
    --rose: #b84c59;
    --rose-dark: #8f3542;
    --rose-soft: #fbedef;
    --teal: #0f9185;
    --teal-soft: #e8f5f2;
    --green: #19724f;
    --green-soft: #e9f5ef;
    --amber: #a86712;
    --amber-soft: #fff3df;
    --blue: #416ca9;
    --blue-soft: #edf3fb;
    --shadow: 0 12px 30px rgba(21, 40, 68, 0.08);
    --sidebar-width: 264px;
    --radius: 6px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--canvas);
    color: var(--ink);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 0;
}

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

button,
select,
input[type="radio"] {
    cursor: pointer;
}

button,
a,
input,
select,
textarea {
    outline-offset: 3px;
}

a {
    color: inherit;
}

button {
    color: inherit;
}

[hidden] {
    display: none !important;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    padding: 10px 14px;
    background: var(--ink);
    color: #fff;
    transform: translateY(-180%);
}

.skip-link:focus {
    transform: translateY(0);
}

.dashboard-shell {
    min-height: 100vh;
}

.dashboard-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    border-right: 1px solid #253550;
    background: #101d34;
    color: #fff;
}

.dashboard-brand {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.dashboard-brand a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-decoration: none;
}

.dashboard-brand img {
    width: 28px;
    height: 34px;
    object-fit: contain;
}

.demo-badge,
.nav-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    color: #cdd7e7;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.demo-badge {
    padding: 4px 7px;
}

.portfolio-identity {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 24px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.portfolio-identity span,
.portfolio-identity small {
    color: #9eabc0;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portfolio-identity strong {
    max-width: 190px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.portfolio-identity small {
    font-size: 0.63rem;
    text-transform: none;
}

.dashboard-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px 12px;
}

.dashboard-nav-item {
    position: relative;
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 48px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 0;
    padding: 0 12px;
    background: transparent;
    color: #b8c5d8;
    text-align: left;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.dashboard-nav-item:hover,
.dashboard-nav-item:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.dashboard-nav-item.is-active {
    border-left-color: #df7d89;
    background: rgba(184, 76, 89, 0.18);
    color: #fff;
}

.nav-index {
    color: #7889a3;
    font-size: 0.67rem;
    font-weight: 700;
}

.dashboard-nav-item.is-active .nav-index {
    color: #efadb5;
}

.nav-count,
.nav-new {
    min-width: 24px;
    padding: 3px 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #cdd7e7;
    font-size: 0.62rem;
    text-align: center;
}

.nav-count {
    border-radius: 9px;
}

.sidebar-footer {
    padding: 18px 22px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.sidebar-footer a {
    display: inline-block;
    margin-bottom: 10px;
    color: #e1e7f0;
    font-size: 0.76rem;
    text-decoration: none;
}

.sidebar-footer a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sidebar-footer small {
    display: block;
    color: #8492a8;
    font-size: 0.62rem;
    line-height: 1.5;
}

.dashboard-workspace {
    min-width: 0;
    padding-left: var(--sidebar-width);
}

.dashboard-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
}

.topbar-title-group,
.topbar-controls {
    display: flex;
    align-items: center;
}

.topbar-title-group {
    gap: 12px;
}

.topbar-eyebrow,
.topbar-controls label span,
.section-kicker,
.panel-kicker,
.question-number {
    display: block;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.topbar-eyebrow {
    margin-bottom: 2px;
    color: var(--rose);
}

.dashboard-topbar h1 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.25;
}

.topbar-controls {
    gap: 12px;
}

.topbar-controls label,
.view-tools label,
.topbar-period {
    display: grid;
    gap: 3px;
}

.topbar-controls label span,
.view-tools label > span,
.topbar-period span {
    color: var(--muted);
    font-size: 0.57rem;
}

.topbar-period strong {
    font-size: 0.72rem;
}

.topbar-controls select,
.view-tools select,
.view-tools input {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 6px 30px 6px 10px;
    background: #fff;
    color: var(--ink);
    font-size: 0.75rem;
}

.sample-data-label {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid #e8c8cc;
    border-radius: 4px;
    padding: 0 9px;
    background: var(--rose-soft);
    color: var(--rose-dark);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.mobile-sidebar-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    font-size: 1.1rem;
}

.dashboard-content {
    width: min(100%, 1540px);
    margin: 0 auto;
    padding: 28px;
}

.dashboard-view {
    animation: viewIn 180ms ease;
}

@keyframes viewIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.view-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 36px;
    margin-bottom: 22px;
}

.section-kicker,
.panel-kicker,
.question-number {
    margin-bottom: 7px;
    color: var(--rose);
}

.view-intro h2 {
    margin: 0 0 6px;
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    line-height: 1.18;
}

.view-intro p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.55;
}

.data-freshness {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.7rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 4px var(--teal-soft);
}

.metric-grid {
    display: grid;
    grid-template-columns: 1.35fr repeat(4, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.metric-card,
.dashboard-panel,
.property-score-card,
.activity-metrics article,
.trend-summary-grid article,
.resident-summary-strip,
.resident-record,
.survey-section,
.survey-question,
.survey-side-panel section {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.metric-card {
    min-width: 0;
    min-height: 142px;
    padding: 18px;
}

.metric-card--primary {
    border-top: 3px solid var(--rose);
    background: var(--rose-soft);
}

.metric-card--risk {
    border-top: 3px solid var(--rose);
}

.metric-card--warning {
    border-top: 3px solid var(--amber);
}

.metric-label {
    min-height: 34px;
    color: var(--ink-soft);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.4;
}

.metric-value {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin: 3px 0 7px;
}

.metric-value strong {
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1;
}

.metric-value span {
    color: var(--muted);
    font-size: 0.8rem;
}

.metric-change,
.metric-context,
.metric-link {
    font-size: 0.67rem;
    line-height: 1.4;
}

.metric-change span,
.metric-context {
    color: var(--muted);
}

.is-positive {
    color: var(--green) !important;
}

.is-negative {
    color: var(--rose-dark) !important;
}

.metric-link,
.text-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--rose-dark);
    font-weight: 700;
    text-align: left;
}

.metric-link:hover,
.text-button:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dashboard-grid {
    display: grid;
    gap: 18px;
}

.dashboard-grid--two {
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
}

.dashboard-grid--compact {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    margin-top: 18px;
}

.dashboard-panel {
    min-width: 0;
    padding: 22px;
    box-shadow: 0 5px 18px rgba(28, 46, 72, 0.035);
}

.panel-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.panel-heading h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.panel-kicker {
    color: var(--muted);
    font-size: 0.58rem;
}

.panel-summary {
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.chart-wrap,
.large-chart-wrap {
    width: 100%;
    overflow-x: auto;
}

.line-chart,
.large-line-chart {
    display: block;
    width: 100%;
    min-width: 520px;
    height: auto;
}

.chart-grid-lines line,
.large-chart-grid line {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.chart-area,
.large-chart-area {
    fill: rgba(184, 76, 89, 0.08);
}

.chart-line,
.large-chart-line {
    fill: none;
    stroke: var(--rose);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.chart-points circle,
.large-chart-points circle {
    fill: #fff;
    stroke: var(--rose);
    stroke-width: 3;
}

.chart-labels text,
.chart-values text,
.large-chart-labels text,
.large-chart-values text {
    fill: var(--muted);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 11px;
    text-anchor: middle;
}

.chart-values text,
.large-chart-values text {
    fill: var(--ink);
    font-weight: 700;
}

.driver-list {
    display: grid;
    gap: 13px;
}

.driver-row {
    display: grid;
    grid-template-columns: minmax(142px, 0.9fr) minmax(90px, 1fr) 28px;
    gap: 10px;
    align-items: center;
}

.driver-row > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.68rem;
}

.driver-row > div:first-child span,
.driver-row small {
    font-weight: 700;
}

.driver-track,
.mini-meter {
    height: 7px;
    overflow: hidden;
    background: #edf1f5;
}

.driver-track span,
.mini-meter i {
    display: block;
    height: 100%;
    background: var(--teal);
}

.driver-track .driver-low {
    background: var(--rose);
}

.driver-row small {
    font-size: 0.65rem;
    text-align: right;
}

.opportunity-note {
    margin-top: 20px;
    border-left: 3px solid var(--rose);
    padding: 12px 14px;
    background: var(--rose-soft);
}

.opportunity-note span,
.opportunity-note strong {
    display: block;
}

.opportunity-note span {
    margin-bottom: 3px;
    color: var(--rose-dark);
    font-size: 0.57rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.opportunity-note strong {
    font-size: 0.76rem;
}

.opportunity-note p {
    margin: 5px 0 0;
    color: var(--ink-soft);
    font-size: 0.67rem;
    line-height: 1.5;
}

.property-panel {
    margin-top: 18px;
}

.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.data-table th {
    color: var(--muted);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.data-table td {
    font-size: 0.77rem;
}

.data-table td strong,
.data-table td small {
    display: block;
}

.data-table td small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.63rem;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.attention-row {
    background: #fffafb;
}

.data-table tr.is-filtered-scope {
    outline: 2px solid var(--ink);
    outline-offset: -2px;
    background: var(--blue-soft);
}

.score-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.status-label {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.61rem;
    font-weight: 700;
    white-space: nowrap;
}

button.status-label {
    cursor: pointer;
}

.status-label--good {
    border-color: #bde1d0;
    background: var(--green-soft);
    color: var(--green);
}

.status-label--watch {
    border-color: #ecd6aa;
    background: var(--amber-soft);
    color: var(--amber);
}

.status-label--risk {
    border-color: #e7c1c6;
    background: var(--rose-soft);
    color: var(--rose-dark);
}

.attention-panel p,
.property-detail-summary p,
.funnel-note {
    color: var(--ink-soft);
    font-size: 0.76rem;
    line-height: 1.6;
}

.risk-marker {
    color: var(--rose-dark);
    font-size: 0.67rem;
    font-weight: 700;
}

.priority-action-list {
    display: grid;
    gap: 0;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.priority-action-list li {
    border-bottom: 1px solid var(--line);
}

.priority-action-list button {
    display: grid;
    grid-template-columns: 26px 1fr 16px;
    gap: 10px;
    align-items: start;
    width: 100%;
    border: 0;
    padding: 10px 4px;
    background: transparent;
    text-align: left;
}

.priority-action-list li:first-child button { padding-top: 0; }
.priority-action-list button:hover,
.priority-action-list button:focus-visible { background: var(--rose-soft); }
.priority-action-list button > span { color: var(--rose); font-size: 0.65rem; font-weight: 700; }
.priority-action-list strong,
.priority-action-list small { display: block; }
.priority-action-list strong { font-size: 0.7rem; line-height: 1.4; }
.priority-action-list small { margin-top: 3px; color: var(--muted); font-size: 0.58rem; }
.priority-action-list b { color: var(--rose); font-size: 0.75rem; font-weight: 700; }

.priority-action-empty {
    margin: 0 0 18px;
    border: 1px dashed var(--line-strong);
    padding: 18px;
    color: var(--muted);
    font-size: 0.66rem;
    line-height: 1.5;
}

.secondary-button,
.primary-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 8px 14px;
    font-size: 0.7rem;
    font-weight: 700;
}

.secondary-button {
    border: 1px solid var(--ink);
    background: #fff;
    color: var(--ink);
}

.secondary-button:hover {
    background: var(--ink);
    color: #fff;
}

.primary-button {
    border: 1px solid var(--rose);
    background: var(--rose);
    color: #fff;
}

.primary-button:hover {
    border-color: var(--rose-dark);
    background: var(--rose-dark);
}

.recovery-flow {
    display: grid;
    grid-template-columns: 1fr 28px 1fr 28px 1fr 28px 1fr;
    align-items: center;
}

.recovery-flow > div {
    text-align: center;
}

.recovery-flow strong,
.recovery-flow span {
    display: block;
}

.recovery-flow strong {
    font-size: 1.45rem;
}

.recovery-flow span {
    color: var(--muted);
    font-size: 0.61rem;
}

.recovery-flow i {
    height: 1px;
    background: var(--line-strong);
}

.recovery-flow .is-open strong {
    color: var(--rose);
}

.recovery-workspace-link { margin-top: 20px; }

.recovery-value-note {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border-left: 3px solid var(--rose);
    padding: 7px 12px;
    background: var(--rose-soft);
    color: var(--rose-dark);
    font-size: 0.68rem;
    font-weight: 700;
}

.recovery-intro-actions {
    display: grid;
    gap: 12px;
    justify-items: end;
}

.recovery-tools {
    flex-direction: row;
}

.recovery-tools input {
    width: 220px;
}

.recovery-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.recovery-metric-grid article {
    min-height: 126px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--surface);
}

.recovery-metric-grid .recovery-metric-open {
    border-top-color: var(--rose);
    background: var(--rose-soft);
}

.recovery-metric-grid span,
.recovery-metric-grid strong,
.recovery-metric-grid small { display: block; }
.recovery-metric-grid span { color: var(--ink-soft); font-size: 0.67rem; font-weight: 600; }
.recovery-metric-grid strong { margin: 9px 0 7px; font-size: 2rem; line-height: 1; }
.recovery-metric-grid small { color: var(--muted); font-size: 0.59rem; }

.recovery-process-panel {
    margin-bottom: 18px;
    padding: 18px 24px;
}

.recovery-process {
    display: grid;
    grid-template-columns: 1fr 50px 1fr 50px 1fr 50px 1fr 50px 1fr;
    align-items: center;
}

.recovery-process > div { text-align: center; }
.recovery-process > div span,
.recovery-process > div strong,
.recovery-process > div small { display: block; }

.recovery-process > div span {
    width: 25px;
    height: 25px;
    margin: 0 auto 7px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 23px;
}

.recovery-process > div strong { font-size: 0.68rem; }
.recovery-process > div small { margin-top: 3px; color: var(--muted); font-size: 0.55rem; }
.recovery-process > div.is-complete span { border-color: var(--teal); background: var(--teal); color: #fff; }
.recovery-process > div.is-current span { border-color: var(--rose); background: var(--rose-soft); color: var(--rose-dark); }
.recovery-process > i { height: 1px; background: var(--line-strong); }

.recovery-workspace {
    display: grid;
    grid-template-columns: minmax(340px, 0.82fr) minmax(480px, 1.18fr);
    gap: 18px;
    align-items: start;
}

.recovery-queue-panel,
.recovery-case-detail { min-height: 560px; }

.recovery-case-list {
    display: grid;
    border-top: 1px solid var(--line);
}

.recovery-case-row {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 11px;
    align-items: center;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-left: 3px solid transparent;
    border-radius: 0;
    padding: 16px 10px;
    background: transparent;
    text-align: left;
}

.recovery-case-row:hover,
.recovery-case-row:focus-visible { background: var(--canvas); }
.recovery-case-row.is-active { border-left-color: var(--rose); background: var(--rose-soft); }
.recovery-case-row strong,
.recovery-case-row small { display: block; }
.recovery-case-row strong { font-size: 0.7rem; }
.recovery-case-row small { margin-top: 3px; color: var(--muted); font-size: 0.58rem; line-height: 1.4; }

.case-priority {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 22px;
    border: 1px solid currentColor;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.case-priority--urgent { color: var(--rose-dark); }
.case-priority--review { color: var(--amber); }
.case-priority--closed { color: var(--green); }
.case-status { color: var(--muted); font-size: 0.58rem; font-weight: 700; }

.recovery-empty {
    margin: 16px 0 0;
    padding: 26px 16px;
    font-size: 0.66rem;
}

.case-detail-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.case-detail-header h3 { margin: 12px 0 3px; font-size: 1.15rem; }
.case-detail-header small { color: var(--muted); font-size: 0.59rem; }

.case-fact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    margin: 18px 0;
    border: 1px solid var(--line);
    background: var(--line);
}

.case-fact-grid > div { min-width: 0; padding: 12px; background: #fff; }
.case-fact-grid span,
.case-fact-grid strong { display: block; }
.case-fact-grid span,
.case-recommendation span { margin-bottom: 4px; color: var(--muted); font-size: 0.55rem; letter-spacing: 0.06em; text-transform: uppercase; }
.case-fact-grid strong { overflow-wrap: anywhere; font-size: 0.68rem; }

.recovery-case-detail blockquote {
    margin: 0 0 18px;
    border-left: 3px solid var(--rose);
    padding: 14px 16px;
    background: var(--rose-soft);
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-style: italic;
    line-height: 1.6;
}

.case-recommendation { margin-bottom: 18px; }
.case-recommendation span,
.case-recommendation strong { display: block; }
.case-recommendation strong { font-size: 0.71rem; line-height: 1.55; }

.case-timeline { display: grid; margin-bottom: 20px; }
.case-timeline > div { display: grid; grid-template-columns: 15px 1fr; gap: 10px; min-height: 44px; }
.case-timeline > div > span { position: relative; width: 9px; height: 9px; margin-top: 3px; border: 2px solid var(--line-strong); border-radius: 50%; background: #fff; }
.case-timeline > div:not(:last-child) > span::after { content: ""; position: absolute; top: 9px; left: 2px; width: 1px; height: 35px; background: var(--line-strong); }
.case-timeline > div.is-complete > span { border-color: var(--teal); background: var(--teal); }
.case-timeline p,
.case-timeline strong,
.case-timeline small { display: block; margin: 0; }
.case-timeline strong { font-size: 0.66rem; }
.case-timeline small { margin-top: 3px; color: var(--muted); font-size: 0.55rem; }
.case-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.recovery-outcome-panel { margin-top: 18px; }
.outcome-summary { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.outcome-summary > div { padding: 18px; border-right: 1px solid var(--line); text-align: center; }
.outcome-summary > div:last-child { border-right: 0; }
.outcome-summary strong,
.outcome-summary span { display: block; }
.outcome-summary strong { font-size: 1.55rem; }
.outcome-summary span { margin-top: 3px; color: var(--muted); font-size: 0.6rem; }
.recovery-outcome-panel > p,
.evidence-note { margin: 16px 0 0; color: var(--muted); font-size: 0.67rem; line-height: 1.55; }

.property-score-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.property-score-card {
    padding: 20px;
}

.property-score-card > span,
.property-score-card > strong,
.property-score-card > small {
    display: block;
}

.property-score-card > span {
    font-size: 0.72rem;
    font-weight: 700;
}

.property-score-card > strong {
    margin: 10px 0;
    font-size: 2.25rem;
    line-height: 1;
}

.property-score-card > small {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.62rem;
}

.property-score-card--risk {
    border-color: #dfabb2;
    background: var(--rose-soft);
}

.property-score-card.is-selected {
    border-color: var(--ink);
    box-shadow: 0 0 0 2px rgba(11, 29, 58, 0.12);
}

.property-score-card--risk .mini-meter i {
    background: var(--rose);
}

.property-detail-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1.3fr);
    gap: 36px;
}

.property-detail-summary > strong,
.property-detail-summary > span {
    display: block;
}

.property-detail-summary > strong {
    color: var(--rose);
    font-size: 2.4rem;
    line-height: 1;
}

.property-detail-summary > span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.67rem;
}

.concern-list h4 {
    margin: 0 0 10px;
    font-size: 0.78rem;
}

.concern-list > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.72rem;
}

.concern-list > div:last-child {
    border-bottom: 0;
}

.view-tools {
    display: flex;
    gap: 10px;
}

.view-tools input {
    width: 220px;
    padding-right: 10px;
}

.resident-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 18px;
}

.resident-summary-strip > div {
    padding: 16px 20px;
    border-right: 1px solid var(--line);
}

.resident-summary-strip > div:last-child {
    border-right: 0;
}

.resident-summary-strip strong,
.resident-summary-strip span {
    display: block;
}

.resident-summary-strip strong {
    margin-bottom: 3px;
    font-size: 1.4rem;
}

.resident-summary-strip span {
    color: var(--muted);
    font-size: 0.65rem;
}

.resident-records {
    display: grid;
    gap: 12px;
}

.resident-record {
    display: grid;
    grid-template-columns: 92px minmax(110px, 0.65fr) minmax(210px, 1fr) minmax(260px, 1.45fr) minmax(170px, 0.85fr);
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-left: 3px solid var(--rose);
}

.resident-record--review {
    border-left-color: var(--amber);
}

.resident-priority span,
.resident-priority small,
.resident-identity strong,
.resident-identity span,
.resident-facts span,
.resident-facts strong,
.resident-action span,
.resident-action strong {
    display: block;
}

.resident-priority span {
    color: var(--rose-dark);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
}

.resident-record--review .resident-priority span {
    color: var(--amber);
}

.resident-priority small,
.resident-identity span,
.resident-facts span,
.resident-action span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.58rem;
}

.resident-identity strong,
.resident-facts strong,
.resident-action strong {
    font-size: 0.72rem;
}

.resident-facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.resident-record blockquote {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-style: italic;
    line-height: 1.55;
}

.resident-action button {
    margin-top: 9px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    padding: 6px 9px;
    background: #fff;
    font-size: 0.62rem;
    font-weight: 700;
}

.resident-action button.is-complete {
    border-color: #bde1d0;
    background: var(--green-soft);
    color: var(--green);
}

.empty-state {
    border: 1px dashed var(--line-strong);
    padding: 44px;
    color: var(--muted);
    text-align: center;
}

.theme-panel--negative {
    border-top: 3px solid var(--rose);
}

.theme-panel--positive {
    border-top: 3px solid var(--teal);
}

.theme-panel .panel-heading > strong {
    font-size: 0.72rem;
}

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

.theme-list > div {
    display: grid;
    grid-template-columns: 1fr 34px;
    gap: 8px;
    font-size: 0.72rem;
}

.theme-list > div strong {
    text-align: right;
}

.theme-list i {
    grid-column: 1 / -1;
    display: block;
    height: 6px;
    background: var(--rose);
}

.theme-panel--positive .theme-list i {
    background: var(--teal);
}

.comment-panel {
    margin-top: 18px;
}

.renewal-risk-panel {
    margin-top: 18px;
}

.renewal-risk-table td:nth-child(2),
.renewal-risk-table td:nth-child(3),
.renewal-risk-table td:nth-child(4) {
    font-variant-numeric: tabular-nums;
}

.comment-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
}

.comment-list blockquote {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    justify-content: space-between;
    margin: 0;
    padding: 22px;
    border-right: 1px solid var(--line);
    border-top: 3px solid var(--teal);
}

.comment-list blockquote:last-child {
    border-right: 0;
}

.comment-list .comment-negative {
    border-top-color: var(--rose);
}

.comment-list p {
    margin: 0;
    font-size: 0.82rem;
    font-style: italic;
    line-height: 1.6;
}

.comment-list footer strong,
.comment-list footer span {
    display: block;
}

.comment-list footer strong {
    font-size: 0.68rem;
}

.comment-list footer span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.58rem;
}

.large-line-chart {
    min-width: 760px;
}

.target-line {
    stroke: var(--blue);
    stroke-dasharray: 8 6;
    stroke-width: 2;
}

.chart-legend {
    display: flex;
    gap: 14px;
    color: var(--muted);
    font-size: 0.65rem;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chart-legend i {
    display: inline-block;
    width: 18px;
    height: 2px;
}

.legend-portfolio {
    background: var(--rose);
}

.legend-target {
    border-top: 2px dashed var(--blue);
}

.trend-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.trend-summary-grid article {
    padding: 20px;
}

.trend-summary-grid span,
.trend-summary-grid strong,
.trend-summary-grid em {
    display: block;
}

.trend-summary-grid span {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 0.62rem;
    text-transform: uppercase;
}

.trend-summary-grid strong {
    font-size: 0.85rem;
}

.trend-summary-grid em {
    margin-top: 10px;
    color: var(--green);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 700;
}

.trend-summary-risk {
    border-color: #e4bac0 !important;
    background: var(--rose-soft) !important;
}

.trend-summary-risk em {
    color: var(--rose-dark);
}

.activity-metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.activity-metrics article {
    padding: 20px;
}

.activity-metrics span,
.activity-metrics strong,
.activity-metrics small {
    display: block;
}

.activity-metrics span {
    min-height: 32px;
    color: var(--ink-soft);
    font-size: 0.67rem;
    font-weight: 600;
}

.activity-metrics strong {
    margin: 8px 0;
    font-size: 2rem;
}

.activity-metrics small {
    color: var(--muted);
    font-size: 0.6rem;
}

.funnel {
    display: grid;
    gap: 12px;
    margin: 24px auto;
}

.funnel > div {
    display: flex;
    width: var(--funnel-width);
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    margin-inline: auto;
    padding: 12px 18px;
    border-left: 4px solid var(--rose);
    background: var(--rose-soft);
}

.funnel > div:nth-child(2) {
    border-left-color: var(--amber);
    background: var(--amber-soft);
}

.funnel > div:nth-child(3) {
    border-left-color: var(--teal);
    background: var(--teal-soft);
}

.funnel strong {
    font-size: 1.4rem;
}

.funnel span {
    color: var(--ink-soft);
    font-size: 0.7rem;
}

.funnel-note {
    margin: 0 auto;
    text-align: center;
}

.survey-intro {
    align-items: center;
}

.survey-progress {
    height: 5px;
    margin: -10px 0 22px;
    overflow: hidden;
    background: #e4eaf1;
}

.survey-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--teal);
    transition: width 180ms ease;
}

.survey-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

.survey-form {
    display: grid;
    gap: 14px;
}

.survey-section,
.survey-question {
    margin: 0;
    padding: 22px;
}

.survey-script {
    border-left: 3px solid var(--blue);
    background: var(--blue-soft);
}

.survey-script p {
    margin: 0 0 10px;
    color: var(--ink-soft);
    font-size: 0.76rem;
    line-height: 1.6;
}

.survey-script > strong {
    font-size: 0.78rem;
}

.survey-expectation {
    margin-top: 18px;
    border-top: 1px solid #c9d7e9;
    padding-top: 16px;
}

.survey-expectation span {
    display: block;
    margin-bottom: 6px;
    color: var(--blue);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.survey-expectation p {
    margin-bottom: 0;
    color: var(--ink);
    font-weight: 500;
}

.survey-question {
    min-width: 0;
}

.survey-question legend {
    float: left;
    width: 100%;
    padding: 0;
    font-size: 0.88rem;
    font-weight: 700;
}

.survey-question legend + p {
    clear: both;
    padding-top: 10px;
}

.survey-question legend .question-number {
    margin-bottom: 5px;
}

.survey-question > p,
.survey-text-question > span:not(.question-number) {
    display: block;
    margin: 10px 0 16px;
    color: var(--ink-soft);
    font-size: 0.76rem;
    line-height: 1.55;
}

.rating-scale {
    display: grid;
    grid-template-columns: repeat(11, minmax(34px, 1fr));
    gap: 5px;
}

.rating-scale label,
.choice-list label {
    position: relative;
}

.rating-scale input,
.choice-list input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating-scale span,
.choice-list label span {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    padding: 7px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 0.68rem;
    text-align: center;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.rating-scale label:hover span,
.choice-list label:hover span {
    border-color: var(--rose);
}

.rating-scale input:focus-visible + span,
.choice-list input:focus-visible + span {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.rating-scale input:checked + span,
.choice-list input:checked + span {
    border-color: var(--rose);
    background: var(--rose);
    color: #fff;
    font-weight: 700;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.57rem;
}

.choice-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
}

.choice-list--four {
    grid-template-columns: repeat(4, 1fr);
}

.choice-list--three {
    grid-template-columns: repeat(3, 1fr);
}

.choice-list--two {
    grid-template-columns: repeat(2, minmax(120px, 220px));
}

.conditional-question {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.optional-rating-feedback {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
    animation: viewIn 180ms ease;
}

.optional-rating-feedback label,
.optional-rating-feedback label strong,
.optional-rating-feedback label span {
    display: block;
}

.optional-rating-feedback label strong {
    font-size: 0.75rem;
}

.optional-rating-feedback label span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.61rem;
}

.optional-rating-feedback textarea {
    width: 100%;
    margin-top: 10px;
    resize: vertical;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    padding: 11px 12px;
    color: var(--ink);
    font-size: 0.74rem;
    line-height: 1.5;
}

.confidentiality-note,
.measurement-note,
.privacy-confirmation {
    margin-top: 18px;
    border-left: 3px solid var(--blue);
    padding: 14px 16px;
    background: var(--blue-soft);
}

.confidentiality-note > strong,
.measurement-note > span,
.privacy-confirmation > strong {
    display: block;
    margin-bottom: 6px;
    color: var(--blue);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.confidentiality-note p,
.measurement-note p,
.privacy-confirmation p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.67rem;
    line-height: 1.55;
}

.measurement-note p + p {
    margin-top: 7px;
}

.measurement-note > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 11px;
    border-top: 1px solid #c8d7e9;
    padding-top: 10px;
    color: var(--ink-soft);
    font-size: 0.66rem;
}

.measurement-note > div strong {
    color: var(--ink);
}

.privacy-confirmation {
    border-left-color: var(--teal);
    background: var(--teal-soft);
    animation: viewIn 180ms ease;
}

.privacy-confirmation > strong {
    color: var(--teal);
}

.conditional-question > strong {
    display: block;
    margin-bottom: 12px;
    font-size: 0.75rem;
}

.survey-text-question > strong {
    font-size: 0.88rem;
}

.survey-text-question textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    padding: 12px;
    color: var(--ink);
    font-size: 0.76rem;
    line-height: 1.5;
}

.survey-side-panel {
    position: sticky;
    top: 94px;
    display: grid;
    gap: 14px;
}

.survey-side-panel section {
    padding: 18px;
}

.survey-side-panel h3 {
    margin: 0 0 14px;
    font-size: 0.84rem;
}

.flag-list {
    display: grid;
    gap: 7px;
}

.flag-item {
    border-left: 3px solid var(--rose);
    padding: 9px 10px;
    background: var(--rose-soft);
    color: var(--rose-dark);
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.4;
}

.no-flags {
    margin: 0;
    color: var(--muted);
    font-size: 0.67rem;
    line-height: 1.5;
}

.measure-list {
    margin: 0;
}

.measure-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.measure-list div:last-child {
    border-bottom: 0;
}

.measure-list dt,
.measure-list dd {
    margin: 0;
    font-size: 0.62rem;
}

.measure-list dt {
    color: var(--ink-soft);
}

.measure-list dd {
    color: var(--rose-dark);
    font-weight: 700;
}

.sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(5, 16, 34, 0.55);
}

@media (max-width: 1260px) {
    .metric-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .metric-card--primary {
        grid-column: span 1;
    }

    .dashboard-grid--two {
        grid-template-columns: 1fr;
    }

    .dashboard-grid--compact {
        grid-template-columns: repeat(2, 1fr);
    }

    .resident-record {
        grid-template-columns: 90px 120px minmax(210px, 1fr) minmax(240px, 1fr);
    }

    .resident-action {
        grid-column: 2 / -1;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .resident-action button {
        margin-top: 0;
        margin-left: auto;
    }

    .recovery-workspace {
        grid-template-columns: minmax(300px, 0.75fr) minmax(420px, 1.25fr);
    }
}

@media (max-width: 1060px) {
    :root {
        --sidebar-width: 236px;
    }

    .dashboard-content {
        padding: 22px;
    }

    .sample-data-label {
        display: none;
    }

    .property-score-grid,
    .activity-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .activity-metrics article:last-child {
        grid-column: span 2;
    }

    .resident-record {
        grid-template-columns: 90px minmax(120px, 0.5fr) minmax(220px, 1fr);
    }

    .resident-record blockquote {
        grid-column: 1 / -1;
        border-top: 1px solid var(--line);
        padding-top: 14px;
    }

    .resident-action {
        grid-column: 1 / -1;
    }

    .survey-layout {
        grid-template-columns: 1fr;
    }

    .survey-side-panel {
        position: static;
        grid-template-columns: repeat(2, 1fr);
    }

    .recovery-workspace {
        grid-template-columns: 1fr;
    }

    .recovery-queue-panel,
    .recovery-case-detail {
        min-height: 0;
    }
}

@media (max-width: 820px) {
    .dashboard-sidebar {
        width: min(86vw, 300px);
        transform: translateX(-102%);
        transition: transform 180ms ease;
    }

    .dashboard-sidebar.is-open {
        transform: translateX(0);
    }

    .dashboard-workspace {
        padding-left: 0;
    }

    .mobile-sidebar-toggle {
        display: inline-grid;
        place-items: center;
    }

    .dashboard-topbar {
        padding-inline: 18px;
    }

    .sample-data-label,
    .topbar-period {
        display: none;
    }

    .dashboard-content {
        padding: 20px 16px 36px;
    }

    .view-intro,
    .residents-intro {
        align-items: start;
    }

    .view-intro,
    .view-tools {
        flex-direction: column;
    }

    .view-tools,
    .view-tools label,
    .view-tools input,
    .view-tools select {
        width: 100%;
    }

    .recovery-intro-actions {
        width: 100%;
        justify-items: stretch;
    }

    .recovery-value-note {
        width: 100%;
    }

    .metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .metric-card--primary {
        grid-column: span 2;
    }

    .recovery-metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid--compact,
    .property-detail-grid,
    .comment-list,
    .trend-summary-grid {
        grid-template-columns: 1fr;
    }

    .comment-list blockquote {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .comment-list blockquote:last-child {
        border-bottom: 0;
    }

    .resident-summary-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .resident-summary-strip > div:nth-child(2) {
        border-right: 0;
    }

    .resident-summary-strip > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .resident-record {
        grid-template-columns: 1fr 1fr;
    }

    .resident-facts,
    .resident-record blockquote,
    .resident-action {
        grid-column: 1 / -1;
    }

    .survey-side-panel {
        grid-template-columns: 1fr;
    }

    .recovery-process {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .recovery-process > i {
        display: none;
    }

    .outcome-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .outcome-summary > div:nth-child(2) {
        border-right: 0;
    }

    .outcome-summary > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .choice-list,
    .choice-list--four {
        grid-template-columns: repeat(2, 1fr);
    }

    .rating-scale {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 560px) {
    .dashboard-topbar h1 {
        font-size: 0.9rem;
    }

    .topbar-controls {
        display: none;
    }

    .metric-grid,
    .property-score-grid,
    .activity-metrics,
    .recovery-metric-grid {
        grid-template-columns: 1fr;
    }

    .metric-card--primary,
    .activity-metrics article:last-child {
        grid-column: auto;
    }

    .metric-card {
        min-height: 126px;
    }

    .recovery-flow {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .recovery-flow i {
        display: none;
    }

    .resident-record {
        grid-template-columns: 1fr;
    }

    .resident-facts,
    .resident-record blockquote,
    .resident-action {
        grid-column: auto;
    }

    .resident-action {
        display: block;
    }

    .resident-action button {
        margin-top: 10px;
        margin-left: 0;
    }

    .choice-list,
    .choice-list--four,
    .choice-list--three,
    .choice-list--two {
        grid-template-columns: 1fr;
    }

    .rating-scale {
        grid-template-columns: repeat(4, 1fr);
    }

    .recovery-case-row {
        grid-template-columns: 52px 1fr;
    }

    .recovery-case-row .case-status {
        grid-column: 2;
    }

    .case-fact-grid,
    .outcome-summary {
        grid-template-columns: 1fr;
    }

    .outcome-summary > div,
    .outcome-summary > div:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .outcome-summary > div:last-child {
        border-bottom: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
