/* How it works page - chained (PvP)+(PvP) settlement. Builds on styles.css tokens and
 * the shared pf-* pieces in platform.css (hero, stage grid, controls, tables). */

:root { --alert: #b3261e; --alert-soft: #f8e1de; }

/* ---- recap cards ---- */
.hw-recap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 21px; }
.hw-recap__card { background: var(--wash); border-radius: var(--radius); padding: 35px; display: flex; flex-direction: column; gap: 9px; font-size: 15px; }
.hw-recap__card--inside { background: var(--lilac); }
.hw-recap__k { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.hw-recap__card h3 { font-size: 28px; }

/* ---- figure ---- */
.hw-lane line { stroke: var(--ink); stroke-opacity: 0.25; stroke-width: 1.25; stroke-dasharray: 3 5; }
.hw-lane text { font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; fill: var(--muted); text-anchor: middle; }
.hw-lane__ccy { fill: var(--ink); }

.hw-box rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; transition: fill 0.3s ease, stroke 0.3s ease, stroke-width 0.3s ease; }
.hw-box text { font-family: var(--font-body); font-size: 12px; font-weight: 600; fill: var(--ink); text-anchor: middle; transition: fill 0.3s ease; }
.hw-box .hw-box__s { font-size: 10px; font-weight: 500; fill: var(--muted); }
.hw-box--agent rect { fill: var(--wash); stroke: var(--lilac); }
.hw-box--dec rect { stroke: var(--alert); }
.hw-box--dec text { fill: var(--alert); }
.hw-box--end rect { stroke: var(--line); }
.hw-box--end text { fill: var(--muted); font-weight: 500; }
.hw-box--settle rect { stroke: var(--ink); }
.hw-box { opacity: 0.5; transition: opacity 0.3s ease; }
.hw-box.is-on, .hw-box.is-done, .hw-box.is-fail { opacity: 1; }
.hw-box.is-on rect { stroke-width: 2.5; }
.hw-box.is-on.hw-box--agent rect { stroke: var(--ink); }
.hw-box.is-done rect { fill: var(--mint); stroke: var(--mint); }
.hw-box.is-done text { fill: var(--ink); }
.hw-box--dec.is-done rect { fill: var(--mint); stroke: var(--mint); }
.hw-box.is-fail rect { fill: var(--alert-soft); stroke: var(--alert); stroke-width: 2.5; }
.hw-box.is-fail text { fill: var(--alert); }

.hw-arrow line, .hw-arrow path { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.hw-arrow polygon { fill: var(--ink); }
.hw-arrow text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; font-weight: 600; fill: var(--ink); }
.hw-arrow { opacity: 0.28; transition: opacity 0.3s ease; }
.hw-arrow.is-on { opacity: 1; }
.hw-arrow--faint { stroke-dasharray: 3 4; }
.hw-arrow--faint line { stroke-dasharray: 3 4; }
.hw-arrow.is-fail { opacity: 1; }
.hw-arrow.is-fail line, .hw-arrow.is-fail path { stroke: var(--alert); }
.hw-arrow.is-fail polygon { fill: var(--alert); }
.hw-arrow.is-fail text { fill: var(--alert); }

.hw-chip { opacity: 0; transition: opacity 0.3s ease; }
.hw-chip.is-on { opacity: 1; }
.hw-chip rect { fill: var(--ink); }
.hw-chip text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; font-weight: 600; fill: var(--paper); text-anchor: middle; }
.hw-chip.is-fail rect { fill: var(--alert); }
.hw-chip.is-done rect { fill: var(--mint); }
.hw-chip.is-done text { fill: var(--ink); }

.hw-dots circle { fill: var(--mint); stroke: var(--ink); stroke-width: 1.5; }
.hw-dots .hw-dot--dark { fill: var(--ink); stroke: var(--paper); }

/* failure stage in the list */
.pf-stage--fail .pf-stage__n { background: var(--alert-soft); color: var(--alert); }
.pf-stage--fail.is-active { border-color: var(--alert); box-shadow: 0 12px 40px rgba(179, 38, 30, 0.08); }
.pf-stage--fail.is-active .pf-stage__n { background: var(--alert); color: var(--paper); }

/* ---- trigger life cycle strip ---- */
.hw-life { background: var(--wash); border-radius: var(--radius-lg); padding: 28px 35px; }
.pf-flow--lg { justify-content: center; gap: 9px; margin: 0; }
.pf-flow--lg span { font-size: 14px; padding: 9px 16px; }
.pf-flow--lg i { width: 18px; }

/* ---- three processes ---- */
.hw-proc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 21px; }
.hw-proc__col { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 11px; font-size: 14.5px; }
.hw-proc__k { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.hw-proc__col h3 { font-size: 22px; }
.hw-proc__col ol { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 10px; }
.hw-proc__col li { position: relative; padding-left: 30px; line-height: 1.5; counter-increment: step; }
.hw-proc__col li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--wash); color: var(--ink); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 1100px) {
  .hw-recap, .hw-proc { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hw-recap, .hw-proc { grid-template-columns: 1fr; }
  .hw-recap__card { padding: 28px 24px; }
}
