/* Curățătorul de text: doar clase .tc-*, token-urile site-ului cu fallback (ca la .jql-*). */
.tc-page {
  --tc-line: var(--line, #1c2542);
  --tc-panel: var(--bg-1, #080b17);
  --tc-panel-2: var(--bg-2, #0b101f);
  --tc-field: var(--bg-3, #101728);
  --tc-ink: var(--ink, #f3f6fd);
  --tc-ink-2: var(--ink-2, #a9b4ce);
  --tc-accent: var(--accent, #7c9cff);
  --tc-gold: var(--gold, #f4c667);
  min-width: 0;
}
.tc-cta:empty { display: none; }
.tc-cta { margin-top: 18px; }
.tc-privacy { margin: 18px 0 0; max-width: 62ch; padding-left: 12px; border-left: 3px solid var(--tc-accent); color: var(--tc-ink-2); font-size: .95rem; }

.tc {
  margin-top: clamp(24px, 3.5vw, 40px);
  border: 1px solid var(--tc-line); border-radius: var(--r, 18px);
  background: var(--tc-panel); overflow: hidden; box-shadow: var(--shadow-3, none);
  color-scheme: dark;
}
.tc-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tc-in, .tc-out { padding: clamp(16px, 2.2vw, 24px); min-width: 0; display: grid; gap: 12px; align-content: start; }
.tc-in { background: var(--tc-panel-2); border-right: 1px solid var(--tc-line); }
.tc h2 { margin: 0; font-size: 1rem; }
.tc-f { display: grid; gap: 6px; min-width: 0; }
.tc-f > span { font-size: .88rem; color: var(--tc-ink-2); font-weight: 500; }
.tc textarea {
  width: 100%; min-height: 220px; resize: vertical; padding: 10px 12px; border-radius: var(--r-xs, 8px);
  border: 1px solid var(--tc-line); background: var(--tc-field); color: var(--tc-ink);
  font: 400 .95rem/1.55 var(--f-body, system-ui, sans-serif);
}
.tc textarea:focus-visible, .tc button:focus-visible, .tc input:focus-visible, .tc summary:focus-visible, .tc-page a:focus-visible { outline: 2px solid var(--tc-accent); outline-offset: 2px; }
.tc-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tc-btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  min-height: 44px; padding: 0 16px; border-radius: var(--r-xs, 8px); cursor: pointer; text-decoration: none;
  border: 1px solid var(--tc-line); background: var(--tc-field); color: var(--tc-ink);
  font: 500 .9rem/1 var(--f-body, system-ui, sans-serif);
}
.tc-btn:hover:not(:disabled) { border-color: var(--tc-accent); }
.tc-btn:disabled { opacity: .5; cursor: not-allowed; }
.tc-btn.tc-primary { background: var(--tc-accent); border-color: var(--tc-accent); color: #05070f; }

.tc-opts { margin: 0; padding: 0; border: 0; display: grid; gap: 4px; min-width: 0; }
.tc-opts legend { padding: 0; margin-bottom: 6px; font-size: .88rem; font-weight: 600; color: var(--tc-ink); }
.tc-opt { display: flex; gap: 10px; align-items: flex-start; min-height: 32px; padding: 3px 0; color: var(--tc-ink-2); font-size: .9rem; line-height: 1.4; cursor: pointer; }
.tc-opt input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--tc-accent); }
.tc-opts-sub { margin: 8px 0 0; color: var(--tc-ink-2); font-size: .84rem; }
.tc-reset { justify-self: start; min-height: 40px; }

.tc-msg { margin: 0; color: var(--tc-ink); font-weight: 600; }
.tc-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-stat { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--tc-line); background: var(--tc-field); color: var(--tc-ink-2); font-size: .85rem; }
.tc-stat b { color: var(--tc-ink); }
.tc-hidden { margin: 0; padding: 10px 12px; border-left: 3px solid var(--tc-gold); background: var(--tc-field); color: var(--tc-ink-2); font-size: .92rem; overflow-wrap: anywhere; }
.tc-hidden b { color: var(--tc-gold); }
.tc-table, .tc-static { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tc-table th, .tc-table td, .tc-static th, .tc-static td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--tc-line); vertical-align: top; color: var(--tc-ink-2); }
.tc-table th, .tc-static th { color: var(--tc-ink); font-weight: 600; white-space: nowrap; }
.tc-code { font: 13px/1.4 var(--f-mono, ui-monospace, Menlo, monospace); color: var(--tc-ink) !important; white-space: nowrap; }
.tc-table td:first-child { color: var(--tc-ink); }
.tc-details { border-top: 1px solid var(--tc-line); padding-top: 10px; }
.tc-details summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.tc-details p { margin: 6px 0; color: var(--tc-ink-2); font-size: .88rem; }
.tc-marked { margin: 0; max-height: 220px; overflow: auto; padding: 10px 12px; border-radius: var(--r-xs, 8px); border: 1px solid var(--tc-line); background: var(--tc-field); color: var(--tc-ink); white-space: pre-wrap; overflow-wrap: anywhere; font: 13.5px/1.55 var(--f-mono, ui-monospace, Menlo, monospace); }
.tc-nojs { display: none; margin: 0; padding: 12px 14px; border-left: 3px solid var(--tc-gold); color: var(--tc-ink-2); }

.tc-about, .tc-faq, .tc-sources { margin-top: clamp(36px, 5vw, 60px); }
.tc-about h2, .tc-faq h2, .tc-sources h2 { font-size: 1.35rem; margin: 0 0 12px; }
.tc-about h3 { font-size: 1.05rem; margin: 22px 0 6px; }
.tc-about p, .tc-about li, .tc-sources li { color: var(--tc-ink-2); }
.tc-about li { margin: 6px 0; }
.tc-about code, .tc-faq code { font-size: .88rem; padding: 1px 5px; border-radius: 4px; background: var(--tc-field); }
.tc-static-wrap { overflow-x: auto; margin: 10px 0; }
.tc-sample { margin: 8px 0; padding: 10px 12px; border-radius: var(--r-xs, 8px); border: 1px solid var(--tc-line); background: var(--tc-field); color: var(--tc-ink); white-space: pre-wrap; overflow-wrap: anywhere; font: 13.5px/1.55 var(--f-mono, ui-monospace, Menlo, monospace); }
.tc-faq details { border-top: 1px solid var(--tc-line); padding: 12px 0; }
.tc-faq summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.tc-faq p { color: var(--tc-ink-2); margin: 8px 0 0; }
.tc-sources a, .tc-about a, .tc-faq a { color: var(--tc-accent); }
.tc-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--tc-ink); color: #05070f; font-weight: 600; font-size: .9rem; }

@media (max-width: 860px) {
  .tc-cols { grid-template-columns: minmax(0, 1fr); }
  .tc-in { border-right: 0; border-bottom: 1px solid var(--tc-line); }
}
@media (max-width: 560px) {
  .tc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tc-table, .tc-table tbody, .tc-table tr, .tc-table td { display: block; width: 100%; }
  .tc-table tr { border: 1px solid var(--tc-line); border-radius: var(--r-xs, 8px); padding: 6px 10px; margin-bottom: 8px; background: var(--tc-field); }
  .tc-table td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 8px; overflow-wrap: anywhere; }
  .tc-table td::before { content: attr(data-label); color: var(--tc-ink); font-weight: 600; }
  .tc-btn { flex: 1 1 auto; }
}
