/* Pipe Flow & Bernoulli Lab. Everything is scoped under .ff so site.css (loaded after this file) can't collide.
   Text is 16px or larger everywhere; tap targets are 44px or taller. */
.ff {
  --ff-ink: #14263a; --ff-muted: #4b6075; --ff-paper: #eef4f7; --ff-card: #ffffff; --ff-line: #cfdce4;
  --ff-accent: #0d5f8a; --ff-accent-ink: #ffffff; --ff-sun: #e89a2c; --ff-soft: #f1f6f9; --ff-ok: #1f7a3d; --ff-no: #b3261e;
  --ff-shadow: 0 1px 2px rgba(16, 40, 60, .06), 0 8px 24px rgba(16, 40, 60, .07);
  color: var(--ff-ink); font: 16px/1.5 "Atkinson Hyperlegible", system-ui, sans-serif;
  background: radial-gradient(ellipse 90% 60% at 50% -10%, #dcebf3, var(--ff-paper) 70%);
  padding: 0 clamp(12px, 2vw, 28px) 56px; min-height: 70vh;
}
html[data-theme="dark"] .ff {
  --ff-ink: #e6eef3; --ff-muted: #aabdca; --ff-paper: #0f1b26; --ff-card: #172633; --ff-line: #33495a;
  --ff-accent: #5cc8ff; --ff-accent-ink: #06202e; --ff-soft: #1d3040; --ff-ok: #7fdc9a; --ff-no: #ff9b93;
  --ff-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  background: radial-gradient(ellipse 90% 60% at 50% -10%, #19324a, var(--ff-paper) 70%);
}
.ff *, .ff *::before, .ff *::after { box-sizing: border-box; }
.ff [hidden] { display: none !important; }
.ff h1, .ff h2, .ff h3 { color: var(--ff-ink); font-family: inherit; }
.ff p { margin: 0 0 8px; }
.ff-eyebrow { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .06em; color: var(--ff-accent); }
.ff-muted { color: var(--ff-muted); }
.ff > * { max-width: 1500px; margin-left: auto; margin-right: auto; }

/* title bar */
.ff-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 10px 0 8px; }
.ff-titles { flex: 1 1 280px; min-width: 0; }
.ff-bar h1 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; }
.ff-level { padding: 4px 12px; border-radius: 999px; background: var(--ff-soft); border: 1px solid var(--ff-line); font-weight: 700; }
.ff-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* buttons */
.ff .ff-btn { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--ff-line); background: var(--ff-card); color: var(--ff-ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ff .ff-btn:hover { border-color: var(--ff-accent); }
.ff .ff-btn:focus-visible, .ff button:focus-visible, .ff input:focus-visible, .ff select:focus-visible, .ff textarea:focus-visible, .ff summary:focus-visible, .ff [tabindex]:focus-visible { outline: 3px solid #eaa33d; outline-offset: 2px; }
.ff .ff-btn--pri { background: var(--ff-accent); border-color: var(--ff-accent); color: var(--ff-accent-ink); }
.ff .ff-btn--ghost { background: transparent; }
.ff .ff-btn:disabled { opacity: .55; cursor: not-allowed; }
.ff .ff-btn--small { padding: 8px 14px; }
.ff-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.ff-more { position: relative; }
.ff-more summary { list-style: none; }
.ff-more summary::-webkit-details-marker { display: none; }
.ff-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: var(--ff-card); border: 1px solid var(--ff-line); box-shadow: var(--ff-shadow); min-width: 250px; }
.ff-msg { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--ff-soft); border-left: 4px solid var(--ff-accent); font-weight: 700; }
.ff-msg:empty { display: none; }

/* start card */
.ff-gate { margin-top: 8px; padding: clamp(14px, 3vw, 40px); border-radius: 22px; background: linear-gradient(140deg, #101c3a, #1f5f9a 48%, #d8743a); }
.ff-gate-card { max-width: 980px; margin: 0 auto; padding: clamp(18px, 3vw, 36px); border-radius: 18px; background: var(--ff-card); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.ff-gate-card h2 { font-size: clamp(26px, 3.6vw, 38px); margin: 4px 0 6px; line-height: 1.15; }
.ff-gate-lede { font-size: 18px; color: var(--ff-muted); }
.ff-how { margin: 10px 0; padding-left: 26px; font-size: 18px; }
.ff-how li { padding: 2px 0; }
.ff-gate-pick { font-weight: 800; margin: 14px 0 0; }
.ff-gate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.ff-gate-grid button { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 2px solid var(--ff-line); border-radius: 14px; cursor: pointer; background: var(--ff-soft); color: var(--ff-ink); min-height: 44px; }
.ff-gate-grid button:hover { border-color: var(--ff-accent); }
.ff-gate-grid button:focus-visible { outline: 3px solid #eaa33d; outline-offset: 2px; }
.ff-gate-grid button.is-first { border-color: var(--ff-accent); }
.ff-gate-grid b { font-size: 20px; line-height: 1.25; }
.ff-gate-grid span { color: var(--ff-muted); }
.ff-gate-grid em { font-style: normal; font-weight: 800; color: var(--ff-accent); }

/* modes + tabs */
.ff-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 0 8px; }
.ff-modes-label { font-weight: 800; margin-right: 4px; }
.ff-modes button, .ff-tabs button { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; padding: 8px 14px; border: 2px solid var(--ff-line); background: var(--ff-card); color: var(--ff-ink); cursor: pointer; }
.ff-modes button { border-radius: 10px; }
.ff-modes button.is-on { border-color: var(--ff-accent); background: var(--ff-accent); color: var(--ff-accent-ink); }
.ff-modes-note { color: var(--ff-muted); margin-left: 4px; }
.ff-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px; }
.ff-tabs button { border-radius: 999px; border-width: 1px; }
.ff-tabs button.is-on { background: var(--ff-ink); color: var(--ff-card); border-color: var(--ff-ink); }

/* bench */
.ff-stage { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 14px; align-items: start; }
.ff-stage.is-test { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.ff-stage.is-test .ff-side, .ff-stage.is-test .ff-bench-controls { display: none; }
.ff-main { min-width: 0; }
.ff-scene { background: #0b1722; border-radius: 16px; overflow: hidden; box-shadow: var(--ff-shadow); color: #eaf3f8; }
.ff-canvas-wrap { padding: 8px 8px 0; }
.ff-canvas-wrap canvas { display: block; width: 100%; touch-action: pan-y; }
.ff-bench-controls { padding: 4px 14px 12px; display: grid; gap: 10px; }
.ff-scene .ff-btn { background: #16304d; border-color: rgba(255, 255, 255, .28); color: #eef6fb; }
.ff-scene .ff-btn:hover { border-color: #f3b54a; }
.ff-scene .ff-btn--pri { background: #f3b54a; border-color: #f3b54a; color: #1c1403; }
.ff-do { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ff-do .ff-btn--undo { margin-left: auto; }
.ff-scene .ff-msg { background: #16304d; color: #eef6fb; border-left-color: #8fd0ff; margin: 0; }
.ff-scene .ff-msg.ok { border-left-color: #7ce0a3; }
.ff-scene .ff-msg.no { border-left-color: #ff9b93; }
.ff-caption { margin: 0; padding: 10px 14px; background: #0d223b; color: #d6e6f1; border-top: 1px solid rgba(255, 255, 255, .08); }

/* bench controls: grouped under the part of the apparatus they change */
.ff-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ff-group { margin: 0; min-width: 0; padding: 6px 12px 10px; border-radius: 12px; background: #10263f; border: 1px solid rgba(255, 255, 255, .12); }
.ff-group legend { padding: 0 6px; font-weight: 800; color: #ffd27a; }
.ff-ctl { display: flex; flex-direction: column; margin-top: 4px; }
.ff-ctl label { font-weight: 700; color: #eef6fb; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; }
.ff-ctl output { font-weight: 800; color: #ffd27a; font-variant-numeric: tabular-nums; }
.ff-ctl input[type=range] { width: 100%; min-height: 44px; margin: 0; accent-color: #f3b54a; }
.ff-fixed { grid-column: 1 / -1; margin: 0; color: #c7d6e2; }
.ff-drain { margin: 8px 0 0; }
.ff-inline { font-weight: 700; color: #eef6fb; }
.ff-select { font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .28); background: #16304d; color: #eef6fb; padding: 4px 8px; }
.ff-seg--dark { align-items: center; margin: 0; }
.ff-seg--dark .ff-seg-label { font-weight: 800; color: #ffd27a; margin-right: 4px; }
.ff-seg.ff-seg--dark button { flex: 0 1 140px; background: #16304d; border-color: rgba(255, 255, 255, .28); color: #eef6fb; }
.ff-seg.ff-seg--dark button.is-on { background: #f3b54a; border-color: #f3b54a; color: #1c1403; }
.ff-seg { flex-wrap: wrap; }
.ff-seg button { padding: 6px 10px; }
#sec2 { grid-column: 2; }
@media (max-width: 760px) { .ff-groups { grid-template-columns: minmax(0, 1fr); } #sec2 { grid-column: auto; } }

.ff-readout-grid { padding: 8px 14px 0; }
.ff-readout-grid dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 0; }
.ff-readout-grid dt { color: #c7d6e2; font-weight: 700; }
.ff-readout-grid dd { margin: 0; color: #ffd27a; font-weight: 800; font-variant-numeric: tabular-nums; }

/* side: coach, graph, checks */
.ff-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ff-coach, .ff-sidegraph, .ff-compare, .ff-ch { background: var(--ff-card); border: 1px solid var(--ff-line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--ff-shadow); }
.ff-next { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px 10px; margin-top: 6px; border-radius: 10px; background: var(--ff-soft); border-left: 4px solid var(--ff-sun); font-size: 17px; }
.ff-hint { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--ff-accent); }
.ff-stepchecks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.ff-stepchecks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); color: var(--ff-muted); }
.ff-stepchecks li.done { color: var(--ff-ok); font-weight: 700; }
.ff-sidegraph h3 { margin: 0 0 6px; font-size: 18px; }
.ff-sidegraph canvas, .ff-graph canvas { display: block; width: 100%; }
.ff-seg { display: flex; gap: 6px; margin: 0 0 8px; }
.ff-seg button { appearance: none; flex: 1; min-height: 44px; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; border-radius: 10px; border: 2px solid var(--ff-line); background: var(--ff-card); color: var(--ff-ink); cursor: pointer; }
.ff-seg button.is-on { border-color: var(--ff-accent); background: var(--ff-accent); color: var(--ff-accent-ink); }
.ff-more-checks { display: flex; flex-direction: column; gap: 10px; }
.ff-checks-title { margin: 4px 0 0; font-size: 18px; }
.ff-compare > b, .ff-ch summary { font-size: 17px; font-weight: 800; }
.ff-compare p { margin: 6px 0; }
.ff-compare input[type=text] { min-height: 44px; width: 8.5em; max-width: 100%; font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; border: 1px solid var(--ff-line); border-radius: 8px; padding: 4px 8px; background: var(--ff-card); color: var(--ff-ink); }
.ff-compare-out { margin: 6px 0 0; font-weight: 700; }
.ff-compare-out:empty { display: none; }
.ff-compare-out.no { color: var(--ff-no); } .ff-compare-out.ok { color: var(--ff-ok); }
.ff-plain { border: 0; margin: 0; padding: 0; min-width: 0; }
.ff-rowpick { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: start; gap: 4px; min-height: 44px; padding: 8px 4px; cursor: pointer; }
.ff-rowpick input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ff-accent); }
.ff-ch summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.ff-cards { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.ff-cards li { padding: 8px 10px; border-radius: 10px; background: var(--ff-soft); border-left: 4px solid var(--ff-line); }
.ff-cards li.done { border-left-color: var(--ff-ok); }
.ff-cards b, .ff-cards span { display: block; }
.ff-flash { animation: ff-flash 1.2s ease 2; }
@keyframes ff-flash { 50% { box-shadow: 0 0 0 5px rgba(234, 163, 61, .85); } }

/* panels: pre-lab, data, CER, test */
.ff-panel { background: var(--ff-card); border: 1px solid var(--ff-line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--ff-shadow); }
.ff-panel h2 { margin: 4px 0 8px; font-size: 22px; line-height: 1.25; }
.ff-panel h3 { margin: 14px 0 6px; font-size: 18px; }
.ff-qbox { padding: 10px 14px; border-radius: 12px; background: var(--ff-soft); border-left: 4px solid var(--ff-accent); margin: 8px 0; }
.ff-qbox small { display: block; font-size: 16px; font-weight: 800; color: var(--ff-accent); }
.ff-qbox b { font-size: 18px; }
.ff-prelab-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px 28px; }
.ff-practice { display: flex; gap: 10px; padding: 10px 12px; margin: 10px 0; border-radius: 12px; background: var(--ff-soft); border: 1px solid var(--ff-line); }
.ff-practice a, .ff-dialog a { color: var(--ff-accent); font-weight: 700; }
.ff-fig { margin: 0 0 8px; text-align: center; }
.ff-fig figcaption { color: var(--ff-muted); }
.ff-vocab { display: flex; flex-wrap: wrap; gap: 8px; }
.ff-term { position: relative; appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; padding: 8px 12px; border-radius: 999px; border: 1px dashed var(--ff-accent); background: var(--ff-soft); color: var(--ff-ink); cursor: help; }
p .ff-term { min-height: 0; padding: 0 4px; border-width: 0 0 2px; border-radius: 4px; background: none; }
.ff-tip { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: min(320px, 78vw); padding: 10px 12px; border-radius: 10px; background: #10253b; color: #fff; font-weight: 500; line-height: 1.45; text-align: left; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.ff-term:hover .ff-tip, .ff-term:focus .ff-tip { display: block; }
.ff-safety { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ff-safety li { display: grid; grid-template-columns: 24px minmax(0, 1fr); }
.ff-frame { font-size: 17px; line-height: 2.5; }
.ff-frame select, .ff-compare select { font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; max-width: 100%; border-radius: 8px; border: 2px solid var(--ff-accent); background: var(--ff-card); color: var(--ff-ink); padding: 4px 8px; }
.ff-because { display: block; font-weight: 700; margin-top: 4px; }
.ff-area, .ff-cer-grid textarea { display: block; width: 100%; font: 16px/1.45 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 84px; padding: 10px; margin-top: 4px; border: 1px solid var(--ff-line); border-radius: 10px; background: var(--ff-card); color: var(--ff-ink); }
.ff-data-head, .ff-cer-head, .ff-test-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; }
.ff-table { overflow-x: auto; border: 1px solid var(--ff-line); border-radius: 10px; margin-bottom: 8px; }
.ff-table table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.ff-table th, .ff-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--ff-line); vertical-align: top; }
.ff-table th { background: var(--ff-soft); min-width: 96px; }
.ff-empty { color: var(--ff-muted); }
.ff-graph { max-width: 760px; margin-top: 8px; }
.ff-cer-head > div { flex: 1 1 320px; min-width: 0; }
.ff-checklist { flex: 1 1 320px; list-style: none; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--ff-soft); display: grid; gap: 4px; }
.ff-checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr); color: var(--ff-muted); }
.ff-checklist li.done { color: var(--ff-ok); font-weight: 700; }
.ff-pick { margin: 10px 0; padding: 4px 12px; border: 1px dashed var(--ff-line); border-radius: 10px; }
.ff-pick summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.ff-cer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ff-cer-grid label { font-weight: 800; display: block; }
.ff-cer-grid small { font-size: 16px; font-weight: 500; color: var(--ff-muted); margin-left: 6px; }
.ff-cer-grid textarea { min-height: 170px; }
.ff-turnin { margin-top: 14px; }
.ff-done { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--ff-ok); background: var(--ff-soft); }
.ff-done h3 { margin-top: 0; }
.ff-test { margin-top: 14px; max-width: 980px; }
.ff-test-head h2 small { font-size: 18px; color: var(--ff-muted); }
.ff-progress { flex: 0 0 200px; height: 10px; border-radius: 999px; background: var(--ff-soft); border: 1px solid var(--ff-line); overflow: hidden; margin-top: 12px; }
.ff-progress i { display: block; height: 100%; background: var(--ff-accent); }
.ff-tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--ff-soft); border: 1px solid var(--ff-line); font-weight: 700; }
.ff-q { font-size: 18px; margin: 12px 0 8px; }
.ff-test-list { margin: 6px 0; padding-left: 24px; }
.ff-choices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.ff-choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; border: 2px solid var(--ff-line); border-radius: 12px; cursor: pointer; background: var(--ff-card); position: relative; }
.ff-choice input, .ff-unit input { position: absolute; opacity: 0; pointer-events: none; }
.ff-choice:focus-within, .ff-unit:focus-within { outline: 3px solid #eaa33d; outline-offset: 2px; }
.ff-choice.is-picked, .ff-unit.is-picked { border-color: var(--ff-accent); background: var(--ff-soft); box-shadow: inset 0 0 0 1px var(--ff-accent); }
.ff-choice.ok { border-color: var(--ff-ok); } .ff-choice.no { border-color: var(--ff-no); }
.ff-choice em { margin-left: auto; font-style: normal; font-weight: 900; font-size: 20px; }
.ff-choice.ok em { color: var(--ff-ok); } .ff-choice.no em { color: var(--ff-no); }
.ff-choices:disabled .ff-choice, .ff-units:disabled .ff-unit { cursor: default; }
.ff-letter { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--ff-soft); border: 1px solid var(--ff-line); font-weight: 800; }
.ff-numq { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; }
.ff-numq-val { display: flex; flex-direction: column; font-weight: 700; }
.ff-numq-val input { min-height: 48px; width: 11em; max-width: 100%; margin-top: 4px; font: 700 18px "Atkinson Hyperlegible", system-ui, sans-serif; border: 2px solid var(--ff-line); border-radius: 10px; padding: 6px 10px; background: var(--ff-card); color: var(--ff-ink); }
.ff-units { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.ff-units legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.ff-unit { position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: 8px 14px; border: 2px solid var(--ff-line); border-radius: 10px; cursor: pointer; font-weight: 700; background: var(--ff-card); }
.ff-unit.is-picked::before { content: "✓ "; white-space: pre; }
.ff-eqline { margin-top: 8px; }
.ff-run { margin: 12px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ff-readout { flex: 1 1 100%; margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--ff-soft); border-left: 4px solid var(--ff-sun); }
.ff-explain { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--ff-soft); border-left: 4px solid var(--ff-line); }
.ff-explain.ok { border-left-color: var(--ff-ok); } .ff-explain.no { border-left-color: var(--ff-no); }
.ff-test-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
.ff-test-nav .ff-btn--pri { margin-left: auto; }
.ff-review { padding-left: 24px; display: grid; gap: 10px; }
.ff-review li.ok::marker { color: var(--ff-ok); } .ff-review li.no::marker { color: var(--ff-no); }

/* dialogs */
.ff-dialog { max-width: min(720px, calc(100vw - 24px)); border: 0; border-radius: 16px; padding: 22px 26px; color: #14263a; background: #fff; box-shadow: 0 20px 70px rgba(0, 0, 0, .4); font: 16px/1.55 "Atkinson Hyperlegible", system-ui, sans-serif; --ff-accent: #0d5f8a; }
.ff-dialog::backdrop { background: rgba(6, 21, 37, .7); }
.ff-dialog h2 { margin: 0 44px 8px 0; }
.ff-dialog p { margin: 0 0 10px; }
.ff-x { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #cfdce4; background: #f1f6f9; color: #14263a; font-size: 24px; line-height: 1; cursor: pointer; }
.ff-dialog button:focus-visible { outline: 3px solid #eaa33d; outline-offset: 2px; }

@media (max-width: 1180px) {
  .ff-stage { display: flex; flex-direction: column; }
  .ff-stage:not(.is-test) .ff-side { display: contents; }
  .ff-coach { order: -1; }
  .ff-prelab-grid, .ff-cer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .ff-gate-grid { grid-template-columns: minmax(0, 1fr); }
  .ff-progress { flex-basis: 100%; }
  .ff-frame select { width: 100%; }
  .ff-do .ff-btn { flex: 1 1 100%; }
  .ff-more-menu { right: auto; left: 0; }
}
@media (prefers-reduced-motion: reduce) { .ff * { transition: none !important; animation: none !important; } }
@media print {
  .ff-scene, .ff-tabs, .ff-modes, .ff-actions, .ff-turnin, .ff-side, .ff-gate, .ff-pick, #export, #toCer { display: none !important; }
}
.ff-signin:empty { display: none; }
.ff-signin .tlg-signin-note { margin: 0 0 8px; }
.ff-links a { display: block; padding: 4px 0; }
.ff-dialog b { white-space: nowrap; }
