/* /connect only; the tokens, header, footer and notes come from site.css (DESIGN.md). */
:root {
  --danger-bg: var(--todo-bg);
  --danger-text: var(--todo-text);
  --radius-sm: 4px;
}

.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.steps > li { margin: 0; }
.steps + p { margin-top: 16px; }

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.step h2 { font-size: 1.5rem; margin: 0 0 0.4em; }
.step.done h2, .step.closed h2 { font-size: 1.15rem; margin: 0; }
.step.closed { color: var(--muted); }
.step .line { margin: 0.2em 0 0; }
.step > :last-child { margin-bottom: 0; }
.check { color: var(--accent); font-weight: 700; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0 0; }
.actions form { margin: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { text-decoration: none; filter: brightness(1.08); }
.button.secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.button:disabled, .button[aria-disabled="true"] {
  background: var(--line);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  filter: none;
}

.error {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 1em 0;
}
.error > :last-child, .note > :last-child { margin-bottom: 0; }
.error strong, .note strong { font-weight: 700; }

.preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
}
.preview dt, .preview dd { margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.preview dt { font-weight: 600; color: var(--muted); }
.preview dd { overflow-wrap: anywhere; }
.preview .body { white-space: pre-wrap; }
.preview dt:last-of-type, .preview dd:last-of-type { border-bottom: 0; }

.field { margin: 16px 0 0; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field .hint { margin: 0 0 4px; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--muted);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 44px;
}
.field textarea { min-height: 10rem; resize: vertical; }
.field [aria-invalid="true"] { border: 2px solid var(--danger-text); }

.sent-id code { font-size: 0.95rem; }

@media (max-width: 40rem) {
  .actions { flex-direction: column; align-items: stretch; }
  .actions .button, .actions form, .actions form .button { width: 100%; }
  .preview { grid-template-columns: 1fr; }
  .preview dt { border-bottom: 0; padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
