:root {
    --page-width: 1500px;
    --page-gutter: 1.5rem;
    --bs-body-font-family: Helvetica, Arial, sans-serif;
    --bs-body-color: #252b2a;
    --bs-primary: #26734d;
    --bs-border-color: #dce2df;
    --bs-border-radius: .25rem;
    --bs-border-radius-sm: .2rem;
    --bs-link-color: #216342;
    --bs-link-hover-color: #17472f;
}
body { background: #f5f6f5; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
header { background: #fff; border-bottom: 1px solid var(--bs-border-color); padding: .85rem max(var(--page-gutter), calc((100% - var(--page-width)) / 2 + var(--page-gutter))); display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
header a { color: #252b2a; font-weight: 700; text-decoration: none; letter-spacing: -.03em; }
main { width: 100%; max-width: var(--page-width); margin: 0 auto; padding: var(--page-gutter); flex: 1 0 auto; }
h1 { font-size: 1.65rem; letter-spacing: -.035em; margin: 0 0 1.25rem; }
h2 { font-size: 1.15rem; letter-spacing: -.015em; }
h3 { font-size: 1rem; }
h1, h2, h3 { font-weight: 600; }
.panel { background: #fff; border: 1px solid var(--bs-border-color); border-radius: .3rem; padding: 1.5rem; margin-bottom: 1.25rem; }
.toolbar, .dialog-heading { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.toolbar h1, .toolbar h2, .dialog-heading h2 { margin: 0 auto 0 0; }
.toolbar:has(select) { align-items: end; }
.toolbar label { flex: 0 1 240px; min-width: 0; max-width: 100%; font-size: .875rem; font-weight: 600; }
.toolbar select { margin-top: .375rem; }
.btn { --bs-btn-border-radius: .25rem; font-weight: 500; min-height: 36px; }
.btn-sm { --bs-btn-padding-x: .7rem; --bs-btn-padding-y: .35rem; }
.toolbar > .btn, .availability-row > .btn, .selection-bar > .btn, .form-actions > .btn { min-height: 40px; }
.btn { overflow-wrap: anywhere; }
.btn-primary { --bs-btn-bg: #26734d; --bs-btn-border-color: #26734d; --bs-btn-hover-bg: #1c583b; --bs-btn-hover-border-color: #1c583b; --bs-btn-active-bg: #1c583b; --bs-btn-active-border-color: #1c583b; --bs-btn-disabled-bg: #26734d; --bs-btn-disabled-border-color: #26734d; }
.btn-outline-secondary { --bs-btn-color: #4f5d55; --bs-btn-border-color: #cbd4ce; --bs-btn-hover-bg: #edf2ef; --bs-btn-hover-color: #243e2e; --bs-btn-hover-border-color: #9aac9f; }
.btn-icon { width: 36px; padding: .4rem; display: inline-flex; align-items: center; justify-content: center; }
.bi { width: 16px; height: 16px; vertical-align: -.125em; flex-shrink: 0; }
.btn > .bi + span { margin-left: .4rem; }
:focus-visible { outline: 2px solid #26734d; outline-offset: 3px; }
.form-control:focus, .form-select:focus { border-color: #428261; box-shadow: 0 0 0 .2rem #26734d20; }
.nav { gap: .25rem; }
.nav-link { color: #4f5d55; font-size: .925rem; }
.nav-pills { padding-bottom: 1rem; border-bottom: 1px solid var(--bs-border-color); }
.nav-pills .nav-link.active { background: #e4eee7; color: #1c583b; font-weight: 600; }
.nav-tabs .nav-link.active { border-bottom: 2px solid #26734d; font-weight: 600; }
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; margin-bottom: 1.25rem; }
.field { display: block; width: 100%; min-width: 0; font-size: .875rem; font-weight: 600; margin-bottom: 1.25rem; }
.grid-form { align-items: end; }
.form-control, .form-select { min-width: 0; }
.field input, .field select { margin-top: .4rem; font-weight: 400; }
.grid-form .field { margin-bottom: 0; }
.form-control, .form-select { min-height: 40px; font-size: .925rem; }
input[type=color] { max-width: 100px; }
form h2 { margin: 1.75rem 0 1rem; }
.form-section { max-width: 760px; }
#manage-link-form { margin-block: 1.25rem; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--bs-border-color); }
.table { vertical-align: middle; font-size: .9rem; margin-bottom: 0; }
.table td, .table th { padding: .65rem .75rem; }
.table th { position: relative; }
.table thead th { background: #f5f7f5; color: #526057; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.table tbody tr:hover > td { background: #f8faf8; }
.table td:last-child:has(button) { text-align: right; white-space: nowrap; }
.table .btn { margin: .1rem; }
.table-wrap { overflow-x: auto; margin-bottom: 1.5rem; border: 1px solid var(--bs-border-color); border-radius: .25rem; }
.table-wrap .table tr:last-child td { border-bottom: 0; }
.panel > :last-child, .panel > :last-child > .table-wrap:last-child { margin-bottom: 0; }
.panel > h2, .panel > h3 { margin-bottom: 1rem; }
.table th:last-child:has(.visually-hidden) { text-align: right; }
.search-control { max-width: 420px; }
.empty-state { padding: 1.5rem; background: #f6f8f6; border: 1px dashed #cbd4ce; border-radius: .25rem; color: #59665d; }
.selection-bar { display: flex; align-items: end; flex-wrap: wrap; gap: .75rem; padding: 1rem; background: #f0f5f1; margin-bottom: 1rem; border-radius: .25rem; font-size: .875rem; }
.selection-bar > label:has(input), .selection-bar > [role=status] { padding-block: .6rem; }
.selection-bar > label { min-width: 0; max-width: 100%; }
.selection-bar select { margin-top: .375rem; }
.selection-bar [role=status] { margin-right: auto; }
input[type=checkbox] { accent-color: #26734d; width: 1rem; height: 1rem; vertical-align: middle; }
.availability-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: .75rem; padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: .25rem; margin-bottom: 1rem; }
.availability-row label { min-width: 0; font-size: .875rem; font-weight: 600; }
.availability-row > .btn { justify-self: end; }
.availability-row input, .availability-row select { margin-top: .4rem; }
.auth { max-width: 460px; margin: 3rem auto; padding: 2rem; }
.auth form > .btn-primary { width: 100%; margin-top: .5rem; }
.auth > .btn { display: block; width: 100%; margin-top: .75rem; }
.auth hr { margin-block: 1.5rem; }
dialog { color: var(--bs-body-color); border: 1px solid #cbd4ce; border-radius: .35rem; padding: 1.5rem; width: min(760px, 95vw); max-height: 90vh; max-height: 90dvh; overflow: auto; box-shadow: 0 20px 70px #172c2226; }
dialog::backdrop { background: #18251e66; }
.dialog-heading { padding-bottom: 1rem; border-bottom: 1px solid var(--bs-border-color); }
.dialog-heading { flex-wrap: nowrap; align-items: start; }
.dialog-heading .btn-close { flex-shrink: 0; }
dialog > :last-child { margin-bottom: 0; }
#notice { position: fixed; inset: auto 1rem 1rem auto; z-index: 1100; width: min(420px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; margin: 0; padding: 1rem; box-shadow: 0 6px 24px #172c2226; }
#notice:not([hidden]) { display: flex; align-items: flex-start; gap: 1rem; }
#notice > span { flex: 1; min-width: 0; white-space: pre-line; overflow-wrap: anywhere; }
#notice > .btn-close { flex-shrink: 0; padding: .5rem; }
#timeline { max-width: 100%; overflow: auto; margin: 1rem 0 1.5rem; }
.muted { color: #626e66; font-size: .875rem; }
.link-output { width: 100%; font-family: monospace; }
.rule-list { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: .75rem 1.5rem; align-items: center; font-size: .925rem; }
.event-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.event-card { display: flex; flex-direction: column; min-width: 0; padding: 1.25rem; border: 1px solid var(--bs-border-color); border-radius: .25rem; border-top: 3px solid #26734d; }
.event-card > .btn:last-child { margin-top: auto; align-self: flex-start; }
#organization, #session { min-width: 0; max-width: 100%; }
#organization > .btn { min-width: 0; }
#organization > .dropdown { flex-shrink: 0; }
#organization .dropdown-menu { max-width: calc(100vw - 2rem); }
#organization .dropdown-item { white-space: normal; overflow-wrap: anywhere; }
#session { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }
h1, h2, h3, .breadcrumb-item { overflow-wrap: anywhere; }
#organization > .btn { font-weight: 600; }
.edition-heading { align-items: start; }
.edition-heading > div { flex: 1; min-width: 200px; }
.edition-heading h1 { margin-bottom: .4rem; }
.site-footer { padding: 1rem max(var(--page-gutter), calc((100% - var(--page-width)) / 2 + var(--page-gutter))); border-top: 1px solid var(--bs-border-color); display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .8rem; color: #626e66; }
.site-footer > a { flex-shrink: 0; }
.site-footer a, .terms-notice a, .legal-page a { color: #1c583b; }
.terms-notice { margin: 1rem 0; font-size: .875rem; font-weight: 400; }
.legal-page { max-width: 850px; }
.legal-page h2 { margin-top: 1.5rem; }
@media (max-width: 650px) {
    :root { --page-gutter: .75rem; }
    header { padding-block: .75rem; gap: .75rem; }
    #session { font-size: .875rem; } .panel { padding: 1rem; }
    .grid-form { grid-template-columns: 1fr; } .auth { margin: 1rem auto; }
    .availability-row { grid-template-columns: 1fr; } .rule-list { grid-template-columns: 1fr; gap: .4rem; }
    .rule-list select, .rule-list input { margin-bottom: .75rem; }
    .nav-link { padding: .5rem .65rem; } .site-footer { flex-direction: column; align-items: start; }
    .form-actions > .btn { flex-grow: 1; } dialog { padding: 1rem; }
    .toolbar > h1, .toolbar > h2, .edition-heading > div { flex-basis: 100%; min-width: 0; }
    .toolbar > label, .toolbar > .search-control { flex-basis: 100%; max-width: none; width: 100%; }
    .toolbar > .btn:not(.btn-icon) { flex: 1 1 auto; }
    #organization { flex: 1; }
    #session:not(:empty) { flex-basis: 100%; }
    .selection-bar > label:has(select) { flex-basis: 100%; }
    .selection-bar > .btn { width: 100%; }
}
@media (min-width: 1100px) {
    .panel .availability-row { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(160px, .75fr) auto; }
}
@media print {
    header, .site-footer, .nav, .toolbar button, #notice, form, .no-print, .selection-bar, input[data-filter] { display: none !important; }
    body { background: #fff; } .panel { border: 0; padding: 0; } main { padding: 0; } #timeline { display: none; }
    .table-wrap { overflow: visible; } .table td:last-child:has(button), .table th:last-child:has(.visually-hidden) { display: none; }
}
.bi[class*=icon-] { display: inline-block; background: currentColor; mask-size: contain; mask-repeat: no-repeat; mask-position: center; }
.icon-share { mask-image: url('../vendor/bootstrap-icons/share.svg'); }
.icon-pencil { mask-image: url('../vendor/bootstrap-icons/pencil.svg'); }
.icon-trash { mask-image: url('../vendor/bootstrap-icons/trash.svg'); }
.icon-arrow-clockwise { mask-image: url('../vendor/bootstrap-icons/arrow-clockwise.svg'); }
.dashboard-counts { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; font-size: .875rem; }
.dashboard-counts dt { font-weight: 400; }
.dashboard-counts dd { margin: 0; font-weight: 600; }
#candidate-list td:nth-child(n+3) { white-space: nowrap; }

.stand-age-icon { width: 24px; height: 24px; vertical-align: middle; margin-left: .35rem; }

.field-help { display: inline-flex; align-items: center; justify-content: center; position: relative; border: 1px solid currentColor; border-radius: 50%; width: 1.1rem; height: 1.1rem; font-size: .75rem; cursor: help; margin-left: .3rem; }
.field-help [role=tooltip] { display: none; position: absolute; top: 1.4rem; left: 50%; transform: translateX(-50%); width: min(260px, 65vw); padding: .65rem; background: #243e2e; color: white; border-radius: .25rem; z-index: 10; font-weight: 400; line-height: 1.5; }
.field-help:hover [role=tooltip], .field-help:focus [role=tooltip] { display: block; }
progress { width: 100%; accent-color: #26734d; }
