/* Brand colors yahan badlein */
:root {
  --accent: #2a7de1;
  --accent-dark: #1d5fb0;
  --accent-soft: #eaf2fc;
  --text: #1f2933;
  --muted: #5f6b7a;
  --border: #d5dce4;
  --bg: #ffffff;
  --field-bg: #f8fafc;
  --error: #c62828;
  --success: #1a7f37;
  --radius: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.app { max-width: 880px; margin: 0 auto; padding: 16px; }
.card { padding: 8px 0 16px; }

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 6px; }
.intro { color: var(--muted); margin: 0 0 20px; }

/* Layout: 1 column on phones, 30-column grid on wider screens (same widths as the old Hush forms) */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 18px; }
.grid > * { grid-column: 1 / -1; }
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(30, minmax(0, 1fr)); }
  .grid > .field { grid-column: span var(--span, 30); }
}

.section {
  font-size: 1.15rem;
  margin: 18px 0 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
}
.subsection { font-size: 1rem; margin: 6px 0 -4px; color: var(--accent-dark); }

.para { margin: 0; white-space: pre-line; }
.para.note {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.92rem;
}

.field { display: flex; flex-direction: column; min-width: 0; }
fieldset.field { border: 0; padding: 0; margin: 0; }

.label { font-weight: 600; margin-bottom: 6px; padding: 0; }
.req { color: var(--error); }
.help { color: var(--muted); font-size: 0.85rem; margin: 4px 0 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], input[type="time"], select, textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-height: 44px;
}
textarea { resize: vertical; }
select[multiple] { min-height: 120px; }

.signature input {
  font-family: "Segoe Script", "Brush Script MT", "Snell Roundhand", cursive;
  font-size: 1.25rem;
  background: #fff;
  border: 0;
  border-bottom: 2px solid var(--text);
  border-radius: 0;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42, 125, 225, 0.2);
  background: #fff;
}

.options { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.option { display: inline-flex; align-items: flex-start; gap: 8px; cursor: pointer; min-height: 28px; }
.option input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }

.group-error { color: var(--error); font-size: 0.875rem; margin: 4px 0 0; }
.group-error:empty { display: none; }

.status {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fdecea;
  color: var(--error);
}

.actions { margin-top: 28px; }
.submit {
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  padding: 12px 32px;
  min-height: 48px;
  cursor: pointer;
  width: 100%;
}
@media (min-width: 700px) { .submit { width: auto; } }
.submit:hover { background: var(--accent-dark); }
.submit:disabled { opacity: 0.6; cursor: wait; }

.secure-note { color: var(--muted); font-size: 0.85rem; margin-top: 14px; }

.success { text-align: center; padding: 40px 0; }
.check {
  width: 56px; height: 56px; line-height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 28px;
}

/* Top bar when a form is opened as its own page */
.brand { border-bottom: 1px solid var(--border); background: #fff; }
.brand a {
  display: block; max-width: 880px; margin: 0 auto; padding: 10px 16px;
  line-height: 0; text-decoration: none;
}
.brand img { height: 72px; width: auto; }
@media (max-width: 480px) { .brand img { height: 56px; } }

/* Forms list (root page) */
.form-list { list-style: none; padding: 0; margin: 16px 0 0; }
.form-list li {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.form-name { font-weight: 600; }
.form-links { display: flex; gap: 10px; }
.form-links a {
  color: var(--accent-dark); text-decoration: none; font-weight: 600;
  border: 1px solid var(--accent); border-radius: 999px; padding: 4px 14px;
}
.form-links a:hover { background: var(--accent-soft); }

.loading, .noscript { text-align: center; color: var(--muted); padding: 40px 16px; }
