.database-page { --site-width: 1400px; --sidebar-offset: 16px; }
.database-page [hidden] { display: none !important; }
.database-main { padding-block: 32px 56px; }
.database-heading { margin-bottom: 28px; }
.eyebrow { color: var(--site-accent-light); font-size: .75rem; letter-spacing: .1em; font-weight: 700; }
.eyebrow span { display: inline-block; margin-left: 10px; padding: 2px 8px; border: 1px solid var(--site-border); border-radius: 5px; color: var(--site-secondary); letter-spacing: .03em; }
.database-heading h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.04em; line-height: 1.15; margin: 12px 0; }
.database-heading h1 span { color: var(--site-accent-light); }
.database-heading > p:last-child { color: var(--site-secondary); }
.database-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { padding: 20px; background: var(--site-surface); border: 1px solid var(--site-border); border-radius: 12px; }
.database-page button, .database-page input, .database-page select { font: inherit; }
.database-page button, .database-page summary { cursor: pointer; }
.database-page button:disabled, .database-page input:disabled { cursor: default; opacity: .5; }
.database-page :is(button, input, select, summary, .table-scroll):focus-visible { outline: 3px solid var(--site-accent-light); outline-offset: 3px; }
.database-page input:not([type=checkbox]):not([type=range]):not([type=hidden]), .database-page select { min-height: 44px; padding: 9px 11px; width: 100%; background: var(--site-bg); color: var(--site-text); border: 1px solid var(--site-border); border-radius: 7px; min-width: 0; }
.database-page input::placeholder { color: var(--site-muted); opacity: 1; }
.database-page label { display: block; font-size: .8125rem; color: var(--site-secondary); }
.database-page label > :is(input:not([type=checkbox]):not([type=range]), select) { margin-top: 5px; }
/* The site's header scrolls normally, so the sidebar needs only a top gutter. */
.filter-panel { position: sticky; top: var(--sidebar-offset); max-height: calc(100dvh - var(--sidebar-offset) - 16px); overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain; padding: 18px; }
.filter-panel summary { font-weight: 650; min-height: 28px; }
.filter-panel fieldset { border: 0; border-top: 1px solid var(--site-border); padding: 16px 0 0; margin: 18px 0 0; min-width: 0; }
.filter-panel legend { float: left; width: 100%; font-size: .875rem; font-weight: 600; margin-bottom: 10px; }
.filter-group { border-top: 1px solid var(--site-border); margin-top: 16px; padding-top: 14px; }
.filter-group:first-of-type { border: 0; padding-top: 0; }
.filter-group summary { display: flex; align-items: center; gap: 6px; list-style: none; font-size: .8125rem; min-height: 32px; }
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::before { content: '›'; width: 10px; flex-shrink: 0; color: var(--site-muted); }
.filter-group details[open] > summary::before { content: '⌄'; }
.filter-count { margin-left: auto; color: var(--site-accent-light); font-size: .6875rem; font-weight: 500; white-space: nowrap; }
.filter-options { display: grid; gap: 2px; clear: both; margin-top: 6px; }
.filter-option { display: flex !important; align-items: center; gap: 9px; padding: 4px 6px; min-height: 32px; border-radius: 5px; cursor: pointer; }
.filter-option input { width: 16px; height: 16px; flex-shrink: 0; margin: 0; accent-color: var(--site-accent); }
.filter-option span { font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
.filter-option:hover { background: var(--site-hover); }
.filter-option:has(input:checked) { background: var(--site-active); color: var(--site-accent-light); }
.filter-actions { display: grid; gap: 8px; margin-top: 18px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 9px 14px; border-radius: 7px; border: 1px solid var(--site-border); background: var(--site-surface); color: var(--site-text); font-weight: 600 !important; font-size: .8125rem !important; }
.button:hover:not(:disabled) { background: var(--site-hover); border-color: var(--site-accent-light); }
.button.primary { background: #4962de; border-color: #617aff; color: #fff; }
.button.primary:hover:not(:disabled) { background: #3f55c3; }
.database-results { min-width: 0; }
.results-toolbar { margin-bottom: 16px; }
.toolbar-search { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 20px; }
.toolbar-search label { flex: 1 1 280px; min-width: 0; }
.toolbar-search p { margin: 0; padding-block: 12px; color: var(--site-secondary); font-size: .8125rem; }
.creator-field { flex: 0 1 250px; min-width: 0; }
.creator-field > label { margin-bottom: 5px; }
.creator-combobox { position: relative; }
.database-page #creator-picker { padding-right: 38px; }
#creator-toggle { position: absolute; right: 0; top: 0; width: 36px; height: 44px; padding: 0; border: 0; border-radius: 0 7px 7px 0; background: transparent; color: var(--site-accent-light); }
#creator-options { position: absolute; left: 0; right: 0; top: calc(100% + 5px); max-height: 280px; max-height: min(280px, 45dvh); overflow-y: auto; overscroll-behavior: contain; z-index: 5; padding: 4px; border: 1px solid var(--site-border); border-radius: 8px; background: var(--site-surface); box-shadow: 0 12px 28px #0007; }
#creator-options.opens-above { top: auto; bottom: calc(100% + 5px); }
.creator-option { padding: 10px; min-height: 40px; border-radius: 4px; color: var(--site-secondary); font-size: .8125rem; overflow-wrap: anywhere; cursor: pointer; }
.creator-option.is-active, .creator-option:hover { color: var(--site-text); background: var(--site-hover); }
.creator-option[aria-selected=true] { color: var(--site-accent-light); }
.creator-no-results { padding: 8px; font-size: .8125rem; color: var(--site-secondary); }
.toolbar-controls { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 16px; margin-top: 12px; border-bottom: 1px solid var(--site-border); }
.view-tabs { display: flex; gap: 2px; min-width: 0; }
.view-tabs button { min-height: 44px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--site-secondary); padding: 10px 12px; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.view-tabs button[aria-selected=true] { color: var(--site-accent-light); border-bottom-color: var(--site-accent); }
.view-tabs button:hover { background: var(--site-surface); }
.sort-controls { display: flex; gap: 8px; margin-bottom: 8px; max-width: 100%; }
.sort-controls label { width: 150px; min-width: 0; font-size: .75rem; }
.sort-controls label:last-child { width: 135px; }
.active-creator { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin-top: 12px; padding: 0 4px 0 12px; border: 1px solid var(--site-accent); border-radius: 7px; background: var(--site-active); color: var(--site-accent-light); font-size: .8125rem; }
.active-creator span { overflow-wrap: anywhere; min-width: 0; }
.active-creator button { background: none; border: 0; color: inherit; min-height: 44px; min-width: 36px; font-size: 1.25rem; }
.help { color: var(--site-secondary); font-size: .8125rem; line-height: 1.6; }
.notice { border: 1px solid var(--site-border); background: var(--site-surface); border-radius: 10px; padding: 18px; color: var(--site-secondary); }
.error { border-color: #d77d86; color: #ffc3c9; margin-bottom: 16px; }
.error p { margin-top: 0; }
.empty-state { text-align: center; padding-block: 32px; }
.empty-state h3 { color: var(--site-text); }
.job-cards { display: grid; gap: 12px; }
.job-card { display: grid; grid-template-columns: clamp(150px, 16vw, 220px) minmax(0, 1fr); overflow: hidden; border-radius: 10px; border: 1px solid var(--site-border); background: var(--site-surface); cursor: pointer; }
.job-card:hover, .job-card:focus-within { border-color: var(--site-accent-light); }
.job-art-wrap { position: relative; grid-column: 1; grid-row: 1; min-height: 120px; background: var(--site-active); }
.job-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art-placeholder { display: grid; place-items: center; color: var(--site-accent-light); font-size: .75rem; font-weight: 650; letter-spacing: .12em; }
.job-body { grid-column: 2; grid-row: 1; min-width: 0; padding: 12px 16px 6px; }
.job-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 12px; }
.job-card h3 { flex: 1 1 220px; min-width: 0; margin: 0; font-size: 1.0625rem; letter-spacing: -.015em; line-height: 1.45; overflow-wrap: anywhere; }
.creator { color: var(--site-secondary); margin: 0; font-size: .8125rem; overflow-wrap: anywhere; }
.creator-link { display: inline; min-height: 32px; padding: 4px 0; border: 0; border-radius: 3px; background: none; color: var(--site-accent-light); text-align: left; overflow-wrap: anywhere; text-underline-offset: 3px; }
.creator-link:hover { text-decoration: underline; }
.job-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; }
.job-dates { display: flex; flex: 1 1 220px; flex-wrap: wrap; gap: 0 12px; font-size: .75rem; }
.job-created { color: var(--site-text); font-weight: 650; }
.job-updated { color: var(--site-muted); }
.details-toggle { margin-left: auto; min-height: 36px; padding: 5px 0 5px 8px; border: 0; border-radius: 3px; background: none; color: var(--site-accent-light); font-size: .75rem !important; font-weight: 600 !important; }
.details-toggle::after { content: ' +'; }
.details-toggle[aria-expanded=true]::after { content: ' −'; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.badge { display: inline-block; padding: 3px 7px; border-radius: 5px; color: var(--site-accent-light); background: var(--site-active); font-size: .6875rem; font-weight: 600; overflow-wrap: anywhere; }
.badge.verified { color: #92dfbf; background: #17382f; }
.job-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; font-size: .75rem; }
.job-header .job-links { margin-left: auto; }
.database-page .job-links a, .database-page table a { color: var(--site-accent-light); text-underline-offset: 3px; }
.job-links a { display: inline-flex; align-items: center; min-height: 32px; }
.job-details { grid-column: 1 / -1; border-top: 1px solid var(--site-border); padding: 16px; background: var(--site-bg); cursor: auto; }
.job-description { font-size: .875rem; color: var(--site-secondary); }
.job-description h4 { margin: 0 0 6px; font-size: .8125rem; color: var(--site-text); }
.job-description p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.job-metadata { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 16px 0 0; font-size: .75rem; }
.job-metadata dt { color: var(--site-muted); }
.job-metadata dd { margin: 2px 0 0; color: var(--site-secondary); }
.table-scroll { max-width: 100%; overflow-x: auto; isolation: isolate; border: 1px solid var(--site-border); border-radius: 10px; }
.database-page table { width: 100%; border-spacing: 0; text-align: left; font-size: .8125rem; background: var(--site-surface); }
.database-page th, .database-page td { padding: 10px 12px; border-bottom: 1px solid var(--site-border); vertical-align: top; min-width: 115px; max-width: 300px; overflow-wrap: anywhere; }
.database-page th { color: var(--site-secondary); background: var(--site-active); font-weight: 600; }
.database-page th button { background: none; border: 0; color: inherit; padding: 0; font: inherit; text-align: left; min-height: 36px; }
.database-page th[aria-sort=ascending] button::after { content: ' ↑'; }
.database-page th[aria-sort=descending] button::after { content: ' ↓'; }
.database-page :is(td, th):first-child { position: sticky; left: 0; z-index: 1; min-width: 180px; max-width: 260px; background: var(--site-surface); border-right: 1px solid var(--site-border); box-shadow: 4px 0 8px #10131c44; }
.database-page th:first-child { z-index: 2; background: var(--site-active); }
.database-page td .badge { margin: 0 3px 4px 0; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; font-size: .8125rem; color: var(--site-secondary); }
.random-controls h3 { margin: 0; font-size: 1rem; }
.random-controls .help { margin: 4px 0 14px; }
.random-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; }
.slider-control { flex: 1 1 180px; max-width: 300px; min-width: 0; }
.slider-control label { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.slider-control output, .capacity-output { color: var(--site-accent-light); font-weight: 650; font-variant-numeric: tabular-nums; }
.database-page input[type=range] { display: block; width: 100%; min-height: 44px; margin: 0; padding: 0; accent-color: var(--site-accent); cursor: pointer; background: transparent; }
.capacity-control { clear: both; }
.capacity-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8125rem; margin-bottom: 4px; }
.capacity-control .help { margin: 4px 0 0; font-size: .75rem; }
.range-sliders { position: relative; height: 44px; }
.range-sliders::before { content: ''; position: absolute; top: 20px; left: 10px; right: 10px; height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--site-border) var(--range-from, 0%), var(--site-accent) var(--range-from, 0%), var(--site-accent) var(--range-to, 100%), var(--site-border) var(--range-to, 100%)); }
.range-sliders label { position: absolute; inset: 0; pointer-events: none; }
.range-sliders label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.database-page .range-sliders input { appearance: none; position: absolute; inset: 0; margin: 0; width: 100%; min-width: 0; height: 44px; pointer-events: none; background: transparent; }
.range-sliders input::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.range-sliders input::-moz-range-track { height: 4px; background: transparent; }
.range-sliders input::-webkit-slider-thumb { appearance: none; width: 22px; height: 22px; margin-top: -9px; border: 2px solid var(--site-accent-light); border-radius: 50%; background: var(--site-accent); pointer-events: auto; cursor: grab; }
.range-sliders input::-moz-range-thumb { width: 18px; height: 18px; border: 2px solid var(--site-accent-light); border-radius: 50%; background: var(--site-accent); pointer-events: auto; cursor: grab; }
.range-sliders input:focus-visible { z-index: 3; }
@media (max-width: 540px) { .toolbar-search label { flex-basis: 100%; } .toolbar-search p { margin-left: auto; } }
@media (max-width: 800px) { .filter-option, .filter-group summary { min-height: 44px; } }
@media (max-width: 540px) { .creator-field { flex-basis: 100%; margin-top: 8px; } .creator-option { min-height: 44px; } }
@media (max-width: 1100px) { .database-layout { gap: 18px; grid-template-columns: 235px minmax(0, 1fr); } .toolbar-controls { align-items: start; } .job-card { grid-template-columns: 150px minmax(0, 1fr); } }
@media (max-width: 800px) { .database-layout { grid-template-columns: minmax(0, 1fr); } .filter-panel { position: static; max-height: none; overflow: visible; scrollbar-gutter: auto; } .database-main { padding-top: 24px; } .database-heading { margin-bottom: 20px; } .toolbar-controls { align-items: end; } .job-card { grid-template-columns: 175px minmax(0, 1fr); } .filter-panel summary { min-height: 32px; } }
@media (max-width: 540px) { .job-card { grid-template-columns: minmax(0, 1fr); } .job-art-wrap { grid-column: 1; grid-row: 1; aspect-ratio: 16 / 7; min-height: 0; } .job-body { grid-column: 1; grid-row: 2; padding: 10px 14px 4px; } .job-header h3 { flex-basis: 100%; } .job-header .job-links { margin-left: 0; } .job-links a, .creator-link, .details-toggle { min-height: 44px; } .job-dates { display: none; } .job-footer { justify-content: end; } .job-details { grid-row: 3; } .toolbar-search { gap: 0; } .toolbar-search p { padding-block: 8px; } .toolbar-controls { gap: 8px; margin-top: 0; } .view-tabs { width: 100%; } .view-tabs button { flex: 1; padding-inline: 7px; } .sort-controls { width: 100%; } .sort-controls label, .sort-controls label:last-child { width: auto; flex: 1; } .pagination { gap: 6px; } .pagination .button { padding-inline: 10px; } .database-page :is(td, th):first-child { min-width: 140px; max-width: 180px; } .database-page th button { min-height: 44px; } }
.job-metadata .detail-date { display: none; }
@media (max-width: 540px) { .job-metadata .detail-date { display: block; } }
