/* ─── Twiggly shared styles ─── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #fff8ee;
  --yellow-light: #ffcf5b;
  --yellow-dark: #ffb347;
  --brown: #6b4423;
  --brown-light: #a07350;
  --brown-faint: #d4b896;
  --shadow-yellow: rgba(255, 179, 71, 0.35);
  --red: #d94040;
  --green: #3a9e5c;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--brown);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brown); }

/* ─── Page shell ─── */
.page-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

/* ─── Top bar ─── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
}

.topbar-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--yellow-light), var(--yellow-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px var(--shadow-yellow);
}

.topbar-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brown);
  text-decoration: none;
}

.topbar a { text-decoration: none; display: flex; align-items: center; gap: 0.5rem; }

/* ─── Card ─── */
.card {
  background: #fff;
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: 0 2px 16px rgba(107, 68, 35, 0.07);
  max-width: 480px;
  width: 100%;
}

.card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--brown-light);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.card p:last-child { margin-bottom: 0; }

/* ─── Status icon ─── */
.status-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.status-icon.success { background: rgba(58, 158, 92, 0.12); }
.status-icon.error { background: rgba(217, 64, 64, 0.12); }
.status-icon.warn { background: rgba(255, 179, 71, 0.15); }
.status-icon.info { background: linear-gradient(135deg, var(--yellow-light), var(--yellow-dark)); }

/* ─── Form elements ─── */
.form-group {
  text-align: left;
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  border: 2px solid var(--brown-faint);
  border-radius: 12px;
  background: var(--cream);
  color: var(--brown);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--yellow-dark);
}

.form-group textarea { resize: vertical; min-height: 100px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  width: 100%;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--yellow-light), var(--yellow-dark));
  color: var(--brown);
  box-shadow: 0 4px 16px var(--shadow-yellow);
}

.btn-danger {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(217, 64, 64, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--brown);
  border: 2px solid var(--brown-faint);
}

/* ─── Footer ─── */
.page-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.82rem;
  color: var(--brown-faint);
}

.page-footer a { color: var(--brown-light); }

/* ─── Legal pages ─── */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  text-align: left;
}

.legal h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.legal .updated {
  font-size: 0.85rem;
  color: var(--brown-faint);
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.legal p, .legal li {
  font-size: 0.95rem;
  color: var(--brown-light);
  margin-bottom: 0.75rem;
  line-height: 1.65;
}

.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: 0.4rem; }

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .card { padding: 2rem 1.5rem; }
  .card h1 { font-size: 1.3rem; }
  .legal h1 { font-size: 1.5rem; }
}
