:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-muted: #eef1f4;
  --text: #17202a;
  --muted: #68727d;
  --line: #dce1e6;
  --accent: #176b5b;
  --accent-soft: #e4f1ed;
  --blue: #2c5f91;
  --blue-soft: #e6eef7;
  --amber: #986719;
  --amber-soft: #f7eedc;
  --red: #a33b32;
  --red-soft: #f7e8e6;
  --shadow: 0 8px 24px rgba(23, 32, 42, 0.07);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  letter-spacing: 0;
}

button, input { font: inherit; }

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

.topbar {
  min-height: 70px;
  padding: 12px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand, .brand > span:last-child, .summary, .health, .project-meta, .card-foot, footer {
  display: flex;
  align-items: center;
}

.brand { gap: 12px; }

.brand-mark {
  width: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--text);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.brand > span:last-child { align-items: flex-start; flex-direction: column; gap: 1px; }
.brand strong { font-size: 15px; }
.brand small { color: var(--muted); font-size: 12px; }

.summary { gap: 12px; color: var(--muted); font-size: 13px; }
.summary strong { color: var(--text); }
.divider { width: 1px; height: 14px; background: var(--line); }
.status-dot, .health i { width: 7px; height: 7px; border-radius: 50%; background: #a5adb5; display: inline-block; margin-right: 6px; }
.status-dot { background: #29936f; box-shadow: 0 0 0 3px #dff1ea; }

main {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 64px;
}

.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.eyebrow { margin: 0 0 9px; color: var(--accent); font-size: 11px; font-weight: 800; }
h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; font-weight: 760; }
.intro p:last-child { margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.intro time { color: var(--muted); font-size: 12px; padding-bottom: 5px; }

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.search-box {
  width: min(340px, 100%);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.search-box:focus-within { border-color: #7d9b94; box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box svg { width: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.search-box input::placeholder { color: #9aa2aa; }

.filters { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow-x: auto; }
.filter { min-height: 32px; padding: 0 12px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; cursor: pointer; white-space: nowrap; font-size: 13px; }
.filter:hover { color: var(--text); background: var(--surface-muted); }
.filter.is-active { color: #fff; background: var(--text); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  min-width: 0;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.project-card:hover { transform: translateY(-2px); border-color: #bdc6ce; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }

.project-icon {
  width: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
}

.project-icon[data-tone="blue"] { color: var(--blue); background: var(--blue-soft); }
.project-icon[data-tone="amber"] { color: var(--amber); background: var(--amber-soft); }
.project-icon[data-tone="red"] { color: var(--red); background: var(--red-soft); }

.health { color: var(--muted); font-size: 11px; }
.health.is-online { color: #277c62; }
.health.is-online i { background: #29936f; }
.health.is-offline { color: var(--red); }
.health.is-offline i { background: var(--red); }

.card-body { flex: 1; padding: 24px 0 20px; }
.project-meta { gap: 7px; color: var(--muted); font-size: 11px; }
.project-meta span + span::before { content: "·"; margin-right: 7px; }
.project-card h2 { margin: 9px 0 8px; font-size: 18px; line-height: 1.35; }
.description { margin: 0; min-height: 42px; color: var(--muted); font-size: 13px; line-height: 1.65; }

.card-foot { justify-content: space-between; gap: 14px; padding-top: 15px; border-top: 1px solid var(--line); }
.route { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #7d858d; font-size: 11px; white-space: nowrap; }
.open-link { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; color: var(--text); text-decoration: none; font-size: 12px; font-weight: 700; }
.open-link:hover { color: var(--accent); }
.open-link svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }

footer {
  justify-content: space-between;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 920px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controls { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .filters { width: max-content; max-width: 100%; }
}

@media (max-width: 620px) {
  .topbar { padding: 11px 20px; }
  .summary .divider, .summary span:first-child { display: none; }
  main { width: min(100% - 28px, 1240px); padding-top: 36px; }
  .intro { align-items: flex-start; flex-direction: column; margin-bottom: 26px; }
  .intro time { padding: 0; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 245px; }
  footer { width: calc(100% - 28px); }
  footer span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
