/* Warm neutral GATE base, one accent for "picked" and "done". Asymmetric on
 * purpose: the times get the wider column, since that is what people came for. */

:root {
  --ink: #1a1714;
  --ink-soft: #4a4339;
  --ink-mute: #837a6a;
  --line: #e6e1d8;
  --line-strong: #d3ccbe;
  --surface: #fbfaf8;
  --raised: #ffffff;
  --accent: #1d6b56;
  --accent-soft: #eaf2ef;
  --danger: #9a3324;
  --radius: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.shell {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

.state {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 900px) {
  .state {
    grid-template-columns: 5fr 7fr;
    gap: 64px;
    align-items: start;
  }
  .col-intro { position: sticky; top: 48px; }
}

.state-centered {
  display: block;
  max-width: 34rem;
  padding-top: 8vh;
}

/* ── Left column: who, what ───────────────────────────────────────────────── */

.eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.page-title {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.host-line {
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--ink-soft);
}

.page-description {
  margin: 16px 0 0;
  max-width: 46ch;
  color: var(--ink-soft);
}

.type-list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.type-btn {
  appearance: none;
  width: 100%;
  text-align: left;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.type-btn:hover { border-color: var(--line-strong); }
.type-btn:active { transform: translateY(1px); }

.type-btn[aria-checked="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.type-btn .type-name { display: block; font-weight: 550; }
.type-btn .type-meta { display: block; font-size: 14px; color: var(--ink-mute); }

/* A single meeting type is not a choice, so it is shown as a fact instead of a
   button nobody can meaningfully press. */
.type-list.single .type-btn { pointer-events: none; }

.facts {
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
}

.fact {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.fact dt { flex: 0 0 96px; margin: 0; color: var(--ink-mute); }
.fact dd { margin: 0; color: var(--ink-soft); }

/* ── Right column: when ───────────────────────────────────────────────────── */

.col-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.day-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.strip-nav { display: flex; gap: 6px; }

.nav-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font: inherit;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.nav-btn:hover:not(:disabled) { border-color: var(--line-strong); }
.nav-btn:active:not(:disabled) { transform: translateY(1px); }
.nav-btn:disabled { opacity: 0.35; cursor: default; }

.day-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(64px, 1fr);
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.day-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: var(--radius);
  padding: 10px 4px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.day-btn:hover:not(:disabled) { border-color: var(--line-strong); }
.day-btn:active:not(:disabled) { transform: translateY(1px); }
.day-btn:disabled { opacity: 0.4; cursor: default; }

.day-btn[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.day-weekday { display: block; font-size: 12px; color: var(--ink-mute); letter-spacing: 0.04em; }
.day-number { display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.day-count { display: block; font-size: 11px; color: var(--ink-mute); }

.slot-area { margin-top: 24px; }

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}

.slot-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 8px;
  padding: 11px 8px;
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  cursor: pointer;
  /* Staggered reveal: the list is the answer to a live calendar read, and it
     landing all at once reads as a flash. */
  opacity: 0;
  animation: rise 0.32s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 16ms);
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.slot-btn:hover:not(:disabled) { border-color: var(--accent); }
.slot-btn:active:not(:disabled) { transform: translateY(1px); }
/* The slot a booking is already on: shown so the grid is not missing a time for
   no visible reason, but not pressable. */
.slot-btn:disabled { opacity: 0.45; cursor: default; }

@keyframes rise {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .slot-btn { animation: none; opacity: 1; }
  * { transition-duration: 0.01ms !important; }
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: left;
  color: var(--ink-soft);
}

.empty strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }

.notice {
  border-left: 3px solid var(--danger);
  padding: 4px 0 4px 14px;
  color: var(--ink-soft);
}

/* ── The form ─────────────────────────────────────────────────────────────── */

.form { max-width: 30rem; }

.chosen {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 24px;
  line-height: 1.4;
}

.chosen .chosen-when { display: block; font-weight: 600; }
.chosen .chosen-meta { display: block; font-size: 14px; color: var(--ink-soft); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }

.field label { font-size: 14px; font-weight: 550; }
.field .optional { font-weight: 400; color: var(--ink-mute); }

.field input, .field textarea {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--raised);
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  resize: vertical;
}

.field input:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field-help { margin: 0; font-size: 13px; color: var(--ink-mute); }
.field-error, .form-error { margin: 0; font-size: 14px; color: var(--danger); }
.form-error { margin-bottom: 16px; }

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

.btn-primary {
  appearance: none;
  display: inline-block;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #f6f3ec;
  padding: 12px 24px;
  font: inherit;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), opacity 0.18s var(--ease);
}

.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; }

.btn-quiet {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--ink-mute);
  text-decoration: underline;
  cursor: pointer;
}

/* ── Done ─────────────────────────────────────────────────────────────────── */

.done { max-width: 30rem; }

.done-mark {
  width: 34px;
  height: 34px;
  color: var(--accent);
  margin-bottom: 12px;
}

.done-title { margin: 0 0 8px; font-size: 24px; font-weight: 600; letter-spacing: -0.015em; }
.done-when { margin: 0 0 4px; font-size: 17px; font-weight: 550; }
.done-body { margin: 0 0 24px; color: var(--ink-soft); }

.missing-title { margin: 0 0 12px; font-size: 26px; font-weight: 600; letter-spacing: -0.015em; }
.missing-body { margin: 0; color: var(--ink-soft); max-width: 42ch; }

/* ── Skeletons ────────────────────────────────────────────────────────────── */

.skeleton {
  background: linear-gradient(90deg, #efece5 25%, #f7f5f1 37%, #efece5 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 6px;
}

.skeleton-eyebrow { height: 12px; width: 96px; margin-bottom: 14px; }
.skeleton-title { height: 30px; width: 72%; margin-bottom: 18px; }
.skeleton-line { height: 14px; width: 100%; margin-bottom: 8px; }
.skeleton-line.short { width: 58%; }
.skeleton-strip { height: 68px; width: 100%; margin-bottom: 24px; }
.skeleton-slot { height: 42px; width: 100%; margin-bottom: 8px; }

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.foot {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-mute);
}

.foot a { color: inherit; text-decoration: underline; }
