/* ---------------------------------------------------------------
   Field operations case demo. A tool pitch in one loop: a native
   tablet app for field technicians, one hard problem and one
   feature per beat. Everything is laid out at a fixed design size
   of 1440x900 inside .fo-fit, which is scaled to the frame width.
   Only .fo-cam (scale + translate) moves for the pushes, plus the
   small state layers (opacity, transform, stroke-dashoffset).
   No filters, nothing glows, no perspective.
   --------------------------------------------------------------- */
.demo[data-demo="case-fieldops"] { background: var(--ink-0); }

.fo-fit {
  position: absolute; top: 0; left: 0; width: 1440px; height: 900px;
  transform-origin: 0 0; background-color: var(--ink-0);
  background-image:
    linear-gradient(rgba(233, 230, 223, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 230, 223, 0.035) 1px, transparent 1px);
  background-size: 48px 48px; background-position: 0 6px;
}
.fo-fit * { box-sizing: border-box; }
.fo-fit p, .fo-fit h4 { margin: 0; }
.fo-fit svg { display: block; }

.fo-cam {
  position: absolute; top: 0; left: 0; width: 1440px; height: 900px;
  transform-origin: 0 0; overflow: hidden;
  font-family: var(--font-body); font-size: 16px; line-height: 1.4;
  font-weight: 400; color: var(--text-on-ink);
  -webkit-font-smoothing: antialiased;
}

/* kicker labels inside the app */
.fo-k {
  font-family: var(--font-display); font-size: 11.5px; font-weight: 500; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--text-on-ink-faint); white-space: nowrap;
}

/* --- the tablet: ink, a hairline, a camera dot -------------------- */
.fo-pad {
  position: absolute; left: 96px; top: 54px; width: 1248px; height: 792px;
  border-radius: 26px; background: var(--ink-0); border: 1px solid var(--ink-line-strong);
}
.fo-pad__cam {
  position: absolute; left: 50%; top: 6px; width: 7px; height: 7px; margin-left: -4px;
  border-radius: 50%; background: var(--ink-3); border: 1px solid var(--ink-line-strong);
}
.fo-scr {
  position: absolute; left: 19px; top: 19px; width: 1208px; height: 752px;
  border-radius: 10px; background: var(--ink-1); border: 1px solid var(--ink-line); overflow: hidden;
}

/* --- top bar ------------------------------------------------------- */
.fo-top {
  position: absolute; left: 0; top: 0; right: 0; height: 64px;
  display: flex; align-items: center; gap: 18px; padding: 0 28px;
  background: var(--ink-1); border-bottom: 1px solid var(--ink-line);
}
.fo-job { font-family: var(--font-mono); font-size: 13.5px; letter-spacing: 0.08em; color: var(--text-on-ink); white-space: nowrap; }
.fo-job b { font-weight: 400; color: var(--accent); }
.fo-site { font-size: 15px; color: var(--text-on-ink-muted); white-space: nowrap; }
.fo-top__r { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* stacked state pills: every state is a layer, opacity picks one */
.fo-pill { position: relative; height: 34px; }
.fo-pill--net { width: 132px; }
.fo-pill--sync { width: 142px; }
.fo-pill__s {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 12px; border: 1px solid var(--ink-line-strong); border-radius: 999px;
  font-size: 14.5px; color: var(--text-on-ink-muted); white-space: nowrap; opacity: 0;
}
.fo-pill__s--on { opacity: 1; }
.fo-pill__s--brass { border-color: var(--accent); color: var(--accent); }
.fo-pill__s--mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; }
.fo-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.fo-dot--off { background: transparent; border: 1.5px solid var(--text-on-ink-faint); }
.fo-avatar {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ink-line-strong);
  display: flex; align-items: center; justify-content: center; flex: none;
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.06em; color: var(--text-on-ink-muted);
}

/* --- rail: the job sequence ---------------------------------------- */
.fo-rail {
  position: absolute; left: 0; top: 64px; bottom: 0; width: 300px;
  background: var(--ink-1); border-right: 1px solid var(--ink-line);
}
.fo-rail__k { position: absolute; left: 28px; top: 26px; }
.fo-rail__ind {
  position: absolute; left: 0; top: 294px; width: 300px; height: 78px;
  background: rgba(233, 230, 223, 0.05); border-left: 2px solid var(--accent); pointer-events: none;
}
.fo-rail__line { position: absolute; left: 0; top: 0; width: 300px; height: 560px; pointer-events: none; }
.fo-rail__line line { stroke-width: 1.5; }
.fo-rail__line .fo-line--base { stroke: var(--ink-line-strong); }
.fo-rail__line .fo-line--brass { stroke: var(--accent); }
.fo-step { position: absolute; left: 0; width: 300px; height: 78px; display: flex; align-items: center; gap: 16px; padding-left: 20px; }
.fo-node { position: relative; width: 28px; height: 28px; flex: none; }
.fo-node__l {
  position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12.5px; opacity: 0;
}
.fo-node__l--next { background: var(--ink-1); border: 1px solid var(--ink-line-strong); color: var(--text-on-ink-faint); }
.fo-node__l--cur { background: var(--ink-1); border: 1.5px solid var(--accent); color: var(--accent); }
.fo-node__l--done { background: var(--accent); color: var(--ink-0); }
.fo-node__l--done svg { width: 14px; height: 14px; }
.fo-node__l--done path { fill: none; stroke: var(--ink-0); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fo-step__b { min-width: 0; }
.fo-step__n { font-family: var(--font-display); font-size: 17.5px; letter-spacing: 0.05em; line-height: 1.2; color: var(--text-on-ink); }
.fo-step__s { position: relative; height: 20px; margin-top: 2px; }
.fo-step__s span {
  position: absolute; left: 0; top: 0; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
  color: var(--text-on-ink-muted); white-space: nowrap; opacity: 0;
}
.fo-step__s span.fo-on { opacity: 1; }

/* --- main panes ----------------------------------------------------- */
.fo-main { position: absolute; left: 300px; top: 64px; right: 0; bottom: 0; }
.fo-pane { position: absolute; inset: 0; padding: 28px 32px 32px; opacity: 0; }
.fo-pane__h { display: flex; align-items: flex-end; gap: 18px; height: 58px; margin-bottom: 18px; }
.fo-pane__hb { min-width: 0; }
.fo-pane__t { font-family: var(--font-display); font-size: 28px; font-weight: 300; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.1; margin-top: 6px; color: var(--text-on-ink); }
.fo-count { position: relative; width: 150px; height: 22px; align-self: flex-end; margin-bottom: 4px; }
.fo-count span { position: absolute; left: 0; top: 0; font-family: var(--font-mono); font-size: 14px; color: var(--text-on-ink-muted); white-space: nowrap; opacity: 0; }
.fo-count span b { font-weight: 400; color: var(--text-on-ink); }
.fo-count span.fo-on { opacity: 1; }
.fo-panel { background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: 8px; }

/* offline toast, top right of the pane */
.fo-toast {
  position: absolute; right: 32px; top: 24px; z-index: 6; display: flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 16px 0 14px; border-radius: 8px; background: var(--ink-2);
  border: 1px solid var(--ink-line-strong); border-left: 2px solid var(--accent);
  font-size: 15px; color: var(--text-on-ink); white-space: nowrap; opacity: 0;
}
.fo-toast span { color: var(--text-on-ink-muted); }

/* checklist rows with 64 pt targets */
.fo-row { position: relative; display: flex; align-items: center; height: 84px; padding: 0 20px 0 24px; border-top: 1px solid var(--ink-line); }
.fo-row:first-child { border-top: 0; }
.fo-row__b { flex: 1; min-width: 0; }
.fo-row__l { font-size: 17px; line-height: 1.25; color: var(--text-on-ink); }
.fo-row__s { font-size: 15px; color: var(--text-on-ink-muted); margin-top: 3px; }
.fo-chk { position: relative; width: 64px; height: 64px; flex: none; margin-left: 16px; }
.fo-chk__off { position: absolute; inset: 0; border: 1.5px solid var(--ink-line-strong); border-radius: 14px; }
.fo-chk__on { position: absolute; inset: 0; border-radius: 14px; background: var(--accent); display: flex; align-items: center; justify-content: center; opacity: 0; }
.fo-chk__on svg { width: 30px; height: 30px; }
.fo-chk__on path { fill: none; stroke: var(--ink-0); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

/* pane foot: the one big button, and a note */
.fo-foot { display: flex; align-items: center; gap: 22px; margin-top: 24px; }
.fo-btn {
  position: relative; display: inline-flex; align-items: center; gap: 14px; height: 64px; padding: 0 28px; border-radius: 14px;
  background: var(--accent); color: var(--ink-0); font-family: var(--font-display); font-size: 15px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
}
.fo-btn i { font-style: normal; font-family: var(--font-body); font-size: 18px; line-height: 1; }
.fo-foot__n { font-family: var(--font-mono); font-size: 13px; color: var(--text-on-ink-muted); }

/* parts panel on the execute pane */
.fo-parts { display: flex; align-items: center; gap: 22px; height: 64px; padding: 0 24px; margin-top: 16px; }
.fo-parts__v { font-size: 16px; color: var(--text-on-ink); }
.fo-parts__q { margin-left: auto; font-family: var(--font-mono); font-size: 14px; color: var(--text-on-ink-muted); }

/* --- beat 2 callouts: drafting dimensions beside row 5's targets ---- */
.fo-callout { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; opacity: 0; }
.fo-ghost { position: absolute; right: 250px; top: 38px; width: 9px; height: 9px; border: 1px solid var(--text-on-ink-faint); }
.fo-dim { position: absolute; width: 1px; background: var(--accent); }
.fo-dim::before, .fo-dim::after { content: ""; position: absolute; left: -4px; width: 9px; height: 1px; background: var(--accent); }
.fo-dim::before { top: 0; }
.fo-dim::after { bottom: 0; }
.fo-dim--a { right: 267px; top: 38px; height: 9px; }
.fo-dim--b { right: 92px; top: 10px; height: 64px; }
.fo-dim__l { position: absolute; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--accent); white-space: nowrap; line-height: 1; }
.fo-dim__l--a { right: 279px; top: 37px; }
.fo-dim__l--b { right: 104px; top: 36px; }
.fo-dim__u { position: absolute; font-family: var(--font-display); font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-on-ink-faint); white-space: nowrap; line-height: 1; }
.fo-dim__u--a { right: 279px; top: 21px; }
.fo-dim__u--b { right: 104px; top: 18px; }

/* --- close pane: the report and the signature ---------------------- */
.fo-close { display: flex; gap: 24px; align-items: flex-start; }
.fo-rep { position: relative; flex: 1; min-width: 0; }
.fo-rep__r { display: flex; align-items: center; gap: 16px; min-height: 58px; padding: 8px 20px; border-top: 1px solid var(--ink-line); }
.fo-rep__r:first-child { border-top: 0; }
.fo-rep__k { width: 88px; flex: none; }
.fo-rep__v { flex: 1; min-width: 0; font-size: 16px; line-height: 1.35; color: var(--text-on-ink); }
.fo-rep__src { flex: none; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.fo-sig { position: relative; width: 260px; flex: none; }
.fo-sig__pad { position: relative; height: 190px; padding: 14px 18px; }
.fo-sig__pad svg { position: absolute; left: 0; top: 34px; width: 260px; height: 120px; }
.fo-sig__pad path { fill: none; stroke: var(--paper-1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fo-sig__rule { position: absolute; left: 18px; right: 18px; bottom: 42px; height: 1px; background: var(--ink-line-strong); }
.fo-sig__n { position: absolute; left: 18px; bottom: 16px; font-family: var(--font-mono); font-size: 13px; color: var(--text-on-ink-muted); }
.fo-sig .fo-btn { margin-top: 16px; width: 100%; justify-content: center; }
.fo-sent { margin-top: 12px; font-family: var(--font-mono); font-size: 13px; color: var(--text-on-ink-muted); white-space: nowrap; opacity: 0; }
.fo-sent b { font-weight: 400; color: var(--accent); }
.fo-stamp {
  position: absolute; left: 50%; top: 206px; margin-left: -92px; z-index: 5; padding: 8px 16px; border: 2px solid var(--accent); border-radius: 6px;
  font-family: var(--font-display); font-size: 17px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); background: var(--ink-2); transform: rotate(-8deg); opacity: 0;
}

/* --- the gloved hand and the ring ----------------------------------- */
.fo-glove { position: absolute; left: 0; top: 0; width: 40px; height: 48px; z-index: 30; opacity: 0; pointer-events: none; }
.fo-glove__h { fill: var(--paper-1); stroke: var(--ink-0); stroke-width: 1.5; stroke-linejoin: round; }
.fo-glove__s { fill: none; stroke: var(--ink-0); stroke-width: 1.2; opacity: 0.45; }
.fo-glove__c { fill: var(--accent); stroke: var(--ink-0); stroke-width: 1; }
.demo[data-demo="case-fieldops"] .fo-ring { border-radius: 20px; box-shadow: 0 0 0 3px var(--accent-soft); }

/* Captions sit over dense screens, so they carry the ink chip and the
   brass rule. A little larger than the base contract: this frame runs
   near full width on the case page, and the chip is the narration. */
.demo[data-demo="case-fieldops"] .demo__caption {
  background: rgba(7, 9, 12, 0.88);
  border-left: 2px solid var(--accent);
  padding: 8px 14px 8px 12px;
  border-radius: 2px;
  max-width: 64%;
  line-height: 1.5;
  font-size: clamp(0.8rem, 1.1cqw, 1rem);
  text-shadow: none;
}
.demo[data-demo="case-fieldops"] .demo__caption--r { left: auto; right: 4%; }
