/* Figtree, self-hosted (one variable file covers 400 and 600; latin subset, OFL licence) and preloaded.
   font-display: block, as on the LCD main site: text waits (briefly) for Figtree rather than swapping in,
   so nothing moves. 'Figtree Fallback' (Arial scaled to Figtree's metrics) only shows if Figtree takes
   longer than the browser's ~3s block period (measured: regular 99.7% width, semibold vs Arial Bold 89.5%, measured on the real labels). */
@font-face { font-family: 'Figtree'; src: url('/assets/fonts/figtree-latin.woff2') format('woff2'); font-weight: 300 900; font-style: normal; font-display: block; }
@font-face { font-family: 'Figtree Fallback'; src: local('Arial'), local('ArialMT'), local('Helvetica'); font-weight: 400; size-adjust: 99.7%; ascent-override: 95.3%; descent-override: 25.1%; line-gap-override: 0%; }
@font-face { font-family: 'Figtree Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Bold'); font-weight: 600; size-adjust: 95.5%; ascent-override: 99.5%; descent-override: 26.2%; line-gap-override: 0%; }

:root {
  /* Brand colours below are LCD defaults; /theme.css (per directory, from src/directories.ts) overrides them. */
  --brand-accent: #30a1d2;
  --brand: #0071bc;
  --brand-dark: #004e83;
  --brand-ink: #002947;
  --brand-tint: #ecf7fb;
  --brand-tint-border: #d8eef7;
  --ink: #1e293b;
  --muted: #475569;
  --line: #e3e8ee;
  --bg: #f5f8fb;
  --card: #ffffff;
  --error: #b42318;
  --ok: #067647;
  font-family: 'Figtree', 'Figtree Fallback', system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 16px; }
/* Match the main sites: Figtree 400 + 600 only (no 700). */
h1, h2, h3, legend, b, strong, th, summary { font-weight: 600; }
a { color: var(--brand); }
.devbar { background: #fff4d6; color: #7a4b00; font-size: 13px; line-height: 1.4; padding: 6px 16px; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 18px; }
.devbar a { color: inherit; }
header.site { background: var(--card); border-bottom: 1px solid var(--line); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
/* Burger menu (top right) */
.site-menu { position: relative; margin-left: auto; }
.site-menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; margin: -10px -10px -10px 0; border-radius: 10px; color: var(--brand-ink); }
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu > summary:hover, .site-menu[open] > summary { background: var(--brand-tint); }
.site-menu > summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.site-menu nav { position: absolute; right: -10px; top: calc(100% + 12px); z-index: 30; min-width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 41, 71, .16); padding: 6px; }
.site-menu ul { list-style: none; margin: 0; padding: 0; }
.site-menu a { display: block; padding: 11px 14px; border-radius: 9px; color: var(--brand-ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.site-menu a:hover, .site-menu a:focus-visible { background: var(--brand-tint); }
.site-menu li:first-child a { color: var(--brand); }
header.site .logo img { display: block; height: 24px; width: auto; }
@media (min-width: 700px) { header.site { padding: 18px 24px; } header.site .logo img { height: 30px; } }
main { max-width: 640px; margin: 0 auto; padding: 24px 16px 40px; }
main.narrow { max-width: 720px; }
footer.site { max-width: 640px; margin: 24px auto 0; padding: 28px 16px 120px; color: var(--muted); font-size: 15px; border-top: 1px solid var(--line); }
footer.site a { color: var(--ink); text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
.f-top { display: grid; gap: 20px; }
.f-logo { height: 24px; width: auto; display: block; margin-bottom: 12px; }
footer address { font-style: normal; line-height: 1.6; }
.f-social { list-style: none; padding: 0; margin: 16px 0 0; display: flex; gap: 8px; }
.f-social a { width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand-ink); }
.f-social svg { fill: currentColor; }
.f-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; align-content: start; }
.f-links a { display: inline-block; padding: 2px 0; }
.f-family { display: flex; align-items: center; gap: 18px; margin: 24px 0 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.f-family img[alt="Happiful"] { height: 38px; width: auto; display: block; }
.f-family .bcorp-mark { padding-left: 18px; border-left: 1px solid var(--line); }
.bcorp-mark img { display: block; height: 41px; width: auto; }
.bcorp-mark.small img { height: 30px; }
.f-legal { font-size: 13px; margin: 0 0 6px; }
@media (min-width: 700px) { .f-top { grid-template-columns: 1fr 1fr; } }
h1 { font-size: 28px; line-height: 1.2; color: var(--brand-ink); margin: 0 0 8px; letter-spacing: -.01em; }
h2 { font-size: 20px; color: var(--brand-ink); }
.lede { color: var(--muted); margin: 0 0 20px; font-size: 16px; }
.lede-more { color: var(--ink); margin: -12px 0 20px; font-size: 16px; }
.helper { color: var(--muted); font-size: 15px; margin: 4px 0 10px; }
.optional { font-weight: 400; color: var(--muted); }
.error { color: var(--error); font-weight: 600; }
.notice { background: #e8f6ee; color: var(--ok); padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 15px; margin: 0 0 16px; }


/* Questions */
fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { font-weight: 600; font-size: 18px; color: var(--brand-ink); margin-bottom: 8px; padding: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.pill span { display: inline-block; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font-weight: 600; }
.pill input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill input:focus-visible + span, .btn:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
input[type=text], input[type=email], select { width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); }
form.questions .btn.primary { width: 100%; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 600; border-radius: 12px; min-height: 48px; padding: 10px 18px; text-decoration: none; cursor: pointer; border: 1.5px solid var(--brand); text-align: center; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.secondary { background: var(--card); color: var(--brand); }
.btn.block { width: 100%; }

/* Results */
.change { white-space: nowrap; padding: 12px 0; margin: -12px 0; }
.coaches { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }  /* minmax(0, …): long credential lines mustn't widen the page */
.coach { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; min-width: 0; }
.coach .top { display: flex; gap: 12px; align-items: center; }
.coach .photo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex: none; background: var(--brand-tint); }
.coach h3, .coach .coach-name { margin: 0; font-size: 18px; line-height: 1.25; color: var(--brand-ink); }
.cred { font-size: 14px; color: var(--muted); font-weight: 600; margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.coach .top > div { min-width: 0; }
.coach .meta { margin: 0; font-size: 15px; color: var(--muted); }
.coach .actions { display: flex; gap: 8px; margin-top: 12px; }
.coach .actions .btn { flex: 1 1 0; padding: 10px 12px; }
.intro { font-size: 14px; color: var(--muted); margin: 10px 2px 22px; }

.next { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 20px 0 12px; }
.next h2 { font-size: 17px; margin: 0 0 10px; }
.next ol { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 10px; }
.next li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 15px; line-height: 1.45; }
.next li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-dark); font-weight: 600; font-size: 13px; display: grid; place-items: center; border: 1px solid var(--brand-tint-border); }
.next li b { color: var(--brand-ink); }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 15px; min-height: 44px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.small { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

.rules li { margin-bottom: 10px; }
table.data { border-collapse: collapse; width: 100%; background: var(--card); font-size: 15px; }
table.data th, table.data td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
table.data.small { font-size: 13px; }
.scroll { overflow-x: auto; }
iframe.mail { width: 100%; height: 900px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.devform label { display: block; margin-bottom: 12px; font-weight: 600; }

.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(0,0,0,.12); padding: 16px; z-index: 10; max-height: 85vh; overflow-y: auto; }
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { margin: 0 0 6px; font-size: 18px; }
.cookie-banner p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.cookie-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.cookie-buttons .btn { width: 100%; padding: 11px 12px; }
.cookie-buttons [data-cookie-more] { grid-column: 1 / -1; padding: 8px 12px; }   /* phones: a compact banner */
/* Tiny screens: the header's "Browse all coaches" would push the page sideways; it's in the footer too. */

.cookie-cat { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); padding: 10px 0; border-top: 1px solid var(--line); }
.cookie-cat strong { color: var(--ink); }
.cookie-cat input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
@media (min-width: 900px) {
  .cookie-banner { padding: 16px 24px; }
  .cookie-summary:not([hidden]) { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; column-gap: 32px; align-items: center; }
  .cookie-summary h2 { grid-column: 1; }
  .cookie-summary p { grid-column: 1; margin: 0; }
  /* Same as the main site on desktop: More options · No thanks · Agree, compact buttons, grey heading. */
  .cookie-summary .cookie-buttons { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: row-reverse; margin: 0; }
  .cookie-summary .cookie-buttons .btn { width: auto; min-width: 128px; min-height: 42px; padding: 8px 18px; font-size: 15px; font-weight: 600; border-radius: 4px; }
  .cookie-summary .cookie-buttons .btn.secondary { border-color: var(--line); color: var(--brand-ink); }
  .cookie-summary h2 { font-weight: 600; color: var(--muted); }
  .cookie-summary p { font-size: 16px; }
  .cookie-options { max-width: 720px; margin: 0 auto; }
  .cookie-options .cookie-buttons { display: flex; }
  .cookie-options .cookie-buttons .btn { width: auto; min-width: 160px; }
}
.devbar.live { background: #fde8e8; color: #8a1c1c; }
.devbar.staff { background: #e4effb; color: #0c3868; border-bottom: 1px solid #c9ddf5; }   /* staff view in production */

/* "See profile" pop-up */
dialog.profile { width: min(680px, 100vw); max-width: 100vw; max-height: 100dvh; height: 94dvh; padding: 0; border: 0; border-radius: 16px 16px 0 0; margin: auto auto 0; background: var(--card); color: var(--ink); display: none; flex-direction: column; }
dialog.profile[open] { display: flex; }
dialog.profile::backdrop { background: rgba(0, 27, 48, .55); }
@media (min-width: 700px) { dialog.profile { margin: auto; border-radius: 16px; height: 88dvh; max-height: 88dvh; } }
dialog.profile [data-profile-body] { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.profile-body { flex: 1; }
.profile-body section p, .profile-body details p { margin: 0 0 12px; line-height: 1.6; }
.profile-head { display: flex; gap: 14px; align-items: flex-start; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.profile-head .photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; background: var(--brand-tint); }
.profile-head h2 { margin: 0 0 2px; font-size: 19px; }
.profile-head p { margin: 0; color: var(--muted); font-size: 15px; }
.profile-head > div { min-width: 0; }
.profile-head .close { margin-left: auto; background: none; border: 0; font-size: 30px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.profile-body { overflow-y: auto; overflow-x: hidden; padding: 4px 16px 16px; font-size: 16px; overflow-wrap: anywhere; }  /* coaches paste long URLs */
.profile-body .excerpt { font-size: 17px; color: var(--ink); }
.profile-body section { border-top: 1px solid var(--line); padding-top: 4px; margin-top: 12px; }
.profile-body h3 { font-size: 17px; color: var(--brand-ink); margin: 12px 0 6px; }
.profile-body .source { font-size: 14px; color: var(--muted); margin-top: 16px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { max-width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 14px; }
.chips li.match { background: var(--brand-tint); border-color: var(--brand-tint-border); color: var(--brand-dark); font-weight: 600; }
.profile-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
.profile-foot .btn { width: 100%; }
.loading { padding: 24px 16px; color: var(--muted); }
.profile-body details.more { border-top: 1px solid var(--line); margin-top: 12px; }
.profile-body details.more summary { cursor: pointer; font-size: 17px; color: var(--brand-ink); font-weight: 600; padding: 12px 0 6px; list-style: none; }
.profile-body details.more summary::-webkit-details-marker { display: none; }
.profile-body details.more summary::after { content: " +"; color: var(--brand); }
.profile-body details.more[open] summary::after { content: " –"; }
.chips li.more-count { background: none; border-color: transparent; color: var(--muted); }

.layout-switch { font-weight: 600; }

/* Trust signals (main-site wording) */
.ic { width: 20px; height: 20px; flex: none; }
.signals { list-style: none; padding: 0; margin: -4px 0 22px; display: grid; gap: 8px; }
.signals li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--ink); }
.signals a { color: var(--ink); text-decoration-color: var(--brand-tint-border); text-underline-offset: 3px; }
.badge { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 2px; font-size: 14px; font-weight: 600; color: var(--brand-dark); text-decoration: none; }
.badge .ic { width: 16px; height: 16px; }
.i-brand { fill: var(--brand); }
.i-accent { fill: var(--brand-accent); }
.stepnav { margin: -8px 0 14px; font-size: 15px; font-weight: 600; }
.stepnav a { display: inline-block; padding: 8px 0; text-decoration: none; }
.stepnav a:hover { text-decoration: underline; }

/* Trust strip: three small boxes below the main action */
.trust-strip { list-style: none; padding: 0; margin: 28px 0 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trust-strip li > a, .trust-strip .tbox { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; padding: 12px 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--ink); text-decoration: none; }
.trust-strip li > a:hover { border-color: var(--brand-tint-border); }
.trust-strip .ic { width: 24px; height: 26px; }
.trust-strip img { height: 30px; width: auto; }

/* ---------- Designs A–D have their own /assets/css/design-{x}.css ---------- */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.layout-switch a, .layout-switch b { white-space: nowrap; }

/* Location box: suggestions + "Use my location" */
.loc-wrap { position: relative; display: block; }
.loc-wrap.has-btn input { padding-right: 46px; }
.loc-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--brand); display: grid; place-items: center; cursor: pointer; }
.loc-btn:hover { background: var(--brand-tint); }
.loc-btn.busy svg { animation: loc-pulse 1s ease-in-out infinite; }
@keyframes loc-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .loc-btn.busy svg { animation: none; } }
.loc-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; list-style: none; margin: 0; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 41, 71, .12); min-width: 240px; font-size: 16px; line-height: 1.3; }
.loc-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 8px; cursor: pointer; }
.loc-list li b { font-weight: 600; color: var(--brand-ink); }
.loc-list li span { color: var(--muted); font-size: 14px; text-align: right; }
.loc-list li[aria-selected="true"], .loc-list li:hover { background: var(--brand-tint); }

/* Topic search (public/assets/js/topic-search.js): same look as the location suggestions. The list is placed in the
   container a design passes (listParent, which should be position: relative); designs can restyle it. */
.gs-topic-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; list-style: none; margin: 0; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 41, 71, .12); min-width: 240px; max-height: 330px; overflow-y: auto; font-size: 16px; line-height: 1.3; }
.gs-topic-list.up { top: auto; bottom: calc(100% + 4px); }
.gs-topic-list[hidden] { display: none; }
.gs-topic-list li[role=option] { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 8px; cursor: pointer; }
.gs-topic-list li b { font-weight: 400; color: var(--brand-ink); }
.gs-topic-list li mark { background: none; color: inherit; font-weight: 600; }
.gs-topic-list li span { color: var(--muted); font-size: 14px; text-align: right; }
.gs-topic-list li[aria-selected="true"], .gs-topic-list li[role=option]:hover { background: var(--brand-tint); }
.gs-topic-list .gs-topic-head { padding: 8px 12px 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.gs-topic-list .gs-topic-none { padding: 11px 12px; color: var(--muted); font-size: 15px; }
.loc-note { display: block; font-size: 14px; color: var(--muted); margin-top: 6px; }
.loc-note:empty { display: none; }

/* Classic and the plain pages (privacy, how we choose, admin): header and footer on the same 1080px page
   column as Horizon and Sentence, so nothing jumps when moving between them. */
body.design-classic, body.page-info { --page-max: 1080px; }
.design-classic footer.site, .page-info footer.site { max-width: var(--page-max); }
@media (min-width: 1000px) {
  .design-classic header.site, .page-info header.site { padding-left: calc(max(0px, (100% - var(--page-max)) / 2) + 16px); padding-right: calc(max(0px, (100% - var(--page-max)) / 2) + 16px); }   /* same as Sentence */
}

/* Wide pages (designs with three-across results) and the desktop footer, shared by every design. */
body.wide main, body.wide footer.site { max-width: var(--page-max, 1120px); }
@media (min-width: 960px) {
  footer.site { display: grid; grid-template-columns: 1.4fr 1fr auto; column-gap: 32px; align-items: start; padding-left: 24px; padding-right: 24px; }
  footer.site .f-top { display: contents; }
  footer.site .f-links { grid-template-columns: 1fr; gap: 8px; }
  footer.site .f-family { grid-column: 3; grid-row: 1; margin: 0; padding: 0; border: 0; }
  footer.site .f-legal { grid-column: 1 / -1; }
  footer.site .f-legal:first-of-type { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
}
.lede-note { color: var(--muted); font-size: 15px; margin: -4px 0 12px; }

/* Privacy table: three columns on wider screens, stacked with labels on phones. */
@media (max-width: 599px) {
  table.privacy, table.privacy tbody, table.privacy tr, table.privacy td { display: block; width: 100%; }
  table.privacy tr:first-child { display: none; }
  table.privacy tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: var(--card); }
  table.privacy td { border: 0; padding: 4px 12px; }
  table.privacy td:first-child { padding-top: 10px; font-weight: 600; color: var(--brand-ink); }
  table.privacy td:last-child { padding-bottom: 10px; }
  table.privacy td[data-label="Legal basis"]::before { content: "Legal basis: "; font-weight: 600; }
}
