/* The status page (status.html). Tokens, nav and footer come from model-page.css. */
:root {
  /* Status colours: fixed, and always shown with a label, never alone. */
  --ok: #0ca30c; --warn: #fab219; --bad: #d03b3b; --none: #2a3441;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
:root[data-theme="light"] { --none: #dfe3e8; }
body { font-family: 'Segoe UI', var(--font); }

.status-page { padding-bottom: 72px; }
.st-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--border-soft); }
.st-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.st-hero h1 { font-size: clamp(36px, 6vw, 60px); margin-bottom: 14px; }
.st-lede { color: var(--muted); font-size: 17px; max-width: 620px; }

.st-overall { padding: 28px 0 8px; }
/* Read-only maintenance (MAINTENANCE=readonly, server/flags.js): above the overall state, with its label in the text. */
.st-maint { margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--warn); border-left-width: 4px; border-radius: 10px; font-size: 15px; line-height: 1.5; }
.st-maint b { color: var(--warn); }
.st-banner { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--border-soft); }
.st-state { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 650; }
.st-state[data-state="operational"] { color: var(--ok); }
.st-state[data-state="degraded"], .st-state[data-state="low-traffic"] { color: var(--warn); }
.st-state[data-state="outage"] { color: var(--bad); }
.st-dot { width: 11px; height: 11px; border-radius: 50%; background: currentColor; flex: none; }
.st-state:not([data-state]) .st-dot, .st-state[data-state="no-data"] .st-dot { background: var(--faint); }
.st-state[data-state="no-data"] { color: var(--muted); }
.st-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.st-sub a { text-decoration: underline; text-underline-offset: 3px; }
.st-updated { font-family: var(--mono); font-size: 12px; color: var(--faint); }

.st-tiles { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border-soft); }
.st-tile { padding: 20px 20px 20px 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-tile + .st-tile { border-left: 1px solid var(--border-soft); padding-left: 20px; }
.st-tile > span { font-size: 13px; color: var(--muted); }
.st-tile b { font-size: clamp(26px, 3.4vw, 36px); font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.25; }
.st-tile b.st-small { font-size: 18px; padding-top: 8px; }
.st-tile small { font-size: 12px; color: var(--faint); }
.st-note { color: var(--muted); font-size: 13px; margin: 18px 0 10px; }

/* Availability bars: one per window, oldest on the left. A window with no requests is a short grey stub. */
.st-bars { display: flex; align-items: flex-end; gap: 2px; height: 46px; }
.st-bars button {
  flex: 1 1 0; min-width: 0; height: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; align-items: flex-end; outline-offset: 2px;
}
.st-bars button i { display: block; width: 100%; height: 100%; border-radius: 3px; background: var(--none); transition: opacity .12s; }
.st-bars button[data-s="operational"] i { background: var(--ok); }
.st-bars button[data-s="degraded"] i { background: var(--warn); }
.st-bars button[data-s="outage"] i { background: var(--bad); }
.st-bars button[data-s="no-data"] i { height: 30%; }
.st-bars:hover button i, .st-bars:has(button[aria-pressed="true"]) button i { opacity: .55; }
.st-bars button:hover i, .st-bars button[aria-pressed="true"] i { opacity: 1; }
.st-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); margin-top: 6px; }
.st-readout { font-size: 12.5px; color: var(--muted); margin-top: 6px; min-height: 1.6em; font-variant-numeric: tabular-nums; }
.st-legend { list-style: none; display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.st-legend li { display: flex; align-items: center; gap: 6px; }
.st-legend i { width: 10px; height: 10px; border-radius: 3px; display: block; }
.st-legend .ok { background: var(--ok); } .st-legend .warn { background: var(--warn); }
.st-legend .bad { background: var(--bad); } .st-legend .none { background: var(--none); }

.st-section { padding-top: 48px; margin-top: 40px; border-top: 1px solid var(--border-soft); }
.st-section h2 { font-size: 24px; font-weight: 650; margin-bottom: 6px; }
.st-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.st-section-head h2 { margin: 0; }
#svcCount { color: var(--muted); font-weight: 500; }

/* One card per service. */
.st-services { display: grid; gap: 16px; }
.st-services[hidden] { display: none; }
.st-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; padding: 20px 22px; }
.st-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border-soft); }
.st-card-head h3 { font-size: 17px; font-weight: 650; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-ico { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--raised); border: 1px solid var(--border-soft); color: var(--muted); }
.st-ico svg { width: 18px; height: 18px; }
.st-ico[data-ico="claude"] { background: rgba(217, 119, 87, .12); border-color: rgba(217, 119, 87, .3); }
.st-ico[data-ico="openai"] { color: var(--text); }
.st-ico[data-ico="gemini"] { background: rgba(66, 133, 244, .1); border-color: rgba(66, 133, 244, .28); }
.st-card-head h3 small { font-weight: 500; color: var(--faint); font-size: 12.5px; margin-left: 8px; }
.st-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.st-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-pill[data-state="operational"] { color: var(--ok); }
.st-pill[data-state="degraded"], .st-pill[data-state="low-traffic"] { color: var(--warn); }
.st-pill[data-state="outage"] { color: var(--bad); }
.st-pill[data-state="no-data"] { color: var(--faint); }
.st-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 24px; padding: 16px 0; }
.st-metrics div { display: flex; flex-direction: column; min-width: 0; }
.st-metrics span { font-size: 12.5px; color: var(--muted); }
.st-metrics b { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; }
.st-card .st-note { margin: 4px 0 10px; font-size: 12.5px; }
.st-card .st-bars { height: 38px; }

/* 14 days: request volume as the bar's height, coloured by that day's success rate. */
.st-daily { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 170px; margin-top: 18px; }
.st-day { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; height: 100%; min-width: 0; position: relative; }
.st-day i { display: block; border-radius: 4px 4px 0 0; background: var(--none); min-height: 2px; }
.st-day[data-s="operational"] i { background: var(--ok); }
.st-day[data-s="degraded"] i { background: var(--warn); }
.st-day[data-s="outage"] i { background: var(--bad); }
.st-day em { font-style: normal; font-size: 11px; color: var(--faint); text-align: center; margin-top: 6px; white-space: nowrap; }
.st-day b { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.st-day:hover i { outline: 2px solid var(--border); }
.st-tip {
  position: fixed; z-index: 60; pointer-events: none; background: var(--raised); border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 10px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); font-variant-numeric: tabular-nums; max-width: 240px;
}
.st-tip[hidden] { display: none; }
.st-table { margin-top: 18px; font-size: 13.5px; }
.st-table summary { cursor: pointer; color: var(--muted); }
.st-table table { border-collapse: collapse; margin-top: 10px; min-width: 320px; }
.st-table th, .st-table td { text-align: left; padding: 6px 18px 6px 0; border-bottom: 1px solid var(--border-soft); font-variant-numeric: tabular-nums; }
.st-table th { color: var(--faint); font-weight: 500; }

.st-tiles-cat { border-top: 1px solid var(--border-soft); margin-top: 16px; }
.st-defs p { color: var(--muted); font-size: 14px; max-width: 820px; margin-top: 12px; }

footer .foot-bottom .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 24px; }
footer .foot-legal { display: flex; gap: 20px; }

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .st-hero { padding: 40px 0 28px; }
  .st-tiles { grid-template-columns: 1fr 1fr; }
  .st-tile:nth-child(odd) { border-left: 0; padding-left: 0; }
  .st-tile:nth-child(n + 3) { border-top: 1px solid var(--border-soft); }
  .st-metrics { grid-template-columns: 1fr 1fr; }
  .st-card { padding: 16px; }
  .st-bars { gap: 1px; }
  .st-bars button i { border-radius: 1.5px; }
  .st-daily { gap: 3px; height: 150px; }
  .st-day b { display: none; }
  .st-day em { font-size: 9.5px; }
}
