/* SCJ Town Hall palette, from Pam's "TOWN HALL Q&A and theme" doc. */
:root {
  --scj-green: #9aca3d;
  --esop-blue: #2370b3;
  --navy: #1c2064;
  --teal: #26b7b1;
  --violet: #6b3098;
  --ink: #070f34;
  --rule: #e6e6e6;
  --bg: #ffffff;
  --card: #ffffff;
  --muted: #4a5170;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

main { position: relative; z-index: 1; margin: 0 auto; padding: 24px 16px 64px; }
main.narrow { max-width: 680px; }
main.wide { max-width: 1000px; }

/* Diamond accents echoing the Town Hall slide template. */
.deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.d { position: absolute; width: 110px; height: 110px; border-radius: 22px; transform: rotate(45deg); }
.d1 { top: -40px; left: -40px; border: 12px solid var(--scj-green); }
.d2 { top: 70px; left: 20px; width: 56px; height: 56px; border-radius: 12px; background: var(--esop-blue); }
.d3 { top: -105px; right: 30%; background: var(--scj-green); width: 150px; height: 150px; }
.d4 { bottom: -50px; right: -40px; background: var(--esop-blue); width: 170px; height: 170px; border-radius: 30px; }
.d5 { bottom: 90px; right: 40px; width: 60px; height: 60px; border-radius: 12px; background: var(--teal); }
.d6 { bottom: -40px; left: 6%; border: 12px solid var(--teal); }
@media (max-width: 700px) {
  .d { opacity: .35; }
  .d3, .d6 { display: none; }
}

.userbar {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: flex-end; align-items: center;
  padding: 10px 16px; font-size: 14px; color: var(--muted);
}
.userbar a { color: var(--esop-blue); font-weight: 600; }
.userbar form { margin: 0; }

.brand { text-align: center; margin: 8px 0 20px; }
.brand img { width: min(420px, 100%); height: auto; }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 6px solid var(--navy);
  border-radius: 14px;
  padding: 24px 22px;
  box-shadow: 0 8px 24px rgba(7, 15, 52, .07);
}
.card.center { text-align: center; }

h1 { font-weight: 800; color: var(--navy); font-size: 1.7rem; line-height: 1.2; margin: 0 0 12px; }
h1::after { content: ""; display: block; width: 72px; height: 6px; margin-top: 12px; background: var(--rule); }
.center h1::after { margin-inline: auto; }

.label { display: block; font-weight: 700; color: var(--navy); margin: 18px 0 6px; }

textarea {
  width: 100%; padding: 12px 14px;
  font: inherit; color: var(--ink);
  border: 2px solid #c9cde0; border-radius: 10px; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--esop-blue); box-shadow: 0 0 0 3px rgba(35, 112, 179, .2); }

fieldset { border: 0; padding: 0; margin: 8px 0 0; }
.choice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; margin: 8px 0;
  border: 2px solid #e1e4ef; border-radius: 10px; cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--scj-green); background: #f6faee; }
.choice input { margin-top: 5px; accent-color: var(--navy); width: 18px; height: 18px; }
.choice small { color: var(--muted); }

.btn, .qactions button {
  display: inline-block; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; text-decoration: none;
  border-radius: 10px;
}
.btn { margin-top: 18px; padding: 12px 26px; background: var(--navy); color: #fff; }
.btn:hover, .btn:focus-visible { background: var(--esop-blue); }

button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--esop-blue); font-weight: 600; cursor: pointer; text-decoration: underline; }

.alert { background: #fdecef; border-left: 5px solid #b3263f; padding: 10px 14px; border-radius: 6px; }

/* Admin */
.adminhead { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; margin-bottom: 12px; }
.adminhead img { width: 220px; height: auto; }
.adminhead h1 { margin: 0; }
.live { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.live.off { color: #b3263f; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; align-items: center; }
.tabs a {
  padding: 6px 14px; border-radius: 999px; text-decoration: none;
  color: var(--navy); font-weight: 600; border: 2px solid #dfe2ee; background: #fff;
}
.tabs a[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }
.tabs .export { margin-left: auto; border-color: var(--teal); color: #146e6a; }

.empty { color: var(--muted); }
.questions { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.q { background: #fff; border: 1px solid var(--rule); border-left: 6px solid var(--scj-green); border-radius: 10px; padding: 14px 16px; }
.q-addressed { border-left-color: var(--esop-blue); }
.q-archived { border-left-color: #b9bdcc; opacity: .8; }
.qtext { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.05rem; }
.qmeta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--muted); }
.who { font-weight: 600; color: var(--navy); overflow-wrap: anywhere; }
.badge { text-transform: capitalize; }
.qactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.qactions button { padding: 6px 12px; font-size: 14px; background: #eef0f7; color: var(--navy); }
.qactions button:hover { background: var(--navy); color: #fff; }
.qactions .quiet { background: none; color: var(--muted); }
.q.fresh { animation: fresh 2.5s ease-out; }
@keyframes fresh { from { background: #eef7dd; } to { background: #fff; } }

/* Honeypot: off-screen for people, still in the form for bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Review fields on admin cards */
.review { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 14px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.review label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; color: var(--navy); }
.review .notes { grid-column: 1 / -1; }
.review select, .review input[type=date], .review textarea { font: inherit; font-weight: 400; font-size: 15px; padding: 6px 8px; border: 2px solid #d5d9e8; border-radius: 8px; background: #fff; color: var(--ink); }
.review textarea { resize: vertical; min-height: 60px; }
.review .row { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.review button { padding: 6px 14px; font: inherit; font-size: 14px; font-weight: 700; border: 0; border-radius: 8px; background: var(--navy); color: #fff; cursor: pointer; }
.review .saved { font-size: 13px; color: #146e6a; }
.review.dirty { border-top-color: var(--esop-blue); }
.qactions .danger { margin-left: auto; background: none; color: #b3263f; }
.qactions .danger:hover { background: #b3263f; color: #fff; }
.live button { margin-left: 8px; font: inherit; font-size: 13px; font-weight: 700; border: 0; border-radius: 6px; padding: 2px 10px; background: var(--esop-blue); color: #fff; cursor: pointer; }
.actionbadge { font-weight: 600; color: var(--violet); }
