body[data-grammar-topic="future-in-the-past-simple"] .gto-construction-grid,
body[data-grammar-topic="future-in-the-past-simple"] .gto-two-cards,
body[data-grammar-topic="future-in-the-past-simple"] .gto-story-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px; }
body[data-grammar-topic="future-in-the-past-simple"] .formula-card { min-width:0; }
body[data-grammar-topic="future-in-the-past-simple"] .formula { display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%;max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere; }
body[data-grammar-topic="future-in-the-past-simple"] .formula>span { max-width:100%;min-width:0;white-space:normal; }
body[data-grammar-topic="future-in-the-past-simple"] .gto-dialogue { white-space:pre-line;line-height:1.65; }
body[data-grammar-topic="future-in-the-past-simple"] .gto-story-grid .formula-card { border-top:4px solid #459b88; }
@media(max-width:720px) { body[data-grammar-topic="future-in-the-past-simple"] .gto-construction-grid,body[data-grammar-topic="future-in-the-past-simple"] .gto-two-cards,body[data-grammar-topic="future-in-the-past-simple"] .gto-story-grid { grid-template-columns:1fr; } }
.exercise-page[data-exercise-page="future-in-the-past-simple"] .edu-context > p { background:#fff9f7;color:#20343a; }
html[data-theme="dark"] .exercise-page[data-exercise-page="future-in-the-past-simple"] .edu-context > p { background:#243e4b;color:#edf3f5;border-color:#81b7b1; }

[data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] { --plum:#246d63; }
[data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-bank button.is-used { background:#e0eee8; border-color:#8eb6aa; color:#24574e; }
[data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-drop { border-color:#82b6a9; background:#eaf6f1; color:#24574e; }
[data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-card.is-selected { border-color:#3d9784; box-shadow:0 0 0 3px #3d978426; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-bank { background:#223f4d; border-color:#65808c; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-bank button { background:#304d5b; color:#edf3f5; border-color:#7696a3; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-bank button.is-picked { background:#28786b; color:#fff; border-color:#a5e5d0; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-card { background:#263f4d; color:#edf3f5; border-color:#65808c; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-card.is-correct { background:#254b45; border-color:#7cc6b3; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-card.is-wrong { background:#523a3b; border-color:#e7a095; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-card__sentence { color:#edf3f5; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-card__number { background:#355563; color:#edf3f5; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-card__status { color:#a5e5d0; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-card.is-wrong .exercise-match-card__status { color:#ffc0b4; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-drop { background:#1b303b; color:#edf3f5; border-color:#82b6a9; opacity:1; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-drop.is-filled { background:#235e57; color:#fff; border-color:#a5e5d0; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-result.is-correct { background:#235e57; color:#edf3f5; border-color:#82b6a9; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-result.is-wrong { background:#523a3b; color:#edf3f5; border-color:#e7a095; }
html[data-theme="dark"] [data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-result :is(p,strong) { color:inherit; }

/* Dialogue cards grow when their reason is opened; they must not overlap. */
.exercise-page[data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-contexts { grid-auto-rows:max-content; align-content:start; }
.exercise-page[data-exercise-page="future-in-the-past-simple"] [data-exercise-screen="matching"] .exercise-match-card { min-height:max-content; }
.exercise-page[data-exercise-page="future-in-the-past-simple"] { --plum:#246d63; }
html[data-theme="dark"] .exercise-page[data-exercise-page="future-in-the-past-simple"] { --plum:#8ee0ca; }

/* Optional Polish meaning must follow the exercise theme too. */
html[data-theme="dark"] .exercise-page[data-exercise-page="future-in-the-past-simple"] .edu-context[open] > p {
 background:#243e4b; color:#edf5f8; border-color:#88cfbc;
}


.exercise-page[data-exercise-page="future-in-the-past-simple"] .exercise-gap { width:min(380px,100%);max-width:100%;font-size:clamp(1rem,2.4vw,1.4rem); }
.exercise-page[data-exercise-page="future-in-the-past-simple"] .exercise-gap-wrap { max-width:calc(100% - 20px); }

body[data-grammar-topic="future-in-the-past-simple"] .formula-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
body[data-grammar-topic="future-in-the-past-simple"] .fc-dialogue { white-space:pre-line;line-height:1.6; }
@media(max-width:720px){body[data-grammar-topic="future-in-the-past-simple"] .formula-grid {grid-template-columns:1fr;} }
/* One construction block; simple form groups, without person/number tables. */
[data-grammar-topic="future-in-the-past-simple"] .fitp-constructions { container-type:inline-size; container-name:fitp-constructions; }
.fitp-construction-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.fitp-construction-card.formula-card { display:flex; flex-direction:column; gap:12px; min-width:0; padding:20px; scroll-margin-top:112px; }
.fitp-construction-card .formula { display:flex; flex-wrap:wrap; align-content:center; align-items:center; gap:8px; min-height:106px; margin:0; }
.fitp-construction-card :is(.fitp-rule,.fitp-why) { margin:0; color:var(--muted); line-height:1.55; font-size:.94rem; }
.fitp-construction-card .example-stack { gap:8px; margin:0; }
@container fitp-constructions (max-width:700px) { .fitp-construction-grid { grid-template-columns:minmax(0,1fr); } }
@media (max-width:760px) {
 .fitp-construction-grid { grid-template-columns:minmax(0,1fr); }
 .fitp-construction-card.formula-card { padding:16px; }
}

.fitp-more { margin:20px 0; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.fitp-more summary { cursor:pointer; font-weight:700; }

/* Narrative frames retain their own line, without a speech-transform layout. */
[data-exercise-page="future-in-the-past-simple"] .exercise-sentence__line {display:block;line-height:1.65;}
[data-exercise-page="future-in-the-past-simple"] .exercise-sentence__line > span {white-space:pre-line;}
