/* Approach page: the seven-step method pipeline (#steps).
   Three states: no JS = plain ordered list (default rules below); .mp.is-tabs = stepper with rail, tabs and prev/next (wide screens);
   .mp.is-acc = stacked accordions (phones). method.js adds the state class; nothing is hidden until it has run.
   Colours come only from site.css tokens. Drawings use the site's pen and stroke classes. */

.mp-intro { margin-top: 16px; max-width: 60ch; color: var(--ink-2); }
.mp { scroll-margin-top: calc(var(--header-h) + 16px); }
.mp-list { border-top: 1px solid var(--ink); }
.mp-step { padding: 32px 0 40px; border-bottom: 1px solid var(--hair); scroll-margin-top: calc(var(--header-h) + 16px); }
.mp-h { display: flex; align-items: baseline; gap: 16px; font-size: clamp(1.375rem, 1.15rem + .8vw, 1.75rem); margin-bottom: 20px; }
.mp-n { flex: none; font-size: var(--fs-sm); font-weight: 500; color: var(--copper-ink); letter-spacing: .02em; }
.mp-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px clamp(28px, 4vw, 56px); align-items: start; }

/* facets */
.mp-facets { display: grid; border-top: 1px solid var(--hair-strong); }
.mp-facets > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 6px 24px; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.mp-facets dt { font: 600 var(--fs-cap)/1.45 var(--f-body); color: var(--slate); padding-top: 3px; }
.mp-facets dd { color: var(--ink-2); font-size: var(--fs-small); line-height: 1.55; min-width: 0; }
.mp-facets dd > p + p, .mp-facets dd > p + ul, .mp-facets dd > ul + p { margin-top: 10px; }
.mp-facets .mp-decide dt { color: var(--copper-ink); }
.mp-facets .mp-decide dd { color: var(--ink); font-weight: 500; }
.mp-facets .v7-check { margin-top: 10px; }
.mp-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.mp-links .arrow-link { min-height: 44px; padding-bottom: 0; border-bottom: 0; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* documents received */
.mp-docs { display: grid; gap: 8px; }
.mp-docs li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; }
.mp-ct { display: inline-flex; align-items: baseline; gap: 10px; min-height: 44px; padding-block: 10px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: 3px; }
.mp-ct:hover { text-decoration-color: currentColor; }
.mp-ct b { flex: none; font-size: var(--fs-2xs); font-weight: 500; color: var(--copper-ink); padding: 2px 6px; border: 1px solid var(--hair-strong); border-radius: var(--r-xs); background: var(--white); text-decoration: none; display: inline-block; }
.mp-pdf { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-cap); font-weight: 600; color: var(--copper-ink); text-decoration: underline; text-underline-offset: 3px; }
.mp-pdf:hover { color: var(--ink); }
.mp-plain { min-height: 44px; color: var(--ink-2); padding-inline-start: 2px; }

/* hospital difference */
.mp-hosp { margin-top: 20px; padding: 16px 20px; background: var(--paper-hi); border: 1px solid var(--hair); border-inline-start: 3px solid var(--ink-2); }
.mp-hosp-h { font: 600 var(--fs-cap)/1.4 var(--f-body); color: var(--ink); margin-bottom: 6px; }
.mp-hosp p:not(.mp-hosp-h) { font-size: var(--fs-small); color: var(--ink-2); line-height: 1.55; }

/* drawing */
.mp-fig { margin: 0; position: sticky; top: calc(var(--header-h) + 88px); }
.mp-fig svg { display: block; width: 100%; height: auto; direction: ltr; fill: none; stroke-linecap: butt; stroke-linejoin: miter; }
.mp-fig svg text { stroke: none; font: 500 11px var(--f-body); }
.mp-fig svg .ref { font-family: var(--f-mono); font-size: 10px; letter-spacing: .02em; }
html[lang="ar"] .mp-fig svg text { font-family: var(--f-ar); font-size: 11.5px; }
html[lang="ar"] .mp-fig svg .ref { font-family: var(--f-mono); font-size: 10px; }
/* Arabic labels: RTL base direction, so anchor "start" is the right edge (and "end" the left edge) */
html[lang="ar"] .mp-fig svg text.ar { direction: rtl; unicode-bidi: embed; }
.mp-fig .dash { stroke-dasharray: 5 4; }
.mp-fig .title-block > span { white-space: normal; }
/* phasing strip cells */
.ph-T { fill: var(--paper-2); stroke: var(--hair); }
.ph-W { fill: var(--copper); stroke: var(--copper); }
.ph-X { fill: var(--white); stroke: var(--copper-ink); }
.ph-D { fill: var(--ink-2); stroke: var(--ink-2); }

/* foot link to the worked example */
.mp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; margin-top: 32px; padding: 20px 24px; background: var(--paper-hi); border: 1px solid var(--hair); border-inline-start: 3px solid var(--copper); }
.mp-foot p { max-width: 62ch; color: var(--ink-2); }
.mp-foot .arrow-link { min-height: 44px; }

/* ---------- enhanced: stepper (method.js adds .is-tabs) ---------- */
.mp-bar { display: none; }
.mp.is-tabs .mp-bar { display: block; position: relative; margin-bottom: 0; }
.mp-rail { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
/* the progress line: a pen line along the top that fills to the current step */
.mp-rail::before { content: ""; position: absolute; inset-inline-start: 0; top: -1px; height: 3px; width: calc(var(--mp-p, 1) / 7 * 100%); background: var(--copper); }
.mp-tab { position: relative; display: grid; align-content: start; gap: 4px; min-height: 76px; padding: 16px 12px 14px 0; text-align: start; color: var(--slate); font: 500 var(--fs-small)/1.3 var(--f-body); border-bottom: 1px solid var(--hair); cursor: pointer; transition: color .15s; }
html[dir="rtl"] .mp-tab { padding: 16px 0 14px 12px; }
.mp-tab + .mp-tab { padding-inline-start: 12px; border-inline-start: 1px solid var(--hair); }
.mp-tab .mono { font-size: var(--fs-2xs); color: var(--slate); }
.mp-tab:hover { color: var(--ink); }
.mp-tab[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.mp-tab[aria-selected="true"] .mono, .mp-tab.is-done .mono { color: var(--copper-ink); }
.mp-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.mp.is-tabs .mp-list { border-top: 0; }
.mp.is-tabs .mp-step { border-bottom: 0; padding-top: 32px; padding-bottom: 8px; }
.mp.is-tabs .mp-step[hidden] { display: none; }
.mp.is-tabs .mp-step:focus-visible { outline: 2px solid var(--focus); outline-offset: 6px; }
.mp-nav { display: none; }
.mp.is-tabs .mp-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid var(--hair); }
.mp-nav button { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: var(--r-xs); font: 600 var(--fs-small)/1.2 var(--f-body); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: transparent; transition: background .12s, color .12s; }
.mp-nav button:hover { background: var(--ink); color: var(--paper); }
.mp-nav button:active { transform: translateY(1px); box-shadow: inset 0 0 0 1px var(--ink), inset 0 2px 3px rgba(0, 0, 0, .3); }
.mp-nav button[disabled] { opacity: .35; pointer-events: none; }
.mp-nav button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.mp-nav [data-mp-prev] svg { transform: scaleX(-1); }
html[dir="rtl"] .mp-nav [data-mp-prev] svg { transform: none; }
html[dir="rtl"] .mp-nav [data-mp-next] svg { transform: scaleX(-1); }
.mp-nav button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mp-count { font-size: var(--fs-cap); color: var(--slate); }
@media (prefers-reduced-motion: no-preference) {
  .mp-rail::before { transition: width .3s var(--ease); }
  .mp.is-tabs.is-live .mp-step:not([hidden]) { animation: mp-in .22s var(--ease); }
  @keyframes mp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ---------- enhanced: accordions (method.js adds .is-acc on narrow screens) ---------- */
.mp-acc { display: none; }
.mp.is-acc .mp-step { padding: 0; }
.mp.is-acc .mp-h { margin: 0; font-size: var(--fs-lg); }
.mp.is-acc .mp-h > .mp-n, .mp.is-acc .mp-h > .mp-t { display: none; }
.mp.is-acc .mp-acc { display: flex; align-items: baseline; gap: 14px; width: 100%; min-height: 60px; padding: 16px 0; text-align: start; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.mp-acc .mp-n { align-self: baseline; }
.mp-acc .mp-acc-t { flex: 1; }
.mp-acc i { flex: none; position: relative; width: 14px; height: 14px; align-self: center; }
.mp-acc i::before, .mp-acc i::after { content: ""; position: absolute; inset-inline-start: 0; top: 6px; width: 14px; height: 1.5px; background: var(--ink); }
.mp-acc i::after { transform: rotate(90deg); }
.mp-acc[aria-expanded="true"] i::after { transform: none; }
.mp-acc:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mp.is-acc .mp-body { padding-bottom: 28px; }
.mp.is-acc .mp-body[hidden] { display: none; }

/* ---------- layout ---------- */
@media (max-width: 1080px) {
  .mp-body { grid-template-columns: minmax(0, 1fr); }
  .mp-fig { position: static; max-width: 560px; }
  .mp-tab { font-size: var(--fs-cap); }
}
@media (max-width: 640px) {
  .mp-facets > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .mp-hosp { padding: 14px 16px; }
  .mp-foot { padding: 16px; }
}
@media print {
  .mp-bar, .mp-nav, .mp-acc { display: none !important; }
  .mp .mp-step[hidden], .mp .mp-body[hidden] { display: block !important; }
}

/* link to the worked example inside the existing 'About our examples' note */
.v7-examples a { color: var(--copper-ink); text-decoration: underline; text-underline-offset: 3px; }
.v7-examples a:hover { color: var(--ink); }

/* approach is a long page: sections below the method render only as they near the viewport (cuts first-load style and layout) */
.page-approach :is(#live-hotel, .hse, #shutdown-night, #weekly-report, .standards-pg, #deliverables) { content-visibility: auto; contain-intrinsic-size: auto 1400px; }

/* approach CTA band at 360px: let the long ghost button wrap instead of running past the gutter */
@media (max-width: 420px) { .page-approach .cta-band .wrap > * { min-width: 0; } .page-approach .cta-band .btn { white-space: normal; max-width: 100%; text-align: start; padding-block: 10px; } }
