.av-site {
    --av-paper: #f9f5ef;
    --av-panel: #fffdfa;
    --av-ink: #332239;
    --av-muted: #645766;
    --av-line: #e4d8df;
    --av-plum: #672962;
    margin: 0;
    background: var(--av-paper);
    color: var(--av-ink);
    font: 16px/1.55 "Nirmala UI", Mangal, system-ui, sans-serif;
}

.av-site *, .av-site *::before, .av-site *::after { box-sizing: border-box; }
.av-site a { color: var(--av-plum); }
.av-site :focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.av-shell {
    width: min(100% - 32px, 960px);
    margin-inline: auto;
}

.av-masthead { background: #542451; color: #fff4fe; }
.av-masthead .av-shell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 16px;
    min-height: 60px;
    padding-block: 4px;
}
.av-masthead a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: inherit;
    text-decoration: underline;
}

.av-main { padding-block: clamp(24px, 5vw, 48px); overflow-wrap: anywhere; }
.av-main h1 { margin: 0 0 10px; color: inherit; font-size: clamp(25px, 4vw, 42px); font-weight: 700; line-height: 1.28; }
.av-main h2 { margin: 0 0 8px; color: inherit; font-size: 19px; font-weight: 700; }
.av-main p { margin: 0; }
.av-main .av-intro { margin-bottom: 18px; color: var(--av-muted); }
.av-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}
.av-hero p { color: var(--av-muted); }
.av-portrait { width: 160px; height: auto; border-radius: 10px; }
.av-groups, .av-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.av-choices { display: grid; gap: 8px; }
.av-choices a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--av-line);
    border-radius: 8px;
    background: var(--av-panel);
    text-decoration: none;
}
.av-choices a:hover { text-decoration: underline; }
.av-footer { border-top: 1px solid var(--av-line); margin-top: 30px; padding-top: 16px; color: var(--av-muted); font-size: 14px; }
.av-footer p { margin-bottom: 8px; }

.av-filters {
    align-items: start;
    margin-bottom: 18px;
    padding: 16px;
    background: var(--av-panel);
    border: 1px solid var(--av-line);
    border-radius: 10px;
}
.av-filters label { display: block; margin-bottom: 4px; font-weight: 700; }
.av-filters select {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 6px 8px;
    background: var(--av-paper);
    color: var(--av-ink);
    border: 1px solid #ab98a9;
    border-radius: 6px;
    font: inherit;
}
.av-filters button {
    min-height: 44px;
    margin-top: 8px;
    padding: 6px 12px;
    background: var(--av-panel);
    color: var(--av-plum);
    border: 1px solid var(--av-plum);
    border-radius: 7px;
    font: inherit;
}
.av-filters .av-primary { background: var(--av-plum); color: #fff; }
.av-filters button:not(:disabled):hover { box-shadow: inset 0 0 0 1px currentColor; cursor: pointer; }
.av-filters button:focus-visible { outline-color: var(--av-plum); }
.av-filters :disabled { opacity: .6; }
.av-status { color: #a32138; }
.av-status > span:not(:empty) { display: block; margin-bottom: 14px; }

.av-results { width: 100%; table-layout: fixed; border-collapse: collapse; }
.av-results th, .av-results td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--av-line); }
.av-results th { background: #f1e6ec; }
.av-results td { background: var(--av-panel); }
.av-results th:last-child, .av-results td:last-child { width: 9rem; }
.av-results--audio th:last-child, .av-results--audio td:last-child { width: min(48%, 330px); }
.av-results a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; }
.av-main audio { display: block; width: 100%; max-width: 100%; min-height: 44px; }
.av-recording { max-width: 440px; margin-bottom: 16px; }
.av-transcript { margin-top: 16px; }
.av-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}
.av-pagination:empty { display: none; }
.av-pagination > * {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 4px;
    border: 1px solid var(--av-line);
    border-radius: 7px;
    background: var(--av-panel);
}
.av-pagination > :not([href]) { color: var(--av-muted); }
.av-pagination [aria-current="page"] {
    border-color: var(--av-plum);
    color: var(--av-plum);
    font-weight: 700;
}

@media (max-width: 540px) {
    .av-groups, .av-filters { grid-template-columns: minmax(0, 1fr); }
    .av-hero { gap: 12px; }
    .av-portrait { width: 82px; }
    .av-results th:last-child, .av-results td:last-child { width: 7.5rem; }
    .av-results--audio, .av-results--audio tbody, .av-results--audio tr,
    .av-results--audio th, .av-results--audio td { display: block; }
    .av-results--audio th:last-child, .av-results--audio td:last-child { width: 100%; }
    .av-results--audio th:last-child { display: none; }
    .av-results--audio td:first-child { padding-bottom: 0; border-bottom: 0; font-weight: 700; }
    .av-results--audio td:last-child { padding-top: 4px; }
}
