:root {
  --bg-0: #0b1014;
  --bg-1: #121a21;
  --ink: #e7eee8;
  --muted: #8a9a93;
  --line: rgba(170, 196, 184, 0.18);
  --accent: #6f9b86;
  --accent-strong: #8fbfa6;
  --danger: #c9786a;
  --ok: #7faf8e;
  --field: rgba(18, 28, 34, 0.72);
  --glow: rgba(111, 155, 134, 0.18);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Syne", "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-0);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px 40px;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(95, 130, 112, 0.22), transparent 55%),
    radial-gradient(ellipse 55% 45% at 90% 85%, rgba(48, 72, 88, 0.35), transparent 50%),
    linear-gradient(165deg, var(--bg-0) 0%, var(--bg-1) 48%, #0a1210 100%);
  z-index: -2;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.shell {
  width: min(420px, 100%);
  animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.mark-block {
  text-align: center;
  margin-bottom: 28px;
}

.seal {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  color: var(--accent-strong);
  filter: drop-shadow(0 0 24px var(--glow));
  animation: pulse 4.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.55rem, 4vw, 1.85rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.panel {
  padding: 26px 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(22, 32, 38, 0.88), rgba(14, 20, 24, 0.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.15rem;
}

.hint {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--ink);
  padding: 13px 14px;
  font: inherit;
  font-size: 0.98rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus {
  border-color: rgba(143, 191, 166, 0.55);
  box-shadow: 0 0 0 3px rgba(111, 155, 134, 0.18);
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 13px 16px;
  transition: transform 140ms ease, background 140ms ease, opacity 140ms ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.primary {
  width: 100%;
  background: linear-gradient(180deg, #87b49c, #5f8772);
  color: #0b1210;
}

.btn.primary:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #95c0a9, #6b927c);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.ghost:hover:not(:disabled) {
  border-color: rgba(143, 191, 166, 0.4);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  margin-top: 4px;
}

.linkish {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(143, 191, 166, 0.35);
}

.linkish:hover {
  color: #b0d2c0;
}

.msg {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.4;
  border: 1px solid transparent;
}

.msg.error {
  color: #f0c4bc;
  background: rgba(201, 120, 106, 0.12);
  border-color: rgba(201, 120, 106, 0.28);
}

.msg.ok {
  color: #c5e0cd;
  background: rgba(127, 175, 142, 0.12);
  border-color: rgba(127, 175, 142, 0.28);
}

.msg.info {
  color: #c7d5cf;
  background: rgba(120, 140, 132, 0.12);
  border-color: rgba(120, 140, 132, 0.25);
}

.foot {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: color-mix(in srgb, var(--muted) 80%, transparent);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.5;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 420px) {
  .panel {
    padding: 22px 18px 18px;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}
