:root {
  --labhq-primary: #fc947b;
  --labhq-chrome: #24423f;
  --labhq-chrome-dark: #1b322e;
  --labhq-background: #f8fafc;
  --labhq-surface: #ffffff;
  --labhq-text: #1c1b1b;
  --labhq-muted: #64748b;
  --labhq-border: #d8e0ea;
  --labhq-success: #008000;
  --labhq-success-surface: #e7f5e7;
  --labhq-warning: #9a5b00;
  --labhq-warning-surface: #fff2d6;
  --labhq-error: #980009;
  --labhq-error-surface: #ffe5e8;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--labhq-background);
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--labhq-text);
  background: var(--labhq-background);
}

a {
  color: inherit;
}

.page-shell {
  width: min(100% - 32px, 1040px);
  margin: 0 auto;
}

.page-header {
  background: var(--labhq-chrome);
  color: #ffffff;
}

.header-content {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  display: block;
  width: 126px;
  height: auto;
}

.support-link {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 6px;
  padding: 8px 14px;
  text-decoration: none;
  font-weight: 500;
}

.support-link:focus-visible,
.support-link:hover {
  border-color: var(--labhq-primary);
  outline: none;
}

.main-content {
  padding: 40px 0 32px;
}

.summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  border-bottom: 4px solid var(--labhq-primary);
  background: var(--labhq-chrome-dark);
  color: #ffffff;
  padding: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #ffd4ca;
  font-size: 0.86rem;
  font-weight: 600;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0;
}

.status-message {
  max-width: 720px;
  margin-bottom: 0;
  color: #f4f0ef;
  font-size: 1.05rem;
  line-height: 1.6;
}

.summary-state {
  display: inline-flex;
  min-width: 190px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px 16px;
  font-weight: 600;
}

.status-indicator {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 999px;
  background: var(--labhq-muted);
}

.status-indicator--up {
  background: var(--labhq-success);
}

.status-indicator--down {
  background: var(--labhq-error);
}

.status-indicator--unknown {
  background: var(--labhq-warning);
}

.status-panel {
  margin-top: 28px;
  border: 1px solid var(--labhq-border);
  border-radius: 8px;
  background: var(--labhq-surface);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--labhq-border);
  padding: 24px 28px;
}

.panel-heading p {
  margin-bottom: 0;
  color: var(--labhq-muted);
  line-height: 1.5;
}

.last-updated {
  flex: 0 0 auto;
  text-align: right;
  font-size: 0.9rem;
}

.service-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) minmax(260px, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 96px;
  border-bottom: 1px solid var(--labhq-border);
  padding: 20px 28px;
}

.service-row:last-child {
  border-bottom: 0;
}

.service-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.service-main h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0;
}

.service-meta {
  display: grid;
  justify-items: start;
  gap: 6px;
  color: var(--labhq-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.status-badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.status-badge--up {
  background: var(--labhq-success-surface);
  color: var(--labhq-success);
}

.status-badge--down {
  background: var(--labhq-error-surface);
  color: var(--labhq-error);
}

.status-badge--unknown {
  background: var(--labhq-warning-surface);
  color: var(--labhq-warning);
}

.service-history {
  display: grid;
  gap: 10px;
}

.history-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  min-height: 28px;
}

.history-bar {
  min-width: 5px;
  border-radius: 3px;
  background: var(--labhq-muted);
}

.history-bar--up {
  background: var(--labhq-success);
}

.history-bar--down {
  background: var(--labhq-error);
}

.history-bar--unknown {
  background: var(--labhq-border);
}

.page-footer {
  padding: 0 0 32px;
  color: var(--labhq-muted);
}

.page-footer p {
  margin-bottom: 0;
  line-height: 1.6;
}

.page-footer a {
  color: var(--labhq-chrome);
  font-weight: 600;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 24px, 1040px);
  }

  .header-content {
    min-height: 64px;
  }

  .main-content {
    padding-top: 24px;
  }

  .summary,
  .panel-heading,
  .service-row {
    padding: 22px;
  }

  .summary,
  .panel-heading,
  .service-row {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    flex-direction: column;
    gap: 10px;
  }

  .summary-state {
    justify-content: flex-start;
    width: 100%;
  }

  .last-updated,
  .service-meta {
    justify-items: start;
    text-align: left;
  }

  .service-row {
    gap: 14px;
  }
}
