/* =====================================================================
   Page-builder pages on the kit (about, contact, engagement, legal, resource pages).
   Templates: app/Views/sections/kit/*.php. Every rule is scoped to body.bp or a bp- block.
   ===================================================================== */

/* Draft preview line (admin preview only) */
.bp-preview { position: fixed; z-index: 60; left: 50%; bottom: 16px; transform: translateX(-50%); margin: 0; padding: 8px 14px; font-size: 14px; color: #fff; background: var(--ink); border-radius: var(--r-sm); }

/* Sections follow each other with a hairline instead of exact screens (owner-edited content of any length) */
.bp main > .bp-sec + .bp-sec:not(.ground-surface) > .wrap { border-top: 1px solid var(--line); padding-top: var(--s-8); }

.bp main > .bp-sec { padding-block: 72px 72px; }
.bp main > .bp-sec + .bp-sec:not(.ground-surface) { padding-top: 0; }
.bp main > .bp-sec + .bp-sec:not(.ground-surface) > .wrap { padding-top: 72px; }
@media (max-width: 639px) { .bp main > .bp-sec { padding-block: 48px 48px; } .bp main > .bp-sec + .bp-sec:not(.ground-surface) > .wrap { padding-top: 48px; } }
.bp main > .bp-sec.ground-surface + .bp-sec > .wrap { border-top: 0; padding-top: 0; }
.bp main > .bp-sec.ground-surface + .bp-sec { padding-top: 72px; }
@media (max-width: 639px) { .bp main > .bp-sec.ground-surface + .bp-sec { padding-top: 48px; } }
.bp .masthead:not(.masthead--compact) + .bp-sec > .wrap { border-top: 0; padding-top: 0; }

/* Masthead side: the page's plan as a checklist, or the list of its sections */
.bp-plan { padding: var(--s-6); border-radius: var(--r-lg); }
.bp-plan { padding: var(--s-7) var(--s-6); }
.bp-plan .ui-checks { max-width: 480px; margin-inline: auto; font-size: 15px; }
.bp-plan .ui-check { min-height: 44px; }
.bp-plan .ui-check__label { white-space: normal; }
.bp-toc { padding: var(--s-6); }
.bp-toc .t-label { margin: 0 0 var(--s-3); }
.bp-toc__list { margin: 0; padding: 0; list-style: none; }
.bp-toc__list li { border-top: 1px solid var(--line); }
.bp-toc__list a { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.35; }
.bp-toc__list a:hover { color: var(--red-ink); }

/* Rich text */
.bp-text__h { margin: 0; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; letter-spacing: -0.02em; position: sticky; top: calc(var(--nav, 64px) + 24px); }
.bp-text__split { align-items: start; }
.bp-text__copy h2 { margin: 0 0 var(--s-6); }
.bp-text__split--left .bp-text__copy { grid-column: 7 / span 6; grid-row: 1; }
.bp-text__split--left .bp-text__media { grid-column: 1 / span 5; grid-row: 1; }
.bp-text__media .photo, .bp-text__top .photo { aspect-ratio: 4 / 3; }
.bp-text__top { margin-bottom: var(--s-7); }
.bp-text .prose > :first-child { margin-top: 0; }
@media (max-width: 1023px) {
  .bp-text__h { position: static; margin-bottom: var(--s-5); }
  .bp-text .grid > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
}
.bp--privacy .bp-text .prose, .bp--terms .bp-text .prose, .bp--cookies .bp-text .prose { max-width: 72ch; }

/* Steps */
.bp-steps__cards { margin: 0; padding: 0; list-style: none; row-gap: var(--gutter); }
.bp-steps__cards .step-card { display: flex; flex-direction: column; gap: var(--s-2); }
.bp-steps__cards .step-card p { margin: 0; }
.bp-steps__cards .t-card { margin: 0; }
.bp-steps__rows .rows-list__title { display: flex; gap: var(--s-3); align-items: baseline; }
.bp-steps__rows .step-num { flex: none; margin: 0; transform: translateY(-2px); }
.bp-when { display: block; margin-bottom: 4px; font-size: var(--t-small); font-weight: 500; color: var(--ink); }
@media (min-width: 640px) and (max-width: 1023px) { .bp-steps__cards > .span-3 { grid-column: span 6; } .bp-steps__cards > .span-4 { grid-column: 1 / -1; } }

/* Timeline */
.bp-timeline__row { align-items: baseline; }
@media (min-width: 860px) { .bp-timeline__row { grid-template-columns: minmax(0, 2fr) minmax(0, 8fr) !important; } }
.bp-timeline__year { margin: 0; font-weight: 600; color: var(--ink); }
.bp-timeline .rows-list__text { margin-top: 4px; }

/* Quiet stat row */
.bp-stats__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--gutter); margin: 0; border-top: 1px solid var(--line); }
.bp-stats__row > div { display: flex; flex-direction: column-reverse; gap: 4px; padding-top: var(--s-5); }
.bp-stats__row dt { font-size: var(--t-small); color: var(--muted); }
.bp-stats__row dd { margin: 0; font-size: clamp(32px, 3.4vw, 48px); line-height: 1; }

/* Cards (bento, outcomes) */
.bp-cards__grid { row-gap: var(--gutter); }
.bp-cards__grid > .card { display: flex; flex-direction: column; gap: var(--s-2); }
.bp-cards__grid > .card p { margin: 0; }
.bp-cards__stat { font-size: 32px; line-height: 1; margin-bottom: var(--s-2) !important; }
.bp-cards__go { margin-top: auto; padding-top: var(--s-4); }
@media (max-width: 1023px) { .bp-cards__grid > [class*="span-"] { grid-column: 1 / -1; } }

/* Team */
.bp-team .people { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); row-gap: var(--s-7); }
.bp-team__initial { display: grid; place-items: center; background: var(--p-surface); font: 600 48px/1 var(--font-display); letter-spacing: -0.02em; color: var(--p-muted); }
.bp-team__li { font-size: var(--t-small); margin-top: 4px; }
.bp-team__photos { margin-top: var(--s-8); row-gap: var(--gutter); }
.bp-team__photo { background: none; }
.bp-team__photo img { aspect-ratio: 3 / 2; border-radius: var(--r-lg); }
.bp-team__photo figcaption { padding-top: var(--s-3); font-size: var(--t-small); color: var(--muted); }
@media (max-width: 1023px) { .bp-team__photos > * { grid-column: 1 / -1; } }

/* Engagement models */
.bp-models__grid { row-gap: var(--gutter); }
.bp-model { display: flex; flex-direction: column; gap: var(--s-3); }
.bp-model > p, .bp-model .t-card { margin: 0; }
.bp-model__foot { margin-top: auto !important; padding-top: var(--s-4); }
.bp-models__note { margin: var(--s-6) 0 0; max-width: 64ch; }
.bp-models__table { margin-top: var(--s-7); width: 100%; max-width: 640px; border-collapse: collapse; }
.bp-models__table th, .bp-models__table td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; }
@media (max-width: 1023px) { .bp-models__grid > * { grid-column: 1 / -1; } }

/* Tool groups */
.bp-tools__group { padding: var(--s-7) 0; border-top: 1px solid var(--line); align-items: start; }
.bp-tools__group:first-child { border-top: 0; padding-top: 0; }
.bp-tools .toolgroup__name { margin: 0; }
.bp-tools .toolgroup__intro { margin: 0; }
.bp-tools .toolgroup__list { margin: 0; display: grid; }
.bp-tools .toolgroup__tool { display: grid; gap: 2px var(--gutter); padding: 12px 0; border-bottom: 1px solid var(--line); }
.bp-tools .toolgroup__tool:first-child { padding-top: 0; }
@media (min-width: 860px) { .bp-tools .toolgroup__tool { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); } }
.bp-tools .toolgroup__tool dt { font-weight: 600; }
.bp-tools .toolgroup__tool dd { margin: 0; color: var(--muted); }
@media (max-width: 1023px) { .bp-tools__group > * { grid-column: 1 / -1; } .bp-tools .toolgroup__head { margin-bottom: var(--s-5); } }

/* A call to action inside a page */
.bp-cta__card { display: grid; gap: var(--s-5); padding: var(--s-7); }
.bp-cta__card h2 { margin: 0; font-size: clamp(26px, 2.6vw, 36px); }
.bp-cta__card .t-lead { margin: 0; max-width: 56ch; }

/* Contact */
.bp-contact__head { display: grid; gap: var(--s-5); max-width: 760px; margin-bottom: var(--s-7); }
@media (min-width: 1024px) { .bp-contact__side { padding-top: 64px; } }
.bp-contact__head h1 { margin: 0; }
.bp-contact__head .hero__lead { margin: 0; color: var(--muted); max-width: 60ch; }
.bp-contact__grid { align-items: start; row-gap: var(--s-6); }
.bp-contact__main .card { padding: var(--s-7); }
.bp-contact__main .t-card { margin: 0; }
.bp-contact__side { display: grid; gap: var(--gutter); }
.bp-contact__card { display: grid; gap: var(--s-3); padding: var(--s-6); }
.bp-contact__card .t-card, .bp-contact__card p { margin: 0; }
.bp-contact__list { margin: 0; display: grid; }
.bp-contact__list > div { padding: 12px 0; border-top: 1px solid var(--line); }
.bp-contact__list dt { font-size: var(--t-small); color: var(--muted); }
.bp-contact__list dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.bp-contact__list a { color: var(--ink); }
.bp-contact .cal-embed { display: grid; gap: var(--s-3); justify-items: start; }
.bp-contact .cal-embed iframe, .bp-contact .cal-embed__frame { width: 100%; min-height: 560px; border: 0; border-radius: var(--r-sm); }
.bp-contact__expect { padding: var(--s-2) var(--s-1); }
.bp-contact__expect .t-label { margin: 0 0 var(--s-3); font-weight: 600; }
.bp-contact__ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.bp-contact__ticks li { position: relative; padding-left: 22px; }
.bp-contact__ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 5px; border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(-45deg); }
.bp-contact__planner { margin: 0; padding: 0 var(--s-1); font-size: 15px; color: var(--muted); }
@media (max-width: 1023px) { .bp-contact__grid > * { grid-column: 1 / -1; } }
@media (max-width: 639px) { .bp-contact__main .card { padding: var(--s-5); } }
.bp .purpose { margin: 0; padding: 0; border: 0; }
.bp .purpose__opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.bp .purpose__opt { position: relative; }
.bp .purpose__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bp .purpose__opt span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; font-size: 15px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; }
.bp .purpose__opt input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 500; }
.bp .purpose__opt input:focus-visible + span { outline: 2px solid var(--p-accent); outline-offset: 2px; }
.bp .field__error { display: none; }
.bp .field.is-invalid .field__error { display: block; }
.bp .field.is-invalid :is(.input, .select, .textarea) { border-color: var(--red-ink); }
.bp .field :is(.input, .select, .textarea, input:not([type]), input[type="file"]) { background: #fff; border: 1px solid #8a847d; border-radius: var(--r-sm); box-shadow: none; }
.bp .input--file { min-height: 0; padding: 10px; }
.bp .check a { color: var(--red-ink); text-decoration: underline; text-underline-offset: 3px; }
.bp .form [hidden], .bp [data-project-only][hidden] { display: none !important; }
.bp-next { padding-top: var(--s-5); border-top: 1px solid var(--line); }
.bp-next .t-label { margin: 0 0 var(--s-3); font-weight: 600; }
.bp-next__list { margin: 0; padding-left: 1.2em; list-style: decimal; display: grid; gap: 6px; color: var(--muted); font-size: 15px; }
.bp .contact__success { display: grid; gap: var(--s-4); }
.bp .contact__success[hidden] { display: none; }
.bp .ticket-slot { padding: var(--s-4); background: var(--p-surface); border-radius: var(--r-sm); }
.bp .ticket-slot[hidden] { display: none; }
.bp .ticket-slot p { margin: 0; }
.bp .ticket-slot__row { display: flex; gap: var(--s-3); align-items: center; margin: 4px 0 8px !important; }
.bp .ticket-slot__copy { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; font: inherit; font-size: 14px; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; }
.bp .ticket-slot__copy svg { width: 14px; height: 14px; }
.bp .honeypot, .bp .hp, .bp [data-hp] { position: absolute !important; left: -9999px !important; }

/* Clients, quotes, figures, links (types the landing pages use, available on kit pages too) */
.bp-clients__line { margin: 0; max-width: 72ch; }
.bp-quotes__list { display: grid; gap: var(--s-8); }
.bp-quotes .quote-line { margin: 0; }
.bp-figures { margin: var(--s-5) 0 0; display: grid; gap: var(--s-4); }
.bp-figures > div { display: flex; flex-direction: column-reverse; gap: 2px; padding-top: var(--s-4); border-top: 1px solid var(--line); }
.bp-figures dd { margin: 0; font-size: 36px; line-height: 1; }
.bp-figures dt { font-size: 15px; }
.bp-links__row { grid-template-columns: 1fr auto !important; }
.bp-stack__row { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr) !important; }
.bp-media__fig figcaption { padding-top: var(--s-3); font-size: var(--t-small); }
.bp-media__video { display: grid; place-items: center; min-height: 240px; font-weight: 500; }
.bp-enquiry .form.card { padding: var(--s-7); }
@media (max-width: 1023px) { .bp-enquiry .grid > *, .bp-problem .grid > *, .bp-links .grid > * { grid-column: 1 / -1; } }

/* Glance band (partials/glance-band.php) on kit pages */
.glance-band .wrap.glance-band__inner { display: grid; gap: var(--s-4); }
@media (min-width: 1024px) { .glance-band .wrap.glance-band__inner { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); align-items: baseline; } }
main > section.glance-band:has(> .wrap) { height: auto; padding-block: var(--s-7); border-block: 1px solid var(--line); }
.glance-band .wrap .glance-band__label { margin: 0; font-weight: 600; }
.glance-band .wrap .glance-band__list { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.glance-band .wrap .glance-band__list li { position: relative; padding-left: 20px; }
.glance-band .wrap .glance-band__list li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 5px; border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(-45deg); }

/* Rich text lists keep their markers (the kit resets list styles) */
.bp .prose ul { list-style: disc; }
.bp .prose ol { list-style: decimal; }
.bp .prose li::marker { color: var(--muted); }

/* Drawn pictures (sections/kit/_visual.php): the page's own diagram or drawn app window in a sunken panel */
.bp-visual { margin: 0; display: grid; gap: var(--s-3); }
.bp-visual__panel { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.bp-visual--hero .bp-visual__panel { height: clamp(400px, 34vw, 480px); }
.bp-visual--side .bp-visual__panel { height: clamp(340px, 30vw, 420px); }
.bp-visual__panel .scr { max-width: 520px; }
.bp-visual .dg { --dg-halo: 0; } /* DESIGN.md: no glows; the core reads by its dark fill */
.bp-visual__cap { font-size: var(--t-small); color: var(--muted); }
@media (max-width: 639px) { .bp-visual--hero .bp-visual__panel { height: 360px; } .bp-visual--side .bp-visual__panel { height: 340px; } }

/* Rich text beside its drawn picture: the picture stays in view while the text scrolls */
.bp-text--drawn .bp-text__copy h2 { margin: 0 0 var(--s-6); }
@media (min-width: 1024px) { .bp-text__media--drawn { position: sticky; top: calc(var(--nav, 64px) + 24px); } }

/* Five or six steps: the heading column on the left, the ruled steps on the right */
.bp-steps__split { align-items: start; row-gap: var(--s-6); }
.bp-steps__head .section-head { margin: 0; }
@media (min-width: 1024px) { .bp-steps__head { position: sticky; top: calc(var(--nav, 64px) + 24px); } }
@media (min-width: 860px) { .bp-steps__split .bp-steps__rows .rows-list__link { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } }
@media (max-width: 1023px) { .bp-steps__split > * { grid-column: 1 / -1; } }

/* Reading pages (privacy, terms, cookies, accessibility; pages/page.php): one reading column, a sticky "On this page" beside it */
.bp-read { position: relative; }
.bp main .bp-read > .bp-sec { padding-block: 0 var(--s-8); }
.bp main .bp-read > .bp-sec + .bp-sec > .wrap { border-top: 1px solid var(--line); padding-top: var(--s-7); }
.bp-read__col { max-width: 72ch; }
.bp-read__h { margin: 0 0 var(--s-5); font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; letter-spacing: -0.02em; }
.bp-read .prose > :first-child { margin-top: 0; }
.bp-read .prose h2 { scroll-margin-top: calc(var(--nav, 64px) + 24px); }
.bp-read .bp-sec { scroll-margin-top: calc(var(--nav, 64px) + 8px); }
.bp-read__rail { display: none; }
@media (min-width: 1024px) {
  .bp-read--toc > .bp-sec > .wrap > * { max-width: calc(75% - var(--gutter)); }
  .bp-read__rail { display: block; position: absolute; inset: 0 0 var(--s-8); pointer-events: none; }
  .bp-read__grid { width: min(100% - 2 * var(--gut), var(--container)); height: 100%; margin-inline: auto; align-items: start; }
  .bp-read__toc { pointer-events: auto; }
}
.bp-visual__panel:has(.dg[data-layout="timeline"]) { height: clamp(260px, 22vw, 320px); }
