/* Guide workflows use the portal's page, header and control styles. */
.guide-page {
  --bg: var(--page);
  --panel: var(--surface);
  --primary: var(--blue);
  --primary-hover: #1d4ed8;
  --soft: var(--surface-soft);
  --accent: var(--blue);
  --shadow: 0 2px 3px rgb(35 49 89 / 2%);
  --color-bg: var(--page);
  --color-surface: var(--surface);
  --color-surface-soft: var(--surface-soft);
  --color-text: var(--ink);
  --color-text-muted: var(--muted);
  --color-border: var(--line);
  --color-accent: var(--blue);
  --color-accent-strong: #1d4ed8;
  --color-surface-glass: rgb(255 255 255 / 96%);
  min-width: 0;
  overflow-x: visible;
  background: var(--page);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.guide-page .app { width: 100%; min-height: 0; margin: 0; padding: 0; }
.guide-page main { min-width: 0; }

.guide-nav {
  display: flex;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 28px;
  padding: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
}
.guide-nav a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--pill);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.guide-nav a:hover { background: var(--surface-soft); color: var(--blue); }
.guide-nav a[aria-current="page"] { background: var(--surface-soft); color: var(--blue); }
.guide-nav a:focus-visible { outline-offset: -3px; }

.guide-page .hero { margin: 0; padding: 0 0 24px; }
.guide-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.guide-page h1 { margin: 0 0 10px; font-size: var(--text-title); font-weight: 700; line-height: 1.3; letter-spacing: -.8px; }
.guide-heading h1 { margin: 0; }
.guide-page .hero p { margin: 8px 0 0; color: var(--muted); font-size: 15px; font-weight: 400; line-height: 1.6; }
.guide-page .install-app { flex: 0 0 auto; width: auto; min-height: 44px; padding-inline: 14px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface); color: var(--muted); white-space: nowrap; }
.guide-page .toolbar { grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
.guide-page .search { min-width: 0; min-height: 52px; padding: 0 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 400; box-shadow: var(--shadow); }
.guide-page .search:focus { border-color: #b4c3f3; box-shadow: 0 0 0 2px #b4c3f3; }
.guide-page .segmented { gap: 6px; padding: 0; overflow-x: auto; border-radius: 0; background: transparent; box-shadow: none; }
.guide-page .segment { flex: 0 0 auto; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface); color: var(--muted); }
.guide-page .segment.active { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: none; }
.guide-page .segment:focus-visible { outline-offset: -3px; }
.guide-page .result-meta { padding: 0; font-weight: 400; }

.guide-page .grid { margin-top: 0; }
.guide-page .copy-card, .guide-page .manual-card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--surface); box-shadow: var(--shadow); }
.guide-page .copy-card { display: flex; flex-direction: column; gap: 16px; }
.guide-page .copy-card:hover { border-color: var(--line-strong); box-shadow: 0 6px 16px rgb(35 49 89 / 7%); transform: none; }
.guide-page .copy-card h2, .guide-page .manual-card h3 { margin: 0; font-size: 18px; font-weight: 650; line-height: 1.45; }
.guide-page .copy-text { width: 100%; max-height: 320px; padding: 16px; overflow: auto; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 12px; background: var(--page); color: var(--ink); font-size: 15px; font-weight: 400; line-height: 1.8; white-space: pre-wrap; user-select: text; -webkit-user-select: text; }
.guide-page .copy-card ::selection { background: #dbeafe; color: #1e293b; }
.guide-page .card-actions { display: flex; flex-wrap: wrap; gap: 8px; min-height: 0; margin-top: auto; }
.guide-page .card-actions > * { flex: 1 1 140px; width: auto; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--pill); font-size: 14px; line-height: 1.5; }
.guide-page .copy-btn { background: var(--blue); color: #fff; }
.guide-page .copy-btn:hover { background: var(--primary-hover); }
.guide-page .photo-btn { background: var(--surface); color: var(--muted); }
.guide-page .photo-btn:hover { background: var(--surface-soft); }
.guide-page .copy-btn:focus-visible, .guide-page .photo-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.guide-page .empty, .guide-page .notice { border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--surface); }
.guide-page .toast { background: var(--blue); color: #fff; }

.guide-page .quick-nav { min-width: 0; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }
.guide-page .quick-nav a { flex: 0 0 auto; }
.guide-page .section-head h2 { font-size: 22px; }
.guide-page .steps li { background: var(--page); color: var(--ink); font-weight: 400; }
.guide-page .note { background: var(--page); font-weight: 400; }
.guide-page .resource-link { min-height: 44px; border-radius: var(--pill); }
.guide-page .scope-note { margin: 12px 0 0; }
.guide-page .filters .filter { min-height: 44px; padding: 0 16px; border-radius: var(--pill); font-size: 14px; }
.guide-page .filters .filter[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.guide-contacts .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.guide-contacts .contact-card { min-width: 0; border-radius: var(--card-radius); }
.guide-contacts .person { grid-template-columns: 1fr; gap: 4px; }
.guide-contacts .phone-actions { justify-content: space-between; }
.guide-contacts .copy-btn { background: var(--surface-soft); color: var(--blue); }
.guide-contacts .copy-btn:hover { background: #dbeafe; }

.guide-footer { display: flex; justify-content: flex-end; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.guide-footer .developer-card { width: auto; max-width: 100%; border: 0; background: transparent; box-shadow: none; }
.guide-footer .open-chat { min-width: 88px; border-radius: var(--pill); background: var(--surface-soft); color: var(--blue); }
.guide-footer .open-chat:hover { background: #dbeafe; color: var(--blue); }

@media (max-width: 720px) {
  .guide-contacts .contact-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .guide-nav { width: 100%; gap: 0; margin-bottom: 24px; }
  .guide-nav a { flex: 1 0 auto; padding-inline: 10px; font-size: 13px; }
  .guide-page h1 { font-size: 26px; }
  .guide-page .grid, .guide-page .manual-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-page .copy-card, .guide-page .manual-card { padding: 18px; }
  .guide-page .section-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .guide-page .section-head p { text-align: left; }
  .guide-page .photo-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-page .install-app-label { display: inline; }
}
