/* BFS site tokens (2026-11-19). One place for the values that must stay the same everywhere.
   Rules: use these variables for new UI; never hand-type a colour, radius, shadow or label style.
   Guide: sites/bfs-main/STYLEGUIDE.md */
:root{
  /* colour */
  --bfs-ink:#111214;          /* headings, primary text, selected state */
  --bfs-text:#4a4d52;         /* body copy */
  --bfs-muted:#5E6369;        /* secondary text, unselected tabs */
  --bfs-faint:#9DA2A8;        /* captions, inactive labels */
  --bfs-line:#e2e2df;         /* borders, dividers */
  --bfs-line-soft:rgba(16,24,40,.10); /* chip outlines */
  --bfs-surface:#fff;
  --bfs-page:#f6f6f4;
  --bfs-blue:#0058F6;         /* brand blue: primary buttons, highlighted words, active tab text */
  --bfs-blue-wash:rgba(0,88,246,.08); /* active tab / number badge fill */
  --bfs-gold:#F5B301;         /* review stars only */

  /* radius */
  --bfs-r-chip:10px;          /* chips, stage pills, toggles' inner buttons, Contra chips */
  --bfs-r-btn:12px;           /* buttons */
  --bfs-r-card:16px;          /* cards, panels, image frames */
  --bfs-r-pill:999px;         /* only tab bars (tool stack groups) */

  /* shadow */
  --bfs-sh-btn:0 1px 2px rgba(17,18,20,.04),0 6px 16px -8px rgba(17,18,20,.10);
  --bfs-sh-raised:0 0 0 1px rgba(16,24,40,.08),0 1px 2px rgba(16,24,40,.08),0 4px 12px -6px rgba(16,24,40,.25);
  --bfs-sh-frame:0 0 0 1px rgba(17,18,20,.10),0 24px 44px -24px rgba(20,22,24,.28);

  /* type */
  --bfs-label-size:11px;      /* mono uppercase labels */
  --bfs-label-track:.08em;
  --bfs-h3-part:40px;         /* service part headings, "Every request, handled." */

  /* spacing */
  --bfs-sec-gap:200px;        /* visible gap between sections (PC) */
  --bfs-head-gap:80px;        /* section heading to its content (PC) */
}
@media (max-width:900px){
  :root{ --bfs-h3-part:21.22px; --bfs-sec-gap:100px; --bfs-head-gap:32px; }
}

/* ---------- components that must match everywhere ---------- */

/* Secondary button: white, 1px border, soft shadow. Same in hero, closing CTA, cards. */
html body .btn--ghost{
  background:var(--bfs-surface)!important;
  color:var(--bfs-ink)!important;
  border:1px solid var(--bfs-line)!important;
  box-shadow:var(--bfs-sh-btn)!important;
}
html body .btn--ghost:hover{ border-color:#cfcfcb!important; }

/* Chips (stage pills, Contra chips): 10px corners, soft outline; selected = white raised */
html body #pricing .fit button,
html body .chip--contra{ border-radius:var(--bfs-r-chip)!important; }
html body #pricing .fit button[aria-pressed=true]{ background:var(--bfs-surface)!important; color:var(--bfs-ink)!important; box-shadow:var(--bfs-sh-raised)!important; }

/* Browser-frame titles: always centred on the whole bar, whatever sits left (dots) or right */
html body .ms__bar,html body .pv__chrome{position:relative} /* no :has() here: page-wide :has() re-checks the whole page on every change (scroll jank) */
html body .ms__bar > span{position:absolute;left:50%;transform:translateX(-50%);margin:0;white-space:nowrap}
html body .pv__url{position:absolute;left:50%;transform:translateX(-50%);margin:0}

/* Image frames: the outline sits on the rounded frame, never on a square inner box (square corners poke out) */
html body .rs .ms{box-shadow:none!important}
html body .rs__front{box-shadow:var(--bfs-sh-frame)!important;border-radius:var(--bfs-r-card)!important}

/* Touch: no blue tap flash or tap focus ring anywhere; keyboard focus ring stays */
html,html *{-webkit-tap-highlight-color:transparent}
html body :focus:not(:focus-visible){outline:none!important}

/* Phone work rows: opening keeps the screenshot where it is (no jump); the panel only adds the quote + buttons */
@media (max-width:900px){
  html body #ledger .lrow.is-open .lc--img{display:block!important}
  html body #ledger .lrow__in > .gal{display:none!important}
}

/* Phone process card: small centred icon button in the header (44px tap area kept invisibly) */
@media (max-width:900px){
  html body .app__bar{align-items:center!important}
  html:root body #kbApp .app__open{position:relative;width:30px!important;height:30px!important;min-height:0!important;margin:0 0 0 auto!important;border-radius:8px!important;display:grid!important;place-items:center!important;flex:none}
  html body .app__open svg{width:14px!important;height:14px!important}
  html body .app__open::after{content:"";position:absolute;inset:-7px}
}

/* No how-to copy on the site (Sam 2026-11-19): the hero tap hint is gone */
html body .hero__stage::after{content:none!important;display:none!important}

/* One corner for every button, incl. nav CTA, drawer CTA and the phone menu button (no circles/pills) */
html body .btn, html:root body #nav .nav__drawer-cta.btn, html body #nav .nav__menu{border-radius:var(--bfs-r-btn)!important}

/* /work on phone (Sam 2026-11-19) */
@media (max-width:900px){
  /* client pill bar: clear air below the nav, and pills follow the 12px corner rule */
  html body .wx-mbar__row{padding:20px 16px 14px!important}
  html body .wx-mchip, html body .wx-mbar__row button{border-radius:var(--bfs-r-btn)!important}
  /* facts card: rows breathe, last row never touches the card edge */
  html body .wx-facts{padding-bottom:6px!important}
  html body .wx-fact{padding:12px 16px!important;align-items:start!important}
  /* captions on screenshots: tiny label, never in the way of the work */
  html body .wx-tile .wx-tile__foot{height:auto!important;min-height:0!important;padding:3px 6px 3px 8px!important;gap:4px!important;border-radius:6px!important;left:8px!important;bottom:8px!important;max-width:calc(100% - 16px)!important}
  html body .wx-tile .wx-tile__foot, html body .wx-tile .wx-tile__foot *{font-size:10.5px!important;line-height:1.3!important}
  html body .wx-tile .wx-tile__foot svg{width:10px!important;height:10px!important}
}
html body .cc button{border-radius:var(--bfs-r-btn)!important}

/* /work on phone: no search button; nav slides away on scroll down and back on scroll up (client bar follows) */
@media (max-width:900px){
  html body .wx-msearch-btn{display:none!important}
  html body .wx-mchips{padding-right:0!important}
  html body.wx-page #nav, html body.wx-page .wx-mbar{transition:transform .32s cubic-bezier(.22,1,.36,1)!important}
  html.nav-up body.wx-page #nav{transform:translateY(-100%)!important}
  html.nav-up body.wx-page .wx-mbar{transform:translateY(-60px)!important}
}

/* /work phone viewer: thumbnail strip under the big image */
.wx-lb__thumbs{display:none}
@media (max-width:960px){
  html body .wx-lb__thumbs{display:flex;gap:8px;position:absolute;left:0;right:0;bottom:calc(16px + env(safe-area-inset-bottom));padding:4px 16px;overflow-x:auto;scrollbar-width:none;z-index:5;-webkit-overflow-scrolling:touch}
  html body .wx-lb__thumbs::-webkit-scrollbar{display:none}
  html body .wx-lb__thumbs button{flex:none;width:84px;aspect-ratio:16/10;padding:0;border:0;border-radius:8px;overflow:hidden;background:#fff;opacity:.6;box-shadow:0 0 0 1px rgba(16,24,40,.12);transition:opacity .2s,box-shadow .2s}
  html body .wx-lb__thumbs button.is-on{opacity:1;box-shadow:0 0 0 2px var(--bfs-blue)}
  html body .wx-lb__thumbs img{width:100%;height:100%;object-fit:cover;display:block}
}
