:root {
  color-scheme: light;
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  color: #142638;
  background: #f4f7fa;
  --line: #dce5eb;
  --muted: #516679;
  --state-color: #455d76;
  --state-bg: #eaf0f7;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { width: min(100% - 2.5rem, 48rem); margin: clamp(3rem, 9vw, 6.5rem) auto; }
h1, h2, h3, p { margin: 0; }

.page-heading { margin-bottom: 2rem; }
.page-heading h1 { font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.18; }
.page-heading p { color: var(--muted); margin-top: .75rem; }

[data-state="up"] { --state-color: #176249; --state-bg: #e8f5ef; }
[data-state="down"] { --state-color: #9e3439; --state-bg: #faebec; }
[data-state="stale"] { --state-color: #745416; --state-bg: #fcf3dc; }

.summary {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding: 1.25rem 1.375rem;
  color: var(--state-color);
  background: var(--state-bg);
  border-radius: .75rem;
  border: 1px solid color-mix(in srgb, var(--state-color) 18%, var(--state-bg));
}
.summary h2 { font-size: 1.125rem; line-height: 1.5; }
.summary p { font-size: .9375rem; margin-top: .375rem; }
.indicator {
  flex: 0 0 .625rem;
  width: .625rem;
  height: .625rem;
  margin-top: .55rem;
  border-radius: 50%;
  background: currentColor;
}

.sites { margin-top: 2.375rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.section-heading h2 { font-size: 1.125rem; }
button {
  padding: .5rem .875rem;
  font: inherit;
  font-size: .875rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: white;
  color: #2e4d69;
  cursor: pointer;
}
button:hover { background: #ecf2f7; }
button[aria-disabled="true"] { opacity: .65; cursor: wait; }
button:focus-visible { outline: 2px solid #155f91; outline-offset: 3px; }

.site-list, .empty { margin: 0; padding: 0; background: white; border: 1px solid var(--line); border-radius: .75rem; }
.empty { padding: 1.375rem; color: var(--muted); }
.site-list { list-style: none; }
.site-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.125rem 1.375rem; }
.site-list li + li { border-top: 1px solid var(--line); }
.site-list h3 { font-size: 1rem; overflow-wrap: anywhere; }
.site-list time { display: block; margin-top: .375rem; color: var(--muted); font-size: .875rem; }
.status-label { flex: none; padding: .375rem .625rem; border-radius: .375rem; background: var(--state-bg); color: var(--state-color); font-size: .875rem; }

@media (max-width: 27rem) {
  .site-list li { align-items: flex-start; flex-direction: column; gap: .625rem; }
}
