/* 10 talk to a licensed advisor (#book). Owner: booking + first-call builder.
   Warm tone: the soft Oatmeal panel with the elevation pattern; the booking card is white. The live element is Summit
   (the picked day, the chosen time, "Book this time"); blooms, rings and the open-day dots are Sandstone; passed parts
   rest in Charcoal; the confirmation strip is --charcoal-deep with Oatmeal type.
   The rules below draw the FINISHED (booked) frame; instruments/book.js drives the sequence with inline styles
   on the same elements, and its last frame equals these values. */
.book { overflow-x: clip; }  /* the instrument's glow reaches past the container */
.book.topo { --topo-ink: var(--oatmeal); --topo-alpha: 1; }
.book__inner { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(40px, 4.5vw, 64px); }

/* copy */
.book__copy { flex: 1 1 520px; min-width: 0; max-width: 560px; }
.book__eyebrow { margin-bottom: 30px; gap: 12px; }
.book__title { font-size: clamp(42px, 4.9vw, 70px); line-height: 1.04; letter-spacing: -.015em; }
.book__lede { margin-top: 30px; max-width: 30em; font-size: 18px; line-height: 1.6; color: var(--text); }
.book__actions { margin-top: 36px; }
.book__writing { margin-top: 40px; padding-top: 22px; max-width: 440px; border-top: 1px solid var(--line); font-size: 16px; color: var(--text); }
.book__writing-link { color: var(--summit); font-weight: 700; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--summit) 35%, transparent); }
.book__writing-link:hover { color: var(--summit-deep); border-bottom-color: var(--summit-deep); }
.book__writing-note { margin-top: 8px; }

/* instrument */
.book__instrument { flex: 1.2 1 560px; min-width: 0; }
.book__glow {
  position: absolute;
  left: -12%;
  right: -22%;
  top: -18%;
  bottom: -18%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sandstone) 30%, transparent), color-mix(in srgb, var(--sandstone) 0%, transparent));
  pointer-events: none;
}
.book__meta { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.book__meta .instrument__caption, .book__meta .replay-hint { white-space: nowrap; }
.book__panel { color: var(--ink); container-type: inline-size; }

.book__head {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line-soft);
}
.book__head .hud { min-height: 50px; white-space: nowrap; }
.book__tabs { display: flex; gap: 22px; }
.book__tab { display: inline-flex; align-items: center; min-height: 50px; font-size: 14px; color: var(--muted); }
.book__tab--on { font-weight: 700; color: var(--ink); box-shadow: inset 0 -2px 0 var(--summit); }

/* stepper: a dashed track, a fill on top of it, and a mark (pip while waiting, check when done) */
.book__steps { display: flex; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
.book__step { flex: 1 1 0; min-width: 0; }
.book__step-bar { position: relative; height: 2px; }
.book__step-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; border-top: 1px dashed var(--line-strong); }
.book__step-fill { position: absolute; left: 0; top: 0; width: 100%; height: 2px; border-radius: 1px; background: var(--charcoal); }
.book__step-label {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 6px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: var(--fs-mono);
  letter-spacing: .12em;
  line-height: 1.5;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.book__step-mark { flex: none; overflow: visible; color: var(--charcoal); }
.book__step-mark circle { fill: var(--sandstone); opacity: 0; }
.book__step-mark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}
.book__step--booked .book__step-fill { background: var(--summit); box-shadow: 0 0 8px color-mix(in srgb, var(--sandstone) 55%, transparent); }
.book__step--booked .book__step-label { color: var(--summit); }
.book__step--booked .book__step-mark { color: var(--summit); }

/* calendar + slots */
.book__pick { display: flex; flex-wrap: wrap; }
.book__cal { flex: 1 1 320px; min-width: 0; padding: 18px 20px 20px; border-right: 1px solid var(--line-soft); }
.book__cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.book__month, .book__slots-day { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--ink); }
.book__month span { font-weight: 400; color: var(--muted); }
.book__cal-nav { display: flex; gap: 6px; }
.book__cal-nav span {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
}
.book__cal-nav span:first-child { color: var(--muted); }
.book__weekdays,
.book__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.book__weekdays { padding-bottom: 6px; font-family: var(--font-label); font-weight: 700; font-size: var(--fs-mono); letter-spacing: .08em; color: var(--muted); }
.book__days { font-size: 15px; font-variant-numeric: tabular-nums; }
.book__day {
  position: relative;
  height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: var(--r);
  color: var(--faint);
}
.book__day i { width: 4px; height: 4px; border-radius: 50%; }
.book__day--open { color: var(--ink); }
.book__day--open i { background: var(--sandstone); }
.book__day--full { color: color-mix(in srgb, var(--faint) 70%, var(--charcoal)); }
/* the picked day: a Summit fill layer under the number, and a selection ring that rests dim once a time is chosen */
.book__day-fill { position: absolute; inset: 0; border-radius: var(--r); background: var(--summit); }
.book__day-n, .book__day--picked i { position: relative; }
.book__day--picked { color: var(--white); font-weight: 700; }
.book__day--picked i { background: var(--white); }
.book__day-ring { position: absolute; inset: -4px; border: 1.5px solid var(--sandstone); border-radius: 12px; opacity: .4; }
.book__legend {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: var(--fs-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.book__legend span { display: inline-flex; align-items: center; gap: 7px; }
.book__legend-open { width: 5px; height: 5px; border-radius: 50%; background: var(--sandstone); }
.book__legend-day { width: 9px; height: 9px; border-radius: 2px; background: var(--summit); }

.book__slots { flex: 1 1 220px; min-width: 0; padding: 18px 20px 20px; }
.book__slots-tz { margin: 2px 0 14px; letter-spacing: .12em; }
.book__slot-list { position: relative; display: flex; flex-direction: column; gap: 8px; }
.book__slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 15px;
  color: var(--text);
}
/* 1px border + a .5px outer ring reads as 1.5px without moving the text when the slot is chosen */
.book__slot--chosen { border-color: var(--summit); background: var(--summit-soft); font-weight: 700; color: var(--summit); box-shadow: 0 0 0 .5px var(--summit); }
.book__slot-ring { position: absolute; inset: -1px; border: 1px solid var(--sandstone); border-radius: 10px; opacity: 0; pointer-events: none; }
.book__slot-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-label);
  font-size: var(--fs-mono);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--summit);
}
/* dashed placeholders the times land in (built by book.js; never shown without it) */
.book-ghosts { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.book-ghosts span { min-height: 42px; border: 1px dashed var(--line-scale); border-radius: var(--r); }

/* advisor card */
.book__advisor {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 18px;
  padding: 18px 20px;
  border-top: 1px solid var(--line-soft);
  background: var(--page);
}
.book__avatar {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-scale);
  border-radius: 50%;
  background: var(--oatmeal-soft);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--summit);
}
.book__who { flex: 1 1 220px; min-width: 0; }
.book__name { font-family: var(--font-head); font-weight: 700; font-size: 19px; line-height: 1.25; color: var(--ink); }
.book__role { font-size: 14px; line-height: 1.5; color: var(--text); }
.book__facts {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: var(--fs-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.book__call { display: inline-flex; align-items: center; gap: 6px; }
.book__call svg { color: var(--summit); }
/* "Book this time": the shared .btn--primary pill (an illustration, so a span); book.js drives its press, so no
   transition may run on it (render(t) must stay seekable) */
.book__book-btn { position: relative; flex: 0 0 auto; transition: none; cursor: inherit; }
.book__book-btn:hover { background: var(--summit); }
.book__btn-ring { position: absolute; inset: -1px; border: 1px solid var(--sandstone); border-radius: var(--r-pill); opacity: 0; pointer-events: none; }

/* confirmation line (painted above the advisor card while the card rises into place) */
.book__confirm-wrap { position: relative; z-index: 1; padding: 0 20px 20px; background: var(--page); border-radius: 0 0 var(--r-panel) var(--r-panel); }
.book__confirm {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 12px 16px;
  background: var(--charcoal-deep);
  border-radius: var(--r);
}
/* the completion glint: a soft Sandstone band crosses the line, and a white copy of the text, masked to the same band,
   lights the letters it passes (both measured against the text box, so they stay aligned at any width) */
.book__sweep {
  position: absolute;
  top: -14px;
  bottom: -14px;
  left: 0;
  width: 34%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--sandstone) 0%, transparent), color-mix(in srgb, var(--sandstone) 30%, transparent) 50%, color-mix(in srgb, var(--sandstone) 0%, transparent));
  opacity: 0;
  pointer-events: none;
}
.book__shine {
  position: absolute;
  inset: 0;
  color: var(--white);
  text-shadow: 0 0 8px color-mix(in srgb, var(--sandstone) 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 50%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 50%, transparent);
  -webkit-mask-size: 34% 100%;
  mask-size: 34% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  opacity: 0;
  pointer-events: none;
}
.book__confirm-mark { position: relative; flex: none; overflow: visible; }
.book__confirm-mark circle { fill: var(--sandstone); opacity: 0; }
.book__confirm-mark path {
  fill: none;
  stroke: var(--sandstone);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}
.book__confirm-text {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .12em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--oatmeal);   /* 8.5:1 on --charcoal-deep */
}
.book__untyped { color: transparent; }
/* a zero-width inline caret, so it never changes where the line wraps */
.book__caret { position: relative; opacity: 0; }
.book__caret::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 50%;
  width: 7px;
  height: 15px;
  margin-top: -8px;
  background: var(--sandstone);
  box-shadow: 0 0 10px color-mix(in srgb, var(--sandstone) 80%, transparent);
}

/* bloom + ring sprite (book.js): centred on its host, drawn above it */
.book-fx { position: absolute; left: 50%; top: 50%; z-index: 3; width: 0; height: 0; pointer-events: none; }
.book-fx--under { z-index: auto; }  /* the bloom: first child of its host, so it glows around the host, not over it */
.book-fx__bloom {
  position: absolute;
  left: -43px;
  top: -43px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sandstone) 62%, transparent), color-mix(in srgb, var(--sandstone) 26%, transparent) 50%, color-mix(in srgb, var(--sandstone) 0%, transparent));
  opacity: 0;
}
.book-fx__ring { position: absolute; left: -80px; top: -80px; max-width: none; overflow: visible; }  /* site.css caps svg at 100% of a 0px host */
.book-fx__ring circle { fill: none; stroke: var(--summit); opacity: 0; }

/* when the panel is too narrow for calendar + times side by side (320 + 220), they stack */
@container (max-width: 540px) {
  .book__cal { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .book__head .hud { min-height: 0; padding-bottom: 12px; }
}
/* too narrow for "✓ 03 CONFIRM" on one line: the step name takes its own line */
@container (max-width: 440px) {
  .book__steps { gap: 8px; padding-inline: 16px; }
  .book__step-name { flex-basis: 100%; }
}
@media (max-width: 440px) {
  .book__meta .replay-hint { display: none; }
}
