/* ATLAS R57 CP3.1 — typography, contrast and readability polish.
   Visual-only layer. No legal, SEO, form or content mutation. */

/* Restore the canonical premium type system after legacy AC42 variables. */
body.ac26-page{
  --ac26-serif:var(--ac-font-display,"Newsreader",Georgia,serif)!important;
  --ac26-sans:var(--ac-font-ui,"Manrope",Arial,sans-serif)!important;
}

/* Hero supporting copy sits on a light editorial field in the current shell. */
body.ac26-page .p2-page-hero .contracts-microtrust{
  color:#655c54!important;
  font-family:var(--ac26-sans)!important;
  font-size:13.5px!important;
  line-height:1.55!important;
  max-width:62ch;
}

/* Small descriptive copy: keep the muted hierarchy without falling below readable contrast. */
body.ac26-page .ac26-feature-points span,
body.ac26-page .ac26-link-row>span:not(.ac26-link-row__no):not(.ac26-link-row__arrow){
  color:#5f6d73!important;
}

/* Post-R57: this editorial component has an image with a dark overlay.
   The light-surface muted text rule above must not override its contrast. */
body.ac26-page.business-counsel-page section[aria-labelledby="fit-title"] .ac26-feature-points span{
  color:#e9eee9!important;
}

/* Footer legal/meta copy was visually too faint for its size. */
body.ac42-canonical-shell .ac29-r18-footer__bottom p,
body.ac42-canonical-shell .ac29-r18-footer__bottom a{
  color:#69635e!important;
  font-family:var(--ac-font-ui)!important;
  font-size:11px!important;
  line-height:1.48!important;
}

/* Keep editorial leads comfortable and consistent after the font-token repair. */
body.ac26-page .p2-lead,
body.ac26-page.article-page .hero-lead,
body.ac26-page.article-page .ac26-lead{
  text-wrap:pretty;
}

@media (max-width:640px){
  body.ac26-page .p2-page-hero .contracts-microtrust{
    font-size:13px!important;
    line-height:1.55!important;
    max-width:100%;
  }
  body.ac42-canonical-shell .ac29-r18-footer__bottom p,
  body.ac42-canonical-shell .ac29-r18-footer__bottom a{
    font-size:11.5px!important;
  }
}


/* ATLAS R57 CP3.2 — internal navigation / related-content polish */
.atlas-related-panel{position:relative}
.atlas-related-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:24px}
.atlas-related-grid--compact{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:18px}
.atlas-related-card{min-width:0;display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:14px;align-items:start;padding:17px 18px 16px;border:1px solid color-mix(in srgb,var(--atlas-f-accent,#9a6d49) 18%,rgba(16,28,33,.12));border-radius:14px;background:linear-gradient(145deg,rgba(255,255,255,.72),rgba(255,255,255,.38));box-shadow:0 10px 28px rgba(16,28,33,.035);text-decoration:none!important;color:inherit!important;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease}
.atlas-related-card:hover,.atlas-related-card:focus-visible{transform:translateY(-2px);border-color:color-mix(in srgb,var(--atlas-f-accent,#9a6d49) 42%,rgba(16,28,33,.12));box-shadow:0 16px 34px rgba(16,28,33,.07);background:rgba(255,255,255,.82);outline:none}
.atlas-related-card__no{font:650 10px/1.2 var(--ac26-sans,"Manrope",Arial,sans-serif);letter-spacing:.11em;color:var(--atlas-f-accent,#9a6d49);padding-top:4px}
.atlas-related-card__copy{display:block;min-width:0}
.atlas-related-card__copy strong{display:block;font:500 18px/1.25 var(--ac26-serif,"Newsreader",Georgia,serif);letter-spacing:-.012em;color:#13262f}
.atlas-related-card__copy small{display:block;margin-top:5px;font:500 12px/1.5 var(--ac26-sans,"Manrope",Arial,sans-serif);color:#64747a}
.atlas-related-card__arrow{font:500 17px/1 var(--ac26-sans,"Manrope",Arial,sans-serif);color:var(--atlas-f-accent,#9a6d49);padding-top:2px;transition:transform .18s ease}
.atlas-related-card:hover .atlas-related-card__arrow,.atlas-related-card:focus-visible .atlas-related-card__arrow{transform:translateX(3px)}
.atlas-route-note .atlas-related-grid{margin-top:10px}
.atlas-route-note .atlas-related-card{padding:14px 15px;grid-template-columns:28px minmax(0,1fr) auto;border-radius:11px}
.atlas-route-note .atlas-related-card__copy strong{font-size:16px}
.atlas-card-with-routes .atlas-related-grid{margin-top:15px}
.atlas-card-with-routes .atlas-related-card{padding:13px 14px;grid-template-columns:26px minmax(0,1fr) auto;border-radius:10px;box-shadow:none}
.atlas-card-with-routes .atlas-related-card__copy strong{font-size:15.5px}
.atlas-related-note .atlas-related-grid{margin-top:16px}
.atlas-related-note .atlas-related-card{background:rgba(255,255,255,.52);box-shadow:none}
@media(max-width:720px){.atlas-related-grid,.atlas-related-grid--compact{grid-template-columns:1fr;gap:9px}.atlas-related-card{padding:15px 14px;grid-template-columns:28px minmax(0,1fr) auto;border-radius:12px}.atlas-related-card__copy strong{font-size:17px}.atlas-related-card__copy small{font-size:11.5px}.atlas-route-note .atlas-related-card,.atlas-card-with-routes .atlas-related-card{grid-template-columns:26px minmax(0,1fr) auto}}
@media(prefers-reduced-motion:reduce){.atlas-related-card,.atlas-related-card__arrow{transition:none!important}.atlas-related-card:hover,.atlas-related-card:focus-visible{transform:none}}

/* CP3.2 narrow-context correction: never force two cards into narrow legacy/article columns. */
.ac29-r17-prose-section .atlas-related-grid,
.atlas-card-with-routes .atlas-related-grid{grid-template-columns:1fr}
.ac29-r17-prose-section .atlas-related-card,
.atlas-card-with-routes .atlas-related-card{grid-template-columns:26px minmax(0,1fr) auto;min-height:0}
.ac29-r17-prose-section .atlas-related-card__copy strong{font-size:16px}

/* ATLAS R57 CP3.3 — keyboard focus integrity */
:where(.atlas-related-card,.cfa-option,.acx-choice):focus-visible{
  outline:2px solid var(--atlas-f-accent,#9a6d49)!important;
  outline-offset:3px!important;
}

/* ATLAS R57 CP3.3 — form-control keyboard focus integrity */
body.ac26-page :is(input,select,textarea):focus-visible{
  outline:2px solid var(--r50-bronze,#85613c)!important;
  outline-offset:4px!important;
}

/* Post-R57 adversarial sweep: preserve the bronze palette at readable values.
   These selectors address shared components; dark image panels stay scoped. */
body.ac42-canonical-shell.ac26-page .ac26-link-row > span:not(.ac26-link-row__no):not(.ac26-link-row__arrow),
body.ac42-canonical-shell.ac26-page .ac26-situation > span:not(.ac26-situation__no),
body.ac42-canonical-shell .ac-growth-map__label > span,
body.ac42-canonical-shell .ac29-contact-trust > span,
body.ac42-canonical-shell .ac29-enforcement-trust > span{
  color:#58646a!important;
}
body.ac42-canonical-shell.ac26-page .ac26-link-row__no,
body.ac42-canonical-shell.ac26-page .ac26-cluster__no,
body.ac42-canonical-shell .ac49-row-num,
body.ac42-canonical-shell .ac26-sequence__item > b,
body.ac42-canonical-shell .r50-folio-mobile{
  color:#785536!important;
}
body.ac42-canonical-shell.business-counsel-page .ac26-sequence__item > b{
  color:#fff!important;background:#785536!important;
}
body.ac42-canonical-shell .p3-final-detail > a{
  display:inline-flex;align-items:center;min-height:44px;
}
/* Instrument shells moved to light surfaces, but retained old dark-hero colors. */
body.ac42-canonical-shell.instrument-v1 :is(.breadcrumbs,.breadcrumbs a){color:#59636a!important}
body.ac42-canonical-shell.instrument-v1 .breadcrumbs a{text-decoration:underline!important}
body.ac42-canonical-shell .breadcrumbs a,
body.ac42-canonical-shell.ac26-page.article-page .breadcrumbs a{text-decoration:underline!important}
body.ac42-canonical-shell.instrument-v1--recovery :is(.eyebrow,.money-route-item > span),
body.ac42-canonical-shell.instrument-v1--before_purchase .eyebrow,
body.ac42-canonical-shell .audit-panel-head > .eyebrow{color:#79563e!important}
body.ac42-canonical-shell.instrument-v1--recovery .money-route-item > p,
body.ac42-canonical-shell.parent-child-page :is(.pc-app-intro > p,.pc-option span,.pc-state-note),
body.ac42-canonical-shell .alienation-side-card > p{color:#536169!important}
body.ac42-canonical-shell.instrument-v1--enforcement .ac29-r18-footer__nav > a{color:#534c45!important}
body.ac42-canonical-shell.inheritance-page :is(.inheritance-trust-row > span,.ims-reset){color:#685035!important}
body.ac42-canonical-shell.inheritance-page h1 em{color:#805b37!important}
body.ac42-canonical-shell.inheritance-page .is-muted :is(small,strong){color:#4f5b61!important}
/* Editorial accents and labelled timeline numbers on ivory backgrounds. */
body.ac42-canonical-shell.r50-publication .ac26-eyebrow,
body.ac42-canonical-shell :is(.ac68-clocks > div > strong,.ac67-five > div > strong,.ac69-data-min small){color:#785536!important}
body.ac42-canonical-shell.r50-publication :is(.ac67-cta,.ac68-cta,.ac69-cta) > p{color:#edf1ef!important}
body.ac42-canonical-shell.inheritance-page .inheritance-demo-label > span{color:#805b37!important}
/* Grid items must be allowed to shrink below their intrinsic word width. */
body.ac42-canonical-shell :is(.p2-split,.p2-page-hero__grid,.ac41-real-grid,.ac41-real-main) > *{min-width:0}
body.ac42-canonical-shell .p2-prose{min-width:0;overflow-wrap:anywhere}
@media(max-width:640px){
  body.ac42-canonical-shell .ac-keep-token{white-space:normal!important}
  body.ac42-canonical-shell .ac41-real-quote{min-width:0;max-width:100%;overflow-wrap:anywhere}
  body.ac42-canonical-shell .p2-page-hero > .p2-container > *{min-width:0}
}
