/* Public comment and feedback forms, plus the public tally. Loaded only on
   opinion.html and feedback.html, after site.css. */

.form fieldset {
  border: 1px solid var(--line);
  padding: 0.75rem 1rem 0.55rem;
  margin: 1.1rem 0;
  min-width: 0;
}
.form legend {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  padding: 0 0.4rem;
}
.form .choice {
  display: block;
  margin: 0.4rem 0;
  font-size: 1rem;
  line-height: 1.45;
}
.form .choice input { margin: 0 0.5rem 0 0; vertical-align: 0.05em; }
.form .consent { margin: 0.9rem 0 0.2rem; }
.form label.block {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  margin: 1.1rem 0 0.3rem;
}
.optional { font-weight: 400; color: var(--muted); }
.form select,
.form textarea,
.form input[type="text"],
.form input[type="url"] {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fbf8f2;
  color: var(--ink);
}
.form textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.form select { appearance: auto; }
.form .hint {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.3rem 0 0;
}
.form .err {
  color: var(--seal);
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  margin: 0.3rem 0 0;
}
.form .err[hidden] { display: none; }
.form .invalid { border-color: var(--seal); box-shadow: inset 3px 0 0 var(--seal); }
.form .hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form .notice {
  background: var(--paper-2);
  border-left: 4px solid var(--gold);
  padding: 0.7rem 0.95rem 0.6rem;
  margin: 1.3rem 0 1rem;
  font-size: 0.95rem;
}
.form .notice h3 {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
  color: var(--muted);
}
.form .notice ul { margin: 0; padding-left: 1.1rem; }
.form .notice li { margin: 0.25rem 0; }
.form .cf-turnstile { margin: 0.6rem 0 0.8rem; min-height: 65px; }
.form .copy-row { margin-top: 0.4rem; }
.form button[disabled] { opacity: 0.6; cursor: wait; }
.form-status {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.4;
  min-height: 1.4em;
  margin: 0;
}
.form-status.ok { color: var(--pine); font-weight: 600; }
.form-status.bad { color: var(--seal); font-weight: 600; }

/* Public tally */
.tally { margin: 0.6rem 0 1.6rem; }
.tally .total {
  font-family: var(--display);
  font-weight: 560;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 0.2rem 0 0.4rem;
}
.tally .total b { color: var(--seal); }
.tally h3 {
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.1rem 0 0.35rem;
}
.tally .row {
  display: grid;
  grid-template-columns: minmax(10rem, 17rem) 1fr 3.2rem;
  gap: 0.7rem;
  align-items: center;
  font-size: 0.95rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
}
.tally .bar { height: 0.75rem; background: var(--paper-2); }
.tally .bar span { display: block; height: 100%; background: var(--seal); }
.tally .count { text-align: right; font-family: var(--sans); font-weight: 600; }
.tally .empty {
  background: #fbf8f2;
  border: 1px solid var(--ink);
  padding: 0.8rem 1rem;
  margin: 0.4rem 0 0;
}
.tally .empty p { margin: 0.2rem 0; }
.tally .stamp-time { font-family: var(--sans); font-size: 0.78rem; color: var(--muted); margin: 0.6rem 0 0; }

@media (max-width: 600px) {
  .tally .row { grid-template-columns: 1fr 2.8rem; }
  .tally .row .bar { grid-column: 1 / -1; }
}
