html, body {
  margin: 0;
  background: var(--hfc-canvas);
}

body {
  color: var(--hfc-ink);
  font: 400 1rem/1.5 var(--hfc-font-sans);
}

.hfc-board-surface {
  margin: 0 auto;
  max-width: var(--hfc-content-max);
  min-height: 100vh;
  padding: var(--hfc-space-md);
}

.hfc-document-header__lockup {
  max-height: 4rem;
  max-width: 16rem;
}

.gate {
  background: var(--hfc-information-bg);
  border: 1px solid var(--hfc-line);
  border-radius: var(--hfc-radius);
  margin-bottom: var(--hfc-space-lg);
  padding: var(--hfc-space-lg);
}

.gate[hidden],
.status[hidden] {
  display: none;
}

label.field {
  display: block;
  font-weight: 700;
  margin-bottom: var(--hfc-space-lg);
}

label.field span,
.optional {
  display: block;
  margin-bottom: var(--hfc-space-sm);
}

.optional {
  color: var(--hfc-text-secondary);
  font-size: 0.86rem;
  font-weight: 500;
}

input[type="text"],
select {
  background: var(--hfc-paper);
  border: 1px solid var(--hfc-line);
  border-radius: var(--hfc-radius-sm);
  color: inherit;
  font: inherit;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  width: 100%;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--hfc-maroon) 50%),
    linear-gradient(135deg, var(--hfc-maroon) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) calc(50% - 0.18rem), calc(100% - 0.75rem) calc(50% - 0.18rem);
  background-repeat: no-repeat;
  background-size: 0.4rem 0.4rem, 0.4rem 0.4rem;
  padding-right: 2.2rem;
}

select:focus-visible,
input:focus-visible {
  outline: 3px solid var(--hfc-public-site-blue-hover);
  outline-offset: 3px;
}



legend {
  color: var(--hfc-maroon);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: var(--hfc-space-sm);
  padding: 0;
}

.hint {
  color: var(--hfc-text-secondary);
  font-size: 0.92rem;
  margin: 0 0 var(--hfc-space-md);
  max-width: none;
}



.actions {
  display: grid;
  gap: var(--hfc-space-sm);
}

button {
  appearance: none;
  border: 0;
  border-radius: var(--hfc-radius-sm);
  cursor: pointer;
  font: 700 1rem/1.2 var(--hfc-font-sans);
  min-height: 3.1rem;
  padding: 0.85rem 1rem;
  width: 100%;
}

.primary {
  background: var(--hfc-maroon);
  color: var(--hfc-text-inverse);
}

.primary:disabled {
  cursor: wait;
  opacity: 0.7;
}

.status {
  border-radius: var(--hfc-radius-sm);
  font-weight: 650;
  margin-top: var(--hfc-space-md);
  padding: 0.75rem 0.9rem;
}

.status.ok {
  background: var(--hfc-success-bg);
  color: var(--hfc-success);
}

.status.warn {
  background: var(--hfc-information-bg);
  color: var(--hfc-information);
}



.hfc-board-footer {
  display: block;
}

.hfc-board-footer p {
  margin: 0 0 0.35rem;
  max-width: none;
}

@media (max-width: 28rem) {
  .hfc-document-header {
    flex-direction: column;
  }
}

input[type="password"] {
  background: var(--hfc-paper);
  border: 1px solid var(--hfc-line);
  border-radius: var(--hfc-radius-sm);
  font: inherit;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  width: 100%;
}

.panel {
  background: var(--hfc-surface-subtle);
  border: 1px solid var(--hfc-line);
  border-radius: var(--hfc-radius);
  margin: 0 0 var(--hfc-space-md);
  padding: var(--hfc-space-md) var(--hfc-space-lg);
}

.panel h3 {
  color: var(--hfc-blue);
  margin: 0 0 var(--hfc-space-sm);
}

.panel p {
  margin: 0 0 var(--hfc-space-sm);
  max-width: none;
}

fieldset.question {
  border: 1px solid var(--hfc-line);
  border-radius: var(--hfc-radius);
  margin: 0 0 var(--hfc-space-lg);
  padding: var(--hfc-space-md) var(--hfc-space-lg) var(--hfc-space-lg);
}

fieldset.question.is-disabled {
  opacity: 0.55;
}

.qnum {
  background: var(--hfc-maroon);
  border-radius: var(--hfc-radius-pill);
  color: var(--hfc-text-inverse);
  display: inline-block;
  font-size: 0.9rem;
  line-height: 1.7rem;
  margin-right: var(--hfc-space-sm);
  text-align: center;
  width: 1.7rem;
}

.choices {
  display: grid;
  gap: var(--hfc-space-sm);
}

.choices.inline {
  grid-template-columns: repeat(2, minmax(0, 10rem));
}

.choices.names {
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}

.choice {
  align-items: center;
  background: var(--hfc-paper);
  border: 1px solid var(--hfc-line);
  border-radius: var(--hfc-radius-sm);
  cursor: pointer;
  display: flex;
  gap: var(--hfc-space-sm);
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
}

.choice:has(input:checked) {
  background: var(--hfc-information-bg);
  border-color: var(--hfc-blue);
}

.choice:has(input:disabled) {
  cursor: not-allowed;
}

.choice input {
  accent-color: var(--hfc-maroon);
  height: 1.15rem;
  margin: 0;
  width: 1.15rem;
}

.choice small {
  color: var(--hfc-text-secondary);
}

fieldset.nominee-group {
  border: 0;
  margin: 0 0 var(--hfc-space-md);
  padding: 0;
}

fieldset.nominee-group legend {
  color: var(--hfc-blue);
  font-size: 1rem;
}

.grid2 {
  display: grid;
  gap: var(--hfc-space-md);
}

@media (min-width: 44rem) {
  .grid2 {
    grid-template-columns: 1fr 1fr;
  }
}

.secondary {
  background: var(--hfc-surface-tint);
  color: var(--hfc-blue);
  min-height: 2.25rem;
  padding: 0.4rem 0.8rem;
  width: auto;
}

td.num,
th.num {
  text-align: right;
}

td.link code {
  font-size: 0.75rem;
  word-break: break-all;
}

#admin-form button {
  margin-top: var(--hfc-space-sm);
}

.meter {
  background: var(--hfc-surface-tint);
  border-radius: var(--hfc-radius-pill);
  height: 0.6rem;
  margin: 0 0 var(--hfc-space-sm);
  overflow: hidden;
}

.meter > span {
  background: var(--hfc-success);
  display: block;
  height: 100%;
  width: 0;
}

.not-a-vote {
  margin: 0 0 var(--hfc-space-lg);
}

.not-a-vote p {
  font-size: 1.05rem;
  margin: 0;
  max-width: none;
}

.submit-note {
  margin-top: var(--hfc-space-md);
}

.done h2 {
  border: 0;
  color: var(--hfc-maroon);
  margin: 0 0 var(--hfc-space-sm);
  padding: 0;
}

a.button {
  border-radius: var(--hfc-radius-sm);
  display: inline-block;
  font: 700 0.9rem/1.2 var(--hfc-font-sans);
  text-decoration: none;
}

a.button.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

td.row-actions {
  white-space: nowrap;
}

td.row-actions > * {
  margin: 0 var(--hfc-space-xs) var(--hfc-space-xs) 0;
}
