/* CodBio Hub 2.0 — Site Terms & Responsible Scientific Use */

.workspace-terms-v2 {
    --terms-green: #79d0a8;
    --terms-amber: #e0b56a;
    --terms-red: #df8b86;
    --terms-blue: #7fb8d8;
    --terms-line: #3a3d39;
    background: #090d11;
}

.workspace-terms-v2 .ws-terms-content {
    background:
        radial-gradient(circle at 12% 0%, rgba(224,181,106,.06), transparent 28%),
        linear-gradient(180deg, #0a0f13, #090d11);
}

.ws-terms-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(310px, .8fr);
    gap: clamp(42px, 7vw, 104px);
    align-items: end;
    padding: 50px clamp(36px, 5vw, 74px) 46px;
    border-bottom: 1px solid var(--ws-line);
    background:
        linear-gradient(rgba(224,181,106,.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(224,181,106,.015) 1px, transparent 1px),
        radial-gradient(circle at 14% 8%, rgba(121,208,168,.065), transparent 31%);
    background-size: 30px 30px, 30px 30px, auto;
}

.ws-terms-path,
.ws-terms-kicker,
.ws-terms-tools label,
.ws-terms-index > div > p,
.ws-terms-stream__label {
    margin: 0;
    font: 700 9px/1.3 var(--ws-mono);
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ws-terms-path {
    color: #637079;
}

.ws-terms-kicker {
    margin-top: 10px;
    color: var(--terms-green);
}

.ws-terms-hero h1 {
    max-width: 12ch;
    margin: 15px 0 0;
    color: #edf2ef;
    font-size: clamp(48px, 5.6vw, 82px);
    font-weight: 650;
    line-height: .92;
    letter-spacing: -.055em;
}

.ws-terms-hero h1 em {
    display: block;
    color: var(--terms-amber);
    font-style: normal;
    font-weight: 450;
}

.ws-terms-lede {
    max-width: 790px;
    margin: 23px 0 0;
    color: #9ea8af;
    font-size: 14px;
    line-height: 1.72;
}

.ws-terms-protocol {
    border: 1px solid #45443e;
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(224,181,106,.04), transparent 52%),
        #111519;
    box-shadow: inset 3px 0 0 rgba(224,181,106,.52);
}

.ws-terms-protocol > p {
    margin: 0;
    padding: 12px 14px;
    border-bottom: 1px solid #3d3c37;
    color: var(--terms-amber);
    font: 700 8px var(--ws-mono);
    letter-spacing: .12em;
}

.ws-terms-protocol dl {
    margin: 0;
    padding: 5px 14px 10px;
}

.ws-terms-protocol dl div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    padding: 8px 0;
    border-bottom: 1px solid #302f2c;
    font: 9px var(--ws-mono);
}

.ws-terms-protocol dl div:last-child {
    border-bottom: 0;
}

.ws-terms-protocol dt {
    color: #74746f;
}

.ws-terms-protocol dd {
    margin: 0;
    color: #d2d5d1;
    text-align: right;
}

.ws-terms-protocol dd.is-current {
    color: var(--terms-green);
}

.ws-terms-key {
    display: grid;
    gap: 7px;
    padding: 10px 14px 14px;
    border-top: 1px solid #3d3c37;
}

.ws-terms-key span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #808984;
    font: 8px var(--ws-mono);
}

.ws-terms-key i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #69736f;
}

.ws-terms-key i.is-allowed {
    background: var(--terms-green);
}

.ws-terms-key i.is-caution {
    background: var(--terms-amber);
}

.ws-terms-key i.is-prohibited {
    background: var(--terms-red);
}

.ws-terms-tools {
    display: grid;
    grid-template-columns: minmax(320px, 1.45fr) minmax(180px, .72fr) minmax(180px, .72fr);
    gap: 14px 16px;
    padding: 18px clamp(36px, 5vw, 74px) 20px;
    border-bottom: 1px solid var(--ws-line);
    background:
        linear-gradient(180deg, rgba(224,181,106,.022), transparent),
        #0d1216;
}

.ws-terms-tools label {
    display: block;
    margin-bottom: 7px;
    color: #747d79;
}

.ws-terms-input-shell {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid #3b423f;
    border-radius: 6px;
    background: #0a0f13;
}

.ws-terms-input-shell > span {
    color: var(--terms-amber);
    font: 13px var(--ws-mono);
}

.ws-terms-input-shell input,
.ws-terms-tools select {
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
    border: 1px solid #3b423f;
    border-radius: 6px;
    background: #0a0f13;
    color: #dce3df;
    outline: none;
    font: 11px var(--ws-mono);
}

.ws-terms-input-shell input {
    min-height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
}

.ws-terms-tools select {
    padding: 0 10px;
    color-scheme: dark;
}

.ws-terms-input-shell:focus-within,
.ws-terms-tools select:focus-visible {
    border-color: rgba(224,181,106,.8);
    box-shadow: 0 0 0 2px rgba(224,181,106,.07);
}

.ws-terms-input-shell input::placeholder {
    color: #58636a;
}

.ws-terms-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.ws-terms-actions button,
.workspace-terms-v2 .policy-pagination button,
.workspace-terms-v2 .policy-section-actions button,
.workspace-terms-v2 .policy-section-actions a {
    min-height: 32px;
    padding: 7px 10px;
    border: 1px solid #3a423e;
    border-radius: 5px;
    background: #10171b;
    color: #aeb7b2;
    cursor: pointer;
    font: 9px var(--ws-mono);
    text-decoration: none;
}

.ws-terms-actions button:hover,
.ws-terms-actions button:focus-visible,
.workspace-terms-v2 .policy-pagination button:hover:not(:disabled),
.workspace-terms-v2 .policy-pagination button:focus-visible:not(:disabled),
.workspace-terms-v2 .policy-section-actions button:hover,
.workspace-terms-v2 .policy-section-actions button:focus-visible,
.workspace-terms-v2 .policy-section-actions a:hover,
.workspace-terms-v2 .policy-section-actions a:focus-visible {
    border-color: #66614f;
    background: #1b1a16;
    color: #f1e5c6;
    outline: none;
}

.ws-terms-tools > [data-policy-status] {
    grid-column: 1 / -1;
    min-height: 1.1em;
    margin: 0;
    color: #747d79;
    font: 9px var(--ws-mono);
}

.ws-terms-workspace {
    width: min(1320px, calc(100% - 70px));
    height: calc(100vh - 246px);
    min-height: 580px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(220px, 270px) minmax(0, 900px);
    justify-content: center;
    gap: clamp(28px, 5vw, 72px);
    padding: 26px 0 0;
    overflow: hidden;
}

.ws-terms-index {
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

.ws-terms-index > div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ws-terms-index > div > p {
    margin-bottom: 12px;
    color: var(--terms-amber);
}

.ws-terms-index nav {
    display: grid;
    align-content: start;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 8px;
    scrollbar-gutter: stable;
}

.ws-terms-index a {
    position: relative;
    padding: 8px 9px 8px 12px;
    border-left: 1px solid #303734;
    color: #7d8782;
    font: 9px/1.45 var(--ws-mono);
    transition:
        border-color .15s ease,
        background-color .15s ease,
        color .15s ease;
}

.ws-terms-index a:hover,
.ws-terms-index a:focus-visible {
    border-left-color: var(--terms-amber);
    background: rgba(224,181,106,.045);
    color: #f2e6c8;
    outline: none;
}

.ws-terms-index a.is-active {
    border-left-color: var(--terms-green);
    background:
        linear-gradient(90deg, rgba(121,208,168,.08), transparent 82%);
    color: #e8f6ef;
    font-weight: 700;
}

.ws-terms-stream {
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
    padding: 0 16px 72px 0;
}

.ws-terms-stream__label {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 9px;
    padding: 0 2px;
    color: #747d79;
}

.ws-terms-stream__label span:first-child {
    color: var(--terms-amber);
}

.ws-terms-document {
    min-width: 0;
}

.workspace-terms-v2 .policy-loading,
.workspace-terms-v2 .policy-error {
    padding: 26px;
    border: 1px solid #3b423f;
    border-radius: 7px;
    background: #10161a;
    color: #8f9994;
    text-align: center;
    font: 10px var(--ws-mono);
}

.workspace-terms-v2 .policy-section {
    margin-bottom: 10px;
    border: 1px solid #343c39;
    border-radius: 7px;
    background:
        linear-gradient(180deg, rgba(224,181,106,.016), transparent 30%),
        #10161a;
    overflow: hidden;
    scroll-margin-top: 12px;
}

.workspace-terms-v2 .policy-section[hidden] {
    display: none;
}

.workspace-terms-v2 .policy-section[open] {
    border-color: #62604f;
    box-shadow:
        inset 3px 0 0 rgba(224,181,106,.72),
        0 12px 32px rgba(0,0,0,.13);
}

.workspace-terms-v2 .policy-section:focus {
    outline: 2px solid rgba(224,181,106,.3);
    outline-offset: 2px;
}

.workspace-terms-v2 .policy-section summary {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 15px;
    cursor: pointer;
    list-style: none;
}

.workspace-terms-v2 .policy-section summary::-webkit-details-marker {
    display: none;
}

.workspace-terms-v2 .policy-section summary > span:first-child {
    color: var(--terms-amber);
    font: 700 8px var(--ws-mono);
    letter-spacing: .08em;
}

.workspace-terms-v2 .policy-section summary > span[role="heading"] {
    color: #e0e6e2;
    font-size: 13px;
    font-weight: 650;
}

.workspace-terms-v2 .policy-section summary > b {
    color: #717c77;
    font: 16px var(--ws-mono);
    transition: transform .18s ease, color .18s ease;
}

.workspace-terms-v2 .policy-section[open] summary > b {
    transform: rotate(45deg);
    color: var(--terms-green);
}

.workspace-terms-v2 .policy-section-body {
    padding: 6px 22px 24px 48px;
    border-top: 1px solid #2d3532;
    color: #9ca6a1;
}

.workspace-terms-v2 .policy-section-body > dl {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 24px;
    padding: 12px 0;
    border-bottom: 1px solid #2d3532;
}

.workspace-terms-v2 .policy-section-body > dl div {
    min-width: 90px;
    padding: 0 12px;
    border-left: 1px solid #303834;
}

.workspace-terms-v2 .policy-section-body > dl div:first-child {
    padding-left: 0;
    border-left: 0;
}

.workspace-terms-v2 .policy-section-body dt {
    color: #6e7873;
    font: 700 7px var(--ws-mono);
    letter-spacing: .1em;
    text-transform: uppercase;
}

.workspace-terms-v2 .policy-section-body dd {
    margin: 4px 0 0;
    color: #ced5d1;
    font: 9px var(--ws-mono);
}

.workspace-terms-v2 .policy-section-body h3,
.workspace-terms-v2 .policy-section-body h4 {
    margin: 26px 0 0;
    color: #e8ece9;
    line-height: 1.2;
}

.workspace-terms-v2 .policy-section-body h3 {
    font-size: 21px;
}

.workspace-terms-v2 .policy-section-body h4 {
    font-size: 15px;
}

.workspace-terms-v2 .policy-section-body p,
.workspace-terms-v2 .policy-section-body li {
    max-width: 760px;
    color: #9da7a2;
    font-size: 13px;
    line-height: 1.72;
}

.workspace-terms-v2 .policy-section-body p {
    margin: 12px 0 0;
}

.workspace-terms-v2 .policy-section-body ul,
.workspace-terms-v2 .policy-section-body ol {
    padding-left: 20px;
}

.workspace-terms-v2 .policy-section-body a {
    color: var(--terms-blue);
    text-decoration: underline;
    text-decoration-color: rgba(127,184,216,.3);
    text-underline-offset: 3px;
}

.workspace-terms-v2 .policy-section-body a:hover,
.workspace-terms-v2 .policy-section-body a:focus-visible {
    color: #e2f2fb;
    text-decoration-color: currentColor;
    outline: none;
}

.workspace-terms-v2 .policy-search-hit {
    padding: .05em .18em;
    border-radius: 3px;
    background: rgba(224,181,106,.22);
    color: #ffe8b8;
    font-weight: 700;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.workspace-terms-v2 .policy-section-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
    padding-top: 13px;
    border-top: 1px solid #2d3532;
}

.workspace-terms-v2 .policy-section-actions nav {
    display: flex;
    gap: 7px;
}

.workspace-terms-v2 .policy-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin: 18px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid #2d3532;
    color: #7c8681;
    font: 9px var(--ws-mono);
}

.workspace-terms-v2 .policy-pagination[hidden] {
    display: none;
}

.workspace-terms-v2 .policy-pagination button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

/* Thin and quiet until the protocol is actively explored. */
.ws-terms-stream,
.ws-terms-index nav {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.ws-terms-stream:hover,
.ws-terms-stream:focus-within,
.ws-terms-index nav:hover,
.ws-terms-index nav:focus-within {
    scrollbar-color: rgba(224,181,106,.45) transparent;
}

.ws-terms-stream::-webkit-scrollbar,
.ws-terms-index nav::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.ws-terms-stream::-webkit-scrollbar-track,
.ws-terms-index nav::-webkit-scrollbar-track {
    background: transparent;
}

.ws-terms-stream::-webkit-scrollbar-thumb,
.ws-terms-index nav::-webkit-scrollbar-thumb {
    min-height: 34px;
    border-radius: 999px;
    background: transparent;
}

.ws-terms-stream:hover::-webkit-scrollbar-thumb,
.ws-terms-stream:focus-within::-webkit-scrollbar-thumb,
.ws-terms-index nav:hover::-webkit-scrollbar-thumb,
.ws-terms-index nav:focus-within::-webkit-scrollbar-thumb {
    background: rgba(224,181,106,.38);
    box-shadow:
        inset 0 0 0 1px rgba(255,240,204,.08),
        0 0 8px rgba(224,181,106,.08);
}

.ws-terms-stream::-webkit-scrollbar-thumb:hover,
.ws-terms-index nav::-webkit-scrollbar-thumb:hover {
    background: rgba(121,208,168,.62);
}

.ws-terms-stream::-webkit-scrollbar-corner,
.ws-terms-index nav::-webkit-scrollbar-corner {
    background: transparent;
}

@media (max-width: 980px) {
    .ws-terms-hero,
    .ws-terms-tools {
        grid-template-columns: 1fr;
    }

    .ws-terms-actions,
    .ws-terms-tools > [data-policy-status] {
        grid-column: auto;
    }

    .ws-terms-workspace {
        width: min(820px, calc(100% - 44px));
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 26px;
        padding-bottom: 56px;
        overflow: visible;
    }

    .ws-terms-index,
    .ws-terms-stream {
        height: auto;
        overflow: visible;
    }

    .ws-terms-index > div {
        height: auto;
        display: block;
    }

    .ws-terms-index nav {
        grid-template-columns: repeat(2, minmax(0,1fr));
        overflow: visible;
        padding-right: 0;
    }

    .ws-terms-stream {
        padding-right: 0;
        scroll-behavior: auto;
    }
}

@media (max-width: 650px) {
    .ws-terms-hero,
    .ws-terms-tools {
        padding-left: 22px;
        padding-right: 22px;
    }

    .ws-terms-hero h1 {
        font-size: 42px;
    }

    .ws-terms-workspace {
        width: calc(100% - 44px);
    }

    .ws-terms-index nav {
        grid-template-columns: 1fr;
    }

    .ws-terms-stream__label {
        flex-direction: column;
        gap: 4px;
    }

    .workspace-terms-v2 .policy-section-body {
        padding: 4px 16px 22px 38px;
    }

    .workspace-terms-v2 .policy-section-body > dl {
        display: grid;
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .workspace-terms-v2 .policy-section-body > dl div,
    .workspace-terms-v2 .policy-section-body > dl div:first-child {
        padding: 7px 8px;
        border-left: 0;
        border-bottom: 1px solid #2d3532;
    }

    .workspace-terms-v2 .policy-section-actions,
    .workspace-terms-v2 .policy-section-actions nav {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ws-terms-stream {
        scroll-behavior: auto;
    }
}

@media print {
    .workspace-terms-v2 .ws-topbar,
    .workspace-terms-v2 .ws-rail,
    .workspace-terms-v2 .ws-rail-menu,
    .workspace-terms-v2 .ws-explorer,
    .workspace-terms-v2 .ws-inspector,
    .workspace-terms-v2 .ws-tabs,
    .workspace-terms-v2 .ws-terms-tools,
    .workspace-terms-v2 .ws-terms-index,
    .workspace-terms-v2 .ws-terms-stream__label,
    .workspace-terms-v2 .workspace-footer {
        display: none !important;
    }

    .workspace-terms-v2 .ws-main,
    .workspace-terms-v2 .ws-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .workspace-terms-v2 .ws-terms-workspace,
    .workspace-terms-v2 .ws-terms-stream {
        width: auto;
        height: auto;
        display: block;
        overflow: visible;
    }
}
