:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #121720;
  --line: #293140;
  --text: #f5f7fb;
  --muted: #a4adbc;
  --cyan: #5ee7f2;
  --cyan-dark: #102b31;
  --green: #7bf1a8;
  --red: #ff8290;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at 20% 0, #172536 0, transparent 42%), var(--bg);
  color: var(--text);
  font: 16px/1.5 Inter, "Segoe UI", sans-serif;
}

button, input, textarea { font: inherit; }

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.welcome {
  width: min(700px, 100%);
  padding: clamp(32px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(21, 28, 39, .97), rgba(13, 17, 24, .97));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .35);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
}

h1 { margin: 0; font-size: clamp(34px, 6vw, 56px); line-height: 1.05; letter-spacing: -.035em; }
h2 { margin: 0; font-size: 25px; line-height: 1.2; }
.intro { max-width: 590px; margin: 22px 0 30px; color: var(--muted); font-size: 18px; }

button {
  border: 0;
  border-radius: 11px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}

button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(94, 231, 242, .35);
  outline-offset: 2px;
}

.primary { background: var(--cyan); color: #071014; }
.primary:hover { filter: brightness(1.08); }
.primary:disabled { cursor: wait; opacity: .7; }
.secondary { border: 1px solid var(--line); background: #171d27; color: var(--text); }

dialog {
  width: min(640px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .65);
}

dialog::backdrop { background: rgba(3, 6, 10, .8); backdrop-filter: blur(5px); }
form { padding: 28px; }
.dialog-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.close { padding: 0; width: 38px; height: 38px; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; }

fieldset { margin: 0 0 20px; padding: 0; border: 0; }
legend, form > label { display: block; margin: 0 0 8px; font-weight: 700; }
label span { color: var(--muted); font-weight: 400; }
.type-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-option { position: relative; display: block; cursor: pointer; }
.type-option input { position: absolute; opacity: 0; }
.type-option span { display: block; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #0d1219; color: var(--text); }
.type-option b, .type-option small { display: block; }
.type-option small { margin-top: 2px; color: var(--muted); }
.type-option input:checked + span { border-color: var(--cyan); background: var(--cyan-dark); box-shadow: inset 0 0 0 1px var(--cyan); }
.type-option input:focus-visible + span { outline: 3px solid rgba(94, 231, 242, .35); }

input, textarea {
  width: 100%;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b0f15;
  color: var(--text);
  padding: 12px 13px;
}

textarea { min-height: 130px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #6f7989; }
.status { min-height: 24px; margin-top: -4px; color: var(--muted); }
.status.success { color: var(--green); }
.status.error { color: var(--red); }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }

@media (max-width: 560px) {
  .shell { padding: 16px; }
  .welcome { padding: 30px 24px; }
  form { padding: 22px 18px; }
  .type-options { grid-template-columns: 1fr; }
  .actions { flex-direction: column-reverse; }
  .actions button { width: 100%; }
}