/* Local layout for the programmatic teaching examples. Shared controls remain shared. */
body { margin: 0; background: #f3f6fa; color: #1e293b; font-family: Inter, system-ui, sans-serif; line-height: 1.65; }
.app-main { width: min(1320px, calc(100% - 48px)); max-width: 1320px; margin: 28px auto 48px; padding: 0; }
.hero-header { text-align: left; padding: 30px 36px; background: #123b51; color: #fff; border-radius: 16px; }
.hero-header .back-link { color: #d6eff7; display: inline-block; margin-bottom: 22px; }
.hero-header h1 { font-size: clamp(1.8rem, 3.3vw, 2.65rem); line-height: 1.2; margin: 8px 0 18px; color: inherit; }
.hero-header > p { max-width: 870px; font-size: 1.12rem; color: #ecf5fa; }
.eyebrow { display: block; text-transform: uppercase; letter-spacing: .09em; font-size: .73rem; font-weight: 750; color: #426575; margin: 0 0 6px; }
.hero-header .eyebrow { color: #b5e5e0; }
.scope-note { padding: 17px 20px; background: #eaf2f7; border-left: 4px solid #347890; border-radius: 5px; margin: 20px 0; font-size: .95rem; }
.hero-header .scope-note { background: #224e63; border-color: #82d9ce; color: #f7fbfc; margin-bottom: 0; max-width: 1020px; }
.professor-mode-banner { margin: 18px 0; }
.learning-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; margin-bottom: 16px; }
.learning-nav [role="tablist"] { display: flex; gap: 8px; flex-wrap: wrap; }
.learning-nav [role="tab"] { cursor: pointer; padding: 13px 16px; min-height: 46px; color: #334155; border: 1px solid #c5d2de; border-radius: 8px; background: white; font: inherit; font-size: .94rem; font-weight: 650; }
.learning-nav [aria-selected="true"] { background: #123b51; border-color: #123b51; color: white; box-shadow: inset 0 -3px #82d9ce; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid #a04b00; outline-offset: 4px; }
[hidden] { display: none !important; }
.section-intro { max-width: 940px; margin-bottom: 25px; }
h2 { font-size: 1.65rem; line-height: 1.3; color: #163b50; margin: 7px 0 13px; }
h3 { line-height: 1.4; font-size: 1.16rem; color: #173b4e; }
p { margin: 10px 0 17px; }
.story-layout { display: grid; grid-template-columns: minmax(310px, .9fr) minmax(0, 1.25fr); align-items: start; gap: 26px; }
.publisher-stage { min-width: 0; background: #e3eaf0; border: 1px solid #c4d2de; border-radius: 12px; padding: 16px; }
.stage-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .66rem; font-weight: 750; letter-spacing: .05em; color: #475c6c; margin-bottom: 12px; }
.stage-label span { font-weight: 500; letter-spacing: 0; text-transform: none; }
.newspaper { background: #fffcf5; border: 1px solid #d8d3c9; padding: 22px 20px; color: #3d3a35; box-shadow: 0 3px 10px #1e293b08; }
.masthead { font: 700 clamp(1.35rem, 2.3vw, 2rem) Georgia, serif; letter-spacing: -.05em; padding-bottom: 10px; border-bottom: 3px double #6d6a63; text-align: center; }
.paper-section { font-size: .71rem; letter-spacing: .12em; text-transform: uppercase; text-align: center; padding: 8px 0 15px; }
.newspaper h3 { font: 700 1.85rem/1.13 Georgia, serif; color: #312e29; margin: 24px 0 12px; }
.article-deck { font: italic 1rem Georgia, serif; color: #6b6254; }
.article-body { font: .88rem/1.8 Georgia, serif; display: flex; gap: 12px; align-items: start; }
.article-body > div:first-child { flex: 1; min-width: 0; }
.article-body .ad-space { min-width: 0; }
.article-body > .ad-space { flex: .8; }
.ad-space { background: #edf4f3; border: 1px dashed #70948d; padding: 12px; font-family: Inter, system-ui, sans-serif; font-size: .82rem; }
.ad-location { display: block; text-transform: uppercase; font-size: .63rem; color: #405a55; letter-spacing: .06em; margin-bottom: 12px; }
.creative { min-height: 55px; color: #234d46; }
.creative strong { display: block; font-size: .85rem; }
.creative p { font-size: 1rem; line-height: 1.4; margin: 10px 0; }
.creative small { font-size: .69rem; display: block; }
.caption, .input-help { font-size: .84rem; line-height: 1.6; color: #526374; }
.caption { margin: 13px 0 0; }
.lesson-card { background: #fff; border: 1px solid #d5dee8; border-radius: 12px; padding: 27px; min-width: 0; }
.lesson-card > h3:first-child { margin-top: 0; }
.stepper { display: flex; list-style: none; padding: 0 0 20px; margin: 0 0 20px; border-bottom: 1px solid #dce5ec; gap: 6px; }
.stepper li { flex: 1; }
.stepper button { width: 100%; padding: 9px 2px; border: 1px solid #cbd5df; background: #f7fafc; color: #3b5161; border-radius: 7px; font-weight: 750; }
.stepper span { display: block; font-size: .67rem; font-weight: 500; }
.stepper [aria-current="step"] { background: #123b51; color: #fff; border-color: #123b51; }
.question-box { padding: 18px 20px; background: #eaf6f2; border-left: 4px solid #317a68; border-radius: 5px; margin: 24px 0; color: #214f42; }
.question-box p:last-child { margin-bottom: 0; }
.receipt { padding: 16px; border: 1px solid #b8cdc8; border-radius: 6px; background: #f7fbfa; font-size: .9rem; margin: 17px 0; overflow-wrap: anywhere; }
.input-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 20px 0 12px; }
label { display: block; font-weight: 650; font-size: .9rem; color: #29495c; }
input[type="number"], select { box-sizing: border-box; display: block; width: 100%; padding: 10px 12px; min-height: 44px; border: 1px solid #b6c5d3; border-radius: 6px; background: #fff; color: #1e293b; margin-top: 6px; }
input[aria-invalid="true"] { border: 2px solid #b42318; background: #fff4f1; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: #215b68; flex-shrink: 0; }
.check-label { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.table-scroll { overflow-x: auto; margin: 20px 0; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; text-align: left; }
caption { text-align: left; font-weight: 650; color: #334f61; padding-bottom: 10px; }
th, td { padding: 13px 12px; border-bottom: 1px solid #dce5ed; vertical-align: top; line-height: 1.55; }
thead th { color: #325166; background: #edf3f8; font-size: .79rem; }
tbody th { font-weight: 550; }
.winner-row { background: #ebf7ef; }
.winner-row td:last-child { font-weight: 700; }
.assumption-table th { width: 44%; }
.assumption-table input { min-width: 95px; margin-top: 0; }
.worked-result { font-weight: 550; border-left: 3px solid #3a7f93; padding-left: 15px; color: #23495a; }
.step-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #e0e7ee; }
.btn { font-size: .88rem; font-weight: 650; border-radius: 7px; min-height: 44px; padding: 10px 15px; border: 1px solid #b8c8d5; }
.btn-outline { background: #fff; color: #274c62; }
.btn-primary { background: #215b68; color: #fff; border-color: #215b68; }
.comparison-brief { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.comparison-brief article { background: #fff; border: 1px solid #cedae5; border-top: 4px solid #407a8a; border-radius: 9px; padding: 20px 24px; }
.comparison-brief article:last-child { border-top-color: #8b6541; }
.comparison-brief h3 { margin: 0 0 12px; }
.comparison-brief p { margin-bottom: 0; }
.experiment-control { padding: 22px; background: #f1f6fa; border: 1px solid #d5e1eb; border-radius: 8px; margin: 24px 0; }
input[type="range"] { display: block; width: 100%; margin: 20px 0; min-height: 30px; accent-color: #245f70; }
output { display: block; font-size: 1.12rem; font-weight: 750; color: #174c60; }
.evidence-box { padding: 0 20px; border-left: 4px solid #7c6c44; margin: 25px 0; }
.evidence-box h3 { font-size: 1rem; }
details { margin: 20px 0; }
summary { cursor: pointer; font-weight: 650; color: #234f65; padding: 10px 0; }
.model-note { background: #fff; border: 1px solid #d4dfe8; border-radius: 9px; padding: 8px 24px; margin-top: 28px; }
.sources { font-size: .9rem; }
.sources li { margin-bottom: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1000px) {
    .story-layout { grid-template-columns: minmax(250px, .75fr) minmax(0, 1fr); gap: 16px; }
    .lesson-card { padding: 20px; }
    .learning-nav { align-items: start; }
    .learning-nav > .btn { flex-shrink: 0; }
}
@media (max-width: 760px) {
    .app-main { width: calc(100% - 28px); margin-top: 14px; }
    .hero-header { padding: 23px; }
    .story-layout { grid-template-columns: 1fr; }
    .publisher-stage { order: 2; }
    .learning-nav { flex-direction: column; }
    .learning-nav [role="tablist"] { display: grid; grid-template-columns: 1fr; width: 100%; }
    .learning-nav [role="tab"] { text-align: left; }
    .input-pair, .comparison-brief { grid-template-columns: 1fr; }
    .assumption-table th { min-width: 140px; }
    th, td { padding: 10px 8px; }
    .stepper span { font-size: .6rem; }
    .step-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
