:root {
    color-scheme: light;
    --background: #f6f8fb;
    --surface: #ffffff;
    --text: #172033;
    --muted: #5a667a;
    --border: #d9e0ea;
    --accent: #0f766e;
    --focus: #1d4ed8;
    --navy: #071d3a;
    --navy-strong: #041326;
    --navy-text: #f7fbff;
    --navy-muted: #b9c7d8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.shell {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}

.app-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--navy);
    color: var(--navy-text);
    padding: 12px 0;
    box-shadow: 0 1px 0 rgba(4, 19, 38, 0.3);
}

.app-header-inner {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.app-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.app-brand-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(190, 218, 255, 0.26);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #8ee3d2;
}

.app-brand-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.app-brand-name {
    overflow: hidden;
    color: var(--navy-text);
    font-size: 1.06rem;
    font-weight: 750;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-account-indicator {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    color: var(--navy-muted);
    font-size: 0.88rem;
    font-weight: 650;
    white-space: nowrap;
}

.app-account-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(190, 218, 255, 0.32);
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 35%, #d8e8f8 0 3px, transparent 3.5px),
        radial-gradient(circle at 50% 82%, #d8e8f8 0 6px, transparent 6.5px),
        rgba(255, 255, 255, 0.08);
}

.eyebrow,
.status-label {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 1.8rem;
}

h2 {
    margin-bottom: 10px;
    font-size: 1.35rem;
}

.page-content {
    padding: 32px 0;
}

.status-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    padding: 28px;
}

.landing-panel {
    max-width: 760px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    padding: 34px;
}

.landing-panel h2 {
    margin-bottom: 12px;
    color: var(--navy);
    font-size: 2rem;
    line-height: 1.2;
}

.landing-panel p {
    max-width: 62ch;
    color: var(--muted);
}

.landing-panel p:last-child {
    margin-bottom: 0;
}

.preview-shell {
    display: grid;
    gap: 18px;
    max-width: 920px;
}

.preview-heading {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    padding: 28px 30px;
}

.preview-heading h2 {
    margin-bottom: 10px;
    color: var(--navy);
    font-size: 1.8rem;
    line-height: 1.2;
}

.preview-heading p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.preview-card {
    display: grid;
    gap: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    padding: 18px;
    color: var(--text);
}

.preview-card-heading {
    display: grid;
    gap: 6px;
}

.preview-card-heading h3 {
    margin: 0;
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 760;
}

.preview-card-heading p {
    margin: 0;
    color: var(--muted);
}

.preview-test-count {
    font-weight: 760;
}

.preview-actions {
    display: grid;
    gap: 9px;
}

.preview-action-link {
    display: grid;
    gap: 3px;
    border: 1px solid #cbd8e3;
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    text-decoration: none;
}

.preview-action-link:hover,
.preview-action-link:focus-visible {
    border-color: var(--accent);
    background: #eefaf4;
    outline: none;
}

.preview-action-link:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.preview-action-link.primary {
    display: inline-flex;
    justify-content: center;
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
    font-weight: 760;
}

.preview-action-link span:first-child {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.preview-action-link.primary span:first-child {
    color: inherit;
    font-size: inherit;
    text-transform: none;
}

.preview-action-link span:nth-child(2),
.preview-action-link span:nth-child(4) {
    color: var(--muted);
    font-size: 0.86rem;
}

.preview-action-link span:nth-child(3) {
    color: var(--navy);
    font-weight: 700;
}

.status-panel p {
    max-width: 64ch;
    color: var(--muted);
}

.status-list {
    display: grid;
    gap: 16px;
    margin: 0;
}

.status-list div {
    border-left: 3px solid var(--accent);
    padding-left: 14px;
}

.status-list dt {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.status-list dd {
    margin: 2px 0 0;
}

code {
    border-radius: 4px;
    background: #edf2f7;
    padding: 2px 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 720px) {
    .app-header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .app-brand-name {
        white-space: normal;
    }

    .app-account-indicator {
        margin-left: 46px;
    }

    .status-panel {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .landing-panel {
        padding: 24px;
    }

    .preview-heading {
        padding: 24px;
    }
}

/* Patient clinical workspace tabs */
.shell.page-content-wide {
    width: min(1480px, calc(100% - 40px));
}

.clinical-workspace {
    gap: 18px;
}

.clinical-tabs {
    border-bottom: 1px solid #cfd9e4;
}

.clinical-tabs [role="tablist"] {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    min-width: 0;
}

.clinical-tabs [role="tab"] {
    position: relative;
    min-height: 46px;
    border: 0;
    border-radius: 8px 8px 0 0;
    background: transparent;
    padding: 11px 20px 12px;
    color: #4b5d71;
    font: inherit;
    font-size: 0.94rem;
    font-weight: 720;
    letter-spacing: 0;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
}

.clinical-tabs [role="tab"]::after {
    position: absolute;
    right: 14px;
    bottom: -1px;
    left: 14px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
    content: "";
}

.clinical-tabs [role="tab"]:hover {
    color: #08233f;
    background: #edf4f7;
}

.clinical-tabs [role="tab"].active,
.clinical-tabs [role="tab"][aria-selected="true"] {
    color: #0b5f59;
    background: #eef8f6;
}

.clinical-tabs [role="tab"].active::after,
.clinical-tabs [role="tab"][aria-selected="true"]::after {
    background: var(--accent);
}

.clinical-tabs [role="tab"]:active {
    transform: translateY(1px);
}

.clinical-tab-content {
    min-height: 120px;
}

.clinical-tab-panel[hidden] {
    display: none;
}

.clinical-tab-panel > .results-card {
    width: 100%;
}

.genetic-tests-workspace {
    display: grid;
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.genetic-tests-workspace .results-main-panel,
.genetic-tests-workspace .results-card,
.genetic-tests-workspace .findings-table-wrap {
    min-width: 0;
    max-width: 100%;
}

.clinical-workspace .lab-table {
    min-width: 900px;
}

.clinical-workspace .lab-table th:nth-child(1) {
    width: 25%;
}

.clinical-workspace .lab-table th:nth-child(2),
.clinical-workspace .lab-table th:nth-child(3) {
    width: 11%;
}

.clinical-workspace .lab-table th:nth-child(4) {
    width: 18%;
}

.clinical-workspace .lab-table th:nth-child(5) {
    width: 15%;
}

.clinical-workspace .lab-table th:nth-child(6) {
    width: 20%;
}

@media (max-width: 1200px) {
    .genetic-tests-workspace .summary-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .genetic-tests-workspace .summary-primary {
        border-right: 0;
        padding-right: 0;
    }

    .genetic-tests-workspace .summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .genetic-tests-workspace .test-card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .genetic-tests-workspace .test-report-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 920px) {
    .shell.page-content-wide {
        width: min(100% - 32px, 1480px);
    }

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

@media (max-width: 620px) {
    .clinical-tabs [role="tablist"] {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .clinical-tabs [role="tab"] {
        min-width: 0;
        padding-inline: 8px;
        font-size: 0.86rem;
        white-space: normal;
    }
}

.results-shell {
    display: grid;
    gap: 16px;
}

.results-page-title h2 {
    margin: 0;
    color: var(--navy);
    font-size: 1.9rem;
    font-weight: 760;
}

.results-page-title-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: -2px;
}

.demo-data-indicator {
    border: 1px solid #c6d3df;
    border-radius: 999px;
    padding: 3px 9px;
    color: var(--muted);
    background: #f8fafc;
    font-size: 0.78rem;
    font-weight: 760;
}

.results-card,
.test-history-panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    padding: 18px 20px;
}

.results-card p,
.test-history-panel p {
    max-width: 70ch;
    color: var(--muted);
}

.results-card,
.test-history-panel,
.status-panel {
    overflow-wrap: anywhere;
}

.results-workspace {
    display: grid;
    grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.results-main-panel {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.test-history-panel {
    position: sticky;
    top: 84px;
    display: grid;
    gap: 14px;
}

.test-history-panel h3 {
    margin: 0;
    color: var(--navy);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

.test-history-entry {
    display: grid;
    gap: 5px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
    text-decoration: none;
}

a.test-history-entry:hover {
    border-color: #c6d3df;
    background: #f8fafc;
}

a.test-history-entry:focus-visible,
.report-action-link:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.test-history-item.selected .test-history-entry {
    border-color: #87b7c7;
    background: #eef7f8;
    box-shadow: inset 3px 0 0 var(--accent);
}

.test-history-indicator {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.test-history-date {
    color: var(--navy);
    font-size: 0.94rem;
    font-weight: 760;
}

.test-history-name {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.3;
}

.test-history-findings {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 650;
}

.empty-history p {
    margin: 0;
}

.patient-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.patient-identity h3 {
    margin: 0;
    color: var(--navy);
    font-size: 1.35rem;
    line-height: 1.2;
}

.patient-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    align-items: center;
    margin: 0;
}

.patient-facts div {
    display: grid;
    gap: 2px;
}

.patient-facts div + div {
    border-left: 1px solid var(--border);
    padding-left: 20px;
}

.patient-facts dt,
.summary-grid dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.patient-facts dd,
.summary-grid dd {
    margin: 0;
    color: var(--text);
    font-weight: 650;
}

.summary-card {
    display: grid;
    grid-template-columns: minmax(210px, 0.9fr) minmax(0, 2fr);
    gap: 22px;
    align-items: center;
}

.summary-primary {
    border-right: 1px solid var(--border);
    padding-right: 20px;
}

.summary-kicker,
.test-status-label {
    margin: 0 0 5px;
    color: var(--accent) !important;
    font-size: 0.76rem;
    font-weight: 760;
    text-transform: uppercase;
}

.summary-primary h3,
.selected-test-card h3 {
    margin: 0;
    color: var(--navy);
}

.summary-primary h3 {
    font-size: 1.08rem;
}

.summary-primary p {
    margin: 5px 0 0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    gap: 14px;
    margin: 0;
}

.summary-grid div {
    border-left: 3px solid #b7e4dc;
    padding-left: 12px;
}

.results-state {
    display: block;
}

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

.selected-test-card h3 {
    font-size: 1.35rem;
}

.selected-test-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 760;
    text-transform: uppercase;
}

.latest-badge {
    border: 1px solid #b7e4dc;
    border-radius: 999px;
    padding: 2px 8px;
    color: #0b5f59;
    background: #eefaf4;
    font-size: 0.7rem;
}

.test-meta {
    margin: 5px 0 0;
    color: var(--muted);
}

.findings-table-wrap:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: -3px;
}

.test-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.report-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 7px 13px;
    font-size: 0.92rem;
    font-weight: 760;
    text-decoration: none;
    white-space: nowrap;
}

.report-action-link.primary {
    color: #ffffff;
    background: var(--accent);
}

.report-action-link.primary:hover {
    background: #0b5f59;
}

.report-action-link.secondary {
    border-color: #9fc9c2;
    color: var(--accent);
    background: #ffffff;
}

.report-action-link.secondary:hover {
    background: #eefaf4;
}

.report-unavailable {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 650;
}

.inline-separator::before {
    content: "|";
    margin: 0 8px;
    color: var(--border);
}

.findings-table-wrap {
    margin-top: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.findings-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.findings-table th,
.findings-table td {
    border-bottom: 1px solid var(--border);
    padding: 11px 14px;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.findings-table th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 760;
    text-transform: uppercase;
}

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

.gene-cell {
    color: var(--navy);
    font-weight: 800;
}

.result-status {
    display: inline-block;
    border-left: 3px solid #b7e4dc;
    padding-left: 8px;
    font-weight: 650;
}

.history-section {
    padding: 18px;
}

.history-section h3 {
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.empty-inline-state {
    margin: 14px 0 0;
}

@media (max-width: 920px) {
    .results-workspace {
        grid-template-columns: 1fr;
    }

    .test-history-panel {
        position: static;
    }

    .test-history-list {
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    }
}

@media (max-width: 720px) {
    .patient-card,
    .summary-card,
    .test-card-header {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .patient-facts div + div,
    .summary-primary {
        border-left: 0;
        border-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

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

    .results-card,
    .test-history-panel {
        padding: 20px;
    }

    .test-report-actions {
        justify-content: flex-start;
    }

    .inline-separator {
        display: block;
        margin-top: 2px;
    }

    .inline-separator::before {
        content: "";
        margin: 0;
    }
}

@media (max-width: 520px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Physician results visual refinement */
.results-shell {
    gap: 20px;
}

.results-page-title h2 {
    color: #08233f;
    font-size: 2rem;
}

.results-card,
.test-history-panel {
    border-color: #d7e0ea;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.results-workspace {
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
    gap: 22px;
}

.panel-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-heading-icon,
.metric-icon,
.fact-icon,
.test-meta-icon,
.button-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
}

.panel-heading-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: var(--accent);
    background: #e7f7f4;
}

.panel-heading-icon svg,
.metric-icon svg,
.fact-icon svg,
.test-meta-icon svg,
.button-icon svg,
.patient-avatar svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.test-history-panel h3 {
    color: #08233f;
    font-size: 0.9rem;
}

.test-history-panel {
    min-width: 0;
    overflow-wrap: normal;
}

.test-history-list {
    position: relative;
    gap: 12px;
    padding-left: 16px;
}

.test-history-list::before {
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 9px;
    width: 2px;
    border-radius: 999px;
    background: #d8e5ec;
    content: "";
}

.test-history-item {
    position: relative;
}

.test-history-entry {
    position: relative;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 11px;
    width: 100%;
    min-width: 0;
    border-color: #dce5ed;
    border-radius: 12px;
    background: #ffffff;
    padding: 13px 13px 13px 0;
}

a.test-history-entry:hover {
    border-color: #9fcac4;
    background: #f5fbfa;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.08);
}

.timeline-node {
    z-index: 1;
    display: block;
    width: 14px;
    height: 14px;
    margin-top: 4px;
    border: 3px solid #cbd8e3;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 0 0 4px #ffffff;
}

.test-history-item.selected .timeline-node {
    border-color: var(--accent);
    background: var(--accent);
}

.test-history-content {
    display: grid;
    min-width: 0;
    gap: 5px;
    overflow-wrap: normal;
}

.test-history-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.test-history-indicator,
.latest-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border: 1px solid #b9dcd7;
    border-radius: 999px;
    background: #ecf8f6;
    padding: 2px 8px;
    color: #0b5f59;
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1.25;
}

.test-history-chevron {
    color: #7b8a9c;
    font-size: 1.25rem;
    line-height: 1;
}

.test-history-date {
    font-size: 0.98rem;
}

.test-history-name {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

.test-history-item.selected .test-history-entry {
    border-color: #79bdb6;
    background: #eef9f7;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.12), inset 4px 0 0 var(--accent);
}

.patient-card {
    align-items: center;
    border-top: 4px solid #0f766e;
    padding: 20px 22px;
}

.patient-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
}

.patient-avatar {
    display: inline-flex;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid #b9dcd7;
    border-radius: 999px;
    color: var(--accent);
    background: #ecf8f6;
}

.patient-avatar svg {
    width: 24px;
    height: 24px;
}

.patient-identity h3 {
    font-size: 1.42rem;
    font-weight: 820;
}

.patient-facts {
    gap: 14px 24px;
}

.patient-facts dt {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fact-icon {
    color: var(--accent);
}

.fact-icon svg {
    width: 15px;
    height: 15px;
}

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

.medications-card-header h3 {
    margin-bottom: 0;
    color: #08233f;
    font-size: 1.18rem;
    font-weight: 820;
}

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

.medication-item {
    display: grid;
    gap: 10px;
    border: 1px solid #dde7ee;
    border-radius: 12px;
    background: #f8fbfd;
    padding: 14px 16px;
}

.medication-primary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.medication-primary strong {
    color: #08233f;
    font-size: 1rem;
}

.medication-status {
    border: 1px solid #c7d6e2;
    border-radius: 999px;
    color: #445064;
    background: #ffffff;
    padding: 2px 9px;
    font-size: 0.76rem;
    font-weight: 750;
}

.medication-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px 16px;
    margin: 0;
}

.medication-details div {
    min-width: 0;
}

.medication-details dt {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 750;
    text-transform: uppercase;
}

.medication-details dd {
    margin: 2px 0 0;
    color: var(--text);
    overflow-wrap: break-word;
}

.labs-card {
    display: grid;
    gap: 16px;
}

.lab-panel-list {
    display: grid;
    gap: 16px;
}

.labs-page-content {
    display: grid;
    gap: 20px;
}

.lab-panel {
    border: 1px solid #dde7ee;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.lab-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e4ebf2;
    background: #f8fbfd;
    padding: 14px 16px;
}

.lab-panel-header h4 {
    margin: 0;
    color: #08233f;
    font-size: 1rem;
    font-weight: 820;
}

.lab-panel-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.lab-panel-status,
.lab-flag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border: 1px solid #d8e2ea;
    border-radius: 999px;
    background: #ffffff;
    color: #475467;
    font-size: 0.76rem;
    font-weight: 760;
    line-height: 1;
    padding: 5px 9px;
    white-space: nowrap;
}

.lab-flag.has-flag {
    border-color: #f5c2b8;
    background: #fff6f3;
    color: #b42318;
}

.lab-table-wrap {
    overflow-x: auto;
}

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

.lab-table th,
.lab-table td {
    border-bottom: 1px solid #e4ebf2;
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
}

.lab-table th {
    color: #445064;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.lab-table td {
    color: var(--text);
}

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

.summary-card {
    grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
}

.summary-grid {
    gap: 12px;
}

.summary-grid .summary-metric {
    display: grid;
    gap: 8px;
    min-height: 92px;
    border: 1px solid #dde7ee;
    border-left: 0;
    border-radius: 12px;
    background: #f8fbfd;
    padding: 14px;
}

.summary-grid .summary-metric dt {
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-grid .summary-metric dd {
    color: #08233f;
    font-size: 2rem;
    font-weight: 850;
    line-height: 1;
}

.metric-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: var(--accent);
    background: #e7f7f4;
}

.selected-test-card {
    border-top: 4px solid #0f766e;
}

.selected-test-kicker {
    color: #0b5f59;
    font-weight: 850;
}

.test-card-header {
    gap: 20px;
}

.selected-test-card h3 {
    color: #08233f;
    font-size: 1.52rem;
    font-weight: 820;
}

.test-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    margin-top: 9px;
}

.test-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.test-meta-icon {
    color: var(--accent);
}

.test-meta-icon svg {
    width: 16px;
    height: 16px;
}

.inline-separator::before {
    content: "";
    margin: 0;
}

.report-action-link {
    gap: 8px;
    min-height: 42px;
    border-radius: 10px;
    padding: 9px 15px;
}

.button-icon svg {
    width: 17px;
    height: 17px;
}

.report-action-link.primary {
    border-color: #0f766e;
    background: #0f766e;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.report-action-link.secondary {
    border-color: #b9dcd7;
    color: #0b5f59;
    background: #f7fcfb;
}

.findings-table {
    border-collapse: separate;
    border-spacing: 0;
}

.findings-table th {
    background: #f3f7fa;
    color: #445064;
}

.findings-table th:first-child {
    border-top-left-radius: 10px;
}

.findings-table th:last-child {
    border-top-right-radius: 10px;
}

.findings-table td {
    background: #ffffff;
}

.findings-table th,
.findings-table td {
    border-bottom-color: #e4ebf2;
    padding: 14px 16px;
}

.gene-cell {
    color: #08233f;
    font-size: 1rem;
}

.result-status {
    display: inline;
    border-left: 0;
    padding-left: 0;
    color: #4b5563;
    font-weight: 760;
}

.result-status.detected {
    color: #b42318;
}

.result-status.not-detected {
    color: #027a48;
}

.result-status.not-assessed {
    color: #667085;
}

@media (max-width: 920px) {
    .results-workspace {
        grid-template-columns: 1fr;
    }

    .test-history-list {
        padding-left: 0;
    }

    .test-history-list::before {
        display: none;
    }

    .test-history-entry {
        padding-left: 12px;
    }
}

@media (max-width: 720px) {
    .summary-card {
        grid-template-columns: 1fr;
    }

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

    .summary-grid .summary-metric dd {
        font-size: 1.6rem;
    }
}
