body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #111827;
  color: #e5e7eb;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

h1 {
  margin-top: 0;
  font-size: 1.8rem;
  color: #f9fafb;
}

.card {
  background: #1f2937;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

label {
  font-size: 0.9rem;
  color: #d1d5db;
}

input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border-radius: 8px;
  border: 1px solid #374151;
  background: #111827;
  color: #e5e7eb;
  box-sizing: border-box;
}

input[type="text"]:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px #60a5fa55;
}

button {
  border: none;
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  background: #3b82f6;
  color: white;
  transition: background 0.15s ease, transform 0.05s ease;
}

button:hover {
  background: #2563eb;
}

button:active {
  transform: scale(0.98);
}

button.secondary {
  background: #4b5563;
}

button.secondary:hover {
  background: #374151;
}

.top-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.top-row .grow {
  flex: 1 1 auto;
  min-width: 220px;
}

.status {
  font-size: 0.85rem;
  margin-top: 4px;
  color: #9ca3af;
}

.status.error {
  color: #fca5a5;
}

textarea {
  width: 100%;
  min-height: 150px;   
  resize: none;        
  overflow: hidden;    
  border-radius: 8px;
  border: 1px solid #374151;
  background: #020617;
  color: #e5e7eb;
  padding: 8px 10px;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.4;
}

textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px #60a5fa55;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.section-header h2 {
  font-size: 1rem;
  margin: 0;
  color: #e5e7eb;
}

.flash {
  background: #b91c1c33;
  border: 1px solid #fecaca55;
  color: #fecaca;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.footer {
  margin-top: 12px;
  font-size: 0.75rem;
  color: #6b7280;
  text-align: center;
}

@media (max-width: 640px) {
  .top-row {
    flex-direction: column;
    align-items: stretch;
  }

  button {
    width: 100%;
    text-align: center;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

.grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .grid-row {
    grid-template-columns: 1fr;
  }
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.whats-next {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.whats-next > summary {
  list-style: none;
  user-select: none;
}

.whats-next > summary::-webkit-details-marker {
  display: none;
}

.whats-next > summary.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  background: #4b5563;
  color: white;
  transition: background 0.15s ease, transform 0.05s ease;
}

.whats-next > summary.secondary:hover {
  background: #374151;
}

.whats-next[open] > summary.secondary {
  background: #374151;
}

.whats-next-body {
  margin-top: 10px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 12px 14px;
  max-width: 560px;
}

.muted {
  color: #9ca3af;
  margin: 0 0 10px 0;
  font-size: 0.9rem;
}

.whats-next-list {
  margin: 0 0 10px 18px;
  padding: 0;
  color: #e5e7eb;
}

.whats-next-list li {
  margin: 1px 0;
}

@media (max-width: 640px) {
  .title-row {
    align-items: flex-start;
  }
  .whats-next-body {
    max-width: 100%;
  }
}

/* Prevent "Tips" / "What's Next" content from overflowing on mobile */
.whats-next-body {
  box-sizing: border-box;
  max-width: 100%;
}

/* Wrap long code strings (e.g., URLs) so they don't push layout off-screen */
.whats-next-body code {
  white-space: pre-wrap;   /* allows wrapping */
  word-break: break-word;  /* breaks long tokens nicely */
}

/* Extra safety: ensure the accordion itself can't exceed container width */
.whats-next {
  max-width: 100%;
}

/* Unify input styling across text/email/password */
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border-radius: 8px;
  border: 1px solid #374151;
  background: #111827;
  color: #e5e7eb;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px #60a5fa55;
}