/* ==========================================================================
   STATUS PAGE — CURRENT PLATFORM STATE, ACTIVE INCIDENT, 90-DAY WINDOW,
   INCIDENT HISTORY.

   STATE COLOURS COME FROM THE SHARED SEMANTIC TOKENS (--color-success /
   --color-warning / --color-danger) WITH LITERAL FALLBACKS, BECAUSE THE
   MARKETING SITE DOES NOT LOAD Eesier.Web.Shared/site.css. EACH STATE
   MODIFIER ONLY MAPS ITS TOKEN INTO --st-state; EVERY RULE BELOW READS
   THAT ONE VARIABLE. COLOUR IS CARRIED BY THE DOT, TEXT STAYS INK.
   ========================================================================== */


/* ==========================================================================
   STATE MAPPING
   ========================================================================== */

.st-pill--operational,
.st-window__bar--operational,
.st-window__legend-dot--operational {
    --st-state: var(--color-success, #22c55e);
}

.st-pill--degraded,
.st-window__bar--degraded,
.st-window__legend-dot--degraded,
.st-incident--minor {
    --st-state: var(--color-warning, #f59e0b);
}

.st-pill--outage,
.st-window__bar--outage,
.st-window__legend-dot--outage,
.st-incident--major {
    --st-state: var(--color-danger, #ef4444);
}

.st-incident--critical {
    --st-state: color-mix(in srgb, var(--color-danger, #ef4444) 70%, var(--color-canvas-dark, #0a1628));
}


/* ==========================================================================
   HERO
   ========================================================================== */

/* THE SELECTOR MATCHES components.css' `main > section:not(.hero)` RULE SO THE 155px BOTTOM PADDING IT RESERVES FOR WAVES DOES NOT PUSH THE CENTERED HERO OFF-CENTRE — ONLY THE 80px THE NEXT SECTION'S WAVE ACTUALLY COVERS IS KEPT */

main > section.st-hero {
    padding: 0 0 80px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.st-hero .st-hero__inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.st-hero .st-hero__inner .st-hero__badge {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.st-hero .st-hero__inner .st-hero__headline {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-ink);
    line-height: 1.2;
    margin: 0;
}

.st-hero .st-hero__inner .st-hero__subheadline {
    font-size: 15px;
    color: var(--color-muted);
    line-height: 1.7;
    max-width: 600px;
    margin: 0;
}

.st-hero .st-hero__inner .st-hero__checked {
    font-size: 13px;
    color: var(--color-muted);
    margin: 0;
}

.st-hero .st-hero__inner .st-hero__failure {
    display: flex;
    align-items: center;
    gap: 10px;
    background: color-mix(in srgb, var(--color-danger, #ef4444) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-danger, #ef4444) 25%, transparent);
    border-radius: var(--radius-standard, 12px);
    padding: 10px 25px;
    color: var(--color-ink);
    font-size: 14px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0;
    text-align: left;
}

/* THE MARKETING SITE DOES NOT LOAD Eesier.Web.Shared/site.css, SO THE SHARED .eicon SIZING RULE IS ABSENT — EVERY ICON ON THIS PAGE STATES ITS OWN BOX */

.st-hero .st-hero__inner .st-hero__failure .eicon {
    width: 25px;
    height: 25px;
    color: var(--color-danger, #ef4444);
    flex-shrink: 0;
}


/* ==========================================================================
   STATUS PILL — THE DOT CARRIES THE STATE COLOUR, THE LABEL STAYS INK
   ========================================================================== */

.st-hero .st-hero__inner .st-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    border-radius: var(--radius-pill, 999px);
    background: color-mix(in srgb, var(--st-state) 12%, transparent);
    color: var(--color-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.st-hero .st-hero__inner .st-pill .st-pill__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--st-state);
    color: var(--st-state);
    flex-shrink: 0;
    animation: stPulse 2s ease-in-out infinite;
}

@keyframes stPulse {
    0% { box-shadow: 0 0 0 0 currentColor; }
    70% { box-shadow: 0 0 0 8px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}


/* ==========================================================================
   ACTIVE INCIDENT SECTION
   ========================================================================== */

.st-active {
    background: var(--color-surface);
    position: relative;
    z-index: 1;
}

.st-active::before {
    content: "";
    position: absolute;
    top: -79px;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C360,80 720,0 1440,40 L1440,80 L0,80 Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.st-active .content-inner .st-incidents {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}


/* ==========================================================================
   90-DAY WINDOW SECTION
   ========================================================================== */

.st-uptime {
    background: #dbeafe;
    position: relative;
    z-index: 1;
}

.st-uptime::before {
    content: "";
    position: absolute;
    top: -79px;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C360,80 720,0 1440,40 L1440,80 L0,80 Z' fill='%23dbeafe'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.st-uptime .content-inner .st-window {
    max-width: 1100px;
    margin: 0 auto;
    padding: 25px;
    border-radius: var(--radius-standard, 12px);
    background: var(--color-surface);
    border: 1px solid rgba(28, 145, 228, 0.08);
    box-shadow: 0 10px 50px rgba(28, 145, 228, 0.06), 0 2px 10px rgba(15, 23, 42, 0.03);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.st-uptime .content-inner .st-window .st-window__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.st-uptime .content-inner .st-window .st-window__head .st-window__percent {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-ink);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.st-uptime .content-inner .st-window .st-window__head .st-window__range {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-muted);
}

.st-uptime .content-inner .st-window .st-window__bars {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.st-uptime .content-inner .st-window .st-window__bars .st-window__bar {
    flex: 1 1 0;
    min-width: 3px;
    height: 34px;
    border-radius: 2px;
    background: var(--st-state, var(--color-border));
}

.st-uptime .content-inner .st-window .st-window__bars .st-window__bar:hover {
    outline: 1px solid color-mix(in srgb, var(--color-ink) 35%, transparent);
    outline-offset: 1px;
}

.st-uptime .content-inner .st-window .st-window__axis {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.st-uptime .content-inner .st-window .st-window__axis .st-window__axis-label {
    font-size: 12px;
    color: var(--color-muted);
}

.st-uptime .content-inner .st-window .st-window__legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding-top: 10px;
}

.st-uptime .content-inner .st-window .st-window__legend .st-window__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--color-muted);
}

.st-uptime .content-inner .st-window .st-window__legend .st-window__legend-item .st-window__legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--st-state);
    flex-shrink: 0;
}


/* ==========================================================================
   STAT TILES
   ========================================================================== */

.st-uptime .content-inner .st-stats {
    max-width: 1100px;
    margin: 25px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.st-uptime .content-inner .st-stats .st-stat {
    flex: 1 1 200px;
    padding: 25px;
    border-radius: var(--radius-standard, 12px);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(28, 145, 228, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.st-uptime .content-inner .st-stats .st-stat .st-stat__value {
    font-size: 25px;
    font-weight: 700;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.st-uptime .content-inner .st-stats .st-stat .st-stat__label {
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.5;
}


/* ==========================================================================
   HISTORY SECTION
   ========================================================================== */

.st-history {
    background: var(--color-surface);
    position: relative;
    z-index: 1;
}

.st-history::before {
    content: "";
    position: absolute;
    top: -79px;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C360,80 720,0 1440,40 L1440,80 L0,80 Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.st-history .content-inner .st-empty {
    max-width: 600px;
    margin: 0 auto;
    padding: 50px 25px;
    border-radius: var(--radius-standard, 12px);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.st-history .content-inner .st-empty .eicon {
    width: 50px;
    height: 50px;
    color: var(--color-secondary);
}

.st-history .content-inner .st-empty .st-empty__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-ink);
    margin: 0;
}

.st-history .content-inner .st-empty .st-empty__text {
    font-size: 14px;
    color: var(--color-muted);
    line-height: 1.6;
    margin: 0;
}

.st-history .content-inner .st-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 50px;
}

.st-history .content-inner .st-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 18px;
    width: 2px;
    background: linear-gradient(180deg, rgba(28, 145, 228, 0.2) 0%, rgba(28, 145, 228, 0.05) 100%);
}

.st-history .content-inner .st-timeline .st-month {
    padding-bottom: 50px;
}

.st-history .content-inner .st-timeline .st-month .st-month__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    position: relative;
}

.st-history .content-inner .st-timeline .st-month .st-month__header .st-month__dot {
    position: absolute;
    left: -43px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 3px solid var(--color-surface);
    box-shadow: 0 0 0 2px rgba(28, 145, 228, 0.3);
    flex-shrink: 0;
}

.st-history .content-inner .st-timeline .st-month .st-month__header .st-month__label {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-ink);
}

.st-history .content-inner .st-timeline .st-month .st-month__header .st-month__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(28, 145, 228, 0.08);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 700;
}

.st-history .content-inner .st-timeline .st-month .st-month__incidents {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* ==========================================================================
   INCIDENT CARD — SHARED BY THE ACTIVE SECTION AND THE HISTORY TIMELINE
   ========================================================================== */

.st-incident {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-standard, 12px);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.st-incident .st-incident__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.st-incident .st-incident__header .st-incident__tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 3px 10px;
    border-radius: var(--radius-pill, 999px);
    background: color-mix(in srgb, var(--st-state) 12%, transparent);
    color: var(--color-ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.st-incident .st-incident__header .st-incident__tag .st-incident__tag-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--st-state);
    flex-shrink: 0;
}

.st-incident .st-incident__header .st-incident__status {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
}

.st-incident .st-incident__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-ink);
    line-height: 1.4;
    margin: 0;
}

.st-incident .st-incident__message {
    font-size: 14px;
    color: var(--color-muted);
    line-height: 1.6;
    margin: 0;
}

.st-incident .st-incident__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin: 0;
}

.st-incident .st-incident__meta .st-incident__meta-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.st-incident .st-incident__meta .st-incident__meta-item .st-incident__meta-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--color-muted);
}

.st-incident .st-incident__meta .st-incident__meta-item .st-incident__meta-value {
    font-size: 13px;
    color: var(--color-ink);
    margin: 0;
}


/* ==========================================================================
   UPDATE TIMELINE INSIDE AN INCIDENT CARD
   ========================================================================== */

.st-incident .st-updates {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
}

.st-incident .st-updates .st-updates__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--color-muted);
}

.st-incident .st-updates .st-updates__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.st-incident .st-updates .st-updates__list .st-update {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.st-incident .st-updates .st-updates__list .st-update .st-update__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-secondary);
    flex-shrink: 0;
    margin-top: 6px;
}

.st-incident .st-updates .st-updates__list .st-update .st-update__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.st-incident .st-updates .st-updates__list .st-update .st-update__body .st-update__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.st-incident .st-updates .st-updates__list .st-update .st-update__body .st-update__header .st-update__status {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
}

.st-incident .st-updates .st-updates__list .st-update .st-update__body .st-update__header .st-update__time {
    font-size: 11px;
    color: var(--color-muted);
}

.st-incident .st-updates .st-updates__list .st-update .st-update__body .st-update__message {
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.6;
    margin: 0;
}


/* ==========================================================================
   CTA
   ========================================================================== */

.st-cta {
    background: var(--color-ink);
    position: relative;
    z-index: 1;
}

.st-cta::before {
    content: "";
    position: absolute;
    top: -79px;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C360,80 720,0 1440,40 L1440,80 L0,80 Z' fill='%230f172a'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.st-cta .content-inner .section-header .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-left: auto;
    margin-right: auto;
}

.st-cta .content-inner .st-cta__actions {
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ==========================================================================
   SECTION HEADERS — THE CANONICAL BLOCK IS CENTERED, SO ITS SUBTITLE NEEDS
   AUTO MARGINS TO STAY CENTERED INSIDE THESE SECTIONS
   ========================================================================== */

.st-active .content-inner .section-header .section-subtitle,
.st-uptime .content-inner .section-header .section-subtitle,
.st-history .content-inner .section-header .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}


/* ==========================================================================
   TABLET AND UP
   ========================================================================== */

@media (min-width: 768px) {

    .st-hero .st-hero__inner .st-hero__headline {
        font-size: 36px;
    }

    .st-hero .st-hero__inner .st-hero__subheadline {
        font-size: 16px;
    }

    .st-uptime .content-inner .st-window {
        padding: 50px;
        gap: 25px;
    }

    .st-uptime .content-inner .st-window .st-window__head .st-window__percent {
        font-size: 50px;
    }

    .st-uptime .content-inner .st-window .st-window__bars .st-window__bar {
        height: 50px;
    }

    .st-uptime .content-inner .st-stats {
        gap: 25px;
    }

}
