/* Blixtflow – driftstatus (prefix st-): stor statusorb i hjälten, tjänster med 90 dagars staplar,
   planerat underhåll, händelser med tidslinje. Färgen följer läget: ok, degraded, partial, major, maintenance. */
.page-status { --st-ok: #16a34a; --st-degraded: #d4a400; --st-partial: #e8730c; --st-major: #dc2626; --st-maintenance: #7E45C9; --st-none: #d9d2e3; }

/* ==========================================================================
   Hjälten
   ========================================================================== */
.st-hero { --c: var(--st-ok); position: relative; isolation: isolate; overflow: clip; padding: calc(var(--header-h) + env(safe-area-inset-top) + 26px) 0 calc(var(--sheet-r) + 50px); color: #fff; background: var(--natt); }
.st-hero--degraded { --c: var(--st-degraded); }
.st-hero--partial { --c: var(--st-partial); }
.st-hero--major { --c: var(--st-major); }
.st-hero--maintenance { --c: var(--st-maintenance); }
.st-hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.st-hero__bg::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(200, 168, 242, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(200, 168, 242, .06) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(70% 80% at 75% 30%, #000, transparent 75%); mask-image: radial-gradient(70% 80% at 75% 30%, #000, transparent 75%); }
.st-hero__bg i { position: absolute; border-radius: 50%; filter: blur(70px); }
.st-hero__bg i:nth-child(1) { right: -8%; top: -20%; width: 44vw; height: 44vw; background: color-mix(in srgb, var(--c) 30%, transparent); }
.st-hero__bg i:nth-child(2) { left: -10%; bottom: -40%; width: 34vw; height: 34vw; background: rgba(155, 93, 229, .3); }
.st-hero__grid { display: grid; gap: 30px; align-items: center; }
@media (min-width: 960px) { .st-hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); } }
.st-title { max-width: 14ch; font-size: clamp(2.4rem, 5.8vw, 4.4rem); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
.st-lead { max-width: 560px; margin-top: 16px; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.6; color: var(--on-dark-muted); }
.st-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.st-meta > span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: .86rem; color: var(--on-dark-muted); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--on-dark-line); }
.st-meta time { font-weight: 700; color: #fff; }
.st-live i { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.motion .st-live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c); animation: st-ping 1.8s ease-out infinite; }
.st-demo { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 7px 14px; border-radius: 12px; font-size: .84rem; font-weight: 700; color: var(--natt); background: var(--gnista); }
.st-demo .ic { width: 15px; height: 15px; }
.st-orb { position: relative; display: grid; place-items: center; width: min(360px, 78vw); aspect-ratio: 1; margin-inline: auto; }
.st-orb__ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--c) 50%, transparent); opacity: .6; }
.st-orb__ring:nth-child(2) { inset: 14%; opacity: .8; }
.st-orb__ring:nth-child(3) { inset: 28%; border-style: dashed; }
.motion .st-orb__ring:nth-child(1) { animation: st-breathe 3.2s ease-in-out infinite; }
.motion .st-orb__ring:nth-child(2) { animation: st-breathe 3.2s .4s ease-in-out infinite; }
.motion .st-orb__ring:nth-child(3) { animation: st-spin 30s linear infinite; }
.st-orb__core { position: relative; display: grid; place-items: center; width: 34%; aspect-ratio: 1; border-radius: 50%; color: #fff; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 70%); box-shadow: 0 0 0 10px color-mix(in srgb, var(--c) 20%, transparent), 0 0 80px 10px color-mix(in srgb, var(--c) 45%, transparent); }
.st-orb__core .ic { width: 46%; height: 46%; stroke-width: 3; }
.st-orb__ok, .st-orb__bad { display: grid; place-items: center; width: 100%; height: 100%; }
.st-hero--ok .st-orb__bad, .st-hero:not(.st-hero--ok) .st-orb__ok { display: none; }
.st-bx { position: absolute; right: -6%; bottom: -8%; width: 38%; }
.st-hero:not(.st-hero--ok) .st-bx { display: none; }
@media (max-width: 599px) { .st-orb { width: 66vw; } }

/* ==========================================================================
   Tjänsterna
   ========================================================================== */
.st-body { padding-top: clamp(48px, 6vw, 80px); padding-bottom: calc(clamp(76px, 10vw, 136px) + var(--sheet-r)); }
.st-panel { max-width: 1040px; margin-inline: auto; overflow: hidden; border-radius: 28px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-2); }
.st-panel__h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line-2); }
.st-panel__h h2 { font-size: 1.3rem; font-weight: 800; }
.st-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); }
.st-legend span { display: inline-flex; align-items: center; gap: 6px; }
.st-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--st-none); }
.st-dot--ok { background: var(--st-ok); }
.st-dot--degraded { background: var(--st-degraded); }
.st-dot--partial { background: var(--st-partial); }
.st-dot--major { background: var(--st-major); }
.st-dot--maintenance { background: var(--st-maintenance); }
.st-comps li { padding: 18px 24px; border-bottom: 1px solid var(--line-2); transition: background-color .2s; }
.st-comps li:last-child { border-bottom: 0; }
.st-comps li:hover { background: #FCFAFE; }
.st-comp__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.st-comp__name { display: grid; min-width: 0; }
.st-comp__name b { font-size: 1rem; }
.st-comp__name small { font-size: .82rem; color: var(--muted); }
.st-pill { display: inline-flex; flex: none; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: .8rem; font-weight: 800; color: var(--st-ok); background: #e7f6ec; }
.st-pill--degraded { color: #7a5f00; background: #fff6cf; }
.st-pill--partial { color: #9a4a06; background: #ffead8; }
.st-pill--major { color: #b42318; background: #fde4e2; }
.st-pill--maintenance { color: var(--primar-ink); background: #F1E9FC; }
.st-bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 34px; margin-top: 12px; }
.st-bar { border-radius: 3px; background: var(--st-ok); opacity: .85; cursor: pointer; transition: transform .2s, opacity .2s; transform-origin: bottom; }
.st-bar:hover, .st-bar.is-on { opacity: 1; transform: scaleY(1.12); }
.st-bar--degraded { background: var(--st-degraded); }
.st-bar--partial { background: var(--st-partial); }
.st-bar--major { background: var(--st-major); }
.st-bar--maintenance { background: var(--st-maintenance); }
.st-bar--none { background: var(--st-none); }
.motion .st-panel.is-in .st-bar { animation: st-grow .5s var(--ease-out) backwards; animation-delay: calc(var(--d, 0) * 1ms); }
.st-comp__foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: .74rem; color: var(--muted); }
.st-comp__foot b { color: var(--ink-2); }
@media (max-width: 599px) {
  .st-comps li, .st-panel__h { padding: 16px; }
  .st-bars { grid-template-columns: repeat(45, minmax(0, 1fr)); height: 28px; }
  .st-bar:nth-child(-n+45) { display: none; }
}
.st-tip { position: fixed; z-index: 80; padding: 8px 12px; border-radius: 10px; font-size: .8rem; font-weight: 700; white-space: nowrap; color: #fff; background: var(--natt); box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .5); pointer-events: none; transform: translate(-50%, calc(-100% - 10px)); }
.st-tip[hidden] { display: none; }

/* ==========================================================================
   Underhåll och händelser
   ========================================================================== */
.st-cols { display: grid; gap: 16px; max-width: 1040px; margin: 18px auto 0; }
@media (min-width: 860px) { .st-cols { grid-template-columns: 1fr 1fr; align-items: start; } }
.st-box { padding: 22px 24px; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.st-box > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 1.1rem; font-weight: 800; }
.st-box > h2 .ic { width: 19px; height: 19px; color: var(--primar-ink); }
.st-maint, .st-inc { padding: 16px; border-radius: 18px; background: var(--ljus); }
.st-maint + .st-maint, .st-inc + .st-inc { margin-top: 10px; }
.st-maint { box-shadow: inset 3px 0 0 var(--st-maintenance); }
.st-maint__when { font-size: .8rem; font-weight: 800; color: var(--primar-ink); }
.st-maint h3, .st-inc h3 { margin-top: 6px; font-size: 1rem; font-weight: 800; }
.st-maint > p:not(.st-maint__when):not(.st-tags) { margin-top: 4px; font-size: .9rem; color: var(--ink-2); }
.st-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.st-tags small { font-size: .74rem; color: var(--muted); }
.st-tags span { padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.st-dur { margin-left: auto; }
.st-inc__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.st-inc__head time { font-size: .8rem; color: var(--muted); }
.st-tl { position: relative; display: grid; gap: 10px; margin-top: 12px; padding-left: 18px; }
.st-tl::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.st-tl li { position: relative; font-size: .88rem; }
.st-tl li::before { content: ""; position: absolute; left: -18px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--primar); box-shadow: 0 0 0 3px var(--ljus); }
.st-tl li:first-child::before { background: var(--st-ok); }
.st-tl b { font-weight: 800; }
.st-tl time { margin-left: 8px; font-size: .78rem; color: var(--muted); }
.st-tl p { margin-top: 2px; color: var(--ink-2); }
.st-empty { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 16px; font-weight: 700; color: var(--st-ok); background: #e7f6ec; }
.st-empty .ic { width: 18px; height: 18px; stroke-width: 3; }
.st-help { display: grid; gap: 16px; align-items: center; max-width: 1040px; margin: 18px auto 0; padding: clamp(22px, 3vw, 30px); border-radius: 26px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #5b2a80, var(--natt) 60%); box-shadow: var(--shadow-3); }
@media (min-width: 760px) { .st-help { grid-template-columns: 1fr auto; } }
.st-help h2 { font-size: 1.3rem; font-weight: 800; }
.st-help p { margin-top: 6px; color: var(--on-dark-muted); }
.st-help .btn .ic { width: 16px; height: 16px; }

@keyframes st-ping { to { transform: scale(2.8); opacity: 0; } }
@keyframes st-breathe { 0%, 100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.04); opacity: .9; } }
@keyframes st-spin { to { rotate: 360deg; } }
@keyframes st-grow { from { transform: scaleY(0); } }
