<span class="brand-sub">Wallet control for AI shopping agents</span>
</div>
<div class="masthead-right">
<button id="sus-toggle" class="chip sus-toggle" type="button" title="When on, the offer comparison prefers the more sustainable shop within the safest risk band. Advisory only — never changes engine decisions.">🌱 Prefer sustainable: off</button>
<h2><span class="num">1</span> Your wallet policy</h2>
<p class="panel-sub">Describe in your own words what the agent may buy. We translate it into executable permissions — you confirm before anything is active.</p>
<textarea id="instruction" rows="4" placeholder="e.g. Buy one ordinary grocery item for CHF 20 or less from a shop I use regularly. Ask me when uncertain."></textarea>
<div class="row">
<button id="btn-compile" class="btn primary">Translate to permissions</button>
<span class="hint">deterministic parser — no model involved</span>
</div>
<div id="draft" class="draft hidden">
<h3>What we understood</h3>
<div id="understood" class="understood"></div>
<div id="warnings"></div>
<div id="open-questions"></div>
<details class="json-view">
<summary>Executable rules (JSON)</summary>
<pre id="rules-json"></pre>
</details>
<div class="row">
<button id="btn-confirm" class="btn primary">Confirm & activate</button>
<p class="hint">Paste the shops that offer the same item — e.g. black running shoes at four sellers. Shows each shop's risk score and sustainability score; with “Prefer sustainable” on, the suggestion favours the more sustainable shop within the safest risk band. Basic static dataset — shops without data show as unknown, never guessed. For now only the <b>top 3 shops by our score</b> are compared.</p>
<div class="row">
<input id="offers-item" class="offers-input" placeholder="Item (optional), e.g. black running shoes, size 43">