* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0f1117;
  --bg-elev: #161b22;
  --bg-elev2: #21262d;
  --border: #30363d;
  --text: #c9d1d9;
  --text-dim: #8b949e;
  --text-bright: #e6edf3;
  --blue: #58a6ff;
  --blue-bg: #1f6feb33;
  --green: #3fb950;
  --orange: #d29922;
  --red: #f85149;
  --purple: #d2a8ff;
  --mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, monospace;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.app-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  color: var(--purple);
  font-weight: 700;
}

.status {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-family: var(--mono);
}

main { flex: 1; }

h2 {
  color: var(--blue);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.lead {
  color: var(--text);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.boot-status {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1.2rem;
  margin-bottom: 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.boot-status .row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.boot-status .row:last-child { border-bottom: none; }

.boot-status .label { color: var(--text-dim); flex-shrink: 0; }
.boot-status .value { text-align: right; word-break: break-word; }
.boot-status .value.ok { color: var(--green); }
.boot-status .value.info { color: var(--blue); }
.boot-status .value.fail { color: var(--red); }
.boot-status .value.pending { color: var(--orange); }

button.primary {
  background: var(--blue);
  color: var(--bg);
  border: 1px solid var(--blue);
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s;
}

button.primary:hover:not(:disabled) { filter: brightness(1.1); }
button.primary:disabled { opacity: 0.5; cursor: not-allowed; }

.note {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-top: 0.7rem;
}

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.82rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

footer a {
  color: var(--text-dim);
  text-decoration: none;
}

footer a:hover { color: var(--blue); }

.in-app-gate {
  max-width: 480px;
  margin: 4rem auto;
  padding: 2rem;
  background: var(--bg-elev);
  border: 1px solid var(--orange);
  border-radius: 8px;
}

.in-app-gate h1 {
  color: var(--orange);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.in-app-gate p { margin-bottom: 1rem; }

.in-app-gate code {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.7rem 0.9rem;
  border-radius: 4px;
  margin-top: 1rem;
  font-family: var(--mono);
  word-break: break-all;
  font-size: 0.85rem;
  color: var(--text-bright);
}
