:root {
  --background: #f3f4f6;
  --background-rgb: 243 244 246;
  --foreground: #0a0d14;
  --foreground-rgb: 10 13 20;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --yellow-500: #eab308;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --red-500: #ef4444;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0d14;
    --background-rgb: 10 13 20;
    --foreground: #f3f4f6;
    --foreground-rgb: 243 244 246;
    --green-600: #22c55e;
    --orange-600: #f97316;
    --blue-600: #3b82f6;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Inter", Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: rgb(var(--foreground-rgb) / 0.75);
}

button,
input,
textarea,
select {
  font: inherit;
}

.page-shell,
.page {
  min-height: 100vh;
  background: var(--background);
}

.center-screen {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid rgb(var(--foreground-rgb) / 0.2);
  border-top-color: var(--foreground);
  border-radius: 999px;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-message {
  font-size: 0.875rem;
  text-align: center;
}

.container {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  border-bottom: 1px solid rgb(var(--foreground-rgb) / 0.1);
}

.header-bar {
  display: flex;
  width: 100%;
  align-items: center;
  border-bottom: 1px solid rgb(var(--foreground-rgb) / 0.1);
  padding: 1rem;
}

.header-inner {
  display: flex;
  width: 100%;
  max-width: 64rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.logo-wrap {
  flex-shrink: 0;
}

.logo {
  display: block;
  height: 3rem;
  max-width: 12rem;
  object-fit: contain;
  object-position: left center;
}

.logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .logo-light {
    display: none;
  }

  .logo-dark {
    display: block;
  }
}

.subscribe-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgb(var(--foreground-rgb) / 0.2);
  border-radius: 0.75rem;
  background: var(--background);
  color: var(--foreground);
  padding: 0.625rem 1rem 0.625rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  transition: background 150ms ease, border-color 150ms ease;
  white-space: nowrap;
}

.subscribe-button:hover {
  border-color: rgb(var(--foreground-rgb) / 0.2);
  background: rgb(var(--foreground-rgb) / 0.05);
  color: var(--foreground);
}

.icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.icon-small {
  width: 0.75rem;
  height: 0.75rem;
}

.content {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.summary-card {
  margin-bottom: 2rem;
  border: 1px solid rgb(var(--foreground-rgb) / 0.1);
  border-radius: 1rem;
  background: var(--background);
  padding: 1rem;
}

.summary-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.summary-title {
  margin: 0;
  color: var(--foreground);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.tabs {
  margin-bottom: 2rem;
  border-bottom: 1px solid rgb(var(--foreground-rgb) / 0.1);
}

.tab-list {
  display: flex;
  gap: 2rem;
}

.tab-button {
  position: relative;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: rgb(var(--foreground-rgb) / 0.5);
  padding: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 150ms ease;
}

.tab-button:hover {
  color: rgb(var(--foreground-rgb) / 0.75);
}

.tab-button.is-active {
  color: var(--foreground);
}

.tab-button.is-active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--foreground);
  content: "";
}

.section-title {
  margin: 0 0 1.5rem;
  color: var(--foreground);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.services {
  display: grid;
  gap: 0.5rem;
}

.services .section-title {
  margin-bottom: 0;
}

.card {
  border: 1px solid rgb(var(--foreground-rgb) / 0.1);
  border-radius: 0.75rem;
  background: var(--background);
  padding: 1rem;
}

.service-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.service-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
}

.service-title {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--foreground);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.uptime {
  flex-shrink: 0;
  text-align: right;
}

.uptime-value {
  color: var(--green-600);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.1;
}

.uptime-label {
  margin-top: 0.125rem;
  color: rgb(var(--foreground-rgb) / 0.5);
  font-size: 0.75rem;
}

.timeline {
  display: grid;
  gap: 0.5rem;
}

.timeline-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgb(var(--foreground-rgb) / 0.5);
  font-size: 0.75rem;
}

.timeline-blocks {
  display: flex;
  gap: 2px;
}

.timeline-block {
  height: 2.5rem;
  min-width: 2px;
  flex: 1 1 0;
  border-radius: 2px;
  transition: opacity 150ms ease;
}

.timeline-block:hover {
  opacity: 0.8;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding-top: 0.5rem;
  color: rgb(var(--foreground-rgb) / 0.5);
  font-size: 0.75rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dot {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  border-radius: 999px;
}

.dot-large {
  width: 1rem;
  height: 1rem;
}

.dot-small {
  width: 0.5rem;
  height: 0.5rem;
}

.dot-green {
  background: var(--green-500);
}

.dot-yellow {
  background: var(--yellow-500);
}

.dot-orange {
  background: var(--orange-500);
}

.dot-red {
  background: var(--red-500);
}

.dot-gray {
  background: #6b7280;
}

.dot-muted {
  border: 1px solid rgb(var(--foreground-rgb) / 0.2);
  background: var(--background);
}

.block-green {
  background: var(--green-500);
}

.block-yellow {
  background: var(--yellow-500);
}

.block-orange {
  background: var(--orange-500);
}

.block-red {
  background: var(--red-500);
}

.block-muted {
  background: rgb(var(--foreground-rgb) / 0.2);
  opacity: 0.5;
}

.history-list {
  display: grid;
  gap: 1rem;
}

.empty-history {
  padding: 2rem;
  text-align: center;
}

.empty-icon {
  display: flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  border-radius: 999px;
  background: rgb(34 197 94 / 0.1);
  color: var(--green-600);
}

.empty-title {
  margin: 0;
  color: var(--foreground);
  font-size: 1.125rem;
  font-weight: 600;
}

.empty-copy {
  margin: 0.25rem 0 0;
  color: rgb(var(--foreground-rgb) / 0.5);
  font-size: 0.875rem;
  line-height: 1.5;
}

.history-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.history-body {
  min-width: 0;
  flex: 1;
}

.history-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-title {
  margin: 0;
  color: var(--foreground);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  color: rgb(var(--foreground-rgb) / 0.5);
  font-size: 0.75rem;
}

.pill {
  border-radius: 999px;
  background: rgb(var(--foreground-rgb) / 0.05);
  padding: 0.125rem 0.5rem;
}

.history-status {
  color: var(--foreground);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.history-description {
  margin: 0.75rem 0 0;
  color: rgb(var(--foreground-rgb) / 0.7);
  font-size: 0.875rem;
  line-height: 1.5;
}

.maintenance-card {
  border-color: rgb(59 130 246 / 0.2);
  background: rgb(59 130 246 / 0.05);
}

.maintenance-icon {
  flex-shrink: 0;
  color: var(--blue-600);
}

.maintenance-label,
.status-blue {
  color: var(--blue-600);
}

.maintenance-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-green {
  color: var(--green-600);
}

.status-orange {
  color: var(--orange-600);
}

.status-yellow {
  color: var(--yellow-500);
}

.footer-info {
  margin-top: 3rem;
  border: 1px solid rgb(var(--foreground-rgb) / 0.1);
  border-radius: 0.75rem;
  background: var(--background);
  padding: 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-heading {
  margin: 0 0 0.5rem;
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 600;
}

.footer-links {
  display: grid;
  gap: 0.25rem;
  color: rgb(var(--foreground-rgb) / 0.5);
  font-size: 0.875rem;
}

.site-footer {
  border-top: 1px solid rgb(var(--foreground-rgb) / 0.1);
  padding: 2rem 0;
}

.site-footer p {
  margin: 0;
  color: rgb(var(--foreground-rgb) / 0.5);
  font-size: 0.875rem;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

@media (min-width: 768px) {
  .summary-card,
  .card {
    padding: 2rem;
  }

  .summary-title,
  .uptime-value {
    font-size: 1.5rem;
  }
}

@media (max-width: 520px) {
  .header-inner {
    padding: 0;
  }

  .logo {
    max-width: 8.5rem;
  }

  .subscribe-button {
    padding-right: 0.75rem;
  }

  .service-header {
    align-items: flex-start;
  }
}
