:root {
  color-scheme: light;
  --forest: #1f3216;
  --surface: #ffffff;
  --surface-2: #eef2eb;
  --field: #ffffff;
  --control-border: #a6b3a0;
  --accent: #accf94;
  --mint: #d3e9c4;
  --ink: #eef1ee;
  --muted: #c3d1bc;
  --line: #ffffff26;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(ellipse 46rem 36rem at 96% 4%, rgb(100 145 75 / 10%), transparent 68%), var(--forest);
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
.button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid #c5d0be;
  border-radius: 10px;
  background: var(--surface-2);
  color: #3b4c35;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  transition: background .15s, transform .15s;
}

button:hover,
.button:hover {
  background: #e1e9dc;
}

button:active,
.button:active {
  transform: translateY(1px);
}

.primary {
  background: #3d5e31;
  border-color: #3d5e31;
  color: #ffffff;
}

.primary:hover {
  background: #2f4b25;
  border-color: #2f4b25;
}

.text-button {
  background: transparent;
  border: 0;
  padding: 4px;
  color: var(--muted);
}

.text-button:hover {
  background: rgb(127 145 113 / 14%);
  color: var(--ink);
}

.danger,
.text-button.danger:hover {
  color: #963d2d;
}

.shell {
  width: min(1120px, calc(100% - 80px));
  margin: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 112px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.055em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
}

.brand-mark img {
  display: block;
  width: 45px;
  height: 45px;
  object-fit: contain;
}

nav {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 13px;
  color: var(--muted);
}

main {
  flex: 1;
  padding-bottom: 70px;
  min-width: 0;
}

footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 22px 0 30px;
  color: var(--muted);
  font-size: 12px;
}

h1 {
  font-size: clamp(29px, 4vw, 44px);
  font-weight: 650;
  letter-spacing: -.05em;
  line-height: 1.16;
  margin: 0 0 25px;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -.025em;
  margin: 0 0 18px;
  font-weight: 650;
}

h3 {
  font-size: 16px;
  margin: 0;
}

p {
  margin: 0 0 18px;
}

.narrow {
  max-width: 440px;
  margin: 7vh auto;
}

.panel,
.event-row,
.notice {
  --ink: #24371c;
  --muted: #667364;
  --line: #dce4d7;
  --accent: #3d5e31;
  color: var(--ink);
}

.panel {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgb(7 20 3 / 15%);
}

.settings-section + .settings-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.settings-section > summary {
  padding: 2px 0;
}

.settings-section .stack > form + form {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.stack>p {
  margin: 0;
}

.grid {
  align-items: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

input,
textarea,
select {
  display: block;
  width: 100%;
  min-width: 0;
  background: var(--field);
  border: 1px solid var(--control-border);
  border-radius: 9px;
  color: var(--ink);
  padding: 11px 12px;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}

input[readonly] {
  color: var(--muted);
}

input::placeholder,
textarea::placeholder {
  color: #75826d;
}

input[type=checkbox],
input[type=radio] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  margin: 0;
  flex-shrink: 0;
}

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.6;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
}

.page-heading h1,
.page-heading h2 {
  margin: 0;
}

.section {
  margin-top: 26px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.muted,
.meta {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.back {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}

.badge {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 30px;
  color: var(--muted);
  white-space: nowrap;
}

.badge.open {
  color: var(--accent);
  background: #accf9426;
  border-color: var(--accent);
}

.badge.finalized {
  color: var(--accent);
}

.badge.cancelled {
  color: #ffb7b0;
}

.event-row .badge.cancelled {
  color: #963d2d;
  border-color: #dfb7ad;
  background: #fff0eb;
}

.event-list {
  display: grid;
  gap: 12px;
}

.event-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 25px 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  transition: background .15s;
}

.event-row:hover {
  background: var(--surface-2);
}

.event-row h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.event-row .muted {
  font-size: 13px;
}

.notice {
  padding: 15px 20px;
  margin-bottom: 25px;
  background: var(--surface);
  border: 1px solid #b8caaa;
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  font-size: 14px;
}

.notice.error {
  background: #fff3ee;
  color: #7b3527;
  border-color: #dfb7ad;
  border-left-color: #a94732;
}

.slot-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(150px, 1.4fr) minmax(100px, 1fr) minmax(100px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding-bottom: 20px;
}

.slot-row button {
  margin-bottom: 9px;
  font-size: 12px;
}

.slot-row label {
  min-width: 0;
}

.slot-row input:not([type=hidden]),
.slot-row select {
  height: 48px;
  padding: 10px 12px;
}

.slot-row.all-day {
  grid-template-columns: minmax(150px, 1.4fr) minmax(150px, 1.4fr) 2fr auto;
}

.slot-row.all-day button {
  grid-column: -2;
}

.field-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 15px;
}

summary::marker {
  color: var(--accent);
}

details[open]>summary {
  margin-bottom: 10px;
}

.copy-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.copy-row input {
  margin: 0;
  font-size: 13px;
}

.copy-row button {
  white-space: nowrap;
}

.panel>label {
  margin-bottom: 12px;
}

.table-scroll {
  overflow: auto;
  max-width: 100%;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

th,
td {
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  font-weight: 600;
}

thead th {
  font-size: 12px;
  color: var(--muted);
  min-width: 175px;
}

thead th:first-child {
  min-width: 130px;
}

thead small {
  display: block;
  color: var(--accent);
  margin-top: 5px;
}

.best {
  background: #eaf1e4;
}

.results {
  margin-top: 26px;
}

.results th:first-child {
  position: sticky;
  left: 0;
  background: var(--surface);
}

tfoot {
  color: var(--muted);
}

.vote {
  display: inline-block;
  white-space: nowrap;
  font-size: 12px;
  border-radius: 6px;
  padding: 4px 9px;
}

.vote.yes {
  background: #e2eedb;
  color: #315325;
}

.vote.if_needed {
  background: #f5ecd4;
  color: #695018;
}

.vote.maybe {
  background: #e2edf4;
  color: #315870;
}

.vote.no {
  color: #884131;
  background: #f6e6df;
}

.description {
  white-space: pre-wrap;
  max-width: 760px;
  color: #d2dccb;
  overflow-wrap: anywhere;
}

.meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-bottom: 18px;
}

.inline-form {
  display: flex;
  align-items: end;
  gap: 10px;
}

.inline-form select {
  min-width: 140px;
}

.inline-form label {
  flex: 1;
}

.inline-form input {
  margin-top: 5px;
}

.voting-options {
  display: grid;
  gap: 20px;
}

.vote-row {
  border: 0;
  margin: 0;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.vote-row legend {
  font-size: 15px;
  margin-bottom: 14px;
  font-weight: 600;
}

.vote-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 700px;
}

.vote-option {
  position: relative;
  cursor: pointer;
}

.vote-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.vote-option span {
  display: flex;
  justify-content: center;
  padding: 11px 8px;
  border: 1px solid var(--control-border);
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
}

.vote-option input:checked+span {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  font-weight: 750;
}

.vote-option.if_needed input:checked+span {
  background: #f5e8c5;
  border-color: #b59a56;
  color: #5a461e;
}

.vote-option.maybe input:checked+span {
  background: #dfebf4;
  border-color: #7e9db4;
  color: #2c506b;
}

.vote-option.no input:checked+span {
  background: #f5e2dc;
  border-color: #bf8c7c;
  color: #78392d;
}

.vote-option input:focus-visible+span {
  outline: 3px solid #739a65;
  outline-offset: 3px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
}

.final-date h2 {
  margin-top: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

:focus-visible {
  outline: 3px solid #739a65;
  outline-offset: 3px;
}

@media(max-width:760px) {
  .shell {
    width: calc(100% - 36px);
  }

  header {
    min-height: 86px;
    margin-bottom: 30px;
  }

  .panel {
    padding: 22px 18px;
    border-radius: 15px;
  }

  .slot-row,
  .slot-row.all-day {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
  }

  .slot-row button,
  .slot-row.all-day button {
    grid-column: 2;
    justify-self: end;
  }

  .event-row {
    padding: 20px;
    gap: 14px;
  }

  .event-row h2 {
    font-size: 18px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .page-heading {
    gap: 14px;
  }

  .copy-row {
    flex-wrap: wrap;
  }

  .copy-row input {
    flex: 1;
    min-width: 160px;
  }

  .results {
    padding: 22px 12px;
  }

  .results .page-heading {
    padding: 0 6px;
  }

  th,
  td {
    padding: 12px;
  }

  .brand {
    font-size: 21px;
  }

  .vote-options {
    gap: 6px;
  }

  .vote-option span {
    font-size: 12px;
    padding: 12px 3px;
  }

  .inline-form {
    flex-wrap: wrap;
  }

  .description {
    font-size: 14px;
  }

  nav {
    gap: 16px;
  }

  .event-row>span:last-child {
    display: none;
  }

  .event-row {
    grid-template-columns: 1fr auto;
  }

  main {
    padding-bottom: 45px;
  }
}

@media(prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}


button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
