:root {
  --ink: #1B2147;
  --indigo: #2F339A;
  --tint: #ECEEFB;
  --ground: #F5F6FB;
  --marigold: #F7B32B;
  --muted: #4E5678;
  --line: #7A81A6;
  --error: #A32A1E;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.5;
}
body.tinted { background: var(--ground); }

a { color: var(--indigo); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }

h1, h2, h3 { margin: 0; }
h1, .display { font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.15; }
h3 { font-size: 22px; }
p { margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; }
.narrow { max-width: 720px; margin: 0 auto; width: 100%; }
.wide { max-width: 860px; margin: 0 auto; width: 100%; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-large { display: flex; flex-direction: column; gap: 20px; }
.muted { color: var(--muted); }
.hint { font-size: 15px; color: var(--muted); }
.center { text-align: center; }
.error { font-size: 15px; font-weight: 700; color: var(--error); }
.trap { position: absolute; left: -9999px; height: 1px; overflow: hidden; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #FFFFFF;
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  text-decoration: none;
}
.logo:hover { color: #FFFFFF; }
.logo::before {
  content: '';
  flex: none;
  width: 34px;
  height: 34px;
  background: url('/favicon.svg') center / contain no-repeat;
}

.page-header { background: var(--indigo); color: #FFFFFF; padding: 16px 20px 24px; }
.page-header .narrow, .page-header .wide { display: flex; flex-direction: column; gap: 10px; }
.page-header h1 { font-size: 40px; line-height: 1.1; }
main { padding: 24px 20px 56px; }

.card { background: #FFFFFF; border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.notice { padding: 12px 16px; background: var(--tint); border-radius: 14px; font-weight: 700; }
.notice-error { background: #FBE9E6; color: var(--error); }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--indigo);
  color: #FFFFFF;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.pill:hover { color: #FFFFFF; background: var(--ink); }
.pill-gold { background: var(--marigold); color: var(--ink); }
.pill-gold:hover { background: #FFC851; color: var(--ink); }
.pill-line { background: #FFFFFF; border-color: var(--indigo); color: var(--indigo); }
.pill-line:hover { background: var(--tint); color: var(--indigo); }
.pill-wide { width: 100%; min-height: 56px; font-size: 19px; }
.pill-danger { background: #FFFFFF; border-color: var(--error); color: var(--error); }
.pill-danger:hover { background: #FBE9E6; color: var(--error); }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
label, .label { font-weight: 800; }
input[type='text'], input[type='email'], input[type='date'], input[type='time'], textarea {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0 14px;
  background: #FFFFFF;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 12px;
  font: inherit;
}
textarea { padding: 10px 14px; resize: vertical; }
/* iPhones draw date and time boxes at their own width unless told otherwise. */
@supports (-webkit-touch-callout: none) {
  input[type='date'], input[type='time'] { -webkit-appearance: none; appearance: none; line-height: 46px; }
  input::-webkit-date-and-time-value { text-align: left; }
}

/* Home */
.hero { background: var(--indigo); color: #FFFFFF; padding: 16px 20px 72px; }
.hero .wrap { display: flex; flex-direction: column; gap: 44px; }
.hero-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.outline-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid #FFFFFF;
  border-radius: 999px;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
}
.outline-link:hover { color: var(--ink); background: #FFFFFF; }
.hero-body { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero-copy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.hero h1 { font-size: clamp(42px, 6vw, 68px); }
.hero-copy p { font-size: 21px; max-width: 28em; }
.sample { flex: 1 1 400px; min-width: 0; background: #FFFFFF; color: var(--ink); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.sample-title { font-family: var(--display); font-weight: 800; font-size: 24px; }
.sample-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 12px 14px; border-radius: 14px; background: var(--ground); }
.sample-row.best { background: var(--tint); }
.sample-row span { display: block; }
.sample-day { font-weight: 800; }
.sample-time { font-size: 15px; color: var(--muted); }
.sample-end { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.tag { padding: 2px 10px; background: var(--marigold); color: var(--ink); border-radius: 999px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.section { padding: 64px 20px 0; }
.section h2 { font-size: 36px; margin-bottom: 24px; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.how-grid > div { display: flex; flex-direction: column; gap: 6px; }
.step { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--tint); color: var(--indigo); border-radius: 12px; font-weight: 800; }
.use-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.use-grid a { display: flex; align-items: center; min-height: 60px; padding: 0 18px; background: var(--tint); color: var(--ink); border-radius: 14px; font-weight: 800; text-decoration: none; }
.use-grid a:hover { background: #DDE0F7; }
.partner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 64px; padding: 32px; background: var(--ink); color: #FFFFFF; border-radius: 22px; }
.partner > div { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.partner h2 { font-size: 30px; margin: 0; }

/* Create */
.calendar { display: flex; flex-direction: column; gap: 8px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; }
.calendar-title { font-weight: 800; font-size: 20px; }
.calendar-nav { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--tint); color: var(--indigo); font: inherit; font-weight: 800; cursor: pointer; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-weekday { text-align: center; font-size: 14px; font-weight: 800; color: var(--muted); }
.calendar-day { min-height: 46px; padding: 0; border: 0; border-radius: 12px; background: var(--ground); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.calendar-day[aria-pressed='true'] { background: var(--indigo); color: #FFFFFF; }
.calendar-day:disabled { background: transparent; color: #8D93B0; cursor: default; }
.date-rows { display: flex; flex-direction: column; gap: 8px; }
.date-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 10px 12px; background: var(--tint); border-radius: 12px; }
.date-row .field { flex: 1 1 160px; }
.date-row label { font-size: 15px; }
.remove { width: 44px; height: 50px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }

/* Voting */
.option { margin: 0; padding: 14px; border: 0; background: #FFFFFF; border-radius: 16px; min-width: 0; }
.option legend { float: left; width: 100%; padding: 0; margin-bottom: 10px; font-weight: 800; font-size: 19px; }
.answers { clear: both; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.answer { position: relative; font-weight: 800; cursor: pointer; }
.answer input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.answer span { display: flex; align-items: center; justify-content: center; min-height: 48px; background: #FFFFFF; border: 2px solid var(--indigo); border-radius: 12px; color: var(--indigo); }
.answer-maybe span { border-color: var(--ink); color: var(--ink); }
.answer-no span { border-color: var(--muted); color: var(--muted); }
.answer-yes input:checked + span { background: var(--indigo); color: #FFFFFF; }
.answer-maybe input:checked + span { background: var(--marigold); }
.answer-no input:checked + span { background: var(--muted); color: #FFFFFF; }
.answer input:focus-visible + span { outline: 3px solid var(--marigold); outline-offset: 2px; }

/* Results */
.banner { background: var(--ink); color: #FFFFFF; border-radius: 18px; padding: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.banner > div:first-child { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; }
.banner-label { color: var(--marigold); font-weight: 800; font-size: 15px; }
.banner-date { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.15; }
.banner-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 10px; }
.banner-actions > * { flex: 1 1 240px; }
.banner-actions form { display: flex; }
.banner-actions .pill { width: 100%; }
/* Relative, so the table's hidden labels scroll with it instead of widening the page. */
.grid-box { position: relative; overflow-x: auto; }
.grid { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 16px; }
.grid th { padding: 4px; text-align: center; }
.grid th:first-child { text-align: left; padding-left: 8px; }
.grid td { padding: 8px 3px; text-align: center; }
.grid tbody th { padding: 8px; font-weight: 800; white-space: nowrap; border-radius: 12px 0 0 12px; }
.grid tbody td:last-child { padding-right: 8px; border-radius: 0 12px 12px 0; }
.grid tr.best { background: var(--tint); }
.grid .time { display: block; font-size: 14px; font-weight: 600; color: var(--muted); }
.mark { display: inline-block; min-width: 58px; padding: 3px 6px; border-radius: 999px; font-weight: 800; font-size: 14px; }
.mark-yes { background: var(--indigo); color: #FFFFFF; }
.mark-maybe { background: var(--marigold); color: var(--ink); }
.mark-no { background: #EEF0F6; color: var(--muted); }
.choose { min-height: 44px; padding: 0 14px; border: 2px solid var(--indigo); border-radius: 12px; background: #FFFFFF; color: var(--indigo); font: inherit; font-weight: 800; cursor: pointer; }
.choose[disabled] { background: var(--indigo); color: #FFFFFF; cursor: default; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; }
.link-row input { flex: 1 1 260px; width: auto; background: var(--tint); border-color: transparent; font-weight: 700; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.email-preview { border: 2px solid #C9CEE3; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.email-preview .fake-button { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; background: var(--indigo); color: #FFFFFF; border-radius: 999px; font-weight: 800; }

/* Legal */
.legal { display: flex; flex-direction: column; gap: 12px; }
.legal h2 { margin-top: 18px; }
.legal ul { margin: 0; padding-left: 22px; }

.site-footer { background: var(--ink); color: #FFFFFF; padding: 22px 20px; font-size: 15px; }
.footer-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: #FFFFFF; }
.footer-links a:hover { color: var(--marigold); }
.footer-line { width: 100%; }
