:root {
  color-scheme: dark;
  --bg: #11151f;
  --surface: #191f2c;
  --surface-strong: #1f2736;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(94, 141, 255, 0.4);
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(224, 231, 244, 0.62);
  --soft: rgba(224, 231, 244, 0.42);
  --blue: #5e8dff;
  --green: #31c48d;
  --amber: #f6c453;
  font-family: "Avenir Next", "DIN Alternate", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.site-header,
main {
  position: relative;
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; }
.brand img { display: block; width: 178px; height: 40px; }

.edge-identity {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0;
}

.edge-dot,
.status-light {
  display: block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(49, 196, 141, 0.12);
}

main { padding: 76px 0 42px; }

.status-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: end;
  gap: 48px;
  padding-bottom: 42px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 42px;
  font-weight: 680;
  line-height: 1.14;
  letter-spacing: 0;
}

.lede {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.live-status {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 13px;
  border-left: 2px solid var(--green);
  padding: 8px 0 8px 18px;
}

.live-status > span:last-child { display: grid; gap: 3px; }
.live-status strong { font-size: 14px; font-weight: 650; }
.live-status small { color: var(--soft); font-size: 11px; }
.live-status[data-state="checking"] { border-color: var(--amber); }
.live-status[data-state="checking"] .status-light { background: var(--amber); box-shadow: 0 0 0 4px rgba(246, 196, 83, 0.12); }
.live-status[data-state="down"] { border-color: #f06a6a; }
.live-status[data-state="down"] .status-light { background: #f06a6a; box-shadow: 0 0 0 4px rgba(240, 106, 106, 0.12); }

.endpoint-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.endpoint-row {
  display: grid;
  min-height: 92px;
  grid-template-columns: 190px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
}

.endpoint-row + .endpoint-row { border-top: 1px solid var(--line); }
.endpoint-row[data-primary="true"] { background: var(--surface-strong); box-shadow: inset 3px 0 var(--blue); }

.endpoint-name { display: flex; align-items: center; gap: 12px; }
.endpoint-name > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}
.endpoint-row[data-primary="true"] .endpoint-name > span { border-color: rgba(49,196,141,0.4); color: var(--green); }
.endpoint-name div { display: grid; gap: 3px; }
.endpoint-name strong { font-size: 14px; font-weight: 650; }
.endpoint-name small { color: var(--soft); font-size: 11px; }

.endpoint-row code {
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.84);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

button,
footer a {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  text-decoration: none;
}

button { cursor: pointer; padding: 0 14px; }
button:hover,
button:focus-visible,
footer a:hover,
footer a:focus-visible { border-color: var(--line-strong); color: var(--text); outline: none; }
button[data-copied="true"] { border-color: rgba(49,196,141,0.45); color: var(--green); }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  color: var(--soft);
  font-size: 11px;
}
footer p { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
footer nav { display: flex; gap: 8px; }
footer a { display: inline-flex; align-items: center; padding: 0 13px; }

@media (max-width: 720px) {
  .site-header,
  main { width: min(100% - 30px, 1120px); }
  .site-header { min-height: 70px; }
  .brand img { width: 142px; height: auto; }
  .edge-identity { font-size: 9px; }
  main { padding-top: 46px; }
  .status-band { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 30px; }
  h1 { font-size: 30px; }
  .lede { font-size: 14px; }
  .live-status { max-width: 220px; }
  .endpoint-row { grid-template-columns: minmax(0, 1fr) 64px; gap: 12px; padding: 16px; }
  .endpoint-name { grid-column: 1 / -1; }
  .endpoint-row code { font-size: 11px; }
  button { padding-inline: 10px; }
  footer { align-items: flex-start; gap: 18px; }
}
