/* =========================================================
   VOCABULARY TEST
   Дополнительные стили словарной страницы

   Общие стили сайта:
   ../styles.css

   Общий каркас тестов:
   ../test/test.css
========================================================= */


/* =========================================================
   TEST SECTION
========================================================= */

#vocabulary-test{
  scroll-margin-top: 110px;
}





/* =========================================================
   VOCABULARY SIZE TEST — INSTRUCTIONS
========================================================= */

.vocabulary-instructions{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);

  margin: var(--space-7) 0 var(--space-8);

  text-align: left;
}

.vocabulary-instruction{
  display: flex;
  align-items: flex-start;
  gap: 13px;

  min-width: 0;

  padding: 18px;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background: var(--surface-soft);
}

.vocabulary-instruction__number{
  flex: 0 0 30px;

  width: 30px;
  height: 30px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--silver-300);
  border-radius: 50%;

  color: #fff;
  background: var(--navy-700);

  font-size: 13px;
  line-height: 1;
  font-weight: 800;
}

.vocabulary-instruction strong{
  display: block;

  margin: 3px 0 6px;

  color: var(--navy-800);

  font-size: 14px;
}

.vocabulary-instruction p{
  margin: 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.55;
}


/* =========================================================
   WORD TEST SHELL
========================================================= */


.vocab-stage-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);

  margin-bottom: var(--space-6);
}

.vocab-stage-head__content{
  min-width: 0;
}

.vocab-stage-head__label{
  margin: 0 0 7px;

  color: var(--muted-2);

  font-size: 13px;
  font-weight: 700;
}

.vocab-stage-head .h2{
  margin: 0;
}

.vocab-selection-count{
  flex: 0 0 auto;

  padding: 9px 13px;

  border: 1px solid var(--border);
  border-radius: var(--radius-pill);

  color: var(--navy-800);
  background: var(--surface-soft);

  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}


/* =========================================================
   WORD GRID
========================================================= */

.vocab-words{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;

  margin-top: var(--space-6);
}

.vocab-word{
  position: relative;

  min-width: 0;
  min-height: 58px;

  display: flex;
  align-items: center;
  gap: 11px;

  padding: 12px 14px;

  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);

  color: var(--text);
  background: var(--surface);

  cursor: pointer;
  user-select: none;

  transition:
    color var(--t) var(--ease),
    border-color var(--t) var(--ease),
    background var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    transform var(--t) var(--ease);
}

.vocab-word:hover{
  border-color: var(--silver-500);

  background: var(--surface-soft);

  box-shadow: var(--shadow-sm);

  transform: translateY(-1px);
}

.vocab-word:focus-within{
  outline: 3px solid rgba(24,59,114,0.14);
  outline-offset: 2px;
}

.vocab-word.is-selected{
  color: var(--navy-900);

  border-color: var(--navy-600);

  background: rgba(24,59,114,0.055);

  box-shadow:
    0 0 0 3px rgba(24,59,114,0.07);
}


/* Настоящий checkbox остаётся доступным
   для клавиатуры и экранных дикторов */

.vocab-word__input{
  position: absolute;

  width: 1px;
  height: 1px;

  overflow: hidden;

  opacity: 0;
  pointer-events: none;
}

.vocab-word__mark{
  flex: 0 0 24px;

  width: 24px;
  height: 24px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--silver-400);
  border-radius: 7px;

  color: transparent;
  background: #fff;

  font-size: 14px;
  line-height: 1;
  font-weight: 900;

  transition:
    color var(--t) var(--ease),
    border-color var(--t) var(--ease),
    background var(--t) var(--ease),
    transform var(--t) var(--ease);
}

.vocab-word__input:checked ~ .vocab-word__mark{
  color: #fff;

  border-color: var(--navy-700);
  background: var(--navy-700);

  transform: scale(1.04);
}

.vocab-word__text{
  min-width: 0;

  overflow-wrap: anywhere;

  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
}


/* =========================================================
   STAGE NOTE
========================================================= */

.vocab-stage-note{
  margin: var(--space-6) 0 0;
  padding: 14px 16px;

  border: 1px solid var(--border);
  border-radius: var(--radius-sm);

  color: var(--muted);
  background: var(--surface-soft);

  font-size: 13px;
  line-height: 1.6;
}


/* =========================================================
   TEST NAVIGATION
========================================================= */

.vocab-navigation{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-top: var(--space-7);
}

.vocab-navigation__next{
  margin-left: auto;
}


/* =========================================================
   VOCABULARY RESULT
========================================================= */

.vocab-result__eyebrow{
  margin: 13px 0 6px;

  color: var(--muted-2);

  font-size: 13px;
  font-weight: 700;
}

.vocab-result__estimate{
  margin: 0;

  color: var(--navy-800);

  font-family:
    "Lora",
    Georgia,
    serif;

  font-size: clamp(46px, 8vw, 76px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.vocab-result__unit{
  margin: 8px 0 0;

  color: var(--heading);

  font-size: 17px;
  font-weight: 800;
}

.vocab-result__range{
  margin: 8px 0 var(--space-6);

  color: var(--muted);

  font-size: 14px;
}

.vocab-result__description{
  max-width: 720px;

  margin: 0 auto var(--space-7);

  color: var(--muted);

  line-height: 1.75;
}


/* =========================================================
   RESULT SUMMARY
========================================================= */

.vocab-result-summary{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);

  margin: var(--space-7) 0;
}

.vocab-result-summary__item{
  padding: 20px 14px;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background: var(--surface-soft);
}

.vocab-result-summary__item strong{
  display: block;

  margin-bottom: 5px;

  color: var(--navy-800);

  font-size: 20px;
}

.vocab-result-summary__item span{
  color: var(--muted-2);

  font-size: 13px;
}


/* =========================================================
   RELIABILITY
========================================================= */

.vocab-reliability{
  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin-bottom: var(--space-6);
  padding: 8px 13px;

  border: 1px solid var(--border);
  border-radius: var(--radius-pill);

  color: var(--navy-800);
  background: var(--surface-soft);

  font-size: 13px;
  font-weight: 800;
}

.vocab-reliability__dot{
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--navy-600);
}

.vocab-reliability--medium .vocab-reliability__dot{
  background: var(--silver-600);
}

.vocab-reliability--low .vocab-reliability__dot{
  background: var(--muted-2);
}


/* =========================================================
   FREQUENCY BANDS
========================================================= */

.vocab-bands{
  margin-top: var(--space-5);
}

.vocab-band{
  margin-bottom: 17px;
}

.vocab-band:last-child{
  margin-bottom: 0;
}

.vocab-band__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);

  margin-bottom: 7px;

  color: var(--muted);

  font-size: 13px;
}

.vocab-band__top strong{
  color: var(--heading);
}

.vocab-band__bar{
  height: 8px;

  overflow: hidden;

  border-radius: var(--radius-pill);

  background: var(--platinum-300);
}

.vocab-band__fill{
  height: 100%;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      var(--silver-500),
      var(--navy-700)
    );

  transition:
    width var(--t-slow) var(--ease);
}


/* =========================================================
   METHODOLOGY NOTE
========================================================= */

.vocab-method-note{
  max-width: 760px;

  margin: 30px auto;
  padding: 18px 20px;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  color: var(--muted);
  background: var(--surface-soft);

  font-size: 13px;
  line-height: 1.7;
}

.vocab-method-note a{
  color: var(--navy-700);

  font-weight: 700;
  text-underline-offset: 3px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px){

  .vocabulary-instructions{
    grid-template-columns: 1fr;
  }

  .vocab-words{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px){

  #vocabulary-test{
    scroll-margin-top: 84px;
  }

  .vocab-stage-head{
    display: block;
  }

  .vocab-selection-count{
    display: inline-flex;

    margin-top: 14px;
  }

  .vocab-words{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .vocab-word{
    min-height: 54px;

    padding: 11px 12px;
  }

  .vocab-word__text{
    font-size: 14px;
  }

  .vocab-result-summary{
    grid-template-columns: 1fr;
  }

  .vocab-navigation{
    flex-direction: column-reverse;
  }

  .vocab-navigation .btn{
    width: 100%;
  }

  .vocab-navigation__next{
    margin-left: 0;
  }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px){

  .vocab-words{
    grid-template-columns: 1fr;
  }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce){

  .vocab-word,
  .vocab-word__mark,
  .vocab-band__fill{
    transition: none;
  }

  .vocab-word:hover{
    transform: none;
  }

}

/* =========================================================
   FULL-WIDTH TEST BLOCK
========================================================= */

#vocabulary-test .test-start,
#vocabulary-test .test-box{
  width: 100%;
}