/* Writer's Aids (C13). Category colors always pair with a text label —
   color is never the only signal. Dark theme via [data-theme="dark"]. */

.wa-layout {
    max-width: 52rem;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.wa-panel {
    margin: 2rem 0;
    padding: 1.25rem;
    border: 1px solid var(--border-color, #d9d9e0);
    border-radius: 8px;
}

.wa-panel-lede {
    color: var(--text-secondary, #555);
    margin: 0.25rem 0 1rem;
}

.wa-scan-textarea {
    resize: vertical;
    min-height: 10rem;
    font-family: inherit;
}

.wa-scan-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.wa-results,
.wa-summary {
    margin-top: 1rem;
}

.wa-alts {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.wa-alt {
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color, #d9d9e0);
}

.wa-alt-word {
    font-weight: 700;
    font-size: 1.05rem;
    margin-right: 0.25rem;
}

.wa-gloss {
    display: block;
    color: var(--text-secondary, #555);
    margin-top: 0.15rem;
}

.wa-gloss--missing {
    font-style: italic;
}

.wa-input-gloss {
    color: var(--text-secondary, #555);
}

.wa-badge,
.wa-chip {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
    border: 1px solid var(--border-color, #d9d9e0);
    white-space: nowrap;
}

.wa-badge--shorter { background: rgba(46, 125, 50, 0.12); }
.wa-badge--common { background: rgba(21, 101, 192, 0.12); }

.wa-output {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px dashed var(--border-color, #d9d9e0);
    border-radius: 8px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-height: 24rem;
    overflow-y: auto;
}

.wa-mark {
    padding: 0 0.15rem;
    border-radius: 3px;
    border-bottom: 2px solid currentColor;
    background: rgba(249, 168, 37, 0.25);
    color: inherit;
}

.wa-mark--cliche { background: rgba(249, 168, 37, 0.3); }
.wa-mark--corporate { background: rgba(21, 101, 192, 0.2); }
.wa-mark--ai_tell { background: rgba(123, 31, 162, 0.2); }
.wa-mark--wordiness { background: rgba(46, 125, 50, 0.2); }
.wa-mark--filler { background: rgba(198, 40, 40, 0.18); }

.wa-chip--cliche { background: rgba(249, 168, 37, 0.2); }
.wa-chip--corporate { background: rgba(21, 101, 192, 0.14); }
.wa-chip--ai_tell { background: rgba(123, 31, 162, 0.14); }
.wa-chip--wordiness { background: rgba(46, 125, 50, 0.14); }
.wa-chip--filler { background: rgba(198, 40, 40, 0.12); }

.wa-fixes {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.wa-fixes li {
    padding: 0.35rem 0;
    border-top: 1px solid var(--border-color, #d9d9e0);
}

.wa-fix-phrase {
    font-weight: 600;
}

.wa-phrase-hit {
    padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--border-color, #d9d9e0);
    background: rgba(46, 125, 50, 0.08);
}

.wa-provenance {
    font-size: 0.85rem;
    color: var(--text-secondary, #555);
}

[data-theme="dark"] .wa-mark--cliche { background: rgba(249, 168, 37, 0.28); }
[data-theme="dark"] .wa-mark--corporate { background: rgba(100, 181, 246, 0.28); }
[data-theme="dark"] .wa-mark--ai_tell { background: rgba(206, 147, 216, 0.28); }
[data-theme="dark"] .wa-mark--wordiness { background: rgba(129, 199, 132, 0.28); }
[data-theme="dark"] .wa-mark--filler { background: rgba(239, 154, 154, 0.26); }
[data-theme="dark"] .wa-phrase-hit { background: rgba(129, 199, 132, 0.12); }
[data-theme="dark"] .wa-badge--shorter { background: rgba(129, 199, 132, 0.2); }
[data-theme="dark"] .wa-badge--common { background: rgba(100, 181, 246, 0.2); }
[data-theme="dark"] .wa-chip--cliche { background: rgba(249, 168, 37, 0.24); }
[data-theme="dark"] .wa-chip--corporate { background: rgba(100, 181, 246, 0.22); }
[data-theme="dark"] .wa-chip--ai_tell { background: rgba(206, 147, 216, 0.22); }
[data-theme="dark"] .wa-chip--wordiness { background: rgba(129, 199, 132, 0.22); }
[data-theme="dark"] .wa-chip--filler { background: rgba(239, 154, 154, 0.2); }
