:root {
  --bg: #0a0c0b;
  --card: #121614;
  --card-2: #171c19;
  --line: #242b27;
  --text: #e8eeea;
  --muted: #8b968f;
  --accent: #2ee59d;
  --accent-ink: #04140c;
  --danger: #ff6b6b;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(46, 229, 157, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.shell.wide { max-width: 720px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.brand b { color: var(--accent); font-weight: 700; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.25;
}
h2 { margin: 28px 0 8px; font-size: 18px; }

p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.lead strong { color: var(--accent); word-break: break-word; }

.info {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
  overflow: hidden;
}
.info > div { padding: 12px 14px; }
.info > div + div { border-top: 1px solid var(--line); }
.label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.value { word-break: break-word; }

.perms { margin: 6px 0 0; padding: 0; list-style: none; }
.perms li {
  position: relative;
  padding: 6px 0 6px 26px;
}
.perms li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 229, 157, 0.15);
}

code {
  padding: 1px 6px;
  border-radius: 6px;
  background: #0d110f;
  border: 1px solid var(--line);
  font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.05s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover { border-color: #3a453f; background: #171c19; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: #55f0b3; border-color: #55f0b3; }

.btn-block { width: 100%; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.link-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.account {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  word-break: break-word;
}

.notice {
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-2);
  color: var(--muted);
  font-size: 14px;
}
.notice.error {
  border-color: rgba(255, 107, 107, 0.4);
  color: var(--danger);
}

.state { text-align: center; padding: 18px 0; }
.state[hidden], [hidden] { display: none !important; }

.spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
footer a { color: var(--muted); }

.doc h2:first-of-type { margin-top: 8px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 4px 0; }

@media (max-width: 420px) {
  .actions { grid-template-columns: 1fr; }
  .actions .btn-primary { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
}
