:root {
    --bg: #f4f5f7;
    --card: #ffffff;
    --text: #1b1f24;
    --muted: #687181;
    --line: #d2d7e0;
    --line-light: #e9ecf1;
    --blue: #4c67d8;
    --blue-hover: #3f59c7;
    --topbar: #1f2329;
    --green: #58a842;
    --shadow: 0 10px 26px rgba(24, 32, 48, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}

.type-info__tooltip[hidden] {
    display: none !important;
}

/* Top bar */

.topbar {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 0 24px;
    background: linear-gradient(180deg, #24282e, var(--topbar));
    color: #ffffff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand__logo {
    display: block;
    width: auto;
    height: 38px;
    object-fit: contain;
}

.brand__sep {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.28);
}

.brand__title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 650;
}

/* Page layout */

.content {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 16px 24px 24px;
}

.card {
    width: 100%;
    min-height: calc(100vh - 98px);
    padding: 26px 28px;
    overflow: visible;
    background: var(--card);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.page-header {
    margin-bottom: 20px;
}

.page-header h1 {
    margin: 0 0 8px;
    color: #181c22;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.35px;
}

.page-description {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.45;
}

/* Search */

.search-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    margin-bottom: 20px;
}

.field--search {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    height: 50px;
    padding: 0 16px;
    border: 2px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
}

.field--search:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(76, 103, 216, 0.12);
}

.search-icon {
    flex: 0 0 auto;
    margin-right: 12px;
    color: #637083;
    width: 18px;
    height: 18px;
}

.search-icon svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.field--search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 16px;
}

.field--search input::placeholder {
    color: #737b88;
}

.refresh-btn {
    flex: 0 0 auto;
    min-width: 92px;
    height: 50px;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    background: var(--blue);
    color: #ffffff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.refresh-btn:hover {
    background: var(--blue-hover);
}

.refresh-btn:focus-visible,
.table-action-btn:focus-visible {
    outline: 3px solid rgba(76, 103, 216, 0.3);
    outline-offset: 2px;
}

/* Filters */

.filter-section {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 28px 48px;
    margin-bottom: 18px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.filter-label {
    display: block;
    margin: 0 0 8px;
    color: #20252c;
    font-size: 15px;
    font-weight: 700;
}

.filter-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.filter-label-row .filter-label {
    margin: 0;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.btn-group button {
    min-width: 78px;
    height: 42px;
    padding: 0 16px;
    border: 2px solid var(--line);
    border-radius: 9px;
    background: #ffffff;
    color: #222831;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.btn-group button:hover {
    border-color: #9da7b8;
    background: #fafbfc;
}

.btn-group button.active {
    border-color: var(--blue);
    background: #f2f4ff;
    color: var(--blue);
    box-shadow: inset 0 0 0 1px var(--blue);
}

.btn-group button:focus-visible {
    outline: 3px solid rgba(76, 103, 216, 0.2);
    outline-offset: 2px;
}

/* Type information tooltip */

.type-info {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.type-info__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #687384;
    border-radius: 50%;
    background: #ffffff;
    color: #435064;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.type-info__button:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.type-info__button[aria-expanded="true"] {
    border-color: var(--blue);
    background: #f2f4ff;
    color: var(--blue);
}

.type-info__tooltip {
    position: absolute;
    top: 32px;
    left: -8px;
    z-index: 50;
    width: 400px;
    padding: 14px 16px;
    border: 1px solid #d1d7e0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(23, 31, 45, 0.16);
    color: #4f5969;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

/* Results and actions */

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 4px 0 10px;
}

.searchstatus {
    margin: 0;
    color: #687181;
    font-size: 14px;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-action-btn {
    height: 36px;
    padding: 0 13px;
    border: 1px solid #bfc7d3;
    border-radius: 8px;
    background: #ffffff;
    color: #344052;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
}

.table-action-btn:hover {
    border-color: var(--blue);
    background: #f2f4ff;
    color: var(--blue);
}

/* Table */

.tablewrap {
    position: relative;
    width: 100%;
    max-height: 620px;
    overflow: auto;
    border-top: 1px solid var(--line-light);
}

.table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 13px 16px;
    border-bottom: 2px solid #6e7684;
    background: #ffffff;
    color: #4e5561;
    font-size: 14px;
    font-weight: 750;
    text-align: left;
}

.table thead th:first-child {
    width: 46%;
}

.table thead th:nth-child(2) {
    width: 22%;
}

.table thead th:nth-child(3) {
    width: 32%;
}

.table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-light);
    color: #303744;
    font-size: 14px;
    vertical-align: middle;
}

.module-row {
    background: #ffffff;
}

.module-row:hover {
    background: #f9fafc;
}

.module-row--expanded,
.module-row--expanded:hover {
    background: #f0f4fc;
}

.module-name-cell {
    display: flex;
    align-items: center;
}

.module-name-btn {
    padding: 0;
    border: 0;
    background: transparent;
    color: #405fcf;
    font: inherit;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}

.module-name-btn:hover {
    color: var(--blue-hover);
    text-decoration: underline;
}

.module-name-btn:focus-visible {
    border-radius: 3px;
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.module-type {
    color: #4e5664;
}

.module-platforms {
    white-space: normal;
}

.expand-btn {
    flex: 0 0 auto;
    width: 24px;
    margin: 0 8px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #222831;
    font-size: 20px;
    cursor: pointer;
}

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

.expand-btn:focus-visible {
    border-radius: 4px;
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

/* Applicability tags */

.tag {
    display: inline-flex;
    align-items: center;
    margin: 2px 5px 2px 0;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.tag-FMC {
    background: #dcefee;
    color: #315c5a;
}

.tag-cdFMC {
    background: #e8e8ff;
    color: #41488a;
}

.tag-FTD {
    background: #e9f2d8;
    color: #48612c;
}

.tag--empty {
    background: #f0f1f3;
    color: #7a818c;
}

/* Expanded description */

.detail-row td {
    padding: 8px 12px 14px;
    background: #f5f7fe;
}

.drawer {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 18px 22px;
    border: 1px solid #e0e4ec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(24, 32, 48, 0.04);
}

.drawer::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--green);
}

.drawer__description {
    color: #202630;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
}

/* Empty table state */

.empty-row td {
    padding: 28px 16px;
    color: #737b88;
    text-align: center;
}

/* Responsive */

@media (max-width: 900px) {
    .content {
        padding: 12px;
    }

    .card {
        padding: 22px 20px;
    }
}

@media (max-width: 760px) {
    .topbar {
        padding: 0 16px;
    }

    .brand__logo {
        height: 32px;
    }

    .brand__title {
        font-size: 13px;
    }

    .content {
        padding: 10px;
    }

    .card {
        min-height: auto;
        padding: 20px 16px;
        border-radius: 12px;
    }

    .page-header h1 {
        font-size: 26px;
    }

    .page-description {
        font-size: 14px;
    }

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

    .refresh-btn {
        width: 100%;
    }

    .filter-section {
        gap: 20px;
    }

    .table-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .type-info__tooltip {
        right: 0;
        left: auto;
        width: min(320px, calc(100vw - 40px));
    }

    .table {
        min-width: 680px;
    }

    .drawer {
        padding: 16px 18px;
    }
}

/* Compact alert summary and single-alert remediation view */

.alert-summary {
    margin-top: 18px;
    padding: 15px 18px;
    border-color: #dce2ed;
    background: #f9faff;
}

.alert-summary__heading {
    margin: 0 0 11px;
    color: #586274;
    font-size: 15px;
    font-weight: 750;
}

.alert-summary__raised {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.alert-summary__raised .alert-summary__label {
    flex: 0 0 auto;
    min-width: 132px;
}

.alert-summary__entries {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.alert-summary__entry {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    min-height: 25px;
}

.alert-remediation-link {
    color: #405fcf;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.alert-remediation-link:hover {
    color: var(--blue-hover);
    text-decoration-thickness: 2px;
}

.alert-remediation-link:focus-visible {
    border-radius: 3px;
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.alert-summary__separator {
    color: #687181;
}

.remediation-detail {
    max-width: 1200px;
    scroll-margin-top: 18px;
}

.remediation-context {
    padding: 6px 0 18px;
    border-bottom: 1px solid var(--line-light);
}

.remediation-context p {
    margin: 0 0 8px;
    color: #303947;
    font-size: 15px;
    line-height: 1.5;
}

.remediation-context p:last-child {
    margin-bottom: 0;
}

.module-remediation-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #405fcf;
    font: inherit;
    font-weight: 650;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    cursor: pointer;
}

.module-remediation-link:hover {
    color: var(--blue-hover);
    text-decoration-thickness: 2px;
}

.module-remediation-link:focus-visible {
    border-radius: 3px;
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.remediation-selected-alert {
    margin-top: 28px;
    color: #303947;
}

.remediation-selected-alert > h2 {
    margin: 0 0 7px;
    color: #586274;
    font-size: 15px;
}

.remediation-selected-alert__name {
    margin: 0 0 22px;
    color: #202630;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}

.remediation-selected-alert__field {
    margin: 0 0 20px;
}

.remediation-selected-alert__field h3 {
    margin: 0 0 8px;
    color: #586274;
    font-size: 14px;
    font-weight: 750;
}

.remediation-selected-alert__field .remediation-steps {
    color: #303947;
}

@media (max-width: 760px) {
    .alert-summary__raised {
        flex-direction: column;
        gap: 5px;
    }

    .alert-summary__raised .alert-summary__label {
        min-width: 0;
    }
}
.drawer__alt-name,
.drawer__note,
.drawer__references {
    margin-top: 12px;
    color: #4e5664;
    font-size: 14px;
    line-height: 1.55;
}

.drawer__alt-name {
    margin-top: 0;
}

.drawer__note {
    padding: 10px 12px;
    border-left: 3px solid #d6a100;
    background: #fff9e8;
}

.drawer__note-inline {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 0.75em;
    margin: 12px 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.drawer__note-inline > strong {
    white-space: nowrap;
}

.drawer__references {
    padding-top: 12px;
    border-top: 1px solid #e4e8ef;
}

.drawer__list {
    margin: 12px 0 0;
    padding-left: 22px;
    color: #202630;
    font-size: 14px;
    line-height: 1.6;
}

.drawer__list li + li {
    margin-top: 6px;
}

.drawer__list--numbered {
    list-style-position: outside;
}

.drawer__list-detail {
    margin: 5px 0 8px;
    line-height: 1.6;
}

.drawer__list--level-1 {
    margin-left: 16px;
}

.drawer__list--level-2 {
    margin-left: 32px;
}

/* Section tabs */

.page-tabs {
    display: flex;
    gap: 8px;
    margin: -4px 0 24px;
    border-bottom: 1px solid var(--line);
}

.page-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 14px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #596475;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.page-tab:hover,
.page-tab.is-active {
    color: var(--blue);
}

.page-tab.is-active {
    border-bottom-color: var(--blue);
}

.page-tab:focus-visible,
.remediation-btn:focus-visible,
.back-to-module-btn:focus-visible {
    outline: 3px solid rgba(76, 103, 216, 0.26);
    outline-offset: 2px;
    border-radius: 6px;
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e9edfb;
    color: #405fcf;
    font-size: 12px;
    line-height: 1;
}

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

/* Alert summary inside expanded module details */

.alert-summary {
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid #dce2ed;
    border-radius: 11px;
    background: #f9faff;
}

.alert-summary + .alert-summary {
    margin-top: 12px;
}

.alert-summary__topline,
.alert-summary__field {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.alert-summary__label {
    flex: 0 0 132px;
    color: #586274;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.01em;
}

.alert-summary__titles {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.alert-title {
    color: #202630;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}

.alert-summary__description {
    margin-bottom: 14px;
}

.alert-summary__copy {
    min-width: 0;
    color: #384253;
    font-size: 14px;
    line-height: 1.6;
}

.alert-summary__copy p {
    margin: 0 0 7px;
}

.alert-summary__copy p:last-child {
    margin-bottom: 0;
}

.alert-summary__copy .drawer__list {
    margin-top: 3px;
}

.severity-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #e9edf2;
    color: #4d5969;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
}

.severity-badge--critical {
    border: 2px solid #c62828;
    background: #ffffff;
    color: #a32121;
}

.severity-badge--warning {
    border: 2px solid #edc400;
    background: #fffef5;
    color: #795f00;
}

.remediation-btn,
.back-to-module-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #c2cbea;
    border-radius: 8px;
    background: #f1f4ff;
    color: #405fcf;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.remediation-btn:hover,
.back-to-module-btn:hover {
    border-color: var(--blue);
    background: #e8edff;
}

/* Remediation tab */

.remediation-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 18px 0 22px;
}

.remediation-search {
    flex: 0 1 520px;
}

.remediation-list {
    display: grid;
    gap: 24px;
}

.remediation-group__title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    color: #343d4b;
    font-size: 17px;
}

.remediation-group__title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f0f2f6;
    color: #657083;
    font-size: 12px;
}

.remediation-card {
    margin-bottom: 12px;
    padding: 18px 20px;
    border: 1px solid #dce2ed;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(24, 32, 48, 0.04);
    scroll-margin-top: 20px;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.remediation-card.is-highlighted {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(76, 103, 216, 0.12);
}

.remediation-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-light);
}

.remediation-card__header > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.remediation-card__header h3 {
    margin: 0;
    color: #252c37;
    font-size: 17px;
}

.remediation-alert {
    padding-top: 16px;
}

.remediation-alert + .remediation-alert {
    margin-top: 6px;
    border-top: 1px solid var(--line-light);
}

.remediation-alert__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.remediation-alert__heading .alert-summary__label {
    display: block;
    margin-bottom: 3px;
}

.steps-heading {
    margin: 10px 0 8px;
    color: #3c4655;
    font-size: 14px;
}

.remediation-steps {
    color: #303947;
    font-size: 14px;
    line-height: 1.6;
}

.remediation-steps p {
    margin: 7px 0;
}

.remediation-steps h4,
.remediation-steps h5,
.remediation-steps h6 {
    margin: 14px 0 5px;
    color: #374253;
    font-size: 14px;
}

.remediation-steps .remediation-subheading {
    color: #0f5878;
    font-style: italic;
    font-weight: 400;
}

.remediation-steps .remediation-unlisted-detail {
    margin-left: 36px;
}

.remediation-steps .drawer__list {
    margin-top: 7px;
}

.content-heading {
    margin: 12px 0 6px;
    color: #394354;
    font-size: 14px;
}

.remediation-empty {
    padding: 30px;
    border: 1px dashed #cfd6e2;
    border-radius: 10px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 760px) {
    .page-tabs {
        margin-top: 0;
    }

    .page-tab {
        flex: 1;
        justify-content: center;
        padding: 0 8px;
        font-size: 14px;
    }

    .alert-summary {
        padding: 14px;
    }

    .alert-summary__topline,
    .alert-summary__field {
        flex-direction: column;
        gap: 5px;
    }

    .alert-summary__label {
        flex: initial;
    }

    .remediation-toolbar,
    .remediation-card__header,
    .remediation-alert__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .remediation-search {
        width: 100%;
        flex: initial;
    }

    .remediation-card {
        padding: 15px;
    }
}
