/* v17 pixel polish: top nav, right wrongbook card, button proportions */

/* Top navigation icons without changing layout logic */
.nav-item b {
  display: inline-flex !important;
  align-items: center;
  gap: 9px;
}
.nav-item b::before {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: currentColor;
  font-size: 21px;
  line-height: 1;
}
.nav-item[data-panel="home"] b::before { content: "⌂"; font-size: 24px; }
.nav-item[data-panel="practice"] b::before { content: "▥"; }
.nav-item[data-panel="stats"] b::before { content: "▥"; transform: rotate(90deg); }
.nav-item[data-panel="wrong"] b::before { content: "☆"; }
.nav-item[data-panel="exam"] b::before { content: "♙"; }
.nav-item[data-panel="practice"] { display: none !important; }
.nav-extra { display: inline-flex !important; }

/* Homepage density closer to reference */
.home-dashboard {
  padding-top: 2px;
}
.level-select-card {
  min-height: 138px !important;
}
.level-select-card b {
  font-size: 46px !important;
}
.today-plan-card {
  min-height: 210px;
  align-items: center;
}
.quick-start-home button {
  position: relative;
  overflow: hidden;
}
.quick-start-home button::after {
  content: "→";
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: #64748b;
  font-weight: 950;
}
.home-stat-row b {
  color: #0b6fff !important;
}
.home-streak-card h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.home-streak-card h4 b {
  color: #0f172a;
  font-size: 30px;
}

/* Practice page main card refinements */
.route-n2 .collections {
  justify-content: flex-start;
}
.collection-chip {
  min-width: 96px;
  justify-content: center;
}
.question-head {
  border-bottom-color: #e8eef6 !important;
}
.question-progress-wrap::after {
  content: attr(data-progress);
}
.prompt:not(.split-layout) {
  border: 1px solid #e0e7f0;
  border-radius: 12px;
  padding: 26px 34px !important;
  background: #fff;
}
body.is-answer-revealed .prompt:not(.split-layout) {
  border: 0;
  border-radius: 0;
  padding: 0 !important;
}
.option-btn {
  transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.option-btn:not(:disabled):hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .055) !important;
}
.question-actions {
  grid-template-columns: 220px minmax(280px, 1fr) 220px !important;
}
#prevBtn::before { content: "← "; }
#nextBtn::after { content: " →"; }
.favorite-btn::before { content: "☆ "; }
.favorite-btn.active::before { content: "★ "; }

/* Right rail: wrongbook mini list like reference */
.wrong-preview {
  margin-top: 20px;
  border-top: 1px solid #edf2f7;
  padding-top: 18px;
}
.wrong-preview-head,
.wrong-preview-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #0f172a;
}
.wrong-preview-head b,
.wrong-preview-empty b {
  font-size: 20px;
  font-weight: 950;
}
.wrong-preview-head small {
  color: #ef4444;
  font-size: 18px;
  font-weight: 950;
}
.wrong-preview-empty {
  flex-direction: column;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fafc;
}
.wrong-preview-empty span {
  color: #64748b;
  font-weight: 700;
}
.wrong-preview-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr 22px;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 8px;
}
.wrong-preview-item b {
  color: #ef4444;
  font-size: 14px;
  white-space: nowrap;
}
.wrong-preview-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
  font-size: 13px;
  font-weight: 750;
}
.wrong-preview-item em {
  justify-self: end;
  color: #ef4444;
  font-style: normal;
  font-weight: 950;
  font-size: 18px;
}
.wrongbook-link {
  min-height: 54px !important;
  margin-top: 12px !important;
  padding: 14px 46px 14px 18px !important;
  border-color: #cfe0ff !important;
  color: #0b6fff !important;
  text-align: center !important;
  background: #fff !important;
}
.wrongbook-link small { display: none !important; }
.wrongbook-link b { top: 10px !important; right: 16px !important; }

/* Reading/listening spacing polish */
body.is-reading-question .question-head,
body.is-listening-question .question-head {
  min-height: 94px !important;
}
body.is-listening-question .options {
  padding-top: 12px !important;
}
.audio-prompt-v16 .audio-subtype {
  background: #eef5ff !important;
  color: #0b6fff !important;
  border-color: #bfd7ff !important;
  font-weight: 900;
}

@media (max-width: 980px) {
  .nav-item[data-panel="practice"] { display: inline-flex !important; }
  .nav-extra { display: none !important; }
  .side-nav { gap: 14px !important; }
  .nav-item { min-width: auto !important; }
}

@media (max-width: 760px) {
  .prompt:not(.split-layout) {
    margin-left: 14px !important;
    margin-right: 14px !important;
    padding: 18px 20px !important;
  }
  .question-actions {
    grid-template-columns: 1fr 1fr !important;
  }
  .wrong-preview-item {
    grid-template-columns: 42px 1fr 18px;
  }
}
