/* Root page — page-specific styles (shared.css handles base, fonts, components)
 *
 * Section rhythm: hero (centered, glow) → how-we-teach cards (dots) → featurettes
 * (training, AI prompts, instructors; alternating sides and tones) →
 * curriculum (left-aligned, dots) → class format (two-day schedule side by
 * side) → closing footer. */

/* --- How we teach ---
 * Centered heading over three cards on a hairline grid (after factory.ai).
 * Each card leads with a small CSS-only visual (after port.io) and ends with
 * a link to the part of the page that backs it up (after cloudflare.com). */
.new-courses {
    background-color: var(--color-canvas);
    background-image: var(--glow-center);
    border-block: 1px solid var(--color-outline-brand);
    padding: 4.5rem var(--page-pad);
    text-align: center;
}

.new-courses .label-caps {
    margin-bottom: var(--space-sm);
}

.new-courses__lede {
    max-width: 34rem;
    margin: var(--space-md) auto 0;
    color: var(--color-subtle);
    font-size: 1.05rem;
    text-wrap: balance;
}

.teach-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: var(--space-2xl);
    border: 1px solid var(--color-divide);
    border-radius: var(--radius-card);
    background-color: rgb(9 9 11 / 0.7);
    text-align: left;
}

.teach-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-lg);
    transition: background-color 0.2s ease;
}

.teach-card + .teach-card {
    border-left: 1px solid var(--color-divide);
}

/* A Rose hairline lights up along the top of the card on hover. */
.teach-card::before {
    content: "";
    position: absolute;
    inset: -1px var(--space-lg) auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-red-strong), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.teach-card:hover {
    background-color: rgb(190 18 60 / 0.05);
}

.teach-card:hover::before {
    opacity: 1;
}

.teach-card__visual {
    display: grid;
    place-items: center;
    height: 10.5rem;
    padding: var(--space-md);
    border: 1px solid var(--color-divide);
    border-radius: 12px;
    background:
        radial-gradient(rgb(244 63 94 / 0.22) 1px, transparent 1.4px) 0 0 / 16px 16px,
        var(--fill-card);
    overflow: hidden;
}

.teach-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--space-sm);
}

.teach-card__index {
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.teach-card h3 {
    margin: 0;
    color: var(--color-content);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.teach-card p {
    margin: 0;
    color: var(--color-subtle);
    font-size: 0.95rem;
    line-height: 1.6;
}

.teach-card__link {
    margin-top: auto;
    padding-top: var(--space-sm);
    color: var(--color-accent-blue);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}

.teach-card__link span {
    display: inline-block;
    transition: transform 0.2s ease;
}

.teach-card__link:hover,
.teach-card__link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.teach-card:hover .teach-card__link span,
.teach-card__link:focus-visible span {
    transform: translateX(3px);
}

/* Card 01: a calendar window with Day 1 and Day 2 booked. */
.mini-window {
    width: 100%;
    max-width: 17rem;
    border: 1px solid var(--color-edge);
    border-radius: var(--radius-control);
    background-color: var(--color-surface);
    box-shadow: 0 12px 30px rgb(0 0 0 / 0.45);
}

.mini-window__bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--color-divide);
}

.mini-window__bar i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-raised);
}

.mini-week {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 8px;
    color: var(--color-muted);
    font-size: 0.625rem;
    text-align: center;
}

.mini-week b {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 3.25rem;
    border: 1px dashed var(--color-divide);
    border-radius: 4px;
    font-weight: 600;
}

.mini-week .is-booked {
    border: 1px solid var(--color-outline-brand);
    background-color: var(--color-tint-brand);
    color: var(--color-content);
    font-size: 0.6875rem;
}

.mini-week .is-booked.is-blue {
    border-color: rgb(96 165 250 / 0.6);
    background-color: rgb(96 165 250 / 0.12);
}

.mini-week small {
    display: block;
    margin-top: 2px;
    color: var(--color-subtle);
    font-size: 0.5rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Card 02: the two delivery modes, both taught live. */
.mini-modes {
    display: grid;
    gap: var(--space-sm);
    width: 100%;
    max-width: 17rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mini-modes li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--color-edge);
    border-radius: var(--radius-control);
    background-color: var(--color-surface);
    color: var(--color-content);
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
}

.mini-modes svg {
    flex: none;
    width: 1.125rem;
    height: 1.125rem;
    fill: none;
    stroke: var(--color-brand);
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mini-modes li:first-child svg {
    stroke: var(--color-accent-blue);
}

.mini-modes span {
    flex: 1;
    min-width: 0;
}

.mini-modes small {
    display: block;
    color: var(--color-muted);
    font-size: 0.6875rem;
    font-weight: 400;
}

.mini-modes em {
    padding: 2px 6px;
    border: 1px solid var(--color-outline-brand);
    border-radius: 999px;
    color: var(--color-red-mid);
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-style: normal;
    text-transform: uppercase;
}

.mini-modes .mini-modes__live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-color: rgb(52 211 153 / 0.5);
    color: var(--color-green-mid);
}

.mini-modes__live::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--color-green-mid);
    animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
    50% { box-shadow: 0 0 0 3px rgb(52 211 153 / 0.25); }
}

/* Card 03: a handful of tracks, some picked. */
.mini-tracks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: 17rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mini-tracks li {
    padding: 4px 9px;
    border: 1px solid var(--color-edge);
    border-radius: 999px;
    background-color: var(--color-surface);
    color: var(--color-subtle);
    font-size: 0.6875rem;
    white-space: nowrap;
}

.mini-tracks .is-picked {
    border-color: var(--color-outline-brand);
    background-color: var(--color-tint-brand);
    color: var(--color-content);
}

.mini-tracks .is-picked::before {
    content: "\2713";
    margin-right: 4px;
    color: var(--color-red-mid);
}

.mini-tracks .mini-tracks__more {
    border-style: dashed;
    background: none;
    color: var(--color-muted);
}

@media (prefers-reduced-motion: reduce) {
    .teach-card,
    .teach-card::before,
    .teach-card__link span {
        transition: none;
    }
    .mini-modes__live::before {
        animation: none;
    }
}

.new-courses__cta {
    margin-top: var(--space-2xl);
}

.new-courses__cta .catalog-btn {
    margin: 0 auto;
}

/* --- Featurettes ---
 * Split sections, as on manicode.ai: copy on one side, a visual on the other.
 * --flip puts the visual first; --surface lifts the band to Surface. */
.featurette {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--space-2xl) 4rem;
    padding: 5rem var(--page-pad);
    border-top: 1px solid var(--color-divide);
    background-color: var(--color-canvas);
}

.featurette--surface {
    background-image: var(--glow-right);
}

.featurette--flip .featurette__visual {
    order: -1;
}

.featurette__copy.instructor__bio {
    padding: 0;
}

.featurette__copy .label-caps {
    margin-bottom: var(--space-md);
}

.featurette__copy h2 {
    margin-bottom: var(--space-lg);
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.025em;
}

.featurette__copy p {
    margin-bottom: var(--space-md);
    font-size: 1.05rem;
}

.featurette__actions {
    margin-top: var(--space-lg);
}

.featurette__actions .catalog-btn {
    margin: 0;
}

/* Visual: a hub (after port.io). The Manicode mark sits in a Rose ring at
 * the center of a dashed orbit, with pills on either side. */
.hub {
    position: relative;
    container-type: inline-size;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-2xl) 0;
}

/* Dashed orbit behind everything */
.hub::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(100%, 26rem);
    aspect-ratio: 1;
    border: 1px dashed var(--color-outline-brand);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hub__side {
    position: relative;
    display: grid;
    gap: 3.5rem;
}

.hub__side li,
.hub__bottom li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.6rem 1rem;
    border: 1px solid var(--color-outline-brand);
    border-radius: 999px;
    background-color: var(--color-canvas);
    color: var(--color-content);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.hub__side li img,
.hub__bottom li img {
    width: 1.4rem;
}

/* A pill centered on the bottom of the dashed orbit. */
.hub__bottom {
    position: absolute;
    top: calc(50% + min(50cqw, 13rem));
    left: 50%;
    transform: translate(-50%, -50%);
}

.hub__core {
    position: relative;
    display: grid;
    place-items: center;
    width: 7rem;
    height: 7rem;
    border: 1px solid var(--color-brand);
    border-radius: 50%;
    background: radial-gradient(circle, rgb(190 18 60 / 0.25), var(--color-canvas) 70%);
    box-shadow: 0 0 0 10px rgb(190 18 60 / 0.06), 0 0 60px rgb(190 18 60 / 0.45);
    animation: hub-pulse 4s ease-in-out infinite;
}

.hub__core svg {
    width: 3.25rem;
    fill: var(--color-brand);
}

@keyframes hub-pulse {
    50% { box-shadow: 0 0 0 18px rgb(190 18 60 / 0.03), 0 0 80px rgb(190 18 60 / 0.6); }
}

@media (prefers-reduced-motion: reduce) {
    .hub__core { animation: none; }
}

@media (max-width: 767px) {
    .hub {
        grid-template-columns: 1fr 1fr;
    }
    .hub__core {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
        margin-bottom: var(--space-md);
    }
    .hub__side {
        gap: var(--space-md);
    }
    .hub__bottom {
        position: static;
        grid-column: 1 / -1;
        justify-self: center;
        transform: none;
    }
    .hub__side li,
    .hub__bottom li {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Visual: the animated IDE from manicode.ai (see the vp-* timeline below).
 * Sizes are in px to match manicode.ai exactly. */
.ide {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-outline-brand);
    border-radius: 12px;
    background-color: var(--color-surface);
    box-shadow: 0 30px 90px -30px rgb(190 18 60 / 0.55), 40px -30px 90px -50px rgb(96 165 250 / 0.4);
}

.ide i {
    display: block;
    flex-shrink: 0;
    border-radius: 50%;
}

.ide__defs {
    display: none;
}

.ide__titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-divide);
    background-color: rgb(39 39 42 / 0.4);
}

.ide__titlebar i {
    width: 12px;
    height: 12px;
    background-color: var(--color-raised);
}

.ide__titlebar span {
    margin: 0 auto;
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 12px;
}

.ide__tabs {
    display: flex;
    border-bottom: 1px solid var(--color-divide);
}

.ide__tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-right: 1px solid var(--color-divide);
    color: var(--color-dim);
    font-family: var(--font-mono);
    font-size: 12px;
}

.ide__tab i {
    width: 8px;
    height: 8px;
    background-color: var(--color-green-mid);
}

.ide__tabs-fill {
    flex: 1;
    background-color: rgb(9 9 11 / 0.4);
}

.ide__editor {
    position: relative;
    height: 508px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 28px;
}

.ide__layer {
    position: absolute;
    inset: 0;
    display: flex;
}

.ide__thinking {
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    color: var(--color-muted);
}

.ide__thinking svg {
    width: 16px;
    height: 16px;
}

.ide__gutter {
    padding: 16px 12px 16px 16px;
    border-right: 1px solid var(--color-divide);
    color: rgb(113 113 122 / 0.5);
    text-align: right;
    user-select: none;
}

.ide__code {
    flex: 1;
    overflow: hidden;
    padding: 16px 0;
}

.ide__code pre {
    margin: 0;
    padding: 0 16px;
    font: inherit;
    color: var(--color-content);
}

.hl-bad {
    border-left: 2px solid var(--color-red-strong);
    background-color: var(--color-red-subtle);
}

.hl-good {
    border-left: 2px solid var(--color-green-mid);
    background-color: var(--color-green-subtle);
}

.t-kw { color: #a78bfa; }  /* violet-400 */
.t-str { color: #fcd34d; } /* amber-300 */
.t-fn { color: #7dd3fc; }  /* sky-300 */
.t-dim { color: var(--color-dim); }

.ide__composer {
    padding: 12px;
    border-top: 1px solid var(--color-divide);
    background-color: rgb(39 39 42 / 0.3);
}

.ide__input {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    padding: 8px 12px;
    border: 1px solid var(--color-edge);
    border-radius: 8px;
    background-color: rgb(9 9 11 / 0.6);
}

.ide__input .vp-type {
    color: var(--color-dim);
    font-family: var(--font-mono);
    font-size: 12px;
}

.ide__send {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: auto;
    border-radius: 6px;
    background-color: var(--color-brand);
}

.ide__send svg {
    width: 12px;
    height: 12px;
    fill: #fff;
}

.ide__sysprompt,
.ide__status {
    position: relative;
    border-top: 1px solid var(--color-divide);
    font-size: 12px;
}

.ide__sysprompt {
    height: 44px;
    background-color: rgb(39 39 42 / 0.2);
}

.ide__status {
    height: 36px;
    font-weight: 500;
}

.ide__row {
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    color: var(--color-muted);
}

.ide__badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid var(--color-edge);
    border-radius: 6px;
    background-color: rgb(9 9 11 / 0.6);
}

.ide__badge i {
    width: 6px;
    height: 6px;
    background-color: var(--color-muted);
}

.ide__badge--brand {
    border-color: rgb(190 18 60 / 0.4);
    background-color: rgb(190 18 60 / 0.1);
    color: var(--color-brand);
    font-weight: 500;
}

.ide__badge--brand svg {
    width: auto;
    height: 10px;
    fill: currentColor;
}

.ide__flag {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ide__flag i {
    width: 6px;
    height: 6px;
    background-color: var(--color-red-strong);
}

.ide__flag svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.ide__status--think {
    background-color: rgb(39 39 42 / 0.3);
}

.ide__status--bad {
    border-top: 1px solid rgb(159 18 57 / 0.4);
    background-color: var(--color-red-subtle);
    color: var(--color-red-mid);
}

.ide__status--good {
    border-top: 1px solid rgb(4 120 87 / 0.4);
    background-color: var(--color-green-subtle);
    color: var(--color-green-mid);
}

@media (min-width: 640px) {
    .ide__editor {
        font-size: 13px;
    }
}

/* The shared 27s timeline, copied from manicode.ai (website/src/styles/app.css):
 * type the request, think, show the insecure completion, think again, then
 * show the secure completion once the Manicode prompt is applied. */
.vp-type {
    display: inline-block;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    border-right: 1.5px solid var(--color-edge);
    animation: vp-type 27s steps(47, end) infinite, vp-caret 0.8s step-end infinite;
}

.vp-think { animation: vp-think 27s ease-in-out infinite; }
.vp-insecure { animation: vp-insecure 27s ease-in-out infinite; }
.vp-secure { animation: vp-secure 27s ease-in-out infinite; }
.vp-prompt-a { animation: vp-prompt-a 27s ease-in-out infinite; }
.vp-prompt-b { animation: vp-prompt-b 27s ease-in-out infinite; }

.vp-spin {
    transform-origin: center;
    animation: vp-spin 3s linear infinite;
}

@keyframes vp-type {
    0% { width: 0; }
    20%, 100% { width: 47ch; }
}

@keyframes vp-caret {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--color-edge); }
}

@keyframes vp-think {
    0%, 22% { opacity: 0; }
    25%, 31% { opacity: 1; }
    34%, 53% { opacity: 0; }
    56%, 61% { opacity: 1; }
    64%, 100% { opacity: 0; }
}

@keyframes vp-insecure {
    0%, 32% { opacity: 0; }
    35%, 50% { opacity: 1; }
    53%, 100% { opacity: 0; }
}

@keyframes vp-secure {
    0%, 62% { opacity: 0; }
    65%, 100% { opacity: 1; }
}

@keyframes vp-prompt-a {
    0%, 52% { opacity: 1; }
    56%, 100% { opacity: 0; }
}

@keyframes vp-prompt-b {
    0%, 54% { opacity: 0; }
    58%, 100% { opacity: 1; }
}

@keyframes vp-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .vp-type { animation: none; width: 47ch; border-color: transparent; }
    .vp-think, .vp-insecure, .vp-prompt-a { animation: none; opacity: 0; }
    .vp-secure, .vp-prompt-b { animation: none; opacity: 1; }
    .vp-spin { animation: none; }
}

/* Logo banner: AI harness logos in a slow, looping marquee across the
 * full width of the AI prompt library featurette (after cloudflare.com). */
.harness-banner {
    grid-column: 1 / -1;
    margin-top: var(--space-xl);
    text-align: center;
}

.harness-banner .label-caps {
    margin-bottom: var(--space-lg);
    color: var(--color-subtle);
}

.harness-banner__track {
    display: flex;
    overflow: hidden;
    border-block: 1px solid var(--color-outline-brand);
    background-color: rgb(190 18 60 / 0.05);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.harness-banner__list {
    display: flex;
    flex-shrink: 0;
    gap: 3.5rem;
    padding: var(--space-lg) 1.75rem;
    animation: harness-marquee 40s linear infinite;
}

.harness-banner__track:hover .harness-banner__list {
    animation-play-state: paused;
}

.harness-banner__list li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-subtle);
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color 160ms ease;
}

.harness-banner__list li:hover {
    color: var(--color-content);
}

.harness-banner__list svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

@keyframes harness-marquee {
    to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
    .harness-banner__track {
        justify-content: center;
    }
    .harness-banner__list {
        flex-wrap: wrap;
        justify-content: center;
        flex-shrink: 1;
        animation: none;
    }
    .harness-banner__list[aria-hidden="true"] {
        display: none;
    }
}

/* Visual: instructor photo, plus the row of expert instructors below */
.featurette__photo {
    justify-self: end;
    width: calc(100% - 1rem);
    max-width: 22rem;
    margin: 0 1rem 1rem 0;
    border-radius: var(--radius-card);
    box-shadow: 1rem 1rem 0 -1px var(--color-canvas), 1rem 1rem 0 0 var(--color-brand);
}

.other-instructors {
    grid-column: 1 / -1;
    text-align: center;
}

.other-instructors .label-caps {
    margin-bottom: var(--space-md);
    color: var(--color-subtle);
}

.other-instructors__photos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xl);
}

.other-instructors__photos a {
    display: block;
    border-radius: 50%;
    transition: transform 160ms ease;
}

.other-instructors__photos a:hover,
.other-instructors__photos a:focus-visible {
    transform: translateY(-4px);
}

.other-instructors__photos img {
    display: block;
    width: 5.5rem;
    height: 5.5rem;
    object-fit: cover;
    border: 3px solid var(--color-canvas);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--color-brand);
    transition: box-shadow 160ms ease;
}

.other-instructors__photos a:hover img,
.other-instructors__photos a:focus-visible img {
    box-shadow: 0 0 0 2px var(--color-brand), 0 0 24px rgb(190 18 60 / 0.5);
}

/* --- Advisory: split header, then numbered cards on a shared grid (after
 * factory.ai), each lighting up with a Rose top edge on hover. --- */
.advisory {
    padding: 5rem var(--page-pad);
    border-top: 1px solid var(--color-divide);
    background-color: var(--color-canvas);
    background-image: var(--glow-left);
    scroll-margin-top: var(--space-xl);
}

.advisory__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: var(--space-lg) 4rem;
    margin-bottom: var(--space-2xl);
}

.advisory__head .label-caps {
    margin-bottom: var(--space-md);
}

.advisory__head h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.025em;
}

.advisory__head p {
    margin-bottom: var(--space-lg);
    color: var(--color-subtle);
    font-size: 1.05rem;
}

.advisory__head .catalog-btn {
    margin: 0;
}

.advisory__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--color-outline-brand);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.advisory__grid li {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-xl) var(--space-lg);
    background: var(--fill-card);
    transition: background-color 160ms ease;
}

.advisory__grid li + li {
    border-left: 1px solid var(--color-outline-brand);
}

.advisory__grid li::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background-color: var(--color-brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 240ms ease;
}

.advisory__grid li:hover::before {
    transform: scaleX(1);
}

.advisory__label {
    margin-bottom: var(--space-md);
    color: var(--color-subtle);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.advisory__label b {
    margin-right: 0.4em;
    color: var(--color-brand);
    font-weight: 500;
}

.advisory__grid h3 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.advisory__grid p {
    color: var(--color-subtle);
    font-size: 0.9rem;
    line-height: 1.55;
}

@media screen and (max-width: 1024px) {
    .advisory__head {
        grid-template-columns: 1fr;
    }
    .advisory__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .advisory__grid li:nth-child(3) {
        border-left: 0;
    }
    .advisory__grid li:nth-child(n + 3) {
        border-top: 1px solid var(--color-outline-brand);
    }
}

@media screen and (max-width: 767px) {
    .advisory {
        padding: var(--space-2xl) var(--page-pad);
    }
    .advisory__grid {
        grid-template-columns: 1fr;
    }
    .advisory__grid li + li {
        border-left: 0;
        border-top: 1px solid var(--color-outline-brand);
    }
}

/* --- Curriculum: left-aligned header over a dotted field --- */
.learning {
    background-color: var(--color-canvas);
    border-top: 1px solid var(--color-divide);
    width: 100%;
    padding: 5rem var(--page-pad);
}

.learning .label-caps {
    margin-bottom: var(--space-md);
}

.learning h2 {
    margin-bottom: var(--space-md);
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.025em;
}

.learning > p {
    max-width: 40rem;
    margin: 0 0 var(--space-2xl);
    color: var(--color-subtle);
}

/* Curriculum explorer: a vertical tab list of tracks beside one large panel.
 * CSS-only: each tab is a label for a visually hidden radio, so arrow keys
 * move between tracks and no JavaScript is needed. */
.tracks {
    display: grid;
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: start;
}

.tracks__radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tracks__tabs {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--color-outline-brand);
}

.tracks__tabs label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-left: -1px;
    padding: 0.7rem var(--space-md);
    border-left: 2px solid transparent;
    color: var(--color-subtle);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.tracks__tabs label:hover {
    color: var(--color-content);
    background-color: rgb(190 18 60 / 0.06);
}

.tracks__tabs label b {
    min-width: 1.75rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-align: center;
}

#track-1:checked ~ .tracks__tabs label[for="track-1"],
#track-2:checked ~ .tracks__tabs label[for="track-2"],
#track-3:checked ~ .tracks__tabs label[for="track-3"],
#track-4:checked ~ .tracks__tabs label[for="track-4"],
#track-5:checked ~ .tracks__tabs label[for="track-5"],
#track-6:checked ~ .tracks__tabs label[for="track-6"],
#track-7:checked ~ .tracks__tabs label[for="track-7"],
#track-8:checked ~ .tracks__tabs label[for="track-8"],
#track-9:checked ~ .tracks__tabs label[for="track-9"],
#track-10:checked ~ .tracks__tabs label[for="track-10"] {
    border-left-color: var(--color-brand);
    background: linear-gradient(90deg, rgb(190 18 60 / 0.18), transparent);
    color: var(--color-content);
}

#track-1:checked ~ .tracks__tabs label[for="track-1"] b,
#track-2:checked ~ .tracks__tabs label[for="track-2"] b,
#track-3:checked ~ .tracks__tabs label[for="track-3"] b,
#track-4:checked ~ .tracks__tabs label[for="track-4"] b,
#track-5:checked ~ .tracks__tabs label[for="track-5"] b,
#track-6:checked ~ .tracks__tabs label[for="track-6"] b,
#track-7:checked ~ .tracks__tabs label[for="track-7"] b,
#track-8:checked ~ .tracks__tabs label[for="track-8"] b,
#track-9:checked ~ .tracks__tabs label[for="track-9"] b,
#track-10:checked ~ .tracks__tabs label[for="track-10"] b {
    background-color: var(--color-brand);
    color: var(--color-content);
}

#track-1:focus-visible ~ .tracks__tabs label[for="track-1"],
#track-2:focus-visible ~ .tracks__tabs label[for="track-2"],
#track-3:focus-visible ~ .tracks__tabs label[for="track-3"],
#track-4:focus-visible ~ .tracks__tabs label[for="track-4"],
#track-5:focus-visible ~ .tracks__tabs label[for="track-5"],
#track-6:focus-visible ~ .tracks__tabs label[for="track-6"],
#track-7:focus-visible ~ .tracks__tabs label[for="track-7"],
#track-8:focus-visible ~ .tracks__tabs label[for="track-8"],
#track-9:focus-visible ~ .tracks__tabs label[for="track-9"],
#track-10:focus-visible ~ .tracks__tabs label[for="track-10"] {
    outline: 2px solid var(--color-content);
    outline-offset: -2px;
}

.tracks__panel {
    display: none;
    min-height: 100%;
    padding: var(--space-2xl);
    border: 1px solid var(--color-outline-brand);
    border-radius: var(--radius-card);
    background:
        radial-gradient(60% 80% at 100% 0%, rgb(190 18 60 / 0.16), transparent 70%),
        radial-gradient(50% 60% at 0% 100%, rgb(96 165 250 / 0.12), transparent 70%),
        var(--color-canvas);
    animation: tracks-in 240ms ease;
}

#track-1:checked ~ .tracks__panels #panel-1,
#track-2:checked ~ .tracks__panels #panel-2,
#track-3:checked ~ .tracks__panels #panel-3,
#track-4:checked ~ .tracks__panels #panel-4,
#track-5:checked ~ .tracks__panels #panel-5,
#track-6:checked ~ .tracks__panels #panel-6,
#track-7:checked ~ .tracks__panels #panel-7,
#track-8:checked ~ .tracks__panels #panel-8,
#track-9:checked ~ .tracks__panels #panel-9,
#track-10:checked ~ .tracks__panels #panel-10 {
    display: block;
}

.tracks__count {
    color: var(--color-brand);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tracks__panel h3 {
    margin: var(--space-sm) 0 var(--space-xl);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    letter-spacing: -0.025em;
}

.tracks__panel ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--space-xl);
    counter-reset: topic;
}

.tracks__panel li {
    counter-increment: topic;
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-divide);
    color: var(--color-dim);
    font-size: 1rem;
}

.tracks__panel li::before {
    content: counter(topic, decimal-leading-zero);
    color: var(--color-accent-blue);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

/* .learning > .tracks__note beats the .learning > p margin rule */
.learning > .tracks__note {
    margin: var(--space-xl) 0 0;
    color: var(--color-muted);
    font-size: 0.9rem;
    text-align: right;
}

@keyframes tracks-in {
    from { opacity: 0; transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
    .tracks__panel { animation: none; }
}

/* Phones and tablets: the tabs become a horizontal, scrollable strip. */
@media screen and (max-width: 900px) {
    .tracks {
        grid-template-columns: 1fr;
    }
    .tracks__tabs {
        flex-direction: row;
        overflow-x: auto;
        border-left: 0;
        border-bottom: 1px solid var(--color-outline-brand);
        scrollbar-width: none;
    }
    .tracks__tabs label {
        min-height: 44px;
        flex-shrink: 0;
        margin: 0 0 -1px;
        border-left: 0;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
    }
    #track-1:checked ~ .tracks__tabs label[for="track-1"],
    #track-2:checked ~ .tracks__tabs label[for="track-2"],
    #track-3:checked ~ .tracks__tabs label[for="track-3"],
    #track-4:checked ~ .tracks__tabs label[for="track-4"],
    #track-5:checked ~ .tracks__tabs label[for="track-5"],
    #track-6:checked ~ .tracks__tabs label[for="track-6"],
    #track-7:checked ~ .tracks__tabs label[for="track-7"],
    #track-8:checked ~ .tracks__tabs label[for="track-8"],
    #track-9:checked ~ .tracks__tabs label[for="track-9"],
    #track-10:checked ~ .tracks__tabs label[for="track-10"] {
        border-bottom-color: var(--color-brand);
        background: linear-gradient(0deg, rgb(190 18 60 / 0.18), transparent);
    }
    .tracks__panel {
        padding: var(--space-xl) var(--space-lg);
    }
    .tracks__panel ul {
        grid-template-columns: 1fr;
    }
    .tracks__note {
        text-align: left;
    }
}

/* --- Class format: header on top, the two days side by side --- */
.attendees {
    width: 100%;
    background-color: var(--color-canvas);
    background-image: var(--glow-left);
    border-top: 1px solid var(--color-outline-brand);
    padding: 5rem var(--page-pad);
}

.attendees .attendees-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-lg) var(--space-2xl);
    width: 100%;
}

.attendees .attendee-content .label-caps {
    margin-bottom: var(--space-md);
}

.attendees h2 {
    margin-bottom: var(--space-md);
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.025em;
}

.attendees p {
    margin-bottom: var(--space-md);
}

.attendees .attendee-content {
    grid-column: 1;
}

/* Lift the schedule's children into the wrapper grid: the note sits beside
 * the heading, and each day takes a column below. */
.attendees .attendee-schedule {
    display: contents;
}

.attendees .attendee-schedule > p {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    padding: var(--space-lg);
    border: 1px dashed rgb(96 165 250 / 0.45);
    border-radius: var(--radius-card);
    background-color: rgb(96 165 250 / 0.05);
    color: var(--color-dim);
    font-size: 1rem;
}

.attendees .attendee-schedule > p .bold-text {
    color: var(--color-accent-blue);
}

/* --- Schedule: a Rose timeline per day --- */
.schedule {
    position: relative;
    margin-top: var(--space-md);
    padding-left: var(--space-xl);
    border-left: 2px solid var(--color-outline-brand);
}

.schedule .time-agenda {
    position: relative;
    display: flex;
    align-items: baseline;
    padding: 0.55rem 0;
    font-size: 0.95rem;
}

/* Timeline dot */
.schedule .time-agenda::before {
    content: "";
    position: absolute;
    top: 50%;
    left: calc(-1 * var(--space-xl) - 6px);
    width: 10px;
    height: 10px;
    border: 2px solid var(--color-brand);
    border-radius: 50%;
    background-color: var(--color-canvas);
    transform: translateY(-50%);
}

/* Day label: a Rose pill sitting on the line */
.schedule .time-agenda:first-child {
    margin-bottom: var(--space-sm);
    padding-top: 0;
}

.schedule .time-agenda:first-child::before {
    background-color: var(--color-brand);
}

.schedule .time-agenda:first-child .time {
    flex: none;
    padding: 0.2rem 0.85rem;
    border-radius: 999px;
    background-color: var(--color-brand);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* The day's theme beside its badge */
.schedule .time-agenda:first-child .agenda {
    margin-left: var(--space-md);
    color: var(--color-content);
    font-size: 1.05rem;
    font-weight: 600;
}

.schedule .time-agenda .time {
    flex: 0 0 6.5rem;
    color: var(--color-content);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.schedule .time-agenda .agenda {
    flex: 1;
    color: var(--color-dim);
}

/* Stack the cards once three no longer fit side by side. */
@media screen and (max-width: 899px) {
    .teach-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .teach-card + .teach-card {
        border-left: 0;
        border-top: 1px solid var(--color-divide);
    }
}

/* --- Responsive: Tablet (768–1024px) --- */
@media screen and (max-width: 1024px) {
    .featurette {
        /* minmax(0, ...) so wide content (the editor's code) can't widen the column */
        grid-template-columns: minmax(0, 1fr);
    }
    .featurette--flip .featurette__visual {
        order: 0;
    }
    .featurette__photo {
        justify-self: start;
    }

}

/* --- Responsive: Mobile (< 768px) --- */
@media screen and (max-width: 767px) {
    .new-courses {
        padding: var(--space-2xl) var(--page-pad);
    }
    .learning,
    .attendees {
        padding: var(--space-2xl) var(--page-pad);
    }

    .attendees .attendees-wrapper {
        grid-template-columns: 1fr;
    }
    .attendees .attendee-schedule > p {
        grid-column: 1;
        grid-row: auto;
    }
    .schedule .time-agenda {
        font-size: 0.875rem;
    }
    .schedule .time-agenda .time {
        flex-basis: 5.5rem;
    }
    .featurette {
        padding: var(--space-2xl) var(--page-pad);
    }
    .other-instructors__photos {
        gap: var(--space-md);
    }
    .other-instructors__photos img {
        width: 4.5rem;
        height: 4.5rem;
    }
}

/* ===== Phones: the animated editor =====
 * A shorter editor that keeps the insecure-to-secure story readable: smaller
 * type, no line-number gutter, and long code lines wrap instead of being cut
 * off. The request is shown in full rather than typed out. */
@media screen and (max-width: 767px) {
    .ide__editor {
        height: 412px;
        font-size: 10.5px;
        line-height: 19px;
    }

    .ide__gutter {
        display: none;
    }

    .ide__code {
        padding: 12px 0;
    }

    .ide__code pre {
        padding: 0 12px 0 calc(12px + 2ch);
        text-indent: -2ch;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }

    .ide__thinking {
        padding: 0 14px;
    }

    .ide__input .vp-type {
        width: auto;
        border-right: 0;
        white-space: normal;
        animation: none;
        font-size: 11px;
    }

    .ide__sysprompt,
    .ide__status {
        font-size: 11px;
    }

    .ide__row {
        padding: 0 12px;
    }

    .ide__badge {
        padding: 3px 6px;
    }
}

/* Phones: center the stacked featurette buttons under their text. */
@media screen and (max-width: 767px) {
    .featurette__actions .catalog-btn,
    .advisory__head .catalog-btn {
        margin-inline: auto;
    }
}

/* Stacked featurettes (tablets and phones): put each section's button at the
 * bottom, after its visual. The copy wrapper dissolves (display: contents) so
 * the button can be reordered as its own grid item. */
@media screen and (max-width: 1024px) {
    .featurette {
        row-gap: 0;
    }

    .featurette__copy {
        display: contents;
    }

    .featurette__copy > * {
        grid-column: 1;
    }

    .featurette__visual {
        margin-top: var(--space-xl);
    }

    .featurette__actions {
        order: 10;
        margin-top: var(--space-2xl);
    }

    .featurette .other-instructors {
        margin-top: var(--space-2xl);
    }
}

/* Stacked advisory section (tablets and phones): Talk to Jim moves below the
 * list of services. The header wrappers dissolve so the button can be
 * reordered as its own flex item. */
@media screen and (max-width: 1024px) {
    .advisory {
        display: flex;
        flex-direction: column;
    }

    .advisory__head,
    .advisory__head > div:last-child {
        display: contents;
    }

    .advisory__head p {
        margin: var(--space-lg) 0 var(--space-2xl);
    }

    .advisory__head .catalog-btn {
        order: 10;
        align-self: center;
        width: 100%;
        max-width: 22rem;
        justify-content: center;
        margin-top: var(--space-2xl);
    }
}
