/* ---------------------------------------------------------------------------
   Tokens carried over from anubhavlal.dev so the status page reads as part of
   the same site. Status hues are the reserved status palette and are never
   themed; each one always ships alongside an icon and a text label.
   --------------------------------------------------------------------------- */
:root {
  --bg: #08080a;
  --panel: #0e0e11;
  --panel-raised: #131318;
  --hairline: #1c1c21;
  --hairline-strong: #26262c;
  --text: #e8e8ec;
  --muted: #7c7c86;
  --accent: #c4a47c;

  --good: #0ca30c;
  --warn: #fab219;
  --crit: #d03b3b;
  --idle: #26262c;

  --radius: 14px;
  --radius-sm: 8px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.shell {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------- masthead -------------------------------- */
.masthead {
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(196, 164, 124, 0.045), transparent);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 20px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.wordmark__domain {
  color: var(--text);
  font-weight: 600;
}

.wordmark__sep {
  color: var(--hairline-strong);
}

.wordmark__page {
  color: var(--muted);
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.live__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}

.live[data-live="true"] .live__pulse {
  background: var(--good);
  animation: pulse 2.4s ease-in-out infinite;
}

.live[data-live="stale"] .live__pulse {
  background: var(--warn);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.82);
  }
}

/* --------------------------------- hero ---------------------------------- */
.hero {
  padding-block: clamp(40px, 8vw, 72px) clamp(28px, 5vw, 44px);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: var(--panel);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.hero__headline {
  margin: 0;
  font-size: clamp(27px, 6vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.022em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero__meta {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.hero__meta b {
  color: var(--text);
  font-weight: 500;
}

/* The glyph is the non-colour half of every status: never colour alone. */
.glyph {
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--bg);
  font-weight: 700;
  line-height: 1;
}

.hero__glyph {
  width: 38px;
  height: 38px;
  font-size: 18px;
}

[data-state="up"] .glyph,
[data-state="operational"] .glyph {
  background: var(--good);
}

[data-state="degraded"] .glyph,
[data-state="partial_outage"] .glyph {
  background: var(--warn);
}

[data-state="down"] .glyph,
[data-state="major_outage"] .glyph {
  background: var(--crit);
}

[data-state="paused"] .glyph,
[data-state="unknown"] .glyph {
  background: var(--hairline-strong);
  color: var(--muted);
}

/* --------------------------------- tiles --------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: clamp(28px, 5vw, 44px);
}

@media (max-width: 620px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

.tile {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px 18px 18px;
}

.tile__label {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.tile__value {
  margin: 8px 0 0;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.tile__note {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* -------------------------------- sections ------------------------------- */
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section__title {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.toggle {
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease;
}

.toggle:hover {
  color: var(--text);
  border-color: var(--muted);
}

.cards {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
}

.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.card__name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card__sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 5px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: var(--panel-raised);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.pill .glyph {
  width: 16px;
  height: 16px;
  font-size: 9.5px;
}

/* ---------------------------- 90-day day-strip --------------------------- */
/* Day cells, not bars: colour encodes the day's state and the 2px surface gap
   does the separating. The tooltip carries the exact value for every cell. */
.strip {
  display: flex;
  gap: 2px;
  height: 34px;
  align-items: stretch;
}

.cell {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
  background: var(--idle);
  transition: transform 120ms ease, filter 120ms ease;
}

.cell[data-day="up"] {
  background: var(--good);
}

.cell[data-day="partial"] {
  background: var(--warn);
}

.cell[data-day="down"] {
  background: var(--crit);
}

.cell:hover,
.cell[data-active="true"] {
  filter: brightness(1.4);
  transform: scaleY(1.12);
}

.strip__axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--muted);
}

.strip__axis span:nth-child(2) {
  flex: 1;
  text-align: center;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Narrow screens drop the oldest half rather than squashing cells to slivers. */
@media (max-width: 700px) {
  .cell[data-half="old"] {
    display: none;
  }
}

/* --------------------------------- legend -------------------------------- */
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}

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

.legend__swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: none;
  background: var(--idle);
}

.legend__swatch[data-day="up"] {
  background: var(--good);
}

.legend__swatch[data-day="partial"] {
  background: var(--warn);
}

.legend__swatch[data-day="down"] {
  background: var(--crit);
}

/* -------------------------------- tooltip -------------------------------- */
.tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 110ms ease;
  background: var(--panel-raised);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  font-size: 12.5px;
  line-height: 1.45;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.tooltip[data-show="true"] {
  opacity: 1;
}

.tooltip__date {
  color: var(--muted);
  display: block;
  font-size: 11.5px;
}

.tooltip__value {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------- table view ------------------------------ */
.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13.5px;
}

caption {
  text-align: left;
  padding: 14px 16px 2px;
  color: var(--muted);
  font-size: 12.5px;
}

th,
td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

thead th {
  color: var(--muted);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td.num {
  font-variant-numeric: tabular-nums;
}

/* -------------------------------- notices -------------------------------- */
.notice {
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}

.notice b {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.skeleton {
  height: 118px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: linear-gradient(
    90deg,
    var(--panel) 0%,
    var(--panel-raised) 50%,
    var(--panel) 100%
  );
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

/* -------------------------------- footer --------------------------------- */
.footer {
  margin-top: clamp(44px, 8vw, 76px);
  border-top: 1px solid var(--hairline);
  padding-block: 22px clamp(28px, 6vw, 44px);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

::selection {
  background: #3e352c;
  color: var(--text);
}
