.region-picker {
  min-width: 0;
  min-height: 44px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: white;
  font: 700 .82rem Manrope, system-ui, sans-serif;
}
.region-picker-header { display: block; flex: none; }
.fusion-active .region-picker-header { display: none; }
.fusion-account-tools .region-picker { width: 100%; margin-bottom: 10px; }

.by-active .site-footer { display: none; }
.by-shell, .by-question { min-width: 0; }
.by-shell p { max-width: 70ch; }
.by-note { color: var(--muted); font-size: .88rem; }
.by-controls { display: flex; align-items: end; gap: 14px; flex-wrap: wrap; margin: 24px 0; }
.by-controls label { display: grid; gap: 6px; flex: 1 1 160px; min-width: 0; }
.by-controls select,
.by-controls input { width: 100%; min-width: 0; min-height: 46px; padding: 8px 12px; }
.by-list { list-style: none; padding: 0; margin: 20px 0; }
.by-list li { border-bottom: 1px solid var(--line); }
.by-list a { display: block; padding: 16px 4px; color: var(--ink); text-decoration: none; }
.by-list small { display: block; color: var(--muted); margin-top: 5px; }
.by-list a:hover { text-decoration: underline; }
.by-question-library { --by-group-space: 24px; --by-row-space: 16px; min-width: 0; container-type: inline-size; }
.by-question-library .page-intro { margin-bottom: var(--by-row-space); }
.by-question-library .page-intro h1 { margin-bottom: 12px; }
.by-question-library .page-intro p { margin: 0; }
.by-review-shortcuts .by-count { font-variant-numeric: tabular-nums; font-weight: 800; }
.by-review-shortcuts { align-items: stretch; }
.by-review-shortcuts [aria-current="page"] { background: var(--green, #17392f); color: white; border-color: var(--green, #17392f); }
.by-chapter-menu button strong { font: inherit; }
.by-chapter-menu button[aria-pressed="true"] strong { font-weight: 800; }
.by-library-controls { margin-block: var(--by-group-space); }
.by-library-controls label { font-weight: 700; font-size: .88rem; }
.by-library-controls label:first-child { flex-basis: 320px; }
.by-library-controls label:last-child { flex-basis: 220px; flex-grow: 0; }
.by-library-controls input, .by-library-controls select { border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font: 400 1rem Manrope, system-ui, sans-serif; }
.by-list-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-top: 32px; }
.by-list-heading h2 { font-size: 1.2rem; line-height: 1.4; margin: 0; flex: 1 1 280px; }
.by-list-heading p { margin: 0; color: var(--muted); font-size: .9rem; }
.by-question-list { list-style: none; padding: 0; margin-block: var(--by-row-space) var(--by-group-space); }
.by-question-list li { min-width: 0; }
.by-question-list .by-question-card { align-items: center; padding: var(--by-row-space) 20px; }
.by-question-copy { flex: 1; min-width: 0; display: grid; gap: 8px; }
.by-question-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.by-question-number { color: var(--teal-dark); font-weight: 800; font-variant-numeric: tabular-nums; }
.by-question-list .by-question-title { font-size: 1rem; line-height: 1.55; font-weight: 750; max-width: 70ch; overflow-wrap: anywhere; }
.by-question-states { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: .8rem; line-height: 1.5; }
.by-status-new { color: var(--muted); }
.by-status-correct { color: #205e49; }
.by-status-wrong { color: #923c28; font-weight: 700; }
.by-saved-label { color: var(--teal-dark); font-weight: 700; }
.by-open { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.by-pagination { justify-content: space-between; font-variant-numeric: tabular-nums; }
.by-pagination button:disabled { opacity: .55; cursor: default; }
.by-library-empty { padding-block: var(--by-group-space); }
.by-reader-heading { max-width: 800px; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.by-reader-heading h1 { font-size: 1.25rem; margin: 16px 0; }
.by-reader-navigation { max-width: 800px; margin-inline: auto; justify-content: space-between; }
.by-question-library :is(a,button,input,select):focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 3px; }
@container (max-width: 650px) {
  .by-chapter-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .by-library-controls label:last-child { flex: 1 1 100%; }
  .by-question-list .by-question-card { align-items: start; padding: 16px; gap: 10px; }
  .by-question-list .by-open { align-self: end; font-size: .78rem; }
  .by-question-list .by-open svg { display: none; }
  .by-pagination { gap: 8px; }
  .by-pagination .button { padding-inline: 10px; font-size: .82rem; }
}
.by-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.by-question { max-width: 800px; margin: 16px auto; }
.by-question-head,
.by-answer-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: start; gap: 10px; }
.by-answer-row { align-items: center; }
.by-question-head h2 { margin: 0; overflow-wrap: anywhere; }
.by-question .original-label { margin-top: 0; }
.by-question .by-translation { margin: 14px 0 18px; padding: 12px; }
.by-question .answer-choice { min-width: 0; overflow-wrap: anywhere; }
.by-answer small { color: var(--muted); }
.by-speech-status:empty { display: none; }
.by-exam-question .by-answer-row, .by-exam-question .by-question-head { grid-template-columns: minmax(0, 1fr); }
.by-feedback { scroll-margin-block: 90px; }
.by-destinations { max-width: 740px; }
.by-destinations a { padding-inline: 10px; }
.by-destinations a:hover { background: var(--paper, #f7f8f4); }
.by-parts { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.by-parts .button { min-height: 48px; flex: 1 1 150px; flex-direction: column; }
.by-parts .button[aria-pressed="true"] { outline: 2px solid currentColor; outline-offset: 2px; }
.by-workshop-steps { padding-inline-start: 26px; max-width: 72ch; }
.by-workshop-steps li { padding-block: 8px; }
.by-rig-slots li { border-bottom: 1px solid var(--line); }
.by-rig-slots button { margin-inline: 4px 10px; }
.by-rig-diagram { margin: 18px 0; }
.by-rig-diagram img { display: block; max-width: min(100%, 440px); height: auto; border-radius: 12px; }
.by-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 720px; margin: 14px 0; }
.by-compare figure { margin: 0; }
.by-compare figcaption { margin-block: 4px 8px; font-weight: 700; }
.by-exam-overview { max-width: 800px; margin-block: 12px; }
.by-exam-overview summary { display: list-item; cursor: pointer; padding-block: 12px; }
.by-exam-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 6px; }
.by-exam-grid .button { padding: 0; min-width: 0; min-height: 44px; }
.by-exam-grid [data-answered="true"] { font-weight: 800; text-decoration: underline; }
.by-exam-grid [aria-current] { outline: 2px solid currentColor; outline-offset: -3px; }
.by-question-zoom { margin: 16px 0 0; }
.by-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.by-fish { display: block; min-width: 0; color: var(--ink); text-decoration: none; }
.by-fish img { width: 100%; aspect-ratio: 3/2; object-fit: contain; background: #e4e2dc; border-radius: 12px; }
.by-fish h2 { font-size: 1.05rem; margin: 8px 0 3px; overflow-wrap: anywhere; }
.by-fish small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.by-image-button { display: block; width: 100%; border: 0; background: transparent; padding: 0; }
.by-image-button img { display: block; width: 100%; height: auto; max-height: 580px; object-fit: contain; background: #e6e3dc; border-radius: 10px; }
.by-image-button span { display: flex; min-height: 44px; align-items: center; justify-content: flex-end; padding: 6px 10px; color: var(--ink); }
.by-image-button.by-question-zoom img { max-height: 380px; }
.by-zoom { max-width: 95vw; width: 1200px; border: 0; padding: 16px; background: white; border-radius: 14px; }
.by-zoom::backdrop { background: #122b25bb; }
.by-zoom img { display: block; width: 100%; max-height: 75vh; object-fit: contain; }
.by-summary { border-collapse: collapse; width: 100%; max-width: 700px; margin: 20px 0; }
.by-summary td,.by-summary th { padding: 10px; text-align: left; border-bottom: 1px solid var(--line); }
.by-review { padding: 12px 0; border-bottom: 1px solid var(--line); }
.by-review summary { cursor: pointer; min-height: 44px; line-height: 1.5; overflow-wrap: anywhere; }
.by-error { padding: 16px; background: #fbece9; color: #762b25; border-radius: 12px; }
.by-timer { font-variant-numeric: tabular-nums; }
.by-shell > a,
.by-filter-option { display: inline-flex; min-height: 44px; align-items: center; }
.by-back { display:inline-flex; align-items:center; min-height:44px; }
.by-recognition header { margin-block:16px 24px; }
.by-recognition header h1 { margin:6px 0; }
.by-recognition header p { margin:6px 0; }
.by-fish-profile { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(240px,1fr); gap:28px; align-items:center; }
.by-fish-profile h2 { font-size:1.15rem; margin-top:0; }
.by-recognition .by-image-button img { aspect-ratio:3/2; max-height:360px; }
.by-recognition .by-image-button span { gap:8px; justify-content:center; border:1px solid var(--line); background:var(--teal-soft,#e7f0ed); border-radius:0 0 10px 10px; font-weight:700; }
.by-fish-cues { list-style:none; padding:0; margin:0; }
.by-fish-cues li { border-bottom:1px solid var(--line); padding:16px 0; }
.by-fish-cues li>span { display:block; color:var(--muted); font-size:.85rem; margin-bottom:4px; }
.by-fish-cues strong { display:block; font-size:1.1rem; line-height:1.45; }
.by-comparison-links { margin-top:28px; }
.by-comparison-links h2 { font-size:1.05rem; margin-bottom:8px; }
.by-comparison-links .by-actions { margin-top:8px; }
.by-comparison-links [aria-current] { border-color:var(--ink); box-shadow:inset 0 -3px var(--ink); }
.by-comparison-photos,.by-comparison-row>div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.by-comparison-photos h2 { font-size:1.15rem; margin:8px 0 12px; overflow-wrap:anywhere; }
.by-comparison-row { border-bottom:1px solid var(--line); padding:18px 0; }
.by-comparison-row h3 { font-size:.85rem; color:var(--muted); margin:0 0 8px; }
.by-comparison-row p { margin:0; font-weight:700; line-height:1.5; }
.by-recognition .by-review a { overflow-wrap:anywhere; }
.by-recognition :is(a,button):focus-visible { outline:3px solid var(--teal-dark); outline-offset:3px; }

/* Reuse NRW's compact picture workbench without its official exam stages. */
.fusion-active .by-assembly.fusion-workspace { height:auto; min-height:0; max-width:none; overflow:visible; gap:16px; }
.by-assembly>p { margin:0; }
.by-assembly.fusion-workspace .practical-sim-workbench { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); overflow:visible; gap:24px; }
.by-assembly.fusion-workspace [data-fusion-scroll] { overflow:visible; padding:4px; }
.by-assembly.fusion-workspace .practice-part-bank { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.by-assembly .practice-part-bank .practice-part-pictures { zoom:.65; min-height:150px; }
.by-assembly .practice-image-card[aria-pressed=true] { outline:3px solid var(--teal-dark); background:var(--teal-soft,#e7f0ed); }
.by-assembly .practice-selection .button { min-height:44px; font-size:.85rem; padding:6px 12px; margin-left:8px; }
.by-assembly.fusion-workspace>.practice-selection { position:static; width:auto; height:auto; clip-path:none; max-height:none; padding:10px 12px; }
.by-assembly .practice-position>[data-by=rig-place],.by-part-verdict { grid-column:1/-1; }
.by-part-verdict { color:#8b3d26; font-size:.9rem; }
.by-part-verdict.is-correct { color:var(--ink); }
.by-assembly.fusion-workspace .practice-installed-part { grid-template-columns:100px minmax(0,1fr); }
.by-assembly.fusion-workspace>.fusion-workspace-actions { position:static; margin-top:8px; border-top:1px solid var(--line); padding-top:16px; flex-wrap:wrap; }
.by-assembly-result { padding:16px; border-left:4px solid var(--teal-dark); background:var(--teal-soft,#e7f0ed); }
.by-workshop-context { margin-bottom:16px; }
.by-workshop-context summary { min-height:44px; cursor:pointer; padding-block:10px; }
.by-next-piece { margin-top:12px; }
.by-comparison-photos h2 small { display:block; font-size:.8rem; font-weight:500; color:var(--muted); margin-top:4px; }

.by-progress { max-width:1000px; margin-inline:auto; }
.by-progress-overview { display:flex; flex-wrap:wrap; align-items:center; gap:24px; justify-content:space-between; background:#fff; padding:28px; border:1px solid var(--line); border-radius:16px; margin-block:24px; }
.by-progress-overview>div { flex:1 1 360px; }
.by-progress-overview h2 { margin:8px 0 16px; font-family:inherit; }
.by-progress-overview h2>span:last-child { font-size:1.2rem; color:var(--muted); font-weight:500; }
.by-progress-number { font-size:3rem; font-variant-numeric:tabular-nums; }
.by-progress progress { display:block; width:100%; height:8px; border:0; border-radius:8px; accent-color:var(--teal-dark); overflow:hidden; background:#e3eae6; }
.by-progress progress::-webkit-progress-bar { background:#e3eae6; }
.by-progress progress::-webkit-progress-value { background:var(--teal-dark); border-radius:8px; }
.by-progress progress::-moz-progress-bar { background:var(--teal-dark); }
.by-progress-shortcuts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-bottom:1px solid var(--line); }
.by-progress-shortcuts a { display:flex; flex-direction:column; gap:8px; padding:16px; text-decoration:none; color:var(--ink); }
.by-progress-shortcuts strong { font-size:1.8rem; font-variant-numeric:tabular-nums; }
.by-progress-shortcuts a+a { border-left:1px solid var(--line); }
.by-progress-shortcuts a:hover,.by-progress-chapters a:hover { background:var(--teal-soft,#e7f0ed); }
.by-progress h2 { font-size:1.35rem; }
.by-progress-chapters { list-style:none; padding:0; }
.by-progress-chapters a { display:flex; align-items:center; gap:18px; padding:20px 8px; border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none; }
.by-chapter-number { color:var(--teal-dark); align-self:start; font-size:.8rem; font-weight:700; padding-top:4px; }
.by-chapter-progress { flex:1; min-width:0; }
.by-chapter-progress progress { margin:12px 0 8px; height:6px; }
.by-chapter-progress>span { font-size:.85rem; color:var(--muted); }
.by-progress-history { margin-top:32px; }
.by-progress-history summary>span { display:inline-block; margin-right:12px; }
.by-result-status { font-size:.85rem; color:#8b3d26; }
.by-result-status.is-correct { color:var(--teal-dark); }
@media (max-width:900px) {
 .by-fish-profile { grid-template-columns:minmax(0,1fr); gap:12px; }
 .by-fish-cues { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
 .by-assembly.fusion-workspace .practice-part-bank { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:600px) {
 .by-comparison-photos,.by-comparison-row>div { gap:12px; }
 .by-comparison-photos h2 { font-size:1rem; }
 .by-recognition .by-image-button span { font-size:.8rem; padding-inline:4px; }
 .by-fish-cues { grid-template-columns:minmax(0,1fr); gap:0; }
 .by-fish-cues li { padding-block:12px; }
 .by-assembly.fusion-workspace .practical-sim-workbench { grid-template-columns:minmax(0,1fr); }
 .by-assembly.fusion-workspace .practice-part-bank { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .by-assembly.fusion-workspace .practice-position .practical-sim-move { justify-content:flex-end; gap:8px; }
 .by-assembly.fusion-workspace .practical-sim-move .button { flex:0 0 44px; }
 .by-progress-overview { padding:20px; gap:12px; }
 .by-progress-overview>.button { width:100%; }
 .by-progress-shortcuts a { padding:12px 8px; font-size:.85rem; }
 .by-progress-shortcuts strong { font-size:1.5rem; }
 .by-progress-chapters a { gap:10px; }
}
.by-filter-option { gap: 8px; }
.by-filter-option input { width: 18px; height: 18px; flex: none; }
.by-question-head .by-original,
.by-shell > h1 { scroll-margin-top: 74px; }

@media (max-width: 760px) {
  .fusion-active .region-picker-header { display: block; flex: none; order: 2; }
  .by-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .by-question-head, .by-answer-row { gap: 6px; }
  .by-question .answer-choice { gap: 8px; }
}

/* Pilot feedback: bilingual study text and compact exam-group labels. */
.by-study-pair,.by-study-pair>span { display:block; }
.by-study-pair { min-width:0; overflow-wrap:anywhere; }
.by-study-german { display:block; color:var(--muted); font-size:.9em; font-weight:500; line-height:1.5; margin-top:4px; overflow-wrap:anywhere; }
.by-shell h1 .by-study-german { font-size:.6em; margin-top:8px; }
.by-workshop-steps li>p { margin:6px 0 0; }
.by-assembly .practice-image-card>.by-study-pair { display:block; }
.by-fish-group { display:block; margin:12px 0; padding-left:10px; border-left:2px solid var(--line); color:var(--ink); font-size:.85rem; line-height:1.5; overflow-wrap:anywhere; }
.by-fish-group-label { display:block; color:var(--muted); font-size:.85em; }
.by-fish-group>.by-study-german { margin-top:2px; }
