/* ======================================
   QuizTime Manager user guide (/kb/)
   Layers the guide's search, lists and contact box on top of landing.css
   (tokens, navbar, buttons, footer) and legal.css (page shell, tabs,
   document typography). Load after both.
   ====================================== */

.kb-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.legal-eyebrow a {
  color: inherit;
  text-decoration: none;
}

.legal-eyebrow a:hover {
  text-decoration: underline;
}

.kb-lede {
  margin-top: 0.75rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--gray-600);
}

.kb-lede a,
.kb-empty a {
  color: var(--primary-700);
  font-weight: 600;
}

/* ─── Search ─── */
.kb-search {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.kb-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--gray-900);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 0;
}

.kb-search input[type="search"]:focus {
  outline: 2px solid var(--primary-600);
  outline-offset: -1px;
}

/* ─── Topic and article lists ─── */
.kb-section-title,
.kb-contact h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.kb-categories,
.kb-articles {
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary-700);
}

.kb-categories li,
.kb-articles li {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--line);
}

.kb-categories li:first-child,
.kb-articles li:first-child {
  border-top: 0;
}

.kb-categories a,
.kb-articles a {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--primary-800);
  text-decoration: none;
}

.kb-categories a:hover,
.kb-articles a:hover {
  text-decoration: underline;
}

.kb-categories p,
.kb-articles p {
  margin-top: 0.25rem;
  color: var(--gray-600);
  line-height: 1.55;
}

.kb-meta {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.legal-header .kb-meta {
  margin-top: 0.75rem;
}

.kb-empty {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--gray-600);
}

/* ─── "Was this helpful?" ─── */
.kb-helpful {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  color: var(--gray-700);
  font-weight: 600;
}

.kb-helpful .btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.9375rem;
}

/* ─── Contact (on every page; it is the App Store Support URL) ─── */
.kb-contact {
  margin-top: 3rem;
  padding: 2rem 2.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary-700);
  color: var(--gray-700);
}

.kb-contact > p {
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.kb-contact dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.75rem 1.5rem;
}

.kb-contact dt {
  font-weight: 700;
  color: var(--gray-900);
}

.kb-contact dd {
  line-height: 1.55;
}

.kb-contact a {
  color: var(--primary-700);
  font-weight: 600;
}

@media (max-width: 768px) {
  .kb-search {
    flex-direction: column;
  }

  .kb-contact {
    padding: 1.5rem 1.375rem;
  }

  .kb-contact dl {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .kb-contact dd {
    margin-bottom: 0.75rem;
  }
}
