:root {
  color-scheme: dark;
  --bg: #201F1B;
  --ink: #F0EBDD;
  --muted: #BCB7A8;
  --line: #504D43;
  --card: #2C2B25;
  --accent: #B8C598;
  --accent-bg: #353E2E;
  --danger: #E6B2A7;
  --button-ink: #20251A;
  --content-width: 47.5rem;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #F3EFE5;
    --ink: #2D3028;
    --muted: #626658;
    --line: #D8D3C5;
    --card: #FFFCF4;
    --accent: #596640;
    --accent-bg: #E5EAD9;
    --danger: #934B43;
    --button-ink: #FFFFFF;
  }
}

* { box-sizing: border-box; }

html { scrollbar-gutter: stable; }

body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.4;
}

main {
  max-width: calc(var(--content-width) + 2rem);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.video-banner {
  position: relative;
  max-width: var(--content-width);
  margin: 1rem auto 0;
  width: calc(100% - 2rem);
  height: clamp(140px, 24vw, 208px);
  overflow: hidden;
  border-radius: 12px;
  background: var(--card);
}

.video-banner video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-wordmark {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem);
  left: clamp(0.85rem, 2vw, 1.5rem);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #282B23;
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
  pointer-events: none;
}

.banner-ufo { width: 1.7em; height: 1.3em; flex-shrink: 0; }

h1 {
  font-size: clamp(1rem, 5vw, 1.6rem);
  white-space: nowrap;
  line-height: 1.2;
  margin: 0 0 0.4rem;
}

h2,
.name-field span {
  font-size: 1rem;
  font-weight: 700;
}

h2 {
  margin: 1.25rem 0 0.5rem;
}

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

.meeting-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 3rem;
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.meeting-link:hover { background: var(--accent-bg); }
.meeting-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.name-field {
  display: block;
  margin: 1.25rem 0 0.25rem;
}

.time-zone {
  color: var(--muted);
  margin: 0.25rem 0 0.75rem;
  font-size: 0.9rem;
}

.question-heading {
  margin: 1.5rem 0 0;
}

#poll #days {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
}

#poll .none-option {
  grid-column: 1 / -1;
  margin: 0;
}

.time-day { min-width: 0; }

.day-heading {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

#poll .time-day .slot {
  gap: 0.4rem;
  padding: 0.7rem 0.5rem;
  min-height: 48px;
}

#poll .time-day .slot span {
  font-size: 0.875rem;
  white-space: nowrap;
}

#poll .time-day .slot input {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
}

@media (max-width: 339px) {
  #poll #days { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 48rem) {
  #poll #days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.name-field span,
.count {
  display: block;
  margin-bottom: 0.35rem;
}

input[type="text"],
textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
}

textarea {
  min-height: 8.5rem;
  resize: vertical;
}
.topic-text { white-space: pre-wrap; overflow-wrap: anywhere; }

.response-details { margin-top: 1.5rem; }
.response-details summary { cursor: pointer; font-weight: 600; }
.response-details .result { overflow-wrap: anywhere; }
.response-details p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9rem; }

.meeting-order {
  margin: 0.75rem 0 1.5rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--card);
  color: var(--muted);
  font-size: 0.9rem;
}

.meeting-order > p:first-child {
  margin: 0 0 0.4rem;
  color: var(--ink);
  font-weight: 600;
}

.meeting-order ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.meeting-order li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.5rem;
}

.meeting-order li + li { margin-top: 0.5rem; }
.meeting-order .duration {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.slot, .result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.45rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.slot { cursor: pointer; }

.slot input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--accent);
}

.slot:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.slot span, .result .when {
  color: var(--ink);
  font-size: 1rem;
}

.result {
  display: block;
}

.count {
  font-size: 0.85rem;
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-weight: 500;
}

.names {
  margin: 0.2rem 0 0;
}

button {
  width: 100%;
  margin-top: 1rem;
  min-height: 3rem;
  font: inherit;
  font-weight: 600;
  color: var(--button-ink);
  background: var(--accent);
  border: 0;
  border-radius: 12px;
}

#change {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.error {
  color: var(--danger);
  margin: 0.75rem 0 0;
}

#confirmation h2 { margin-top: 0; }

/* Selected site typography. */
h1, h2, h3,
.name-field > span,
.meeting-order > p:first-child,
.banner-wordmark {
  font-family: "Space Grotesk", sans-serif;
}
