/* taitest.es 3.4.8 · revisión de marca y experiencia de examen */

/* La misma firma visual se utiliza en cabecera y pie. */
.footer-brand { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 12px; background: #fff; }
.footer-brand-wordmark { display: block; width: 226px; height: auto; object-fit: contain; }

/* Portada: representación equilibrada de los dos bloques prácticos. */
.floating-chip-three {
  top: 42%;
  right: -42px;
  color: #0a4fb8;
  animation-delay: -1.1s;
}

/* Constructor de test y previsión de tiempo. */
.builder-with-time { grid-template-columns: minmax(145px,.8fr) minmax(230px,1.35fr) minmax(130px,.68fr) minmax(105px,.52fr) minmax(190px,.9fr) auto; }
.test-duration-preview { display: inline-flex; align-items: center; min-height: 34px; padding: 7px 11px; border: 1px solid #c6d9f7; border-radius: 999px; background: #f1f6ff; color: #0a4db8; font-size: .78rem; font-weight: 800; white-space: nowrap; }

/* Tiempo global con ritmo objetivo visible, sin bloquear cada pregunta. */
.test-toolbar-inner { min-height: 52px; }
.test-pace { color: #52647e; font-size: .77rem; font-weight: 750; white-space: nowrap; }
.timer-group { display: grid; justify-items: end; gap: 2px; }
.timer-group small { color: #718097; font-size: .64rem; font-weight: 750; letter-spacing: .02em; }
.timer-group .timer { min-width: 100px; text-align: center; }

/* Bloque y número de tema siempre aparecen juntos; el título conserva contexto. */
.topic-title-tag { max-width: min(560px, 62vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-table-title { display: inline-block; max-width: 700px; margin-top: 6px; color: #253753; line-height: 1.45; }

/* "En blanco" es una decisión válida desde el primer momento. */
.question-tool.blank-active { border-color: #9aa9bd; background: #edf1f6; color: #30435e; box-shadow: inset 0 0 0 1px rgba(71,91,120,.08); }
.question-dot.blank { border-color: #aeb9c7; background: #edf1f5; color: #506078; }
.legend { flex-wrap: wrap; }
.legend span:nth-child(1)::before { border: 0; background: #eaf3ff; }
.legend span:nth-child(2)::before { border: 1px solid #1267f4; background: #fff; }
.legend span:nth-child(3)::before { border: 1px solid #aeb9c7; background: #edf1f5; }
.legend span:nth-child(4)::before { border: 0; background: #f1b936; }

@media (max-width: 1180px) {
  .app-shell .brand-wordmark { display: block; width: 195px; }
  .app-shell .brand-icon-compact { display: none; }
  .app-shell .nav-toggle { display: block; }
  .app-shell .main-nav { display: none; position: absolute; top: 76px; left: 16px; right: 16px; max-height: calc(100vh - 96px); overflow: auto; border: 1px solid var(--line); border-radius: 15px; padding: 10px; background: #fff; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
  .app-shell .main-nav.open { display: flex; }
  .app-shell .user-menu { margin: 5px 0 0; padding: 10px 5px 2px; border-left: 0; border-top: 1px solid var(--line); }
  .builder-with-time { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .builder-with-time .btn { min-height: 46px; }
}

@media (max-width: 900px) {
  /* Con el menú ya plegado hay espacio para mantener el logotipo completo. */
  .app-shell .brand-wordmark,
  .public-shell .brand-wordmark { display: block; width: min(195px, 50vw); }
  .app-shell .brand-icon-compact,
  .public-shell .brand-icon-compact { display: none; }
  .floating-chip-three { right: -8px; }
  .builder-with-time { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 620px) {
  .topbar-inner { padding-block: 7px; }
  .app-shell .brand-wordmark,
  .public-shell .brand-wordmark { width: min(178px, 55vw); }
  .builder-with-time { grid-template-columns: 1fr; }
  .test-duration-preview { margin-top: 8px; white-space: normal; }
  .test-toolbar-inner { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px 12px; }
  .test-toolbar-inner > strong { grid-column: 1 / -1; }
  .test-toolbar-inner > span:nth-of-type(1) { grid-column: 1; }
  .test-pace { grid-column: 1; }
  .autosave-status { grid-column: 1; order: initial; width: auto; text-align: left; }
  .timer-group { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
  .topic-title-tag { max-width: 82vw; }
  .footer-brand-wordmark { width: min(215px, 72vw); }
}

@media (max-width: 390px) {
  .app-shell .brand-wordmark,
  .public-shell .brand-wordmark { width: 160px; }
  .test-pace { font-size: .7rem; }
  .timer-group .timer { min-width: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  .floating-chip-three { animation: none !important; }
}
