:root {
  --bg: #fffffb;
  --surface: #ffffff;
  --text: #141e12;
  --muted: #6b716a;
  --border: #022a0213;
  --border-mid: #001a0027;
  --soft: #f7f8f5;
  --green: #5d770d;
  --green-dot: #6d8b16;
  --amber: #a76b1d;
  --red: #b7453d;
  --unknown: #c3c8c2;
  --width: 1120px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--text); color: #fff; }

.topbar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--border); background: rgba(255,255,251,.94); backdrop-filter: blur(12px); }
.topbar-inner { width: min(var(--width), calc(100% - 40px)); min-height: 64px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; min-width: 0; }
.brand img { display: block; width: 112px; height: auto; max-height: 34px; object-fit: contain; object-position: left center; }
.brand-divider { width: 1px; height: 20px; background: var(--border-mid); }
.status-name { font-weight: 540; letter-spacing: -.01em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav a { padding: 9px 11px; color: var(--muted); transition: color .15s ease; }
.nav a:hover, .nav a.active { color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.support-link { padding: 8px 4px; color: var(--muted); }
.support-link:hover { color: var(--text); }
.language-switch { height: 22px; display: flex; align-items: center; gap: 4px; padding-left: 10px; border-left: 1px solid var(--border-mid); font-size: 11px; }
.language-switch button { border: 0; background: transparent; padding: 2px; color: var(--muted); }
.language-switch button.active { color: var(--text); font-weight: 650; }
.language-switch span { color: #b8bdb7; }
.mobile-nav { display: none; }

.page-shell { width: min(var(--width), calc(100% - 40px)); margin: 0 auto; }
.overall { min-height: 190px; display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; padding: 48px 0 36px; border-bottom: 1px solid var(--border-mid); }
.overall-copy { max-width: 720px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; font-weight: 520; }
.overall-title-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.overall-title-row h1 { margin: 0; font-size: 30px; line-height: 1.16; letter-spacing: -.035em; font-weight: 620; }
.overall-description { max-width: 660px; margin: 13px 0 0; color: var(--muted); line-height: 1.65; }
.overall-actions { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.updated-at { color: var(--muted); font-size: 11px; }
.secondary-button, .primary-button { min-height: 36px; border-radius: 6px; padding: 0 14px; font-weight: 550; font-size: 12px; }
.secondary-button { border: 1px solid var(--border-mid); background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(20,30,18,.035); }
.secondary-button:hover { background: var(--soft); }
.primary-button { border: 1px solid var(--text); background: var(--text); color: #fff; }
.inline-button { display: inline-flex; align-items: center; justify-content: center; }

.status-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--unknown); }
.status-dot.operational { background: var(--green-dot); }
.status-dot.degraded { background: var(--amber); }
.status-dot.outage { background: var(--red); }
.status-dot.no_data { background: var(--unknown); }

.section { padding: 38px 0 44px; }
.section + .section { border-top: 1px solid var(--border-mid); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 23px; }
.section-heading h2, .event-section-heading h2 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.025em; font-weight: 620; }
.section-heading p, .page-heading p { margin: 6px 0 0; color: var(--muted); line-height: 1.55; }
.column-headings { width: 560px; display: grid; grid-template-columns: minmax(220px,1fr) 72px 82px 98px; gap: 18px; align-items: end; color: var(--muted); font-size: 10px; letter-spacing: .065em; text-transform: uppercase; }
.column-headings span:last-child { text-align: right; }
.text-link { flex: 0 0 auto; color: var(--muted); font-size: 12px; text-decoration: underline; text-decoration-color: var(--border-mid); text-underline-offset: 4px; }
.text-link:hover { color: var(--text); }

.services-root { border-top: 1px solid var(--border-mid); }
.service-group { padding: 25px 0 27px; border-bottom: 1px solid var(--border-mid); }
.service-group:last-child { border-bottom: 0; }
.service-group-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 8px; }
.service-group-head h3 { margin: 0; font-size: 15px; letter-spacing: -.012em; font-weight: 620; }
.group-meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.service-row { display: grid; grid-template-columns: minmax(190px,1fr) minmax(220px,1.35fr) 72px 82px 98px; gap: 18px; align-items: center; min-height: 58px; border-top: 1px solid var(--border); }
.service-row:first-of-type { border-top: 0; }
.service-name { min-width: 0; font-weight: 540; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.service-check { margin-top: 4px; color: var(--muted); font-size: 10px; }
.service-number { font-size: 12px; font-variant-numeric: tabular-nums; }
.service-response { color: var(--muted); }
.service-state, .group-state { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 0; font-size: 12px; white-space: nowrap; }
.service-state.operational, .group-state.operational { color: var(--green); }
.service-state.degraded, .group-state.degraded { color: var(--amber); }
.service-state.outage, .group-state.outage { color: var(--red); }
.service-state.no_data, .group-state.no_data { color: var(--muted); }
.uptime-strip { width: 100%; height: 18px; display: flex; align-items: stretch; gap: 2px; }
.uptime-cell { flex: 1 1 0; min-width: 2px; border-radius: 1px; background: #e5e8e3; }
.uptime-cell.operational { background: #7e9d27; }
.uptime-cell.degraded { background: #c98a34; }
.uptime-cell.outage { background: #c45b54; }
.uptime-cell.unknown { background: #e5e8e3; }
.mobile-metric-label { display: none; }

.page-heading { max-width: 720px; padding: 48px 0 36px; border-bottom: 1px solid var(--border-mid); }
.page-heading .eyebrow { margin-bottom: 12px; }
.page-heading h1 { margin: 0; font-size: 34px; line-height: 1.15; letter-spacing: -.04em; font-weight: 620; }
.monitor-list-section { padding-top: 27px; }
.monitor-columns { width: 100%; grid-template-columns: minmax(190px,1fr) minmax(220px,1.35fr) 72px 82px 98px; margin-bottom: 10px; }

.event-section { padding-top: 34px; }
.event-section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.event-section-heading > span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.events-list { border-top: 1px solid var(--border-mid); }
.event-row { display: grid; grid-template-columns: 128px minmax(0,1fr) 100px; gap: 24px; padding: 20px 0 21px; border-bottom: 1px solid var(--border); }
.event-date { color: var(--muted); font-size: 11px; line-height: 1.5; }
.event-kind { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.event-title { margin: 5px 0 0; font-size: 14px; line-height: 1.45; letter-spacing: -.01em; font-weight: 570; }
.event-message { max-width: 720px; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.event-state { display: flex; align-items: flex-start; justify-content: flex-end; gap: 7px; color: var(--muted); font-size: 12px; }
.event-state.active { color: var(--amber); }
.event-detail { padding: 25px 0 27px; border-bottom: 1px solid var(--border); }
.event-detail-grid { display: grid; grid-template-columns: 145px minmax(0,1fr); gap: 28px; }
.event-detail-title { display: flex; justify-content: space-between; gap: 24px; }
.event-detail-title h3 { margin: 0; font-size: 16px; line-height: 1.45; letter-spacing: -.015em; font-weight: 620; }
.event-detail-title time { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.event-timeline { margin-top: 17px; border-top: 1px solid var(--border); }
.event-update { display: grid; grid-template-columns: 118px minmax(0,1fr); gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.event-update:last-child { border-bottom: 0; }
.event-update-status { font-size: 11px; font-weight: 560; }
.event-update-time { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.event-update p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.event-affected { margin-top: 13px; color: var(--muted); font-size: 11px; }
.event-affected strong { color: var(--text); font-weight: 520; }
.empty-state { padding: 24px 0; border-bottom: 1px solid var(--border); color: var(--muted); }

.footer { border-top: 1px solid var(--border); }
.footer-inner { width: min(var(--width), calc(100% - 40px)); min-height: 74px; margin: 0 auto; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.footer-links { margin-left: auto; display: flex; gap: 18px; }
.footer a:hover { color: var(--text); }

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,30,18,.32); backdrop-filter: blur(2px); }
.modal-panel { position: relative; width: min(510px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 24px; border: 1px solid var(--border-mid); border-radius: 8px; background: var(--bg); box-shadow: 0 20px 60px rgba(20,30,18,.14); }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.modal-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.modal-heading p, .subscription-pane p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.modal-close { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; }
.modal-close:hover { background: var(--soft); color: var(--text); }
.subscription-tabs { display: flex; margin-top: 20px; border-bottom: 1px solid var(--border); }
.subscription-tabs button { margin-bottom: -1px; padding: 9px 11px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted); font-size: 12px; }
.subscription-tabs button.active { border-bottom-color: var(--text); color: var(--text); font-weight: 560; }
.subscription-pane { padding-top: 18px; }
.subscription-pane form { display: flex; gap: 8px; margin-top: 14px; }
.subscription-pane input { min-width: 0; height: 38px; flex: 1 1 auto; border: 1px solid var(--border-mid); border-radius: 6px; background: #fff; padding: 0 11px; color: var(--text); outline: none; }
.subscription-pane input:focus { border-color: #737a72; box-shadow: 0 0 0 3px rgba(20,30,18,.055); }
.subscription-message { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.subscription-message.success { color: var(--green); }
.subscription-message.error { color: var(--red); }
.subscription-privacy { margin: 20px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

@media (max-width: 900px) {
  .nav { display: none; }
  .topbar-actions { margin-left: auto; }
  .mobile-nav { display: flex; border-top: 1px solid var(--border); }
  .mobile-nav a { flex: 1; padding: 10px 8px; color: var(--muted); text-align: center; font-size: 11px; }
  .mobile-nav a.active { color: var(--text); font-weight: 600; }
  .column-headings { display: none; }
  .service-row { grid-template-columns: minmax(160px,1fr) minmax(180px,1fr) 72px 98px; }
  .service-response { display: none; }
  .monitor-columns { display: none; }
}

@media (max-width: 680px) {
  .topbar-inner, .page-shell, .footer-inner { width: min(100% - 30px, var(--width)); }
  .topbar-inner { min-height: 60px; }
  .brand img { width: 102px; }
  .support-link { display: none; }
  .overall { min-height: 0; display: block; padding: 34px 0 29px; }
  .overall-title-row { align-items: flex-start; }
  .overall-title-row h1 { font-size: 25px; }
  .overall-actions { align-items: flex-start; margin-top: 22px; }
  .section { padding: 31px 0 36px; }
  .section-heading { display: block; margin-bottom: 18px; }
  .compact-heading { display: flex; align-items: flex-end; }
  .page-heading { padding: 36px 0 30px; }
  .page-heading h1 { font-size: 29px; }
  .service-group { padding: 20px 0 22px; }
  .service-row { display: grid; grid-template-columns: 1fr auto; gap: 9px 16px; min-height: 0; padding: 14px 0; }
  .service-row .uptime-strip { grid-column: 1 / -1; grid-row: 2; }
  .service-number { grid-row: 3; }
  .service-response { display: block; grid-row: 3; text-align: right; }
  .service-state { grid-column: 2; grid-row: 1; }
  .uptime-strip { height: 14px; gap: 1.5px; }
  .mobile-metric-label { display: inline; color: var(--muted); margin-right: 5px; font-size: 10px; }
  .event-row { grid-template-columns: 1fr auto; gap: 8px 14px; }
  .event-date { grid-column: 1; }
  .event-main { grid-column: 1 / -1; grid-row: 2; }
  .event-state { grid-column: 2; grid-row: 1; }
  .event-detail-grid { display: block; }
  .event-detail-side { margin-bottom: 13px; }
  .event-detail-title { display: block; }
  .event-detail-title time { display: block; margin-top: 5px; }
  .event-update { grid-template-columns: 1fr; gap: 6px; }
  .footer-inner { min-height: 68px; flex-wrap: wrap; padding: 16px 0; }
  .footer-links { width: 100%; margin-left: 0; }
  .footer-separator { display: none; }
  .subscription-pane form { display: block; }
  .subscription-pane input { width: 100%; }
  .subscription-pane form button { margin-top: 9px; }
}
