/* V7 design system base, ported from the V7 prototype (style block 1, 'Live Ops' base system).
   Scoped to .site. Review-chrome rules removed. Source: ~/Developer/Singlegrain/redesign-v7/index.html */

/* V5 review 10-26: metric-matched fallbacks, so text doesn't move when the web fonts swap in (Our work load shift 0.045).
   Measured in Chrome: Host Grotesk vs Arial width 1.0528, ascent 1.01, descent .32 (overrides divided by size-adjust); DM Mono vs Menlo. */
@font-face{font-family:"Host Grotesk Fallback";src:local("Arial"),local("ArialMT");size-adjust:105.28%;ascent-override:95.93%;descent-override:30.39%;line-gap-override:0%}
@font-face{font-family:"DM Mono Fallback";src:local("Menlo"),local("Menlo-Regular");size-adjust:99.66%;ascent-override:99.34%;descent-override:31.11%;line-gap-override:0%}
/* Round 2 (bold font): the old theme sets strong/b to sofia_probold (main*.css `strong{}`, `.content p strong`, `.alert b`,
   and an inline `b{}` in functions.php whose broken fallback list turns serif on phones). On V7 pages bold uses the V7 face.
   Specificity is kept at (0,1,1) so every V7 rule that styles a b/strong itself (same or higher specificity, later file) still wins;
   the second rule only covers the old content wrappers whose selectors are (0,1,2). Old pages (no body.sg-v7) are untouched. */
:where(body).sg-v7 :is(b,strong){font-family:var(--f,"Host Grotesk","Host Grotesk Fallback","Helvetica Neue",Arial,sans-serif)}
:where(body).sg-v7 :is(.content,.toc-body,.verticalTabs-contents,.alert) :is(b,strong){font-family:var(--f,"Host Grotesk","Host Grotesk Fallback","Helvetica Neue",Arial,sans-serif)}
/* SG web v4 · Direction 2 "Live Ops" base system (white).
   Layout: one white site container, left-aligned editorial grid (12 cols, max 1312px),
   hairlines instead of boxes, product-UI cards only where something "runs",
   and ONE gradient moment per page: the closing CTA band.
   Everything responsive is measured against the .site container (cq units + @container),
   never the window, so the same DOM renders inside the 390px phone preview. */

.site{
  --bg:#FFFFFF;
  --surface:#F7F7F8;      /* quiet band / card fill */
  --ink:#0B0B0C;
  --ink-2:#3A3A3E;        /* body text */
  --mute:#66666D;         /* secondary text, 5.6:1 on white */
  --line:#E6E6E8;
  --line-2:#F0F0F2;
  --surface-2:#FBFBFB;    /* card fill that flips with the theme */
  --label:#B4521F;        /* small orange labels: a deeper heat so 12-14px text passes 4.5:1 on white; gold on dark */
  --orange:#F27038;       /* SG Orange: fills, buttons, graphics (not small text) */
  --heat:#C45B26;         /* Orange Heat: emphasis TEXT on white (4.3:1, large type) */
  --gold:#F4B544;
  --teal:#28B7C9;         /* SG Teal: live signals only */
  --green:#1FA463;        /* done state only */
  --ok:#146F40;           /* positive state TEXT (found, fixed, cited, done): 5.5:1 on --ok-bg (was #17804A = 4.38:1, b8 10-22) */
  --ok-bg:#E6F4EC;        /* positive pill fill */
  --ok-line:#BFE3CD;      /* positive pill border */
  --grad:linear-gradient(100deg,#C45B26 0%,#F27038 46%,#F4B544 100%);
  --f:"Host Grotesk","Host Grotesk Fallback","Helvetica Neue",Arial,sans-serif;
  --m:"DM Mono","DM Mono Fallback",ui-monospace,"SFMono-Regular",Menlo,monospace;
  --ease:cubic-bezier(.22,1,.36,1);
  --gut:clamp(16px,4.4cqi,64px);
  --max:1312px;
  --sec:clamp(72px,9cqi,136px);   /* vertical rhythm between sections */
  /* the one dark chapter (Single Brain + "See the work"), Grain Engine's warm off-black */
  --dk-bg:#11100E;
  --dk-surface:#1A1816;
  --dk-surface-2:#22201D;
  --dk-line:#2E2B27;
  --dk-ink:#F3EFE8;
  --dk-ink-2:#CFC9BF;
  --dk-mute:#9E978C;
  container:site / inline-size;
  position:relative;
  background:var(--bg);
  color:var(--ink);
  font:400 16px/1.6 var(--f);
  color-scheme:light;
  overflow-x:clip;
  -webkit-font-smoothing:antialiased;
}
:where(.site) *,:where(.site) *::before,:where(.site) *::after{box-sizing:border-box}
:where(.site) img{max-width:100%;display:block}
:where(.site) a{color:inherit}
:where(.site) button{font:inherit;color:inherit}
.site [id]{scroll-margin-top:calc(var(--nav-top,0px) + 88px)}
.site :focus-visible{outline:2px solid var(--orange);outline-offset:3px;border-radius:6px}

/* ---------- layout ---------- */
.sg-wrap{width:100%;max-width:calc(var(--max) + var(--gut)*2);margin-inline:auto;padding-inline:var(--gut)}
.sg-sec{padding-block:var(--sec)}
.sg-sec--tight{padding-block:calc(var(--sec)*.6)}
.sg-band{background:var(--surface)}
.sg-rule{height:1px;background:var(--line);border:0;margin:0}
.sg-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:clamp(16px,2.2cqi,32px)}
.sg-head{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:24px clamp(24px,4cqi,64px);align-items:end}
.sg-head .sg-lede{justify-self:end;margin:0}

/* ---------- type ---------- */
.sg-h1{font:500 clamp(46px,7.6cqi,120px)/.93 var(--f);letter-spacing:-.045em;text-wrap:balance;margin:0}
.sg-h2{font:500 clamp(34px,4.6cqi,72px)/.98 var(--f);letter-spacing:-.04em;text-wrap:balance;margin:0}
.sg-h3{font:500 clamp(21px,1.9cqi,28px)/1.15 var(--f);letter-spacing:-.02em;text-wrap:balance;margin:0}
.sg-h4{font:500 18px/1.3 var(--f);letter-spacing:-.01em;margin:0}
.sg-lede{font:400 clamp(17px,1.4cqi,20px)/1.55 var(--f);color:var(--mute);max-width:34em;text-wrap:pretty}
.sg-p{font:400 16px/1.6 var(--f);color:var(--ink-2);max-width:38em;text-wrap:pretty;margin:0}
.sg-small{font:400 13.5px/1.45 var(--f);color:var(--mute)}
.sg-mono{font:400 12px/1.4 var(--m);letter-spacing:.02em}
.sg-em{color:var(--heat)}           /* second line / key phrase of a headline */
.sg-num{font-variant-numeric:tabular-nums;letter-spacing:-.04em}

/* ---------- actions (text only, never arrows) ---------- */
.sg-btns{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px}
/* Buttons, direction B (2026-10-15): square corners from the pixel grid, the agent-card mono in caps,
   and an orange fill that arrives in pixel-sized steps on hover. Ink on light, bone on dark (the tokens flip). */
.sg-btn{position:relative;isolation:isolate;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;gap:10px;
  min-height:48px;padding:0 22px;border-radius:2px;border:1px solid var(--ink);background:var(--ink);color:var(--bg);
  font:500 12.5px/1 var(--m);letter-spacing:.08em;text-transform:uppercase;text-decoration:none;white-space:nowrap;cursor:pointer;
  transition:color 0s linear .18s,border-color 0s linear .18s,background-color .25s ease}
/* V6 (Chris D 10-29: "faster/smoother… choppy/glitchy"): the fill was 9 steps over .42s and the label flipped colour at
   .18s, so part of it vanished (black on black, white on white) until ~.37s. Now one smooth .28s wipe on the site ease,
   and SG.btnLabels (shell) gives each button a hover copy of its label that is revealed by the same edge as the fill:
   __s keeps the size and the accessible name (invisible), __l is the resting label, __h the hover label. */
.sg-btn::before{content:"";position:absolute;inset:-1px;z-index:-1;background:var(--orange);transform:scaleX(0);transform-origin:left;
  transition:transform .28s var(--ease)}
.sg-btn:focus-visible::before{transform:scaleX(1)}
.sg-btn:not(.has-l):focus-visible{color:#0B0B0C;border-color:var(--orange)}
.sg-btn.has-l{transition:background-color .25s ease}
.sg-btn__s,.sg-btn__l,.sg-btn__h{display:inline-flex;align-items:center;justify-content:center;gap:inherit}
.sg-btn__s{opacity:0}
.sg-btn__l,.sg-btn__h{position:absolute;inset:0;padding:inherit;pointer-events:none;transition:clip-path .28s var(--ease)}
.sg-btn__l{clip-path:inset(0 0 0 0)}
.sg-btn__h{clip-path:inset(0 100% 0 0);color:#0B0B0C}
.sg-btn.has-l:focus-visible .sg-btn__l{clip-path:inset(0 0 0 100%)}
.sg-btn.has-l:focus-visible .sg-btn__h{clip-path:inset(0 0 0 0)}
.sg-btn:active{transform:translateY(1px)}
.sg-btn:disabled{opacity:.4;cursor:default}
.sg-btn:disabled::before,.sg-btn:disabled .sg-btn__h{display:none}
.sg-btn:disabled .sg-btn__l{clip-path:none!important}
.sg-btn:disabled:hover{color:var(--ink);border-color:var(--ink)}
.sg-btn--line{background:transparent;color:var(--ink)}
.sg-btn--line::before{background:var(--ink)}
.sg-btn--line:not(.has-l):focus-visible{color:var(--bg);border-color:var(--ink)}
.sg-btn--line .sg-btn__h{color:var(--bg)}
.sg-btn--sm{min-height:38px;padding:0 16px;font-size:12px}
.sg-link{display:inline-block;font:500 15.5px/1.3 var(--f);color:var(--ink);text-decoration:underline;text-decoration-thickness:1px;
  text-underline-offset:6px;text-decoration-color:#B9B9BE;transition:text-decoration-color .2s ease,color .2s ease;cursor:pointer;background:none;border:0;padding:0}
.sg-link:hover{text-decoration-color:var(--orange)}

/* ---------- objects ---------- */
.sg-card{background:#fff;border:1px solid var(--line);border-radius:16px}
.sg-card--fill{background:var(--surface);border-color:transparent}
.sg-tag{display:inline-flex;align-items:center;gap:6px;font:500 11px/1 var(--m);letter-spacing:.06em;text-transform:uppercase;
  color:var(--mute);border:1px solid var(--line);border-radius:999px;padding:5px 9px;background:#fff;white-space:nowrap}
.sg-dot{width:7px;height:7px;border-radius:50%;background:var(--teal);flex:none}
.sg-dot--live{animation:sg-pulse 1.8s ease-in-out infinite}
.sg-dot--done{background:var(--green)}
.sg-dot--warm{background:var(--orange)}
@keyframes sg-pulse{0%,100%{opacity:1}50%{opacity:.35}}

/* hairline rows (lists of services, points, scope items) */
.sg-rows{border-top:1px solid var(--line)}
.sg-row{border-bottom:1px solid var(--line);padding-block:22px}

/* stats */
.sg-stats{display:flex;flex-wrap:wrap;gap:20px clamp(24px,4cqi,56px)}
.sg-stat b{display:block;font:500 clamp(30px,3cqi,44px)/1 var(--f);letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.sg-stat span{display:block;font:400 13.5px/1.35 var(--f);color:var(--mute);margin-top:8px;max-width:16em}

/* logo strip */
.sg-logos{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:22px 36px}
.sg-logos img{height:26px;width:auto;filter:grayscale(1);opacity:.62;transition:filter .3s ease,opacity .3s ease}
.sg-logos img:hover{filter:none;opacity:1}

/* ---------- device mockups: a real client site scrolling inside a browser + phone ---------- */
.sg-mock{position:relative;padding-right:clamp(40px,7cqi,96px);padding-bottom:clamp(24px,3cqi,40px)}
.sg-browser{position:relative;border-radius:12px;background:#fff;border:1px solid var(--line);overflow:hidden;
  box-shadow:0 1px 2px rgba(11,11,12,.04),0 18px 40px -24px rgba(11,11,12,.25)}
.sg-browser__bar{display:flex;align-items:center;gap:6px;height:34px;padding:0 12px;border-bottom:1px solid var(--line-2);background:#FBFBFB}
.sg-browser__bar i{width:9px;height:9px;border-radius:50%;background:#E3E3E6}
.sg-browser__url{margin-left:10px;font:400 11.5px/1 var(--m);color:var(--mute);background:#fff;border:1px solid var(--line-2);border-radius:6px;padding:5px 10px}
.sg-browser__view{position:relative;aspect-ratio:16/10;overflow:hidden;background:var(--surface)}
.sg-phone{position:absolute;right:0;bottom:0;width:clamp(96px,15cqi,190px);aspect-ratio:9/19.5;border-radius:24px;border:5px solid #111;
  background:#111;overflow:hidden;box-shadow:0 24px 40px -20px rgba(11,11,12,.45)}
.sg-phone__view{position:absolute;inset:0;overflow:hidden;border-radius:19px;background:#fff}
.sg-scroll{position:absolute;left:0;top:0;width:100%;height:auto;will-change:transform}
/* JS sets --travel (px) on .sg-scroll once the image has loaded; the loop reads it */
.sg-scroll.is-on{animation:sg-scroll var(--dur,26s) var(--ease) infinite alternate}
@keyframes sg-scroll{0%,8%{transform:translateY(0)}92%,100%{transform:translateY(calc(var(--travel,0px) * -1))}}

/* ---------- the closing CTA band: the page's one gradient ---------- */
.sg-cta{background:var(--grad);color:var(--ink);border-radius:20px;padding:clamp(36px,6cqi,88px) clamp(24px,5cqi,80px);
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:32px clamp(24px,4cqi,64px);align-items:end;position:relative;overflow:hidden}
.sg-cta .sg-h2{font-size:clamp(38px,5.6cqi,88px);color:var(--ink)}
.sg-cta__aside{display:grid;gap:22px;justify-items:start;max-width:22em}
.sg-cta__aside p{margin:0;font:400 16.5px/1.5 var(--f);color:#1A1209}

/* ---------- the dark chapter, AKQA-style ----------
   One section carries data-chapter="dark". When it crosses the middle of the viewport the shell
   adds .is-dark to .site and the WHOLE page crossfades: every theme token flips, so background
   and text change together with no edge. Scrolling past flips it back.
   Anything that keeps its own white surface (nav, search bar, white cards) marks itself
   data-surface="light" and keeps the light tokens inside. */
/* 10-28 (Kriste: "feels laggy while scrolling"): the per-element colour fades (every heading/paragraph, and every element
   during .is-flip) made each frame of the flip restyle ~3,400 elements (~200 ms a frame, measured). The flip now happens
   under one veil layer that fades on the compositor (SG.chapter); the tokens switch once, hidden under it. */
/* V4 (Kriste 10-20, back to V3/AKQA): while the page flips, EVERYTHING fades on one clock, so surfaces,
   borders and text change together with the background instead of jumping (that jump read as a glitch). */
/* 10-22: one calm .6s fade; no box-shadow (a full-page shadow repaint dropped frames), and elements mid-reveal keep their own ease */
.sg-veil{position:fixed;inset:0;z-index:59;pointer-events:none;opacity:0;background:var(--dk-bg);transition:opacity .45s var(--ease);will-change:opacity}  /* under the nav (60) */
.sg-veil.is-on{opacity:.94;transition-duration:.2s}
.sg-veil.is-light{background:#FFFFFF}
.site.is-dark{
  --bg:var(--dk-bg);--surface:var(--dk-surface);--surface-2:var(--dk-surface-2);
  --ink:var(--dk-ink);--ink-2:var(--dk-ink-2);--mute:var(--dk-mute);
  --line:var(--dk-line);--line-2:var(--dk-line);--label:var(--gold);
  background-color:var(--dk-bg);color:var(--dk-ink);color-scheme:dark
}
.site.is-dark [data-surface="light"]{
  --bg:#FFFFFF;--surface:#F7F7F8;--surface-2:#FBFBFB;--ink:#0B0B0C;--ink-2:#3A3A3E;--mute:#66666D;
  --line:#E6E6E8;--line-2:#F0F0F2;--label:#B4521F;color:var(--ink);color-scheme:light
}
.sg-mute2{color:var(--mute)}

/* ---------- V4 homepage rhythm (Kriste 10-20: "more air between the sections", V3 measured 230–300px) ---------- */
.pg[data-page="home"]{--air:clamp(40px,7.6cqi,120px)}
.pg[data-page="home"] > .part:not(#p-home-a){margin-top:var(--air)}
.pg[data-page="home"] > #p-home-sister{margin-top:calc(var(--air) * .5)}
.pg[data-page="home"] > #p-home-d{margin-top:calc(var(--air) * .45)}

/* ---------- V4 homepage system (Kriste 10-21 review) ----------
   One H2 size (the proof section's, which stays as Eric likes it). Text: --t-lede / 16 / 14 / 12.
   Corners: --r-ctl 2px for buttons, tags, chips; --r-win 8px for real UI windows; content has none.
   Labels: mono caps only for agents and buttons, so tags are sentence case Host Grotesk.
   The proof section (#p-home-c) is kept exactly as it was, tags included. */
/* 10-23 (review A15): the scale tokens now apply to EVERY page, not only home */
.pg{--h1:clamp(46px,6.2cqi,96px);--h1-long:clamp(38px,4.4cqi,68px);--h2:clamp(34px,4cqi,58px);--t-lede:clamp(17px,1.4cqi,20px);--r-ctl:2px;--r-win:8px}
.pg .sg-h1{font-size:var(--h1)}
.pg .sg-h2{font-size:var(--h2)}
.pg .sg-lede{font-size:var(--t-lede)}
@container site (max-width: 600px){ .pg{--h1:46px;--h1-long:38px;--h2:30px} }
/* 10-27 (Kriste): phone openings read as headline → support → action: the lede sits tight under the H1, the action
   group gets the air */
@container site (max-width: 600px){
  #site .pg .part .sg-h1 + .sg-lede{margin-top:14px}
  #site .pg .part .sg-lede + .sg-btns,#site .pg .part .sg-lede + .sg-act{margin-top:32px}
}  /* 10-27 (Kriste: phone heroes had no hierarchy, H1 too close to H2 and lede): was 40 / 32 */
.pg[data-page="home"] > .part:not(#p-home-c) .sg-tag{font:500 12px/1 var(--f);letter-spacing:0;text-transform:none;border-radius:var(--r-ctl);padding:5px 8px}
/* phone review 10-21 (no visual change on desktop): hero + closing CTA centred like the other phone openers;
   text links get a 44px-tall hit area without moving anything */
@container site (max-width: 600px){
  #p-home-a .sg-act, #p-home-d .sg-act{align-items:center}
  .pg[data-page="home"] > #p-home-sister{margin-top:16px}   /* the FAQ above already ends with its own air */
  .pg[data-page="home"] .sg-link{position:relative}
  .pg[data-page="home"] .sg-link::after{content:"";position:absolute;left:-6px;right:-6px;top:-12px;bottom:-12px}
}

/* ---------- V4: a dark panel (Kriste 10-20, like singlegrain.com's founder panel) ----------
   The section is dark on its own and scrolls in as a rounded block over the white page.
   No whole-page flip, so nothing cuts: the edge of the panel IS the transition. */
.sg-dark{
  --bg:var(--dk-bg);--surface:var(--dk-surface);--surface-2:var(--dk-surface-2);
  --ink:var(--dk-ink);--ink-2:var(--dk-ink-2);--mute:var(--dk-mute);
  --line:var(--dk-line);--line-2:var(--dk-line);--label:var(--gold);
  background-color:var(--dk-bg);color:var(--dk-ink);color-scheme:dark;
  background-image:linear-gradient(160deg,rgba(255,255,255,.035),rgba(255,255,255,0) 55%);
  border-radius:clamp(28px,3.4cqi,56px)
}
.sg-dark [data-surface="light"]{
  --bg:#FFFFFF;--surface:#F7F7F8;--surface-2:#FBFBFB;--ink:#0B0B0C;--ink-2:#3A3A3E;--mute:#66666D;
  --line:#E6E6E8;--line-2:#F0F0F2;--label:#B4521F;color:var(--ink);color-scheme:light
}

/* ---------- V4: the status note that belongs to a button (Kriste 10-20) ----------
   <div class="sg-act"><a class="sg-btn">…</a><span class="sg-note">Senior strategists available within 24 hours</span></div>
   A small status indicator that appears only while its button is hovered or focused, just under it.
   Touch screens (no hover) show it statically. (Not .sg-cta: that name is the retired V3 gradient band.) */
.sg-act{position:relative;display:inline-flex;flex-direction:column;align-items:flex-start}
.sg-act--center{align-items:center}
.sg-note{display:inline-flex;align-items:center;gap:9px;font:500 12.5px/1.2 var(--f);letter-spacing:.005em;color:var(--ink);
  background:#fff;border:1px solid var(--ok-line,#BFE3CD);border-radius:var(--r-ctl,2px);padding:6px 12px 6px 10px;white-space:nowrap;
  box-shadow:0 10px 24px -14px rgba(11,11,12,.28)}
.sg-note::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:#1FA463;box-shadow:0 0 0 0 rgba(31,164,99,.45)}
.sg-act .sg-note{position:absolute;top:calc(100% + 10px);left:0;z-index:5;opacity:0;transform:translateY(-4px);pointer-events:none;
  transition:opacity .22s var(--ease),transform .28s var(--ease)}
.sg-act--center .sg-note{left:50%;transform:translate(-50%,-4px)}
.sg-act:hover .sg-note,.sg-act:focus-within .sg-note{opacity:1;transform:none}
.sg-act--center:hover .sg-note,.sg-act--center:focus-within .sg-note{transform:translate(-50%,0)}
.sg-act:hover .sg-note::before,.sg-act:focus-within .sg-note::before{animation:sg-live 1.6s var(--ease) infinite}
@keyframes sg-live{0%{box-shadow:0 0 0 0 rgba(31,164,99,.45)}70%{box-shadow:0 0 0 7px rgba(31,164,99,0)}100%{box-shadow:0 0 0 0 rgba(31,164,99,0)}}
@media (hover:none){
  .sg-act{gap:10px}
  .sg-act .sg-note,.sg-act--center .sg-note{position:static;opacity:1;transform:none;pointer-events:auto;box-shadow:none}
}
@media (prefers-reduced-motion:reduce){.sg-act .sg-note{transition:none}.sg-act .sg-note::before{animation:none!important}}

/* ---------- light pixel flow (canvas injected by SG.pixels for [data-pixels]) ---------- */
.sg-px{position:absolute;left:0;top:0;pointer-events:none;z-index:0}
[data-pixels]>*:not(.sg-px){position:relative;z-index:1}

/* ---------- rotating stat: one number at a time, never a row of boxes (SG.rot) ---------- */
.sg-rot{display:grid}
.sg-rot__i{grid-area:1/1;display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 14px;opacity:0;visibility:hidden;transform:translateY(6px);
  transition:opacity .5s var(--ease),transform .6s var(--ease),visibility 0s linear .6s}
.sg-rot__i.is-on{opacity:1;visibility:visible;transform:none;transition:opacity .6s var(--ease) .12s,transform .7s var(--ease) .12s,visibility 0s}
.sg-rot__i b{font:600 clamp(36px,3.4cqi,52px)/1 var(--f);letter-spacing:-.04em;color:var(--heat);font-variant-numeric:tabular-nums}
.sg-rot__i span{font:400 16px/1.35 var(--f);color:var(--mute)}
.sg-rot__dots{display:flex;gap:5px;margin-top:14px}
.sg-rot__dots i{width:7px;height:7px;background:var(--line);transition:background-color .4s ease}
.sg-rot__dots i.on{background:var(--orange)}

/* ---------- swipe row: on phone a grid becomes one card plus the edge of the next (SG.swipe) ---------- */
.sg-swipe__dots{display:none;justify-content:center;gap:5px;margin-top:18px}
.sg-swipe__dots i{width:7px;height:7px;background:var(--line);transition:background-color .3s ease}
.sg-swipe__dots i.on{background:var(--orange)}

/* ---------- reveal (progressive enhancement; page is complete at rest) ---------- */
.site.is-armed .sg-rise{opacity:0;transform:translateY(14px);transition:opacity .7s var(--ease),transform .9s var(--ease)}
.site.is-armed .sg-rise.is-in{opacity:1;transform:none}

/* ---------- container breakpoints ---------- */
@container site (max-width: 960px){
  .sg-head{grid-template-columns:minmax(0,1fr)}
  .sg-head .sg-lede{justify-self:start}
  .sg-cta{grid-template-columns:minmax(0,1fr)}
}
@container site (max-width: 600px){
  .site{font-size:16px}
  .sg-small{font-size:14px}  /* phone meta floor (was 13.5px; V5 review, group C) */
  /* phone rhythm: every section pads var(--sec) top and bottom, so every boundary is 112px of air */
  .pg{--sec:56px}
  .sg-swipe{display:grid;grid-auto-flow:column;grid-auto-columns:84%;grid-template-columns:none;grid-template-rows:none;gap:12px;
    overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:var(--gut);
    padding-inline:var(--gut);margin-inline:calc(var(--gut) * -1);scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .sg-swipe::-webkit-scrollbar{display:none}
  .sg-swipe>*{scroll-snap-align:start;min-width:0}
  /* V5 review 10-26: a slide off to the side never meets the vertical reveal, so a swipe showed a blank card fading in.
     Slides rise with their row instead: complete as soon as the row is on screen. */
  .site.is-armed .sg-swipe>.sg-rise{opacity:1;transform:none}
  .sg-swipe__dots{display:flex}
  .sg-rot__i b{font-size:44px}
  .sg-btn{min-height:44px;padding:0 18px}
  .sg-btn--sm{min-height:44px;padding:0 14px}
  /* phone: content tags are words, not machine labels (Kriste 10-16) */
  .sg-tag{font:500 13px/1 var(--f);letter-spacing:0;text-transform:none;padding:6px 10px}
  .sg-logos{justify-content:flex-start;gap:20px 28px}
  .sg-logos img{height:20px}
  .sg-mock{padding-right:56px}
  .sg-phone{width:104px;border-width:4px;border-radius:18px}
  .sg-phone__view{border-radius:14px}
  .sg-cta{border-radius:16px}
}

@media (prefers-reduced-motion: reduce){
  .site *{animation:none!important;transition:none!important}
  .site.is-armed .sg-rise{opacity:1;transform:none}
}

/* ---------- V4 rhythm, tighter (Chris + Kriste 10-22: "reduce the white space between sections, add a minimal divider") ----------
   One rhythm token for every page: --sec pads each section top and bottom, so a boundary is 2 × --sec.
   1440: ~150px boundary (was 230–300px). Phone: 72px (was 112–330px). The homepage's extra --air between parts goes.
   Divider: one 1px hairline at the content width where one part meets the next (an in-flow ::before on every part
   after the first; parts are separated by <style>/<script> siblings, so ~ not +; child
   backgrounds can't cover it), and on the top edge of a section that follows another inside the same part.
   None into or out of the dark chapter, the sister line or the closing band: each is its own edge.
   10-22 (Kriste): the dark chapter now uses the same rhythm; the calmer flip (shell SG.chapter) no longer needs extra air. */
.pg{--sec:clamp(44px,5.2cqi,76px)}
.pg[data-page="home"]{--air:0px}
.pg[data-page="home"] > #p-home-sister,.pg[data-page="home"] > #p-home-d{margin-top:0}
.pg > .part ~ .part:not(.sg-net):not([data-chapter])::before{
  content:"";display:block;height:1px;background:var(--line);
  width:min(var(--max), calc(100% - var(--gut) * 2));margin:0 auto}
/* no divider into or out of the dark chapter or onto the sister line (ids outrank the class rule above) */
.pg > #p-home-sb::before,.pg > #p-home-svc::before,.pg > #p-home-sister::before{content:none}
/* the services list already ends on a hairline row, so the founder part needs no second rule under it */
.pg > #p-home-cred::before{content:none}
.pg .part > section.sg-sec + section.sg-sec{
  background-image:linear-gradient(var(--line),var(--line));background-repeat:no-repeat;background-position:top center;
  background-size:min(var(--max), calc(100% - var(--gut) * 2)) 1px}
@container site (max-width: 600px){ .pg{--sec:36px} .pg > #p-home-sb{--sec:56px} }
/* V7 agents-first order: services now follows the hero and the founder part follows the testimonials, so both get
   the hairline; How it works now follows the dark Single Brain band, which is its own edge */
.pg > #p-home-svc::before,.pg > #p-home-cred::before{content:""}
.pg > #p-home-how::before{content:none}

/* Kriste 10-22: on phone the mono button text and the 24-hour note go to 14px (was 12.5px);
   phone has no dark flip, so the chapter and the services part drop the extra air */
@container site (max-width: 600px){
  .sg-btn,.sg-btn--sm{font-size:14px}
  .sg-note{font-size:14px;white-space:normal;text-align:left}
  .pg[data-page="home"] > #p-home-sb,.pg[data-page="home"] > #p-home-svc{--air:0px}
}

/* ---------- phone pass from the mobile Jev review (media-os-b1, Kriste 10-22) ----------
   Touch screens: the 24-hour note is a plain line under its button (green dot + text, no pill, no border).
   The button group follows its section's alignment: centred heroes centre the button, left-aligned pages keep it left
   (inline-block children obey the inherited text-align; the old flex column left the button off-centre). */
@media (hover:none){
  .sg-act,.sg-act--center{display:inline-block}
  .sg-act .sg-note,.sg-act--center .sg-note{display:block;margin-top:10px;background:none;border:0;border-radius:0;padding:0;box-shadow:none;white-space:normal;text-align:inherit}
  .sg-act .sg-note::before{display:inline-block;vertical-align:.06em;margin-right:9px}
  /* V5 review 10-26 (group D): on touch tablets the note sits under the button, so a text link beside the pair lines up
     with the button's middle instead of the pair's (it sat 46px low) */
  @container site (min-width: 601px){
    .sg-btns:has(> .sg-act){align-items:flex-start}
    .sg-btns:has(> .sg-act) > .sg-link{display:inline-flex;align-items:center;min-height:48px}
  }
}
@container site (max-width: 600px){
  /* every text link gets a 44px-tall hit area without moving anything (was homepage only) */
  .sg-link{position:relative}
  .sg-link::after{content:"";position:absolute;left:-6px;right:-6px;top:-12px;bottom:-12px}
  /* device mockups: the cropped desktop hero, no phone beside it, zoomed so the client's headline reads */
  .sg-mock{padding-right:0;padding-bottom:0}
  .sg-mock .sg-phone{display:none}
  .sg-mock .sg-browser__view .sg-scroll{width:160%;max-width:none}
  .sg-browser__url{font-size:12px}
}


/* ---------- phone: every main button is centred, with its 24-hour note shown under it (Kriste 10-22) ----------
   V4 comments 93b71107 + a396605b: on phone there's no hover, so the "Senior strategists available within 24 hours"
   note is always shown, as a plain line right under its button, and every main button sits centred on the page.
   Where a group also has a secondary link ("See the work", "More … results"), it is centred below.
   Width-based (not hover-based), so the review's Mobile frame on a desktop browser shows the same thing.
   Scoped through #site .pg .part so it outranks the parts' own button rules. Buttons keep their natural width. */
@container site (max-width: 600px){
  #site .pg .part .sg-btns:has(> .sg-act),#site .pg .part .cs-actions{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;gap:14px;width:100%;text-align:center}
  #site .pg .part .sg-act{display:flex;flex-direction:column;align-items:center;width:fit-content;max-width:100%;margin:0 auto;align-self:center;text-align:center}
  /* V5 10-26 (Kriste: "unified style through all pages"): on phone width the note is ALWAYS the plain line, dot + text,
     no box, matching real touch phones; desktop and tablet keep the square note on hover/focus */
  #site .pg .part .sg-act .sg-note{position:static;left:auto;opacity:1;transform:none;pointer-events:auto;margin-top:10px;
    display:block;background:none;border:0;border-radius:0;padding:0;box-shadow:none;white-space:normal;text-align:center}
  #site .pg .part .sg-act .sg-note::before{display:inline-block;vertical-align:.06em;margin-right:9px}
  #site .pg .part .sg-btns:has(> .sg-act) > .sg-link,#site .pg .part .cs-actions > .sg-link{align-self:center;padding-block:12px}
}

/* ---------- phone: the landing blends into its illustration (Kriste 10-23, comment f93c3942) ----------
   On phone each inner-page hero was white text on white, with the illustration parked below it in its own box.
   Now one full-bleed backdrop runs under the whole hero: a warm light that pools where the illustration sits and a
   fine pixel-dot grid that is dense around the illustration and dissolves upward behind the headline. The illustration
   drops its own box and sits straight in that field, so text and image read as one picture. Home keeps its own pixel scene.
   Two layers: ::before = warm light, ::after = dots (each masked on its own). Desktop and tablet are untouched.
   10-23 refinement (Kriste: "a bit too orangey… the dotted background a bit too strong"): the light is a near-neutral
   warm sand that is faint across the top and pools around the illustration, with a faint orange tint right at the image; the dots are
   bone grey, finer and wider apart, and start below the text, so the orange comes from the illustration, not the ground. */
@container site (max-width: 600px){
  #p-services .services-hero,#p-service .sv-hero,#p-paid-media .pm-hero,#p-about .ab-hero,#p-work .work-hero,
  :is(#p-case,#p-case-smartrent,#p-case-ls,#p-case-simon-pearce,#p-case-prolite,#p-case-klassy,#p-case-wine-deals,#p-case-single-grain,#p-case-interchain,#p-case-bierman,#p-case-crushing-it) .cs-hero{
    position:relative;isolation:isolate;--blend:60%}
  #p-service .sv-hero{--blend:56%}
  #p-paid-media .pm-hero{--blend:56%}
  #p-about .ab-hero{--blend:58%}
  #p-services .services-hero::before,#p-service .sv-hero::before,#p-paid-media .pm-hero::before,#p-about .ab-hero::before,#p-work .work-hero::before,
  :is(#p-case,#p-case-smartrent,#p-case-ls,#p-case-simon-pearce,#p-case-prolite,#p-case-klassy,#p-case-wine-deals,#p-case-single-grain,#p-case-interchain,#p-case-bierman,#p-case-crushing-it) .cs-hero::before{
    content:"";position:absolute;inset:0;z-index:-2;pointer-events:none;
    -webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 78%,transparent 100%);mask-image:linear-gradient(to bottom,#000 0%,#000 78%,transparent 100%);
    background:
      radial-gradient(42% 12% at 50% calc(var(--blend) + 22%),rgba(242,112,56,.05) 0%,rgba(242,112,56,0) 100%),
      radial-gradient(150% 44% at 50% calc(var(--blend) + 20%),rgba(243,238,232,.97) 0%,rgba(246,243,239,.72) 46%,rgba(250,249,247,0) 80%),
      linear-gradient(to bottom,rgba(247,244,240,.95) 0%,rgba(249,247,244,.55) 38%,rgba(250,249,247,0) 62%)}
  #p-services .services-hero::after,#p-service .sv-hero::after,#p-paid-media .pm-hero::after,#p-about .ab-hero::after,#p-work .work-hero::after,
  :is(#p-case,#p-case-smartrent,#p-case-ls,#p-case-simon-pearce,#p-case-prolite,#p-case-klassy,#p-case-wine-deals,#p-case-single-grain,#p-case-interchain,#p-case-bierman,#p-case-crushing-it) .cs-hero::after{
    content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
    background:radial-gradient(circle,rgba(150,138,124,.42) .9px,transparent 1.5px) 10px 0/20px 20px;
    -webkit-mask-image:linear-gradient(to bottom,transparent 0%,transparent calc(var(--blend) - 18%),rgba(0,0,0,.85) calc(var(--blend) + 6%),rgba(0,0,0,.85) 84%,transparent 100%);
            mask-image:linear-gradient(to bottom,transparent 0%,transparent calc(var(--blend) - 18%),rgba(0,0,0,.85) calc(var(--blend) + 6%),rgba(0,0,0,.85) 84%,transparent 100%)}
  /* the illustrations drop their own panels and sit in the shared field */
  .site #p-work .wh-stage{background:none;border-radius:0;overflow:visible}   /* .site: outranks work.html's own phone rule, which loads later */
  .site #p-work .wh-stage::after{display:none}
  #p-services .sh-viz{background:none;border-radius:0;overflow:visible}
  #p-services .sh-viz::after{display:none}
  :is(#p-case,#p-case-smartrent,#p-case-ls,#p-case-simon-pearce,#p-case-prolite,#p-case-klassy,#p-case-wine-deals,#p-case-single-grain,#p-case-interchain,#p-case-bierman,#p-case-crushing-it) .cs-stage{background:none;border-radius:0;overflow:visible}
  :is(#p-case,#p-case-smartrent,#p-case-ls,#p-case-simon-pearce,#p-case-prolite,#p-case-klassy,#p-case-wine-deals,#p-case-single-grain,#p-case-interchain,#p-case-bierman,#p-case-crushing-it) .cs-stage::after{display:none}
  /* the pill note under the main button reads on the warm field */
  #p-services .services-hero .sg-note,#p-service .sv-hero .sg-note,#p-about .ab-hero .sg-note,#p-work .work-hero .sg-note,.cs-hero .sg-note{background:transparent}
}
/* 10-27 (Kriste comment on the Learning A-Z opening: the light sand backdrop "looks very old-school and scattered"):
   case openings on phone are plain white; the other inner pages keep the field */
@container site (max-width: 600px){
  :is(#p-case,#p-case-smartrent,#p-case-ls,#p-case-simon-pearce,#p-case-prolite,#p-case-klassy,#p-case-wine-deals,#p-case-single-grain,#p-case-interchain,#p-case-bierman,#p-case-crushing-it) .cs-hero::before,:is(#p-case,#p-case-smartrent,#p-case-ls,#p-case-simon-pearce,#p-case-prolite,#p-case-klassy,#p-case-wine-deals,#p-case-single-grain,#p-case-interchain,#p-case-bierman,#p-case-crushing-it) .cs-hero::after{display:none}
}

/* ---- r34 (Kriste 11-18, after the UX/Jev review) ---- */
:root{--heat-s:#B85422}   /* Orange Heat for text under 24 px: 4.85:1 on white (--heat #C45B26 is 4.3:1, large type only) */
/* B. pre-launch notes and their footnote numbers stay in the HTML as the record, never on screen */
.cs-notes,.ct-notes,sup.cs-fn,.ct-fn{display:none!important}
/* J. every text link gets a taller hit area on every device (phone already had 44 px) */
.sg-link{position:relative}
.sg-link::after{content:"";position:absolute;left:-6px;right:-6px;top:-8px;bottom:-8px}
@container site (max-width: 600px){
  /* C. closing bands: the agent network under the card goes on phone (it was cut by the screen edge and cross-faded its labels) */
  .sg-net .home-d-stage{display:none!important}
  /* D. disclosure toggles */
  .sg-disc{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;margin:4px 0 0;padding:10px 0;
    border-top:1px solid var(--line-2);border-bottom:1px solid var(--line-2);font:500 15px/1.3 var(--f);color:var(--ink);cursor:pointer;-webkit-tap-highlight-color:transparent}
  .sg-disc::after{content:"+";font:400 22px/1 var(--f);color:var(--ink);transition:color .2s ease}
  .sg-disc[aria-expanded="true"]::after{content:"\2212";color:var(--orange)}
  .sg-disc:focus-visible{outline:2px solid var(--orange);outline-offset:3px}
  .sg-disc-l:not(.is-open){display:none!important}
  .sv-ar-lab,.pm-ar-lab,.pc-ar-lab,.ai-ar-lab{display:none!important}
  .sg-disc--more{justify-content:center;gap:10px;border-bottom:0}
  .sg-disc-ft:not(.is-open) > li:nth-child(n+7){display:none!important}
  .cs-map .sg-disc{order:2;margin-top:12px}
}
.sg-disc{display:none}
@container site (max-width: 600px){ .sg-disc{display:flex} }
/* G. small orange text */
#p-services .pk-facts li:nth-child(2),#p-services .s-proof b,#p-work .w-proof b,#p-home-a .home-a-proof b,#p-home-a .hs-bs,
#p-article .ar-tw td:nth-child(2),#p-work .wp-d,#p-about .ab-only{color:var(--heat-s)}

/* ---- r35 (Jev-tested levers, 11-18) ---- */
/* case-card screenshots in one frame: a soft panel with the client site inset (photos stay full-bleed) */
.cs-card__vis:not(.cs-card__vis--photo){background:#F1EDE6;padding:12px 12px 0;box-sizing:border-box}
.cs-card__vis:not(.cs-card__vis--photo) img{border-radius:6px 6px 0 0;box-shadow:0 10px 24px -14px rgba(0,0,0,.35);object-position:top center}
@container site (max-width: 600px){
  /* section rhythm on phone: every other section on a cool neutral (closing bands keep their own field) */
  .pg > .part:nth-child(even):not(.sg-net):not(.sg-dark){background:#F6F6F7}  /* r40 D: never over a dark band (its light text went cloudy) */
  /* r46 (Kriste 11-19, a2532579; replaces the r35 2-column grid): case results in ONE row between hairlines. Two results sit side
     by side; three show two and the edge of the third, and the row swipes (dots under it, from SG.casePage in case.html) */
  .pg .cs-res{display:grid!important;grid-template-columns:none!important;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:0!important}
  .pg .cs-res:has(> .cs-r:nth-child(4)){grid-auto-columns:calc((100% - var(--gut)) / 2.2);overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;
    scroll-padding-inline:var(--gut);padding-inline:var(--gut);margin-inline:calc(var(--gut) * -1);scrollbar-width:none}
  .pg .cs-res::-webkit-scrollbar{display:none}
  .pg .cs-r,.pg .cs-r:nth-child(odd){grid-column:auto!important;scroll-snap-align:start;min-width:0;padding:0 12px!important;border:0!important;border-left:1px solid var(--line)!important}
  .pg .cs-res > .cs-r:first-child,.pg .cs-res > .cs-r--key:first-child + .cs-r{border-left:0!important}
  .pg .cs-r b{font-size:30px!important;line-height:1!important}
  .pg .cs-res:not(:has(> .cs-r:nth-child(4))) .cs-r b{font-size:34px!important}
  .pg .cs-r .l{font-size:14.5px!important;margin-top:8px;text-wrap:balance}
  .pg .cs-r .d{font-size:13px!important;margin-top:4px;text-wrap:balance}
}

/* ---- r38 A (Kriste 11-19, c35bd92a): hovering a case card must never stop the page from scrolling. The r34 J link hit
   area (8px below every .sg-link) made each sideways case row scroll 8px vertically, and a trackpad gesture latched onto
   the row. Rows that scroll sideways never scroll vertically. ---- */
.cs-rel{overflow-y:hidden;overscroll-behavior-y:auto}
@container site (max-width: 600px){ .sg-swipe{overflow-y:hidden;overscroll-behavior-y:auto} }

/* ---- r40 I (Kriste 11-19, a7ee0bc4: on phone "it's only the click itself"): the orange wipe and label swap run only
   where a pointer can really hover, so a tap never leaves a button stuck half-orange; keyboard focus still shows it ---- */
@media (hover:hover){
  .sg-btn:hover::before{transform:scaleX(1)}
  .sg-btn:not(.has-l):hover{color:#0B0B0C;border-color:var(--orange)}
  .sg-btn.has-l:hover .sg-btn__l{clip-path:inset(0 0 0 100%)}
  .sg-btn.has-l:hover .sg-btn__h{clip-path:inset(0 0 0 0)}
  .sg-btn--line:not(.has-l):hover{color:var(--bg);border-color:var(--ink)}
  .sg-btn:disabled:hover{color:var(--ink);border-color:var(--ink)}
}

/* ---- live-theme leak guard (WP critical CSS sets a:hover{color:#0056b3;text-decoration:underline}) ---- */
#site .sg-btn:hover,#site .sg-btn:focus{color:var(--bg);text-decoration:none}
#site .sg-link:hover,#site .sg-link:focus{color:var(--ink)}
/* the theme styles every bare <footer> as the site footer (dark fill, 70px bottom padding); V7 uses <footer> inside quotes/cards */
#site footer{background:transparent;padding:0;min-height:0}
/* the theme's .a{opacity:.08;stroke:#000} hits the <rect class="a"> pixel marks in V7 illustrations */
:where(#site) svg .a{stroke:none;opacity:1}
