/* Springwood brand palette — locked, do not invent new colors */
:root {
  --spring-wood: #f8f6f1;
  --como: #4e796b;
  --tradewind: #66b2a0;
  --moss-green: #a7d7b8;
  --forest-dark: #1a2e28;
  --forest-card: #1e3a32;
  --text: #1a2e28;
  --text-muted: #5a6b66;
  --border: rgba(78, 121, 107, 0.18);

  --status-operational: #66b2a0;
  --status-degraded: #e0a83d;
  --status-major: #c0524a;
  --status-loading: #b8c0bd;

  --radius: 10px;
  --max-width: 880px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--spring-wood);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

.muted {
  color: var(--text-muted);
  font-size: 14px;
}

/* Header */
.site-header {
  background: white;
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--como);
  font-weight: 600;
  font-size: 18px;
}
.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tradewind);
}
.brand-divider {
  color: var(--text-muted);
  font-weight: 400;
}
.brand-section {
  color: var(--text-muted);
  font-weight: 500;
}
.site-nav a {
  margin-left: 20px;
  font-size: 14px;
}

/* Main */
.main {
  padding: 48px 24px 64px;
}

/* Overall status */
.overall-status {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 40px;
}
.overall-status-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.status-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--status-loading);
  flex-shrink: 0;
  position: relative;
}
.status-icon[data-status="operational"] {
  background: var(--status-operational);
}
.status-icon[data-status="degraded"] {
  background: var(--status-degraded);
}
.status-icon[data-status="major_outage"] {
  background: var(--status-major);
}
.status-icon::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.15;
  z-index: -1;
}

#overall-headline {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
}
#overall-subline {
  margin: 0;
}

/* Sections */
section h2 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 16px;
}

/* Component list */
.components {
  margin-bottom: 40px;
}
.component-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.component-list li {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.component-list li:last-child {
  border-bottom: none;
}
.component-skeleton {
  color: var(--text-muted);
  font-size: 14px;
}

.component-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.component-info {
  flex: 1;
  min-width: 0;
}
.component-name {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 2px;
}
.component-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.component-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.component-status-pill[data-status="operational"] {
  background: rgba(102, 178, 160, 0.15);
  color: var(--como);
}
.component-status-pill[data-status="degraded"] {
  background: rgba(224, 168, 61, 0.18);
  color: #8a6420;
}
.component-status-pill[data-status="major_outage"] {
  background: rgba(192, 82, 74, 0.18);
  color: #8c2f2a;
}
.component-status-pill[data-status="loading"] {
  background: #ececec;
  color: var(--text-muted);
}
.component-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* Uptime chart — 90 day */
.uptime-chart {
  display: flex;
  gap: 2px;
  margin-top: 10px;
  align-items: flex-end;
  height: 24px;
}
.uptime-bar {
  flex: 1;
  background: var(--status-operational);
  border-radius: 1px;
  min-width: 2px;
  height: 100%;
  opacity: 0.55;
}
.uptime-bar[data-status="degraded"] {
  background: var(--status-degraded);
  opacity: 0.75;
}
.uptime-bar[data-status="major_outage"] {
  background: var(--status-major);
  opacity: 0.85;
}
.uptime-bar[data-status="no_data"] {
  background: #e5e8e6;
  opacity: 1;
}
.uptime-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Incidents */
.incidents {
  margin-bottom: 40px;
}
.updates {
  margin-bottom: 40px;
}
.incident-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.incident-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.incident-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.meta-link {
  color: var(--como);
  font-weight: 500;
}
.meta-link:hover {
  text-decoration: underline;
}

.update-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.update-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.update-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.update-body {
  margin: 10px 0 8px;
  color: var(--text);
  white-space: pre-wrap;
}
.update-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.update-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--spring-wood);
  color: var(--como);
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

/* Subscribe */
.subscribe {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.subscribe h2 {
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 8px;
}
.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  color: var(--text);
  background: var(--spring-wood);
}
.subscribe-form input[type="email"]:focus {
  outline: 2px solid var(--tradewind);
  outline-offset: 1px;
}
.subscribe-form button {
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  background: var(--como);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
}
.subscribe-form button:hover {
  background: #3f6357;
}
.subscribe-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.subscribe-message {
  width: 100%;
  font-size: 13px;
  margin: 4px 0 0;
  min-height: 18px;
}
.subscribe-message[data-state="success"] {
  color: var(--como);
}
.subscribe-message[data-state="error"] {
  color: #8c2f2a;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
}
.site-footer p {
  margin: 4px 0;
}

@media (max-width: 540px) {
  .site-header .container {
    height: 56px;
  }
  .overall-status {
    padding: 24px;
  }
  #overall-headline {
    font-size: 18px;
  }
  .component-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .update-header {
    flex-direction: column;
  }
}
