/* status.redacted.gg in the look of redacted.gg, with an Ice page, Ink text, a dark floating bar and a Night footer. */

@font-face {
  font-family: "Figtree Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(fonts/figtree-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(fonts/figtree-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* redacted.gg colors */
  --ice: #f3f7fa;
  --ink: #0a111c;
  --ink-2: #3c4757;
  --mute: #6a7686;
  --night: #05080d;
  --night-2: #0b1119;
  --cyan: #3bd8cf;
  --sky: #29b4f2;
  --blue: #1f8ff0;
  --amber: #f5b13d;
  --alert: #f2545b;
  --grad: linear-gradient(160deg, #3bd8cf 0%, #29b4f2 48%, #1f8ff0 100%);
  /* darker shades of the signal colors for small text on light backgrounds (WCAG AA) */
  --ok-text: #0a7570;
  --warn-text: #8a5b00;
  --down-text: #c0272f;
  --border: rgba(10, 17, 28, 0.07);
  --card: rgba(255, 255, 255, 0.85);
  --sans: "Figtree Variable", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono Variable", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

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

html {
  background: var(--ice);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  background: var(--ice);
  overflow-x: clip;
}

::selection {
  background: var(--sky);
  color: #fff;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 16px;
}

/* ---------- floating bar, as on redacted.gg */

.nav-wrap {
  position: fixed;
  inset: 12px 0 auto;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 6px 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(11, 17, 25, 0.9);
  color: #fff;
  box-shadow: 0 10px 40px -12px rgba(5, 8, 13, 0.55);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.nav :focus-visible,
.foot :focus-visible,
.banner :focus-visible {
  outline-color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 6px;
  border-radius: 12px;
  text-decoration: none;
}
.brand img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-page {
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
}

.nav-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.nav-cta:hover {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(31, 143, 240, 0.8);
}

@media (min-width: 640px) {
  .nav {
    width: auto;
  }
  .nav-cta {
    margin-left: 28px;
  }
}

/* ---------- page */

.main {
  flex: 1;
  width: 100%;
  max-width: 912px;
  margin: 0 auto;
  padding: 120px 16px 96px;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 6.4vw, 56px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 40rem;
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
}

/* when the results were refreshed: a quiet line inside the overall banner */
.fresh {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
.fresh.is-stale {
  color: #f5c26b;
}
.fresh.is-empty {
  display: none;
}

/* ---------- overall banner: a dark panel like the ones on redacted.gg, glowing in the state's color */

.banner {
  --glow: rgba(255, 255, 255, 0.08);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 24px 20px;
  border-radius: 28px;
  background: var(--ink);
  color: #fff;
}
.banner::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -90px;
  top: -140px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  filter: blur(20px);
}
.tone-ok {
  --glow: rgba(59, 216, 207, 0.32);
}
.tone-warn {
  --glow: rgba(245, 177, 61, 0.3);
}
.tone-down {
  --glow: rgba(242, 84, 91, 0.36);
}

.banner-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}
.banner-icon svg {
  width: 22px;
  height: 22px;
}
.tone-ok .banner-icon {
  background: var(--grad);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.tone-warn .banner-icon {
  background: var(--amber);
  color: var(--ink);
}
.tone-down .banner-icon {
  background: var(--alert);
  color: #fff;
}

.banner-body {
  min-width: 0;
  padding-top: 2px;
}

.banner-title {
  margin: 0;
  font-size: clamp(22px, 3.6vw, 30px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.banner-detail {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}
.banner-detail:empty {
  display: none;
}
.banner-detail a {
  color: #fff;
  text-underline-offset: 3px;
}

.banner-incidents {
  margin: 0;
  padding: 0;
  list-style: none;
}
.banner-incidents:not(:empty) {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.banner-incidents li {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}
.banner-incidents li + li {
  margin-top: 6px;
}
.banner-incidents a {
  color: #fff;
  font-weight: 500;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .main {
    padding: 152px 24px 112px;
  }
  .banner {
    gap: 22px;
    padding: 32px 36px;
  }
  .banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
}

/* ---------- sections and cards */

.block {
  margin-top: 64px;
}

.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
}
.block-head h2 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.block-note {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

.card {
  margin: 20px 0 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
}

/* ---------- services */

.services {
  list-style: none;
}

.svc {
  padding: 20px;
  border-top: 1px solid var(--border);
}
.svc:first-child {
  border-top: 0;
}
.svc-empty {
  color: var(--ink-2);
}

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

.svc-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  min-width: 0;
}
.svc-name h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px 3px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.pill-up {
  background: rgba(59, 216, 207, 0.16);
  color: var(--ok-text);
}
.pill-warn {
  background: rgba(245, 177, 61, 0.18);
  color: var(--warn-text);
}
.pill-down {
  background: rgba(242, 84, 91, 0.12);
  color: var(--down-text);
}
.pill-unknown {
  background: rgba(10, 17, 28, 0.06);
  color: var(--ink-2);
}

.bar {
  display: flex;
  gap: 2px;
  height: 34px;
  margin-top: 14px;
  border-radius: 4px;
  cursor: default;
  touch-action: pan-y;
}
.bar:focus-visible {
  outline-offset: 4px;
}

.day {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
  background: var(--c);
  transition: opacity 0.15s;
}
.bar.has-on .day {
  opacity: 0.45;
}
.bar.has-on .day.is-on {
  opacity: 1;
}

.d-up {
  --c: var(--cyan);
}
.d-warn {
  --c: var(--amber);
}
.d-down {
  --c: var(--alert);
}
.d-none {
  --c: rgba(10, 17, 28, 0.09);
}

.axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--mute);
}
.axis .ax-60,
.axis .ax-30 {
  display: none;
}

/* fewer days on narrow screens, so each day stays wide enough to tap */
@media (max-width: 719px) {
  .bar .day:nth-child(-n + 30) {
    display: none;
  }
  .axis .ax-90 {
    display: none;
  }
  .axis .ax-60 {
    display: inline;
  }
}
@media (max-width: 479px) {
  .bar .day:nth-child(-n + 60) {
    display: none;
  }
  .axis .ax-60 {
    display: none;
  }
  .axis .ax-30 {
    display: inline;
  }
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 14px 0 0;
}
.stats dt {
  font-size: 12px;
  color: var(--mute);
}
.stats dd {
  margin: 1px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

@media (min-width: 768px) {
  .svc {
    padding: 22px 28px;
  }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 14px 0 0;
  padding: 0 4px;
  list-style: none;
  font-size: 13px;
  color: var(--ink-2);
}
.legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.swatch {
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: var(--c);
}

/* ---------- day tooltip */

.tip {
  position: absolute;
  z-index: 60;
  top: 0;
  left: 0;
  max-width: 240px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--night-2);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 12px 32px -12px rgba(5, 8, 13, 0.6);
  pointer-events: none;
}
.tip[hidden] {
  display: none;
}
.tip::after {
  content: "";
  position: absolute;
  left: var(--ax, 50%);
  bottom: -4px;
  width: 9px;
  height: 9px;
  background: inherit;
  border-radius: 2px;
  transform: translateX(-50%) rotate(45deg);
}
.tip.is-below::after {
  top: -4px;
  bottom: auto;
}
.tip-date {
  display: block;
  font-weight: 600;
}
.tip-text {
  display: block;
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- incidents */

.incidents {
  margin: 0;
  padding: 0;
  list-style: none;
}
.inc {
  padding: 18px 20px;
  border-top: 1px solid var(--border);
}
.inc:first-child {
  border-top: 0;
}
.inc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.inc-title {
  min-width: 0;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.inc-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--ink-2);
}
.inc-meta time {
  font-family: var(--mono);
  font-size: 12.5px;
}

@media (min-width: 768px) {
  .inc {
    padding: 20px 28px;
  }
}

.empty {
  margin: 0;
  padding: 22px 20px;
  font-size: 15px;
  color: var(--ink-2);
}

.after-card {
  margin: 14px 0 0;
  padding: 0 4px;
  font-size: 14px;
  color: var(--ink-2);
}
.after-card:empty {
  display: none;
}
.after-card a,
.empty a {
  color: var(--ink);
  text-underline-offset: 3px;
}

/* ---------- footer, Night as on redacted.gg */

.foot {
  padding: 48px 16px 36px;
  background: var(--night);
  color: #fff;
}
.foot-inner {
  max-width: 864px;
  margin: 0 auto;
}
.foot-text {
  max-width: 42rem;
  margin: 20px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.62);
}
.foot-text a {
  color: #fff;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}
.foot-text time {
  font-family: var(--mono);
  font-size: 13px;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin: 32px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
}
.foot-row a {
  color: inherit;
  text-decoration: none;
}
.foot-row a:hover {
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .nav-cta,
  .day {
    transition: none;
  }
}
