/* Find a time: Our Cat Herder palette (teal-600 #047484) */
:root {
  --orange-50: #fff8f1;
  --orange-500: #ff5a1f;
  --orange-600: #d03801;
  --orange-700: #b43403;
  --green-600: #057a55;
  --red-400: #f98080;
  --teal-50: #edfafa;
  --teal-100: #d5f5f6;
  --teal-500: #0694a2;
  --teal-600: #047484;
  --teal-700: #036672;
  --teal-800: #05505c;
  --gray-50: #f9fafb;
  --gray-100: #f4f5f7;
  --gray-200: #e5e7eb;
  --gray-300: #d2d6dc;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #161e2e;
  --green-50: #f3faf7;
  --green-100: #def7ec;
  --green-700: #046c4e;
  --yellow-50: #fdfdea;
  --yellow-100: #fdf6b2;
  --yellow-700: #8e4b10;
  --red-50: #fdf2f2;
  --red-600: #e02424;
  --red-700: #c81e1e;
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--gray-900);
  background: var(--gray-50);
}
a { color: var(--teal-700); }
a:hover { color: var(--teal-800); }

[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--gray-200);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gray-900); }
.brand img { display: block; height: 31px; width: auto; }
.brand span { font-weight: 600; padding-left: 12px; border-left: 1px solid var(--gray-300); }
.header-link { font-weight: 500; text-decoration: none; }

main { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }

.site-footer {
  border-top: 1px solid var(--gray-200); background: #fff; color: var(--gray-600);
  font-size: 14px; padding: 20px 16px; text-align: center;
}
.site-footer p { margin: 0 auto; max-width: 640px; }

h1 { font-size: 1.875rem; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; margin: 0 0 8px; }
.section-title { margin-top: 32px; }
.lede { font-size: 1.125rem; color: var(--gray-600); margin: 0 0 24px; max-width: 640px; }
.intro { margin-bottom: 8px; }
.hint { color: var(--gray-500); font-size: 14px; margin: 4px 0 12px; }
.optional { color: var(--gray-500); font-weight: 400; }
.eyebrow { color: var(--teal-700); font-weight: 600; font-size: 14px; margin: 0 0 4px; text-transform: uppercase; letter-spacing: 0.04em; }

.card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 24px; margin-bottom: 24px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.card.narrow { max-width: 480px; }

fieldset { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
legend { font-size: 1.125rem; font-weight: 600; margin-bottom: 12px; padding: 0; }
label { display: block; font-weight: 500; margin-bottom: 16px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--teal-600); flex: none; }

input, select, textarea {
  display: block; width: 100%; margin-top: 4px; font: inherit; color: inherit;
  padding: 9px 12px; border: 1px solid var(--gray-300); border-radius: 6px; background: #fff;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--teal-500); outline-offset: 1px;
}
input[readonly] { background: var(--gray-100); }

.slots { list-style: none; padding: 0; margin: 0 0 12px; }
.slot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.slot input { width: auto; margin: 0; flex: 1 1 140px; }
.slot .link-button { flex: none; }

button, .button {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  border-radius: 6px; padding: 10px 18px; border: 1px solid transparent; line-height: 1.25;
}
.primary { background: var(--teal-600); color: #fff; }
.primary:hover { background: var(--teal-700); color: #fff; }
.secondary { background: #fff; color: var(--teal-700); border-color: var(--teal-600); }
.secondary:hover { background: var(--teal-50); }
.danger { background: var(--red-600); color: #fff; }
.danger:hover { background: var(--red-700); }
.small { padding: 5px 10px; font-size: 13px; }
.link-button { background: none; border: 0; padding: 4px; color: var(--teal-700); font-weight: 500; text-decoration: underline; }
.link-button.small { font-size: 12px; padding: 0 4px; }
form.inline { display: inline; }
.inline-actions { margin: 16px 0; }

.error { background: var(--red-50); color: var(--red-700); border-radius: 6px; padding: 10px 14px; }
.notice { background: var(--teal-50); color: var(--teal-800); border-radius: 6px; padding: 10px 14px; }

.poll-head { margin-bottom: 20px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 8px 0; }
.facts dt { color: var(--gray-500); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.note { white-space: pre-line; background: #fff; border-left: 3px solid var(--teal-500); padding: 8px 12px; margin: 12px 0; }
.tz-note { font-size: 14px; color: var(--gray-600); margin: 8px 0; }
.instructions { margin: 8px 0; }

.share .copy-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share .copy-row input { margin: 0; flex: 1 1 260px; }

.booked-banner {
  background: var(--green-50); border: 1px solid var(--green-100); border-radius: var(--radius);
  padding: 20px; margin: 16px 0 24px;
}
.booked-banner h2 { color: var(--green-700); margin-bottom: 4px; }
.booked-time { font-size: 1.125rem; font-weight: 600; margin: 0 0 12px; }

/* Results grid: scrolls sideways inside its box on narrow screens; the name column stays put. */
.grid-wrap { overflow-x: auto; border: 1px solid var(--gray-200); border-radius: var(--radius); background: #fff; margin: 8px 0 16px; }
.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.grid th, .grid td { padding: 8px 10px; border-bottom: 1px solid var(--gray-200); text-align: center; vertical-align: middle; }
.grid thead th { background: var(--gray-50); font-weight: 600; min-width: 116px; }
.grid .name-col {
  position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; min-width: 160px;
  border-right: 1px solid var(--gray-200); font-weight: 500;
}
.grid thead .name-col { background: var(--gray-50); color: var(--gray-600); font-weight: 500; }
.col-date, .col-time { display: block; }
.col-time { font-weight: 400; color: var(--gray-600); white-space: nowrap; }
.you { color: var(--gray-500); font-weight: 400; }
.answer.yes { background: var(--green-50); }
.answer.maybe { background: var(--orange-50); }
.mark.yes { color: var(--green-700); font-weight: 700; }
.mark.maybe { color: var(--orange-700); font-weight: 600; }
.mark.no { color: var(--red-400); }
.me-row th, .me-row td { background: var(--teal-50); }
.me-row input { margin: 0; }
.choice { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.pill { margin: 0; font-weight: 500; font-size: 13px; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill > span {
  display: block; padding: 4px 8px; border: 1px solid var(--gray-300); border-radius: 999px;
  background: #fff; cursor: pointer; white-space: nowrap;
}
.pill input:focus-visible + span { outline: 2px solid var(--teal-500); outline-offset: 1px; }
/* Y / N / M: outlined in their colour, filled when chosen. */
.pill.yes > span { border-color: var(--green-600); color: var(--green-700); }
.pill.no > span { border-color: var(--red-600); color: var(--red-700); }
.pill.maybe > span { border-color: var(--orange-500); color: var(--orange-700); }
.pill.yes input:checked + span { background: var(--green-600); color: #fff; }
.pill.no input:checked + span { background: var(--red-600); color: #fff; }
.pill.maybe input:checked + span { background: var(--orange-500); color: #fff; }
.pill input:checked + span { font-weight: 700; }
tfoot th, tfoot td { border-bottom: 0; background: var(--gray-50); }
.total .count { font-size: 1.125rem; font-weight: 700; }
.total .maybe-count { display: block; color: var(--orange-700); font-size: 12px; }
.total.best { background: var(--teal-50); box-shadow: inset 0 3px 0 var(--teal-500); }
.total.booked { background: var(--green-50); box-shadow: inset 0 3px 0 var(--green-700); }
.badge {
  display: block; width: fit-content; margin: 4px auto 0; padding: 1px 8px; border-radius: 999px; font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--teal-600); color: #fff;
}
.total.booked .badge { background: var(--green-700); }
.book-form { margin-top: 6px; }
.vote-actions { margin: 8px 0 24px; }

.poll-list { list-style: none; padding: 0; margin: 0 0 24px; }
.poll-list li { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.poll-list a { font-weight: 600; }
.poll-list .meta { display: block; color: var(--gray-500); font-size: 14px; }

.danger-zone { margin-top: 40px; color: var(--gray-600); }
.danger-zone summary { cursor: pointer; }

@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }
  .card { padding: 16px; }
  .grid .name-col { min-width: 120px; }
  .brand span { display: none; }
}

.tz-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; font-weight: 500; color: var(--gray-700); margin: 8px 0; }
.tz-picker select { width: auto; max-width: 100%; margin: 0; padding: 6px 10px; font-size: 14px; }
.grid tr.mine th, .grid tr.mine td { box-shadow: inset 0 -1px 0 var(--teal-500); }
.grid tr.mine th { background: var(--teal-50); }
.cancel-link { margin-left: 16px; }

/* Answer form: one row per time on every screen size. */
.vote-form label { margin-bottom: 12px; }
.vote-options { list-style: none; padding: 0; margin: 8px 0 16px; border-top: 1px solid var(--gray-200); }
.vote-option {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 12px 0; border-bottom: 1px solid var(--gray-200);
}
.vote-when { min-width: 160px; }
.vote-when .col-date { font-weight: 600; }
.vote-option .choice { flex-direction: row; gap: 6px; }
.vote-option .pill > span { width: 48px; padding: 10px 0; text-align: center; font-size: 16px; font-weight: 600; }
.vote-form .vote-actions { margin: 0; }

/* Results: grid on wide screens, one card per time on phones. */
.results-cards { display: none; }
.cards-summary { color: var(--gray-600); font-size: 14px; margin: 8px 0; }
.option-cards { list-style: none; padding: 0; margin: 0 0 16px; }
.option-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 8px;
}
.option-card.best { border-color: var(--teal-500); box-shadow: inset 3px 0 0 var(--teal-500); }
.option-card.booked { border-color: var(--green-700); box-shadow: inset 3px 0 0 var(--green-700); }
.option-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.option-card-head .col-date { font-weight: 600; }
.option-card-score { text-align: right; font-size: 14px; color: var(--gray-600); }
.option-card-score .count { font-size: 1.125rem; font-weight: 700; color: var(--gray-900); }
.option-card-score .badge { margin: 4px 0 0 auto; }
.option-card .who { margin: 6px 0 0; font-size: 14px; }
.option-card .who.mine { color: var(--teal-700); font-weight: 600; }
.option-card .book-form { margin-top: 8px; }
.people { margin: 8px 0 16px; font-size: 14px; }
.people ul { padding-left: 18px; }

@media (max-width: 720px) {
  .results-table { display: none; }
  .results-cards { display: block; }
  .vote-option { flex-direction: column; align-items: stretch; }
  .vote-option .choice { display: grid; grid-template-columns: repeat(3, 1fr); }
  .vote-option .pill > span { width: auto; padding: 12px 0; }
}

.answer-key { font-size: 14px; color: var(--gray-600); margin: 4px 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.answer-key .key { display: inline-block; width: 22px; text-align: center; border-radius: 4px; color: #fff; font-weight: 700; font-size: 12px; line-height: 20px; }
.answer-key .key:not(:first-child) { margin-left: 8px; }
.key.yes { background: var(--green-600); }
.key.no { background: var(--red-600); }
.key.maybe { background: var(--orange-500); }
.option-card-score .maybe-count, .option-card .mark.maybe { color: var(--orange-700); }

input.short { max-width: 120px; }
.progress-box { margin: 8px 0 12px; }
.progress-label { margin: 0 0 6px; }
.progress { height: 10px; background: var(--gray-200); border-radius: 999px; overflow: hidden; max-width: 420px; }
.progress-fill { display: block; height: 100%; background: var(--teal-600); border-radius: 999px; }
.progress-fill.w0 { width: 0%; }
.progress-fill.w5 { width: 5%; }
.progress-fill.w10 { width: 10%; }
.progress-fill.w15 { width: 15%; }
.progress-fill.w20 { width: 20%; }
.progress-fill.w25 { width: 25%; }
.progress-fill.w30 { width: 30%; }
.progress-fill.w35 { width: 35%; }
.progress-fill.w40 { width: 40%; }
.progress-fill.w45 { width: 45%; }
.progress-fill.w50 { width: 50%; }
.progress-fill.w55 { width: 55%; }
.progress-fill.w60 { width: 60%; }
.progress-fill.w65 { width: 65%; }
.progress-fill.w70 { width: 70%; }
.progress-fill.w75 { width: 75%; }
.progress-fill.w80 { width: 80%; }
.progress-fill.w85 { width: 85%; }
.progress-fill.w90 { width: 90%; }
.progress-fill.w95 { width: 95%; }
.progress-fill.w100 { width: 100%; }
.expected-edit { margin-top: 8px; font-size: 14px; }
.expected-edit summary { cursor: pointer; color: var(--teal-700); }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-top: 8px; }
.inline-form label { margin: 0; }

.time-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 8px 0; }
.time-controls .tz-picker { margin: 0; }
.clock-toggle { display: inline-flex; border: 1px solid var(--teal-600); border-radius: 999px; overflow: hidden; }
.clock-toggle button { border: 0; border-radius: 0; background: #fff; color: var(--teal-700); font-size: 13px; font-weight: 600; padding: 6px 12px; }
.clock-toggle button[aria-pressed="true"] { background: var(--teal-600); color: #fff; }
.tz-picker { max-width: 100%; }
.tz-picker select { min-width: 0; flex: 1 1 auto; text-overflow: ellipsis; }

/* Room between the Turnstile check and the button that follows it. */
.cf-turnstile { margin: 8px 0 20px; min-height: 65px; }
