:root {
    --blue: #1666d9;
    --dark: #172033;
    --grey: #5d6679;
    --light-blue: #eef5ff;
    --border: #e4eaf3;
    --input-border: #cfd6e0;
    --green: #16834a;
    --green-bg: #e8f8ef;
    --orange: #b54708;
    --orange-bg: #fff4e5;
    --red: #c0362c;
    --red-bg: #fdecea;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f7f9fc;
    color: var(--dark);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

/* Navigation */

.navbar {
    height: 72px;
    padding: 0 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: white;
    border-bottom: 1px solid #e8ebf0;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    background: var(--blue);
    color: white;
    font-size: 22px;
    line-height: 1;
}

.navbar nav {
    display: flex;
    gap: 30px;
}

.navbar nav a {
    text-decoration: none;
    color: #475467;
    font-size: 15px;
    transition: color 0.2s;
}

.navbar nav a:hover,
.navbar nav a[aria-current="page"] {
    color: var(--blue);
}

.navbar nav a[aria-current="page"] {
    font-weight: bold;
}

/* Buttons (shared by every page) */

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.primary-btn {
    border: none;
    background: var(--blue);
    color: white;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(22, 102, 217, 0.25);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.secondary-btn {
    border: 1px solid var(--input-border);
    background: white;
    color: #344054;
}

.secondary-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
}

/* Hero Section */

.hero {
    min-height: 620px;
    padding: 80px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    background: linear-gradient(135deg, #f7fbff, var(--light-blue));
}

.hero-content {
    max-width: 620px;
}

.badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 30px;
    background: #e6f0ff;
    color: var(--blue);
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 22px;
}

.hero h1 {
    font-size: clamp(34px, 6vw, 54px);
    line-height: 1.08;
    margin-bottom: 22px;
}

.hero-text {
    font-size: 18px;
    line-height: 1.7;
    color: var(--grey);
    max-width: 580px;
}

.audience {
    margin-top: 14px;
    font-size: 15px;
    font-weight: bold;
    color: #344054;
}

.hero-buttons {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Risk Card */

.hero-card {
    width: 410px;
    flex-shrink: 0;
    padding: 28px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 15px 50px rgba(30, 60, 100, 0.12);
    text-align: left;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    font-size: 14px;
    font-weight: bold;
}

.status {
    padding: 5px 10px;
    border-radius: 20px;
    background: var(--green-bg);
    color: var(--green);
    font-size: 12px;
}

.risk-display {
    display: flex;
    align-items: center;
    gap: 20px;
}

.circle {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    position: relative;
    border-radius: 50%;
    background: conic-gradient(var(--blue) calc(var(--value) * 1%), #dbe9ff 0);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--blue);
}

/* white centre so the gradient shows as a ring */
.circle::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: white;
}

.circle strong,
.circle span {
    position: relative;
}

.circle strong {
    font-size: 20px;
}

.circle span {
    font-size: 12px;
    color: var(--grey);
}

.risk-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.risk-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--grey);
}

.info-row {
    display: flex;
    gap: 20px;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #edf0f4;
}

.info-row div {
    flex: 1;
}

.info-row small {
    display: block;
    color: var(--grey);
    margin-bottom: 7px;
}

.info-row strong {
    font-size: 14px;
}

/* Why It Matters */

.why {
    padding: 80px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    background: white;
}

.why-text {
    max-width: 560px;
}

.why h2,
.model h2 {
    font-size: clamp(28px, 4vw, 36px);
    margin-bottom: 15px;
}

.why-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 460px;
}

.stat {
    padding: 24px;
    border-radius: 14px;
    background: var(--light-blue);
}

.stat strong {
    display: block;
    font-size: 36px;
    color: var(--blue);
    margin-bottom: 8px;
}

.stat span {
    font-size: 14px;
    line-height: 1.5;
    color: var(--grey);
}

.source {
    grid-column: 1 / -1;
    font-size: 12px;
    line-height: 1.5;
    color: var(--grey);
}

.source a {
    color: var(--grey);
}

/* Features */

.features {
    padding: 90px 7%;
    background: #f7f9fc;
}

.section-heading {
    max-width: 650px;
    margin-bottom: 45px;
}

.section-label {
    font-size: 12px;
    font-weight: bold;
    color: var(--blue);
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 36px);
    margin-bottom: 15px;
}

.section-intro {
    color: var(--grey);
    line-height: 1.7;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.feature-card {
    padding: 30px;
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 14px;
}

.feature-number {
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    background: #eaf2ff;
    color: var(--blue);
    font-weight: bold;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--grey);
    line-height: 1.6;
}

/* Risk Levels */

.levels {
    padding: 90px 7%;
    background: white;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.level-card {
    padding: 28px;
    border-radius: 14px;
    border-top: 5px solid;
}

.level-card strong {
    display: block;
    font-size: 24px;
    margin: 16px 0 10px;
}

.level-card p {
    color: var(--grey);
    line-height: 1.6;
}

.level-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    color: white;
}

.level-card.low {
    background: #f1faf5;
    border-color: var(--green);
}

.level-card.low .level-tag {
    background: var(--green);
}

.level-card.medium {
    background: #fff8ef;
    border-color: var(--orange);
}

.level-card.medium .level-tag {
    background: var(--orange);
}

.level-card.high {
    background: #fdf3f2;
    border-color: var(--red);
}

.level-card.high .level-tag {
    background: var(--red);
}

/* About the Model */

.model {
    padding: 90px 7%;
    background: #f7f9fc;
}

.model-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.model-grid > div:first-child {
    max-width: 600px;
}

.section-intro + .section-intro {
    margin-top: 14px;
}

.model-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    flex-shrink: 0;
    width: 420px;
}

.model-stats div {
    padding: 20px;
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 12px;
}

.model-stats small {
    display: block;
    color: var(--grey);
    margin-bottom: 6px;
}

.model-stats strong {
    font-size: 18px;
}

.inputs {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #e6eaf0;
}

.inputs h3 {
    margin-bottom: 8px;
}

.inputs p {
    color: var(--grey);
    margin-bottom: 20px;
}

.input-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.input-list li {
    padding: 9px 16px;
    border-radius: 30px;
    background: white;
    border: 1px solid var(--input-border);
    font-size: 14px;
    color: #344054;
}

/* Limitations */

.limits {
    padding: 90px 7%;
    background: white;
}

.limits .section-heading {
    margin-bottom: 30px;
}

.limit-list {
    max-width: 800px;
    padding-left: 20px;
}

.limit-list li {
    color: var(--grey);
    line-height: 1.7;
    margin-bottom: 12px;
    padding-left: 6px;
}

/* Call to Action */

.cta {
    padding: 80px 7%;
    text-align: center;
    background: var(--light-blue);
}

.cta h2 {
    font-size: clamp(26px, 4vw, 34px);
    margin-bottom: 12px;
}

.cta p {
    color: var(--grey);
    margin-bottom: 25px;
}

.cta .disclaimer {
    margin: 18px 0 0;
    font-size: 13px;
}

/* Footer */

footer {
    padding: 30px 7%;
    text-align: center;
    background: var(--dark);
    color: white;
}

footer p {
    font-size: 14px;
    margin-bottom: 8px;
}

footer span {
    color: #aab3c2;
    font-size: 12px;
}

/* Power BI report */

.dashboard-content {
    padding: 48px 7% 56px;
}

.dashboard-heading {
    max-width: 1500px;
    margin: 0 auto 24px;
}

.dashboard-heading h1 {
    margin-bottom: 10px;
    font-size: 34px;
}

.dashboard-heading .section-intro {
    font-size: 16px;
}

.dashboard-tabs {
    margin-top: 28px;
    border-bottom: 1px solid var(--border);
}

.dashboard-tabs a {
    display: inline-block;
    padding: 12px 16px;
    color: var(--grey);
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
}

.dashboard-tabs a:hover {
    color: var(--blue);
}

.dashboard-tabs a[aria-current="page"] {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.dashboard-report {
    max-width: 1500px;
    height: min(76vh, 900px);
    min-height: 560px;
    margin: 0 auto;
    overflow: hidden;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.dashboard-report iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}


/* Responsive (home page) */

@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        max-width: 700px;
    }

    .hero-text {
        margin: 0 auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-card {
        width: 100%;
        max-width: 410px;
    }

    .why,
    .model-grid {
        flex-direction: column;
        align-items: flex-start;
    }

    .why-stats,
    .model-stats {
        width: 100%;
        max-width: 560px;
    }
}

@media (max-width: 600px) {
    .navbar,
    .hero,
    .why,
    .features,
    .levels,
    .model,
    .limits,
    .cta {
        padding-left: 5%;
        padding-right: 5%;
    }

    .navbar {
        height: auto;
        padding-top: 14px;
        padding-bottom: 14px;
        flex-wrap: wrap;
    }

    .logo {
        font-size: 18px;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .navbar nav {
        gap: 18px;
    }

    .hero {
        min-height: auto;
        padding-top: 48px;
        padding-bottom: 48px;
        gap: 40px;
    }

    .why,
    .features,
    .levels,
    .model,
    .limits,
    .cta {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .why-stats,
    .model-stats {
        gap: 12px;
    }

    .stat {
        padding: 18px;
    }

    .stat strong {
        font-size: 28px;
    }

    .hero-card {
        padding: 22px;
    }
}


/* =========================================================
   PATIENT RISK ASSESSMENT PAGE
   ========================================================= */

.assessment-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 7%;
}

/* Header */

.assessment-header {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #f7fbff, var(--light-blue));
    border-bottom: 1px solid #e3ebf7;
}

.assessment-header-content {
    max-width: 760px;
}

.assessment-header h1 {
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.15;
    margin: 15px 0 20px;
}

.assessment-header h1 span {
    color: var(--blue);
}

.assessment-header h1 + p {
    font-size: 18px;
    line-height: 1.7;
    color: var(--grey);
    max-width: 650px;
}

/* Main area */

.assessment-page {
    padding: 55px 0 90px;
}

/* Shared card look */

.patient-type-card,
.form-card {
    padding: 32px;
    margin-bottom: 25px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(24, 45, 80, 0.05);
}

/* Patient type card */

.patient-type-card h2 {
    font-size: 24px;
    margin: 8px 0;
}

.patient-type-card p {
    color: var(--grey);
}

.form-label {
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1.5px;
    color: var(--blue);
}

.patient-type-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 28px;
}

.patient-type-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    font-family: inherit;
    text-align: left;
    background: white;
    border: 1.5px solid #dce4f0;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.patient-type-btn:hover {
    border-color: var(--blue);
    transform: translateY(-2px);
}

.patient-type-btn.active,
.patient-type-btn[aria-pressed="true"] {
    border-color: var(--blue);
    background: var(--light-blue);
    box-shadow: inset 0 0 0 1px var(--blue);
}

.patient-type-btn strong {
    display: block;
    color: var(--dark);
    font-size: 15px;
    margin-bottom: 4px;
}

.patient-type-btn small {
    display: block;
    color: var(--grey);
    font-size: 13px;
}

.type-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #e4efff;
    color: var(--blue);
    font-size: 22px;
    font-weight: bold;
}

/* Form cards */

.form-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 30px;
}

.form-number {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--light-blue);
    color: var(--blue);
    font-size: 14px;
    font-weight: bold;
}

.form-card-header h2 {
    margin: 2px 0 6px;
    font-size: 22px;
}

.form-card-header p {
    color: var(--grey);
    font-size: 14px;
    line-height: 1.5;
}

/* Form fields */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label,
.search-patient label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.search-patient input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--dark);
    background: white;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.search-patient input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(22, 102, 217, 0.25);
}

.form-group input::placeholder,
.search-patient input::placeholder {
    color: #8b95a5;
}

.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"] {
    border-color: var(--red);
}

/* Input with a unit, e.g. "days" */

.input-with-unit {
    position: relative;
}

.input-with-unit input {
    padding-right: 60px;
}

.input-with-unit span {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--grey);
    font-size: 13px;
    pointer-events: none;
}

/* Information box */

.prediction-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 25px 0;
    padding: 18px 20px;
    background: var(--light-blue);
    border: 1px solid #d9e8ff;
    border-radius: 12px;
}

.info-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    font-size: 13px;
    font-weight: bold;
}

.prediction-info strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.prediction-info p {
    color: var(--grey);
    font-size: 13px;
    line-height: 1.5;
}

/* Action buttons */

.assessment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 30px;
}

/* Existing patient */

.existing-card {
    min-height: 350px;
}

.search-patient {
    max-width: 650px;
}

.patient-search-row {
    display: flex;
    gap: 12px;
}

.patient-search-row input {
    flex: 1;
}

.search-message {
    margin-top: 15px;
    color: var(--grey);
    font-size: 14px;
}

.search-message.error {
    color: var(--red);
}

.existing-note {
    margin-top: 35px;
    padding: 18px;
    background: #f7f9fc;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.existing-note p {
    margin-top: 7px;
    color: var(--grey);
    font-size: 14px;
    line-height: 1.6;
}

/* Result */

.prediction-result {
    max-width: 850px;
    margin: 0 auto;
}

.result-card {
    padding: 40px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(24, 45, 80, 0.08);
}

.result-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.result-card h2 {
    font-size: clamp(24px, 3vw, 30px);
    margin: 15px 0 30px;
}

.risk-badge {
    padding: 8px 16px;
    border-radius: 30px;
    background: var(--light-blue);
    color: var(--blue);
    font-size: 13px;
    font-weight: bold;
}

.risk-badge.low {
    background: var(--green-bg);
    color: var(--green);
}

.risk-badge.medium {
    background: var(--orange-bg);
    color: var(--orange);
}

.risk-badge.high {
    background: var(--red-bg);
    color: var(--red);
}

.risk-result-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    align-items: center;
}

.risk-percentage {
    padding: 30px;
    text-align: center;
    background: var(--light-blue);
    border-radius: 16px;
}

.risk-percentage span {
    display: block;
    font-size: 54px;
    font-weight: 800;
    line-height: 1;
    color: var(--blue);
}

.risk-percentage small {
    display: block;
    margin-top: 10px;
    color: var(--grey);
}

.risk-result-details p {
    color: var(--grey);
    line-height: 1.7;
}

.result-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
}

.result-details-grid div {
    padding: 15px;
    background: #f7f9fc;
    border-radius: 8px;
}

.result-details-grid span {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: var(--grey);
}

.result-disclaimer {
    margin: 30px 0;
    padding: 15px 18px;
    background: #fff8e8;
    border: 1px solid #f4e4b8;
    border-radius: 8px;
    color: #6b5622;
    font-size: 13px;
    line-height: 1.5;
}

/* Responsive (assessment page) */

@media (max-width: 700px) {
    .assessment-container {
        padding: 0 5%;
    }

    .assessment-header {
        padding: 56px 0 40px;
    }

    .assessment-header h1 + p {
        font-size: 16px;
    }

    .assessment-page {
        padding: 36px 0 60px;
    }

    .patient-type-card,
    .form-card {
        padding: 22px;
    }

    .patient-type-buttons,
    .form-grid,
    .risk-result-content,
    .result-details-grid {
        grid-template-columns: 1fr;
    }

    /* 16px stops iPhones zooming in when a field is tapped */
    .form-group input,
    .form-group select,
    .search-patient input {
        font-size: 16px;
    }

    .assessment-actions {
        flex-direction: column-reverse;
    }

    .assessment-actions button,
    .patient-search-row button {
        width: 100%;
    }

    .patient-search-row {
        flex-direction: column;
    }

    .result-card {
        padding: 24px;
    }

    .risk-percentage span {
        font-size: 44px;
    }
}

/* Less movement for people who turn animations off */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .primary-btn:hover,
    .patient-type-btn:hover {
        transform: none;
    }
}
.patient-found {
margin-top: 30px;
padding: 25px;
border: 1px solid #dce4f0;
border-radius: 14px;
background: #f8fbff;
}

.patient-found-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
margin-bottom: 25px;
}

.patient-found-header h3 {
margin-top: 6px;
font-size: 20px;
color: var(--dark);
}

.patient-id-badge {
padding: 7px 13px;
border-radius: 20px;
background: #e4efff;
color: var(--blue);
font-size: 13px;
font-weight: 700;
}

.patient-details-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 15px;
}

.patient-details-grid div {
padding: 15px;
background: white;
border: 1px solid #e4eaf3;
border-radius: 9px;
}

.patient-details-grid span {
display: block;
font-size: 12px;
color: var(--grey);
margin-bottom: 5px;
}

.patient-details-grid strong {
color: var(--dark);
font-size: 14px;
}

.previous-admissions {
margin-top: 25px;
}

.previous-admissions h3 {
font-size: 17px;
margin-bottom: 12px;
}

.previous-admissions p {
color: var(--grey);
font-size: 14px;
}

.patient-found > .primary-btn {
margin-top: 25px;
}

@media (max-width: 700px) {
.patient-found-header {
flex-direction: column;
align-items: flex-start;
}

.patient-details-grid {
grid-template-columns: 1fr;
}
}
.patient-search-results {
margin-top: 25px;
padding-top: 25px;
border-top: 1px solid #e4eaf3;
}

.patient-result-card {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
padding: 20px;
margin-top: 12px;
background: #f8fbff;
border: 1px solid #dce4f0;
border-radius: 12px;
}

.patient-result-card > div {
display: flex;
flex-direction: column;
gap: 5px;
}

.patient-result-card strong {
font-size: 16px;
color: var(--dark);
margin-bottom: 4px;
}

.patient-result-card span {
font-size: 13px;
color: var(--grey);
}

.patient-result-card .primary-btn {
height: 44px;
padding: 0 20px;
white-space: nowrap;
}

@media (max-width: 700px) {
.patient-result-card {
flex-direction: column;
align-items: stretch;
}

.patient-result-card .primary-btn {
width: 100%;
}
}
.risk-explanation {
    margin-top: 30px;
    padding: 26px;
    background: #f8fbff;
    border: 1px solid #dce8f8;
    border-radius: 16px;
}

.explanation-header {
    margin-bottom: 16px;
}

.explanation-header h3 {
    margin-top: 7px;
    font-size: 20px;
}

.explanation-summary {
    margin-bottom: 20px;
    color: var(--grey);
    line-height: 1.7;
}

.explanation-factors {
    display: grid;
    gap: 12px;
}

.explanation-factor {
    padding: 17px 18px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-left: 4px solid #98a2b3;
    border-radius: 10px;
}

.explanation-factor.increased {
    border-left-color: var(--red);
}

.explanation-factor.decreased {
    border-left-color: var(--green);
}

.explanation-factor.neutral {
    border-left-color: #98a2b3;
}

.factor-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.factor-top > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.factor-top strong {
    font-size: 14px;
}

.factor-top span:not(.factor-direction) {
    color: var(--grey);
    font-size: 13px;
}

.factor-direction {
    flex-shrink: 0;
    padding: 5px 9px;
    border-radius: 20px;
    background: var(--light-blue);
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
}

.explanation-factor.increased .factor-direction {
    background: var(--red-bg);
    color: var(--red);
}

.explanation-factor.decreased .factor-direction {
    background: var(--green-bg);
    color: var(--green);
}

.explanation-factor.neutral .factor-direction {
    background: #f2f4f7;
    color: #667085;
}

.explanation-factor p {
    margin-top: 9px;
    color: var(--grey);
    font-size: 13px;
    line-height: 1.55;
}

.explanation-note {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--grey);
    font-size: 12px;
    line-height: 1.55;
}

@media (max-width: 700px) {
    .risk-explanation {
        padding: 20px;
    }

    .factor-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .factor-direction {
        align-self: flex-start;
    }
}