/* Fixes laid over the designed pages (open-design/output). Loaded after each page's own CSS.
   Keep these small and specific, so a redesigned page can simply drop its line. */

/* Contrast: small blue labels and a navy on blue link */
html:not([data-theme="dark"]) .pg-proposals .pr-sheet__rows .is-ok { color: #1245d1; }
html[data-theme="dark"] .pg-proposals .pr-sheet__rows .is-ok { color: #8fb4ff; }
.pg-firm-knowledge .is-active > .fk-toc__num { color: #1245d1; opacity: 1; }
.pg-adoption .ad-cta .ad-cta__link, .pg-adoption a.ad-cta__link { color: #fff !important; }
html[data-theme="dark"] .fk-spine--mid { background: var(--accent-fill); }
html[data-theme="dark"] .pr-sheet__tag,
html[data-theme="dark"] .rs-example,
html[data-theme="dark"] .dc-status--review,
html[data-theme="dark"] .ad-example,
html[data-theme="dark"] .fr-marker { color: #8fb4ff; }
html[data-theme="dark"] .pg-firm-knowledge .is-active > .fk-toc__num { color: #8fb4ff; opacity: 1; }

/* Readiness article: the big outlined numeral sits beside the text, not behind it */
.fr-chapter__body { padding-left: clamp(3.6rem, 7vw, 6.2rem); }
.fr-chapter__num { font-size: clamp(3.2rem, 6vw, 5rem); top: 0; left: 0; line-height: 1; }

/* Connected data article: headings kept their spacing in the design, a reset rule removed it */
.pg-insights-connected .cd-h2 { margin-bottom: clamp(18px, 2.4vw, 26px); }

/* Adoption: the CSS entrance animation replaced the SVG position, so the people were drawn at 0,0. Fade only. */
@keyframes ad-person-fade { from { opacity: 0; } to { opacity: 1; } }
.ad-path__person { animation-name: ad-person-fade; }

/* ---- Class name mismatches between a design's HTML and its CSS ---- */
/* Knowledge: the HTML uses .pk-wrap, the CSS only defined .pg-wrap, so sections had no width limit or side padding */
.pk-wrap { width: 100%; max-width: var(--pk-maxw, 1120px); margin-inline: auto; padding-inline: var(--pk-gutter, clamp(20px, 6vw, 56px)); }
/* Resources: the hero lede lost its base style (.rs-lede is never used) */
.rs-hero__lede { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.65; max-width: 44ch; }

/* ---- Proposals: the moving page icon sat on top of the step text. Run the rail above the steps instead ---- */
.pr-flow__rail { top: 1.3rem; }
.pr-flow__page { top: 1.3rem; left: calc(100% / 6 + var(--pr-progress, 0) * 66.6667%); }

/* ---- Insights index: an outlined variable font number shows its overlapping strokes. Use soft fills ---- */
@supports (-webkit-text-stroke: 1px black) {
  .ir-num__base { -webkit-text-stroke: 0; color: rgba(var(--accent-rgb), 0.14); }
  .ir-num__reveal > span { -webkit-text-stroke: 0; color: var(--accent); }
}

/* ---- Data integration: on phones the stacked table rows lost their label and value grid (td display rule outranked it) ---- */
@media (max-width: 640px) {
  .di-table td.di-c-move, .di-table td.di-c-owner { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: baseline; }
}

/* ---- Small heading spacing the designs left at zero ---- */
.ar-h3 { margin-bottom: 0.4rem; }
.fk-h2 { margin-bottom: 0.65rem; }

/* ---- Knowledge: breadcrumb kept on one centred line ---- */
.pk-crumb { flex-wrap: nowrap; align-items: center; gap: 2px; letter-spacing: 0.08em; }
@media (max-width: 420px) { .pk-crumb { font-size: 0.66rem; } .pk-crumb a { padding: 0 3px; } }

/* ---- Decision intelligence ---- */
/* the weekday strip is an <ol>, so it showed browser numbers (1. 2. 3.) next to the dots */
.dc-week { list-style: none; padding-left: 0; }
/* on phones show every signal in a normal list instead of a sideways scroller that hides the others */
@media (max-width: 760px) {
  .dc-list { flex-direction: column; overflow: visible; scroll-snap-type: none; }
  .dc-sig { min-width: 0; width: 100%; }
  .dc-sig:last-child { border-bottom: 1px solid var(--border); }
}

/* ---- Data integration: table caption must span the whole table on phones ---- */
@media (max-width: 640px) {
  .di-table caption { display: block; width: 100%; }
}
.pk-crumb a { min-height: 0; padding: 6px; }

/* ---- Round two of fixes after a page by page review ---- */
/* Readiness article: the intro started flush against the sticky meta bar */
.fr-intro { padding-top: clamp(24px, 4vw, 56px); }

/* Connected data diagram: node labels touched the edge of their boxes */
.cd-node__label { font-size: 10.5px; }

/* Firm knowledge: the handbook started right under the floating header, and the access matrix note touched the border */
.fk-layout { padding-top: clamp(32px, 5vw, 64px); }
.fk-matrix__note { padding: 14px 18px 16px; margin: 0; }
.fk-spine { letter-spacing: 0; }

/* Data integration: node label collided with its dot, caption sat on the table border */
.di-node__label { font-size: 15px; }
.di-table caption.di-note { padding: 16px 20px 12px !important; }
.fk-toc__num { color: var(--muted); opacity: 1; }

/* Dark theme: accent text on accent-soft cards measured 4.18:1; the lighter accent-hover gives 5.5:1 or more */
html[data-theme="dark"] :is(.ad-step__num, .dc-sig[aria-selected="true"] .dc-sig__num, .dc-day.is-set .dc-day__pill, .fn-step__no, .fk-toc__link.is-active) { color: var(--accent-hover); }
