/* Tokens mirror gdws.co: Inter, blue primary, gold accent, soft radii. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
}

:root {
  --primary: #0169ff;
  --primary-dark: #0056d6;
  --primary-ring: rgba(1, 105, 255, 0.18);
  --dark: #002a66;
  --gold: #fecb1c;
  --text: #0a0a0a;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --surface: #ffffff;
  --subtle: #f3f4f6;
  --ok: #0a5d0a;
  --ok-bg: #e8f5e9;
  --ok-border: #bbe1bf;
  --error: #8b0000;
  --error-bg: #fdecea;
  --error-border: #f5c2bd;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

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

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  min-height: 100vh;
  padding: 40px 16px 48px;
  background:
    radial-gradient(60% 420px at 50% 0%, rgba(254, 203, 28, 0.16), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
}

/* Brand header */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand img { width: 44px; height: 44px; }
.wordmark { font-size: 24px; letter-spacing: -0.02em; }
.wordmark strong { font-weight: 600; }
.wordmark span { font-weight: 300; }

/* Card */
.card {
  max-width: 520px;
  margin: 0 auto;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: rise 0.45s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e6f1ff;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 500;
}

.eyebrow svg { width: 13px; height: 13px; fill: currentColor; }

h1 {
  margin: 10px 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }

.lede { margin-bottom: 8px; color: var(--text-secondary); }

/* Form */
label { display: block; margin: 20px 0 6px; font-size: 14px; font-weight: 500; }

input, textarea {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder, textarea::placeholder { color: var(--text-light); }
input:hover, textarea:hover { border-color: var(--text-light); }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-ring);
}

textarea, input[type="password"], pre { font-family: var(--mono); font-size: 14px; line-height: 1.6; }
textarea { min-height: 150px; resize: vertical; }

/* Buttons */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

button:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

button:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
button:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--primary-ring); }
button:disabled { cursor: default; opacity: 0.75; }

form > button { width: 100%; margin-top: 24px; padding: 14px 24px; font-size: 16px; }

button.secondary { background: transparent; border-color: var(--border); color: var(--text); }
button.secondary:hover:not(:disabled) { background: var(--subtle); border-color: var(--text-light); box-shadow: none; }

button.busy::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Status messages */
.status {
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--subtle);
  color: var(--text-secondary);
  font-size: 14px;
  animation: fade 0.25s ease both;
}

.status:empty { display: none; }
.status.error { border-color: var(--error-border); background: var(--error-bg); color: var(--error); }
.status.ok { border-color: var(--ok-border); background: var(--ok-bg); color: var(--ok); }

/* Success panel */
.done { padding: 12px 0 4px; text-align: center; outline: none; animation: rise 0.4s ease both; }
.done p { margin: 6px 0 24px; color: var(--text-secondary); }

.check { width: 64px; height: 64px; margin-bottom: 16px; }
.check circle { fill: var(--ok-bg); stroke: var(--ok-border); stroke-width: 1.5; }
.check path {
  fill: none;
  stroke: var(--ok);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: draw 0.4s 0.2s ease forwards;
}

/* Reveal result */
.result { animation: rise 0.4s ease both; }
.from { margin: 20px 0 8px; color: var(--text-secondary); font-size: 14px; }

pre {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.actions { display: flex; gap: 10px; margin-top: 16px; }

.footnote { max-width: 520px; margin: 20px auto 0; color: var(--text-light); font-size: 13px; text-align: center; }
.footnote strong { color: var(--text-secondary); font-weight: 500; }

[hidden] { display: none !important; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (max-width: 480px) {
  body { padding: 24px 12px 32px; }
  .card { padding: 24px 20px; }
  h1 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
  .check path { stroke-dashoffset: 0; }
}
