:root {
  --bg: #0d1116;
  --surface: #161c24;
  --border: #21262d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-dim: #388bfd66;
  --success: #3fb950;
  --error: #f85149;
  --radius: 10px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  margin-bottom: 2rem;
}

.logo {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.tagline {
  margin: 0.25rem 0 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.card__title {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.card__content {
  font-size: 0.9375rem;
  color: var(--text);
}

.card__raw {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.card__raw[hidden] {
  display: none;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.status--loading {
  color: var(--text-muted);
}

.status--ok {
  color: var(--success);
}

.status--ok::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 1.5s ease-in-out infinite;
}

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

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

.edge-message {
  color: var(--accent);
  font-weight: 500;
}

.footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer p {
  margin: 0;
}

button.toggle-raw {
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}

button.toggle-raw:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
