/* Сетка выбора билета — поверх hq-стилей из /pdd/slozhnye/ */

.tp-picker {
  margin: 0 0 1.25rem;
}

.tp-picker__head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.tp-picker__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.tp-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 720px) {
  .tp-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (min-width: 1100px) {
  .tp-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

.tp-handbook {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 1.1rem;
}

@media (min-width: 720px) {
  .tp-handbook {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

.tp-handbook__card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 14px;
  text-decoration: none;
  border: 1px solid var(--hq-line, rgba(238, 243, 251, 0.16));
  background: var(--hq-card, rgba(8, 18, 38, 0.72));
  color: var(--hq-ink, #eef3fb);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  min-height: 88px;
}

.tp-handbook__card:hover,
.tp-handbook__card:focus-visible {
  border-color: rgba(212, 160, 70, 0.55);
  background: rgba(212, 160, 70, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.tp-handbook__icon-wrap {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  display: block;
}

@media (min-width: 720px) {
  .tp-handbook__icon-wrap {
    flex-basis: 80px;
    width: 80px;
    height: 80px;
  }
}

.tp-handbook__icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  margin: 0;
  background: transparent !important;
  border: none;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 6px 14px rgba(20, 30, 50, 0.22));
  pointer-events: none;
}

/* тема: светлая — light; тёмная — dark (без дисков-подложек) */
.tp-handbook__icon--dark {
  display: none;
}

html:not([data-theme="light"]) .tp-handbook__icon--light {
  display: none;
}

html:not([data-theme="light"]) .tp-handbook__icon--dark {
  display: block;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
}

html[data-theme="light"] .tp-handbook__icon--light {
  display: block;
}

html[data-theme="light"] .tp-handbook__icon--dark {
  display: none;
}

.tp-handbook__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.tp-handbook__label {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.2;
}

.tp-handbook__hint {
  font-size: 0.8rem;
  opacity: 0.72;
  line-height: 1.25;
}

html[data-theme="light"] .tp-handbook__card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(30, 40, 60, 0.12);
  color: #1a2433;
}

.tp-cell {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 1px solid var(--hq-line, rgba(238, 243, 251, 0.16));
  background: var(--hq-card, rgba(8, 18, 38, 0.72));
  color: var(--hq-ink, #eef3fb);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.tp-cell:hover {
  border-color: var(--hq-pick-border, rgba(120, 180, 255, 0.5));
  background: var(--hq-pick, rgba(90, 160, 255, 0.16));
}

.tp-cell.is-active {
  border-color: var(--hq-pick-border, rgba(120, 180, 255, 0.5));
  background: var(--hq-pick, rgba(90, 160, 255, 0.16));
  box-shadow: 0 0 0 2px rgba(90, 160, 255, 0.25);
}

.tp-cell.is-passed {
  border-color: rgba(70, 190, 120, 0.55);
  background: rgba(40, 140, 90, 0.28);
  color: #dff8e8;
}

.tp-cell.is-failed {
  border-color: rgba(230, 90, 90, 0.55);
  background: rgba(160, 50, 50, 0.28);
  color: #ffe4e4;
}

.tp-back {
  margin: 0 0 0.75rem;
}

.tp-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1rem;
}

.tp-note {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  color: var(--hq-muted, #9eb4d4);
}

button.hq__tip-sign-code.is-link,
button.hq__tip-ref.is-link {
  appearance: none;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: rgba(120, 180, 255, 0.16);
  color: inherit;
  padding: 0.05em 0.4em;
  margin: 0 0.1em;
  border-radius: 5px;
}

html[data-theme="light"] .hq__feedback.is-bad button.hq__tip-sign-code.is-link,
html[data-theme="light"] .hq__feedback.is-bad button.hq__tip-ref.is-link {
  background: rgba(200, 40, 30, 0.12);
  color: #a31b14;
}

html[data-theme="light"] .hq__feedback.is-ok button.hq__tip-sign-code.is-link,
html[data-theme="light"] .hq__feedback.is-ok button.hq__tip-ref.is-link {
  background: rgba(0, 150, 60, 0.14);
  color: #0a6b30;
}

.hq__tip--source button.hq__tip-ref.is-link {
  background: transparent;
  padding: 0;
  margin: 0;
}

/* VK ID lite + cloud grid */
.tp-vk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 0.85rem;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--hq-line, rgba(238, 243, 251, 0.16));
  background: var(--hq-card, rgba(8, 18, 38, 0.55));
}
.tp-vk__btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  background: #0077FF;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tp-vk__btn:hover,
.tp-vk__btn:focus-visible {
  filter: brightness(1.06);
  outline: none;
}
.tp-vk__btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.28);
  color: inherit;
  font-weight: 600;
}
html[data-theme="light"] .tp-vk__btn--ghost {
  border-color: rgba(20,40,80,0.22);
}
.tp-vk__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255,255,255,0.2);
  font-size: 0.65rem;
  font-weight: 800;
}
.tp-vk__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.tp-vk__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4caf70;
}
.tp-vk__name {
  font-weight: 700;
  font-size: 0.92rem;
}
.tp-vk__hint {
  font-size: 0.78rem;
  opacity: 0.72;
}
.tp-vk__onetap {
  flex: 1 1 220px;
  min-width: min(100%, 220px);
  max-width: 360px;
}
.tp-vk__onetap iframe,
.tp-vk__onetap > div {
  max-width: 100%;
}

/* Hero CTA with juicy exam icon */
.btn-row .btn--exam {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px;
}
.btn-row .btn--exam img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 36px;
  filter: drop-shadow(0 4px 10px rgba(20,30,50,0.25));
}
