/* How it works: the page is a job traveller. One vertical line runs the whole sheet;
   eight stations sit on it, two decision gates cross it, the fee schedule hangs off it. */
.p-how-it-works { --rg: clamp(44px, 5.6vw, 84px); --lx: calc((100% - var(--rg)) / 4 + var(--rg) / 2); }

/* opening: the head of the traveller */
.p-how-it-works .hw-top { padding-bottom: clamp(48px, 6vw, 96px); }
.p-how-it-works .hw-top .g { row-gap: clamp(28px, 3.6vw, 56px); }
.p-how-it-works .hw-head { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.p-how-it-works .hw-head .tag { margin: 0; }
.p-how-it-works .hw-top h1 { grid-column: 1 / 12; font-size: clamp(2.5rem, 6.6vw, 6.2rem); }
.p-how-it-works .hw-top { padding-bottom: clamp(36px, 4.4vw, 68px); }
.p-how-it-works .route-head { position: relative; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); column-gap: var(--rg); padding-block: clamp(36px, 4.4vw, 68px) clamp(20px, 3vw, 48px); }
.p-how-it-works .hw-not { text-align: right; }
.p-how-it-works .hw-not .tag { display: block; margin-bottom: 12px; }
.p-how-it-works .hw-not li { font-stretch: 112%; font-weight: 800; font-size: clamp(1.25rem, 1.9vw, 1.7rem); line-height: 1.1; letter-spacing: -0.012em; padding-block: 0.5em; border-top: 1px solid var(--ink); text-wrap: balance; }
.p-how-it-works .hw-not li:last-child { border-bottom: 1px solid var(--ink); }
.p-how-it-works .hw-not .note { margin-top: 14px; font-size: 0.98rem; color: var(--ink-2); }
.p-how-it-works .hw-intro { display: flex; flex-direction: column; gap: clamp(18px, 2.2vw, 30px); }
.p-how-it-works .hw-intro h2 { font-family: var(--mono); font-size: 0.72rem; font-weight: 400; font-stretch: 100%; letter-spacing: 0.1em; line-height: 1.5; }
.p-how-it-works .hw-intro .lede { font-size: clamp(1.35rem, 2.5vw, 2.25rem); line-height: 1.2; font-stretch: 112%; font-weight: 700; letter-spacing: -0.012em; max-width: 26ch; }
.p-how-it-works .hw-intro-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gut); row-gap: 14px; max-width: 780px; font-size: 0.98rem; color: var(--ink-2); }

/* the route and its line */
.p-how-it-works .hw-route-sec { background: var(--plate-a); padding-block: 0; }
.p-how-it-works .route { position: relative; }
.p-how-it-works .route-track { position: absolute; z-index: 1; left: var(--lx); top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); }
.p-how-it-works .route-ink { display: none; position: absolute; inset: 0; background: var(--ink); transform-origin: 50% 0; }
.p-how-it-works .route.live .route-track { background: var(--hair); }
.p-how-it-works .route.live .route-ink { display: block; transform: scaleY(var(--p, 0)); }

.p-how-it-works .node { position: absolute; z-index: 2; left: var(--lx); width: 18px; height: 18px; margin-left: -9px; background: var(--ink); box-shadow: 0 0 0 5px var(--plate-a); transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.p-how-it-works .route.live .st:not(.reached) > .node { background: var(--plate-a); box-shadow: inset 0 0 0 2px var(--ink-2), 0 0 0 5px var(--plate-a); }
.p-how-it-works .node.cap { width: 30px; height: 6px; margin-left: -15px; box-shadow: none; top: 0; }
.p-how-it-works .node.cap.end { top: auto; bottom: 0; }
.p-how-it-works .node.tick { width: 26px; height: 2px; margin-left: 0; box-shadow: none; }
.p-how-it-works .node.dia { width: 26px; height: 26px; margin-left: -13px; background: var(--plate-b); box-shadow: inset 0 0 0 2px var(--ink); transform: rotate(45deg); }
.p-how-it-works .route.live .gate.reached > .node.dia { background: var(--paper); }


/* a station: who is in the room to the left of the line, the work to the right */
.p-how-it-works .st, .p-how-it-works .gate { position: relative; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); column-gap: var(--rg); }
.p-how-it-works .st { padding-block: clamp(44px, 5.4vw, 88px); }
.p-how-it-works .st > .node { top: calc(clamp(44px, 5.4vw, 88px) + 0.5rem); }
.p-how-it-works .st-side { text-align: right; display: flex; flex-direction: column; gap: clamp(18px, 2vw, 28px); }
.p-how-it-works .st-n { font-stretch: 125%; font-weight: 800; font-size: clamp(3rem, 5.2vw, 4.8rem); line-height: 0.8; letter-spacing: -0.03em; max-width: none; font-variant-numeric: tabular-nums; transition: color 0.35s var(--ease); }
.p-how-it-works .st-n .tag { display: block; margin-bottom: 12px; letter-spacing: 0.1em; }
.p-how-it-works .route.live .st:not(.reached) .st-n { color: var(--hair); }
.p-how-it-works .room { display: flex; flex-direction: column; gap: 12px; font-size: 0.9rem; line-height: 1.4; }
.p-how-it-works .room dt, .p-how-it-works .ask dt, .p-how-it-works .rep-notes dt, .p-how-it-works .fee-notes dt { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 3px; }
.p-how-it-works .room div:last-child dd { font-family: var(--mono); font-size: 0.8rem; }

.p-how-it-works .st-body { display: flex; flex-direction: column; gap: clamp(20px, 2.4vw, 32px); min-width: 0; }
.p-how-it-works .st-body h3 { font-weight: 800; font-size: clamp(1.7rem, 3.2vw, 2.9rem); line-height: 1.02; letter-spacing: -0.018em; max-width: 20ch; text-wrap: balance; }
.p-how-it-works .st-what { font-size: 1.06rem; max-width: 62ch; }
.p-how-it-works .st-what + .st-what { margin-top: 14px; font-size: 0.98rem; }
.p-how-it-works .ask { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gut); border-top: 1px solid var(--ink); max-width: 780px; }
.p-how-it-works .ask div { padding-top: 12px; }
.p-how-it-works .ask dd { font-size: 0.98rem; max-width: 36ch; }
.p-how-it-works .ask div + div dd { font-stretch: 112%; font-weight: 700; }
.p-how-it-works .ask.one { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
.p-how-it-works .ask.one div + div { border-top: 1px solid var(--hair); }
.p-how-it-works .st-split > div > .ask { margin-top: clamp(20px, 2.4vw, 32px); }

/* the stations do not share one layout */
.p-how-it-works .st-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: clamp(24px, 4vw, 64px); align-items: start; }
.p-how-it-works .st-split .note { border-left: 2px solid var(--ink); padding-left: 18px; font-size: clamp(1.1rem, 1.5vw, 1.3rem); margin-top: 4px; }
.p-how-it-works .st-split.rev { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); }
.p-how-it-works .st-split.con { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.p-how-it-works .st-a .st-body h3 { font-size: clamp(2.2rem, 4.6vw, 4.2rem); font-stretch: 125%; }
.p-how-it-works .st-a .st-what { font-family: var(--serif); font-size: clamp(1.12rem, 1.5vw, 1.32rem); line-height: 1.5; max-width: 56ch; }
.p-how-it-works .st-d .st-body, .p-how-it-works .st-h .st-body { max-width: 720px; }
.p-how-it-works .st-links { display: flex; gap: 14px 32px; flex-wrap: wrap; max-width: none; }

/* documents on the line */
.p-how-it-works .fig { min-width: 0; }
.p-how-it-works .fig-1 { max-width: 820px; }
.p-how-it-works .fig-2 { margin-left: clamp(0px, 6vw, 96px); }
.p-how-it-works .fig-4 { max-width: 700px; margin-left: auto; margin-right: 14px; }
.p-how-it-works .fig-4 .doc { box-shadow: -12px 14px 0 var(--plate-b); }
.p-how-it-works .paper { box-shadow: 12px 14px 0 var(--plate-b); }
.p-how-it-works .doc { padding: clamp(18px, 2.8vw, 40px); color: var(--ink); }
.p-how-it-works .doc-h { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.p-how-it-works .doc-h b { font-stretch: 112%; font-size: clamp(1.05rem, 1.5vw, 1.3rem); }
.p-how-it-works .doc-h svg { width: 112px; height: auto; display: block; color: var(--ink); align-self: flex-end; }
.p-how-it-works .doc-sig { display: flex; gap: 18px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 2px solid var(--ink); font-size: 0.95rem; max-width: none; }
.p-how-it-works .doc-sig .wm { font-size: 15px; margin-left: 4px; }
.p-how-it-works .doc-sig b { font-stretch: 112%; }
.p-how-it-works .doc-sig.plain { border-top-width: 1px; }

.p-how-it-works .spec > div { display: grid; grid-template-columns: 11.5em minmax(0, 1fr) 9.5em; column-gap: 16px; padding-block: 10px; border-bottom: 1px solid var(--hair); font-size: 0.96rem; align-items: baseline; }
.p-how-it-works .spec > div:last-child { border-bottom: 0; }
.p-how-it-works .spec dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.p-how-it-works .spec dd b { font-stretch: 112%; }
.p-how-it-works .spec .by { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-2); text-align: right; }

.p-how-it-works .doc-lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); margin-top: 18px; max-width: 48ch; }
.p-how-it-works .doc-lead b { font-stretch: 112%; font-weight: 800; }
.p-how-it-works .tally { display: grid; grid-template-columns: repeat(21, minmax(0, 1fr)); gap: 3px; margin-top: 18px; max-width: 560px; }
.p-how-it-works .tally i { aspect-ratio: 1; background: var(--ink); }
.p-how-it-works .tally i.miss { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.p-how-it-works .result { margin-top: 18px; }
.p-how-it-works .result > div { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); column-gap: 16px; padding-block: 12px; border-top: 1px solid var(--hair); align-items: baseline; }
.p-how-it-works .result dt { font-stretch: 112%; font-weight: 800; font-size: clamp(1.5rem, 2.3vw, 2.1rem); line-height: 1; font-variant-numeric: tabular-nums; }
.p-how-it-works .result dd { font-size: 1.02rem; }
.p-how-it-works .result dd b { font-stretch: 112%; }
.p-how-it-works .result small { display: block; font-family: var(--mono); font-size: 0.76rem; color: var(--ink-2); margin-top: 5px; line-height: 1.5; }
.p-how-it-works .result .missed { box-shadow: inset 0 0 0 2px var(--ink); padding-inline: 12px; margin-inline: -12px; border-top-color: transparent; }
.p-how-it-works .result .missed + div { border-top-color: transparent; }
.p-how-it-works .rep-t { font-stretch: 112%; font-weight: 700; font-size: clamp(1.2rem, 1.8vw, 1.6rem); line-height: 1.15; margin-top: 18px; }
.p-how-it-works .rep-notes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gut); border-top: 1px solid var(--ink); padding-top: 14px; font-size: 0.93rem; }

/* fig. 3: the approval control */
.p-how-it-works .ctl { padding: 0; }
.p-how-it-works .ctl p { max-width: none; }
.p-how-it-works .ctl-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; padding: 15px 18px; border-bottom: 1px solid var(--deep-hair); }
.p-how-it-works .ctl-h b { font-stretch: 112%; }
.p-how-it-works .ctl-state { display: flex; gap: 18px; align-items: center; padding: 20px 18px 6px 24px; }
.p-how-it-works .ctl-state .wm { font-size: 14px; }
.p-how-it-works .ctl-state b { font-stretch: 112%; }
.p-how-it-works .ctl-item { padding: 6px 18px 16px; font-size: 0.96rem; color: var(--on-deep); }
.p-how-it-works .ctl-item .mono { display: block; color: var(--on-deep-2); margin-bottom: 4px; }
.p-how-it-works .ctl-acts { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 18px 18px; }
.p-how-it-works .ctl-btn { font-stretch: 112%; font-weight: 700; font-size: 0.92rem; padding: 10px 14px; border: 1px solid var(--on-deep-2); }
.p-how-it-works .ctl-btn.solid { background: var(--on-deep); color: var(--deep); border-color: var(--on-deep); }
.p-how-it-works .ctl-foot { padding: 12px 18px; border-top: 1px solid var(--deep-hair); }

/* a decision gate: a band across the sheet, a diamond on the line, a way off it */
.p-how-it-works .gate { padding-block: clamp(36px, 4.4vw, 64px); }
.p-how-it-works .gate::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; background: var(--plate-b); border-block: 2px solid var(--ink); }
.p-how-it-works .gate > * { position: relative; }
.p-how-it-works .gate > .node { position: absolute; top: calc(clamp(36px, 4.4vw, 64px) + 0.2rem); }
.p-how-it-works .gate-side { text-align: right; display: flex; flex-direction: column; gap: 0; align-items: flex-end; }
.p-how-it-works .gate-side .tag { color: var(--ink); line-height: 2.1; }
.p-how-it-works .stop { position: absolute; top: calc(0.2rem + 12px); right: calc(var(--rg) / -2 + 22px); width: min(58%, 190px); height: 2px; background: var(--ink); margin-top: 26px; }
.p-how-it-works .gate-side { position: relative; }
.p-how-it-works .stop { top: 0; margin-top: calc(0.2rem + 12px + 26px); }
.p-how-it-works .stop i { position: absolute; left: 0; top: -9px; width: 6px; height: 20px; background: var(--ink); }
.p-how-it-works .stop b { position: absolute; left: 0; top: 16px; font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.p-how-it-works .gate > .node.dia { top: calc(clamp(36px, 4.4vw, 64px) + 0.2rem + 26px); }
.p-how-it-works .gate-side .stop { right: calc(var(--rg) / -2 + 20px); }
.p-how-it-works .gate-body { display: flex; flex-direction: column; gap: 16px; }
.p-how-it-works .gate-body h3 { font-weight: 800; font-size: clamp(1.7rem, 3.2vw, 2.9rem); line-height: 1.02; letter-spacing: -0.018em; }
.p-how-it-works .gate-body > p { font-size: 1.06rem; max-width: 58ch; }
.p-how-it-works .ways { max-width: 780px; margin-top: 6px; }
.p-how-it-works .ways li { display: grid; grid-template-columns: 7em minmax(0, 1fr); column-gap: 16px; padding-block: 10px; border-top: 1px solid var(--ink); align-items: baseline; font-size: 0.98rem; }
.p-how-it-works .ways .tag { color: var(--ink); }
.p-how-it-works .ways li:last-child { font-stretch: 112%; font-weight: 700; }
.p-how-it-works #decision-2 .ways li:last-child { font-stretch: 100%; font-weight: 400; }
.p-how-it-works #decision-2 .ways li:first-child { font-stretch: 112%; font-weight: 700; }

/* fees: attached to the traveller */
.p-how-it-works .fees { position: relative; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); column-gap: var(--rg); padding-block: clamp(56px, 7vw, 112px); }
.p-how-it-works .fees > .node.tick { top: calc(clamp(56px, 7vw, 112px) + 0.6rem); }
.p-how-it-works .fees-side { display: flex; flex-direction: column; gap: 16px; }
.p-how-it-works .fees-side h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); }
.p-how-it-works .fees-side p { font-size: 0.98rem; }
.p-how-it-works .fee-t { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 0.96rem; margin-top: 4px; }
.p-how-it-works .fee-t th, .p-how-it-works .fee-t td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--hair); }
.p-how-it-works .fee-t thead th { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 400; color: var(--ink-2); }
.p-how-it-works .fee-t tbody th { font-stretch: 112%; font-weight: 800; font-size: 1.12rem; width: 20%; white-space: nowrap; }
.p-how-it-works .fee-t tbody th .mono { display: block; font-weight: 400; font-stretch: 100%; font-size: 0.74rem; color: var(--ink-2); }
.p-how-it-works .fee-t td:nth-child(2) { width: 17%; }
.p-how-it-works .fee-t .ref { display: block; margin-top: 6px; font-size: 0.74rem; color: var(--ink-2); letter-spacing: 0.06em; text-transform: uppercase; }
.p-how-it-works .fee-t .amt { font-family: var(--mono); font-size: 0.82rem; width: 19%; padding-right: 0; text-align: right; }
.p-how-it-works .fee-t thead th:last-child { text-align: right; padding-right: 0; }
.p-how-it-works .fee-t tbody tr:last-child th, .p-how-it-works .fee-t tbody tr:last-child td { border-bottom: 2px solid var(--ink); }
.p-how-it-works .fee-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gut); row-gap: 16px; margin-top: 18px; font-size: 0.93rem; }

/* the end of the line */
.p-how-it-works .hw-end { position: relative; padding: clamp(40px, 5vw, 80px) 0 clamp(72px, 9vw, 140px) calc(var(--lx) + var(--rg) / 2); }
.p-how-it-works .hw-end-in { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.p-how-it-works .hw-end h2 { font-size: clamp(2.2rem, 5vw, 4.6rem); font-stretch: 125%; }
.p-how-it-works .hw-acts { display: flex; gap: 16px 32px; flex-wrap: wrap; align-items: center; max-width: none; }

@media (max-width: 1100px) {
  .p-how-it-works .spec > div { grid-template-columns: 9.5em minmax(0, 1fr); }
  .p-how-it-works .spec .by { grid-column: 2; text-align: left; }
  .p-how-it-works .spec .by:empty { display: none; }
  .p-how-it-works .st-split, .p-how-it-works .st-split.rev, .p-how-it-works .st-split.con { grid-template-columns: minmax(0, 1fr); row-gap: 26px; }
  .p-how-it-works .fig-2 { margin-left: 0; }
  .p-how-it-works .fee-notes { grid-template-columns: minmax(0, 1fr); }
}

/* phone: the line moves to the left edge and everything hangs to its right */
@media (max-width: 900px) {
  .p-how-it-works { --lx: 9px; }
  .p-how-it-works .hw-end { padding-left: 40px; }
  .p-how-it-works .hw-not { text-align: left; order: 2; } .p-how-it-works .hw-intro-2 { grid-template-columns: minmax(0, 1fr); }
  .p-how-it-works .route-head, .p-how-it-works .st, .p-how-it-works .gate, .p-how-it-works .fees { grid-template-columns: minmax(0, 1fr); padding-left: 40px; row-gap: 22px; }
  .p-how-it-works .st-side, .p-how-it-works .gate-side { text-align: left; align-items: flex-start; }
  .p-how-it-works .st-side { gap: 0; }
  .p-how-it-works .st-n { font-size: 3.2rem; }
  .p-how-it-works .st-body { order: 1; } .p-how-it-works .st-side { display: contents; }
  .p-how-it-works .st-n { order: 0; } .p-how-it-works .room { order: 2; border-top: 1px solid var(--hair); padding-top: 14px; }
  .p-how-it-works .stop { display: none; }
  .p-how-it-works .gate > .node.dia { top: calc(clamp(36px, 4.4vw, 64px) - 4px); }
  .p-how-it-works .gate-side .tag { line-height: 1.5; }
  .p-how-it-works .fig-4 { margin-right: 0; margin-left: 12px; }
  .p-how-it-works .paper { box-shadow: 8px 10px 0 var(--plate-b); }
  .p-how-it-works .fig-4 .doc { box-shadow: -8px 10px 0 var(--plate-b); }
  .p-how-it-works .fig { margin-right: 8px; }
  .p-how-it-works .node.tick { margin-left: 0; }
}
@media (max-width: 560px) {
  .p-how-it-works .ask, .p-how-it-works .rep-notes { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
  .p-how-it-works .ask div + div { border-top: 1px solid var(--hair); }
  .p-how-it-works .spec > div { grid-template-columns: minmax(0, 1fr); row-gap: 3px; }
  .p-how-it-works .spec .by { grid-column: 1; }
  .p-how-it-works .ways li { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .p-how-it-works .result > div { grid-template-columns: 2.6em minmax(0, 1fr); column-gap: 10px; }
  .p-how-it-works .doc-sig { align-items: flex-start; } .p-how-it-works .doc-sig .wm { margin-top: 0.5em; }
}
@media (prefers-reduced-motion: reduce) {
  .p-how-it-works .route.live .route-track { background: var(--ink); }
}

/* the gate band is drawn at viewport width; never let it add a horizontal scrollbar */
.p-how-it-works .hw-route-sec { overflow-x: clip; }

/* phone: the fee schedule stacks so nothing is cut off */
@media (max-width: 700px) {
  .p-how-it-works .fee-t { min-width: 0; display: block; }
  .p-how-it-works .fee-t thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .p-how-it-works .fee-t tbody, .p-how-it-works .fee-t tr, .p-how-it-works .fee-t th, .p-how-it-works .fee-t td { display: block; width: auto !important; }
  .p-how-it-works .fee-t tbody th, .p-how-it-works .fee-t td { border-bottom: 0 !important; padding: 0 0 8px; white-space: normal; text-align: left; }
  .p-how-it-works .fee-t tr { padding-block: 14px 8px; border-bottom: 1px solid var(--hair); }
  .p-how-it-works .fee-t tbody tr:last-child { border-bottom: 2px solid var(--ink); }
  .p-how-it-works .fee-t td:nth-child(2) { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); }
  .p-how-it-works .fee-t .amt { text-align: left; border-top: 1px solid var(--hair); padding-top: 8px; }
  .p-how-it-works .fee-t .amt::before { content: "Amount · "; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem; color: var(--ink-2); }
}
