/* /tools/ pages (scripts/tools/pages.mjs + tools.js). Builds on charts.css tokens: --acc, --glass, --line, --ink2, --ink3. */
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tl-grid.big { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 28px; }
.tl-card { display: grid; gap: 8px; padding: 18px; text-decoration: none; color: var(--ink); min-width: 0; transition: border-color .2s; }
.tl-card:hover { border-color: var(--acc); }
.tl-card b { font-size: 18px; }
.tl-card span:last-child { color: var(--ink2); font-size: 14px; line-height: 1.45; }
.tl-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--acc); background: color-mix(in oklab, var(--acc) 14%, transparent); }
.tl-ico svg { width: 22px; height: 22px; }
.tl-app { display: grid; gap: 16px; margin-top: 24px; align-items: start; }
@media (max-width: 979px) { .tl-app > .tl-stage { order: -1; } } /* phones: the card first, the inputs under it */
@media (min-width: 980px) { .tl-app { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } .tl-stage { position: sticky; top: 76px; } }
.tl-form, .tl-stage { padding: 18px; min-width: 0; display: grid; gap: 14px; }
.tl-f { display: grid; gap: 6px; min-width: 0; }
.tl-f > span { font: 500 11px/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
.tl-f input, .tl-f textarea { width: 100%; box-sizing: border-box; background: rgba(0, 0, 0, .28); color: var(--ink); border: 1px solid var(--line2); border-radius: 12px; padding: 11px 13px; font: 15px/1.45 var(--f-ui); min-width: 0; }
.tl-f textarea { font-family: var(--f-mono); font-size: 13.5px; resize: vertical; }
.tl-f input:focus, .tl-f textarea:focus { outline: 2px solid var(--acc); outline-offset: 1px; border-color: transparent; }
.tl-f small { color: var(--ink3); font-size: 12.5px; line-height: 1.4; }
.tl-f[hidden] { display: none; }
.tl-two, .tl-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tl-row { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.tl-seeds .eb { margin-bottom: 10px; }
.tl-seeds .chip { max-width: 100%; }
.tl-seeds .chip .av { flex: none; }
.tl-seeds .chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-modes .chip { font-weight: 600; }
.tl-out { border-radius: 14px; overflow: hidden; background: #14110d; min-height: 120px; display: grid; place-items: center; }
.tl-out svg { display: block; width: 100%; height: auto; }
.tl-tall { max-width: 420px; margin: 0 auto; width: 100%; }
.tl-empty { color: var(--ink3); padding: 40px 20px; text-align: center; margin: 0; }
.tl-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-acts .btn { padding: 11px 16px; font-size: 14px; }
.tl-msg { min-height: 1.4em; margin: 0; }
.tl-result { padding: 14px 16px; display: grid; gap: 6px; }
.tl-result p { margin: 0; }
.tl-big { font: 800 34px/1.05 var(--f-ui); color: var(--acc); }
.tl-big.dn { color: #e5735c; }
.tl-big span { font: 500 15px/1 var(--f-ui); color: var(--ink2); }
.tl-eq { font: 13px/1.5 var(--f-mono); color: var(--ink2); overflow-wrap: anywhere; }
.tl-err { color: #e5735c; }
.tl-def { padding: 12px 14px; font-size: 14px; color: var(--ink2); line-height: 1.5; }
.tl-fields { display: grid; gap: 10px; }
.tl-cols { display: grid; gap: 14px 28px; color: var(--ink2); }
.tl-cols p { margin: 0; }
@media (min-width: 800px) { .tl-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tl-cols.tl-math { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tl-math h3 { margin: 0 0 8px; font-size: 18px; color: var(--ink); }
.tl-math .tl-eq { font-size: 15px; color: var(--acc); margin-bottom: 8px; }
.tl-acc { display: inline-flex; align-items: center; gap: 8px; }
.tl-acc + small { display: block; }
.tl-pager { display: flex; align-items: center; justify-content: center; gap: 14px; }
.tl-pager .btn { padding: 8px 16px; font-size: 18px; }
.tl-pager span { font: 13px var(--f-mono); color: var(--ink2); }
.tl-dots { display: flex; justify-content: center; gap: 6px; }
.tl-dots button { width: 22px; height: 6px; border-radius: 3px; border: 0; padding: 0; background: var(--line2); cursor: pointer; }
.tl-dots button.on { background: var(--acc); }
.tl-steps { color: var(--ink2); padding-left: 20px; display: grid; gap: 6px; }
@media (max-width: 420px) { .tl-two, .tl-grid2 { grid-template-columns: minmax(0, 1fr); } }
