:root {
    color-scheme: light;
    --page-background: #f7f7f7;
    --surface: #ffffff;
    --surface-muted: #f2f2f2;
    --text: #2f2f2f;
    --text-muted: #666666;
    --border: #d8d8d8;
    --brand: #006184;
    --brand-dark: #004b66;
    --danger: #a32638;
    --focus: #f2a900;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page-background);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.55;
}

main {
    width: min(72rem, calc(100% - 2rem));
    margin: 2rem auto;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    background: var(--surface);
    box-shadow: 0 0.15rem 0.65rem rgb(0 0 0 / 7%);
}

h1,
h2,
h3 {
    line-height: 1.2;
}

h1 {
    margin-top: 0;
    color: var(--text);
    font-weight: 500;
    letter-spacing: -0.02em;
}

h2 {
    margin-top: 2rem;
}

h3 {
    margin-top: 1.5rem;
}

a {
    color: var(--brand);
    font-weight: 600;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--brand-dark);
}

form {
    margin: 0.55rem 0;
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 0.2rem;
    background: var(--surface-muted);
}

label {
    display: inline-block;
    margin-right: 0.35rem;
    font-weight: 650;
}

input,
select,
textarea,
button {
    max-width: 100%;
    min-height: 2.15rem;
    border: 1px solid #9fb2a7;
    border-radius: 0.15rem;
    font: inherit;
}

input,
select,
textarea {
    padding: 0.45rem 0.65rem;
    background: #fff;
    color: var(--text);
}

textarea {
    width: min(100%, 42rem);
}

button {
    padding: 0.3rem 0.7rem;
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.inline-action-form {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.link-button {
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.link-button:hover {
    border: 0;
    background: transparent;
    color: var(--brand-dark);
}

.link-button.danger-link {
    color: var(--danger);
}

.action-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.8rem;
    align-items: center;
}

.slot-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.8rem;
    align-items: flex-start;
    margin: 0.25rem 0;
}

.speaker-slots {
    margin: 0;
    padding: 0;
    list-style: none;
}

.speaker-slots > li {
    margin: 0.9rem 0;
}

.speaker-heading {
    font-size: 1.05rem;
    font-weight: 750;
}

.topic-display {
    margin: 0.2rem 0;
    color: var(--text-muted);
}

.topic-form {
    margin: 0.25rem 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.topic-form label {
    color: var(--text-muted);
    font-weight: 500;
}

.topic-form button {
    min-height: 0;
    padding: 0.25rem 0.55rem;
    background: transparent;
    color: var(--brand);
    font-weight: 600;
}

.topic-form button:hover {
    color: #fff;
}

.candidate-reminder {
    padding: 0.55rem 0.75rem;
    border-left: 0.25rem solid var(--brand);
    background: #eef6f8;
}

.candidate-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin: 0.5rem 0 0.75rem;
}

.candidate-filter-details > summary {
    padding: 0;
    color: var(--brand);
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.candidate-filter-details > summary::-webkit-details-marker {
    display: none;
}

.candidate-filter-details > summary:hover {
    color: var(--brand-dark);
}

.candidate-filter-details[open] {
    flex-basis: 100%;
}

.candidate-filter-form {
    max-width: 34rem;
    margin-top: 0.6rem;
}

.candidate-action-divider {
    color: var(--border);
}

.candidate-print-action {
    width: auto;
    margin: 0;
}

.candidate-title {
    margin-bottom: 0.25rem;
}

.candidate-meta {
    margin: 0 0 0.25rem;
    color: var(--text-muted);
}

.candidate-meta span {
    margin: 0 0.45rem;
    color: var(--border);
}

.candidate-filter-form p {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(10rem, 1fr);
    gap: 0.5rem 0.75rem;
    align-items: center;
    margin: 0.65rem 0;
}

.candidate-filter-form .errorlist {
    grid-column: 1 / -1;
}

.candidate-table-scroll {
    height: 31rem;
    overflow-x: auto;
    overflow-y: scroll;
    border-bottom: 1px solid var(--border);
    scrollbar-gutter: stable;
}

.candidate-table-scroll table {
    margin: 0;
}

.candidate-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.schedule-range-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin: 1.5rem 0 0.75rem;
}

.schedule-range-form label {
    margin: 0;
}

.secondary-button {
    border-color: var(--brand);
    background: #fff;
    color: var(--brand);
}

.secondary-button:hover {
    color: #fff;
}

.member-reminder-page {
    max-width: 46rem;
}

.member-reminder-page form {
    padding: 0;
    border: 0;
    background: transparent;
}

.reminder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.replacement-details > summary {
    color: var(--brand);
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.replacement-details > summary:hover {
    color: var(--brand-dark);
}

.replacement-details[open] {
    flex-basis: 100%;
}

td form {
    margin: 0;
    padding: 0.25rem;
    border: 0;
    background: transparent;
}

button:hover {
    border-color: var(--brand-dark);
    background: var(--brand-dark);
}

:focus-visible {
    outline: 0.2rem solid var(--focus);
    outline-offset: 0.15rem;
}

.errorlist {
    margin: 0.5rem 0;
    padding: 0.65rem 0.85rem 0.65rem 2rem;
    border-left: 0.3rem solid var(--danger);
    background: #fff0f0;
    color: #722323;
}

table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
}

th,
td {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-muted);
    color: var(--text);
}

tr:nth-child(even) td {
    background: #fafcfb;
}

section {
    margin: 1.5rem 0;
    padding-top: 0.25rem;
}

ol,
ul {
    padding-left: 1.5rem;
}

li + li {
    margin-top: 0.75rem;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1rem auto;
    border-radius: 0.2rem;
}

@media (max-width: 48rem) {
    main {
        width: min(100% - 1rem, 72rem);
        margin: 0.5rem auto;
        padding: 1rem;
        border-radius: 0.5rem;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    input,
    select,
    textarea {
        width: 100%;
        margin-top: 0.35rem;
    }

    button {
        width: auto;
        margin-top: 0.35rem;
    }

    .candidate-filter-form p {
        display: block;
    }

    .candidate-table-scroll {
        height: 31rem;
        overflow-x: auto;
        overflow-y: scroll;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }
}

@media print {
    @page {
        margin: 0.6in;
    }

    body {
        background: #fff;
        color: #000;
    }

    main {
        width: 100%;
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    main > * {
        display: none !important;
    }

    main > .print-candidates {
        display: block !important;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .print-candidates > :not(.candidate-title):not(.candidate-meta):not(.candidate-table-scroll),
    .no-print {
        display: none !important;
    }

    .candidate-title {
        margin-bottom: 0.25rem;
        font-size: 18pt;
        font-weight: 600;
    }

    .candidate-meta {
        margin-top: 0;
        font-size: 10pt;
    }

    .candidate-table-scroll {
        height: auto;
        max-height: none;
        overflow: visible;
        border: 0;
    }

    .candidate-print-table {
        display: table;
        width: 100%;
        margin: 0;
        border-collapse: collapse;
        font-size: 11pt;
        white-space: normal;
    }

    .candidate-print-table th,
    .candidate-print-table td {
        padding: 0.25rem 0.4rem;
        border: 1px solid #777;
        background: #fff !important;
        color: #000;
    }

    .candidate-print-table .screen-only-column {
        display: none !important;
    }

    .candidate-print-table a {
        color: #000;
        font-weight: 400;
        text-decoration: none;
    }
}
