/* Speech-sound toolkit (C17). Reuses :root tokens from main.css; supports
   [data-theme="dark"] and print. */

.slp-page {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.slp-disclaimer {
    border-left: 3px solid var(--color-border, #cbd5e1);
    background: var(--color-surface-alt, rgba(148, 163, 184, 0.12));
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
    margin: 1rem 0 1.5rem;
}

.slp-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.slp-control {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 10rem;
    border: 0;
    padding: 0;
    margin: 0;
}

.slp-control legend {
    padding: 0;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.slp-control label {
    font-weight: 600;
}

.slp-control select {
    min-height: 2.75rem;
    max-width: 100%;
}

.slp-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.slp-radio-row label {
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    gap: 0.3rem;
}

.slp-band-hint {
    font-weight: 400;
    font-size: 0.85rem;
    opacity: 0.8;
}

.slp-band-value {
    font-size: 0.9rem;
}

.slp-results-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.slp-results-summary {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.85;
}

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

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

.slp-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0 1.5rem;
}

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

.slp-table thead th {
    border-bottom-width: 2px;
}

.slp-empty,
.slp-error {
    padding: 0.75rem 0;
}

.slp-contrast-blurb {
    margin-top: 0;
}

.slp-contrast-grid {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
    gap: 0.5rem 1rem;
}

.slp-contrast-grid li {
    padding: 0.35rem 0;
}

.slp-contrast-example {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
}

.slp-links-cell .inline-action-form {
    margin-right: 0.75rem;
    white-space: nowrap;
}

.slp-page .link-button {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.35rem 0.5rem;
}

[data-theme="dark"] .slp-disclaimer {
    background: rgba(148, 163, 184, 0.16);
}

@media print {
    .slp-controls,
    .slp-actions,
    .breadcrumbs,
    .tool-header-bar,
    .tool-about,
    .index-more,
    .slp-contrast-index {
        display: none !important;
    }

    .slp-page {
        max-width: none;
        padding: 0;
    }

    .slp-table th,
    .slp-table td {
        border-color: #000;
    }
}
