/* ---- «Все работает» (status.html + status.js): the services' state now and their last 30 days -- */
:root {
  --st-ok: #128a4d;       /* text and icons on white: green with enough contrast */
  --st-ok-bar: #1fae63;
  --st-warn: #a35f00;
  --st-warn-bar: #e59a12;
  --st-down: #c42a22;
  --st-down-bar: #d6342c;
  --st-none: #dfe3ea;
}
.st-head { max-width: 760px; margin: 0 auto; padding: 72px 0 0; text-align: center; }
.st-head .lead { margin: 18px auto 0; }

.st-now { display: flex; align-items: center; gap: 18px; max-width: 860px; margin: 40px auto 0; padding: 24px 28px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .78); border: 1px solid #fff; box-shadow: var(--shadow); }
.st-now p { margin: 0; }
.st-now-title { font: 600 clamp(22px, 2.6vw, 30px)/1.2 var(--display); letter-spacing: -.03em; }
.st-now-time { margin-top: 4px !important; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.st-now .st-icon { width: 44px; height: 44px; flex: none; }

/* State icons: a shape and a colour, always next to a word. */
.st-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--st-none); color: #fff; flex: none; }
.st-icon svg { width: 62%; height: 62%; }
[data-level="ok"] > .st-icon { background: var(--st-ok); }
[data-level="degraded"] > .st-icon { background: var(--st-warn-bar); }
[data-level="down"] > .st-icon { background: var(--st-down); }
[data-level=""] > .st-icon { background: var(--st-none); color: var(--muted); }

.st-list { max-width: 860px; margin: 16px auto 0; padding: 0 28px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .78); border: 1px solid #fff; box-shadow: var(--shadow); min-height: 120px; }
.st-state { margin: 0; padding: 40px 0; text-align: center; color: var(--ink2); }
.st-state p { margin: 0 0 18px; }
.st-item { padding: 22px 0 18px; }
.st-item + .st-item { border-top: 1px solid var(--line); }
.st-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.st-name { margin: 0; font: 600 18px/1.3 var(--display); letter-spacing: -.02em; }
.st-what { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.st-level { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-weight: 600; font-size: 15px; white-space: nowrap; }
.st-level[data-level="ok"] { color: var(--st-ok); }
.st-level[data-level="degraded"] { color: var(--st-warn); }
.st-level[data-level="down"] { color: var(--st-down); }
.st-level[data-level=""] { color: var(--muted); }

/* 30 days, one bar a day; the tooltip says the date and the share of checks that found it working. */
.st-days { position: relative; margin-top: 14px; }
.st-bars { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; height: 34px; padding: 0; margin: 0; list-style: none; border-radius: 6px; cursor: default; }
.st-bars:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.st-bars li { border-radius: 3px; background: var(--st-none); }
.st-bars li[data-level="ok"] { background: var(--st-ok-bar); }
.st-bars li[data-level="degraded"] { background: var(--st-warn-bar); }
.st-bars li[data-level="down"] { background: var(--st-down-bar); }
.st-bars li.on { box-shadow: 0 0 0 2px var(--ink); }
.st-scale { display: flex; justify-content: space-between; gap: 8px; white-space: nowrap; margin-top: 8px; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.st-scale b { font-weight: 500; color: var(--ink2); }
.st-tip { position: absolute; bottom: calc(100% + 8px); z-index: 2; transform: translateX(-50%); padding: 8px 12px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; line-height: 1.35; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.st-tip span { display: block; color: #c3c8d6; font-size: 13px; }
.st-tip[hidden] { display: none; }

.st-since { max-width: 860px; margin: 14px auto 0; padding: 0 6px; color: var(--muted); font-size: 14.5px; }
.st-help { max-width: 860px; margin: 72px auto 0; }
.st-help h2 { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.03em; }
.st-help p { margin: 12px 0 0; color: var(--ink2); max-width: 40em; }
.st-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.st-links a { color: var(--blue); font-weight: 600; text-decoration: none; }
.st-links a:hover { text-decoration: underline; }
.st-links a:focus-visible, .st-state .pill:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 680px) {
  .st-head { padding-top: 44px; }
  .st-now { padding: 18px 20px; gap: 14px; border-radius: 22px; }
  .st-now .st-icon { width: 36px; height: 36px; }
  .st-list { padding: 0 16px; border-radius: 22px; }
  .st-item { padding: 18px 0 16px; }
  .st-name { font-size: 17px; }
  .st-level { margin-left: 0; width: 100%; order: 3; }
  .st-bars { gap: 2px; height: 30px; }
  .st-bars li { border-radius: 2px; }
  .st-scale { flex-wrap: wrap; row-gap: 4px; }
  .st-scale .st-avail { order: 3; flex-basis: 100%; }
  .st-help { margin-top: 56px; }
}
