/* Light reading layout for Tutorial & Strategy */

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

.content-page {
    --paper: #fbf8f4;
    --paper-elevated: #ffffff;
    --paper-muted: #f3ede4;
    --ink: #1c2430;
    --ink-secondary: #4a5568;
    --ink-muted: #6b7280;
    --line: rgba(28, 36, 48, 0.08);
    --line-strong: rgba(28, 36, 48, 0.14);
    --shadow-sm: 0 1px 3px rgba(28, 36, 48, 0.06), 0 1px 2px rgba(28, 36, 48, 0.04);
    --shadow-md: 0 4px 20px rgba(28, 36, 48, 0.07), 0 2px 6px rgba(28, 36, 48, 0.04);
    --shadow-lg: 0 12px 40px rgba(28, 36, 48, 0.08), 0 4px 12px rgba(28, 36, 48, 0.04);
    --red-soft: #fef2f0;
    --red-accent: #d44a3a;
    --blue-soft: #eef4fd;
    --blue-accent: #3d6fc4;
    --gold-soft: #fdf8ec;
    --gold-accent: #b8860b;
    --radius-content: 14px;
    --radius-pill: 999px;
    --content-max: 1080px;
    --read-max: 42rem;

    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
}

.content-page .ambient {
    display: none;
}

.content-page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 10% -10%, rgba(212, 74, 58, 0.06), transparent 55%),
        radial-gradient(ellipse 70% 45% at 95% 5%, rgba(61, 111, 196, 0.06), transparent 50%),
        linear-gradient(180deg, #fdfbf8 0%, var(--paper) 40%, #f7f2ea 100%);
}

/* Header — shared across play, tutorial, and strategy */
.content-header {
    --header-paper: #fbf8f4;
    --header-paper-muted: #f3ede4;
    --header-paper-elevated: #ffffff;
    --header-ink: #1c2430;
    --header-ink-muted: #6b7280;
    --header-line: rgba(28, 36, 48, 0.08);

    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(251, 248, 244, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--header-line);
}

.content-header__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.content-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.content-header__icon {
    position: relative;
    width: 36px;
    height: 36px;
}

.content-header__icon span {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.content-header__icon span:first-child {
    background: linear-gradient(145deg, #ff7a6a, #d44a3a);
    top: 2px;
    left: 2px;
}

.content-header__icon span:last-child {
    background: linear-gradient(145deg, #6b9fff, #3d6fc4);
    bottom: 2px;
    right: 2px;
}

.content-header__name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--header-ink);
}

.content-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--header-paper-muted);
    border-radius: 999px;
    border: 1px solid var(--header-line);
}

.content-nav a {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--header-ink-muted);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.content-nav a:hover {
    color: var(--header-ink);
    background: var(--header-paper-elevated);
}

.content-nav a[aria-current="page"] {
    background: var(--header-paper-elevated);
    color: var(--header-ink);
    box-shadow: 0 1px 3px rgba(28, 36, 48, 0.06);
}

/* Main shell */
.content-main {
    position: relative;
    z-index: 1;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 24px 64px;
}

/* Hero */
.content-hero {
    padding: 40px 0 32px;
    max-width: var(--read-max);
}

.content-hero__eyebrow {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: var(--paper-elevated);
    border: 1px solid var(--line);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-muted);
    box-shadow: var(--shadow-sm);
}

.content-hero__eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red-accent), var(--blue-accent));
}

.content-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 16px 0 14px;
    color: var(--ink);
}

.content-hero p {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--ink-secondary);
}

/* Info banner */
.info-banner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    margin-bottom: 32px;
    border-radius: var(--radius-content);
    background: var(--blue-soft);
    border: 1px solid rgba(61, 111, 196, 0.15);
    font-size: 0.925rem;
    line-height: 1.6;
    color: var(--ink-secondary);
}

.info-banner p {
    margin: 0;
}

.info-banner__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    border: 2px solid var(--blue-accent);
    border-radius: 50%;
    color: var(--blue-accent);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    user-select: none;
}

.info-banner a {
    color: var(--blue-accent);
    font-weight: 600;
    text-decoration: none;
}

.info-banner a:hover {
    text-decoration: underline;
}

/* Lesson jump nav */
.lesson-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.lesson-jump a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    background: var(--paper-elevated);
    border: 1px solid var(--line);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink-secondary);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.lesson-jump a:hover {
    border-color: var(--line-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.lesson-jump__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--paper-muted);
    font-size: 0.7rem;
    color: var(--ink-muted);
}

/* Lessons */
.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.lesson {
    background: var(--paper-elevated);
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    scroll-margin-top: 88px;
}

.lesson__header {
    padding: 28px 32px 0;
    border-bottom: none;
}

.lesson__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.lesson__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: var(--radius-pill);
    background: var(--paper-muted);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ink-muted);
}

.lesson__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
}

.lesson__title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: var(--ink);
}

.lesson__desc {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink-secondary);
    max-width: 52ch;
}

.lesson__body {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 0;
    padding: 24px 32px 32px;
    align-items: stretch;
}

.lesson__demo {
    padding-right: 28px;
}

.lesson__board-wrap {
    border-radius: var(--radius-content);
    padding: 14px;
    background: linear-gradient(165deg, #c9a87c 0%, #a8845c 45%, #8f7048 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 4px 16px rgba(80, 55, 30, 0.2);
    overflow: auto;
}

.lesson__board-wrap canvas {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    cursor: default;
}

.lesson__caption {
    margin: 16px 0 0;
    padding: 14px 16px;
    border-radius: var(--radius-content);
    background: var(--paper-muted);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ink);
    text-align: left;
    box-sizing: border-box;
    /* Reserve two lines so step changes don't shift the controls below */
    min-height: calc(2 * 1.55em + 28px);
    display: grid;
    align-content: center;
}

.lesson__controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    min-height: 36px;
}

.lesson__step-dots {
    display: flex;
    gap: 6px;
    margin-right: auto;
}

.lesson__step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line-strong);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.lesson__step-dot.is-active {
    background: var(--blue-accent);
    transform: scale(1.15);
}

.lesson__step-indicator {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink-muted);
    flex-shrink: 0;
    min-width: 5.5rem;
    text-align: center;
    white-space: nowrap;
}

.content-page .btn {
    background: var(--paper-elevated);
    border: 1px solid var(--line-strong);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.content-page .btn:hover:not(:disabled) {
    background: var(--paper-muted);
    border-color: rgba(28, 36, 48, 0.2);
    transform: translateY(-1px);
}

.content-page .btn:disabled {
    opacity: 0.35;
}

.content-page .btn--primary {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.content-page .btn--primary:hover:not(:disabled) {
    background: #2a3444;
    box-shadow: var(--shadow-lg);
}

.content-page .btn--ghost {
    background: transparent;
    box-shadow: none;
}

.content-page .btn--ghost:hover:not(:disabled) {
    background: var(--paper-muted);
}

.content-page .btn--sm {
    padding: 9px 16px;
    font-size: 0.8125rem;
}

.lesson__aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    border-radius: var(--radius-content);
    background: var(--gold-soft);
    border: 1px solid rgba(184, 134, 11, 0.15);
    height: fit-content;
}

.lesson__takeaway-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold-accent);
    margin-bottom: 4px;
}

.lesson__takeaway-label::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-accent);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.2);
}

.lesson__takeaway p {
    margin: 0;
    font-size: 0.975rem;
    line-height: 1.65;
    color: var(--ink);
}

/* CTA band */
.content-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 48px;
    padding: 28px 32px;
    border-radius: 20px;
    background: var(--paper-elevated);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.content-cta__text {
    flex: 1;
    min-width: 200px;
}

.content-cta__text h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin: 0 0 6px;
    color: var(--ink);
}

.content-cta__text p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--ink-secondary);
}

.content-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.content-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--ink-muted);
}

.content-footer p {
    margin: 0;
}

/* Strategy layout */
.content-main--strategy {
    max-width: 1180px;
}

.content-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.strategy-toc {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 16px 14px;
    border-radius: var(--radius-content);
    background: var(--paper-elevated);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.strategy-toc__title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink);
    margin: 0 0 12px;
    padding: 0 8px 10px;
    border-bottom: 2px solid var(--line);
}

.strategy-toc__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-group {
    margin-bottom: 4px;
    border-radius: 8px;
}

.toc-group__title {
    margin: 6px 0 0;
    padding: 8px 10px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ink);
    background: linear-gradient(90deg, var(--paper-muted), transparent);
    border-radius: 6px;
    border-left: 3px solid var(--blue-accent);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.toc-group__title::-webkit-details-marker {
    display: none;
}

.toc-group__title::after {
    content: '';
    float: right;
    width: 7px;
    height: 7px;
    margin-top: 2px;
    border-right: 2px solid var(--ink-muted);
    border-bottom: 2px solid var(--ink-muted);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}

.toc-group[open] > .toc-group__title::after {
    transform: rotate(-135deg);
    margin-top: 5px;
}

.toc-group:first-child .toc-group__title {
    margin-top: 0;
}

.toc-group__list {
    margin: 0;
    padding: 0 0 4px;
    list-style: none;
}

.toc-group__list li {
    margin: 0;
}

.toc-group__list a {
    display: block;
    padding: 6px 10px 6px 14px;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--ink-secondary);
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
    border-left: 2px solid transparent;
}

.toc-group__list a:hover {
    background: var(--paper-muted);
    color: var(--ink);
}

.toc-group__list a.is-active {
    background: var(--blue-soft);
    color: var(--blue-accent);
    border-left-color: var(--blue-accent);
    font-weight: 600;
}

/* Legacy flat toc (unused) */
.strategy-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.strategy-toc .toc-part {
    display: none;
}

/* Prose */
.prose-wrap {
    background: var(--paper-elevated);
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 40px 44px;
}

.prose {
    max-width: var(--read-max);
    color: var(--ink-secondary);
    font-size: 1.025rem;
    line-height: 1.75;
}

.prose h2 {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 52px 0 16px;
    padding-top: 12px;
    scroll-margin-top: 96px;
    position: relative;
}

.prose h2:first-child {
    margin-top: 0;
    padding-top: 0;
}

.prose h2::before {
    content: '';
    display: block;
    width: 32px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--red-accent), var(--blue-accent));
    margin-bottom: 12px;
}

.prose h2.prose-section {
    margin-top: 56px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.prose h2.prose-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.prose h2.prose-section::before {
    display: block;
}

.section-divider {
    border: none;
    border-top: 2px dashed var(--line-strong);
    margin: 40px 0;
}

.prose-lead {
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--ink-secondary);
    margin-bottom: 20px;
}

.prose code {
    font-size: 0.9em;
    padding: 0.12em 0.35em;
    border-radius: 4px;
    background: var(--paper-muted);
    color: var(--ink);
}

.prose h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ink);
    margin: 32px 0 10px;
}

.prose h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink-muted);
    margin: 24px 0 8px;
    letter-spacing: 0.01em;
}

.prose p {
    margin: 0 0 16px;
}

.prose ul,
.prose ol {
    margin: 0 0 18px;
    padding-left: 1.35rem;
}

.prose li {
    margin-bottom: 8px;
}

.prose li::marker {
    color: var(--ink-muted);
}

.prose strong {
    color: var(--ink);
    font-weight: 600;
}

.prose a {
    color: var(--blue-accent);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(61, 111, 196, 0.35);
    text-underline-offset: 2px;
}

.prose a:hover {
    text-decoration-color: var(--blue-accent);
}

.prose-illustration,
.prose-diagram-sequence {
    display: block;
    margin: 1rem auto 1.25rem;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.prose-illustration img,
.prose-diagram-sequence__item img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 420px);
    max-height: 260px;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 8px;
}

.prose-board-wrap {
    display: inline-block;
    padding: 14px;
    border-radius: var(--radius-content);
    background: linear-gradient(165deg, #c9a87c 0%, #a8845c 45%, #8f7048 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 4px 16px rgba(80, 55, 30, 0.2);
    line-height: 0;
}

.prose-board-wrap img {
    box-shadow: none;
}

.prose-illustration--wide img {
    max-width: min(100%, 560px);
    max-height: 200px;
}

.prose-illustration--compact img {
    max-width: min(100%, 360px);
    max-height: 300px;
}

.prose-illustration figcaption,
.prose-diagram-sequence__caption {
    margin: 0.5rem 0 0;
    padding: 0;
    border: none;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--ink-muted);
    font-style: italic;
    text-align: center;
}

.prose-illustration figcaption a,
.prose-diagram-sequence__caption a {
    font-weight: 500;
    font-style: normal;
}

/* Multi-panel rows — separate PNGs, laid out side by side (not stitched) */
.prose-diagram-sequence__track {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 0;
    background: transparent;
    overflow: visible;
}

/* Two-panel comparisons — keep adjacent, same scale as single figures */
.prose-diagram-sequence--pair .prose-diagram-sequence__track {
    flex-wrap: nowrap;
    gap: 16px;
}

.prose-diagram-sequence--pair .prose-diagram-sequence__item img {
    max-width: min(calc(50% - 8px), 360px);
    max-height: 280px;
}

/* Three or more steps — slightly smaller so a row still fits */
.prose-diagram-sequence--steps .prose-diagram-sequence__track {
    gap: 18px;
}

.prose-diagram-sequence--steps .prose-diagram-sequence__item img {
    max-width: min(100%, 240px);
    max-height: 240px;
}

.prose-diagram-sequence__item {
    position: relative;
    flex: 0 1 auto;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.prose-diagram-sequence__step {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 1;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 4px;
    border-radius: 999px;
    background: rgba(42, 33, 24, 0.75);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.125rem;
    text-align: center;
}

@media (max-width: 640px) {
    .prose-illustration img {
        max-height: 220px;
    }

    .prose-diagram-sequence--pair .prose-diagram-sequence__track {
        flex-wrap: wrap;
    }

    .prose-diagram-sequence--pair .prose-diagram-sequence__item img {
        max-width: min(100%, 320px);
        max-height: 220px;
    }

    .prose-diagram-sequence--steps .prose-diagram-sequence__item img {
        max-width: min(100%, 200px);
        max-height: 200px;
    }
}

/* Legacy class names — keep minimal if tutorial still uses prose-figure */
.prose-figure {
    margin: 1rem auto 1.25rem;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.prose-figure img {
    border-radius: 10px;
    max-width: min(100%, 420px);
    max-height: 260px;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 1px 3px rgba(42, 33, 24, 0.1);
}

.prose-figure figcaption {
    margin-top: 0.5rem;
    padding: 0;
    border: none;
    font-size: 0.8125rem;
    color: var(--ink-muted);
    font-style: italic;
    text-align: center;
}

.content-page .red-text {
    color: var(--red-accent);
}

.content-page .blue-text {
    color: var(--blue-accent);
}

.callout {
    padding: 18px 20px;
    border-radius: var(--radius-content);
    background: var(--red-soft);
    border: 1px solid rgba(212, 74, 58, 0.15);
    margin: 24px 0;
    font-size: 0.975rem;
    line-height: 1.65;
    color: var(--ink-secondary);
}

.callout strong {
    color: var(--red-accent);
}

.callout--blue {
    background: var(--blue-soft);
    border-color: rgba(61, 111, 196, 0.15);
}

.callout--blue strong {
    color: var(--blue-accent);
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 12px;
    margin: 20px 0 24px;
}

.setup-card {
    padding: 16px;
    border-radius: var(--radius-content);
    background: var(--paper-muted);
    border: 1px solid var(--line);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.setup-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.setup-card:nth-child(1) { border-top: 3px solid var(--red-accent); }
.setup-card:nth-child(2) { border-top: 3px solid #c45c3a; }
.setup-card:nth-child(3) { border-top: 3px solid var(--gold-accent); }
.setup-card:nth-child(4) { border-top: 3px solid var(--blue-accent); }
.setup-card:nth-child(5) { border-top: 3px solid #5a7fc4; }

.setup-card h4 {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--ink);
}

.setup-card p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--ink-muted);
}

.prose .content-cta {
    margin-top: 40px;
    margin-bottom: 0;
    padding: 24px 28px;
}

/* Responsive */
@media (max-width: 860px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .strategy-toc {
        position: static;
        max-height: none;
    }

    .strategy-toc__nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .toc-group {
        flex: 1 1 100%;
        margin-bottom: 8px;
    }

    .prose-wrap {
        padding: 24px 18px;
    }

    .toc-group__list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .toc-group__list a {
        padding: 6px 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius-pill);
        border-left: 1px solid var(--line);
        background: var(--paper-muted);
        font-size: 0.75rem;
    }

    .lesson__body {
        grid-template-columns: 1fr;
        padding: 20px 20px 28px;
    }

    .lesson__demo {
        padding-right: 0;
    }

    .lesson__header {
        padding: 24px 20px 0;
    }

    .prose-wrap {
        padding: 28px 24px;
    }
}

@media (max-width: 560px) {
    .content-header__inner {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
    }

    .content-nav {
        justify-content: center;
    }

    .content-main {
        padding: 0 16px 48px;
    }

    .content-hero {
        padding: 28px 0 24px;
    }

    .lesson__caption {
        min-height: calc(3 * 1.55em + 28px);
    }

    .lesson-jump a {
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    .lesson-jump a span:not(.lesson-jump__num) {
        display: none;
    }

    .content-cta {
        flex-direction: column;
        align-items: stretch;
        padding: 22px 20px;
    }

    .content-cta__actions {
        flex-direction: column;
    }

    .content-cta__actions .btn {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lesson-jump a:hover,
    .setup-card:hover,
    .content-page .btn:hover:not(:disabled) {
        transform: none;
    }
}
