/* HOME-UX-01 (24 Nov 2026): "How I help" selector and situation cards. Homepage only, #audiences (desktop) and #mh-who (phone).
   Everything new is under .hih-*. The only edits to existing elements are the selector spacing in #audiences. Motion matches the role cards:
   lift .4s cubic-bezier(.22,.61,.36,1), reveal height .5s same curve, fade .7s cubic-bezier(.4,0,.2,1). */

#audiences [hidden], #mh-who [hidden] { display: none !important; }
#audiences .hih-panel[hidden], #mh-who .hih-panel[hidden] { display: none !important; }

/* ---------- selector spacing (desktop section only) ---------- */
html body #audiences .aud-toggle:not(#_):not(#__) { margin: 64px 0 0; }
html body #audiences .aud-toggle__q:not(#_):not(#__) { margin: 0 0 24px; }
html body #audiences .aud-toggle__row:not(#_):not(#__) { gap: 14px; }
html body #audiences .aud-toggle__btn:not(#_):not(#__) { width: 286px; min-width: 286px; min-height: 64px; }

/* ---------- instruction line ---------- */
.hih-ins { text-align: center; margin: 20px auto 32px; max-width: 60ch; font: 400 17px/1.5 var(--font-body, "DM Sans", system-ui, sans-serif); color: #D2D7DC; }
#mh-who .hih-ins { color: #3d4a63; font-size: 16px; margin: 20px auto 28px; }
[data-hih-roles], .hih-sit { transition: opacity .18s ease; }
.hih-fade { opacity: 0; }

/* ---------- phone selector (the phone section had none) ---------- */
#mh-who .hih-sel { margin: 8px 0 0; text-align: center; }
#mh-who .aud-toggle__q { margin: 0 0 24px; font: 500 24px/1.25 var(--font-display, "Playfair Display", Georgia, serif); color: #0B1029; }
#mh-who .aud-toggle__row { display: flex; gap: 12px; justify-content: center; }
#mh-who .aud-toggle__btn { flex: 1 1 0; min-width: 0; min-height: 64px; padding: 12px 14px; border: 1px solid #D6B84C; border-radius: 10px; background: #0B1029; color: #F5F1E8; cursor: pointer; font: 700 16px/1.25 var(--font-body, "DM Sans", system-ui, sans-serif); text-align: center; }
#mh-who .aud-toggle__btn[aria-pressed="true"] { background: #D6B84C; color: #0B1029; }
#mh-who .aud-toggle__t { font: inherit; }
#mh-who .aud-toggle__btn:focus-visible { outline: 2px solid #7A5B00; outline-offset: 3px; }
@media (max-width: 339px) { #mh-who .aud-toggle__row { flex-direction: column; } }

/* ---------- situations grid ---------- */
.hih-sit { container-type: inline-size; --hih-gap: 24px; }
.hih-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hih-gap); align-items: stretch; }
.hih-item { display: flex; min-width: 0; }

.hih-tile {
  appearance: none; width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 24px 16px 20px; min-height: 208px; border-radius: 14px; cursor: pointer;
  background: #FBF7EA; border: 1px solid rgba(214, 184, 76, .75); color: #122846;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .7); white-space: normal;
  font: 600 17px/1.35 var(--font-body, "DM Sans", system-ui, sans-serif);
  transition: transform .4s cubic-bezier(.22, .61, .36, 1), box-shadow .4s, border-color .4s;
}
.hih-ico { width: 44px; height: 44px; flex: none; transition: filter .4s; }
.hih-ico * { vector-effect: non-scaling-stroke; stroke-width: 1.8px; }
.hih-t { display: block; margin-top: 18px; text-wrap: balance; overflow-wrap: break-word; white-space: normal; font-weight: 600; }
.hih-chev { display: block; margin-top: auto; padding-top: 22px; }
.hih-chev::before { content: ""; display: block; width: 9px; height: 9px; margin: 0 auto; border-right: 2px solid #7A5B00; border-bottom: 2px solid #7A5B00; transform: rotate(45deg); transition: transform .4s cubic-bezier(.22, .61, .36, 1); }
.hih-tile[aria-expanded="true"] .hih-chev::before { transform: rotate(225deg) translate(-2px, -2px); }
.hih-tile.is-sel { border-color: #D6B84C; box-shadow: 0 0 0 2px #D6B84C, 0 26px 44px -18px rgba(0, 0, 0, .65), 0 0 34px -6px rgba(214, 184, 76, .35); }

@media (hover: hover) and (pointer: fine) {
  .hih-tile:not(.is-sel):hover { transform: translateY(-6px); border-color: #D6B84C; box-shadow: 0 26px 44px -18px rgba(0, 0, 0, .65), 0 0 0 1px rgba(214, 184, 76, .55), 0 0 34px -6px rgba(214, 184, 76, .35); }
  .hih-tile:hover .hih-ico { filter: drop-shadow(0 0 6px rgba(214, 184, 76, .5)); }
}
.hih-tile:active { transform: scale(.985); }
.hih-tile:focus-visible { outline: 2px solid #E5C878; outline-offset: 3px; }

/* grid columns follow the width of the section, not the screen */
@container (max-width: 299px) { .hih-grid { grid-template-columns: minmax(0, 1fr); } }
@container (min-width: 300px) and (max-width: 599px) {
  .hih-grid { gap: 12px; --hih-gap: 12px; }
  .hih-tile { padding: 18px 12px 16px; min-height: 148px; font-size: 15.5px; }
  .hih-ico { width: 38px; height: 38px; }
  .hih-t { margin-top: 14px; }
  .hih-chev { padding-top: 16px; }
}
@container (min-width: 600px) { .hih-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; --hih-gap: 20px; } .hih-tile { min-height: 200px; } }
@container (min-width: 960px) { .hih-grid { gap: 24px; --hih-gap: 24px; } }
@container (min-width: 1180px) { .hih-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .hih-tile { padding: 24px 20px 20px; min-height: 216px; } }

/* ---------- panel: full width of the row ---------- */
.hih-panel {
  grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; margin-top: calc(var(--hih-gap) * -1);
  opacity: 0; visibility: hidden;
  transition: grid-template-rows .5s cubic-bezier(.22, .61, .36, 1), margin .5s cubic-bezier(.22, .61, .36, 1), opacity .7s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .7s;
}
.hih-panel.is-open { grid-template-rows: 1fr; margin-top: calc(24px - var(--hih-gap)); margin-bottom: calc(24px - var(--hih-gap)); opacity: 1; visibility: visible; transition-delay: 0s; }
.hih-pin { min-height: 0; overflow: hidden; }
.hih-pbox {
  display: grid; gap: 20px; padding: 24px 22px; border-radius: 14px; background: #FBF7EA; color: #122846;
  border: 1px solid rgba(214, 184, 76, .75); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .7);
}
.hih-ph { margin: 0 0 14px; font: 500 24px/1.2 var(--font-display, "Playfair Display", Georgia, serif); color: #122846; }
.hih-sf, .hih-hl { margin: 0 0 8px; font: 700 12.5px/1.3 var(--font-body, "DM Sans", system-ui, sans-serif); letter-spacing: .14em; text-transform: uppercase; color: #7A5B00; }
.hih-rec { margin: 0; font: 400 16px/1.6 var(--font-body, "DM Sans", system-ui, sans-serif); color: #122846; }
.hih-pr ul { margin: 0; padding: 0; list-style: none; }
.hih-pr li { position: relative; margin: 0 0 11px; padding-left: 22px; font: 400 16px/1.55 var(--font-body, "DM Sans", system-ui, sans-serif); color: #122846; }
.hih-pr li:last-child { margin-bottom: 0; }
.hih-pr li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; background: #C9A227; transform: rotate(45deg); }
.hih-pf { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding-top: 20px; border-top: 1px solid rgba(18, 40, 70, .14); }
.hih-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 10px;
  background: #122846; text-decoration: none; font: 700 16px/1.25 var(--font-body, "DM Sans", system-ui, sans-serif); text-align: center;
}
html body .hih-panel a.hih-cta:not(#_):not(#__), html body .hih-panel a.hih-cta:not(#_):not(#__):visited { color: #F5F1E8; text-decoration: none; }
.hih-cta span { display: inline-block; transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
.hih-close { appearance: none; min-height: 44px; padding: 8px 14px; border: 0; background: transparent; color: #122846; cursor: pointer; font: 600 15px/1.2 var(--font-body, "DM Sans", system-ui, sans-serif); }
.hih-cta:focus-visible, .hih-close:focus-visible { outline: 2px solid #7A5B00; outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hih-cta:hover span { transform: translateX(3px); }
}

@container (min-width: 600px) {
  .hih-pbox { padding: 32px; }
  .hih-ph { font-size: 26px; }
  .hih-rec, .hih-pr li { font-size: 16.5px; }
}
@container (min-width: 720px) {
  .hih-pbox { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); column-gap: 48px; row-gap: 24px; }
  .hih-pf { grid-column: 1 / -1; flex-direction: row-reverse; justify-content: space-between; align-items: center; }
  .hih-cta { justify-content: flex-start; }
}
@container (min-width: 1180px) { .hih-ph { font-size: 28px; } }

/* ---------- phone section (cream background) ---------- */
#mh-who .hih-tile { background: #FEFBF1; border-color: #A07A1E; box-shadow: 0 10px 28px -16px rgba(11, 16, 41, .28); }
#mh-who .hih-tile.is-sel { border-color: #8A5A00; box-shadow: 0 0 0 2px #8A5A00, 0 10px 28px -16px rgba(11, 16, 41, .28); }
#mh-who .hih-tile:focus-visible { outline-color: #7A5B00; }
#mh-who .hih-pbox { background: #FEFBF1; border-color: #A07A1E; box-shadow: 0 10px 28px -16px rgba(11, 16, 41, .28); }
@media (hover: hover) and (pointer: fine) { #mh-who .hih-tile:not(.is-sel):hover { border-color: #8A5A00; box-shadow: 0 14px 30px -14px rgba(11, 16, 41, .35), 0 0 0 1px rgba(138, 90, 0, .5); } }

/* ---------- reduced motion and Calm: final state, promptly, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .hih-tile, .hih-ico, .hih-chev::before, .hih-panel, .hih-cta span, [data-hih-roles], .hih-sit { transition: none !important; }
  .hih-tile:hover, .hih-tile:active { transform: none !important; }
}
html.calm .hih-tile, html.calm .hih-ico, html.calm .hih-chev::before, html.calm .hih-panel, html.calm .hih-cta span, html.calm [data-hih-roles], html.calm .hih-sit { transition: none !important; }
html.calm .hih-tile:hover, html.calm .hih-tile:active { transform: none !important; }
html.calm .hih-tile:hover .hih-ico { filter: none; }
.hih-ico [fill="#FBF7EA"] { fill: var(--hih-card, #FBF7EA); }
#mh-who .hih-sit { --hih-card: #FEFBF1; }

/* ---------- no JS: instruction, six cards and their panels all readable; JS-only controls hidden ---------- */
html.js .hih-sit:not(.hih-ready) { display: none; }
html:not(.js) .hih-sel, html:not(.js) .hih-chev, html:not(.js) .hih-close { display: none; }
html:not(.js) .hih-tile { cursor: default; }
html:not(.js) .hih-panel { grid-template-rows: 1fr; margin: 16px 0; opacity: 1; visibility: visible; }

/* Desktop heading: first sentence in true cream (#F5F1E8, the site cream). The gold italic em keeps its own colour. */
html body #audiences h2:not(#_):not(#__):not(#___):not(#____) { color: #F5F1E8 !important; }
