
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial,sans-serif;background:#f7fafc;color:#111827}
.topbar{display:flex;align-items:center;justify-content:space-between;padding:.8rem 1rem;background:#111827;color:#fff;position:sticky;top:0;z-index:10}
.brand{font-weight:800;letter-spacing:.3px}
.nav a{color:#e5e7eb;margin-left:1rem;text-decoration:none}
.nav a:hover{color:#fff;text-decoration:underline}
.wrap{max-width:1200px;margin:0 auto;padding:1rem}
.controls{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:1rem;margin-bottom:1rem}
.row{display:flex;gap:.75rem;flex-wrap:wrap;margin:.5rem 0}
.field{display:flex;flex-direction:column;min-width:160px}
.field.grow{flex:1}
label{font-size:.8rem;color:#6b7280;margin-bottom:.25rem}
select,input{border:1px solid #d1d5db;border-radius:10px;padding:.55rem .6rem;font-size:1rem;background:#fff}
button{background:#111827;color:#fff;border:0;border-radius:10px;padding:.6rem 1rem;font-weight:600;cursor:pointer}
button:disabled{opacity:.6;cursor:not-allowed}
.status{font-size:.9rem;color:#374151;margin-top:.25rem}
.results{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
@media (max-width:1000px){.results{grid-template-columns:1fr}}
.col{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:.75rem}
.col h3{margin:.2rem 0 .5rem 0}
.tokens{display:flex;flex-wrap:wrap;gap:.4rem;padding:.25rem;min-height:60px}
.rtl{direction:rtl}
.token{display:inline-flex;align-items:center;gap:.35rem;padding:.25rem .5rem;border:1px solid #e5e7eb;border-radius:9999px;background:#f9fafb;cursor:pointer}
.token:hover{background:#eef2ff;border-color:#6366f1}
.token .s{font-weight:600}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.35);display:none;align-items:center;justify-content:center;padding:1rem}
.modal.show{display:flex}
.modal-card{width:min(640px,95vw);background:#fff;border-radius:14px;border:1px solid #e5e7eb;box-shadow:0 6px 20px rgba(0,0,0,.12)}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:.6rem .8rem;border-bottom:1px solid #e5e7eb}
.modal-title{font-weight:700}
.modal-body{padding:.8rem}
.badge{display:inline-block;font-size:.75rem;padding:.1rem .4rem;border:1px solid #d1d5db;border-radius:8px;background:#f3f4f6}
.empty{color:#9ca3af}
.foot{padding:1rem;color:#6b7280;text-align:center}
