:root {
  --bg-a: #25a0c7;
  --bg-b: #12719e;
  --bg-c: #0c5878;
  --surface: rgba(6, 32, 46, 0.55);
  --surface-2: rgba(6, 32, 46, 0.75);
  --border: rgba(255, 255, 255, 0.18);
  --text: #f7f7f7;
  --muted: #bfe1f0;
  --accent: #f7f7f7;
  --accent-dim: rgba(247, 247, 247, 0.35);
  --success: #3dd68c;
  --error: #ffb3b6;
  --radius: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 35% 65%, var(--bg-a) 0%, var(--bg-b) 45%, var(--bg-c) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px 80px;
}

.wrap {
  width: 100%;
  max-width: 640px;
}

header {
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  margin-top: 2px;
}

.header-text { min-width: 0; }

h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.lede {
  color: var(--muted);
  font-size: 14px;
  max-width: 54ch;
  margin: 0;
}

.lede a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-dim); }
.lede a:hover { border-bottom-color: var(--accent); }

.panel {
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.panel + .panel { margin-top: 20px; }

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.15s ease;
}

input::placeholder { color: #a9d3e5; }

input:focus {
  border-color: var(--accent);
}

input.invalid {
  border-color: var(--error);
}

.hint {
  font-size: 12px;
  color: #a9d3e5;
  margin-top: 6px;
}

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

.turnstile-field {
  margin-bottom: 18px;
}

button {
  width: 100%;
  background: var(--accent);
  color: #0c4d68;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 13px 16px;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
  margin-top: 4px;
}

button:hover:not(:disabled) { background: #ffffff; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.preview-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.preview-label span:first-child {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

pre {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
  margin: 0;
  color: #eaf6fc;
}

pre .k { color: var(--accent); }
pre .s { color: #a3d977; }
pre .redacted { color: #a9d3e5; font-style: italic; }

#status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  display: none;
  border: 1px solid transparent;
}

#status.show { display: block; }
#status.ok { background: rgba(61,214,140,0.08); border-color: rgba(61,214,140,0.3); color: var(--success); }
#status.fail { background: rgba(232,85,90,0.08); border-color: rgba(232,85,90,0.3); color: var(--error); }
#status.pending { background: rgba(26,144,196,0.08); border-color: rgba(26,144,196,0.3); color: var(--accent); }

details {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 16px;
}

summary {
  cursor: pointer;
  padding: 12px 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

details[open] summary { color: var(--text); }

.faq p, .faq ul {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.faq ul { padding-inline-start: 18px; }
.faq code {
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text);
  font-size: 12px;
}

footer {
  margin-top: 40px;
  font-size: 12px;
  color: #a9d3e5;
  text-align: center;
}

footer a { color: var(--muted); }
