.health-explorer-condition__kicker,
.health-explorer-condition-match__contribution {
    display: none;
}

.health-explorer-condition-match {
    grid-template-columns: minmax(0, 1fr);
}

.health-explorer #selected-evidence,
.health-explorer #candidate-conditions {
    margin-top: 28px;
}

.health-explorer-selected {
    display: grid;
    gap: 12px;
}

.health-explorer-selected__summary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    color: var(--color-muted);
    font-size: var(--text-xs);
}

.health-explorer-selected__clear {
    color: var(--color-focus);
    font-weight: var(--weight-md);
    text-decoration: none;
}

.health-explorer-selected__clear:hover {
    text-decoration: underline;
}

.health-explorer-selected__items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.health-explorer-selected-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-max);
    background: var(--color-bg-0);
    box-shadow: none;
}

.health-explorer-selected-pill__type {
    flex: 0 0 auto;
    font-size: var(--text-xxs);
    font-weight: var(--weight-md);
}

.health-explorer-selected-pill--symptom .health-explorer-selected-pill__type {
    color: var(--color-b4);
}

.health-explorer-selected-pill--factor .health-explorer-selected-pill__type {
    color: var(--color-o3);
}

.health-explorer-selected-pill--marker .health-explorer-selected-pill__type {
    color: var(--color-lb3);
}

.health-explorer-selected-pill--condition .health-explorer-selected-pill__type {
    color: var(--color-g4);
}

.health-explorer-selected-pill__name {
    min-width: 0;
    overflow: hidden;
    color: var(--color-text-title);
    font-size: var(--text-xs);
    font-weight: var(--weight-md);
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.health-explorer-selected-pill__name:hover {
    color: var(--color-focus);
}

.health-explorer-selected-pill__state {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: var(--radius-max);
    background: var(--color-grey2);
    color: var(--color-muted);
    font-size: var(--text-xxs);
    font-weight: var(--weight-md);
    white-space: nowrap;
}

.health-explorer-selected-pill--state-present .health-explorer-selected-pill__state,
.health-explorer-selected-pill--state-high .health-explorer-selected-pill__state,
.health-explorer-selected-pill--state-normal .health-explorer-selected-pill__state,
.health-explorer-selected-pill--state-low .health-explorer-selected-pill__state {
    color: var(--color-text-title);
}

.health-explorer-selected-pill--state-absent {
    border-style: dashed;
}

.health-explorer-selected-pill__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    color: var(--color-muted);
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
}

.health-explorer-selected-pill__remove:hover {
    background: var(--color-grey2);
    color: var(--color-text-title);
}

.health-explorer-empty--selected {
    padding: 16px 18px;
    border: 1px dashed var(--color-border-medium);
    border-radius: 16px;
    background: var(--color-bg-0);
}

.health-explorer-candidate-nav--compact {
    margin-bottom: 14px;
}

.health-explorer-result-summary {
    display: grid;
    grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding: 16px 18px;
    border: 1px solid var(--color-border-soft);
    border-radius: 18px;
    background: var(--color-bg-0);
}

.health-explorer-result-summary__overview {
    min-width: 0;
}

.health-explorer-result-summary__kicker {
    display: block;
    color: var(--color-focus);
    font-size: var(--text-xxs);
    font-weight: var(--weight-md);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.health-explorer-result-summary__title {
    display: block;
    margin-top: 5px;
    color: var(--color-text-title);
    font-size: var(--text-md);
    line-height: 1.25;
}

.health-explorer-result-summary__focus {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-top: 7px;
    padding: 3px 8px;
    border-radius: var(--radius-max);
    background: var(--color-grey2);
    color: var(--color-muted);
    font-size: var(--text-xxs);
    font-weight: var(--weight-md);
}

.health-explorer-result-summary__note {
    margin: 7px 0 0;
    color: var(--color-muted);
    font-size: var(--text-xs);
    line-height: 1.45;
}

.health-explorer-candidate-nav__list--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 10px;
}

.health-explorer-candidate-nav__item {
    counter-increment: none;
}

.health-explorer-candidate-nav__link {
    grid-template-columns: minmax(0, 1fr) auto;
}

.health-explorer-candidate-nav__link::before {
    content: none;
}

.health-explorer-candidate-nav__count {
    width: auto;
    min-width: 0;
    padding: 0 8px;
    white-space: nowrap;
}

.health-explorer-narrowing {
    margin: 14px 0 18px;
    padding: 18px;
    border: 1px solid var(--color-border-soft);
    border-radius: 18px;
    background: rgba(21, 87, 228, .025);
}

.health-explorer-narrowing__header {
    max-width: 820px;
}

.health-explorer-narrowing__kicker {
    display: block;
    color: var(--color-focus);
    font-size: var(--text-xxs);
    font-weight: var(--weight-md);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.health-explorer-narrowing__title {
    margin: 5px 0 0;
    color: var(--color-text-title);
    font-size: var(--text-lg);
    line-height: 1.25;
}

.health-explorer-narrowing__description {
    margin: 7px 0 0;
    color: var(--color-muted);
    font-size: var(--text-xs);
    line-height: 1.5;
}

.health-explorer-narrowing__group {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-soft);
}

.health-explorer-narrowing__group--markers {
    margin-top: 22px;
}

.health-explorer-narrowing__group-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.health-explorer-narrowing__group-header h4 {
    margin: 0;
    color: var(--color-text-title);
    font-size: var(--text-md);
    line-height: 1.3;
}

.health-explorer-narrowing__group-header p {
    max-width: 760px;
    margin: 5px 0 0;
    color: var(--color-muted);
    font-size: var(--text-xs);
    line-height: 1.45;
}

.health-explorer-narrowing__skipped {
    flex: 0 0 auto;
    color: var(--color-muted);
    font-size: var(--text-xxs);
    white-space: nowrap;
}

.health-explorer-narrowing__skipped a {
    color: var(--color-focus);
    text-decoration: none;
}

.health-explorer-narrowing__skipped a:hover {
    text-decoration: underline;
}

.health-explorer-narrowing__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.health-explorer-narrowing-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--color-border-soft);
    border-radius: 14px;
    background: var(--color-bg-0);
}

.health-explorer-narrowing-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.health-explorer-narrowing-card__action {
    color: var(--color-focus);
    font-size: var(--text-xxs);
    font-weight: var(--weight-md);
    cursor: pointer;
    list-style: none;
}

.health-explorer-narrowing-card__action::-webkit-details-marker {
    display: none;
}

.health-explorer-state-picker {
    position: relative;
    flex: 0 0 auto;
}

.health-explorer-state-picker__menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 7px);
    right: 0;
    display: grid;
    gap: 4px;
    min-width: 150px;
    padding: 8px;
    border: 1px solid var(--color-border-soft);
    border-radius: 12px;
    background: var(--color-bg-0);
    box-shadow: 0 10px 28px rgba(17, 24, 39, .12);
}

.health-explorer-state-picker__label {
    padding: 3px 7px 6px;
    color: var(--color-muted);
    font-size: var(--text-xxs);
    font-weight: var(--weight-md);
}

.health-explorer-state-picker__option {
    display: block;
    padding: 7px 9px;
    border-radius: 8px;
    color: var(--color-text-title);
    font-size: var(--text-xs);
    font-weight: var(--weight-md);
    text-decoration: none;
    white-space: nowrap;
}

.health-explorer-state-picker__option:hover {
    background: var(--color-grey2);
    color: var(--color-focus);
}

.health-explorer-state-picker__option--muted {
    margin-top: 3px;
    border-top: 1px solid var(--color-border-soft);
    border-radius: 0 0 8px 8px;
    color: var(--color-muted);
}

.health-explorer-narrowing-card__name {
    display: inline-block;
    margin-top: 8px;
    color: var(--color-text-title);
    font-size: var(--text-sm);
    font-weight: var(--weight-md);
    line-height: 1.35;
    text-decoration: none;
}

.health-explorer-narrowing-card__name:hover {
    color: var(--color-focus);
}

.health-explorer-narrowing-card__description {
    margin: 6px 0 0;
    color: var(--color-muted);
    font-size: var(--text-xs);
    line-height: 1.45;
}

.health-explorer-condition__heading {
    min-width: 0;
}

.health-explorer-condition__signals {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 8px;
    color: var(--color-muted);
    font-size: var(--text-xs);
}

.health-explorer-condition__signals > span + span::before {
    content: '·';
    margin-right: 12px;
    color: var(--color-border-medium);
}

.health-explorer-condition__status {
    margin: 0;
    color: var(--color-text);
    font-weight: var(--weight-md);
}

.health-explorer-condition__open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid var(--color-border-soft);
    border-radius: 50%;
    color: var(--color-focus);
    font-size: 18px;
    text-decoration: none;
}

.health-explorer-condition__open:hover {
    border-color: var(--color-border-medium);
    background: var(--color-bg-0);
}

.health-explorer-condition__section,
.health-explorer-condition__clarify {
    padding: 20px 22px;
}

.health-explorer-condition__section + .health-explorer-condition__clarify {
    border-top: 1px solid var(--color-border-soft);
}

.health-explorer-condition__section-header {
    margin-bottom: 12px;
}

.health-explorer-condition__section-header h4 {
    margin: 0;
    color: var(--color-text-title);
    font-size: var(--text-md);
    font-weight: var(--weight-md);
}

.health-explorer-condition__section-header p {
    max-width: 760px;
    margin: 5px 0 0;
    color: var(--color-muted);
    font-size: var(--text-xs);
    line-height: 1.5;
}

.health-explorer-condition__section-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--color-focus);
    font-size: var(--text-xxs);
    font-weight: var(--weight-md);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.health-explorer-condition__matches {
    padding: 0;
}

.health-explorer-condition-match {
    padding: 13px 0;
}

.health-explorer-condition-match__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 5px;
}

.health-explorer-condition-match__type,
.health-explorer-search-result__type {
    margin-bottom: 0;
}

.health-explorer-role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: var(--radius-max);
    background: var(--color-grey2);
    color: var(--color-muted);
    font-size: var(--text-xxs);
    font-weight: var(--weight-md);
}

.health-explorer-role-badge--required {
    background: #e8f7ee;
    color: var(--color-g4);
}

.health-explorer-condition__clarify {
    background: rgba(21, 87, 228, .025);
}

.health-explorer-missing-list {
    display: grid;
    gap: 8px;
}

.health-explorer-missing-evidence {
    padding: 12px 14px;
    border-radius: 14px;
}

.health-explorer-missing-evidence__name {
    display: inline-block;
    margin-top: 4px;
    color: var(--color-text-title);
    font-size: var(--text-sm);
    font-weight: var(--weight-md);
    text-decoration: none;
}

.health-explorer-missing-evidence__name:hover {
    color: var(--color-focus);
}

.health-explorer-missing-evidence__note {
    max-width: 720px;
    margin: 4px 0 0;
    color: var(--color-muted);
    font-size: var(--text-xs);
    line-height: 1.45;
}

.health-explorer-missing-evidence__add {
    align-self: center;
}

.health-explorer-condition__recommendations {
    background: var(--color-grey2);
}

@media (max-width: 980px) {
    .health-explorer-narrowing__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .health-explorer-result-summary {
        grid-template-columns: 1fr;
    }

    .health-explorer-candidate-nav__list--compact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .health-explorer-selected__summary,
    .health-explorer-condition__header,
    .health-explorer-search-result,
    .health-explorer-narrowing__group-header {
        align-items: flex-start;
    }

    .health-explorer-selected__summary,
    .health-explorer-narrowing__group-header {
        flex-wrap: wrap;
    }

    .health-explorer-selected-pill {
        max-width: 100%;
    }

    .health-explorer-narrowing__grid {
        grid-template-columns: 1fr;
    }

    .health-explorer-narrowing__skipped {
        white-space: normal;
    }

    .health-explorer-state-picker__menu {
        right: auto;
        left: 0;
    }

    .health-explorer-condition__signals {
        display: grid;
        gap: 4px;
    }

    .health-explorer-condition__signals > span + span::before {
        content: none;
    }

    .health-explorer-condition__section,
    .health-explorer-condition__clarify {
        padding: 18px;
    }
}
