/* text tools */
.tc-preview { max-height: 340px; overflow: auto; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); white-space: pre-wrap; word-break: break-word; line-height: 1.7; font-size: .95rem; color: var(--ink-2); }
.tc-preview.tc-lorem { white-space: normal; }
.tc-preview.tc-lorem p + p { margin-top: 12px; }
.tc-preview code { white-space: pre-wrap; font-size: .88rem; }
.tc-mark { background: #fde68a; color: #111827; border-radius: 4px; padding: 0 2px; box-shadow: 0 0 0 1px #f59e0b55; }
.tc-fr-del { background: #fecaca; color: #991b1b; border-radius: 4px; padding: 0 2px; }
.tc-legend { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); margin: -4px 0 12px; }
.tc-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.tc-k-del::before { background: #fecaca; } .tc-k-add::before { background: #bbf7d0; }
.tc-diff { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86rem; border: 1px solid var(--border); border-radius: 14px; overflow: auto; max-height: 560px; }
.tc-dl { display: grid; grid-template-columns: 3.2em 3.2em 1.6em minmax(0, 1fr); align-items: start; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.tc-dl:last-child { border-bottom: 0; }
.tc-dl code { white-space: pre-wrap; word-break: break-word; padding: 4px 10px 4px 0; line-height: 1.55; font-family: inherit; color: var(--ink); }
.tc-ln { text-align: right; padding: 4px 8px 4px 0; color: var(--muted); font-size: .78rem; line-height: 1.75; user-select: none; background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.tc-sg { text-align: center; padding: 4px 0; font-weight: 800; line-height: 1.55; }
.tc-d-del { background: #fef2f2; } .tc-d-del .tc-sg { color: #dc2626; }
.tc-d-add { background: #f0fdf4; } .tc-d-add .tc-sg { color: #16a34a; }
.tc-d-skip { display: block; text-align: center; padding: 6px; color: var(--muted); background: var(--surface-2); font-family: var(--font); font-size: .8rem; }
del.tc-w { background: #fecaca; text-decoration: line-through; text-decoration-color: #dc262688; border-radius: 3px; }
ins.tc-w { background: #bbf7d0; text-decoration: none; border-radius: 3px; }
.tc-wrap { white-space: normal; display: block; min-width: 260px; line-height: 1.55; }
.tc-tts-bar { display: grid; gap: 10px; }

/* colour tools */
.tc-strip { display: flex; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 24px -16px rgba(16, 24, 40, .45), inset 0 0 0 1px rgba(0, 0, 0, .05); }
.tc-sw { flex: 1 1 0; min-width: 0; height: 92px; border: 0; margin: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 1px; padding: 8px 9px; cursor: pointer; font: inherit; text-align: left; transition: flex-grow .25s ease, transform .15s; position: relative; }
.tc-sw:hover, .tc-sw:focus-visible { flex-grow: 1.6; }
.tc-sw span { font-weight: 700; font-size: .74rem; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tc-sw small { font-size: .68rem; opacity: .8; }
.tc-sw:focus-visible { outline: 3px solid var(--ring); outline-offset: -3px; }
.tc-strip-sm .tc-sw { height: 72px; padding: 6px; }
.tc-strip-sm .tc-sw span { font-size: .62rem; }
@media (max-width: 560px) { .tc-strip-sm .tc-sw span { display: none; } .tc-strip-sm .tc-sw:hover span { display: block; } }
.tc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tc-grid .tc-sw { height: 66px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.tc-grid .tc-sw:hover { transform: translateY(-3px); }
.tc-hero { border-radius: 18px; padding: 20px 22px; display: grid; gap: 2px; box-shadow: 0 18px 34px -20px rgba(16, 24, 40, .6), inset 0 0 0 1px rgba(0, 0, 0, .06); animation: popIn .3s ease both; }
.tc-hero small { font-size: .78rem; font-weight: 600; opacity: .85; text-transform: uppercase; letter-spacing: .08em; }
.tc-hero b { font-size: 1.9rem; letter-spacing: .02em; }
.tc-hero span { font-size: .85rem; opacity: .85; }
.tc-scheme { display: grid; gap: 8px; }
.tc-sch-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tc-sch-h h3 { font-size: .92rem; color: var(--ink); }
.tc-sch-h small { font-size: .76rem; color: var(--muted); }
.tc-ct-prev { border-radius: 18px; padding: 22px; display: grid; gap: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.tc-ct-big { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.tc-ct-prev p { font-size: 1rem; line-height: 1.5; }
.tc-ct-prev small { font-size: .85rem; font-weight: 600; }
.tc-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tc-chk { padding: 10px 12px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; }
.tc-chk small { display: block; font-weight: 500; font-size: .72rem; opacity: .8; }
.tc-chk b { white-space: nowrap; }
.tc-chk.pass { background: #ecfdf5; color: #065f46; }
.tc-chk.fail { background: #fef2f2; color: #991b1b; }
.tc-checks .tc-chk:last-child { grid-column: 1 / -1; }
.tc-fixbtn { border: 0; border-radius: 14px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: transform .15s; }
.tc-fixbtn:hover { transform: translateY(-2px); }
.tc-fixbtn span { font-size: .85rem; opacity: .9; }
.tc-grad { height: 220px; border-radius: 18px; box-shadow: 0 18px 34px -20px rgba(16, 24, 40, .55), inset 0 0 0 1px rgba(0, 0, 0, .06); animation: popIn .3s ease both; }
.tc-code { display: block; padding: 14px 16px; border-radius: 14px; background: #0f1420; color: #e5e7eb; font-size: .84rem; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.tc-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.tc-pre { height: 56px; border-radius: 12px; border: 0; cursor: pointer; color: #fff; font: inherit; font-weight: 700; font-size: .74rem; display: flex; align-items: flex-end; padding: 6px 8px; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); transition: transform .15s; }
.tc-pre:hover { transform: translateY(-3px); }
.tc-mixhead { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.tc-mixhead span { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 6px 14px -6px rgba(16, 24, 40, .5), inset 0 0 0 1px rgba(0, 0, 0, .08); }
.tc-cv { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: repeating-conic-gradient(#eef0f4 0 25%, #fff 0 50%) 0 0 / 18px 18px; line-height: 0; }
.tc-cv canvas { width: 100%; height: auto; display: block; cursor: crosshair; touch-action: manipulation; }
[data-tool="imgcolor"] .fld input[type=file] { padding: 10px; border-radius: 12px; border: 1px dashed var(--border); background: var(--surface-2); width: 100%; cursor: pointer; }
.tc-modes { justify-content: center; }
.tc-modes .chip-link { cursor: pointer; font: inherit; font-size: .88rem; }
.swatch-big.tc-rc-big { height: 210px; font-size: 2rem; border-radius: 22px; }
.tc-rc-btns { justify-content: center; }
.tc-hist { display: flex; flex-wrap: wrap; gap: 8px; }
.tc-hist button { width: 38px; height: 38px; border-radius: 11px; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: transform .15s; }
.tc-hist button:hover { transform: translateY(-3px) scale(1.06); }
@media (max-width: 560px) { .tc-sw { padding: 7px 6px; } .tc-sw span { font-size: .62rem; letter-spacing: 0; } }
