:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #66736d;
  --line: #dce4e0;
  --surface: #fff;
  --canvas: #f4f7f5;
  --green: #16a36a;
  --green-soft: #e8f7f0;
  --yellow: #d99a20;
  --red: #dc4c4c;
  --grey: #8b9791;
}

* { box-sizing: border-box; }

html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #e6f5ed 0, transparent 28rem), var(--canvas); }
a { color: inherit; }

.page-shell { width: min(1100px, calc(100% - 40px)); margin-inline: auto; }
header { background: rgba(255,255,255,.86); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.header-inner, .footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 20px; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--ink); color: white; font-weight: 800; }
.header-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.pulse, .status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.pulse { box-shadow: 0 0 0 5px var(--green-soft); }
main { padding: 52px 0 80px; }

.summary-card { min-height: 132px; display: flex; align-items: center; gap: 22px; padding: 30px 34px; border: 1px solid #bfe5d2; border-radius: 18px; background: linear-gradient(135deg, #fafffc, var(--green-soft)); box-shadow: 0 15px 45px rgba(31, 67, 50, .07); }
.summary-card > .status-dot { width: 18px; height: 18px; box-shadow: 0 0 0 9px rgba(22,163,106,.12); }
.summary-card h1 { margin: 0 0 5px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.04em; }
.summary-card p { margin: 0; color: var(--muted); }
.summary-card.status-down { border-color: #efcdcd; background: linear-gradient(135deg, #fff, #fff1f1); }
.summary-card.status-down > .status-dot { background: var(--red); box-shadow: 0 0 0 9px rgba(220,76,76,.12); }

.section-heading { margin: 48px 0 18px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.section-heading h2 small { color: var(--muted); font-size: 14px; font-weight: 500; margin-left: 8px; letter-spacing: 0; }
.eyebrow { margin: 0 0 5px !important; color: var(--green) !important; font-size: 12px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.service-count { padding: 6px 11px; border-radius: 999px; background: #e7ece9; color: var(--muted); font-size: 13px; }

.service-list { display: grid; gap: 12px; }
.service-card, .chart-card, .event-card, .stat-grid { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 8px 24px rgba(29, 47, 39, .035); }
.service-card { display: block; padding: 22px 24px; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.service-card:hover, .service-card:focus-visible { border-color: #9fcab5; transform: translateY(-1px); box-shadow: 0 13px 30px rgba(29, 47, 39, .07); outline: none; }
.service-card-header { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.service-card h3 { margin: 0 0 4px; font-size: 17px; }
.no-history { color: var(--muted); font-size: 13px; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.status-badge.degraded .status-dot, .status-dot.degraded, .uptime-bar.degraded { background: var(--yellow); }
.status-badge.down .status-dot, .status-dot.down, .uptime-bar.down { background: var(--red); }
.status-badge.paused .status-dot, .status-badge.unknown .status-dot, .status-dot.unknown, .uptime-bar.unknown { background: var(--grey); }
.uptime-row { margin-top: 20px; display: flex; align-items: center; gap: 18px; }
.uptime-row strong { min-width: 76px; text-align: right; font-size: 13px; }
.uptime-bars { min-width: 0; flex: 1; display: flex; height: 28px; gap: 3px; }
.uptime-bar { flex: 1 1 0; min-width: 3px; border-radius: 3px; background: var(--green); }
.uptime-bars.large { height: 82px; gap: 4px; }
.uptime-bars.large .uptime-bar { border-radius: 4px; }

.back-link { display: inline-block; margin-bottom: 20px; color: var(--muted); font-size: 14px; text-decoration: none; }
.back-link:hover { color: var(--ink); }
.service-summary { min-height: 150px; }
.service-summary.status-degraded { border-color: #ecd8ad; background: linear-gradient(135deg, #fff, #fff8e8); }
.service-summary.status-degraded > .status-dot { background: var(--yellow); box-shadow: 0 0 0 9px rgba(217,154,32,.13); }
.service-summary.status-paused, .service-summary.status-unknown { border-color: var(--line); background: linear-gradient(135deg, #fff, #f0f3f1); }
.service-summary.status-paused > .status-dot, .service-summary.status-unknown > .status-dot { background: var(--grey); box-shadow: 0 0 0 9px rgba(139,151,145,.13); }
.details-section .section-heading { margin-top: 42px; }
.chart-card { padding: 28px; }
.chart-axis { margin-top: 9px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; }
.stat-grid div { display: flex; flex-direction: column; gap: 4px; padding: 24px; border-right: 1px solid var(--line); }
.stat-grid div:last-child { border-right: 0; }
.stat-grid strong { font-size: 24px; letter-spacing: -.03em; }
.stat-grid span { color: var(--muted); font-size: 13px; }
.event-card { overflow: hidden; }
.event-list { display: grid; }
.event-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 14px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.event-row:last-child { border-bottom: 0; }
.event-row div { display: flex; flex-direction: column; min-width: 0; }
.event-row div span { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.event-row time { color: var(--muted); font-size: 13px; text-align: right; }
.event-card > .no-history, .chart-card > .no-history { display: block; margin: 0; padding: 8px 0; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-inner { min-height: 82px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 700px) {
  .page-shell { width: min(100% - 24px, 1100px); }
  .header-label { display: none; }
  main { padding-top: 28px; }
  .summary-card { padding: 24px; }
  .service-card { padding: 19px; }
  .uptime-row { align-items: end; flex-direction: column; gap: 8px; }
  .uptime-bars { width: 100%; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid div:nth-child(2) { border-right: 0; }
  .stat-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .event-row { grid-template-columns: 12px 1fr; }
  .event-row time { grid-column: 2; text-align: left; }
  .footer-inner { align-items: start; flex-direction: column; justify-content: center; gap: 4px; }
}
