/* Manual (3.0.75): the how-to-use document, two columns on a wide screen, one on a phone, and a print layout. */
#app { max-width: 1280px; margin: 0 auto; padding: 0 16px 48px; }

/* the top bar, the same shape as the other apps' (drawn here: AppShell needs an event log, and this page has none) */
.mn-topbar {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  margin: 0 -16px; padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.mn-topbar .home { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; color: var(--accent); }
.mn-topbar .home-back { font-size: 1.8rem; font-weight: 700; line-height: 1; margin-top: -3px; }
.mn-topbar .home img { width: 34px; height: 34px; display: block; border-radius: 9px; }
.mn-topbar .top-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.mn-topbar .top-title strong { font-size: 1.05rem; }
.mn-topbar .top-session { font-size: .8rem; color: var(--muted); }
.mn-topbar .mn-print { margin-left: auto; }

.mn-printhead { display: none; }
.mn-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 14px; }
.mn-side { position: -webkit-sticky; position: sticky; top: 72px; display: flex; flex-direction: column; gap: 14px; }
.mn-side .card + .card { margin-top: 0; }
.mn-search .field { width: 100%; }
.mn-search input { width: 100%; }
.mn-toc h2 { font-size: 1rem; margin: 0 0 8px; }
.mn-chips { display: flex; flex-direction: column; gap: 4px; }
.mn-chip { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px; border-radius: 9px; text-decoration: none; color: var(--text); font-weight: 600; }
.mn-chip:hover { background: var(--surface-2); }
.mn-chip img { width: 24px; height: 24px; border-radius: 6px; flex: none; }
.mn-chip span:first-of-type { flex: 1 1 auto; min-width: 0; }
.mn-chip.off { opacity: .5; }
.mn-count { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.mn-main { display: flex; flex-direction: column; gap: 14px; }
.mn-main .card + .card { margin-top: 0; }
.mn-app-head { display: flex; gap: 12px; align-items: flex-start; }
.mn-app-head img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.mn-app-head h2 { margin: 0; font-size: 1.25rem; }
.mn-intro { margin: 2px 0 0; }
.mn-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }
ol.mn-steps { list-style: none; margin: 10px 0 0; padding: 0; }
.mn-step { border-top: 1px solid var(--line); padding: 12px 0 10px; }
.mn-step.mn-here { background: var(--accent-soft); border-radius: 10px; padding-left: 10px; padding-right: 10px; }
.mn-step-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mn-step-head h3 { margin: 0; font-size: 1rem; }
.mn-n { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: .82rem; flex: none; }
.mn-text { margin: 6px 0 0; line-height: 1.45; }
.mn-step .mn-links { margin-top: 6px; }
.mn-others { margin-top: 4px; }
.mn-others > summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 8px 0; }
.mn-others .mn-app { margin-top: 12px; }

@media (max-width: 860px) {
  .mn-wrap { grid-template-columns: 1fr; }
  .mn-side { position: static; }
  .mn-chips { flex-direction: row; flex-wrap: wrap; }
  .mn-chip { min-height: 34px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; }
  .mn-chip img { width: 20px; height: 20px; }
  .mn-app-head { flex-wrap: wrap; }
}

/* Print: one chapter per page, no bars, no search, no links; "Print this app" shows that chapter alone. */
@media print {
  body { background: #fff; color: #000; }
  #app { max-width: none; padding: 0; }
  .mn-topbar, .mn-search, .mn-toc, .mn-links, button, .demo-bar, .rs-net-bar { display: none !important; }
  .mn-printhead { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; border-bottom: 1px solid #000; padding-bottom: 6px; margin-bottom: 10px; }
  .mn-wrap { display: block; margin: 0; }
  .mn-side { display: none; }
  .card, .mn-app { box-shadow: none; border: 0; padding: 0; background: #fff; }
  .mn-app { break-before: page; page-break-before: always; }
  .mn-main > .mn-app:first-child { break-before: auto; page-break-before: auto; }
  .mn-step { break-inside: avoid; page-break-inside: avoid; border-top-color: #ccc; }
  .mn-n { background: #000; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge { border: 1px solid #999; color: #000; background: #fff; }
  .mn-others > summary { display: none; }
  .mn-others { display: block; }     /* printOne() opens the fold itself: a closed <details> prints nothing */
  a { color: inherit; text-decoration: none; }
  .hidden { display: none !important; }
  body.mn-print-one .mn-app:not(.mn-print-me) { display: none !important; }
  body.mn-print-one .mn-app.mn-print-me { break-before: auto; page-break-before: auto; }
}
