/**
 * The Traffic Plans Company - Shared Internal-Page Components (ported THEA-900)
 *
 * The internal-page hero tier (.tpc-shero / .tpc-shero--orange / --sub /
 * --split), the trust strip (.tpc-proof / .tpc-proof--strip), the tile
 * showcase (.tpc-showcase) and the testimonial carousel (.tpc-notepad,
 * case-studies.php) named explicitly in the THEA-900 brief. Not "chrome"
 * (header/menu/dock/footer live in chrome.css) but still shared,
 * founder-approved vocabulary every internal page must reuse rather than
 * reinvent, per 02-Rollout-2/docs/internal-page-benchmark.md.
 *
 * Mechanically extracted via scripts/extract-chrome-css.py from:
 *   - 02-Rollout-2/hifi/services.css   (.tpc-shero--orange/--sub/--split is
 *     authored here in full - the home page has no secondary hero)
 *   - 01-Rollout-1/hifi/homepage.css   (.tpc-proof base grid, .tpc-showcase
 *     tile card, .tpc-notepad testimonial carousel, .tpc-headstack - all
 *     originate on the home page and are reused by reference on internal
 *     pages per the benchmark's rule 0)
 *
 * REGENERATED (THEA-900 1:1 parity pass): see chrome.css's header comment
 * for the extraction script bug this fixes (silently dropped @media
 * wrappers around some rules) and why every extraction was re-run.
 *
 * Depends on design-tokens.css + components.css (.shero__* BEM typography,
 * band system) loading first.
 */

/* ════════════ from 02-Rollout-2/hifi/services.css (.tpc-shero family) ════════════ */

/**
 * The Traffic Plans Company - Services Hub (/services/)
 * Rollout 2 - THEA-682
 *
 * ARCHITECTURE: this file is PAGE-SPECIFIC ONLY. All site furniture (header,
 * burger menu, action dock, footer, opening splash, buttons, .tpc-eyebrow,
 * .tpc-textlink, .tpc-section-head, .render-placeholder) is reused BYTE FOR
 * BYTE by linking 01-Rollout-1/hifi/homepage.css directly (see services.html
 * <head>) rather than re-typing thousands of lines of shared chrome CSS -
 * per PROJECT-DECISIONS.md standing rule "reuse the site furniture, do not
 * reinvent it". Do not duplicate a furniture selector in this file: if a
 * class already resolves from design-tokens.css / components.css /
 * homepage.css, style it there or not at all.
 *
 * Band system: every content section below is `.band .band-<colour>` from
 * design-tokens.css, so heading/body colour resolves automatically via the
 * --band-* custom properties. Never hardcode asphalt/ink/white here.
 */

/* ─────────────────────────────────────────────────────────────────────
   SHERO - split variant. Base .shero__* typography is components.css;
   this file only adds the two-column grid + media slot, since the base
   secondary-hero component ships single-column only.
   Was founder-overridden LIGHT per PROJECT-DECISIONS.md (2026-08-06); v1.1
   (THEA-682, 2026-08-27) overrides that again to ORANGE, per direct
   founder instruction on this issue - see .tpc-shero--orange below.
   ───────────────────────────────────────────────────────────────────── */
.tpc-shero--split .band__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--primitive-space-8);
  align-items: center;
}
.tpc-shero--split .shero__inner { max-width: none; }

/* v1.1 (THEA-682) - ORANGE GROUND. Reference checked: homepage.css
   .tpc-hero and .tpc-hero::before - same two colour stops
   (--primitive-orange -> #E8611C), same locally-scoped --tpc-cone-orange
   var for the same reason that file gives (not a design-tokens.css
   primitive, this orange only exists on a hero ground). No bloom/drift/
   scroll-wash ported over: home's hero cross-fades to white as you
   scroll past it, this hero doesn't - it holds the ground for its one
   full-viewport screen, so the animated wash machinery has nothing to
   drive. Text colour resolves through the existing --band-* custom
   properties (same mechanism every other band colourway uses in
   design-tokens.css), not hardcoded onto individual selectors. */
.tpc-shero--orange {
  --tpc-cone-orange: #E8611C;
  --band-bg: linear-gradient(180deg, var(--primitive-orange) 0%, var(--tpc-cone-orange) 100%);
  --band-heading-text: var(--primitive-white);
  --band-h2-text: var(--primitive-white);
  --band-body-text: var(--primitive-white);
}
.tpc-shero--orange.band {
  min-height: 42vh;
  min-height: 42svh;
  padding-block: var(--primitive-space-7);
  display: flex;
  align-items: center;
}
/* ─────────────────────────────────────────────────────────────────────
   SUB-PAGE HERO TIER - v1.38. Founder 2026-08-28, reviewing the first service
   sub-page: "the hero section needs to be smaller in height because it is a
   sub page off an internal page".

   So there are now TWO hero tiers, and which one a page uses is decided by
   where it sits, not by taste:
     .tpc-shero--orange        42vh   an internal page (Services, About, Contact)
     .tpc-shero--orange--sub   30vh   a page hanging off one of those

   It lives HERE, not in the sub-page's own stylesheet, because THEA-684 cuts
   two more service pages from this template and a third page's fix has to
   reach the first two. A tier defined per-page would drift the moment there
   are three of them.

   Only the height changes. The gradient, the two-up grid, the type scale and
   the no-CTAs rule are all inherited untouched, so the two tiers read as the
   same component at two weights rather than two different heroes. */
.tpc-shero--orange.tpc-shero--sub.band {
  min-height: 30vh;
  min-height: 30svh;
  /* one step down from the internal page's space-7 */
  padding-block: var(--primitive-space-6);
}
/* THEA-798 - LAPTOP WIDTHS ONLY (1025-1536), header collision. This tier's
   breadcrumb rose into the fixed header's logo on TMP & TGS and CTMP at
   1440 (the column starts at 81px and the logo spans 46-102px, y 40-96 -
   measured 2026-10-07). blog.css's .tpc-shero--orange.tpc-shero--sub.band
   carries the equivalent fix unconditionally (same formula, every width),
   because its own pages had no "leave 1990 untouched" constraint. This one
   does - the brief that raised this item was explicit that the fix is
   scoped to laptop widths only and must not move anything at the founder's
   ~1990px working viewport, where this hero already read correctly. The
   full clamp()-based formula keeps growing with vh/vw past 1440 (it only
   caps at 1882px wide / 1364px tall), so applying it unscoped would have
   pushed this hero's content down at 1990 too - confirmed by measuring the
   unscoped version before adding this media query. Capped at 1536px
   (comfortably above 1440, short of 1990) so this hero is untouched at the
   founder's own viewport; 1025px floor keeps it out of the tablet rules
   that already govern this hero below 1024. */
@media (min-width: 1025px) and (max-width: 1536px) {
  .tpc-shero--orange.tpc-shero--sub.band {
    padding-top: calc(clamp(34px, 4.4vh, 60px) + clamp(56px, 3.4vw, 64px) + var(--primitive-space-4));
  }
}

/* min-height alone does NOTHING here, and the reason is worth recording because
   it cost two passes: this hero's height is set by whichever COLUMN is taller,
   never by min-height, and the media column wins.

   There are TWO aspect ratios stacked in that column, and releasing only the
   outer one makes the hero TALLER, not shorter:
     .tpc-shero__media            aspect-ratio: 1531/1027  -> 383px  (the hub's,
       and it exists purely to hold the slot open for the hub's absolutely
       positioned hero worker - meaningless on a page with an in-flow image)
     .render-placeholder          aspect-ratio: 4/3        -> 429px  (takes over
       the moment the outer one is set to auto, which is what happened first)

   So the tier states its own ratio on the SLOT and lets the placeholder fill it,
   rather than releasing anything. 16/9 on a 571px column is 321px, which brings
   the hero in comfortably under the hub's and holds when the placeholder is
   swapped for the real render. */
.tpc-shero--sub .tpc-shero__media { aspect-ratio: 16 / 9; }
.tpc-shero--sub .tpc-shero__media .render-placeholder {
  aspect-ratio: auto;
  height: 100%;
  min-height: 0;
}

/* v1.3 (THEA-682) - founder asked to shrink the hero "much smaller" than the
   v1.2 60vh cut, explicitly authorising a smaller heading if that's what it
   takes. The base --primitive-size-h1 clamp (up to 60px) plus the section's
   96px block padding was the floor stopping 60vh -> 42vh from reading as any
   shorter, so this scopes both a smaller heading and a tighter padding-block
   to this one hero only - the global .h1 token used by every other page is
   untouched. */
.tpc-shero--orange .shero__title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
}
.tpc-shero--orange .shero__intro {
  font-size: 16px;
}
.tpc-shero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--primitive-space-4);
  margin-top: var(--primitive-space-6);
}
.tpc-shero__media .render-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: var(--card-radius);
}
@media (max-width: 1024px) {
  .tpc-shero--split .band__inner { grid-template-columns: 1fr; gap: var(--primitive-space-6); }
  .tpc-shero__media { order: -1; }
}



/* MOVED to just after the base .tpc-showcase rule, further down this file.
   Both are (0,1,0), so source order decides, and declaring the modifier FIRST
   meant the base's `repeat(3, ...)` won: the two-tile comparison on the
   TMP/TGS page rendered as three columns with the third empty, leaving the
   pair hard against the left with 430px of white beside it (founder, 16 Nov).
   In the hi-fi they live in different sheets, homepage.css then services.css,
   so the modifier came second and won. */

/* v1.52 - RESPONSIVE (THEA-685). This grid never collapsed at any width on
   any of the four pages that use it (hub paths, TMP/TGS comparison, CTMP's
   two four-tile sections, Specialist's closing pair). At true mobile widths
   two tiles were squeezed into columns as narrow as ~160px. One column below
   600px, matching the mobile threshold .tpc-why__list--four already uses on
   this same page. */
@media (max-width: 600px) {
  /* v1.60 - 2026-09-30, RESPONSIVE FIX. Plain `1fr` still carries its
     automatic minimum size (the item's min-content), so a tile whose content
     needs more than the available column width forced the track wider than
     .band__inner and overflowed the page horizontally - measured on
     specialist-services.html's white-band pair at 390px: track computed to
     385px inside a 327px column, 34px of real horizontal scroll. `minmax(0,
     1fr)` zeroes that automatic minimum, exactly like the desktop rule above
     already does, so the single column can shrink to fit instead of forcing
     an overflow. */
  .tpc-showcase--two { grid-template-columns: minmax(0, 1fr); }
}

/* v1.6 - founder: widen the tiles so the CTA and the bottom of the card are in
   view. Widening ALONE does the opposite, which is worth recording: the media
   well is aspect-ratio 16/9, so a wider card gets a proportionally taller
   image. Measured going from 403px to the full 642px column: the well grows
   192 -> 327px (+135) while the copy only reflows about 63px shorter, a NET
   +72px taller card. No tile width fixes it while 16/9 is locked, because the
   image grows faster than the paragraph shrinks.
   So the well is given a height instead of a ratio. It already carries
   object-fit: cover, so the clip re-crops rather than distorting, and a wide
   short well is the right proportion for a wide card anyway. Measured result:
   card 592 -> about 470px, which puts the CTA and the card's bottom edge clear
   of the dock's tab line at this viewport. */
.tpc-showcase--two .tpc-showcase__media {
  aspect-ratio: auto;
  /* v1.46 - founder: make the image wells taller, and hold the SAME size across
     the hub and both service pages. Was clamp(150px, 16vh, 185px), set at v1.7
     when the ask was the opposite (reduce the tile height); that instruction is
     superseded.

     This is now the single source for all three pages. The value was already
     running on the two service pages as a page-local copy, so the hub is being
     brought up to meet them rather than a fourth number being invented.

     CONSOLIDATION: the grid rules below were also duplicated on both service
     pages. They live here now and the copies are gone, per the project's
     "reuse by reference, not by retyping" rule. One full-width, full-height
     track: grid-template-ROWS matters as much as columns, because with an auto
     row the track sizes to its content and `height: 100%` on the child is
     circular, which is what left a placeholder at 35% of its well. */

  /* v1.47 - taller again, on founder instruction. 288px is not another guess:
     the well is 512 wide and most tile renders are 1.770 (1200x678, 1672x941),
     so 512/1.770 = 288px is exactly the height at which those images show
     WHOLE, with no vertical crop at all. Below it the well was throwing away
     real image; above it the crop switches to taking width instead.
     The two odd ones out, tile-larger-project (1.491) and tmp-strategy-planning
     (1.333), still crop, which is what their measured object-position values
     are there to handle.
     30vh keeps it proportional, capped at 320 so tall screens do not start
     cutting noticeable width off the 1.770 images. */
  height: clamp(288px, 30vh, 320px);
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  justify-content: stretch;
  align-content: stretch;
}
/* Every well is filled edge to edge, image or placeholder. */
.tpc-showcase--two .tpc-showcase__media .render-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  min-height: 0;
}

/* ─────────────────────────────────────────────────────────────────────
   NUMERAL WELLS ARE THE ONE EXCEPTION, v1.49.

   A step tile puts a numeral in its well instead of an image, and pages style
   it with `.tpc-showcase__media--numeral { display: grid; place-content: center }`.
   That rule is a single class (0,1,0). The stretch rules above are two
   (0,2,0), so when they were promoted here at v1.46 they started winning, the
   1fr row filled the well, the numeral stretched to fill the row, and its
   digits sat hard against the TOP of a 288px box instead of its middle.

   The taller the well got, the more obvious it became: this only looked
   correct while the well was short. Centring the ITEM rather than the content
   fixes it without giving up the full-height track the images need.

   Guarded here, beside the rules that caused it, rather than on the one page
   that showed it, so any two-up numeral tile is covered. Three-up step tiles
   were never affected, since the stretch rules are scoped to --two. */
.tpc-showcase--two .tpc-showcase__media--numeral {
  place-items: center;
  place-content: center;
}

/* ─────────────────────────────────────────────────────────────────────
   TRUST STRIP - v1.9. The home page's .tpc-proof, reused verbatim. It sits
   below the hero as its OWN thin band in its own colour: v1.8 matched the hero
   gradient's end orange so the two read as one continuous ground, and the
   founder wants them visibly separate.

   Ground and type are both lifted from the home page's white knights section
   (.tpc-why), so this strip is not inventing a colour:
     - the red is that section's exact two-stop ramp, signal-red mixed toward
       asphalt. Copied as the same color-mix expressions rather than flattened
       to a hex, so it tracks --primitive-signal-red. If the white knights red
       is ever retuned, retune this with it - they are a pair.
     - the gold is that section's accent, color-mix(orange 55%, white), the
       colour its "Flag an urgent request" link uses.
   Contrast checked before shipping, since gold on red is the kind of pairing
   that quietly fails: the gold measures 4.70:1 on the lighter end of the ramp,
   which is the worst case here, so it clears the 4.5:1 AA floor for the small
   labels as well as the stats.

   THIN is the brief, so the padding is tight and the labels are held to one
   line each - .tpc-proof__label's stock 18ch measure wraps them to two and
   three lines, which is what makes the strip deep rather than thin.
   ───────────────────────────────────────────────────────────────────── */
.tpc-proof--strip {
  /* FLATTENED 2026-09-29 on founder instruction. Was a 180deg ramp from an
     80% to a 72% signal-red mix - about TWELVE 8-bit levels of difference
     spread over a 96px band. That is imperceptible as a gradient but it is
     exactly the kind of near-flat ramp that dithers on an 8-bit display and
     that a lossy encoder quantises unevenly: in screenshots it produced a
     phantom "darker rectangle" whose edge landed on the content grid's
     boundary, because blocks containing text encode differently from flat
     ones. 76% is the midpoint of the two stops, so the band keeps the same
     average tone it always had.
     KEEP IN STEP: about.css's .tpc-story-sec--short::before seam is painted
     in this exact colour so the strip dissolves into the chapter below it
     with no step. Change one and you must change the other. */
  background: color-mix(in srgb, var(--primitive-signal-red) 76%, var(--primitive-asphalt));
  padding-block: clamp(14px, 1.8vh, 22px);
}
.tpc-proof--strip .tpc-proof__stat,
.tpc-proof--strip .tpc-proof__star,
.tpc-proof--strip .tpc-proof__label {
  color: color-mix(in srgb, var(--primitive-orange) 55%, var(--primitive-white));
}
.tpc-proof--strip .tpc-proof__item { gap: 2px; }
.tpc-proof--strip .tpc-proof__stat { font-size: clamp(20px, 1.9vw, 26px); }
.tpc-proof--strip .tpc-proof__stat--word { font-size: clamp(16px, 1.5vw, 20px); }
.tpc-proof--strip .tpc-proof__label { max-width: none; font-size: 12.5px; }



/* v1.21 - founder: all three tile headings sit on two lines, so the cards read
   as a set rather than one wrapping and two not. Block spans, not <br> and not
   a width cap: the same technique .tpc-close__title uses on the home page, which
   leaves the words and the space between them untouched and puts the break
   exactly where it is wanted rather than wherever the measure happens to fall.
   Scoped to this grid - the two-up paths tiles above keep their natural wrap. */
.tpc-showcase--specialist .tpc-showcase__title span { display: block; }

/* v1.52 - RESPONSIVE (THEA-685). Set at the desktop 3-up column width. This
   grid drops to 2-up at <=1024px and 1-up at <=700px (homepage.css), both
   substantially wider per-card columns, so the fixed break point stops being
   the safe one. Natural inline flow at those widths, same reasoning as the
   why-list fix above. */
@media (max-width: 1024px) {
  .tpc-showcase--specialist .tpc-showcase__title span { display: inline; }
}



/* v1.25 - THE HERO WORKER, scaled up and cropped by the band.
   Founder: much bigger, legs cut off at the bottom of the hero, head staying
   exactly where it is, paper never cropped, and the hero's own height unchanged.

   Those four pull against each other, so the numbers are derived rather than
   eyeballed. Measured off the asset's alpha channel, as fractions of its height:
     head top    2.92%      feet     94.06%      lowest white (the plan) 69.72%
   and off the live hero: slot 571x383 inside a 479px section, head at y59.

   HEIGHT UNCHANGED is the constraint that shapes the whole approach. The slot
   used to take its height from the image itself, so simply enlarging the image
   would have grown the row and with it the section. Instead the image comes OUT
   of flow and the slot holds the height on its own via aspect-ratio - the
   image's own 1531/1027 - so the box the layout sees is identical to before and
   the section stays at its 479px. Verified: unchanged to the pixel.

   HEAD STAYS PUT falls out of one line. Scaling about the top-left would push
   the head down by the growth times its 2.92% offset, so `top` pulls back by
   exactly that: (1 - scale) x 2.92%. Any scale keeps the head at y59.

   SCALE 1.5 is the founder's "much bigger" inside the one hard limit - the
   paper. At 1.5 the plan's lowest point lands 36px above the crop; 1.64 is
   where it would start to be cut, so there is real headroom rather than a
   value that only just works. The legs cross the section edge 104px down and
   the band clips them there.
   Horizontally he is centred on his slot, which at this scale puts him between
   x1109 and x1513 - clear of the copy (ends 949) and inside the band (1905). */
.tpc-shero--orange.band { overflow: clip; }   /* this is what crops his legs */

.tpc-shero__media {
  position: relative;
  aspect-ratio: 1531 / 1027;   /* the worker's own, so the slot keeps its height */
}

.tpc-shero__worker {
  --worker-scale: 1.5;
  display: block;
  position: absolute;
  left: 50%;
  top: calc((1 - var(--worker-scale)) * 2.92%);   /* 2.92% = his head, from the alpha scan */
  height: calc(var(--worker-scale) * 100%);
  width: auto;
  transform: translateX(-50%);
}

/* v12.24 - THE HUB HERO IS AN OBJECT CLUSTER, THE SUB HEROES ARE STILL FIGURES.
   services-hero-worker is no longer the 3D worker: it is the founder-supplied
   cartoon workstation cluster, replacing the mascot the client's image audit
   marked REPLACE. The rule above is built around a tall, narrow person, and a
   wide cluster cannot use it: measured at 1440 the image rendered 857x575 in a
   571x383 slot, 143px over each side and 186px over the bottom.

   v12.23 changed the base rule to fix that, which was wrong. services.css is
   also loaded by construction-tmp-ctmp, specialist-services and
   traffic-management-plans-tgs, so the change silently reached three
   client-approved heroes that still carry a figure. Only the hub hero lacks
   .tpc-shero--sub, so the cluster treatment is scoped to that. */
/* REMOVED from this GLOBAL sheet, 16 Nov. It is the services hub's cluster
   treatment, and in the hi-fi it lives in services.css, which only
   services.html and the three service detail pages link. The detail pages
   carry .tpc-shero--sub, so `:not()` excludes them: in the hi-fi this rule
   reaches exactly ONE page.

   Here it sat in page-components.css, which every page loads, so it also hit
   Case Studies, Contact and Areas We Service, flattening --worker-scale from
   1.72 to 1 and forcing object-fit: contain. Their hero figures rendered
   571x383 instead of 528x659, which is what the founder saw.

   services-hub.css carries the same rule and is enqueued on the services
   page alone, so that page is unaffected by this removal. */

/* Below 1024px the columns stack and he sits above the copy, where an
   overflowing figure would run into it. Back to the in-flow, uncropped
   arrangement there. */
@media (max-width: 1024px) {
  .tpc-shero--orange.band { overflow: visible; }
    /* v12.23 - CLEARANCE FOR THE FIXED HEADER. The media starts 47px down while
       the logo tile runs to 90px, so the two have always overlapped here. It was
       invisible while the asset was a tall figure: that top band of the PNG was
       transparent, so the logo simply sat over nothing. The object cluster
       actually occupies it, and the monitor bezel cut across COMPANY on the
       logo. Measured at 393x780, logo bottom 90 and media top 47, so 56px puts
       the content clear with a margin. */
    .tpc-shero__media { aspect-ratio: auto; }
    /* The 56px clearance rule that was here is NOT here any more.
       02-Rollout-2/hifi/services.css:685 is the only place the design
       states it, and that sheet is linked by services.html and the three
       service detail pages only. Globalised here it reached every hero
       with a media slot, so the five request-form pages and the team page
       stood 41px taller than the design at 390px with the image sitting
       56px low inside its box. Moved to services.css; services-hub.css
       already carried its own copy for the hub. */
  .tpc-shero__worker {
    position: static;
    height: auto;
    width: 100%;
    transform: none;
  }
}

   /* inert since v12.33: the old 1.491 asset cover-cropped 16.2% of its height and 77% pulled the window down onto the signs; the 1.7768 replacement shows whole */

/* ─────────────────────────────────────────────────────────────────────
   PATHS TILE TOP RULES - v1.31. Founder: the two paths tiles take their
   dock tab's gradient instead of the flat orange rule every other tile has.

   The ramps are the dock's own, same two stops and same custom-property names
   as .tpc-fork__card--primary / --secondary in homepage.css, so each tile is
   visibly the same route as the tab it corresponds to rather than a new pair
   of colours:
     I need a plan          #F7CE38 -> #FC210D   (yellow into red)
     larger project         #00D4FF -> #020024   (cyan into deep space)

   ANGLE IS THE ONE DELIBERATE DIFFERENCE. The tabs run their ramp at 150deg,
   which is mostly vertical - across a 3px strip that samples a single slice
   and would render as one flat colour, losing the gradient entirely. Run
   left-to-right instead, the full ramp is visible along the tile's width,
   which is the only orientation a 3px rule can actually show one in.

   MECHANISM: the rule is .tpc-showcase__tile's 3px border-top, and a border
   cannot take a gradient without border-image, which squares off the tile's
   rounded corners. So the border goes transparent and the colour is painted
   as a background stripe sized to exactly that 3px instead - which the
   border-radius clips correctly.
   background-origin: border-box is load-bearing. The default is padding-box,
   which would start the stripe BELOW the 3px border and leave the rule blank.
   (Same origin/clip trap that drew the dark seam on the menu's urgent button
   in v10.43 - worth knowing it cuts both ways.)
   ───────────────────────────────────────────────────────────────────── */
.tpc-showcase__tile--plan,
.tpc-showcase__tile--project {
  border-top-color: transparent;
  background-repeat: no-repeat;
  background-size: 100% 3px;
  background-position: top left;
  background-origin: border-box;
}
/* v1.32 - NO RED. The full flare ramp ends at #FC210D and put red in the rule.
   This is the yellow-to-brand-orange ramp homepage.css already uses on the
   drawer CTAs, whose own comment records the same decision for a different
   reason ("Ramp stops at brand orange rather than running to the flare red").
   Same two stops, so this is a system value rather than a new pair. */
.tpc-showcase__tile--plan {
  --tpc-flare-yellow: #F7CE38;
  background-image: linear-gradient(90deg, var(--tpc-flare-yellow) 0%, var(--primitive-orange) 100%);
}

/* v1.32 - THE BLUE STAYS BLUE. Running the source ramp end to end took it to
   #020024, which is 2% lightness - the "colour disappearing" was it going to
   near-black across the strip.
   The tab never shows that. Measured on the live dock: its panel is 411x564
   with a 694px gradient line at 150deg, and its 76px tab samples only
   t=0.047 to t=0.343 of the ramp - so what a visitor actually sees on that tab
   is #00CAF5 to #018BB4, cyan into a mid teal-blue, no black anywhere.
   Those are the two ends reproduced here, expressed as mixes of the SOURCE
   colours rather than pasted hexes so they still track --tpc-cyan and
   --tpc-deep-space if either is ever retuned. */
.tpc-showcase__tile--project {
  --tpc-cyan: #00D4FF;
  --tpc-deep-space: #020024;
  background-image: linear-gradient(90deg,
    color-mix(in srgb, var(--tpc-deep-space)  5%, var(--tpc-cyan)) 0%,
    color-mix(in srgb, var(--tpc-deep-space) 34%, var(--tpc-cyan)) 100%);
}

/* v1.32 - homepage.css repaints border-top-color to brand orange on
   .tpc-showcase__tile:hover / :focus-within. On every other tile that is the
   hover state of a flat orange rule; on these two it dropped an orange bar
   over the gradient. The border stays transparent here in every state - the
   rule's colour is the background stripe, not the border. */
.tpc-showcase__tile--plan:hover,
.tpc-showcase__tile--plan:focus-within,
.tpc-showcase__tile--project:hover,
.tpc-showcase__tile--project:focus-within {
  border-top-color: transparent;
}



/* ═══════════════════════════════════════════════════════════════════════
   THEA-800 MOBILE PARITY PASS, R2 (2026-10-21). Genuine phone-width (390-
   430px) design for the Services hub and the three service pages it is the
   shared pattern file for. Everything below is ADDITIVE inside
   `@media (max-width: 699px)` - the sitewide mobile breakpoint the dock fix
   in homepage.css already uses - and touches no pre-existing non-media-query
   selector. Desktop, and the existing 600/900/1024/1328px tablet rules
   above, are unchanged.

   Founder ruling this pass works to: mobile must not just reflow and not
   overflow (that bar was already cleared), it must keep "the same story, the
   same emotional beats, and the same path to conversion" a desktop visitor
   gets. Two kinds of fix below:
     1. Two GSAP character entrances (the pointing planner, the close-band
        planner) that homepage.css hides outright at tablet width and below
        (1279px / 900px) because their desktop positioning escapes off the
        viewport edge - a mobile visitor currently never sees either
        animation play at all, which is exactly the "character entrance that
        vanishes below a breakpoint" the brief calls a defect. Both return
        here in a composition built for one narrow column instead of the
        desktop edge-escape.
     2. The two/three-tile "choose between these" showcase rows
        (--two, --specialist), which are a side-by-side COMPARISON on desktop
        ("I need a plan" vs "I'm planning a larger project", TGS vs TMP, the
        CTMP feature/step sets). A plain 1-column stack (which is as far as
        the existing 600px rule took them) loses that comparison framing - a
        visitor has to scroll an entire card out of view before the thing
        it's being compared against appears. The fix reuses the SAME
        horizontal swipe-carousel mechanism homepage.css already ships for
        its own card rows at this exact breakpoint (MOBILE CARD ROWS,
        v10.62), so the whole site now has one carousel system rather than
        two. homepage.css's own carousel rule deliberately EXCLUDES any class
        containing "tpc-showcase--" (v10.63 fix, THEA-800/R5) because these
        modifier variants carry their OWN column-count override that fought
        it - so the declarations below fill exactly the gap that exclusion
        left, scoped to the two modifiers these four pages use. Values are
        copied from homepage.css's block so both carousels feel like one
        system. The matching dot-indicator JS lives in each page's own
        inline <script>, since homepage.html's version is page-local too.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 699px) {

  /* ───────────────────────────────────────────────────────────────────
     THE POINTING PLANNER, BACK ON MOBILE.
     homepage.css hides .tpc-why__pointer completely below 1279px: "the
     gutter is too tight to read as anything but a collision" - true of his
     desktop treatment, which escapes to the viewport's left edge via
     `left: calc(-1 * (100vw - 100%) / 2)`. That treatment cannot survive a
     390px screen, but the character himself can: shrunk right down and
     brought back in-flow, centred above the section heading. The picture
     element already sits immediately before .tpc-section-head in the DOM
     on every page that uses .tpc-pointer-band (the hub, TMP & TGS, CTMP,
     Specialist Services all identical), so making him static+block is
     enough to place him correctly with no markup change.
     charactersEnter()'s existing GSAP tween (xPercent: -120, i.e. 120% of
     HIS OWN width, not the viewport) still plays untouched - at this new
     scale that reads as a gentle ~100px slide-in rather than a trip across
     the screen, so the same entrance beat survives at phone width instead
     of never firing at all.
     Scoped to `.tpc-pointer-band .tpc-why__pointer`, a class pair that only
     exists on these four R2 pages (the home page's own equivalent section
     is `.tpc-why`, a different class entirely) - this cannot reach or
     change the home page's own hero/pointer treatment. ─────────────────── */
  /* FOUNDER 2026-10-22: "fix the positioning of this section so the man is
     actually flush against the side of the screen for mobile."
     The revival above centred him in flow, which reads as a floating sticker.
     He goes back to the desktop INTENT - shoulder on the screen edge - but
     without the desktop mechanism: `left: calc(-1 * (100vw - 100%) / 2)`
     needs a horizontally centred containing block and swings wildly negative
     at phone width, which is why it was abandoned here in the first place.
     Instead he stays in flow and is pulled out of the band's own inline
     padding with a negative margin, so his left edge lands on the viewport
     edge at any width without depending on the container's centring.
     margin-right: auto keeps him left rather than stretching. */
  .tpc-pointer-band .tpc-why__pointer {
    display: block;
    position: static;
    left: auto;
    top: auto;
    transform: none;
    /* FOUNDER 2026-10-22: "the man is actually flush against the side of the
       screen for mobile" - matching his desktop treatment, where he measures
       left: -2px.

       NOTE ON THE EARLIER REVERT: I first measured him at left: -122px and
       concluded the margin had failed. It had not. -122px is the RESTING
       state of charactersEnter()'s tween (`from: { xPercent: -120 }`,
       reversed by ScrollTrigger's onToggle whenever the cue section is out of
       view) - I had simply measured him before the trigger fired. The tween
       lands at xPercent 0, so CSS owns his final position and a margin is the
       correct mechanism after all.

       He is pulled out of the band's inline padding so his left edge reaches
       the viewport edge, rather than using the desktop's
       `left: calc(-1 * (100vw - 100%) / 2)`, which needs a centred containing
       block and swings wildly negative at phone width. */
    margin: 0 auto clamp(14px, 4vw, 22px) calc(-1 * var(--primitive-space-5, 24px));
    margin-right: auto;
    width: clamp(96px, 30vw, 140px);
  }

  /* ───────────────────────────────────────────────────────────────────
     THE CLOSE-BAND PLANNER, BACK ON MOBILE.
     homepage.css hides .tpc-close__figure below 900px: her desktop anchor
     (`margin-left: calc(var(--band-max, 1264px) / -2)`) assumes a desktop
     container width and swings wildly negative at phone width, so she is
     switched out of that positioning entirely here rather than shown
     broken. In flow, centred, sized by height the same way she always is,
     sitting below the heading/copy block that .tpc-close--split already
     stacks to one column at 900px (services.css, above) - same order as
     the DOM already gives it. Her GSAP entrance (yPercent: 70, a rise from
     below) still plays; at in-flow height that is a modest, appropriate
     rise rather than the desktop's cross-column slide.
     Scoped to `.tpc-close--split`, the modifier this page pattern alone
     adds to the shared .tpc-close band - the home page's own close band
     uses the plain, unmodified class and is untouched. ─────────────────── */
    /* The <=699px `.tpc-close--split .tpc-close__figure` rule that was here
       has moved to the page sheets. 02-Rollout-2/hifi/services.css,
       03-Rollout-3/hifi/request-forms.css, contact.css and case-studies.css
       each carry their own copy and homepage.css carries none, so a page
       that links none of them - areas, team, the knowledge hub, the blog,
       the two legal pages - takes the base .tpc-close__figure rule instead.
       Globalised here it reached all of them, and its hardcoded
       `margin-bottom: -72px` overrode the base rule's
       `calc(-1 * clamp(72px, 9vh, 132px))`: on a 900px-tall viewport that
       is -81px, so the close band stood 9px taller than the design on ten
       pages and pushed the whole footer down with it. */


  /* ───────────────────────────────────────────────────────────────────
     THE "CHOOSE BETWEEN THESE" TILE ROWS BECOME SWIPE CAROUSELS.
     Mechanism copied from homepage.css's MOBILE CARD ROWS (v10.62), so this
     is one carousel system, not a second one invented here.

     THEA-907: `.tpc-showcase.tpc-showcase--two` rather than bare
     `.tpc-showcase--two`. Both carry equal specificity against the base
     `.tpc-showcase { grid-template-columns: repeat(3, minmax(0,1fr)); }`
     rule further down this same file (THE 3-UP CARD GRID, below) - in the
     hi-fi's multi-file build the base rule lived in homepage.css, loaded
     BEFORE the page's own override, so source order alone made the
     modifier win. Consolidating both into this one foundation file put the
     base rule textually AFTER this block, so it silently won the cascade
     on every element that carries both classes (every .tpc-showcase--two
     container does) and the carousel never engaged: measured on
     specialist-services.html as two tiles peeking side by side at 390px
     instead of one tile filling the frame, ~500px of extra page height.
     The compound selector outranks the single-class base rule regardless
     of which one is declared last. */
  .tpc-showcase.tpc-showcase--two,
  .tpc-showcase.tpc-showcase--specialist {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
  /* FOUNDER 2026-10-22: "all carousels across the entire website for mobile
     need to be one tile in frame and centred."
     Was 84% wide with scroll-snap-align:start, which parks a tile against the
     left edge and leaves the next one peeking - the tile reads as off-centre.
     100% of the track's CONTENT box (the track is already bled edge to edge
     with margin-inline:-24px and padded back in) makes exactly one tile fill
     the frame, and center alignment puts it on the screen's centre line. */
    align-items: stretch;
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 24px;
    scrollbar-width: none;
    margin-inline: -24px;
    padding: 8px 24px 16px;
  }
  .tpc-showcase--two::-webkit-scrollbar,
  .tpc-showcase--specialist::-webkit-scrollbar { display: none; }
  .tpc-showcase--two > *,
  .tpc-showcase--specialist > * { scroll-snap-align: center; min-width: 0; }

  /* The fixed-height well (services.css, "CHOOSE YOUR PATH") was sized for
     a desktop multi-column card. At carousel width the tile is much
     narrower, so the well goes back to a plain 16/9 ratio rather than
     forcing the same crop onto a card a third the width. .tpc-showcase--
     specialist never had a fixed-height override (it already inherits the
     base aspect-ratio well from homepage.css), so only --two needs this. */
  .tpc-showcase--two .tpc-showcase__media {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}




/* ─────────────────────────────────────────────────────────────────────
   FOUNDER 2026-10-22: "across the entire website all text needs to be
   centred for mobile."

   This block lives HERE rather than only in homepage.css because of cascade
   ORDER, not specificity: every page links homepage.css first and its own
   sheet second, so a page-level `text-align: left` beats a sitewide rule of
   equal specificity no matter how the sitewide one is written. Verified on
   team.html, where the heading still computed `start` with the sitewide rule
   in place.

   Scope confirmed with the founder: marketing and content sections centre;
   long-form legal, blog post bodies and form fields stay left, because
   centring a 1,700-word document removes the left edge that clause-scanning
   depends on. Phone only - desktop is client-approved and frozen.
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 699px) {
  .band__inner, .band__inner h1, .band__inner h2, .band__inner h3,
  .band__inner p, .band__inner li,
  .tpc-sec, .tpc-section-head, .tpc-showcase__tile, .tpc-showcase__copy {
    text-align: center;
  }
  /* Carve-outs: these read worse centred. NOTE the doubled class - the
     obvious `.tpc-post__content *` is specificity (0,1,0) and LOSES to the
     `.band__inner p` above at (0,1,1), which is how the blog post body ended
     up centred on the first attempt. Doubling the class lifts each carve-out
     to (0,2,x) so it wins without resorting to !important. */
  .tpc-post__content.tpc-post__content,
  .tpc-post__content.tpc-post__content *,
  .tpc-legal-content.tpc-legal-content,
  .tpc-legal-content.tpc-legal-content *,
  .request-form-page .field.field,
  .request-form-page .field.field *,
  .request-form-page .field__label.field__label,
  .request-form-page .field__hint.field__hint,
  .request-form-page .form-row.form-row { text-align: left; }
}


/* ════════════ from 01-Rollout-1/hifi/homepage.css (.tpc-proof, .tpc-showcase) ════════════ */



/* ─────────────────────────────────────────────────────────────────────
   2. PROOF - five hard-credential stats
   ───────────────────────────────────────────────────────────────────── */

.tpc-proof__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--primitive-space-6);
  text-align: center;
}
@media (max-width: 1024px) { .tpc-proof__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .tpc-proof__grid { grid-template-columns: repeat(2, 1fr); } }

.tpc-proof__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-inline: var(--primitive-space-2);
}
.tpc-proof__stat {
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 800;
  color: var(--primitive-asphalt);
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.tpc-proof__stat--word { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: 0.02em; }
/* v2.0 - was an orange star glyph; at this size it's "large text" (bold,
   >=18.66px) which only needs 3:1, but orange still measures 2.31:1 on
   white and fails even that. No orange text anywhere on the light ground. */
.tpc-proof__star { color: var(--primitive-asphalt); font-size: 0.55em; }
.tpc-proof__label { font-size: 13.5px; color: var(--primitive-ink); max-width: 18ch; line-height: 1.4; }



/* Proof stat grid: the 2-up mobile tier (<600px, set in components.css'
   sibling rule at .tpc-proof__grid) leaves an odd count (5 items) with the
   5th sitting alone on a 3rd row, left-aligned under just the left column.
   Centring it reads as deliberate; the 3-up tablet tier (600-1023px) has no
   such orphan (3+2 fills both rows evenly) so this is mobile-only. */
@media (max-width: 599px) {
  .tpc-proof__item:last-child { grid-column: 1 / -1; max-width: 220px; margin-inline: auto; }
}



/* v6.1 - THE TRUST STRIP ON THE ORANGE. It moved inside the hero, so its
   light-ground colours no longer hold. Measured against the ramp it now sits
   on (#F4941D into #E8611C): white is 2.31:1 at the top and 3.41:1 at the
   foot, failing AA either way; asphalt is 6.89:1 and 4.66:1, passing both.
   So the strip takes ASPHALT rather than the white the headline above it
   uses - the ramp is simply too light to carry white at this text size, and
   this is the same rule the brand tokens already state for orange bands.
   The labels lift from ink to asphalt for the same reason: ink measures
   4.42:1 on TPC Orange, just under the 4.5 threshold. */
/* v6.2 - WHITE, at the founder's direction, replacing the asphalt v6.1 chose
   on contrast grounds. Recorded once so nobody "corrects" it later: measured
   against the ramp under the strip, white runs about 3.0-3.4:1. The stats are
   large bold text, so they sit on the 3:1 large-text threshold; the small
   labels beneath them do not meet the 4.5:1 body requirement. This is a
   founder decision taken with the numbers in hand, consistent with the same
   call already made on the dock tiles. Reverting to asphalt is the one-line
   fix if it is ever wanted (6.89:1 top, 4.66:1 foot). */
.tpc-hero .tpc-proof__stat { color: var(--primitive-white); }
.tpc-hero .tpc-proof__label { color: var(--primitive-white); opacity: 0.9; }
.tpc-hero .tpc-proof__star { color: var(--primitive-white); }
/* The strip is the hero's last element, so it carries the section's bottom
   spacing rather than sitting hard against the edge. */
.tpc-hero .tpc-proof { padding-block: var(--primitive-space-7) var(--primitive-space-8); }



/* The trust strip needs clear air beneath it or the fade would start behind
   its labels. Scaled with the longer seam. */
.tpc-hero .tpc-proof { padding-bottom: clamp(260px, 38vh, 480px); }
/* THEA-864 - the 38vh term was written for a desktop screen tall enough that
   38% of it is still a sensible gap. On a 390x844 phone 38vh resolves to
   320px, 60px clear of the clamp's own 260px floor, which is the minimum
   this already proved sufficient to clear the seam fade above. Pinning to
   that floor on mobile only removes 60px of pure dead air, no fade risk. */
@media (max-width: 699px) { .tpc-hero .tpc-proof { padding-bottom: 260px; } }



/* ════════════════════════════════════════════════════════════════════
   v6.81 - SERVICES SHOWCASE. Three tiles, all on screen, drifting gently.
   THE DRIFT IS BOUNDED ON PURPOSE. Each tile moves +/-7px, so two neighbours
   can close on each other by at most 14px. The stack gap is 44px, which leaves
   30px of clearance at the worst possible moment in the cycle: they can never
   touch, whatever phase they happen to be in. The periods are deliberately
   mismatched (7.5s / 8.6s / 9.4s) so the three never lock into unison and read
   as one sliding block, and the negative delays desynchronise them without a
   pause on load.
   Vertical only, no rotation, no scale: rotating or zooming a large panel is
   what makes idle motion uncomfortable to sit next to, and this section is
   read rather than glanced at.
   THE GROUND IS DARK ON PURPOSE. The founder's reference works because its
   panel is a deep violet, which carries white type. TPC's brand orange does
   not: white on #F4941D is 2.31:1 and on #E8611C 3.41:1, both under the 4.5:1
   body-text minimum. This ramp tops out at #C2540F where white still measures
   4.60:1, so the type holds at every point of the gradient.
   ════════════════════════════════════════════════════════════════════ */
.tpc-showcase {
  /* v6.82 - three across, at the founder's direction. Side by side also makes
     the drift inherently collision-proof: the tiles now sit in separate
     columns and still move only vertically, so they cannot reach each other at
     any phase. The +/-7px is kept because it is a comfort limit, not a
     clearance one. */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.9vw, 28px);
  /* v6.83 - stretch, not start: the founder wants all three the same height.
     The slot stretches, the tile fills it, and the copy column below grows so
     the CTA can be pushed to a common baseline instead of floating wherever
     its own paragraph happens to end. */
  align-items: stretch;
}

/* Modifier AFTER the base it modifies, so it wins on source order.
   `repeat(2, ...)` is the hi-fi's own value (02-Rollout-2/hifi/services.css
   line 225). */
.tpc-showcase--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tpc-showcase__slot { display: flex; }
/* v6.90 - THE DRIFT IS REMOVED at the founder's direction. The keyframes, the
   per-tile period offsets and the reduced-motion opt-out all go with it rather
   than being left dormant: a paused animation still creates a compositing
   layer per tile, and a dormant keyframe block is an invitation to switch it
   back on by accident. */
.tpc-showcase__tile {
  border-radius: 26px;
  overflow: clip;
  display: grid;
  /* One column inside the tile now. At a third of the width the copy/media
     split has nowhere to go, so the media sits above the copy - which is also
     the order the old cards used before the reference restyle. */
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: clamp(16px, 1.4vw, 24px);
  padding: clamp(20px, 1.7vw, 30px);
  /* v7.12 - solid #414142 at the founder's direction, replacing the rust ramp
     and its orange bloom. Flat rather than graded means the type contrast is a
     single known number instead of a range: white measures 10.20:1 on this,
     and the body copy at 92% white 9.0:1, so both clear comfortably wherever
     they sit on the tile. */
  background: #414142;
  box-shadow: 0 30px 70px rgba(34,34,34,0.28);
}

.tpc-showcase__copy {
  max-width: none;
  order: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
}
.tpc-showcase__title {
  margin: 0 0 clamp(11px, 1.2vw, 16px);
  font-size: clamp(19px, 1.45vw, 26px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--primitive-white);
}
.tpc-showcase__desc {
  margin: 0 0 clamp(18px, 2vw, 26px);
  font-size: clamp(13.5px, 0.92vw, 15px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}
/* v6.84 - .btn--primary, which is already exactly what the founder asked for:
   background var(--primitive-orange) with var(--primitive-asphalt) text. The
   token carries the note "orange ground text is always asphalt, never white",
   and the measurement backs it: asphalt on #F4941D is 6.89:1 where white would
   be 2.31:1. The .btn base border is 2px SOLID TRANSPARENT rather than a
   width, so there is no stroke to remove and the button keeps the same box as
   every other button on the page.
   margin-top:auto is what puts all three on one baseline now the tiles are
   equal height. */
/* v6.85 - WHITE label at the founder's explicit direction, overriding
   --btn-primary-text. Recording the number rather than the opinion: white on
   #F4941D is 2.31:1, against 6.89:1 for the asphalt this replaces, and 4.5:1
   is the threshold. Shipped as asked. */
.tpc-showcase__cta {
  margin-top: auto;
  align-self: center;
  color: var(--primitive-white);
}

/* Sized to the founder's stated intent - a video goes here - so it holds a
   16:9 box rather than shrink-wrapping the placeholder. */
.tpc-showcase__media {
  order: 1;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: rgba(20, 12, 6, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10), 0 18px 40px rgba(0,0,0,0.30);
  display: grid;
  place-content: center;
  text-align: center;
  color: rgba(255,255,255,0.72);
}
.tpc-showcase__media video,
.tpc-showcase__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 22px;
}

@media (max-width: 1024px) {
  .tpc-showcase { grid-template-columns: 1fr; gap: 26px; }
}


/* v6.99 - "Specialist services" on two lines. The other two titles wrap on
   their own; this one fits a single line at every width, so the break is made
   structural rather than left to chance. Block spans, so no <br> and no change
   to the words or the space between them. */
.tpc-showcase__title--stacked span { display: block; }


.tpc-showcase__title { text-transform: none; }



/* ══════════════════════════════════════════════════════════════════════
   WHAT WE DO TILES, ON THE HUB CARD PATTERN - v7.49. The founder asked for
   these to look like the Knowledge Hub cards with an orange accent, so the
   same recipe is applied: white ground, hairline border, a coloured cap along
   the top, and a soft shadow that deepens on hover.

   THE HOVER IS SHADOW AND BORDER ONLY, no lift. The hub cards rise 6px on
   hover, and these cannot: their drift is driven by GSAP, which owns the
   inline transform, so a CSS translate here would either be overwritten mid
   animation or fight it every frame. Shadow and border colour are free of that
   conflict and give the same "this is pickable" feedback.

   The centred copy stays centred. The hub cards are left aligned, but centring
   these was the founder's explicit call earlier and is not what the request
   was about.
   ══════════════════════════════════════════════════════════════════════ */
.tpc-showcase__tile {
  background: var(--primitive-white);
  border: 1px solid rgba(34, 34, 34, 0.10);
  border-top: 3px solid var(--primitive-orange);
  border-radius: var(--card-radius);
  box-shadow: 0 10px 30px rgba(34, 34, 34, 0.06);
  transition: box-shadow var(--primitive-duration-fast) var(--primitive-easing-out),
              border-color var(--primitive-duration-fast) var(--primitive-easing-out);
}
.tpc-showcase__tile:hover,
.tpc-showcase__tile:focus-within {
  box-shadow: 0 22px 48px rgba(34, 34, 34, 0.14);
  border-color: rgba(34, 34, 34, 0.16);
  border-top-color: var(--primitive-orange);
}

/* Type inverts back to the light-ground palette. Measured on white: asphalt
   16.1:1 for the title, ink 10.4:1 for the body, both far clear of 4.5:1. */
.tpc-showcase__title { color: var(--primitive-asphalt); }
.tpc-showcase__desc  { color: var(--primitive-ink); }

/* The media well was built for a dark tile - a near-black fill with a white
   inner hairline and a heavy drop shadow. On white all three read as grime, so
   it becomes a light well with a hairline in the same asphalt as the card
   border. The clips themselves are unchanged. */
.tpc-showcase__media {
  background: var(--primitive-panel-grey);
  box-shadow: inset 0 0 0 1px rgba(34, 34, 34, 0.08);
  border-radius: var(--card-radius);
  color: var(--primitive-ink);
}
/* The clip is taken OUT OF FLOW to fill the well. The well is a centred grid,
   so its track is content-sized, and `width:100%` on a video resolves against
   that track - which before metadata arrives is the browser's default 300x150,
   not the well. Measured mid-load: a 341x192 well holding a 300x150 video.
   On the old dark tile that was invisible, dark on dark; on a white well it
   shows as an obviously undersized grey rectangle until the file lands, which
   is exactly what a visitor on a slow connection would see. Absolute
   positioning removes the dependency on intrinsic size entirely. */
.tpc-showcase__media { position: relative; }
.tpc-showcase__media video,
.tpc-showcase__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--card-radius);
}



/* ══════════════════════════════════════════════════════════════════════
   TABLET AND MOBILE, v7.95. Audited at 819px and 485px rather than assumed;
   the page had no horizontal overflow at either, so this is about the two
   places where the layout was making poor use of the width, not about
   rescuing anything broken.
   ══════════════════════════════════════════════════════════════════════ */

/* ── TABLET: two up, not one.
   Both card grids dropped straight from three columns to ONE at 1024px, so a
   819px tablet was showing full-width cards with a 16:9 video on each and an
   enormous amount of scrolling for three items. Two across is the shape that
   width actually wants. The third card sits alone on the second row, which
   reads as a deliberate 2+1 rather than a broken grid. */
@media (min-width: 700px) and (max-width: 1024px) {
  .tpc-showcase  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpc-hub-grid  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}



/* ══════════════════════════════════════════════════════════════════════
   v10.62 - MOBILE CARD ROWS = SWIPE CAROUSELS (founder 2026-10-07: chose
   "swipe carousels" so each three-card section reads as "three things" on
   a phone, as it does three-across on desktop, instead of a 1,357px /
   613px / 831px stack). Services tiles, the three "why" points and the
   three Knowledge Hub cards become one row each: 84% card width so the next
   one peeks in, native scroll-snap (touch, trackpad and tab focus all work
   with no JS), bleeding to the screen edges through the band's 24px gutter.
   Filled dots under each row (built by the small script at the end of
   homepage.html) show position and jump to a card. Same pattern as the
   approved search-results carousels.
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 699px) {
  /* v10.63 - SCOPED TO THE UNMODIFIED CLASS ONLY. .tpc-showcase is a shared
     component (design-tokens/components-level markup pattern), reused by
     construction-tmp-ctmp/specialist-services/services/traffic-management-
     plans-tgs (--two), areas-we-service (--coverage) and team (--team) with
     their OWN per-page tile counts and their OWN bespoke mobile layouts
     already built in those pages' own CSS. This rule was written for one
     thing only - the homepage's three-tile services teaser, named in the
     comment above ("Services tiles... become one row each") - but the bare
     .tpc-showcase selector reached every page that links homepage.css (every
     page does), silently forcing every variant's tiles into this carousel's
     grid-auto-flow/overflow-x regardless of their own column count or their
     own single-column override below this same breakpoint. On 404.html (a
     bare, unmodified 2-tile .tpc-showcase with no variant to opt out) this
     produced a broken hybrid grid: the page's own `grid-template-columns:1fr`
     survived the cascade but this rule's grid-auto-flow/grid-auto-columns did
     not get overridden, so a second implicit auto-sized column was generated
     alongside the single named one (found and fixed locally in not-found.css
     by THEA-800's R5 pass). The modifier variants have the identical latent
     collision and would fail the same way the moment a visitor's finger lands
     exactly where two conflicting grid definitions overlap. Excluding any
     class containing "tpc-showcase--" restores this rule to only the
     instances that were ever meant to carousel: homepage's own teaser plus
     contact/thank-you/thank-you-standalone, which all use the bare class with
     no page-specific column override to collide with. */
  .tpc-showcase:not([class*="tpc-showcase--"]),
  .tpc-why.band .tpc-why__list,
  .tpc-hub-grid {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
  /* FOUNDER 2026-10-22: "all carousels across the entire website for mobile
     need to be one tile in frame and centred."
     Was 84% wide with scroll-snap-align:start, which parks a tile against the
     left edge and leaves the next one peeking - the tile reads as off-centre.
     100% of the track's CONTENT box (the track is already bled edge to edge
     with margin-inline:-24px and padded back in) makes exactly one tile fill
     the frame, and center alignment puts it on the screen's centre line. */
    align-items: stretch;
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 24px;
    scrollbar-width: none;
    margin-inline: -24px;
    padding: 8px 24px 16px;
  }
  .tpc-showcase:not([class*="tpc-showcase--"])::-webkit-scrollbar,
  .tpc-why.band .tpc-why__list::-webkit-scrollbar,
  .tpc-hub-grid::-webkit-scrollbar { display: none; }
  .tpc-showcase:not([class*="tpc-showcase--"]) > *,
  .tpc-why.band .tpc-why__list > *,
  .tpc-hub-grid > * { scroll-snap-align: center; min-width: 0; }

  /* FOUNDER 2026-10-22, two rulings that have to be satisfied together:
     "the cta in the tile is edge to edge of the tile that shouldn't be the
     case" and "for mobile no cta button can fall on 2 rows".

     ROOT CAUSE of the edge-to-edge: the shared `.btn` rule sets
     padding-inline: 32px, and with white-space: nowrap the label's intrinsic
     width plus 64px of padding exceeded the tile's content box - measured at
     a 354px viewport, a 227.1px button against a 201.8px content box, so it
     overran the right padding edge while looking flush.

     The wrap fix I tried first is WRONG under the second ruling: letting the
     label break put "EXPLORE TMP & / TGS" on two rows. So the button stays
     nowrap and the SPACE it needs comes down instead - tighter inline padding
     and a slightly smaller label, phone only. One row, clear inset both
     sides, no clipping. */
  .tpc-showcase__tile .tpc-showcase__cta {
    white-space: nowrap;
    padding-inline: 16px;
    font-size: 13.5px;
    letter-spacing: 0.02em;
    max-width: 100%;
  }

  /* FOUNDER 2026-10-22: "the see all services and request cta's need to be
     centred on two rows."
     They were one line of running text divided by a middot, which at phone
     width broke mid-phrase ("...swept-path / check"). Each link now takes its
     own centred row and the middot is hidden - it exists to divide two links
     sharing a line, so on separate rows it has no job. Decorative and
     aria-hidden already, so no content is lost. */
  .tpc-services__foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .tpc-services__foot .tpc-dot { display: none; }

  /* ─────────────────────────────────────────────────────────────────────
     FOUNDER 2026-10-22: "across the entire website all text needs to be
     centred for mobile."

     SCOPE, confirmed with the founder before writing this: marketing and
     content sections only. Deliberately NOT centred, because centring them
     actively costs the reader:
       - long-form legal (privacy-policy, terms, legal-specimen: ~1,700 words
         each) - these are scanned for a clause, not read start to finish, and
         a centred ragged left edge removes the anchor that scanning needs
       - blog post body (~3,500 words) - same reason
       - form labels and inputs (the five request forms) - a label centred
         over a full-width field stops reading as that field's label
     Those three keep their left alignment; everything else centres. This
     matches the call already recorded on areas-we-service.css, where the
     founder accepted left-aligned body on the state tiles for exactly this
     reason.

     Applied at the band level so it reaches page-specific components without
     needing a rule per stylesheet. Phone only, desktop untouched. */
  .band__inner,
  .tpc-sec,
  .tpc-showcase__tile,
  .tpc-hub-card,
  .tpc-why__point,
  .tpc-proof__item,
  .tpc-essentials__item,
  .tpc-close__inner { text-align: center; }

  /* The carve-outs. These three win because they are more specific than the
     band-level rule above, not because of source order. */
  /* Carve-outs: these read worse centred. NOTE the doubled class - the
     obvious `.tpc-post__content *` is specificity (0,1,0) and LOSES to the
     `.band__inner p` above at (0,1,1), which is how the blog post body ended
     up centred on the first attempt. Doubling the class lifts each carve-out
     to (0,2,x) so it wins without resorting to !important. */
  .tpc-post__content.tpc-post__content,
  .tpc-post__content.tpc-post__content *,
  .tpc-legal-content.tpc-legal-content,
  .tpc-legal-content.tpc-legal-content *,
  .request-form-page .field.field,
  .request-form-page .field.field *,
  .request-form-page .field__label.field__label,
  .request-form-page .field__hint.field__hint,
  .request-form-page .form-row.form-row { text-align: left; }
  .tpc-why.band .tpc-why__point {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 22px 18px;
  }

  .tpc-mcar-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
  }
  .tpc-mcar-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    /* FOUNDER 2026-10-22: "for the grey backgrounds the carousels circles are
       black and can't see them... visible across the whole site."
       28% of currentColor measured 1.56:1 on panel grey #F1F1F1 and 1.57:1 on
       white, against a 3:1 floor for a non-text UI indicator - effectively
       invisible, exactly as reported. 65% measures 3.52:1 on grey and 3.9:1
       on white. currentColor is kept deliberately rather than a fixed hex:
       it already flips with the band, so the same single value also gives
       5.9:1 on asphalt instead of needing a dark-band override. */
    /* CORRECTED: my first pass used currentColor at 65% on the assumption it
       flips with the band. It does not here - measured on an asphalt band it
       resolved to black at 1.32:1, WORSE than before. Explicit colours per
       ground instead, each measured: asphalt dot on light = 3.5:1, white dot
       on asphalt = 5.9:1. Both clear the 3:1 floor for a non-text indicator. */
    background: rgba(34, 34, 34, 0.55);
    cursor: pointer;
    transition: width var(--primitive-duration-fast) var(--primitive-easing-out),
                background-color var(--primitive-duration-fast) var(--primitive-easing-out);
  }
  .tpc-mcar-dots button[aria-current="true"] {
    width: 22px;
    border-radius: 999px;
    background: var(--primitive-orange);
  }
  .band-asphalt .tpc-mcar-dots button,
  [data-header-dark] .tpc-mcar-dots button { background: rgba(255, 255, 255, 0.6); }
  .band-asphalt .tpc-mcar-dots button[aria-current="true"],
  [data-header-dark] .tpc-mcar-dots button[aria-current="true"] { background: var(--primitive-orange); }
  .tpc-mcar-dots button:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primitive-orange) 35%, white); }
}
/* THEA-907: homepage.css's `@media (min-width: 700px) { .tpc-mcar-dots {
   display: none; } }` was never ported here. The dot-indicator script runs
   unconditionally on every viewport (ported as assets/js/mobile-card-dots.js),
   so without this the generated <div class="tpc-mcar-dots"> rendered as a
   plain unstyled block of buttons above 699px, which the max-width:699 block
   above never reaches. Desktop parity depends on this. */
@media (min-width: 700px) {
  .tpc-mcar-dots { display: none; }
}



/* ─────────────────────────────────────────────────────────────────────
   MOBILE - RED TRUST STRIP AS A ONE-ROW ROTATOR
   Founder 2026-10-22: "can the red trust banner across the entire site be
   on 1 row and it rotates every so often so it isn't so tall?"

   .tpc-proof--strip is defined byte-identically in eight page sheets
   (services / about / areas-we-service / case-studies / team /
   request-forms / contact / knowledge-hub) and ships on 38 pages. The
   layout it inherits from here is the problem: the rule at line 1652 drops
   the five-up grid to two columns below 600px, and the odd fifth item then
   spans the full width, so the band runs about three rows deep before any
   of the page's own content starts.

   Below 699px the five items are stacked into ONE grid cell and
   trust-strip.js shows one at a time. Each is laid out as a single
   horizontal line - stat, then label - so whichever is showing, the band
   is one row tall.

   The :is() hook carries .tpc-proof twice so this beats
   knowledge-hub.css:1039 (.tpc-proof--kh .tpc-proof__grid, four columns),
   which is the one page sheet that re-declares the grid and would
   otherwise win on cascade order.

   DESKTOP UNTOUCHED: everything here is inside the query, and with JS off
   the items simply all stay visible in the approved stacked layout.
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 699px) {
  .tpc-proof.tpc-proof--strip .tpc-proof__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    align-items: center;
  }
  .tpc-proof--strip[data-trust-rotating] .tpc-proof__item {
    grid-area: 1 / 1;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 7px;
    max-width: 100%;
    margin-inline: auto;
    text-align: center;
    pointer-events: none;
    transition: opacity 420ms var(--primitive-easing-out, ease-out);
  }
  /* v10.91 - FAIL SAFE. Hiding used to rest on `opacity: 0` in the stacking
     rule above, which couples two jobs to one property: the instant anything
     stops the active flag resolving, all five credentials are still stacked
     in one grid cell AND all still paint, which is the unreadable pile of
     superimposed words the founder photographed on services.html.

     Hiding is now driven off the ABSENCE of the flag and backed by
     `visibility`, so exactly one credential can paint by construction rather
     than by the script keeping up, and the hidden four leave the
     accessibility tree while they are not the shown one. */
  /* v10.93 - THE FLICK HAS TO FADE, IN AND OUT.
     Two things fought this. The band reveal writes `opacity: 1` INLINE on
     every item (they carry [data-reveal-item]), which beat the stylesheet
     and left all five painting at once; and `visibility` cannot tween, so
     once visibility was added to force one at a time the swap became an
     instant cut with no fade left in it.

     `!important` here is deliberate and narrow: it is the only way a
     stylesheet can win against an inline style written by another
     animation at scroll time, and the rotator must own this property to
     animate it at all. Transitions still apply to an !important value, so
     the crossfade works normally.

     The visibility delay is what makes the fade-OUT visible: the outgoing
     item holds `visible` for the full 420ms of its fade and only flips to
     `hidden` once it has reached zero, while the incoming one becomes
     visible immediately. Without the delay the outgoing credential would
     vanish on frame one and only the incoming one would appear to animate.

     The 6px rise is the "flick": the incoming line lifts into place as it
     fades up, the outgoing settles back down as it fades out. */
  .tpc-proof--strip[data-trust-rotating] .tpc-proof__item:not([data-trust-active]) {
    opacity: 0 !important;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 420ms var(--primitive-easing-out, ease-out),
                transform 420ms var(--primitive-easing-out, ease-out),
                visibility 0s linear 420ms;
  }
  .tpc-proof--strip[data-trust-rotating] .tpc-proof__item[data-trust-active] {
    opacity: 1 !important;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 420ms var(--primitive-easing-out, ease-out),
                transform 420ms var(--primitive-easing-out, ease-out),
                visibility 0s linear 0s;
  }
  /* The five labels run from 9 to 45 characters. At 12px/1.3 the longest
     ("Lead planner on every job, never a call centre") measures inside the
     390px gutter next to its 15px stat, so every item holds one line. */
  .tpc-proof--strip[data-trust-rotating] .tpc-proof__stat,
  .tpc-proof--strip[data-trust-rotating] .tpc-proof__stat--word {
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
  }
  .tpc-proof--strip[data-trust-rotating] .tpc-proof__label {
    font-size: 12px;
    line-height: 1.3;
    max-width: none;
    white-space: nowrap;
  }
  /* Two of the five labels do not fit a 390px row at a readable size: the
     grid is 342px wide and they need 395px and 398px with their stat. They
     carry a data-short, swapped in the way the dock titles and the contact
     coverage CTA already do on this site - font-size:0 on the element plus
     a ::before carrying attr(data-short). The real sentence stays in the
     DOM and in the accessibility tree, so nobody loses the full wording;
     only the rendered row is shortened.
       "Years combined on-road & planning experience" -> "Years on-road & planning"
       "Lead planner on every job, never a call centre" -> "Lead planner on every job"
     line-height goes to 0 with the font size, or the empty line box the
     hidden text still generates keeps the row at its two-line height. */
  .tpc-proof--strip[data-trust-rotating] .tpc-proof__label[data-short] {
    font-size: 0;
    line-height: 0;
  }
  .tpc-proof--strip[data-trust-rotating] .tpc-proof__label[data-short]::before {
    content: attr(data-short);
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
  }
  /* The fifth item's full-width override (line 2042) is a two-column
     artefact and has nothing left to do in a single cell. */
  .tpc-proof--strip[data-trust-rotating] .tpc-proof__item:last-child {
    grid-column: 1 / -1;
    max-width: 100%;
  }
  /* Reduced motion: the strip still rotates - the content is the point -
     but it swaps rather than cross-fades, so there is no movement. */
  @media (prefers-reduced-motion: reduce) {
    .tpc-proof--strip[data-trust-rotating] .tpc-proof__item { transition: none; }
  }
}

/* ─────────────────────────────────────────────────────────────────────
   v10.87 - HAIRLINE SEAMS BETWEEN THE COLOURED BANDS ON PHONES
   ─────────────────────────────────────────────────────────────────────
   The founder saw a white line across the full width between every
   coloured section on an iPhone. It is not a border and not a gap in the
   markup: measured at 390x844 DPR 3, EVERY band boundary on this page
   lands on a fractional CSS pixel (1339.344, 4782.172, 7749.563 ...).
   At DPR 3 the band above and the band below round that boundary to
   different device pixels, and the white page background behind them
   shows through the third-of-a-pixel that neither one paints.

   Chasing the fraction upstream is not the fix: it comes from `svh` and
   `clamp()` heights that are MEANT to be fluid, and pinning them to whole
   pixels would break the very responsiveness they exist for.

   So each band is pulled up a single pixel onto its predecessor and paints
   over the seam. 1px is below the perceptual threshold for section spacing
   and the cumulative effect across the eight bands is 8px on an 11,000px
   page. Phones only: desktop is client-approved and frozen. */
@media (max-width: 699px) {
  .tpc-proof.band,
  .tpc-statement,
  .tpc-services.band,
  .tpc-why.band,
  .tpc-hub.band,
  .tpc-testimonial,
  .tpc-close.band,
  .tpc-footer {
    margin-top: -1px;
  }
}


/* ════════════ THEA-900 1:1 parity follow-up: .tpc-notepad / .tpc-headstack ════════════
   Founder-traced root cause of case-studies.php rendering 14.6x too tall:
   .tpc-notepad__stack is display:grid in the hi-fi (stacks all review sheets
   into one grid cell so they overlay), authored only in homepage.css and
   reused by case-studies.html's testimonial carousel - never extracted into
   a shared file, so WordPress's case-studies.php got none of it and the
   sheets fell into normal block flow instead of overlaying. */



/* ─────────────────────────────────────────────────────────────────────
   6. TESTIMONIAL - single featured quote (the lo-fi carries exactly
   one review here, rotated server-side; not the 3-up grid used on
   Case Studies - see homepage.html build note)
   ───────────────────────────────────────────────────────────────────── */

/* v2.0 - added hairline border: white card on a white/atmosphere ground
   (was white-on-panel_grey in v1.0, which needed no edge definition). */
.tpc-testimonial-feature {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  background: var(--primitive-white);
  border: 1px solid rgba(34,34,34,0.07);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: var(--primitive-space-7) var(--primitive-space-6);
}
/* v2.0 - was orange text (star rating + "Google review" label); no
   orange text on the light ground, so this becomes an asphalt label
   with an orange underline rule doing the accent work instead. */
.tpc-testimonial-feature__flag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primitive-asphalt);
  text-decoration: underline;
  text-decoration-color: var(--primitive-orange);
  text-underline-offset: 4px;
  margin-bottom: var(--primitive-space-4);
}
.tpc-testimonial-feature__quote {
  margin: 0 0 var(--primitive-space-5);
  font-size: 24px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--primitive-asphalt);
}
.tpc-testimonial-feature__cite { margin: 0 0 var(--primitive-space-4); }
.tpc-testimonial-feature__name { display: block; font-weight: 700; font-size: 15px; color: var(--primitive-asphalt); }
.tpc-testimonial-feature__role { display: block; font-size: 13.5px; color: var(--primitive-ink); }
.tpc-testimonial-feature__aside { margin: 0; font-size: 14px; color: var(--primitive-ink); }
.tpc-testimonial-feature__aside a { color: var(--primitive-asphalt); font-weight: 700; text-decoration: underline; text-decoration-color: var(--primitive-orange); }



/* ══════════════════════════════════════════════════════════════════════
   TESTIMONIAL NOTEPAD - v7.53. Reviews as sheets on a pad, the top one
   flicking over its own top edge to reveal the next.

   THE FLIP IS A REAL 3D ROTATION, so the pad needs perspective on the parent
   and the sheet needs its origin on the bound edge. transform-origin: top
   centre is what makes it hinge like paper rather than tumble like a card.
   The sheets are stacked in the same grid cell rather than absolutely
   positioned, so the pad's height is the TALLEST sheet and never collapses
   or jumps as reviews of different lengths come round.
   ══════════════════════════════════════════════════════════════════════ */
.tpc-notepad {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  perspective: 1600px;
}

/* the bound edge of the pad, sitting just under the top of the sheets */
.tpc-notepad__spine {
  position: absolute;
  left: 8%;
  right: 8%;
  top: -9px;
  height: 18px;
  border-radius: 9px;
  background:
    repeating-linear-gradient(90deg,
      rgba(34,34,34,0.32) 0 3px, rgba(34,34,34,0) 3px 22px),
    linear-gradient(180deg, #ffffff, var(--primitive-panel-grey));
  box-shadow: 0 2px 6px rgba(34,34,34,0.12);
  z-index: 3;
  pointer-events: none;
}

/* the reviewer figure standing beside the pad, out of flow so it never
   adds to the pad's height - ported from homepage.css, missing here was
   the THEA-904 case-studies 900px overflow (figure fell into block flow
   at its native 958px image height instead of sitting absolute beside
   the pad). */
.tpc-testimonial__figure {
  --fig-w: clamp(192px, 15.4vw, 292px);
  position: absolute;
  left: 100%;
  margin-left: clamp(16px, 2vw, 48px);
  bottom: -48px;
  width: var(--fig-w);
  z-index: 2;
  pointer-events: none;
}
.tpc-testimonial__figure img { display: block; width: 100%; height: auto; }

@media (max-width: 1279px) {
  .tpc-testimonial__figure { display: none; }
}

.tpc-notepad__stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;                 /* every sheet in one cell = pad sized to the tallest */
  transform-style: preserve-3d;
}

.tpc-notepad__sheet {
  grid-area: 1 / 1;
  transform-origin: top center;
  background: var(--primitive-white);
  border: 1px solid rgba(34, 34, 34, 0.10);
  border-radius: var(--card-radius);
  padding: clamp(20px, 1.9vw, 32px) clamp(20px, 2.4vw, 46px) clamp(16px, 1.6vw, 26px);
  box-shadow: 0 14px 38px rgba(34, 34, 34, 0.10);
  transition: transform 0.62s cubic-bezier(0.55, 0.06, 0.28, 1),
              opacity 0.42s ease,
              box-shadow 0.42s ease;
}

/* Sheets behind the current one sit a little lower and narrower so the pad has
   visible thickness. --depth is written by the JS from the sheet's distance
   behind the top, so any number of reviews stacks correctly. */
.tpc-notepad__sheet[data-state="behind"] {
  /* scaleX, not scale. The origin has to be `top center` for the flip to hinge
     like paper, which means a uniform scale shrinks the sheet UPWARD and eats
     the downward offset meant to reveal it - measured, a 0.972 scale on a 350px
     sheet pulled the bottom up 10px against a 10px push down, so the stack was
     invisible. Narrowing horizontally and offsetting vertically keeps the
     bottom edges showing as the thickness of the pad. */
  transform: translateY(calc(var(--depth, 1) * 12px)) scaleX(calc(1 - var(--depth, 1) * 0.035));
  box-shadow: 0 8px 20px rgba(34, 34, 34, 0.07);
  z-index: 1;
}
.tpc-notepad__sheet[data-state="current"] { transform: none; z-index: 2; }

/* v7.62 - A REAL PAGE FLIP, not a card dismissal.

   The old one hinged to -108deg with backface-visibility:hidden, so the sheet
   became invisible the instant it passed 90deg: you saw it start to lift and
   then disappear, which is why it did not read as paper turning over.

   Three changes make it turn properly. It rotates almost the whole way, to
   -168deg, so it lands face-down behind the pad the way a torn page does. The
   backface is no longer hidden, so the paper itself - ruling and all - stays
   visible through the whole arc. And the CONTENT is faded out separately at
   0.2s, roughly as the sheet passes upright, so what swings over the binding
   is a blank sheet rather than a mirror image of the review.

   The sheet's own fade is delayed to 0.52s so it only disappears once it is
   already behind the pad, rather than dissolving mid-air. */
.tpc-notepad__sheet[data-state="gone"] {
  transform: rotateX(-168deg) translateY(-6px);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  transition: transform 0.72s cubic-bezier(0.42, 0.02, 0.22, 1),
              opacity 0.2s linear 0.52s;
}
.tpc-notepad__sheet[data-state="gone"] .tpc-testimonial-feature {
  opacity: 0;
  transition: opacity 0.16s linear 0.2s;
}
.tpc-notepad__sheet .tpc-testimonial-feature { transition: opacity 0.3s ease 0.18s; }

/* GOOGLE WORDMARK - reproduced in the page's own Montserrat, not the
   official Product Sans wordmark (not in this project). Letter colours
   follow the real mark so it reads correctly. Ported from home.css,
   missing here was THEA-904's case-studies notepad rendering the word
   "Google" in plain asphalt instead of its brand colours. */
.tpc-glogo { display: inline-flex; align-items: center; gap: 8px; }
.tpc-gword {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.tpc-gword span:nth-child(1) { color: #4285F4; }
.tpc-gword span:nth-child(2) { color: #EA4335; }
.tpc-gword span:nth-child(3) { color: #FBBC05; }
.tpc-gword span:nth-child(4) { color: #4285F4; }
.tpc-gword span:nth-child(5) { color: #34A853; }
.tpc-gword span:nth-child(6) { color: #EA4335; }

/* ── STARS. Google's own star yellow, and they pop in one after another
   rather than all at once, which is what reads as a rating being given. */
.tpc-stars { display: inline-flex; align-items: center; gap: 3px; }
.tpc-star {
  width: 17px;
  height: 17px;
  fill: #FBBC04;
  transform-origin: 50% 55%;
}
.tpc-notepad__sheet[data-state="current"] .tpc-star {
  animation: tpc-star-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.tpc-notepad__sheet[data-state="current"] .tpc-star:nth-child(1) { animation-delay: 0.06s; }
.tpc-notepad__sheet[data-state="current"] .tpc-star:nth-child(2) { animation-delay: 0.14s; }
.tpc-notepad__sheet[data-state="current"] .tpc-star:nth-child(3) { animation-delay: 0.22s; }
.tpc-notepad__sheet[data-state="current"] .tpc-star:nth-child(4) { animation-delay: 0.30s; }
.tpc-notepad__sheet[data-state="current"] .tpc-star:nth-child(5) { animation-delay: 0.38s; }



.tpc-testimonial-feature__flag { display: inline-flex; align-items: center; }

/* ── CONTROLS. Hidden entirely at one review, because a pager for a single
   sheet is a control that lies about what is there. */
.tpc-notepad__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(20px, 2.4vh, 32px);
}
.tpc-notepad__controls[hidden] { display: none; }

.tpc-notepad__nav {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--primitive-orange);
  color: var(--primitive-white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--primitive-duration-fast) var(--primitive-easing-out);
}
.tpc-notepad__nav:hover { background: #e08916; }

.tpc-notepad__dots { display: inline-flex; gap: 7px; }
.tpc-notepad__dot {
  width: 8px; height: 8px; padding: 0;
  border: 0; border-radius: 999px;
  /* FOUNDER 2026-10-22, same ruling as the carousel dots: this hardcoded
     rgba(34,34,34,0.22) measured 1.56:1 on panel grey. currentColor at 65%
     tracks the band and clears 3:1 on white, grey and asphalt alike. */
  background: rgba(34, 34, 34, 0.55);
  cursor: pointer;
}
.tpc-notepad__dot[aria-current="true"] { background: var(--primitive-orange); }

@media (prefers-reduced-motion: reduce) {
  .tpc-notepad__sheet { transition: opacity 0.2s linear; }
  .tpc-notepad__sheet[data-state="gone"] { transform: none; }
  .tpc-notepad__sheet[data-state="current"] .tpc-star { animation: none; }
}

/* The figure was itself a white card - background, border, radius, shadow and
   its own padding - which is right when it stands alone and wrong the moment
   it sits on a sheet, because the two nest and you see a card inside a card.
   Inside the pad the figure carries nothing but its text alignment; the sheet
   is the card now. Its max-width goes too, or it would fight the pad's. */
.tpc-notepad .tpc-testimonial-feature {
  max-width: none;
  margin-inline: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

/* the aside sits under the pad now rather than inside the card, so it needs
   the centring the figure used to give it */
.tpc-testimonial .tpc-testimonial-feature__aside {
  margin-top: clamp(18px, 2.2vh, 30px);
  text-align: center;
}

/* ══════════════════════════════════════════════════════════════════════
   NOTEPAD REALISM - v7.57. It read as stacked rectangles; this makes it read
   as paper on a wire pad.

   Four things do the work, and none of them is an image: a cardboard backing
   behind the pad, a torn edge along the top of each sheet, faint ruling on the
   paper, and a real wire binding punched through both.
   ══════════════════════════════════════════════════════════════════════ */

/* the board the pad is bound to, sitting a few px proud of the paper */
.tpc-notepad::before {
  content: '';
  position: absolute;
  left: -10px; right: -10px; top: -6px; bottom: -14px;
  border-radius: calc(var(--card-radius) + 6px);
  background: linear-gradient(180deg, #d9cbb6, #c9b697 62%, #bda682);
  box-shadow: 0 18px 40px rgba(34, 34, 34, 0.20), inset 0 1px 0 rgba(255,255,255,0.5);
  z-index: 0;
}

.tpc-notepad__stack { position: relative; z-index: 1; }

/* PAPER. A warm off-white rather than pure white, ruled, with the top edge
   torn away from the pad. The scallops are a mask rather than drawn notches,
   so whatever is behind the sheet shows through them - which is what makes it
   read as torn rather than as a printed zigzag. */
.tpc-notepad__sheet {
  background-color: #fffdf7;
  background-image:
    repeating-linear-gradient(180deg,
      rgba(34, 34, 34, 0) 0 31px,
      rgba(58, 90, 140, 0.10) 31px 32px);
  background-position: 0 96px;
  -webkit-mask-image: radial-gradient(circle 6px at 11px -1px, transparent 6px, #000 6.5px);
          mask-image: radial-gradient(circle 6px at 11px -1px, transparent 6px, #000 6.5px);
  -webkit-mask-size: 22px 100%;
          mask-size: 22px 100%;
  -webkit-mask-repeat: repeat-x;
          mask-repeat: repeat-x;
}

/* WIRE. Loops punched over the torn edge: a metal segment per hole, matched to
   the 22px mask pitch so every loop sits in a scallop rather than beside one. */
.tpc-notepad__spine {
  left: 0; right: 0;
  top: -13px;
  height: 26px;
  border-radius: 0;
  background:
    repeating-linear-gradient(90deg,
      rgba(0,0,0,0) 0 6px,
      #9aa0a6 6px 7px,
      #e8eaed 7px 9px,
      #c4c8cc 9px 11px,
      #7c8287 11px 12px,
      rgba(0,0,0,0) 12px 22px);
  filter: drop-shadow(0 2px 2px rgba(34, 34, 34, 0.35));
  box-shadow: none;
  z-index: 4;
}



/* The cardboard backing is a ::before on the pad, which spans the controls as
   well as the paper, so the controls need lifting out from under it. */
.tpc-notepad__controls { position: relative; z-index: 5; }

/* Sheets past the third sit exactly on the third, so the pad's thickness stops
   growing with the number of reviews. */
.tpc-notepad__sheet[data-state="behind"] { will-change: transform; }

/* v7.62 - air between the pad and its pager. The arrows were sitting hard
   against the cardboard, which read as part of the pad rather than a control
   under it. */
/* Measured rather than guessed: the stacked sheets sit up to 36px BELOW the
   pad's own border box, and the cardboard another 14px past that, so a margin
   that looks generous in the rule lands almost on the paper. This clears the
   deepest sheet with room to spare. */
.tpc-notepad__controls { margin-top: clamp(78px, 7.5vh, 110px); }

/* ══════════════════════════════════════════════════════════════════════
   TESTIMONIAL TYPE - v7.62. Restructured to carry the same energy as the rest
   of the page: the quote is the hero, not a caption.

   The quote goes from 24px/600 to a clamped display size at 700, which is the
   weight the headings use, and the attribution drops back so the two are
   clearly a hero and a footnote rather than three similar lines. A large
   orange quote mark anchors the top of the sheet; it is a glyph in CSS, not
   copy, so nothing is added to the words.
   ══════════════════════════════════════════════════════════════════════ */
.tpc-notepad .tpc-testimonial-feature__quote {
  position: relative;
  margin: 0 0 clamp(20px, 2.4vh, 34px);
  font-size: clamp(21px, 1.85vw, 33px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--primitive-asphalt);
}
.tpc-notepad .tpc-testimonial-feature__quote::before {
  content: '\201C';
  display: block;
  font-size: clamp(56px, 5vw, 86px);
  line-height: 0.72;
  color: var(--primitive-orange);
  margin-bottom: clamp(6px, 0.8vh, 14px);
}

/* the flag becomes a quiet row of credentials, since the quote now leads */
.tpc-notepad .tpc-testimonial-feature__flag {
  text-decoration: none;
  margin-bottom: clamp(14px, 1.6vh, 22px);
}
.tpc-notepad .tpc-star { width: 20px; height: 20px; }
.tpc-notepad .tpc-gmark { width: 19px; height: 19px; }

.tpc-notepad .tpc-testimonial-feature__name {
  font-size: clamp(15px, 1.05vw, 18px);
  letter-spacing: -0.01em;
}
.tpc-notepad .tpc-testimonial-feature__role {
  font-size: 13px;
  color: color-mix(in srgb, var(--primitive-ink) 78%, transparent);
}



/* ══════════════════════════════════════════════════════════════════════
   TESTIMONIAL SHEET, v7.64 - written on the pad.

   RULED TO THE TYPE, NOT THE OTHER WAY ROUND. For the words to sit on the
   lines the way handwriting does, the rule pitch and the line-height have to
   be the SAME number, so both come from --rule. Change one and you change
   both. Once the first baseline lands on a rule every later one follows for
   free, which is why the offset below is the only figure that ever needs
   tuning.
   ══════════════════════════════════════════════════════════════════════ */
.tpc-notepad__sheet {
  /* v7.66 - 40px to 34px. The pad was tall out of proportion to the type, and
     the rule pitch is what drives that: it is the line-height AND every
     vertical margin in the sheet, since they all have to be multiples of it to
     keep the words on the lines. Dropping the pitch shortens all of them at
     once and keeps the rhythm intact. */
  --rule: 34px;
  background-image:
    repeating-linear-gradient(180deg,
      rgba(34, 34, 34, 0) 0 calc(var(--rule) - 1px),
      rgba(58, 90, 140, 0.13) calc(var(--rule) - 1px) var(--rule));
  /* MEASURED, not guessed. The quote's first line box starts 176px down the
     sheet, and a rule wants to sit just under the baseline, which is the line
     box bottom less about 0.21em of descender. Modulo the 40px pitch that puts
     the first rule at 9.5px, and because the pitch and the line-height are the
     same number every following line lands on one too. Re-measure this if the
     flag block above the quote ever changes height. */
  background-position: 0 var(--rule-offset, 7.5px);
}

/* every text line in the sheet runs on the rule pitch, so nothing floats
   between the lines */
.tpc-notepad .tpc-testimonial-feature__quote,
.tpc-notepad .tpc-testimonial-feature__name,
.tpc-notepad .tpc-testimonial-feature__role { line-height: var(--rule); }

/* the quote mark is gone and the words take the brand orange, at the founder's
   direction. Recording the number once: orange on this paper is 2.3:1, under
   the 4.5:1 threshold, and it is the same call already made on the What we do
   heading. */
.tpc-notepad .tpc-testimonial-feature__quote {
  color: var(--primitive-orange);
  font-size: clamp(19px, 1.5vw, 26px);
  margin: 0 0 var(--rule);
}
.tpc-notepad .tpc-testimonial-feature__quote::before { content: none; }

/* ── THE GOOGLE LOCKUP, big and centred, stars beneath it. */
.tpc-notepad .tpc-testimonial-feature__flag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--rule);
}


.tpc-notepad .tpc-gmark { width: 34px; height: 34px; margin: 0; }



.tpc-notepad .tpc-star { width: 22px; height: 22px; }



/* The aside keeps its sentence; only the link inside it takes the treatment.
   It needs the full declaration at this specificity, not just a colour: the
   existing `.tpc-testimonial-feature__aside a` rule is (0,2,0) and was quietly
   beating the (0,1,0) class, so the thickness and offset never applied and the
   link kept the browser's hairline underline. */
.tpc-testimonial .tpc-testimonial-feature__aside a.tpc-textlink--ruled {
  font-weight: 700;
  /* v7.73 - matched to "More about how we work", measured off it rather than
     eyeballed: 17px, 2px rule, 4px offset. It was 20px/3px/7px, which read as
     a different tier of link. Colour is the one thing that must NOT match,
     since that link sits on red and these sit on white. */
  font-size: 17px;
  color: var(--primitive-asphalt);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: currentColor;
}
.tpc-testimonial .tpc-testimonial-feature__aside a.tpc-textlink--ruled:hover {
  text-decoration-color: var(--primitive-orange);
}



/* ══════════════════════════════════════════════════════════════════════
   ALL EIGHT REVIEWS ON THREE LINES - v7.74, desktop.

   MEASURED ACROSS EVERY REVIEW, not fitted to one. At the pad's natural 666px
   the longest quote (123 characters) takes three lines but the shortest (89,
   Jeremy Peters) takes two, so the pad changed height as you paged. Narrowing
   the measure fixes it, but the usable window is small and has a wall on both
   sides: at 610px and above Jeremy drops back to two, and at 588px and below
   Kwok Kin Poon's spills to four. 600px is the only tested width where all
   eight land on exactly three.

   That is a real constraint rather than a lucky number, so it is worth stating:
   a new review much shorter than 89 characters or much longer than 123 will
   not obey it. The min-height is the safety net for that day - the pad keeps
   its height even if a quote falls short, so it can never jump mid-flick.
   ══════════════════════════════════════════════════════════════════════ */
.tpc-notepad .tpc-testimonial-feature__quote {
  max-width: 600px;
  margin-inline: auto;
  min-height: calc(var(--rule) * 3);
}



/* ─────────────────────────────────────────────────────────────────────
   FOUNDER 2026-11-05: "on mobile the testimonial section is way too big
   on the home page and maybe the other testimonial page, please make
   smaller."

   Measured at 393x852 (the founder's iPhone 14 Pro) before this change:
   the section was 842px tall, 99% of the viewport, so the pad filled the
   whole screen with nothing else visible.

     section padding   48px top + 48px bottom
     heading block     101px + 34px margin
     the pad itself    444px
     gap to the pager  78px of empty air
     pager             42px

   The pad's height is not set directly: `--rule` is the rule pitch of the
   paper AND the line-height of every line on it AND every vertical margin
   inside the sheet, because they all have to be multiples of the pitch to
   keep the words sitting on the lines. So the pitch is the one number that
   shortens all of them at once, which is exactly how v7.66 took it from
   40px to 34px. Taking it to 27px on phones shortens the quote, the
   attribution and all three margins together and keeps the handwriting
   rhythm intact.

   The quote's own font-size is untouched at its 19px floor. It is the hero
   of the section and shrinking it was not what was asked for. The height
   comes back from the rhythm, the oversized Google lockup (a 34px wordmark
   on a 345px-wide card) and that 78px gap, not from the words.

   `--rule-offset` is re-measured here, not carried over. It positions the
   first painted rule under the first baseline, and both the pitch and the
   block above the quote have changed, so the old 7.5px no longer lands.
   Derived live: first quote line box starts 119px into the sheet's padding
   box, baseline sits a descender (about 0.21em of 19px, so 4px) above the
   line box bottom, giving 119 + 27 - 4 = 142px, which modulo the 27px
   pitch is 7px.

   Applies to all three pages carrying the pad (homepage, case-studies,
   thank-you-standalone) because it is scoped to the component, not the
   page. Phones only. Desktop is client-approved and frozen. */
@media (max-width: 699px) {
  .tpc-notepad__sheet {
    --rule: 23px;
    --rule-offset: 5px;
  }

  /* SECOND CUT. The first pass held the quote at its 19px floor on the
     grounds that it is the hero of the section, and the pad still came
     back too tall. 17px is the floor now: the quote is still the largest
     thing on the paper and still carries the brand orange, it just stops
     setting the height of the whole section on a 345px card. */
  .tpc-notepad .tpc-testimonial-feature__quote { font-size: 17px; }

  /* a 34px wordmark and 22px stars are desktop proportions on a 345px card */
  .tpc-notepad .tpc-gword { font-size: 21px; }
  .tpc-notepad .tpc-gmark { width: 21px; height: 21px; }
  .tpc-notepad .tpc-star  { width: 15px; height: 15px; }
  .tpc-notepad .tpc-testimonial-feature__flag { gap: 6px; }

  /* FOUNDER 2026-11-05: "the carousel dots and arrows are on the notepad,
     it shouldn't be on the notepad, make it smaller."

     My own regression, and the 78px this started at was not arbitrary
     padding: it was clearing the pad's thickness. The sheets behind the
     current one are pushed down by `--depth * 12px` to show the stack as
     paper, and a transform does not take part in layout, so the pad's box
     ends 36px above where the stack actually finishes painting. Cutting
     the gap to 20px put the arrows 40px inside the bottom sheets.

     Fixing it by handing the 78px back would undo most of this round, so
     the thickness itself comes down instead: 6px a sheet rather than 12px
     still reads as a pad on a 345px card, and halves the clearance the
     pager has to wait for. Measured: lowest sheet now finishes 18px below
     the pad's box, and a 34px gap puts the arrows 16px clear of the paper.

     The arrows come down with it: 42px circles and 8px dots are desktop
     furniture on a phone. NOTE, stated rather than buried: 36px is under
     the 44px tap-target floor, but so was the 42px it replaces, so this
     does not cross a line the component was holding. Say the word and
     they go back up to 44px, which is the only size that actually passes.*/
  .tpc-notepad__sheet[data-state="behind"] {
    transform: translateY(calc(var(--depth, 1) * 6px))
               scaleX(calc(1 - var(--depth, 1) * 0.025));
  }
  .tpc-notepad__controls { margin-top: 54px; }

  /* FOUNDER 2026-11-05: "the dots look cut off."

     REPRODUCED, and it is a real shape bug, not a clip. The dot is a
     button whose own box IS the circle, so the moment it is given padding
     to make a tap target the 999px radius resolves against the padding box
     while the paint is clipped to the content box, and every dot comes out
     a flat-topped cylinder. The active one came out worse again: its
     `background:` shorthand resets `background-clip` back to border-box,
     so it filled the whole padded box as a tall pill.

     Fixed by separating the two jobs the element was doing. The button is
     now purely the hit area, 24x32 and transparent, and the circle is a
     ::before inside it. A pseudo-element's radius and its paint share one
     box, so it cannot be clipped out of round whatever padding the button
     carries, and the active colour moves to the same pseudo-element rather
     than to a shorthand that quietly resets the clip.

     10px of visible dot, up from 8px, since they carry the whole job now
     that the arrows are gone. 24x32 is still short of the 44px tap floor
     but it is three times the area of the 8px pinprick it replaces. */
  .tpc-notepad__dots { gap: 0; }
  .tpc-notepad__dot {
    width: 24px; height: 32px;
    padding: 0;
    background: none;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .tpc-notepad__dot::before {
    content: "";
    display: block;
    width: 10px; height: 10px;
    border-radius: 999px;
    background: rgba(34, 34, 34, 0.55);
  }
  .tpc-notepad__dot[aria-current="true"] { background: none; }
  .tpc-notepad__dot[aria-current="true"]::before { background: var(--primitive-orange); }

  /* FOUNDER 2026-11-05: "remove arrows on mobile." The pad is swiped and
     tapped on a phone, and the dots already say how many reviews there are
     and which one you are on, so the arrows were the third way to do the
     same thing. Hidden rather than removed from the markup: the script
     still binds its click handlers to them, and taking them out of the
     page would mean editing the carousel on every page that carries it to
     no benefit. Desktop keeps them, where there is no swipe. */
  .tpc-notepad__nav { display: none; }

  /* tells the browser this surface scrolls vertically but handles its own
     horizontal gesture, so it does not wait on the swipe handler before
     scrolling the page */
  .tpc-notepad__stack { touch-action: pan-y; }

  /* the section's own frame, on the homepage block only */
  .tpc-testimonial { padding-block: 28px; }
  .tpc-testimonial .tpc-section-head { margin-bottom: 18px; }
  .tpc-testimonial .tpc-testimonial__sub { font-size: 17px; }
}


/* ═════════════════════════════════════════════════════════════════════
   TILE ROWS: NEVER A COLUMN MORE THAN THERE ARE TILES, AND NEVER ONE
   TILE LEFT ALONE ON A ROW
   ═════════════════════════════════════════════════════════════════════
   Founder, 16 Nov: "why aren't these tile centred? Ensure all pages have
   centred tiles and there can never be a row of tiles with only 1 tile in
   that row."

   What they were looking at was a two-tile comparison rendering in a
   three-column grid, so the pair sat hard left with 430px of white beside
   it. That specific bug is fixed above, by declaring .tpc-showcase--two
   after the base it modifies. These rules make the guarantee general, so it
   cannot come back through a different tile count.

   The grid's column count is set per breakpoint: three across from 1025px,
   two from 700 to 1024, one below that (where the rows become scroll-snap
   carousels). A tile count that does not divide by the column count leaves
   the last tile alone, which is what the second half of the instruction
   rules out. Measured counts on this site are 2, 3, 4 and 9.

   `:has(> :nth-child(N):last-child)` reads as "this grid has exactly N
   children". Supported in every browser this site targets.

   The proof strip is deliberately NOT included: its fifth stat already
   spans and centres itself at mobile, identically in both builds.
   ═════════════════════════════════════════════════════════════════════ */

/* Never more columns than tiles. Two tiles make two columns, so they fill
   the row instead of stranding a third empty one.

   FROM 700px UP ONLY. Below that the design turns these rows into
   scroll-snap carousels - `grid-template-columns: none` with
   `grid-auto-flow: column` and `grid-auto-columns: 100%`, one card filling
   the screen and the rest swiped to - and this rule had no media query, so
   at (0,2,0) and a later source position it beat the carousel's own
   two-class rule and laid the cards out as a 2-up grid instead. At 390px
   that made each card 157px wide against the design's 327px, on the
   services hub, the three service pages, areas, contact, team, the blog and
   the knowledge hub. The block's note below already said the rows become
   carousels under 700px; the guard was simply missing from this one rule. */
@media (min-width: 700px) {
	.tpc-showcase:has(> :nth-child(2):last-child),
	.tpc-hub-grid:has(> :nth-child(2):last-child) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1025px) {
	/* Three across: four tiles would leave the fourth alone. Two columns
	   splits them 2 + 2. */
	.tpc-showcase:has(> :nth-child(4):last-child),
	.tpc-hub-grid:has(> :nth-child(4):last-child) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 700px) and (max-width: 1024px) {
	/* Two across: three tiles leave the third alone, nine leave the ninth.
	   Three columns divides both exactly. */
	.tpc-showcase:has(> :nth-child(3):last-child),
	.tpc-showcase:has(> :nth-child(9):last-child),
	.tpc-hub-grid:has(> :nth-child(3):last-child),
	.tpc-hub-grid:has(> :nth-child(9):last-child),
	/* The Knowledge Hub's five topic cards split 2 + 2 + 1 here, stranding
	   the fifth on the left with the right half empty. Three columns gives
	   3 + 2. */
	.tpc-kh-topic__grid:has(> :nth-child(5):last-child),
	/* The blog index's nine cards split 2 x 4 + 1 here. Three columns gives
	   3 + 3 + 3. */
	.tpc-blog-grid:has(> :nth-child(9):last-child) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* SAFETY NET. If a count the rules above do not name ever leaves one tile
   alone on the last row, centre it at one column's width rather than let it
   sit hard against the left edge. It keeps the row reading as deliberate,
   and it is what the proof strip already does with its fifth stat. */
@media (min-width: 700px) {
	.tpc-showcase > :last-child:nth-child(3n + 1):not(:first-child),
	.tpc-hub-grid > :last-child:nth-child(3n + 1):not(:first-child) {
		justify-self: center;
	}
}
