:root {
  --soma-cream: #faf8f4;
  --soma-ink: #2c3a2f;
  --soma-coral: #ff6a4d;
  --soma-lime: #c8f04f;
  --soma-white: #ffffff;
  --book-muted: #5d665f;
  --book-line: #e4e0d8;
  --book-danger: #b0402a;
  --book-radius: 16px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--soma-cream);
  color: var(--soma-ink);
  font-family: "Jost", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

[hidden] { display: none !important; }

a { color: var(--soma-ink); }

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

:focus-visible { outline: 3px solid var(--soma-coral); outline-offset: 2px; }

.book-header,
.book-main,
.book-footer {
  width: min(760px, 100% - 40px);
  margin-inline: auto;
}

.book-header { padding: 28px 0 8px; }

.book-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  color: var(--soma-ink);
  text-decoration: none;
}

.book-logo__word { font-weight: 300; font-size: 40px; line-height: 1; letter-spacing: 1px; text-transform: lowercase; }
.book-logo__o { position: relative; display: inline-block; margin-right: 1px; }
.book-logo__o::before { content: ""; position: absolute; top: 10px; left: 50%; width: 14px; height: 2px; margin-left: -7px; background: currentColor; }
.book-logo__rule { width: 100%; height: 2px; background: var(--soma-ink); }
.book-logo__sub { font-size: 10px; font-weight: 700; letter-spacing: 6px; line-height: 1.6; }

.book-main { padding: 24px 0 40px; }

.book-intro h1 { margin: 0 0 10px; font-size: clamp(2rem, 6vw, 2.9rem); font-weight: 500; line-height: 1.1; }

.book-eyebrow {
  margin: 0 0 8px;
  color: var(--soma-coral);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.book-lede { max-width: 560px; margin: 0 0 22px; color: var(--book-muted); }

.book-status { margin: 0 0 20px; color: var(--book-muted); }
.book-status:empty { display: none; }
.book-status.is-error {
  padding: 16px 18px;
  border: 1px solid #f2c9bf;
  border-radius: var(--book-radius);
  background: #fff3ef;
  color: var(--soma-ink);
  font-weight: 500;
}

.book-step,
.book-done {
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid var(--book-line);
  border-radius: var(--book-radius);
  background: var(--soma-white);
}

.book-step__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.book-step h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.3rem; font-weight: 500; }

.book-step__number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--soma-lime);
  font-size: .9rem;
  font-weight: 700;
}

.book-hint { margin: 0; color: var(--book-muted); font-size: .92rem; }
.book-step .book-hint + .book-times { margin-top: 12px; }

.book-week-nav { display: flex; align-items: center; gap: 6px; }
.book-week-label { min-width: 132px; text-align: center; font-size: .92rem; font-weight: 500; }

.book-icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--book-line);
  border-radius: 50%;
  background: var(--soma-cream);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.book-icon-button:disabled { opacity: .35; cursor: default; }

.book-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }

.book-day {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-height: 72px;
  padding: 10px 4px;
  border: 1px solid var(--book-line);
  border-radius: 12px;
  background: var(--soma-cream);
  cursor: pointer;
}
.book-day__weekday { font-size: .72rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.book-day__date { font-size: 1.3rem; font-weight: 500; line-height: 1.1; }
.book-day__month { font-size: .75rem; color: var(--book-muted); }
.book-day:disabled { background: transparent; color: #b7b9b3; cursor: default; }
.book-day:disabled .book-day__month { color: inherit; }
.book-day:not(:disabled):hover { border-color: var(--soma-ink); }
.book-day[aria-pressed="true"] { border-color: var(--soma-ink); background: var(--soma-ink); color: var(--soma-cream); }
.book-day[aria-pressed="true"] .book-day__month { color: var(--soma-lime); }

.book-times,
.book-nearby { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }

.book-time {
  display: grid;
  gap: 1px;
  min-height: 52px;
  padding: 9px 12px;
  border: 1px solid var(--book-line);
  border-radius: 12px;
  background: var(--soma-cream);
  text-align: left;
  cursor: pointer;
}
.book-time strong { font-weight: 600; }
.book-time small { color: var(--book-muted); font-size: .8rem; }
.book-time:hover { border-color: var(--soma-ink); }
.book-time[aria-pressed="true"] { border-color: var(--soma-ink); background: var(--soma-ink); color: var(--soma-cream); }
.book-time[aria-pressed="true"] small { color: var(--soma-lime); }

.book-chosen { margin: 0; font-weight: 600; }

.book-form { display: grid; gap: 14px; }
.book-field { display: grid; gap: 6px; font-weight: 500; }
.book-field em { color: var(--book-muted); font-style: normal; font-weight: 400; }

.book-field input,
.book-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #cfcbc2;
  border-radius: 12px;
  background: var(--soma-white);
  font-size: 1rem;
}
.book-field textarea { resize: vertical; min-height: 96px; }
.book-counter { justify-self: end; color: var(--book-muted); font-size: .8rem; font-weight: 400; }

.book-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.book-turnstile { min-height: 65px; }

.book-error { margin: 0; color: var(--book-danger); font-weight: 500; }
.book-error:empty { display: none; }

.book-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--soma-coral);
  color: var(--soma-white);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  justify-self: start;
}
.book-button:hover { background: #f2573a; }
.book-button:disabled { opacity: .6; cursor: wait; }

.book-done { display: grid; gap: 10px; justify-items: start; border-color: var(--soma-ink); }
.book-done h2 { margin: 0; font-size: 1.6rem; font-weight: 500; }
.book-done p { margin: 0; }

/* Manage links: the booked call with Join, Reschedule and Cancel */
.book-manage { display: grid; gap: 10px; justify-items: start; border-color: var(--soma-ink); }
.book-manage h2 { margin: 0; font-size: 1.6rem; font-weight: 500; line-height: 1.2; }
.book-manage .book-eyebrow { margin: 0; }
.book-manage .book-hint:empty { display: none; }
.book-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.book-button--quiet {
  border: 1px solid var(--soma-ink);
  background: transparent;
  color: var(--soma-ink);
}
.book-button--quiet:hover { background: var(--soma-cream); }
.book-button--quiet[aria-expanded="true"] { background: var(--soma-ink); color: var(--soma-cream); }

.book-confirm {
  width: 100%;
  margin-top: 4px;
  padding: 16px 18px;
  border: 1px solid #f2c9bf;
  border-radius: 12px;
  background: #fff3ef;
}
.book-confirm p { margin: 0; }

.book-footer { padding: 0 0 36px; color: var(--book-muted); font-size: .92rem; }

@media (max-width: 620px) {
  body { font-size: 16px; }
  .book-header, .book-main, .book-footer { width: calc(100% - 28px); }
  .book-step, .book-done { padding: 18px 14px; }
  .book-actions { display: grid; width: 100%; }
  .book-manage { justify-items: stretch; }
  .book-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .book-week-nav { width: 100%; justify-content: space-between; }
  .book-times, .book-nearby { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-button { justify-self: stretch; }
}
