:root {
  color-scheme: light;
  --background: #f4f8fc;
  --background-deep: #eef4fb;
  --foreground: #0b1f33;
  --foreground-soft: #1c3148;
  --muted: #5f7187;
  --muted-strong: #3f556b;
  --border: #dbe4ee;
  --border-strong: #c3d2e0;
  --card: #ffffff;
  --card-soft: rgba(255, 255, 255, 0.84);
  --primary: #0d2b45;
  --primary-foreground: #ffffff;
  --accent: #0ea5e9;
  --accent-deep: #0369a1;
  --ring: rgba(14, 165, 233, 0.28);
  --ok: #059669;
  --ok-soft: rgba(5, 150, 105, 0.12);
  --fail: #dc2626;
  --fail-soft: rgba(220, 38, 38, 0.1);
  --shadow-sm: 0 1px 2px rgba(11, 31, 51, 0.06);
  --shadow-md: 0 18px 40px -18px rgba(11, 31, 51, 0.18);
  --shadow-lg: 0 40px 80px -30px rgba(11, 31, 51, 0.22);
  --radius-sm: 0.75rem;
  --radius-md: 1.25rem;
  --radius-lg: 1.75rem;
  --maxw: 1160px;
  --font-sans:
    "Mulish", "Mulish Local", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@font-face {
  font-family: "Mulish Local";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/mulish-400-latin-ext.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: "Mulish Local";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/mulish-400-latin.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: "Mulish Local";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/mulish-600-latin.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: "Mulish Local";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/mulish-700-latin.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: "Mulish Local";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/mulish-800-latin.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;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--background);
  background-image:
    radial-gradient(
      circle at 8% -4%,
      rgba(14, 165, 233, 0.22),
      transparent 34rem
    ),
    radial-gradient(
      circle at 92% 4%,
      rgba(124, 58, 237, 0.12),
      transparent 32rem
    ),
    radial-gradient(
      circle at 50% 120%,
      rgba(13, 43, 69, 0.08),
      transparent 40rem
    ),
    linear-gradient(180deg, var(--background) 0%, var(--background-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(11, 31, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 31, 51, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(
    ellipse at 50% 0%,
    rgba(0, 0, 0, 0.6),
    transparent 70%
  );
  -webkit-mask-image: radial-gradient(
    ellipse at 50% 0%,
    rgba(0, 0, 0, 0.6),
    transparent 70%
  );
}

a {
  color: var(--accent-deep);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 0.55rem 0.9rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

.site-shell {
  min-height: 100vh;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: rgba(244, 248, 252, 0.78);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid rgba(219, 228, 238, 0.7);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header-inner {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--maxw);
  padding: 0.9rem 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 850;
  font-size: 1.18rem;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--foreground);
}

.brand-mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  object-fit: contain;
}

.header-links {
  align-items: center;
  color: var(--muted-strong);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.header-links a {
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  transition:
    color 0.18s ease,
    background 0.18s ease;
}

.header-links a:hover {
  color: var(--foreground);
  background: rgba(14, 165, 233, 0.1);
}

.header-cta {
  background: var(--primary);
  color: #fff !important;
  font-weight: 700;
}
.header-cta:hover {
  background: #143a59 !important;
  color: #fff !important;
}

main {
  margin: 0 auto;
  max-width: var(--maxw);
  padding: 0 1.25rem 4rem;
  flex: 1;
  width: 100%;
}

.page-header {
  max-width: 820px;
  padding: 4rem 0 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin: 0 0 0.95rem;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 1.4rem;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 999px;
}

.page-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 850;
  letter-spacing: -0.05em;
  line-height: 1.02;
  margin: 0 0 1rem;
  color: var(--foreground);
}

.page-lede {
  color: var(--muted-strong);
  font-size: 1.08rem;
  line-height: 1.65;
  margin: 0 0 1.75rem;
  max-width: 820px; /* align with .page-header (h1 container) width */
  text-wrap: balance;
}

.page-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 1.1rem 1.25rem;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.page-meta dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
}

.page-meta dd {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--foreground);
}

.page-meta dd.is-ok {
  color: var(--ok);
}

.page-meta dd.is-fail {
  color: var(--fail);
}

.section {
  padding-top: 3rem;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 0.5rem;
}

.section-lede {
  color: var(--muted-strong);
  margin: 0 0 1.5rem;
  max-width: 100%; /* align with .section-heading (h2 container) width */
  text-wrap: balance;
}

.services-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.service-card {
  position: relative;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  padding: 1.15rem 1.2rem 1.2rem;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.service-card::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14, 165, 233, 0.35);
}

.service-card:hover::after {
  opacity: 1;
}

.service-card.is-ok::after {
  background: linear-gradient(90deg, var(--ok), rgba(5, 150, 105, 0.2));
}

.service-card.is-fail::after {
  background: linear-gradient(90deg, var(--fail), rgba(220, 38, 38, 0.2));
}

.service-card-head {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.status-badge {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.62rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-badge.fail {
  background: var(--fail-soft);
  color: var(--fail);
}

.service-url {
  color: var(--accent-deep);
  display: block;
  font-size: 0.86rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-url:hover {
  text-decoration: underline;
}

.service-detail {
  color: var(--muted-strong);
  font-size: 0.84rem;
  margin: 0;
}

.loading-state,
.error-state {
  color: var(--muted-strong);
  grid-column: 1 / -1;
  padding: 2rem 0;
  text-align: center;
}

.resource-card {
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  padding: 1.35rem 1.4rem;
  max-width: 720px;
}

.resource-card p {
  color: var(--muted-strong);
  line-height: 1.65;
  margin: 0 0 1rem;
}

.card-arrow a {
  font-weight: 700;
  text-decoration: none;
}

.card-arrow a:hover {
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.footer-bar {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.86rem;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--maxw);
  padding: 1.25rem;
}

.footer-bar a {
  color: var(--muted-strong);
  text-decoration: none;
}
.footer-bar a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .page-header {
    padding-top: 2.75rem;
  }
  .page-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- History: per-hour uptime dot grid (last 72h) --- */
.history-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hist-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hist-name {
  flex: 0 0 210px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--foreground-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  padding-right: 8px;
}

.hist-cells {
  display: grid;
  grid-template-columns: repeat(72, minmax(6px, 1fr));
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.hist-cell {
  height: 14px;
  border-radius: 2px;
}

.hist-ok {
  background: var(--ok);
}

.hist-fail {
  background: var(--fail);
}

.hist-nodata {
  background: var(--border);
  opacity: 0.45;
}

.hist-axis .hist-cells {
  gap: 2px;
}

.hist-label {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
  text-align: left;
  line-height: 14px;
}

.history-wrap {
  overflow-x: auto;
}

.history-note {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 768px) {
  .hist-name {
    flex-basis: 120px;
    font-size: 0.74rem;
  }
  .hist-cells {
    grid-template-columns: repeat(72, 8px);
  }
  .hist-cell {
    height: 12px;
  }
}
