/* Ink on paper, laid out the way a status page is expected to look: a banner
   that states the verdict, a list of components each with ninety days of bars
   behind it, and a history underneath. */

:root {
  --ink: #1b1b1b;
  --ink-soft: #4a4a4a;
  --ink-faint: #8b8b8b;
  --rule: #e3e3e3;
  --rule-soft: #efefef;
  --paper: #fff;
  --ok: #2fcc66;
  --ok-deep: #008148;
  --warn: #f5a623;
  --warn-deep: #b8730f;
  --bad: #e8483f;
  --bad-deep: #b32b23;
  --none: #d5d8dc;
  --info-deep: #2455b8;
  --link: #2f5bea;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--paper);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) clamp(16px, 4vw, 24px) 64px;
}

a {
  color: var(--link);
}

/* ── masthead ───────────────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 5vw, 48px);
}

.brand {
  font-size: clamp(34px, 6vw, 46px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* ── banner ─────────────────────────────────────────────────────────── */

.banner {
  display: flex;
  align-items: center;
  min-height: 84px;
  padding: 18px 22px;
  border-radius: 4px;
  background: var(--ink-faint);
  color: #fff;
  font-size: clamp(19px, 2.6vw, 24px);
  transition: background-color 0.3s ease;
}

/* The four states a page can be in, coloured the way Atlassian colours them. */
.banner.operational {
  background: var(--ok-deep);
}

.banner.minor {
  background: var(--warn-deep);
}

.banner.partial {
  background: #d1600a;
}

.banner.major {
  background: var(--bad-deep);
}

.uptime-note {
  margin: 46px 0 10px;
  font-size: 13px;
  color: var(--ink-faint);
  text-align: right;
}

/* ── components ─────────────────────────────────────────────────────── */

.components {
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.component {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--rule-soft);
}

.component:last-child {
  border-bottom: none;
}

.component-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.component-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 17px;
}

/* The circled question mark Statuspage puts beside a component name. */
.hint {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink-faint);
  font-size: 11px;
  cursor: help;
  user-select: none;
}

.component-state {
  font-size: 14px;
  color: var(--ok-deep);
  white-space: nowrap;
}

.component-state.degraded {
  color: var(--warn-deep);
}

.component-state.partial {
  color: #d1600a;
}

.component-state.major {
  color: var(--bad-deep);
}

.bars {
  display: flex;
  gap: 2px;
  height: 34px;
  margin-top: 12px;
}

.bar {
  flex: 1 1 0;
  min-width: 2px;
  border-radius: 1px;
  background: var(--none);
  transition: filter 0.12s ease;
}

.bar.ok {
  background: var(--ok);
}

.bar.warn {
  background: var(--warn);
}

.bar.bad {
  background: var(--bad);
}

.bar:hover {
  filter: brightness(0.85);
}

.scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-faint);
}

.scale::before,
.scale::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.scale span {
  flex: none;
}

.scale .edge {
  color: var(--ink-faint);
}

/* ── history ────────────────────────────────────────────────────────── */

.history {
  margin-top: 56px;
}

.history h2 {
  font-size: 28px;
  font-weight: 400;
}

.history-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-faint);
}

.day {
  margin-top: 30px;
}

.day-title {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  font-size: 18px;
}

.day-empty {
  margin-top: 12px;
  color: var(--ink-faint);
}

.incident {
  margin-top: 18px;
}

.incident-name {
  font-size: 17px;
  font-weight: 600;
}

.incident-name.open {
  color: var(--bad-deep);
}

.incident-meta {
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-faint);
}

.updates {
  margin-top: 10px;
  padding-left: 14px;
  border-left: 2px solid var(--rule);
}

.update {
  margin-bottom: 10px;
}

.update:last-child {
  margin-bottom: 0;
}

.update-status {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.update-status.resolved {
  color: var(--ok-deep);
}

.update-status.investigating {
  color: var(--bad-deep);
}

.update-text {
  font-size: 14px;
  color: var(--ink-soft);
}

.update-time {
  font-size: 12px;
  color: var(--ink-faint);
}

/* ── footer ─────────────────────────────────────────────────────────── */

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--ink-faint);
}

.foot-links {
  display: inline-flex;
  gap: 18px;
}

/* Announced work: blue, the way Atlassian marks maintenance — a state of its
   own, neither healthy green nor alarming red. */
.banner.maintenance {
  background: var(--info-deep);
}

.component-state.maintenance {
  color: var(--info-deep);
}

/* A planned window is open, but nothing is wrong: blue rather than alarm red. */
.incident-name.open.maintenance {
  color: var(--info-deep);
}

.update-status.maintenance {
  color: var(--info-deep);
}

/* Значки состояний: цвет берут от текста рядом, поэтому в баннере они белые,
   а в строке сервиса — того же цвета, что и подпись. */
.ico {
  flex: none;
}

.banner .ico {
  margin-right: 14px;
}

.component-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Пометка зеркала. На основной странице её нет — поле приходит только с копии,
   которую раздаёт наш сервер. */
.mirror-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-faint);
  text-align: right;
}

.mirror-note.stale {
  color: var(--warn-deep);
}
