:root{--teal:#0f766e;--teal-d:#115e59;--teal-l:#ccfbf1;--bg:#eef1f4;--card:#fff;--ink:#1f2933;--muted:#64748b;--line:#d9dee5;--fee:#ea580c;--warn:#b45309;--danger:#b91c1c;--r:12px}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font:16px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--ink);padding-bottom:env(safe-area-inset-bottom)}
button,input,select,textarea{font:inherit}
a{color:var(--teal-d)}
.top{position:sticky;top:0;z-index:20;background:var(--teal);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:calc(8px + env(safe-area-inset-top)) 12px 8px}
.brand{display:flex;align-items:center;gap:8px;min-width:0}
.brand img{border-radius:8px;background:#fff}
.title{font-weight:700;font-size:1.05rem;white-space:nowrap}
.skill{display:flex;align-items:center;gap:6px;font-size:.8rem}
.skill span{opacity:.85}
.skill select{max-width:48vw;padding:6px 8px;border-radius:8px;border:0;background:#fff;color:var(--ink);font-size:.9rem}
.tabs{position:sticky;top:calc(48px + env(safe-area-inset-top));z-index:19;display:flex;gap:4px;overflow-x:auto;background:var(--teal-d);padding:6px 8px;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tabs button{flex:0 0 auto;border:0;background:transparent;color:#d1fae5;padding:6px 10px;border-radius:999px;font-size:.9rem}
.tabs button.on{background:#fff;color:var(--teal-d);font-weight:600}
main{max-width:1200px;margin:0 auto;padding:12px}
.tab{display:none}.tab.on{display:block}
.searchbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.inputwrap{position:relative;flex:1 1 220px}
.inputwrap input{width:100%;padding:12px 40px 12px 12px;border:1px solid var(--line);border-radius:var(--r);background:#fff;font-size:16px}
.inputwrap input:focus{outline:2px solid var(--teal);border-color:transparent}
.clear{position:absolute;right:6px;top:50%;transform:translateY(-50%);border:0;background:#e2e8f0;color:#334155;width:28px;height:28px;border-radius:50%;font-size:18px;line-height:1}
input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}
.primary{background:var(--teal);color:#fff;border:0;border-radius:var(--r);padding:11px 16px;font-weight:600}
.ghost{background:#fff;color:var(--teal-d);border:1px solid var(--teal);border-radius:var(--r);padding:10px 14px}
.small{font-size:.85rem}.muted{color:var(--muted)}.pad{padding:12px}
.opts{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:8px 2px;font-size:.88rem}
.split{display:grid;grid-template-columns:1fr;gap:12px}
@media(min-width:900px){.split{grid-template-columns:minmax(320px,420px) 1fr}.detail{position:sticky;top:110px;max-height:calc(100vh - 130px);overflow:auto}}
.card,.detail,.list>.hit{background:var(--card);border-radius:var(--r);box-shadow:0 1px 2px rgba(15,23,42,.06)}
.list{display:flex;flex-direction:column;gap:8px}
.hit{padding:10px 12px;border:1px solid transparent;cursor:pointer;text-align:left;width:100%;color:inherit;font:inherit}
.hit.sel{border-color:var(--teal)}
.hit .row1{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:700;color:var(--teal-d)}
.fee{color:var(--fee);font-weight:700;white-space:nowrap}
.score{font-size:.75rem;color:var(--muted)}
.badge{display:inline-block;font-size:.72rem;padding:1px 7px;border-radius:999px;background:var(--teal-l);color:var(--teal-d);margin-right:4px}
.badge.b{background:#fff7ed;color:#9a3412}
.badge.s{background:#f1f5f9;color:#475569;text-decoration:line-through}
.detail{padding:14px}
.detail h2{margin:.1em 0 .2em;font-size:1.25rem}
.detail h3{font-size:1rem;margin:1.1em 0 .4em;color:var(--teal-d)}
.feeblock{display:flex;flex-wrap:wrap;gap:14px;margin:8px 0}
.feeblock div{background:#f8fafc;border-radius:10px;padding:8px 12px}
.feeblock .big{font-size:1.5rem}
table{border-collapse:collapse;width:100%;font-size:.88rem}
th,td{text-align:left;padding:6px 8px;border-bottom:1px solid var(--line);vertical-align:top}
th{background:#f8fafc;font-weight:600}
tr.hl td{background:#fff7ed}
.tablewrap{overflow-x:auto;background:#fff;border-radius:var(--r);margin-top:10px}
.mobileskill{display:flex;align-items:center;gap:8px;margin:6px 0;font-size:.9rem}
@media(min-width:900px){.mobileskill{display:none}}
.mobileskill select{padding:6px;border-radius:8px;border:1px solid var(--line)}
.links a{display:block;margin:4px 0}
.icdrow{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--line)}
.icdrow .btns{display:flex;gap:6px;flex-shrink:0}
.icdrow button{font-size:.8rem;padding:5px 9px;border-radius:8px}
.rule{background:#fff;border-radius:var(--r);padding:10px 12px;margin:8px 0;white-space:pre-wrap}
.rule:target{outline:2px solid var(--fee)}
.rule .code{margin-right:6px}
.foot{max-width:1200px;margin:24px auto 0;padding:12px 12px 0;font-size:.9rem}
.dataline{font-weight:600}
.disclaimer{color:var(--warn)}
.warn{color:var(--warn)}
.feedback{background:#fff;border-radius:var(--r);padding:10px 12px;margin:10px 0}
.feedback summary{cursor:pointer;font-weight:600;color:var(--teal-d)}
.feedback label{display:block;margin:8px 0;font-size:.88rem}
.feedback input,.feedback textarea{width:100%;padding:10px;border:1px solid var(--line);border-radius:10px;margin-top:4px;font-size:16px}
.hp{position:absolute;left:-9999px;opacity:0;height:0;width:0}
.copyright{margin:14px -12px 0;padding:12px;background:var(--teal-d);color:#e2f3f1;font-size:.78rem;text-align:center}
dialog{border:0;border-radius:16px;padding:0;max-width:min(520px,94vw);width:100%}
dialog::backdrop{background:rgba(15,23,42,.45)}
.dlg{padding:16px}
.dlg h3{margin:0 0 6px}
.prompt{white-space:pre-wrap;background:#f1f5f9;border-radius:10px;padding:8px;font-size:.82rem;max-height:30vh;overflow:auto}
.ailist{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}
.ailist button{padding:10px;border-radius:10px;border:1px solid var(--line);background:#fff;text-align:left}
.ailist button.last{border-color:var(--teal);background:var(--teal-l)}
.row{display:flex;gap:8px;flex-wrap:wrap}.row.end{justify-content:flex-end}
.confirm{background:#fff7ed;border-radius:10px;padding:10px;margin:8px 0}
.toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));transform:translateX(-50%);background:#0f172a;color:#fff;padding:10px 14px;border-radius:10px;z-index:50;font-size:.9rem}
.region{background:#fff;border-radius:var(--r);padding:10px 14px;margin:10px 0}
.region h3{margin:.2em 0;color:var(--teal-d)}
.region h4{margin:.8em 0 .2em;font-size:.85rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.region ul{margin:0;padding-left:18px}
.region li{margin:3px 0}
.condhead{background:#fff;border-radius:var(--r);padding:12px 14px}
.condhead h2{margin:0;font-size:1.15rem}
.bul{background:#fff;border-radius:var(--r);padding:10px 12px;margin:8px 0}
.bul.sup{opacity:.65}
.notes h3{color:var(--teal-d)}
.notes .card{padding:12px 14px;margin:10px 0}
mark{background:#fef3c7;padding:0 1px}
.codebig{font-size:1.2rem}.mt8{margin-top:8px}
.split>*{min-width:0}
.detail,.hit,.rule{overflow-wrap:anywhere}
body{overflow-x:hidden}
@media(max-width:899px){.detail{scroll-margin-top:100px}}
.mobileskill select{flex:1;min-width:0;max-width:100%}
.mobileskill label,.mobileskill>span{white-space:nowrap;overflow-wrap:normal;flex:none}.mobileskill select{width:100%;box-sizing:border-box}
@media(max-width:520px){.skill span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.skill select{max-width:44vw}.brand{font-size:.95rem}}
.why{color:var(--teal-d)}
.brand{color:inherit;text-decoration:none;cursor:pointer;border-radius:10px;padding:2px 4px;margin:-2px -4px}.brand:focus-visible{outline:3px solid #fff;outline-offset:2px}
.brand{touch-action:manipulation;-webkit-tap-highlight-color:rgba(255,255,255,.2);position:relative;z-index:1}
.topsrc{background:var(--card);border-radius:var(--r);padding:12px 14px;margin:10px 0}
.topgrid{display:grid;grid-template-columns:1fr;gap:4px 24px}@media(min-width:760px){.topgrid{grid-template-columns:1fr 1fr}}
.topsrc ol{margin:.3em 0 .6em;padding-left:1.6em}.topsrc li{margin:.25em 0}.topsrc h4{margin:.6em 0 .2em}
.badge.sub{display:inline-block;font-size:.7rem;padding:0 6px;border-radius:8px;background:#fde7d2;color:#9a3412;margin-left:4px}
/* ---------------- Phone / tablet mode ---------------- */
.layoutlink{background:transparent;border:1px solid rgba(255,255,255,.55);color:#fff;border-radius:999px;padding:4px 10px;font-size:.8rem;cursor:pointer;white-space:nowrap}
.layoutlink:focus-visible{outline:3px solid #fff;outline-offset:2px}
.phonenav{display:none}
html.phone .tabs,html.phone .top .skill,html.phone #askGeneral,html.phone .opts label,html.phone .mobileskill{display:none!important}
html.phone .top{padding-top:calc(10px + env(safe-area-inset-top));padding-bottom:10px}
html.phone .phonenav{display:flex;align-items:center;justify-content:space-between;gap:8px;max-width:1200px;margin:0 auto;padding:10px 12px 0}
.chip{position:relative;display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:999px;padding:6px 12px;font-size:.9rem;cursor:pointer;min-height:36px}
.skillchip select{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer;font-size:16px}
.morewrap{position:relative}
.menu{position:absolute;right:0;top:calc(100% + 6px);z-index:30;background:#fff;border-radius:12px;box-shadow:0 8px 24px rgba(15,23,42,.18);padding:6px;min-width:190px;display:flex;flex-direction:column}
.menu[hidden]{display:none}
.menu button{background:none;border:0;text-align:left;padding:11px 12px;border-radius:8px;font-size:1rem;color:var(--ink);cursor:pointer}
.menu button.on{background:#e6f3f2;color:var(--teal-d);font-weight:600}
html.phone .searchbar{gap:8px}
html.phone #q{font-size:17px;padding:14px 44px 14px 14px;border-radius:14px}
html.phone .searchbar .primary{display:none}
html.phone .opts{min-height:0;margin:4px 2px}
html.phone .hit .score{display:none}
html.phone .hit{padding:12px 14px}
html.phone .hit .hdesc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--ink)}
html.phone .split.showing #results{display:none}
html.phone .detail{position:static;max-height:none;overflow:visible}
.pcard .back{margin-bottom:8px}
.pfee{background:#f6f8fa;border-radius:12px;padding:12px 14px;margin:10px 0}
.pbtns{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}
.pbtns #pMore{grid-column:1 / -1}
.pbtns button{min-height:44px}
.pcard details{margin:8px 0;border-top:1px solid var(--line);padding-top:6px}
.pcard summary{cursor:pointer;font-weight:600;color:var(--teal-d);padding:6px 0}
.pcard #pDocs{display:flex;flex-direction:column;gap:6px;margin:6px 0 10px}
.pcard #pDocs[hidden]{display:none}
html.phone .picklist .icdrow{cursor:pointer;border-radius:10px;padding:8px}
html.phone .picklist .icdrow.picked{background:#e6f3f2;outline:2px solid var(--teal)}
html.phone .picklist [data-medres]{display:none}
html.phone .foot .dataline,html.phone .foot .disclaimer,html.phone .foot>p.small{display:none}
html.phone .foot{text-align:center}
html.phone .feedback summary{color:var(--teal-d);text-decoration:underline;cursor:pointer;list-style:none}
@media(min-width:700px){html.phone main{max-width:760px}}
.pfee .fee.big{font-size:2rem;font-weight:700;line-height:1.1}html.phone .picklist .why,html.phone .picklist .icdrow .small.muted{display:none}

.star{display:inline-flex;align-items:center;justify-content:center;min-width:30px;min-height:30px;padding:0 2px;font-size:1.2rem;line-height:1;color:#94a3b8;cursor:pointer;border-radius:8px;user-select:none;-webkit-user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;vertical-align:middle}
.star.on{color:#d97706}@media (hover:hover){.star:hover{background:rgba(15,118,110,.08)}}.star:focus-visible{outline:2px solid var(--teal);outline-offset:1px}
.codebig+.star{font-size:1.5rem;min-width:40px;min-height:40px}
.hit .lft{display:inline-flex;align-items:center;gap:2px}
.quick{display:flex;gap:8px;flex-wrap:wrap;margin:2px 2px 10px}
.savedh{display:flex;justify-content:space-between;align-items:center;margin:8px 4px 0}.savedh h3{margin:0;font-size:1rem}
.linkbtn{background:none;border:0;color:var(--teal);text-decoration:underline;cursor:pointer;font:inherit;font-size:.88rem;padding:6px}
td.nowrap{white-space:nowrap}
#moreMenu button[data-saved]{font-weight:600}
.savedtools{display:flex;flex-direction:column;gap:8px;margin:12px 4px 0}.savednote{margin:4px 0 0;padding:2px 12px;font-size:.6875rem;line-height:1.35;color:var(--muted,#6b7280)}.savedfoot{margin:2px 0 0;padding:2px 12px;line-height:1.35}.foot{margin-top:6px;padding-top:4px}.foot .dataline{margin:2px 0;line-height:1.35}.saverow{display:flex;align-items:center;gap:10px}.savedhelp{margin:0;line-height:1.45;color:var(--ink);max-width:62ch}.savedtools .ghost{position:relative;flex:0 0 auto;font-size:.75rem;line-height:1.2;padding:3px 8px;border-radius:6px;min-height:0;min-width:52px;text-align:center}.savedtools .ghost::after{content:"";position:absolute;left:50%;top:50%;width:max(100%,44px);height:max(100%,32px);transform:translate(-50%,-50%)}@media (max-width:420px){.saverow{flex-direction:column;align-items:flex-start;gap:4px}.saverow+.saverow{margin-top:6px}}

/* provinces and territories */
.jur{display:flex;align-items:center;gap:6px;font-size:.8rem;margin-left:auto}
.jur span{opacity:.85}
.jur select{max-width:40vw;padding:6px 8px;border-radius:8px;border:0;background:#fff;color:var(--ink);font-size:.9rem;font-weight:600}
@media(max-width:520px){.jur span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.jur select{max-width:46vw}}
html.phone .top .jur{display:none}
.jurchip{display:none}html.phone .jurchip{display:inline-flex;font-weight:600}
.jurchip select{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer;font-size:16px}
html.phone .phonenav .skillchip{flex:1 1 auto;min-width:0;overflow:hidden}html.phone .phonenav .skillchip b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.jur-x .abonly,html.jur-soon .needdata,html.noskill .skill,html.noskill .skillchip,html.jur-x .opts label{display:none!important}
.jurbar{max-width:1200px;margin:8px auto 0;padding:8px 12px;background:var(--card);border-left:4px solid var(--teal);border-radius:8px;font-size:.9rem}
.jurbar .eff,.eff{font-weight:700;color:var(--teal)}
.badge.j{background:#e0f2f1;color:#0f5f58}
.hit.other{opacity:.92;border-style:dashed}
.card.soon h2{margin:.2em 0}
.srcnote{margin:8px 0;padding:8px 10px;border-top:1px solid rgba(0,0,0,.08)}
.srcnote p,.srccard p{margin:.25em 0}
.srcmini{margin-top:14px}
.rule.rh{margin-top:12px}
.morewrap{flex:0 0 auto}#moreBtn{white-space:nowrap}
.mods{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.85em;color:var(--muted,#555);overflow-wrap:anywhere}
/* v23 condensed notes/footer block */
.savedtools{margin:6px 4px 0;gap:6px}.saverow .savedhelp{line-height:1.35}
.foot p{margin:3px 0;line-height:1.35}.foot .dataline{margin:2px 0}
.foot #srcnote{margin:4px 0;padding:4px 8px}.foot #srcnote p{margin:2px 0;line-height:1.35}
.foot .feedback{margin:4px 0}.foot .copyright{margin-top:6px;padding:8px 12px}
.savedempty{margin:2px 0 4px;padding:2px 12px;line-height:1.35;min-height:0}
/* v26 compact Favourites / Recent rows */
.hit.compact,#results .hit.compact{display:flex;align-items:center;gap:8px;padding:2px 4px 2px 10px;min-height:34px}
.hit.compact .ccode{flex:0 0 auto;font-weight:700}
.hit.compact .cdesc{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink)}
.hit.compact .fee,.hit.compact .badge,.hit.compact .muted{flex:0 0 auto;white-space:nowrap;font-size:.85rem}
.hit.compact .star{flex:0 0 auto;min-width:32px;min-height:32px;font-size:1.2rem}

/* v28 privacy/support links */
.foot .legal{margin:6px 0 2px;text-align:center;font-size:.8rem}

/* v31 About/legal links in the More menu and Resources */
.menu a.menulink{display:block;padding:9px 12px;border-radius:8px;font-size:.95rem;color:var(--teal-d,#0b5f59);text-decoration:none}
.menu a.menulink.first{border-top:1px solid #e5e7eb;margin-top:4px;padding-top:11px}
.aboutcard{margin-top:12px}.aboutcard .aboutlinks{margin:6px 0;font-weight:600}
.srcnote .notofficial,.srccard .notofficial{font-weight:600}
.hit.heldsaved{display:flex;align-items:center;gap:10px;cursor:default;color:var(--muted,#64748b);font-size:.85rem}.hit.heldsaved .cdesc{white-space:normal}.hit.heldsaved .linkbtn{margin-left:auto;flex:0 0 auto}
/* v33 pick mode for MedBilling Logs: slim bar at the bottom, tap a code to send it back */
.pickbar{position:fixed;left:0;right:0;bottom:0;z-index:60;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2px 6px;background:#fef3c7;color:#713f12;border-top:1px solid #f59e0b;padding:6px 12px calc(6px + env(safe-area-inset-bottom));font-size:.9rem;line-height:1.3;box-shadow:0 -2px 8px rgba(15,23,42,.08)}
.pickbar .pbtxt{font-weight:600;text-align:center}
.pickbar .pbcancel{border:1px solid #b45309;background:#fff;color:#7c2d12;border-radius:999px;padding:0 14px;min-height:32px;font-weight:600;cursor:pointer}
html.picking body{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
html.picking .toast{bottom:calc(64px + env(safe-area-inset-bottom))}
html.picking #results .hit:not(.other):not(.heldsaved):hover,html.picking .icdrow:hover{outline:2px solid #f59e0b;outline-offset:-2px}
html.picking .icdrow{cursor:pointer}
.pdet{display:inline-flex;align-items:center;margin-left:8px;padding:0 10px;min-height:28px;border:1px solid var(--teal);border-radius:999px;color:var(--teal-d);background:#fff;font-size:.8rem;font-weight:600;cursor:pointer;flex:0 0 auto}
.pickuse{margin:8px 0}
.icdrow .pickuse.sm{margin:0;padding:5px 12px;font-size:.8rem;border-radius:8px}
html.picking #detail .codebig{cursor:pointer;text-decoration:underline dotted 2px;text-underline-offset:4px}
.ahcipbull{padding:10px 14px;margin:0 0 12px}.ahcipbull h3{margin:2px 0 6px;font-size:1rem}
.bulllinks{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:2px 16px}
.bulllinks a{display:flex;align-items:center;min-height:40px;font-weight:600}
/* v33 pick mode on a phone: the banner is two tidy lines with Cancel on the right; ICD-9 rows let their buttons wrap
   under the description instead of squeezing it (the extra "Use" button made rows too wide at 390px) */
@media (max-width:600px){
  .pickbar{flex-wrap:nowrap;justify-content:space-between;text-align:left;font-size:.85rem;gap:10px}
  .pickbar .pbtxt{text-align:left;flex:1 1 auto}
  .pickbar .pbsep{display:none}
  .pickbar .pbcancel{flex:0 0 auto;min-height:40px}
  html.picking .icdrow{flex-wrap:wrap;align-items:flex-start}
  html.picking .icdrow>div:first-child{flex:1 1 100%;min-width:0}
  html.picking .icdrow .btns{flex-wrap:wrap;flex-shrink:1}
}
/* v34 Favourites groups: collapsible folders (specialty, doctor, custom) + Ungrouped; sheets for choosing groups */
#results .hit[hidden],.fgopt[hidden]{display:none!important}
.fgnew{display:inline-flex;align-items:center;min-height:36px;padding:0 12px;border:1px solid var(--teal);border-radius:999px;background:#fff;color:var(--teal-d);font-size:.85rem;font-weight:600;cursor:pointer;touch-action:manipulation}
.fgnew:focus-visible,.fgtoggle:focus-visible,.fgmenu:focus-visible,.rowmenu:focus-visible,.fgitem:focus-visible,.fgsegb:focus-visible{outline:2px solid var(--teal);outline-offset:1px}
.favtools{display:flex;align-items:center;gap:8px;margin:6px 4px 2px;flex-wrap:wrap}
.favtools .fgq{flex:1 1 180px}
.fgq input{width:100%;padding:8px 12px;min-height:40px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:16px}
.fgq input:focus{outline:2px solid var(--teal);border-color:transparent}
.fgsort{display:inline-flex;align-items:center;gap:6px;font-size:.82rem;color:var(--muted)}
.fgsort select{min-height:40px;padding:4px 8px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-size:.88rem}
.fghint{margin:2px 6px 4px;line-height:1.35}
.favgroups{display:flex;flex-direction:column;gap:8px}
.favgrp{background:var(--card);border-radius:var(--r);box-shadow:0 1px 2px rgba(15,23,42,.06);overflow:hidden}
.favgrp.ungrouped{background:#fbfcfd}
.fgh{display:flex;align-items:stretch}
.fgtoggle{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;min-height:44px;padding:4px 6px 4px 10px;border:0;background:transparent;color:var(--ink);text-align:left;cursor:pointer;font:inherit;touch-action:manipulation}
.fgchev{flex:0 0 14px;color:var(--muted);font-size:.85rem}
.fgic{flex:0 0 auto;display:inline-flex;color:var(--teal)}.fgic svg,.fgtype svg,.fgsegb svg{width:16px;height:16px;fill:currentColor}
.favgrp.ungrouped .fgic{color:var(--muted)}
.fgname{flex:0 1 auto;min-width:0;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fgtype{flex:0 0 auto;display:inline-flex;align-items:center;gap:3px;font-size:.68rem;font-weight:600;padding:1px 7px 1px 5px;border-radius:999px;text-transform:uppercase;letter-spacing:.03em}
.fgtype svg{width:11px;height:11px}
.t-specialty.fgtype{background:var(--teal-l);color:var(--teal-d)}
.t-doctor.fgtype{background:#fff7ed;color:#9a3412}
.t-custom.fgtype{background:#f1f5f9;color:#475569}
.fgcount{margin-left:auto;flex:0 0 auto;min-width:26px;padding:1px 8px;border-radius:999px;background:#eef1f4;color:#334155;font-size:.8rem;font-weight:700;text-align:center}
.fgmenu{flex:0 0 44px;min-height:44px;border:0;border-left:1px solid #eef1f4;background:transparent;color:var(--teal-d);font-size:1.25rem;line-height:1;cursor:pointer;touch-action:manipulation}
@media (hover:hover){.fgtoggle:hover,.fgmenu:hover{background:rgba(15,118,110,.06)}}
.fgbody{border-top:1px solid #eef1f4}
.fgbody>.hit,#results .fgbody>.hit.compact{border:0;border-bottom:1px solid #f1f4f7;border-radius:0;background:transparent;box-shadow:none;min-height:40px}
.fgbody>.hit:last-child{border-bottom:0}
.fgbody>.hit.sel{background:#e6f3f2}
.fgempty{margin:0;padding:8px 12px;line-height:1.4}
.fgempty .linkbtn{padding:0;font-size:inherit}
.rowmenu{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;border-radius:8px;color:var(--teal-d);font-size:1.15rem;line-height:1;cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
@media (hover:hover){.rowmenu:hover{background:rgba(15,118,110,.08)}}
/* touch: 44px targets in groups and sheets */
html.phone .fgnew,html.phone .fgq input,html.phone .fgsort select{min-height:44px}
html.phone .fgbody>.hit,html.phone #results .fgbody>.hit.compact{min-height:44px}
html.phone .fgbody .star,html.phone .fgbody .rowmenu{min-width:44px;min-height:44px}
@media (pointer:coarse){.fgnew,.fgq input,.fgsort select{min-height:44px}.fgbody>.hit,#results .fgbody>.hit.compact{min-height:44px}.fgbody .star,.fgbody .rowmenu{min-width:44px;min-height:44px}}
/* sheets */
.fgback{position:fixed;inset:0;z-index:70;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;padding:16px}
.fgsheet{background:#fff;border-radius:16px;width:min(460px,100%);max-height:min(82vh,720px);display:flex;flex-direction:column;box-shadow:0 12px 40px rgba(15,23,42,.25)}
.fgsh{display:flex;align-items:center;gap:8px;padding:10px 6px 6px 16px;border-bottom:1px solid #eef1f4}
.fgsh h3{flex:1 1 auto;min-width:0;margin:0;font-size:1.05rem;color:var(--teal-d);overflow-wrap:anywhere}
.fgx{flex:0 0 44px;width:44px;height:44px;border:0;background:transparent;color:var(--muted);font-size:1.6rem;line-height:1;border-radius:10px;cursor:pointer}
.fgsb{padding:10px 16px 14px;overflow:auto;-webkit-overflow-scrolling:touch}
.fgsb p{margin:4px 0 8px}
.fgcode{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;line-height:1.35}.fgcode .muted{font-size:.88rem}
.fgnote{line-height:1.35}
.fgopts{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.fgopt{display:flex;align-items:center;gap:10px;min-height:44px;padding:6px 12px;border-bottom:1px solid #eef1f4;cursor:pointer}
.fgopt:last-child{border-bottom:0}
.fgopt input{flex:0 0 auto;width:20px;height:20px;margin:0;accent-color:var(--teal)}
.fgopt .fgname{flex:1 1 auto;font-weight:600}
.fgopt.fgpick .fgpl{flex:1 1 auto;min-width:0;line-height:1.3;font-size:.9rem}
.fgpicks{max-height:46vh;overflow:auto}
.fgsb .fgq{margin:0 0 8px}
.fgsub{font-weight:600;font-size:.9rem;margin:12px 0 6px!important}
.fgmove{display:flex;flex-wrap:wrap;gap:6px}.fgmove .chip{min-height:44px}
.fgacts{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:14px}
.fgacts button{min-height:44px}
.ghost.danger,.fgitem.danger{color:var(--danger);border-color:#fca5a5}
.fglist{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.fgitem{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:44px;padding:10px 14px;border:0;border-bottom:1px solid #eef1f4;background:#fff;color:var(--ink);text-align:left;font:inherit;cursor:pointer}
.fgitem:last-child{border-bottom:0}.fgitem:disabled{color:#a0aab6;cursor:default}
@media (hover:hover){.fgitem:not(:disabled):hover,.fgopt:hover{background:#f6faf9}}
.fgseg{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:2px 0 10px}
.fgsegb{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:6px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-weight:600;cursor:pointer}
.fgsegb[aria-checked="true"]{border-color:var(--teal);background:#e6f3f2;color:var(--teal-d);box-shadow:inset 0 0 0 1px var(--teal)}
.fglab{display:block;font-weight:600;font-size:.9rem;margin:4px 0}
.fginput{width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;font-size:16px}
.fginput:focus{outline:2px solid var(--teal);border-color:transparent}
.fghelp{margin:6px 0!important}
.fgspecs{display:flex;flex-wrap:wrap;gap:6px;max-height:190px;overflow:auto;padding:2px 0}
.fgspecs[hidden]{display:none}
.fgspecs .chip{min-height:40px;font-size:.85rem}
.fgerr{color:var(--danger);font-weight:600;margin:8px 0 0!important}
html.sheet-open{overflow:hidden}
@media (max-width:600px){
  .fgback{align-items:flex-end;padding:0}
  .fgsheet{width:100%;border-radius:16px 16px 0 0;max-height:88vh;padding-bottom:env(safe-area-inset-bottom)}
}
@media (max-width:480px){.fgsort>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.favtools .fgq{flex:1 1 150px}}
.fgtoggle,.fgmenu,.rowmenu,.fgnew,.fgitem,.fgopt,.fgsegb{-webkit-tap-highlight-color:rgba(15,118,110,.12)}
/* v35 linked favourites: fee code ↔ ICD-9 chips beside a favourite, link picker, snack bar */
#results{container-type:inline-size}
/* default (narrow list column on desktop, phones): the linked codes sit on a second line under the code, two chips per line */
.hit.compact.haslinks{flex-wrap:wrap;row-gap:2px}
.hit.compact.haslinks .cdesc{flex:1 1 0}
.hit.compact .lnks{order:9;flex:1 0 100%;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;padding:0 0 4px}
.lnkic{flex:0 0 auto;color:var(--muted);font-size:.8rem}
.lchip{position:relative;flex:0 1 auto;min-width:0;display:inline-flex;align-items:center;gap:4px;max-width:calc(50% - 38px);min-height:26px;padding:1px 8px;border:1px solid #99d6cf;border-radius:999px;background:#effaf8;color:var(--ink);font-size:.78rem;line-height:1.2;white-space:nowrap;cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:rgba(15,118,110,.12)}
/* wide list (single-column desktop/tablet): side by side on the same line as the code */
@container (min-width:640px){
  .hit.compact.haslinks{flex-wrap:nowrap}
  .hit.compact.haslinks .cdesc{flex:1 1 auto}
  .hit.compact .lnks{order:0;flex:0 0 auto;max-width:56%;flex-wrap:nowrap;overflow:hidden;padding:0}
  .lchip{max-width:12em;overflow:hidden}
}
.lchip .code{flex:0 0 auto;font-size:.78rem}
.lchip .ld{min-width:0;overflow:hidden;text-overflow:ellipsis;color:#334155;font-weight:400}
.lchip.k-H{border-color:#fdba74;background:#fff7ed}.lchip.k-H .code{color:#9a3412}
.lchip.ledit{flex:0 0 auto;padding:1px 9px;border-style:dashed;background:#fff;color:var(--teal-d);font-size:.85rem}
.lchip.static{cursor:default;max-width:100%}
.lchip:focus-visible{outline:2px solid var(--teal);outline-offset:1px}
@media (hover:hover){.lchip:not(.static):hover{filter:brightness(.96)}}
html.phone .lchip,html.phone .lchip .code{font-size:.82rem}
html.phone .lchip{min-height:34px}
html.phone .lchip::after{content:'';position:absolute;inset:-5px -2px}
@media (pointer:coarse){.lchip{min-height:34px}.lchip::after{content:'';position:absolute;inset:-5px -2px}}
.fgbody>.hit.compact.haslinks,#results .hit.compact.haslinks{padding-top:4px;padding-bottom:4px}
/* link section in the ⋯ sheet and the link picker */
.lksec{margin:2px 0 6px}
.lkn{font-weight:600;font-size:.8rem;color:var(--muted);margin-left:4px}
.lkchips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.lkedit{min-height:44px}
.lknone{margin:4px 2px 8px!important;line-height:1.35}
.lkcur{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:12px;overflow:hidden;margin:0 0 8px}
.lkcur:has(.lknone){border-style:dashed}
.lkrow{display:flex;align-items:center;gap:8px;min-height:44px;padding:2px 4px 2px 12px;border-bottom:1px solid #eef1f4}
.lkrow:last-child{border-bottom:0}
.lkd{flex:1 1 auto;min-width:0;font-size:.86rem;line-height:1.3;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.lkrm{flex:0 0 auto;min-height:40px;padding:4px 12px;font-size:.85rem;color:var(--danger);border-color:#fca5a5}
html.phone .lkrm{min-height:44px}@media (pointer:coarse){.lkrm{min-height:44px}}
.lkres{max-height:38vh;overflow:auto}
.lkres.empty{border:0}
.lkopt{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:6px 12px;border:0;border-bottom:1px solid #eef1f4;background:#fff;color:var(--ink);text-align:left;font:inherit;cursor:pointer;-webkit-tap-highlight-color:rgba(15,118,110,.12)}
.lkopt:last-child{border-bottom:0}
.lkopt .code{flex:0 0 auto}
.lkopt[aria-pressed="true"]{background:#e6f3f2}
.lkst{flex:0 0 auto;font-size:.8rem;font-weight:700;color:var(--teal-d);white-space:nowrap}
.lkopt.full .lkst{color:#94a3b8}
.lkopt:focus-visible{outline:2px solid var(--teal);outline-offset:-2px}
@media (hover:hover){.lkopt:hover{background:#f6faf9}.lkopt[aria-pressed="true"]:hover{background:#d9efec}}
.snack{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:55;display:flex;align-items:center;gap:6px;width:max-content;max-width:min(560px,calc(100vw - 20px));padding:6px 6px 6px 14px;border-radius:12px;background:#0f172a;color:#fff;font-size:.88rem;box-shadow:0 8px 24px rgba(15,23,42,.3)}
.snack[hidden]{display:none}
.snack .snt{flex:1 1 auto;min-width:0;line-height:1.3}
.snack .snb{flex:0 0 auto;min-height:40px;padding:0 12px;border:0;border-radius:10px;background:var(--teal-l);color:var(--teal-d);font-weight:700;font-size:.88rem;cursor:pointer}
.snack .snx{flex:0 0 auto;width:40px;min-height:40px;border:0;background:transparent;color:#cbd5e1;font-size:1.3rem;cursor:pointer;border-radius:10px}
html.phone .snack .snb,html.phone .snack .snx{min-height:44px}
html.picking .snack{bottom:calc(64px + env(safe-area-inset-bottom))}
/* v36 multi-code pick for MedBilling Logs: ＋ select buttons, the selection tray above the pick bar, and the modifier search */
.psel{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:30px;height:30px;margin-left:6px;border:1.5px solid var(--teal);border-radius:8px;background:#fff;color:var(--teal-d);font-size:1.05rem;font-weight:700;line-height:1;cursor:pointer;position:relative;-webkit-tap-highlight-color:transparent}
.psel.on{background:var(--teal);color:#fff}
.psel:focus-visible{outline:2px solid #f59e0b;outline-offset:1px}
@media (pointer:coarse){.psel::after{content:"";position:absolute;inset:-7px -4px}}
.hit.compact .psel{width:28px;height:28px;margin-left:4px}
.pselb{margin:8px 0 8px 8px}.pselb.on{background:var(--teal-l);border-color:var(--teal);color:var(--teal-d)}
.pickbar .pbplus{display:inline-block;padding:0 4px;border:1.5px solid var(--teal);border-radius:6px;background:#fff;color:var(--teal-d);font-weight:700}
.pickbar .pbmods{border-color:var(--teal);color:var(--teal-d)}
.picktray{position:fixed;left:0;right:0;bottom:var(--pbh,52px);z-index:59;display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;justify-content:space-between;padding:8px 12px;background:#fff;border-top:2px solid var(--teal);box-shadow:0 -4px 12px rgba(15,23,42,.12);max-height:45vh;overflow:hidden}
.picktray .ptrows{display:flex;flex-direction:column;gap:4px;flex:1 1 320px;min-width:0;max-height:calc(45vh - 64px);overflow-y:auto;overscroll-behavior:contain}
.picktray .ptg{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px}
.picktray .ptl{flex:0 0 6.4em;font-size:.78rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
.picktray .ptn{font-weight:600;color:#94a3b8;text-transform:none;letter-spacing:0}
.picktray .ptc{display:inline-flex;align-items:center;gap:4px;padding:2px 2px 2px 9px;border:1px solid var(--line);border-radius:999px;background:#f8fafc;font-size:.85rem;max-width:100%}
.picktray .ptc .code{font-weight:700}
.picktray .ptc.k-H{border-color:#fdba74;background:#fff7ed}.picktray .ptc.k-H .code{color:#9a3412}
.picktray .ptc.k-I{border-color:#99d5cf;background:#effaf8}.picktray .ptc.k-I .code{color:var(--teal-d)}
.picktray .ptc.k-M{border-color:#c4b5fd;background:#f5f3ff}.picktray .ptc.k-M .code{color:#5b21b6}
.picktray .ptf{font-size:.72rem;color:var(--muted)}
.picktray .ptx{width:28px;height:28px;border:0;border-radius:999px;background:transparent;color:var(--muted);font-size:1.15rem;line-height:1;cursor:pointer;position:relative}
@media (pointer:coarse){.picktray .ptx::after{content:"";position:absolute;inset:-6px -3px}}
.picktray .ptacts{display:flex;gap:8px;flex:0 0 auto;margin-left:auto}
.picktray .ptacts button{min-height:40px}
html.traying body{padding-bottom:calc(var(--pbh,52px) + var(--trayh,96px) + 12px + env(safe-area-inset-bottom))}
html.traying .toast,html.traying .snack{bottom:calc(var(--pbh,52px) + var(--trayh,96px) + 8px)}
@media (max-width:600px){
  .picktray{padding:6px 10px}
  .picktray .ptl{flex-basis:5.6em}
  .picktray{max-height:34vh}
  .picktray .ptrows{max-height:calc(34vh - 62px)}
  .picktray .ptc{font-size:.82rem;padding-left:7px}
  .picktray .ptx{width:26px;height:28px}
  .picktray .ptacts{flex:1 1 100%;justify-content:flex-end}
  .picktray .ptacts .primary{flex:1 1 auto}
}
.lchip.k-M{border-color:#c4b5fd;background:#f5f3ff}.lchip.k-M .code{color:#5b21b6}
.lkrow.k-M .lkm{font-size:.7rem;font-weight:700;color:#5b21b6;text-transform:uppercase;letter-spacing:.03em}
.lkseg{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:4px 0 8px}
.lkseg button{min-height:40px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-weight:600;cursor:pointer}
.lkseg button.on{border-color:var(--teal);background:var(--teal-l);color:var(--teal-d)}
.lkseg .lksn{font-weight:500;color:var(--muted);font-size:.8rem}
/* modifier search */
.modkinds{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 4px}
.modkinds .chip.on{background:var(--teal);border-color:var(--teal);color:#fff}
.modcount{margin:4px 2px 8px}
.modlist{display:flex;flex-direction:column;gap:6px}
.mtypehead{margin:14px 2px 2px;font-size:.95rem;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}
.modrow{background:var(--card);border-radius:10px;padding:8px 12px;box-shadow:0 1px 2px rgba(15,23,42,.06);border-left:4px solid #e2e8f0}
.modrow.mx{border-left-color:#a78bfa}
.modrow .mr1{display:flex;align-items:center;gap:8px;min-width:0}
.modrow .mr1 .code{font-weight:700;color:#5b21b6;flex:0 0 auto}
.modrow:not(.mx) .mr1 .code{color:#475569}
.modrow .mname{flex:1 1 auto;min-width:0;font-weight:600;overflow-wrap:anywhere}
.modrow .mr2{display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;margin-top:2px;font-size:.78rem;color:var(--muted)}
.modrow .badge.mk-E{background:#ede9fe;color:#5b21b6;margin:0}.modrow .badge.mk-I{background:#f1f5f9;color:#475569;margin:0}
.modrow .mdesc{margin-top:4px;font-size:.88rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.modrow .mmore{margin-top:4px;font-size:.85rem}
.modrow .mmore summary{cursor:pointer;color:var(--teal-d);font-weight:600;min-height:32px;display:flex;align-items:center}
.modrow .mmore p{margin:4px 0}
.modsrc{margin:14px 2px 4px;line-height:1.45}
html.picking .modrow.mx{cursor:pointer}
@media (hover:hover){html.picking .modrow.mx:hover{outline:2px solid #f59e0b;outline-offset:-2px}}

/* v38 code groups: sort toggle (A–Z / Recent / My order), last used, modifiers in a group, Send group (multi-code pick), Modifiers tab "+ Group" */
.fgsort{flex-wrap:nowrap}
.fgsortb{min-height:36px;padding:0 11px;border:1px solid var(--line);margin-left:-1px;background:#fff;color:var(--ink);font-size:.82rem;font-weight:600;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:rgba(15,118,110,.12)}
.fgsort>span+.fgsortb,.fgsort>.fgsortb:first-child{border-radius:10px 0 0 10px;margin-left:0}
.fgsortb:last-child{border-radius:0 10px 10px 0}
.fgsortb[aria-checked="true"]{position:relative;z-index:1;border-color:var(--teal);background:var(--teal-l);color:var(--teal-d)}
.fgsortb:focus-visible,.fgsend:focus-visible,.mgrp:focus-visible{outline:2px solid var(--teal);outline-offset:1px}
html.phone .fgsortb{min-height:44px}
@media (pointer:coarse){.fgsortb{min-height:44px}}
.fgwhen{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.72rem;color:var(--muted)}
.fgname{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fgsend{flex:0 0 auto;align-self:center;margin:0 4px;min-height:34px;padding:0 14px;border:0;border-radius:999px;background:var(--teal);color:#fff;font-size:.82rem;font-weight:700;cursor:pointer;touch-action:manipulation}
html.phone .fgsend{min-height:40px}
@media (pointer:coarse){.fgsend{min-height:40px}}
#results .hit.gmod .ccode{color:#5b21b6}
.fgused{margin:0 0 6px}
.fgaddseg{gap:4px}
.fgaddseg button{padding:0 4px;font-size:.85rem}
.lkopt.k-M .code,.gsend .k-M .code{color:#5b21b6}
.gsend .fgopt .code{flex:0 0 auto;font-weight:700}
.gsend .fgopt .fgpl{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.88rem;color:var(--muted)}
.gsover{margin:4px 0}
.mgrp{flex:0 0 auto;margin-left:auto;min-height:28px;padding:0 10px;border:1px solid #c4b5fd;border-radius:999px;background:#fff;color:#5b21b6;font-size:.76rem;font-weight:600;cursor:pointer;white-space:nowrap;touch-action:manipulation}
html.phone .mgrp{min-height:36px}
@media (pointer:coarse){.mgrp{min-height:36px}}
@media (max-width:480px){.fgh:has(.fgsend) .fgtype span,.fgtoggle:has(.fgwhen) .fgtype span{display:none}.fgh:has(.fgsend) .fgtype,.fgtoggle:has(.fgwhen) .fgtype{padding:1px 4px}.fgsortb{padding:0 9px}}
.fgaddseg.n2{grid-template-columns:1fr 1fr}.fgaddseg.n3{grid-template-columns:repeat(3,1fr)}.fgaddseg.n4{grid-template-columns:repeat(4,1fr)}
.gmod .gsp{flex:0 0 auto;min-width:32px}html.phone .gmod .gsp{min-width:44px}@media (pointer:coarse){.gmod .gsp{min-width:44px}}
/* v39 slim Favourites (Jose Oct 9): every favourite is ONE line: code · description … · linked chips · fee · ★ · ⋯.
   The description truncates first; only the linked chips wrap (inside their own box) when they really don't fit.
   Chips show just the code in a narrow list and code + short title when the list is wide. */
.hit.compact.haslinks,#results .hit.compact.haslinks{flex-wrap:nowrap;row-gap:0;padding-top:2px;padding-bottom:2px}
.hit.compact.haslinks .cdesc{flex:1 1 3em;min-width:2.5em}
.hit.compact .lnks{order:0;flex:0 1 auto;min-width:0;max-width:none;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:3px 4px;padding:0;overflow:visible}
.hit.compact .lnkic{display:none}
.hit.compact .lchip{flex:0 0 auto;max-width:none;min-height:22px;padding:0 6px;gap:3px;font-size:.74rem;line-height:1.15}
.hit.compact .lchip .code{font-size:.74rem}
.hit.compact .lchip .ld{display:none}
.hit.compact .lchip.ledit{padding:0 6px;font-size:.78rem}
.hit.compact .lchip::after{content:'';position:absolute;inset:-6px -2px}
@container (min-width:640px){
  .hit.compact .lnks{flex-wrap:nowrap;max-width:52%;overflow:hidden;justify-content:flex-start}
  .hit.compact .lchip{flex:0 1 auto;min-width:3.6em;max-width:13em;overflow:hidden}
  .hit.compact .lchip.ledit{flex:0 0 auto;min-width:0}
  .hit.compact .lchip .ld{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis}
  .hit.compact.haslinks .cdesc{flex:1 1 8em}
}
@container (min-width:960px){.hit.compact .lchip{max-width:17em}.hit.compact .lnks{max-width:50%}}
html.phone .hit.compact .lchip,html.phone .hit.compact .lchip .code{font-size:.78rem}
html.phone .hit.compact .lchip{min-height:28px}
@media (pointer:coarse){.hit.compact .lchip{min-height:28px}.hit.compact .lchip::after{inset:-8px -2px}}
/* tighter spacing between favourite / recent rows */
#results.list:has(#savedFav){gap:4px}
#results .fgbody>.hit.compact{min-height:38px}
/* home view (Favourites / Recent, no code open) on a large screen: the list uses the full width instead of the 420px column */
@media(min-width:900px){.split:has(> #detail[hidden]):has(#savedFav){grid-template-columns:1fr}}
/* v39 narrow lists (phones, the 420px column next to an open code): smaller chips (code only), description gets room first */
@container (max-width:639.98px){
  .hit.compact.haslinks .cdesc{flex:1 1 2.5em;min-width:2.5em}
  #results .hit.compact.haslinks{gap:5px}
  .hit.compact .lchip.ledit{min-width:20px;padding:0 3px;border-color:#cbd5e1;justify-content:center}
}
html.phone .hit.compact .lchip{min-height:24px;padding:0 4px}
html.phone .hit.compact .lchip::after{inset:-10px -1px}
@media (pointer:coarse){.hit.compact .lchip{min-height:24px}.hit.compact .lchip::after{inset:-10px -1px}}

/* v40: detail close + Favourites manager */
.detail{position:relative}
.dclose{float:right;margin:-4px -4px 4px 8px;width:36px;height:36px;border-radius:50%;border:1px solid #cbd5e1;background:#fff;font-size:1.05rem;line-height:1;cursor:pointer;color:#334155}
.dclose:hover{background:#f1f5f9}
@media(min-width:900px){.split:has(> #detail[hidden]){grid-template-columns:minmax(320px,760px)}}
.fmtools{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:8px 0}
.fmtools .inputwrap{flex:1 1 240px}
.fmtools input{width:100%}
.fmlist{background:var(--card);border-radius:var(--r);box-shadow:0 1px 2px rgba(15,23,42,.06)}
.fmhead,.fmrow{display:grid;grid-template-columns:28px minmax(0,1.4fr) minmax(64px,.8fr) minmax(0,1fr) auto;gap:6px;align-items:center;padding:6px 8px;border-bottom:1px solid #e2e8f0}
.fmhead{grid-template-columns:28px minmax(0,1.4fr) minmax(64px,.8fr) minmax(0,1fr) auto;font-size:.8rem;font-weight:600;color:#64748b}
.fmhead span:first-child{grid-column:2}
.fmname,.fmdx{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fmcode{font-weight:700}
.fmexp,.fmact button{min-width:30px;height:30px;border:1px solid #cbd5e1;background:#fff;border-radius:6px;cursor:pointer}
.fmexp{border:0;background:none}
.fmact{display:flex;gap:4px}
.fmact button:disabled{opacity:.35;cursor:default}
.fmdesc{grid-column:2/-1;color:#334155}
@media(max-width:560px){.fmhead,.fmrow{grid-template-columns:24px minmax(0,1fr) auto;row-gap:2px}.fmhead{display:none}.fmname{grid-column:2}.fmcode{grid-column:2;grid-row:2}.fmdx{grid-column:2;grid-row:3;font-size:.85rem;color:#475569}.fmact{grid-column:3;grid-row:1/4}.fmact button{min-width:34px;height:34px}}
.fmtools .fmnew{font-weight:700;white-space:nowrap}
@media (max-width:600px){.fmtools .fmnew{flex:1 1 100%}}
.nfline{border:1px solid var(--line,#ddd);border-radius:10px;padding:8px;margin:8px 0}.nflh{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.nfadd{margin:4px 0 8px}.fmb .badge{font-size:.75em}
/* v42 code-first rows: code · short label · price · [ICD-9] */
.hit .lft{min-width:0}
.hit .hshort{margin:0 6px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.hit.compact .fee{flex:0 0 auto}
.hit.compact.codefirst .lnks{flex-wrap:nowrap;overflow:hidden}.hit.compact.codefirst .lchip{min-width:0;flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* v42 S4: short labels never truncate; the chips give way and take the ellipsis */
.hit.compact .cdesc.short{flex:0 0 auto;overflow:visible;text-overflow:clip}
@media (max-width:600px){.hit.compact .cdesc.short{flex:0 1 auto;min-width:min-content;white-space:normal;overflow-wrap:normal;word-break:keep-all;line-height:1.2}}
.hit.compact .cdesc.short~.lnks{flex:0 1 auto;min-width:0;max-width:none;flex-wrap:nowrap;overflow:hidden}
.hit.compact .cdesc.short~.lnks .lchip{min-width:1.5em;flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hit .row1 .code{flex:0 0 auto;white-space:nowrap}
.hit .hshort{flex:0 1 auto;min-width:min-content;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:normal;word-break:keep-all}
@media (max-width:600px){.hit .row1{flex-wrap:wrap;row-gap:2px}.hit .row1 .lft{min-width:auto;flex:0 1 auto}.hit .hshort{white-space:nowrap}}
/* pick-safe search cards: the ☆ star and the pick-mode "Details" pill sit on the card edge with their own >=44px hit areas,
   so a tap anywhere else on the card (incl. its centre) is the row itself -> in pick mode it always returns the pick */
#results .hit:not(.compact){position:relative;padding-right:52px;min-height:88px}
#results .hit:not(.compact) .star{position:absolute;top:0;right:0;width:48px;height:44px;margin:0;display:flex;align-items:center;justify-content:center;z-index:1}
#results .hit:not(.compact) .pdet{position:absolute;right:4px;bottom:4px;margin:0;min-height:44px;min-width:44px;justify-content:center;z-index:1}
#results .hit:not(.compact):has(.pdet){padding-bottom:52px}
@media (max-width:600px){html.picking #results .hit.compact{flex-wrap:wrap;row-gap:2px;max-width:100%;min-width:0}html.picking #results .hit.compact .cdesc.short{min-width:0;flex:1 1 auto}}
.fee.lkp{flex:0 0 auto;font-size:.82rem;font-weight:700;white-space:nowrap;color:var(--ink);margin-left:auto}
/* v44 (Jose OK 2026-10-22): search cards show no full-description line. .hdesc stays in the DOM (aria-hidden; the full text is in
   the card's aria-label and the label's title) as an invisible layer under the row, so a tap on it is still the card itself
   (MedBilling Logs multipick-v9l taps .hdesc). row1 sits above it so ☆, ＋ and Details stay reachable. */
#results .hit:not(.compact) .hdesc,html.phone #results .hit:not(.compact) .hdesc{position:absolute;inset:0;display:block;opacity:0;overflow:hidden;color:transparent;pointer-events:none;margin:0;padding:0}
/* M1-b Should: in pick mode on narrow lists the linked chips also show their short label (code + label); the chip takes the
   ellipsis when space is short, the row's own label is never cut (it keeps its room first) */
@container (max-width:639.98px){
  html.picking .hit.compact .lchip:not(.ledit){flex:0 100 auto;min-width:3.6em;max-width:11em;overflow:hidden}
  html.picking .hit.compact .lchip .ld{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
/* M1-d: a linked chip never shrinks below its full code. The chip is a two-column grid (code | label) whose minimum is the code
   alone (label column minmax(0,…)), so on narrow lists (360/375/390) only the label takes the ellipsis, never the code */
.hit.compact .lchip[data-lk]{display:inline-grid;grid-auto-flow:column;grid-template-columns:max-content minmax(0,max-content);align-items:center;min-width:min-content!important;text-overflow:clip}
.hit.compact .lchip[data-lk] .code{white-space:nowrap}
.hit.compact .lchip[data-lk] .ld{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hit.compact .lnks:has(.lchip[data-lk]){min-width:min-content!important;flex-shrink:40}
/* M1-e: the toast lies over the sticky app bar (top, full width, the bar's height) at every width, so it never covers
   list rows, the selection tray or the pick bar */
#toast.toast{top:0;bottom:auto!important;left:0;right:0;transform:none;max-width:none;box-sizing:border-box;height:var(--toph,56px);padding:env(safe-area-inset-top) 14px 0;border-radius:0;display:flex;align-items:center;justify-content:center;text-align:center;font-size:.86rem;line-height:1.25;overflow:hidden;z-index:70}
#toast.toast[hidden]{display:none}
/* M1-e: fee row tapped in a Dx pick */
@keyframes mbnope{0%,100%{transform:translateX(0)}20%{transform:translateX(-5px)}40%{transform:translateX(5px)}60%{transform:translateX(-3px)}80%{transform:translateX(3px)}}
#results .hit.nope{animation:mbnope .45s ease;box-shadow:0 0 0 2px #dc2626 inset;background:#fef2f2}
@media (prefers-reduced-motion:reduce){#results .hit.nope{animation:none}}
.pickno{margin:8px 0;padding:8px 10px;border-radius:8px;background:#fff7ed;color:#9a3412;font-size:.9rem}
/* M1-e: chip codes keep their full width, so on tight rows the short description gives way: at most two lines
   (ellipsis on the second), never three, keeping slim rows (≤46/50px phone, ≤40px desktop column) */
.hit.compact.haslinks .cdesc.short{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
/* M1-e: narrow lists (<400px container: 360/375/390 phones): only the code chips wrap, inside their own chip group
   (e.g. ✎ under the ICD chip); the row never wraps, so ★ and ⋯ stay on line 1. Wider lists (430 phones, desktop) are unchanged */
@container (max-width:399.98px){
  #results .hit.compact.haslinks{gap:4px;padding-left:6px}
  #results .hit.compact .lnks:has(.lchip[data-lk]){flex-wrap:wrap;row-gap:2px;column-gap:3px;min-width:min-content!important;max-width:none;align-content:center}
  #results .hit.compact .lnks:has(.lchip[data-lk] ~ .lchip[data-lk] ~ .lchip[data-lk]){min-width:4.7rem!important}
}
