/* The tool finder's app page (/tool-finder/app/), built on AI Visibility Tools' own tokens (theme.css): Inter for
   text, JetBrains Mono for figures, labels and data, hairline rules, tinted fills for what's picked. Redrawn as an
   app: a bar, a filter rail, stat tabs, a ranked list whose rows open to their evidence, a compare tray. States are
   dots and words; a picked or highlighted thing is a tint or a full hairline, never a stripe down one side. */

.tf-app{--bar:48px;--rail:292px;--mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;--r:10px;--r-ctl:7px;
  font-size:14px;line-height:1.45;min-height:100vh;display:flex;flex-direction:column}
.tf-app main{padding:0;flex:1 0 auto}
.tf-app p,.tf-app li{max-width:none}
:where(.tf-app) :is(h1,h2,h3){margin:0;text-wrap:pretty}
:where(.tf-app) button{font:inherit;color:inherit}
:where(.tf-app) svg{width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.tf-app :focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tf-vh{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.tf-skip{position:absolute;left:8px;top:-40px;z-index:100;background:var(--surface);color:var(--ink);border:1px solid var(--rule-2);border-radius:6px;padding:6px 10px}
.tf-skip:focus{top:8px}
.tf-k{font-family:var(--mono);font-size:.66rem;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.tf-hint{font-size:.78rem;line-height:1.4;color:var(--muted);margin:6px 0 0}
.tf-gap,.tf-bar-gap,.tf-toolbar-gap{flex:1 1 auto}
.tf-fine{font-size:.74rem;color:var(--muted);margin:10px 2px 0}
.tf-fine a{color:var(--muted)}

/* ---------- buttons ---------- */
.tf-btn{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border:1px solid var(--rule-2);border-radius:var(--r-ctl);background:var(--surface);color:var(--ink-2);font-size:.8rem;font-weight:550;cursor:pointer;white-space:nowrap}
.tf-btn:hover{border-color:var(--accent);color:var(--ink)}
.tf-btn[disabled]{opacity:.5;cursor:not-allowed;border-color:var(--rule-2);color:var(--ink-2)}
.tf-primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.tf-primary:hover{color:var(--accent-ink);filter:brightness(1.07)}
.tf-icon-only{width:30px;padding:0;justify-content:center}
.tf-link{background:none;border:0;padding:0;color:var(--accent);font-size:.8rem;cursor:pointer;text-decoration:underline;text-underline-offset:.18em;text-decoration-thickness:1px}
.tf-x{display:inline-grid;place-items:center;width:28px;height:28px;border:0;border-radius:6px;background:none;color:var(--muted);cursor:pointer}
.tf-x:hover{background:var(--surface-2);color:var(--ink)}

/* ---------- app bar ---------- */
.tf-bar{position:sticky;top:0;z-index:30;height:var(--bar);display:flex;align-items:center;gap:8px;padding:0 max(14px,env(safe-area-inset-left,0px)) 0 max(14px,env(safe-area-inset-left,0px));background:var(--surface);border-bottom:1px solid var(--rule)}
.tf-brand{font-size:.9rem;gap:9px}
.tf-brand .brand-mark{width:16px;height:16px;background:
  linear-gradient(var(--accent),var(--accent)) 0 0/7px 7px no-repeat,
  linear-gradient(var(--accent),var(--accent)) 9px 0/7px 7px no-repeat,
  linear-gradient(var(--accent),var(--accent)) 0 9px/7px 7px no-repeat,
  linear-gradient(var(--tint-2),var(--tint-2)) 9px 9px/7px 7px no-repeat}
.tf-crumb{color:var(--rule-2);font-size:1.1rem;font-weight:300}
.tf-appname{font-weight:650;font-size:.92rem;letter-spacing:-.01em;white-space:nowrap}
.tf-bar-actions{display:flex;align-items:center;gap:2px}
.tf-ab{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 9px;border:0;border-radius:7px;background:none;color:var(--ink-2);font-size:.8rem;font-weight:550;text-decoration:none;cursor:pointer;white-space:nowrap;list-style:none}
.tf-ab::-webkit-details-marker{display:none}
.tf-ab:hover{background:var(--surface-2);color:var(--ink)}
.tf-ab-n{font-family:var(--mono);font-size:.66rem;font-weight:600;color:var(--tint-ink);background:var(--tint);border-radius:4px;padding:0 5px;line-height:1.6}
.tf-ab-short{display:none}
.tf-pages{position:relative;padding:0}
.tf-pages[open] > .tf-ab{background:var(--surface-2);color:var(--ink)}
.tf-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:40;min-width:230px;padding:5px;background:var(--surface);border:1px solid var(--rule-2);border-radius:9px;box-shadow:0 12px 28px -14px rgba(20,16,40,.35);display:grid}
.tf-menu a{display:block;padding:6px 9px;border-radius:6px;color:var(--ink-2);text-decoration:none;font-size:.84rem}
.tf-menu a:hover{background:var(--surface-2);color:var(--ink)}
.tf-menu a[aria-current="page"]{background:var(--tint);color:var(--tint-ink);font-weight:600}
.tf-menu-alt{border-top:1px solid var(--rule);margin-top:4px;padding-top:9px!important;border-radius:0 0 6px 6px!important}

/* ---------- the two columns ---------- */
.tf-grid{display:grid;grid-template-columns:var(--rail) minmax(0,1fr);grid-template-rows:auto 1fr;align-items:start;min-height:calc(100vh - var(--bar))}
.tf-rail{grid-column:1;grid-row:1 / span 2;position:sticky;top:var(--bar);height:calc(100vh - var(--bar));overflow-y:auto;overscroll-behavior:contain;background:var(--surface);border-right:1px solid var(--rule);padding:14px 16px 28px;scrollbar-width:thin}
.tf-ws{grid-column:2;grid-row:2;min-width:0;padding:0 clamp(14px,2vw,24px) 120px}

/* ---------- the rail ---------- */
.tf-rail-head{display:flex;align-items:center;gap:10px}
.tf-rail-head h2{font-size:.95rem;font-weight:650;letter-spacing:-.01em;flex:1}
.tf-rail-done,.tf-rail-foot{display:none}
.tf-rail-hint{font-size:.76rem;line-height:1.4;color:var(--muted);margin:4px 0 4px}
.tf-f{padding:14px 0 15px;border-bottom:1px solid var(--rule)}
.tf-f:last-child{border-bottom:0}
.tf-h{display:flex;align-items:baseline;gap:8px;font-family:var(--mono);font-size:.66rem;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin:0 0 9px!important}
.tf-h label{cursor:pointer}
.tf-h-aside{margin-left:auto;font-weight:500;letter-spacing:.02em;text-transform:none;font-size:.7rem;color:var(--ink-2)}
.tf-err{font-size:.78rem;color:var(--no);margin:6px 0 0}
.tf-n{font-family:var(--mono);font-size:.7rem;font-style:normal;font-variant-numeric:tabular-nums;color:var(--muted);min-width:2ch;text-align:right}
.tf-n.is-zero{color:var(--rule-2)}

/* prompts: a stepper and presets */
.tf-stepper{display:grid;grid-template-columns:34px minmax(0,1fr) 34px;height:36px;border:1px solid var(--rule-2);border-radius:var(--r-ctl);overflow:hidden;background:var(--surface)}
.tf-stepper:focus-within{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.tf-stepper button{border:0;background:var(--surface-2);color:var(--ink-2);cursor:pointer;display:grid;place-items:center}
.tf-stepper button:hover{background:var(--surface-3);color:var(--ink)}
.tf-stepper input{width:100%;min-width:0;border:0;border-inline:1px solid var(--rule);background:var(--surface);color:var(--ink);font-family:var(--mono);font-size:1rem;font-weight:600;text-align:center;font-variant-numeric:tabular-nums;-moz-appearance:textfield;appearance:textfield}
.tf-stepper input:focus{outline:none}
.tf-stepper input::-webkit-outer-spin-button,.tf-stepper input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.tf-stepper[data-invalid] {border-color:var(--no);box-shadow:0 0 0 1px var(--no)}
.tf-presets{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}
.tf-presets button{height:24px;padding:0 8px;border:1px solid var(--rule-2);border-radius:999px;background:var(--surface);color:var(--ink-2);font-family:var(--mono);font-size:.7rem;cursor:pointer}
.tf-presets button:hover{border-color:var(--accent);color:var(--ink)}
.tf-presets button[aria-pressed="true"]{background:var(--tint);border-color:var(--accent);color:var(--tint-ink);font-weight:600}

/* engines: a checklist with counts */
.tf-checks,.tf-switches{list-style:none;margin:0;padding:0;display:grid;gap:1px}
.tf-checks label{display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:30px;padding:3px 7px;margin:0 -7px;border-radius:6px;cursor:pointer;font-size:.84rem;color:var(--ink)}
.tf-checks label:hover{background:var(--surface-2)}
.tf-checks input,.tf-switches input,.tf-budgets input,.tf-seg input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
.tf-box{width:16px;height:16px;border:1px solid var(--rule-2);border-radius:4px;background:var(--surface);display:grid;place-items:center}
.tf-box::after{content:"";width:8px;height:4.5px;border-left:1.8px solid var(--accent-ink);border-bottom:1.8px solid var(--accent-ink);transform:translateY(-1px) rotate(-45deg);opacity:0}
.tf-checks input:checked + .tf-box{background:var(--accent);border-color:var(--accent)}
.tf-checks input:checked + .tf-box::after{opacity:1}
.tf-checks input:focus-visible + .tf-box{outline:2px solid var(--accent);outline-offset:2px}
.tf-checks input:checked ~ .tf-nm{font-weight:600}
.tf-nm{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* budget: bars, then the choices */
.tf-hist{display:flex;align-items:flex-end;gap:2px;height:46px;padding:0 1px;border-bottom:1px solid var(--rule-2);margin:0 0 10px}
.tf-hist i{flex:1 1 0;min-width:0;background:var(--rule-2);border-radius:2px 2px 0 0}
.tf-hist i.none{background:transparent!important}
.tf-hist-axis{position:relative;height:12px;font-family:var(--mono);font-size:.6rem;color:var(--muted);margin:-7px 0 10px}
.tf-hist-axis span{position:absolute;top:0;white-space:nowrap}
.tf-hist-axis span:last-child{right:0;left:auto!important}
.tf-budgets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
.tf-budgets label{position:relative;display:flex;cursor:pointer}
.tf-budgets label > span{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-height:40px;padding:4px 2px;border:1px solid var(--rule-2);border-radius:var(--r-ctl);background:var(--surface);text-align:center}
.tf-budgets b{font-family:var(--mono);font-size:.74rem;font-weight:600;color:var(--ink-2);white-space:nowrap}
.tf-budgets .tf-n{text-align:center;font-size:.64rem;min-width:0}
.tf-budgets label:hover > span{border-color:var(--accent)}
.tf-budgets input:checked + span{background:var(--tint);border-color:var(--accent)}
.tf-budgets input:checked + span b,.tf-budgets input:checked + span .tf-n{color:var(--tint-ink)}
.tf-budgets input:focus-visible + span{outline:2px solid var(--accent);outline-offset:2px}
.tf-budget-custom{grid-column:span 4}
.tf-budget-custom > span{flex-direction:row!important;justify-content:flex-start!important;gap:6px!important;padding:0 10px!important;min-height:34px!important}
.tf-budget-custom input[type="number"]{position:static;opacity:1;width:7rem;height:24px;pointer-events:auto;border:0;background:transparent;color:var(--ink);font-family:var(--mono);font-size:.8rem;font-weight:600;-moz-appearance:textfield;appearance:textfield}
.tf-budget-custom input[type="number"]:focus{outline:none}
.tf-budget-custom input[type="number"]::-webkit-outer-spin-button,.tf-budget-custom input[type="number"]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}

/* work: a segmented control */
.tf-seg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:3px;background:var(--surface-2);border:1px solid var(--rule);border-radius:9px}
.tf-seg label{display:flex;cursor:pointer}
.tf-seg label > span{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:42px;padding:4px 3px;border:1px solid transparent;border-radius:6px;text-align:center}
.tf-seg b{font-size:.76rem;font-weight:600;color:var(--ink-2);line-height:1.2}
.tf-seg .tf-n{text-align:center;min-width:0;font-size:.64rem;margin-top:2px}
.tf-seg label:hover > span{background:var(--surface-3)}
.tf-seg input:checked + span{background:var(--surface);border-color:var(--rule-2);box-shadow:0 1px 2px rgba(20,16,40,.08)}
.tf-seg input:checked + span b{color:var(--ink)}
.tf-seg input:focus-visible + span{outline:2px solid var(--accent);outline-offset:1px}

/* must-haves: switches with counts */
.tf-switches label{display:grid;grid-template-columns:minmax(0,1fr) auto 30px;align-items:center;gap:10px;min-height:32px;padding:3px 7px;margin:0 -7px;border-radius:6px;cursor:pointer;font-size:.84rem}
.tf-switches label:hover{background:var(--surface-2)}
.tf-switches .tf-nm{white-space:normal;line-height:1.3}
.tf-switch{position:relative;width:30px;height:17px;border-radius:999px;background:var(--rule-2);transition:background-color .15s}
.tf-switch::after{content:"";position:absolute;left:2px;top:2px;width:13px;height:13px;border-radius:50%;background:var(--surface);box-shadow:0 1px 2px rgba(20,16,40,.25);transition:transform .15s}
.tf-switches input:checked + .tf-switch{background:var(--accent)}
.tf-switches input:checked + .tf-switch::after{transform:translateX(13px)}
.tf-switches input:focus-visible + .tf-switch{outline:2px solid var(--accent);outline-offset:2px}
.tf-switches input:checked ~ .tf-switch,.tf-switches label:has(input:checked) .tf-nm{font-weight:600}

/* ---------- workspace head ---------- */
.tf-ws-head{grid-column:2;grid-row:1;min-width:0;display:flex;align-items:flex-start;gap:16px;padding:16px clamp(14px,2vw,24px) 12px}
.tf-ws-title{flex:1;min-width:0}
.tf-ws-title h1{font-size:1.25rem;line-height:1.25;font-weight:700;letter-spacing:-.02em;max-width:none}
.tf-ws-line{font-size:.82rem;color:var(--muted);margin:3px 0 0}
.tf-status{display:inline-flex;align-items:center;gap:7px;margin:4px 0 0;font-family:var(--mono);font-size:.7rem;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.tf-status-dot{width:7px;height:7px;border-radius:2px;background:var(--ok)}
.tf-status[data-state="running"] .tf-status-dot{background:var(--accent);animation:tf-blink 1s steps(2,start) infinite}
.tf-status[data-state="error"] .tf-status-dot{background:var(--no)}
.tf-status[data-state="idle"] .tf-status-dot{background:var(--rule-2)}
@keyframes tf-blink{to{visibility:hidden}}
.tf-mbar{display:none}

/* ---------- first visit ---------- */
.tf-start{position:relative;display:grid;grid-template-columns:minmax(200px,300px) minmax(0,1fr);align-items:center;gap:10px 18px;margin:0 0 12px;padding:10px 44px 10px 14px;border:1px solid var(--tint-2);border-radius:var(--r);background:var(--tint)}
@media (max-width:1180px){.tf-start{grid-template-columns:1fr}}
.tf-start[hidden]{display:none}
.tf-start-text p{margin:0;font-size:.84rem;color:var(--ink-2)}
.tf-start-text .tf-k{color:var(--tint-ink);margin-bottom:3px}
.tf-examples{display:flex;flex-wrap:wrap;gap:6px}
.tf-examples .tf-ex{flex:1 1 160px}
.tf-ex{display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:6px 10px;border:1px solid var(--tint-2);border-radius:8px;background:var(--surface);cursor:pointer;text-align:left}
.tf-ex:hover{border-color:var(--accent)}
.tf-ex b{font-size:.8rem;font-weight:650}
.tf-ex span{font-family:var(--mono);font-size:.64rem;line-height:1.4;color:var(--muted)}
.tf-start .tf-x{position:absolute;top:8px;right:8px}

/* ---------- our pick: pinned first in the list ---------- */
.tf-item.is-pick{margin:5px;border:1.5px solid var(--accent);border-radius:9px;overflow:hidden}
.tf-item.is-pick > .tf-row{padding-inline:7.5px}
.tf-item.is-pick + .tf-item{border-top:0}
.tf-pick-badge{display:inline-block;width:min-content;font-family:var(--mono);font-size:.54rem;font-weight:600;line-height:1.15;letter-spacing:.07em;text-transform:uppercase;text-align:center;color:var(--accent-ink);background:var(--accent);border-radius:4px;padding:3px 4px}
.tf-eng i.miss{border:1.5px dashed var(--warn)}
.tf-chip.miss{text-decoration:line-through;color:var(--muted);border-style:dashed}
.tf-pick-why{font-weight:600;color:var(--ink)!important}
.tf-pick-status{display:flex;align-items:center;gap:7px;font-weight:650;color:var(--ink)!important}
.tf-pick-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.tf-pick-actions a.tf-btn{text-decoration:none}

/* ---------- stat tabs ---------- */
.tf-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(0,1.35fr);border:1px solid var(--rule);border-radius:var(--r);background:var(--surface);overflow:hidden;margin:0 0 10px}
.tf-tab,.tf-cheap{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:10px 14px 11px;border:0;border-right:1px solid var(--rule);background:none;text-align:left;min-width:0}
.tf-tab{cursor:pointer}
.tf-tab:hover{background:var(--surface-2)}
.tf-tab[aria-selected="true"]{background:var(--tint)}
.tf-tab[aria-selected="true"] .tf-tab-k,.tf-tab[aria-selected="true"] b{color:var(--tint-ink)}
.tf-tab:focus-visible{outline-offset:-2px}
.tf-tab-k{display:inline-flex;align-items:center;gap:6px;font-size:.74rem;font-weight:550;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.tf-tab b,.tf-cheap b{font-family:var(--mono);font-size:1.45rem;font-weight:600;letter-spacing:-.02em;line-height:1.15;color:var(--ink);font-variant-numeric:tabular-nums;min-height:1.15em;display:flex;align-items:center}
.tf-cheap{border-right:0}
.tf-cheap-name{font-size:.74rem;color:var(--ink-2);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tf-dot{display:inline-block;width:8px;height:8px;border-radius:2px;flex:none;background:var(--muted)}
.tf-dot.is-fit{background:var(--ok)}
.tf-dot.is-over{background:var(--warn)}
.tf-dot.is-ask{background:var(--accent)}
.tf-dot.is-no{background:transparent;border:1.5px solid var(--muted)}
.tf-sk{display:inline-block;width:2.2em;height:.8em;border-radius:4px;background:var(--surface-3)}

/* ---------- toolbar ---------- */
.tf-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 10px}
.tf-sel select{height:30px;padding:0 28px 0 10px;border:1px solid var(--rule-2);border-radius:var(--r-ctl);background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 6.5l3 3 3-3' fill='none' stroke='%23666276' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 7px center/14px;color:var(--ink);font:inherit;font-size:.8rem;font-weight:550;-webkit-appearance:none;appearance:none;cursor:pointer}
.tf-sel select:hover{border-color:var(--accent)}
.tf-search{position:relative;display:flex;align-items:center;height:30px;width:min(240px,100%);border:1px solid var(--rule-2);border-radius:var(--r-ctl);background:var(--surface);padding:0 8px;gap:6px;color:var(--muted)}
.tf-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.tf-search input{flex:1;min-width:0;border:0;background:none;color:var(--ink);font:inherit;font-size:.8rem;height:100%}
.tf-search input:focus{outline:none}
.tf-search kbd{font-family:var(--mono);font-size:.64rem;border:1px solid var(--rule-2);border-radius:4px;padding:0 5px;line-height:1.5;color:var(--muted)}
.tf-search:focus-within kbd{display:none}
.tf-actions{display:flex;align-items:center;gap:6px}
.tf-menuwrap{position:relative}
.tf-pop{position:absolute;right:0;top:calc(100% + 5px);z-index:20;min-width:210px;padding:5px;background:var(--surface);border:1px solid var(--rule-2);border-radius:9px;box-shadow:0 12px 28px -14px rgba(20,16,40,.35);display:grid}
.tf-pop[hidden]{display:none}
.tf-pop button{display:block;width:100%;text-align:left;padding:7px 9px;border:0;border-radius:6px;background:none;font-size:.82rem;cursor:pointer}
.tf-pop button:hover,.tf-pop button:focus-visible{background:var(--surface-2)}

/* ---------- alerts and empty states ---------- */
.tf-alert{display:flex;align-items:flex-start;gap:10px;margin:0 0 10px;padding:11px 14px;border:1px solid var(--rule-2);border-radius:var(--r);background:var(--surface)}
.tf-alert[hidden]{display:none}
.tf-alert .tf-dot{margin-top:5px}
.tf-alert-body{flex:1;min-width:0}
.tf-alert-body b{display:block;font-size:.88rem;font-weight:650}
.tf-alert-body p{margin:2px 0 0;font-size:.84rem;color:var(--ink-2)}
.tf-alert-actions{display:flex;flex-wrap:wrap;gap:6px;align-self:center}
.tf-alert[data-tone="no"] .tf-dot{background:var(--no)}
.tf-alert[data-tone="warn"] .tf-dot{background:var(--warn)}
.tf-empty{padding:26px 22px 28px}
.tf-empty h3{font-size:1rem;font-weight:650}
.tf-empty > p{margin:4px 0 0;color:var(--ink-2);font-size:.86rem;max-width:62ch}
.tf-fixes{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:6px}
.tf-fixes button{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:9px 12px;border:1px solid var(--rule-2);border-radius:8px;background:var(--surface);cursor:pointer;text-align:left;font-size:.84rem}
.tf-fixes button:hover{border-color:var(--accent);background:var(--tint)}
.tf-fixes button b{font-family:var(--mono);font-size:.74rem;font-weight:600;color:var(--ok);white-space:nowrap}

/* ---------- the list ---------- */
.tf-list{border:1px solid var(--rule);border-radius:var(--r);background:var(--surface);overflow:hidden;--cols:40px minmax(170px,1.6fr) 134px minmax(118px,.9fr) 92px minmax(168px,1.1fr) 58px 56px}
.tf-list:focus{outline:none}
.tf-thead,.tf-row{display:grid;grid-template-columns:var(--cols);align-items:center;column-gap:12px;padding:0 14px}
.tf-thead{min-height:34px;background:var(--surface-2);border-bottom:1px solid var(--rule)}
.tf-thead > *{font-family:var(--mono);font-size:.62rem;font-weight:600;letter-spacing:.03em;text-transform:uppercase;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;background:none;border:0;padding:0}
.tf-thead button{cursor:pointer;display:inline-flex;align-items:center;gap:4px}
.tf-thead button:hover{color:var(--ink)}
.tf-thead button::after{content:"";width:0;height:0;border-left:3.5px solid transparent;border-right:3.5px solid transparent;border-top:4px solid var(--rule-2)}
.tf-thead button[aria-sort="ascending"]::after{border-top:0;border-bottom:4px solid var(--accent)}
.tf-thead button[aria-sort="descending"]::after{border-top-color:var(--accent)}
.tf-thead button[aria-sort]{color:var(--ink)}
.tf-c-price,.tf-thead .tf-c-price{justify-content:flex-end;text-align:right}
.tf-c-cmp,.tf-c-checked{text-align:right;justify-self:end}
.tf-rows{min-height:180px;transition:opacity .12s}
.tf-list[aria-busy="true"] .tf-rows.is-stale{opacity:.5}

.tf-item{border-bottom:1px solid var(--rule)}
.tf-item:last-child{border-bottom:0}
.tf-row{min-height:54px;padding-block:8px;cursor:pointer;position:relative}
.tf-row:hover{background:var(--surface-2)}
.tf-item.is-open > .tf-row{background:var(--surface-2)}
.tf-item.hl > .tf-row{background:var(--tint)}
.tf-item.hl > .tf-row:hover,.tf-item.hl.is-open > .tf-row{background:var(--tint-2)}
.tf-c-rank{font-family:var(--mono);font-size:.74rem;color:var(--muted);font-variant-numeric:tabular-nums}
.tf-tool{min-width:0;display:flex;flex-direction:column;gap:1px}
.tf-tool-name{display:flex;align-items:center;gap:7px;min-width:0}
.tf-tool-name button{all:unset;font-weight:620;font-size:.9rem;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
.tf-tool-name button:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:3px}
.tf-chev{width:12px!important;height:12px!important;color:var(--muted);transition:transform .15s;flex:none}
.tf-item.is-open .tf-chev{transform:rotate(90deg)}
.tf-tool-sub{font-size:.74rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tf-owner{font-size:.72rem;color:var(--tint-ink)}
.tf-meta{display:contents}
.tf-eng{display:flex;gap:2px;align-items:center}
.tf-eng i{width:9px;height:9px;border-radius:2px;border:1px solid var(--rule-2);background:transparent}
.tf-eng i.on{background:var(--ink-2);border-color:var(--ink-2)}
.tf-eng i.need{background:var(--accent);border-color:var(--accent)}
.tf-eng-n{font-family:var(--mono);font-size:.66rem;color:var(--muted);margin-left:5px;font-variant-numeric:tabular-nums}
.tf-work{display:flex;align-items:center;gap:7px;min-width:0;font-size:.78rem;color:var(--ink-2)}
.tf-work span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tf-meter{display:inline-flex;gap:2px;align-items:flex-end;flex:none}
.tf-meter i{width:4px;border-radius:1px;background:var(--rule-2)}
.tf-meter i:nth-child(1){height:5px}.tf-meter i:nth-child(2){height:8px}.tf-meter i:nth-child(3){height:11px}.tf-meter i:nth-child(4){height:14px}
.tf-meter i.on{background:var(--accent)}
.tf-mcp{display:inline-flex;align-items:center;gap:6px;font-size:.76rem;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tf-sdot{width:7px;height:7px;border-radius:2px;flex:none;background:var(--ok)}
.tf-sdot.off{background:transparent;border:1.5px solid var(--rule-2)}
.tf-sdot.later{background:transparent;border:1.5px solid var(--ok)}
.tf-price{text-align:right;min-width:0}
.tf-price b{display:block;font-family:var(--mono);font-size:.98rem;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap}
.tf-price b small{font-size:.66rem;font-weight:500;color:var(--muted);margin-left:2px}
.tf-price span{display:block;font-size:.72rem;line-height:1.35;color:var(--muted)}
.tf-price .tf-over{color:var(--warn)}
.tf-price .tf-why1{white-space:normal;text-align:right}
.tf-checked{justify-self:end;font-family:var(--mono);font-size:.7rem;color:var(--muted);white-space:nowrap}
.tf-checked a{color:var(--muted)}
.tf-checked a:hover{color:var(--accent)}
.tf-cmp{justify-self:end;display:flex;align-items:center}
.tf-cmp label{display:grid;place-items:center;width:30px;height:30px;border-radius:6px;cursor:pointer}
.tf-cmp label:hover{background:var(--surface-3)}
.tf-cmp input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.tf-cmp input:checked + .tf-box{background:var(--accent);border-color:var(--accent)}
.tf-cmp input:checked + .tf-box::after{opacity:1}
.tf-cmp input:focus-visible + .tf-box{outline:2px solid var(--accent);outline-offset:2px}
.tf-cmp input:disabled + .tf-box{opacity:.4}

/* a row's evidence */
.tf-ev{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(0,1fr);gap:18px 22px;padding:14px 14px 16px 60px;background:var(--surface-2);border-top:1px solid var(--rule)}
.tf-item.hl .tf-ev{background:color-mix(in srgb,var(--tint) 55%,var(--surface-2))}
.tf-ev h4{font-family:var(--mono);font-size:.62rem;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin:0 0 6px}
.tf-ev p,.tf-ev li{font-size:.82rem;line-height:1.45;color:var(--ink-2)}
.tf-ev ul{margin:0;padding-left:1em}
.tf-ev p{margin:0 0 6px}
.tf-plans{border:1px solid var(--rule);border-radius:8px;background:var(--surface);overflow:hidden}
.tf-plan{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;padding:7px 10px;border-bottom:1px solid var(--rule)}
.tf-plan:last-child{border-bottom:0}
.tf-plan.is-picked{background:var(--tint)}
.tf-plan-name{display:flex;align-items:center;gap:6px;font-size:.82rem;font-weight:600;min-width:0}
.tf-plan-name .tf-dot{width:7px;height:7px}
.tf-plan-px{font-family:var(--mono);font-size:.76rem;font-weight:600;text-align:right;white-space:nowrap}
.tf-plan-lines{grid-column:1 / -1;font-size:.76rem;color:var(--muted);line-height:1.4}
.tf-plan-tag{font-family:var(--mono);font-size:.58rem;letter-spacing:.06em;text-transform:uppercase;color:var(--tint-ink);border:1px solid var(--tint-2);border-radius:4px;padding:0 4px;background:var(--surface)}
.tf-chips{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 8px}
.tf-chip{font-family:var(--mono);font-size:.64rem;border:1px solid var(--rule-2);border-radius:4px;padding:1px 6px;color:var(--ink-2);background:var(--surface);white-space:nowrap}
.tf-chip.need{background:var(--tint);border-color:var(--tint-2);color:var(--tint-ink)}
.tf-facts{display:grid;grid-template-columns:auto minmax(0,1fr);gap:5px 12px;margin:0;font-size:.8rem}
.tf-facts dt{font-family:var(--mono);font-size:.6rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding-top:3px;white-space:nowrap}
.tf-facts dd{margin:0;color:var(--ink-2);min-width:0;overflow-wrap:anywhere}
.tf-quote{margin:8px 0 0;padding:7px 10px;border:1px solid var(--rule);border-radius:7px;background:var(--surface);font-size:.78rem;color:var(--ink-2)}
.tf-quote span{display:block;font-family:var(--mono);font-size:.6rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:2px}
.tf-ev-foot{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;padding-top:10px;border-top:1px solid var(--rule);font-family:var(--mono);font-size:.68rem;color:var(--muted)}
.tf-ev-foot a{color:var(--accent)}

/* skeleton rows while the first answer loads */
.tf-skrow{display:grid;grid-template-columns:var(--cols);align-items:center;column-gap:12px;min-height:54px;padding:8px 14px;border-bottom:1px solid var(--rule)}
.tf-skrow:last-child{border-bottom:0}
.tf-skrow i{height:9px;border-radius:4px;background:var(--surface-3)}
.tf-skrow i.w2{height:12px}
.tf-skrow i.r{justify-self:end;width:70%}
@media (prefers-reduced-motion:no-preference){.tf-skrow i{animation:tf-pulse 1.4s ease-in-out infinite}}
@keyframes tf-pulse{50%{opacity:.45}}

/* ---------- compare tray ---------- */
.tf-tray{position:fixed;left:calc(var(--rail) + (100vw - var(--rail)) / 2);bottom:max(14px,env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:35;width:min(920px,calc(100vw - var(--rail) - 28px));display:flex;align-items:center;gap:8px;padding:8px 8px 8px 14px;border:1px solid var(--rule-2);border-radius:12px;background:var(--surface);box-shadow:0 18px 40px -18px rgba(20,16,40,.45)}
.tf-tray[hidden]{display:none}
.tf-tray .tf-k{flex:none}
.tf-slots{flex:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;min-width:0}
.tf-slot{display:flex;align-items:center;gap:4px;height:32px;padding:0 4px 0 10px;border:1px solid var(--rule-2);border-radius:8px;background:var(--surface-2);font-size:.8rem;font-weight:600;min-width:0}
.tf-slot span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tf-slot .tf-x{width:24px;height:24px}
.tf-slot.is-empty{border-style:dashed;background:none;color:var(--muted);font-weight:500;font-size:.74rem;justify-content:center;padding:0 8px}

/* ---------- dialogs ---------- */
.tf-dlg{padding:0;border:1px solid var(--rule-2);border-radius:14px;background:var(--surface);color:var(--ink);width:min(560px,calc(100vw - 24px));max-height:min(86vh,900px);box-shadow:0 30px 70px -30px rgba(20,16,40,.55)}
.tf-dlg[open]{display:flex;flex-direction:column}
.tf-dlg::backdrop{background:rgba(14,13,18,.42)}
.tf-dlg-wide{width:min(1180px,calc(100vw - 24px))}
.tf-dlg-head{display:flex;align-items:center;gap:10px;padding:12px 12px 12px 18px;border-bottom:1px solid var(--rule)}
.tf-dlg-head h2{font-size:1rem;font-weight:680;letter-spacing:-.01em}
.tf-dlg-sub{font-size:.78rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.tf-dlg-body{padding:14px 18px 20px;overflow:auto}
.tf-dlg-body > p{margin:0 0 10px;font-size:.86rem;color:var(--ink-2)}
.tf-drawer{margin:0 0 0 auto;height:100vh;max-height:100vh;width:min(420px,100vw);border-radius:0;border-width:0 0 0 1px}
.tf-endpoint{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 8px;padding:10px 12px;border:1px solid var(--rule-2);border-radius:9px;background:var(--surface-2);margin:0 0 14px}
.tf-endpoint .tf-k{grid-column:1 / -1}
.tf-endpoint code{font-family:var(--mono);font-size:.84rem;font-weight:600;overflow-wrap:anywhere}
.tf-toolslist{list-style:none;margin:0 0 12px;padding:0;border:1px solid var(--rule);border-radius:9px;overflow:hidden}
.tf-toolslist li{display:grid;grid-template-columns:9.5rem minmax(0,1fr);gap:10px;padding:8px 12px;border-bottom:1px solid var(--rule);font-size:.82rem;color:var(--ink-2)}
.tf-toolslist li:last-child{border-bottom:0}
.tf-toolslist code,.tf-config code{font-family:var(--mono);font-size:.76rem;color:var(--ink)}
.tf-config{margin-top:10px;padding:0;border:1px solid var(--rule);border-radius:9px}
.tf-config summary{padding:9px 12px;font-size:.84rem;font-weight:600;cursor:pointer}
.tf-config[open] summary{border-bottom:1px solid var(--rule)}
.tf-config > :not(summary){margin:10px 12px}
.tf-config pre{font-family:var(--mono);font-size:.74rem;line-height:1.5;background:var(--surface-2);border:1px solid var(--rule);border-radius:7px;padding:10px 12px;overflow-x:auto}

/* history */
.tf-hlist{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:6px}
.tf-hlist button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;width:100%;padding:9px 11px;border:1px solid var(--rule);border-radius:9px;background:var(--surface);cursor:pointer;text-align:left}
.tf-hlist button:hover{border-color:var(--accent)}
.tf-hlist button[aria-current="true"]{background:var(--tint);border-color:var(--tint-2)}
.tf-h-what{font-size:.84rem;font-weight:600;line-height:1.35}
.tf-h-when{font-family:var(--mono);font-size:.64rem;color:var(--muted);white-space:nowrap;padding-top:2px}
.tf-h-res{grid-column:1 / -1;font-size:.76rem;color:var(--muted)}
.tf-hempty{padding:26px 6px;text-align:center;color:var(--muted);font-size:.84rem}

/* compare table */
.tf-ctable{width:100%;min-width:0;border-collapse:separate;border-spacing:0;font-size:.82rem;table-layout:fixed}
.tf-ctable th,.tf-ctable td{border:0;border-bottom:1px solid var(--rule);padding:8px 10px;vertical-align:top;text-align:left}
.tf-ctable td + td,.tf-ctable th + th,.tf-ctable th + td{border-left:1px solid var(--rule)}
.tf-ctable thead th{position:sticky;top:-14px;background:var(--surface);z-index:1;font-family:inherit;font-size:.9rem;font-weight:650;text-transform:none;letter-spacing:0;color:var(--ink);border-bottom:1px solid var(--rule-2)}
.tf-ctable thead th small{display:block;font-size:.72rem;font-weight:400;color:var(--muted)}
.tf-ctable tbody th{width:150px;font-family:var(--mono);font-size:.6rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);background:none}
.tf-ctable tbody td:first-child{font-weight:400;white-space:normal}
.tf-ctable td.hl,.tf-ctable th.hl{background:var(--tint)}
.tf-ctable .tf-best{display:inline-block;margin-left:6px;font-family:var(--mono);font-size:.58rem;letter-spacing:.06em;text-transform:uppercase;color:var(--ok);border:1px solid currentColor;border-radius:4px;padding:0 4px;vertical-align:1px}
.tf-ctable b.px{font-family:var(--mono);font-size:.92rem}
.tf-ctable ul{margin:0;padding-left:1em}
.tf-ctable td:first-child,.tf-ctable tr:hover td{background:none}
.tf-cwrap{overflow-x:auto}

/* toast */
.tf-toast{position:fixed;left:50%;bottom:84px;transform:translateX(-50%);z-index:60;padding:8px 14px;border-radius:9px;background:var(--ink);color:var(--surface);font-size:.82rem;font-weight:550;box-shadow:0 12px 28px -12px rgba(20,16,40,.5)}
.tf-toast[hidden]{display:none}

/* footer */
.tf-foot{border-top:1px solid var(--rule);background:var(--surface);padding:12px max(16px,env(safe-area-inset-left,0px)) 14px calc(var(--rail) + clamp(14px,2vw,24px));color:var(--muted);font-size:.76rem}
.tf-foot p{margin:0}
.tf-foot a{color:var(--muted)}
.tf-noscript{padding:16px;border:1px solid var(--rule);border-radius:var(--r);background:var(--surface)}

/* ---------- narrower screens ---------- */
@media (max-width:1240px){
  .tf-list{--cols:40px minmax(160px,1.6fr) 120px minmax(110px,1fr) 84px minmax(150px,1fr) 54px}
  .tf-c-checked,.tf-checked{display:none}
  .tf-ab-long{display:none}.tf-ab-short{display:inline}
}
@media (max-width:1080px){
  .tf-app{--rail:268px}
  .tf-list{--cols:40px minmax(140px,1.4fr) 108px 124px minmax(132px,1fr) 46px}
  .tf-eng-n{display:none}
  .tf-c-mcp,.tf-mcp{display:none}
  .tf-ev{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding-left:14px}
  .tf-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
  .tf-cheap{grid-column:1 / -1;flex-direction:row;align-items:baseline;gap:10px;border-top:1px solid var(--rule);padding-block:8px}
  .tf-cheap b{font-size:1.05rem}
}
@media (max-width:899px){
  .tf-app{font-size:15px}
  .tf-grid{grid-template-columns:minmax(0,1fr)}
  .tf-rail{position:fixed;inset:0;z-index:45;height:auto;border:0;padding:0;display:none;flex-direction:column;overflow:hidden}
  .tf-rail[data-open]{display:flex}
  .tf-rail-head{padding:12px 16px;border-bottom:1px solid var(--rule)}
  .tf-rail-done{display:inline-flex}
  .tf-rail-hint{padding:10px 16px 0;margin:0}
  .tf-rail form{flex:1;overflow-y:auto;padding:0 16px 20px;overscroll-behavior:contain}
  .tf-rail-foot{display:block;padding:10px 16px max(10px,env(safe-area-inset-bottom,0px));border-top:1px solid var(--rule)}
  .tf-rail-foot .tf-btn{width:100%;height:42px;justify-content:center;font-size:.92rem}
  .tf-ws{grid-column:1;padding:0 12px 120px}
  .tf-ws-head{grid-column:1;flex-direction:column;gap:6px;padding:12px 12px 10px}
  .tf-ws-title h1{font-size:1.15rem}
  .tf-status{margin:0}
  .tf-mbar{display:flex;align-items:center;gap:10px;position:sticky;top:var(--bar);z-index:20;margin:0 -12px 10px;padding:8px 12px;background:var(--bg);border-bottom:1px solid var(--rule)}
  .tf-mbar .tf-btn{height:34px;font-size:.86rem}
  .tf-badge{font-family:var(--mono);font-size:.66rem;font-weight:600;background:var(--accent);color:var(--accent-ink);border-radius:4px;padding:0 5px;line-height:1.6}
  .tf-msum{margin:0;font-size:.8rem;color:var(--ink-2);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tf-start{grid-template-columns:1fr;padding-right:40px}
  .tf-examples .tf-ex{flex:1 1 100%}
  .tf-tabs{display:flex;overflow-x:auto;scrollbar-width:none;border-radius:var(--r)}
  .tf-tabs::-webkit-scrollbar{display:none}
  .tf-tab{flex:0 0 auto;padding:8px 14px 9px}
  .tf-tab b{font-size:1.2rem}
  .tf-cheap{display:none}
  .tf-toolbar{gap:6px}
  .tf-sel{flex:1 1 140px}.tf-sel select{width:100%;height:34px}
  .tf-search{flex:1 1 140px;width:auto;height:34px}
  .tf-toolbar-gap{display:none}
  .tf-actions{flex:1 1 100%;justify-content:space-between}
  .tf-actions .tf-btn{height:34px;flex:1;justify-content:center}
  .tf-actions .tf-menuwrap{flex:1;display:flex}
  .tf-actions .tf-menuwrap .tf-btn{width:100%}
  .tf-actions .tf-icon-only{flex:0 0 34px;width:34px}
  .tf-thead{display:none}
  .tf-row{grid-template-columns:34px minmax(0,1fr) 32px;grid-template-areas:"rank tool cmp" ". price price" ". meta meta";align-items:start;row-gap:6px;column-gap:8px;padding:11px 12px;min-height:0}
  .tf-row > .tf-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;text-align:left}
  .tf-row > .tf-price b{display:inline}
  .tf-row > .tf-price span{display:inline}
  .tf-row > .tf-c-rank{grid-area:rank;padding-top:2px}
  .tf-row > .tf-tool{grid-area:tool}
  .tf-row > .tf-price{grid-area:price}
  .tf-row > .tf-cmp{grid-area:cmp;margin:-4px -6px 0 0}
  .tf-item.is-pick{margin:6px}
  .tf-item.is-pick > .tf-row{padding-inline:6px}
  .tf-meta{grid-area:meta;display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px}
  .tf-meta .tf-mcp{display:inline-flex}
  .tf-eng-n{display:inline}
  .tf-tool-sub{white-space:normal}
  .tf-ev{grid-template-columns:minmax(0,1fr);padding:12px 12px 14px;gap:14px}
  .tf-skrow{grid-template-columns:26px minmax(0,1fr) 80px;padding:12px}
  .tf-skrow i:nth-child(n+4){display:none}
  .tf-tray{left:50%;bottom:0;width:100vw;border-radius:12px 12px 0 0;border-width:1px 0 0;padding:8px 10px max(8px,env(safe-area-inset-bottom,0px))}
  .tf-tray > .tf-k,.tf-tray > .tf-link{display:none}
  .tf-slots{display:flex;overflow-x:auto;scrollbar-width:none}
  .tf-slots::-webkit-scrollbar{display:none}
  .tf-slot{flex:0 0 auto;max-width:150px}
  .tf-slot.is-empty{display:none}
  .tf-tray .tf-primary{flex:0 0 auto;height:36px}
  .tf-dlg{width:100vw;max-width:100vw;max-height:100vh;height:100vh;margin:0;border-radius:0;border:0}
  .tf-drawer{width:100vw}
  .tf-toolslist li{grid-template-columns:1fr;gap:2px}
  .tf-foot{padding:12px 16px 90px}
  .tf-bar{gap:4px;padding:0 6px 0 12px}
  .tf-brand-name{display:none}
  .tf-crumb{display:none}
  .tf-ab{padding:0 8px}
  .tf-ab > span:not(.tf-ab-n){display:none}
  .tf-ab-about{display:none}
  .tf-ctable{min-width:640px}
  .tf-ctable tbody th{width:110px}
}
@media (max-width:420px){
  .tf-row{grid-template-columns:34px minmax(0,1fr) 30px}
  .tf-price b{font-size:.92rem}
}
@media (prefers-reduced-motion:reduce){
  .tf-app *{transition:none!important;animation:none!important}
}
