/* status.pivotraai.net — tokens match the Figma file "Kymns" (Kymns / Color). */
:root {
  --bg: #F6F7F9; --surface: #FFFFFF; --surface2: #F1F3F7; --border: #E4E8EF;
  --text: #0B1220; --muted: #556275; --faint: #667085; --accent: #0080AD; --on-accent: #FFFFFF;
  --ok: #12A150; --warn: #C77700; --bad: #D92D20; --maint: #4F5FE8; --nodata: #C9CFD9;
  --shadow: 0 12px 32px rgba(11, 18, 32, .12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070B14; --surface: #0C1220; --surface2: #111A2C; --border: #1C2638;
    --text: #E9EEF6; --muted: #8B97AC; --faint: #7D8AA1; --accent: #00D4FF; --on-accent: #041018;
    --ok: #2BD67B; --warn: #F5B324; --bad: #FF5A4E; --maint: #8C9BFF; --nodata: #2A3447;
    --shadow: 0 12px 32px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070B14; --surface: #0C1220; --surface2: #111A2C; --border: #1C2638;
  --text: #E9EEF6; --muted: #8B97AC; --faint: #7D8AA1; --accent: #00D4FF; --on-accent: #041018;
  --ok: #2BD67B; --warn: #F5B324; --bad: #FF5A4E; --maint: #8C9BFF; --nodata: #2A3447;
  --shadow: 0 12px 32px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.mono { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h2 { font-size: 22px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .sm { font-size: 13px; }
.sr, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { max-width: 1152px; margin: 0 auto; padding: 0 16px 64px; }
main { display: flex; flex-direction: column; gap: 32px; }
main > div:empty { display: none; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }

/* nav */
.nav { display: flex; align-items: center; gap: 24px; padding: 24px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand img { display: block; }
.brand-name { font-size: 17px; font-weight: 600; }
.chip { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface2); border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px; }
.links { display: flex; gap: 24px; }
.links a { color: var(--muted); font-weight: 500; }
.links a:hover { color: var(--text); text-decoration: none; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 8px; }
.seg button { font: 500 12px "Geist Mono", monospace; color: var(--faint); background: none; border: 0; padding: 4px 9px; border-radius: 6px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface2); color: var(--text); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px Geist, sans-serif; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn[disabled] { opacity: .6; cursor: progress; }
.link { background: none; border: 0; color: var(--accent); font: 500 13px Geist, sans-serif; cursor: pointer; padding: 0; }

/* notices */
.notice { padding: 12px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--text); }
.notice.good { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }

/* hero */
.hero { padding: 36px; display: flex; flex-direction: column; gap: 14px; --tone: var(--ok);
  background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 10%, transparent), transparent 55%), var(--surface); }
.hero-top { display: flex; align-items: center; gap: 14px; }
.hero h1 { font-size: 32px; font-weight: 600; }
.pulse { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--tone) 16%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 35%, transparent); }
.pulse span { width: 12px; height: 12px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone) 60%, transparent); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.kpi { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.kpi .l { font: 500 10px "Geist Mono", monospace; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.kpi .v { font: 600 22px "Geist Mono", monospace; }
.kpi .d { font-size: 11px; color: var(--muted); }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); }
.t-operational, .t-ok, .t-resolved, .t-completed { --tone: var(--ok); }
.t-degraded, .t-warn, .t-minor, .t-identified { --tone: var(--warn); }
.t-down, .t-bad, .t-major, .t-critical, .t-partial_outage, .t-major_outage { --tone: var(--bad); }
.t-maintenance, .t-maint, .t-scheduled, .t-in_progress { --tone: var(--maint); }
.t-nodata, .t-investigating { --tone: var(--faint); }
.t-monitoring { --tone: var(--accent); }

/* announcements (active incident / maintenance) */
.announce { display: flex; overflow: hidden; }
.announce::before { content: ""; width: 4px; flex: none; background: var(--tone); }
.announce .in { padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.announce .top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.announce h3 { font-size: 16px; font-weight: 600; }
.announce .when { margin-left: auto; font: 500 12px "Geist Mono", monospace; color: var(--tone); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; }
.tag { background: var(--surface2); color: var(--muted); font-weight: 500; padding: 3px 8px; border-radius: 6px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* components */
.section-head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head > div:first-child { margin-right: auto; display: flex; flex-direction: column; gap: 4px; }
.legend { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 14px; border-radius: 2px; background: var(--tone); }
.group { margin-bottom: 16px; }
.group > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 16px 24px; cursor: pointer; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary .chev { color: var(--faint); transition: transform .15s; font-size: 11px; }
.group[open] > summary .chev { transform: rotate(90deg); }
.group > summary b { font-size: 15px; font-weight: 600; }
.group > summary .count { font: 12px "Geist Mono", monospace; color: var(--faint); margin-right: auto; }
.comp { border-top: 1px solid var(--border); padding: 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.comp-top { display: flex; align-items: baseline; gap: 10px; }
.comp-top .n { font-weight: 500; }
.comp-top .desc { font-size: 12px; color: var(--faint); margin-right: auto; }
.comp-top .up { font: 12px "Geist Mono", monospace; color: var(--muted); }
.comp-top .st { font-size: 13px; font-weight: 500; color: var(--tone); }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 30px; border-radius: 4px; }
.bars i { border-radius: 2px; background: var(--tone); opacity: .9; transition: opacity .1s, transform .1s; }
.bars i.t-ok { opacity: .85; }
.bars i.t-nodata { background: var(--nodata); opacity: 1; }
.bars i.on { outline: 1.5px solid var(--text); outline-offset: 1px; opacity: 1; }
.bars:hover i:not(.on) { opacity: .6; }
.axis { display: flex; align-items: center; gap: 8px; font: 11px "Geist Mono", monospace; color: var(--faint); }
.axis hr { flex: 1; border: 0; border-top: 1px solid var(--border); margin: 0; }
.axis b { color: var(--muted); font-weight: 500; }

/* tooltip */
.tip { position: fixed; z-index: 20; max-width: 280px; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 12px; pointer-events: none; display: flex; flex-direction: column; gap: 6px; }
.tip .d { font: 500 11px "Geist Mono", monospace; color: var(--faint); text-transform: uppercase; }
.tip .s { font-weight: 600; font-size: 13px; color: var(--tone); display: flex; align-items: center; gap: 8px; }
.tip .s::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }

/* charts */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.chart { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.chart-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.chart-top .t { color: var(--muted); font-weight: 500; margin-right: auto; }
.chart-top .k { display: flex; align-items: center; gap: 6px; font: 12px "Geist Mono", monospace; color: var(--muted); }
.chart-top .k i { width: 10px; height: 3px; border-radius: 2px; background: var(--c); }
.big { display: flex; align-items: baseline; gap: 6px; }
.big b { font: 600 30px "Geist Mono", monospace; }
.big span { font: 13px "Geist Mono", monospace; color: var(--muted); }
.plot { position: relative; }
.plot svg { display: block; width: 100%; height: 170px; overflow: visible; }
.plot .grid { stroke: var(--border); }
.plot .xl { display: flex; justify-content: space-between; font: 11px "Geist Mono", monospace; color: var(--faint); margin-top: 8px; }
.plot .cross { stroke: var(--muted); stroke-opacity: .5; }
.empty { color: var(--faint); font-size: 13px; padding: 40px 0; text-align: center; }
.regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.region { padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; border-left: 1px solid var(--border); }
.region:first-child { border-left: 0; }
.region .top { display: flex; align-items: center; gap: 8px; }
.region .top .code { font: 500 11px "Geist Mono", monospace; color: var(--muted); background: var(--surface2); padding: 2px 6px; border-radius: 5px; }
.region .top .city { font-weight: 500; font-size: 13px; margin-right: auto; }
.region .top .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }
.region .ms b { font: 600 22px "Geist Mono", monospace; } .region .ms span { font: 12px "Geist Mono", monospace; color: var(--muted); }
.region svg { width: 100%; height: 28px; display: block; }

/* incidents */
.day { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 20px 24px; border-top: 1px solid var(--border); }
.day:first-child { border-top: 0; }
.day > .date { font: 500 12px "Geist Mono", monospace; color: var(--faint); text-transform: uppercase; padding-top: 2px; }
.inc { display: flex; flex-direction: column; gap: 12px; }
.inc + .inc { margin-top: 18px; }
.inc > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; flex-wrap: wrap; }
.inc > summary::-webkit-details-marker { display: none; }
.inc > summary .chev { color: var(--faint); font-size: 11px; transition: transform .15s; }
.inc[open] > summary .chev { transform: rotate(90deg); }
.inc > summary h3 { font-size: 15px; font-weight: 600; margin-right: auto; }
.inc .meta { display: flex; gap: 16px; flex-wrap: wrap; font: 12px "Geist Mono", monospace; color: var(--muted); }
.impact { position: relative; height: 8px; border-radius: 4px; background: var(--surface2); overflow: hidden; }
.impact i { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--tone); }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 10px 1fr; gap: 14px; padding-bottom: 14px; position: relative; }
.tl li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--tone); margin-top: 5px; }
.tl li:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 20px; bottom: 0; width: 2px; background: var(--border); }
.tl .h { display: flex; gap: 10px; align-items: baseline; }
.tl .h b { font-size: 13px; color: var(--tone); }
.tl .h span { font: 12px "Geist Mono", monospace; color: var(--faint); }
.tl p { color: var(--muted); font-size: 13px; line-height: 1.55; }

/* subscribe */
.subscribe { display: flex; gap: 48px; align-items: center; padding: 32px 36px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%), var(--surface); }
.sub-left { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.sub-left h2 { font-size: 24px; }
.sub-form { width: 540px; display: flex; flex-direction: column; gap: 12px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { font: 500 12px Geist, sans-serif; color: var(--muted); background: none; border: 1px solid var(--border); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.row { display: flex; gap: 8px; }
.input { font: 14px Geist, sans-serif; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; min-width: 0; }
input.input { flex: 1; }
input.input::placeholder { color: var(--faint); }
.picker { position: relative; }
.picker summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 13px; white-space: nowrap; height: 100%; display: flex; align-items: center; gap: 8px; }
.picker summary::-webkit-details-marker { display: none; }
.picker summary::after { content: "▾"; color: var(--faint); font-size: 11px; }
.picker-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 260px; max-height: 320px; overflow: auto; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); }
.picker-pop label { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.picker-pop label:hover { background: var(--surface); }
.picker-pop .g { font: 500 10px "Geist Mono", monospace; color: var(--faint); text-transform: uppercase; padding: 8px 8px 2px; }
#sub-msg.err { color: var(--bad); } #sub-msg.ok { color: var(--ok); }

.foot { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--faint); border-top: 1px solid var(--border); padding-top: 24px; margin-top: 32px; }
.foot .grow { flex: 1; }
.foot a { color: var(--muted); font-weight: 500; }

@media (max-width: 900px) {
  .links { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .charts { grid-template-columns: 1fr; }
  .subscribe { flex-direction: column; align-items: stretch; gap: 20px; padding: 24px 20px; }
  .sub-form { width: auto; }
}
@media (max-width: 600px) {
  .nav { gap: 10px; padding: 16px 0; }
  .brand .chip { display: none; }
  .nav .btn.primary { padding: 9px 10px; }
  .nav .btn.primary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hero { padding: 20px 18px; }
  .hero h1 { font-size: 22px; }
  .pulse { width: 28px; height: 28px; }
  .kpi .v { font-size: 18px; }
  .comp, .group > summary { padding-left: 16px; padding-right: 16px; }
  .comp-top .desc { display: none; }
  .comp-top .n { margin-right: auto; }
  .comp-top .st { display: none; }
  .day { grid-template-columns: 1fr; gap: 8px; padding: 16px; }
  .row { flex-direction: column; }
  .region { border-left: 0; border-top: 1px solid var(--border); }
  .region:first-child { border-top: 0; }
  .foot { gap: 12px; }
}
