.recording-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recording-row {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background: #fff;
    transition: box-shadow 0.15s ease;
}

.recording-row > .recording-waveform-trigger:first-child {
    border-top-left-radius: calc(0.5rem - 1px);
    border-top-right-radius: calc(0.5rem - 1px);
}

.recording-tag-pills {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-width: calc(100% - 1rem);
    pointer-events: none;
}

.recording-tag-pills--empty {
    display: none;
}

.recording-tag-pill {
    display: block;
    width: 1.65rem;
    height: 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.recording-row-toolbar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}

.tag-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #dee2e6;
    border-radius: 0.35rem;
    color: #212529;
}

.tag-menu-btn--labeled {
    width: auto;
    height: auto;
    min-height: 2rem;
    padding: 0.25rem 0.65rem;
    gap: 0.4rem;
    white-space: nowrap;
}

.tag-menu-btn:hover,
.tag-menu-btn:focus-visible {
    background: #fff;
    border-color: #adb5bd;
}

.tag-menu-icon {
    display: block;
}

.recording-row:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

.recording-waveform-trigger {
    display: block;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.recording-waveform-trigger:hover .recording-waveform-list,
.recording-waveform-trigger:focus-visible .recording-waveform-list {
    filter: brightness(1.08);
}

.recording-waveform-trigger:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
}

.teaser-countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease, visibility 0.12s;
    pointer-events: none;
}

.recording-waveform-trigger.is-counting .teaser-countdown {
    opacity: 1;
    visibility: visible;
}

.teaser-countdown-track {
    fill: rgba(0, 0, 0, 0.45);
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 1.5;
}

.teaser-countdown-pie {
    fill: rgba(255, 255, 255, 0.92);
}

.recording-waveform-list {
    display: block;
    width: 100%;
    height: 100px;
    object-fit: fill;
    background: #111;
}

.recording-waveform-list--empty {
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);
}

.recording-row-body {
    padding: 0.85rem 1rem 1rem;
}

.recording-code {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.25;
    color: #6c757d;
    opacity: 0.55;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.recording-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.recording-meta-line {
    font-size: 0.95rem;
    line-height: 1.45;
}

.recording-meta-dialect {
    color: #6f9a7f;
    font-weight: 500;
    line-height: 1.4;
}

.recording-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recording-waveform-detail {
    width: 100%;
    height: 100px;
    object-fit: fill;
    border-radius: 6px;
    background: #111;
}

.recording-detail-labels {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.recording-detail-labels-main {
    flex: 1 1 auto;
    min-width: 0;
}

.recording-detail-labels-actions {
    flex: 0 0 auto;
}

.recording-citation {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.recording-citation p {
    white-space: pre-wrap;
    word-break: break-word;
}

.recording-detail textarea,
.recording-detail input[type="text"],
.recording-detail input[type="number"] {
    width: 100%;
}

.tag-dropdown-menu {
    min-width: 13rem;
    padding: 0.45rem;
    z-index: 1080;
}

.tag-palette {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tag-palette-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    min-height: 1.75rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.3rem;
    padding: 0.2rem 0.55rem;
    background-color: var(--tag-color);
    cursor: pointer;
    overflow: hidden;
    text-align: left;
}

.tag-palette-row:hover {
    filter: brightness(1.05);
}

.tag-palette-row:focus-visible {
    outline: 2px solid #212529;
    outline-offset: 1px;
}

.tag-palette-mark {
    flex: 0 0 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    color: #fff;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
    pointer-events: none;
    visibility: hidden;
}

.tag-palette-row.is-selected .tag-palette-mark {
    visibility: visible;
}

.tag-palette-label {
    flex: 1 1 auto;
    min-width: 0;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-palette--edit {
    gap: 0.3rem;
}

.tag-palette-edit-row {
    display: block;
    width: 100%;
    min-height: 1.75rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.3rem;
    padding: 0.2rem 0.55rem;
    background-color: var(--tag-color);
    margin: 0;
}

.tag-palette-inline-input {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.tag-palette-inline-input:focus {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 0;
    border-radius: 0.15rem;
}

.tag-palette-inline-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.tag-labels-enter {
    font-size: 0.85rem;
    text-decoration: none;
}

.tag-labels-enter:hover {
    text-decoration: underline;
}

.nav-link-admin {
    font-weight: 700;
    color: #9ec5fe !important;
}

.navbar-dark .navbar-nav a.nav-link {
    color: #ddd;
    font-weight: bold;
}

.navbar-dark .navbar-nav a.nav-link:hover,
.navbar-dark .navbar-nav a.nav-link:focus {
    color: #fff;
    text-decoration: underline;
}

.navbar-dark .navbar-nav .nav-link-admin:hover,
.navbar-dark .navbar-nav .nav-link-admin:focus {
    color: #cfe2ff !important;
}

.navbar-lang-switch {
    margin: 0;
    position: relative;
}

.navbar-lang-select {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    position: relative;
    min-height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 1.75rem 0.25rem 0.5rem;
    color: #ddd;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.5;
    cursor: pointer;
}

.navbar-lang-select::after {
    margin-left: 0;
    position: absolute;
    right: 0.55rem;
    border-top-color: #ddd;
}

.navbar-lang-select:hover,
.navbar-lang-select:focus,
.navbar-lang-select[aria-expanded="true"] {
    color: #fff;
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.45);
    outline: none;
}

.navbar-lang-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.15);
}

.navbar-lang-select img,
.navbar-lang-option img {
    display: block;
    width: 1.25rem;
    height: 0.875rem;
    object-fit: cover;
    border-radius: 0.1rem;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.navbar-lang-menu {
    min-width: 100%;
}

.navbar-lang-option {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.playback-histogram {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    width: 120px;
    height: 32px;
}

.playback-histogram-bar {
    flex: 1 1 0;
    min-width: 2px;
    min-height: 3px;
    background-color: #0d6efd;
    border-radius: 1px 1px 0 0;
}

.playback-histogram-bar.is-empty {
    height: 2px !important;
    background-color: #dee2e6;
}

.how-to-work section + section {
    border-top: 1px solid #e9ecef;
    padding-top: 1.25rem;
}

.about-page > p,
.about-page .about-section > p {
    text-align: justify;
}

.prose-typography p,
.prose-typography li {
    text-wrap: pretty;
}

.about-page .about-section {
    margin-top: 1.5rem;
}

.about-page .about-section > h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.about-page .about-thanks {
    font-size: 0.9em; /* 10pt vs 12pt body in source doc */
}

.about-page .about-thanks p {
    text-align: justify;
}

.about-page .about-thanks h2 {
    font-size: 1em;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.about-page .about-doc-mark {
    color: #ff0000;
    font-weight: 700;
}

.about-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1rem;
}

@media (min-width: 992px) {
    .about-gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.about-gallery-item {
    margin: 0;
}

.about-gallery-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    line-height: 0;
}

.about-gallery-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.25rem;
}

.about-gallery-caption {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
}

.about-gallery-modal {
    position: relative;
    background: #111;
    color: #fff;
}

.about-gallery-close {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    z-index: 3;
    filter: invert(1);
    padding: 0.35rem;
    margin: 0;
    opacity: 0.9;
}

.about-gallery-close:hover,
.about-gallery-close:focus {
    opacity: 1;
}

.about-gallery-modal-title {
    padding: 0.45rem 2.5rem 0.2rem 0.6rem;
    min-height: 1.5rem;
}

.about-gallery-modal-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0.25rem 0.35rem 0.4rem;
}

.about-gallery-modal-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    margin: 0 auto;
}

.about-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    box-sizing: border-box;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.about-gallery-nav svg {
    display: block;
    flex-shrink: 0;
}

.about-gallery-nav:hover,
.about-gallery-nav:focus {
    background: rgba(255, 255, 255, 0.32);
}

.about-gallery-nav--prev {
    left: 0.5rem;
}

.about-gallery-nav--next {
    right: 0.5rem;
}

.how-to-work section:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.table-sort-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.table-sort-link:hover {
    text-decoration: underline;
}

.table-sort-link.is-active {
    font-weight: 600;
}

.table-sort-indicator {
    margin-left: 0.15rem;
    font-size: 0.75rem;
}

.console-recording-code {
    margin-top: 0.1rem;
    font-size: 0.7rem;
    line-height: 1.2;
    color: #6c757d;
    opacity: 0.75;
}

.tag-swatch {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 0.2rem;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.site-footer-logo-link {
    display: block;
    flex-shrink: 0;
    margin-left: auto;
    line-height: 0;
}

.site-footer-logo {
    display: block;
    height: 5rem;
    width: auto;
}

.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-toggle-caret {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.filter-toggle[aria-expanded="true"] .filter-toggle-caret {
    transform: rotate(180deg);
}

.recording-informants {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.informant-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(108, 117, 125, 0.08); /* neutral fallback for unknown gender */
    border: 1px solid rgba(108, 117, 125, 0.22);
    color: #495057;
    border-radius: 0.35rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
}

.informant-badge--woman {
    background-color: rgba(237, 20, 91, 0.08);
    border: 1px solid rgba(237, 20, 91, 0.22);
    color: #b21f57;
}

.informant-badge--man {
    background-color: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.22);
    color: #0b5ed7;
}

.explorer-badge.informant-badge--man,
.explorer-badge.informant-badge--woman {
    background-color: rgba(108, 117, 125, 0.08);
    border: 1px solid rgba(108, 117, 125, 0.22);
    color: #495057;
}

.informant-entry:last-child {
    margin-bottom: 0 !important;
}

.informant-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 0.85rem;
}

.informant-card {
    border: 1px solid #dee2e6;
    border-left-width: 4px;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.7rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.informant-card--woman {
    border-left-color: #ed145b;
}

.informant-card--man {
    border-left-color: #0d6efd;
}

.informant-card:not(.informant-card--man):not(.informant-card--woman) {
    border-left-color: #adb5bd;
}

.informant-card__header {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0;
}

.informant-card--woman .informant-card__header {
    color: #b21f57;
}

.informant-card--man .informant-card__header {
    color: #0b5ed7;
}

.informant-card__details {
    margin: 0.5rem 0 0;
    padding-top: 0.5rem;
    border-top: 1px solid #eef1f3;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.informant-card__row {
    display: grid;
    grid-template-columns: minmax(6.5rem, auto) 1fr;
    gap: 0.25rem 0.85rem;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
}

.informant-card__row dt {
    margin: 0;
    color: #6c757d;
    font-weight: 500;
}

.informant-card__row dd {
    margin: 0;
    color: #212529;
}
