/* Supplemental styling for the User Guide (/guide) view.
 *
 * Covers the guide reference panels (downloadable PDF, user roles, authoring
 * guidance, approver governance, administration) and the FAQ accordion.
 *
 * Kept in its own stylesheet so the large shared styles.css stays focused.
 * Loaded from index.html alongside the base portal stylesheet.
 */

/* ---------------------------------------------------------------- panels */

.guide-panel {
  display: grid;
  gap: 0.55rem;
  padding: 1.5rem 1.6rem 1.6rem;
  margin-top: 1.25rem;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(25, 36, 46, 0.08);
  box-shadow: 0 10px 24px rgba(16, 20, 24, 0.05);
}

.guide-panel-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-deep);
}

.guide-panel-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  line-height: 1.2;
}

.guide-panel-lede {
  margin: 0 0 0.55rem;
  max-width: 60ch;
  line-height: 1.65;
  color: var(--muted);
}

/* ------------------------------------------------------------- subcards */

.guide-subcard-stack {
  display: grid;
  gap: 0.75rem;
}

.guide-subcard {
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(25, 36, 46, 0.1);
  background: rgba(25, 36, 46, 0.02);
}

.guide-subcard-title {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  line-height: 1.35;
}

.guide-subcard-copy {
  margin: 0;
  line-height: 1.65;
  color: var(--muted);
}

/* ------------------------------------------------------ download panel */

.guide-download-panel {
  background:
    linear-gradient(
      135deg,
      rgba(242, 179, 37, 0.12),
      rgba(242, 179, 37, 0) 55%
    ),
    #ffffff;
  border-color: rgba(242, 179, 37, 0.45);
}

.guide-download-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  justify-self: start;
  text-decoration: none;
}

.guide-download-icon svg {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ----------------------------------------------------------------- FAQ */

.gfaq-categories {
  display: grid;
  gap: 1.4rem;
}

.gfaq-category-title {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-deep);
}

.gfaq-list {
  display: grid;
  gap: 0.5rem;
}

.gfaq-item {
  border: 1px solid rgba(25, 36, 46, 0.1);
  border-radius: 14px;
  background: rgba(25, 36, 46, 0.02);
  padding: 0.8rem 1.05rem;
}

.gfaq-item[open] {
  border-color: rgba(14, 138, 166, 0.35);
  background: rgba(14, 138, 166, 0.04);
}

.gfaq-question {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  line-height: 1.45;
}

.gfaq-question::-webkit-details-marker {
  display: none;
}

.gfaq-question:focus-visible {
  outline: 2px solid rgba(14, 138, 166, 0.4);
  outline-offset: 4px;
  border-radius: 8px;
}

/* Plus/minus affordance rendered as a glyph so it stays a clean "+" when
 * collapsed and a "−" when expanded, matching the guide design. */
.gfaq-marker {
  flex: 0 0 auto;
  width: 0.72rem;
  align-self: center;
  color: var(--brand);
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.gfaq-marker::before {
  content: "+";
}

.gfaq-item[open] .gfaq-marker::before {
  content: "\2212";
}

.gfaq-question-text {
  flex: 1 1 auto;
}

.gfaq-answer {
  display: grid;
  gap: 0.6rem;
  padding: 0.65rem 0 0 1.47rem;
}

.gfaq-answer-copy {
  margin: 0;
  line-height: 1.65;
  color: var(--muted);
}

.gfaq-answer-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.4rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------------------------------------------------- preferences, dark */

:root[data-display-theme="dark"] .guide-panel {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

:root[data-display-theme="dark"] .guide-download-panel {
  background:
    linear-gradient(
      135deg,
      rgba(242, 179, 37, 0.14),
      rgba(242, 179, 37, 0) 55%
    ),
    rgba(255, 255, 255, 0.03);
  border-color: rgba(242, 179, 37, 0.4);
}

:root[data-display-theme="dark"] .guide-subcard,
:root[data-display-theme="dark"] .gfaq-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

:root[data-display-theme="dark"] .gfaq-item[open] {
  background: rgba(99, 200, 223, 0.08);
  border-color: rgba(99, 200, 223, 0.4);
}

/* -------------------------------------------------------------- narrow */

@media (max-width: 720px) {
  .guide-panel {
    padding: 1.2rem 1.15rem 1.3rem;
  }

  .guide-download-action {
    justify-self: stretch;
  }
}
