@font-face {
    font-family: Assistant;
    src: url('/assets/assistant-regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Assistant;
    src: url('/assets/assistant-light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: url('/assets/open-sans-regular.woff') format('woff');
    font-weight: 400;
    font-display: swap;
}

:root {
    color-scheme: light;
    font: 100%/1.5 Assistant, Arial, sans-serif;
    color: #25364d;
    background: #f5f7fa;
    --navy: #173f70;
    --blue: #245a91;
    --yellow: #f8cc23;
    --green: #a2d45e;
    --muted: #53677e;
    --line: #dfe5ec;
    --line-strong: #a5b4c5;
    --panel-radius: 8px;
    --control-radius: 4px;
    --panel-shadow: 0 7px 24px rgba(24, 55, 91, .07);
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.shell {
    width: min(100%, 1180px);
    margin-inline: auto;
    padding-inline: clamp(1rem, 3vw, 2rem);
}

.topbar {
    color: #fff;
    background: var(--navy);
    box-shadow: 0 2px 9px rgba(24, 55, 91, .2);
}

.topbar-content {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    padding-inline: clamp(1rem, 3vw, 28px);
}

.topbar :focus-visible { outline-color: var(--yellow); }

.brand {
    color: inherit;
    font-size: 24px;
    text-decoration: none;
    white-space: nowrap;
}

.brand strong { color: var(--yellow); }

.account {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .45rem .9rem;
    min-width: 0;
}

.account-name { font-size: .9375rem; overflow-wrap: anywhere; }
.account .secondary { border-color: #b6c4d6; color: #fff; background: transparent; }
.account .secondary:hover { background: #ffffff19; }

.workspace { padding-block: clamp(1.75rem, 5vw, 3.875rem) 3rem; }

h1 {
    margin: 0 0 1.5rem;
    color: var(--navy);
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 300;
    line-height: 1.1;
}

h2 { font-size: 1.125rem; margin: 0; color: var(--navy); }
.muted { color: var(--muted); }

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--panel-radius);
    box-shadow: var(--panel-shadow);
}

.login-main {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 2rem 1.25rem;
    border-top: 28px solid #a1a1a1;
    color: #454749;
    background: radial-gradient(#ececec, #fff);
    font-family: 'Open Sans', Arial, sans-serif;
}

.login-panel { width: min(100%, 21rem); }

.login-brand {
    display: block;
    width: min(100%, 280px);
    height: auto;
    aspect-ratio: 2;
    margin: 0 auto;
    object-fit: cover;
}

.login-panel h1 {
    margin: 0 0 1.375rem;
    color: #454749;
    font-size: 1.625rem;
    font-weight: 400;
    text-align: center;
}

.login-panel > p { margin: 0; text-align: center; }
.login-form { display: grid; gap: .75rem; }

label {
    display: grid;
    gap: .375rem;
    min-width: 0;
    font-size: .875rem;
    font-weight: 700;
}

input, select, button { font: inherit; }

input, select {
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    padding: .5rem .75rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--control-radius);
    color: inherit;
    background-color: #fff;
    font-size: 1rem;
    font-weight: 400;
}

.login-form label { font-weight: 400; }

.login-form input {
    padding-inline: 1rem;
    border-color: #b6b9bc;
    border-radius: 10px;
    background: #f6f6f6;
}

.login-form :focus-visible { outline-color: #547e2c; }

select {
    appearance: none;
    padding-right: 2rem;
    background-image: linear-gradient(45deg, transparent 50%, #587897 50%), linear-gradient(135deg, #587897 50%, transparent 50%);
    background-position: calc(100% - 1.1rem) 50%, calc(100% - .8rem) 50%;
    background-size: .3rem .3rem;
    background-repeat: no-repeat;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: .45rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--control-radius);
    font-size: .9375rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.primary { color: #fff; background: var(--navy); }
.primary:hover { background: var(--blue); }
.secondary { color: var(--navy); border-color: var(--line-strong); background: #fff; }
.secondary:hover { background: #eef4f9; }

.login-form .primary {
    justify-self: end;
    min-width: 150px;
    margin-top: .25rem;
    border-radius: 10px;
    color: #253815;
    background: var(--green);
    font-size: .8125rem;
    text-transform: uppercase;
}

.login-form .primary:hover { background: #8bc04e; }

.alert {
    margin: 0 0 1rem;
    padding: .75rem 1rem;
    border: 1px solid #ecc4ca;
    border-radius: var(--control-radius);
    color: #8c2633;
    background: #fff1f3;
}

.login-form .alert { margin: 0; font-size: .875rem; }

.filters {
    display: grid;
    grid-template-columns: minmax(12rem, 2fr) minmax(9rem, 1fr) minmax(9rem, 1fr) auto;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.125rem;
}

.empty { padding: clamp(1.5rem, 5vw, 3rem); color: var(--muted); text-align: center; }
.empty p { margin: 0; }
.results { overflow-x: auto; }

table {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
    color: #3d5269;
    text-align: left;
}

th, td { padding: .75rem 1.125rem; }

th {
    color: #53677e;
    background: #f4f7fa;
    font-size: .8125rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

td { border-top: 1px solid #e8edf2; overflow-wrap: anywhere; }
td:first-child, td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
td:last-child { width: 1%; }
tr:hover td { background: #fafcfd; }
tr:has([aria-pressed="true"]) td { background: #eef4f9; }

.listen {
    min-height: 2.375rem;
    gap: .5rem;
    border-color: #cad7e4;
    color: var(--navy);
    background: #fff;
}

.listen::before {
    content: '';
    border-block: 5px solid transparent;
    border-left: 7px solid currentColor;
}

.listen:hover { background: #eef4f9; }
.listen[aria-pressed="true"] { color: #fff; background: var(--navy); border-color: var(--navy); }

.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1rem;
    color: var(--muted);
}

.player {
    position: sticky;
    bottom: .75rem;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-top: 1rem;
    padding: .875rem 1rem;
    border-left: 4px solid var(--yellow);
    box-shadow: 0 7px 24px rgba(24, 55, 91, .18);
}

#playing-caption, #player-status { color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
.player audio { width: min(100%, 27rem); max-width: 100%; }

@media (max-width: 49rem) {
    .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters label:first-child { grid-column: 1 / -1; }
    .filters button { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 31rem) {
    .topbar-content { flex-wrap: wrap; padding-block: .625rem; }
    .account { justify-content: flex-start; }
    .filters { gap: .75rem; padding: .75rem; }

    .results table, .results tbody { display: block; min-width: 0; }

    .results thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .results tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: .125rem .75rem;
        padding: .75rem;
    }

    .results tbody tr + tr { border-top: 1px solid #e8edf2; }
    .results tbody tr:has([aria-pressed="true"]) { background: #eef4f9; }

    .results td {
        display: block;
        grid-column: 1;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .results td:first-child, .results td:nth-child(3) { color: var(--muted); font-size: .875rem; }
    .results td:nth-child(2) { font-weight: 700; }
    .results td:last-child { width: auto; grid-area: 1 / 2 / span 3 / 3; }
    .results .listen { min-height: 2.75rem; }
}
