/* Article preview uses CRMPro's shared navigation and layout tokens. */
body { min-width: 0; }

.audit-shell {
  width: min(1350px, calc(100% - 9vw));
  margin-inline: auto;
}

.audit-breadcrumb {
  background: var(--soft);
  border-bottom: 1px solid #edf3fa;
}

.audit-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  align-items: center;
  margin-block: 0;
  padding: 13px 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.audit-breadcrumb li + li::before {
  content: "›";
  margin-inline-end: 10px;
  color: #637a96;
}

.audit-breadcrumb a { color: inherit; }

.audit-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 445px;
}

.audit-hero__photo {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: 59%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 47%;
  mask-image: linear-gradient(to right, transparent, #000 25%);
}

.audit-hero__inner { padding-block: 34px 42px; }

.audit-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.audit-kicker::before {
  content: "";
  width: 9px;
  height: 24px;
  margin-inline-start: 3px;
  background: var(--red);
  transform: skewX(-17deg);
}

.audit-hero h1 {
  max-width: min(760px, 56vw);
  margin: 24px 0 20px;
  color: var(--navy);
  font-size: clamp(36px, 3.55vw, 54px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: pretty;
}

.audit-title-term { white-space: nowrap; }

.audit-deck {
  max-width: 610px;
  margin: 0;
  color: #3f5571;
  font-size: clamp(18px, 1.55vw, 23px);
  line-height: 1.47;
}

.audit-byline {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
}

.audit-route {
  margin: 0;
  padding: 17px 22px;
  border-radius: var(--radius);
  background: #eff6fc;
}

.audit-route ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3.6vw, 52px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-route li { position: relative; }

.audit-route li:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: calc(50% - 10px);
  left: calc(100% + clamp(2px, 1vw, 15px));
  width: 20px;
  height: 20px;
  background: url("/assets/icons/support/arrow-right.svg") center / contain no-repeat;
  opacity: .74;
  filter: invert(27%) sepia(99%) saturate(2301%) hue-rotate(203deg) brightness(93%);
  pointer-events: none;
}

.audit-route a {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 10px;
  border: 1px solid #c4d9f7;
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
  font-size: clamp(14px, 1.26vw, 19px);
  font-weight: 750;
  text-decoration: none;
}

.audit-route img {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  filter: invert(27%) sepia(99%) saturate(2301%) hue-rotate(203deg) brightness(93%);
}
.audit-route li:last-child img {
  filter: invert(37%) sepia(97%) saturate(638%) hue-rotate(112deg) brightness(91%);
}

.audit-reading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 31%);
  align-items: start;
  gap: clamp(32px, 4vw, 60px);
  margin-block: 38px 72px;
}

.audit-prose { min-width: 0; }
.audit-prose > section + section { margin-top: 49px; }
.audit-prose :is(p, ul, ol) { max-width: 73ch; }
.audit-prose p, .audit-prose li {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.65;
}

.audit-prose p { margin: 14px 0 0; }
.audit-prose ul, .audit-prose ol { padding-inline-start: 1.45em; }
.audit-prose li + li { margin-top: 8px; }
.audit-prose h2,
.audit-prose h3 {
  margin: 0;
  color: var(--navy);
  font-weight: 800;
  line-height: 1.17;
  letter-spacing: -.032em;
}

.audit-prose h2 { font-size: clamp(27px, 3vw, 41px); }
.audit-prose h3 { font-size: clamp(21px, 2vw, 26px); }
.audit-step { padding-block: 19px; border-bottom: 1px solid var(--line); }
.audit-step:last-child { border-bottom: 0; padding-bottom: 0; }

.audit-inline-action,
.audit-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 19px;
  padding: 10px 17px;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
}

.audit-inline-action:active,
.audit-primary:active { transform: scale(.97); }

.audit-toc {
  position: sticky;
  top: calc(var(--crmpro-header-row) + 16px);
  padding: 17px 19px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.audit-toc h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.25;
  text-transform: uppercase;
}

.audit-toc nav { display: grid; gap: 6px; }

.audit-toc a {
  display: block;
  padding: 9px 11px;
  border: 1px solid #e5edf6;
  border-radius: 7px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
}

.audit-toc a[aria-current="location"] { background: #e8f3ff; border-color: #d4e6f9; }

.audit-example {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 20px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.audit-example > div { padding: 14px 16px; min-width: 0; }
.audit-example > div + div { border-inline-start: 1px solid var(--line); }
.audit-example > div:last-child { background: #fff5de; border-radius: 0 var(--radius) var(--radius) 0; }
.audit-example dt { color: #425979; font-size: 14px; font-weight: 650; }
.audit-example dd { margin: 3px 0 0; color: var(--navy); font-size: clamp(18px, 2vw, 26px); font-weight: 800; font-variant-numeric: tabular-nums; }

.audit-callout {
  margin-top: 21px;
  padding: 17px 19px;
  border: 1px solid #d3e3f6;
  border-inline-start: 4px solid var(--blue);
  border-radius: var(--radius);
  background: #f4f8fd;
}

.audit-callout p:first-child { margin: 0; }

.audit-table {
  width: 100%;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 15px;
}

.audit-table th,
.audit-table td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.audit-table thead th { background: var(--soft); color: var(--navy); }
.audit-table tbody th { width: 21%; color: var(--navy); }
.audit-table tbody tr:last-child > * { border-bottom: 0; }
.audit-cell-label { display: none; }

.audit-source {
  padding: 21px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.audit-source h2 { font-size: clamp(24px, 2.4vw, 31px); }

.audit-cta {
  padding: clamp(21px, 4vw, 36px);
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
}

.audit-cta h2, .audit-cta p { color: #fff; }
.audit-cta h2 { font-size: clamp(24px, 3vw, 36px); }
.audit-cta__links { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 20px; }
.audit-cta__links .audit-primary { margin-top: 0; }
.audit-cta__text-link { color: #fff; font-size: 15px; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.audit-prose a:not([class]) { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; }

.audit-article a:focus-visible,
.audit-breadcrumb a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.audit-cta a:focus-visible { outline-color: #fff; }

.audit-article :target { scroll-margin-top: 8px; }

@media (hover: hover) and (pointer: fine) {
  .audit-route a:hover, .audit-toc a:hover { background: #e8f3ff; border-color: #a7c8f4; }
  .audit-primary:hover, .audit-inline-action:hover { background: var(--blue-dark); }
}

@media (max-width: 1100px) {
  .audit-shell { width: calc(100% - 56px); }
  .audit-hero { min-height: 0; }
  .audit-hero h1 { max-width: 59%; }
  .audit-deck { max-width: 51%; }
  .audit-route ol { gap: 22px; }
  .audit-route li:not(:last-child)::after { left: calc(100% + 2px); width: 18px; }
}

@media (max-width: 850px) {
  .audit-shell { width: calc(100% - 36px); }
  .audit-hero { display: flex; flex-direction: column; }
  .audit-hero__inner { order: -1; padding-block: 24px; }
  .audit-hero__photo {
    position: static;
    display: block;
    width: min(100% - 36px, 720px);
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 0 auto 18px;
    border-radius: var(--radius);
    mask-image: none;
  }
  .audit-hero h1, .audit-deck { max-width: 660px; }
  .audit-hero h1 { margin-block: 15px 12px; }
  .audit-reading { display: flex; flex-direction: column; gap: 27px; margin-block: 24px 44px; }
  .audit-toc { position: static; order: -1; width: 100%; }
  .audit-toc nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .audit-shell { width: calc(100% - 32px); }
  .audit-hero__photo { width: calc(100% - 32px); }
  .audit-hero h1 { font-size: clamp(30px, 8.1vw, 40px); }
  .audit-hero__inner { padding-block: 20px; }
  .audit-deck { font-size: 17px; }
  .audit-route { padding: 11px; }
  .audit-route ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .audit-route li:not(:last-child)::after { display: none; }
  .audit-route a { min-height: 48px; font-size: 14px; gap: 8px; }
  .audit-route img { width: 21px; height: 21px; }
  .audit-toc { padding: 13px; }
  .audit-toc a { padding: 9px; font-size: 14px; }
  .audit-prose p, .audit-prose li { font-size: 17px; }
  .audit-prose > section + section { margin-top: 36px; }
  .audit-example { grid-template-columns: 1fr; }
  .audit-example > div + div { border-inline-start: 0; border-top: 1px solid var(--line); }
  .audit-example > div:last-child { border-radius: 0 0 var(--radius) var(--radius); }
  .audit-example > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .audit-example dd { margin: 0; }
  .audit-table,
  .audit-table tbody { display: block; }
  .audit-table { font-size: 14px; }
  .audit-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .audit-table tbody tr { display: block; padding-bottom: 8px; }
  .audit-table tbody :is(th, td) { display: block; width: auto; border: 0; }
  .audit-table tbody th { padding: 9px 12px; background: var(--soft); }
  .audit-table tbody td {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 10px;
    padding: 6px 12px;
    overflow-wrap: break-word;
  }
  .audit-table tbody td + td { border-top: 1px solid #edf3fa; }
  .audit-cell-label { display: inline; color: var(--muted); font-weight: 650; }
}

@media (max-width: 360px) {
  .audit-route a { gap: 6px; padding: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.audit-article) { scroll-behavior: auto; }
}
