/* ───────────  Base / Reset  ─────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* Palette */
  --hpa-primary:  #0066ff;
  --hpa-success:  #27ae60;
  --hpa-danger:   #e74c3c;
  --hpa-warning:  #f39c12;
  --hpa-bg:       #f7f9fc;
  --hpa-surface:  #ffffff;
  --hpa-border:   #e5e9f2;
  --hpa-text:     #1a1d23;
  --hpa-muted:    #6b7280;

  /* Shadows & Radius */
  --radius: 12px;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, .06);
}

html, body {
  margin: 0;
  font-family: "Inter", Roboto, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--hpa-text);
  background: var(--hpa-bg);
}

/* ───────────  Typography  ─────────── */
h1, h2, h3, h4 {
  margin: 0 0 .6em 0;
  font-weight: 600;
  line-height: 1.25;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; color: var(--hpa-muted); }

a { color: var(--hpa-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ───────────  Layout Helpers  ─────────── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

/* Flex utility for header rows */
.f {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

/* ───────────  NavBar  ─────────── */
nav {
  background: var(--hpa-surface);
  border-bottom: 1px solid var(--hpa-border);
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 0;
  z-index: 50;
}
nav ul {
  margin: 0;
  padding: .5rem 1.5rem;
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
nav a {
  font-weight: 500;
  color: var(--hpa-text);
  padding-bottom: .25rem;
}
nav a[aria-current] {
  border-bottom: 2px solid var(--hpa-primary);
}

/* ───────────  Site Cards  ─────────── */
article {
  background: var(--hpa-surface);
  border: 1px solid var(--hpa-border);
  border-left: 6px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 1.25rem 1.5rem;
  margin-bottom: .75rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
article:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* State colours */
article.up        { border-left-color: var(--hpa-success); }
article.down {
  background-color: #fbeaea; /* Light red background for contrast */
  color: #600; /* Dark red text for readability */
}
article.down a {
  color: #0066cc; /* Ensure links are visible on light background */
}
article.degraded  { border-left-color: var(--hpa-warning); }

/* Title + tag row */
article .f h4 { margin: 0; font-weight: 600; }

/* ───────────  Tags / Badges  ─────────── */
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  font-size: .75rem;
  font-weight: 600;
  color: #fff;
  border-radius: 9999px;
  vertical-align: middle;
}
.tag.up        { background: var(--hpa-success); }
.tag.down      { background: var(--hpa-danger);  }
.tag.degraded  { background: var(--hpa-warning); }
.tag.closed    { background: var(--hpa-muted);   }

/* ───────────  Buttons (issues / error links)  ─────────── */
a.error-button {
  display: inline-block;
  padding: .45rem .9rem;
  font-size: .8rem;
  border: 2px solid var(--hpa-danger);
  color: var(--hpa-danger);
  border-radius: var(--radius);
  font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
a.error-button:hover {
  background: var(--hpa-danger);
  color: #fff;
}

/* ───────────  Forms (subscribe)  ─────────── */
.submit-button {
  appearance: none;
  background: var(--hpa-primary);
  color: #fff;
  border: none;
  padding: .55rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.submit-button:hover {
  background: #004fcc;
}

/* ───────────  Graph / Sparkline tweak  ─────────── */
article .graph {
  opacity: .9;
  filter: saturate(1.2);
  margin-top: 1rem;
}

/* ───────────  Logo Customizations  ─────────── */
.logo {
  padding: 1rem;
}

.logo img {
  border-radius: 0;
}
