/* ═══════════════════════════════════════════════════
   v1.32.1–1.32.2 — Compact landing hero + Exam Prep sub-tabs
   Loaded after the main stylesheet on landing / tab pages only.
   ═══════════════════════════════════════════════════ */

/* ── Compact hero: title + search on one row, no illustration ── */
.home-hero.home-hero--with-tabs {
  background: #1A6B9E !important;
  padding: 28px 20px 0 !important;
  min-height: 0;
}
.home-hero--with-tabs .home-hero__content {
  flex: 0 0 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  grid-template-areas: "title search" "sub search";
  column-gap: 32px;
  align-items: center;
}
.home-hero--with-tabs .home-hero__title { grid-area: title; font-size: 28px; margin: 0 0 2px; }
.home-hero--with-tabs .home-hero__subtitle { grid-area: sub; font-size: 15px; margin: 0; }
.home-hero--with-tabs .wp-block-search { grid-area: search; max-width: none; width: 100%; margin: 0; }
.home-hero--with-tabs .wp-block-search__label {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.home-hero--with-tabs .home-hero__tabs-bar { padding-top: 22px; }

@media (max-width: 781px) {
  .home-hero.home-hero--with-tabs { padding: 20px 16px 0 !important; text-align: left; }
  .home-hero--with-tabs .home-hero__content {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "search";
    row-gap: 12px;
  }
  .home-hero--with-tabs .home-hero__title { font-size: 24px; }
  .home-hero--with-tabs .home-hero__subtitle { display: none; }
  .home-hero--with-tabs .home-hero__tabs-bar { padding-top: 16px !important; }
}

/* ── Exam Prep (1.32.2): sub-tabs, each its own URL ── */
.home-exam-prep { position: relative; }
.home-exam-prep .screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.home-exam-prep__anchor { position: absolute; top: -80px; }
.home-exam-prep__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; margin-bottom: 14px;
}
.ep-subtabs {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px;
  background: var(--bg-secondary, #F9FAFB); border: 1px solid var(--border-primary, #E5E7EB);
}
.ep-subtab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px;
  border-radius: 9px; font-size: 16px; font-weight: 700; white-space: nowrap;
  color: var(--content-secondary, #4B5563); text-decoration: none;
}
.ep-subtab .calc-link-icon { width: 18px; height: 18px; opacity: 0.7; }
.ep-subtab:hover { color: var(--content-primary, #1A2331); text-decoration: none; background: rgba(0, 0, 0, 0.03); }
.ep-subtab.is-active {
  background: var(--bg-primary, #fff); color: var(--content-primary, #1A2331);
  box-shadow: 0 1px 3px rgba(15, 22, 36, 0.14);
}
.ep-subtab.is-active .calc-link-icon { opacity: 1; color: #1E7CB8; }
.ep-subtab__count {
  font-size: 12px; font-weight: 700; line-height: 1; padding: 4px 8px; border-radius: 999px;
  background: #EBF5FA; color: #155884;
}
.ep-subtab:nth-child(2) .ep-subtab__count { background: #ECFDF5; color: #047857; }
.ep-subtab:focus-visible { outline: 2px solid #1E7CB8; outline-offset: 2px; }
.home-exam-prep__title {
  font-size: 16px; font-weight: 600; margin: 0 0 6px; color: var(--content-secondary, #4B5563);
}
.home-exam-prep__filter {
  width: 260px; min-height: 44px; padding: 9px 12px; font-size: 15px;
  border: 1px solid var(--border-primary, #E5E7EB); border-radius: 8px;
  background: var(--bg-primary, #fff); color: var(--content-primary);
}
.home-exam-prep__filter:focus { outline: 2px solid var(--border-brand, #1E7CB8); outline-offset: 1px; }
.home-exam-prep__empty { color: var(--content-tertiary); margin-top: 16px; }
.home-exam-prep__grid { margin-top: 14px; }
.home-calcs-domain[hidden], .ep-item[hidden] { display: none; }

/* Cheat sheets: unit / part links under each exam */
.ep-item__subs {
  display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 0 10px 6px 30px;
  font-size: 12.5px; line-height: 1.5;
}
.ep-item__group { display: flex; flex: 0 0 100%; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.ep-item__prefix { color: var(--content-tertiary, #6B7280); font-weight: 600; }
.ep-item__subs a { color: #047857; font-weight: 600; text-decoration: none; }
.ep-item__subs a:hover { text-decoration: underline; }

@media (max-width: 781px) {
  .ep-subtabs { display: flex; width: 100%; }
  .ep-subtab { flex: 1 1 0; justify-content: center; padding: 8px 10px; font-size: 15px; }
  .home-exam-prep__filter { width: 100%; }
  .home-exam-prep__grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 400px) {
  .ep-subtab .calc-link-icon { display: none; }
}

/* ── Dark mode ── */
html.dark-mode .ep-subtabs { background: #0F1624; border-color: #2B3544; }
html.dark-mode .ep-subtab { color: #9CA3AF; }
html.dark-mode .ep-subtab.is-active { background: #1F2937; color: #e0e4ea; }
html.dark-mode .ep-subtab__count { background: rgba(30, 124, 184, 0.22); color: #A8D4F0; }
html.dark-mode .ep-subtab:nth-child(2) .ep-subtab__count { background: rgba(16, 185, 129, 0.18); color: #6EE7B7; }
html.dark-mode .home-exam-prep__title { color: #9CA3AF; }
html.dark-mode .ep-item__subs a { color: #6EE7B7; }
html.dark-mode .home-exam-prep__filter { background: #0F1624; border-color: #2B3544; color: #e0e4ea; }
