.hc-clinical-hero {
    margin-bottom: 32px;
}

.hc-clinical-hero__aliases {
    margin-top: 18px;
    max-width: 760px;
    color: var(--color-muted);
    font-size: var(--text-xs);
    line-height: 1.55;
}

.hc-clinical-hero__aliases-label {
    color: var(--color-text);
    font-weight: var(--weight-md);
}

.hc-clinical-hero__aliases-more {
    color: var(--color-non-focus);
}

.hc-clinical-workspace {
    display: grid;
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    margin-top: 24px;
}

.hc-object-navigator {
    position: sticky;
    top: 132px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-card);
    background: var(--color-bg-0);
}

.hc-object-navigator__title {
    margin-bottom: 14px;
    padding: 0 6px;
    color: var(--color-text);
    font-size: var(--text-xs);
    font-weight: var(--weight-md);
}

.hc-object-navigator__nav,
.hc-object-navigator__patterns {
    display: grid;
    gap: 4px;
}

.hc-object-navigator__item,
.hc-object-navigator__pattern {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--color-muted);
    font: inherit;
    font-size: var(--text-xs);
    text-align: left;
    cursor: pointer;
    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}

.hc-object-navigator__item:hover,
.hc-object-navigator__pattern:hover {
    background: var(--color-back-00);
    color: var(--color-text);
}

.hc-object-navigator__item.is-active,
.hc-object-navigator__pattern.is-active {
    background: var(--color-back-00);
    color: var(--color-focus);
    font-weight: var(--weight-md);
}

.hc-object-navigator__item:focus-visible,
.hc-object-navigator__pattern:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

.hc-object-navigator__count {
    flex: 0 0 auto;
    color: var(--color-muted);
    font-size: var(--text-xxs);
}

.hc-object-navigator__patterns {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-soft);
}

.hc-object-navigator__group-title {
    margin-bottom: 6px;
    padding: 0 12px;
    color: var(--color-muted);
    font-size: var(--text-xxs);
    letter-spacing: var(--space-4);
}

.hc-object-navigator__pattern {
    align-items: flex-start;
    padding-left: 18px;
    font-size: var(--text-xxs);
    line-height: 1.35;
}

.hc-clinical-workspace__main {
    min-width: 0;
    padding: 32px;
    border: 1px solid var(--color-border-soft);
    border-radius: 28px;
    background: var(--color-bg-0);
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.06);
}

.hc-clinical-mobile-nav,
.hc-pattern-mobile-nav {
    display: none;
}

.hc-workspace-panel {
    min-width: 0;
    animation: hc-workspace-fade 0.18s ease;
}

.hc-workspace-panel[hidden],
.hc-pattern-panel[hidden] {
    display: none !important;
}

@keyframes hc-workspace-fade {
    from {
        opacity: 0;
        transform: translateY(3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hc-workspace-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.hc-workspace-panel__kicker,
.hc-overview-feature__kicker {
    margin-bottom: 8px;
    color: var(--color-muted);
    font-size: var(--text-xxs);
    letter-spacing: var(--space-4);
}

.hc-workspace-panel__header h2 {
    margin: 0;
    color: var(--color-text-title);
}

.hc-workspace-panel__header p {
    max-width: 720px;
    margin-top: 10px;
    color: var(--color-muted);
    font-size: var(--text-xs);
    line-height: 1.55;
}

.hc-clinical-summary {
    max-width: 820px;
    padding: 24px;
    border-radius: var(--radius-card);
    background: var(--color-back-00);
    color: var(--color-text);
    font-size: var(--text-sm);
    line-height: 1.7;
}

.hc-overview-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.hc-overview-metric {
    min-height: 110px;
    padding: 18px;
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-card);
    background: var(--color-bg-0);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.hc-overview-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}

.hc-overview-metric:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 3px;
}

.hc-overview-metric__value {
    display: block;
    margin-bottom: 10px;
    color: var(--color-focus);
    font-size: var(--title-md);
    font-weight: var(--weight-md);
}

.hc-overview-metric__label {
    color: var(--color-muted);
    font-size: var(--text-xs);
    line-height: 1.35;
}

.hc-overview-feature {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    margin-top: 20px;
    padding: 24px;
    border-radius: var(--radius-card);
    background: var(--color-bg-0);
}

.hc-overview-feature h3 {
    margin: 0 0 8px;
}

.hc-overview-feature p {
    max-width: 640px;
    color: var(--color-muted);
    font-size: var(--text-xs);
    line-height: 1.55;
}

.hc-overview-feature__action {
    flex: 0 0 auto;
    padding: 11px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--color-primary-b);
    color: var(--color-primary-w);
    font: inherit;
    font-size: var(--text-xs);
    font-weight: var(--weight-md);
    cursor: pointer;
}

.hc-overview-feature__action:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 3px;
}

.hc-pattern-panel {
    animation: hc-workspace-fade 0.18s ease;
}

.hc-entity-table {
    width: 100%;
    border-top: 1px solid var(--color-border-medium);
}

.hc-entity-table__head,
.hc-entity-table__row {
    display: grid;
    grid-template-columns:
        minmax(260px, 1.7fr)
        minmax(130px, 0.75fr)
        minmax(150px, 0.85fr)
        minmax(110px, 0.55fr);
    gap: 20px;
    align-items: center;
}

.hc-entity-table--three .hc-entity-table__head,
.hc-entity-table--three .hc-entity-table__row {
    grid-template-columns:
        minmax(280px, 1.8fr)
        minmax(160px, 0.8fr)
        minmax(110px, 0.55fr);
}

.hc-entity-table__head {
    padding: 10px 14px;
    color: var(--color-muted);
    font-size: var(--text-xxs);
    letter-spacing: 0.02em;
}

.hc-entity-table__row {
    min-height: 68px;
    padding: 14px;
    border-bottom: 1px solid var(--color-border-medium);
    color: inherit;
    text-decoration: none;
    transition:
        background-color 0.18s ease,
        padding-left 0.18s ease,
        padding-right 0.18s ease;
}

.hc-entity-table__row:hover {
    padding-left: 18px;
    padding-right: 18px;
    background: var(--color-bg-2);
}

.hc-entity-table__row:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 3px;
}

.hc-entity-table__primary {
    min-width: 0;
}

.hc-entity-table__name {
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: var(--weight-md);
}

.hc-entity-table__description {
    margin-top: 6px;
    color: var(--color-muted);
    font-size: var(--text-xs);
    line-height: 1.45;
}

.hc-entity-table__secondary {
    color: var(--color-muted);
    font-size: var(--text-xs);
}

.hc-entity-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--color-back-00);
    color: var(--color-muted);
    font-size: var(--text-xxs);
    line-height: 1.2;
}

@media (max-width: 1080px) {
    .hc-clinical-workspace {
        grid-template-columns: 210px minmax(0, 1fr);
        gap: 28px;
    }

    .hc-overview-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .hc-clinical-workspace {
        display: block;
    }

    .hc-clinical-workspace__main {
        padding: 24px;
        border-radius: 22px;
    }

    .hc-object-navigator {
        display: none;
    }

    .hc-clinical-mobile-nav,
    .hc-pattern-mobile-nav {
        display: grid;
        gap: 7px;
        margin-bottom: 22px;
    }

    .hc-clinical-mobile-nav label,
    .hc-pattern-mobile-nav label {
        color: var(--color-muted);
        font-size: var(--text-xxs);
        letter-spacing: var(--space-4);
    }

    .hc-clinical-mobile-nav select,
    .hc-pattern-mobile-nav select {
        width: 100%;
        min-height: 44px;
        padding: 9px 12px;
        border: 1px solid var(--color-border-medium);
        border-radius: 10px;
        background: var(--color-bg-0);
        color: var(--color-text);
        font: inherit;
        font-size: var(--text-xs);
    }
}

@media (max-width: 760px) {
    .hc-overview-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .hc-overview-feature {
        display: block;
    }

    .hc-overview-feature__action {
        margin-top: 18px;
    }

    .hc-entity-table__head {
        display: none;
    }

    .hc-entity-table__row,
    .hc-entity-table--three .hc-entity-table__row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 16px 0;
    }

    .hc-entity-table__row:hover {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 520px) {
    .hc-clinical-workspace__main {
        padding: 18px;
        border-radius: 18px;
    }

    .hc-overview-metrics {
        grid-template-columns: 1fr;
    }

    .hc-clinical-summary,
    .hc-overview-feature {
        padding: 18px;
    }
}


/* Clinical UI V2 final polish */
.hc-clinical-hero {
    margin-bottom: 22px;
}

.hc-clinical-hero .hc-hero__kicker {
    margin-bottom: 8px;
}

.hc-clinical-hero h1 {
    margin-bottom: 10px;
}

.hc-clinical-hero .hc-hero__description {
    margin-top: 10px;
    max-width: 900px;
    line-height: 1.55;
}

.hc-clinical-hero__aliases {
    margin-top: 12px;
}

.hc-object-navigator__item,
.hc-object-navigator__pattern {
    position: relative;
}

.hc-object-navigator__item.is-active::before,
.hc-object-navigator__pattern.is-active::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: var(--color-focus);
}

.hc-object-navigator__pattern {
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
    line-height: 1.3;
}

.hc-object-navigator__pattern .hc-object-navigator__count {
    opacity: 0.62;
}

.hc-object-navigator__item.is-active .hc-object-navigator__count,
.hc-object-navigator__pattern.is-active .hc-object-navigator__count {
    opacity: 0.78;
}

.hc-overview-feature {
    border: 1px solid var(--color-border-soft);
}

@media (max-width: 820px) {
    .hc-clinical-hero {
        margin-bottom: 18px;
    }
}