.tools-library { color:var(--ink); min-width:0; }
.tools-library h1 { font-size:26px; line-height:1.35; margin:8px 0; letter-spacing:-.02em; }
.tools-library h2 { font-size:18px; line-height:1.4; margin:0; }
.tools-library h3 { font-size:15px; margin:0; }
.tools-library p { line-height:1.7; margin:8px 0; }
.tl-heading { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:20px; }
.tl-heading p { color:var(--body); margin:4px 0; }
.tl-heading>div { min-width:0; }
.tl-search { width:240px; flex-shrink:0; }
.tools-library input,.tools-library select,.tools-library textarea { display:block; width:100%; min-width:0; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); color:var(--ink); font:inherit; padding:10px 12px; }
.tools-library select { appearance:none; padding-right:36px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23526175' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; }
.tools-library textarea { resize:vertical; }
.tools-library :is(a,button,input,select,textarea,summary):focus-visible { outline:2px solid var(--blue); outline-offset:3px; }
.tools-library button:disabled { cursor:not-allowed; opacity:.5; }
.tl-text { border:0; background:transparent; padding:3px 0; color:var(--blue); font:inherit; cursor:pointer; text-decoration:none; }
.tl-text:hover { color:var(--blue-deep); text-decoration:underline; }
.tl-categories { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px; }
.tl-categories button { border:1px solid transparent; border-radius:var(--radius); padding:8px 13px; color:var(--body); }
.tl-categories [aria-pressed="true"] { background:var(--blue-soft); border-color:var(--line); color:var(--blue); font-weight:650; }
.tl-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.tl-tool-card { display:flex; flex-direction:column; align-items:start; color:var(--ink); text-decoration:none; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:18px; transition:border-color .15s ease,box-shadow .15s ease; }
.tl-tool-card:hover { border-color:var(--blue); box-shadow:var(--shadow); }
.tl-tool-identity { display:flex; align-items:center; gap:12px; min-height:48px; width:100%; margin-bottom:6px; }
.tl-tool-picture { display:inline-flex; align-items:center; justify-content:center; flex:none; width:48px; height:48px; border-radius:13px; background:var(--blue-soft); color:var(--blue-deep); }
.tl-tool-picture svg { display:block; width:32px; height:32px; }
.tl-picture-wash { fill:var(--blue); fill-opacity:.1; stroke:none; }
.tl-picture-accent { stroke:var(--blue); }
.tl-picture-paper { fill:var(--surface); }
.tl-tool-card h2 { min-width:0; margin:0; font-size:17px; }
.tl-tool-page>.tl-heading>.tl-tool-picture { width:56px; height:56px; border-radius:15px; }
.tl-tool-card p { font-size:13px; color:var(--body); flex:1; margin:4px 0 12px; }
.tl-card-action { color:var(--blue); font-weight:600; font-size:13px; }
.tl-tool-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); gap:24px; align-items:start; }
.tl-form { min-width:0; }
.tl-inline-head { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
.tl-inline-head>.tl-actions { margin-left:auto; }
.tl-inline-head>.tl-muted { font-size:12px; }
.tl-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 14px; }
.tl-field { display:flex; flex-direction:column; min-width:0; gap:6px; color:var(--body); font-size:13px; }
.tl-field>span { font-weight:550; }
.tl-field small { color:var(--muted); line-height:1.5; }
.tl-field input,.tl-field select,.tl-field textarea { font-size:14px; }
.tl-wide { grid-column:1/-1; }
.tl-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:15px; }
.tl-inline-head .tl-actions { margin-top:0; }
.tl-result { padding:18px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); min-width:0; position:sticky; top:16px; }
.tl-muted { color:var(--muted); font-size:13px; }
.tl-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 18px; margin:16px 0; }
.tl-metrics div { min-width:0; }
.tl-metrics dt { color:var(--muted); font-size:13px; margin-bottom:5px; }
.tl-metrics dd { color:var(--ink); font-weight:650; font-size:19px; line-height:1.5; margin:0; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.tl-metrics div:first-child dd { color:var(--blue-deep); }
.tl-notice,.tl-errors { padding:10px 12px; background:var(--amber-soft); border-left:3px solid var(--amber); color:var(--amber); border-radius:0 var(--radius) var(--radius) 0; font-size:13px; }
.tl-errors ul { padding-left:18px; margin-bottom:0; }
.tl-errors small { display:block; color:var(--muted); }
.tl-result-note { color:var(--body); font-size:13px; border-top:1px solid var(--line); padding-top:8px; }
.tools-library details { margin-top:14px; }
.tools-library summary { cursor:pointer; color:var(--body); font-size:13px; font-weight:550; padding:6px 0; }
.tools-library details[open]>summary { margin-bottom:10px; }
.tl-help,.tl-permission-demo { border-top:1px solid var(--line); padding-top:8px; margin-top:22px!important; }
.tl-help dl { display:grid; grid-template-columns:155px minmax(0,1fr); gap:12px 18px; font-size:13px; line-height:1.8; }
.tl-help dt { color:var(--muted); }
.tl-help dd { margin:0; }
.tl-evidence { border-top:1px solid var(--line); padding-top:8px; }
.tl-node-section { margin:18px 0; border-top:1px solid var(--line); padding-top:14px; }
.tl-node-section .tl-inline-head { justify-content:space-between; margin-bottom:8px; }
.tl-input-row { padding:12px; margin:8px 0; border:1px solid var(--line); background:var(--surface); border-radius:var(--radius); }
.tl-row-fields { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr) auto; gap:10px; align-items:end; }
.tl-input-row details { margin-top:5px; }
.tl-save-panel { margin-top:16px; border-top:1px solid var(--line); padding-top:14px; }
.tl-save-panel .tl-fields { grid-template-columns:1fr; }
.tl-feedback { color:var(--blue-deep); font-size:13px; overflow-wrap:anywhere; }
.tl-boundary { font-size:12px; color:var(--muted); margin-top:16px!important; }
.tl-official-entry { background:var(--blue-soft); border-radius:var(--radius); padding:12px; margin-bottom:15px; }
.tl-official-entry p,.tl-permission-demo p { font-size:13px; }
.tl-official-status { color:var(--body); font-weight:600; }
.tl-record-outcome { white-space:pre-wrap; overflow-wrap:anywhere; }
.tl-table-scroll { overflow:auto; max-height:330px; }
.tl-table-scroll table { width:100%; border-collapse:collapse; font-size:12px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.tl-table-scroll :is(th,td) { border-bottom:1px solid var(--line); padding:8px; text-align:right; }
.tl-table-scroll :is(th,td):first-child { text-align:left; }
.tl-table-scroll th { background:var(--subtle); color:var(--body); position:sticky; top:0; }
.tl-cash-chart { margin:14px 0; }
.tl-cash-chart figcaption { color:var(--muted); font-size:12px; margin-bottom:10px; }
.tl-cash-chart>div { display:grid; grid-template-columns:80px minmax(0,1fr) auto; gap:8px; align-items:center; margin:8px 0; font-size:11px; }
.tl-cash-chart i { display:block; background:var(--subtle); border-radius:3px; height:6px; }
.tl-cash-chart b { display:block; height:6px; background:var(--blue); border-radius:3px; }
.tl-cash-chart b.tl-negative { background:var(--amber); }
.tl-cash-chart strong { font-weight:500; }
.tl-snapshot-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 20px; margin:0; font-size:13px; }
.tl-snapshot-fields dt { color:var(--muted); margin-bottom:4px; }
.tl-snapshot-fields dd { margin:0; overflow-wrap:anywhere; line-height:1.6; white-space:pre-wrap; }
.tl-rerun { border-top:1px solid var(--line); padding-top:16px; margin-top:20px; }
.tl-rerun .tl-field { max-width:420px; }
.tl-saved-list { display:grid; gap:10px; }
.tl-saved-row { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr) auto; gap:16px; align-items:center; padding:14px; color:var(--body); border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); font-size:12px; text-decoration:none; }
.tl-saved-row strong { display:block; font-size:14px; color:var(--ink); }
.tl-saved-row span { display:block; margin-top:5px; color:var(--muted); }
.tl-saved-row:hover { border-color:var(--blue); }
.tl-empty { padding:24px 0; color:var(--muted); }
.lead-detail-grid:has(#lead-tools) { grid-template-columns:minmax(0,1fr); }
.lead-detail-grid:has(#lead-tools)>.important-panel { display:none; }
@media(min-width:1600px) { .tl-card-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:1150px) { .tl-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .tl-tool-layout { grid-template-columns:1fr; } .tl-result { position:static; } }
@media(max-width:640px) {
 .tl-heading { align-items:start; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
 .tl-search { width:100%; }
 .tools-library h1 { font-size:23px; }
 .tl-card-grid,.tl-fields,.tl-snapshot-fields { grid-template-columns:1fr; }
 .tl-row-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .tl-row-fields>.tl-field:first-child { grid-column:1/-1; }
 .tl-row-fields>.tl-text { justify-self:start; }
 .tl-help dl { grid-template-columns:1fr; gap:4px; }
 .tl-help dd { margin-bottom:12px; }
 .tl-saved-row { grid-template-columns:minmax(0,1fr) auto; gap:10px; }
 .tl-saved-row>div:not(:first-child) { grid-column:1; }
 .tl-saved-row>span { grid-column:2; grid-row:1; }
 .tl-tool-card { padding:15px; }
 .tl-metrics dd { font-size:17px; }
}
@media(prefers-reduced-motion:reduce) { .tl-tool-card { transition:none; } }

.tl-personal-history { margin-top: 24px; }
.tl-personal-history > h2 { font-size: 18px; margin-bottom: 12px; }
.tl-personal-history .tl-evidence { margin-bottom: 12px; }
/* 从 Lead 已保存成果打开工具（2026-11-28） */
.tl-notice.tl-from-record{display:grid;gap:4px;margin:0 0 16px;background:var(--blue-soft);border-color:transparent;border-left-color:var(--blue);color:var(--body)}.tl-from-record strong{font-size:14px;color:var(--ink)}
/* 工具库、数据中心首页顶部压缩（2026-11-28）：标题与说明一行，搜索和使用记录在右侧 */
.tl-heading.tl-heading-compact{align-items:center;flex-wrap:wrap;gap:10px 16px;margin:0 0 12px}
.tl-heading-compact .tl-title-line{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;min-width:0}
.tl-heading-compact h1{font-size:24px;line-height:1.25;margin:0}
.tl-heading-compact .tl-title-line p{margin:0;font-size:13px;color:var(--muted)}
.tl-heading-tools{display:flex;align-items:center;gap:14px;margin-left:auto}
.tl-heading-compact .tl-search{width:220px}.tl-heading-compact .tl-search input{height:36px}
.tl-records-link{white-space:nowrap}a.dc-button.tl-records-link{text-decoration:none}
.tl-heading-compact+.tl-categories,.tl-heading-compact+.dc-catalogue-toolbar{margin-bottom:12px}
.tl-heading-compact+.tl-categories button,.tl-heading-compact+.dc-catalogue-toolbar .tl-categories button{padding:6px 11px}
@media(max-width:720px){.tl-heading-tools{width:100%;margin-left:0}.tl-heading-compact .tl-search{flex:1;width:auto}}
.tools-library .tl-search .sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}
