/* One look on every page (Liam, November 25, 2026). Loaded last on every page by case-studies/into-site.mjs, so these
   rules sit over each page's own files without editing them.

   1. Rounded buttons. The subpages' pill (case.css .btn: Geist Mono 12px, weight 500, 44px tall, 40px corners) is the one
      button. The homepage's bracketed mono buttons and the orange footer's cream Book a call drew 11 to 13px text in
      4px corners, 44 to 52px tall; they take the pill's size and corners and keep their own colours. Toggles, tabs, nav
      links and the Design options panel are left alone. html:not(#_) outranks system.css's !important hero rule.
   2. The orange glass footer on every subpage (footer-options.js): its option bars belong to the homepage's Design
      options panel, and case.css's dark footer ground steps aside, as contact.css already did for Contact. 2b makes
      it the homepage's footer part for part.
   3. Five rules we work by starts on the container's left edge, where Who we work with starts. */

html:not(#_) :is(#hero .hero-cta :is(.book,.frame), .servicecopy .book, footer .ft-book, #work .ct-all-btn){
  border-radius:40px !important;font-size:12px !important;font-weight:500 !important;
  height:auto !important;min-height:44px !important;padding-top:0 !important;padding-bottom:0 !important}

html.cs.fto-new footer.cs-foot{border-top:0}

/* Show the control as soon as it takes keyboard focus, even during a reveal. */
:is(.ab-js,.mt-js) [data-rise]:focus-within{opacity:1;translate:none;transition:none}
html.fto-navoff .nav:focus-within{opacity:1;translate:none}
.nav-menu:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.ct-form .ct-preview-note{margin:0;color:var(--cs-ink-2);font-size:var(--t-small);line-height:var(--t-small-lh)}

/* 2b. The subpages' footer is the homepage's footer, part for part (Liam, November 25, 2026, on the homepage footer:
   "why isnt this footter applied acroos??"). into-site.mjs gives every subpage the homepage's mark and bottom line and
   the mark's script; these are the homepage's own sizes for them (assets/two-suns-home.css and tokens.css), which the subpages
   do not load. The white ground round the orange box comes from footer-options.css once the rule above stops hiding it. */
html.cs.fto-new footer .foot-head{font-size:11px;line-height:normal}
html.cs footer .mark-band{position:relative;overflow:hidden}
html.cs footer [data-mark66]{position:relative;width:100%;user-select:none;cursor:crosshair}
html.cs footer [data-mark66] .mk-flat{width:100%;height:auto;display:block}

#rules .pr-intro,.pr-intro{text-align:left}
.pr-intro>:is(h2,p){margin-left:0 !important;margin-right:0 !important}

/* ---------------------------------------------------------------------------------------------------------------------
   4. The site values on every page (Liam, November 25, 2026, on the values sheet at /system/: "Yes, roll out"). The values
   live in system-tokens.css, loaded on every page just before this file; these rules point each page's own headings,
   text, spacing and motion at them. The page files keep their old sizes underneath; each rule below names what it
   overrides so a later pass can delete the source rule. html:not(#_) and !important outrank the pages' own rules,
   several of which are id-scoped or !important themselves. Exceptions (left on purpose) are listed in
   system-sheet/check-values.json, which system-sheet/check-values.py reads. */

/* Keep multiline titles readable without changing their wording or alignment. */
html.cs main :is(h1,h2,h3),
main :is(.c2-intro>h2,.diagramcopy>h2,#work .kv-title,.pr-intro>h2,#ww-h,#why-us h2),
footer .ft-close>h2{text-wrap:balance}

/* Book a call uses the same size in the bar and the mobile menu. */
html:not(#_) .nav :is(.nav-cta,.nav-links) a.book{
  height:var(--btn-h);min-height:var(--btn-h);font-size:var(--btn-size);
}

/* An inset outline stays visible on the image and inside the clipped card. */
#work :is(.cx-cell,.ct-card,.kv-card,.gc-f,.cxx-stage):focus-visible,
#work :is(.cx-cell,.ct-card,.kv-card):has(a:focus-visible){
  outline:2px solid white;outline-offset:-4px;box-shadow:inset 0 0 0 6px #191714;
}
html.c2-arm #work .cx-cell:focus-within{opacity:1}

/* the three heading roles */
html:not(#_) :is(
  html.cs main h1                                    /* About, Method, Contact, case studies index, case pages, team pages, the sheet */
){font-family:var(--font-display) !important;font-weight:var(--t-weight) !important;font-size:var(--t-title) !important;
  line-height:var(--t-title-lh) !important;letter-spacing:var(--t-track) !important}

html:not(#_) :is(
  #services .c2-intro>h2, #work .kv-title, #ww-h, #why-us .bl.hd>h2, #rules .pr-intro>h2,   /* homepage sections */
  footer .ft-close>h2,                                                                      /* the footer's closing line, every page */
  html.cs main h2:not(.fp-h):not(.ct-card>h2)                                               /* subpages: each section's heading */
){font-family:var(--font-display) !important;font-weight:var(--t-weight) !important;font-size:var(--t-section) !important;
  line-height:var(--t-section-lh) !important;letter-spacing:var(--t-track) !important}

html:not(#_) :is(
  #services .servicecopy>h3, #who-we-work-with .ww-copy>h3, #rules .pr-slide>h3,             /* homepage cards and panels */
  html.cs main h3, html.cs main .fp-h, html.cs main .ct-card>h2,                             /* subpages: cards, tiles, panels */
  html.cs main .fr-yr .ev b                                                                  /* About's year events (the years themselves are display figures) */
){font-family:var(--font-display) !important;font-weight:var(--t-weight) !important;font-size:var(--t-card) !important;
  line-height:var(--t-card-lh) !important;letter-spacing:var(--t-track) !important}

/* one left edge: the Klaviyo case studies copy set its heading 4px in from the container (56 against 60 at 1440, 16
   against 20 on a phone); it now starts where every other section heading does */
html:not(#_) #work .copy-klaviyo .kv-head{padding-left:max(var(--gutter,20px),calc((100% - var(--shell,1320px)) / 2)) !important;
  padding-right:max(var(--gutter,20px),calc((100% - var(--shell,1320px)) / 2)) !important}

/* intro: the first paragraph under a page title */
html:not(#_) :is(html.cs main .cs-hero-copy>p.lede, html.cs main .ab-say>p.lede, html.cs main .mt-hero-say>p.lede,
  html.cs main .ct-head p.stand, html.cs main .hub-head p.cs-lede, html.cs main .sy-intro, html.cs main .pp-say>p:not(.pp-role):not(.ab-stance)){
  font-family:var(--font) !important;font-size:var(--t-intro) !important;line-height:var(--t-intro-lh) !important;font-weight:400 !important}

/* body: paragraphs in sections and cards */
html:not(#_) :is(
  #services .servicecopy>p, #who-we-work-with .ww-copy>p, #rules .pr-slide>p,
  html.cs main .cs-sub>p:not(.small), html.cs main .cs-story>section>p:not(.small), html.cs main .txt>p,
  html.cs main .qa-a p, html.cs main .ct-card>p,
  html.cs main .fr-say p, html.cs main .pp-bio>p:not(:first-child), html.cs main .pp-chess-copy>p, html.cs main .cs-tl-list>li, html.cs main .fr-yr .ev p
){font-size:var(--t-body) !important;line-height:var(--t-body-lh) !important}
/* on a phone the pages that already used 16px for body keep it, so nothing grows longer: the homepage, Contact, About and
   the team pages, and Bustem's timeline list */
@media (max-width:700px){
  html:not(#_) :is(#services .servicecopy>p, #who-we-work-with .ww-copy>p, #rules .pr-slide>p, html.cs main .qa-a p,
    html.cs main .ct-card>p, html.cs main .fr-say p, html.cs main .pp-bio>p:not(:first-child), html.cs main .pp-chess-copy>p,
    html.cs main .cs-tl-list>li, html.cs main .fr-yr .ev p){font-size:16px !important;line-height:24px !important}
}

/* The opening paragraph of each team profile is an intro. */
html.cs:not(#_) main .pp-slab .pp-bio>p:first-child{
  font-size:var(--t-intro) !important;line-height:var(--t-intro-lh) !important;
}

/* small: captions, sources and notes */
html:not(#_) :is(html.cs main figcaption, html.cs main p.small, html.cs main p.note, html.cs main p.src, html.cs main .v>p.vt, html.cs main .fr-person-meta>p){
  font-size:var(--t-small) !important;line-height:var(--t-small-lh) !important}

/* section spacing: ordinary stacked sections get --sec-y between one section and the next. Left alone: the homepage
   (hero, Services, Case studies, Who we work with, Five rules and Why work with us are pinned, one screen tall or
   scroll-driven), page heroes, the case pages' dark results band, the case studies index's websites wall (scroll room),
   About's years (scroll-driven) and the reading column inside a case page */
html:not(#_) :is(html.cs .mt-map-sec, html.cs .mt-principles,
  html.cs .sy-sec){
  padding-top:var(--sec-y) !important;padding-bottom:0 !important}
html:not(#_) :is(html.cs main>section:last-of-type, html.cs main>section.mt-principles,
  html.cs main .sy-sec:last-of-type){padding-bottom:var(--sec-y) !important}

.page-section{padding-block:var(--sec-y)}
@media(min-width:761px){
  html.c2-polish .c2-models,.page-section:not(.page-section-fit){min-block-size:var(--section-screen)}
  .page-section:not(.page-section-fit){display:grid;align-content:center}
}

/* motion: one curve for every CSS transition. Left alone: the hero, the case study copies inside #work (other agencies'
   layouts), and the transitions that move at constant speed on purpose (the slow Ken Burns drift on case films and
   stills, the list ticker, the flip board, the hero terrain). The selector's weight beats the pages' own rules without
   !important, so transitions a script sets inline (chart lines drawing, the principles' slides) keep their own curve.
   Durations are snapped to --dur-1/2/3 in the built stylesheets by into-site.mjs. */
html:not(#a):not(#b):not(#c) body *:not(#hero):not(#hero *):not(.cpy-host *):not(.ft):not(.cx-stills img):not(.ltu-it):not(.tb-flip):not(.hero-terrain):not(#why-us):not(#why-us *){
  transition-timing-function:var(--ease-1)}

/* Page and section headings with supporting text keep their desktop columns and
   stack on smaller screens. Homepage section headings sit on their own. */
@media (min-width:1000px){
  html:not(#_) :is(html.cs .mt-map-sec>.shell, html.cs .mt-principles>.shell,
    html.cs .cs-graph-sec .head:has(>#h-timeline), html.cs .ct-head>.shell, html.cs .hub-head>.shell, html.cs .sy-head>.shell, .section-heading){
    display:grid !important;grid-template-columns:minmax(0,1fr) minmax(0,440px) !important;column-gap:48px !important;row-gap:0 !important}
  .section-heading{align-items:end}
  html:not(#_) :is(html.cs .mt-map-sec>.shell, html.cs .mt-principles>.shell,
    html.cs .cs-graph-sec .head:has(>#h-timeline), html.cs .ct-head>.shell, html.cs .hub-head>.shell, html.cs .sy-head>.shell)>*{grid-column:1 / -1}
  html:not(#_) :is(html.cs .mt-map-sec>.shell>h2, html.cs .mt-principles>.shell>h2,
    html.cs .cs-graph-sec .head>#h-timeline, html.cs .ct-head>.shell>h1, html.cs .hub-head>.shell>h1, html.cs .sy-head>.shell>h1, .section-heading>h2){
    grid-column:1 !important;align-self:end;margin-bottom:0 !important;max-width:none}
  html:not(#_) :is(html.cs .mt-map-sec>.shell>h2+p, html.cs .mt-principles>.shell>h2+p,
    html.cs .cs-graph-sec .head>#h-timeline+p, html.cs .ct-head>.shell>h1+p, html.cs .hub-head>.shell>h1+p, html.cs .sy-head>.shell>h1+p, .section-heading>h2+p){
    grid-column:2 !important;align-self:end;margin:0 !important;max-width:none !important;text-align:left !important}
}
/* Section leads use body size. Page intros keep their own size. */
html:not(#_) :is(html.cs .mt-map-sec>.shell>h2+p,
  html.cs .mt-principles>.shell>h2+p, html.cs .cs-graph-sec .head>#h-timeline+p, .section-heading>h2+p){
  font-family:var(--font) !important;font-size:var(--t-body) !important;line-height:var(--t-body-lh) !important;font-weight:400 !important;color:#4a443c}
@media (max-width:999px){
  html:not(#_) :is(html.cs .mt-map-sec>.shell>h2, html.cs .mt-principles>.shell>h2,
    html.cs .cs-graph-sec .head>#h-timeline){margin-bottom:0 !important}
  html:not(#_) :is(html.cs .mt-map-sec>.shell>h2+p, html.cs .mt-principles>.shell>h2+p,
    html.cs .cs-graph-sec .head>#h-timeline+p, .section-heading>h2+p){margin-top:18px !important;text-align:left !important}
}

/* Homepage glass for service, audience, rules and About panels. */
.glass-panel{position:relative}
html:not(#_) .glass-panel,
html:not(#_) :is(#services .service,#who-we-work-with .ww-sheet,#rules .pr-panel){
  border-radius:var(--card-radius) !important;box-shadow:var(--card-shadow) !important;
  background:var(--glass-face,var(--card-glass)) !important;
  -webkit-backdrop-filter:var(--glass-filter,var(--card-filter)) !important;
  backdrop-filter:var(--glass-filter,var(--card-filter)) !important}
html:not(#_) .glass-panel::after,
html:not(#_) :is(#who-we-work-with .ww-sheet,#rules .pr-panel)::after{
  content:'';position:absolute;inset:0;border-radius:inherit;z-index:5;pointer-events:none;
  background:var(--card-sheen) !important;box-shadow:var(--card-rim) !important}
/* Opaque tinted backing prevents text from lower cards showing through the pinned stack. */
html:not(#_) #who-we-work-with .ww-sheet{isolation:isolate;padding:var(--card-pad) !important;gap:var(--card-gap) !important;
  background:var(--card-glass),linear-gradient(145deg,#e6dfea,#d8d1e2) !important}
html:not(#_) #who-we-work-with .ww-sheet.ww-t0{background:var(--card-glass),linear-gradient(145deg,#f3e1d0,#e6d6d4) !important}
html:not(#_) #who-we-work-with .ww-sheet.ww-t2{background:var(--card-glass),linear-gradient(145deg,#f3ede1,#e4dce0) !important}
/* Keep the stack opaque during entry so the previous card's words never show through. */
html:not(#_) #who-we-work-with.ww-anim .ww-sheet{opacity:1 !important;transition-property:translate !important}
html:not(#_) #who-we-work-with .ww-sheet h3 span{color:inherit}
html:not(#_) #who-we-work-with .ww-pic{border:0;box-shadow:none !important;
  background:radial-gradient(ellipse at 50% 100%,rgba(244,168,105,.2),transparent 68%) !important}
html:not(#_) #who-we-work-with .ww-q :is(.ww-row,.ww-prof,.ww-rank,.ww-total){
  background:var(--card-glass) !important;box-shadow:var(--object-shadow) !important;
  border:1px solid rgba(255,255,255,.75);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
html:not(#_) #who-we-work-with .ww-pill{background:rgba(255,255,255,.38);color:#5a4e63}
/* The orange dots remain crisp; the inset drawing area loses its separate heavy frame. */
html.s24-rglass:not(#_) #rules .pr-panel::before{box-shadow:none !important;
  background:radial-gradient(ellipse at 50% 100%,rgba(244,168,105,.2),transparent 68%) !important}
/* One heading-to-content gap, without adding a second margin to existing header padding. */
html:not(#_) :is(#services .c2-intro,#rules .pr-intro){padding-bottom:var(--section-head-gap) !important;margin-bottom:0 !important}
html:not(#_) #who-we-work-with .ww-head{margin-bottom:0 !important;padding-bottom:0 !important}
html:not(#_) #who-we-work-with .ww-stack{margin-top:var(--section-head-gap) !important;gap:var(--card-gap) !important}
html:not(#_) :is(#rules,#who-we-work-with){padding-top:var(--sec-y) !important;padding-bottom:var(--sec-y) !important}
