:root {
  --bg: #0b0f0c;
  --bg-elevated: #121a14;
  --bg-panel: #0e1510;
  --ink: #d7e4d9;
  --muted: #7d9182;
  --line: #243028;
  --line-strong: #355040;
  --accent: #3dd68c;
  --accent-dim: #1f8f5a;
  --accent-ink: #04140c;
  --danger: #ff7b72;
  --warn: #e3b341;
  --flash: rgba(61, 214, 140, 0.12);
  --flash-err: rgba(255, 123, 114, 0.14);
  --radius: 2px;
  --font: "Outfit", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --shadow: 0 0 0 1px var(--line), 0 12px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  position: relative;
}

.grid-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(61, 214, 140, 0.09), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(40, 90, 70, 0.18), transparent 50%),
    linear-gradient(rgba(61, 214, 140, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 214, 140, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
}

.top,
.flash,
.wrap {
  position: relative;
  z-index: 1;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #6eefab; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.35rem;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 15, 12, 0.88);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { color: var(--accent); }

.brand-mark {
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(61, 214, 140, 0.7);
  animation: pulse 2.4s ease-in-out infinite;
}

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

.nav { display: flex; gap: 1rem; align-items: center; }
.muted { color: var(--muted); font-size: 0.9rem; }

.wrap {
  width: min(960px, calc(100% - 2rem));
  margin: 2rem auto 3.5rem;
}

.auth, .narrow { max-width: 440px; }
.hero-panel { margin-bottom: 2.5rem; }

h1 {
  font-family: var(--mono);
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.55rem;
  color: #eaf6ec;
}

h1::before {
  content: "// ";
  color: var(--accent-dim);
  font-weight: 500;
}

h2 {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  color: var(--accent);
}

.lede {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 1.25rem;
  max-width: 52ch;
}

.stack { display: grid; gap: 1rem; }
label {
  display: grid;
  gap: 0.4rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="email"],
input[type="text"],
input[type="url"],
textarea,
select {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(61, 214, 140, 0.35);
}

textarea.mono { font-size: 0.85rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.7rem 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 18px rgba(61, 214, 140, 0.18);
}

.btn.small {
  padding: 0.4rem 0.7rem;
  font-size: 0.75rem;
}

.linkish {
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.linkish.danger { color: var(--danger); }
.inline { display: inline; }

.endpoint {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0.85rem 0;
  box-shadow: var(--shadow);
}

.endpoint .label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.endpoint code {
  word-break: break-all;
  color: var(--accent);
}

.split {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .split { grid-template-columns: 1.2fr 0.8fr; gap: 2.5rem; }
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed var(--line);
}

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }

.row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}

.row:hover { border-color: var(--line-strong); }

.row strong {
  font-family: var(--mono);
  font-weight: 500;
  color: #eaf6ec;
}

.meta { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; font-family: var(--mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 36ch; }
.actions { display: flex; gap: 0.75rem; align-items: start; }
.actions-row { display: flex; gap: 1rem; align-items: center; }
.empty, .hint { color: var(--muted); font-size: 0.92rem; }
.err { color: var(--danger); font-size: 0.85rem; font-weight: 400; text-transform: none; letter-spacing: 0; font-family: var(--font); }

.flash {
  list-style: none;
  margin: 0;
  padding: 0.75rem 1.35rem;
  display: grid;
  gap: 0.35rem;
}

.flash li {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  background: var(--flash);
  border: 1px solid rgba(61, 214, 140, 0.25);
  font-family: var(--mono);
  font-size: 0.88rem;
}

.flash-error {
  background: var(--flash-err);
  border-color: rgba(255, 123, 114, 0.3);
}

.flash-prefix { color: var(--accent); }

.snippet {
  background: #060906;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.presets { margin-bottom: 2.25rem; }

.preset-row {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .preset-row { grid-template-columns: 1fr 1fr; }
}

.preset-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.preset-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0 18px rgba(61, 214, 140, 0.12);
  color: inherit;
}

.preset-card strong {
  font-family: var(--mono);
  font-weight: 600;
  color: #eaf6ec;
}

.preset-card.muted-card {
  border-left-color: var(--line-strong);
}

.narrow.wide { max-width: 560px; }

.guide {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--line);
}

.steps {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.55;
}

.steps li { margin-bottom: 0.45rem; }

label.check { text-transform: none; letter-spacing: 0; font-family: var(--font); font-size: 0.92rem; color: var(--ink); }
.check-row { display: flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: 0.85rem; color: var(--muted); text-transform: none; letter-spacing: 0; }

.oauth-block {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.oauth-block h2 { margin-bottom: 0.5rem; }

.fallback {
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.fallback summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink);
}
