/* ============================================================
   PROFIT FORGE — landing scenes.
   The product's own hero artefact and idea scenes; the shared
   grammar (hold/stage, ritual, panels) lives in foundry-scene.css.
   Loaded only on this site's front page (inc/enqueue.php).
   Fail-safe: static markup IS the end state — the scrub in
   assets/js/scenes/profitforge.js only replays how it got there.
   ============================================================ */

/* ============================================================
   SCENE 4 «Zero-egress» — the sealed contour
   ============================================================ */
.pf-eg { max-width: 780px; margin-inline: auto; color: var(--fdry-ink-soft, #A7AEC8); }
.pf-eg__svg { display: block; width: 100%; height: auto; }
.pf-eg__t { font: 500 15px "IBM Plex Mono", "JetBrains Mono", monospace; fill: var(--fdry-ink-soft, #A7AEC8); }
.pf-eg__t--head { fill: var(--accent-light, #C98A4B); letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.pf-eg__t--lic { fill: #4C9C77; font-size: 13px; }

/* ============================================================
   HERO ARTEFACT — the receipt tape (hero-profitforge.php)
   ============================================================ */
.pfh {
  max-width: 440px; margin-inline: auto; overflow: hidden;
  /* The gutter and the pail are one measurement each, not three copies: the
     tape's padding, the catch row's padding and the drop's lane all hang off
     these two, so the lane stays centred on the pail whatever the panel does. */
  --pfh-gutter: 18px;
  --pfh-pail: 46px;
}
.pfh-tape {
  position: relative; padding: 8px var(--pfh-gutter) var(--pfh-gutter);
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
}
.pfh-line {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 11px 2px; font-size: .88rem; color: var(--fdry-ink-soft, #A7AEC8);
  border-bottom: 1px dashed rgba(255,255,255,.1);
}
.pfh-line b { font-variant-numeric: tabular-nums; color: var(--fdry-ink, #ECEEF7); }
/* The charge is the line the drop comes out of, so it is the line that reads
   as wrong; the rate card underneath is what it should have been. And since the
   drop comes out of this line, this line is what it is positioned against: a
   `top` measured from the tape drifts with every font metric, and the authored
   62px had the drop swelling across the digits of $5.90. */
.pfh-line--fee { position: relative; }
.pfh-line--fee b { color: #D96A5E; }
/* The rate card is a sub-line of the fee above it, and the indent is exactly
   the pail's width: that keeps the column above the pail clear all the way
   down, which is the lane the drop falls in. Full-bleed rows left no lane at
   all — the drop had to live at right:22px, on top of the fee's digits, and it
   then fell 340px wide of the bucket it was supposed to land in. */
.pfh-line--rate {
  border-bottom: none; padding-left: var(--pfh-pail);
  color: var(--fdry-ink-faint, #6B7299); font-size: .8rem;
}
.pfh-line--rate b { color: #4C9C77; }
.pfh-drop {
  position: absolute; top: calc(100% + 1px);
  /* Centred on the pail: the fee row's padding box and the catch row's content
     both start one --pfh-gutter in, so half the pail minus half the drop is the
     lane. 6px is half of the width below. */
  left: calc(var(--pfh-pail) / 2 - 6px);
  width: 12px; height: 16px;
  background: #D96A5E; border-radius: 46% 46% 58% 58% / 38% 38% 66% 66%;
  opacity: 0; transform-origin: 50% 0%; will-change: transform, opacity;
  filter: drop-shadow(0 0 6px rgba(217,106,94,.4));
}
/* Pail, amount, caption — the pail standing on the amount's baseline (row 1,
   end-aligned, the amount's line box trimmed to its own height) and the caption
   hung under the amount on the same left edge. */
.pfh-catch {
  display: grid; grid-template-columns: auto 1fr; align-items: end;
  gap: 4px 14px; padding: 14px var(--pfh-gutter); border-top: 1px solid rgba(255,255,255,.08);
}
.pfh-bucket { grid-area: 1 / 1; color: var(--accent, #C98A4B); }
.pfh-bucket svg { display: block; width: var(--pfh-pail); height: var(--pfh-pail); }
/* A box its own size, not the whole 1fr track. The pulse in profitforge.js
   scales this element; as a stretched grid item it was 342px wide, so scaling
   it 1.22 from its centre swung the «+» 24px over the pail on every cycle —
   that was the crooked price. */
.pfh-catch__sum {
  grid-area: 1 / 2; justify-self: start;
  font-size: 1.5rem; line-height: 1; color: #4C9C77;
}
.pfh-catch__cap { grid-area: 2 / 2; }

/* ============================================================
   SCENE 1 «Течь» — the pipe, six hands of leaking, the bucket
   ============================================================ */
.pf-rig { display: grid; gap: clamp(14px, 2vh, 26px); }
.pf-pipe {
  position: relative; height: 64px;
}
.pf-pipe__line {
  position: absolute; left: 2%; right: 2%; top: 30px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg,
      color-mix(in srgb, var(--accent) 20%, transparent),
      color-mix(in srgb, var(--accent) 60%, transparent) 12%,
      color-mix(in srgb, var(--accent) 60%, transparent) 88%,
      color-mix(in srgb, var(--accent) 20%, transparent));
}
.pf-node { position: absolute; left: var(--at, 50%); top: 18px; transform: translateX(-50%); }
.pf-node__label {
  position: absolute; left: 50%; top: 34px; transform: translateX(-50%);
  font-style: normal; font-size: .66rem; text-transform: uppercase; letter-spacing: .12em;
  white-space: nowrap; color: var(--fdry-ink-faint, #6B7299);
}
.pf-plug {
  width: 26px; height: 26px; border-radius: 50%; display: block;
  border: 2px solid #4C9C77; background: color-mix(in srgb, #4C9C77 18%, transparent);
  position: relative;
}
/* One handle, not a cross: a valve reads as «turned shut», a plus sign reads
   as «add». The JS turns it ninety degrees when the leak stops. */
.pf-plug::before { content: ""; position: absolute; left: 50%; top: 50%; width: 15px; height: 3px;
  margin: -1.5px 0 0 -7.5px; background: #4C9C77; border-radius: 2px; }
.pf-drop {
  position: absolute; left: 50%; top: 20px; margin-left: -6px;
  width: 12px; height: 16px;
  background: #D96A5E; border-radius: 46% 46% 58% 58% / 38% 38% 66% 66%;
  opacity: 0; will-change: transform, opacity; transform-origin: 50% 0%;
  filter: drop-shadow(0 0 6px rgba(217,106,94,.4));
}
/* The trough the drops land in — it drains right, into the bucket. */
.pf-trough { position: relative; height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.pf-trough i {
  position: absolute; inset: 0 auto 0 0; display: block; width: 100%;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #D96A5E, var(--accent-light, #C98A4B));
}
.pf-rig__grid { display: grid; grid-template-columns: 1.5fr .8fr; gap: clamp(22px, 3.4vw, 48px); align-items: center; }
.pf-cards { align-content: start; }
.pf-card { display: grid; gap: 9px; }
.pf-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pf-card header b { font-size: 1.02rem; color: var(--fdry-ink, #ECEEF7); }
.pf-card__ev {
  display: grid; grid-template-columns: 66px minmax(0, 1fr) auto; gap: 12px; align-items: baseline;
  margin: 0; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08);
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace; font-size: .82rem;
  color: var(--fdry-ink-soft, #A7AEC8);
}
.pf-card__note { min-width: 0; }
.pf-leakv { color: #D96A5E; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-card__sum { margin: 0; }
.pf-side { display: grid; gap: 16px; justify-items: start; }
.pf-bucket { display: grid; justify-items: center; gap: 4px; color: var(--accent, #C98A4B); }
.pf-bucket svg { width: clamp(64px, 9vh, 92px); height: clamp(64px, 9vh, 92px); }
.pf-bucket__sum { font-size: clamp(1.4rem, 2.4vw, 1.9rem); color: var(--fdry-ink, #ECEEF7); }
/* The product's own mono everywhere a number is quoted: the design doc pairs
   Spectral with IBM Plex Mono, and a receipt in a different mono reads as a
   different document. */
.pf-scene .fgi-num, .pf-rate .fgi-num, .pf-audit .fgi-num,
.pfh .fgi-num, .pfh .fgi-cap {
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
}
/* …including the shared panel head, which hard-codes JetBrains. On this
   landing that put two monos inside one panel — «RECEIPT #11002» in one face
   and every row beneath it in another. It shows in the letterforms, and it is
   the house rule («one mono per landing») broken in the very panel a reader
   looks at first. */
.pfh .fgi-panel__head, .pf-rate .fgi-panel__head, .pf-audit .fgi-panel__head,
.pf-scene .fgi-cap, .pf-rate .fgi-cap, .pf-audit .fgi-cap,
.pfh code, .pf-scene code, .pf-rate code, .pf-audit code {
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
}
.pf-bucket__cap { font-size: .74rem; color: var(--fdry-ink-faint, #6B7299); }
.pf-bucket.is-found .pf-bucket__sum { color: #4C9C77; }
.pf-side__math { color: var(--fdry-ink-soft, #A7AEC8); font-size: .88rem; line-height: 1.58; margin: 0; }
.pf-side__math .fgi-num { color: var(--accent-light, #C98A4B); }
@media (max-width: 899px) {
  .pf-rig__grid { grid-template-columns: 1fr; }
  .pf-node__label { display: none; }
}

/* ============================================================
   SCENE 2 «Тариф» — charged against agreed, and the silent rule
   ============================================================ */
.pf-rate__grid { grid-template-columns: 1.1fr .9fr; }
.pf-gauge__body { display: grid; gap: 16px; padding: clamp(16px, 2.2vw, 24px); }
.pf-bar { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: baseline; }
.pf-bar__k { font-size: .84rem; color: var(--fdry-ink-soft, #A7AEC8); }
.pf-bar b { font-size: 1.02rem; }
.pf-bar__t {
  grid-column: 1 / -1; display: block; height: 12px; border-radius: 4px;
  background: rgba(255,255,255,.07); overflow: hidden;
}
.pf-bar__t em { display: block; height: 100%; width: var(--w, 100%); transform-origin: 0 50%; background: #D96A5E; }
.pf-bar--agreed .pf-bar__t em { background: #4C9C77; }
.pf-bar--agreed b { color: #4C9C77; }
.pf-gauge__delta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0;
  padding-top: 12px; border-top: 1px dashed rgba(255,255,255,.1);
  font-size: .86rem; line-height: 1.55; color: var(--fdry-ink-soft, #A7AEC8);
}
.pf-gauge__delta b { font-size: 1.24rem; color: #D96A5E; }
.pf-rate__side { display: grid; gap: 14px; align-content: center; }
.pf-state {
  position: relative; display: grid; gap: 7px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.03);
}
.pf-state__row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 0; font-size: .92rem; color: var(--fdry-ink, #ECEEF7); }
.pf-state__silent { font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace; font-size: .8rem; color: var(--fdry-ink-faint, #6B7299); }
.pf-state--on { border-color: color-mix(in srgb, #4C9C77 45%, transparent); background: color-mix(in srgb, #4C9C77 8%, transparent); }
.pf-state--on .pf-state__row b { color: #4C9C77; }
.pf-state__stamp { justify-self: start; }
.pf-rate__observe { margin: 0; font-size: .86rem; line-height: 1.6; color: var(--fdry-ink-soft, #A7AEC8); }
.pf-rate__observe b { display: block; color: var(--fdry-ink, #ECEEF7); margin-bottom: 4px; }

/* ============================================================
   SCENE 3 — the audit console and the report it unfolds into
   ============================================================ */
.pf-audit__panel { max-width: 1020px; }
.pf-audit__body { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(20px, 3vw, 40px); padding: clamp(18px, 2.4vw, 26px); }
.pf-audit__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pf-find__btn {
  appearance: none; width: 100%; cursor: pointer; font: inherit; text-align: left;
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px 12px;
  align-items: baseline; padding: 11px 14px; border-radius: 10px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08);
  color: var(--fdry-ink-soft, #A7AEC8);
  transition: border-color 120ms cubic-bezier(.2,.6,.2,1), background-color 120ms cubic-bezier(.2,.6,.2,1);
}
.pf-find__btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pf-find__btn:focus-visible { outline: 3px solid var(--accent-light, #C98A4B); outline-offset: 2px; }
.pf-find__btn[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.pf-find__name { min-width: 0; color: var(--fdry-ink, #ECEEF7); font-size: .94rem; }
.pf-find__rule { font-size: .64rem; padding: 3px 8px; }
.pf-find__sum { color: #D96A5E; font-size: .96rem; white-space: nowrap; }
.pf-audit__tally { grid-column: 2; grid-row: 1; display: grid; gap: 5px; align-content: start; }
.pf-audit__tally .fgi-big { color: #4C9C77; }
.pf-audit__median { font-size: .84rem; line-height: 1.55; color: var(--fdry-ink-soft, #A7AEC8); }
.pf-doc {
  grid-column: 1 / -1; padding-top: 16px; border-top: 1px dashed rgba(255,255,255,.11);
}
.pf-doc__h { margin: 0 0 10px; font-size: 1.04rem; color: var(--fdry-ink, #ECEEF7); }
.pf-doc__ev { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 5px; }
.pf-doc__ev li {
  display: grid; grid-template-columns: 66px minmax(0, 1fr) auto; gap: 12px; align-items: baseline;
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace; font-size: .78rem;
  color: var(--fdry-ink-soft, #A7AEC8); padding: 7px 10px; border-radius: 8px;
  background: rgba(255,255,255,.03);
}
.pf-doc__id { color: var(--fdry-ink-faint, #6B7299); }
.pf-doc__note { min-width: 0; }
.pf-doc__ev b { color: #D96A5E; white-space: nowrap; }
.pf-doc__fix { margin: 0; font-size: .88rem; line-height: 1.62; color: var(--fdry-ink-soft, #A7AEC8); max-width: 84ch; }
.pf-doc__fix b { color: #4C9C77; margin-right: 6px; }
@media (max-width: 899px) {
  .pf-audit__body { grid-template-columns: 1fr; }
  .pf-audit__tally { grid-column: 1; grid-row: auto; }
  .pf-find__btn { grid-template-columns: minmax(0, 1fr) auto; }
  .pf-find__rule, .pf-find__orders { display: none; }
}

/* Phone: one column (see the note in clearwayforge.css). */
@media (max-width: 899px) {
  .pf-grid { grid-template-columns: 1fr; }
}
