/* =============================================
   BEST WORKERS COMP — Global Stylesheet
   bestworkerscompensation.com
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0a0a0c;
  --bg2:      #0e0f12;
  --bg3:      #131519;
  --border:   #1d2127;
  --border2:  #293039;
  --text:     #edeff2;
  --muted:    #9aa3ab;
  --muted2:   #6e7680;
  --amber:    #f59e0b;
  --amber2:   #fbbf24;
  --amber-bg: rgba(245,158,11,0.08);
  --amber-border: rgba(245,158,11,0.2);
  --green:    #22c55e;
  --green-bg: rgba(34,197,94,0.08);
  --red:      #ef4444;
  --nav-h:    64px;
  --radius:   14px;
  --radius-lg:20px;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: 'Bricolage Grotesque', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow:   0 2px 16px rgba(0,0,0,0.35);
  --shadow-lg:0 12px 56px rgba(0,0,0,0.55);
  --max-w:    1200px;
  --max-w-narrow: 780px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--amber); }
img, svg { display: block; max-width: 100%; }

/* --- Layout helpers --- */
.container        { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 24px; }

/* --- Typography --- */
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; color: var(--text); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}
.kicker::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--amber);
  opacity: 0.6;
}

.section-title {
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
  text-wrap: balance;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  line-height: 1.75;
}

.prose p {
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 18px;
}
.prose p:last-child { margin-bottom: 0; }
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.prose strong { color: var(--text); font-weight: 600; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s;
  white-space: nowrap;
  text-decoration: none;
}

.btn-amber {
  background: linear-gradient(180deg, var(--amber2) 0%, var(--amber) 60%);
  color: #17120a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 1px 3px rgba(0,0,0,0.4);
}
.btn-amber:hover {
  background: linear-gradient(180deg, #fcd34d 0%, var(--amber2) 60%);
  color: #17120a;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 6px 20px rgba(245,158,11,0.3);
}

.btn-ghost {
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-bg);
}

.btn-lg { padding: 16px 34px; font-size: 1rem; border-radius: 100px; }

/* --- NAV --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(10,10,12,0.8);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled { border-color: var(--border); background: rgba(10,10,12,0.92); }

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing:0;
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-brand span { color: var(--amber); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 9px;
  border-radius: 6px;
  transition: all 0.18s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--bg3); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 94vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 72px) 24px 88px;
  background:
    radial-gradient(ellipse 900px 480px at 78% -10%, rgba(245,158,11,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at 8% 108%, rgba(245,158,11,0.04) 0%, transparent 55%),
    var(--bg);
}

.hero-glow-1 {
  position: absolute;
  top: -220px; left: -220px;
  width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 65%);
  pointer-events: none;
}
.hero-glow-2 {
  position: absolute;
  bottom: -120px; right: -120px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(34,197,94,0.04) 0%, transparent 65%);
  pointer-events: none;
}

/* Ambient background texture built from the site's own real WCIRB class-code
   data (not a generated image) -- scattered, low-opacity, denser at the edges
   and masked out behind the headline for legibility. Barely-there parallax
   drift on idle; respects reduced-motion. */
.hero-code-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 640px 520px at 32% 46%, transparent 0%, transparent 35%, black 78%);
  mask-image: radial-gradient(ellipse 640px 520px at 32% 46%, transparent 0%, transparent 35%, black 78%);
  animation: hero-code-drift 46s ease-in-out infinite alternate;
}
@keyframes hero-code-drift {
  from { transform: translate(0, 0); }
  to { transform: translate(-10px, 8px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-code-field { animation: none; }
}
@media (max-width: 768px) {
  .hero-code-field { display: none; }
}

.hero-inner {
  max-width: var(--max-w); /* aligns with the body sections below on typical screens */
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 520px;
  gap: 72px;
  align-items: center;
  position: relative;
  z-index: 1;
}
/* On large / ultrawide screens the hero breathes wider and the crane grows,
   so the composition fills the viewport instead of sitting stranded as a
   small centered island in a sea of black. */
@media (min-width: 1500px) {
  .hero-inner { max-width: 1460px; grid-template-columns: 1.05fr 600px; gap: 96px; }
  #crane-svg { max-width: 600px; }
}
@media (min-width: 2000px) {
  .hero-inner { max-width: 1640px; grid-template-columns: 1.05fr 680px; }
  #crane-svg { max-width: 680px; }
  .hero-headline { font-size: 5rem; }
}

.hero-content { max-width: 640px; }

.hero-headline {
  font-size: clamp(2.5rem, 5.2vw, 4.35rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: var(--text);
  margin-bottom: 22px;
  text-wrap: balance;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 540px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.hero-stats {
  display: flex;
  gap: 36px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; gap: 5px; }
.stat-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: -0.01em;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--muted2);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-visual svg {
  filter: drop-shadow(0 24px 64px rgba(0,0,0,0.5)) drop-shadow(0 4px 24px rgba(245,158,11,0.08));
  border-radius: 18px;
}

/* --- SECTIONS --- */
.section {
  padding: 104px 0;
}
.section-alt {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  margin-bottom: 56px;
}
.section-header.centered {
  text-align: center;
}
.section-header.centered .kicker { justify-content: center; }
.section-header.centered .kicker::after {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--amber);
  opacity: 0.6;
}

/* --- CARDS --- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.015) 0%, transparent 40%), var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.step-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px var(--amber);
  letter-spacing: 0;
  display: block;
  margin-bottom: 16px;
  line-height: 1;
  opacity: 0.85;
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
  line-height: 1;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.card-body {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.75;
}

/* --- STAT CALLOUT (sidebar) --- */
.stat-callout {
  display: flex;
  gap: 16px;
}
.callout-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.callout-val {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--amber);
}
.callout-label {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* --- TABLES --- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.wc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.wc-table thead {
  background: var(--bg3);
}
.wc-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--muted2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.wc-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  vertical-align: top;
}
.wc-table tbody tr:last-child td { border-bottom: none; }
.wc-table tbody tr:hover td { background: rgba(255,255,255,0.02); }

.code-cell {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--amber2) !important;
  font-weight: 500;
}
.rate-cell {
  font-family: var(--font-mono);
  color: var(--green) !important;
  font-weight: 500;
}

/* Risk tier badges */
.tier-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.tier-low    { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.tier-med    { background: rgba(245,158,11,0.1); color: var(--amber); border: 1px solid rgba(245,158,11,0.2); }
.tier-high   { background: rgba(251,146,60,0.1); color: #fb923c; border: 1px solid rgba(251,146,60,0.2); }
.tier-danger { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }

/* --- INFO BOX --- */
.info-box {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
}

/* --- CASE STUDIES --- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.case-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.case-industry {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.case-situation {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 10px 0 0;
  font-style: italic;
}

.case-result {
  font-size: 0.875rem;
  color: var(--green);
  font-weight: 600;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* --- CARRIER GRID --- */
.carrier-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.carrier-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  transition: all 0.18s;
}
.carrier-pill:hover {
  border-color: var(--amber-border);
  color: var(--amber);
}

/* --- FAQ --- */
.faq { display: flex; flex-direction: column; gap: 4px; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
}

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  gap: 16px;
  transition: background 0.18s;
}
.faq-q:hover { background: rgba(255,255,255,0.03); }

.faq-arrow {
  color: var(--amber);
  font-size: 1rem;
  flex-shrink: 0;
  transition: transform 0.25s;
}
.faq-item.open .faq-arrow { transform: rotate(180deg); }

.faq-a {
  display: none;
  padding: 0 24px 20px;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.8;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.faq-item.open .faq-a { display: block; }

/* --- Expandable long-form info (native <details>: zero JS, content stays
   in the DOM so it's crawlable; styled to match the FAQ accordion) --- */
.info-details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg3);
  margin-bottom: 12px;
  overflow: hidden;
}
.info-details > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  list-style: none;
  transition: background 0.18s;
}
.info-details > summary::-webkit-details-marker { display: none; }
.info-details > summary::after {
  content: '▾';
  color: var(--amber);
  font-size: 1rem;
  flex-shrink: 0;
  transition: transform 0.25s;
}
.info-details[open] > summary::after { transform: rotate(180deg); }
.info-details > summary:hover { background: rgba(255,255,255,0.03); }
.info-details > summary:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.info-details .prose {
  padding: 4px 24px 22px;
  border-top: 1px solid var(--border);
}
.section-light .info-details { background: var(--bg2); }

/* --- CTA SECTION --- */
.cta-section {
  padding: 96px 24px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(245,158,11,0.04) 50%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-section .kicker { display: block; margin-bottom: 16px; }

/* --- FOOTER --- */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {}

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--muted2);
  line-height: 1.7;
  margin-bottom: 10px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.18s;
}
.footer-links a:hover { color: var(--amber); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted2);
  flex-wrap: wrap;
  gap: 8px;
}

/* --- REVEAL ANIMATION --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-visual { display: none; }
  #ex-mod .container > div {
    grid-template-columns: 1fr !important;
  }
  .stat-callout { flex-direction: row; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 900px) {
  .process-steps {
    grid-template-columns: 1fr;
  }
  .case-grid {
    grid-template-columns: 1fr;
  }
  #carriers .container > div {
    grid-template-columns: 1fr !important;
  }
  #risk .container > div {
    grid-template-columns: 1fr !important;
  }
}

/* Nav collapses to the hamburger menu earlier than the page's general mobile
   breakpoint (below) because seven text nav-links plus the full "Best Workers
   Compensation" wordmark need more horizontal room than a typical phone/tablet
   breakpoint provides -- below this, they wrap or overflow instead of fitting
   on one line. Verified empirically down to the point this fits (needs ~1158px). */
@media (max-width: 1200px) {
  .nav-links { display: none; }
  .nav-right .btn-ghost { display: none; }
  .hamburger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    gap: 4px;
    z-index: 99;
  }
  .nav-links.open a {
    padding: 12px 16px;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .nav-brand { font-size: 0.95rem; }

  .hero { padding: calc(var(--nav-h) + 40px) 24px 60px; }
  .hero-headline { font-size: 2.2rem; }
  .hero-ctas { flex-direction: column; }
  .hero-stats { gap: 20px; }

  .section { padding: 64px 0; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom { flex-direction: column; text-align: center; }

  .stat-callout { flex-direction: column; }
}

@media (max-width: 480px) {
  .tier-table th:nth-child(3),
  .tier-table td:nth-child(3) { display: none; }
  .hero-stats { gap: 16px; }
  .stat-value { font-size: 1.05rem; }
  .nav-brand { font-size: 0.78rem; }
  .nav-inner { gap: 10px; }
}

/* =============================================
   CONTENT PAGE LAYOUT (class codes, guides, etc.)
   ============================================= */

.page-hero {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 80px 0 48px;
  margin-top: var(--nav-h);
}

.page-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--muted2);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--amber); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--muted2); }

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.1;
}

.page-hero .hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.rate-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--amber2);
}

.content-grid {
  max-width: var(--max-w);
  margin: 48px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.content-main {
  min-width: 0;
}

.content-main h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 14px;
  padding-top: 8px;
}

.content-main h2:first-child { margin-top: 0; }

.content-main h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
}

.content-main p {
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 16px;
}

.content-main ul, .content-main ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.content-main li {
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 6px;
}

.content-main strong { color: var(--text); font-weight: 600; }

.content-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-cta {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.sidebar-cta h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.sidebar-cta p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.sidebar-cta .btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 12px;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}

.sidebar-links a {
  font-size: 0.83rem;
  color: var(--muted);
  padding: 4px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.sidebar-links a:hover { color: var(--amber); }
.sidebar-links a::after { content: '›'; color: var(--amber); }

.info-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.info-box.amber {
  background: var(--amber-bg);
  border-color: var(--amber-border);
}

.info-box h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.info-box p, .info-box li {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
}

.info-box ul { padding-left: 16px; }
.info-box li { margin-bottom: 4px; }

.content-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.88rem;
}

.content-table th {
  background: var(--bg3);
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border2);
}

.content-table td {
  padding: 11px 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}

.content-table td:first-child {
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 0.82rem;
}

.content-table tr:last-child td { border-bottom: none; }

.related-codes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.related-code-link {
  display: block;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  text-decoration: none;
  transition: border-color 0.15s;
}

.related-code-link:hover { border-color: var(--amber); }

.related-code-link .code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--amber);
  display: block;
  margin-bottom: 3px;
}

.related-code-link .desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.code-card {
  display: block;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.code-card:hover {
  border-color: var(--amber);
  background: var(--bg3);
}

.code-card .card-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--amber);
  display: block;
  margin-bottom: 4px;
}

.code-card .card-desc {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.code-card .card-rate {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted2);
  display: block;
  margin-bottom: 8px;
}

.code-card .card-link {
  font-size: 0.8rem;
  color: var(--amber);
}

.codes-category {
  margin-bottom: 40px;
}

.codes-category-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--amber-border);
}

.codes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .content-sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 640px) {
  .page-hero { padding: 60px 0 32px; }
  .content-grid { margin: 32px auto; gap: 24px; }
  .related-codes { grid-template-columns: 1fr; }
  .codes-grid { grid-template-columns: 1fr 1fr; }
}

/* =============================================
   CASE STUDY STYLES
   ============================================= */

.case-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.case-stat {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}

.case-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted2);
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.case-stat-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--amber);
  display: block;
}

.case-stat-sub {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.outcome-box {
  background: linear-gradient(135deg, rgba(245,158,11,0.08) 0%, rgba(245,158,11,0.03) 100%);
  border: 1px solid var(--amber-border);
  border-radius: 14px;
  padding: 24px 28px;
  margin: 28px 0;
}

.outcome-box h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}

.outcome-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(245,158,11,0.12);
  font-size: 0.88rem;
}

.outcome-row:last-child { border-bottom: none; }

.outcome-row .label { color: var(--muted); }
.outcome-row .before { color: var(--muted); text-decoration: line-through; }
.outcome-row .after { color: var(--green); font-weight: 700; }

.timeline-steps {
  position: relative;
  padding-left: 28px;
  margin: 20px 0;
}

.timeline-steps::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border2);
}

.timeline-step {
  position: relative;
  margin-bottom: 20px;
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid var(--bg);
}

.timeline-step h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-step p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.quote-block {
  border-left: 3px solid var(--amber);
  padding: 14px 20px;
  margin: 24px 0;
  background: var(--bg3);
  border-radius: 0 8px 8px 0;
}

.quote-block p {
  font-style: italic;
  color: var(--text);
  font-size: 0.95rem;
  margin: 0 0 8px;
  line-height: 1.7;
}

.quote-block cite {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: normal;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.case-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s, transform 0.15s;
}

.case-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}

.case-card-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

.case-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.case-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.case-card-result {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--amber);
}

@media (max-width: 900px) {
  .case-grid { grid-template-columns: 1fr 1fr; }
  .case-hero-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .case-grid { grid-template-columns: 1fr; }
  .case-hero-stats { grid-template-columns: 1fr; }
}

/* =============================================
   FAMILY PARITY LAYER (ported from the cyber /
   earthquake / art sibling sites)
   ============================================= */

/* --- Surface aliases (quote page + sidebar cards reference these) --- */
:root {
  --surface:  #101214;
  --surface2: #16181b;
}

/* --- Loading skeleton (wizard mount placeholder) --- */
.shimmer {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--border2) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* --- Gradient ink (family signature on headlines / stats) --- */
.grad-ink {
  background: linear-gradient(120deg, var(--amber2), var(--amber) 55%, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--amber);
}

/* --- Light surface sections (the family's alternation pattern).
   Components inside are colored by custom properties, so re-scoping
   the tokens flips the whole section. --- */
.section-light {
  --bg:      #f3ecdf;
  --bg2:     #faf5eb;
  --bg3:     #fffdf8;
  --border:  #e3dac6;
  --border2: #d1c6ac;
  --text:    #171308;
  --muted:   #55503f;
  --muted2:  #787158;
  --amber2:  #a16207;
  --amber-bg: rgba(161,98,7,0.08);
  --amber-border: rgba(161,98,7,0.28);
  --shadow:   0 4px 24px rgba(60,45,10,0.08);
  --shadow-lg:0 8px 48px rgba(60,45,10,0.14);
  background: linear-gradient(180deg, #f5efe3 0%, #f3ecdf 100%);
  color: var(--text);
}
.section-light .kicker { color: #b45309; }
.section-light .code-cell { color: #b45309 !important; }
.section-light .rate-cell { color: #15803d !important; }
.section-light .wc-table tbody tr:hover td { background: rgba(15,23,42,0.03); }
.section-light .tier-low    { color: #15803d; }
.section-light .tier-med    { color: #b45309; }
.section-light .tier-high   { color: #c2410c; }
.section-light .tier-danger { color: #b91c1c; }
.section-light .info-box { color: #7c4a10; }
.section-light .case-result { color: #b45309; }

/* --- Carrier marquee ticker (quiet premium strip) --- */
.marquee {
  background: var(--bg2);
  color: var(--muted);
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.marquee::before, .marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 1;
  pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg2), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--bg2), transparent); }
.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 44s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 48px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Quote section (embedded wizard) --- */
#quote { scroll-margin-top: calc(var(--nav-h) + 12px); }
.quote-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 360px;
  gap: 48px;
  align-items: start;
}
.quote-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  /* Bounded so a tall sidebar on a short viewport scrolls within itself
     rather than bleeding past the quote section into the band below. */
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
}
@media (max-width: 960px) {
  /* Stacked: clear vertical separation between the wizard and the
     "What happens next" panel so they never read as running together. */
  .quote-layout { grid-template-columns: 1fr; gap: 56px; }
  .quote-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    border-top: 1px solid var(--border);
    padding-top: 40px;
  }
}

/* --- Resource library grid (homepage) --- */
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .resource-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .resource-grid { grid-template-columns: 1fr; } }

/* =============================================
   BUSINESS-OWNER REDESIGN LAYER (2026-07)
   New homepage components. Mobbin-informed:
   dark metric band, industry selector grid,
   value-prop grid, numbered step cards.
   ============================================= */

/* --- Hero note (microcopy under CTAs) --- */
.hero-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted2);
}

/* --- Metric band (real client-file results) --- */
.metric-band {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 72px 0;
}
.metric-band-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.metric-band-head .section-title { margin-bottom: 0; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.metric-band-link {
  font-size: 0.875rem;
  color: var(--amber);
  white-space: nowrap;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.metric-cell {
  padding: 4px 32px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.metric-cell:first-child { border-left: none; padding-left: 0; }
.metric-context {
  font-size: 0.75rem;
  color: var(--muted2);
  line-height: 1.6;
  min-height: 2.4em;
}
.metric-context a { color: var(--muted2); text-decoration: none; border-bottom: 1px solid var(--border2); transition: color 0.2s, border-color 0.2s; }
.metric-context a:hover { color: var(--amber); border-bottom-color: var(--amber); }
.metric-value {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.metric-value em { font-style: normal; color: var(--amber); }
.metric-label {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}
@media (max-width: 960px) {
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 32px 0; }
  .metric-cell:nth-child(3) { border-left: none; padding-left: 0; }
}
@media (max-width: 560px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-cell { border-left: none; padding: 20px 0; border-top: 1px solid var(--border); }
  .metric-cell:first-child { border-top: none; padding-top: 0; }
  .metric-context { min-height: 0; }
}

/* --- Value-prop grid (why owners work with us) --- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.value-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.015) 0%, transparent 40%), var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, transform 0.2s;
}
.value-card:hover { border-color: var(--amber-border); transform: translateY(-2px); }
.value-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.value-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
}
.value-card p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.7;
}
@media (max-width: 1000px) { .value-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px)  { .value-grid { grid-template-columns: 1fr; } }

/* --- Industry selector grid --- */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.industry-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.industry-card:hover {
  border-color: var(--amber-border);
  background: var(--bg2);
  transform: translateY(-2px);
  color: inherit;
}
.industry-icon { font-size: 1.4rem; line-height: 1; margin-bottom: 6px; }
.industry-card h3 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
}
.industry-card p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}
.industry-card .industry-go {
  font-size: 0.8rem;
  color: var(--amber);
  margin-top: 6px;
}
@media (max-width: 1000px) { .industry-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .industry-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px)  { .industry-grid { grid-template-columns: 1fr; } }

/* --- Accessibility: visible focus + reduced motion --- */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .shimmer { animation: none; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* =============================================
   HERO VISUAL — 2D line-art tower crane (inline SVG, pure-CSS animation)
   No JS, no video, no per-frame canvas repaint: the load sways on a
   GPU-composited transform and the held bar breathes amber->green. Loops
   seamlessly (a pendulum returns to where it started) and idles cheaply.
   ============================================= */
#crane-svg {
  width: 100%;
  max-width: 520px;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 6px rgba(245,158,11,0.35)) drop-shadow(0 18px 48px rgba(0,0,0,0.5));
}
#crane-svg .crane-slot { stroke: var(--amber); opacity: 0.28; }

/* Gentle pendulum sway of the whole hanging load, pivoting at the trolley */
.crane-load {
  transform-box: view-box;
  transform-origin: 313px 112px;
  animation: crane-sway 6s ease-in-out infinite;
}
@keyframes crane-sway {
  0%, 100% { transform: rotate(-1.4deg); }
  50%      { transform: rotate(1.4deg); }
}

/* The held bar breathes: amber (a candidate) -> green (best price found) */
#hangbar {
  fill: rgba(245,158,11,0.12);
  animation: crane-bar-pulse 6s ease-in-out infinite;
}
@keyframes crane-bar-pulse {
  0%, 100% { stroke: var(--amber); fill: rgba(245,158,11,0.12); }
  48%, 62% { stroke: var(--green); fill: rgba(34,197,94,0.22); }
}

@media (prefers-reduced-motion: reduce) {
  .crane-load { animation: none; }
  #hangbar { animation: none; stroke: var(--green); fill: rgba(34,197,94,0.22); }
}

/* Trust band directly after the hero */
.stats-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.stats-band-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 26px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 720px) { .stats-band-inner { grid-template-columns: repeat(2, 1fr); } }

/* Warm handoff glows: the quote section receives the hero story's light */
#quote {
  position: relative;
  background:
    radial-gradient(ellipse 900px 420px at 50% -8%, rgba(245,158,11,0.06) 0%, transparent 62%),
    var(--bg);
}
#comparison .kicker { justify-content: center; width: 100%; }
