/* Noble Pixel free tools: writing group (.wr-*): paraphrasing tool, AI content detector.
 * Mobile first; uses the theme's colour variables with fallbacks. */
.wr { --wr-line: var(--line, #e2e8f0); --wr-surface: var(--surface, #f5f8fc); --wr-ink: var(--ink, #17222f); --wr-muted: var(--muted, #66768a); --wr-blue: var(--blue, #1f7cec); --wr-coral: #f35538; --wr-navy: #111c29; --wr-radius: var(--radius, 14px); }
.wr [hidden] { display: none !important; }
.wr .btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: center; }
.wr-sm { padding: 8px 14px !important; font-size: .9rem !important; min-height: 40px; }
.wr .tool-label small { font-weight: 500; color: var(--wr-muted); }
.wr-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 6px; }
.wr-head .tool-label { margin: 0; }
.wr-lead { margin: 0 0 12px; color: var(--text, #3d4b5c); font-size: .95rem; line-height: 1.55; }
.wr-count { margin: 4px 0 0; color: var(--wr-muted); font-size: .84rem; min-height: 1.2em; }
.wr-file-msg { margin: 4px 0 0; font-size: .88rem; color: #0c7a3d; font-weight: 600; }
.wr-file-msg:empty { display: none; }
.wr-file-msg.is-bad { color: #b3311a; }
.wr-toprow { margin-top: 6px !important; }
.wr-out:empty { display: none; }
.wr-out { margin-top: 18px; }

/* file button: real input stays focusable, label is the visible button */
.wr-file { position: relative; overflow: hidden; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.wr-file input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.wr-file:focus-within { outline: 3px solid rgba(31,124,236,.35); outline-offset: 2px; }
.wr-dropbox { position: relative; border-radius: 12px; transition: box-shadow .15s; }
.wr-dropbox.is-over { box-shadow: 0 0 0 3px var(--wr-blue); }
.wr-dropbox.is-over::after { content: "Drop the .txt or .pdf file here"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(235,243,254,.92); color: var(--wr-blue); font-weight: 700; border-radius: 12px; pointer-events: none; }

/* notes */
.wr-note, .wr-good { padding: 12px 14px; border-radius: 12px; font-size: .92rem; line-height: 1.55; margin: 14px 0 0; }
.wr-note { background: #fff8e6; border: 1px solid #ffe3a3; color: #5c4400; }
.wr-note--info { background: var(--blue-50, #ebf3fe); border-color: #cfe1fb; color: var(--text, #3d4b5c); }
.wr-good { background: #e3f7ec; border: 1px solid #bfe8cf; color: #0c5a2e; font-weight: 600; }
.wr-note a, .wr-tips a { color: var(--wr-blue); font-weight: 600; }
.wr-privacy { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 20px 0 0; padding-top: 14px; border-top: 1px dashed var(--wr-line); color: var(--wr-muted); font-size: .86rem; text-align: center; line-height: 1.45; }
.wr-privacy svg { color: #12a150; flex: 0 0 auto; }
.wr-tips { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .94rem; line-height: 1.55; color: var(--text, #3d4b5c); }
.wr-link { font: inherit; font-size: .88rem; background: none; border: 0; padding: 4px 2px; color: var(--wr-blue); cursor: pointer; text-decoration: underline; min-height: 32px; }

/* tabs */
.wr-tabs { margin: 22px 0 14px; padding-top: 18px; border-top: 1px solid var(--wr-line); }
.wr-tabs .tool-tab { min-height: 42px; }
.wr-tabs .tool-tab:focus-visible { outline: 3px solid rgba(31,124,236,.4); outline-offset: 2px; }
@media (max-width: 479px) { .wr-tabs { display: grid; grid-template-columns: 1fr; } .wr-tabs .tool-tab { border-radius: 12px; text-align: left; } }

/* sources */
.wr-sources { display: grid; gap: 12px; }
.wr-src { border: 1px solid var(--wr-line); border-radius: var(--wr-radius); padding: 12px; background: var(--wr-surface); }
.wr-src__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wr-src__head strong { color: var(--wr-ink); font-size: .95rem; }
.wr-src__head .wr-x { margin-left: auto; }
.wr-src__name { margin-bottom: 8px; }
.wr-src textarea { background: #fff; }
.wr-filebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-top: 8px; }
.wr-filebar .wr-count { margin: 0; }
.wr-x { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--wr-line); background: #fff; color: var(--wr-muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.wr-x:hover, .wr-x:focus-visible { border-color: #e2462b; color: #b3311a; }

/* colour swatches (one per source) */
.wr-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; flex: 0 0 auto; }
.wr-c0 { background: #ffd98a; } .wr-c1 { background: #bcd8ff; } .wr-c2 { background: #c4ecd0; } .wr-c3 { background: #f6cdeb; } .wr-c4 { background: #ddd5ff; }
.wr-qc { background: repeating-linear-gradient(135deg, #e3f7ec 0 6px, #cdeedb 6px 12px); box-shadow: inset 0 -2px 0 #12a150; }
.wr-sw--plain { background: #fff; border: 1px solid var(--wr-line); }
.wr-sw--chg { background: #fff1c9; box-shadow: inset 0 -2px 0 #e0a100; }
.wr-sw--prot { background: #eef2f7; box-shadow: inset 0 0 0 1px #c8d3e0; }

/* results */
.wr-summary { flex-wrap: wrap; }
.wr-summary > div:last-child { flex: 1 1 220px; min-width: 0; }
.wr-bar { display: inline-block; width: 60px; height: 8px; border-radius: 4px; background: #e6ebf2; vertical-align: middle; overflow: hidden; margin-right: 4px; }
.wr-bar i { display: block; height: 100%; background: var(--wr-coral); border-radius: 4px; }
.wr-table td { white-space: nowrap; }
.wr-table td:first-child { white-space: normal; min-width: 140px; }
.wr-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; margin: 0 0 8px; color: var(--text, #3d4b5c); }
.wr-legend > span { display: inline-flex; align-items: center; padding: 1px 4px; border-radius: 4px; }
.wr-hlbox { border: 1px solid var(--wr-line); border-radius: 12px; padding: 14px 16px; background: #fff; line-height: 1.8; overflow-wrap: anywhere; font-size: .98rem; max-height: 520px; overflow: auto; }
.wr-m { color: inherit; border-radius: 3px; padding: 1px 0; }
.wr-passages { margin: 0; padding-left: 22px; display: grid; gap: 12px; font-size: .94rem; }
.wr-passages__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.wr-passages__meta .tb { display: inline-flex; align-items: center; }
.wr-passages q { display: block; color: var(--text, #3d4b5c); line-height: 1.55; }

/* quotes & citations */
.wr-hl { border-radius: 3px; padding: 0 1px; color: inherit; }
.wr-hl--ok { background: #d9f5e4; }
.wr-hl--warn { background: #ffeeb8; }
.wr-hl--bad { background: #ffd6cc; }
.wr-hc { background: none; color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.wr-hc--ok { text-decoration-color: #12a150; }
.wr-hc--bad { text-decoration-color: #e2462b; text-decoration-style: wavy; }

/* sentences to search */
.wr-sents { margin: 14px 0 16px; padding-left: 22px; display: grid; gap: 12px; }
.wr-sent { padding: 12px 14px; border: 1px solid var(--wr-line); border-radius: 12px; background: #fff; }
.wr-sent::marker { color: var(--wr-muted); font-weight: 700; }
.wr-sent.is-done { border-color: #bfe8cf; background: #f6fcf8; }
.wr-sent__q { margin: 0 0 10px; line-height: 1.55; color: var(--wr-ink); overflow-wrap: anywhere; }
.wr-sent__q small { color: var(--wr-muted); }
.wr-sent__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.wr-sent__btns .btn { flex: 1 1 auto; text-align: center; justify-content: center; }
@media (min-width: 560px) { .wr-sent__btns .btn { flex: 0 0 auto; } }

/* paraphrasing tool controls */
.wr-controls { display: grid; gap: 4px 24px; grid-template-columns: 1fr; margin-top: 6px; }
@media (min-width: 720px) { .wr-controls { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; } }
.wr-modes { border: 0; padding: 0; margin: 0; min-width: 0; }
.wr-modes legend { padding: 0; }
.wr-seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
@media (min-width: 420px) { .wr-seg { grid-template-columns: repeat(4, 1fr); } }
.wr-seg label { position: relative; cursor: pointer; }
.wr-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wr-seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 10px; border: 1.5px solid var(--wr-line); border-radius: 12px; background: #fff; font-weight: 700; font-size: .93rem; color: var(--text, #3d4b5c); transition: border-color .15s, background .15s; }
.wr-seg input:checked + span { background: var(--wr-navy); border-color: var(--wr-navy); color: #fff; }
.wr-seg input:focus-visible + span { outline: 3px solid rgba(31,124,236,.4); outline-offset: 2px; }
.wr-strength input[type="range"] { width: 100%; accent-color: var(--wr-blue); height: 32px; margin: 0; }
.wr-strength__marks { display: flex; justify-content: space-between; font-size: .8rem; color: var(--wr-muted); margin-top: -2px; }
.wr-row { display: flex; flex-wrap: wrap; gap: 8px; }
.wr-row input { flex: 1 1 200px; min-width: 0; }
.wr-row .btn { flex: 0 0 auto; }

details.wr-details { border: 1px solid var(--wr-line); border-radius: var(--wr-radius); background: #fff; margin: 16px 0 0; padding: 0 14px; }
details.wr-details > summary { cursor: pointer; padding: 13px 0; font-weight: 800; color: var(--wr-ink); list-style: none; display: flex; align-items: center; gap: 6px; }
details.wr-details > summary::-webkit-details-marker { display: none; }
details.wr-details > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; flex: 0 0 auto; }
details.wr-details[open] > summary::after { transform: rotate(-135deg); }
details.wr-details[open] { padding-bottom: 14px; }
details.wr-details > summary span { color: var(--wr-muted); font-weight: 600; }
.wr-protect .tool-hint:first-of-type { margin-top: 0; }

.wr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wr-chip { font: inherit; font-size: .86rem; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 6px 10px; min-height: 36px; border-radius: 999px; border: 1px solid #c8d3e0; background: #eef2f7; color: var(--wr-ink); cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.wr-chip small { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--wr-muted); }
.wr-chip__x { font-size: 1rem; line-height: 1; color: var(--wr-muted); }
.wr-chip:hover, .wr-chip:focus-visible { border-color: #e2462b; }
.wr-chip:hover .wr-chip__x, .wr-chip:focus-visible .wr-chip__x { color: #b3311a; }
.wr-chip--user { background: var(--blue-50, #ebf3fe); border-color: #b7d3f8; }
.wr-chip--quote, .wr-chip--cite { background: #eef8f2; border-color: #bfe0cc; }

/* paraphrase output */
.wr-result { position: relative; margin-top: 8px; }
.wr-ppout { font-size: 1.02rem; line-height: 1.9; }
.wr-chg { font: inherit; color: inherit; line-height: inherit; display: inline; padding: 1px 2px; margin: 0; border: 0; border-radius: 4px; background: #fff1c9; box-shadow: inset 0 -2px 0 #e0a100; cursor: pointer; text-align: left; }
.wr-chg:hover { background: #ffe7a3; }
.wr-chg:focus-visible { outline: 2px solid var(--wr-blue); outline-offset: 1px; }
.wr-chg.is-orig { background: transparent; box-shadow: inset 0 -2px 0 #c8d3e0; }
.wr-prot { background: #eef2f7; border-radius: 4px; box-shadow: inset 0 0 0 1px #d5dee9; padding: 0 2px; }
.wr-pop { position: absolute; z-index: 20; width: min(320px, 100%); background: #fff; border: 1px solid var(--wr-line); border-radius: 14px; box-shadow: 0 12px 32px rgba(17,28,41,.18); padding: 10px; }
.wr-pop__head { display: flex; align-items: flex-start; gap: 8px; font-size: .86rem; color: var(--wr-muted); margin-bottom: 8px; }
.wr-pop__head > span { flex: 1 1 auto; overflow-wrap: anywhere; }
.wr-pop__head q { color: var(--wr-ink); font-weight: 600; }
.wr-pop__head .wr-x { width: 32px; height: 32px; }
.wr-pop__opts { display: grid; gap: 6px; }
.wr-opt { font: inherit; font-size: .95rem; text-align: left; padding: 10px 12px; min-height: 42px; border-radius: 10px; border: 1.5px solid var(--wr-line); background: #fff; color: var(--wr-ink); cursor: pointer; overflow-wrap: anywhere; }
.wr-opt:hover, .wr-opt:focus-visible { border-color: var(--wr-blue); outline: none; }
.wr-opt.is-on { border-color: var(--wr-blue); background: var(--blue-50, #ebf3fe); font-weight: 700; }
.wr-opt--orig { color: var(--text, #3d4b5c); background: var(--wr-surface); }

/* AI content detector */
.wr-disclaimer { border: 1px solid #ffd2a8; background: linear-gradient(180deg, #fff6ec, #fffaf4); border-radius: var(--wr-radius); padding: 14px 16px; margin-bottom: 16px; color: #5a3a14; }
.wr-disclaimer__h { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 800; color: #8a3a12; }
.wr-disclaimer__h svg { color: var(--wr-coral); flex: 0 0 auto; }
.wr-disclaimer ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: .93rem; line-height: 1.5; }
.wr-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 18px; background: var(--wr-surface); border-radius: 18px; border-left: 5px solid #12a150; }
.wr-verdict--mixed { border-left-color: #f0a020; }
.wr-verdict--high { border-left-color: #e2462b; }
.wr-verdict > div { flex: 1 1 240px; min-width: 0; }
.wr-verdict h3 { margin: 0 0 6px; font-size: 1.15rem; color: var(--wr-ink); }
.wr-verdict p { margin: 0 0 6px; color: var(--text, #3d4b5c); line-height: 1.5; }
.wr-verdict__k { font-size: .78rem !important; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--wr-muted) !important; margin-bottom: 2px !important; }
.wr-verdict__small { font-size: .84rem; color: var(--wr-muted) !important; }
.wr-gauge { width: 190px; max-width: 100%; height: auto; flex: 0 0 auto; margin: 0 auto; }
.wr-g { fill: none; stroke-width: 18; stroke-linecap: butt; }
.wr-g--low { stroke: #6fd39a; } .wr-g--mid { stroke: #ffc85c; } .wr-g--high { stroke: #ff8a70; }
.wr-g__needle { stroke: var(--wr-navy); stroke-width: 4; stroke-linecap: round; }
.wr-g__hub { fill: var(--wr-navy); }
.wr-g__t { font-size: 11px; font-weight: 700; fill: var(--wr-muted); font-family: inherit; }
.wr-sigs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .wr-sigs { grid-template-columns: 1fr 1fr; } }
.wr-sig { border: 1px solid var(--wr-line); border-radius: 14px; padding: 12px 14px; background: #fff; min-width: 0; }
.wr-sig__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.wr-sig__top strong { color: var(--wr-ink); }
.wr-sig__val { margin: 4px 0 6px; font-weight: 800; font-size: 1.05rem; color: var(--wr-ink); }
.wr-meter { height: 6px; border-radius: 3px; background: #e6ebf2; overflow: hidden; }
.wr-meter i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #6fd39a, #ffc85c 55%, #ff8a70); }
.wr-sig__detail { margin: 8px 0 4px; font-size: .9rem; color: var(--text, #3d4b5c); overflow-wrap: anywhere; }
.wr-sig__ex { margin: 0; font-size: .85rem; color: var(--wr-muted); line-height: 1.5; }
.wr-f { color: inherit; border-radius: 3px; padding: 1px 0; }
.wr-f--some { background: #fff1c9; }
.wr-f--high { background: #ffd6cc; }

@media (max-width: 479px) {
	.wr-hlbox { padding: 12px; font-size: .95rem; }
	.wr .tool-summary { padding: 16px; gap: 14px; }
	.wr-verdict { padding: 14px; }
	.wr .btn-row > .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
}
@media print { .wr-pop, .wr-file, .wr .btn-row { display: none !important; } }
