/* JCC review consistency improvements — local review branch, 23 August 2026. */

/* Keep Practice Areas hub headings compact so links remain inside the dropdown. */
.jcc-practice-hub-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.jcc-practice-hub-group {
  min-width: 0 !important;
}

html body header .jcc-practice-hub-link {
  height: auto !important;
  min-height: 70px !important;
}

/* Balance the two homepage card systems while preserving all reviewed routes. */
html body.jcc-page-home .jcc-matter-finder-inner,
html body.jcc-page-home .jcc-practice-layout {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: clamp(36px, 4vw, 54px) !important;
  width: min(calc(100% - 64px), 1320px) !important;
}

html body.jcc-page-home .jcc-matter-finder-intro {
  position: static !important;
  display: grid !important;
  grid-template-columns: minmax(0, .9fr) minmax(360px, .7fr) !important;
  grid-template-rows: auto auto auto !important;
  column-gap: clamp(48px, 7vw, 110px) !important;
  align-items: end !important;
}

html body.jcc-page-home .jcc-matter-finder-intro .jcc-master-kicker {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

html body.jcc-page-home .jcc-matter-finder-intro h2 {
  grid-column: 1 !important;
  grid-row: 2 / 4 !important;
  max-width: 12ch !important;
  font-size: clamp(42px, 4.2vw, 62px) !important;
}

html body.jcc-page-home .jcc-matter-finder-intro > p:not(.jcc-master-kicker) {
  grid-column: 2 !important;
  grid-row: 1 / 3 !important;
  align-self: end !important;
  max-width: 46ch !important;
  margin: 0 0 22px !important;
}

html body.jcc-page-home .jcc-matter-finder-intro > a {
  grid-column: 2 !important;
  grid-row: 3 !important;
  justify-self: start !important;
}

html body.jcc-page-home .jcc-matter-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
  border: 0 !important;
}

html body.jcc-page-home .jcc-practice-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
  border: 0 !important;
}

html body.jcc-page-home .jcc-practice-grid > a {
  grid-column: span 2;
}

html body.jcc-page-home .jcc-practice-grid > a:nth-last-child(2),
html body.jcc-page-home .jcc-practice-grid > a:last-child {
  grid-column: span 3;
}

html body.jcc-page-home main .jcc-matter-card,
html body.jcc-page-home main .jcc-practice-grid > a {
  box-sizing: border-box !important;
  height: 100% !important;
}

html body.jcc-page-home main .jcc-matter-card {
  grid-template-rows: auto 1fr auto !important;
  min-height: 260px !important;
  padding: 30px 32px !important;
}

html body.jcc-page-home main .jcc-matter-card strong {
  align-self: center !important;
  max-width: 18ch !important;
  font-size: clamp(23px, 1.8vw, 29px) !important;
  line-height: 1.16 !important;
}

html body.jcc-page-home main .jcc-matter-card > span:nth-of-type(2) {
  align-self: end !important;
  max-width: 34ch !important;
  margin-top: 18px !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
}

html body.jcc-page-home .jcc-practice-intro {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr) !important;
  grid-template-rows: auto auto 1fr auto !important;
  column-gap: clamp(48px, 7vw, 100px) !important;
  align-items: start !important;
}

html body.jcc-page-home .jcc-practice-intro > p:first-child,
html body.jcc-page-home .jcc-practice-intro > h2,
html body.jcc-page-home .jcc-practice-intro > p:nth-of-type(2),
html body.jcc-page-home .jcc-practice-intro > a {
  grid-column: 1 !important;
}

html body.jcc-page-home .jcc-practice-intro > p:first-child { grid-row: 1 !important; }
html body.jcc-page-home .jcc-practice-intro > h2 { grid-row: 2 !important; max-width: 17ch !important; }
html body.jcc-page-home .jcc-practice-intro > p:nth-of-type(2) { grid-row: 3 !important; max-width: 58ch !important; }
html body.jcc-page-home .jcc-practice-intro > a {
  grid-row: 4 !important;
  align-self: end !important;
  justify-self: start !important;
  margin-top: 24px !important;
}

html body.jcc-page-home .jcc-practice-intro > figure {
  grid-column: 2 !important;
  grid-row: 1 / 5 !important;
  align-self: stretch !important;
  min-height: 260px !important;
  margin: 0 !important;
}

html body.jcc-page-home .jcc-practice-intro > figure img {
  height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
}

html body.jcc-page-home main .jcc-practice-grid > a {
  min-height: 304px !important;
}

/* Newer related-guidance cards. */
html body main .jcc-rw .jcc-rw-white .jcc-rw-wrap .jcc-rw-columns.jcc-rw-guidance-grid:has(.jcc-rw-related) {
  display: block !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}

html body main .jcc-rw .jcc-rw-white .jcc-rw-wrap .jcc-rw-columns.jcc-rw-guidance-grid:has(.jcc-rw-related) > div {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  margin-top: 30px !important;
  counter-reset: jcc-related-card;
}

html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related:has(> a:nth-child(4)) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related > a {
  counter-increment: jcc-related-card;
  position: relative !important;
  display: flex !important;
  min-width: 0 !important;
  min-height: 210px !important;
  padding: 30px 70px 30px 30px !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 28px !important;
  font-size: clamp(21px, 1.8vw, 26px) !important;
  line-height: 1.18 !important;
}

html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related > a.jcc-rw-related-feature {
  grid-column: auto !important;
}

html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related > a::before {
  content: counter(jcc-related-card, decimal-leading-zero);
  color: #626262 !important;
  font-family: 'Hanken Grotesk', system-ui, sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .18em !important;
  line-height: 1 !important;
}

html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related > a > .jcc-rw-related-copy {
  position: static !important;
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 20px !important;
  color: #202020 !important;
  border: 0 !important;
  border-radius: 0 !important;
}

html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related > a .jcc-rw-related-copy > strong {
  max-width: 22ch !important;
  color: #202020 !important;
  font-family: 'Libre Caslon Text', Georgia, serif !important;
  font-size: clamp(22px, 2vw, 28px) !important;
  line-height: 1.14 !important;
}

html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related > a .jcc-rw-related-copy > span {
  margin-top: auto !important;
  color: var(--jcc-brand-forest, #355b4a) !important;
  font-family: 'Hanken Grotesk', system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .12em !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
}

html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related > a .jcc-rw-related-copy b {
  position: absolute !important;
  right: 26px !important;
  top: 24px !important;
  display: grid !important;
  width: 38px !important;
  height: 38px !important;
  place-items: center !important;
  border: 1px solid currentColor !important;
  border-radius: 50% !important;
  font-size: 19px !important;
  font-weight: 400 !important;
}

/* Legacy article guidance cards. */
html body main #related-guidance .jcc-al-lesson-grid:has(> article.jcc-al-lesson) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  background: transparent !important;
  border: 0 !important;
  counter-reset: jcc-legacy-guidance-card;
}

html body main #related-guidance .jcc-al-lesson-grid:has(> article.jcc-al-lesson:nth-child(4)) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html body main #related-guidance .jcc-al-lesson-grid > article.jcc-al-lesson {
  --jcc-legacy-guidance-accent: var(--jcc-brand-gold, #dda646);
  counter-increment: jcc-legacy-guidance-card;
  position: relative !important;
  display: flex !important;
  min-width: 0 !important;
  min-height: 220px !important;
  padding: 30px 70px 30px 30px !important;
  flex-direction: column !important;
  background: #fff !important;
  border: 1px solid var(--jcc-brand-stone, #d8d2c8) !important;
  border-top: 4px solid var(--jcc-legacy-guidance-accent) !important;
  border-radius: var(--jcc-brand-radius-card, 10px) !important;
  box-shadow: var(--jcc-brand-shadow-card, 0 12px 34px rgba(32, 32, 32, .07)) !important;
}

html body main #related-guidance .jcc-al-lesson-grid > article.jcc-al-lesson:nth-child(even) {
  --jcc-legacy-guidance-accent: var(--jcc-brand-forest, #355b4a);
}

html body main #related-guidance .jcc-al-lesson-grid > article.jcc-al-lesson::before {
  content: counter(jcc-legacy-guidance-card, decimal-leading-zero);
  color: var(--jcc-legacy-guidance-accent) !important;
  font-family: 'Hanken Grotesk', system-ui, sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .18em !important;
  line-height: 1 !important;
}

html body main #related-guidance .jcc-al-lesson-grid > article.jcc-al-lesson h3 {
  margin: 34px 0 18px !important;
  font-size: clamp(21px, 1.8vw, 26px) !important;
  line-height: 1.18 !important;
}

html body main #related-guidance .jcc-al-lesson-grid > article.jcc-al-lesson h3 a {
  color: #202020 !important;
  text-decoration: none !important;
}

html body main #related-guidance .jcc-al-lesson-grid > article.jcc-al-lesson h3 a::after {
  content: '→';
  position: absolute !important;
  right: 26px !important;
  top: 24px !important;
  display: grid !important;
  width: 38px !important;
  height: 38px !important;
  place-items: center !important;
  color: var(--jcc-legacy-guidance-accent) !important;
  border: 1px solid currentColor !important;
  border-radius: 50% !important;
  font-family: 'Hanken Grotesk', system-ui, sans-serif !important;
  font-size: 19px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

html body main #related-guidance .jcc-al-lesson-grid > article.jcc-al-lesson h3 a:is(:hover, :focus-visible)::after {
  color: #fff !important;
  background: var(--jcc-legacy-guidance-accent) !important;
  transform: translateX(3px);
}

html body main #related-guidance .jcc-al-lesson-grid > article.jcc-al-lesson p {
  max-width: 30ch !important;
  margin: auto 0 0 !important;
  color: #565b5f !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
}

/* Former plain-link Related Guidance sections. */
.jcc-legacy-related-section .jcc-rw-wrap {
  max-width: 1180px !important;
}

.jcc-legacy-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.jcc-legacy-related-grid--five {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.jcc-legacy-related-grid--five > .jcc-legacy-related-card {
  grid-column: span 2;
}

.jcc-legacy-related-grid--five > .jcc-legacy-related-card:nth-last-child(2),
.jcc-legacy-related-grid--five > .jcc-legacy-related-card:last-child {
  grid-column: span 3;
}

@media (min-width: 901px) {
  .jcc-legacy-related-grid--five > .jcc-legacy-related-card {
    min-height: 339px;
  }
}

.jcc-legacy-related-card {
  --jcc-related-accent: var(--jcc-brand-gold, #dda646);
  box-sizing: border-box;
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 210px;
  padding: 30px 70px 30px 30px;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  color: #202020;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--jcc-brand-stone, #d8d2c8);
  border-top: 4px solid var(--jcc-related-accent);
  border-radius: var(--jcc-brand-radius-card, 10px);
  box-shadow: var(--jcc-brand-shadow-card, 0 12px 34px rgba(32, 32, 32, .07));
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.jcc-legacy-related-card:nth-child(even) {
  --jcc-related-accent: var(--jcc-brand-forest, #355b4a);
}

.jcc-legacy-related-card:is(:hover, :focus-visible) {
  color: #202020;
  text-decoration: none;
  border-color: var(--jcc-related-accent);
  box-shadow: 0 16px 38px rgba(32, 32, 32, .12);
  transform: translateY(-2px);
  outline: none;
}

.jcc-legacy-related-card:focus-visible {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--jcc-related-accent), 0 16px 38px rgba(32, 32, 32, .12);
}

.jcc-legacy-related-number {
  color: var(--jcc-related-accent);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1;
}

.jcc-legacy-related-card strong {
  align-self: center;
  max-width: 24ch;
  color: #202020;
  font-family: 'Libre Caslon Text', Georgia, serif;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  line-height: 1.18;
}

.jcc-legacy-related-action {
  color: #565b5f;
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.jcc-legacy-related-action b {
  position: absolute;
  right: 26px;
  top: 24px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--jcc-related-accent);
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
}

/* Content blocks left after the approved removals. */
html body main .jcc-rw-wrap.jcc-rw-wrap--single-answer {
  display: block !important;
  max-width: 980px !important;
}

html body main :is(#jcc-ra#jcc-ra#jcc-ra#jcc-ra, .readiness-grid.readiness-grid--single) {
  grid-template-columns: minmax(0, 860px) !important;
  column-gap: 0 !important;
}

/* Keep desktop header and hero consultation controls visually consistent. */
html body header [data-jcc-consultation-primary] {
  box-sizing: border-box !important;
  width: var(--jcc-brand-cta-width) !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 60px !important;
  padding: 14px 22px !important;
  gap: 11px !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  letter-spacing: .13em !important;
}

/* Compact the homepage recognition badge and keep it clear of the hero copy. */
@media (min-width: 721px) {
  html body.jcc-page-home .jcc-home-redesign-hero.jcc-home-hero--about-layout .jcc-home-hero-visual figcaption {
    right: max(32px, calc((100vw - 1180px) / 2)) !important;
    bottom: 42px !important;
    grid-template-columns: 96px minmax(0, 1fr) !important;
    gap: 16px !important;
    width: min(390px, calc(100vw - 64px)) !important;
    padding: 14px 16px !important;
    background: rgba(11, 20, 18, .82) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .3) !important;
  }

  html body.jcc-page-home .jcc-home-redesign-hero.jcc-home-hero--about-layout .jcc-home-hero-visual figcaption img {
    width: 96px !important;
    transform: none !important;
  }

  html body.jcc-page-home .jcc-home-redesign-hero.jcc-home-hero--about-layout .jcc-home-hero-visual figcaption span {
    font-size: 13px !important;
    line-height: 1.4 !important;
  }
}

@media (max-width: 900px) {
  .jcc-practice-hub-grid { grid-template-columns: 1fr !important; }

  html body.jcc-page-home .jcc-matter-grid,
  html body.jcc-page-home .jcc-practice-grid,
  .jcc-legacy-related-grid,
  html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related,
  html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related:has(> a:nth-child(4)),
  html body main #related-guidance .jcc-al-lesson-grid:has(> article.jcc-al-lesson),
  html body main #related-guidance .jcc-al-lesson-grid:has(> article.jcc-al-lesson:nth-child(4)) {
    grid-template-columns: 1fr !important;
  }

  html body.jcc-page-home .jcc-practice-grid > a,
  html body.jcc-page-home .jcc-practice-grid > a:nth-last-child(2),
  html body.jcc-page-home .jcc-practice-grid > a:last-child,
  .jcc-legacy-related-grid--five > .jcc-legacy-related-card,
  .jcc-legacy-related-grid--five > .jcc-legacy-related-card:nth-last-child(2),
  .jcc-legacy-related-grid--five > .jcc-legacy-related-card:last-child {
    grid-column: auto;
  }

  html body main #related-guidance .jcc-al-lesson-grid > article.jcc-al-lesson {
    min-height: 210px !important;
  }

  html body.jcc-page-home .jcc-matter-finder-inner,
  html body.jcc-page-home .jcc-practice-layout {
    width: min(calc(100% - 48px), 720px) !important;
  }

  html body.jcc-page-home .jcc-matter-finder-intro,
  html body.jcc-page-home .jcc-practice-intro {
    display: block !important;
  }

  html body.jcc-page-home .jcc-matter-finder-intro h2 { max-width: 15ch !important; }
  html body.jcc-page-home .jcc-matter-finder-intro > p:not(.jcc-master-kicker) { margin: 24px 0 26px !important; }
  html body.jcc-page-home .jcc-practice-intro > figure { min-height: 0 !important; margin: 30px 0 22px !important; }
  html body.jcc-page-home .jcc-practice-intro > figure img { height: auto !important; aspect-ratio: 16 / 9 !important; }
}

@media (max-width: 720px) {
  html body.jcc-page-home .jcc-home-redesign-hero.jcc-home-hero--about-layout .jcc-home-hero-visual figcaption {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    gap: 10px !important;
    width: calc(100% - 44px) !important;
    margin: 0 44px 0 0 !important;
    padding: 10px 12px !important;
  }

  html body.jcc-page-home .jcc-home-redesign-hero.jcc-home-hero--about-layout .jcc-home-hero-visual figcaption img {
    width: 64px !important;
    transform: none !important;
  }

  html body.jcc-page-home .jcc-home-redesign-hero.jcc-home-hero--about-layout .jcc-home-hero-visual figcaption span {
    font-size: 11.5px !important;
    line-height: 1.35 !important;
  }
}

@media (max-width: 640px) {
  html body.jcc-page-home .jcc-matter-finder-inner,
  html body.jcc-page-home .jcc-practice-layout {
    width: min(calc(100% - 40px), 620px) !important;
    gap: 30px !important;
  }

  html body.jcc-page-home main .jcc-matter-card {
    min-height: 220px !important;
    padding: 26px 24px !important;
  }

  html body.jcc-page-home main .jcc-matter-card strong { font-size: 22px !important; }
  html body.jcc-page-home main .jcc-practice-grid > a { min-height: 269px !important; }

  html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related > a,
  .jcc-legacy-related-card {
    min-height: 210px !important;
    padding: 24px 66px 24px 24px !important;
  }

  html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related > a {
    gap: 20px !important;
    font-size: 22px !important;
  }

  html body main .jcc-rw-columns:has(.jcc-rw-related) .jcc-rw-related > a .jcc-rw-related-copy b,
  .jcc-legacy-related-action b {
    right: 22px !important;
    top: 22px !important;
    width: 36px !important;
    height: 36px !important;
  }
}
