/* how-it-works.html page styles. Owner: PAYROLL agent. Scoped under .pg-how.
   Authored state = finished and readable; the month strip is a native horizontal scroller.
   `.is-staged` (desktop + motion) is added by how-it-works.js to pin and scrub it. */

/* 1 · Hero milestones ---------------------------------------------------- */
.pg-how .hw-miles { list-style: none; margin: clamp(2.5rem, 1.5rem + 4vw, 5rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.hw-miles::before, .hw-miles::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: var(--rule-strong); }
.hw-miles::after { height: 2px; top: 5.5px; background: var(--green); transform-origin: left; transform: scaleX(var(--fill, 1)); }
.hw-miles li { position: relative; display: grid; gap: .2rem; padding: 1.6rem 1rem 0 0; }
.hw-miles__dot { position: absolute; top: 0; left: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--green); z-index: 1; }
.hw-miles li:last-child .hw-miles__dot { background: var(--green); }
.hw-miles__k { font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--fg-3); }
.hw-miles__v { font-family: var(--font-mono); font-size: clamp(.95rem, .85rem + .4vw, 1.2rem); color: var(--fg); }
@media (max-width: 599.98px) {
  .pg-how .hw-miles { grid-template-columns: 1fr 1fr; row-gap: 1.5rem; }
  .hw-miles::before, .hw-miles::after { display: none; }
  .hw-miles li { border-top: 1px solid var(--rule-strong); padding-top: 1.3rem; }
  .hw-miles__dot { top: -7px; }
}

/* 2 · Two ways ------------------------------------------------------------- */
.hw-ways__grid { display: grid; gap: clamp(1rem, .6rem + 1.4vw, 1.75rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.hw-way { background: var(--surface); }
.hw-way__dia { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; padding: 1.2rem; border-radius: var(--r-md); background: var(--surface-2); margin-bottom: .5rem; min-height: 9.5rem; }
.hw-node { font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .06em; padding: .45rem .7rem; border-radius: var(--r-xs); border: 1px solid var(--rule-strong); background: var(--surface); color: var(--fg-2); white-space: nowrap; }
.hw-node--main { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.hw-node--you { border-color: var(--green); color: var(--fg); font-weight: 600; }
.hw-node-col { display: grid; gap: .4rem; }
.hw-fan { position: relative; height: 5.4rem; }
.hw-fan i { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--green); transform-origin: left center; }
.hw-fan i:nth-child(1) { transform: rotate(-17deg); } .hw-fan i:nth-child(3) { transform: rotate(17deg); }
.hw-fan.hw-fan--one i { transform: none; }

/* 3 · Onboarding ------------------------------------------------------------ */
.hw-onb__grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 5rem); }
@media (min-width: 1000px) { .hw-onb__grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; } .hw-onb__side { position: sticky; top: calc(var(--header-h) + 2rem); } }
.hw-onb__side { display: grid; gap: 1.2rem; }
.hw-onb__side h2 { font-size: var(--fs-h3); }
.pg-how .hw-steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; }
.hw-steps::before, .hw-steps::after { content: ""; position: absolute; left: 1.2rem; top: 1.4rem; bottom: 1.4rem; width: 1px; background: var(--rule-strong); }
.hw-steps::after { width: 2px; left: calc(1.2rem - .5px); background: var(--green); transform-origin: top; transform: scaleY(var(--fill, 1)); }
.hw-step { position: relative; display: grid; grid-template-columns: 2.4rem 1fr; gap: 1.4rem; padding: 1.4rem 0; border-bottom: 1px solid var(--rule); }
.hw-step:last-child { border-bottom: 0; }
.hw-step__n { position: relative; z-index: 1; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--rule-strong); font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--fg); }
.hw-step--key .hw-step__n { background: var(--green); border-color: var(--green); color: #fff; }
.hw-step__t { font-size: var(--fs-h4); margin-bottom: .45rem; }
.hw-step p { color: var(--fg-2); max-width: 60ch; }
.hw-step--key p::after { content: "Net pay must match to go live"; display: block; width: max-content; max-width: 100%; margin-top: .8rem; font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .08em; text-transform: uppercase; color: var(--success); background: var(--success-bg); padding: .3rem .65rem; border-radius: var(--r-pill); }

/* 4 · What we need ----------------------------------------------------------- */
.hw-need__card { display: grid; gap: clamp(1.5rem, 1rem + 3vw, 4rem); padding: clamp(1.5rem, 1rem + 2.5vw, 3.5rem); border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--paper); }
@media (min-width: 1000px) { .hw-need__card { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; } }
.hw-need__head { display: grid; gap: 1rem; }
.hw-need__head .h2 { font-size: var(--fs-h3); }
.hw-need__note { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--fs-sm); color: var(--fg-2); padding: .9rem 1rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--rule); }
.hw-need__note .icon { color: var(--green); margin-top: .15rem; }
.pg-how .hw-need__list { list-style: none; margin: 0; padding: 0; display: grid; }
.hw-need__list li { display: grid; grid-template-columns: 1.7rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px dashed var(--rule-strong); color: var(--fg-2); }
.hw-need__list li:first-child { border-top: 2px solid var(--fg); }
.hw-need__list b { display: block; color: var(--fg); font-weight: 600; margin-bottom: .15rem; }
.hw-tick { width: 1.5rem; height: 1.5rem; border-radius: 5px; border: 1.5px solid var(--green); display: grid; place-items: center; background: var(--green); margin-top: .1rem; }
.hw-tick svg { width: 1rem; height: 1rem; fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }

/* 5 · A month with Shardhan ------------------------------------------------------ */
.hw-month { overflow: clip; padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); }
.hw-month__head { max-width: 820px; }
.hw-month__pin { position: relative; --mx: var(--gutter); }
.hw-month__viewport { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: thin; scrollbar-color: rgba(111,209,165,.4) transparent; padding-bottom: 1.2rem; }
.hw-month__viewport:focus-visible { outline-offset: -3px; }
.pg-how .hw-days { list-style: none; margin: 0; padding: 0 var(--gutter); display: flex; width: max-content; }
.hw-day { flex: none; width: 3.6rem; position: relative; padding-top: 2.4rem; }
.hw-day::before { content: ""; position: absolute; left: 0; right: 0; top: 2.1rem; height: 1px; background: var(--rule-strong); }
.hw-day__n { position: absolute; top: 0; left: 0; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-3); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.hw-day__tick { position: absolute; left: 0; top: 1.7rem; width: 1px; height: .8rem; background: var(--rule-strong); }
.hw-day--ev { width: min(21rem, 80vw); padding-right: 1.4rem; scroll-snap-align: start; }
.hw-day--ev .hw-day__n { font-size: var(--fs-h3); font-family: var(--font-display); font-weight: 600; color: var(--fg); top: -1rem; letter-spacing: -.01em; }
.hw-day--ev .hw-day__tick { height: 1.2rem; top: 1.5rem; background: var(--mint); width: 2px; }
.hw-ev { margin-top: 1.4rem; min-height: 15.5rem; display: flex; flex-direction: column; gap: .55rem; padding: 1.2rem 1.25rem; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--rule-strong); transition: border-color var(--dur-3), background var(--dur-3); }
.hw-ev:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hw-ev__tag { align-self: flex-start; font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .1em; text-transform: uppercase; color: var(--mint); border: 1px solid rgba(111,209,165,.35); border-radius: var(--r-pill); padding: .2rem .6rem; }
.hw-ev__t { font-size: var(--fs-h5); font-family: var(--font-body); font-weight: 600; color: var(--fg); }
.hw-ev__b { font-size: var(--fs-sm); color: var(--fg-2); }
.hw-ev--due .hw-ev__tag { color: #FFD9A8; border-color: rgba(255,217,168,.4); }
.hw-ev--due::after { content: "Statutory due date"; margin-top: auto; font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .08em; text-transform: uppercase; color: #FFD9A8; }
.hw-ev--click { background: #0E3A2D; border-color: var(--mint); }
.hw-ev--click::after { content: "Never automatic"; margin-top: auto; font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .08em; text-transform: uppercase; color: var(--mint); }
.hw-ev--stamp::after { content: "Maker ≠ checker"; margin-top: auto; font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .08em; text-transform: uppercase; color: var(--mint); }
.hw-month__now { display: none; }
.hw-month__hint { padding: 0 var(--gutter); color: var(--fg-3); font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .1em; text-transform: uppercase; margin-top: .4rem; }
.hw-month__hint-desk { display: none; }

/* Staged month (desktop + motion): pinned, scrubbed by vertical scroll */
.hw-month.is-staged .hw-month__pin { height: 100svh; display: flex; flex-direction: column; justify-content: center; --mx: 30vw; }
.hw-month.is-staged .hw-month__viewport { overflow: clip; padding-bottom: 0; }
.hw-month.is-staged .hw-days { padding-left: var(--mx); padding-right: 40vw; }
.hw-month.is-staged .hw-month__now { display: block; position: absolute; left: var(--mx); top: calc(50% - 12.5rem); height: 23rem; width: 0; border-left: 1px dashed rgba(224,120,42,.55); z-index: 2; pointer-events: none; margin-left: -1px; }
.hw-month__now-dot { position: absolute; left: -5px; top: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--saffron); }
.hw-month__now-label { position: absolute; left: .6rem; top: -.65rem; font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); white-space: nowrap; }
.hw-month__now-label b { color: var(--fg); font-weight: 600; }
.hw-month.is-staged .hw-month__hint-desk { display: inline; }
.hw-month.is-staged .hw-month__hint-mob { display: none; }
.hw-month.is-staged .hw-day.is-future .hw-ev { border-style: dashed; background: transparent; }
.hw-month.is-staged .hw-day.is-now .hw-ev { border-color: var(--mint); background: #0E3A2D; }
.hw-month.is-staged .hw-day.is-past .hw-day__n, .hw-month.is-staged .hw-day.is-now .hw-day__n { color: var(--mint); }

/* 6 · FAQ ---------------------------------------------------------------------- */
.hw-faq__grid { display: grid; gap: clamp(2rem, 1rem + 3vw, 4rem); }
@media (min-width: 1000px) { .hw-faq__grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; } .hw-faq__side { position: sticky; top: calc(var(--header-h) + 2rem); } }
.hw-faq__side { display: grid; gap: 1.2rem; }
.hw-faq__side h2 { font-size: var(--fs-h3); }
.hw-acc .accordion__summary > span:first-child { font-family: var(--font-display); font-size: var(--fs-h5); font-weight: 600; }

/* 7 · CTA ------------------------------------------------------------------------ */
.hw-cta { overflow: clip; }
.hw-cta__lines { position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(180deg, transparent 0 31px, var(--ledger-line) 31px 32px); mask-image: radial-gradient(70% 80% at 50% 50%, #000 15%, transparent 72%); -webkit-mask-image: radial-gradient(70% 80% at 50% 50%, #000 15%, transparent 72%); }
.hw-cta__inner { display: grid; gap: 2.2rem; justify-items: center; text-align: center; }
.hw-cta__inner .btn-row { justify-content: center; }
.hw-cta__title { font-size: clamp(2.6rem, 1.2rem + 5.5vw, 6.5rem); max-width: 14ch; }

/* Workaround (foundation request): hidden glossary tips must not widen the mobile layout viewport */

/* Phase bands above the ruler (widths set by JS from the day positions) */
.hw-month__viewport { position: relative; }
.hw-bands { position: relative; height: 2.2rem; margin: 0 0 .9rem; }
.hw-band { position: absolute; top: 0; height: 2rem; display: flex; align-items: center; padding: 0 .8rem; border-radius: var(--r-xs); font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; overflow: hidden; color: var(--fg-2); background: rgba(111,209,165,.06); border-left: 2px solid var(--rule-strong); }
.hw-band--file { color: #FFD9A8; border-left-color: rgba(255,217,168,.7); background: rgba(255,217,168,.06); }
.hw-band--run { color: var(--mint); border-left-color: var(--mint); background: rgba(111,209,165,.1); }
.hw-bands:not(.is-set) { display: none; }
.hw-month__big { display: none; }
.hw-month.is-staged .hw-month__big { display: block; position: absolute; right: var(--gutter); bottom: 4svh; font-family: var(--font-display); font-weight: 700; font-size: clamp(10rem, 22vw, 22rem); line-height: .8; letter-spacing: -.03em; color: rgba(111,209,165,.07); pointer-events: none; font-variant-numeric: tabular-nums; }
.hw-month.is-staged .hw-month__now { top: calc(50% - 15rem); height: 29rem; }
.hw-month__big [data-big]::before { content: attr(data-n); } /* decorative numeral as generated content (not text), so it is not a contrast target */
