/* Collapsed "About this page" guide — see templates/_page_guide.html.
 *
 * Ported from user-mgmt, but NOT copied: that version hard-codes its hexes and keys dark mode
 * off a data-theme attribute the portal sets. This app has neither, so the guide is built from
 * app.css's own tokens instead and inherits this app's light and dark palettes automatically.
 * A copied stylesheet would have looked right in light mode and wrong in dark. */

.page-guide {
  margin: 0 0 1.1rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  background: var(--brand-tint);
  font-size: .84rem;
  line-height: 1.5;
  color: var(--text);
}

.page-guide-summary {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .75rem;
  cursor: pointer; font-weight: 600;
  color: var(--brand);
  list-style: none; user-select: none;
}
/* Replace the native disclosure triangle with one that behaves the same on both engines. */
.page-guide-summary::-webkit-details-marker { display: none; }
.page-guide-summary::after {
  content: '▸'; margin-left: auto; font-size: .78rem; color: var(--gray);
  transition: transform .15s ease;
}
.page-guide[open] > .page-guide-summary::after { transform: rotate(90deg); }
.page-guide-summary:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.page-guide-summary:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: -2px; }

.page-guide-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.05rem; height: 1.05rem; flex: 0 0 auto;
  border-radius: 50%; background: var(--brand); color: #fff;
  font-size: .7rem; font-weight: 700;
}
.page-guide-tabname {
  margin-left: .15rem; padding: .05rem .4rem; border-radius: 3px;
  background: var(--gray-light); color: var(--brand); font-size: .72rem; font-weight: 600;
}

.page-guide-body { padding: .1rem .9rem .7rem 2.25rem; border-top: 1px solid var(--border); }
.page-guide-body > p:first-child { margin-top: .6rem; }
.page-guide-body p  { margin: 0 0 .5rem; }
.page-guide-body ul, .page-guide-body ol { margin: 0 0 .5rem; padding-left: 1.15rem; }
.page-guide-body li { margin-bottom: .28rem; }
.page-guide-body b  { color: var(--text); }
.page-guide-body a  { color: var(--brand-deep); }
.page-guide-body code {
  padding: .05rem .3rem; border-radius: 3px; background: var(--gray-light); font-size: .94em;
}
.page-guide-meta { margin: .55rem 0 0 !important; font-size: .71rem; color: var(--gray); }

.page-guide-missing {
  display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem;
  border-left-color: var(--red);
  background: color-mix(in srgb, var(--red) 10%, transparent);
  color: var(--red);
}
.page-guide-missing .page-guide-badge { background: var(--red); }

/* Phones: pull the body indent back so the text is not squeezed into a narrow column. */
@media (max-width: 640px) {
  .page-guide-body { padding-left: .9rem; }
  .page-guide { font-size: .87rem; }
}
@media print { .page-guide { display: none; } }
