/* Markdown document viewer — shared styles.
   Ported from the studio dashboard base (sfg-dashboard/base/viewer.html)
   and dressed in this project's launcher chrome.

   A document page is a thin shell: set window.DOC_FILE / window.DOC_TITLE,
   load this stylesheet and shared/doc-viewer.js. See brief/index.html. */

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  html, body {
    background: #fff;
    color: #1F2328;
    font-family: -apple-system, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
  }

  /* ── Top bar: same studio chrome as the launcher ─────────────── */
  .topbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 18, 25, 0.95);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    padding: 12px 24px;
    display: flex; align-items: center; gap: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
  }
  .topbar__logo { display: inline-block; height: 30px; flex-shrink: 0; }
  .topbar__logo img { display: block; height: 100%; width: auto; }
  .topbar__back {
    color: #9FBACD; text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
    transition: color 200ms ease; letter-spacing: 0.02em; white-space: nowrap;
  }
  .topbar__back:hover { color: #fff; }
  .topbar__divider { height: 14px; width: 1px; background: rgba(255, 255, 255, 0.12); flex-shrink: 0; }
  .topbar__doc {
    font-size: 11px; color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.1em; text-transform: uppercase;
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  .doc-wrap { max-width: 880px; margin: 0 auto; padding: 48px 32px 140px; }

  .doc h1 { font-size: 34px; margin: 20px 0 16px; line-height: 1.2; letter-spacing: -0.015em; }
  .doc h2 { font-size: 23px; margin: 44px 0 14px; padding-bottom: 8px; border-bottom: 1px solid #e1e4e8; line-height: 1.25; }
  .doc h3 { font-size: 18px; margin: 28px 0 10px; line-height: 1.3; }
  .doc h4 { font-size: 16px; margin: 22px 0 8px; }
  .doc p { margin: 0 0 16px; }
  .doc ul, .doc ol { margin: 0 0 16px 26px; }
  .doc li { margin-bottom: 6px; }
  .doc li > p { margin: 4px 0; }
  .doc a { color: #0969da; text-decoration: none; }
  .doc a:hover { text-decoration: underline; }
  .doc code { background: #afb8c133; padding: 0.2em 0.4em; border-radius: 4px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; }
  .doc pre { background: #f6f8fa; padding: 16px 20px; border-radius: 6px; overflow-x: auto; margin: 0 0 16px; line-height: 1.45; }
  .doc pre code { background: transparent; padding: 0; font-size: 13px; }
  .doc blockquote { border-left: 3px solid #d0d7de; padding: 4px 0 4px 16px; color: #57606a; margin: 0 0 16px; }
  .doc table { border-collapse: collapse; margin: 0 0 20px; max-width: 100%; display: block; overflow-x: auto; font-size: 14px; }
  .doc table th, .doc table td { padding: 9px 14px; border: 1px solid #d0d7de; vertical-align: top; }
  .doc table th { background: #f6f8fa; font-weight: 600; text-align: left; }
  .doc table tr:nth-child(even) td { background: #fafbfc; }
  .doc hr { border: 0; border-top: 1px solid #d0d7de; margin: 36px 0; }
  .doc img { max-width: 100%; height: auto; }
  .doc strong { font-weight: 600; }

  .doc__msg { padding: 60px 0; text-align: center; font-size: 14px; color: #57606a; }
  .doc__msg--error { color: #cf222e; }
  .doc__msg code { background: rgba(207, 34, 46, 0.08); }

  .doc-foot {
    max-width: 880px; margin: 0 auto;
    padding: 20px 32px 60px; font-size: 12px; color: #8c959f;
    border-top: 1px solid #e1e4e8;
  }
  .doc-foot a { color: #57606a; text-decoration: underline; }

  @media print { .topbar, .doc-foot, .service-menu { display: none; } .doc-wrap { max-width: 100%; padding: 0; } }
  @media (max-width: 600px) { .doc-wrap { padding: 32px 18px 120px; } .topbar { padding: 10px 16px; gap: 12px; } }
