/* ==========================================================================
   css/fig-how.css — "How a canary works" (section #method), owned by fig-how
   Modes (classes set by js/fig-how.js on section#method, via gsap.matchMedia):
     (none)       no JS / reduced motion → the static grid from base.css §11,
                  closing card below it
     .is-pinned   (min-width:768px) and (min-height:640px) and (hover:hover) → pinned
                  rail of six panels; + .is-wide ≥1200px: the closing card rides the rail
     .is-stacked  (max-width:767px), (max-height:639px), (hover:none) → vertical stack
                  (visual and text side by side once there is room)
   Mini-visuals: canvas (scene) + .hv overlay (crisp DOM type) in .step__vis
   ========================================================================== */

/* ---------- 0 · Step accents: accent = ours, ice/blue = transport; red only on bites -- */
#method .step:nth-child(1) { --c: var(--lime); --c2: var(--ice); }
#method .step:nth-child(2) { --c: var(--ice); --c2: var(--blue); }
#method .step:nth-child(3) { --c: var(--blue); --c2: var(--lime); }
#method .step:nth-child(4) { --c: var(--ice); --c2: var(--lime); }
#method .step:nth-child(5) { --c: var(--blue); --c2: var(--ice); }
#method .step:nth-child(6) { --c: var(--lime); --c2: var(--ice); }
#method .id { text-transform: none; letter-spacing: 0; }

/* ---------- 0b · Fig colours: light type, dark surfaces, receipt paper, envelope, accent wax ---- */
#method {
  --hw-wh: var(--text-rgb);                   /* light type (the page's own white) */
  --hw-bite-hi: 255 184 180;                  /* type on a bite row */
  --hw-blue-hi: #C9D3DE;                      /* code: the program name */
  --hw-ice-hi: #F2F3F5;                       /* the slot-bound chip */
  --hw-glass: 9 9 10;                         /* dark tag glass over the scenes */
  --hw-code: 7 7 8;                           /* code window */
  --hw-slot: #040404;                         /* receipt printer slot */
  --hw-paper: #ECEBE6; --hw-paper-ink: 22 22 24;   /* receipt */
  --hw-env-1: #3C3C40; --hw-env-2: #28282B; --hw-env-3: #1A1A1C;     /* envelope body */
  --hw-flap-1: #434347; --hw-flap-2: #2C2C2F; --hw-flap-3: #262629;  /* envelope flap */
  --hw-seal-hi: #FFFFFF; --hw-seal-lo: #CDCAC0; --hw-seal-lo2: #B2AEA3;  /* wax seal (accent wax) */
  --hw-seal-deep: 72 68 60; --hw-seal-rim: 168 164 152;
}

/* ---------- 1 · Panel furniture (all modes) ------------------------------- */
#method .step { position: relative; isolation: isolate; overflow: hidden; }
#method .step::before { /* faint per-step tint, picked up from the visual's colours */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background:
    radial-gradient(80% 60% at 0% 0%, color-mix(in srgb, var(--c) 6%, transparent), transparent 62%),
    radial-gradient(60% 50% at 100% 100%, color-mix(in srgb, var(--c2) 4%, transparent), transparent 70%);
}
#method .step::after { /* hover ring: opacity only */
  content: ""; position: absolute; inset: 0; z-index: 8; pointer-events: none; border-radius: inherit; opacity: 0;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 42%, transparent), inset 0 0 60px -30px color-mix(in srgb, var(--c) 50%, transparent);
  transition: opacity .5s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  #method .step:hover::after { opacity: 1; }
}
#method .step__vis { container-type: inline-size; }
#method .step__no { /* display numerals: Space Grotesk 700, tabular */
  position: relative; grid-row: span 3;
  font-family: var(--f-display); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.04em;
}
#method .step__verb { letter-spacing: -0.04em; }
#method .step__meta {
  grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--line);
  font: 600 12.5px/1.2 var(--f-ui); font-variant-numeric: tabular-nums; color: var(--muted-2);
}
#method .step__ct b { font-weight: 600; color: var(--text); }
#method .step__next {
  position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 0 0 10px; margin: -2px 0 -2px auto;
  border-radius: 8px; font: 600 13px/1 var(--f-ui); color: var(--text); white-space: nowrap; transition: color .3s ease;
}
#method .step__next::after { content: ""; position: absolute; inset: -4px 0; } /* ≥ 44px hit area */
#method .step__next .i { width: 14px; height: 14px; color: var(--lime); transition: transform .45s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  #method .step__next:hover { color: var(--lime); }
  #method .step__next:hover .i { transform: translateX(3px); }
}

/* closing card: accent block (below the steps unless the rail carries it) */
#method .how__after { margin-top: 16px; }
#method .how__end {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px;
  padding: 24px 26px; border-radius: var(--r-lg); background: var(--lime); color: var(--ink);
}
#method .how__end::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain-img); background-size: 220px 220px; opacity: .12; mix-blend-mode: multiply;
}
#method .how__end-copy { display: grid; gap: 8px; flex: 1 1 20ch; min-width: 0; }
#method .how__end-k { font: 600 13px/1.25 var(--f-ui); color: rgb(var(--ink-rgb) / .72); }
#method .how__end-line {
  font: 700 clamp(28px, 1.4vw + 16px, 40px)/.92 var(--f-display);
  letter-spacing: -0.04em; text-transform: uppercase; text-wrap: balance;
}
#method .how__end .btn { flex: none; }
#method .how__end-arrow { display: none; width: clamp(56px, 10vh, 112px); height: auto; color: var(--ink); }
#method .how__end ::selection { background: var(--ink); color: var(--lime); }
#method .how__end :focus-visible { outline-color: var(--ink); }

/* step tabs under the progress bar (pinned mode only; hidden otherwise) */
#method .how__count { font: 600 12.5px/1 var(--f-ui); font-variant-numeric: tabular-nums; letter-spacing: 0; color: var(--muted-2); }
#method .how__count b { display: inline-block; min-width: 2ch; font-weight: 600; color: rgb(var(--hw-wh)); }
#method .how__steps { grid-column: 1 / -1; position: relative; height: 32px; margin: 0; padding: 0; list-style: none; }
#method .how__steps li { position: absolute; top: 4px; left: var(--at, 0%); transform: translateX(-50%); }
#method .how__steps li::before {
  content: ""; position: absolute; left: 50%; top: -11px; width: 1px; height: 6px; background: var(--line-3);
  transition: background-color .3s ease, box-shadow .3s ease;
}
#method .how__go {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 7px;
  font: 600 12.5px/1 var(--f-ui); color: var(--muted-2); white-space: nowrap;
  transition: color .3s ease, background-color .3s ease;
}
#method .how__go b { font-weight: 600; font-variant-numeric: tabular-nums; color: inherit; opacity: .82; transition: color .3s ease; } /* ≥ 4.5:1 on the page ground */
@media (hover: hover) and (pointer: fine) { #method .how__go:hover { color: rgb(var(--hw-wh)); background: rgba(255, 255, 255, .06); } }
#method .how__steps li.is-on::before { background: var(--lime); box-shadow: 0 0 8px var(--lime); }
#method .how__steps li.is-done::before { background: rgb(var(--lime-rgb) / .55); }
#method .how__steps li.is-on .how__go { color: rgb(var(--hw-wh)); }
#method .how__steps li.is-on .how__go b { color: var(--lime); opacity: 1; }
html.is-touch #method .how__steps { height: 50px; }
html.is-touch #method .how__go { height: 44px; min-height: 44px; }

/* ---------- 2 · Pinned rail ((min-width:768px) and (min-height:640px)) ------ */
#method.is-pinned { --stepw: 84vw; padding-top: var(--sp-m); padding-bottom: 0; }
@media (min-width: 1024px) { #method.is-pinned { --stepw: min(78vw, 1400px); } }
@media (min-width: 1200px) { #method.is-pinned { --stepw: min(72vw, 1040px); } }
#method.is-pinned .how__pin {
  display: flex; flex-direction: column; overflow: hidden;
  height: 100vh; height: 100svh;
  padding: calc(var(--nav-h) + clamp(4px, 1.2vh, 14px)) 0 clamp(14px, 2.6vh, 30px);
}
#method.is-pinned .how__head { flex: none; margin-bottom: clamp(10px, 1.8vh, 20px); }
#method.is-pinned .how__bar { position: relative; margin-top: clamp(12px, 2vh, 20px); }
#method.is-pinned .fig--how { flex: 1 1 auto; min-height: 0; }
#method.is-pinned .how__rail { /* the first panel starts centred; the rail travels left */
  display: flex; gap: 16px; height: 100%; width: max-content; will-change: transform;
  padding: 0 calc((100% - var(--stepw)) / 2);
}
#method.is-wide .how__rail { padding-right: calc(max(0px, (100% - var(--wrap)) / 2) + var(--gutter)); }
#method.is-pinned .how__track { display: flex; gap: 16px; height: 100%; width: auto; max-width: none; margin: 0; padding: 0; }
#method.is-pinned .step {
  flex: none; width: var(--stepw); height: 100%; gap: clamp(14px, 1.8vw, 30px); padding: 12px;
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-rows: minmax(0, 1fr);
}
/* one orientation for every panel (text, then its visual), so a giant numeral never sits beside another */
#method.is-pinned .step__vis { order: 2; aspect-ratio: auto; height: 100%; min-height: 0; }
#method.is-pinned .step__body {
  display: flex; flex-direction: column; align-items: flex-start; min-height: 0; will-change: transform;
  padding: clamp(10px, 2.2vh, 26px) clamp(6px, 1vw, 16px) clamp(6px, 1.2vh, 12px) clamp(10px, 1.3vw, 22px);
}
#method.is-pinned .step__no {
  margin-bottom: auto; padding-bottom: 12px;
  font-size: clamp(84px, 21vh, 236px); line-height: .76; letter-spacing: -0.04em;
}
#method.is-pinned .step__no::after { /* outlined ghost, drifts against the panel for depth */
  content: attr(data-ghost); position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none;
  color: transparent; -webkit-text-stroke: 1px rgb(var(--lime-rgb) / .34);
  transform: translate3d(var(--gx, 0px), 0, 0);
}
#method.is-pinned .step__verb { font-size: clamp(40px, 7.4vh, 88px); line-height: .86; }
#method.is-pinned .step__text { margin-top: clamp(10px, 1.8vh, 20px); font-size: clamp(15px, 1.9vh, 18px); line-height: 1.5; max-width: 34ch; }
#method.is-pinned .step__meta { align-self: stretch; margin-top: clamp(14px, 2.6vh, 28px); }
#method.is-wide .how__after { display: none; }

/* ≥1200: the closing card rides at the end of the rail, narrow enough that panel 06 stays whole */
#method.is-wide .how__rail > .how__end {
  flex: none; width: clamp(240px, calc(100vw - var(--stepw) - 134px), 420px); height: 100%;
  flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: flex-end; gap: 18px;
  padding: clamp(18px, 1.6vw, 28px);
}
#method.is-wide .how__rail > .how__end .how__end-arrow { display: block; margin-bottom: auto; }
#method.is-wide .how__rail > .how__end .how__end-copy { flex: none; gap: 12px; }
#method.is-wide .how__rail > .how__end .how__end-line { font-size: clamp(30px, min(4.8vh, 3.2vw), 56px); }
#method.is-wide .how__rail > .how__end .btn { max-width: 100%; }

@media (max-width: 1023px) { /* tablet portrait: panel stacks visual over text */
  #method.is-pinned .step { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  #method.is-pinned .step__vis { order: 0; }
  #method.is-pinned .step__body { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; padding: 4px 8px 6px; }
  #method.is-pinned .step__no { margin: 0; padding: 0; font-size: clamp(64px, 9vh, 104px); }
  #method.is-pinned .step__verb { font-size: clamp(34px, 4.6vh, 52px); }
  #method.is-pinned .step__text { margin-top: 6px; max-width: 52ch; }
  #method.is-pinned .step__meta { margin-top: 12px; }
}

/* ---------- 3 · Stacked ((max-width:767px), (max-height:639px)) + static phone grid -- */
#method.is-stacked .how__track { gap: 14px; }
#method.is-stacked .step { gap: 14px; padding: 8px 8px 10px; }
#method.is-stacked .step__vis { aspect-ratio: 16 / 9; }
#method.is-stacked .step__body,
#method:not(.is-pinned) .step__body { grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 4px 6px; }
#method.is-stacked .step__no,
#method:not(.is-pinned) .step__no { grid-row: auto; font-size: clamp(40px, 3.2vw, 56px); line-height: .8; }
#method.is-stacked .step__verb,
#method:not(.is-pinned) .step__verb { font-size: clamp(26px, 2vw, 34px); }
#method.is-stacked .step__text,
#method:not(.is-pinned) .step__text { grid-column: 1 / -1; margin-top: 4px; font-size: 15px; line-height: 1.5; max-width: 62ch; }
#method.is-stacked .step__meta,
#method:not(.is-pinned) .step__meta { margin-top: 6px; padding-top: 4px; }
@media (min-width: 1680px) {
  #method:not(.is-pinned) .step__text { font-size: 16px; }
}
@media (min-width: 600px) { /* landscape phones and short windows: visual and text side by side */
  #method.is-stacked .how__track { grid-template-columns: minmax(0, 1fr); max-width: 1112px; }
  #method.is-stacked .step { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 18px; padding: 10px; }
  #method.is-stacked .step__body { padding: 4px 8px 4px 0; }
}
/* static grid (reduced motion / no JS): a "Next" in a multi-column grid goes nowhere useful */
@media (min-width: 768px) {
  #method:not(.is-pinned):not(.is-stacked) .step__next { display: none; }
}
@media (max-width: 767px) {
  /* reduced motion / no JS on phones: the same compact stack as the stacked mode */
  #method:not(.is-stacked) .how__track { gap: 14px; }
  #method:not(.is-stacked) .step { gap: 14px; padding: 8px 8px 10px; }
  #method:not(.is-stacked) .step__vis { aspect-ratio: 16 / 9; }
  #method .how__end { padding: 20px; }
  #method .how__end .btn { width: 100%; }
}

/* ---------- 4 · Mini-visual overlays (crisp type over the canvas) --------- */
#method .hv {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  color: var(--text); font-variant-numeric: tabular-nums;
}
#method .hv .tag { min-height: 20px; padding: 0 6px; font-size: 11px; letter-spacing: .04em; border-radius: 4px; }
#method .hv .tag--muted { background: rgb(var(--hw-glass) / .76); color: rgb(var(--hw-wh) / .88); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
#method .hv-tag { position: absolute; top: 12px; right: 12px; z-index: 4; }

/* 01 · MINT — odometer readout + ingredient chips */
#method .mint__read { position: absolute; left: 0; right: 0; top: 10%; display: grid; justify-items: center; gap: 10px; }
#method .mint__lbl { font: 600 12.5px/1 var(--f-ui); color: rgb(var(--hw-wh) / .68); }
#method .mint__num {
  display: flex; align-items: flex-end; font: 700 clamp(34px, 10.4cqw, 92px)/1 var(--f-mono); letter-spacing: -0.04em;
  color: rgb(var(--hw-wh)); transition: filter .5s ease;
}
#method .mint__num.is-set { filter: drop-shadow(0 0 18px rgb(var(--lime-rgb) / .34)); }
#method .odo2 { display: inline-block; height: 1em; overflow: hidden; color: rgb(var(--hw-wh) / .66); transition: color .3s ease; }
#method .odo2.is-lock { color: rgb(var(--hw-wh)); }
#method .odo2__s { display: flex; flex-direction: column; will-change: transform; }
#method .odo2__s > span { display: block; height: 1em; line-height: 1; }
#method .mint__pt { display: inline-block; line-height: 1; color: rgb(var(--hw-wh) / .72); }
#method .mint__unit { align-self: flex-start; margin: .12em 0 0 .3em; font: 700 max(12px, .3em)/1 var(--f-display); letter-spacing: .02em; color: var(--lime); }
#method .mint__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 2px 0 0; padding: 0 10px; list-style: none; }
#method .mint__chips li {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px;
  font: 600 12px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); background: var(--lime); box-shadow: 0 0 22px -6px rgb(var(--lime-rgb) / .5); will-change: transform, opacity;
}
#method .hv.is-short .mint__lbl { display: none; }
#method .hv.is-short .mint__read { top: 12px; gap: 6px; }
#method .hv.is-short .mint__num { font-size: 36px; }
@container (max-width: 380px) {
  #method .mint__lbl { display: none; }
  #method .mint__read { top: 38px; gap: 6px; }
  #method .mint__chips li { height: 22px; padding: 0 7px; letter-spacing: 0; text-transform: none; }
}

/* 02 · PIN — three instructions, typed in; the shared assertion program pins the window */
#method .pin__code {
  position: absolute; left: 5%; top: max(42px, 8%); margin: 0; padding: .8em 1.05em; border-radius: 10px; max-width: 90%;
  font: 400 clamp(12px, 2.15cqw, 14px)/1.62 var(--f-mono); color: rgb(var(--hw-wh) / .88); white-space: pre; overflow: hidden;
  background: rgb(var(--hw-code) / .8); box-shadow: inset 0 0 0 1px rgb(var(--ice-rgb) / .16), 0 18px 40px -16px rgba(0, 0, 0, .8);
}
#method .pin__ln {
  position: relative; display: block; width: max-content; --r: 0;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--r) * 1%), rgba(0, 0, 0, .25) calc(var(--r) * 1% + 1.5ch));
  mask-image: linear-gradient(90deg, #000 calc(var(--r) * 1%), rgba(0, 0, 0, .25) calc(var(--r) * 1% + 1.5ch));
}
#method .pin__ln.is-typing::after { /* the caret */
  content: ""; position: absolute; top: .2em; bottom: .2em; left: calc(var(--r) * 1%); width: .6ch; background: var(--lime);
}
#method .pin__cm, #method .pin__tc { color: rgb(var(--hw-wh) / .5); }
#method .pin__code .x { color: rgb(var(--hw-wh) / .52); }
#method .pin__code .k { color: var(--ice); }
#method .pin__code .m { color: var(--hw-blue-hi); }
#method .pin__code .s { color: var(--lime); font-weight: 700; }
#method .pin__abt { display: none; }
@container (max-width: 540px) {
  #method .pin__tc, #method .pin__ab { display: none; }
  #method .pin__abt { display: inline; } /* the "abridged" comment no longer fits: the tag says it */
}
@container (max-width: 410px) { #method .pin__cm { display: none; } }

/* 03 · ROUTE — which lane is lit */
#method .hv-read {
  position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 20px; margin: 0;
  font: 600 12.5px/1 var(--f-ui); color: rgb(var(--hw-wh) / .9);
}
#method .hv-read i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
#method .hv-read .id { color: var(--lime); }

/* 04 · WATCH — three slots, the legs across them */
#method .watch__cap {
  position: absolute; left: 12px; top: 12px; right: 118px; margin: 0;
  font: 600 12px/1.35 var(--f-ui); letter-spacing: .06em; color: rgb(var(--hw-wh) / .82);
}
#method .watch__slots {
  position: absolute; left: 4.5%; right: 18.5%; top: 13%; bottom: 13%;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(16px, 4.2cqw, 30px);
}
#method .ws { display: grid; gap: 7px; }
#method .ws__hd { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0; padding: 0 2px; }
#method .ws__hd b { font: 400 clamp(11px, 2.1cqw, 13px)/1.2 var(--f-mono); color: rgb(var(--hw-wh) / .74); }
#method .ws__hd span { font: 600 12.5px/1.2 var(--f-ui); color: rgb(var(--hw-wh) / .66); }
#method .ws:last-child .ws__hd span { color: var(--ice); }
#method .ws__rows { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
#method .wr {
  display: grid; grid-template-columns: 4.1em 7.1em minmax(0, 1fr) auto; align-items: center; gap: .75em;
  min-height: 2.65em; padding: 0 .75em; border-radius: 8px; white-space: nowrap;
  font: 400 clamp(11px, 2.05cqw, 13.5px)/1 var(--f-mono); color: rgb(var(--hw-wh) / .74);
  background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
#method .wr__ix { font-weight: 400; color: rgb(var(--hw-wh) / .48); }
#method .wr__act { overflow: hidden; }
#method .wr__tag { font-style: normal; font-weight: 700; font-size: .92em; }
#method .wr--canary { color: var(--lime); background: rgb(var(--lime-rgb) / .07); box-shadow: inset 0 0 0 1.5px var(--lime); }
#method .wr--canary .wr__ix { color: rgb(var(--lime-rgb) / .7); }
#method .wr--canary .wr__tag { padding: .32em .5em; border-radius: 5px; background: var(--lime); color: var(--ink); }
#method .wr--front, #method .wr--back { color: rgb(var(--hw-bite-hi)); background: rgb(var(--pink-rgb) / .1); box-shadow: inset 0 0 0 1px rgb(var(--pink-rgb) / .72); }
#method .wr--front .wr__ix, #method .wr--back .wr__ix { color: rgb(var(--hw-bite-hi) / .7); }
#method .wr--front .wr__tag, #method .wr--back .wr__tag { padding: .32em .5em; border-radius: 5px; background: var(--pink); color: var(--ink); }
#method .watch__chip {
  position: absolute; left: 0; top: 0; z-index: 2; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  font: 700 12px/1 var(--f-mono); color: var(--ink); background: var(--hw-ice-hi); box-shadow: 0 0 18px -4px rgb(var(--ice-rgb) / .7);
  white-space: nowrap; transform-origin: 0 50%;
}
#method .watch__bite { /* placed by JS: under the bracket (wide), on the canary's card (phones) */
  position: absolute; left: 0; top: 0; z-index: 2; padding: .3em .55em .26em; border-radius: 6px;
  font: 700 clamp(14px, 3.3cqw, 26px)/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase;
  color: var(--pink); box-shadow: inset 0 0 0 2px var(--pink), 0 0 26px -6px rgb(var(--pink-rgb) / .8);
  background: rgb(var(--pink-rgb) / .08); transform: rotate(-8deg); transform-origin: 60% 50%;
}
@container (max-width: 560px) { /* the signer column only fits wider frames; keep room for the bracket and its chip */
  #method .wr__sig { display: none; }
  #method .wr { grid-template-columns: 4.2em minmax(0, 1fr) auto; }
  #method .watch__slots { right: 23.5%; }
}
/* compact frames (narrow or short: phones, landscape phones): the three slots side by side,
   legs and canary only. JS sets .is-compact from the frame's width AND height. */
#method .hv--4.is-compact .watch__cap { top: 10px; right: 104px; letter-spacing: .04em; line-height: 1.3; }
#method .hv--4.is-compact .watch__slots {
  left: 3%; right: 3%; top: 48px; bottom: auto;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto; gap: 0 6px;
}
#method .hv--4.is-compact .ws { grid-row: span 2; display: grid; grid-template-rows: subgrid; gap: 3px; padding: 4px 5px 5px; border-radius: 8px; }
#method .hv--4.is-compact .ws__hd { display: grid; align-content: start; gap: 1px; padding: 0; }
#method .hv--4.is-compact .ws__hd b { font-size: 10.5px; }
#method .hv--4.is-compact .ws__hd span { font-size: 10px; line-height: 1.15; }
#method .hv--4.is-compact .ws__rows { align-content: start; }
#method .hv--4.is-compact .wr--tx { display: none; }
#method .hv--4.is-compact .wr { grid-template-columns: minmax(0, 1fr); gap: 2px; min-height: 0; padding: 3px 5px 4px; white-space: normal; font-size: 10.5px; line-height: 1.2; }
#method .hv--4.is-compact .wr .wr__ix, #method .hv--4.is-compact .wr .wr__sig, #method .hv--4.is-compact .wr__act > .wr__v { display: none; }
#method .hv--4.is-compact .wr__tag { order: -1; justify-self: start; font-size: 10.5px; }
#method .hv--4.is-compact .wr--canary .wr__tag, #method .hv--4.is-compact .wr--front .wr__tag, #method .hv--4.is-compact .wr--back .wr__tag { padding: .2em .45em; }
#method .hv--4.is-compact .wr__act > span { display: block; white-space: nowrap; }
#method .hv--4.is-compact .watch__chip { height: 20px; font-size: 11px; transform-origin: 50% 50%; }
#method .hv--4.is-compact .watch__bite { font-size: 13px; }
@container (max-width: 340px) { /* 360px phones: every amount stays whole */
  #method .hv--4.is-compact .watch__cap { top: 8px; }
  #method .hv--4.is-compact .watch__slots { left: 2%; right: 2%; top: 42px; gap: 0 4px; }
  #method .hv--4.is-compact .ws { padding: 3px 3px 4px; }
  #method .hv--4.is-compact .ws__hd span { line-height: 1.1; }
  #method .hv--4.is-compact .wr { padding: 3px 4px; line-height: 1.12; }
  #method .hv--4.is-compact .watch__chip { height: 18px; }
}

/* 06 · PUBLISH — receipt, envelope, wax seal */
#method .pub__slot {
  position: absolute; left: 5%; width: 62%; top: 7%; height: clamp(8px, 1.6cqw, 12px); border-radius: 6px;
  background: var(--hw-slot); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .12), 0 1px 0 rgba(255, 255, 255, .06);
}
/* the receipt prints top-down in line steps: JS drives a two-level mask (printed / pre-roll ghost) */
#method .pub__clip { position: absolute; left: 7%; width: 58%; top: calc(7% + clamp(4px, .8cqw, 6px)); bottom: 4%; overflow: hidden; }
#method .pub__paper {
  position: relative; padding: .95em 1em 1.45em; color: rgb(var(--hw-paper-ink)); background: var(--hw-paper);
  font: 400 clamp(11px, 2.15cqw, 14px)/1.5 var(--f-mono); font-variant-numeric: tabular-nums;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - .7em), 95% 100%, 90% calc(100% - .7em), 85% 100%, 80% calc(100% - .7em), 75% 100%, 70% calc(100% - .7em), 65% 100%, 60% calc(100% - .7em), 55% 100%, 50% calc(100% - .7em), 45% 100%, 40% calc(100% - .7em), 35% 100%, 30% calc(100% - .7em), 25% 100%, 20% calc(100% - .7em), 15% 100%, 10% calc(100% - .7em), 5% 100%, 0 calc(100% - .7em));
}
#method .pub__hd {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4em .8em; margin: 0; padding-bottom: .65em;
  border-bottom: 1px dashed rgb(var(--hw-paper-ink) / .35); font: 600 1em/1.3 var(--f-ui); letter-spacing: -0.005em;
}
#method .pub__hd .tag { min-height: 18px; }
#method .pub__note { margin: .5em 0 0; font: 600 max(12px, .86em)/1.3 var(--f-ui); color: rgb(var(--hw-paper-ink) / .66); }
#method .step.is-tight .pub__note { display: none; } /* tight frames: the note sits in the step's meta line instead */
#method .step__note { margin-left: auto; text-align: right; color: var(--muted-2); }
#method .step:not(.is-tight) .step__note { display: none; }
#method .pub__rows { margin: .55em 0 0; display: grid; gap: .2em; }
#method .pub__rows div { display: flex; justify-content: space-between; gap: 1em; }
#method .pub__rows dt { color: rgb(var(--hw-paper-ink) / .66); }
#method .pub__rows dd { margin: 0; font-weight: 700; }
#method .pub__ci { position: relative; height: 1.4em; margin: .7em 0 .2em; background: linear-gradient(90deg, rgb(var(--hw-paper-ink) / .14) 1px, transparent 1px) 0 0 / calc(100% / 6) 100%; }
#method .pub__five { position: absolute; top: -.15em; bottom: -.15em; width: 0; border-left: 1px dashed rgb(var(--hw-paper-ink) / .6); }
#method .pub__whisk { position: absolute; top: 50%; height: 2px; margin-top: -1px; background: var(--pink); transform-origin: 0 50%; }
#method .pub__whisk::before, #method .pub__whisk::after { content: ""; position: absolute; top: -.3em; width: 2px; height: calc(.6em + 2px); background: var(--pink); }
#method .pub__whisk::before { left: 0; }
#method .pub__whisk::after { right: 0; }
#method .pub__pt { position: absolute; top: 50%; width: .62em; height: .62em; margin: -.31em 0 0 -.31em; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px var(--hw-paper); }
#method .pub__axis { position: relative; display: flex; justify-content: space-between; margin: 0; color: rgb(var(--hw-paper-ink) / .62); font-size: max(10px, .86em); }
#method .pub__axis span[style] { position: absolute; transform: translateX(-50%); }
#method .pub__sig { display: flex; align-items: baseline; gap: .55em; margin: .75em 0 0; padding-top: .65em; border-top: 1px dashed rgb(var(--hw-paper-ink) / .35); white-space: nowrap; }
#method .pub__sig > span:first-child { color: rgb(var(--hw-paper-ink) / .62); }
#method .pub__sig code { font-size: 1em; font-weight: 700; letter-spacing: .01em; }
#method .pub__ex { font: 600 max(10px, .9em)/1 var(--f-ui); color: rgb(var(--hw-paper-ink) / .66); }
#method .pub__env {
  position: absolute; right: 6%; bottom: 15%; width: 35%; aspect-ratio: 1.45; perspective: 600px;
  will-change: transform, opacity;
}
#method .pub__body { /* graphite, a 1px rim light on the top-left edges, a soft shadow */
  position: absolute; inset: 0; border-radius: 7px;
  background: linear-gradient(155deg, var(--hw-env-1) 0%, var(--hw-env-2) 38%, var(--hw-env-3) 100%);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .2), inset -1px -1px 0 rgba(0, 0, 0, .45), 0 2px 4px rgba(0, 0, 0, .45), 0 26px 50px -18px rgba(0, 0, 0, .92);
}
#method .pub__body::before { /* lower fold lines */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background:
    linear-gradient(to top right, transparent calc(50% - .5px), rgba(255, 255, 255, .1) 50%, transparent calc(50% + .5px)) 0 100% / 50% 62% no-repeat,
    linear-gradient(to top left, transparent calc(50% - .5px), rgba(255, 255, 255, .1) 50%, transparent calc(50% + .5px)) 100% 100% / 50% 62% no-repeat;
}
#method .pub__flap {
  position: absolute; left: 0; right: 0; top: 0; height: 62%; transform-origin: 50% 0; transform: rotateX(0deg);
  background: linear-gradient(180deg, var(--hw-flap-1), var(--hw-flap-2) 70%, var(--hw-flap-3)); clip-path: polygon(0 0, 100% 0, 50% 100%);
  backface-visibility: visible;
}
#method .pub__seam { /* a thin accent light leaks from the flap seam */
  position: absolute; left: 0; top: 0; width: 100%; height: 62%; overflow: visible; opacity: .55;
  fill: none; stroke: var(--lime); stroke-width: 1.2; vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px rgb(var(--lime-rgb) / .9)) drop-shadow(0 0 8px rgb(var(--lime-rgb) / .45));
}
#method .pub__seam path { vector-effect: non-scaling-stroke; }
#method .pub__seal { /* wax seal: 14 days to respond */
  position: absolute; left: 50%; top: 62%; width: 30%; aspect-ratio: 1; margin: -15% 0 0 -15%; border-radius: 50%;
  display: grid; place-content: center; justify-items: center; gap: .1em; color: var(--ink);
  background: radial-gradient(circle at 36% 30%, var(--hw-seal-hi) 0%, var(--lime) 36%, var(--hw-seal-lo) 66%, var(--hw-seal-lo2) 100%);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, .5), inset 0 -3px 5px rgb(var(--hw-seal-deep) / .5), inset 0 0 0 3px rgb(var(--hw-seal-rim) / .5),
    0 3px 6px rgba(0, 0, 0, .45), 0 0 24px rgb(var(--lime-rgb) / .45);
  transform: rotate(-8deg);
}
#method .pub__seal b { font: 700 clamp(13px, 3.4cqw, 28px)/.86 var(--f-display); letter-spacing: -0.05em; }
#method .pub__seal i { font: 600 10px/1 var(--f-ui); font-style: normal; letter-spacing: .02em; }
#method .pub__label {
  position: absolute; left: -30%; right: -30%; top: calc(100% + .8em); margin: 0; text-align: center;
  font: 600 12px/1.35 var(--f-ui); color: rgb(var(--hw-wh) / .72);
}
#method .pub__label b { font-weight: 600; color: var(--lime); }
@container (max-width: 560px) { /* small frames: receipt and envelope must not collide */
  #method .pub__slot { width: 60%; }
  #method .pub__clip { width: 57%; }
  #method .pub__env { right: 4%; bottom: 25%; width: 33%; }
  #method .pub__label { left: -12%; right: -12%; }
  #method .pub__label b, #method .pub__label span:last-child { display: block; }
  #method .pub__sep { display: none; }
}
@container (max-width: 380px) { /* phones: the seal already says 14 days; the interval stays as numbers */
  #method .pub__ci, #method .pub__axis { display: none; }
  #method .pub__env { bottom: 30%; }
  #method .pub__label { left: auto; right: 0; text-align: right; white-space: nowrap; }
  #method .pub__label span:last-child { display: none; }
}

/* ---------- 5 · Cross-reference in step copy (02 → What could fool us) ---- */
#method .step__text a {
  color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
  text-decoration-color: color-mix(in srgb, var(--lime) 70%, transparent); transition: color .3s ease;
}
@media (hover: hover) and (pointer: fine) { #method .step__text a:hover { color: var(--lime); } }

/* ---------- 6 · Phones: no overlay type under 12px ------------------------ */
@media (max-width: 480px) {
  #method .hv--4.is-compact .ws__hd b,
  #method .hv--4.is-compact .ws__hd span,
  #method .hv--4.is-compact .wr,
  #method .hv--4.is-compact .wr__tag,
  #method .hv--4.is-compact .watch__chip { font-size: 12px; }
  /* room for 12px amounts: "0.731942 SOL" and "→ 40,921 TKN" stay whole down to 360px */
  #method .hv--4.is-compact .watch__slots { left: 2%; right: 2%; column-gap: 4px; }
  #method .hv--4.is-compact .ws { padding-left: 2px; padding-right: 2px; }
  #method .hv--4.is-compact .wr { padding-left: 3px; padding-right: 3px; letter-spacing: -0.02em; }
  #method .pub__ex { font-size: max(12px, .9em); }
  #method .pub__seal { width: 40%; margin: -20% 0 0 -20%; }
  #method .pub__seal b { font-size: 16px; }
  #method .pub__seal i { font-size: 12px; }
}
