:root {
  --bg: #0f1419;
  --surface: #171d25;
  --surface-2: #1f2732;
  --border: #2a3441;
  --text: #eef2f7;
  --muted: #8b98a8;
  --online: #22c55e;
  --offline: #ef4444;
  --stale: #f59e0b;
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.15);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.08), transparent 24%),
    var(--bg);
  color: var(--text);
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 32px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.header__brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.header__logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: var(--shadow);
}

.header__eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.15;
}

.header__meta {
  text-align: right;
}

.summary {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
}

.chip--online { color: var(--online); border-color: rgba(34, 197, 94, 0.35); }
.chip--offline { color: var(--offline); border-color: rgba(239, 68, 68, 0.35); }
.chip--stale { color: var(--stale); border-color: rgba(245, 158, 11, 0.35); }

.updated {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent), var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.card__title {
  margin: 0 0 14px;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card__badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.link-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.link-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.03);
}

.status-dot--online {
  background: var(--online);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.15), 0 0 18px rgba(34, 197, 94, 0.45);
}

.status-dot--offline {
  background: var(--offline);
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.15), 0 0 18px rgba(239, 68, 68, 0.35);
}

.status-dot--stale {
  background: var(--stale);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.15), 0 0 18px rgba(245, 158, 11, 0.35);
}

.link-row__name {
  margin: 0 0 4px;
  font-weight: 600;
}

.link-row__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.link-row__status {
  text-align: right;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.link-row__status.online { color: var(--online); }
.link-row__status.offline { color: var(--offline); }
.link-row__status.stale { color: var(--stale); }

.loading,
.error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 20px;
}

.error {
  color: var(--offline);
}

.footer {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .header__meta {
    text-align: left;
  }

  .summary {
    justify-content: flex-start;
  }
}
