/* Public service booking (/book/{slug}). Mirrors the precursor.com.au marketing
   site: Playfair Display headings, Inter body, off-white canvas, 12px radius
   black buttons with the small chevron square. Self-contained: no app shell. */

@font-face { font-family: "Playfair Display"; src: url("/fonts/precursor/playfair-display-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/precursor/playfair-display-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/precursor/inter-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/precursor/inter-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/precursor/inter-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
    --bk-canvas: #f8f8f8;
    --bk-surface: #ffffff;
    --bk-ink: #000000;
    --bk-ink-inverse: #1c1c1c;
    --bk-text: #707070;
    --bk-subtle: #767676;
    --bk-line: #e5e5e5;
    --bk-sand: #e8e4db;
    --bk-sage: #5e6b64;
    --bk-danger: #8b302d;
    --bk-danger-soft: #f6e9e8;
    --bk-focus: #165fcc;
    --bk-radius: 12px;
    --bk-card: 20px;
    --bk-serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --bk-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.bk {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bk-canvas);
    color: var(--bk-ink);
    font: 400 16px/1.5 var(--bk-sans);
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}
.bk a { color: inherit; }
.bk [hidden] { display: none !important; }

/* ---------------------------------------------------------------- Header / footer */
.bk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px clamp(16px, 4vw, 48px);
    background: #fafafa;
    border-bottom: 1px solid var(--bk-line);
}
.bk-logo img { display: block; height: 28px; width: auto; }
.bk-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--bk-subtle) !important;
    text-decoration: none;
}
.bk-back:hover { color: var(--bk-ink) !important; }
.bk-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: center;
    padding: 28px 16px 36px;
    font-size: 13px;
    color: var(--bk-subtle);
}
.bk-footer a { color: var(--bk-subtle); }

/* ---------------------------------------------------------------- Layout */
.bk-main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 32px) 24px; }
.bk-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.bk-flow { min-width: 0; }
.bk-summary { position: sticky; top: 24px; }
.bk-mobile-summary { display: none; }

@media (max-width: 860px) {
    .bk-main { padding-top: 16px; }
    .bk-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .bk-summary { display: none; }
    .bk-mobile-summary {
        display: block;
        margin: 0 0 20px;
        background: var(--bk-surface);
        border: 1px solid var(--bk-line);
        border-radius: 16px;
    }
    .bk-mobile-summary > summary {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        font-weight: 500;
        cursor: pointer;
        list-style: none;
    }
    .bk-mobile-summary > summary::-webkit-details-marker { display: none; }
    .bk-mobile-price { display: inline-flex; align-items: center; gap: 6px; }
    .bk-mobile-summary[open] .bk-mobile-price svg { transform: rotate(180deg); }
    .bk-mobile-summary .bk-summary-card { border: 0; border-top: 1px solid var(--bk-line); border-radius: 0 0 16px 16px; }
}

/* ---------------------------------------------------------------- Type */
/* Section eyebrow as on the site: a black tile in a soft grey halo, then a grey uppercase label. */
.bk-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: -0.025em;
    text-transform: uppercase;
    color: #666;
}
.bk-mark { display: flex; flex: none; width: 25px; height: 20px; padding: 4px; border-radius: 6px; background: rgba(0, 0, 0, .1); }
.bk-mark::before { content: ""; flex: 1; border-radius: 4px; background: var(--bk-ink); }
.bk-mark-danger::before { background: var(--bk-danger); }
.bk-title {
    margin: 0 0 10px;
    font: 400 clamp(30px, 4.2vw, 44px)/1.12 var(--bk-serif);
    letter-spacing: -0.03em;
    color: var(--bk-ink);
}
.bk-lede { margin: 0 0 28px; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.4; color: var(--bk-text); letter-spacing: -0.02em; }
.bk-small { margin: 16px 0 0; font-size: 13px; line-height: 1.5; color: var(--bk-subtle); }
.bk-help { margin: -4px 0 14px; font-size: 14px; color: var(--bk-subtle); }
.bk em { font-style: normal; color: var(--bk-subtle); font-size: 13px; margin-left: 4px; }

/* ---------------------------------------------------------------- Progress */
.bk-progress { display: flex; gap: 6px; margin: 0 0 28px; padding: 0; list-style: none; }
.bk-progress li { flex: 1; min-width: 0; }
.bk-progress-bar { display: block; height: 3px; border-radius: 2px; background: var(--bk-line); transition: background .3s ease; }
.bk-progress-label { display: block; margin-top: 8px; font-size: 12px; color: var(--bk-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-progress li.is-done .bk-progress-bar,
.bk-progress li.is-current .bk-progress-bar { background: var(--bk-ink); }
.bk-progress li.is-current .bk-progress-label { color: var(--bk-ink); }

/* ---------------------------------------------------------------- Steps (JS enhances into one-at-a-time) */
.bk-step { margin: 0 0 56px; }
html.js .bk-step:not(.is-active) { display: none; }
html.js .bk-step { margin: 0; animation: bk-in .35s ease both; }
html:not(.js) .bk-progress, html:not(.js) [data-back], html:not(.js) [data-next], html:not(.js) [data-begin] { display: none; }
@keyframes bk-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Suitability opens on an intro with "Get started"; after that each question takes the heading's place. */
html.js .bk-step:not(.is-intro) > .bk-intro, html.js .bk-step.is-intro > .bk-actions { display: none; }

.bk-question { margin: 0 0 32px; padding: 0; border: 0; min-width: 0; }
html.js .bk-question:not(.is-active) { display: none; }
html.js .bk-question { animation: bk-in .3s ease both; margin-bottom: 24px; }
.bk-question legend { display: block; padding: 0; margin: 0 0 16px; }
.bk-question-title { display: block; font: 400 clamp(24px, 3vw, 30px)/1.18 var(--bk-serif); letter-spacing: -0.025em; }
html.js .bk-question legend { margin-bottom: 24px; }
html.js .bk-question-title { font: 400 clamp(30px, 4.2vw, 44px)/1.12 var(--bk-serif); letter-spacing: -0.03em; }
html.js .bk-question .bk-help { margin: -14px 0 28px; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.4; letter-spacing: -0.02em; color: var(--bk-text); }

/* Answer cards */
.bk-options { display: grid; gap: 8px; }
.bk-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bk-surface);
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    font-size: 15px;
    line-height: 1.35;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.bk-option:hover { border-color: #c9c9c9; }
.bk-option input { position: absolute; opacity: 0; pointer-events: none; }
.bk-option .bk-tick { flex: none; opacity: 0; color: var(--bk-ink); transition: opacity .15s ease; }
.bk-option:has(input:checked) { border-color: var(--bk-ink); box-shadow: inset 0 0 0 0.5px var(--bk-ink); }
.bk-option:has(input:checked) .bk-tick { opacity: 1; }
.bk-option:has(input:focus-visible) { outline: 2px solid var(--bk-focus); outline-offset: 2px; }

/* Inputs */
.bk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 560px) { .bk-grid { grid-template-columns: minmax(0, 1fr); } }
.bk-input { display: grid; gap: 6px; margin: 0 0 20px; font-size: 14px; font-weight: 500; }
.bk-grid .bk-input { margin: 0; }
.bk-input input, .bk-input textarea, .bk-input select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bk-surface);
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    font: 400 16px/1.4 var(--bk-sans);
    color: var(--bk-ink);
}
.bk-input select {
    padding-right: 40px;
    appearance: none;
    background: var(--bk-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 12px;
    cursor: pointer;
}
.bk-input select:hover { border-color: #c9c9c9; }
.bk-input select:invalid { color: var(--bk-subtle); }
.bk-input select option { color: var(--bk-ink); }
.bk-input input:focus, .bk-input textarea:focus, .bk-input select:focus { outline: none; border-color: var(--bk-ink); box-shadow: 0 0 0 3px rgba(0, 0, 0, .06); }
.bk-input textarea { resize: vertical; min-height: 88px; }
.bk-input input[aria-invalid="true"], .bk-input select[aria-invalid="true"] { border-color: var(--bk-danger); }

/* Preferences: pairs of dropdowns. "When" takes the full row until the
   preferred-date picker opens beside it. */
.bk-prefs { margin: 0 0 20px; align-items: end; }
.bk-prefs .bk-wide { grid-column: 1 / -1; }
html.js .bk-prefs:not(:has(.bk-date.is-shown)) .bk-timing { grid-column: 1 / -1; }
html.js .bk-date:not(.is-shown) { display: none; }
/* Phones keep the short pairs side by side: a wide city beside a narrow postcode, days beside time of day. */
@media (max-width: 560px) {
    .bk-prefs { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 12px; }
    .bk-prefs > * { grid-column: span 3; }
    .bk-prefs .bk-city { grid-column: span 4; }
    .bk-prefs .bk-postcode { grid-column: span 2; }
    .bk-prefs .bk-timing, .bk-prefs .bk-date, .bk-prefs .bk-wide { grid-column: 1 / -1; }
}

/* Notes and alerts */
.bk-note { margin: 12px 0 0; padding: 12px 14px; background: var(--bk-sand); border-radius: var(--bk-radius); font-size: 14px; line-height: 1.45; color: #3a3a3a; }
.bk-alert { margin: 0 0 20px; padding: 12px 14px; background: var(--bk-danger-soft); border-radius: var(--bk-radius); font-size: 14px; line-height: 1.45; color: var(--bk-danger); }
.bk-panel { margin: 12px 0 0; }
.bk-panel p { margin: 0; }
.bk-contact { padding: 16px; background: var(--bk-surface); border: 1px solid var(--bk-ink); border-radius: var(--bk-radius); font-size: 14px; line-height: 1.45; color: #3a3a3a; }
.bk-contact .bk-contact-line { margin: 8px 0 14px; color: var(--bk-text); }
.bk-step > #bk-error { margin: 20px 0 0; }
.bk-notice { margin: 0 0 20px; padding: 12px 14px; background: var(--bk-sand); border-radius: var(--bk-radius); font-size: 14px; color: #3a3a3a; }

/* ---------------------------------------------------------------- Buttons */
.bk-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.bk-actions-start { justify-content: flex-start; flex-wrap: wrap; }
.bk-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 16px;
    min-height: 40px;
    background: var(--bk-ink);
    color: #fff !important;
    border: 1px solid var(--bk-ink);
    border-radius: var(--bk-radius);
    font: 500 15px/1 var(--bk-sans);
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease;
}
.bk-btn:hover { background: #1c1c1c; }
.bk-btn:focus-visible { outline: 2px solid var(--bk-focus); outline-offset: 2px; }
.bk-btn[disabled] { opacity: .6; cursor: progress; }
/* Continue after an answer that stops the booking: greyed out, the panel above says why. */
.bk-btn[data-next]:disabled { opacity: 1; background: #d4d4d4; border-color: #d4d4d4; cursor: not-allowed; }
.bk-btn[data-next]:disabled .bk-btn-icon::before { color: #d4d4d4; transform: none; }
.bk-btn-icon {
    position: relative;
    width: 21px;
    height: 21px;
    flex: none;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}
.bk-btn-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    background: currentColor;
    color: var(--bk-ink);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21'%3E%3Cpath d='m9 6.5 4 4-4 4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 21px 21px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21'%3E%3Cpath d='m9 6.5 4 4-4 4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 21px 21px no-repeat;
    transition: transform .25s ease;
}
.bk-btn:hover .bk-btn-icon::before { transform: translateX(2px); }
.bk-btn-secondary { background: var(--bk-surface); color: var(--bk-ink) !important; border-color: var(--bk-line); }
.bk-btn-secondary:hover { background: #f2f2f2; }
.bk-btn-secondary .bk-btn-icon { background: var(--bk-ink); }
.bk-btn-secondary .bk-btn-icon::before { color: #fff; }
.bk-link { padding: 8px 0; background: none; border: 0; font: 400 15px var(--bk-sans); color: var(--bk-subtle); cursor: pointer; }
.bk-link:hover { color: var(--bk-ink); }
.bk-link.is-hidden { visibility: hidden; }

/* ---------------------------------------------------------------- Review */
.bk-review { display: grid; gap: 12px; margin: 8px 0 20px; }
.bk-review-block { padding: 16px; background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: 16px; }
.bk-review-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.bk-review-head strong { font-weight: 500; }
.bk-review-head button { padding: 0; background: none; border: 0; font: 400 14px var(--bk-sans); color: var(--bk-subtle); text-decoration: underline; cursor: pointer; }
.bk-review-block p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--bk-text); white-space: pre-line; }
.bk-pay { display: grid; gap: 8px; margin: 0 0 20px; padding: 16px; background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: 16px; }
.bk-pay div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.bk-pay span { color: var(--bk-text); }
.bk-pay strong { font-weight: 500; }
.bk-consent { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; font-size: 14px; line-height: 1.45; color: #3a3a3a; cursor: pointer; }
.bk-consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--bk-ink); }

/* ---------------------------------------------------------------- Summary card */
.bk-summary-card { padding: 20px; background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: var(--bk-card); }
.bk-summary-eyebrow { margin: 0 0 6px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--bk-subtle); }
.bk-summary-title { margin: 0; font: 400 24px/1.2 var(--bk-serif); letter-spacing: -0.02em; }
.bk-summary-price { margin: 6px 0 14px; font-size: 32px; letter-spacing: -0.02em; }
.bk-summary-pay { display: grid; gap: 8px; margin: 0 0 16px; padding: 14px 0; border-top: 1px solid var(--bk-line); border-bottom: 1px solid var(--bk-line); }
.bk-summary-pay div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.bk-summary-pay dt { color: var(--bk-text); }
.bk-summary-pay dd { margin: 0; font-weight: 500; text-align: right; }
.bk-included { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 14px; color: #3d3d3d; }
.bk-included li { display: flex; gap: 8px; align-items: flex-start; }
.bk-included svg { flex: none; margin-top: 2px; color: var(--bk-sage); }
.bk-summary-note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--bk-subtle); }

/* ---------------------------------------------------------------- Confirmation / stop / unavailable */
.bk-card { padding: clamp(24px, 4vw, 40px); background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: var(--bk-card); }
.bk-center { max-width: 640px; margin: 24px auto; }
.bk-done .bk-lede { margin-bottom: 24px; }
/* After checkout: new customers create an account, existing members have nothing to do. */
.bk-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .bk-paths { grid-template-columns: minmax(0, 1fr); } }
.bk-path { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: 16px; }
.bk-path strong { font: 400 20px/1.25 var(--bk-serif); letter-spacing: -0.02em; }
.bk-path span { font-size: 14px; line-height: 1.45; color: var(--bk-text); overflow-wrap: anywhere; }
.bk-path .bk-btn { margin-top: 10px; }
.bk-path:last-child { background: var(--bk-sand); border-color: transparent; }
.bk-next-title { margin-top: 44px; }
.bk-next { display: grid; gap: 0; margin: 0 0 8px; padding: 0; list-style: none; counter-reset: bk-next; }
.bk-next li { position: relative; display: grid; gap: 2px; padding: 14px 0 14px 44px; border-top: 1px solid var(--bk-line); counter-increment: bk-next; }
.bk-next li:last-child { border-bottom: 1px solid var(--bk-line); }
.bk-next li::before {
    content: "0" counter(bk-next);
    position: absolute;
    left: 0;
    top: 14px;
    font-size: 13px;
    color: var(--bk-subtle);
}
.bk-next strong { font: 400 20px/1.25 var(--bk-serif); letter-spacing: -0.02em; }
.bk-next span { font-size: 14px; line-height: 1.45; color: var(--bk-text); }
.bk-stop .bk-title { max-width: 18ch; }

@media (prefers-reduced-motion: reduce) {
    html.js .bk-step, html.js .bk-question { animation: none; }
    .bk-btn-icon::before { transition: none; }
}
