/* textcolour2: text tools */
.t2-box { max-height: 340px; overflow: auto; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); white-space: pre-wrap; word-break: break-word; line-height: 1.6; font-size: .95rem; color: var(--ink); margin: 0; }
.t2-box-sm { max-height: 180px; padding: 10px 12px; font-size: .92rem; }
.t2-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; }
.t2-code code { white-space: pre-wrap; background: none; padding: 0; }
.t2-ok { color: #15803d; } .t2-warn { color: #b45309; } .t2-bad { color: #b91c1c; }
.t2-lims { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 22px; }
.t2-lim-h { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; align-items: baseline; }
.t2-lim-h small { color: var(--muted); font-size: .74rem; }
.t2-lim-h b { white-space: nowrap; font-size: .85rem; }
.t2-lim-s { color: var(--muted); font-size: .76rem; }
.t2-bar { display: block; height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; margin: 6px 0 3px; }
.t2-bar i { display: block; height: 100%; border-radius: 99px; background: currentColor; transition: width .25s ease; }
.t2-bar i.t2-ok { color: #22c55e; } .t2-bar i.t2-warn { color: #f59e0b; } .t2-bar i.t2-bad { color: #ef4444; }
.t2-bar-sm { width: 110px; height: 7px; margin: 0; }
.t2-cards { display: grid; gap: 12px; }
.t2-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px 12px; background: var(--surface); display: grid; gap: 8px; }
.t2-card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; font-size: .92rem; }
.t2-card-h i { color: var(--brand); margin-right: 8px; }
.t2-card-h small { color: var(--muted); font-weight: 500; }
.t2-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.t2-list li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 4px 10px; font-size: .88rem; word-break: break-all; }
.t2-fancy { display: grid; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.t2-frow { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px 9px 14px; border-bottom: 1px solid var(--border); }
.t2-frow:last-child { border-bottom: 0; }
.t2-frow:nth-child(even) { background: var(--surface-2); }
.t2-frow small { color: var(--muted); font-size: .76rem; }
.t2-ftxt { font-size: 1.12rem; word-break: break-word; line-height: 1.5; }
@media (max-width: 560px) { .t2-frow { grid-template-columns: minmax(0, 1fr) auto; } .t2-frow small { grid-column: 1 / -1; margin-bottom: -6px; } }
.t2-tamil b { font-size: 2rem; word-break: break-all; }
.t2-codes code { word-break: break-word; }
.t2-tdig { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.t2-tdig span { display: grid; place-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 6px 2px; background: var(--surface-2); }
.t2-tdig b { font-size: 1.35rem; line-height: 1.3; }
.t2-tdig small { color: var(--muted); font-size: .72rem; }
.t2-md { border: 1px solid var(--border); border-radius: 14px; padding: 6px 18px 14px; background: var(--surface); line-height: 1.65; overflow-wrap: anywhere; max-height: 620px; overflow: auto; }
.t2-md h1, .t2-md h2, .t2-md h3, .t2-md h4, .t2-md h5, .t2-md h6 { margin: 16px 0 6px; line-height: 1.25; }
.t2-md h1 { font-size: 1.6rem; } .t2-md h2 { font-size: 1.3rem; } .t2-md h3 { font-size: 1.12rem; } .t2-md h4, .t2-md h5, .t2-md h6 { font-size: 1rem; }
.t2-md p, .t2-md ul, .t2-md ol, .t2-md blockquote, .t2-md pre { margin: 8px 0; }
.t2-md ul, .t2-md ol { padding-left: 1.4em; }
.t2-md ul { list-style: disc; } .t2-md ol { list-style: decimal; }
.t2-md a { color: var(--brand); text-decoration: underline; }
.t2-md blockquote { border-left: 4px solid var(--brand); padding: 4px 14px; background: var(--surface-2); border-radius: 0 10px 10px 0; color: var(--ink); }
.t2-md code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 5px; font-size: .88em; }
.t2-md pre { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 12px; overflow: auto; }
.t2-md pre code { background: none; border: 0; padding: 0; color: inherit; }
.t2-md hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
.t2-md img { max-width: 100%; border-radius: 10px; }
.t2-np { display: grid; gap: 10px; }
.t2-np textarea { width: 100%; min-height: 52vh; resize: vertical; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border); background: #fffef8; font: inherit; font-size: 1.02rem; line-height: 1.7; color: var(--ink); box-shadow: inset 0 1px 2px rgba(16, 24, 40, .05); }
.t2-np textarea:focus { outline: 3px solid var(--ring, rgba(207, 39, 30, .25)); border-color: var(--brand); }
.t2-np-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font-size: .84rem; color: var(--muted); }
.t2-np-saved i { color: #16a34a; }
.t2-np-saved .fa-triangle-exclamation { color: #d97706; }
.btn.t2-danger { color: #b91c1c; border-color: #fca5a5; }
.tool-shell.solo[data-tool="notepad"] { grid-template-columns: minmax(0, 860px); }

/* textcolour2: colour tools */
.t2-strip { display: flex; border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.t2-sw { flex: 1 1 0; min-width: 0; height: 58px; border: 0; margin: 0; padding: 6px; cursor: pointer; font: inherit; display: flex; align-items: flex-end; transition: flex-grow .2s; }
.t2-sw:hover, .t2-sw:focus-visible { flex-grow: 1.7; }
.t2-sw span { font-size: .68rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2-cvd { display: grid; gap: 12px; }
.t2-cvd-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 5px; font-size: .9rem; }
.t2-cvd-h small { color: var(--muted); font-size: .76rem; }
.t2-cvd-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.t2-cvd-imgs figure { margin: 0; display: grid; gap: 6px; }
.t2-cvd-imgs img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); }
.t2-cvd-imgs figcaption { font-size: .86rem; font-weight: 700; text-align: center; }
.t2-warnlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .86rem; }
.t2-dot { display: inline-block; width: 18px; height: 18px; border-radius: 6px; vertical-align: -4px; margin-right: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.t2-dot-x { background: repeating-linear-gradient(45deg, #fecaca 0 4px, #fff 4px 8px); }
.t2-code-btn { border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; padding: 3px 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; cursor: pointer; color: var(--ink); white-space: nowrap; margin: 2px 0; }
.t2-code-btn:hover { border-color: var(--brand); }
.t2-cn-count { font-size: .9rem; color: var(--muted); margin: 0; }
.t2-cn-count b { color: var(--ink); }
.t2-cn { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 760px; overflow: auto; padding: 2px; }
.t2-cn-i { display: grid; gap: 2px; border: 1px solid var(--border); border-radius: 14px; padding: 6px 6px 8px; background: var(--surface); }
.t2-cn-i button { border: 0; background: none; font: inherit; cursor: pointer; text-align: left; padding: 0 4px; color: var(--ink); }
.t2-cn-sw { height: 54px; border-radius: 10px !important; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); margin-bottom: 4px; transition: transform .15s; }
.t2-cn-sw:hover { transform: scale(1.03); }
.t2-cn-sw.t2-pulse { outline: 3px solid var(--brand); }
.t2-cn-n { font-weight: 700; font-size: .86rem; word-break: break-all; }
.t2-cn-h { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; color: var(--muted) !important; }
.t2-cn-i small { font-size: .72rem; color: var(--muted); padding: 0 4px; }
.t2-bs-stage { border-radius: 16px; border: 1px solid var(--border); min-height: 240px; display: grid; place-items: center; padding: 36px; }
.t2-bs-box { width: min(200px, 60%); aspect-ratio: 4 / 3; transition: box-shadow .2s, border-radius .2s; }
.t2-layers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.t2-layers-l { font-size: .82rem; font-weight: 700; color: var(--muted); margin-right: 4px; }
.t2-bs-pre { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.t2-bs-pre button { border: 1px solid var(--border); border-radius: 14px; background: #f1f5f9; padding: 16px 8px 8px; display: grid; justify-items: center; gap: 10px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--ink); }
.t2-bs-pre button:hover { border-color: var(--brand); }
.t2-bs-pre span { width: 44px; height: 32px; background: #fff; border-radius: 8px; }
