/* Case study and proof cards (Session 33, Taylor approved the mockups, Nov 17, 2026). One look for every proof card on the site:
   the case cards (.cs) on the service, industry, A&E and CPA pages, the Results page cards (.rcard), the homepage pair
   (#proof .pc-row), and the cost seg and ITC illustrative examples (.cs on cost seg, .ex-dark on ITC).
   - skin: a deep green gradient with a soft amber glow in the top corner, a hairline edge and a lifted shadow
   - figures sit in their own darker panel; the lead figure leads in amber; the other figures carry a small graphic drawn from
     the figure itself (_tools/case-viz.py writes the markup): blocks for a count or "X of Y", a year chip timeline, a share ring,
     Federal plus state chips; the 179D case shows the base and increased rates as bars
   - "What We Did" and "Why It Matters" are raised tiles; on desktop the story sits left and the figure panel right
   Loaded after each page's own stylesheets. The !important flags override the older .cs rules in industry-v2.css,
   service-v2.css and ae.css (their more specific "section > .wrap > .cs" selectors) without rewriting those files.
   Everything sits in the "legacy" cascade layer: some of those older rules are !important inside that layer, and an important rule
   in an earlier layer beats one outside any layer, so these win on specificity within the same layer instead. */
@layer legacy, foundation, chrome;
@layer legacy {
.cs,.rcard,#proof .pc-row,.ex.ex-dark{position:relative;overflow:hidden;color:#F4F3EE!important;
  background:radial-gradient(120% 90% at 100% 0%,rgba(224,160,48,.16),rgba(224,160,48,0) 55%),linear-gradient(160deg,#16301F 0%,#0D1F14 70%)!important;
  border:1px solid rgba(244,243,238,.10)!important;border-radius:20px!important;box-shadow:0 1px 2px rgba(13,31,20,.12),0 24px 60px -12px rgba(13,31,20,.45)!important}
.cs::before,.rcard::before,#proof .pc-row::before,.ex.ex-dark::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
.cs,.rcard{padding:48px!important}
.cs>.eyebrow,.rcard>.eyebrow,#proof .pc-row .eyebrow,.ex.ex-dark>.eyebrow{color:#F2C36B!important;font-weight:700;font-size:15px!important}
.cs .badges li,.rcard .badges li{font-size:15px!important;background:rgba(244,243,238,.08)!important;border:1px solid rgba(244,243,238,.22)!important;color:#F4F3EE!important;border-radius:999px!important}
.cs .badges li:first-child,.rcard .badges li:first-child{background:#F4F3EE!important;color:#0D1F14!important;border-color:#F4F3EE!important}
.cs h2,.rcard h3{color:#fff!important}
/* figure panel */
.cs-stats,.rc-figs{background:rgba(9,22,14,.55)!important;border:1px solid rgba(244,243,238,.14)!important;border-radius:16px!important;padding:28px!important;display:flex!important;flex-direction:column;gap:0!important;margin:0 0 24px!important}
.cs-stat,.rc-fig{background:none!important;border:0!important;border-top:1px solid rgba(244,243,238,.16)!important;border-radius:0!important;padding:16px 0 0!important;margin:16px 0 0!important;display:block!important;box-shadow:none!important}
.cs-stat.lead,.rc-fig.lead{border-top:0!important;padding-top:0!important;margin-top:0!important}
.cs-stat.lead .cs-fig,.rc-fig.lead .f{font-size:46px!important;font-weight:800!important;color:#E0A030!important;letter-spacing:-.025em;line-height:1.05!important;white-space:nowrap}
.cs-stat:not(.lead) .cs-fig,.rc-fig:not(.lead) .f{font-size:20px!important;color:#fff!important;margin:0 0 2px!important;white-space:normal!important}
.cs-lab,.rc-fig .l{color:#F4F3EE!important;font-size:17px!important}
.cs-pre{display:block;font-size:20px;font-weight:700;letter-spacing:0;color:#F2C36B;margin:0 0 4px}
/* story tiles */
.cs-story,.rc-story{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;margin:0!important}
.cs-story>div,.rc-story>div{padding:18px 18px 16px;border-radius:14px;background:rgba(244,243,238,.06);border:1px solid rgba(244,243,238,.16);border-top:3px solid #E0A030}
.cs-story h3,.rc-story h4{color:#fff!important;font-size:19px!important;margin:0 0 6px!important}
.cs-story p,.rc-story p{color:#F4F3EE!important;font-size:15px!important;line-height:1.55}
/* links: the arrow stays with the last word */
.cs-links{margin-top:28px}
.cs .cs-cta,.rcard .rc-page,#proof .pc-row .cs-cta{color:#F2C36B!important;text-decoration:underline;text-underline-offset:4px}
.cs .cs-links{display:block!important}
.cs .cs-cta{display:inline!important;margin:0 28px 0 0!important;padding:12px 0;line-height:1.5;white-space:normal}
.cs .nw,.rcard .nw,#proof .nw{white-space:nowrap}
.cs .cs-cta .arr{display:inline-block!important;width:18px;height:18px;margin-left:6px;vertical-align:-3px;stroke:currentColor;stroke-width:2;fill:none}
.cs .arr,.rcard .arr,#proof .arr{transition:transform .15s}
.cs-cta:hover .arr,.rc-page:hover .arr{transform:translateX(3px)}
/* Results cards: the estimate action reads as a text link with an arrow, like the case cards on every other page */
.rcard .rc-links .btn-secondary{background:none!important;border:0!important;box-shadow:none!important;padding:0!important;min-height:48px;display:inline-flex;align-items:center;color:#F2C36B!important;font-weight:700;font-size:17px;text-decoration:underline;text-underline-offset:4px}
/* graphics */
.viz{margin:0 0 10px}
.viz-pips{display:flex;flex-wrap:wrap;gap:5px;max-width:300px}
.viz-pips i{width:14px;height:14px;border-radius:4px;background:linear-gradient(180deg,#F2C36B,#E0A030);box-shadow:0 0 0 1px rgba(224,160,48,.35),0 2px 6px rgba(224,160,48,.25)}
.viz-pips i.off{background:rgba(244,243,238,.10);box-shadow:inset 0 0 0 1px rgba(244,243,238,.28)}
.viz-pips.lg i{width:22px;height:22px;border-radius:6px}
.viz-yrs{display:flex;align-items:center;max-width:340px}
.viz-yrs span{flex:0 0 auto;padding:5px 10px;border-radius:999px;font-size:15px;font-weight:700;color:#0D1F14;background:linear-gradient(180deg,#F2C36B,#E0A030)}
.viz-yrs b{flex:1 1 12px;height:2px;min-width:10px;background:linear-gradient(90deg,#E0A030,#F2C36B)}
.has-ring{display:grid!important;grid-template-columns:80px minmax(0,1fr);column-gap:16px;align-items:center}
.has-ring .viz{grid-row:1/span 2;margin:0}
.viz-ring{position:relative;width:80px;height:80px}
.viz-ring svg{width:80px;height:80px;transform:rotate(-90deg)}
.viz-ring circle{fill:none;stroke-width:9}
.viz-ring .bg{stroke:rgba(244,243,238,.12)} .viz-ring .fg{stroke:#E0A030;stroke-linecap:round}
.viz-ring em{position:absolute;inset:0;display:grid;place-items:center;font-style:normal;font-weight:800;font-size:17px;color:#F2C36B}
.viz-st{display:flex;flex-wrap:wrap;gap:6px}
.viz-st span{padding:5px 10px;border-radius:8px;font-size:15px;font-weight:700;color:#0D1F14}
.viz-st .fed{background:#F4F3EE} .viz-st .st{background:linear-gradient(180deg,#F2C36B,#E0A030)}
.cs-bars{display:grid;gap:12px;margin-top:20px;padding-top:18px;border-top:1px solid rgba(244,243,238,.16)}
.cs-bar{display:grid;grid-template-columns:112px minmax(0,1fr) 56px;align-items:center;gap:10px}
.cs-bar .bn{font-size:15px;font-weight:700;color:#F4F3EE} .cs-bar b{font-size:17px;color:#fff;text-align:right}
.cs-bar .tr{height:12px;border-radius:999px;background:rgba(244,243,238,.12);overflow:hidden}
.cs-bar .tr i{display:block;height:100%;border-radius:inherit;background:#C9CFC9}
.cs-bar.hi .tr i{background:linear-gradient(90deg,#E0A030,#F2C36B)} .cs-bar.hi b{color:#F2C36B}
.cs-unit{margin:0;color:#F4F3EE;font-size:15px}
/* desktop: story left, figures right (case cards with a story; the cost seg example keeps its own stacked order) */
@media(min-width:961px){
  /* Session 33 (Taylor: "a lot of unused space"): the figures panel starts at the top, the story column is wider so the chips
     fit one line, the last story item takes up any extra height, and the links run full width under both columns */
  .cs:has(.cs-story){display:grid!important;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);grid-template-rows:auto auto auto 1fr;column-gap:48px;row-gap:0;align-items:start}
  .cs:has(.cs-story)>*{grid-column:1}
  .cs:has(.cs-story)>.cs-stats{grid-column:2;grid-row:1/span 4;align-self:start;margin:0!important}
  .cs:has(.cs-story)>.cs-links{grid-column:1/-1;margin-top:20px!important}
  .cs:has(.cs-story) h2{margin:0 0 24px!important}
  .cs h2{max-width:none!important;font-size:32px!important;line-height:1.15!important}
  .cs .cs-stat.lead .cs-fig{font-size:40px!important}
  .cs .badges li{padding:6px 11px!important}
}
/* Results page: narrow cards stack the story tiles; the lead figure may wrap after "Nearly" */
.rcard{min-width:0} .rcard>*{min-width:0}
.rcard .rc-fig.lead .f{font-size:42px!important;white-space:normal}
.rcard .rc-story{grid-template-columns:minmax(0,1fr)!important}
.rcard .rc-figs{margin-bottom:16px!important}
/* homepage: the two cases as two lifted cards (the figure keeps its fitted sizes from industry-v2.css) */
#proof .pc-combo{background:none!important;box-shadow:none!important;padding:0!important;gap:24px!important}
#proof .pc-row{padding:28px!important}
@media(max-width:767px){#proof .pc-row{padding:20px 18px!important}}
@media(max-width:960px){.cs,.rcard{padding:32px!important}}
@media(max-width:600px){
  .cs,.rcard{padding:24px 20px!important}
  .cs-stats,.rc-figs{padding:20px 18px!important}
  .cs-story>div,.rc-story>div{padding:16px 16px 14px}
  .cs-stat,.rc-fig{padding-top:14px!important;margin-top:14px!important}
  .cs-stat.lead .cs-fig,.rc-fig.lead .f{font-size:34px!important}
  .rcard .rc-fig.lead .f{font-size:34px!important}
  .cs-story,.rc-story{grid-template-columns:minmax(0,1fr)!important}
  .cs .cs-cta{margin-right:0!important;line-height:2.4} .cs .cs-cta:not(:last-child)::after{content:"\A";white-space:pre}  /* one link per line */
}
@media(prefers-reduced-motion:reduce){.cs .arr,.rcard .arr,#proof .arr{transition:none}}

/* CPA page: it does not load industry-v2.css, so the card's base layout comes from here (same values as industry-v2.css) */
.res-legacy .cs .eyebrow{margin:0 0 12px!important}
.res-legacy .cs .badges{display:flex!important;flex-wrap:wrap;gap:8px;list-style:none!important;padding:0!important;margin:0 0 18px!important}
.res-legacy .cs .badges li{list-style:none!important;margin:0!important;padding:6px 12px!important;font-size:15px!important;font-weight:600;line-height:1.3}
.res-legacy .cs .badges li::before,.res-legacy .cs .badges li::marker{content:none!important}
.res-legacy .cs h2{font-size:32px!important;line-height:1.15!important;letter-spacing:-.02em;margin:0 0 24px!important;text-wrap:balance}
.res-legacy .cs .cs-fig{margin:0 0 6px!important;font-weight:700!important}
.res-legacy .cs .cs-stat:not(.lead) .cs-fig{font-size:20px!important}
.res-legacy .cs .cs-lab{margin:0!important;line-height:1.45}
.res-legacy .cs .cs-story p{margin:0!important}
.res-legacy .cs .cs-links{display:block!important;margin-top:28px!important}
.res-legacy .cs .cs-cta{font-size:17px!important;font-weight:700!important}
.res-legacy .cs .arr{width:18px;height:18px;margin-left:6px;stroke:currentColor;stroke-width:2;fill:none;flex:0 0 18px}
@media(max-width:600px){.res-legacy .cs h2{font-size:28px!important}}
}
