/* JDQPS 6.1.24. Owner-corrected baseline; final finesse remains Pass 10. */

/* Size the complete words' tracks, rather than permitting emergency glyph breaks. */
body[data-version="v2"][data-route="how-we-work"] #app .p9-hsa-principles {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.25rem), 1fr)) !important;
}
body[data-version="v2"][data-route="how-we-work"] #app .p9-hsa-principles .icon-unit h4 {
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none;
}

/* Caption and optional indicator form one semantic, wrapping label line.
   Flexible caption space aligns the controls at the bottom of each paired row. */
body[data-version="v2"] .p7-talent-application .form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  column-gap: 16px;
  row-gap: 20px;
}
body[data-version="v2"] .p7-talent-application .form-grid.two > label,
body[data-version="v2"] .p7-talent-block > label:not(.check-row) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  gap: 8px;
  line-height: 1.5;
}
.p7-talent-application .p9-field-label { display: block; min-width: 0; }
.p7-talent-application .form-grid.two > label > .p9-field-label { flex: 1 0 auto; }
/* Shared caption/control/feedback tracks also keep paired borders aligned
   when one field has a longer caption or a returned validation message. */
@supports (grid-template-rows: subgrid) {
  body[data-version="v2"] .p7-talent-application .form-grid.two { row-gap: 8px; }
  body[data-version="v2"] .p7-talent-application .form-grid.two > label {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: subgrid;
    grid-row: span 3;
    align-items: start;
  }
  .p7-talent-application .form-grid.two > label > .p9-field-label { grid-row: 1; }
  .p7-talent-application .form-grid.two > label > :is(input,select,textarea) { grid-row: 2; }
  .p7-talent-application .form-grid.two > label > .p7-field-error { grid-row: 3; margin: 0; }
}
body[data-version="v2"] .p7-talent-application .p9-field-label .p7-optional {
  display: inline;
  margin: 0 0 0 .3em;
  font-weight: 400;
  white-space: nowrap;
}
body[data-version="v2"] .p7-talent-application :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-block-size: 3.125rem;
  block-size: calc(1.5em + 26px);
  margin: 0;
  padding: 12px 13px;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.5;
}
body[data-version="v2"] .p7-talent-application :is(textarea,input[type="file"]) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0;
}
body[data-version="v2"] .p7-talent-block > label > small {
  display: block;
  margin: 0;
  font-size: .875em;
  font-weight: 400;
  line-height: 1.5;
}
.p7-talent-application .status { min-block-size: 3em; }
@media (max-width: 700px) {
  body[data-version="v2"] .p7-talent-application .form-grid.two { grid-template-columns: minmax(0, 1fr); }
  body[data-version="v2"] .p7-talent-application :is(input[type="text"],input[type="email"],input[type="tel"],input[type="url"],select,textarea) { font-size: max(16px, 1em); }
}

/* The semantic amount is present in full at every frame. Its underline signals
   a connection, then the complete value resolves into its settled position. */
body[data-version="v2"] #app [data-p9-price] .p9-price-amount {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: baseline;
  color: inherit;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  opacity: 1;
  transform: none;
}
body[data-version="v2"] #app [data-p9-price] .p9-price-amount::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -.15em;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(.08);
  transform-origin: left center;
  pointer-events: none;
}
html:not([data-jdqps-a11y-motion="reduced"]) body[data-version="v2"] #app [data-p9-price-state="waiting"] .p9-price-amount { transform: translateY(7px); }
html:not([data-jdqps-a11y-motion="reduced"]) body[data-version="v2"] #app [data-p9-price-state="resolving"] .p9-price-amount {
  animation: jdqpsInvestmentResolution 1.9s cubic-bezier(.22,.61,.27,1) both;
}
html:not([data-jdqps-a11y-motion="reduced"]) body[data-version="v2"] #app [data-p9-price-state="resolving"] .p9-price-amount::after {
  animation: jdqpsInvestmentConnection 1.9s cubic-bezier(.22,.61,.27,1) both;
}
@keyframes jdqpsInvestmentResolution {
  0%, 12% { opacity: 1; transform: translateY(7px); }
  64% { opacity: 1; transform: translateY(1px); }
  100% { opacity: 1; transform: none; }
}
@keyframes jdqpsInvestmentConnection {
  0% { opacity: 0; transform: scaleX(.08); }
  20% { opacity: .4; transform: scaleX(.2); }
  64% { opacity: .5; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); }
}
html[data-p9-motion-visibility="hidden"] #app .p9-price-amount,
html[data-p9-motion-visibility="hidden"] #app .p9-price-amount::after { animation-play-state: paused !important; }
html[data-jdqps-a11y-motion="reduced"] #app .p9-price-amount,
html[data-jdqps-a11y-motion="reduced"] #app .p9-price-amount::after { animation: none !important; transform: none !important; }

/* Organization amounts inherit each offering's approved accent. The two lighter
   accents use Ink-weighted text tones for >=4.5:1 on Warm Ivory, without changing
   the original section accents, exact amounts, type geometry or price animation.
   Amber: 60% Hope Amber + 40% Ink. Sage: 84% Sage + 16% Ink. */
body[data-version="v2"][data-route="organizations"] #app .offer-card,
body[data-version="v2"][data-route="organization-offerings"] #app .full-offer { --p9-investment-ink: var(--accent); }
body[data-version="v2"][data-route="organizations"] #app .offer-card[style*="#D89A32"],
body[data-version="v2"][data-route="organization-offerings"] #app .full-offer[style*="#D89A32"] { --p9-investment-ink: #8A6427; }
body[data-version="v2"][data-route="organization-offerings"] #app .full-offer[style*="#73806B"] { --p9-investment-ink: #646F5D; }
body[data-version="v2"][data-route="organizations"] #app .offer-card .offer-price,
body[data-version="v2"][data-route="organization-offerings"] #app .full-offer .offer-invest > span { color: var(--p9-investment-ink) !important; }
/* The blue Signal Scan entry section receives the existing Amber relationship
   in a 60% Amber / 40% Warm Ivory tone (3.86:1 for its large investment type). */
body[data-version="v2"][data-route="organizations"] #app .entry-price { color: #E3BC7A !important; }

/* The original logo remains the accessible image and the permanent fallback.
   A matching Ink cover exposes the exact Q-shaped crop for the journey. */
body[data-version="v2"] .site-footer { position: relative; }
body[data-version="v2"] .site-footer .logo-plate { position: relative; }
.p9-q-logo-cover {
  position: absolute;
  display: block;
  background: #141416;
  opacity: 0;
  pointer-events: none;
}
body[data-version="v2"] .site-footer > svg.p9-footer-journey {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.p9-footer-journey * { pointer-events: none; }
.p9-footer-journey .p9-q-trace {
  stroke: #D89A32;
  stroke-opacity: .3;
  stroke-width: 1.15px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.p9-footer-journey .p9-q-words {
  fill: #F4EFE6;
  font-family: var(--human);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .015em;
}
.p9-q-moving .p9-traveling-q { will-change: transform, opacity; }
body[data-version="v2"] .site-footer a.p9-q-target {
  position: relative;
  transition: color .28s ease;
}
body[data-version="v2"] .site-footer a.p9-q-target[data-q-active="true"] {
  color: var(--p9-q-accent, #D89A32) !important;
}
.site-footer .p9-q-target::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: var(--p9-q-link-width, 4rem);
  max-width: 100%;
  height: 2px;
  background: currentColor;
  opacity: var(--p9-q-response, 0);
  transform: scaleX(calc(.55 + var(--p9-q-response, 0) * .45));
  transform-origin: left center;
  transition: opacity .28s ease, transform .38s ease;
  pointer-events: none;
}
.p9-q-target[data-q-destination="individual-intake"] { --p9-q-accent: #509091; }
.p9-q-target[data-q-destination="pricing"] { --p9-q-accent: #7B8772; }
/* Text and underline use one accessible accent, including through transitions.
   Teal 74% / Ivory 26%, Sage 94% / Ivory 6% keep normal-size text above 4.5:1
   on Ink. The small Q connection pulse coordinates with that same tone. */
.p9-q-target[data-q-destination="start"] { --p9-q-accent: #D89A32; }
html[data-jdqps-a11y-motion="reduced"] .p9-footer-journey,
html[data-jdqps-a11y-motion="reduced"] .p9-q-logo-cover,
html[data-jdqps-a11y-motion="reduced"] .p9-q-target::after { visibility: hidden !important; }
html[data-jdqps-a11y-motion="reduced"] body[data-version="v2"] .site-footer a.p9-q-target { color: rgba(244,239,230,.82) !important; }

/* The current editorial cards have separate category/title/summary children.
   Named areas replace the obsolete mobile action-in-row-2 wrapper assumption.
   Every headline and action owns an intrinsic-height row, however copy wraps. */
@media (max-width: 800px) {
  body[data-version="v2"].p5-authored #app .v2-editorial-insight-list .insight-card {
    grid-template-columns: 56px minmax(0, 1fr) !important;
    grid-template-areas: "icon category" "icon title" ". summary" ". action";
    grid-auto-rows: auto;
    gap: 12px 20px !important;
    align-items: start !important;
  }
  body[data-version="v2"].p5-authored #app .v2-editorial-insight-list .insight-card > img {
    grid-area: icon !important;
    width: 100% !important;
    max-width: 56px !important;
    height: auto !important;
    align-self: start;
  }
  body[data-version="v2"].p5-authored #app .v2-editorial-insight-list .insight-card > .kicker { grid-area: category !important; }
  body[data-version="v2"].p5-authored #app .v2-editorial-insight-list .insight-card > h3 { grid-area: title !important; }
  body[data-version="v2"].p5-authored #app .v2-editorial-insight-list .insight-card > p { grid-area: summary !important; }
  body[data-version="v2"].p5-authored #app .v2-editorial-insight-list .insight-card > :is(.kicker,h3,p,a) {
    min-width: 0;
    max-width: 100%;
  }
  body[data-version="v2"].p5-authored #app .v2-editorial-insight-list .insight-card > a {
    grid-area: action !important;
    position: relative;
    justify-self: start !important;
    align-self: start !important;
    display: inline-flex;
    align-items: center;
    width: fit-content !important;
    min-height: 44px;
    max-width: 100%;
    margin: 0 !important;
    white-space: normal !important;
    line-height: 1.4;
    text-align: left !important;
  }
}

/* An authored mobile story, with existing text and colors present throughout.
   Individual translate is deliberately independent of the legacy transform
   resets. No duplicate text, clip masks, counters or per-frame layout writes. */
@media (max-width: 800px) {
  body[data-version="v2"].p5-authored.v244-million-motion #app .v2-friction-rail [data-p9-word] {
    position: relative;
    display: block;
    opacity: 1 !important;
    transform: none !important;
    translate: 0 0;
    animation: none !important;
    transition: none !important;
    will-change: auto !important;
    --p9-word-duration: 1.3s;
    --p9-word-rule-width: 5rem;
  }
  body[data-version="v2"].p5-authored #app .v2-friction-rail [data-p9-word]::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: min(100%, var(--p9-word-rule-width));
    height: 1px;
    background: currentColor;
    transform-origin: left center;
    transform: scaleX(.06);
    opacity: 0;
    pointer-events: none;
  }
  body[data-version="v2"].p5-authored #app .v2-friction-rail .friction-decision > [data-p9-word]::after { top: 0; bottom: auto; }
  body[data-version="v2"].p5-authored.v244-million-motion #app .v2-friction-rail [data-p9-word="3"] { --p9-word-duration: 1.5s; --p9-word-rule-width: 7rem; }
  body[data-version="v2"].p5-authored.v244-million-motion #app .v2-friction-rail [data-p9-word="4"] { --p9-word-duration: 1.6s; --p9-word-rule-width: 10rem; }
  html:not([data-jdqps-a11y-motion="reduced"]) body[data-version="v2"].p5-authored.v244-million-motion #app .v2-friction-rail [data-p9-word-state="active"] {
    animation: jdqpsMobileWordSignal var(--p9-word-duration) cubic-bezier(.22,.61,.27,1) both !important;
  }
  html:not([data-jdqps-a11y-motion="reduced"]) body[data-version="v2"].p5-authored.v244-million-motion #app .v2-friction-rail [data-p9-word="1"][data-p9-word-state="active"] { animation-name: jdqpsMobileWordResponse !important; }
  html:not([data-jdqps-a11y-motion="reduced"]) body[data-version="v2"].p5-authored.v244-million-motion #app .v2-friction-rail [data-p9-word="2"][data-p9-word-state="active"] { animation-name: jdqpsMobileWordConsequence !important; }
  html:not([data-jdqps-a11y-motion="reduced"]) body[data-version="v2"].p5-authored.v244-million-motion #app .v2-friction-rail [data-p9-word="3"][data-p9-word-state="active"] { animation-name: jdqpsMobileWordResolution !important; }
  html:not([data-jdqps-a11y-motion="reduced"]) body[data-version="v2"].p5-authored.v244-million-motion #app .v2-friction-rail [data-p9-word="4"][data-p9-word-state="active"] { animation-name: jdqpsMobileWordUnderstanding !important; }
  html:not([data-jdqps-a11y-motion="reduced"]) body[data-version="v2"].p5-authored #app .v2-friction-rail [data-p9-word-state="active"]::after {
    animation: jdqpsMobileWordConnection var(--p9-word-duration) cubic-bezier(.22,.61,.27,1) both;
  }
  body[data-version="v2"].p5-authored #app .v2-friction-rail [data-p9-word-state="settled"]::after { opacity: .22; transform: scaleX(1); }
  html body[data-version="v2"].p5-authored.v244-million-motion #app .v2-friction-rail[data-p9-word-paused="true"] [data-p9-word],
  html body[data-version="v2"].p5-authored #app .v2-friction-rail[data-p9-word-paused="true"] [data-p9-word]::after { animation-play-state: paused !important; }
  html[data-jdqps-a11y-motion="reduced"] body[data-version="v2"].p5-authored.v244-million-motion #app .v2-friction-rail [data-p9-word] { animation: none !important; translate: 0 0; }
  html[data-jdqps-a11y-motion="reduced"] body[data-version="v2"].p5-authored #app .v2-friction-rail [data-p9-word]::after { display: none; }
}
@keyframes jdqpsMobileWordSignal { from { translate: 4px 0; } to { translate: 0 0; } }
@keyframes jdqpsMobileWordResponse { from { translate: 2px 2px; } to { translate: 0 0; } }
@keyframes jdqpsMobileWordConsequence { from { translate: 3px 0; } to { translate: 0 0; } }
@keyframes jdqpsMobileWordResolution { from { translate: 6px 0; } 70% { translate: 1px 0; } to { translate: 0 0; } }
@keyframes jdqpsMobileWordUnderstanding { from { translate: 0 3px; } 70% { translate: 0 .5px; } to { translate: 0 0; } }
@keyframes jdqpsMobileWordConnection { 0% { opacity: .05; transform: scaleX(.06); } 58% { opacity: .42; transform: scaleX(.72); } 100% { opacity: .22; transform: scaleX(1); } }
/* 6.1.24 transition: readable semantic labels, preserving authored accents.
   The small orbit labels use the existing Ivory text on Ink; the Teal orbit,
   position, size and motion retain their approved presentation. */
body[data-version="v2"][data-route="about"] #app .humanity-orbit :is(.o1,.o3) {
  color: var(--ivory, #F4EFE6) !important;
}

/* Both catalogs share contrast-safe text tones. Pure accent colors continue
   to own their rules and motion; only the readable text uses this token. */
body[data-version="v2"][data-route="individual-services"] #app .individual-service {
  --p9-investment-ink: var(--accent);
}
body[data-version="v2"][data-route="individual-services"] #app .individual-service[style*="#D89A32"] {
  --p9-investment-ink: #8A6427;
}
body[data-version="v2"][data-route="individual-services"] #app .individual-service[style*="#73806B"] {
  --p9-investment-ink: #646F5D;
}
body[data-version="v2"].p5-authored[data-route="organization-offerings"] #app .full-offer :is(.offer-number,.kicker),
body[data-version="v2"].p5-authored[data-route="organization-offerings"] #app .full-offer .offer-output > b,
body[data-version="v2"].p5-authored[data-route="individual-services"] #app .individual-service :is(.service-index,.kicker,.service-price),
body[data-version="v2"].p5-authored[data-route="individual-services"] #app .individual-service > div:nth-child(3) > b {
  color: var(--p9-investment-ink, var(--accent)) !important;
}

/* Contact step numbers remain Amber, with a readable tone on Stone. */
body[data-version="v2"][data-route="contact"] #app .process-4.light-process > div > span {
  color: #8A6427;
}

/* Restore the actual approved Q artwork; never filter its pixels to white. */
body[data-version="v2"][data-route="impact"] #app .v214-impact-total img {
  filter: none !important;
}

/* Enhanced focus keeps Amber while an Ivory/Ink pair makes the perimeter
   legible on pale and dark surfaces. Shadows do not change layout geometry. */
html[data-jdqps-a11y-focus="strong"] body[data-version="v2"] :where(a,button,input,textarea,select,[tabindex]):focus-visible {
  box-shadow: 0 0 0 2px var(--ivory, #F4EFE6), 0 0 0 8px var(--ink, #141416) !important;
}

/* The existing one-pixel boundary identifies an empty control on Ivory.
   Preserve its geometry and all focus, error, disabled and native-file states. */
body[data-version="v2"] #app :is(.form-grid,.p7-talent-application) :is(input:not([type]),input[type="text"],input[type="email"],input[type="tel"],input[type="url"],select,textarea):not(:focus):not(:disabled):not([aria-invalid="true"]) {
  border-color: rgba(20,20,22,.5) !important;
}

/* 6.1.24 Pass 10: keep the real checkbox and its native interaction, while
   authoring the small square so platform paint cannot add a white interior. */
body[data-version="v2"] #app form:is([data-intake],[data-careers]) input[type="checkbox"] {
  --p10-checkbox-accent: var(--teal, #176F73);
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid rgba(20,20,22,.5);
  border-radius: 2px;
  background: var(--ivory, #F4EFE6) center / 100% 100% no-repeat !important;
}
body[data-version="v2"] #app form[data-intake] input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
body[data-version="v2"] #app form[data-intake="individual"] input[type="checkbox"] {
  --p10-checkbox-accent: var(--burgundy, #8D243A);
}
body[data-version="v2"] #app form:is([data-intake],[data-careers]) input[type="checkbox"]:not(:focus):not(:disabled):not([aria-invalid="true"]) {
  border-color: rgba(20,20,22,.5) !important;
}
body[data-version="v2"] #app form:is([data-intake],[data-careers]) input[type="checkbox"]:checked {
  background-color: var(--p10-checkbox-accent) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 9l3.2 3.2L14 5.5' fill='none' stroke='%23F4EFE6' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
body[data-version="v2"] #app form:is([data-intake],[data-careers]) input[type="checkbox"]:disabled {
  border-color: var(--stone, #CFC6B8) !important;
  cursor: default;
}
body[data-version="v2"] #app form:is([data-intake],[data-careers]) input[type="checkbox"]:checked:disabled {
  background-color: var(--stone, #CFC6B8) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 9l3.2 3.2L14 5.5' fill='none' stroke='%23141416' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
/* End 6.1.24 checkbox paint. */
