.theory-page--demos .main-content { width: min(100%, 1600px); }
.theory-page--demos .theory-body {
    --prose-width: calc(39 * var(--theory-text-size));
    max-width: none;
}
.theory-page--demos :is(.theory-body, .theory-body section) > :not(section, figure:has(.finance-demo)),
.theory-page--demos .theory-body figcaption {
    max-width: var(--prose-width);
    margin-inline: auto;
}
@media (960px <= width < 1200px) {
    .theory-page--demos .theory-reader--indexed {
        grid-template-columns: minmax(0, 1fr);
    }
    .theory-page--demos .theory-outline {
        grid-column: 1;
        position: static;
    }
    .theory-page--demos .theory-reader--indexed .theory-main { grid-row: 3; }
    .theory-page--demos .theory-outline-mobile { display: block; }
    .theory-page--demos .theory-outline-desktop { display: none; }
    .theory-page--demos .theory-reader--indexed ~ .theory-navigation { margin-inline-end: 0; }
}

.finance-demo {
    margin: .75rem 0 1.25rem;
    min-width: 0;
}
.finance-demo-viewport {
    overflow-x: auto;
    background: #f4f6f4;
    border: 1px solid var(--line, #cbd4ce);
    border-radius: .6rem;
}
.finance-demo iframe {
    display: block;
    width: 100%;
    height: 360px;
    border: 0;
}
.finance-demo--worksheet iframe { min-width: 580px; }
.theory-page--demos .finance-demo--worksheet iframe { min-width: 640px; }
.theory-body .finance-demo--worksheet {
    width: min(100%, calc(var(--sheet-width) * var(--sheet-zoom, 1) + 2px));
    margin-inline: auto;
}
.theory-body .finance-demo--worksheet iframe { width: var(--sheet-width, 100%); }
.finance-demo > a {
    display: inline-block;
    margin-top: .35rem;
    font-size: .88rem;
}
.finance-content figure { margin-inline: 0; }
.finance-content figure figcaption { margin-bottom: .35rem; }
.finance-content :is(.callout, .note) {
    padding: .85rem 1rem;
    border-inline-start: .2rem solid var(--green, #17683f);
    background: var(--soft, #eef7ef);
    border-radius: .2rem;
}
.finance-content .download {
    display: inline-block;
    padding: .45rem .75rem;
    border: 1px solid currentColor;
    border-radius: .45rem;
    font-weight: 700;
}
.finance-table { overflow-x: auto; }
.worksheet-title { margin: 0; font-size: 1.15rem; }
.finance-contents {
    margin-block: 1rem 1.5rem;
    padding: .75rem 1rem;
    border: 1px solid var(--line, #cbd4ce);
    border-radius: .6rem;
}
.finance-contents h2 { margin: 0 0 .4em; font-size: 1.1em; }
.finance-contents ol { margin-bottom: 0; }
.worksheet-answer {
    margin-block: 1rem;
    padding: .9rem 1rem;
    border: 1px solid var(--line, #cbd4ce);
    border-radius: .65rem;
}
.worksheet-answer :is(label, fieldset) { display: block; }
.worksheet-answer fieldset { min-width: 0; }
.worksheet-answer legend { font-size: 1rem; }
.worksheet-answer label input[type="radio"] { margin-inline-end: .4rem; }
.worksheet-answer :is(input[type="text"], select) {
    display: block;
    width: min(100%, 28rem);
    min-height: 2.5rem;
    margin: .3rem 0 .65rem;
    padding: .3rem .55rem;
    border: 1px solid var(--line, #cbd4ce);
    border-radius: .35rem;
    color: inherit;
    background: var(--surface, #fff);
    font: inherit;
}
.worksheet-answer button[data-quiz-check] { margin-block-start: .4rem; }
.worksheet-answer button[aria-disabled="true"] { opacity: .7; cursor: wait; }
.worksheet-feedback { margin: .5rem 0 0; }
.worksheet-feedback:empty { display: none; }
.worksheet-feedback[data-correct="true"] { color: var(--green, #17683f); }
.worksheet-feedback[data-correct="false"] { color: #a92e2b; }
.worksheet-answer .order-list li { margin-block: .45rem; }
.worksheet-order-actions {
    display: inline-flex;
    gap: .3rem;
    margin-inline-start: .6rem;
}
.worksheet-order-actions .button { min-width: 2.3rem; padding: .25rem .45rem; }
.worksheet-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem 1rem;
    margin-block: 1rem;
    font-weight: 600;
}
.worksheet-status progress { width: min(100%, 14rem); accent-color: var(--green, #17683f); }
.finance-content details {
    margin-block: .55rem;
    padding: .45rem .75rem;
    border: 1px solid var(--line, #cbd4ce);
    border-radius: .45rem;
}
.finance-content summary { font-weight: 600; cursor: pointer; }
.finance-content section + section { margin-top: 1.8rem; }
.finance-content section > :last-child { margin-bottom: 0; }

.course-activity { max-width: 72rem; margin-inline: auto; min-width: 0; }
.course-activity h1 { font-size: clamp(1.4rem, 3vw, 2rem); }
.theory-page--demos .theory-body section:has(figure .finance-demo) { max-width: none; }
.theory-body figure:has(iframe[data-course-frame]) { width: 100%; max-width: none; margin-inline: 0; }
.finance-demo .course-demo-zoom {
    margin-inline-start: .75rem;
    padding: .2rem .55rem;
    border: 1px solid currentColor;
    border-radius: .35rem;
    color: inherit;
    background: transparent;
    font-size: .88rem;
}
