/* Uptime: the datacenter page. Light tokens by default, dark under html.dark
   (System's theme toggle); the scene follows the same class. */

.up {
    --ink: #1b2027;
    --ink-2: #4f5a66;
    --ink-3: #6b7682;
    --panel: rgba(255, 255, 255, 0.72);
    --panel-solid: #ffffff;
    --line: rgba(27, 32, 39, 0.10);
    --line-2: rgba(27, 32, 39, 0.18);
    --on: #1a7f37;
    --open: #9a6700;
    --today: #1b2027;
    --warn: #9a6700;
    --bad: #cf222e;
    --focus: #0969da;
    --scene: #e7eff5;
    --cat-network: #0969da;
    --cat-security: #bf3989;
    --cat-compute: #1b7c83;
    --cat-data: #8250df;
    --cat-monitoring: #57606a;
    position: relative;
    height: calc(100vh - var(--up-top, 64px));
    height: calc(100dvh - var(--up-top, 64px));
    min-height: 560px;
    overflow: hidden;
    background: var(--scene);
    color: var(--ink);
    font-family: Inter, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}
html.dark .up {
    --ink: #e6edf3;
    --ink-2: #9aa7b4;
    --ink-3: #7d8a97;
    --panel: rgba(9, 13, 19, 0.62);
    --panel-solid: #0d131b;
    --line: rgba(214, 228, 240, 0.10);
    --line-2: rgba(214, 228, 240, 0.18);
    --on: #39d353;
    --open: #e3b341;
    --today: #f0f6fc;
    --warn: #e3b341;
    --bad: #ff7b72;
    --focus: #79c0ff;
    --scene: #05080d;
    --cat-network: #58a6ff;
    --cat-security: #f778ba;
    --cat-compute: #56d4dd;
    --cat-data: #bc8cff;
    --cat-monitoring: #c9d1d9;
}
body:has(.up) > footer { display: none; }
.up *, .up *::before, .up *::after { box-sizing: border-box; }
/* zero-specificity reset, so every class below can set its own colour */
.up :where(button, select) { font: inherit; color: inherit; }
.up :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.up-stage { position: absolute; inset: 0; }
.up-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.up-no-gl .up-stage, .up-no-gl .up-seg, .up-no-gl .up-rot { display: none; }

.up-glass {
    background: var(--panel);
    border: 1px solid var(--line);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    border-radius: 14px;
}

/* ---- top bar */
.up-top {
    position: absolute; top: 0; left: 0; right: 0; z-index: 3;
    display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
    padding: 20px 24px 0;
    pointer-events: none;
}
.up-top > * { pointer-events: auto; }
.up-brand { padding: 14px 18px 14px 16px; width: 324px; }
.up-wordmark {
    margin: 0; display: flex; align-items: center; gap: 10px;
    font-size: 26px; font-weight: 700; letter-spacing: -0.035em; line-height: 1;
}
.up-pulse { position: relative; width: 10px; height: 10px; flex: none; }
.up-pulse::before, .up-pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--on); }
.up-pulse::after { animation: up-ping 2.4s cubic-bezier(.2, .6, .3, 1) infinite; }
@keyframes up-ping { from { transform: scale(1); opacity: .55; } to { transform: scale(2.8); opacity: 0; } }
.up-season { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }
.up-season b { color: var(--ink); font-weight: 600; }

.up-strip { display: grid; grid-template-columns: repeat(var(--n, 24), 1fr); gap: 3px; margin-top: 12px; }
.up-strip button {
    height: 18px; padding: 0; border: 0; border-radius: 3px; cursor: pointer;
    background: var(--line-2);
    transition: transform .15s ease, background-color .2s ease;
}
.up-strip button:hover { transform: translateY(-2px); }
.up-strip button[data-state="on"] { background: var(--on); }
.up-strip button[data-state="open"] { background: var(--open); }
.up-strip button[data-state="today"] { background: var(--today); box-shadow: 0 0 0 2px var(--panel-solid), 0 0 0 3px var(--today); }
.up-strip button[aria-current="true"] { outline: 2px solid var(--focus); outline-offset: 2px; }
.up-meta { display: flex; justify-content: space-between; margin-top: 8px; font: 500 12px/1 'JetBrains Mono', monospace; color: var(--ink-3); }

.up-legend i, .up-legend-inline i, .up-state i { width: 9px; height: 9px; border-radius: 2px; display: block; background: var(--line-2); flex: none; }
.up-legend i[data-state="on"], .up-legend-inline i[data-state="on"], .up-state[data-state="on"] i { background: var(--on); }
.up-legend i[data-state="open"], .up-legend-inline i[data-state="open"], .up-state[data-state="open"] i { background: var(--open); }
.up-legend i[data-state="today"], .up-legend-inline i[data-state="today"], .up-state[data-state="today"] i { background: var(--today); }
.up-legend-inline { display: none; }

.up-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.up-actions[hidden] { display: none; }
.up-chip {
    display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px;
    border: 1px solid var(--line-2); background: transparent; cursor: pointer;
    font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.up-chip:hover { border-color: var(--ink-3); }
.up-chip-warn { color: var(--warn); border-color: currentColor; }
.up-chip-solid { background: var(--ink); color: var(--panel-solid); border-color: var(--ink); }

.up-controls { position: absolute; top: 20px; right: 24px; z-index: 3; display: flex; gap: 8px; align-items: center; padding: 6px; }
.up-seg { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--line); }
.up-seg button, .up-icon {
    border: 0; background: transparent; cursor: pointer;
    height: 34px; border-radius: 8px; padding: 0 14px; font-weight: 600; font-size: 14px; color: var(--ink-2);
    transition: background-color .2s ease, color .2s ease;
}
.up-seg button[aria-pressed="true"] { background: var(--panel-solid); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.up-icon { width: 34px; padding: 0; display: grid; place-items: center; }
.up-icon svg { width: 18px; height: 18px; }
.up-icon:hover, .up-seg button:hover { color: var(--ink); }
.up-rot { display: flex; gap: 2px; }
.up-rot[hidden] { display: none; }

/* ---- legend */
.up-legend {
    position: absolute; left: 24px; bottom: 24px; z-index: 3;
    display: flex; gap: 16px; padding: 10px 14px; font-size: 13px; color: var(--ink-2);
}
.up-legend span, .up-legend-inline span { display: flex; align-items: center; gap: 7px; white-space: nowrap; }

/* ---- tooltip */
.up-tip {
    position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none;
    padding: 7px 10px; border-radius: 9px; font-size: 13px; white-space: nowrap;
    background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
    transform: translate(14px, 14px);
}
.up-tip b { font: 600 13px 'JetBrains Mono', monospace; margin-right: 6px; }
.up-tip[hidden] { display: none; }

/* ---- rack panel */
.up-panel {
    position: absolute; right: 24px; top: 96px; z-index: 4; width: 360px; max-height: calc(100% - 120px); overflow: auto;
    padding: 20px;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s ease;
}
.up-panel[hidden] { display: block; transform: translateX(24px); opacity: 0; pointer-events: none; visibility: hidden; }
.up-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.up-id { margin: 0; font: 700 30px/1 'JetBrains Mono', monospace; letter-spacing: -0.03em; }
.up-date { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.up-close { margin: -6px -8px 0 0; }
.up-state {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
    padding: 5px 10px 5px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--line);
}
.up-state i { border-radius: 50%; width: 8px; height: 8px; }
.up-sub { margin: 18px 0 0; font-size: 13px; color: var(--ink-2); }
.up-units { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.up-unit { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.up-unit-fixed { color: var(--ink-2); }
.up-uname { display: flex; align-items: center; gap: 8px; min-width: 0; }
.up-cat { width: 3px; height: 14px; border-radius: 2px; flex: none; background: var(--cat-network); }
.up-cat[data-cat="security"] { background: var(--cat-security); }
.up-cat[data-cat="compute"] { background: var(--cat-compute); }
.up-cat[data-cat="data"] { background: var(--cat-data); }
.up-cat[data-cat="monitoring"] { background: var(--cat-monitoring); }
.up-umeta { font: 500 12px/1.6 'JetBrains Mono', monospace; color: var(--ink-3); white-space: nowrap; }
.up-move {
    grid-column: 1 / -1; height: 32px; padding: 0 10px; border-radius: 8px;
    border: 1px solid var(--line-2); background: var(--panel-solid); color: var(--ink); font-size: 13px;
}
.up-bar { margin-top: 14px; }
.up-bar-row { display: flex; justify-content: space-between; font: 500 12px 'JetBrains Mono', monospace; color: var(--ink-3); margin-bottom: 6px; }
.up-bar-track { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.up-bar-track i { display: block; height: 100%; background: var(--on); border-radius: 3px; }
.up-bar-full .up-bar-track i { background: var(--warn); }
.up-cta {
    display: flex; align-items: center; justify-content: center; margin-top: 18px; height: 42px; border-radius: 10px;
    background: var(--ink); color: var(--panel-solid); font-weight: 600; font-size: 14px; text-decoration: none;
}
.up-note { margin: 16px 0 0; font-size: 13px; color: var(--warn); }
.up-error { margin: 14px 0 0; font-size: 13px; color: var(--bad); }
.up-error[hidden] { display: none; }

.up-nogl { position: absolute; left: 24px; right: 24px; bottom: 24px; z-index: 3; margin: 0; padding: 14px 16px; color: var(--ink-2); font-size: 14px; }
.up-nogl[hidden] { display: none; }

@media (max-width: 720px) {
    .up { min-height: 520px; }
    .up-top { padding: 12px 12px 0; flex-direction: column; align-items: stretch; gap: 8px; }
    .up-brand { width: auto; padding: 12px 14px; }
    .up-wordmark { font-size: 22px; }
    .up-strip { gap: 2px; }
    .up-strip button { height: 16px; }
    .up-controls { top: auto; left: 12px; right: 12px; bottom: 12px; justify-content: space-between; }
    .up-legend { display: none; }
    .up-legend-inline { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
    .up-legend-inline span { gap: 6px; }
    .up-panel { left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-height: 58%; border-radius: 18px; }
    .up-panel[hidden] { transform: translateY(24px); }
    .up-nogl { left: 12px; right: 12px; bottom: 70px; }
}
@media (prefers-reduced-motion: reduce) {
    .up-pulse::after { animation: none; }
    .up *, .up-panel { transition-duration: 0s !important; }
}

/* ---- nights */
.up-nights-btn {
    display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 8px;
    border: 0; background: transparent; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2);
}
.up-nights-btn:hover { color: var(--ink); }
.up-nights-btn svg { width: 16px; height: 16px; }
.up-nights { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.up-night {
    width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; text-align: left;
}
.up-night:hover { border-color: var(--ink-3); }
.up-night[data-open="false"] { color: var(--ink-2); }
.up-night-title { font-weight: 600; font-size: 14px; }
.up-night-meta { font: 500 12px 'JetBrains Mono', monospace; color: var(--ink-3); white-space: nowrap; }
.up-big { margin: 16px 0 0; font: 700 40px/1 'JetBrains Mono', monospace; letter-spacing: -0.04em; }
.up-cta { width: 100%; border: 0; cursor: pointer; font-family: inherit; }
.up-cta.up-cta-2 { background: transparent; color: var(--ink); border: 1px solid var(--line-2); margin-top: 10px; }
.up-back { margin-top: 14px; padding: 0; border: 0; background: transparent; color: var(--ink-2); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.up-waves, .up-advices { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.up-wave, .up-advice { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.up-wave-name { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.up-wave-time { font: 500 12px 'JetBrains Mono', monospace; color: var(--ink-3); }
.up-wave-val, .up-advice-gain { font: 600 13px 'JetBrains Mono', monospace; white-space: nowrap; }
.up-wave[data-state="next"] { color: var(--ink-3); }
.up-wave[data-state="now"] .up-wave-name { color: var(--ink); font-weight: 600; }
.up-wave[data-state="good"] .up-wave-val { color: var(--on); }
.up-wave[data-state="warn"] .up-wave-val { color: var(--warn); }
.up-wave[data-state="bad"] .up-wave-val { color: var(--bad); }
.up-advice-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.up-advice-gain { color: var(--on); }
.up-link { padding: 0; border: 0; background: transparent; color: var(--focus); font-size: 12px; text-align: left; cursor: pointer; }

/* ---- replay bar */
.up-replay {
    position: absolute; left: 50%; bottom: 24px; z-index: 4; transform: translateX(-50%);
    width: min(620px, calc(100% - 48px)); display: flex; align-items: center; gap: 12px; padding: 8px 12px;
}
.up-replay[hidden] { display: none; }
.up-play[data-playing="true"] .up-i-play, .up-play[data-playing="false"] .up-i-pause { display: none; }
.up-rtime, .up-rup { font: 600 13px 'JetBrains Mono', monospace; white-space: nowrap; }
.up-rup { color: var(--ink-2); min-width: 64px; text-align: right; }
.up-rtrack { position: relative; flex: 1; min-width: 0; height: 28px; display: flex; align-items: center; }
.up-rtrack input { position: relative; z-index: 1; width: 100%; margin: 0; accent-color: var(--ink); background: transparent; }
.up-rmarks { position: absolute; left: 0; right: 0; top: 50%; height: 14px; transform: translateY(-50%); pointer-events: none; }
.up-rmarks i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--bad); opacity: .28; }
.up-rmarks i[data-wave="spike"], .up-rmarks i[data-wave="midnight"] { background: var(--focus); }
.up-rmarks i[data-wave="power"], .up-rmarks i[data-wave="ransom"] { background: var(--warn); }
.up-event {
    position: absolute; left: 50%; bottom: 84px; z-index: 4; transform: translateX(-50%);
    padding: 6px 12px 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap;
    background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    display: inline-flex; align-items: center; gap: 8px;
}
.up-event::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.up-event[data-wave="spike"]::before, .up-event[data-wave="midnight"]::before { background: var(--focus); }
.up-event[data-wave="power"]::before, .up-event[data-wave="ransom"]::before { background: var(--warn); }
.up-event[hidden] { display: none; }
.up-replaying .up-legend { display: none; }

@media (max-width: 720px) {
    .up-replaying .up-controls { display: none; }
    .up-replaying .up-legend-inline, .up-replaying .up-actions { display: none; }
    .up-replay { left: 12px; right: 12px; bottom: 12px; width: auto; transform: none; gap: 8px; padding: 6px 8px; }
    .up-rup { min-width: 0; }
    .up-event { bottom: 70px; }
    #up-panel:not([hidden]) ~ #up-event { display: none; }
    .up-replaying .up-panel { bottom: 128px; max-height: 42%; }
    .up-nights-btn { padding: 0 8px; }
}

/* ---- certificate page (a sheet of paper in both themes) */
.upc-wrap { max-width: 980px; margin: 32px auto 0; padding: 0 16px; }
.upc {
    position: relative; overflow: hidden; padding: 48px 56px 40px; border-radius: 14px;
    background: #fbfcfd; color: #11161d; border: 1px solid #d0d7de; box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
    font-family: Inter, -apple-system, sans-serif;
}
.upc-sky { position: absolute; left: 0; right: 0; top: 0; height: 10px; background: linear-gradient(90deg, #2bd96b, #2fc9c4 45%, #6f62e8); }
.upc-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -0.03em; }
.upc-brand small { font-size: 13px; font-weight: 500; color: #57606a; letter-spacing: 0; }
.upc-dot { width: 11px; height: 11px; border-radius: 50%; background: #1a7f37; }
.upc-h { margin: 28px 0 0; font-size: 44px; font-weight: 700; letter-spacing: -0.035em; line-height: 1; color: #11161d; }
.upc-lead { margin: 22px 0 0; color: #57606a; }
.upc-name { margin: 6px 0 0; font-size: 36px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; overflow-wrap: anywhere; }
.upc-what { margin: 10px 0 0; max-width: 640px; font-size: 16px; line-height: 1.5; color: #24292f; }
.upc-stats { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; }
.upc-stat { min-width: 150px; padding: 14px 16px; border: 1px solid #d0d7de; border-radius: 10px; background: #fff; }
.upc-stat b { display: block; font: 700 28px/1 'JetBrains Mono', monospace; letter-spacing: -0.03em; }
.upc-stat b small { font-size: 15px; color: #57606a; }
.upc-stat span { display: block; margin-top: 8px; font-size: 13px; color: #57606a; }
.upc-up b { color: #1a7f37; }
.upc-strip { margin-top: 24px; display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; max-width: 620px; }
.upc-strip i { height: 14px; border-radius: 3px; background: #e1e6eb; }
.upc-strip i.on { background: #1a7f37; }
.upc-waves { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: #57606a; }
.upc-waves b { margin-left: 6px; font-family: 'JetBrains Mono', monospace; color: #11161d; font-weight: 600; }
.upc-foot { margin-top: 32px; padding-top: 18px; border-top: 1px solid #e1e6eb; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: #57606a; }
.upc-foot b { font-family: 'JetBrains Mono', monospace; color: #11161d; }
.upc-pdf { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 10px; background: #11161d; color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; }
.upc-pdf:focus-visible { outline: 2px solid #0969da; outline-offset: 2px; }
.upc-back { margin: 18px 0 0; font-size: 14px; }
.upc-back a { color: inherit; opacity: .75; }
@media (max-width: 720px) {
    .upc { padding: 32px 22px 26px; }
    .upc-h { font-size: 34px; }
    .upc-name { font-size: 28px; }
    .upc-stat { min-width: 0; flex: 1 1 120px; }
    .upc-strip { gap: 2px; }
}

/* ---- night leaderboard */
.up-ranks { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.up-ranks-me { margin-top: 10px; border-top: 1px dashed var(--line-2); }
.up-rank { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.up-rank-me { background: var(--line); margin: 0 -10px; padding: 9px 10px; border-radius: 8px; border-bottom-color: transparent; }
.up-rank-n { font: 700 14px 'JetBrains Mono', monospace; color: var(--ink-2); }
.up-rank-who { display: flex; flex-direction: column; min-width: 0; }
.up-rank-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-rank-sub { font-size: 12px; color: var(--ink-3); }
.up-rank-val { font: 600 13px 'JetBrains Mono', monospace; }

/* live traffic */
.up-now {
    display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 8px 10px;
    border: 1px solid var(--line-2); border-radius: 10px; background: transparent; color: var(--ink);
    font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1.2; cursor: pointer; text-align: left;
}
.up-now:hover { border-color: var(--ink-3); }
.up-now[hidden] { display: none; }
.up-now i, .up-hours i, .up-hours-key i { flex: none; border-radius: 50%; background: var(--line-2); }
.up-now i { width: 8px; height: 8px; }
.up-now-label { color: var(--ink-2); }
.up-now-val { font: 600 13px 'JetBrains Mono', monospace; }
.up-now-event { margin-left: auto; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up [data-level="good"] { --lv: var(--on); }
.up [data-level="warn"] { --lv: var(--warn); }
.up [data-level="bad"] { --lv: var(--bad); }
.up-now i[data-level]:not([data-level="none"]), .up-hours i[data-level]:not([data-level="none"]), .up-hours-key i { background: var(--lv); }
.up-sub-head { margin-top: 20px; font-weight: 600; color: var(--ink); }
.up-hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; margin-top: 10px; }
.up-hours i { height: 22px; border-radius: 3px; }
.up-hours-axis { display: flex; justify-content: space-between; margin-top: 4px; font: 500 11px 'JetBrains Mono', monospace; color: var(--ink-3); }
.up-hours-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.up-hours-key span { display: inline-flex; align-items: center; gap: 6px; }
.up-hours-key i { width: 8px; height: 8px; border-radius: 2px; }
.up-quiet { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }

/* shop */
.up-buy {
    grid-column: 1 / -1; height: 32px; border-radius: 8px; border: 1px solid var(--line-2);
    background: var(--panel-solid); color: var(--ink); font: 600 13px 'JetBrains Mono', monospace; cursor: pointer;
}
.up-buy:hover:not(:disabled) { border-color: var(--ink-3); }
.up-buy:disabled { color: var(--ink-3); cursor: not-allowed; }
.up-budget-pre { margin: 8px 0 0; font: 500 12px/1.4 'JetBrains Mono', monospace; color: var(--ink-3); }
.up-budget-pre[hidden] { display: none; }

/* incidents */
.up-inc { margin-top: 8px; }
.up-panel:has(.up-evidence) { width: min(600px, calc(100% - 48px)); }
.up-inc-row {
    display: flex; flex: 1; justify-content: space-between; align-items: center; gap: 12px; min-width: 0;
    border: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left;
}
.up-wave .up-inc-row + .up-wave-val { margin-left: 12px; }
.up-inc-row:hover .up-wave-name { text-decoration: underline; text-underline-offset: 3px; }
.up-inc-state { font: 600 12px 'JetBrains Mono', monospace; white-space: nowrap; color: var(--ink-3); }
.up-inc-state[data-state="open"] { color: var(--warn); }
.up-inc-state[data-state="solved"] { color: var(--on); }
.up-inc-state[data-state="failed"] { color: var(--bad); }
.up-evidence { margin: 16px 0 0; }
.up-evidence figcaption { font: 600 12px 'JetBrains Mono', monospace; color: var(--ink-2); margin-bottom: 6px; }
.up-evidence pre, .up-sol-cmd {
    margin: 0; padding: 10px 12px; max-height: 260px; overflow: auto; border-radius: 8px; background: var(--line);
    font: 500 11.5px/1.55 'JetBrains Mono', monospace; color: var(--ink); white-space: pre; tab-size: 8;
}
.up-sol-cmd { max-height: none; white-space: pre-wrap; word-break: break-all; }
.up-evidence pre, .up-sol-cmd, .up-q-code, .up-sol-answer code {
    font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0;      /* <= stays <=, as typed */
}
@media (max-width: 720px) {
    .up:has(#up-panel:not([hidden])) .up-brand > :not(.up-wordmark, .up-season, .up-strip) { display: none; }
    .up-panel:has(.up-evidence) { max-height: calc(100% - 200px); }
}
.up-q { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.up-q-text { margin: 0 0 10px; font-weight: 600; font-size: 14px; }
.up-q-input {
    width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2);
    background: var(--panel-solid); color: var(--ink); font: 500 13px 'JetBrains Mono', monospace;
}
.up-q-options { display: grid; gap: 6px; }
.up-q-opt { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.up-q-opt span { overflow-wrap: anywhere; }
.up-q-code { font: 500 12px/1.5 'JetBrains Mono', monospace; }
.up-q-check { width: 100%; margin-top: 8px; }
.up-q-msg { margin: 8px 0 0; font-size: 13px; min-height: 1em; }
.up-q-msg[data-ok="false"] { color: var(--bad); }
.up-q-ok { margin: 0; font: 600 13px 'JetBrains Mono', monospace; color: var(--on); }
.up-win { margin: 14px 0 0; font: 700 15px 'JetBrains Mono', monospace; color: var(--on); }
.up-sol { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.up-sol-answer { margin: 0; font-size: 14px; }
.up-sol-answer code { font: 600 13px 'JetBrains Mono', monospace; overflow-wrap: anywhere; }
.up-sol-label { margin: 10px 0 6px; font-size: 12px; color: var(--ink-3); }
