:root {
    --bg: #05070a;
    --bg-top: #080b0f;
    --panel: rgba(12, 18, 24, 0.86);
    --panel-strong: rgba(14, 20, 27, 0.96);
    --text: #f4f7f9;
    --muted: #83929c;
    --muted-2: #62707a;
    --accent: #3545b0;
    --accent-soft: rgba(53, 69, 176, 0.18);
    --border: rgba(255, 255, 255, 0.08);
    --green: #46b985;
    --yellow: #d5ae3d;
    --red: #dc5a67;
    --blue: #6174e7;
    --gray: #7f8c96;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

html {
    background: var(--bg);
}

body {
    min-height: 100vh;
    padding: 42px 28px 56px;
    background:
        radial-gradient(circle at 52% -8%, rgba(53, 69, 176, 0.22), transparent 34%),
        radial-gradient(circle at 88% 72%, rgba(53, 69, 176, 0.06), transparent 30%),
        linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.status-shell {
    width: min(100%, 1120px);
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 48px;
    color: var(--muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .16em;
    transition: color 160ms ease;
}

.back-link:hover,
.back-link:focus-visible {
    color: var(--text);
}

.back-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 5px;
}

.status-header {
    margin-bottom: 40px;
}

.status-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .22em;
}

.status-label::before {
    content: "";
    width: 42px;
    height: 3px;
    border-radius: 999px;
    background: var(--accent);
}

.status-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 36px;
    align-items: end;
}

h1 {
    margin: 0;
    font-size: clamp(58px, 9vw, 108px);
    line-height: .88;
    letter-spacing: -.055em;
    font-weight: 820;
}

.status-title-row p {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.overall-card {
    min-height: 106px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--panel-strong);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: border-color 180ms ease, background 180ms ease;
}

.overall-dot,
.service-dot,
.footer-dot {
    border-radius: 999px;
    background: var(--gray);
}

.overall-dot {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    box-shadow: 0 0 16px rgba(127, 140, 150, .35);
}

.overall-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .17em;
}

.overall-card strong {
    display: block;
    font-size: 17px;
    line-height: 1.35;
}

.overall-card[data-status="operational"] {
    border-color: rgba(70, 185, 133, .45);
    background: rgba(70, 185, 133, .06);
}

.overall-card[data-status="operational"] .overall-dot {
    background: var(--green);
    box-shadow: 0 0 18px rgba(70, 185, 133, .75);
}

.overall-card[data-status="degraded"],
.overall-card[data-status="maintenance"],
.overall-card[data-status="unknown"] {
    border-color: rgba(213, 174, 61, .5);
    background: rgba(213, 174, 61, .06);
}

.overall-card[data-status="degraded"] .overall-dot,
.overall-card[data-status="maintenance"] .overall-dot,
.overall-card[data-status="unknown"] .overall-dot {
    background: var(--yellow);
    box-shadow: 0 0 18px rgba(213, 174, 61, .7);
}

.overall-card[data-status="outage"] {
    border-color: rgba(220, 90, 103, .55);
    background: rgba(220, 90, 103, .07);
}

.overall-card[data-status="outage"] .overall-dot {
    background: var(--red);
    box-shadow: 0 0 18px rgba(220, 90, 103, .72);
}

.status-meta {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.meta-separator {
    color: var(--accent);
}

.status-error {
    margin-bottom: 28px;
    padding: 14px 16px;
    border: 1px solid rgba(213, 174, 61, .36);
    background: rgba(213, 174, 61, .06);
    color: #d9c680;
    border-radius: 12px;
    font-size: 13px;
}

.status-sections {
    display: grid;
    gap: 22px;
}

.status-section {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.section-heading {
    min-height: 86px;
    padding: 21px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, .012);
}

.section-heading > div:first-child {
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-index {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
}

.section-heading h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 720;
}

.section-subtitle {
    display: block;
    margin: 5px 0 0 43px;
    color: var(--muted);
    font-size: 12px;
}

.section-summary {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.section-summary[data-status="operational"] {
    color: var(--green);
    border-color: rgba(70, 185, 133, .36);
    background: rgba(70, 185, 133, .06);
}

.section-summary[data-status="degraded"],
.section-summary[data-status="maintenance"],
.section-summary[data-status="unknown"] {
    color: var(--yellow);
    border-color: rgba(213, 174, 61, .36);
    background: rgba(213, 174, 61, .06);
}

.section-summary[data-status="outage"] {
    color: var(--red);
    border-color: rgba(220, 90, 103, .4);
    background: rgba(220, 90, 103, .06);
}

.status-table {
    width: 100%;
}

.status-row {
    min-height: 62px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(220px, 1.25fr) minmax(150px, .55fr) minmax(300px, 1.5fr);
    align-items: center;
    gap: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.status-row:last-child {
    border-bottom: 0;
}

.status-table-head {
    min-height: 42px;
    color: var(--muted-2);
    background: rgba(0, 0, 0, .12);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.service-name {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    font-size: 14px;
    font-weight: 690;
}

.service-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
}

.service-name-text {
    min-width: 0;
}

.works {
    width: fit-content;
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--gray);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .06em;
}

.note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.status-row[data-status="operational"] .service-dot {
    background: var(--green);
    box-shadow: 0 0 11px rgba(70, 185, 133, .48);
}

.status-row[data-status="operational"] .works {
    color: var(--green);
}

.status-row[data-status="degraded"] .service-dot,
.status-row[data-status="maintenance"] .service-dot,
.status-row[data-status="unknown"] .service-dot {
    background: var(--yellow);
    box-shadow: 0 0 11px rgba(213, 174, 61, .42);
}

.status-row[data-status="degraded"] .works,
.status-row[data-status="maintenance"] .works,
.status-row[data-status="unknown"] .works {
    color: var(--yellow);
}

.status-row[data-status="outage"] .service-dot {
    background: var(--red);
    box-shadow: 0 0 11px rgba(220, 90, 103, .48);
}

.status-row[data-status="outage"] .works {
    color: var(--red);
}

.status-row[data-status="development"] .service-dot {
    background: var(--blue);
    box-shadow: 0 0 11px rgba(97, 116, 231, .5);
}

.status-row[data-status="development"] .works {
    color: var(--blue);
}

.status-row[data-status="development"] .note {
    color: #9aa6de;
    font-style: italic;
}

.status-footer {
    margin-top: 26px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 720;
    letter-spacing: .08em;
}

.footer-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(53, 69, 176, .85);
}

.skeleton-row > span {
    width: 70%;
    height: 11px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,.035), rgba(255,255,255,.08), rgba(255,255,255,.035));
    background-size: 200% 100%;
    animation: skeleton 1.3s linear infinite;
}

.skeleton-row > span:nth-child(2) {
    width: 50%;
}

.skeleton-row > span:nth-child(3) {
    width: 85%;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 800px) {
    body {
        padding: 28px 16px 42px;
    }

    .back-link {
        margin-bottom: 34px;
    }

    .status-title-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .overall-card {
        min-height: auto;
    }

    .status-row {
        padding: 15px 18px;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 16px;
    }

    .status-table-head {
        display: none;
    }

    .service-name {
        grid-column: 1;
        grid-row: 1;
    }

    .works {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .note {
        grid-column: 1 / -1;
        grid-row: 2;
        padding-left: 21px;
    }

    .section-heading {
        padding: 18px;
        align-items: flex-start;
    }

    .section-subtitle {
        margin-left: 39px;
    }
}

@media (max-width: 520px) {
    h1 {
        font-size: 58px;
    }

    .section-heading {
        flex-direction: column;
        gap: 12px;
    }

    .section-summary {
        margin-left: 39px;
    }
}
