/* ============================================================
   BEDROCK — Strata 4–6 : Assumptions · Transformation · Reference Frames
   ============================================================ */
const { Eyebrow: Eb, Pull: Pq, Stanza: St, Cards: Cd, Reveal: Rv, Prompts: Pr,
        RankList: Rk, ScoreRow: Sr, Capture: Cp, SensoryLoop } = window;

/* ---------- STRATUM 4 — ASSUMPTIONS ---------- */
function StratumAssumptions() {
  return (
    <>
      <p className="stratum-lede beat-in">
        The goal is not to prove the whole company right. It is to discover, cheaply and
        quickly, <strong>which assumptions must be true</strong> for Looking Glass to become
        fundable, buildable, and focused.
      </p>

      <Pq sig>The seed round funds learning, not certainty.</Pq>

      <hr className="hr" />

      <Eb>The critical assumptions</Eb>
      <div className="spacer-s" />
      <Rv mono="learning agenda" label="Eight assumptions worth testing first">
        <Cd cols={2} items={[
          { k: "A1", t: "Biological touch is the real breakthrough", d: "Counter: conventional haptics may be good enough. Test: a 3-way discrimination task — conventional vs. construct vs. none." },
          { k: "A2", t: "The first proof is a sensory-loop demo, not a robot", d: "Counter: investors may want a full system. Test: show three demo storyboards to 10 advisors + 10 investors." },
          { k: "A3", t: "Integration is the core technical risk", d: "Counter: one layer may be the true bottleneck. Test: a dependency map scored by independent experts." },
          { k: "A6", t: "Beachhead chosen by proof speed, not TAM", d: "Counter: investors may demand a big market on day one. Test: score 5 beachheads on speed-to-proof." },
          { k: "A7", t: "Medical may be too regulatory-heavy first", d: "Counter: prosthetics may be the most fundable story anyway. Test: a regulatory-pathway scan by use case." },
          { k: "A9", t: "The story can be made investor-legible", d: "Counter: it may still sound too speculative. Test: 15 “no pitch, just reaction” investor calls." },
          { k: "A11", t: "Seed funds a proof package, not a product", d: "Counter: investors may expect a prototype or LOIs. Test: ask 20 investors what proof they'd underwrite." },
          { k: "A12", t: "One tactile task represents the platform", d: "Counter: a narrow demo may read as a trick. Test: map each candidate task to a painful operational job." },
        ]} />
      </Rv>

      <div className="spacer-m" />

      <Eb>Weigh the danger — score what scares you</Eb>
      <div className="prose"><p className="ash" style={{ marginTop: 8 }}>Rate how dangerous each assumption is if it turns out false. Highest score gets tested first.</p></div>
      <div className="spacer-s" />
      <div style={{ maxWidth: 640 }}>
        <Sr id="a-touch" label="Biological touch beats conventional haptics" />
        <Sr id="a-integration" label="The four layers integrate into one construct" />
        <Sr id="a-beachhead" label="A fast, sharp first beachhead exists" />
        <Sr id="a-legible" label="The story is legible to a seed investor" />
        <Sr id="a-reg" label="The first use case avoids heavy regulation" />
      </div>

      <hr className="hr hr-ink" />
      <Eb><span className="sig">●</span> &nbsp;FOR THE ROOM</Eb>
      <div className="spacer-s" />
      <Pr items={[
        { kind: "Predict", q: "Which assumption feels most dangerous?" },
        { kind: "Interact", q: "Which one would you test first — and how, this month?" },
        { kind: "What if", q: "What if your favorite assumption turns out false?" },
      ]} />

      <Cp id="assumptions" label="Which assumption do we test first?" placeholder="The most dangerous assumption is… we'll convert it to knowledge by…" />
    </>
  );
}

/* ---------- STRATUM 5 — TRANSFORMATION ---------- */
function StratumTransformation() {
  return (
    <>
      <p className="stratum-lede beat-in">
        A constructor does not merely describe a future state. It <strong>reliably causes the
        transformation</strong>. So the real question is not what the system is — it is what,
        exactly, is being changed.
      </p>

      <hr className="hr" />

      <Eb>The transformations sought</Eb>
      <div className="spacer-s" />
      <Cd cols={2} items={[
        { k: "the operator", t: "Remote controller → embodied operator", d: "From interpreting cues to feeling meaningful touch." },
        { k: "the contact", t: "Raw sensor data → actionable tactile state", d: "Pressure, slip, texture, edge — distinguishable, trustworthy." },
        { k: "the wearable", t: "Inert hardware → living sensory medium", d: "A biointerface that returns biological sensation." },
        { k: "the intelligence", t: "Signal processing → interpreted touch", d: "On-body inference that classifies touch in context, below threshold." },
        { k: "the market", t: "Many possible uses → one fundable wedge", d: "From platform sprawl to a single sharp beachhead." },
        { k: "the investor", t: "Speculative science → staged confidence", d: "From awe to belief, one proof at a time." },
      ]} />

      <hr className="hr" />

      <Eb><span className="sig">●</span> &nbsp;THE SMALLEST UNIT OF EMBODIMENT</Eb>
      <div className="prose"><p className="ash" style={{ marginTop: 8 }}>
        One contact event, transformed into one felt sensation — and back into action. Send a
        contact through the loop. Tune the latency. Watch where “information” becomes “sensation.”
      </p></div>
      <SensoryLoop />

      <Pq>Project Juvet's first job is to transform touch from data into sensation.</Pq>

      <hr className="hr hr-ink" />
      <Eb><span className="sig">●</span> &nbsp;FOR THE ROOM</Eb>
      <div className="spacer-s" />
      <Pr items={[
        { kind: "Predict", q: "What is really being transformed here — the robot, the operator, or the relationship?" },
        { kind: "Interact", q: "Draw the path from contact to sensation. Which step is most likely to fail?" },
        { kind: "What if", q: "If the robot stayed the same but the operator changed, would that still be valuable?" },
      ]} />

      <Cp id="transformation" label="Name the one transformation that matters most." placeholder="The transformation we're actually selling is…" />
    </>
  );
}

/* ---------- STRATUM 6 — REFERENCE FRAMES ---------- */
const RF = [
  { n: "RF1", t: "Embodiment Gap", d: "Humans can see and control through robots. They cannot feel through them. Everything else exists because of this gap." },
  { n: "RF2", t: "Biological Touch Return", d: "Not better haptics. Robotic contact translated into biologically meaningful sensation." },
  { n: "RF3", t: "Sensory Loop", d: "The smallest unit of proof: contact → sense → transmit → infer → perceive → act." },
  { n: "RF4", t: "Constructor", d: "The thing that reliably causes transformation: remote control → embodied operation." },
  { n: "RF5", t: "Belief Formation", d: "Technology alone does not create adoption. Belief creates adoption." },
  { n: "RF6", t: "Proof", d: "The smallest evidence package that changes belief. The bridge from possibility to credibility." },
  { n: "RF7", t: "Beachhead", d: "The first environment where proof matters: first use case, first customer, first battlefield." },
  { n: "RF8", t: "Platform", d: "The long aspiration: a reusable touch layer across many robotic systems." },
  { n: "RF9", t: "Discovery-Driven Learning", d: "The operating system for uncertainty: assumptions → experiments → knowledge." },
  { n: "RF10", t: "Strategic Crux", d: "The highest-leverage solvable challenge. For us: prove one sensory loop." },
];
const CHAIN = ["Embodiment Gap", "Biological Touch Return", "Sensory Loop", "Proof", "Belief", "Beachhead", "Platform"];

function StratumReferenceFrames() {
  return (
    <>
      <p className="stratum-lede beat-in">
        Beneath the words sit the mental models that organize the whole conversation. Name them,
        and the thinking becomes navigable. <strong>The deepest one is not robotics, neurotech,
        or fundraising. It is embodiment.</strong>
      </p>

      <hr className="hr" />

      <Eb>Ten reference frames</Eb>
      <div className="spacer-s" />
      <Rv mono="anchors" label="The conceptual anchors, one by one">
        <Cd cols={2} items={RF.map((r) => ({ k: r.n, t: r.t, d: r.d }))} />
      </Rv>

      <div className="spacer-m" />

      <Eb>The integrated graph</Eb>
      <div className="prose"><p className="ash" style={{ marginTop: 8 }}>The frames are not a list. They are a sequence — each one earns the next.</p></div>
      <div className="spacer-s" />
      <div className="chain">
        {CHAIN.map((c, i) => (
          <React.Fragment key={c}>
            <div className={"chain-node" + (i === 0 ? " first" : "") + (i === CHAIN.length - 1 ? " last" : "")}>
              <span className="chain-i">{String(i + 1).padStart(2, "0")}</span>
              <span className="chain-t">{c}</span>
            </div>
            {i < CHAIN.length - 1 && <span className="chain-link" aria-hidden="true">↓</span>}
          </React.Fragment>
        ))}
      </div>
      <div className="prose"><p className="ash mono" style={{ fontSize: 12, letterSpacing: "0.08em", textTransform: "uppercase", marginTop: 16 }}>Held up by: constructor · discovery-driven learning · strategic crux</p></div>

      <Pq sig>The sensory loop is the first proof. The proof creates belief. Belief creates the company.</Pq>

      <hr className="hr hr-ink" />
      <Eb><span className="sig">●</span> &nbsp;FOR THE ROOM</Eb>
      <div className="spacer-s" />
      <Pr items={[
        { kind: "Predict", q: "Why do some technologies never become companies?" },
        { kind: "Interact", q: "Think of a technology you admired but never adopted. What was missing?" },
        { kind: "What if", q: "What changes the moment belief exceeds curiosity?" },
      ]} />

      <Cp id="reference" label="Which frame is doing the most work for us right now?" placeholder="The model we keep returning to is…" />
    </>
  );
}

window.STRATA_B = { StratumAssumptions, StratumTransformation, StratumReferenceFrames };
