/* ==========================================================================
   Common Workplace Injuries page
   Injury Care Associates — injurycareco.com
   Scoped under .cwi. Tokens map to the site's Bootstrap custom properties;
   hex fallbacks are the live values so the page also works standalone.
   ========================================================================== */

.cwi {
  --cwi-primary: var(--bs-primary-hex, #0072bc);
  --cwi-primary-dark: #005b96;
  --cwi-navy: var(--bs-tertiary-hex, #1e2d3b);
  --cwi-light: var(--bs-light-hex, #f2f8fc);
  --cwi-ink: var(--bs-heading-color-hex, #212124);
  --cwi-body: #495356;
  --cwi-line: var(--bs-secondary-border-hex, #e7e7e7);
  --cwi-accent: #80b7e3;
  --cwi-warning: var(--bs-warning-hex, #ffd240);
  --cwi-warning-tint: #fff5d6;
  --cwi-radius: var(--bs-border-radius, 10px);
  --cwi-heading: 'Catamaran', sans-serif;
  --cwi-body-font: 'Nunito Sans', system-ui, sans-serif;

  font-family: var(--cwi-body-font);
  color: var(--cwi-ink);
  background: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
.cwi *, .cwi *::before, .cwi *::after { box-sizing: border-box; }
.cwi img { max-width: 100%; }
.cwi a:not([class]) { color: var(--cwi-navy); }
.cwi a:not([class]):hover { color: var(--cwi-primary); }

.cwi-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- type ---------- */
.cwi-h1 { font-family: var(--cwi-heading); font-weight: 800; font-size: clamp(34px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -.02em; margin: 0 0 18px; max-width: 16ch; text-wrap: balance; }
.cwi-h2 { font-family: var(--cwi-heading); font-weight: 800; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -.015em; margin: 0 0 12px; }
.cwi-h3 { font-family: var(--cwi-heading); font-weight: 800; font-size: 24px; line-height: 1.15; margin: 0 0 14px; }
.cwi-kicker { font-family: var(--cwi-heading); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--cwi-primary); margin: 0 0 10px; }
.cwi-kicker--accent { color: var(--cwi-accent); }
.cwi-kicker--warning { color: var(--cwi-warning); }
.cwi-sub { font-size: 18px; line-height: 1.55; color: var(--cwi-body); margin: 0; }
.cwi-sub--wide { max-width: 90ch; }
.cwi-sub--invert { color: var(--cwi-light); margin-bottom: 18px; max-width: 54ch; }
.cwi-head { margin-bottom: 34px; }
.cwi-head--narrow { max-width: 60ch; }
.cwi-fine { font-size: 14px; line-height: 1.5; color: var(--cwi-body); margin: 20px 0 0; border-top: 1px solid var(--cwi-line); padding-top: 16px; }
.cwi-label { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cwi-primary); margin-bottom: 6px; }

/* ---------- buttons ---------- */
.cwi-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--cwi-body-font); font-weight: 700; font-size: 16px; padding: 13px 22px; border-radius: var(--cwi-radius); border: 2px solid transparent; text-decoration: none; cursor: pointer; transition: background-color .18s, border-color .18s, color .18s; }
.cwi-btn--lg { font-size: 17px; padding: 15px 26px; white-space: nowrap; }
.cwi-btn--round { border-radius: 999px; font-weight: 600; font-size: 17px; display: flex; }
.cwi-btn--primary { background: var(--cwi-primary); border-color: var(--cwi-primary); color: #fff; box-shadow: 0 6px 18px rgba(0,114,188,.35); }
.cwi-btn--primary:hover { background: var(--cwi-primary-dark); border-color: var(--cwi-primary-dark); color: #fff; }
.cwi-btn--outline { background: #fff; border-color: var(--cwi-line); color: var(--cwi-navy); }
.cwi-btn--outline:hover { border-color: var(--cwi-navy); color: var(--cwi-navy); }
.cwi-btn--outline-blue { background: transparent; border-color: var(--cwi-primary); color: var(--cwi-primary); box-shadow: none; }
.cwi-btn--outline-blue:hover { background: var(--cwi-primary); color: #fff; }
.cwi-btn--ghost { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.cwi-btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.cwi-btnrow { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.cwi-btnrow--sm { gap: 10px; margin-bottom: 0; }

/* ---------- hero ---------- */
.cwi-hero { position: relative; background: var(--cwi-navy); color: #fff; overflow: hidden; }
.cwi-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.cwi-hero__scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30,45,59,.85) 0%, rgba(30,45,59,.55) 55%, rgba(30,45,59,.15) 100%); }
.cwi-hero__inner { position: relative; padding-top: 64px; padding-bottom: 60px; }
.cwi-hero__lede { font-size: clamp(17px, 2vw, 21px); line-height: 1.5; color: var(--cwi-light); max-width: 48ch; margin: 0 0 28px; }
.cwi-hero__link { display: inline-flex; font-size: 16px; color: var(--cwi-accent); font-weight: 600; text-decoration: underline; }
.cwi-hero__link:hover { color: #fff; }

/* ---------- sections ---------- */
.cwi-sec { border-bottom: 1px solid var(--cwi-line); }
.cwi-sec > .cwi-wrap { padding-top: 68px; padding-bottom: 68px; }
.cwi-sec--white { background: #fff; }
.cwi-sec--light { background: var(--cwi-light); }
.cwi-sec--navy { background: var(--cwi-navy); color: #fff; border-bottom: 0; }
.cwi-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; align-items: start; }
.cwi-two--wide { gap: 40px; }
.cwi-sticky { position: sticky; top: 20px; }

/* ---------- explorer ---------- */
.cwi-picks { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cwi-pick { width: 100%; text-align: left; font: inherit; cursor: pointer; border-radius: var(--cwi-radius); padding: 14px 16px; border: 2px solid var(--cwi-line); background: #fff; color: var(--cwi-navy); transition: all .18s; }
.cwi-pick:hover { border-color: var(--cwi-navy); }
.cwi-pick.is-active { background: var(--cwi-navy); border-color: var(--cwi-navy); color: #fff; }
.cwi-pick__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cwi-pick__name { font-family: var(--cwi-heading); font-weight: 800; font-size: 18px; }
.cwi-pick__share { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .75; }
.cwi-pick__tag { display: block; font-size: 15px; line-height: 1.4; margin-top: 3px; opacity: .85; }

.cwi-detail { border: 1px solid var(--cwi-line); border-radius: var(--cwi-radius); overflow: hidden; }
.cwi-detail__head { background: var(--cwi-navy); color: #fff; padding: 22px 26px; }
.cwi-detail__kicker { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cwi-accent); margin-bottom: 6px; }
.cwi-detail__name { font-family: var(--cwi-heading); font-weight: 800; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; margin: 0 0 8px; }
.cwi-detail__how { font-size: 16px; line-height: 1.5; color: var(--cwi-light); margin: 0; }
.cwi-detail__body { background: #fff; padding: 24px 26px; }
.cwi-detail__body.is-fading { animation: cwiFadeIn .35s ease both; }
.cwi-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.cwi-stat { background: var(--cwi-light); border-radius: var(--cwi-radius); padding: 14px 16px; }
.cwi-stat__label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cwi-body); margin-bottom: 4px; }
.cwi-stat__val { font-family: var(--cwi-heading); font-weight: 800; font-size: 22px; color: var(--cwi-primary); line-height: 1.1; }
.cwi-blocks { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.cwi-block__title { font-family: var(--cwi-heading); font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.cwi-block ul { margin: 0; padding-left: 18px; font-size: 16px; line-height: 1.55; color: var(--cwi-body); }
.cwi-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cwi-chip { font-size: 14px; font-weight: 700; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--cwi-line); color: var(--cwi-navy); }
.cwi-redflag { background: var(--cwi-warning-tint); border: 1px solid var(--cwi-warning); border-radius: var(--cwi-radius); padding: 12px 16px; font-size: 15px; line-height: 1.5; }
.cwi-redflag b { font-family: var(--cwi-heading); }

/* ---------- triage ---------- */
.cwi-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.cwi-card { background: #fff; border: 1px solid var(--cwi-line); border-radius: var(--cwi-radius); padding: 26px; }
.cwi-card--navy { background: var(--cwi-navy); border-color: var(--cwi-navy); color: #fff; }
.cwi-card p { font-size: 16px; line-height: 1.55; color: var(--cwi-body); margin: 0 0 12px; }
.cwi-card p:last-child { margin-bottom: 0; }
.cwi-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cwi-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.45; }
.cwi-list li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--cwi-primary); flex: none; margin-top: 9px; }
.cwi-card--navy .cwi-list li { color: var(--cwi-light); }
.cwi-card--navy .cwi-list li::before { background: var(--cwi-warning); }

/* ---------- yellow band ---------- */
.cwi-yellow { background: var(--cwi-warning); overflow: hidden; }
.cwi-yellow__inner { max-width: 1320px; margin: 0 auto; padding: 44px 24px; display: flex; flex-wrap: wrap; gap: 28px 36px; align-items: center; }
.cwi-yellow__text { flex: 1 1 380px; min-width: 0; }
.cwi-yellow__text h2 { font-family: var(--cwi-heading); font-weight: 600; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; color: var(--cwi-primary); margin: 0 0 10px; max-width: 26ch; }
.cwi-yellow__text p { font-style: oblique; font-size: 16px; line-height: 1.5; color: var(--cwi-primary); margin: 0; max-width: 62ch; }
.cwi-yellow__actions { flex: 0 1 300px; min-width: 240px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- workers ---------- */
.cwi-points { display: flex; flex-direction: column; gap: 10px; }
.cwi-point { background: rgba(255,255,255,.06); border: 1px solid rgba(128,183,227,.3); border-radius: var(--cwi-radius); padding: 16px 18px; }
.cwi-point b { display: block; font-family: var(--cwi-heading); font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.cwi-point span { font-size: 16px; line-height: 1.5; color: var(--cwi-light); }

/* ---------- motion ---------- */
@keyframes cwiHeroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes cwiSlideUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes cwiFadeIn { from { opacity: 0; } to { opacity: 1; } }
.cwi-anim { animation: cwiHeroIn .7s cubic-bezier(.2,.7,.3,1) both; }
.cwi-anim--1 { animation-duration: .6s; }
.cwi-anim--2 { animation-delay: .08s; }
.cwi-anim--3 { animation-delay: .16s; }
.cwi-anim--4 { animation-delay: .24s; }
html.js-reveal .cwi [data-reveal] { opacity: 0; }
html.js-reveal .cwi [data-reveal].is-shown { opacity: 1; animation: cwiSlideUp .55s cubic-bezier(.2,.7,.3,1) both; }
html.js-reveal .cwi [data-reveal].is-shown.no-anim { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .cwi *, .cwi *::before, .cwi *::after { animation: none !important; transition: none !important; }
  html.js-reveal .cwi [data-reveal] { opacity: 1; }
}
@media print {
  .cwi [data-reveal] { opacity: 1 !important; animation: none !important; }
  .cwi-sticky { position: static; }
}


/* ======================================================================
   ICA build additions — appended, never merged (append-only CSS rule).
   ====================================================================== */

/* --- reveal fail-open ---------------------------------------------------
   The site's SAL leaves [data-sal] at opacity:0 when its observer does not
   fire, and the design's own reveal hides content behind html.js-reveal.
   Neither is loaded here; guarantee the design's [data-reveal] blocks and
   .cwi-anim entrance classes are always visible. */
.cwi [data-reveal], .cwi .cwi-anim { opacity: 1 !important; transform: none !important; animation: none !important; }

/* --- theme collision: heading colour --------------------------------------
   The design sets colour on inverted sections and lets headings inherit; the
   ICA theme sets `color` on h1/h2/h3 directly, and a direct rule beats an
   inherited value. Restate the design's intent, scoped to inverted contexts. */
.cwi-hero .cwi-h1, .cwi-hero .cwi-hero__lede, .cwi-hero .cwi-kicker, .cwi-hero .cwi-hero__link, .cwi-hero .cwi-hero__worker { color: #fff; }
.cwi-sec--navy .cwi-h2, .cwi-sec--navy .cwi-h3, .cwi-sec--navy .cwi-sub { color: #fff; }
.cwi-band__item b, .cwi-point b { color: #fff; }
.cwi-card--navy .cwi-h3, .cwi-card--navy .cwi-list, .cwi-col--navy .cwi-col__title, .cwi-col--navy ul { color: #fff; }

/* --- band numbering as a CSS counter ---------------------------------------
   MODX has no lpad modifier; a counter renumbers if an editor reorders rows. */
.cwi-band__grid { counter-reset: cwiband; }
.cwi-band__item { counter-increment: cwiband; }
.cwi-band__n::before { content: counter(cwiband, decimal-leading-zero); }
.cwi-steps { counter-reset: cwistep; }
.cwi-step { counter-increment: cwistep; }
.cwi-step__n::before, .cwi-step__num::before { content: counter(cwistep, decimal-leading-zero); }

/* --- free-text body region ([[*content]]) ----------------------------- */
.cwi-freetext { font-size: 16px; line-height: 1.6; color: #495356; }
.cwi-freetext p:last-child { margin-bottom: 0; }

/* --- explorer reveal landing offset (2026-10-04, m4-explorer) ---------------
   On one-column layouts common-injuries.js scrolls #cwi-detail into view after
   a tap. Give that landing the same 20px breathing room the panel has when it
   is sticky beside the list, so the rounded head never touches the top edge.
   scroll-margin only affects programmatic/anchor scrolling; layout unchanged. */
.cwi-sticky { scroll-margin-top: 20px; }
