/* Film-first take explorer. Shared site navigation keeps its own styles. */
.take-page {
    --take-bg: #101112;
    --take-panel: #17181a;
    --take-line: #2b2d30;
    --take-text: #f0f0ec;
    --take-muted: #999c9e;
    --take-accent: #e5ef73;
    width: min(1360px, calc(100% - 96px));
    margin: 0 auto;
    padding: 112px 0 32px;
    color: var(--take-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.take-page *,
.take-page *::before,
.take-page *::after {
    box-sizing: border-box;
}

.take-page [hidden] {
    display: none !important;
}

.take-page button {
    font: inherit;
    cursor: pointer;
}

.take-page button:disabled {
    cursor: default;
    opacity: .5;
}

.take-page button:focus-visible,
.take-page a:focus-visible,
.take-page summary:focus-visible {
    outline: 2px solid var(--take-accent);
    outline-offset: 4px;
}

.take-breadcrumb {
    display: flex;
    gap: 12px;
    color: var(--take-muted);
    font-size: 12px;
    margin-bottom: 18px;
}

.take-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.take-breadcrumb a:hover {
    color: var(--take-text);
}

.take-title-row {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: space-between;
}

.take-header h1 {
    color: var(--take-text);
    font-family: inherit;
    font-size: clamp(24px, 2.6vw, 38px);
    font-weight: 550;
    letter-spacing: -.045em;
    line-height: 1.15;
    margin: 0;
    max-width: 1000px;
}

.take-public-badge {
    flex: 0 0 auto;
    color: var(--take-muted);
    border: 1px solid var(--take-line);
    border-radius: 30px;
    padding: 4px 11px;
    font-size: 11px;
}

.take-summary {
    color: var(--take-muted);
    margin: 12px 0 24px;
    font-size: 13px;
}

.take-project-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 24px;
}

.take-branch {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    background: #222519;
    color: var(--take-accent);
    padding: 4px 10px;
    border: 1px solid #393f25;
    border-radius: 6px;
}

.take-branch>span {
    font-size: 18px;
    line-height: 1;
}

.take-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 12px;
    color: var(--take-muted);
}

.take-stat strong {
    font-weight: 500;
    color: var(--take-text);
}

.take-explore-link {
    margin-left: auto;
    font-size: 12px;
    color: var(--take-text);
    text-decoration: none;
}

.take-explore-link span {
    margin-left: 12px;
    color: var(--take-accent);
}

.take-workspace {
    scroll-margin-top: 88px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    border: 1px solid var(--take-line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--take-bg);
}

.take-theater {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.take-player-toolbar {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--take-line);
}

.take-player-context {
    display: flex;
    gap: 9px;
    align-items: center;
    font-size: 12px;
    min-width: 0;
}

.take-player-context>span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.take-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--take-accent);
    flex: 0 0 auto;
}

.take-cut-button {
    flex-shrink: 0;
    background: transparent;
    color: var(--take-text);
    border: 1px solid var(--take-line);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11px !important;
}

.take-cut-button:hover,
.take-cut-button.is-active {
    background: var(--take-accent);
    color: #151710;
    border-color: var(--take-accent);
}

.take-stage {
    background: #080909;
    display: grid;
    place-items: center;
    height: clamp(330px, 29vw, 440px);
    flex: 1;
    min-height: 350px;
}

.take-player {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 440px;
    object-fit: contain;
    background: #080909;
}

.take-player-empty {
    max-width: 32ch;
    padding: 28px;
    text-align: center;
    color: var(--take-muted);
}

.take-player-caption {
    min-height: 48px;
    border-top: 1px solid var(--take-line);
    padding: 14px 20px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    color: #c5c7c5;
    font-size: 11px;
}

.take-caption-tag {
    color: var(--take-muted);
    text-align: right;
    font-size: 10px;
}

.take-player-error {
    margin: 0;
    padding: 12px 20px;
    background: #292219;
    color: #e7c99a;
    font-size: 12px;
}

.take-detail {
    min-width: 0;
    border-left: 1px solid var(--take-line);
    padding: 22px;
    max-height: 630px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3d4042 transparent;
}

.take-inspector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.take-eyebrow {
    color: var(--take-muted);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin: 0 0 6px;
}

.take-inspector-header .take-eyebrow {
    margin: 0;
}

.take-detail h2 {
    color: var(--take-text);
    font: inherit;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -.03em;
    margin: 0 0 10px;
    text-align: left;
}

.take-identity {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    margin-bottom: 22px;
}

.take-identity-number {
    color: var(--take-text);
}

.take-identity code {
    color: #777d80;
    font: 10px ui-monospace, monospace;
}

.take-verdict {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    white-space: nowrap;
    font-size: 9px;
    border: 1px solid #414447;
    padding: 3px 7px;
    border-radius: 4px;
    color: #b7babc;
    line-height: 1.3;
}

.take-verdict--keeper {
    background: #29301b;
    color: var(--take-accent);
    border-color: #41492b;
}

.take-verdict--keeper::before {
    content: '●';
    font-size: 6px;
    margin-right: 5px;
}

.take-verdict--rejected {
    background: #302322;
    color: #e5b1a8;
    border-color: #503431;
}

.take-decision {
    padding: 12px;
    border-left: 2px solid #727655;
    background: #1e2119;
    border-radius: 0 6px 6px 0;
    margin: 0 0 20px;
}

.take-decision strong {
    display: block;
    font-size: 12px;
    text-transform: capitalize;
}

.take-decision p {
    margin: 6px 0 0;
    font-size: 12px;
    color: #bdc3b4;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.take-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 12px;
    margin: 0 0 22px;
}

.take-fact {
    min-width: 0;
}

.take-fact dt {
    color: var(--take-muted);
    font-size: 10px;
    margin-bottom: 4px;
}

.take-fact dd {
    color: var(--take-text);
    margin: 0;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.take-changes {
    margin: 0 0 18px;
}

.take-changes h3 {
    color: var(--take-muted);
    font-size: 11px;
    font-weight: 400;
    margin: 0 0 8px;
}

.take-changes ul {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.take-changes li {
    color: var(--take-accent);
    background: #24271c;
    border-radius: 3px;
    padding: 3px 7px;
    font-size: 10px;
}

.take-prompt,
.take-references,
.take-diff {
    border-top: 1px solid var(--take-line);
    padding: 14px 0;
}

.take-page summary {
    cursor: pointer;
    color: var(--take-text);
    font-size: 12px;
}

.take-prompt p,
.take-word-diff {
    color: #adb1b2;
    font-size: 12px;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-height: 220px;
    overflow-y: auto;
    margin: 12px 0 0;
    padding-right: 8px;
    scrollbar-width: thin;
}

.take-diff-item {
    margin-top: 12px;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.take-diff-item h4 {
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 400;
    text-transform: capitalize;
    color: var(--take-muted);
}

.take-diff-item--model {
    border-left: 2px solid var(--take-accent);
    padding-left: 10px;
}

.take-diff-item>ins,
.take-diff-item>del {
    display: block;
    margin-top: 4px;
}

.take-diff ins {
    color: #d4e9a9;
    background: #324023;
    text-decoration: none;
}

.take-diff del {
    color: #edb8ad;
    background: #4c2c29;
}

.take-references ul {
    margin: 12px 0 0;
    padding-left: 15px;
    font-size: 11px;
    color: var(--take-muted);
    overflow-wrap: anywhere;
}

.take-references li+li {
    margin-top: 8px;
}

.take-recorded {
    font-size: 10px;
    color: #81878a;
    margin: 12px 0 0;
}

.take-storyboard {
    margin-top: 30px;
    scroll-margin-top: 90px;
}

.take-section-heading {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 16px;
}

.take-section-heading h2 {
    color: var(--take-text);
    font-family: inherit;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -.03em;
    margin: 0;
    text-align: left;
}

.take-section-heading>p,
.take-count {
    color: var(--take-muted);
    font-size: 11px;
    margin: 0;
}

.take-filmstrip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    scrollbar-width: thin;
    scrollbar-color: #393d3e transparent;
}

.take-shot {
    flex: 0 0 168px;
    min-width: 0;
    display: block;
    padding: 0;
    color: var(--take-text);
    text-align: left;
    border: none;
    background: transparent;
}

.take-shot-image {
    display: block;
    position: relative;
    width: 100%;
    height: 112px;
    background: var(--take-panel);
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
}

.take-shot-image::after {
    position: absolute;
    inset: 0;
    content: '';
    background: linear-gradient(transparent 50%, #0009);
    pointer-events: none;
}

.take-shot-image img,
.take-attempt-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.take-shot.is-selected .take-shot-image {
    border-color: var(--take-accent);
}

.take-shot:hover .take-shot-image {
    border-color: #7b8161;
}

.take-shot.is-selected:hover .take-shot-image {
    border-color: var(--take-accent);
}

.take-shot-number,
.take-shot-duration {
    position: absolute;
    z-index: 1;
    color: #fff;
    background: #121411b3;
    border-radius: 3px;
    font-size: 10px;
    padding: 2px 5px;
}

.take-shot-number {
    top: 7px;
    left: 7px;
    font-family: ui-monospace, monospace;
}

.take-shot-duration {
    bottom: 7px;
    right: 7px;
}

.take-shot-name {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
    margin: 9px 2px 3px;
}

.take-shot.is-selected .take-shot-name {
    color: var(--take-accent);
}

.take-shot-sub {
    display: flex;
    justify-content: space-between;
    padding: 0 2px;
    font-size: 10px;
    color: var(--take-muted);
}

.take-in-cut {
    color: #b5bd8f;
}

.take-history {
    margin-top: 26px;
    padding: 24px;
    border: 1px solid var(--take-line);
    background: #111213;
    border-radius: 12px;
}

.take-history-list {
    min-width: 0;
}

.take-history-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.take-history-lane {
    min-width: 0;
}

.take-history-lane+.take-history-lane {
    margin-top: 20px;
    border-top: 1px solid var(--take-line);
    padding-top: 20px;
}

.take-lane-title {
    color: #c1c6b4;
    font-size: 12px;
    font-weight: 400;
    margin: 0 0 8px;
}

.take-history-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    scrollbar-width: thin;
    scrollbar-color: #393d3e transparent;
}

.take-history-entry {
    position: relative;
    flex: 0 0 220px;
    min-width: 0;
}

.take-history-entry--linked::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 1px;
    background: #586040;
    left: -20px;
    top: 90px;
}

.take-lineage {
    color: #939985;
    font: 10px ui-monospace, monospace;
    min-height: 26px;
    display: flex;
    align-items: center;
}

.take-parent-link {
    background: none;
    border: 0;
    padding: 0;
    color: var(--take-accent);
    font-size: 10px !important;
}

.take-parent-link:hover {
    text-decoration: underline;
}

.take-attempt {
    width: 100%;
    padding: 0;
    display: block;
    background: #1b1d1e;
    color: var(--take-text);
    border: 1px solid var(--take-line);
    border-radius: 8px;
    overflow: hidden;
    text-align: left;
}

.take-attempt:hover {
    border-color: #7b8161;
}

.take-attempt--keeper {
    border-color: #879450;
}

.take-attempt--rejected .take-attempt-image,
.take-attempt--superseded .take-attempt-image {
    opacity: .65;
}

.take-attempt.is-selected {
    border-color: var(--take-accent);
    box-shadow: 0 0 0 1px var(--take-accent);
}

.take-attempt.is-selected .take-attempt-image,
.take-attempt:hover .take-attempt-image {
    opacity: 1;
}

.take-attempt-image {
    display: block;
    position: relative;
    height: 120px;
    background: var(--take-panel);
}

.take-play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    font-size: 10px;
    color: #fff;
    border-radius: 50%;
    background: #0009;
    border: 1px solid #ffffff40;
}

.take-attempt-info {
    display: block;
    padding: 11px;
}

.take-attempt-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.take-attempt-heading strong {
    font-size: 12px;
    font-weight: 500;
}

.take-attempt-model,
.take-attempt-note,
.take-attempt-id {
    display: block;
    font-size: 10px;
    color: var(--take-muted);
    margin-top: 6px;
    overflow-wrap: anywhere;
}

.take-attempt-note {
    color: #bec5a8;
}

.take-attempt-id {
    font-size: 9px;
    color: #798184;
}

.take-expand {
    background: #272b20;
    color: var(--take-accent);
    border: 1px solid #454d31;
    border-radius: 5px;
    padding: 7px 12px;
    font-size: 11px !important;
    margin: 8px 0;
}

.take-image-missing {
    background: repeating-linear-gradient(135deg, #1a1c1d, #1a1c1d 8px, #202223 8px, #202223 9px);
}

.take-graph-hint {
    color: var(--take-muted);
    font-size: 11px;
    margin: 5px 0 0;
}

.take-error {
    padding: 24px;
    border: 1px solid var(--take-line);
    border-radius: 10px;
    color: #d4bbb5;
    background: var(--take-bg);
}

.take-empty-note {
    color: var(--take-muted);
}

.take-foot {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--take-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.take-wordmark {
    color: var(--take-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.take-wordmark span,
.take-foot p {
    color: #858c8f;
    font-size: 11px;
    font-weight: 400;
}

@media (min-width: 1500px) {
    .take-shot {
        flex-basis: calc((100% - 72px) / 7);
    }
}

@media (max-width: 1100px) {
    .take-page {
        width: calc(100% - 48px);
        padding-top: 100px;
    }

    .take-workspace {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .take-detail {
        padding: 18px;
    }

    .take-public-badge {
        display: none;
    }

    .take-player-caption {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .take-caption-tag {
        text-align: left;
    }
}

@media (max-width: 760px) {
    .take-page {
        width: calc(100% - 32px);
        padding-top: 90px;
    }

    .take-header h1 {
        font-size: 26px;
    }

    .take-project-meta {
        gap: 12px;
    }

    .take-stats {
        gap: 12px;
    }

    .take-explore-link {
        display: none;
    }

    .take-workspace {
        grid-template-columns: 1fr;
    }

    .take-detail {
        border-left: 0;
        border-top: 1px solid var(--take-line);
        max-height: none;
        padding: 20px;
    }

    .take-stage {
        height: 420px;
        min-height: 280px;
        flex: none;
    }

    .take-player {
        max-height: 420px;
    }

    .take-inspector-header {
        margin-bottom: 12px;
    }

    .take-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .take-prompt p,
    .take-word-diff {
        max-height: 150px;
    }

    .take-section-heading>p {
        display: none;
    }

    .take-history {
        padding: 18px;
    }

    .take-history-entry {
        flex-basis: 200px;
    }

    .take-history-actions {
        align-items: flex-end;
        flex-direction: column;
        gap: 5px;
    }

    .take-foot {
        align-items: flex-start;
    }

    .take-foot p {
        margin: 0;
        text-align: right;
        max-width: 22ch;
    }
}

@media (prefers-reduced-motion: no-preference) {

    .take-shot-image,
    .take-attempt,
    .take-cut-button {
        transition: border-color .15s ease, background-color .15s ease;
    }
}

/* common.css sets `overflow-x: hidden` on every body. That computes to `overflow: hidden
 * auto`, which makes BODY a scroll container while HTML is what actually scrolls -- and a
 * position: sticky element then resolves against a container it never scrolls within, so
 * it never sticks. The format page's index rail is the case that needs this.
 *
 * `clip` suppresses the same horizontal overflow WITHOUT creating a scroll container,
 * which is the whole difference. Scoped to this cluster rather than changed in
 * common.css, where every other page's layout depends on the current behaviour. Browsers
 * with no `overflow: clip` fall back to the inherited `hidden` and just scroll the rail. */
body.takes-view {
    overflow-x: clip;
}

/* The fixed navigation needs its own backdrop while the film scrolls beneath it. */
.takes-view .navbar-custom {
    background: black;
    /* border-bottom: 1px solid #232526; */
}

@media (max-width: 768px) {
    .takes-view .nav-links-custom.open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 16px;
        right: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 20px !important;
        border: 1px solid #2b2d30;
        border-radius: 10px;
        background: #141617;
    }
}

.take-fork-link {
    margin-left: auto;
    padding: 8px 12px;
    border: 1px solid currentColor;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-size: 12px;
}

.take-fork-link:hover,
.take-fork-link:focus-visible {
    background: #25251b;
}

.take-branch-select {
    color: inherit;
    background: #171717;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 8px 12px;
}

#take-server-view>nav {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    flex-wrap: wrap;
}

#take-server-view details {
    padding: 16px 0;
    border-bottom: 1px solid var(--take-line);
}

#take-server-view summary {
    cursor: pointer;
    margin-bottom: 12px;
}

#take-server-view .take-prompt p {
    white-space: pre-wrap;
}

#take-server-view .take-ssr-thumb {
    width: 160px;
    max-height: 160px;
    object-fit: contain;
    border-radius: 8px;
}

/* Take it with you: the .take download and the viewer report form. */
.take-public-actions {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--take-line);
}

.take-public-actions p {
    color: var(--take-muted);
    font-size: 12px;
    max-width: 70ch;
    margin: 0 0 18px;
}

.take-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.take-actions-row .take-cut-button {
    padding: 9px 14px;
    font-size: 12px !important;
    text-decoration: none;
}

.take-report {
    margin-top: 20px;
    max-width: 520px;
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--take-line);
    border-radius: 12px;
    background: var(--take-panel);
}

.take-report label {
    font-size: 12px;
    color: var(--take-muted);
}

.take-report select,
.take-report textarea {
    font: inherit;
    color: var(--take-text);
    background: var(--take-bg);
    border: 1px solid var(--take-line);
    border-radius: 8px;
    padding: 9px 11px;
    width: 100%;
}

.take-report textarea {
    resize: vertical;
}

.take-report-status:empty {
    display: none;
}

.take-report-status {
    color: var(--take-accent) !important;
    margin: 4px 0 0 !important;
}

#take-server-view .take-public-actions a {
    display: inline-block;
    margin-right: 12px;
    text-decoration: none;
}