.df-app [hidden] { display: none !important; }
.df-app .toolbar label { font-weight: 750; }
.df-app .icon path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.df-activity {
  --df-card-width: clamp(300px, 57vh, 550px);
  display: grid;
  justify-items: center;
  align-content: start;
  gap: clamp(8px, 1.5vh, 16px);
  padding: clamp(12px, 2.3vh, 26px) clamp(12px, 2vw, 30px) 14px;
  min-width: 0;
}

.df-activity > h2 {
  margin: 0;
  color: #153b50;
  font-size: clamp(2rem, 4.2vw, 3.7rem);
  line-height: 1.06;
}

.df-prompt {
  display: grid;
  align-items: center;
  min-block-size: 2.6em;
  max-width: 66ch;
  margin: 0;
  font-size: clamp(1rem, 1.53vw, 1.25rem);
  line-height: 1.3;
  text-align: center;
}

.df-prompt[data-feedback] { color: #873913; font-weight: 700; }

.df-actions,
.df-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.df-actions { min-height: 48px; }
.df-choices > button { min-width: 88px; }

.df-actions button {
  min-height: 48px;
  padding: 4px 16px;
  border: 1px solid #9fb7c9;
  border-radius: 8px;
  background: white;
  color: #153b50;
  font: inherit;
  font-size: clamp(1rem, 1.53vw, 1.25rem);
  font-weight: 750;
  cursor: pointer;
}

.df-actions button:hover { background: #e4f2f8; }
.df-actions .df-primary { background: #08597b; border-color: #08597b; color: white; }
.df-actions .df-primary:hover { background: #0a4a66; }
.df-app :focus-visible { outline: 3px solid #08769d; outline-offset: 3px; }
.df-prompt:focus { outline: none; }

.df-cards {
  display: grid;
  gap: 12px;
  width: min(100%, var(--df-card-width));
}

.df-cards.df-comparing {
  width: min(100%, calc(var(--df-card-width) + var(--df-card-width) + 12px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.df-route-card {
  min-width: 0;
  padding: 10px 12px 5px;
  border: 1px solid #cbdde7;
  border-radius: 14px;
  background: white;
}

.df-factorisation {
  min-height: 1.25em;
  margin: 0;
  color: #153b50;
  text-align: center;
  font-size: clamp(1.18rem, 2.2vw, 1.85rem);
  line-height: 1.25;
  font-weight: 750;
}

.df-model .question-visual { width: 100%; margin: 0; }
.df-model svg.classroom-factor-route-visual { display: block; width: 100%; height: auto; max-height: none; }

@media screen and (min-width: 900px) {
  .df-prompt { max-width: min(100%, 94ch); min-block-size: 1.3em; }
}
@media screen and (max-width: 730px) {
  .df-activity { --df-card-width: 480px; }
  .df-prompt { min-block-size: 3.9em; }
  .df-cards.df-comparing { width: min(100%, var(--df-card-width)); grid-template-columns: minmax(0, 1fr); }
}

@media print {
  @page { size: A4 landscape; margin: 8mm; }
  .df-app { display: block; height: auto; min-height: 0; }
  .df-app .toolbar, .df-app .top-actions, .df-actions { display: none !important; }
  .df-activity { --df-card-width: 131mm; padding: 3mm 0 0; }
  .df-activity > h2 { font-size: 28pt; }
  .df-prompt { font-size: 14pt; }
  .df-route-card { break-inside: avoid; print-color-adjust: exact; }
}
