/* Vocabulary Profiler (C15). Feature-scoped styles only; shared tokens and
   utility classes come from main.css. Respects [data-theme="dark"] tokens.
   Band color is never the only signal: each band also carries a distinct
   underline style, and the summary table + band lists restate everything. */

.vp-tool {
    max-width: 52rem;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.vp-panel {
    margin: 1.25rem 0 2rem;
}

.vp-textarea {
    resize: vertical;
    min-height: 10rem;
    font: inherit;
    line-height: 1.5;
}

.vp-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.vp-char-count {
    font-size: 0.85rem;
    opacity: 0.75;
}

.vp-report-toolbar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.vp-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vp-results-title {
    margin: 0;
}

.vp-subheading {
    margin: 1.5rem 0 0.5rem;
}

/* Band styles: light-theme tints with dark-theme overrides, plus a
   per-band underline so bands stay distinguishable without color. */
.vp-word,
.vp-swatch {
    border-radius: 2px;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

.vp-band-1 {
    background: #dcefdc;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-color: #2f7d32;
}

.vp-band-2 {
    background: #dbe9f6;
    text-decoration-line: underline;
    text-decoration-style: dashed;
    text-decoration-color: #1d5b9e;
}

.vp-band-3 {
    background: #fdf0d2;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-color: #92690d;
}

.vp-band-4-5 {
    background: #fbdfd2;
    text-decoration-line: underline;
    text-decoration-style: double;
    text-decoration-color: #b23c17;
}

.vp-band-off {
    background: #e8e2f4;
    text-decoration-line: underline;
    text-decoration-style: wavy;
    text-decoration-color: #5b4a8a;
}

[data-theme="dark"] .vp-band-1 { background: #1d3a1f; text-decoration-color: #7fc784; }
[data-theme="dark"] .vp-band-2 { background: #17304a; text-decoration-color: #7fb3e8; }
[data-theme="dark"] .vp-band-3 { background: #3d3212; text-decoration-color: #e0b95a; }
[data-theme="dark"] .vp-band-4-5 { background: #43200f; text-decoration-color: #ee9a75; }
[data-theme="dark"] .vp-band-off { background: #2b2440; text-decoration-color: #b3a1e0; }

.vp-legend {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.1rem;
    margin: 0 0 0.5rem;
    padding: 0;
    font-size: 0.85rem;
}

.vp-swatch {
    display: inline-block;
    width: 1.6em;
    height: 1em;
    vertical-align: -0.15em;
    border: 1px solid var(--color-border, #c9c9c9);
}

.vp-hover-hint {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0 0 0.75rem;
}

.vp-marked-text {
    border: 1px solid var(--color-border, #c9c9c9);
    border-radius: 6px;
    padding: 1rem;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.vp-word {
    padding: 0 0.05em;
}

.vp-table-wrap {
    overflow-x: auto;
}

.vp-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.95rem;
}

.vp-table th,
.vp-table td {
    text-align: left;
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid var(--color-border, #c9c9c9);
}

.vp-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0 0;
}

.vp-stat {
    border: 1px solid var(--color-border, #c9c9c9);
    border-radius: 6px;
    padding: 0.5rem 0.9rem;
    min-width: 9rem;
}

.vp-stat dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.75;
}

.vp-stat dd {
    margin: 0.15rem 0 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.vp-band-details {
    border: 1px solid var(--color-border, #c9c9c9);
    border-radius: 6px;
    padding: 0.5rem 0.9rem;
    margin: 0.6rem 0;
}

.vp-band-details summary {
    cursor: pointer;
    font-weight: 600;
}

.vp-band-details summary:focus-visible {
    outline: 2px solid var(--color-accent, #2563eb);
    outline-offset: 2px;
}

.vp-band-count {
    font-weight: 400;
    opacity: 0.75;
}

.vp-copy-btn {
    margin: 0.6rem 0 0.2rem;
}

.vp-band-words {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
}

.vp-band-words li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px dashed var(--color-border, #d9d9d9);
}

.vp-band-word {
    font-weight: 600;
}

.vp-band-word-count {
    font-size: 0.8rem;
    opacity: 0.7;
}

.vp-band-word-gloss {
    font-size: 0.9rem;
    opacity: 0.85;
    flex: 1 1 16rem;
}

.vp-withheld-note {
    font-size: 0.85rem;
    opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
    .vp-band-details,
    .vp-word {
        transition: none;
    }
}

/* Print-friendly report: keep the marked-up text, summary, and band lists;
   drop the interactive chrome. Band tints are preserved where the browser
   prints backgrounds; the underline styles carry the distinction anyway. */
@media print {
    .vp-panel,
    .vp-report-actions,
    .vp-copy-btn,
    .tool-header-bar,
    .breadcrumbs {
        display: none !important;
    }

    .vp-tool {
        max-width: none;
        padding: 0;
    }

    .vp-report-toolbar {
        margin-top: 0;
    }

    .vp-band-details {
        border: none;
        padding: 0;
    }

    .vp-band-details[open] summary {
        font-size: 1.05rem;
    }

    .vp-marked-text {
        border: none;
        padding: 0;
    }
}
