/* ==========================================================
   Status page – public styles (formexx-style)
   Dark navy, blue gradient accents, big bold type, glass header,
   reveal-on-scroll, mouse-follow spotlight cards.
   Colours come from admin → settings (CSS variables).
   ========================================================== */
:root {
    --accent: #0a5cff;
    --accent-2: #1ab8ff;
    --accent-rgb: 10, 92, 255;
    --bg: #050b1a;
    --card: #0a1226;
    --card-2: rgba(255, 255, 255, .03);
    --text: #e9edf6;
    --muted: #9aa3b5;
    --soft: rgba(255, 255, 255, .72);
    --border: rgba(255, 255, 255, .09);
    --up: #10b981;
    --degraded: #f59e0b;
    --down: #ef4444;
    --maint: #3b82f6;
    --nodata: rgba(255, 255, 255, .08);
    --radius: 16px;
    --shadow: 0 18px 40px rgba(0, 0, 0, .45);
    --grad: linear-gradient(135deg, var(--accent-2), var(--accent));
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-theme="light"] {
    --bg: #f4f6fb !important;
    --card: #ffffff !important;
    --card-2: rgba(5, 11, 26, .03);
    --text: #0b1220;
    --muted: #5b6478;
    --soft: rgba(5, 11, 26, .72);
    --border: rgba(5, 11, 26, .1);
    --nodata: rgba(5, 11, 26, .08);
    --shadow: 0 12px 30px rgba(5, 11, 26, .08);
}
@media (prefers-color-scheme: light) {
    [data-theme="auto"] {
        --bg: #f4f6fb !important;
        --card: #ffffff !important;
        --card-2: rgba(5, 11, 26, .03);
        --text: #0b1220;
        --muted: #5b6478;
        --soft: rgba(5, 11, 26, .72);
        --border: rgba(5, 11, 26, .1);
        --nodata: rgba(5, 11, 26, .08);
        --shadow: 0 12px 30px rgba(5, 11, 26, .08);
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}
::selection { background: rgba(var(--accent-rgb), .45); color: #fff; }
a { color: inherit; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.link { color: var(--accent-2); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Background: lines, glows, stars ---------- */
body.has-layers::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom, rgba(var(--accent-rgb), .05) 0 1px, transparent 1px 7px);
    mask-image: radial-gradient(ellipse at 50% 0, #000 0, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0, #000 0, transparent 70%);
    z-index: 0;
}
.bg-glow {
    position: absolute;
    top: -220px;
    right: -120px;
    width: 820px;
    height: 620px;
    background: radial-gradient(closest-side, rgba(var(--accent-rgb), .32), transparent);
    filter: blur(30px);
    pointer-events: none;
    z-index: 0;
}
.bg-glow-2 { top: 380px; left: -300px; right: auto; width: 700px; height: 600px; background: radial-gradient(closest-side, rgba(110, 60, 255, .16), transparent); }
.bg-stars { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: .7; }

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 12px rgba(var(--accent-rgb), .8); }

/* ---------- Announcement ---------- */
.announcement { position: relative; z-index: 2; padding: 10px 0; font-size: .92rem; text-align: center; background: var(--grad); color: #fff; }
.announcement-warning { background: linear-gradient(135deg, #fbbf24, #d97706); color: #1a1100; }
.announcement-danger { background: linear-gradient(135deg, #f87171, #b91c1c); }
.announcement-success { background: linear-gradient(135deg, #34d399, #047857); }

/* ---------- Header (glass, sticky) ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 14px 0;
    background: rgba(5, 11, 26, .35);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: background .3s, border-color .3s, padding .3s;
}
.site-header.scrolled { background: rgba(5, 11, 26, .78); border-bottom-color: var(--border); padding: 8px 0; }
[data-theme="light"] .site-header { background: rgba(244, 246, 251, .6); }
[data-theme="light"] .site-header.scrolled { background: rgba(244, 246, 251, .9); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.brand img { display: block; max-width: 320px; max-height: 120px; object-fit: contain; transition: transform .3s var(--ease), max-height .3s var(--ease); }
.brand:hover img { transform: scale(1.04); }
.site-header.scrolled .brand img { max-height: 48px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); box-shadow: 0 6px 20px rgba(var(--accent-rgb), .45); position: relative; flex-shrink: 0; }
.brand-mark::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #fff; opacity: .95; }

.site-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-pill { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255, 255, 255, .03); }
.nav-pill a, .nav-link { text-decoration: none; color: var(--soft); padding: 7px 14px; border-radius: 999px; font-size: .92rem; font-weight: 500; transition: color .2s, background .2s; }
.nav-link { border-radius: 8px; }
.nav-pill a:hover, .nav-link:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav-pill a.active { color: #fff; background: rgba(var(--accent-rgb), .22); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .45); }
[data-theme="light"] .nav-pill a.active { color: var(--text); }
.site-nav .btn { margin-left: 6px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 10px; width: 44px; height: 40px; cursor: pointer; padding: 0 11px; flex-direction: column; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s; }
.nav-open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; padding: 12px 20px; border-radius: 10px; font: inherit; font-weight: 600; color: #fff; text-decoration: none; background: var(--grad); box-shadow: 0 8px 22px rgba(var(--accent-rgb), .35); transition: filter .2s, box-shadow .2s, transform .25s var(--ease); white-space: nowrap; }
.btn:hover { filter: brightness(1.1); box-shadow: 0 12px 30px rgba(var(--accent-rgb), .5); }
.btn-ghost { background: rgba(255, 255, 255, .04); border: 1px solid var(--border); color: var(--text); box-shadow: none; }
.btn-ghost:hover { border-color: rgba(var(--accent-rgb), .6); box-shadow: none; }
.btn-sm { padding: 9px 16px; font-size: .88rem; }

/* ---------- Main / sections ---------- */
.main { flex: 1; padding-top: 10px; padding-bottom: 80px; }
.card { background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%), var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.empty { padding: 28px; text-align: center; }
.section { margin-top: 72px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head .section-title { margin-bottom: 0; }
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 750; margin: 0 0 22px; letter-spacing: -.03em; line-height: 1.1; }
.kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: .74rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: rgba(255, 255, 255, .65); }
[data-theme="light"] .kicker { color: var(--muted); }
.kicker span { width: 34px; height: 1px; background: var(--grad); display: inline-block; flex-shrink: 0; }
.lead { font-size: 1.08rem; color: var(--muted); margin: 0; }

.notice { margin: 16px 0 0; padding: 14px 18px; border-radius: 12px; border: 1px solid rgba(16, 185, 129, .35); background: rgba(16, 185, 129, .1); }
.notice-bad { border-color: rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .1); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; gap: 40px; padding: 70px 0 40px; }
.hero h1 { margin: 0 0 18px; font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 800; letter-spacing: -.045em; line-height: .98; }
.hero-warn .grad { background: linear-gradient(135deg, #fcd34d, #f59e0b); -webkit-background-clip: text; background-clip: text; }
.hero-bad .grad { background: linear-gradient(135deg, #fca5a5, #ef4444); -webkit-background-clip: text; background-clip: text; }
.hero-live { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255, 255, 255, .03); font-size: .88rem; }
.live-dot { --lc: var(--up); width: 9px; height: 9px; border-radius: 50%; background: var(--lc); animation: livepulse 1.8s infinite; }
.hero-warn .live-dot { --lc: var(--degraded); }
.hero-bad .live-dot { --lc: var(--down); }
.hero-maint .live-dot { --lc: var(--maint); }
.live-count { color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lc) 60%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Radar visual */
.hero-visual { display: grid; place-items: center; }
.radar { --c: var(--up); position: relative; width: min(360px, 80vw); aspect-ratio: 1; border-radius: 50%; transform: perspective(900px) rotateX(58deg); }
.hero-warn .radar { --c: var(--degraded); }
.hero-bad .radar { --c: var(--down); }
.hero-maint .radar { --c: var(--maint); }
.radar .ring { position: absolute; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 18%, transparent), inset 0 0 30px color-mix(in srgb, var(--c) 10%, transparent); }
.radar .r1 { inset: 0; background: radial-gradient(circle, rgba(var(--accent-rgb), .12), transparent 70%); }
.radar .r2 { inset: 18%; animation: spin 18s linear infinite; border-style: dashed; }
.radar .r3 { inset: 36%; animation: spin 10s linear infinite reverse; }
.radar .sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, color-mix(in srgb, var(--c) 45%, transparent), transparent 22%); animation: spin 4s linear infinite; }
.radar .core { position: absolute; left: 50%; top: 50%; width: 16%; height: 16%; transform: translate(-50%, -50%); border-radius: 50%; background: var(--c); box-shadow: 0 0 40px var(--c), 0 0 90px color-mix(in srgb, var(--c) 60%, transparent); animation: corepulse 2.4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes corepulse { 50% { transform: translate(-50%, -50%) scale(1.18); } }

/* Key figures */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg); padding: 22px 24px; position: relative; transition: background .3s; }
.stat:hover { background: color-mix(in srgb, var(--bg) 85%, rgb(var(--accent-rgb))); }
.stat-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.stat strong { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat small { margin-left: 6px; color: var(--muted); font-weight: 600; font-size: 1rem; }


/* ---------- Spotlight cards (mouse-follow glow) ---------- */
.spot { position: relative; isolation: isolate; }
.spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), .13), transparent 60%); }
.spot::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px; opacity: 0; transition: opacity .3s; background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), .7), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.spot:hover::before, .spot:hover::after { opacity: 1; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Tools: search + expand ---------- */
.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255, 255, 255, .03); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .22); }
.search input { border: 0; background: none; color: var(--text); font: inherit; font-size: .92rem; padding: 10px 0; width: 210px; min-width: 0; outline: none; }

/* ---------- Groups ---------- */
.groups { display: flex; flex-direction: column; gap: 18px; }
.group-head { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; cursor: pointer; border-radius: var(--radius); }
.group-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.group-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; letter-spacing: -.01em; }
.group-title .count { font-size: .74rem; font-weight: 700; color: var(--muted); background: var(--card-2); border: 1px solid var(--border); border-radius: 20px; padding: 1px 9px; }
.chev { transition: transform .35s var(--ease); color: var(--muted); }
.group.collapsed .chev { transform: rotate(-90deg); }
.group-desc { margin: -12px 24px 10px 50px; }
.group-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s var(--ease); border-top: 1px solid var(--border); }
.group-body:first-child { border-top: 0; }
.group-inner { overflow: hidden; min-height: 0; }
.group.collapsed .group-body { grid-template-rows: 0fr; border-top-color: transparent; }
.group.collapsed .group-desc { display: none; }
.group[hidden], .monitor[hidden] { display: none; }

.pill { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; font-weight: 600; white-space: nowrap; }
.pill i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.pill-operational, .st-operational { color: var(--up); }
.pill-degraded, .st-degraded, .pill-partial, .st-partial { color: var(--degraded); }
.pill-down, .st-down { color: var(--down); }
.pill-maintenance, .st-maintenance { color: var(--maint); }
.pill-unknown, .st-unknown { color: var(--muted); }

/* ---------- Monitor ---------- */
.monitor { padding: 18px 24px 16px; transition: background .2s; }
.monitor + .monitor { border-top: 1px solid var(--border); }
.monitor:hover { background: rgba(255, 255, 255, .02); }
.monitor.open { background: rgba(var(--accent-rgb), .05); }
.monitor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; cursor: pointer; border-radius: 8px; outline: none; }
.monitor-head:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.monitor-name { display: flex; align-items: center; gap: 9px; min-width: 0; flex-wrap: wrap; }
.monitor-name strong { font-weight: 650; }
.target { font-size: .82rem; font-family: Menlo, Consolas, monospace; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.dot-operational { background: var(--up); box-shadow: 0 0 0 4px color-mix(in srgb, var(--up) 20%, transparent); }
.dot-degraded, .dot-partial { background: var(--degraded); box-shadow: 0 0 0 4px color-mix(in srgb, var(--degraded) 20%, transparent); }
.dot-down { background: var(--down); box-shadow: 0 0 0 4px color-mix(in srgb, var(--down) 22%, transparent); animation: blink 1.4s infinite; }
.dot-maintenance { background: var(--maint); }
@keyframes blink { 50% { opacity: .45; } }
.info { width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--border); display: inline-grid; place-items: center; font-size: .7rem; color: var(--muted); cursor: help; }
.monitor-meta { display: flex; align-items: center; gap: 12px; font-size: .88rem; }
.pct { color: var(--muted); font-variant-numeric: tabular-nums; }
.status-text { font-weight: 650; }
.more { color: var(--muted); transition: transform .35s var(--ease); flex-shrink: 0; }
.monitor.open .more { transform: rotate(180deg); color: var(--accent-2); }
.chip { font-size: .78rem; padding: 3px 10px; border-radius: 20px; background: var(--card-2); border: 1px solid var(--border); color: var(--muted); font-variant-numeric: tabular-nums; }

.bars { display: flex; gap: 2px; height: 34px; }
.bar { flex: 1 1 0; min-width: 0; border-radius: 3px; background: var(--nodata); transform-origin: bottom; cursor: pointer; transition: transform .15s, filter .15s; }
.bar:hover { transform: scaleY(1.18); filter: brightness(1.3); }
.js .bars .bar { transform: scaleY(0); }
.js .bars.grown .bar { transform: scaleY(1); transition: transform .5s var(--ease) calc(var(--i, 0) * 6ms); }
.js .bars.grown .bar:hover { transform: scaleY(1.18); transition-delay: 0s; }
.bar-up { background: var(--up); }
.bar-degraded { background: color-mix(in srgb, var(--up) 55%, var(--degraded)); }
.bar-partial { background: var(--degraded); }
.bar-down { background: var(--down); }
.bar-maint { background: var(--maint); }
.bars-legend { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: .78rem; }
.bars-legend .line { flex: 1; height: 1px; background: var(--border); }
.legend-mobile { display: none; }

/* Details panel */
.details { margin-top: 16px; padding: 18px; border-radius: 14px; background: rgba(5, 11, 26, .55); border: 1px solid var(--border); animation: detailsIn .4s var(--ease); }
[data-theme="light"] .details { background: var(--card-2); }
@keyframes detailsIn { from { opacity: 0; transform: translateY(-6px); } }
.d-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.d-stat { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--border); }
.d-stat span { display: block; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.d-stat strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.d-chart { margin-top: 16px; }
.d-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .8rem; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.d-tabs { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 999px; }
.d-tabs button { all: unset; cursor: pointer; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.d-tabs button.on { background: rgba(var(--accent-rgb), .22); color: var(--text); }
.d-chart svg { display: block; width: 100%; height: 130px; overflow: visible; }
.d-chart .path { stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: draw 1.4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.d-foot { margin-top: 10px; font-size: .8rem; color: var(--muted); }
.d-loading { height: 80px; border-radius: 10px; background: linear-gradient(90deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Tooltip ---------- */
.tooltip { position: fixed; z-index: 70; pointer-events: none; background: rgba(15, 26, 51, .92); backdrop-filter: blur(8px); color: #e9edf6; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; padding: 9px 12px; font-size: .8rem; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; max-width: 260px; }
.tooltip.show { opacity: 1; transform: none; }
.tooltip b { display: block; margin-bottom: 3px; font-size: .84rem; }
.tooltip span { display: block; color: #b6bfd2; }

/* ---------- Incidents ---------- */
.incident { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--degraded); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 14px; box-shadow: var(--shadow); }
.incident.impact-major, .incident.impact-critical { border-left-color: var(--down); }
.incident.impact-none { border-left-color: var(--muted); }
.incident.st-resolved { border-left-color: var(--up); }
.incident.maint { border-left-color: var(--maint); }
.incident.maint.done { border-left-color: var(--up); opacity: .8; }
.incident-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.incident h3 { margin: 0 0 6px; font-size: 1.06rem; letter-spacing: -.01em; }
.incident h3 a { text-decoration: none; }
.incident h3 a .arrow { display: inline-block; color: var(--accent-2); transition: transform .25s var(--ease); }
.incident h3 a:hover { color: var(--accent-2); }
.incident h3 a:hover .arrow { transform: translateX(4px); }
.incident p { margin: 6px 0 0; }
.badge { font-size: .74rem; font-weight: 650; padding: 3px 10px; border-radius: 20px; white-space: nowrap; border: 1px solid; }
.badge-investigating { color: var(--down); border-color: color-mix(in srgb, var(--down) 40%, transparent); background: color-mix(in srgb, var(--down) 12%, transparent); }
.badge-identified { color: var(--degraded); border-color: color-mix(in srgb, var(--degraded) 40%, transparent); background: color-mix(in srgb, var(--degraded) 12%, transparent); }
.badge-monitoring { color: var(--accent-2); border-color: rgba(var(--accent-rgb), .4); background: rgba(var(--accent-rgb), .12); }
.badge-resolved { color: var(--up); border-color: color-mix(in srgb, var(--up) 40%, transparent); background: color-mix(in srgb, var(--up) 12%, transparent); }
.badge-maint { color: var(--maint); border-color: color-mix(in srgb, var(--maint) 40%, transparent); background: color-mix(in srgb, var(--maint) 12%, transparent); }

/* Sub page hero */
.page-hero { padding: 64px 0 10px; }
.page-hero h1 { margin: 0 0 12px; font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; }
.page-head { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin: 0; flex-wrap: wrap; }
.pager { display: flex; gap: 8px; }

.incident-detail { padding: 28px; margin-top: 10px; }
.incident-detail h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -.03em; }
.timeline { list-style: none; margin: 26px 0 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 18px; padding: 18px 0; border-top: 1px solid var(--border); }
.tl-status { font-weight: 700; font-size: .92rem; }
.tl-investigating .tl-status { color: var(--down); }
.tl-identified .tl-status { color: var(--degraded); }
.tl-monitoring .tl-status { color: var(--accent-2); }
.tl-resolved .tl-status { color: var(--up); }
.tl-body p { margin: 0 0 4px; }

/* ---------- Subscribe ---------- */
.subscribe { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px; flex-wrap: wrap; }
.subscribe h3 { margin: 0 0 4px; font-size: 1.3rem; letter-spacing: -.02em; }
.subscribe p { margin: 0; }
.subscribe-form { display: flex; gap: 8px; flex: 1; min-width: 260px; max-width: 440px; }
.subscribe-form input[type=email] { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255, 255, 255, .03); color: var(--text); font: inherit; }
.subscribe-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .25); }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 0; font-size: .9rem; color: var(--muted); position: relative; z-index: 1; background: linear-gradient(to bottom, rgba(var(--accent-rgb), .04), rgba(var(--accent-rgb), .08)); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 40px; }
.footer-brand .brand { font-size: 1.2rem; color: var(--text); margin-bottom: 14px; }
.footer-brand .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
.footer-brand .brand-mark::after { inset: 10px; }
.footer-brand p { margin: 0 0 12px; max-width: 340px; line-height: 1.65; }
.footer-mail { display: inline-block; color: var(--text); font-weight: 700; text-decoration: none; margin-bottom: 6px; }
.footer-mail:hover { color: var(--accent-2); }
.footer-note { color: var(--soft); font-size: .84rem; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { margin: 0 0 6px; color: var(--text); font-size: .74rem; text-transform: uppercase; letter-spacing: .2em; font-weight: 750; }
.footer-col a { text-decoration: none; width: fit-content; transition: color .2s, transform .2s; overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--text); transform: translateX(3px); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 20px 0 28px; border-top: 1px solid var(--border); font-size: .84rem; }
.powered a { color: var(--accent-2); text-decoration: none; }
.powered a:hover { text-decoration: underline; }

/* ---------- Floating: to-top, toasts, cursor ---------- */
.to-top { position: fixed; left: 22px; bottom: 22px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: rgba(10, 18, 38, .8); backdrop-filter: blur(8px); color: var(--accent-2); display: grid; place-items: center; cursor: pointer; opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease), border-color .2s, box-shadow .2s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--accent); box-shadow: 0 0 20px rgba(var(--accent-rgb), .4); }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; min-width: 260px; max-width: 360px; padding: 14px 16px; border-radius: 12px; background: rgba(15, 26, 51, .95); backdrop-filter: blur(10px); border: 1px solid var(--border); border-left: 3px solid var(--accent); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); color: #e9edf6; font-size: .9rem; animation: toastIn .45s var(--ease); }
.toast.out { animation: toastOut .35s var(--ease) forwards; }
.toast b { display: block; margin-bottom: 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

.cursor-ring { position: fixed; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1.5px solid rgba(var(--accent-rgb), .7); pointer-events: none; z-index: 90; opacity: 0; transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), opacity .3s, background .25s; }
.cursor-ring::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: var(--accent-2); }
.cursor-ring.on { opacity: 1; }
.cursor-ring.hover { width: 54px; height: 54px; margin: -27px 0 0 -27px; background: rgba(var(--accent-rgb), .1); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding-top: 40px; gap: 10px; }
    .hero-visual { order: -1; }
    .radar { width: min(240px, 60vw); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .container { padding: 0 16px; }
    .nav-toggle { display: flex; }
    .site-nav { display: none; position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; flex-direction: column; align-items: stretch; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); }
    .nav-open .site-nav { display: flex; animation: detailsIn .3s var(--ease); }
    .nav-pill { flex-direction: column; border-radius: 12px; }
    .nav-pill a, .nav-link { border-radius: 8px; }
    .site-nav .btn { margin: 6px 0 0; }
    .brand { font-size: 1.15rem; }
    .brand img { max-width: 200px; max-height: 64px; }
    .section { margin-top: 52px; }
    .monitor, .group-head { padding-left: 16px; padding-right: 16px; }
    .bars .bar:nth-last-child(n+31) { display: none; }
    .legend-full { display: none; }
    .legend-mobile { display: inline; }
    .timeline li { grid-template-columns: 1fr; gap: 4px; }
    .monitor-meta .pct { display: none; }
    .group-desc { margin-left: 16px; }
    .d-stats { grid-template-columns: repeat(2, 1fr); }
    .tools, .search { width: 100%; }
    .search input { width: 100%; }
    .tools .btn { width: 100%; }
    .to-top { left: 14px; bottom: 14px; }
    .toasts { left: 14px; right: 14px; }
    .toast { max-width: none; }
}
@media (hover: none), (pointer: coarse) { .cursor-ring { display: none; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
    .js .bars .bar { transform: none; }
    html { scroll-behavior: auto; }
}

/* ---------- Page switch curtain (formexx-style) ---------- */
body::after { content: ""; position: fixed; inset: 0; z-index: 9998; pointer-events: none; background: radial-gradient(700px 400px at 50% 100%, rgba(var(--accent-rgb), .28), transparent), var(--bg); clip-path: inset(100% 0 0 0); transition: clip-path .55s cubic-bezier(.16, 1, .3, 1); }
html.pt-enter body::after { clip-path: inset(0 0 0 0); transition: none; }
html.pt-leave body::after { clip-path: inset(0 0 0 0); pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { body::after { display: none; } }
