/* =========================================================================
   GWBI Status (status.html)
   Deliberately plain, in the style of a hosted status page: narrow column,
   white cards, small type, traffic-light colours.
   ========================================================================= */

:root {
  --st-ok: #2FA86F;
  --st-ok-text: #1C7A4E;
  --st-minor: #E8A33B;
  --st-minor-text: #9A5F07;
  --st-minor-bg: #FFF6E6;
  --st-major: #E5733A;
  --st-crit: #D9473F;
  --st-none: #CDD2E3;
  --st-maint: #4268D3;
  --st-maint-bg: #EEF2FC;
}

body { background: var(--cloud); }
.st-wrap { max-width: 880px; }

/* ---------- Header ---------- */
.site-header--status { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); }
.site-header--status .wrap { justify-content: space-between; gap: 16px; min-height: 64px; }
.st-logo .word { font-size: 1.35rem; }
.st-logo .mark { width: 34px; height: 34px; }
.st-logo-label {
  font-family: var(--body); font-weight: 600; font-size: .95rem; color: var(--ink-soft);
  padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line); line-height: 1.6;
}
.st-head-actions { display: flex; align-items: center; gap: 18px; }
.st-back { font-size: .86rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.st-back:hover { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }

.st-sub { position: relative; }
.st-sub-btn {
  font: 600 .86rem/1 var(--body); color: var(--white); background: var(--blue-deep);
  border: 0; border-radius: 8px; padding: 11px 16px; cursor: pointer; white-space: nowrap;
}
.st-sub-btn:hover { background: #3558BC; }
.st-sub-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 300px;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lift);
  padding: 8px;
}
.st-sub-title { font-size: .8rem; color: var(--ink-soft); padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; line-height: 1.45; }
.st-sub-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: 0; border-radius: 8px; padding: 10px; cursor: pointer; color: var(--ink);
}
.st-sub-menu button:hover, .st-sub-menu button:focus-visible { background: var(--cloud); }
.st-sub-menu svg { width: 20px; height: 20px; flex: none; color: var(--blue-deep); }
.st-sub-menu b { display: block; font-size: .9rem; }
.st-sub-menu small { display: block; font-size: .78rem; color: var(--ink-faint); margin-top: 2px; }

@media (max-width: 640px) {
  .st-back { display: none; }
  .st-logo .word { display: none; }
  .st-sub-btn { padding: 10px 13px; font-size: .82rem; }
  .st-sub-menu { width: min(300px, calc(100vw - 32px)); }
}

/* ---------- Page ---------- */
.st-page { padding-block: 36px 64px; }
.st-section { margin-top: 28px; }
.st-section:has(> div:empty) { display: none; }
.st-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 12px; }
.st-section-head h2 { font-size: 1.25rem; font-weight: 700; }
.st-range { font-size: .82rem; color: var(--ink-faint); }
.st-range a { color: var(--blue-deep); }
.st-range-short { display: none; }
@media (max-width: 640px) { .st-range-long { display: none; } .st-range-short { display: inline; } }

.st-noscript { margin-top: 20px; padding: 16px 20px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }

/* ---------- Banner ---------- */
.st-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
  padding: 18px 22px; border-radius: 12px; color: var(--white); background: var(--st-ok);
}
.st-banner.is-minor { background: var(--st-minor); color: #3A2503; }
.st-banner-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.st-banner-icon {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.85); color: var(--st-minor-text); font: 800 1rem/1 var(--display);
}
.st-banner h1 { font-size: 1.2rem; font-weight: 700; color: inherit; letter-spacing: -0.01em; }
.st-banner p { font-size: .9rem; margin-top: 3px; }
.st-banner-meta { font-size: .8rem; opacity: .85; white-space: nowrap; }

/* ---------- Incident cards ---------- */
.st-incident { background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.st-incident > header { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.st-incident > header h3 { font-size: 1.05rem; font-weight: 700; }
.st-incident--active { border-color: #F1CF96; }
.st-incident--active > header { background: var(--st-minor-bg); border-color: #F1CF96; }
.st-incident--active .st-pill { background: var(--st-minor); color: #3A2503; }
.st-incident--maint { border-color: #C9D5F5; }
.st-incident--maint > header { background: var(--st-maint-bg); border-color: #C9D5F5; }
.st-incident--maint .st-pill { background: var(--st-maint); color: var(--white); }
.st-incident--maint > p { padding: 0 20px; font-size: .92rem; color: var(--ink-soft); margin-top: 12px; }
.st-incident--maint > p.st-maint-when { font-weight: 600; color: var(--ink); margin-top: 16px; }
.st-incident--maint > .st-affects { padding-bottom: 16px; }

.st-pill {
  flex: none; display: inline-block; font: 700 .68rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 6px; background: var(--cloud); color: var(--ink-soft); border: 1px solid var(--line);
}
.st-incident .st-pill { border: 0; }

.st-updates { list-style: none; margin: 0; padding: 4px 20px; }
.st-upd { padding: 12px 0; border-bottom: 1px solid var(--line); }
.st-upd:last-child { border-bottom: 0; }
.st-upd p { font-size: .92rem; line-height: 1.55; color: var(--ink); }
.st-upd b { font-weight: 700; }
.st-time { display: block; margin-top: 4px; font-size: .78rem; color: var(--ink-faint); }
.st-upd.is-new { animation: st-new 2.4s var(--ease); }
@keyframes st-new { 0% { background: var(--st-minor-bg); } 100% { background: transparent; } }
.st-affects { font-size: .8rem; color: var(--ink-faint); padding: 0 20px 14px; }
.st-past .st-affects { padding: 6px 0 0; }

/* ---------- Components ---------- */
.st-components { background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.st-group + .st-group { border-top: 1px solid var(--line); }
.st-group-title {
  font: 700 .72rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint);
  padding: 16px 20px 4px;
}
.st-comp { padding: 14px 20px 16px; }
.st-comp + .st-comp { border-top: 1px solid #EEF0F7; }
.st-comp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.st-comp-name { font-weight: 600; font-size: .95rem; line-height: 1.35; }
.st-comp-name .st-info { margin-left: 4px; vertical-align: 1px; }
.st-comp-state { font-size: .84rem; font-weight: 600; white-space: nowrap; }
.st-comp-state.st-ok { color: var(--st-ok-text); }
.st-comp-state.st-minor { color: var(--st-minor-text); }
.st-info {
  width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--line); background: var(--white);
  font: 700 .66rem/1 var(--body); color: var(--ink-faint); cursor: help; padding: 0; display: inline-grid; place-items: center; white-space: nowrap;
}
.st-info:hover, .st-info:focus-visible { border-color: var(--ink-faint); color: var(--ink); }

.st-bars { display: flex; gap: 2px; height: 32px; }
.st-bars .d { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--st-ok); cursor: pointer; transition: opacity .15s; }
.st-bars .d:hover { opacity: .65; }
.st-bars .d-minor { background: var(--st-minor); }
.st-bars .d-major { background: var(--st-major); }
.st-bars .d-crit, .st-bars .d-critical { background: var(--st-crit); }
.st-bars .d-none { background: var(--st-none); }
@media (max-width: 640px) {
  .st-bars { gap: 3px; height: 30px; }
  .st-bars .d:nth-child(-n+60) { display: none; }
}
.st-bars-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: .74rem; color: var(--ink-faint); white-space: nowrap; }
.st-bars-foot i { flex: 1; height: 1px; background: var(--line); }

.st-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 12px 0 0; padding: 0; font-size: .76rem; color: var(--ink-faint); }
.st-legend li { display: inline-flex; align-items: center; gap: 6px; }
.st-legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--st-ok); }
.st-legend .d-minor { background: var(--st-minor); }
.st-legend .d-major { background: var(--st-major); }
.st-legend .d-crit { background: var(--st-crit); }
.st-legend .d-none { background: var(--st-none); }

/* ---------- Tooltip ---------- */
.st-tip {
  position: fixed; z-index: 90; max-width: 260px; padding: 10px 12px; border-radius: 8px;
  background: var(--midnight); color: var(--on-dark); font-size: .8rem; line-height: 1.45;
  box-shadow: 0 10px 30px rgba(20,25,56,.25); pointer-events: none;
}
.st-tip b { display: block; color: var(--white); font-size: .82rem; }
.st-tip span { display: inline-block; margin-top: 2px; font-weight: 600; font-size: .76rem; }
.st-tip .tip-ok { color: #7FE0AE; }
.st-tip .tip-minor { color: #FFC66B; }
.st-tip .tip-major { color: #FF9F6B; }
.st-tip .tip-critical { color: #FF8C85; }
.st-tip .tip-nodata { color: var(--mist); }
.st-tip p { margin-top: 4px; color: var(--on-dark-soft); }
.st-tip span + p { margin-top: 4px; }

/* ---------- Past incidents ---------- */
.st-history { display: grid; gap: 0; }
.st-day { padding: 18px 0; border-bottom: 1px solid var(--line); }
.st-day:first-child { padding-top: 4px; }
.st-day > h3 { font-size: .98rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.st-quiet { font-size: .88rem; color: var(--ink-faint); }
.st-past + .st-past { margin-top: 18px; }
.st-past > header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-past h4 { font-family: var(--display); font-size: 1rem; font-weight: 700; color: var(--ink); }
.st-past.is-minor h4 { color: var(--st-minor-text); }
.st-past.is-major h4 { color: #B8521D; }
.st-past.is-critical h4 { color: #B42F28; }
.st-past .st-updates { padding: 0; }
.st-past .st-upd { padding: 8px 0; border: 0; }
.st-history-end { margin-top: 20px; font-size: .84rem; color: var(--ink-faint); font-style: italic; }

/* ---------- Footer ---------- */
.st-footer { border-top: 1px solid var(--line); background: var(--white); padding-bottom: env(safe-area-inset-bottom, 0px); }
.st-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-block: 22px 26px; font-size: .8rem; color: var(--ink-faint); }
.st-powered { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.st-powered img { width: 20px; height: 20px; }
.st-footer ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.st-footer ul a { color: var(--ink-soft); text-decoration: none; }
.st-footer ul a:hover { color: var(--blue-deep); text-decoration: underline; }
.st-footnote { flex-basis: 100%; }
