/* Tool pages. Loads after /styles.6c6513e6.css and reuses its tokens, so the palette,
   type and spacing stay identical to the rest of the site.

   Every tool uses the same accent. One variable rather than a literal, so the
   whole set changes in one place; per-tool colours were tried and dropped. */
:root { --threat: var(--accent-2); }

.tool-head { padding: 40px 0 22px; }
.tool-kicker {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--threat); margin: 0 0 10px;
}
.tool-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 12px; line-height: 1.15; }
.tool-head .lede { max-width: 62ch; margin: 0; text-align: left; }

.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
}
.io { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 780px) { .io { grid-template-columns: 1fr; } }

.io label, .findings h2, .reference h2 { font-size: .95rem; font-weight: 600; }
.io textarea, .io .out, .panel > div > textarea {
  width: 100%; min-height: 190px; margin-top: 8px;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--border); border-radius: 9px;
  padding: 12px 14px; font-family: var(--mono); font-size: .92rem; line-height: 1.6;
  resize: vertical; white-space: pre-wrap; word-break: break-word; overflow: auto;
}
.io textarea:focus-visible, .io .out:focus-visible { outline: 2px solid var(--threat); outline-offset: 2px; }
.io .row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.count { font-family: var(--mono); font-size: .78rem; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
/* The example is the primary action while the field is empty — a visitor with no
   hostile text to paste has nothing else to do here. Once there is input, the
   cleaned output is what they came for and takes the emphasis instead. */
.sample-note { margin: 12px 0 0; color: var(--muted); font-size: .88rem; max-width: 68ch; }
.sample-note.hidden { display: none; }
.actions .btn { cursor: pointer; font-family: inherit; }
button.btn.primary { background: var(--accent); color: #07101f; border-color: var(--accent); }
button.btn.primary:hover { background: #8bbcff; }
button.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Verdict — the whole point of the tool. Stripping invisibles leaves output
   that looks identical to the input, so the count has to be stated loudly. */
.verdict {
  margin-top: 18px; padding: 16px 18px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg);
  border-left: 4px solid var(--threat);
}
.verdict.clean { border-left-color: var(--muted); }
.verdict .headline { font-size: 1.12rem; font-weight: 600; margin: 0; }
.verdict .sub { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }

/* The reveal. A table says what was removed; this shows where it sat, which is
   the part that makes the attack legible — a brand name split down the middle. */
.reveal-wrap { margin-top: 22px; }
.reveal-wrap h2 { font-size: .95rem; font-weight: 600; margin: 0 0 6px; }
.reveal-note { color: var(--muted); font-size: .88rem; margin: 0 0 10px; max-width: 68ch; }
.reveal {
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
  padding: 14px 16px; font-family: var(--mono); font-size: .95rem; line-height: 2.1;
  white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto;
}
.reveal:focus-visible { outline: 2px solid var(--threat); outline-offset: 2px; }
.reveal-gap { color: var(--muted); opacity: .7; padding: 0 .35em; user-select: none; }
.reveal-trim { margin: 8px 0 0; color: var(--muted); font-size: .82rem; font-family: var(--mono); }
.cp-badge {
  display: inline-block; font-family: var(--mono); font-size: .72rem;
  padding: 1px 5px; margin: 0 1px; border-radius: 4px; vertical-align: baseline;
  background: var(--threat); color: #07101f; font-weight: 600; cursor: help;
}

table.findings-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .9rem; }
table.findings-table th, table.findings-table td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top;
}
table.findings-table th {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
}
table.findings-table td.cp { font-family: var(--mono); color: var(--accent-2); white-space: nowrap; }
table.findings-table td.n { font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.tablescroll { overflow-x: auto; }

.chip {
  display: inline-block; font-family: var(--mono); font-size: .74rem;
  padding: 1px 7px; border-radius: 5px; border: 1px solid var(--threat);
  color: var(--threat); white-space: nowrap;
}
/* .chip is used on both spans and buttons. The transparent background comes
   from the base rule in styles.css; these are the button affordances. */
button.chip { font-family: var(--mono); font-size: .74rem; line-height: inherit; }
button.chip:hover { background: color-mix(in srgb, var(--threat) 16%, transparent); }
button.chip:active { background: color-mix(in srgb, var(--threat) 26%, transparent); }

.equiv { margin-top: 26px; }
.equiv pre {
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
  padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: .86rem; margin: 8px 0 0;
}
.equiv .tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.equiv .tab {
  font-family: var(--mono); font-size: .78rem; padding: 5px 11px; cursor: pointer;
  color: var(--muted); border: 1px solid var(--border); border-radius: 7px;
}
.equiv .tab[aria-selected="true"] { color: var(--threat); border-color: var(--threat); }

.reference { margin-top: 44px; }
.reference p { color: var(--muted); max-width: 68ch; }
.engine-note { margin-top: 30px; font-size: .85rem; color: var(--muted); }
.engine-note code { font-family: var(--mono); color: var(--accent-2); }

/* Tools index */
.tool-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); padding: 8px 0 20px; }
.tool-card {
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--threat);
  border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 8px;
}
.tool-card h3 { margin: 0; font-size: 1.05rem; }
.tool-card h3 a { color: var(--fg); }
.tool-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.tool-card .meta { margin-top: auto; padding-top: 12px; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.tool-card.soon { opacity: .62; }

/* Trojan Source: the two readings side by side. The left pane is deliberately
   rendered with the browser's own bidi algorithm applied — that is the point, it
   shows what a reviewer sees. The right pane replaces each control with a badge,
   so nothing remains to reorder and the bytes appear in logical order. */
.two-views { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
@media (max-width: 860px) { .two-views { grid-template-columns: 1fr; } }
.two-views h2 { font-size: .95rem; font-weight: 600; margin: 0 0 4px; }
.view-note { color: var(--muted); font-size: .82rem; margin: 0 0 8px; }
.view {
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
  padding: 12px 14px; font-family: var(--mono); font-size: .86rem; line-height: 1.9;
  min-height: 190px; max-height: 340px; overflow: auto;
  white-space: pre-wrap; word-break: break-word; margin: 0;
}
.view.rendered { color: var(--muted); }
.code-line { display: flex; gap: 12px; align-items: baseline; }
.line-no {
  color: var(--muted); opacity: .6; user-select: none; text-align: right;
  min-width: 2.4ch; flex: none; font-variant-numeric: tabular-nums;
}
.line-body { white-space: pre-wrap; word-break: break-word; }

/* The source pane is code, so it wants to be taller than a text field. */
#input { min-height: 210px; }

/* Confusables: rows where the two digit policies disagree are the point of the
   table, so they carry the accent rather than being left to the reader to spot. */
table.findings-table tr.differs td { background: color-mix(in srgb, var(--threat) 8%, transparent); }
table.findings-table tr.differs td:first-child { box-shadow: inset 3px 0 0 var(--threat); }

/* A confusable character is visible, unlike an invisible one, so the chip shows
   the glyph as well as its codepoint — the glyph is the thing that fooled you,
   and the codepoint is the proof. */
.conf-chip {
  display: inline-flex; align-items: baseline; gap: .3em;
  padding: 1px 6px; margin: 0 2px; border-radius: 5px;
  background: color-mix(in srgb, var(--threat) 16%, transparent);
  border: 1px solid var(--threat); cursor: help; line-height: 1.4;
}
.conf-chip b { font-weight: 600; color: var(--fg); font-style: normal; }
.conf-chip i { font-size: .68em; font-style: normal; color: var(--threat); letter-spacing: .02em; }

/* Zalgo: depth is the signal, so the chip carries it and the shade rises with it.
   Depths 1 and 2 stay quiet — that is where ordinary orthography lives. */
.zal-chip {
  display: inline-flex; align-items: baseline; gap: .25em;
  padding: 1px 4px; margin: 1px; border-radius: 4px; line-height: 1.9;
  border: 1px solid transparent;
}
.zal-chip b { font-weight: 400; font-style: normal; color: var(--fg); }
.zal-chip i {
  font-size: .62em; font-style: normal; color: var(--bg);
  background: var(--threat); border-radius: 3px; padding: 0 3px; font-weight: 700;
}
.zal-chip.d0 i { display: none; }
.zal-chip.d1 { background: color-mix(in srgb, var(--muted) 12%, transparent); }
.zal-chip.d1 i { background: var(--muted); }
.zal-chip.d2 { background: color-mix(in srgb, var(--muted) 18%, transparent); }
.zal-chip.d2 i { background: var(--muted); }
.zal-chip.d3 { background: color-mix(in srgb, #e0a458 22%, transparent); border-color: #e0a458; }
.zal-chip.d3 i { background: #e0a458; }
.zal-chip.d4 { background: color-mix(in srgb, #e06c58 26%, transparent); border-color: #e06c58; }
.zal-chip.d4 i { background: #e06c58; }

/* Hostname labels, shown apart so the script of each is visible — the TLD's
   script is half the question and it is easy to overlook when the name is one
   string. */
.labels { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 14px; }
.label-box {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px;
}
.label-box.flagged { border-color: var(--threat); background: color-mix(in srgb, var(--threat) 10%, transparent); }
.label-box b { font-family: var(--mono); font-size: 1rem; font-weight: 600; color: var(--fg); }
.label-box span { font-size: .72rem; color: var(--muted); }
.label-box.flagged span { color: var(--threat); }
.label-dot { font-family: var(--mono); color: var(--muted); font-size: 1.1rem; }

.host-chip {
  font-family: var(--mono); font-size: .82rem; cursor: pointer;
  background: var(--panel); color: var(--fg);
  border: 1px solid var(--border); border-radius: 7px; padding: 5px 10px;
}
.host-chip:hover { border-color: var(--threat); }
#example-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#input.host { min-height: 0; height: auto; }

/* Whole-script confusables: the string is drawn exactly like Latin, so every
   impostor character carries its codepoint and what it folds to. */
.char-chip {
  display: inline-flex; align-items: baseline; gap: .3em;
  padding: 1px 6px; margin: 1px 2px; border-radius: 5px;
  background: color-mix(in srgb, var(--threat) 14%, transparent);
  border: 1px solid var(--threat); cursor: help;
}
.char-chip b { font-weight: 600; font-style: normal; color: var(--fg); font-size: 1.02em; }
.char-chip i { font-size: .64em; font-style: normal; color: var(--threat); white-space: nowrap; }
#chars {
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
  padding: 14px 16px; font-family: var(--mono); font-size: .95rem; line-height: 2.2;
  word-break: break-word;
}
.char-summary { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
.char-summary strong { color: var(--fg); }

/* Whitespace: the classification is the signal, so the chip carries it. The
   blind-spot class — renders blank, but the caller's own whitespace test says
   no — is the one the page exists to show, so only it takes the threat colour.
   Ordinary spaces are never chipped at all; they are rendered as spaces. */
.ws-chip {
  display: inline-flex; align-items: baseline; gap: .3em;
  padding: 1px 5px; margin: 0 2px; border-radius: 5px; line-height: 1.7;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--muted) 12%, transparent);
  cursor: help; white-space: nowrap;
}
.ws-chip b { font-weight: 600; font-style: normal; color: var(--fg); font-size: .82em; }
.ws-chip i { font-size: .62em; font-style: normal; color: var(--muted); letter-spacing: .02em; }
.ws-chip .flag {
  font-size: .6em; font-weight: 700; letter-spacing: .03em;
  color: var(--bg); background: var(--threat); border-radius: 3px; padding: 0 3px;
}
.ws-chip.ws-blind { background: color-mix(in srgb, var(--threat) 16%, transparent); border-color: var(--threat); }
.ws-chip.ws-blind i { color: var(--threat); }
.ws-chip.ws-line { border-style: dashed; }

.left-note {
  margin: 14px 0 0; padding: 12px 14px; font-size: .92rem; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0;
}
.left-note strong { color: var(--fg); }

/* Filenames: the reveal is a comparison of two rows, not an annotation of one.
   The chips are deliberately identical in style between the rows — the whole
   point is that the two forms look the same — so the difference has to come
   from the codepoints and the byte counts, not from colour. */
.form-row { margin: 0 0 10px; }
.form-label {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: .82rem; font-weight: 600; color: var(--fg); margin: 0 0 5px;
}
.form-label em { font-style: normal; font-weight: 400; color: var(--muted); font-size: .92em; }
.form-label .tag {
  font-family: var(--mono); font-size: .72em; font-weight: 700; letter-spacing: .04em;
  color: var(--bg); background: var(--muted); border-radius: 3px; padding: 1px 5px;
}
.form-meta { margin-left: auto; font-weight: 400; color: var(--muted); font-family: var(--mono); font-size: .92em; }
.fn-strip {
  display: flex; flex-wrap: wrap; gap: 3px; padding: 9px 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  overflow-x: auto;
}
.fn-chip {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 3px 5px; border-radius: 5px; border: 1px solid transparent; min-width: 2.1em;
}
.fn-chip b { font-family: var(--mono); font-weight: 500; font-size: .95em; color: var(--fg); }
.fn-chip i { font-family: var(--mono); font-style: normal; font-size: .58em; color: var(--muted); }
.fn-chip.non-ascii {
  background: color-mix(in srgb, var(--threat) 15%, transparent);
  border-color: var(--threat);
}
.fn-chip.non-ascii i { color: var(--threat); }

/* The parameter selects sit in the action bar beside the buttons. */
.sel {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .85rem; color: var(--muted);
}
.sel select {
  font: inherit; font-size: .95em; color: var(--fg); background: var(--panel);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
}
.sel select:hover { border-color: var(--accent); }
