/* Module 5: explicit input/helper roles and signed amplitude contributions. */
.reveal .m5-slide h2 { font-size:43px; margin-bottom:20px; }
.reveal .m5-slide .eyebrow { margin-bottom:17px; }
.reveal .m5-slide p { font-size:27px; margin-bottom:17px; }
.reveal .m5-slide .caption { font-size:21px; margin-top:12px; color:var(--muted); }
.reveal .m5-slide .takeaway { font-size:26px; margin-top:19px; padding-top:14px; }
.reveal .m5-slide .label { font-size:16px; }
.reveal .m5-slide .math { font-size:32px; }
.reveal .m5-slide .small-math { font-size:28px; }
.reveal .m5-slide .katex-display { margin:15px 0; }
.reveal .m5-slide table { margin-top:16px; table-layout:fixed; }
.reveal .m5-slide table th { font-size:20px; padding:10px 15px; }
.reveal .m5-slide table td { font-size:28px; padding:11px 15px; }
.reveal .m5-slide table tbody th { font-size:27px; background:transparent; font-weight:500; color:var(--ink); }
.reveal .m5-slide .panel { padding:20px 24px; }
.reveal .m5-slide .columns { gap:26px; margin-top:18px; align-items:start; }
.reveal .m5-cover h1 { font-size:56px; line-height:1.1; margin:12px 0 22px; max-width:1110px; }
.reveal .m5-cover .m5-definitions { display:flex; gap:30px; margin:18px 0; }
.reveal .m5-cover .m5-definitions p { flex:1; font-size:24px; margin:0; }
.reveal .m5-cover .question { font-size:28px; margin-top:18px; }
.reveal .m5-table-centred td,.reveal .m5-table-centred th { text-align:center; }
.reveal .m5-table-centred tr > :first-child { text-align:left; width:140px; }
.reveal .m5-promise-table tr > :last-child { border-left:2px solid var(--line); }
.reveal .m5-claims { display:grid; gap:20px; margin-top:25px; }
.reveal .m5-claims > div { display:flex; align-items:baseline; gap:22px; border-top:1px solid var(--line); padding:22px 0; }
.reveal .m5-claims span { color:var(--accent); font-size:23px; font-weight:700; }
.reveal .m5-claims p { font-size:31px; line-height:1.35; margin:0; }
.reveal .m5-claims-compact { grid-template-columns:repeat(3,1fr); gap:24px; margin-top:16px; }
.reveal .m5-claims-compact > div { display:block; padding:11px 0 0; }
.reveal .m5-claims-compact span { font-size:16px; }
.reveal .m5-claims-compact p { font-size:21px; margin-top:6px; line-height:1.3; }
.reveal .m5-message h2 { font-size:42px; }
.reveal .m5-message .m5-circuit { max-height:225px; }
.reveal .m5-message > p { font-size:23px; margin-bottom:7px; }
.reveal .m5-circuit { width:100%; display:block; max-height:265px; margin:10px auto; }
.reveal .m5-circuit-small .m5-circuit { max-height:185px; margin:2px auto 8px; }
.m5-wire-label { font:27px Arial,sans-serif; fill:var(--ink); }
.m5-state-label { font:31px Georgia,serif; fill:var(--ink); }
.m5-gate-label { font:600 30px Arial,sans-serif; fill:var(--accent); text-anchor:middle; }
.m5-block-label { font:600 39px Arial,sans-serif; fill:var(--accent); text-anchor:middle; }
.m5-oracle { fill:var(--tint); }
.m5-prepared-label { font:27px Georgia,serif; fill:var(--accent); text-anchor:middle; }
.m5-classical { stroke:var(--muted); stroke-width:1.5; fill:none; }
.m5-result-label { font:23px Arial,sans-serif; fill:var(--muted); }
.m5-circuit-caption { font:22px Arial,sans-serif; fill:var(--muted); text-anchor:middle; }
.m5-marker { stroke:#a05c2e; stroke-width:2; stroke-dasharray:6 6; }
.reveal .m5-flow { display:grid; grid-template-columns:1fr 50px 1fr 50px 1fr; align-items:center; gap:14px; margin:33px 0; }
.reveal .m5-flow .panel { text-align:center; }
.reveal .m5-flow .panel p { font-size:29px; margin:0; }
.reveal .m5-flow .panel .label { font-size:16px; margin-bottom:13px; }
.reveal .m5-arrow { font-size:35px; text-align:center; color:var(--accent); }
.reveal .m5-cost-flow { display:flex; gap:16px; align-items:center; margin:30px 0; }
.reveal .m5-cost-flow > div { padding:23px 17px; flex:1; text-align:center; font-size:26px; background:var(--tint); }
.reveal .m5-cost-flow .m5-query-box { border:2px solid var(--accent); font-weight:600; }
.reveal .m5-cost-flow > span { color:var(--accent); }
.reveal .m5-classical-case .columns { grid-template-columns:.8fr 1.4fr; }
.reveal .m5-classical-case table { margin-top:5px; }
.reveal .m5-response { padding:14px 20px; background:var(--tint); margin-top:20px; }
.reveal .m5-response p { font-size:25px; margin:0; }
.reveal .m5-preparation { width:100%; height:105px; margin:10px 0 20px; }
.reveal .m5-flip-example { background:var(--tint); padding:20px 26px; margin-top:25px; }
.reveal .m5-flip-example .math { font-size:37px; }
.reveal .m5-branch-table td:nth-child(3),.reveal .m5-branch-table td:nth-child(4) { text-align:center; }
.reveal .m5-branch-table .m5-flipped { background:var(--tint); }
.reveal .m5-joint { font-size:32px; padding:24px 0; }
.reveal .m5-factor { display:grid; grid-template-columns:3fr 35px 1fr; gap:16px; margin-top:22px; align-items:center; }
.reveal .m5-factor .panel { min-width:0; align-self:stretch; }
.reveal .m5-product-sign { text-align:center; font-size:36px; color:var(--accent); }
.reveal .m5-factor .math { font-size:33px; }
.reveal .m5-factor .caption { font-size:23px; }
.reveal .m5-control-circuit { display:block; width:100%; max-height:180px; margin:8px 0 15px; }
.m5-phase-caption { font:24px Arial,sans-serif; fill:var(--accent); text-anchor:middle; }
.reveal .m5-general .m5-condition { display:flex; align-items:center; gap:35px; margin-bottom:12px; }
.reveal .m5-general .m5-condition p { font-size:25px; max-width:710px; margin:0; }
.reveal .m5-general .m5-condition .math { font-size:31px; }
.reveal .m5-general .m5-control-circuit { max-height:162px; }
.reveal .m5-useful .m5-control-circuit { max-height:164px; }
.reveal .m5-useful table th { font-size:19px; }
.reveal .m5-useful .takeaway { font-size:25px; }
.reveal .m5-immediate table { margin-top:6px; }
.reveal .m5-immediate table td,.reveal .m5-immediate table tbody th { padding:8px 15px; }
.reveal .m5-immediate table thead th { font-size:18px; }
.reveal .m5-immediate .takeaway { margin-top:12px; }
.reveal .m5-contributions { display:block; width:100%; max-height:250px; }
.m5-diagram-heading { font:22px Arial,sans-serif; fill:var(--muted); text-anchor:middle; }
.m5-amplitude { font:32px Georgia,serif; fill:var(--ink); text-anchor:middle; }
.m5-coefficient { font:23px Arial,sans-serif; fill:var(--accent); text-anchor:middle; }
.m5-sum-line { stroke:var(--accent); stroke-width:2.3; fill:none; }
.m5-term-box { fill:var(--tint); stroke:var(--accent); stroke-width:1.5; }
.m5-sum-symbol { font:48px Georgia,serif; fill:var(--accent); text-anchor:middle; }
.m5-quarter { font:35px Georgia,serif; fill:var(--accent); text-anchor:middle; }
.m5-negative { fill:#9b4c34; }
.m5-negative-line { stroke:#9b4c34; }
.reveal .m5-signed-sum { display:block; width:100%; max-height:215px; }
.reveal .m5-sums .columns { margin-top:10px; }
.reveal .m5-sums .panel { padding:16px 22px; }
.reveal .m5-sums .panel .label { margin-bottom:0; }
.reveal .m5-sums .panel .math { font-size:30px; }
.reveal .m5-sums .m5-sum-formula { margin-top:13px; }
.reveal .m5-sums .m5-sum-formula .katex-display { margin:10px 0; }
.reveal .m5-readout-pair { display:flex; gap:25px; margin:18px 0; }
.reveal .m5-readout-pair > p { flex:1; background:var(--tint); padding:19px 24px; margin:0; }
.reveal .m5-readout-pair strong { color:var(--accent); }
.reveal .m5-bound table { margin:26px 0; }
.reveal .m5-bound .caption { margin-top:20px; }
.reveal .m5-exercise .columns { grid-template-columns:.75fr 1.25fr; gap:35px; }
.reveal .m5-exercise .m5-circuit { max-height:190px; }
.reveal .m5-exercise .m5-prompts p { font-size:27px; margin-bottom:24px; }
.reveal .m5-next { margin-top:20px; font-size:19px; }

/* Room for the closing line on the denser slides. */
.reveal .m5-cover table td, .reveal .m5-cover table tbody th { padding:8px 15px; }
.reveal .m5-cover .m5-definitions { margin:14px 0; }
.reveal .m5-cover .question { margin-top:12px; }
.reveal .m5-immediate .m5-circuit { max-height:170px; }
.reveal .m5-immediate table td, .reveal .m5-immediate table tbody th { padding:6px 15px; }

/* The script introduces the query rule before following numerical examples. */
.reveal .m5-topic-preview { display:flex; gap:32px; margin-top:20px; padding-top:17px; border-top:1px solid var(--line); color:var(--accent); font-size:26px; }
.reveal .m5-topic-preview span { flex:1; }
.reveal .m5-query-examples .m5-input-col { width:12%; }
.reveal .m5-query-examples .m5-value-col { width:14%; }
.reveal .m5-query-examples table th, .reveal .m5-query-examples table td { padding:13px 20px; }
.reveal .m5-query-examples table td { font-size:29px; }
.reveal .m5-query-examples .m5-example-separator > * { border-top:2px solid var(--accent); }
.reveal .m5-useful .m5-control-circuit { max-height:137px; margin:0 auto 4px; }
.reveal .m5-useful .m5-control-equation { font-size:29px; }
.reveal .m5-useful .katex-display { margin:10px 0; }
.reveal .m5-useful .m5-phase-table { margin-top:12px; }
.reveal .m5-useful .m5-phase-table th, .reveal .m5-useful .m5-phase-table td { padding:7px 13px; }
.reveal .m5-useful .m5-phase-table td, .reveal .m5-useful .m5-phase-table tbody th { font-size:24px; }
.reveal .m5-useful .m5-phase-table th:nth-child(2) { width:40%; }
.reveal .m5-useful .m5-phase-table th:nth-child(3), .reveal .m5-useful .m5-phase-table th:nth-child(4), .reveal .m5-useful .m5-phase-table td:nth-child(3), .reveal .m5-useful .m5-phase-table td:nth-child(4) { text-align:center; }
.reveal .m5-useful .takeaway { margin-top:13px; padding-top:10px; font-size:24px; }
.reveal .m5-useful .caption { margin-top:8px; }

/* The final H gates first act on familiar states, then on one basis term. */
.reveal .m5-example-outputs .m5-circuit { max-height:160px; margin:0 auto 7px; }
.reveal .m5-example-outputs .m5-h-reminder { font-size:25px; margin:10px 0 15px; }
.reveal .m5-state-example { padding:10px 20px; background:var(--tint); margin-top:12px; border-radius:5px; }
.reveal .m5-state-example .label { margin:0 0 5px; }
.reveal .m5-state-calculation { display:flex; align-items:center; gap:16px; }
.reveal .m5-state-calculation .math { font-size:31px; }
.reveal .m5-state-calculation .katex-display { margin:5px 0; }
.reveal .m5-example-outputs .caption { margin-top:12px; }
.reveal .m5-contribution-step > p { margin-bottom:12px; }
.reveal .m5-contribution-step .m5-h-actions { margin-top:10px; }
.reveal .m5-contribution-step .m5-h-actions .panel { padding:6px 20px; }
.reveal .m5-contribution-step .m5-h-actions .katex-display { margin:8px 0; }
.reveal .m5-contribution-step .m5-coefficient-note { font-size:23px; margin:12px 0; }
.reveal .m5-contribution-step .m5-basis-example { border-top:1px solid var(--line); padding-top:9px; }
.reveal .m5-contribution-step .m5-basis-example .label { margin:0 0 7px; }
.reveal .m5-contribution-step .m5-basis-example .math { font-size:30px; }
.reveal .m5-contribution-step .m5-basis-example .katex-display { margin:4px 0 10px; }
.reveal .m5-contribution-step .m5-weighted-term .math { font-size:31px; }
.reveal .m5-contribution-step .m5-weighted-term .katex-display { margin:8px 0; }
.reveal .m5-contribution-step .m5-weighted-term .caption { margin-top:6px; }
