/* /assets/css/pages/status.css */

.p-status {
    --status-surface: rgb(16 27 49 / 92%);
    --status-border: rgb(211 224 255 / 14%);
    --status-text: rgb(224 233 255 / 95%);
    --status-text-muted: rgb(178 193 221 / 85%);
    --status-heading: #fff;
    --status-ok: #21d07a;
    --status-degraded: #f7b500;
    --status-partial: #ff8a4b;
    --status-down: #ff4d5a;
    --status-maintenance: #3e63ee;

    background-color: var(--qk-standard-band-dark);
    background-image: var(--qk-standard-band-pattern);
    background-blend-mode: overlay;
    color: var(--status-text);
    min-height: 100vh;
}

body.light-mode.p-status {
    --status-surface: rgb(255 255 255 / 96%);
    --status-border: rgb(15 23 42 / 10%);
    --status-text: #1f2a44;
    --status-text-muted: #4a5a78;
    --status-heading: #14223d;
    background: linear-gradient(180deg, var(--qk-standard-light-canvas) 0%, var(--qk-standard-light-surface) 100%);
}

.p-status .status-hero .hero-actions a {
    border-color: rgb(255 255 255 / 22%);
}

/* Explicit shell variant: the public status page intentionally flattens the
   shared shell edge so the uptime surface reads as a utility view, not the
   default marketing chrome. */
.p-status .hx-header::before,
.p-status .hx-header::after {
    border-radius: 0;
}

.p-status .hx-header::before {
    box-shadow: none;
}

.p-status .hx-header {
    border-bottom: none;
}

.p-status .text-orange {
    color: #f7901d;
}

.p-status .text-blue {
    color: #4d82ff;
}

body.light-mode.p-status .status-hero .hero-actions a {
    border-color: rgb(15 23 42 / 14%);
}

.status-section {
    /* Standard sections already own their own container padding; avoid
       double-padding that creates odd seams between rotating bands. */
    padding: 0;
}

/* Keep "System" white in the hero title across themes. */
.p-status .status-hero .hero-title .status-hero-title-system {
    color: #fff;
    font-weight: inherit;
    display: inline;
}

/* Accent the remaining title word while preserving the white "System" token. */
.p-status .status-hero .hero-title .status-hero-title-accent {
    color: var(--accent-orange, #f47a00);
    font-weight: inherit;
    display: inline;
}

body.light-mode.p-status .status-hero .hero-title .status-hero-title-system {
    color: #fff;
}

body.light-mode.p-status .status-hero .hero-title .status-hero-title-accent {
    color: var(--accent-orange, #f47a00);
}

/* Hero adjustments for the status page to align contents nicely */
.status-hero {
    padding: clamp(4rem, 10vw, 6rem) 0;
}

.status-hero .container {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
}

.status-hero .hero-actions {
    margin-top: 1.25rem;
}

.status-hero .hero-actions a {
    color: var(--status-text);
    background: rgb(255 255 255 / 4%);
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid rgb(255 255 255 / 6%);
}

.status-hero .hero-subtitle {
    color: #fff;
}

body.light-mode.p-status .status-hero .hero-subtitle {
    color: #fff;
}

body.light-mode.p-status .status-card {
    border-color: rgb(15 23 42 / 12%);
    background:
        radial-gradient(circle at 14% -18%, rgb(77 130 255 / 12%), transparent 42%),
        radial-gradient(circle at 88% 118%, rgb(247 144 29 / 8%), transparent 40%),
        linear-gradient(180deg, rgb(255 255 255 / 96%), rgb(247 250 255 / 94%));
    box-shadow: 0 14px 28px rgb(15 23 42 / 10%);
}

body.light-mode.p-status .status-grid .status-card:nth-child(odd) {
    border-color: rgb(247 127 0 / 34%);
}

body.light-mode.p-status .status-grid .status-card:nth-child(even) {
    border-color: rgb(62 99 238 / 32%);
}

body.light-mode.p-status .status-card:hover {
    box-shadow: 0 18px 34px rgb(15 23 42 / 14%);
}

body.light-mode.p-status .status-card h3 {
    color: #162544;
}

body.light-mode.p-status .status-grid .status-card:nth-child(odd) h3 {
    color: var(--std-accent-blue);
}

body.light-mode.p-status .status-grid .status-card:nth-child(even) h3 {
    color: var(--std-accent-orange);
}

body.light-mode.p-status .status-card p {
    color: #52637f;
}

body.light-mode.p-status .status-card .status-note,
body.light-mode.p-status .status-card__status,
body.light-mode.p-status .status-card__meta-value,
body.light-mode.p-status .status-card__footer {
    color: #14223d;
}

body.light-mode.p-status .status-card__status {
    background: rgb(15 23 42 / 4%);
}

body.light-mode.p-status .status-card__footer {
    border-top-color: rgb(15 23 42 / 8%);
}

#currentStatusHeading,
body.light-mode.p-status #currentStatusHeading {
    color: var(--std-accent-blue);
}

#historyHeading,
body.light-mode.p-status #historyHeading {
    color: var(--std-accent-orange);
}

/* Let `standard-page.css` own container width + padding so section transitions
   match the rest of the site. We only add layout gap here. */
.status-section .container {
    display: grid;
    gap: clamp(1.75rem, 3vw, 2.5rem);
}

/* Remove the accent-section seam gradient on the status page; it reads as a
   double shadow when stacked under service cards. */
.p-status .standard-section.standard-section-accent::before {
    display: none;
}

.p-status .section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 700;
    color: var(--std-accent-orange);
    margin: 0;
    text-align: center;
}

.p-status .status-subheading {
    margin: 0;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
    color: var(--status-heading);
}

.p-status .status-subtext {
    margin: 0;
    color: var(--status-text-muted);
    line-height: 1.6;
}

.p-status .status-subtext--meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.92rem;
    justify-content: center;
    text-align: center;
}

.p-status .status-meta-dot {
    opacity: 0.7;
}

.p-status .status-services {
    display: grid;
    gap: 0.85rem;
    justify-items: center;
    text-align: center;
}

.p-status .hero-glance {
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    max-width: 1100px;
}

.p-status .culture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(1.5rem, 2.5vw, 2rem);
}

.p-status .glance-card {
    background: var(--status-surface);
    border: 2px solid var(--status-border);
    border-radius: 24px;
    background-clip: padding-box;
    padding: 1.75rem;
    text-align: left;
    box-shadow: var(--std-card-shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

body.light-mode.p-status .glance-card {
    background: #ffffff;
    box-shadow: 0 16px 30px rgb(15 23 42 / 10%);
}

.p-status .glance-card:nth-child(odd) {
    border-color: rgb(var(--qk-accent-orange-rgb) / 45%);
    box-shadow: 0 22px 44px rgb(var(--qk-accent-orange-rgb) / 20%), var(--std-card-shadow);
}

.p-status .glance-card:nth-child(even) {
    border-color: rgb(var(--qk-accent-blue-rgb) / 38%);
    box-shadow: 0 22px 44px rgb(var(--qk-accent-blue-rgb) / 18%), var(--std-card-shadow);
}

.p-status .glance-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgb(6 12 24 / 45%);
}

.p-status .glance-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--status-heading);
    margin-bottom: 0.75rem;
}

.p-status .glance-card:nth-child(odd) .glance-value {
    color: var(--std-accent-blue);
}

.p-status .glance-card:nth-child(even) .glance-value {
    color: var(--std-accent-orange);
}

.p-status .glance-label {
    display: block;
    font-size: 0.95rem;
    color: var(--status-text-muted);
    line-height: 1.6;
}

.status-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.4rem, 2.6vw, 1.9rem);
    border-radius: 24px;
    border: 2px solid var(--std-border);
    background:
        radial-gradient(circle at 10% -40%, rgb(77 130 255 / 18%), transparent 60%),
        radial-gradient(circle at 90% 130%, rgb(247 144 29 / 14%), transparent 55%),
        var(--std-surface);
    box-shadow: var(--std-card-shadow);
}

body.light-mode.p-status .status-summary {
    background:
        radial-gradient(circle at 10% -40%, rgb(77 130 255 / 20%), transparent 60%),
        radial-gradient(circle at 90% 130%, rgb(247 144 29 / 18%), transparent 55%),
        #ffffff;
    border-color: rgb(32 64 140 / 18%);
    box-shadow: 0 18px 34px rgb(15 23 42 / 12%);
}

.status-summary h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.8rem, 3vw, 2.25rem);
    color: var(--status-heading);
}

.status-timestamp {
    margin: 0;
    color: var(--status-text-muted);
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}

.status-health-panel {
    display: grid;
    gap: 0.9rem;
    justify-items: end;
}

.status-overall {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.4rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 3%);
    color: var(--status-heading);
    font-weight: 600;
    letter-spacing: 0.03em;
    border: 1px solid rgb(255 255 255 / 14%);
}

.p-status .status-overall {
    margin-top: 0.25rem;
    margin-bottom: 0.35rem;
    justify-content: flex-start;
    width: fit-content;
}

.status-pill-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    max-width: 560px;
}

.status-pill {
    border: 1px solid var(--std-border);
    background: rgb(255 255 255 / 4%);
    color: var(--std-link);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.p-status .status-pill-row {
    justify-content: flex-start;
    max-width: none;
}

.status-pill.is-active {
    transform: translateY(-1px);
}

.status-pill.ok.is-active {
    border-color: rgb(33 208 122 / 80%);
    background: rgb(33 208 122 / 18%);
    box-shadow: 0 12px 24px rgb(33 208 122 / 16%);
    color: rgb(209 255 230 / 96%);
}

.status-pill.degraded.is-active {
    border-color: rgb(247 181 0 / 85%);
    background: rgb(247 181 0 / 18%);
    box-shadow: 0 12px 24px rgb(247 181 0 / 15%);
    color: rgb(255 240 194 / 96%);
}

.status-pill.partial.is-active {
    border-color: rgb(255 138 75 / 84%);
    background: rgb(255 138 75 / 18%);
    box-shadow: 0 12px 24px rgb(255 138 75 / 18%);
    color: rgb(255 224 205 / 96%);
}

.status-pill.down.is-active {
    border-color: rgb(255 77 90 / 84%);
    background: rgb(255 77 90 / 18%);
    box-shadow: 0 12px 24px rgb(255 77 90 / 18%);
    color: rgb(255 214 218 / 96%);
}

.status-pill.maintenance.is-active {
    border-color: rgb(62 99 238 / 84%);
    background: rgb(62 99 238 / 18%);
    box-shadow: 0 12px 24px rgb(62 99 238 / 18%);
    color: rgb(215 225 255 / 96%);
}

body.light-mode.p-status .status-pill {
    background: #ffffff;
    color: #2b4aa2;
    border-color: rgb(32 64 140 / 18%);
}

body.light-mode.p-status .status-overall {
    background: rgb(15 23 42 / 4%);
    color: #14223d;
    border-color: rgb(32 64 140 / 18%);
}

.status-overall::before {
    content: '';
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--status-ok);
    box-shadow: 0 0 0 6px rgb(33 208 122 / 6%);
}

/* color variants applied by JS by adding overall--ok / overall--degraded etc classes to #overallIndicator */
.status-overall.overall--ok::before {
  background: var(--status-ok);
  box-shadow: 0 0 0 6px rgb(33 208 122 / 8%);
}

.status-overall.overall--degraded::before {
  background: var(--status-degraded);
  box-shadow: 0 0 0 6px rgb(247 181 0 / 8%);
}

.status-overall.overall--partial::before {
  background: var(--status-partial);
  box-shadow: 0 0 0 6px rgb(255 138 75 / 8%);
}

.status-overall.overall--down::before {
  background: var(--status-down);
  box-shadow: 0 0 0 6px rgb(255 77 90 / 8%);
}

.status-overall.overall--maintenance::before {
  background: var(--status-maintenance);
  box-shadow: 0 0 0 6px rgb(62 99 238 / 8%);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    width: 100%;
}

@media (width <= 1100px) {
    .status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (width <= 720px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
}

.status-card {
    display: grid;
    justify-items: start;
    gap: 0.72rem;
    padding: clamp(1.2rem, 2.4vw, 1.7rem);
    border-radius: 24px;
    border: 1px solid rgb(255 255 255 / 12%);
    background:
        radial-gradient(circle at 14% -18%, rgb(77 130 255 / 10%), transparent 42%),
        radial-gradient(circle at 88% 118%, rgb(247 144 29 / 8%), transparent 40%),
        var(--std-surface);
    box-shadow: 0 16px 34px rgb(6 12 24 / 22%);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    height: auto;
}

.status-card.status-card--interactive {
    cursor: pointer;
    text-align: left;
    width: 100%;
    appearance: none;
    font: inherit;
    color: inherit;
}

.status-card.status-card--interactive:focus-visible {
    outline: 3px solid rgb(var(--qk-accent-orange-rgb) / 70%);
    outline-offset: 3px;
}

/* Card alternation standard (see README/docs/reference/.../styling.md)
   Odd border orange, odd title blue; Even border blue, even title orange. */
.status-grid .status-card:nth-child(odd) {
    border-color: rgb(247 127 0 / 40%);
}

.status-grid .status-card:nth-child(even) {
    border-color: rgb(62 99 238 / 38%);
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgb(6 12 24 / 26%);
}

.status-grid .status-card:nth-child(odd):hover {
    border-color: rgb(247 127 0 / 58%);
}

.status-grid .status-card:nth-child(even):hover {
    border-color: rgb(62 99 238 / 56%);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    margin-top: 0;
}

.status-indicator::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    opacity: 0.22;
}

.status-card__body {
    display: grid;
    justify-items: start;
    gap: 0.45rem;
    width: 100%;
}

.status-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--status-heading);
    line-height: 1.2;
}

.status-grid .status-card:nth-child(odd) h3 {
    color: var(--std-accent-blue);
}

.status-grid .status-card:nth-child(even) h3 {
    color: var(--std-accent-orange);
}

.status-card p {
    margin: 0;
    color: var(--status-text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.status-card .status-note {
    color: var(--status-heading);
    font-size: 0.88rem;
    font-weight: 600;
}

.status-card__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.45rem;
    padding: 0;
    border-radius: 999px;
    background: transparent;
    border: 0;
    color: var(--status-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-card__meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.1rem;
}

@media (width <= 900px) {
    .status-card__meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (width <= 560px) {
    .status-card__meta-grid {
        grid-template-columns: 1fr;
    }
}

.status-card__meta-item {
    display: grid;
    gap: 0.15rem;
    justify-items: start;
    padding: 0;
    border: 0;
    background: transparent;
}

.status-card__meta-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgb(178 193 221 / 78%);
}

.status-card__meta-value {
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--status-heading);
}

.status-card__footer {
    margin-top: 0.35rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 1.65rem;
    width: 100%;
    font-size: 0.98rem;
    font-weight: 650;
    color: var(--status-heading);
    border-top: 1px solid rgb(255 255 255 / 8%);
    padding-top: 0.7rem;
}

.status-card__footer--empty {
    color: var(--status-heading);
}

body.light-mode.p-status .status-card {
    border-color: rgb(15 23 42 / 12%);
    background:
        radial-gradient(circle at 14% -18%, rgb(77 130 255 / 10%), transparent 42%),
        radial-gradient(circle at 88% 118%, rgb(247 144 29 / 7%), transparent 40%),
        var(--std-surface);
    box-shadow: 0 14px 28px rgb(15 23 42 / 10%);
}

body.light-mode.p-status .status-card__meta-label {
    color: rgb(75 90 120 / 78%);
}

body.light-mode.p-status .status-card__footer {
    border-top-color: rgb(15 23 42 / 8%);
}

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

.status-legend .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgb(255 255 255 / 4%);
    border: 1px solid var(--std-border);
    color: var(--std-link);
}

.status-legend .badge::before {
    content: '';
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
}

.badge.ok::before,
.status-indicator.ok,
.status-indicator.ok::after {
    background: var(--status-ok);
}

.status-indicator.ok::after {
    background: rgb(33 208 122 / 12%);
}

.badge.degraded::before,
.status-indicator.degraded,
.status-indicator.degraded::after {
    background: var(--status-degraded);
}

.status-indicator.degraded::after {
    background: rgb(247 181 0 / 18%);
}

.badge.partial::before,
.status-indicator.partial,
.status-indicator.partial::after {
    background: var(--status-partial);
}

.status-indicator.partial::after {
    background: rgb(255 138 75 / 18%);
}

.badge.down::before,
.status-indicator.down,
.status-indicator.down::after {
    background: var(--status-down);
}

.status-indicator.down::after {
    background: rgb(255 77 90 / 18%);
}

.badge.maintenance::before,
.status-indicator.maintenance,
.status-indicator.maintenance::after {
    background: var(--status-maintenance);
}

.status-indicator.maintenance::after {
    background: rgb(62 99 238 / 20%);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.section-header h2 {
    margin: 0;
    color: var(--status-heading);
}

.btn.btn-refresh {
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--status-border);
    background: rgb(10 20 38 / 70%);
    color: var(--status-heading);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.btn-refresh:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgb(5 11 22 / 35%);
}

body.light-mode.p-status .btn.btn-refresh,
html.light-mode body.p-status .btn.btn-refresh,
body.p-status[data-theme="light"] .btn.btn-refresh,
html[data-theme="light"] body.p-status .btn.btn-refresh {
    background: linear-gradient(135deg, var(--qk-accent-orange) 0%, #ffb56d 100%);
    border-color: rgb(var(--qk-accent-orange-rgb) / 42%);
    color: var(--qk-accent-blue);
    box-shadow: 0 14px 26px rgb(var(--qk-accent-orange-rgb) / 24%);
}

body.light-mode.p-status .btn.btn-refresh:hover,
html.light-mode body.p-status .btn.btn-refresh:hover,
body.p-status[data-theme="light"] .btn.btn-refresh:hover,
html[data-theme="light"] body.p-status .btn.btn-refresh:hover {
    box-shadow: 0 16px 30px rgb(var(--qk-accent-orange-rgb) / 30%);
}

.incidents-empty {
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 18px;
    border: 1px dashed var(--status-border);
    background: rgb(10 20 38 / 40%);
    color: var(--status-text-muted);
    text-align: center;
}

.incident-list,
.maintenance-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.incident-item,
.maintenance-item {
    border-radius: 24px;
    border: 2px solid var(--std-border);
    background: var(--std-surface);
    padding: clamp(1.15rem, 2.3vw, 1.7rem);
    box-shadow: var(--std-card-shadow);
    display: grid;
    gap: 0.6rem;
}

.incident-item.incident-item--interactive {
    cursor: pointer;
    text-align: left;
    width: 100%;
    appearance: none;
    font: inherit;
    color: inherit;
}

.incident-item.incident-item--interactive:focus-visible {
    outline: 3px solid rgb(var(--qk-accent-blue-rgb) / 65%);
    outline-offset: 3px;
}

.incident-item.incident-item--interactive:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgb(6 12 24 / 26%);
}

.incident-updates {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: grid;
    gap: 0.65rem;
}

.incident-updates li {
    border-left: 2px solid rgb(211 224 255 / 16%);
    padding-left: 0.85rem;
}

.incident-updates strong {
    display: block;
    color: var(--status-heading);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.incident-updates p {
    margin: 0.3rem 0 0;
    color: var(--status-text-muted);
    line-height: 1.55;
}

/* Recent Updates cards follow the same alternation standard as other grids. */
.incident-list .incident-item:nth-child(odd) {
    border-color: rgb(247 127 0 / 50%);
}

.incident-list .incident-item:nth-child(even) {
    border-color: rgb(62 99 238 / 50%);
}

.incident-list .incident-item:nth-child(odd) .incident-title {
    color: var(--std-accent-blue);
}

.incident-list .incident-item:nth-child(even) .incident-title {
    color: var(--std-accent-orange);
}

.incident-list .incident-item:nth-child(odd):hover {
    border-color: rgb(247 127 0 / 65%);
}

.incident-list .incident-item:nth-child(even):hover {
    border-color: rgb(62 99 238 / 65%);
}

.incident-item .incident-heading,
.maintenance-item .maintenance-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.incident-title,
.maintenance-title {
    font-size: 1.15rem;
    margin: 0;
    color: var(--status-heading);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    background: rgb(255 255 255 / 4%);
    border: 1px solid var(--std-border);
    color: var(--std-link);
}

.incident-body,
.maintenance-body {
    color: var(--status-text-muted);
    line-height: 1.6;
    margin: 0;
}

.incident-meta,
.maintenance-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: rgb(226 234 255 / 70%);
}

.p-status .incident-meta {
    justify-content: center;
    text-align: center;
}

.p-status .status-card__incident-count {
    flex-basis: 100%;
    display: block;
    text-align: center;
}

.p-status .status-card__incident-count--empty {
    color: var(--status-heading);
    font-weight: 700;
}

body.light-mode.p-status .incident-meta,
body.light-mode.p-status .maintenance-meta,
html.light-mode body.p-status .incident-meta,
html.light-mode body.p-status .maintenance-meta,
body.p-status[data-theme="light"] .incident-meta,
body.p-status[data-theme="light"] .maintenance-meta,
html[data-theme="light"] body.p-status .incident-meta,
html[data-theme="light"] body.p-status .maintenance-meta {
    color: #334a73;
}

.support-link {
    color: var(--status-heading);
    text-decoration: none;
    font-weight: 600;
}

.support-link:hover {
    color: var(--status-maintenance);
}

/* ==========================================================
   Overlay (module-style panel, matches careers overlay pattern)
   ========================================================== */

.status-overlay[aria-hidden="true"] {
    display: none;
}

.status-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 2rem);
}

.status-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(2 6 18 / 72%);
    backdrop-filter: blur(10px);
}

.status-overlay__panel {
    position: relative;
    width: min(860px, 100%);
    max-height: min(82vh, 860px);
    overflow: auto;
    border-radius: 28px;
    border: 2px solid rgb(var(--qk-accent-blue-rgb) / 32%);
    background:
        radial-gradient(circle at 12% -20%, rgb(77 130 255 / 24%), transparent 55%),
        radial-gradient(circle at 90% 120%, rgb(247 144 29 / 18%), transparent 58%),
        rgb(8 14 28 / 92%);
    box-shadow:
        0 32px 90px rgb(0 0 0 / 55%),
        0 0 0 1px rgb(var(--qk-accent-orange-rgb) / 22%) inset;
    color: var(--status-text);
}

body.light-mode .status-overlay__panel {
    border-color: rgb(var(--qk-accent-blue-rgb) / 28%);
    background:
        radial-gradient(circle at 12% -20%, rgb(77 130 255 / 12%), transparent 58%),
        radial-gradient(circle at 90% 120%, rgb(247 144 29 / 10%), transparent 60%),
        rgb(255 255 255 / 98%);
    color: #0f172a;
    box-shadow:
        0 28px 70px rgb(15 23 42 / 18%),
        0 0 0 1px rgb(15 23 42 / 6%) inset;
}

.status-overlay__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.4rem 1.4rem 0.9rem;
    border-bottom: 1px solid rgb(211 224 255 / 12%);
}

body.light-mode .status-overlay__header {
    border-bottom-color: rgb(15 23 42 / 8%);
}

.status-overlay__kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: none;
    color: var(--std-link);
    background: rgb(255 255 255 / 4%);
    border: 1px solid var(--std-border);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}

body.light-mode.p-status .status-overlay__kicker {
    color: var(--std-link);
    background: rgb(255 255 255 / 96%);
    border-color: rgb(15 23 42 / 10%);
}

.status-overlay__kicker--service {
    color: var(--std-link);
    background: rgb(255 255 255 / 4%);
    border: 1px solid var(--std-border);
    box-shadow: none;
}

.status-overlay__kicker.degraded {
    color: rgb(203 124 15 / 96%);
    background: rgb(247 144 29 / 12%);
    border-color: rgb(247 144 29 / 22%);
}

.status-overlay__kicker.partial {
    color: rgb(71 105 219 / 96%);
    background: rgb(62 99 238 / 12%);
    border-color: rgb(62 99 238 / 22%);
}

.status-overlay__kicker.down {
    color: rgb(207 76 63 / 96%);
    background: rgb(197 74 33 / 12%);
    border-color: rgb(197 74 33 / 22%);
}

.status-overlay__kicker.maintenance {
    color: rgb(155 104 14 / 96%);
    background: rgb(255 196 93 / 14%);
    border-color: rgb(247 144 29 / 24%);
}

.status-overlay__title {
    margin: 0.35rem 0 0;
    font-size: clamp(1.35rem, 2.7vw, 1.9rem);
    letter-spacing: -0.02em;
    color: var(--status-heading);
}

body.light-mode .status-overlay__title {
    color: #162544;
}

.status-overlay__close {
    border: 1px solid rgb(var(--qk-accent-blue-rgb) / 45%);
    background: linear-gradient(145deg, rgb(var(--qk-accent-blue-rgb) / 32%), rgb(var(--qk-accent-orange-rgb) / 18%));
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.status-overlay__close:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgb(var(--qk-accent-blue-rgb) / 30%);
}

body.light-mode .status-overlay__close {
    color: #14223d;
    border-color: rgb(var(--qk-accent-blue-rgb) / 36%);
    background: linear-gradient(145deg, rgb(255 255 255 / 96%), rgb(var(--qk-accent-blue-rgb) / 14%));
    box-shadow: 0 10px 22px rgb(15 23 42 / 14%);
}

.status-overlay__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.9rem 1.4rem 0;
    color: var(--status-text-muted);
}

body.light-mode .status-overlay__meta {
    color: #4a5a78;
}

.status-overlay__meta .status-chip {
    margin: 0;
}

.status-overlay__body {
    padding: 1.1rem 1.4rem 1.4rem;
    display: block;
}

.status-overlay__body p {
    margin: 0;
    line-height: 1.65;
    color: var(--status-text-muted);
}

body.light-mode .status-overlay__body p {
    color: #4a5a78;
}

.status-overlay__body [data-overlay-pane] {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.status-overlay__body .status-overlay__panel-card {
    border-radius: 20px;
    border: 1px solid rgb(211 224 255 / 14%);
    background: rgb(255 255 255 / 3%);
    padding: 1rem 1.1rem;
}

body.light-mode .status-overlay__body .status-overlay__panel-card {
    background: linear-gradient(180deg, rgb(255 255 255 / 96%), rgb(247 250 255 / 94%));
    border-color: rgb(15 23 42 / 10%);
    box-shadow: 0 10px 22px rgb(15 23 42 / 8%);
}

body.light-mode .status-overlay__body .status-overlay__panel-card {
    background: rgb(15 23 42 / 4%);
    border-color: rgb(15 23 42 / 12%);
}

.status-overlay__footer {
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0 1.4rem 1.4rem;
}

.status-overlay__footer .btn {
    border-radius: 999px;
}

.status-overlay__tabs {
    display: inline-flex;
    gap: 0.6rem;
}

.status-overlay__footer .btn.is-active {
    transform: translateY(-1px);
}

.status-overlay__footer .btn.btn-secondary.is-active {
    border-color: rgb(var(--qk-accent-blue-rgb) / 60%);
    box-shadow: 0 14px 26px rgb(var(--qk-accent-blue-rgb) / 14%);
}

.status-overlay__footer .btn.btn-secondary.is-active:hover {
    border-color: rgb(var(--qk-accent-blue-rgb) / 78%);
}

.status-overlay__footer .btn.btn-primary.is-active {
    border-color: rgb(var(--qk-accent-orange-rgb) / 62%);
    box-shadow: 0 14px 26px rgb(var(--qk-accent-orange-rgb) / 14%);
}

.status-overlay__footer .btn.btn-primary.is-active:hover {
    border-color: rgb(var(--qk-accent-orange-rgb) / 80%);
}

.status-overlay__contact .form-row {
    margin-top: 0.75rem;
}

.status-overlay__contact .form-input,
.status-overlay__contact .form-textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgb(211 224 255 / 16%);
    background: rgb(255 255 255 / 4%);
    color: var(--status-heading);
    padding: 0.85rem 1rem;
}

body.light-mode .status-overlay__contact .form-input,
body.light-mode .status-overlay__contact .form-textarea {
    border-color: rgb(15 23 42 / 14%);
    background: rgb(15 23 42 / 4%);
    color: #0f172a;
}

body.light-mode .status-overlay__contact .form-input::placeholder,
body.light-mode .status-overlay__contact .form-textarea::placeholder {
    color: rgb(74 90 120 / 70%);
}

.status-overlay__contact .form-input::placeholder,
.status-overlay__contact .form-textarea::placeholder {
    color: rgb(178 193 221 / 80%);
}

.status-overlay__hint {
    margin: 0.85rem 0 0;
    font-size: 0.9rem;
    color: var(--status-text-muted);
}

.status-overlay__hint.is-success {
    color: rgb(163 255 211 / 92%);
}

.status-overlay__hint.is-error {
    color: rgb(255 184 192 / 92%);
}

.status-overlay__contact-actions {
    margin-top: 0.95rem;
    display: flex;
    gap: 0.65rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.status-overlay__overview-actions {
    display: flex;
    justify-content: flex-end;
    padding-right: 0.2rem;
}

.status-overlay__inline-link {
    color: var(--std-link);
    text-decoration: none;
    font-weight: 650;
}

.status-overlay__inline-link:hover {
    text-decoration: underline;
}

@media (width <= 720px) {
    .status-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .status-health-panel {
        width: 100%;
        justify-items: start;
    }

    .status-pill-row {
        justify-content: flex-start;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .status-overall {
        align-self: flex-start;
    }
}
