/* ==========================================================================
   Index page — why / start / steps / journal / close
   Flat flow (hero keeps wave; no elevated chapter boxes)
   ========================================================================== */
.index-start,
.index-steps,
.index-why,
.index-journal,
.index-close {
    position: relative;
    color: var(--tf-text);
    font-family: var(--tf-font);
    border-top: none;
}

.index-start,
.index-steps {
    padding: 3.5rem 0 4.5rem;
}

.index-start .index-block-title,
.index-start h2,
.index-steps .index-block-title,
.index-steps h2 {
    color: var(--tf-text-strong);
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 2.65rem);
    margin: 0 0 0.75rem;
    text-align: left;
}

.index-start .index-block-lead,
.index-steps .index-block-lead {
    color: var(--tf-text-muted);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.45;
    text-align: left;
    max-width: 42rem;
    margin: 0 0 2.5rem;
}

.index-start .index-block-lead p {
    margin: 0;
}

.index-steps .index-start-step-story code {
    color: var(--tf-text-strong);
    font-size: 0.95em;
}

/* Code left, terminal below and offset right — same box chrome as .index-start */
.index-steps-cascade {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 0 0 2rem;
    max-width: 56rem;
}

.index-steps-panel {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    /* Override .index-start-step’s large bottom margin — cascade gap owns spacing */
    padding-bottom: 0;
}

.index-steps-panel.index-start-step {
    margin-bottom: 0;
}

.index-steps-panel figure.highlight,
.index-steps-panel .index-steps-result {
    margin-bottom: 0;
}

/* Flat chrome — no outline stack / drop shadow on steps panels */
.index-steps .index-panel-chrome {
    position: relative;
    z-index: 1;
    margin: 0;
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: none;
}

.index-steps-panel.index-start-step::after {
    display: none;
}

/* Shorter than Everything is code demos, but keep height while typewriter blanks lines */
.index-steps .index-panel-chrome figure.highlight {
    flex: 0 0 auto;
    min-height: 14rem !important;
    height: auto !important;
    margin: 0 !important;
    padding-bottom: 0.85rem;
}

.index-steps-cascade,
.index-steps-panel,
.index-steps .index-panel-chrome {
    overflow: visible;
}

.index-steps-panel--run .index-start-step-story,
.index-steps-panel--run .index-start-step-story p {
    margin-bottom: 0.55rem;
    max-width: 36rem;
}

@media (min-width: 768px) {
    .index-steps-panel--code {
        align-self: flex-start;
        width: 72%;
        max-width: 34rem;
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 0;
    }

    .index-steps-panel--run {
        align-self: flex-end;
        /* Wide enough for Handbook nice-format lines (~82 chars) without scroll */
        width: min(100%, 48rem);
        max-width: 48rem;
        margin-left: auto;
        margin-top: 0;
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 0;
    }

    /* Cascade panels are shorter than the side-by-side start demos */
    .index-steps-panel figure.highlight {
        min-height: 0;
    }
}

@media (min-width: 1200px) {
    .index-steps-cascade {
        max-width: 60rem;
    }

    .index-steps-panel--run {
        width: min(100%, 52rem);
        max-width: 52rem;
    }
}

.index-start-steps {
    position: relative;
    align-items: stretch;
    margin-top: 0.5rem;
}

.index-start-step {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-bottom: 2.75rem;
    padding: 0 0 0.5rem;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    min-width: 0;
    max-width: 100%;
}

.index-start-step h3 {
    color: var(--tf-text-strong);
    font-weight: 600;
    font-size: clamp(1.65rem, 3vw, 2.1rem);
    margin: 0 0 0.65rem;
    text-align: left;
}

.index-start-step-story,
.index-start-step-story p {
    color: var(--tf-text-muted);
    font-size: 1.05rem;
    line-height: 1.5;
    text-align: left;
    margin: 0 0 1.1rem;
    max-width: 28rem;
}

/* Terminal chrome — title bar sits on the panel (matches hero frame) */
.index-start-step-file,
.index-start-step-file p {
    color: rgba(var(--tf-terminal-fg-rgb), 0.55);
    font-size: 0.72rem;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.03em;
    line-height: 1.15;
    text-align: left;
}

.index-start-step-file {
    position: relative;
    z-index: 1;
    margin: 0;
    /* Extra right pad for mac traffic-light dots */
    padding: 0.4rem 2.85rem 0.3rem 1rem;
    background: var(--tf-terminal-bg);
    border: 1px solid rgba(var(--tf-terminal-fg-rgb), 0.18);
    border-bottom: 1px solid rgba(var(--tf-terminal-fg-rgb), 0.08);
    border-radius: 1.25rem 1.25rem 0 0;
}

/* Mac window dots — on the right; order still red → yellow → green */
.index-start-step-file::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.85rem;
    width: 0.42rem;
    height: 0.42rem;
    margin-top: -0.21rem;
    border-radius: 50%;
    background: #28c840;
    box-shadow:
        -0.65rem 0 0 #febc2e,
        -1.3rem 0 0 #ff5f57;
    pointer-events: none;
}

.index-start-step figure.highlight {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 18rem;
    min-width: 0;
    max-width: 100%;
    margin: 0 0 1.75rem;
    /* Shared with .index-steps — compact monospace for all homepage demos */
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.88rem;
}

.index-start-step figure.highlight table {
    flex: 1 1 auto;
    height: 100%;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.index-start-step figure.highlight table tbody,
.index-start-step figure.highlight table tr {
    display: table;
    width: max-content;
    min-width: 100%;
}

.index-start-step figure.highlight .code,
.index-start-step figure.highlight pre {
    height: 100%;
}

.index-start-step figure.highlight .line {
    white-space: pre;
}

/* Typewriter caret for test.py panels (index-code-type.js) */
.index-code-caret {
    display: inline-block;
    width: 0.55ch;
    height: 1.05em;
    margin-left: 1px;
    background: #06f996;
    vertical-align: text-bottom;
    animation: index-code-caret-blink 0.9s step-end infinite;
}

@keyframes index-code-caret-blink {
    50% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .index-code-caret {
        display: none;
        animation: none;
    }
}

@media (min-width: 768px) {
    .index-start-steps {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }

    .index-start-step {
        margin-bottom: 1.25rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        padding-bottom: 0.75rem;
    }
}

@media (max-width: 991.98px) {
    .index-start-step-file {
        border-radius: 1rem 1rem 0 0;
        padding: 0.75rem 1.25rem 0.5rem;
    }

    .index-start-step figure.highlight {
        min-height: 15.5rem;
        font-size: 0.82rem;
        padding: 0.7rem 1.25rem 1.55rem;
    }
}

.index-block-title {
    color: var(--tf-text-strong);
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 2.65rem);
    margin: 0 0 0.75rem;
    text-align: center;
}

.index-block-lead {
    color: var(--tf-text-muted);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.45;
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 2.5rem;
}

.index-why {
    /* Above hero wave bleed so cards stay readable */
    z-index: 1;
    padding: 5rem 0 5rem;
}

.index-journal {
    /* Above close-section wave so blog copy stays readable */
    z-index: 1;
    padding: 4.5rem 0 4.5rem;
}

.index-why-grid {
    align-items: stretch;
    margin-bottom: 0.5rem;
}

.index-why-grid-more {
    margin-top: 1.25rem;
}

.index-why-col {
    display: flex;
    margin-bottom: 1.25rem;
}

.index-why-card {
    --index-card-radius: 1.25rem;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 13.5rem;
    padding: 1.6rem 1.6rem 2.1rem;
    text-align: center;
    border: 1px solid var(--tf-card-border);
    border-bottom: none;
    border-radius: var(--index-card-radius) var(--index-card-radius) 0 0;
    background: var(--tf-card-bg);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 22px 44px rgba(0, 0, 0, 0.28),
        0 8px 20px rgba(0, 0, 0, 0.16);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: visible;
}

.index-why-card-title {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 0 0 1rem;
    text-align: left;
}

/* Line icons — painted via mask so light/dark themes share one PNG */
.index-why-icon {
    flex: 0 0 auto;
    width: 3.1rem;
    height: 3.1rem;
    background-color: var(--tf-text-strong);
    opacity: 0.92;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.index-why-icon--document {
    -webkit-mask-image: url("/images/why/document.png");
    mask-image: url("/images/why/document.png");
}

.index-why-icon--puzzle {
    -webkit-mask-image: url("/images/why/puzzle.png");
    mask-image: url("/images/why/puzzle.png");
}

.index-why-icon--grid {
    -webkit-mask-image: url("/images/why/grid.png");
    mask-image: url("/images/why/grid.png");
}

.index-why-icon--shoe {
    -webkit-mask-image: url("/images/why/shoe.png");
    mask-image: url("/images/why/shoe.png");
}

.index-why-icon--gears {
    -webkit-mask-image: url("/images/why/gears.png");
    mask-image: url("/images/why/gears.png");
}

.index-why-icon--checklist {
    -webkit-mask-image: url("/images/why/checklist.png");
    mask-image: url("/images/why/checklist.png");
}

/* Soft glassy shelf under each card (open bottom, like hero / terminals) */
.index-why-card:not(.index-why-card-more)::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -1.15rem;
    height: 1.4rem;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(var(--tf-fg-rgb), 0.12) 0%,
        rgba(var(--tf-fg-rgb), 0.04) 42%,
        transparent 72%
    );
    filter: blur(9px);
    pointer-events: none;
    z-index: -1;
}

[data-theme="light"] .index-why-card:not(.index-why-card-more) {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65) inset,
        0 22px 44px rgba(var(--tf-fg-rgb), 0.12),
        0 8px 20px rgba(var(--tf-fg-rgb), 0.07);
}

[data-theme="light"] .index-why-card:not(.index-why-card-more)::after {
    background: radial-gradient(
        ellipse at center,
        rgba(var(--tf-fg-rgb), 0.1) 0%,
        rgba(var(--tf-fg-rgb), 0.035) 42%,
        transparent 72%
    );
}

.index-why-card:not(.index-why-card-more):hover {
    border-color: var(--tf-card-border-hover);
}

.index-why-card h3 {
    color: var(--tf-text-strong);
    font-weight: 600;
    font-size: clamp(1.45rem, 2.6vw, 1.75rem);
    line-height: 1.2;
    margin: 0;
    text-align: left;
    flex: 1 1 auto;
    min-width: 0;
}

.index-why-card-more h3 {
    text-align: center;
}

.index-why-card p {
    color: var(--tf-text-muted);
    font-size: 1.05rem;
    line-height: 1.55;
    margin: 0;
    flex: 1 1 auto;
    text-align: left;
}

.index-why-card-more {
    min-height: 0;
    padding: 2.25rem 0 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.index-why-card-more p {
    text-align: center;
    max-width: 42rem;
    margin: 0 auto;
}

.index-why-card-cta {
    text-align: center;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .index-why-col {
        margin-bottom: 0;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .index-why-grid {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }
}

.index-journal-heading {
    width: 100%;
    margin: 0 0 2.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--tf-card-border);
    text-align: right;
}

.index-journal .index-block-title {
    margin: 0 0 0.75rem;
    text-align: right;
}

.index-journal .index-block-lead {
    width: 100%;
    max-width: none;
    margin: 0;
    text-align: right;
}

.index-journal-feature {
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

.index-journal-col {
    display: flex;
    margin-bottom: 1.5rem;
}

.index-journal-media {
    display: block;
    width: 100%;
    margin: 0;
    text-align: center;
}

.index-journal-media img {
    display: block;
    width: auto;
    max-width: min(100%, 500px);
    max-height: 500px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.index-journal-copy {
    width: 100%;
    text-align: left;
    color: var(--tf-text);
}

.index-journal-copy *,
.index-journal-copy *::before,
.index-journal-copy *::after {
    border: none !important;
    box-shadow: none !important;
    outline: none;
}

.index-journal-copy h3 {
    color: var(--tf-text-strong);
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 1rem;
    text-align: left;
}

.index-journal-copy h3 a {
    color: inherit;
    text-decoration: none;
}

.index-journal-copy h3 a:hover,
.index-journal-copy h3 a:focus {
    color: var(--tf-text-strong);
}

.index-journal-excerpt {
    color: var(--tf-text-muted);
    font-size: 1.05rem;
    line-height: 1.55;
    text-align: left;
}

.index-journal-excerpt p {
    margin: 0 0 0.85rem;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    text-align: left;
    border: none !important;
    padding: 0;
    background: none;
}

.index-journal-excerpt p:last-of-type {
    margin-bottom: 0;
}

.index-journal-excerpt a {
    color: var(--tf-text-strong);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.index-journal-excerpt .post-summary-more {
    color: var(--tf-text-strong);
    font-style: normal;
    font-weight: 600;
}

.index-journal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem 1.25rem;
    margin-top: 1.25rem;
    color: var(--tf-text-muted);
    font-size: 0.95rem;
}

.index-journal-author {
    color: var(--tf-text-strong);
    font-weight: 600;
}

.index-journal-meta time {
    color: var(--tf-text-strong);
    font-weight: 600;
}

.index-journal-cta-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-top: 0.5rem;
    padding: 2rem 0 0 1.25rem;
    text-align: left;
    border: none;
    border-radius: 0;
    background: transparent;
    box-sizing: border-box;
}

.index-journal-cta-card h3 {
    color: var(--tf-text-strong);
    font-weight: 600;
    font-size: clamp(1.45rem, 2.6vw, 1.85rem);
    margin: 0 0 1rem;
    text-align: left;
}

.index-journal-cta-card p {
    color: var(--tf-text-muted);
    font-size: 1.1rem;
    line-height: 1.55;
    margin: 0 0 1.75rem;
    max-width: none;
    width: 100%;
}

@media (min-width: 768px) {
    .index-journal-col {
        margin-bottom: 0;
    }

    .index-journal-feature .index-journal-col:first-child {
        padding-right: 1.25rem;
    }

    .index-journal-feature .index-journal-col:last-child {
        padding-left: 1.25rem;
    }

    .index-journal-media {
        text-align: left;
    }

    .index-journal-media img {
        margin: 0;
    }
}

.section-cta-lg {
    margin-top: 1.5rem;
    margin-left: 0;
    font-size: 1.15rem;
    padding: 0.95rem 1.75rem;
}

.index-close {
    z-index: 0;
    overflow: visible;
    padding: 6.5rem 0 7.5rem;
}

.index-close .section-close {
    position: relative;
    z-index: 1;
    max-width: 40rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.index-close .section-close h1 {
    color: var(--tf-text-strong);
    font-weight: 600;
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    margin: 0 0 0.85rem;
}

.index-close .section-close p {
    color: var(--tf-text-strong);
    font-weight: 400;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    margin: 0 0 1.75rem;
}

.index-close .section-cta-ghost {
    margin-left: 0.75rem;
}

@media (max-width: 575.98px) {
    .index-close .section-cta,
    .index-close .section-cta-ghost {
        display: block;
        margin: 0.65rem auto 0;
        max-width: 18rem;
    }
}

/* Radical section panel colors — shared by code + terminal within a section */
.index-start,
.index-steps {
    /* Same near-black panel tone as Everything is code */
    --tf-terminal-bg: var(--tf-terminal-bg-start);
}

/* Dark terminals — softer charcoal, light border, glass under */
.index-start figure.highlight,
.index-steps figure.highlight {
    --index-term-radius: 1.25rem;
    position: relative;
    background: var(--tf-terminal-bg) !important;
    border: 1px solid rgba(var(--tf-terminal-fg-rgb), 0.18);
    border-top: none;
    border-radius: 0;
    padding: 0.85rem 1.35rem 1.85rem 0.85rem;
    /* Keep panel chrome clipped; long lines scroll inside the table */
    overflow: hidden;
    max-width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.88rem;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 28px 56px rgba(0, 0, 0, 0.36),
        0 10px 28px rgba(0, 0, 0, 0.22);
}

/* Steps: no panel shadows — border + shared bg only */
.index-steps figure.highlight,
.index-steps .index-steps-result,
.index-steps .index-panel-chrome .index-start-step-file {
    box-shadow: none !important;
}

/* Soft glassy shelf under each terminal (on the step — figure scrolls/clips). */
.index-start-step::after {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: 0.15rem;
    height: 1.6rem;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(var(--tf-terminal-fg-rgb), 0.12) 0%,
        rgba(var(--tf-terminal-fg-rgb), 0.04) 40%,
        transparent 72%
    );
    filter: blur(10px);
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] .index-start figure.highlight,
[data-theme="light"] .index-steps figure.highlight {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 28px 56px rgba(var(--tf-fg-rgb), 0.16),
        0 10px 28px rgba(var(--tf-fg-rgb), 0.09);
}

[data-theme="light"] .index-start-step::after {
    background: radial-gradient(
        ellipse at center,
        rgba(var(--tf-fg-rgb), 0.1) 0%,
        rgba(var(--tf-fg-rgb), 0.04) 40%,
        transparent 72%
    );
}

.index-start figure.highlight pre,
.index-start figure.highlight code,
.index-start figure.highlight .code,
.index-start figure.highlight .line,
.index-steps figure.highlight pre,
.index-steps figure.highlight code,
.index-steps figure.highlight .code,
.index-steps figure.highlight .line {
    background: transparent !important;
    color: #e8f5f2 !important;
    /* Beat highlight.css `pre { font-size: 0.85em }` — nested pre was
       shrinking code but not gutter (gutter had inherit), so numbers drifted. */
    font-size: inherit !important;
    line-height: inherit !important;
}

.index-start figure.highlight .gutter,
.index-steps figure.highlight .gutter {
    width: 1.6em;
    min-width: 1.6em;
    max-width: 1.6em;
    color: rgba(var(--tf-terminal-fg-rgb), 0.32);
    border-right: 1px solid rgba(var(--tf-terminal-fg-rgb), 0.12);
    padding: 0 0.45em 0 0;
    font-size: inherit;
    line-height: inherit;
}

.index-start figure.highlight .gutter pre,
.index-start figure.highlight .gutter .line,
.index-steps figure.highlight .gutter pre,
.index-steps figure.highlight .gutter .line {
    color: rgba(var(--tf-terminal-fg-rgb), 0.32) !important;
    background: transparent !important;
    /* highlight.css sets pre { overflow: auto } — scrollbar shows as a bar in the gutter */
    overflow: visible !important;
}

.index-start figure.highlight .code,
.index-steps figure.highlight .code {
    padding-left: 0.75em;
}

.index-start pre .comment,
.index-steps pre .comment {
    color: #6fd9a8 !important;
}

.index-start pre .keyword,
.index-steps pre .keyword {
    color: #b59cff !important;
}

.index-start pre .string,
.index-steps pre .string {
    /* Keep mint on dark panels — never theme accent (near-black in light) */
    color: #06f996 !important;
}

.index-start pre .number,
.index-start pre .built_in,
.index-start pre .literal,
.index-steps pre .number,
.index-steps pre .built_in,
.index-steps pre .literal {
    color: #ffb070 !important;
}

.index-start pre .function,
.index-start pre .title,
.index-start pre .python .title,
.index-steps pre .function,
.index-steps pre .title,
.index-steps pre .python .title {
    color: #8ec8ff !important;
}

.index-start pre .params,
.index-steps pre .params {
    color: #d7ebe6 !important;
}

/* —— Steps demo: Handbook nice-format sample (animated reveal) ——
   Match .index-start figure.highlight terminal chrome. */
.index-steps-result {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    /* 9 nice-format lines + padding — sized up front so reveal doesn't grow the box */
    --index-steps-term-lines: 9;
    --index-steps-term-lh: 1.45;
    min-height: calc(
        0.85rem + 1.85rem + (var(--index-steps-term-lines) * 0.88rem * var(--index-steps-term-lh))
    );
    margin: 0 0 1.75rem;
    background: var(--tf-terminal-bg) !important;
    border: 1px solid rgba(var(--tf-terminal-fg-rgb), 0.18);
    border-top: none;
    border-radius: 0;
    padding: 0.85rem 1.35rem 1.85rem 0.85rem;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 28px 56px rgba(0, 0, 0, 0.36),
        0 10px 28px rgba(0, 0, 0, 0.22);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    color: #e8f5f2;
    /* Same monospace stack/size as homepage codeblocks */
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.88rem;
}

[data-theme="light"] .index-steps-result {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 28px 56px rgba(var(--tf-fg-rgb), 0.16),
        0 10px 28px rgba(var(--tf-fg-rgb), 0.09);
}

.index-steps-result-pre {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.45;
    white-space: pre;
    min-width: max-content;
}

/* Idle prompt: green $ while no output lines are visible yet */
.index-term-prompt {
    display: none;
    margin: 0;
    padding: 0;
    color: #06f996;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    line-height: 1.45;
}

.index-term-dollar {
    color: #06f996;
    font-weight: 600;
}

.index-steps-result[data-scripted="1"]:not(:has(.index-steps-line.is-visible)) .index-term-prompt,
.index-start-step figure.highlight[data-scripted="1"]:not(:has(.code .line.is-visible)) .index-term-prompt {
    display: block;
}

/* Awaiting first line: hide wide output — kills empty-state scrollbars */
.index-steps-result[data-scripted="1"]:not(:has(.index-steps-line.is-visible)) {
    overflow: hidden;
}

.index-steps-result[data-scripted="1"]:not(:has(.index-steps-line.is-visible)) .index-steps-result-pre {
    display: none;
    min-width: 0;
}

.index-start-step figure.highlight[data-scripted="1"]:not(:has(.code .line.is-visible)) {
    overflow: hidden;
}

.index-start-step figure.highlight[data-scripted="1"]:not(:has(.code .line.is-visible)) table,
.index-start-step figure.highlight[data-scripted="1"]:not(:has(.code .line.is-visible)) .code,
.index-start-step figure.highlight[data-scripted="1"]:not(:has(.code .line.is-visible)) pre {
    overflow: hidden !important;
}

/* Visible by default (no-JS). Sequenced reveal once scripted. */
.index-steps-line {
    display: block;
}

.index-steps-result[data-scripted="1"] .index-steps-line:not(.is-visible) {
    display: none;
}

.index-steps-result[data-scripted="1"] .index-steps-line.is-visible {
    display: block;
    opacity: 0;
    transform: translateY(0.25rem);
    animation: index-term-line-in 0.16s ease forwards;
}

.index-start-step figure.highlight[data-scripted="1"] .code .line:not(.is-visible) {
    display: none !important;
}

.index-start-step figure.highlight[data-scripted="1"] .code .line.is-visible {
    display: block !important;
    opacity: 0;
    transform: translateY(0.25rem);
    animation: index-term-line-in 0.16s ease forwards;
}

.index-start-step figure.highlight[data-scripted="1"] .code .line:not(.is-visible) + br {
    display: none !important;
}

@keyframes index-term-line-in {
    to {
        opacity: 1;
        transform: none;
    }
}

.index-steps-line--cmd {
    color: rgba(232, 245, 242, 0.72);
}

.index-steps-line--dim {
    color: rgba(232, 245, 242, 0.45);
}

.index-steps-line--ok {
    color: #06f996;
}

@media (prefers-reduced-motion: reduce) {
    .index-steps-result[data-scripted="1"] .index-steps-line.is-visible,
    .index-start-step figure.highlight[data-scripted="1"] .code .line.is-visible {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

.index-steps-points {
    margin: 0.75rem -0.75rem 2rem;
    width: auto;
    max-width: none;
}

.index-steps-point {
    margin-bottom: 1.25rem;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
}

.index-steps-point h3 {
    color: var(--tf-text-strong);
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0 0 0.45rem;
}

.index-steps-point p {
    color: var(--tf-text-muted);
    font-size: 1.05rem;
    line-height: 1.45;
    margin: 0 auto;
    max-width: 18rem;
}

@media (min-width: 768px) {
    .index-steps-point {
        margin-bottom: 0;
    }
}

.index-steps-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.index-steps-cta .section-cta-ghost {
    margin-left: 0;
    max-width: 100%;
    text-align: left;
    white-space: normal;
    line-height: 1.35;
}

.index-steps-cta .section-cta-ghost .fas {
    flex: 0 0 auto;
    font-size: 0.95em;
    opacity: 0.85;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Legacy section styles (non-index pages / leftover markup) */
.section-header {
    background: transparent;
    padding: 2.5rem 1.25rem 1rem;
    color: var(--tf-text);
    text-align: center;
}

.section-header h1,
.section-header h1 strong {
    color: var(--tf-text-strong);
}

.section-header h2 {
    color: var(--tf-accent);
}

.section-bg-wrapper,
.section-bg {
    display: none !important;
}

.section-body {
    margin: auto;
    padding: 1.25rem 1rem 2.75rem;
    color: var(--tf-text);
    max-width: 1140px;
}

.section-body a:not(.section-cta) {
    color: var(--tf-accent);
}

.section-body code {
    color: var(--tf-accent);
    background: var(--tf-ghost-hover-bg);
    border: 1px solid var(--tf-card-border);
    padding: 0.1em 0.4em;
    border-radius: 0.3rem;
    font-size: 0.92em;
}

.section-body figure.highlight,
.codeblock-image figure.highlight,
.codeblock-image.dark figure.highlight {
    background: rgba(0, 4, 5, 0.92) !important;
    border: 1px solid var(--tf-card-border);
    border-radius: 0.85rem;
    padding: 1.15rem 1rem;
    overflow: hidden;
}

.section-body figure.highlight pre,
.section-body figure.highlight code,
.section-body figure.highlight .code,
.section-body figure.highlight .line,
.codeblock-image figure.highlight pre,
.codeblock-image figure.highlight code,
.codeblock-image.dark figure.highlight pre,
.codeblock-image.dark figure.highlight code {
    background: transparent !important;
    color: #e8f5f2 !important;
}

.section-body .codeblock-image > div > pre,
.section-body .codeblock-image > pre {
    background: rgba(0, 4, 5, 0.92);
    color: #e8f5f2;
    border: 1px solid var(--tf-card-border);
    border-radius: 0.85rem;
    padding: 1.15rem 1.25rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    text-align: left;
    overflow: auto;
}

.section-body .codeblock-image .keyword {
    color: #06f996;
}

.index-start .command,
.section-body .command {
    background: rgba(0, 4, 5, 0.9);
    border: 1px solid var(--tf-card-border);
    border-radius: 0.65rem;
    color: #e8f5f2;
    padding: 0 1rem;
    max-width: 100%;
    overflow-x: auto;
}

.index-start .command .prompt,
.section-body .command .prompt {
    color: #06f996;
}

.section-body img {
    border-radius: 0.75rem;
    border: 1px solid var(--tf-card-border);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}
