HirModel's picture
Upload 5 files
af2fec7 verified
Raw
History Blame Contribute Delete
48.4 kB
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<title>Claim Mutation / HIR Encapsulation Simulator v0.0.4 — Equation Fidelity + Public Readiness Patch</title>
<meta property="og:title" content="Claim Mutation / HIR Encapsulation Simulator">
<meta property="og:description" content="A structural-resonance simulator for testing whether a retelling still preserves the original claim.">
<meta property="og:type" content="website">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Claim Mutation / HIR Encapsulation Simulator">
<meta name="twitter:description" content="A claim can keep its words and lose its meaning. Test whether a retelling preserved structural resonance.">
<meta name="description" content="A dual HIR/OAM pressure-form simulator for testing whether a carried claim remains structurally resonant with the original under transfer pressure."/>
<style>
:root{
--bg:#070a0f; --panel:#111827; --panel2:#0b111b; --ink:#f7f0df; --muted:#aeb8c8;
--gold:#f0c96a; --blue:#80b7ff; --green:#7adf98; --orange:#ffb35d; --red:#ff6b6b;
--purple:#c9a7ff; --line:#2d3a50; --soft:rgba(255,255,255,.045);
}
*{box-sizing:border-box}
body{
margin:0; font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
color:var(--ink);
background:
radial-gradient(circle at 18% 8%,rgba(240,201,106,.16),transparent 30%),
radial-gradient(circle at 84% 8%,rgba(128,183,255,.12),transparent 34%),
radial-gradient(circle at 50% 95%,rgba(201,167,255,.08),transparent 42%),
linear-gradient(180deg,#070a0f 0%,#0d121b 54%,#07090d 100%);
line-height:1.55;
}
.wrap{width:min(1200px,calc(100% - 32px));margin:0 auto}
header{padding:56px 0 28px;border-bottom:1px solid var(--line)}
section{padding:26px 0}
.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.16em;color:var(--gold);font-weight:950}
h1{font-size:clamp(38px,7vw,78px);letter-spacing:-.06em;line-height:.94;margin:12px 0}
h2{font-size:clamp(26px,4vw,42px);letter-spacing:-.04em;line-height:1;margin:0 0 12px}
h3{margin:18px 0 8px}.subtitle{font-size:clamp(18px,2.5vw,28px);color:#dce6f4;max-width:1000px}
.card{
background:linear-gradient(135deg,rgba(17,24,39,.96),rgba(14,21,34,.92));
border:1px solid var(--line); border-radius:24px; padding:22px; box-shadow:0 18px 45px rgba(0,0,0,.35)
}
.hero-grid{display:grid;grid-template-columns:1.08fr .92fr;gap:18px;margin-top:24px}
.grid{display:grid;grid-template-columns:.92fr 1.08fr;gap:18px;align-items:start}
.dual{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.muted{color:var(--muted)}.gold{color:var(--gold)}.green{color:var(--green)}.red{color:var(--red)}.blue{color:var(--blue)}
.equation,textarea{
font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
background:#070a0f; color:#f4d88e; border:1px solid #39475f; border-radius:16px; padding:14px; width:100%;
}
textarea{min-height:90px;color:#dfe7f3;resize:vertical}
.pillrow{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.pill,.btn{
border:1px solid #3a4a63;background:#101722;color:#dce6f4;border-radius:999px;
padding:8px 11px;font-size:12px;font-weight:850;cursor:pointer;text-decoration:none;
}
.btn.primary{border-color:rgba(240,201,106,.72);color:var(--gold)}
.btn:hover,.pill:hover{border-color:var(--gold)}
select{
width:100%;padding:12px;border-radius:14px;background:#080c13;color:var(--ink);border:1px solid #334057
}
.control{margin:13px 0}.control label{display:flex;justify-content:space-between;font-weight:780;color:#e7edf7}
input[type=range]{width:100%;accent-color:var(--gold)}
.toggle{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#0b111b;border:1px solid #31405a;border-radius:16px;padding:12px 14px;margin:10px 0}
.toggle span{font-weight:820}.toggle small{display:block;color:var(--muted);font-weight:500}input[type=checkbox]{width:22px;height:22px;accent-color:var(--gold)}
.state-label{font-size:12px;text-transform:uppercase;letter-spacing:.14em;color:var(--muted);font-weight:900}
.state{font-size:clamp(28px,4.2vw,48px);line-height:.94;letter-spacing:-.05em;font-weight:950;margin:7px 0 10px}
.drift .state{color:var(--orange)} .capsule .state{color:var(--green)}
.score-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.score{background:var(--soft);border:1px solid rgba(255,255,255,.09);border-radius:16px;padding:12px}
.score .label{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);font-weight:900}
.score .value{font-size:27px;font-weight:950;line-height:1;margin-top:5px}
.readbox{border-left:4px solid var(--gold);padding-left:14px;margin-top:14px;color:#dfe7f3}
.path{
position:relative;overflow:hidden;
background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.025));
border:1px solid rgba(255,255,255,.09);border-radius:22px;padding:18px
}
.path:before{
content:"";position:absolute;inset:auto -20% 0 -20%;height:2px;
background:linear-gradient(90deg,transparent,var(--gold),transparent);opacity:.35
}
.drift{border-color:rgba(255,179,93,.35)}
.capsule{border-color:rgba(122,223,152,.32)}
.flags{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.flag{border:1px solid #44556f;background:#0c121c;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:850}
.hot{border-color:rgba(255,107,107,.45);color:#ffd0d0;background:rgba(255,107,107,.10)}
.warn{border-color:rgba(255,179,93,.45);color:#ffe0bd;background:rgba(255,179,93,.10)}
.good{border-color:rgba(122,223,152,.45);color:#c9ffd8;background:rgba(122,223,152,.10)}
.compare{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center}
.arrow{font-size:42px;color:var(--gold);font-weight:950;text-align:center}
.route-card{background:#0b111b;border:1px solid var(--line);border-radius:18px;padding:16px}.route-card b{color:var(--gold)}.route-card p{color:var(--muted);font-size:13px}
.taxonomy{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
footer{border-top:1px solid var(--line);padding:24px 0 40px;color:var(--muted)}
@media(max-width:900px){.hero-grid,.grid,.dual,.compare,.taxonomy,.score-grid{grid-template-columns:1fr}.arrow{transform:rotate(90deg)}}
</style>
</head>
<body>
<header>
<div class="wrap">
<div class="eyebrow">Claim Mutation / HIR Encapsulation Simulator v0.0.4 — Equation Fidelity + Public Readiness Patch</div>
<h1>Did the claim stay in resonance?</h1>
<p class="subtitle">A claim can be repeated endlessly without being preserved.<br>Repetition without resonance is just noise.</p>
<div class="hero-grid">
<div class="card">
<h2>A claim survives transfer when the carried version remains structurally resonant with the original.</h2>
<p>Misinformation is not always invented. Sometimes resonance breaks during transfer.</p>
<p>A claim can keep its words and lose its meaning.</p>
<p><b class="gold">This simulator does not decide whether the claim is true.</b> It checks whether the carried version still preserves what was originally claimed.</p>
<div class="readbox" style="margin-top:20px;">
<b>HIR = Honesty, Integrity, Respect</b><br>
<small>
<b>Honesty</b> names the claim accurately.<br>
<b>Integrity</b> keeps source, context, uncertainty, scope, consent, and repair path attached.<br>
<b>Respect</b> prevents distortion, weaponized ambiguity, and erasure of limits.
</small>
</div>
<p class="readbox"><b>Public-readiness rule:</b> The HIR capsule does not make the claim true. It helps the carried version remain structurally resonant with the original by keeping source, context, uncertainty, scope, consent, and repair path attached.</p>
</div>
<div class="card">
<h2>Dual transfer paths</h2>
<div class="equation">S_claim = A_source × B_meaning − P_mutation</div>
<div class="equation">S_encapsulated = (A_source × B_meaning × (1 + C_HIR)) − P_mutation</div>
<p class="muted">The same starting claim runs through two paths: one exposed to mutation pressure, one carried inside an HIR capsule that adds resonance lift by keeping source, context, uncertainty, scope, consent, and repair path attached.</p><p class="muted"><b>v0.0.4 patch:</b> equation fidelity, resonance-lift explanation, and public-readiness language. Route logic, thresholds, presets, and shareable state unchanged.</p>
</div>
</div>
</div>
</header>
<main>
<section>
<div class="wrap card">
<h2>Explain this to me as…</h2>
<div class="pillrow">
<button class="btn primary" data-mode="plain">Plain words</button>
<button class="btn" data-mode="example">Example</button>
<button class="btn" data-mode="visual">Visual map</button>
<button class="btn" data-mode="math">Math</button>
<button class="btn" data-mode="symbol">Symbol</button>
</div>
<p id="translation" class="readbox">This tool checks whether a carried claim remains structurally resonant with the original after being summarized, quoted, clipped, reposted, cited, or argued against.</p>
</div>
</section>
<section>
<div class="wrap card">
<h2>Original claim → two transfer paths</h2>
<div class="compare">
<div>
<h3>Original Claim</h3>
<textarea id="originalClaim">The original claim includes source, context, uncertainty, scope, and a visible correction path.</textarea>
</div>
<div class="arrow"></div>
<div>
<h3>Carried / Public Version</h3>
<textarea id="carriedClaim">The retold version may preserve the original claim — or mutate under compression, speed, incentive, and status pressure.</textarea>
</div>
</div>
<p class="muted">v0.0.2 does not automatically analyze the text. The text fields preserve scenario context for the export report while the sliders model the resonance and mutation-pressure conditions.</p>
</div>
</section>
<section>
<div class="wrap card">
<h2>Simulator</h2>
<p class="muted"><b>v0.0.3 route-proof note:</b> thresholds remain strict. Severe low-resonance cases route to QUARANTINE_CLAIM rather than softer meaning-drift language.</p>
<div class="grid">
<div>
<label for="preset"><b>Scenario preset</b></label>
<select id="preset"></select>
<h3>Claim preservation</h3>
<div class="control"><label>Source Match <span id="sourceMatchVal"></span></label><input id="sourceMatch" type="range" min="0" max="1" step="0.01"></div>
<div class="control"><label>Meaning Match <span id="meaningMatchVal"></span></label><input id="meaningMatch" type="range" min="0" max="1" step="0.01"></div>
<div class="control"><label>Context Preserved <span id="contextPreservedVal"></span></label><input id="contextPreserved" type="range" min="0" max="1" step="0.01"></div>
<div class="control"><label>Uncertainty Preserved <span id="uncertaintyPreservedVal"></span></label><input id="uncertaintyPreserved" type="range" min="0" max="1" step="0.01"></div>
<div class="control"><label>Scope Preserved <span id="scopePreservedVal"></span></label><input id="scopePreserved" type="range" min="0" max="1" step="0.01"></div>
<h3>Mutation pressure</h3>
<div class="control"><label>Compression Pressure <span id="compressionPressureVal"></span></label><input id="compressionPressure" type="range" min="0" max="1" step="0.01"></div>
<div class="control"><label>Paraphrase Distance <span id="paraphraseDistanceVal"></span></label><input id="paraphraseDistance" type="range" min="0" max="1" step="0.01"></div>
<div class="control"><label>Platform Speed <span id="platformSpeedVal"></span></label><input id="platformSpeed" type="range" min="0" max="1" step="0.01"></div>
<div class="control"><label>Outrage / Incentive Pressure <span id="incentivePressureVal"></span></label><input id="incentivePressure" type="range" min="0" max="1" step="0.01"></div>
<div class="control"><label>Authority / Status Amplification <span id="statusAmplificationVal"></span></label><input id="statusAmplification" type="range" min="0" max="1" step="0.01"></div>
<h3>HIR capsule attachments</h3>
<div class="control"><label>Source Attached <span id="sourceAttachedVal"></span></label><input id="sourceAttached" type="range" min="0" max="1" step="0.01"></div>
<div class="control"><label>Context Attached <span id="contextAttachedVal"></span></label><input id="contextAttached" type="range" min="0" max="1" step="0.01"></div>
<div class="control"><label>Uncertainty Attached <span id="uncertaintyAttachedVal"></span></label><input id="uncertaintyAttached" type="range" min="0" max="1" step="0.01"></div>
<div class="control"><label>Scope Attached <span id="scopeAttachedVal"></span></label><input id="scopeAttached" type="range" min="0" max="1" step="0.01"></div>
<div class="control"><label>Consent / Permission Attached <span id="consentAttachedVal"></span></label><input id="consentAttached" type="range" min="0" max="1" step="0.01"></div>
<div class="control"><label>Repair Path Attached <span id="repairAttachedVal"></span></label><input id="repairAttached" type="range" min="0" max="1" step="0.01"></div>
<h3>Route gates</h3>
<label class="toggle"><span>Original Source Available<small>Can the carried claim be checked against an original?</small></span><input id="originalSourceAvailable" type="checkbox"></label>
<label class="toggle"><span>Citation Chain Present<small>Is there a traceable chain from source to carried version?</small></span><input id="citationChainPresent" type="checkbox"></label>
<label class="toggle"><span>Public Spread Active<small>Is the mutated version already spreading?</small></span><input id="publicSpreadActive" type="checkbox"></label>
<label class="toggle"><span>Correction Already Issued<small>Has a correction been attached to the claim?</small></span><input id="correctionIssued" type="checkbox"></label>
<label class="toggle"><span>Counterclaim Targets Mutated Version<small>Is the response attacking a version nobody originally claimed?</small></span><input id="counterclaimTargetsMutated" type="checkbox"></label>
</div>
<div>
<div class="dual">
<div class="path drift">
<div class="state-label">Drift Path<br><small style="font-size:13px;opacity:.7">exposed transfer / resonance loss</small></div>
<div id="driftState" class="state">MEANING DRIFT</div>
<p id="driftMeaning" class="muted"></p>
<div class="score-grid">
<div class="score"><div class="label">Resonance Support</div><div id="claimSupport" class="value"></div></div>
<div class="score"><div class="label">Mutation Pressure</div><div id="mutationPressure" class="value"></div></div>
<div class="score"><div class="label">Resonance Loss Risk</div><div id="mutationRisk" class="value"></div></div>
<div class="score"><div class="label">Claim Resonance</div><div id="claimStability" class="value"></div></div>
</div>
<div class="readbox"><b>Read:</b><p id="driftRead"></p><b>Why this route?</b><p id="driftWhy"></p><b>Action:</b><p id="driftAction"></p></div>
<h3>Drift Flags</h3><div id="driftFlags" class="flags"></div>
</div>
<div class="path capsule">
<div class="state-label">Protected Carry Path<br><small style="font-size:13px;opacity:.7">HIR capsule / resonance preservation</small></div>
<div id="capsuleState" class="state">HIR ENCAPSULATED</div>
<p id="capsuleMeaning" class="muted"></p>
<div class="score-grid">
<div class="score"><div class="label">Capsule Strength</div><div id="capsuleStrength" class="value"></div></div>
<div class="score"><div class="label">Encap Support</div><div id="encapSupport" class="value"></div></div>
<div class="score"><div class="label">Encap Stability</div><div id="encapStability" class="value"></div></div>
<div class="score"><div class="label">Resonance Lift</div><div id="protectionLift" class="value"></div></div>
</div>
<div class="readbox"><b>Read:</b><p id="capsuleRead"></p><b>Why this route?</b><p id="capsuleWhy"></p><b>Action:</b><p id="capsuleAction"></p></div>
<h3>Capsule Flags</h3><div id="capsuleFlags" class="flags"></div>
</div>
</div>
<div class="pillrow">
<button id="exportReport" class="btn primary">Generate dual pressure report</button>
<button id="copyReport" class="btn">Copy report</button>
<button id="copyScenarioLink" class="btn">Copy scenario link</button>
</div>
</div>
</div>
</div>
</section>
<section><div class="wrap card"><h2>Exportable pressure report</h2><textarea id="report" placeholder="Click Generate dual pressure report..."></textarea></div></section>
<section><div class="wrap card">
<h2>How the model works</h2>
<div class="equation">S_claim = A_source × B_meaning − P_mutation</div>
<div class="equation">S_encapsulated = (A_source × B_meaning × (1 + C_HIR)) − P_mutation</div>
<div class="equation">Encapsulated Support = Resonance Support × (1 + Capsule Strength)</div>
<p class="readbox">
The <b>Drift Path</b> shows the claim traveling exposed: base resonance support is eroded by mutation pressure.<br><br>
The <b>Protected Carry Path</b> shows the same claim traveling inside an HIR capsule. The capsule does <b>not</b> replace the original claim and does <b>not</b> make the claim true — it provides <b>resonance lift</b>. The factor <b>(1 + C_HIR)</b> adds protective lift so the carried version better survives compression, speed, paraphrase, incentive, and status pressure while preserving source, context, uncertainty, scope, consent, and repair path.
</p>
<p class="readbox">
A good paraphrase changes the route while preserving the claim. A mutation changes the claim while pretending it only changed the route.
</p>
<p class="muted" style="margin-top:16px;">
<b>Where:</b><br>
A_source = Source Match<br>
B_meaning = 0.30×Meaning Match + 0.20×Context Preserved + 0.20×Uncertainty Preserved + 0.15×Scope Preserved + 0.15×Source Match<br>
C_HIR = 0.20×Source Attached + 0.18×Context Attached + 0.18×Uncertainty Attached + 0.16×Scope Attached + 0.14×Consent Attached + 0.14×Repair Path Attached<br>
P_mutation = average mutation pressure
</p>
</div></section>
<section><div class="wrap card">
<h2>Route taxonomy</h2>
<div class="taxonomy" id="taxonomy"></div>
</div></section>
</main>
<footer>
<div class="wrap">
<strong>Claim Mutation / HIR Encapsulation Simulator v0.0.4</strong><br/>
Equation Fidelity + Public Readiness Patch. Boundary: this does not decide truth; it tests whether a carried claim remains structurally resonant with the original under transfer pressure.
</div>
</footer>
<script>
const sliders=[
"sourceMatch","meaningMatch","contextPreserved","uncertaintyPreserved","scopePreserved",
"compressionPressure","paraphraseDistance","platformSpeed","incentivePressure","statusAmplification",
"sourceAttached","contextAttached","uncertaintyAttached","scopeAttached","consentAttached","repairAttached"
];
const toggles=["originalSourceAvailable","citationChainPresent","publicSpreadActive","correctionIssued","counterclaimTargetsMutated"];
function el(id){return document.getElementById(id)} function val(id){return parseFloat(el(id).value)} function avg(a){return a.reduce((x,y)=>x+y,0)/a.length} function r(n){return Number(n).toFixed(2)}
const driftRoutes={
FAITHFUL_CARRY:["FAITHFUL CARRY","The claim remains anchored and preserves meaning, context, uncertainty, and scope.","The carried version remains structurally resonant enough to travel.","Carry with source and context attached."],
BOUNDED_PARAPHRASE:["BOUNDED PARAPHRASE","The wording changed, but the meaning and limits are preserved.","The paraphrase is bounded; mutation pressure did not break structural resonance.","Carry with bounds and source visible."],
CONTEXT_LOSS:["CONTEXT LOSS","The claim is partly intact, but context, scope, or uncertainty has been stripped.","The claim is still recognizable, but missing context weakens resonance with the original.","Restore context and mark uncertainty before wider travel."],
MEANING_DRIFT:["MEANING DRIFT","The carried version now means something materially different from the original.","The retelling is still related to the original topic, but it no longer preserves the original claim resonance.","Bound or correct the paraphrase before carrying further."],
SOURCE_LAUNDERING:["SOURCE LAUNDERING","The claim appears more authoritative than the source chain supports.","Status or authority is making the claim look stronger than its provenance allows.","Downgrade authority, expose source chain, and require provenance."],
CITATION_COLLAPSE:["CITATION COLLAPSE","The citation chain no longer supports the claim being made.","The claim cannot be trusted to travel as cited.","Stop propagation until the citation chain is repaired."],
COUNTERCLAIM_CONFUSION:["COUNTERCLAIM CONFUSION","The response attacks a mutated version, not the original claim.","The dispute is now about a claim nobody originally made.","Return to the original claim and separate counterclaims."],
CORRECTION_REQUIRED:["CORRECTION REQUIRED","The claim can still be repaired, but needs explicit correction before further travel.","The mutation is recoverable if correction catches up to spread.","Attach correction and re-evaluate before carrying."],
QUARANTINE_CLAIM:["QUARANTINE CLAIM","The claim should not be carried further until source, meaning, context, or correction is restored.","Resonance failure is high enough that propagation should stop.","Quarantine the claim and restore provenance before release."]
};
const capsuleRoutes={
UNPROTECTED_CLAIM:["UNPROTECTED CLAIM","The claim is traveling without enough HIR capsule protection.","Source, context, uncertainty, scope, consent, or repair path are too thin.","Do not rely on encapsulation; strengthen attachments first."],
PARTIAL_CAPSULE:["PARTIAL CAPSULE","Some protective attachments are present, but the claim is not fully transfer-ready.","The capsule helps, but gaps remain.","Add missing source/context/uncertainty/scope/consent/repair attachments."],
SOURCE_ANCHORED:["SOURCE ANCHORED","The source is attached strongly enough to resist some drift.","Provenance is visible, but other capsule layers may still be weak.","Keep source visible and strengthen context/uncertainty/scope."],
CONTEXT_PRESERVED:["CONTEXT PRESERVED","The capsule preserves enough surrounding context to reduce distortion.","The claim is less vulnerable to clipping or overreach.","Carry with context block intact."],
UNCERTAINTY_BOUND:["UNCERTAINTY BOUND","Uncertainty is attached clearly enough to prevent overclaiming.","The claim’s limits travel with it.","Preserve uncertainty language during summaries and citations."],
REPAIR_PATH_ATTACHED:["REPAIR PATH ATTACHED","A correction or repair path stays attached to the claim.","The claim can be corrected without losing the trail.","Carry with correction path visible."],
HIR_ENCAPSULATED:["HIR ENCAPSULATED","Source, context, uncertainty, scope, consent, and repair path are attached strongly.","HIR capsule is preserving the claim structure under pressure.","Carry with capsule intact."],
TRANSFER_READY:["TRANSFER READY","The claim has enough capsule strength and stability to travel under current pressure.","The carried version can survive transfer without losing core structure.","Carry, but keep provenance and correction path attached."]
};
const routeTriggers={
FAITHFUL_CARRY:"Trigger: Resonance Support ≥ 0.74, mutation pressure < 0.45, Source Match ≥ 0.80, Meaning Match ≥ 0.80.",
BOUNDED_PARAPHRASE:"Trigger: Resonance Support between 0.55 and 0.74 with mutation pressure < 0.55.",
CONTEXT_LOSS:"Trigger: context, uncertainty, or scope preservation falls below 0.48.",
MEANING_DRIFT:"Trigger: Meaning Match < 0.52 or Claim Resonance < -0.20.",
SOURCE_LAUNDERING:"Trigger: original source unavailable and authority/status amplification ≥ 0.70.",
CITATION_COLLAPSE:"Trigger: original source unavailable and citation chain absent.",
COUNTERCLAIM_CONFUSION:"Trigger: counterclaim targets a mutated version of the claim.",
CORRECTION_REQUIRED:"Trigger: correction issued while Claim Resonance remains below 0.15.",
QUARANTINE_CLAIM:"Trigger: Resonance Support < 0.22, or mutation risk > 0.55 while public spread is active.",
UNPROTECTED_CLAIM:"Trigger: Capsule Strength < 0.35.",
PARTIAL_CAPSULE:"Trigger: Capsule Strength is present but below 0.58.",
SOURCE_ANCHORED:"Trigger: Source attached ≥ 0.75 while context remains below stronger threshold.",
CONTEXT_PRESERVED:"Trigger: Context attached ≥ 0.72 while uncertainty remains below stronger threshold.",
UNCERTAINTY_BOUND:"Trigger: Uncertainty attached ≥ 0.72 while repair path remains below stronger threshold.",
REPAIR_PATH_ATTACHED:"Trigger: Repair path attached ≥ 0.75 while total capsule strength is not yet transfer-ready.",
HIR_ENCAPSULATED:"Trigger: Capsule Strength ≥ 0.72 without full transfer-ready stability.",
TRANSFER_READY:"Trigger: Capsule Strength ≥ 0.78 and Encapsulated Stability ≥ 0.05."
};
const flagDefs={
SourceMissing:"Original source is unavailable or weak.",
CitationMissing:"Citation chain is absent or broken.",
PublicSpread:"Public spread is active; correction may need stronger routing.",
CounterclaimConfusion:"The counterclaim appears to target a mutated version.",
CorrectionPresent:"A correction is already attached.",
MeaningGap:"Meaning preservation is below safe carry threshold.",
ContextGap:"Context is too thin.",
UncertaintyGap:"Uncertainty is not preserved.",
ScopeGap:"Scope is not preserved.",
MutationHigh:"Mutation pressure is high.",
CapsuleThin:"HIR capsule strength is weak.",
RepairMissing:"Repair path attachment is weak.",
ConsentThin:"Consent or permission context is weak.",
TransferReady:"Claim appears structurally ready to carry.",
FaithfulSignal:"Claim signal remains faithful."
};
const presets={
ai_summary_drift:["AI Summary Quarantine Risk",{sourceMatch:.55,meaningMatch:.46,contextPreserved:.32,uncertaintyPreserved:.20,scopePreserved:.38,compressionPressure:.78,paraphraseDistance:.64,platformSpeed:.62,incentivePressure:.44,statusAmplification:.42,sourceAttached:.38,contextAttached:.28,uncertaintyAttached:.18,scopeAttached:.35,consentAttached:.50,repairAttached:.24,originalSourceAvailable:true,citationChainPresent:false,publicSpreadActive:false,correctionIssued:false,counterclaimTargetsMutated:false}],
viral_clip:["Viral Clip Quarantine Risk",{sourceMatch:.48,meaningMatch:.38,contextPreserved:.16,uncertaintyPreserved:.20,scopePreserved:.24,compressionPressure:.82,paraphraseDistance:.68,platformSpeed:.88,incentivePressure:.82,statusAmplification:.70,sourceAttached:.32,contextAttached:.14,uncertaintyAttached:.14,scopeAttached:.20,consentAttached:.32,repairAttached:.12,originalSourceAvailable:true,citationChainPresent:false,publicSpreadActive:true,correctionIssued:false,counterclaimTargetsMutated:false}],
headline_overreach:["Headline Overreach",{sourceMatch:.62,meaningMatch:.50,contextPreserved:.34,uncertaintyPreserved:.28,scopePreserved:.22,compressionPressure:.74,paraphraseDistance:.56,platformSpeed:.70,incentivePressure:.72,statusAmplification:.68,sourceAttached:.58,contextAttached:.30,uncertaintyAttached:.24,scopeAttached:.20,consentAttached:.60,repairAttached:.26,originalSourceAvailable:true,citationChainPresent:true,publicSpreadActive:true,correctionIssued:false,counterclaimTargetsMutated:false}],
source_laundering:["Source Laundering",{sourceMatch:.32,meaningMatch:.54,contextPreserved:.46,uncertaintyPreserved:.38,scopePreserved:.42,compressionPressure:.46,paraphraseDistance:.44,platformSpeed:.64,incentivePressure:.62,statusAmplification:.86,sourceAttached:.24,contextAttached:.42,uncertaintyAttached:.36,scopeAttached:.40,consentAttached:.50,repairAttached:.28,originalSourceAvailable:false,citationChainPresent:true,publicSpreadActive:true,correctionIssued:false,counterclaimTargetsMutated:false}],
citation_collapse:["Citation Collapse",{sourceMatch:.28,meaningMatch:.42,contextPreserved:.38,uncertaintyPreserved:.34,scopePreserved:.36,compressionPressure:.52,paraphraseDistance:.50,platformSpeed:.54,incentivePressure:.52,statusAmplification:.72,sourceAttached:.18,contextAttached:.30,uncertaintyAttached:.28,scopeAttached:.32,consentAttached:.42,repairAttached:.18,originalSourceAvailable:false,citationChainPresent:false,publicSpreadActive:true,correctionIssued:false,counterclaimTargetsMutated:false}],
counterclaim_confusion:["Counterclaim Against Mutated Version",{sourceMatch:.50,meaningMatch:.36,contextPreserved:.28,uncertaintyPreserved:.30,scopePreserved:.32,compressionPressure:.70,paraphraseDistance:.76,platformSpeed:.72,incentivePressure:.68,statusAmplification:.62,sourceAttached:.42,contextAttached:.24,uncertaintyAttached:.24,scopeAttached:.28,consentAttached:.44,repairAttached:.22,originalSourceAvailable:true,citationChainPresent:false,publicSpreadActive:true,correctionIssued:false,counterclaimTargetsMutated:true}],
bounded_paraphrase:["Bounded Paraphrase",{sourceMatch:.78,meaningMatch:.76,contextPreserved:.70,uncertaintyPreserved:.68,scopePreserved:.72,compressionPressure:.34,paraphraseDistance:.42,platformSpeed:.34,incentivePressure:.26,statusAmplification:.30,sourceAttached:.78,contextAttached:.72,uncertaintyAttached:.70,scopeAttached:.72,consentAttached:.76,repairAttached:.66,originalSourceAvailable:true,citationChainPresent:true,publicSpreadActive:false,correctionIssued:false,counterclaimTargetsMutated:false}],
faithful_carry:["Faithful Carry",{sourceMatch:.92,meaningMatch:.90,contextPreserved:.86,uncertaintyPreserved:.82,scopePreserved:.84,compressionPressure:.20,paraphraseDistance:.18,platformSpeed:.22,incentivePressure:.16,statusAmplification:.18,sourceAttached:.92,contextAttached:.88,uncertaintyAttached:.86,scopeAttached:.86,consentAttached:.88,repairAttached:.82,originalSourceAvailable:true,citationChainPresent:true,publicSpreadActive:false,correctionIssued:false,counterclaimTargetsMutated:false}],
hir_encapsulation:["HIR Encapsulation Under Extreme Pressure",{sourceMatch:.68,meaningMatch:.66,contextPreserved:.58,uncertaintyPreserved:.56,scopePreserved:.60,compressionPressure:.70,paraphraseDistance:.62,platformSpeed:.70,incentivePressure:.66,statusAmplification:.60,sourceAttached:.90,contextAttached:.88,uncertaintyAttached:.86,scopeAttached:.84,consentAttached:.82,repairAttached:.88,originalSourceAvailable:true,citationChainPresent:true,publicSpreadActive:true,correctionIssued:true,counterclaimTargetsMutated:false}]
};
function compute(){
const sourceMatch=val("sourceMatch"), meaningMatch=val("meaningMatch"), contextPreserved=val("contextPreserved"), uncertaintyPreserved=val("uncertaintyPreserved"), scopePreserved=val("scopePreserved");
const bMeaning=.30*meaningMatch+.20*contextPreserved+.20*uncertaintyPreserved+.15*scopePreserved+.15*sourceMatch;
const aSource=sourceMatch;
const claimSupport=aSource*bMeaning;
const mutationPressure=avg([val("compressionPressure"),val("paraphraseDistance"),val("platformSpeed"),val("incentivePressure"),val("statusAmplification")]);
const mutationRisk=mutationPressure-claimSupport;
const claimStability=claimSupport-mutationPressure;
const sourceAttached=val("sourceAttached"), contextAttached=val("contextAttached"), uncertaintyAttached=val("uncertaintyAttached"), scopeAttached=val("scopeAttached"), consentAttached=val("consentAttached"), repairAttached=val("repairAttached");
const capsuleStrength=.20*sourceAttached+.18*contextAttached+.18*uncertaintyAttached+.16*scopeAttached+.14*consentAttached+.14*repairAttached;
const encapSupport=claimSupport*(1+capsuleStrength);
const encapStability=encapSupport-mutationPressure;
const protectionLift=encapStability-claimStability;
const originalSourceAvailable=el("originalSourceAvailable").checked, citationChainPresent=el("citationChainPresent").checked, publicSpreadActive=el("publicSpreadActive").checked, correctionIssued=el("correctionIssued").checked, counterclaimTargetsMutated=el("counterclaimTargetsMutated").checked;
let driftFlags=[];
if(!originalSourceAvailable) driftFlags.push(["SourceMissing","hot"]);
if(!citationChainPresent) driftFlags.push(["CitationMissing","warn"]);
if(publicSpreadActive) driftFlags.push(["PublicSpread","warn"]);
if(counterclaimTargetsMutated) driftFlags.push(["CounterclaimConfusion","hot"]);
if(correctionIssued) driftFlags.push(["CorrectionPresent","good"]);
if(meaningMatch<.52) driftFlags.push(["MeaningGap","warn"]);
if(contextPreserved<.45) driftFlags.push(["ContextGap","warn"]);
if(uncertaintyPreserved<.45) driftFlags.push(["UncertaintyGap","warn"]);
if(scopePreserved<.45) driftFlags.push(["ScopeGap","warn"]);
if(mutationPressure>=.65) driftFlags.push(["MutationHigh","hot"]);
if(!driftFlags.length) driftFlags.push(["FaithfulSignal","good"]);
let capsuleFlags=[];
if(capsuleStrength<.45) capsuleFlags.push(["CapsuleThin","warn"]);
if(repairAttached<.45) capsuleFlags.push(["RepairMissing","warn"]);
if(consentAttached<.45) capsuleFlags.push(["ConsentThin","warn"]);
if(sourceAttached>=.75 && contextAttached>=.70 && uncertaintyAttached>=.70 && scopeAttached>=.70 && repairAttached>=.65) capsuleFlags.push(["TransferReady","good"]);
if(!capsuleFlags.length) capsuleFlags.push(["NoCriticalCapsuleGap","good"]);
let driftRoute="MEANING_DRIFT";
if(!originalSourceAvailable && !citationChainPresent) driftRoute="CITATION_COLLAPSE";
else if(!originalSourceAvailable && val("statusAmplification")>=.70) driftRoute="SOURCE_LAUNDERING";
else if(counterclaimTargetsMutated) driftRoute="COUNTERCLAIM_CONFUSION";
else if(correctionIssued && claimStability<.15) driftRoute="CORRECTION_REQUIRED";
else if(claimSupport<.22 || (mutationRisk>.55 && publicSpreadActive)) driftRoute="QUARANTINE_CLAIM";
else if(meaningMatch<.52 || claimStability<-.20) driftRoute="MEANING_DRIFT";
else if(contextPreserved<.48 || uncertaintyPreserved<.48 || scopePreserved<.48) driftRoute="CONTEXT_LOSS";
else if(claimSupport>=.55 && claimSupport<.74 && mutationPressure<.55) driftRoute="BOUNDED_PARAPHRASE";
else if(claimSupport>=.74 && mutationPressure<.45 && sourceMatch>=.80 && meaningMatch>=.80) driftRoute="FAITHFUL_CARRY";
else driftRoute="CONTEXT_LOSS";
let capsuleRoute="PARTIAL_CAPSULE";
if(capsuleStrength<.35) capsuleRoute="UNPROTECTED_CLAIM";
else if(capsuleStrength<.58) capsuleRoute="PARTIAL_CAPSULE";
else if(sourceAttached>=.75 && contextAttached<.65) capsuleRoute="SOURCE_ANCHORED";
else if(contextAttached>=.72 && uncertaintyAttached<.65) capsuleRoute="CONTEXT_PRESERVED";
else if(uncertaintyAttached>=.72 && repairAttached<.60) capsuleRoute="UNCERTAINTY_BOUND";
else if(repairAttached>=.75 && capsuleStrength<.78) capsuleRoute="REPAIR_PATH_ATTACHED";
else if(capsuleStrength>=.78 && encapStability>=.05) capsuleRoute="TRANSFER_READY";
else if(capsuleStrength>=.72) capsuleRoute="HIR_ENCAPSULATED";
return {aSource,bMeaning,claimSupport,mutationPressure,mutationRisk,claimStability,capsuleStrength,encapSupport,encapStability,protectionLift,driftRoute,capsuleRoute,driftFlags,capsuleFlags,sourceMatch,meaningMatch,contextPreserved,uncertaintyPreserved,scopePreserved,originalSourceAvailable,citationChainPresent,publicSpreadActive,correctionIssued,counterclaimTargetsMutated};
}
function renderFlags(id, flags){
el(id).innerHTML="";
flags.forEach(([name,cls])=>{let s=document.createElement("span");s.className="flag "+cls;s.textContent=name;el(id).appendChild(s)});
}
function routeWhy(c){
let driftWhy="";
if(c.driftRoute==="CITATION_COLLAPSE") driftWhy="CITATION_COLLAPSE triggered because the original source is unavailable and the citation chain is absent. The citation chain no longer supports the claim being carried.";
else if(c.driftRoute==="SOURCE_LAUNDERING") driftWhy="SOURCE_LAUNDERING triggered because the original source is unavailable while authority/status amplification is high. The claim appears stronger than its provenance supports.";
else if(c.driftRoute==="COUNTERCLAIM_CONFUSION") driftWhy="COUNTERCLAIM_CONFUSION triggered because the response appears to target a mutated version rather than the original claim.";
else if(c.driftRoute==="CORRECTION_REQUIRED") driftWhy="CORRECTION_REQUIRED triggered because a correction exists, but claim resonance remains too weak under mutation pressure. The correction must catch up before further travel.";
else if(c.driftRoute==="QUARANTINE_CLAIM") driftWhy="QUARANTINE_CLAIM triggered because Resonance Support fell below the 0.22 hard floor, or mutation risk is extreme while public spread is active. The carried version should not travel further until source, context, uncertainty, and repair path are restored.";
else if(c.driftRoute==="MEANING_DRIFT") driftWhy="MEANING_DRIFT triggered because meaning preservation is weak or claim resonance fell below safe carry range. The retelling still relates to the topic, but no longer preserves the original claim structure.";
else if(c.driftRoute==="CONTEXT_LOSS") driftWhy="CONTEXT_LOSS triggered because context, uncertainty, or scope is below preservation threshold. The claim may still be recognizable, but its resonance with the original is weakened.";
else if(c.driftRoute==="BOUNDED_PARAPHRASE") driftWhy="BOUNDED_PARAPHRASE triggered because Resonance Support is in the bounded range and mutation pressure remains below heavy-drift levels.";
else if(c.driftRoute==="FAITHFUL_CARRY") driftWhy="FAITHFUL_CARRY triggered because Resonance Support is high, mutation pressure is low, and source/meaning match are strong.";
else driftWhy="Route selected by current resonance support, mutation pressure, and route-gate conditions.";
let capWhy="";
if(c.capsuleRoute==="UNPROTECTED_CLAIM") capWhy="UNPROTECTED_CLAIM triggered because Capsule Strength is below 0.35. Source, context, uncertainty, scope, consent, or repair attachments are too thin to protect transfer.";
else if(c.capsuleRoute==="PARTIAL_CAPSULE") capWhy="PARTIAL_CAPSULE triggered because Capsule Strength is present but below the stronger protection threshold. Some attachments exist, but the claim is not fully transfer-ready.";
else if(c.capsuleRoute==="SOURCE_ANCHORED") capWhy="SOURCE_ANCHORED triggered because the source is attached strongly, but context or other capsule layers remain weaker.";
else if(c.capsuleRoute==="CONTEXT_PRESERVED") capWhy="CONTEXT_PRESERVED triggered because context is strong enough to reduce distortion, but uncertainty attachment remains below stronger preservation threshold.";
else if(c.capsuleRoute==="UNCERTAINTY_BOUND") capWhy="UNCERTAINTY_BOUND triggered because uncertainty is attached clearly, but the repair path is not yet strong enough.";
else if(c.capsuleRoute==="REPAIR_PATH_ATTACHED") capWhy="REPAIR_PATH_ATTACHED triggered because repair/correction path is strong, but total capsule strength has not yet reached full transfer-ready range.";
else if(c.capsuleRoute==="TRANSFER_READY") capWhy="TRANSFER_READY triggered because Capsule Strength is high and Encapsulated Stability is positive. The claim is protected enough to survive current transfer pressure.";
else if(c.capsuleRoute==="HIR_ENCAPSULATED") capWhy="HIR_ENCAPSULATED triggered because Capsule Strength is high enough to preserve structural resonance, though transfer-readiness depends on current pressure and stability.";
else capWhy="Capsule route selected by current attachment strength and encapsulated stability.";
return {driftWhy,capWhy};
}
function update(){
sliders.forEach(id=>el(id+"Val").textContent=r(val(id)));
const c=compute(), d=driftRoutes[c.driftRoute], cap=capsuleRoutes[c.capsuleRoute];
const why=routeWhy(c);
el("driftState").textContent=d[0]; el("driftMeaning").textContent=d[1]; el("driftRead").textContent=d[2]; el("driftWhy").textContent=why.driftWhy; el("driftAction").textContent=d[3];
el("claimSupport").textContent=r(c.claimSupport); el("mutationPressure").textContent=r(c.mutationPressure); el("mutationRisk").textContent=r(c.mutationRisk); el("claimStability").textContent=r(c.claimStability); renderFlags("driftFlags",c.driftFlags);
el("capsuleState").textContent=cap[0]; el("capsuleMeaning").textContent=cap[1]; el("capsuleRead").textContent=cap[2]; el("capsuleWhy").textContent=why.capWhy; el("capsuleAction").textContent=cap[3];
el("capsuleStrength").textContent=r(c.capsuleStrength); el("encapSupport").textContent=r(c.encapSupport); el("encapStability").textContent=r(c.encapStability); el("protectionLift").textContent=r(c.protectionLift); renderFlags("capsuleFlags",c.capsuleFlags);
if(urlSyncReady) writeUrlState();
}
function applyPreset(k){
const p=presets[k][1];
Object.entries(p).forEach(([key,v])=>{if(typeof v==="boolean")el(key).checked=v;else el(key).value=v});
update();
}
function report(){
const c=compute(), d=driftRoutes[c.driftRoute], cap=capsuleRoutes[c.capsuleRoute], preset=presets[el("preset").value]?.[0]||"Manual", why=routeWhy(c);
el("report").value=`Claim Mutation / HIR Encapsulation Simulator v0.0.4 — Structural Resonance Dual Pressure Report
Scenario:
${preset}
Shareable State:
${encodeStateToURL()}
Boundary:
This simulator does not decide whether the claim is true. It checks whether the carried version remains structurally resonant with the original claim by preserving source, context, uncertainty, scope, consent, and repair path.
Original Claim:
${el("originalClaim").value}
Carried / Public Version:
${el("carriedClaim").value}
Drift Path:
- Recommended State: ${d[0]}
- A_source / Source Match: ${r(c.aSource)}
- B_meaning / Meaning Stack: ${r(c.bMeaning)}
- Resonance Support: ${r(c.claimSupport)}
- Mutation Pressure: ${r(c.mutationPressure)}
- Resonance Loss Risk: ${r(c.mutationRisk)}
- Claim Resonance: ${r(c.claimStability)}
- Flags:
${c.driftFlags.map(f=>"- "+f[0]+": "+(flagDefs[f[0]]||"No definition available.")).join("\n")}
- Read: ${d[2]}
- Why this route: ${why.driftWhy}
- Action: ${d[3]}
HIR Capsule Path:
- Recommended State: ${cap[0]}
- Capsule Strength: ${r(c.capsuleStrength)}
- Encapsulated Support: ${r(c.encapSupport)}
- Encapsulated Support Formula: Resonance Support × (1 + Capsule Strength)
- Encapsulated Stability: ${r(c.encapStability)}
- Resonance Lift: ${r(c.protectionLift)}
- Flags:
${c.capsuleFlags.map(f=>"- "+f[0]+": "+(flagDefs[f[0]]||"No definition available.")).join("\n")}
- Read: ${cap[2]}
- Why this route: ${why.capWhy}
- Action: ${cap[3]}
Core equations:
S_claim = A_source × B_meaning − P_mutation
S_encapsulated = (A_source × B_meaning × (1 + C_HIR)) − P_mutation
Encapsulated Support = Resonance Support × (1 + Capsule Strength)
Equation-fidelity note:
The HIR capsule does not make the claim true or replace the base claim. It adds resonance lift by keeping source, context, uncertainty, scope, consent, and repair path attached.
Public thesis:
A claim can be repeated without being preserved. Repetition without resonance is just noise. HIR encapsulation keeps source, context, uncertainty, scope, consent, and repair path attached.`;
}
function renderTaxonomy(){
const box=el("taxonomy");
Object.entries(driftRoutes).forEach(([k,v])=>{let d=document.createElement("div");d.className="route-card";d.innerHTML=`<b>${v[0]}</b><p>${v[1]}</p><p><b>Trigger:</b> ${routeTriggers[k]||"Route condition depends on current signal state."}</p><p><b>Action:</b> ${v[3]}</p>`;box.appendChild(d)});
Object.entries(capsuleRoutes).forEach(([k,v])=>{let d=document.createElement("div");d.className="route-card";d.innerHTML=`<b>${v[0]}</b><p>${v[1]}</p><p><b>Trigger:</b> ${routeTriggers[k]||"Route condition depends on current capsule state."}</p><p><b>Action:</b> ${v[3]}</p>`;box.appendChild(d)});
}
const translations={
plain:"This tool checks whether a carried claim remains structurally resonant with the original after being summarized, quoted, clipped, reposted, cited, or argued against.",
example:"A study says one careful thing. A headline makes it broader. A thread makes it emotional. A reply argues against the exaggerated version. This simulator shows where resonance broke." ,
visual:"Imagine a clean claim splitting into two paths: one frays into fragments under pressure; the other travels inside a capsule that keeps source, context, uncertainty, scope, consent, and repair attached so resonance survives.",
math:"Drift path: S_claim = A_source × B_meaning − P_mutation. Capsule path: S_encapsulated = (A_source × B_meaning × (1 + C_HIR)) − P_mutation.",
symbol:"A naked claim is a spark in wind. An HIR-encapsulated claim is a carried ember: source, context, uncertainty, scope, consent, and repair path shelter the signal."
};
let urlSyncReady=false;
function getScenarioState(){
const state={preset:el("preset").value};
sliders.forEach(id=>{state[id]=parseFloat(el(id).value);});
toggles.forEach(id=>{state[id]=el(id).checked;});
state.originalClaim=el("originalClaim").value;
state.carriedClaim=el("carriedClaim").value;
return state;
}
function applyScenarioState(state){
if(state.preset && presets[state.preset]) el("preset").value=state.preset;
sliders.forEach(id=>{if(state[id]!==undefined && !Number.isNaN(parseFloat(state[id]))) el(id).value=Math.max(0,Math.min(1,parseFloat(state[id])));});
toggles.forEach(id=>{if(state[id]!==undefined) el(id).checked=(state[id]===true || state[id]==="1" || state[id]==="true");});
if(state.originalClaim!==undefined) el("originalClaim").value=state.originalClaim;
if(state.carriedClaim!==undefined) el("carriedClaim").value=state.carriedClaim;
update();
}
function encodeStateToURL(){
const params=new URLSearchParams();
const state=getScenarioState();
Object.entries(state).forEach(([key,value])=>{
if(typeof value==="boolean") params.set(key,value?"1":"0");
else if(typeof value==="number") params.set(key,value.toFixed(3));
else if(typeof value==="string") params.set(key,value);
});
const url=new URL(window.location.href);
url.hash=params.toString();
return url.toString();
}
function loadStateFromURL(){
const hash=window.location.hash.substring(1);
if(!hash) return false;
const params=new URLSearchParams(hash);
const state={};
for(const [key,value] of params.entries()){
if(toggles.includes(key)) state[key]=value==="1";
else if(sliders.includes(key)) state[key]=parseFloat(value);
else state[key]=value;
}
if(Object.keys(state).length){applyScenarioState(state);return true;}
return false;
}
function writeUrlState(){
if(!urlSyncReady) return;
const link=encodeStateToURL();
history.replaceState(null,"",link);
}
document.addEventListener("DOMContentLoaded",()=>{
Object.entries(presets).forEach(([k,p])=>{let o=document.createElement("option");o.value=k;o.textContent=p[0];el("preset").appendChild(o)});
sliders.forEach(id=>el(id).addEventListener("input",update)); toggles.forEach(id=>el(id).addEventListener("change",update));
el("preset").addEventListener("change",e=>applyPreset(e.target.value));
el("exportReport").addEventListener("click",report);
el("copyReport").addEventListener("click",()=>{if(!el("report").value)report();navigator.clipboard?.writeText(el("report").value)});
el("copyScenarioLink").addEventListener("click",()=>{const link=encodeStateToURL();navigator.clipboard?.writeText(link);const btn=el("copyScenarioLink");btn.textContent="Copied scenario link";setTimeout(()=>btn.textContent="Copy scenario link",1300);});
document.querySelectorAll("[data-mode]").forEach(btn=>btn.addEventListener("click",()=>{document.querySelectorAll("[data-mode]").forEach(b=>b.classList.remove("primary"));btn.classList.add("primary");el("translation").textContent=translations[btn.dataset.mode]}));
renderTaxonomy();
if(!loadStateFromURL()) applyPreset("ai_summary_drift");
urlSyncReady=true;
update();
});
</script>
</body>
</html>