.registry-workspace {
    --registry-surface: #0a1d29;
    --registry-border: #3a5261;
    --registry-focus: #9eb7c3;
}

.registry-workspace h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 500; letter-spacing: -.035em; }
.registry-workspace > .page-head { padding-bottom: 0; }
.registry-workspace > .page-head .registry-modes { margin-bottom: 0; }

.registry-modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 740px;
    gap: 4px;
    padding: 4px;
    margin: 26px 0;
    background: #081721;
    border: 1px solid #233b49;
    border-radius: 4px;
}

.registry-modes a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 12px;
    color: #b6cbd7;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 3px;
}

.registry-modes a[aria-current="page"] {
    background: #162d3b;
    border-color: #395462;
    color: #edf4f8;
}

.registry-modes a:hover {
    background: #122835;
    color: #edf4f8;
}

.registry-workspace .registry-filter {
    display: grid;
    grid-template-columns: minmax(220px, 1.6fr) minmax(190px, 1fr) auto;
    align-items: end;
    gap: 16px;
    margin: 26px 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.registry-workspace .registry-filter--directory {
    grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) minmax(110px, .8fr) auto;
}

.registry-filter > div { min-width: 0; }

.registry-workspace .registry-filter label {
    display: block;
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    color: #b6cbd7;
}

.registry-workspace .registry-filter :is(input, select) {
    display: block;
    width: 100%;
    min-width: 0;
    height: 48px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--registry-border);
    border-radius: 4px;
    background: var(--registry-surface);
    color: #edf4f8;
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
    color-scheme: dark;
}

.registry-workspace .registry-filter input::placeholder {
    color: #a4bac7;
    opacity: 1;
}

.registry-workspace .registry-filter :is(input, select):focus {
    border-color: #8fa9b6;
    outline: none;
    box-shadow: none;
}

.registry-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.registry-workspace .registry-filter .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    min-height: 48px;
    margin: 0;
    padding: 10px 16px;
    border: 1px solid #405b6b;
    border-radius: 4px;
    background: #112937;
    color: #e1edf4;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
}

.registry-workspace .registry-filter .button:hover {
    background: #1b3544;
    border-color: #647f8e;
    color: #f0f6f9;
}

.registry-results { display: grid; gap: 2px; margin-block: 22px; }

.registry-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-width: 0;
    border: 1px solid transparent;
    border-bottom-color: #1d3341;
    border-radius: 4px;
    background: transparent;
}

.registry-result:hover, .registry-result:focus-within {
    background: #0b1d28;
    border-color: #2a4554;
}

.registry-result-main {
    display: grid;
    align-content: center;
    align-self: stretch;
    gap: 7px;
    min-width: 0;
    min-height: 84px;
    padding: 16px;
    color: #e0edf4;
    text-decoration: none;
}

.registry-result-name { font-size: 19px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.registry-result-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: #a9c0ce; font-size: 12px; line-height: 1.6; }
.registry-result-meta .mono { color: #a9c0ce; font-size: 11px; }
.registry-demo { color: #c9bcb0; font-size: 12px; }

.registry-workspace .registry-result-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 240px;
    margin: 8px 12px;
    padding: 8px 14px;
    border: 1px solid #38515f;
    border-radius: 4px;
    color: #d0e0ea;
    background: #10263266;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
}

.registry-workspace .registry-result-action:hover {
    color: #f0f6f9;
    background: #1b3443;
    border-color: #647f8e;
}

.registry-record-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.registry-workspace .registry-record-heading h2 { margin: 0; font-size: 20px; }
.registry-record-heading h2 a { display: inline-flex; align-items: center; min-height: 44px; color: #e0edf4; text-decoration: none; }
.registry-workspace .registry-record-heading .registry-result-action { margin: 0; flex-shrink: 0; }
.registry-workspace .research-archive-record { padding-block: 20px; }

.registry-workspace :is(.registry-modes a, .registry-result-main, .registry-result-action, .registry-filter .button, .registry-filter input, .registry-filter select):focus-visible {
    outline: 2px solid var(--registry-focus);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
    .registry-modes a, .registry-result, .registry-workspace .registry-result-action, .registry-workspace .registry-filter :is(input, select, .button) {
        transition: background-color .16s ease, border-color .16s ease, color .16s ease;
    }
}

@media (max-width: 1000px) {
    .registry-workspace .registry-filter, .registry-workspace .registry-filter--directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .registry-filter-actions { grid-column: 1 / -1; justify-self: end; }
    .registry-filter--directory > .grow { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    .registry-workspace .registry-filter { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .registry-modes { margin-block: 22px; gap: 2px; }
    .registry-modes a { padding: 9px 6px; font-size: 12px; overflow-wrap: anywhere; }
    .registry-filter-actions { justify-self: stretch; }
    .registry-filter-actions .button { flex: 1; }
    .registry-result { grid-template-columns: minmax(0, 1fr); }
    .registry-result-main { min-height: 80px; padding: 14px; }
    .registry-workspace .registry-result-action { justify-self: start; margin: 0 14px 14px; max-width: calc(100% - 28px); }
    .registry-record-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
    .registry-workspace .registry-record-heading .registry-result-action { margin: 0 0 8px; }
}

@media print {
    html:has(.registry-workspace), body:has(.registry-workspace) { background: #fff; }
    body:has(.registry-workspace) { display: block; }
    body:has(.registry-workspace) :is(.brand-shell, .minimal-footer, .skip),
    .registry-workspace :is(.registry-modes, .registry-filter, .registry-result-action) { display: none !important; }
    body:has(.registry-workspace) > main { min-height: 0; }
    .registry-workspace :is(p, li, a, .registry-result-name) { color: #142a3d; }
    .registry-result, .registry-workspace .research-archive-record { break-inside: avoid; background: #fff !important; border-color: #bbc5cd; }
    .registry-result { grid-template-columns: minmax(0, 1fr); }
    .registry-result-main { min-height: 0; padding: 14px 0; }
    .registry-result-meta, .registry-result-meta .mono, .registry-demo { color: #394b59; }
}
