/* ═══════════════════════════════════════════════════════════════════════════
   status.css — page styles for /status. Loads after base.css, inherits the
   navy background and shared tokens. Brand palette: --tg-blue, --tg-blue-light.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --st-ok:        #2ABA75;
  --st-ok-soft:   rgba(42, 186, 117, .18);
  --st-minor:     #F2CB4D;   /* < 5 min  — light yellow */
  --st-moderate:  #F2A03A;   /* < 10 min — amber */
  --st-major:     #E5484D;   /* ≥ 10 min — red */

  --st-card:      rgba(255, 255, 255, .04);
  --st-card-hi:   rgba(255, 255, 255, .07);
  --st-line:      rgba(255, 255, 255, .09);
  --st-line-hi:   rgba(255, 255, 255, .14);
  --st-text:      rgba(255, 255, 255, .92);
  --st-text-soft: rgba(255, 255, 255, .68);
  --st-text-mute: rgba(255, 255, 255, .48);
}

.status-page {
  color: var(--st-text);
  padding-bottom: 80px;
}

.status-page .grad {
  background: linear-gradient(135deg, #5BB6FF 0%, #7C5CFF 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════════════════════════════════════ */
.st-hero {
  padding: clamp(28px, 5vw, 56px) 0 clamp(36px, 5vw, 64px);
}

.st-h1 {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  max-width: 880px;
  margin-bottom: 14px;
}
.st-sub {
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--st-text-soft);
  max-width: 720px;
  line-height: 1.6;
}
.st-sub strong {
  color: var(--st-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* KPI grid */
.st-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 1.6vw, 18px);
  margin-top: clamp(28px, 4vw, 40px);
}
.st-kpi {
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: 14px;
  padding: 18px 20px;
}
.st-kpi-cap {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--st-text-mute);
  margin-bottom: 10px;
}
.st-kpi-num {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 6px;
}
.st-kpi-unit {
  font-size: clamp(13px, 1.3vw, 14px); font-weight: 600;
  color: var(--st-text-soft);
}
.st-kpi-lbl {
  margin-top: 6px;
  font-size: 12px; color: var(--st-text-mute);
}
@media (max-width: 900px) {
  .st-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .st-hero { padding-top: 80px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Section scaffolding
   ═══════════════════════════════════════════════════════════════════════════ */
.st-section { padding: clamp(28px, 4vw, 48px) 0; }
.st-section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: clamp(20px, 3vw, 28px);
}
.st-h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800; letter-spacing: -.015em;
}
.st-section-sub {
  flex-basis: 100%;
  font-size: 14px; color: var(--st-text-soft);
  max-width: 760px;
  line-height: 1.6;
}
.st-card {
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: 16px;
  padding: clamp(18px, 2.5vw, 24px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Components list — 90-day history strip
   ═══════════════════════════════════════════════════════════════════════════ */
.st-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 12px; color: var(--st-text-soft);
}
.st-legend-item { display: inline-flex; align-items: center; gap: 6px; }

.st-comp-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.st-comp {
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: 14px;
  padding: 18px 20px;
}
.st-comp-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.st-comp-name { font-size: 16px; font-weight: 700; }
.st-comp-meta {
  display: flex; align-items: center;
}
.st-comp-uptime {
  display: inline-flex; flex-direction: column; align-items: flex-end;
  font-size: 11px; color: var(--st-text-mute);
  letter-spacing: .04em; text-transform: uppercase;
  line-height: 1.2;
}
.st-comp-uptime strong {
  font-size: 17px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em; text-transform: none;
  color: var(--st-text);
}

/* History squares */
.st-history {
  display: flex; gap: 2px;
  height: 32px;
  position: relative;
}
.st-sq {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
  background: var(--st-ok);
  transition: transform .12s ease;
  cursor: default;
}
.st-sq:hover { transform: scaleY(1.15); }
.st-sq--operational { background: var(--st-ok); }
.st-sq--minor       { background: var(--st-minor); }
.st-sq--moderate    { background: var(--st-moderate); }
.st-sq--major       { background: var(--st-major); }

/* Legend square sizing override */
.st-legend .st-sq {
  flex: none;
  width: 12px; height: 12px;
  border-radius: 3px;
}

.st-history-axis {
  margin-top: 8px;
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--st-text-mute);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Tooltip (rendered by JS, positioned via fixed) */
.st-tip {
  position: fixed;
  z-index: 50;
  background: #0F1B3D;
  border: 1px solid var(--st-line-hi);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--st-text);
  pointer-events: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  max-width: 280px;
  line-height: 1.45;
}
.st-tip-date {
  font-weight: 700;
  margin-bottom: 4px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .03em;
}
.st-tip-status { color: var(--st-text-soft); }
.st-tip-status--operational { color: var(--st-ok); }
.st-tip-status--minor       { color: var(--st-minor); }
.st-tip-status--moderate    { color: var(--st-moderate); }
.st-tip-status--major       { color: var(--st-major); }
.st-tip-downtime {
  color: var(--st-text-mute);
  font-size: 11px;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Throughput verification
   ═══════════════════════════════════════════════════════════════════════════ */
.st-charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 2vw, 20px);
}
@media (max-width: 900px) {
  .st-charts { grid-template-columns: 1fr; }
}

.st-chart-card { display: flex; flex-direction: column; gap: 14px; }

.st-chart-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; flex-wrap: wrap;
}
.st-chart-cap {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--st-text-mute);
  margin-bottom: 8px;
}
.st-chart-title {
  font-size: clamp(20px, 2.4vw, 26px); font-weight: 800;
  letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 8px;
}
.st-chart-title-sub {
  font-size: 12px; font-weight: 600;
  color: var(--st-text-soft);
  letter-spacing: .04em; text-transform: uppercase;
}

.st-chart-claim {
  text-align: right;
  display: flex; flex-direction: column; gap: 2px;
  font-size: 11px;
}
.st-claim-label {
  color: var(--st-text-mute);
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.st-claim-value {
  font-size: 14px; font-weight: 700; color: var(--st-text);
  font-variant-numeric: tabular-nums;
}
.st-claim-status {
  display: inline-flex; align-items: center; align-self: flex-end;
  padding: 2px 8px; border-radius: 999px;
  font-weight: 700; font-size: 11px;
}
.st-claim-status--ok {
  background: rgba(42,186,117,.14);
  color: var(--st-ok);
  border: 1px solid rgba(42,186,117,.32);
}

.st-chart-svg {
  width: 100%; height: 160px;
  display: block;
}
.st-chart-grid line {
  stroke: rgba(255,255,255,.06);
  stroke-width: .15;
  stroke-dasharray: .6 .6;
}

.st-chart-axis {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--st-text-mute);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
/* Hourly bars (24h) — peak hour rendered in bright blue with a label */
.st-hours {
  position: relative;
  display: flex; align-items: flex-end; gap: 4px;
  height: 160px;
  padding: 32px 0 4px;
}
.st-hour-bar {
  flex: 1 1 0;
  min-width: 0;
  background: linear-gradient(180deg, rgba(91,182,255,.32) 0%, rgba(42,92,223,.22) 100%);
  border-radius: 3px 3px 1px 1px;
  position: relative;
  cursor: default;
  transition: filter .15s;
}
.st-hour-bar:hover { filter: brightness(1.4); }
.st-hour-bar--peak {
  background: linear-gradient(180deg, #9CD0FF 0%, #5BB6FF 100%);
  box-shadow: 0 0 18px rgba(91,182,255,.35);
}
.st-hour-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--st-text);
  white-space: nowrap;
  pointer-events: none;
}
.st-hour-label::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #9CD0FF;
  box-shadow: 0 0 8px rgba(156,208,255,.6);
}

/* Aside variant: peak readout for the hourly chart head */
.st-chart-aside--peak {
  text-align: right;
  display: flex; flex-direction: column; gap: 2px;
}
.st-aside-peak {
  font-size: 12px;
  color: var(--st-text-soft);
  font-variant-numeric: tabular-nums;
}
.st-aside-peak strong {
  color: var(--st-text);
  font-weight: 800;
  letter-spacing: -.01em;
}
.st-aside-peak-meta {
  font-size: 12px;
  color: var(--st-text-mute);
  font-variant-numeric: tabular-nums;
}

/* Daily volume bars */
.st-bars {
  position: relative;
  display: flex; align-items: flex-end; gap: 4px;
  height: 160px;
  padding: 4px 0;
}
.st-bar {
  flex: 1 1 0;
  min-width: 0;
  background: linear-gradient(180deg, #5BB6FF 0%, #2A5CDF 100%);
  border-radius: 3px 3px 1px 1px;
  position: relative;
  transition: filter .15s;
  cursor: default;
}
.st-bar:hover { filter: brightness(1.18); }

.st-bar-ref {
  position: absolute;
  left: 0; right: 0;
  height: 0;
  border-top: 1px dashed rgba(255,255,255,.45);
  pointer-events: none;
}
.st-bar-ref span {
  position: absolute;
  right: 0; top: -10px;
  font-size: 10px; color: var(--st-text-soft);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: var(--navy);
  padding: 1px 6px; border-radius: 3px;
  border: 1px solid var(--st-line);
}

/* KPI variant: status indicator instead of a number */
.st-kpi--status {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(42,186,117,.12), transparent 55%),
    linear-gradient(180deg, rgba(42,186,117,.05), rgba(42,186,117,.01) 70%),
    var(--st-card);
  border-color: rgba(42,186,117,.22);
}
.st-kpi--status::before {
  /* Left-edge accent stripe */
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--st-ok) 0%, rgba(42,186,117,0) 90%);
  opacity: .65;
}
.st-kpi--status .st-kpi-cap {
  color: rgba(42,186,117,.72);
}
.st-kpi--status .st-kpi-status {
  display: flex; align-items: center; gap: 14px;
  margin-top: 4px;
  position: relative;
}
.st-kpi--status .st-status-label {
  font-size: clamp(15px, 1.6vw, 17px);
  font-weight: 700;
  letter-spacing: -.005em;
  color: var(--st-ok);
  text-shadow: 0 0 20px rgba(42,186,117,.30);
}
.st-kpi--status .st-kpi-lbl {
  position: relative;
  margin-top: 10px;
  color: rgba(42,186,117,.55);
  display: inline-flex; align-items: center; gap: 6px;
}
.st-kpi--status .st-kpi-lbl::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--st-ok);
  box-shadow: 0 0 6px rgba(42,186,117,.7);
  animation: st-beacon-blink 1.6s ease-in-out infinite;
}
@keyframes st-beacon-blink {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}

/* Beacon: glowing core with two staggered radiating rings */
.st-status-beacon {
  position: relative;
  display: inline-block;
  width: 14px; height: 14px;
  flex: none;
}
.st-status-beacon-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--st-ok);
  opacity: 0;
  animation: st-beacon-pulse 2.6s cubic-bezier(.22, .9, .39, .99) infinite;
}
.st-status-beacon-ring:nth-child(2) { animation-delay: 1.3s; }
.st-status-beacon-core {
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  margin-left: -4px; margin-top: -4px;
  border-radius: 50%;
  background: var(--st-ok);
  box-shadow:
    0 0 0 2px rgba(42,186,117,.20),
    0 0 14px 2px rgba(42,186,117,.55);
}
@keyframes st-beacon-pulse {
  0%   { opacity: .7; transform: scale(.55); }
  85%  { opacity: 0;  transform: scale(2.6); }
  100% { opacity: 0;  transform: scale(2.6); }
}

