.weekly-patient-page-header {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
}

.weekly-patient-page-header .back-button {
    justify-self: start;
}

.weekly-patient-page-header > div {
    max-width: 760px;
}

.weekly-patient-page-header h1 {
    margin: 5px 0 8px;
}

.weekly-patient-page-header p:last-child {
    margin: 0;
    color: #5d6a65;
    line-height: 1.6;
}

.weekly-patient {
    display: grid;
    gap: 22px;
}

.weekly-patient-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(160px, 0.38fr) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 54px);
    align-items: center;
    padding: clamp(25px, 5vw, 48px);
    overflow: hidden;
    border: 1px solid #a9cdbd;
    border-radius: 28px;
    background:
        radial-gradient(circle at 7% 10%, rgba(255, 216, 111, 0.24), transparent 31%),
        linear-gradient(145deg, #fbfffd, #e9f5ef);
    box-shadow: 0 18px 42px rgba(24, 60, 45, 0.1);
}

.weekly-patient-avatar {
    display: grid;
    place-items: center;
    width: min(100%, 250px);
    aspect-ratio: 1;
    border: 1px solid rgba(45, 115, 88, 0.15);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.76);
    font-size: clamp(5rem, 14vw, 9rem);
    box-shadow: 0 14px 30px rgba(24, 60, 45, 0.09);
}

.weekly-patient-hero__content {
    position: relative;
    z-index: 1;
}

.weekly-patient-badges,
.weekly-patient-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.weekly-patient-badges span,
.weekly-patient-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #dceee5;
    color: #2f654f;
    font-size: 0.74rem;
    font-weight: 800;
}

.weekly-patient-hero .eyebrow {
    margin-top: 20px;
}

.weekly-patient-hero h2 {
    margin: 5px 0 2px;
    font-size: clamp(2rem, 5vw, 3.2rem);
}

.weekly-patient-hero h3 {
    margin: 0 0 16px;
    color: #39715c;
    font-size: clamp(1.05rem, 2.5vw, 1.32rem);
}

.weekly-patient-lead {
    max-width: 680px;
    color: #38483f;
    font-size: 1.03rem;
    line-height: 1.68;
}

.weekly-patient-goals {
    display: grid;
    gap: 9px;
    margin: 22px 0;
}

.weekly-patient-goals ul,
.weekly-patient-result-grid ul,
.weekly-patient-takeaways ul,
.weekly-patient-sources ul {
    margin: 0;
    padding-left: 20px;
}

.weekly-patient-goals ul {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 24px;
    color: #4e6258;
}

.weekly-patient-start {
    min-width: 210px;
}

.weekly-patient-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 18px;
    padding: 19px 22px;
    border: 1px solid #d5e0da;
    border-radius: 18px;
    background: #f8fbf9;
}

.weekly-patient-note strong {
    color: #2d7358;
}

.weekly-patient-note p {
    margin: 0;
    color: #5d6a65;
    line-height: 1.5;
}

.weekly-patient-progress {
    display: grid;
    gap: 8px;
}

.weekly-patient-progress > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #52625a;
    font-size: 0.84rem;
}

.weekly-patient-progress > span {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #dfe9e4;
}

.weekly-patient-progress > span > span {
    display: block;
    width: var(--weekly-progress);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4e9b79, #2f7157);
    transition: width 220ms ease;
}

.weekly-patient-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(255px, 0.55fr);
    gap: 22px;
    align-items: start;
}

.weekly-patient-decision,
.weekly-patient-journal,
.weekly-patient-result-hero,
.weekly-patient-result-grid > section,
.weekly-patient-takeaways,
.weekly-patient-sources {
    border: 1px solid #d5dfda;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(24, 60, 45, 0.06);
}

.weekly-patient-decision {
    padding: clamp(22px, 4vw, 34px);
}

.weekly-patient-situation {
    margin: 0 0 24px;
    padding: 18px 20px;
    border-left: 4px solid #4d9777;
    border-radius: 0 14px 14px 0;
    background: #eef7f2;
    color: #33483e;
    font-size: 1rem;
    line-height: 1.65;
}

.weekly-patient-decision > h2 {
    margin: 0 0 18px;
    font-size: clamp(1.3rem, 3vw, 1.7rem);
}

.weekly-patient-options {
    display: grid;
    gap: 11px;
}

.weekly-patient-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    width: 100%;
    padding: 15px 17px;
    border: 1px solid #cfdbd5;
    border-radius: 15px;
    background: #fbfdfc;
    color: #25342d;
    text-align: left;
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.weekly-patient-option > span {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border-radius: 9px;
    background: #e3eee9;
    color: #39715c;
    font-size: 0.78rem;
    font-weight: 850;
}

.weekly-patient-option > strong {
    line-height: 1.45;
}

.weekly-patient-option:hover:not(:disabled),
.weekly-patient-option:focus-visible:not(:disabled) {
    border-color: #70a78f;
    background: #f1f8f4;
    transform: translateY(-1px);
}

.weekly-patient-option:focus-visible {
    outline: 3px solid rgba(45, 115, 88, 0.18);
    outline-offset: 2px;
}

.weekly-patient-option:disabled {
    color: #6f7b75;
    cursor: default;
    opacity: 0.68;
}

.weekly-patient-option--selected:disabled {
    color: #25342d;
    opacity: 1;
}

.weekly-patient-option--recommended:disabled {
    border-color: #65a487;
    background: #e8f5ee;
}

.weekly-patient-option--partial:disabled {
    border-color: #c7a85d;
    background: #fff8e7;
}

.weekly-patient-option--unsafe:disabled {
    border-color: #ce7e75;
    background: #fff0ee;
}

.weekly-patient-hint {
    margin-top: 17px;
    color: #52645b;
}

.weekly-patient-hint summary {
    color: #2d7358;
    font-weight: 800;
    cursor: pointer;
}

.weekly-patient-hint p {
    margin: 9px 0 0;
    line-height: 1.55;
}

.weekly-patient-feedback {
    margin-top: 20px;
    padding: 21px;
    border: 1px solid #b9d6c8;
    border-radius: 17px;
    background: #edf8f2;
}

.weekly-patient-feedback--partial {
    border-color: #ddc988;
    background: #fff9e9;
}

.weekly-patient-feedback--unsafe {
    border-color: #dfaaa4;
    background: #fff2f0;
}

.weekly-patient-feedback h3 {
    margin: 5px 0 10px;
    font-size: 1.06rem;
    line-height: 1.45;
}

.weekly-patient-feedback p {
    line-height: 1.6;
}

.weekly-patient-feedback__explanation {
    padding-top: 13px;
    border-top: 1px solid rgba(45, 115, 88, 0.18);
    color: #465c51;
}

.weekly-patient-feedback .primary-button {
    margin-top: 7px;
}

.weekly-patient-journal {
    position: sticky;
    top: 96px;
    padding: 21px;
}

.weekly-patient-journal__identity {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e7e3;
}

.weekly-patient-journal__identity > span {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #edf5f1;
    font-size: 2rem;
}

.weekly-patient-journal__identity div {
    display: grid;
    gap: 3px;
}

.weekly-patient-journal__identity small {
    color: #6a766f;
    line-height: 1.35;
}

.weekly-patient-journal h2 {
    margin: 18px 0 12px;
    font-size: 0.9rem;
}

.weekly-patient-journal dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.weekly-patient-journal dl > div {
    display: grid;
    gap: 2px;
    padding: 9px 11px;
    border-radius: 11px;
    background: #f5f8f6;
}

.weekly-patient-journal dt {
    color: #6b7771;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.weekly-patient-journal dd {
    margin: 0;
    font-size: 0.87rem;
    font-weight: 750;
    line-height: 1.35;
}

.weekly-patient--results {
    gap: 18px;
}

.weekly-patient-result-hero {
    position: relative;
    padding: clamp(27px, 5vw, 48px);
    overflow: hidden;
    background:
        radial-gradient(circle at 94% 8%, rgba(255, 215, 106, 0.24), transparent 30%),
        linear-gradient(145deg, #f9fffb, #e9f5ef);
    text-align: center;
}

.weekly-patient-result-hero__avatar {
    display: block;
    margin-bottom: 10px;
    font-size: 4rem;
}

.weekly-patient-result-hero h2 {
    max-width: 760px;
    margin: 7px auto 12px;
    line-height: 1.35;
}

.weekly-patient-result-hero > p:not(.eyebrow, .weekly-patient-score-note) {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
    color: #51635a;
    line-height: 1.6;
}

.weekly-patient-score {
    display: grid;
    justify-content: center;
    gap: 1px;
    margin-top: 22px;
}

.weekly-patient-score strong {
    color: #2d7358;
    font-size: 2.35rem;
}

.weekly-patient-score span {
    color: #5f7067;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.weekly-patient-score-note {
    margin: 10px 0 0;
    color: #718078;
    font-size: 0.78rem;
}

.weekly-patient-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.weekly-patient-result-grid > section,
.weekly-patient-takeaways,
.weekly-patient-sources {
    padding: 24px;
}

.weekly-patient-result-grid h2,
.weekly-patient-takeaways h2,
.weekly-patient-sources h2 {
    margin: 0 0 14px;
    font-size: 1.15rem;
}

.weekly-patient-result-grid li,
.weekly-patient-takeaways li,
.weekly-patient-sources li {
    margin: 8px 0;
    color: #506158;
    line-height: 1.55;
}

.weekly-patient-takeaways .weekly-patient-tags {
    margin-top: 20px;
}

.weekly-patient-sources p {
    color: #5d6a65;
    line-height: 1.55;
}

.weekly-patient-sources a {
    color: #2d7358;
    font-weight: 750;
}

.weekly-patient-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 4px;
}

html[data-theme="dark"] .weekly-patient-page-header p:last-child,
html[data-theme="dark"] .weekly-patient-lead,
html[data-theme="dark"] .weekly-patient-note p,
html[data-theme="dark"] .weekly-patient-progress > div,
html[data-theme="dark"] .weekly-patient-journal__identity small,
html[data-theme="dark"] .weekly-patient-result-hero > p:not(.eyebrow),
html[data-theme="dark"] .weekly-patient-result-grid li,
html[data-theme="dark"] .weekly-patient-takeaways li,
html[data-theme="dark"] .weekly-patient-sources p,
html[data-theme="dark"] .weekly-patient-sources li {
    color: var(--dark-muted);
}

html[data-theme="dark"] .weekly-patient-hero,
html[data-theme="dark"] .weekly-patient-result-hero {
    border-color: #4d7563;
    background:
        radial-gradient(circle at 8% 10%, rgba(255, 216, 111, 0.1), transparent 31%),
        linear-gradient(145deg, #182720, #21392e);
    color: var(--dark-text);
}

html[data-theme="dark"] .weekly-patient-avatar {
    border-color: var(--dark-border);
    background: #f7fbf9;
}

html[data-theme="dark"] :where(
    .weekly-patient-note,
    .weekly-patient-decision,
    .weekly-patient-journal,
    .weekly-patient-result-grid > section,
    .weekly-patient-takeaways,
    .weekly-patient-sources
) {
    border-color: var(--dark-border);
    background: var(--dark-surface-raised);
    color: var(--dark-text);
}

html[data-theme="dark"] .weekly-patient-situation,
html[data-theme="dark"] .weekly-patient-feedback {
    background: #20392e;
    color: #d9e8e1;
}

html[data-theme="dark"] .weekly-patient-feedback--partial {
    border-color: #816e39;
    background: #332f20;
}

html[data-theme="dark"] .weekly-patient-feedback--unsafe {
    border-color: #86554f;
    background: #362624;
}

html[data-theme="dark"] .weekly-patient-feedback__explanation {
    color: #bfd0c7;
}

html[data-theme="dark"] .weekly-patient-option {
    border-color: var(--dark-border);
    background: var(--dark-surface-soft);
    color: var(--dark-text);
}

html[data-theme="dark"] .weekly-patient-option:hover:not(:disabled),
html[data-theme="dark"] .weekly-patient-option:focus-visible:not(:disabled) {
    border-color: #679a84;
    background: var(--dark-surface-hover);
}

html[data-theme="dark"] .weekly-patient-option--recommended:disabled {
    border-color: #5b947b;
    background: #203b2f;
}

html[data-theme="dark"] .weekly-patient-option--partial:disabled {
    border-color: #8b763e;
    background: #342f20;
}

html[data-theme="dark"] .weekly-patient-option--unsafe:disabled {
    border-color: #8d5952;
    background: #372624;
}

html[data-theme="dark"] .weekly-patient-journal dl > div,
html[data-theme="dark"] .weekly-patient-option > span,
html[data-theme="dark"] .weekly-patient-badges span,
html[data-theme="dark"] .weekly-patient-tags span {
    background: #293f35;
    color: #bde5d2;
}

html[data-theme="dark"] .weekly-patient-progress > span {
    background: #334a40;
}

@media (max-width: 820px) {
    .weekly-patient-layout {
        grid-template-columns: 1fr;
    }

    .weekly-patient-journal {
        position: static;
        grid-row: 1;
    }

    .weekly-patient-journal dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .weekly-patient-hero {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .weekly-patient-avatar {
        width: 125px;
        font-size: 4.8rem;
    }

    .weekly-patient-note,
    .weekly-patient-result-grid {
        grid-template-columns: 1fr;
    }

    .weekly-patient-journal dl {
        grid-template-columns: 1fr;
    }

    .weekly-patient-option {
        padding: 13px;
    }

    .weekly-patient-result-actions > button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .weekly-patient-option,
    .weekly-patient-progress > span > span {
        transition: none;
    }
}
