/* ProjectPro's status page, in the homepage's look (after resend.com): black ground, Inter, white
   and grey type, one lavender accent, and quiet glass cards. Adapted from status.sodalite.app. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #000000;
  --card: rgba(255, 255, 255, 0.03);
  --card-solid: #0b0b0c;
  --fg: #ffffff;
  --muted: #a1a1aa;
  --faint: #71717a;
  --edge: rgba(255, 255, 255, 0.09);
  --nodata: #27272a;
  --good: #22c55e;
  --warning: #f59e0b;
  --critical: #ef4444;
  --maint: #8b7cf6;
  --series: #8b7cf6;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); color-scheme: dark; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  background: radial-gradient(900px 480px at 50% -140px, rgba(139, 124, 246, 0.16), transparent 70%), var(--bg);
  background-repeat: no-repeat;
  min-height: 100vh;
}
a { color: inherit; }
.wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 64px; }

nav { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; margin-right: auto; }
.brand span { color: var(--muted); font-weight: 500; }
.brand .mark { width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(160deg, #ffffff, #a1a1aa); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.nav-link { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav-link:hover { color: var(--fg); }
.brand { white-space: nowrap; }
@media (max-width: 420px) { .nav-link { display: none; } }
.open { color: #000; background: #fff; text-decoration: none; font-weight: 500; font-size: 14px; padding: 8px 16px; border-radius: 10px; white-space: nowrap; }

section { margin-top: 40px; }
h2 { font-size: 14px; font-weight: 500; color: var(--muted); margin: 0 0 12px; }
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), var(--card) 42%);
  border: 1px solid var(--edge); border-radius: 16px;
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 20px 50px -30px rgba(0, 0, 0, 0.8);
}
@media (prefers-reduced-transparency: reduce) { .card { background: var(--card-solid); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.empty { color: var(--muted); font-size: 14px; padding: 18px 20px; }

.icon { width: 18px; height: 18px; flex: none; }
.is-up .icon, .s-up { color: var(--good); }
.is-slow .icon, .s-slow { color: var(--warning); }
.is-down .icon, .s-down { color: var(--critical); }
.is-maint .icon, .s-maint { color: var(--maint); }
.is-unknown .icon, .s-unknown { color: var(--faint); }

/* overall */
.banner { display: flex; align-items: center; gap: 14px; padding: 22px 22px; }
.banner .icon { width: 30px; height: 30px; }
.banner h1 { font-size: clamp(20px, 4vw, 26px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; margin: 0; }
.banner p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* notices: active incidents and maintenance */
.notice { padding: 18px 20px; margin-top: 12px; border-left: 4px solid var(--edge); }
.notice.impact-minor { border-left-color: var(--warning); }
.notice.impact-major, .notice.impact-critical { border-left-color: var(--critical); }
.notice.maint { border-left-color: var(--maint); }
.notice h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.notice .when { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.notice .body { margin: 10px 0 0; font-size: 14px; white-space: pre-line; }
.affects { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.updates { list-style: none; margin: 12px 0 0; padding: 0; }
.updates li { padding: 10px 0 0; font-size: 14px; }
.updates li + li { border-top: 1px solid var(--edge); margin-top: 10px; }
.updates strong { text-transform: capitalize; }
.updates time { color: var(--muted); font-size: 12px; display: block; }
.updates p { margin: 2px 0 0; white-space: pre-line; }

/* components with uptime bars */
.component { padding: 18px 20px; }
.component + .component { border-top: 1px solid var(--edge); }
.component-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.component-name { font-weight: 700; margin-right: auto; }
.component-uptime { color: var(--muted); font-size: 13px; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.bars { display: flex; gap: 2px; height: 34px; margin-top: 12px; touch-action: manipulation; }
.bar { flex: 1; min-width: 0; border-radius: 2px; background: var(--nodata); cursor: default; }
.bar.b-up { background: var(--good); }
.bar.b-slow { background: var(--warning); }
.bar.b-down { background: var(--critical); }
.bar.b-maint { background: var(--maint); }
.bar:hover, .bar.active { outline: 2px solid var(--fg); outline-offset: 1px; }
.axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-top: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 12px; margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.tile { padding: 16px 20px; }
.tile + .tile { border-left: 1px solid var(--edge); }
.tile .label { color: var(--muted); font-size: 13px; }
.tile .value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile:nth-child(3) { border-left: 0; }
  .tile:nth-child(n+3) { border-top: 1px solid var(--edge); }
  .tiles.three { grid-template-columns: repeat(3, 1fr); }
  .tiles.three .tile:nth-child(3) { border-left: 1px solid var(--edge); border-top: 0; }
  .tile { padding: 14px 14px; }
  .tile .value { font-size: 20px; }
}

/* response time */
.chart { position: relative; padding: 8px 20px 12px; border-top: 1px solid var(--edge); }
.chart svg { display: block; width: 100%; height: 180px; overflow: visible; }
.chart .grid line { stroke: var(--edge); stroke-width: 1; }
.chart .grid text, .chart .xaxis text { fill: var(--faint); font-size: 11px; }
.chart .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; }
.chart .area { fill: var(--series); opacity: 0.12; }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart .dot { fill: var(--series); stroke: var(--card); stroke-width: 2; }

/* events */
.events { list-style: none; margin: 0; padding: 0; }
.events li { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px; font-size: 14px; }
.events li + li { border-top: 1px solid var(--edge); }
.events .what { flex: 1; }
.events .meta { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }

/* past incidents */
.history .day { padding: 16px 20px; }
.history .day + .day { border-top: 1px solid var(--edge); }
.history h3 { font-size: 14px; color: var(--muted); margin: 0; font-weight: 600; }
.history .incident { margin-top: 12px; }
.history .incident h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }

.tip {
  position: fixed; z-index: 10; pointer-events: none;
  background: var(--card-solid); color: var(--fg); border: 1px solid var(--edge); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; line-height: 1.4; max-width: 240px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.tip strong { display: block; font-size: 15px; }
.tip .sub { color: var(--muted); }

footer { margin-top: 48px; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sprite { position: absolute; width: 0; height: 0; }
.legend .l-good { background: var(--good); }
.legend .l-slow { background: var(--warning); }
.legend .l-down { background: var(--critical); }
.legend .l-maint { background: var(--maint); }
.legend .l-none { background: var(--nodata); }
