/* ============================================================================
   BOOKING PAGES: /book, /book/decide, /book/admin (booking phase 1).
   Loaded only by those three pages, after styles.css (which holds the site's
   fonts and colour tokens: --c-ink, --c-hair, --accent and the rest).
   Mobile first: one column, 16px side gutters, big tap targets (44px+).

   Part 1 is shared by all three pages (bar, buttons, fields, alerts, admin
   lists). Part 2 is /book only: the step-by-step booking form, and the
   prices, terms and reviews beside it.
   ========================================================================= */

/* ---- Part 1: shared ---------------------------------------------------- */

.bk-body { margin: 0; background: var(--c-bg); color: var(--c-ink); font: 17px/1.55 var(--c-font); }
.bk-top { border-bottom: var(--c-line); background: var(--c-surface); }
.bk-top-inner, .bk-main, .bk-foot-inner { max-width: 600px; margin: 0 auto; padding: 0 16px; }
.bk-main.bk-wide { max-width: 900px; }
.bk-top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; }
.bk-brand { white-space: nowrap; display: inline-flex; align-items: center; min-height: var(--c-tap); gap: 10px; color: var(--c-ink); text-decoration: none; font-weight: 600; }
.bk-brand svg { width: 28px; height: 28px; }
.bk-main { padding-top: 28px; padding-bottom: 56px; }

.bk-h1 { font: 400 clamp(32px, 7vw, 44px)/1.1 var(--c-serif); margin: 0 0 10px; letter-spacing: -0.01em; }
.bk-lede { color: var(--ink-soft); margin: 0 0 28px; }
.bk-h2 { font-size: 15px; font-weight: 600; text-transform: none; margin: 28px 0 10px; }
.bk-muted { color: var(--muted); font-size: 15px; }
.bk-small { font-size: 14px; color: var(--c-ink-2); }

/* Time zone line (admin uses .bk-zones) */
.bk-zone select { font: inherit; padding: 8px 10px; border: var(--c-border); border-radius: 8px; background: var(--c-surface); color: var(--c-ink);
  max-width: 100%; min-height: var(--c-tap); }

/* Form fields */
.bk-field { display: block; margin: 0 0 14px; }
.bk-field > span { display: block; font-size: 15px; font-weight: 500; margin: 0 0 4px; }
.bk-field input, .bk-field select, .bk-field textarea { box-sizing: border-box; width: 100%; font: inherit; padding: 10px 12px;
  border: var(--c-border); border-radius: 8px; background: var(--c-surface); color: var(--c-ink); min-height: var(--c-tap); }
.bk-field textarea { min-height: 88px; resize: vertical; }
.bk-row2 { display: grid; gap: 0 12px; }
@media (min-width: 520px) { .bk-row2 { grid-template-columns: 1fr 1fr; } }
.bk-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bk-summary { border: var(--c-line); border-radius: 10px; background: var(--c-well); padding: 14px 16px; margin: 0 0 16px; }
.bk-summary p { margin: 0; }

.bk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--c-btn-h); padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--c-ink); background: var(--c-ink); color: var(--c-on-ink); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; }
.bk-btn[disabled] { opacity: 0.45; cursor: default; }
.bk-btn-ghost { background: var(--c-surface); color: var(--c-ink); }
.bk-btn-danger { background: var(--c-surface); color: var(--c-red); border-color: var(--c-red); }
.bk-btn-small { min-height: 38px; padding: 0 14px; font-size: 15px; }
.bk-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bk-link { color: var(--c-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.bk-btn:focus-visible, .bk-link:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }

.bk-alert { border-left: 3px solid var(--c-red); background: var(--c-surface); padding: 10px 14px; margin: 0 0 16px; }
.bk-ok { border-left: 3px solid var(--c-green); background: var(--c-surface); padding: 14px 16px; margin: 0 0 16px; }
.bk-empty { color: var(--muted); padding: 12px 0; }
[hidden] { display: none !important; }

/* Admin lists */
.bk-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; }
.bk-tab { min-height: 40px; padding: 0 14px; border-radius: 999px; border: var(--c-border); background: var(--c-surface); color: var(--c-ink);
  font: inherit; font-size: 15px; cursor: pointer; }
.bk-tab[aria-selected="true"] { background: var(--c-ink); color: var(--c-on-ink); border-color: var(--c-ink); }
.bk-card { border: var(--c-line); border-radius: 10px; background: var(--c-surface); padding: 14px 16px; margin: 0 0 10px; }
.bk-card h3 { margin: 0 0 4px; font-size: 17px; }
.bk-card p { margin: 0 0 6px; }
.bk-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--c-well);
  color: var(--ink-soft); margin-left: 6px; vertical-align: 2px; }
.bk-tag-test { background: oklch(0.93 0.06 85); }

.bk-foot { border-top: var(--c-line); color: var(--muted); font-size: 14px; }
.bk-foot-inner { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 18px; padding-bottom: 28px; }
.bk-foot a { color: var(--muted); display: inline-flex; align-items: center; min-height: var(--c-tap); }
.bk-foot-inner { align-items: center; }

/* ---- Part 2: /book ------------------------------------------------------
   The idea: the form reads like a question paper being marked. Each step
   has a question-number box in the margin; the step being answered carries
   the examiner's red line down its edge; a finished step gets a green tick
   and collapses to one line, with "Change" to reopen it.
   ------------------------------------------------------------------------- */

.bk-vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.bk-top-wide { max-width: 1080px; }
.bk-top-link { color: var(--c-ink-2); font-size: 15px; text-underline-offset: 3px; min-height: var(--c-tap); display: inline-flex; align-items: center; }
.bk-top-link:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
@media (max-width: 400px) { .bk-brand span { font-size: 16px; } .bk-top-link { font-size: 14px; } }

/* Intro: Joe, on the site's whiteboard grid paper */
.bk-intro { background-color: var(--c-surface); background-image: var(--grid-paper-ink); background-size: 32px 32px;
  border-bottom: var(--c-line); }
.bk-intro-inner { max-width: 1080px; margin: 0 auto; padding: 20px 16px 18px; }
.bk-intro .bk-h1 { margin: 0 0 8px; font-size: clamp(36px, 9vw, 56px); line-height: 1.04; }
.bk-intro .bk-lede { margin: 0 0 14px; font-size: 17px; color: var(--c-ink-2); max-width: 34em; }
.bk-credit { display: inline-block; margin: -4px 0 16px; padding: 8px 14px; border-radius: var(--c-r1); background: var(--c-surface);
  border: 1px solid color-mix(in oklch, var(--c-green) 35%, white); color: var(--c-ink); font-size: 16px; font-weight: 500; }
.bk-credit-due { border-color: var(--c-hair); border-left: 3px solid var(--c-red); padding-left: 12px; font-weight: 400; font-size: 15px; line-height: 1.5; }
.bk-byline { display: flex; align-items: center; gap: 12px; max-width: 40em; }
.bk-photo { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--c-surface);
  box-shadow: 0 0 0 1px var(--c-hair); }
.bk-cred { margin: 0; font-size: 15px; line-height: 1.45; color: var(--c-ink-2); }
.bk-cred strong { color: var(--c-ink); font-weight: 600; }
.bk-cred .bk-link { white-space: nowrap; }
/* "Prices and terms" and "Reviews": jump links to the panels after the steps (beside them on desktop) */
.bk-cred-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin: -6px 0 -10px; }
.bk-cred-links .bk-link { display: inline-flex; align-items: center; min-height: var(--c-tap); }
@media (min-width: 900px) {
  .bk-intro-inner { padding: 40px 32px 36px; }
  .bk-photo { width: 64px; height: 64px; }
}

/* Two columns from 900px: the steps, then prices and reviews in a column that stays in view */
.bk-layout { max-width: 1080px; margin: 0 auto; padding: 24px 16px 56px; display: grid; gap: 32px; }
.bk-flow { min-width: 0; }
@media (min-width: 900px) {
  .bk-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding: 32px 32px 72px; align-items: start; }
  .bk-aside { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
}

/* A step */
.bk-form { display: grid; gap: 12px; }
.bk-step { position: relative; background: var(--c-surface); border: var(--c-line); border-radius: var(--c-r2); }
.bk-step[data-state="open"] { border-color: var(--c-edge); box-shadow: var(--c-shadow-1); }
.bk-step[data-state="open"]::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: var(--c-pen);
  background: var(--c-red); border-radius: 0 2px 2px 0; }
.bk-step-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; }
.bk-step-headtext { min-width: 0; }
.bk-step { scroll-margin-top: 12px; }
.bk-step[data-state="done"] .bk-step-head { align-items: start; }
.bk-step[data-state="done"] .bk-change { margin-top: -4px; }
.bk-step-title { margin: 0; font: 400 24px/1.2 var(--c-serif); letter-spacing: 0; }
.bk-step-title:focus { outline: none; }
.bk-step-title:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 4px; border-radius: 2px; }
.bk-step[data-state="todo"] .bk-step-title { color: var(--c-ink-3); }
.bk-step[data-state="done"] .bk-step-title { font: 600 13px/1.4 var(--c-font); color: var(--c-ink-3); }
.bk-step-sum { margin: 2px 0 0; font-size: 16px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.bk-step:not([data-state="done"]) .bk-step-sum { display: none; }
/* A finished step's summary runs the full width under its title and the Change button, so a long email address wraps
   at the line's end rather than in a narrow column beside the button. */
.bk-step[data-state="done"] .bk-step-headtext { display: contents; }
.bk-step[data-state="done"] .bk-num { grid-column: 1; grid-row: 1 / span 2; }
.bk-step[data-state="done"] .bk-step-title { grid-column: 2; grid-row: 1; align-self: center; }
.bk-step[data-state="done"] .bk-change { grid-column: 3; grid-row: 1; }
.bk-step[data-state="done"] .bk-step-sum { grid-column: 2 / 4; grid-row: 2; margin-top: -6px; }
.bk-step-body { padding: 0 16px 18px; }
@media (min-width: 600px) { .bk-step-head { padding: 16px 20px; } .bk-step-body { padding: 0 20px 22px 64px; } }

/* The question-number box, as on an exam paper; a green tick once answered */
.bk-num { box-sizing: border-box; width: 32px; height: 32px; display: grid; place-items: center; border: 1.5px solid var(--c-ink);
  border-radius: 4px; font: 600 15px/1 var(--c-font); font-variant-numeric: tabular-nums; }
.bk-step[data-state="todo"] .bk-num { border-color: var(--c-hair); color: var(--c-ink-3); }
.bk-step[data-state="done"] .bk-num { border-color: var(--c-green); color: var(--c-green); }
.bk-step[data-state="done"] .bk-num [data-num] { display: none; }
.bk-step[data-state="done"] .bk-num::after { content: ""; width: 16px; height: 16px;
  background: currentColor; -webkit-mask: var(--bk-tick) center / contain no-repeat; mask: var(--bk-tick) center / contain no-repeat; }
.bk-body { --bk-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.bk-change { min-height: var(--c-tap); padding: 0 12px; margin: -6px -8px -6px 0; border: 0; background: none; color: var(--c-ink);
  font: 500 15px var(--c-font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: 6px; }
.bk-change:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 0; }

/* Something appearing in answer to a tap: one short fade */
.bk-step[data-state="open"] .bk-step-body { animation: bk-in var(--c-dur-2) var(--c-ease); }
@keyframes bk-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Step 1: three choices */
.bk-kinds { display: grid; gap: 10px; }
.bk-kind { display: grid; gap: 2px; text-align: left; width: 100%; padding: 14px 16px; min-height: var(--c-tap);
  border: var(--c-border); border-radius: var(--c-r1); background: var(--c-surface); color: var(--c-ink); font: inherit; cursor: pointer;
  transition: border-color var(--c-dur-1) var(--c-ease), background-color var(--c-dur-1) var(--c-ease); }
.bk-kind-name { font-weight: 600; font-size: 17px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.bk-kind-meta { font-size: 15px; color: var(--c-ink); }
.bk-kind-text { font-size: 15px; color: var(--c-ink-2); }
.bk-kind[aria-pressed="true"] { border-color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-ink); background: var(--c-well); }
.bk-badge { font-size: 13px; font-weight: 600; color: var(--c-green); background: color-mix(in oklch, var(--c-green) 10%, white);
  padding: 1px 8px; border-radius: 999px; }
@media (hover: hover) { .bk-kind:hover { border-color: var(--c-ink); } }

.bk-lessonopts { margin-top: 18px; padding-top: 16px; border-top: var(--c-line); }
.bk-chatalt { margin-top: 20px; padding-top: 16px; border-top: var(--c-line); }
.bk-chatalt-q { margin: 0 0 8px; font-size: 15px; color: var(--c-ink-2); }
.bk-kind-chat { background: var(--c-bg); }
.bk-kind-chat .bk-kind-name { display: block; font-size: 16px; }
.bk-opt { margin: 0 0 14px; }
.bk-opt-q { margin: 0 0 8px; font-weight: 600; font-size: 15px; }
.bk-opt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bk-opt-row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bk-lessonopts .bk-next { margin-top: 4px; }

/* Pills, chips, days and times: one family of buttons */
.bk-pill, .bk-day, .bk-time, .bk-chip span, .bk-seg-opt span {
  box-sizing: border-box; min-height: var(--c-tap); border: var(--c-border); background: var(--c-surface); color: var(--c-ink);
  font: inherit; font-size: 16px; cursor: pointer; transition: background-color var(--c-dur-1) var(--c-ease), color var(--c-dur-1) var(--c-ease); }
.bk-pill { border-radius: var(--c-r1); padding: 0 12px; font-weight: 500; }
.bk-pill[aria-pressed="true"], .bk-day[aria-pressed="true"], .bk-time[aria-pressed="true"],
.bk-chip input:checked + span, .bk-seg-opt input:checked + span { background: var(--c-ink); color: var(--c-on-ink); border-color: var(--c-ink); }
.bk-pill:focus-visible, .bk-day:focus-visible, .bk-time:focus-visible, .bk-kind:focus-visible,
.bk-chip input:focus-visible + span, .bk-seg-opt input:focus-visible + span, .bk-check input:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
@media (hover: hover) { .bk-pill:hover, .bk-day:hover, .bk-time:hover, .bk-chip span:hover, .bk-seg-opt span:hover { border-color: var(--c-ink); } }

/* Step 2: zone, days, times */
.bk-zoneline { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -8px 0 8px; }
.bk-zoneline-text { margin: 0; font-size: 15px; color: var(--c-ink-2); }
.bk-zoneline .bk-change { margin: 0 -12px 0 0; }
.bk-zone { display: grid; gap: 4px; margin: 0 0 16px; font-size: 15px; color: var(--c-ink-2); }
.bk-zone select { width: 100%; font-size: 16px; }
@media (min-width: 600px) { .bk-zone { grid-template-columns: max-content minmax(0, 320px); justify-content: start; align-items: center; gap: 12px; } }
.bk-pick-label { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.bk-loading { color: var(--c-ink-2); margin: 8px 0 16px; }
.bk-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; margin: 0 0 18px; }
.bk-day { border-radius: var(--c-r1); padding: 6px 4px; line-height: 1.2; font-size: 14px; }
.bk-day b { display: block; font-size: 16px; font-weight: 600; }
.bk-days-weekly { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.bk-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
@media (min-width: 600px) { .bk-times { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } }
.bk-time { border-radius: var(--c-r1); font-variant-numeric: tabular-nums; }
.bk-first { margin: 0 0 14px; padding: 10px 14px; background: var(--c-well); border-radius: var(--c-r1); font-size: 15px; }
/* The times chosen so far */
.bk-chosen-wrap { margin: 0 0 18px; }
.bk-chosen { list-style: none; margin: 0; padding: 0; border: var(--c-border); border-radius: var(--c-r1); overflow: hidden; }
.bk-chosen li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 14px; min-height: var(--c-tap);
  background: var(--c-surface); }
.bk-chosen li + li { border-top: var(--c-line); }
.bk-chosen-text { font-weight: 500; line-height: 1.35; padding: 4px 0; }
.bk-chosen-text small { display: block; font-size: 14px; font-weight: 400; color: var(--c-ink-2); }
.bk-remove { flex: 0 0 auto; min-height: var(--c-tap); padding: 0 10px; border: 0; background: none; color: var(--c-ink-2); font: inherit;
  font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: 6px; }
/* "More than one lesson a week?": a quiet second choice under Continue */
.bk-moretimes { margin-top: 16px; padding-top: 12px; border-top: var(--c-line); }
.bk-moretimes .bk-hint { margin: 0; }
.bk-add { display: inline-flex; align-items: center; gap: 6px; min-height: var(--c-tap); margin: 2px 0 -8px -2px; padding: 0 2px;
  border: 0; border-radius: 6px; background: none; color: var(--c-ink); font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; }
.bk-add::before { content: "+"; font-size: 20px; line-height: 1; font-weight: 400; text-decoration: none; display: inline-block; }
.bk-remove:focus-visible, .bk-add:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
@media (hover: hover) { .bk-add:hover { text-decoration-thickness: 2px; } .bk-remove:hover { color: var(--c-ink); } }
.bk-day[disabled] { opacity: 0.4; cursor: default; text-decoration: line-through; }
.bk-next { margin-top: 18px; }
.bk-btn-block { width: 100%; }
@media (min-width: 600px) { .bk-btn-block { width: auto; min-width: 220px; } }
.bk-step .bk-alert { border-radius: 0 var(--c-r1) var(--c-r1) 0; background: color-mix(in oklch, var(--c-red) 6%, white); }

/* Step 3: details */
.bk-set { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.bk-set legend { padding: 0; margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.bk-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bk-seg-opt, .bk-chip { position: relative; display: block; }
/* A choice that does not apply (Combined Science at A-Level) is shown but cannot be picked. */
.bk-chip input:disabled + span { opacity: 0.4; cursor: default; text-decoration: line-through; }
.bk-other-board { display: block; margin-top: 10px; max-width: 320px; }
.bk-seg-opt input, .bk-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bk-seg-opt span { display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px 10px;
  border-radius: var(--c-r1); line-height: 1.25; font-size: 15px; font-weight: 500; height: 100%; }
.bk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-chip span { display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; font-size: 15px; }
.bk-field > label:not(.bk-check) { display: block; font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.bk-field input:not([type="checkbox"]):not([type="radio"]), .bk-field textarea { font-size: 16px; }
.bk-field input:focus-visible, .bk-field textarea:focus-visible, .bk-zone select:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 1px; }
.bk-field input::placeholder, .bk-field textarea::placeholder { color: var(--c-ink-3); }
.bk-field [aria-invalid="true"] { border-color: var(--c-red); box-shadow: inset 0 0 0 1px var(--c-red); }
.bk-hint { margin: 4px 0 0; font-size: 14px; color: var(--c-ink-2); }
.bk-err { margin: 6px 0 0; font-size: 15px; color: var(--c-red); font-weight: 500; }
.bk-check { display: flex; align-items: center; gap: 10px; min-height: var(--c-tap); font-weight: 600; font-size: 16px; cursor: pointer; }
.bk-check input { width: 22px; height: 22px; margin: 0; accent-color: var(--c-ink); }
/* The shared field rule (Part 1) sizes every input in a .bk-field like a text box; a checkbox keeps its own size */
.bk-field .bk-check input { flex: 0 0 auto; width: 22px; height: 22px; min-height: 0; padding: 0; border: 0; }
.bk-field .bk-check input[aria-invalid="true"] { box-shadow: none; outline: 2px solid var(--c-red); outline-offset: 2px; }
.bk-optional { font-weight: 400; color: var(--c-ink-3); margin-left: 6px; }

/* Step 4: recap and send */
.bk-recap { background: var(--c-well); border-radius: var(--c-r1); padding: 14px 16px; margin: 4px 0 18px; }
.bk-recap-what { margin: 0; }
.bk-recap-what strong { display: block; font-weight: 600; margin: 0 0 2px; }
.bk-recap-what span { display: block; font-size: 15px; }
.bk-recap-price { margin: 10px 0 0; padding: 10px 0 0; border-top: var(--c-line); font-size: 15px; }
.bk-recap-price strong { font: 400 26px/1 var(--c-serif); margin-right: 4px; }
.bk-recap-h { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.bk-recap-terms { margin: 0 0 18px; padding: 0 0 0 18px; font-size: 15px; color: var(--c-ink); }
.bk-recap-terms li { margin: 6px 0 0; }
.bk-recap-terms li:first-child { margin-top: 0; }
.bk-recap-terms strong { font-weight: 600; }
.bk-message { margin-bottom: 18px; }
.bk-recap-terms li::marker { color: var(--c-ink-3); }

/* Sent */
.bk-done { background: var(--c-surface); border: var(--c-line); border-radius: var(--c-r2); padding: 24px 20px 20px; box-shadow: var(--c-shadow-1); }
.bk-done:focus { outline: none; }
.bk-done-tick { width: 56px; height: 56px; color: var(--c-green); display: block; margin: 0 0 6px; }
.bk-done-tick path { stroke-dasharray: 64; stroke-dashoffset: 0; animation: bk-draw 420ms var(--c-ease) 80ms backwards; }
@keyframes bk-draw { from { stroke-dashoffset: 64; } }
.bk-done-title { font: 400 clamp(32px, 8vw, 44px)/1.1 var(--c-serif); margin: 0 0 8px; }
.bk-done-what { margin: 0 0 20px; font-size: 17px; overflow-wrap: anywhere; }
.bk-done-what span, .bk-done-what strong { display: block; }
.bk-done-what strong { font-weight: 600; margin-top: 4px; }
.bk-done-sub { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.bk-done-steps { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: bk; }
.bk-done-steps li { counter-increment: bk; position: relative; padding: 0 0 12px 40px; }
.bk-done-steps li::before { content: counter(bk); position: absolute; left: 0; top: 0; box-sizing: border-box; width: 28px; height: 28px;
  display: grid; place-items: center; border: 1.5px solid var(--c-ink); border-radius: 4px; font-weight: 600; font-size: 14px; }

/* Aside: prices, terms, reviews */
.bk-aside { display: grid; gap: 16px; align-content: start; }
.bk-panel { background: var(--c-surface); border: var(--c-line); border-radius: var(--c-r2); padding: 18px 18px 16px; }
.bk-aside-h { margin: 0 0 12px; font: 400 24px/1.2 var(--c-serif); }
.bk-prices { margin: 0 0 6px; }
.bk-prices > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: var(--c-line); }
.bk-prices > div:first-child { padding-top: 0; }
.bk-prices dt { font-weight: 600; }
.bk-prices dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.bk-prices dd strong { font: 400 24px/1 var(--c-serif); }
.bk-prices-note { margin: 8px 0 0; font-size: 14px; color: var(--c-ink-2); }
.bk-terms { margin: 16px 0 0; font-size: 15px; }
.bk-terms dt { font-weight: 600; margin: 12px 0 2px; }
.bk-terms dt:first-child { margin-top: 0; }
.bk-terms dd { margin: 0; color: var(--c-ink-2); }

.bk-review { margin: 0 0 16px; padding: 0 0 16px; border-bottom: var(--c-line); }
.bk-review blockquote { margin: 0 0 8px; font: 400 20px/1.35 var(--c-serif); }
.bk-review blockquote::before { content: "\201C"; color: var(--accent); margin-right: 1px; }
.bk-review blockquote::after { content: "\201D"; color: var(--accent); margin-left: 1px; }
.bk-review figcaption { font-size: 14px; color: var(--c-ink-2); }
.bk-review-who { display: block; font-weight: 600; color: var(--c-ink); }
.bk-more { margin: 0; font-size: 15px; }
.bk-more .bk-link { display: inline-flex; align-items: center; min-height: var(--c-tap); }

/* "Your lessons" (personal link only): a sheet on the whiteboard, under the greeting. On a wide screen it lines up with
   the steps column below it (the column is the page less the 340px aside and the 40px gap). */
.bk-mine { box-sizing: border-box; margin: 2px 0 18px; padding: 16px 16px 14px; background: var(--c-surface); border: var(--c-line);
  border-radius: var(--c-r2); box-shadow: var(--c-shadow-1); }
@media (min-width: 600px) { .bk-mine { padding: 20px 22px 16px; } }
@media (min-width: 900px) { .bk-mine { max-width: calc(100% - 380px); margin: 6px 0 26px; } }
.bk-mine-h { margin: 0 0 12px; font: 400 28px/1.15 var(--c-serif); }
.bk-mine-sub { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.bk-mine-part { margin-top: 18px; }

/* The money: a margin line as on a marked script. Green in credit, red when due now, ink when due later. */
.bk-mine-money { padding: 10px 14px 12px; border-left: var(--c-pen) solid var(--c-ink); border-radius: 0 var(--c-r1) var(--c-r1) 0;
  background: var(--c-well); }
.bk-mine-money-credit { border-left-color: var(--c-green); background: color-mix(in oklch, var(--c-green) 7%, white); }
.bk-mine-money-now { border-left-color: var(--c-red); background: color-mix(in oklch, var(--c-red) 6%, white); }
.bk-mine-line { margin: 0 0 6px; font-size: 16px; line-height: 1.45; }
.bk-mine-line strong { font: 400 24px/1 var(--c-serif); font-variant-numeric: tabular-nums; }
.bk-mine-pay { margin: 6px 0 0; font-size: 14px; color: var(--c-ink-2); }
.bk-mine-pay strong { color: var(--c-ink); font-weight: 600; white-space: nowrap; }

/* Regular lessons: one line each, marked with a small repeat sign */
.bk-mine-series { list-style: none; margin: 0; padding: 0; }
.bk-mine-series li { position: relative; padding: 2px 0 2px 26px; }
.bk-mine-series li::before { content: ""; position: absolute; left: 0; top: 6px; width: 17px; height: 17px; background: var(--c-ink-3);
  -webkit-mask: var(--bk-repeat) center / contain no-repeat; mask: var(--bk-repeat) center / contain no-repeat; }
.bk-body { --bk-repeat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9V8a3 3 0 0 1 3-3h9M13.5 2.5 16 5l-2.5 2.5M16 11v1a3 3 0 0 1-3 3H4M6.5 17.5 4 15l2.5-2.5'/%3E%3C/g%3E%3C/svg%3E"); }

/* Upcoming lessons: the date in a box (the exam paper's number box), then the time, the status and the two actions */
.bk-mine-list { list-style: none; margin: 0; padding: 0; border-top: var(--c-line); }
.bk-lesson { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 2px 12px; padding: 12px 0; border-bottom: var(--c-line); }
.bk-lesson-date { grid-row: 1 / span 2; align-self: start; box-sizing: border-box; width: 56px; padding: 5px 0 6px; border: 1.5px solid var(--c-ink);
  border-radius: 4px; text-align: center; font-size: 13px; line-height: 1.2; color: var(--c-ink-2); }
.bk-lesson-date b { display: block; font-size: 15px; font-weight: 600; color: var(--c-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-lesson-text { min-width: 0; }
.bk-lesson-when { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.bk-lesson-status { margin: 1px 0 0; font-size: 15px; color: var(--c-ink-2); }
.bk-st-paid { color: var(--c-green); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.bk-st-paid::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--bk-tick) center / contain no-repeat;
  mask: var(--bk-tick) center / contain no-repeat; }
.bk-st-now { color: var(--c-red); font-weight: 600; }
.bk-lesson-acts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.bk-lesson-note { grid-column: 2; margin: 4px 0 0; font-size: 14px; color: var(--c-ink-2); }
.bk-mine-act { min-height: var(--c-tap); min-width: 80px; padding: 0 16px; border: var(--c-border); border-radius: var(--c-r1); background: var(--c-surface);
  color: var(--c-ink); font: 500 15px var(--c-font); cursor: pointer; touch-action: manipulation;
  transition: background-color var(--c-dur-1) var(--c-ease), color var(--c-dur-1) var(--c-ease), border-color var(--c-dur-1) var(--c-ease); }
.bk-mine-act[aria-expanded="true"] { background: var(--c-ink); color: var(--c-on-ink); border-color: var(--c-ink); }
.bk-mine-act:disabled { opacity: 0.45; cursor: default; }
@media (hover: hover) { .bk-mine-act:not(:disabled):hover { border-color: var(--c-ink); } }
@media (min-width: 560px) {
  .bk-lesson { grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; }
  .bk-lesson-date { grid-row: 1; }
  .bk-lesson-acts { grid-column: 3; grid-row: 1; margin: 0; }
  .bk-lesson-note { grid-column: 3; grid-row: 1; margin: 0; max-width: 15em; text-align: right; }
}

/* A row's Cancel or Move box, opened under it */
.bk-lesson-box { grid-column: 1 / -1; margin-top: 10px; padding: 14px; border-radius: var(--c-r1); background: var(--c-well); }
.bk-lesson-q { margin: 0; font-weight: 600; }
.bk-lesson-q:focus { outline: none; }
.bk-lesson-q:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; border-radius: 2px; }
.bk-lesson-box .bk-hint { margin-top: 4px; }
.bk-lesson-box .bk-actions { margin-top: 12px; }
.bk-lesson-box .bk-alert { font-size: 15px; margin: 10px 0 0; border-radius: 0 var(--c-r1) var(--c-r1) 0; background: color-mix(in oklch, var(--c-red) 6%, white); }
.bk-lesson-box .bk-loading { margin: 12px 0 0; }
.bk-lesson-box .bk-empty { padding: 10px 0 0; }
.bk-mine-picker { margin-top: 14px; }
.bk-mine-days { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); margin-bottom: 14px; }
.bk-mine-picker .bk-times { margin-bottom: 0; }
.bk-mine-close { display: inline-flex; align-items: center; margin: 8px 0 -8px -12px; }
.bk-btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; }
.bk-btn-danger:focus-visible, .bk-btn-ghost:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }

/* "Show all upcoming lessons (9)", news after a change, the note at the foot */
.bk-mine-more { display: inline-flex; align-items: center; gap: 6px; min-height: var(--c-tap); margin: 2px 0 -6px -2px; padding: 0 2px; border: 0;
  border-radius: 6px; background: none; color: var(--c-ink); font: 500 16px var(--c-font); text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer; }
.bk-mine-more:focus-visible, .bk-mine-act:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
@media (hover: hover) { .bk-mine-more:hover { text-decoration-thickness: 2px; } }
.bk-mine-live .bk-ok, .bk-mine-live .bk-alert { margin: 0 0 12px; padding: 10px 14px; border-radius: 0 var(--c-r1) var(--c-r1) 0; font-size: 15px; }
.bk-mine-live .bk-ok { background: color-mix(in oklch, var(--c-green) 7%, white); }
.bk-mine-live .bk-alert { background: color-mix(in oklch, var(--c-red) 6%, white); }
.bk-mine-live p:focus { outline: none; }
.bk-mine-live p:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.bk-mine-none { margin: 0; font-size: 16px; color: var(--c-ink-2); }
.bk-mine-foot { margin: 14px 0 0; font-size: 14px; color: var(--c-ink-2); }

/* "Book another lesson", above the steps */
.bk-flow-h { margin: 0 0 14px; font: 400 28px/1.15 var(--c-serif); }

@media (prefers-reduced-motion: reduce) { .bk-mine-act { transition: none; } }

/* The footer on a phone: the copyright on its own line, the three links together under it */
@media (max-width: 480px) { .bk-foot-inner.bk-top-wide > span:first-child { flex-basis: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .bk-step[data-state="open"] .bk-step-body, .bk-done-tick path { animation: none; }
  .bk-kind, .bk-pill, .bk-day, .bk-time, .bk-chip span, .bk-seg-opt span { transition: none; }
}

/* Admin: the History tab's table (Joe, 25 Nov 2026). */
.bk-hist-wrap { overflow-x: auto; border: var(--c-line); border-radius: 10px; background: var(--c-surface); margin-bottom: 12px; }
.bk-hist { width: 100%; border-collapse: collapse; font-size: 14px; }
.bk-hist th, .bk-hist td { text-align: left; padding: 8px 12px; border-bottom: var(--c-line); white-space: nowrap; }
.bk-hist td:nth-child(4) { white-space: normal; min-width: 180px; }
.bk-hist th { font-weight: 600; color: var(--c-ink-3); font-size: 13px; }
.bk-hist .bk-num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.bk-hist-dim td { color: var(--c-ink-3); }

/* Admin: one family on the Money tab (Joe, 25 Nov 2026). */
.bk-money-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.bk-money-head h3 { margin: 0; }
.bk-money-head p { margin: 2px 0 0; }
.bk-money-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bk-bal { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.bk-bal-credit { background: oklch(0.94 0.05 150); color: oklch(0.38 0.1 150); }
.bk-bal-owes { background: oklch(0.94 0.04 25); color: oklch(0.45 0.15 25); }
.bk-bal-zero { background: var(--c-well); color: var(--c-ink-3); }
.bk-money-cover { margin: 10px 0 8px; font-size: 14px; }
.bk-money-rows { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.bk-money-rows td { padding: 5px 0; border-top: var(--c-line); vertical-align: top; }
.bk-money-rows td + td { padding-left: 12px; }
.bk-money-date { width: 4.5em; white-space: nowrap; color: var(--c-ink-3); }
.bk-money-rows .bk-num-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bk-money-rows .bk-in .bk-num-cell { color: oklch(0.42 0.11 150); font-weight: 600; }
.bk-money-rows .bk-muted { font-size: inherit; }

/* A personal link opens on "Loading your lessons…" until its own section is drawn, never the public page first (Joe,
   26 Nov 2026). book.html sets bk-linked before the first paint; book.js adds bk-ready (also on any error, and after 10 s). */
.bk-loading { display: none; }
.bk-linked:not(.bk-ready) .bk-loading { display: block; }
.bk-linked:not(.bk-ready) [data-book-title],
.bk-linked:not(.bk-ready) [data-book-lede],
.bk-linked:not(.bk-ready) .bk-layout { display: none; }
