/* Ledger Rounded: tokens, fonts, header, footer and the phone call bar.
 *
 * This file is on EVERY page. It holds no page-wide resets (no *, body, h1, p, a rules), so it can sit
 * after the older stylesheets on the pages that keep their own content styles (the case studies, the
 * problem pages, the legal pages) and only change the colours, the fonts and the header and footer.
 * The page bodies that were redrawn in this look also load assets/ledger.css, which adds the resets
 * and the layout parts.
 *
 * Dark is the default. The light theme is one click away (the switch in the header), and a saved
 * choice is kept by assets/theme.js. Approved by Jacob on 10 to 11 November 2026 from the Ledger
 * Rounded whole-site mockup. */

@font-face{font-family:'Chakra Petch';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/chakra-petch-500-latin.woff2') format('woff2')}
@font-face{font-family:'Chakra Petch';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/chakra-petch-600-latin.woff2') format('woff2')}
@font-face{font-family:'Chakra Petch';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/chakra-petch-700-latin.woff2') format('woff2')}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400 700;font-display:swap;src:url('/assets/fonts/ibm-plex-sans-400-700-latin.woff2') format('woff2')}
@font-face{font-family:'IBM Plex Sans';font-style:italic;font-weight:400;font-display:swap;src:url('/assets/fonts/ibm-plex-sans-italic-400-latin.woff2') format('woff2')}

:root,:root[data-theme="dark"]{
  --font-d:'Chakra Petch','Segoe UI',system-ui,sans-serif;
  --font-b:'IBM Plex Sans','Segoe UI',system-ui,sans-serif;
  --font-m:'Chakra Petch','Segoe UI',system-ui,sans-serif;
  color-scheme:dark;
  /* The site's own dark palette and glass (colours as in the glass redesign of 1 October 2026). */
  --bg:oklch(0.14 0.02 215); --bg-2:oklch(0.128 0.016 220); --panel:oklch(0.205 0.020 220); --panel-2:oklch(0.245 0.022 220); --line:oklch(0.305 0.020 215);
  --ink:oklch(0.965 0.006 200); --muted:oklch(0.84 0.012 210); --accent:oklch(0.82 0.135 188); --btn:oklch(0.79 0.135 188); --btn-ink:oklch(0.19 0.043 194);
  --deep:oklch(0.245 0.050 245); --deep-ink:oklch(0.975 0.008 200); --deep-muted:oklch(0.91 0.016 200);
  --glow:oklch(0.79 0.135 188 / 0.10); --rib:oklch(0.45 0.10 250 / .40); --warn:#e9b45e; --ok:oklch(0.82 0.090 165);
  --glass:rgb(255 255 255 / .065); --glass-edge:rgb(255 255 255 / .17); --glass-shadow:0 22px 50px -24px rgb(0 0 0 / .65);
  --blob-a:oklch(0.50 0.10 190 / .55); --blob-b:oklch(0.40 0.11 250 / .5); --blob-c:oklch(0.45 0.10 165 / .45);
}
:root[data-theme="light"]{
  color-scheme:light;
  --bg:#f2f7f7; --bg-2:#e6eff0; --panel:#ffffff; --panel-2:#f6fafa; --line:#c6d6d8;
  --ink:#0f2429; --muted:#45606a; --accent:#006560; --btn:#00706a; --btn-ink:#ffffff;
  --glow:rgba(0,112,106,.10); --rib:rgba(30,110,175,.22); --warn:#7a5000; --ok:#0a6b3c;
  --glass:rgb(255 255 255 / .62); --glass-edge:rgb(15 36 41 / .13); --glass-shadow:0 18px 40px -26px rgb(15 36 41 / .3);
  --blob-a:oklch(0.86 0.07 190 / .55); --blob-b:oklch(0.86 0.06 250 / .45); --blob-c:oklch(0.88 0.07 165 / .4);
}

/* The older pages use their own token names. Mapping them onto the Ledger palette is what makes the
   pages that were not redrawn (case studies, problem pages, legal pages) sit in the same look. */
:root,:root[data-theme="dark"],:root:not([data-theme="light"]){
  --surface:var(--panel); --surface-sunk:var(--bg-2); --ink-soft:var(--muted); --ink-mid:oklch(0.90 0.010 210);
  --brand:var(--deep); --brand-deep:#0d2438; --on-brand:var(--deep-ink); --on-brand-soft:var(--deep-muted); --brand-line:#2f6286;
  --signal:var(--btn); --signal-ink:var(--btn-ink); --signal-text:var(--accent); --on-accent:var(--btn-ink);
  --success:var(--ok); --display:var(--font-d); --body:var(--font-b);
}
:root[data-theme="light"]{
  --surface:var(--panel); --surface-sunk:var(--bg-2); --ink-soft:var(--muted); --ink-mid:#33505a;
  --brand:#12304a; --brand-deep:#0d2438; --on-brand:#eef6f6; --on-brand-soft:#c3d6e0; --brand-line:#2f6286;
  --signal:var(--btn); --signal-ink:var(--btn-ink); --signal-text:var(--accent); --on-accent:var(--btn-ink);
  --success:var(--ok); --display:var(--font-d); --body:var(--font-b);
}

/* ---------- the top bar ---------- */
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:30;background:var(--bg-2);pointer-events:none}
.lg-top{position:sticky;top:calc(env(safe-area-inset-top,0px) + 10px);z-index:50;margin:12px auto 0;width:min(1240px,calc(100% - 32px));font-family:var(--font-b);font-size:17px;line-height:1.6}
.lg-top *,.lg-top *::before,.lg-top *::after{box-sizing:border-box}
.lg-bar{position:relative;min-height:60px;border-radius:999px;background:var(--panel);background:color-mix(in srgb,var(--panel) 90%,transparent);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 8px 0 24px;gap:14px}
.lg-wm{font:600 1.25rem/1 var(--font-d);letter-spacing:-.01em;color:var(--ink);text-decoration:none;white-space:nowrap}
.lg-wm i{font-style:normal;color:var(--accent)}
.lg-nav{display:flex;gap:6px;font-size:.92rem;flex:1;margin-left:10px;align-items:center}
.lg-nav a,.lg-nav button.lg-nv{color:var(--muted);text-decoration:none;padding:.5em .85em;border-radius:999px;border:0;background:transparent;cursor:pointer;font:inherit;line-height:1.4}
.lg-nav a:hover,.lg-nav button.lg-nv:hover,.lg-nav a:focus-visible,.lg-nav button.lg-nv:focus-visible{color:var(--ink);background:var(--panel-2)}
.lg-nav .on{color:var(--ink);background:var(--panel-2)}
.lg-navi{position:relative}
.lg-dd{position:absolute;top:calc(100% + 18px);left:-12px;width:340px;background:var(--panel);border:1px solid var(--line);border-radius:24px;padding:10px;display:grid;gap:2px;box-shadow:0 30px 60px -30px rgba(0,0,0,.6)}
.lg-dd[hidden]{display:none}
.lg-nav .lg-dd a{display:grid;gap:2px;border-radius:16px;padding:.7em .9em;color:var(--ink)}
.lg-dd small{color:var(--muted);font-size:.84rem}
.lg-phone{font:500 .9rem var(--font-m);color:var(--muted);text-decoration:none;white-space:nowrap}
.lg-phone:hover,.lg-phone:focus-visible{color:var(--ink)}
.lg-theme{flex:none;width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:transparent;color:var(--ink);cursor:pointer;display:inline-grid;place-items:center;padding:0}
.lg-theme:hover,.lg-theme:focus-visible{background:var(--panel-2)}
.lg-theme svg,.lg-link img{width:18px;height:18px}
.lg-link img{display:block}
/* Sun turns into moon (item 18, 12 November 2026): one icon. In the dark theme it is a moon (a full disc with a bite masked
   out of it); in the light theme the disc shrinks to a sun, the bite slides away and the rays turn in. Transforms only, so
   every browser draws both ends correctly; less motion swaps it instantly. The mask's white and black live here because
   this is the one sheet allowed colour literals. */
.lg-sm{overflow:visible}
.lg-sm-keep{fill:#fff}.lg-sm-bite{fill:#000}
.lg-sm-body{fill:currentColor}
.lg-sm-rays{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.lg-sm-body,.lg-sm-bite,.lg-sm-rays{transform-box:fill-box;transform-origin:center;transition:transform .55s cubic-bezier(.16,1,.3,1),opacity .35s ease}
.lg-sm-rays{opacity:0;transform:rotate(-60deg) scale(.4)}
:root[data-theme="light"] .lg-sm-body{transform:scale(.5)}
:root[data-theme="light"] .lg-sm-bite{transform:translate(9px,-9px)}
:root[data-theme="light"] .lg-sm-rays{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.lg-sm-body,.lg-sm-bite,.lg-sm-rays{transition:none}}
a.lg-btn,button.lg-btn,.lg-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5em;font:600 .92rem/1 var(--font-d);padding:.75em 1.15em;border-radius:999px;background:var(--btn);color:var(--btn-ink);border:0;cursor:pointer;text-decoration:none;white-space:nowrap;transition:transform .2s cubic-bezier(.16,1,.3,1),filter .2s}
.lg-btn:hover{transform:translateY(-2px);filter:brightness(1.06);color:var(--btn-ink)}
.lg-menuwrap{display:none}
.lg-menuwrap>summary{list-style:none;cursor:pointer;border:1px solid var(--line);background:transparent;border-radius:999px;padding:.55em 1em;font:500 .92rem var(--font-d);color:var(--ink)}
.lg-menuwrap>summary::-webkit-details-marker{display:none}
.lg-sheet{position:absolute;left:0;right:0;top:calc(100% + 10px);background:var(--panel);border:1px solid var(--line);border-radius:28px;padding:14px;display:grid;gap:2px;box-shadow:0 30px 60px -30px rgba(0,0,0,.6);max-height:70vh;overflow:auto}
.lg-sheet a{padding:.75em .9em;border-radius:16px;text-decoration:none;color:var(--ink);font:500 1.02rem var(--font-d)}
.lg-sheet a:hover,.lg-sheet a.on{background:var(--panel-2)}
.lg-sheet .lg-lab{padding:.6em .9em .2em;font:500 .74rem var(--font-m);letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.lg-skip{position:absolute;left:-9999px;top:auto}
.lg-skip:focus{left:16px;top:16px;z-index:99;background:var(--btn);color:var(--btn-ink);padding:.6em 1em;border-radius:999px;text-decoration:none;font:600 1rem var(--font-d)}
.lg-top :focus-visible,.lg-foot :focus-visible,.lg-mcta :focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:6px}

/* ---------- the footer ---------- */
.lg-foot{width:100%;max-width:1240px;margin:28px auto 0;padding:0 max(20px,env(safe-area-inset-left,0px));font-family:var(--font-b);font-size:17px;line-height:1.6;color:var(--ink)}
.lg-foot *,.lg-foot *::before,.lg-foot *::after{box-sizing:border-box}
.lg-foot-card{border:1px solid var(--line);border-radius:32px;background:var(--panel);padding:clamp(22px,3.4vw,40px);display:grid;grid-template-columns:1.3fr 1fr 1fr 1fr;gap:28px}
.lg-foot h2{font:500 .74rem var(--font-m);letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 10px}
.lg-foot a{display:block;color:var(--ink);text-decoration:none;padding:3px 0;font-size:.95rem}
.lg-foot a:hover,.lg-foot a:focus-visible{color:var(--accent)}
.lg-foot p{margin:0;font-size:.9rem;color:var(--muted)}
.lg-foot .lg-wm{display:inline-block;padding:0;font-size:1.25rem;color:var(--ink)}
.lg-foot .lg-wm:hover{color:var(--ink)}
.lg-foot-brand p{margin-top:10px}
.lg-foot-brand a{display:inline;padding:0;font-size:inherit;color:var(--ink)}
.lg-listed{border:1px solid var(--line);border-radius:24px;background:var(--panel);padding:14px 22px;margin-top:14px;display:flex;flex-wrap:wrap;gap:6px 20px;align-items:center}
.lg-listed h2{margin:0}
.lg-listed ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 18px}
.lg-listed a{display:inline;padding:0;color:var(--muted);font-size:.88rem}
.lg-listed a:hover{color:var(--accent)}
.lg-foot-legal{padding:18px 0 36px;color:var(--muted);font-size:.85rem;display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px 24px}
.lg-foot-legal span{color:var(--muted)}
.lg-foot-legal nav{display:flex;flex-wrap:wrap;gap:4px 18px}
.lg-foot-legal a{display:inline;padding:0;color:var(--muted);font-size:.85rem}
.lg-foot-legal a:hover{color:var(--accent)}
.lg-mcta{display:none}

/* ---------- phones and narrow windows ---------- */
@media (max-width:860px){
  .lg-nav,.lg-phone,.lg-bar>.lg-btn{display:none}
  .lg-menuwrap{display:block}
  .lg-foot-card{grid-template-columns:1fr 1fr}
  .lg-foot-brand{grid-column:1/-1}
  .lg-foot-card>div:nth-child(2){display:none}
  .lg-mcta{display:flex;gap:10px;position:sticky;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:30;margin:0 auto 12px;width:calc(100% - 32px);padding:8px;border-radius:999px;background:var(--panel);background:color-mix(in srgb,var(--panel) 92%,transparent);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border:1px solid var(--line);box-shadow:0 14px 40px -14px rgba(0,0,0,.6)}
  .lg-mcta a{flex:1 1 0;min-width:0;display:inline-flex;align-items:center;justify-content:center;text-align:center;padding:.7em .5em;border-radius:999px;font:600 .9rem/1.15 var(--font-d);text-decoration:none}
  .lg-mcta a:first-child{background:var(--btn);color:var(--btn-ink)}
  .lg-mcta a+a{color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--line)}
  .lg-nocta .lg-mcta{display:none}
}
@media (max-width:520px){.lg-foot-card{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.lg-btn,.lg-top *{transition:none!important}}

/* Keyboard focus on a toolbar control must not scroll the page (audit, 9 October 2026, kept for the Ledger toolbar).
   The toolbar is sticky and sits inside the page's scroll-padding-top, so focusing one of its links from mid-page
   (Shift+Tab back up) scrolled the page up to clear the padding. A scroll margin equal and opposite to the padding
   cancels it. The padding is one custom property, --page-scroll-pad, so the two can never disagree. */
.lg-top :is(a,button,summary){scroll-margin-top:calc(-1 * var(--page-scroll-pad,96px))}

/* ---------- 44px tap targets on phones (final audit pass, 9 October 2026, redone for the Ledger toolbar and footer) ----------
   A live sweep at 390 wide found the wordmark (20px tall), the light and dark switch (40px), the Menu button (37px),
   every footer link (30px or less) and the call bar buttons (43px) under 44px. Same phone query the older sheets use. */
.lg-mcta a{min-height:44px}
@media (max-width:640px), (pointer:coarse) and (max-width:1024px){
  .lg-wm{display:inline-flex;align-items:center;min-height:44px}
  .lg-theme{width:44px;height:44px}
  .lg-menuwrap>summary{display:inline-flex;align-items:center;min-height:44px;padding-block:0}
  .lg-sheet a{display:flex;align-items:center;min-height:44px}
  .lg-foot-card a{display:flex;align-items:center;min-height:44px;padding:0}
  .lg-foot-brand a{display:inline-flex;align-items:center;min-height:44px;padding:0}
  .lg-foot .lg-wm{display:inline-flex}
  .lg-listed a,.lg-foot-legal a{display:inline-flex;align-items:center;min-height:44px;padding:0}
}
.lg-link{text-decoration:none}
@media (max-width:860px){.lg-bar>.lg-link{display:none}}

/* check-improvement-ideas-part1.cjs: between 861px (where the Menu sheet turns into the full toolbar) and about 940px the
   toolbar was 25 to 64px wider than the window, which pushed "Request a free chat" off the right edge and made the page
   scroll sideways. Tighten the gaps and link padding in that band only, so every link, the phone number and the button fit. */
@media (min-width:861px) and (max-width:980px){
  .lg-bar{gap:8px;padding-left:16px}
  .lg-nav{gap:0;margin-left:2px}
  .lg-nav a,.lg-nav button.lg-nv{padding:.5em .5em}
  .lg-phone{font-size:.8rem}
  .lg-wm{font-size:1.1rem}
}

/* ===== Raised cards (Jacob picked look 4 of 5, 12 November 2026) =====
   The glow and the circuit board come from the site's own glass.css and glass.js, as on every other page, and stay on
   screen all the way down. Cards are no longer see-through glass: each is a slightly lighter solid card with a soft
   shadow, like a card sitting on the page. No live blur, no tint, nothing re-drawn as the page scrolls. */
html.bp-past-top .bp-circuit{opacity:1}
:root{--raise-shadow:0 18px 36px -22px rgb(0 0 0 / .85),inset 0 1px 0 color-mix(in oklch,var(--ink) 10%,transparent)}
:root[data-theme="light"]{--raise-shadow:0 18px 36px -24px rgb(15 36 41 / .35),inset 0 1px 0 rgb(255 255 255 / .9)}
body.lg .cell:not(.tone-deep):not(.tone-accent):not(.tone-calm),
body.lg .plans-wrap,body.lg .work,body.lg .cmp,body.lg .facts,body.lg .trust,
body.lg .box,body.lg .tone-sunk,body.lg .pcol,body.lg .lg-foot-card,body.lg .lg-listed,body.lg .runbox,
.bp-glass.bp-glass.bp-glass{
  background:linear-gradient(var(--panel-2),var(--panel));
  border:1px solid color-mix(in oklch,var(--ink) 9%,var(--line));box-shadow:var(--raise-shadow)}
body.lg .pcol.hl{border-color:var(--accent)}
/* Chakra Petch is wider than the type this layout was drawn in: a little less tracking and a smaller top headline. */
body.lg .hx{font-size:clamp(2rem,5.2vw,3.9rem);letter-spacing:-.02em}
body.lg .h1p{font-size:clamp(1.9rem,4.4vw,3.2rem);letter-spacing:-.02em}
body.lg .sub2,body.lg .rl h2,body.lg .sp h3,body.lg .cell h2,body.lg .cell h3,body.lg .band h2,body.lg .quote q,body.lg .pcol h3,body.lg .tl b{letter-spacing:-.01em}
body.lg .band h2{font-size:clamp(1.8rem,4.4vw,3.2rem)}
body.lg .lab,body.lg .crumb,body.lg .tag,body.lg .pill{letter-spacing:.08em}
/* Re-theme touch-ups, 11 November 2026 */
body.lg .dot{border-color:color-mix(in oklch,var(--ink) 45%,transparent)}
.lg-wm{word-spacing:.14em}.lg-wm i{padding-inline:.08em}

/* The real logo (11 November 2026): the dark-ground file in the dark theme, the other in the light theme. */
.lg-wm{display:inline-flex;align-items:center}
.lg-logo{display:block;width:176px;height:auto}
.lg-foot .lg-logo{width:190px}
.lg-logo-dark{display:block}.lg-logo-light{display:none}
:root[data-theme="light"] .lg-logo-dark{display:none}
:root[data-theme="light"] .lg-logo-light{display:block}
@media (max-width:860px){.lg-logo{width:140px}}
/* Icons in the Services menu and phone sheet */
.lg-dd a{grid-template-columns:2em 1fr;column-gap:.4em;align-items:center}
.lg-dd a .ico{grid-row:1 / span 2;color:var(--accent);width:1.4em;height:1.4em}
.lg-sheet a .ico{color:var(--accent);margin-right:.5em;width:1.25em;height:1.25em}
.lg-listed a svg,.lg-listed a img{display:inline-block;vertical-align:-.25em;margin-right:.4em}
/* Light theme: teal used as text on pale cards needs the darker teal, so small words keep 4.5:1 and big numbers 3:1 (12 November 2026). */
:root[data-theme="light"] .roi-out .big{color:oklch(0.82 0.135 188)}
:root[data-theme="light"] .case-content .outcome-glance .gk b{color:oklch(0.82 0.135 188);border-color:color-mix(in oklch,oklch(0.82 0.135 188) 60%,transparent)}

/* Home page only (body.lg-home, assets/ledger-home.css): the bright button colour is for the main buttons, so the call bar's
   first button gets the same thin ring in the light theme as the others, and the bar itself waits until the first-screen
   buttons have scrolled out of view and steps aside while the enquiry box is on screen
   (assets/ledger-home.js sets body.mcta-managed once it is watching, and body.mcta-on when the bar should show). Without
   the script the bar is simply always there, as on every other page. */
.lg-home .lg-mcta a:first-child{box-shadow:inset 0 0 0 1.5px var(--cta-ring,transparent)}
@media (max-width:860px){
  /* The bar is revealed from the bottom edge upwards with a clip, not moved with a transform: a moved bar made the hidden state
     82px taller than the page (check-layout.cjs), and a clip changes only what is painted. The negative edges keep its shadow. */
  body.lg-home.mcta-managed .lg-mcta{clip-path:inset(100% -24px -40px -24px round 999px);opacity:0;visibility:hidden;pointer-events:none;transition:clip-path .35s cubic-bezier(.16,1,.3,1),opacity .25s,visibility 0s .35s}
  body.lg-home.mcta-managed.mcta-on .lg-mcta{clip-path:inset(-40px -24px -40px -24px);opacity:1;visibility:visible;pointer-events:auto;transition:clip-path .35s cubic-bezier(.16,1,.3,1),opacity .25s,visibility 0s}
}
@media (prefers-reduced-motion:reduce){body.lg-home .lg-mcta{transition:none!important}}

/* Home page colour (assets/ledger-home.css): the bright cyan, with navy words (6.2 to 1; white on it would be 2.8 to 1), is for the
   main "Request a free chat" buttons only. Everything that used the turquoise accent on this page (links, option titles, icons,
   status pills, focus rings, the website check card) uses the ink colour instead. Other pages keep the turquoise. */
body.lg-home{--cta:#00a8c8;--cta-ink:#061a33;--cta-ring:transparent;--btn:var(--cta);--btn-ink:var(--cta-ink);--accent:var(--ink)}
:root[data-theme="light"] body.lg-home{--cta-ring:#061a33}

/* The raised-card rule above gave every chip a dark gradient, which also covered the selected state: the selected filter chip on
   Fair questions, My work and the case studies was dark text on a dark chip (1.09 to 1, found by check-contrast.cjs, 12 November 2026).
   The selected chip is the bright button colour again. */
body.lg .chipb[aria-pressed="true"]{background:var(--btn);border-color:var(--btn);color:var(--btn-ink)}
body.lg .chipb[aria-pressed="true"] small{color:var(--btn-ink)}

/* ---------- reading progress line (Jacob, 12 Nov 2026: "the blue scrolling progress line at the top like it used to be") ----------
   Made by assets/ledger-chrome.js on every page. A 3px line across the very top of the window, cyan into blue, that
   fills left to right as the page is read. Only a transform changes, so it costs nothing to draw. Hidden in print. */
.lg-progress{position:fixed;top:env(safe-area-inset-top,0px);left:0;right:0;height:3px;z-index:60;pointer-events:none}
.lg-progress i{display:block;height:100%;transform:scaleX(0);transform-origin:0 50%;will-change:transform;
  background:linear-gradient(90deg,#00a8c8,#2f7dff);box-shadow:0 0 10px rgba(47,125,255,.55)}
@media print{.lg-progress{display:none}}
