/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f7f8f9;
  --surface: #ffffff;
  --border: #e4e6e9;
  --border-hover: #cdd0d4;
  --text: #1a1d23;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --accent: #1a1d23;
  --green: #16a34a;
  --green-bg: #f0fdf4;
  --green-border: #bbf7d0;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,.06);
  --radius: 8px;
  --font-sans: 'Geist', 'SF Pro Display', -apple-system, system-ui, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', monospace;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }

/* ─── NAV ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,248,249,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-links { display: flex; gap: 4px; }

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s;
  text-decoration: none;
}

.nav-link:hover { background: var(--border); color: var(--text); }
.nav-link.active { background: var(--text); color: #fff; }

/* ─── LAYOUT ─── */
main {
  flex: 1;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ─── PAGE HEADER ─── */
.page-header { margin-bottom: 40px; }

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 6px;
}

.page-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ─── STATUS: GLOBAL BADGE ─── */
.global-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 500;
  margin-bottom: 32px;
  border: 1px solid var(--green-border);
  background: var(--green-bg);
  color: var(--green);
  transition: all .3s;
}

.global-badge.degraded {
  border-color: var(--red-border);
  background: var(--red-bg);
  color: var(--red);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2.4s ease infinite;
}

.global-badge.degraded .badge-dot { background: var(--red); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

/* ─── STATUS: SERVICE CARDS ─── */
.service-list { display: flex; flex-direction: column; gap: 8px; }

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}

.service-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.service-left { display: flex; align-items: center; gap: 14px; }

.service-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.service-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.service-desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 1px;
}

.service-status {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.service-status.ok {
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid var(--green-border);
}

.service-status.down {
  color: var(--red);
  background: var(--red-bg);
  border: 1px solid var(--red-border);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ─── STATUS: FOOTER BAR ─── */
.status-meta {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-meta span {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.refresh-btn {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
  box-shadow: var(--shadow-sm);
}

.refresh-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
  box-shadow: var(--shadow-md);
}

/* ─── PRIVACY: CONTENT ─── */
.privacy-body { display: flex; flex-direction: column; gap: 32px; }

.privacy-section h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.privacy-section p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 8px;
}

.privacy-section ul {
  list-style: none;
  padding: 0;
  margin-top: 4px;
}

.privacy-section ul li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.85;
  padding-left: 20px;
  position: relative;
}

.privacy-section ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-tertiary);
}

.privacy-section .highlight {
  font-weight: 500;
  color: var(--text);
}

.privacy-updated {
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

footer a { color: var(--text-tertiary); transition: color .15s; }
footer a:hover { color: var(--text); }

/* ─── RESPONSIVE ─── */
@media (max-width: 560px) {
  main { padding: 40px 16px 60px; }
  .page-header h1 { font-size: 1.4rem; }
  .service-card { padding: 14px 16px; }
  .service-icon { width: 32px; height: 32px; font-size: 0.9rem; }
}
