/* vuzio.app/status — the landing's look (landing.css) plus a dark theme and the state colours.
   State is always written out in words; colour only repeats it. */

:root {
  --st-up: #16a344;
  --st-slow: #d97706;
  --st-confirming: #2f5bff;
  --st-down: #dc3545;
  --st-broken: #c2410c;
  --st-person: #7c3aed;
  --st-unknown: #cfd5e2;
  --st-up-text: #12813a;
  --st-slow-text: #a85a04;
  --st-confirming-text: #2447e6;
  --st-down-text: #c42636;
  --st-broken-text: #b13a0b;
  --st-person-text: #6d28d9;
  --st-unknown-text: var(--ink-2);
  --st-warn-bg: #fff6e6;
  --st-warn-line: #f5d9a8;
  --head-glass: rgba(255, 255, 255, .86);
  --cta: var(--blue);
  --hl: #eaf0ff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0b1120;
    --card: #111a2e;
    --well: #18233a;
    --line: #223049;
    --ink: #f2f5fb;
    --ink-2: #a8b2c7;
    --ink-3: #75819a;
    --blue: #5b80ff;
    --blue-deep: #2447e6;
    --blue-soft: #18264a;
    --lift: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -12px rgba(0, 0, 0, .6);
    --st-unknown: #34405a;
    --st-up-text: #4ade80;
    --st-slow-text: #fbbf24;
    --st-confirming-text: #8fa9ff;
    --st-down-text: #ff7a85;
    --st-broken-text: #fb923c;
    --st-person-text: #c4a5ff;
    --st-warn-bg: #2a2111;
    --st-warn-line: #4a3a1a;
    --head-glass: rgba(17, 26, 46, .86);
    --cta: #2f5bff;
    --hl: #1b2b55;
    color-scheme: dark;
  }
}

.head-bar { background: var(--head-glass); }
.head-bar .head-cta { margin-left: auto; background: var(--cta); }
.head-bar .head-cta:hover { background: var(--blue-deep); }
@media (max-width: 719px) {
  .wrap { width: calc(100% - 32px); }
  .site-head { padding: 10px 16px 0; }
}
.skip:focus { background: var(--card); color: var(--ink); }
::selection { background: color-mix(in srgb, var(--blue) 30%, transparent); }

/* ---------- layout ---------- */
.st-main { display: grid; gap: 16px; padding-top: 16px; }
.st-main > section { margin-top: 0; }
.st-hero, .st-panel { padding: 22px 16px; }
.st-h1 { margin: 0; font: 800 15px/20px var(--font-head); color: var(--ink-2); }
.st-h2 { margin: 0; font: 900 22px/28px var(--font-head); letter-spacing: -0.015em; }
.st-sub { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; line-height: 20px; max-width: 46em; }
.st-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.st-lead { margin: -6px 0 16px; }
.st-placeholder { margin: 0; padding: 14px 0; color: var(--ink-2); list-style: none; }

/* ---------- headline ---------- */
.st-headline { display: flex; align-items: flex-start; gap: 12px; margin: 10px 0 0; font: 900 26px/31px var(--font-head); letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.st-headline .st-dot { width: 14px; height: 14px; margin-top: 9px; }
.st-unis-line { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }
.st-unis-line a { font-weight: 800; }
.st-updated { margin: 10px 0 0; color: var(--ink-2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.st-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; padding: 12px 14px;
  border-radius: var(--r-md); background: var(--st-warn-bg); box-shadow: inset 0 0 0 1px var(--st-warn-line);
  color: var(--st-slow-text);
}
.st-note[hidden] { display: none; }
.st-note-text { flex: 1 1 220px; margin: 0; color: var(--ink); font-size: 14px; line-height: 20px; }
.st-btn {
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: var(--card); font: 800 14px/1 var(--font-body);
  transition: transform var(--dur-press) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.st-btn:active { transform: scale(.97); }
.st-btn[disabled] { opacity: .5; cursor: progress; }

/* ---------- dots & state words ---------- */
.st-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--st-unknown); }
[data-state="up"] { --c: var(--st-up); --t: var(--st-up-text); }
[data-state="slow"], [data-state="late"], [data-state="partial"], [data-state="degraded"] { --c: var(--st-slow); --t: var(--st-slow-text); }
[data-state="confirming"] { --c: var(--st-confirming); --t: var(--st-confirming-text); }
[data-state="down"] { --c: var(--st-down); --t: var(--st-down-text); }
[data-state="broken"] { --c: var(--st-broken); --t: var(--st-broken-text); }
[data-state="needs_person"] { --c: var(--st-person); --t: var(--st-person-text); }
[data-state="unknown"] { --c: var(--st-unknown); --t: var(--st-unknown-text); }
.st-dot[data-state], .st-key[data-state] { background: var(--c); }
.st-word { color: var(--t, var(--ink-2)); font-weight: 800; white-space: nowrap; }

.st-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; color: var(--ink-2); font-size: 12.5px; }
.st-legend span { display: inline-flex; align-items: center; gap: 6px; }
.st-key { display: inline-block; width: 8px; height: 14px; border-radius: 2px; }

/* ---------- bars ---------- */
.st-bars { display: flex; gap: 3px; min-width: 0; height: 24px; }
.st-bars > i { flex: 1 1 0; min-width: 0; border-radius: 3px; background: var(--c, var(--st-unknown)); }
@media (hover: hover) and (pointer: fine) {
  .st-bars > i { transition: opacity var(--dur-fast) var(--ease-out); }
  .st-bars:hover > i { opacity: .55; }
  .st-bars:hover > i:hover { opacity: 1; }
}
.st-scale { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--ink-2); font-size: 12px; line-height: 16px; }
.st-scale .st-wide { display: none; }

/* ---------- components ---------- */
.st-comps { display: grid; margin: 0; padding: 0; list-style: none; }
.st-comp { padding: 14px 0; border-top: 1px solid var(--line); }
.st-comp:first-child { border-top: 0; padding-top: 4px; }
.st-comp-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.st-comp-title { flex: 1; min-width: 0; margin: 0; font: 800 16px/22px var(--font-head); overflow-wrap: anywhere; }
.st-comp-side { display: flex; align-items: baseline; gap: 12px; text-align: right; font-size: 14px; }
.st-uptime { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }

/* ---------- universities: tools ---------- */
.st-tools { display: grid; gap: 12px; margin-bottom: 18px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px;
  border: 0; border-radius: 999px; cursor: pointer; background: var(--well); color: var(--ink);
  font: 800 13.5px/1 var(--font-body); font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-press) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.st-chip b { font-weight: 900; color: var(--ink-2); }
.st-chip:active { transform: scale(.97); }
.st-chip[aria-pressed="true"] { background: var(--ink); color: var(--card); }
.st-chip[aria-pressed="true"] b { color: inherit; }
.st-chip .st-dot { width: 8px; height: 8px; }
.st-search { max-width: 420px; min-height: 46px; border: 0; border-radius: 999px; background: var(--well); color: var(--ink-3); padding-right: 6px; }
.st-search:focus-within { box-shadow: 0 0 0 2px var(--blue); color: var(--blue); }
.st-search input { height: 44px; font: 700 16px/1 var(--font-body); color: var(--ink); }
.st-search input::placeholder { color: var(--ink-3); }
.st-search input::-webkit-search-cancel-button { display: none; }
.st-clear { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; }
.st-clear:hover { background: var(--card); }
.st-clear[hidden] { display: none; }

/* ---------- universities: groups ---------- */
.st-block + .st-block { margin-top: 22px; }
.st-block-h { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px; font: 900 17px/24px var(--font-head); }
.st-block-h small, .st-count { font: 700 13px/18px var(--font-body); color: var(--ink-2); }
.st-cities { display: grid; gap: 6px; }
.st-group { border-radius: var(--r-md); background: var(--well); }
.st-group > summary {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px 10px 16px;
  border-radius: var(--r-md); font: 800 15.5px/21px var(--font-head);
}
.st-group > summary:hover { background: color-mix(in srgb, var(--well) 70%, var(--line)); }
.st-group > summary .st-gname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.st-group > summary .st-gsum { font: 700 13px/18px var(--font-body); color: var(--ink-2); text-align: right; }
.st-group > summary .st-gsum .st-word { font-size: 13px; }
.st-group .chev { flex: none; width: 18px; height: 18px; color: var(--ink-2); }
.st-group[open] > summary .chev { transform: rotate(180deg); }
.st-group > .st-list { padding: 0 14px 6px 16px; }
.st-group .st-group { background: var(--card); margin: 6px 0 8px; }
.st-group .st-group > summary { min-height: 48px; }

.st-list { display: grid; margin: 0; padding: 0; list-style: none; }
.st-uni {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name state" "bars bars" "meta meta";
  gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--line); scroll-margin-top: 96px;
  transition: background-color var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}
.st-list > li:first-child > .st-uni, .st-list > .st-uni:first-child { border-top: 0; }
.st-list > li.st-fam-li { padding: 4px 0; }
.st-uni-name { grid-area: name; display: flex; align-items: flex-start; gap: 10px; min-width: 0; margin: 0; font: 800 15px/21px var(--font-head); }
.st-uni-name .st-dot { margin-top: 6px; }
.st-uni-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.st-uni-name a { color: var(--ink); }
.st-uni-name a:hover { color: var(--blue); }
.st-uni-name small { font: 700 13px/18px var(--font-body); color: var(--ink-2); }
.st-uni-state { grid-area: state; align-self: start; font-size: 14px; text-align: right; }
.st-uni .st-bars { grid-area: bars; height: 18px; gap: 2px; }
.st-uni .st-bars > i { border-radius: 2px; }
.st-uni-meta { grid-area: meta; margin: 0; color: var(--ink-2); font-size: 13px; line-height: 19px; overflow-wrap: anywhere; }
.st-uni-meta .st-msg { color: var(--ink); font-weight: 700; }
.st-uni-meta span + span::before { content: " · "; color: var(--ink-3); }
.st-uni.is-hl { background: var(--hl); box-shadow: 0 0 0 8px var(--hl); border-radius: 4px; border-top-color: transparent; }
.st-uni:focus { outline: none; }
.st-uni:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 4px; border-radius: 6px; }
.st-empty { margin: 0; padding: 14px 0; color: var(--ink-2); }
.st-empty b { color: var(--ink); }
.st-reset { margin-left: 4px; padding: 0; border: 0; background: none; color: var(--blue); font: inherit; font-weight: 800; cursor: pointer; }
.st-reset:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- incidents ---------- */
.st-incidents { display: grid; margin: 0; padding: 0; list-style: none; }
.st-inc { display: grid; gap: 2px; padding: 12px 0 12px 14px; border-top: 1px solid var(--line); position: relative; }
.st-inc:first-child { border-top: 0; }
.st-inc::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: var(--c, var(--st-unknown)); }
.st-inc-title { margin: 0; font: 800 15px/21px var(--font-head); overflow-wrap: anywhere; }
.st-inc-meta { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 19px; }
.st-inc-meta span + span::before { content: " · "; color: var(--ink-3); }

/* ---------- wider screens ---------- */
@media (min-width: 560px) {
  .st-scale .st-wide { display: inline; }
  .st-scale .st-narrow { display: none; }
}
@media (max-width: 559px) {
  /* 30 days do not fit a phone legibly: the strip keeps the last 14 */
  .st-comp .st-bars > i:nth-child(-n + 16) { display: none; }
}
@media (min-width: 720px) {
  .st-main { gap: 20px; padding-top: 20px; }
  .st-hero, .st-panel { padding: 30px 32px; }
  .st-headline { font-size: 32px; line-height: 38px; }
  .st-headline .st-dot { width: 16px; height: 16px; margin-top: 11px; }
  .st-tools { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .st-uni { grid-template-columns: minmax(0, 1fr) 216px 128px; grid-template-areas: "name bars state" "meta bars state"; column-gap: 20px; row-gap: 2px; align-items: center; }
  .st-uni .st-bars, .st-uni-state { align-self: center; }
  .st-inc { grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: baseline; }
}
.st-inc-meta { grid-column: 1 / -1; }
