/* ==========================================================================
   FastJoins — status page
   ========================================================================== */
:root { --st-up: var(--green); --st-degraded: var(--amber); --st-down: var(--red); --st-none: var(--surface-3); }

.st-live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.st-pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.st-pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--green); animation: stPing 2s cubic-bezier(0.2, 0, 0, 1) infinite; }
.st-live.refresh .st-pulse { background: var(--accent); }
@keyframes stPing { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

/* Banner */
.st-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    margin-bottom: 16px;
    border-radius: 6px;
    border: 1px solid;
    --c: var(--st-up);
    border-color: color-mix(in srgb, var(--c) 40%, transparent);
    background: linear-gradient(110deg, color-mix(in srgb, var(--c) 16%, var(--surface)) 0%, var(--surface) 70%);
    transition: border-color 0.4s, background 0.4s;
}
.st-banner[data-state="degraded"] { --c: var(--st-degraded); }
.st-banner[data-state="outage"] { --c: var(--st-down); }
.st-banner-ico { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--c); color: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent); }
.st-banner-ico svg { width: 24px; height: 24px; }
.st-banner .i-warn { display: none; }
.st-banner:not([data-state="operational"]) .i-ok { display: none; }
.st-banner:not([data-state="operational"]) .i-warn { display: block; }
.st-banner h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.st-banner p { color: var(--text-2); font-size: 14px; margin-top: 2px; }

/* Active incidents */
.st-active { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.st-incident { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 6px; border: 1px solid; --c: var(--st-degraded); border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 9%, var(--surface)); }
.st-anim .st-incident { animation: stIn 0.4s cubic-bezier(0.2, 0, 0, 1); }
.st-incident.down { --c: var(--st-down); }
.st-incident .dot { width: 10px; height: 10px; flex-shrink: 0; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); animation: stBlink 1.6s ease-in-out infinite; }
.st-incident strong { font-weight: 600; }
.st-incident small { display: block; color: var(--text-2); font-size: 13px; }
.st-incident .since { margin-left: auto; font-size: 13px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
@keyframes stBlink { 50% { opacity: 0.45; } }
@keyframes stIn { from { opacity: 0; transform: translateY(-6px); } }

.st-card { margin-bottom: 16px; }

/* Components */
.st-comp { padding: 16px 20px; }
.st-comp + .st-comp { border-top: 1px solid var(--border); }
.st-comp-top { display: flex; align-items: center; gap: 12px; }
.st-comp-name { font-weight: 600; }
.st-comp-desc { font-size: 13px; color: var(--text-3); }
.st-comp-meta { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 4px; font-size: 12px; font-weight: 600; --c: var(--st-up); color: color-mix(in srgb, var(--c) 70%, #fff); background: color-mix(in srgb, var(--c) 15%, transparent); }
.st-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.st-pill.degraded { --c: var(--st-degraded); }
.st-pill.down { --c: var(--st-down); }
.st-pill.idle { --c: var(--st-degraded); }
.st-pill.off { --c: var(--text-3); }

.st-bars { display: flex; gap: 3px; height: 30px; margin-top: 12px; }
.st-bars span { position: relative; flex: 1; border-radius: 2px; background: var(--st-none); transform-origin: bottom; transition: filter 0.15s, background-color 0.4s; }
/* bars grow in on the first render only (not on every live refresh) */
.st-anim .st-bars span { animation: stGrow 0.5s cubic-bezier(0.2, 0, 0, 1) both; animation-delay: calc(var(--i) * 12ms); }
.st-bars span.up { background: var(--st-up); }
.st-bars span.degraded { background: var(--st-degraded); }
.st-bars span.down { background: var(--st-down); }
.st-bars span:hover { filter: brightness(1.3); }
.st-bars span[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    padding: 5px 9px;
    border-radius: 6px;
    background: var(--surface-3);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
}
.st-bars-foot { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--text-3); }
@keyframes stGrow { from { transform: scaleY(0.2); opacity: 0; } }

/* Shards */
.st-shards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.st-shard { position: relative; padding: 14px; border-radius: 6px; background: var(--bg-raised); border: 1px solid var(--border); --c: var(--st-up); transition: border-color 0.3s, transform 0.25s cubic-bezier(0.2, 0, 0, 1); }
.st-shard:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.st-shard.degraded { --c: var(--st-degraded); }
.st-shard.down { --c: var(--st-down); border-color: color-mix(in srgb, var(--st-down) 50%, transparent); }
.st-shard-top { display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.st-shard-top i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.st-shard dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin-top: 10px; font-size: 13px; }
.st-shard dt { color: var(--text-3); }
.st-shard dd { text-align: right; font-variant-numeric: tabular-nums; }
.st-ping { display: block; height: 4px; margin-top: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.st-ping span { display: block; height: 100%; border-radius: inherit; background: var(--c); transition: width 0.6s cubic-bezier(0.2, 0, 0, 1); }

/* Partners + history */
.st-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.st-grid .st-card { margin-bottom: 0; }
.st-partner { display: flex; align-items: center; gap: 12px; padding: 12px 20px; }
.st-partner + .st-partner { border-top: 1px solid var(--border); }
.st-partner img { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; }
.st-partner-main { flex: 1; min-width: 0; }
.st-partner-main strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-partner-main small { color: var(--text-3); font-size: 12px; }
.st-partner .st-bars { height: 18px; margin-top: 6px; gap: 2px; }
.st-partner .st-bars span { border-radius: 2px; }
.st-partner .st-pill { flex-shrink: 0; }

.st-event { display: flex; gap: 12px; padding: 12px 20px; }
.st-event + .st-event { border-top: 1px solid var(--border); }
.st-event .dot { margin-top: 6px; flex-shrink: 0; background: var(--text-3); }
.st-event.down .dot { background: var(--st-down); }
.st-event.degraded .dot { background: var(--st-degraded); }
.st-event strong { font-weight: 600; font-size: 14px; }
.st-event small { display: block; font-size: 12px; color: var(--text-3); }
.st-empty { padding: 28px 20px; text-align: center; color: var(--text-3); font-size: 14px; }
.st-empty b { display: block; color: var(--green); font-size: 20px; margin-bottom: 4px; }

@media (max-width: 900px) {
    .st-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .st-banner { padding: 18px; }
    .st-banner h2 { font-size: 17px; }
    .st-comp { padding: 14px 16px; }
    .st-comp-top { flex-wrap: wrap; }
    .st-comp-meta { margin-left: 0; width: 100%; justify-content: space-between; }
    .st-bars { gap: 2px; }
    .st-shards { grid-template-columns: repeat(2, 1fr); }
    .st-incident { flex-wrap: wrap; }
    .st-incident .since { margin-left: 24px; }
}

/* Square corners, like the other dashboard pages + key figures */
.st-card { border-radius: 6px; }
.st-kpis { margin-bottom: 14px; }
#k-incidents-card.bad { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); background: color-mix(in srgb, var(--red) 7%, var(--surface)); }
#k-incidents-card.bad strong { color: #ff8c9c; }
.st-banner-ico { border-radius: 6px; }