/* Register of interest. Built on the site's own style.css (tokens, header, buttons). */
.interest { padding-top: 1.5rem; padding-bottom: 3rem; max-width: 46rem; }
.interest:has(.atable) { max-width: var(--wrap); }
.interest h1 { margin-top: .5rem; }
.lede-s { font-size: 1.1rem; }
.msg { padding: .75rem 1rem; border-radius: var(--radius); border: 2px solid; }
.msg.err { border-color: #b3261e; background: #fbe9e7; color: #5c0f0a; }
.msg.ok { border-color: #1e6b3a; background: #e6f4ea; color: #0f3d20; }
/* Dark = the system's choice unless the accessibility panel's theme button
   set data-theme on <html> (style.css does the same for the tokens). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .msg.err { background: #3a1512; color: #ffd8d3; border-color: #ff8a80; }
  :root:not([data-theme="light"]) .msg.ok { background: #10301c; color: #cdeed7; border-color: #7fd49b; }
  :root:not([data-theme="light"]) .fielderr { color: #ff9b8f; }
}
:root[data-theme="dark"] .msg.err { background: #3a1512; color: #ffd8d3; border-color: #ff8a80; }
:root[data-theme="dark"] .msg.ok { background: #10301c; color: #cdeed7; border-color: #7fd49b; }
:root[data-theme="dark"] .fielderr { color: #ff9b8f; }

fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1.25rem; }
fieldset.bad, .field.bad { border-left: 4px solid #b3261e; padding-left: .75rem; }
legend { font-weight: 700; padding: 0 .4rem; }
legend small, label small, .choices small { font-weight: 400; color: var(--ink-2); }
.field { margin: 0 0 1rem; }
.field > label { display: block; font-weight: 600; margin-bottom: .25rem; }
.field > label.sub { font-weight: 400; margin-top: .75rem; }
.hint { display: block; color: var(--ink-2); font-size: .95rem; margin: 0 0 .35rem; }
.fielderr { display: block; color: #b3261e; font-weight: 700; margin: 0 0 .35rem; }
.q { margin: 0 0 .25rem; font-weight: 600; }
.ifrm input:not([type=radio]):not([type=checkbox]), .ifrm select, .ifrm textarea {
  font: inherit; width: 100%; max-width: 28rem; padding: .55rem .65rem; border: 2px solid var(--line);
  border-radius: 8px; background: var(--bg); color: var(--ink);
}
.ifrm textarea { max-width: 100%; }
.ifrm input.short[type=number] { max-width: 6rem; }
.ifrm input.time[type=time] { max-width: 10rem; }
.times { display: flex; flex-wrap: wrap; gap: 0 2rem; }
.ifrm [aria-invalid="true"] { border-color: #b3261e; }
.choices { list-style: none; padding: 0; margin: 0; }
.choices li + li { border-top: 1px solid var(--line); }
.choices label { display: flex; gap: .75rem; align-items: flex-start; padding: .55rem .25rem; font-weight: 400; cursor: pointer; }
.choices input { margin-top: .3rem; width: 1.2rem; height: 1.2rem; flex: none; accent-color: var(--maroon); }
.choices small { display: block; }
.choices.inline { display: flex; gap: 0 2rem; }
.choices.inline li + li { border-top: 0; }
/* The field only a script fills in. Off-screen, not display:none, which some bots skip. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
button.btn { font: inherit; cursor: pointer; border: 0; }
.privacy { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.privacy summary { cursor: pointer; font-weight: 600; }

.asat { color: var(--ink-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin: 1.25rem 0; }
.stats div { background: var(--bg-2); border-radius: var(--radius); padding: .75rem 1rem; }
.stats b { display: block; font-size: 2rem; line-height: 1.1; color: var(--maroon); }
.stats span { color: var(--ink-2); }
table.bars { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
table.bars th, table.bars td { text-align: left; padding: .4rem .25rem; border-bottom: 1px solid var(--line); font-weight: 400; vertical-align: middle; }
table.bars thead th { font-weight: 700; }
table.bars th small { color: var(--ink-2); }
table.bars td.n, table.bars th.n { width: 50%; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.bars tr { background: none; }
.barcell { display: flex; align-items: center; gap: .6rem; }
.barcell span { min-width: 2.5ch; text-align: right; }
svg.bar { flex: 1; min-width: 0; height: .8rem; background: var(--bg-2); border-radius: 3px; }
svg.bar rect { fill: var(--maroon); }
.cta { margin-top: 2rem; }

.admin-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.admin-nav form { margin: 0 0 0 auto; }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--maroon); text-decoration: underline; cursor: pointer; }
.linkish.danger { color: #b3261e; }
form.inline { display: inline; }
.atable { width: 100%; border-collapse: collapse; }
.atable th, .atable td { text-align: left; vertical-align: top; padding: .5rem; border-bottom: 1px solid var(--line); }
.atable small { color: var(--ink-2); }
@media print {
  .admin-nav, .cta, .notice { display: none; }
  svg.bar { background: #eee; }
}
