/* In-app user guide, and the same screen at help/guide/index.html.
   The page text is generated from docs/guide/content.py. */

body.app-guide-open {
  overflow: hidden;
}

.app-guide {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: var(--bg-dark, #0f172a);
  color: var(--text-main, #e2e8f0);
  flex-direction: column;
  font-family: Inter, system-ui, sans-serif;
}

.app-guide.open,
.guide-standalone .app-guide {
  display: flex;
}

.guide-standalone {
  margin: 0;
  background: #0f172a;
  color: #e2e8f0;
  --bg-dark: #0f172a;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --primary: #38bdf8;
  --border: #334155;
  --card-dark: #131c33;
}

.app-guide-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px;
  border-bottom: 1px solid var(--border, #334155);
  background: var(--card-dark, #131c33);
}

.app-guide-bar h2 {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
}

.app-guide-back,
.app-guide-close {
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border, #334155);
  background: transparent;
  color: var(--primary, #38bdf8);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.app-guide-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px calc(env(safe-area-inset-bottom, 0px) + 28px);
}

.app-guide-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
  margin: 0 0 6px;
}

.app-guide-search {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, #334155);
  background: var(--card-dark, #131c33);
  color: var(--text-main, #e2e8f0);
  font: inherit;
  font-size: 1rem;
}

.guide-group {
  margin: 0 0 18px;
}

.guide-group h2 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary, #38bdf8);
}

.guide-blurb,
.guide-note,
.guide-empty,
.guide-kicker {
  color: var(--text-muted, #94a3b8);
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0 0 10px;
}

.guide-group h3 {
  margin: 12px 0 6px;
  font-size: 0.95rem;
}

.guide-link,
.guide-hit,
.guide-index-term {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, #334155);
  background: var(--card-dark, #131c33);
  color: var(--text-main, #e2e8f0);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  cursor: pointer;
}

.guide-num {
  color: var(--primary, #38bdf8);
  font-weight: 800;
  margin-right: 4px;
}

.guide-hit-title {
  display: block;
  font-weight: 800;
}

.guide-hit-where,
.guide-hit-snip {
  display: block;
  color: var(--text-muted, #94a3b8);
  font-size: 0.85rem;
  margin-top: 2px;
}

.guide-hit-snip mark,
.guide-prose mark {
  background: rgba(250, 204, 21, 0.28);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.guide-pdf {
  margin: 8px 0 4px;
}

.guide-pdf a,
.guide-prose a {
  color: var(--primary, #38bdf8);
  font-weight: 800;
}

.guide-index-letter {
  margin: 12px 0 6px;
  font-weight: 800;
  color: var(--primary, #38bdf8);
}

.guide-prose {
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.guide-prose h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--primary, #38bdf8);
}

.guide-prose h3 {
  margin: 16px 0 6px;
  font-size: 1.05rem;
}

.guide-prose p {
  margin: 0 0 10px;
}

.guide-prose .ui {
  font-weight: 800;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 4px;
  padding: 0 4px;
  white-space: nowrap;
}

.guide-prose figure.shot {
  margin: 0 auto 12px;
  max-width: 280px;
  text-align: center;
}

.guide-prose figure.shot img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 4px solid #0f172a;
  box-shadow: 0 0 0 1px #64748b;
  background: #fff;
}

.guide-prose figcaption {
  color: var(--text-muted, #94a3b8);
  font-size: 0.8rem;
  margin-top: 6px;
}

.guide-prose .pair,
.guide-prose .trio {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 0 0 12px;
}

.guide-prose .pair figure.shot,
.guide-prose .trio figure.shot {
  margin: 0;
}

.guide-prose ol.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  counter-reset: guide-step;
}

.guide-prose ol.steps > li {
  position: relative;
  padding-left: 36px;
  margin: 0 0 10px;
  min-height: 28px;
  counter-increment: guide-step;
}

.guide-prose ol.steps > li::before {
  content: counter(guide-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #38bdf8;
  color: #0b1222;
  font-weight: 800;
  font-size: 0.85rem;
  text-align: center;
  line-height: 26px;
}

.guide-prose ul.plain {
  padding-left: 1.1rem;
  margin: 0 0 12px;
}

.guide-prose ul.plain li {
  margin: 0 0 6px;
}

.guide-prose .callout {
  border-radius: 8px;
  padding: 10px 12px 10px 40px;
  margin: 0 0 12px;
  position: relative;
  font-size: 0.92rem;
}

.guide-prose .callout::before {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  font-weight: 800;
}

.guide-prose .callout b.t {
  display: block;
  margin-bottom: 4px;
}

.guide-prose .tip {
  background: rgba(56, 189, 248, 0.1);
  border-left: 3px solid #38bdf8;
}

.guide-prose .tip::before {
  content: 'i';
  background: #38bdf8;
  color: #0b1222;
  font-family: Georgia, serif;
  font-style: italic;
}

.guide-prose .warn {
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid #f59e0b;
}

.guide-prose .warn::before {
  content: '!';
  background: #f59e0b;
  color: #1f1300;
}

.guide-prose .note {
  background: rgba(129, 140, 248, 0.12);
  border-left: 3px solid #818cf8;
}

.guide-prose .note::before {
  content: '\2713';
  background: #818cf8;
  color: #0b1222;
}

.guide-prose table.grid {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 0.85rem;
  display: block;
  overflow-x: auto;
}

.guide-prose table.grid th {
  background: #1e293b;
  color: #fff;
  text-align: left;
  padding: 6px 8px;
}

.guide-prose table.grid td {
  border-bottom: 1px solid var(--border, #334155);
  padding: 6px 8px;
  vertical-align: top;
}

.guide-prose .yes {
  color: #4ade80;
}

.guide-prose .no {
  color: #f87171;
}

.guide-prose .rolebadge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  margin-right: 4px;
}

.guide-prose .r-tech {
  background: #14532d;
  color: #bbf7d0;
}

.guide-prose .r-pm {
  background: #312e81;
  color: #e0e7ff;
}

.guide-prose .r-admin {
  background: #78350f;
  color: #fde68a;
}

.guide-prose dl.gloss dt {
  font-weight: 800;
  margin-top: 10px;
}

.guide-prose dl.gloss dd {
  margin: 2px 0 0;
  color: var(--text-muted, #94a3b8);
}

.manuals-app-guide {
  margin: 0 0 14px;
}

/* Batch C: the guide pair - "Open the guide" and "Download the PDF"
   are equal .btn-manual-link buttons side by side in .manual-grid-2
   (the paired-buttons rule), never a button beside a bare text link.
   The old .manuals-guide-link text-link style is retired with it. */
.manuals-guide-pair .btn-manual-link {
  min-height: 48px;
  margin: 0;
}
