.cg-video {
    --cg-video-ink: #f4fcff;
    --cg-video-muted: #c2d2f2;
    --cg-video-ground: #070d20;
    --cg-video-accent: #51ded0;
    --cg-video-highlight: #a98bfa;
    --cg-video-cobalt: #3972d5;
    width: min(100%, 76rem);
    margin: clamp(2rem, 5vw, 5rem) auto;
    color: var(--cg-video-ink);
}

.cg-video__figure {
    overflow: hidden;
    margin: 0;
    border: 1px solid rgb(143 153 255 / 42%);
    border-radius: clamp(1rem, 2vw, 1.75rem);
    background:
        radial-gradient(ellipse at 12% 0, rgb(55 112 241 / 17%), transparent 34%),
        radial-gradient(ellipse at 95% 100%, rgb(143 93 230 / 14%), transparent 35%),
        linear-gradient(145deg, #101b3a, var(--cg-video-ground) 76%);
    box-shadow: 0 1.5rem 4rem rgb(7 27 45 / 32%), inset 0 1px rgb(255 255 255 / 9%);
}

.cg-video__player {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background: var(--cg-video-ground);
    object-fit: contain;
}

.cg-video--square .cg-video__player { aspect-ratio: 1 / 1; }
.cg-video--vertical .cg-video__player { aspect-ratio: 9 / 16; }

.cg-video--responsive .cg-video__player {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

@media (max-width: 640px), (orientation: portrait) {
    .cg-video--responsive .cg-video__player { aspect-ratio: 9 / 16; }
}

.cg-video--vertical .cg-video__figure {
    width: min(100%, 31.25rem);
    margin-inline: auto;
}

.cg-video__caption {
    padding: clamp(1.1rem, 3vw, 2rem) clamp(1.2rem, 4vw, 2.5rem) clamp(1.4rem, 3vw, 2.25rem);
}

.cg-video__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .65rem;
    color: var(--cg-video-accent);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .13em;
    line-height: 1.4;
    text-transform: uppercase;
}

.cg-video__eyebrow::before {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: var(--cg-video-accent);
    box-shadow: 0 0 .7rem rgb(81 222 208 / 75%);
    content: "";
}

.cg-video__caption h2 {
    margin: 0;
    color: var(--cg-video-ink);
    font-size: clamp(1.25rem, 2.6vw, 2rem);
    line-height: 1.18;
}

.cg-video__caption p {
    max-width: 68ch;
    margin: .65rem 0 0;
    color: var(--cg-video-muted);
    line-height: 1.6;
}

.cg-video__source {
    display: inline-block;
    margin-top: .8rem;
    color: var(--cg-video-accent);
    font-size: .92rem;
    font-weight: 650;
    text-decoration-thickness: .08em;
    text-underline-offset: .2em;
}

.cg-video__source:hover { color: var(--cg-video-ink); }

.cg-video__chapters {
    margin-top: .75rem;
    padding: clamp(.85rem, 2vw, 1.25rem);
    border: 1px solid rgb(143 153 255 / 36%);
    border-radius: 1rem;
    background:
        radial-gradient(ellipse at 0 0, rgb(55 112 241 / 13%), transparent 45%),
        linear-gradient(125deg, rgb(16 27 58 / 98%), rgb(7 13 32 / 98%));
    box-shadow: inset 0 1px rgb(255 255 255 / 9%), 0 .8rem 2rem rgb(4 10 29 / 18%);
}

.cg-video__chapters-label {
    margin: 0 0 .7rem;
    color: var(--cg-video-muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.cg-video__chapters ol {
    display: flex;
    gap: .55rem;
    overflow-x: auto;
    margin: 0;
    padding: 0 0 .3rem;
    list-style: none;
    scroll-snap-type: x proximity;
    scrollbar-color: rgb(169 139 250 / 62%) transparent;
}

.cg-video__chapters li {
    flex: 1 0 10.5rem;
    min-width: 0;
    scroll-snap-align: start;
}

.cg-video__chapter {
    display: flex;
    width: 100%;
    min-height: 4.25rem;
    align-items: flex-start;
    gap: .7rem;
    padding: .8rem .85rem;
    border: 1px solid rgb(143 153 255 / 23%);
    border-radius: .8rem;
    background: linear-gradient(140deg, rgb(22 41 83 / 74%), rgb(8 18 44 / 92%));
    color: var(--cg-video-muted);
    cursor: pointer;
    text-align: left;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.cg-video__chapter:hover,
.cg-video__chapter[aria-current="step"] {
    border-color: rgb(81 222 208 / 72%);
    background: linear-gradient(110deg, rgb(49 92 224 / 25%), rgb(80 78 220 / 20%), rgb(40 127 195 / 20%));
    box-shadow: inset 0 1px rgb(255 255 255 / 8%), 0 .35rem 1.1rem rgb(49 92 224 / 14%);
    color: var(--cg-video-ink);
}

.cg-video__chapter:focus-visible {
    outline: 3px solid var(--cg-video-accent);
    outline-offset: 3px;
}

.cg-video__chapter-index {
    color: #c2adff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.5;
}

.cg-video__chapter-copy {
    display: grid;
    gap: .25rem;
}

.cg-video__chapter-title {
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.35;
}

.cg-video__chapter time {
    color: var(--cg-video-muted);
    font-size: .75rem;
    font-variant-numeric: tabular-nums;
}

.cg-video__chapter-excerpt {
    max-width: 70ch;
    margin: .8rem 0 .05rem;
    padding: .2rem 0 .2rem .8rem;
    border-left: 2px solid var(--cg-video-accent);
    color: var(--cg-video-muted);
    font-size: .92rem;
    line-height: 1.55;
}

.cg-video__transcript {
    margin-top: .8rem;
    border: 1px solid rgb(143 153 255 / 30%);
    border-radius: .9rem;
    background: linear-gradient(130deg, rgb(16 27 58 / 95%), rgb(7 13 32 / 97%));
}

.cg-video__transcript summary {
    padding: .95rem 1.15rem;
    color: var(--cg-video-accent);
    cursor: pointer;
    font-weight: 650;
}

.cg-video__transcript summary:focus-visible,
.cg-video__player:focus-visible {
    outline: 3px solid var(--cg-video-accent);
    outline-offset: 3px;
}

.cg-video__transcript-copy {
    padding: 0 1.15rem 1rem;
    color: var(--cg-video-muted);
    line-height: 1.7;
}

.cg-video__transcript-copy p { margin: .35rem 0; }
.cg-video__silent-note { font-size: .9rem; }

.cg-video--hero {
    width: min(100%, 88rem);
    margin-block: 1.5rem 3rem;
}

.cg-video--hero .cg-video__figure {
    border-color: rgb(143 153 255 / 48%);
    box-shadow: 0 2rem 5rem rgb(2 13 24 / 30%);
}

.cg-video--compact { width: min(100%, 48rem); }
.cg-video--compact .cg-video__caption { padding-block: 1rem 1.25rem; }

@media (prefers-reduced-motion: reduce) {
    .cg-video *, .cg-video *::before, .cg-video *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .cg-video__chapter { transition: none; }
}
