/* AI Detector v2 — layered on aiwa-paraphrase.css + aiwa-detector.css (shared app shell) */
.ai-detector-page .pp-output.detector-report { padding: 0; }
.ai-detector-page .detector-report-content { padding: 22px 26px 40px; }
.ai-detector-page .detector-report.empty { padding: 28px; }
.ai-detector-page .detector-report.loading { padding: 22px 26px; }
.detector-summary-text { margin: 16px 0 0; color: var(--aiwa-text); font-size: 14.5px; line-height: 1.6; }
.ai-detector-page .pp-input-wrap .detector-evidence-document { position: absolute; inset: 0; z-index: 1; margin: 0; padding: 50px 26px 40px; overflow: auto; scrollbar-gutter: stable; font-size: 16px; line-height: 1.85; }
.ai-detector-page .pp-input-wrap .detector-evidence-document[hidden] { display: none; }
.ai-detector-page .pp-input-wrap.is-evidence .pp-input { display: none; }
.dt-in-tools { right: 14px; }
.dt-in-tools[hidden] { display: none !important; }
.ai-detector-page .pp-pane-in .pp-out-tools { display: flex; }
.dt-tools-hint { padding: 0 8px 0 4px; color: var(--aiwa-muted); font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.dt-legend-bar { display: inline-flex; align-items: center; gap: 14px; height: 42px; padding: 0 14px; border: 1px solid var(--aiwa-line); border-radius: 10px; background: #fff; color: var(--aiwa-muted); font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.dt-legend-bar span { display: inline-flex; align-items: center; gap: 6px; }
.dt-legend-bar i { width: 10px; height: 10px; border-radius: 8px; background: var(--detector-human-soft); box-shadow: inset 0 0 0 1px var(--detector-human-border); }
.dt-legend-bar .medium i { background: var(--detector-mixed-soft); box-shadow: inset 0 0 0 1px var(--detector-mixed-border); }
.dt-legend-bar .high i { background: var(--detector-ai-soft); box-shadow: inset 0 0 0 1px var(--detector-ai-border); }
.dt-ready { color: var(--aiwa-muted); }
.dt-ready.is-ready { color: var(--aiwa-brand-dark); }
.dt-ready.is-short b { color: var(--aiwa-text); }
.ai-detector-page #humanizeBtn:not(:disabled) { border-color: #9bc7aa; color: var(--aiwa-brand-dark); }
.ai-detector-page #humanizeBtn:not(:disabled) .aiwa-ui-icon { filter: invert(35%) sepia(70%) saturate(680%) hue-rotate(97deg) brightness(91%); }
.ai-detector-page .detector-overview { padding-top: 4px; }
@media (max-width: 900px) {
  .dt-legend-bar { height: 38px; padding: 0 10px; gap: 10px; }
  .ai-detector-page .pp-input-wrap .detector-evidence-document { padding: 46px 18px 32px; min-height: 0; }
  .ai-detector-page .detector-report { min-height: 0; }
  .ai-detector-page .detector-report-content { padding: 18px 16px 32px; }
  .dt-tools-hint { display: none; }
}
.ai-detector-page .pp-run.is-not-ready { opacity: 0.72; }
.ai-detector-page .pp-run:disabled { cursor: wait; }
/* ---- report v2 (dtr) ---- */
.dtr { --dtr-low: #137a3d; --dtr-low-soft: #dff2e5; --dtr-med: #b26a00; --dtr-med-soft: #fff1cc; --dtr-high: #b42318; --dtr-high-soft: #fbe0dc; --dtr-ease: cubic-bezier(.22,.61,.36,1); display: grid; gap: 16px; }
.dtr > * { opacity: 0; transform: translateY(10px); transition: opacity 420ms var(--dtr-ease), transform 420ms var(--dtr-ease); }
.dtr.is-in > * { opacity: 1; transform: none; }
.dtr.is-in > :nth-child(2) { transition-delay: 80ms; } .dtr.is-in > :nth-child(3) { transition-delay: 160ms; } .dtr.is-in > :nth-child(4) { transition-delay: 240ms; } .dtr.is-in > :nth-child(5) { transition-delay: 320ms; } .dtr.is-in > :nth-child(6) { transition-delay: 380ms; }
/* hero */
.dtr-hero { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 12px 28px; align-items: center; padding: 18px 22px 20px; border: 1px solid var(--aiwa-line); border-radius: 18px; background: linear-gradient(180deg, #fbfcfb, #fff); }
.dtr-gauge { position: relative; width: 272px; }
.dtr-gauge-svg { display: block; width: 100%; height: auto; overflow: visible; }
.dtr-seg { fill: none; stroke-linecap: butt; opacity: .28; }
.dtr-seg.low { stroke: var(--dtr-low); } .dtr-seg.medium { stroke: var(--dtr-med); } .dtr-seg.high { stroke: var(--dtr-high); }
.dtr-progress { fill: none; stroke-linecap: round; stroke: var(--dtr-med); transition: stroke-dashoffset 1100ms var(--dtr-ease); }
.dtr-progress.low { stroke: var(--dtr-low); } .dtr-progress.high { stroke: var(--dtr-high); }
.dtr.is-in .dtr-progress { stroke-dashoffset: var(--dtr-target) !important; }
.dtr-marker { fill: #fff; stroke: var(--aiwa-ink); stroke-width: 3; opacity: 0; transition: opacity 300ms 1000ms; }
.dtr.is-in .dtr-marker { opacity: 1; }
.dtr-tick { stroke: #c9d3cd; stroke-width: 1.5; } .dtr-tick-label { fill: var(--aiwa-muted); font-size: 9px; font-weight: 700; }
.dtr-gauge-value { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; line-height: 1; }
.dtr-gauge-value strong { display: block; color: var(--aiwa-ink); font-size: 36px; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.dtr-gauge-value span { display: block; margin-top: 4px; color: var(--aiwa-muted); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.dtr-verdict { min-width: 0; display: grid; gap: 8px; }
.dtr-verdict h3 { margin: 0; color: var(--aiwa-ink); font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.dtr-pill { display: inline-flex; align-items: center; gap: 7px; width: max-content; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.dtr-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.dtr-pill.low, .dtr-tag.low { background: var(--dtr-low-soft); color: var(--dtr-low); } .dtr-pill.medium, .dtr-tag.medium { background: var(--dtr-med-soft); color: #7b4b0f; } .dtr-pill.high, .dtr-tag.high { background: var(--dtr-high-soft); color: var(--dtr-high); }
.dtr-summary { margin: 0; color: var(--aiwa-text); font-size: 14px; line-height: 1.6; }
.dtr-range { display: grid; gap: 6px; margin-top: 4px; }
.dtr-range-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--aiwa-muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.dtr-range-head b { color: var(--aiwa-ink); font-size: 12.5px; text-transform: none; letter-spacing: 0; }
.dtr-range-track { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--dtr-low-soft) 0 44.5%, var(--dtr-med-soft) 44.5% 69.5%, var(--dtr-high-soft) 69.5% 100%); overflow: visible; }
.dtr-range-band { position: absolute; top: 0; bottom: 0; left: var(--lo); width: 0; border-radius: 999px; background: rgba(23, 33, 27, .22); transition: width 900ms var(--dtr-ease) 300ms; }
.dtr.is-in .dtr-range-band { width: var(--w); }
.dtr-range-dot { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--aiwa-ink); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); transform: translate(-50%, -50%); transition: left 1100ms var(--dtr-ease); }
.dtr.is-in .dtr-range-dot { left: var(--at); }
.dtr-range-scale { display: flex; justify-content: space-between; gap: 8px; color: var(--aiwa-muted); font-size: 10.5px; font-weight: 650; white-space: nowrap; }
/* tiles */
.dtr-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dtr-tile { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--aiwa-line); border-radius: 14px; background: #fff; }
.dtr-tile small { color: var(--aiwa-muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.dtr-tile strong { color: var(--aiwa-ink); font-size: 24px; font-weight: 850; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dtr-tile strong em { font-style: normal; color: var(--aiwa-muted); font-size: 14px; font-weight: 700; }
.dtr-tile-bar { display: block; height: 6px; border-radius: 999px; background: #e6ece8; overflow: hidden; }
.dtr-tile-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--dtr-med); transition: width 1000ms var(--dtr-ease) 200ms; }
.dtr-tile-bar i.low { background: var(--dtr-low); } .dtr-tile-bar i.high { background: var(--dtr-high); }
.dtr.is-in .dtr-tile-bar i { width: var(--w); }
.dtr-tile-note { color: var(--aiwa-muted); font-size: 11.5px; font-weight: 650; }
.dtr-conf.low { color: var(--aiwa-muted); } .dtr-conf.medium { color: #7b4b0f; } .dtr-conf.high { color: var(--dtr-low); }
.dtr-conf-dots { display: flex; gap: 4px; } .dtr-conf-dots i { flex: 1; height: 6px; border-radius: 999px; background: #e6ece8; } .dtr-conf-dots i.on { background: var(--aiwa-brand); }
/* cards */
.dtr-card { padding: 16px 18px 18px; border: 1px solid var(--aiwa-line); border-radius: 16px; background: #fff; }
.dtr-card-head { margin-bottom: 12px; } .dtr-card-head h4 { margin: 0 0 2px; color: var(--aiwa-ink); font-size: 15px; font-weight: 800; } .dtr-card-head p { margin: 0; color: var(--aiwa-muted); font-size: 12.5px; }
.dtr-stack { display: flex; height: 22px; border-radius: 999px; overflow: hidden; background: #e6ece8; }
.dtr-stack span { position: relative; width: 0; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; transition: width 900ms var(--dtr-ease) 200ms; overflow: hidden; }
.dtr-stack span[hidden] { display: none; }
.dtr.is-in .dtr-stack span { width: var(--w); }
.dtr-stack .low { background: var(--dtr-low); } .dtr-stack .medium { background: var(--dtr-med); } .dtr-stack .high { background: var(--dtr-high); }
.dtr-stack-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: var(--aiwa-text); font-size: 12px; font-weight: 650; }
.dtr-stack-legend span { display: inline-flex; align-items: center; gap: 6px; } .dtr-stack-legend i { width: 9px; height: 9px; border-radius: 50%; }
.dtr-stack-legend .low i { background: var(--dtr-low); } .dtr-stack-legend .medium i { background: var(--dtr-med); } .dtr-stack-legend .high i { background: var(--dtr-high); }
.dtr-spark { display: flex; align-items: flex-end; gap: 3px; height: 54px; margin-top: 14px; padding-top: 8px; border-top: 1px dashed var(--aiwa-line); }
.dtr-spark i { flex: 1 1 0; max-width: 22px; height: 0; border-radius: 3px 3px 0 0; background: var(--dtr-low); opacity: .85; cursor: pointer; transition: height 700ms var(--dtr-ease) 300ms, opacity 120ms; }
.dtr-spark i.medium { background: var(--dtr-med); } .dtr-spark i.high { background: var(--dtr-high); } .dtr-spark i:hover { opacity: 1; }
.dtr.is-in .dtr-spark i { height: var(--h); }
/* signals */
.dtr-signals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dtr-signal { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--aiwa-line); border-radius: 14px; background: #fbfcfb; }
.dtr-signal-ring { position: relative; flex: 0 0 52px; width: 52px; height: 52px; }
.dtr-signal-ring svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.dtr-signal-ring .bg { fill: none; stroke: #e6ece8; stroke-width: 5; }
.dtr-signal-ring .fg { fill: none; stroke: var(--dtr-med); stroke-width: 5; stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 1000ms var(--dtr-ease) 250ms; }
.dtr.is-in .dtr-signal-ring .fg { stroke-dashoffset: var(--target); }
.dtr-signal.low .fg, .dtr-signal.low .dtr-signal-bar i { stroke: var(--dtr-low); background: var(--dtr-low); } .dtr-signal.high .fg, .dtr-signal.high .dtr-signal-bar i { stroke: var(--dtr-high); background: var(--dtr-high); } .dtr-signal.medium .dtr-signal-bar i { background: var(--dtr-med); }
.dtr-signal-ring b { position: absolute; inset: 0; display: grid; place-items: center; color: var(--aiwa-ink); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dtr-signal-copy { min-width: 0; flex: 1; display: grid; gap: 4px; }
.dtr-signal-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.dtr-signal-top strong { color: var(--aiwa-ink); font-size: 13.5px; font-weight: 750; }
.dtr-tag { padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 750; white-space: nowrap; }
.dtr-signal-copy p { margin: 0; color: var(--aiwa-muted); font-size: 12px; line-height: 1.45; }
.dtr-signal-bar { display: block; height: 4px; margin-top: 4px; border-radius: 999px; background: #e6ece8; overflow: hidden; }
.dtr-signal-bar i { display: block; width: 0; height: 100%; border-radius: inherit; transition: width 900ms var(--dtr-ease) 300ms; }
.dtr.is-in .dtr-signal-bar i { width: var(--w); }
/* meta */
.dtr-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--aiwa-muted); font-size: 12px; font-weight: 650; }
.dtr-meta span { display: inline-flex; align-items: center; gap: 6px; } .dtr-meta .aiwa-ui-icon { width: 13px; height: 13px; opacity: .7; }
.dtr .detector-disclaimer { margin: 0; }
@media (max-width: 1700px) { .dtr-signals { grid-template-columns: 1fr; } }
@media (max-width: 1300px) { .dtr-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1500px) { .dtr-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 6px; } .dtr-gauge { width: 240px; } .dtr-verdict { justify-items: center; width: 100%; } .dtr-range { width: 100%; text-align: left; } .dtr-range-head { text-align: left; } }
@media (max-width: 900px) { .dtr { gap: 12px; } .dtr-hero { padding: 14px 14px 16px; } .dtr-gauge { width: 232px; } .dtr-gauge-value strong { font-size: 34px; } .dtr-tile strong { font-size: 20px; } .dtr-card { padding: 14px; } }
@media (prefers-reduced-motion: reduce) { .dtr > *, .dtr-progress, .dtr-needle, .dtr-range-band, .dtr-range-dot, .dtr-tile-bar i, .dtr-stack span, .dtr-spark i, .dtr-signal-ring .fg, .dtr-signal-bar i { transition: none !important; } }
