:root {
    color-scheme: light;
    --status-blue: #1d4ed8;
    --status-blue-dark: #1e3a8a;
    --status-gray-900: #0f172a;
    --status-gray-700: #334155;
    --status-gray-600: #475569;
    --status-gray-200: #e2e8f0;
    --status-gray-100: #f1f5f9;
    --status-section-bg: #f7f9fc;
    --status-header-height: 200px;
}

body {
    background: #f5f6f8;
    color: var(--status-gray-900);
    font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 14.5px;
    line-height: 1.55;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--status-blue-dark);
    text-decoration: none;
}

a:hover {
    color: var(--status-blue);
    text-decoration: none;
}

.status-critical-alert {
    background: #b42318;
    color: #fff;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1031;
}

.status-critical-alert .container {
    max-width: 1240px;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.status-critical-alert__content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.status-critical-alert__label {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 0.68rem;
    background: rgba(255, 255, 255, 0.18);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    white-space: nowrap;
}

.status-critical-alert__service {
    font-weight: 600;
}

.status-critical-alert__message {
    font-weight: 500;
}

.status-critical-alert__timestamp {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
}

.status-critical-alert__link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.status-critical-alert__link:hover {
    color: #ffe2e0;
}

@media (max-width: 767.98px) {
    .status-critical-alert__content {
        flex-wrap: wrap;
        white-space: normal;
        overflow-x: visible;
    }
}

.status-topbar {
    background: #0b1324;
    border-bottom: 0;
    height: 56px;
    position: sticky;
    top: var(--status-critical-alert-height, 0px);
    z-index: 1020;
}

.status-topbar .container {
    max-width: 1240px;
}

.status-topbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.status-topbar__logo {
    max-height: var(--status-logo-max-height, 32px);
    max-width: var(--status-logo-max-width, 160px);
    width: auto;
    height: auto;
    display: block;
}

.status-topbar__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin-left: auto;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.4);
    color: #fff;
    cursor: pointer;
}

.status-topbar__toggle span[aria-hidden='true'] {
    width: 18px;
    height: 2px;
    background: currentColor;
    display: block;
    position: relative;
}

.status-topbar__toggle span[aria-hidden='true']::before,
.status-topbar__toggle span[aria-hidden='true']::after {
    content: '';
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: currentColor;
}

.status-topbar__toggle span[aria-hidden='true']::before {
    top: -6px;
}

.status-topbar__toggle span[aria-hidden='true']::after {
    top: 6px;
}

.status-topbar__menu {
    display: flex;
    gap: 0.5rem;
    row-gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.status-topbar .btn {
    border-radius: 6px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: transparent;
    background: rgba(148, 163, 184, 0.12);
    box-shadow: none;
}

.status-topbar .btn:hover {
    background: rgba(148, 163, 184, 0.2);
    border-color: transparent;
    color: #fff;
}

.status-topbar .btn.is-active,
.status-topbar .btn[aria-current='page'] {
    background: rgba(29, 78, 216, 0.35);
    border-color: rgba(29, 78, 216, 0.5);
    color: #fff;
}

.status-topbar .btn.is-active:hover,
.status-topbar .btn[aria-current='page']:hover {
    background: rgba(29, 78, 216, 0.45);
    border-color: rgba(29, 78, 216, 0.65);
    color: #fff;
}

.status-topbar .status-notifications-trigger {
    background: #06656a;
    border-color: #06656a;
    color: #fff;
}

.home-sections {
    width: 100%;
}

.home-search {
    width: 100%;
    margin-bottom: 1.5rem;
}

.home-search__form {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.home-search__title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
    color: var(--status-gray-900);
}

.home-search__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.home-search__input {
    position: relative;
    flex: 1 1 320px;
    min-width: 240px;
}

.home-search__input .form-control {
    padding-left: 2.35rem;
    min-height: 44px;
}

.home-search__icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--status-gray-600);
    font-size: 0.95rem;
}

.home-search__select {
    min-width: 200px;
    min-height: 44px;
}

.home-search__button {
    min-height: 44px;
    padding: 0.4rem 1.2rem;
    font-weight: 600;
}

.home-search__hint {
    margin: 0;
    color: var(--status-gray-600);
    font-size: 0.88rem;
}

.kb-search-section {
    padding-top: 0;
    padding-bottom: 0.3rem;
}

.kb-search-card {
    background: #fff;
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: none;
}

.kb-search-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(37, 99, 235, 0.12);
    color: #1f2937;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.kb-search-header {
    margin-bottom: 0.6rem;
}

.kb-search-header .h4 {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.kb-search-header p {
    font-size: 0.9rem;
}

.kb-search-field {
    position: relative;
}

.kb-search-input {
    position: relative;
}

.kb-search-input .form-control {
    padding: 0.5rem 2.6rem 0.5rem 0.85rem;
    font-size: 1rem;
}

.kb-search-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    font-size: 1rem;
    color: rgba(15, 23, 42, 0.5);
}

.kb-search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    padding: 0.5rem 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    z-index: 10;
}

.kb-search-results.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.kb-search-results.is-scrollable {
    max-height: 18rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.7) transparent;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.kb-search-results.is-scrollable::-webkit-scrollbar {
    width: 0.55rem;
}

.kb-search-results.is-scrollable::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.7);
    border-radius: 999px;
}

.kb-search-results.is-scrollable::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.2);
}

.kb-search-item a {
    display: flex;
    flex-direction: column;
    padding: 0.6rem 1.1rem;
    text-decoration: none;
    color: #111827;
    transition: background 0.2s ease;
}

.kb-search-item a:hover {
    background: rgba(37, 99, 235, 0.08);
}

.kb-search-item .kb-search-badge {
    align-self: flex-start;
    margin-top: 0.35rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #0f172a;
    background: rgba(148, 163, 184, 0.2);
}

.kb-search-empty {
    padding: 0.8rem 1.1rem;
    color: rgba(15, 23, 42, 0.6);
    font-size: 0.85rem;
}

.home-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
}

.home-card__split {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 100%;
}

.home-card__pane {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.home-card__pane + .home-card__pane {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.home-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.15rem 1.15rem 0;
}

.home-card__title-field {
    background: var(--status-gray-100);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.home-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.home-card__count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e3a8a;
    background: #e0e7ff;
    border: 1px solid #c7d2fe;
    line-height: 1.2;
    white-space: nowrap;
}

.home-card__subtitle {
    color: var(--status-gray-600);
    margin: 0;
    font-size: 0.88rem;
}

.home-card__body {
    flex: 1 1 auto;
    padding: 0 1.15rem;
}

.home-card__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.home-card__list--status .home-card__item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.home-card__list--status .home-card__item-title {
    flex: 2 1 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-card__status-meta {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    white-space: nowrap;
}

.home-card__status-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    border: 1px solid var(--status-gray-200);
    color: var(--status-gray-700);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.home-card__status-link:hover,
.home-card__status-link:focus {
    color: var(--status-gray-900);
    border-color: var(--status-gray-300);
    background-color: rgba(15, 23, 42, 0.08);
}

.home-card__item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.home-card__item-title {
    font-weight: 600;
    color: var(--status-gray-900);
}

.home-card--kb .home-card__item-title {
    font-size: 0.86rem;
}

.home-card__item-excerpt {
    margin: 0;
    color: var(--status-gray-600);
    font-size: 0.86rem;
}

.home-card__meta {
    font-size: 0.9rem;
    color: var(--status-gray-600);
}

.home-card__latest-badge {
    font-size: 0.86rem;
}

.home-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
    background: rgba(15, 23, 42, 0.06);
    font-weight: 600;
    white-space: nowrap;
    width: fit-content;
}

.home-card__badge--outage,
.home-card__badge--critical {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.home-card__badge--degraded {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.home-card__badge--maintenance {
    background: #e0e7ff;
    color: #1e3a8a;
    border-color: #c7d2fe;
}

.home-card__badge--operational {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.home-card__badge--info {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

.home-card__empty {
    margin: 0;
    color: var(--status-gray-600);
    font-size: 0.88rem;
}

.home-card__footer {
    margin-top: auto;
    padding: 0.5rem 1.15rem 1.15rem;
    display: flex;
    justify-content: flex-end;
}

.home-card__action {
    font-weight: 600;
    min-width: 100%;
    text-align: center;
}

.status-topbar .status-notifications-trigger:hover {
    background: #055359;
    border-color: #055359;
    color: #fff;
}

@media (max-width: 1150px) {
    .status-topbar .container {
        justify-content: space-between !important;
    }

    .status-topbar__toggle {
        display: inline-flex;
    }

    .status-topbar__menu {
        display: none;
        position: absolute;
        top: 56px;
        right: 0;
        left: 0;
        padding: 0.75rem 1rem 1rem;
        background: #0b1324;
        border-bottom: 1px solid rgba(148, 163, 184, 0.3);
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .status-topbar__menu.is-open {
        display: flex;
    }

    .status-topbar__menu .btn {
        width: 100%;
        justify-content: center;
    }
}

.status-topbar .btn:focus-visible {
    outline: 2px solid var(--status-blue);
    outline-offset: 2px;
    box-shadow: none;
}

.status-hero {
    background: #242833;
    color: #fff;
    height: var(--status-header-height);
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
}

.status-hero .container,
.status-topbar .container {
    max-width: 1240px;
}

.status-hero .container {
    height: 100%;
    display: flex;
    align-items: center;
}

.status-hero::after {
    display: none;
}

.status-hero__layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.status-hero__title {
    font-size: 2.1rem;
    font-weight: 600;
    line-height: 1.2;
}

.status-shell {
    margin-top: 0;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    max-width: 1240px;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767.98px) {
    .status-hero__title {
        font-size: 1.8rem;
    }

    .status-shell {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }
}

.status-site-footer {
    background: #0b1324;
    color: #e2e8f0;
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    margin-top: auto;
}
