/* ═══════════════════════════════════════════════════════════
   FAQ section — layout-agnostic base styles
   Loaded by baseof.html on any page where .Params.faq is set.
   Used by: blog/notebook, cert-tracker/single, video-single-content
   (cloud-labs + interview-prep both inherit from video partial).

   Notebook layout overrides these in zt-notebook.css with the
   handwritten/paper-feel chrome. Other layouts get the base look:
   clean prose typography with site-wide tokens.
   ═══════════════════════════════════════════════════════════ */

.nb-faq {
  max-width: 720px;
  margin: 56px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--border, #E5E5E5);
}

.nb-faq-heading {
  font-family: inherit;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--text-primary, #1A1A1A);
  letter-spacing: -0.01em;
}

.nb-faq-intro {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary, #404040);
  font-style: italic;
  margin: 0 0 24px;
}

.nb-faq-item {
  padding: 20px 0 22px;
  border-bottom: 1px solid var(--border, #E5E5E5);
}
.nb-faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.nb-faq-q {
  font-family: inherit;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.4;
  margin: 0 0 10px;
  color: var(--text-primary, #1A1A1A);
  letter-spacing: -0.005em;
  position: relative;
}
.nb-faq-q-text { display: inline; }

.nb-faq-a {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary, #404040);
}
.nb-faq-a > *:first-child { margin-top: 0; }
.nb-faq-a > *:last-child { margin-bottom: 0; }
.nb-faq-a p { margin: 0 0 12px; }
.nb-faq-a a {
  color: var(--accent, #4F46E5);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.nb-faq-a a:hover {
  color: var(--accent-hover, #3730A3);
}
.nb-faq-a code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 0.9em;
  background: var(--bg-secondary, #F5F5F5);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text-primary, #1A1A1A);
}
.nb-faq-a ul,
.nb-faq-a ol {
  margin: 8px 0 12px;
  padding-left: 24px;
}
.nb-faq-a li { margin-bottom: 4px; }
.nb-faq-a p,
.nb-faq-a li,
.nb-faq-a a,
.nb-faq-a code {
  hyphens: auto;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Heading anchor — hover-reveal, accent colour */
.nb-faq .heading-anchor {
  color: var(--accent, #4F46E5);
  font-weight: 600;
  font-size: 0.85em;
  margin-left: 8px;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s ease-out;
}
.nb-faq-q:hover .heading-anchor,
.nb-faq-q:focus-within .heading-anchor {
  opacity: 1;
}

/* Mobile */
@media (max-width: 768px) {
  .nb-faq { margin-top: 40px; }
  .nb-faq-heading { font-size: 1.5rem; }
  .nb-faq-q { font-size: 1.05rem; }
}
@media (max-width: 640px) {
  .nb-faq-heading { font-size: 1.375rem; margin-bottom: 18px; }
  .nb-faq-item { padding: 16px 0 18px; }
}
