/* DespatchOS guides — TASK-941 / DEC-349.
   Source: site/assets/guides.css → holding-page/assets/guides.css (scripts/build-guides.js).
   The guide body is set in the brand face (Instrument Sans + IBM Plex Mono, DEC-282);
   the site header and footer stay on site.css as they are. Tokens are BRAND.md only.
   The font faces are declared in site.css (TASK-942), which every web guide page loads
   first; the PDF print path inlines the faces itself (build-guides.js), so the
   --g-sans / --g-mono stacks stay literal here rather than pointing at site.css. */

:root{
  --g-blue:#004AAD;
  --g-navy:#1A2E50;
  --g-navy-deep:#052754;
  --g-ink:#0A1628;
  --g-muted:#5B6B85;
  --g-tint-1:#E8F0FB;
  --g-tint-2:#DBE7F6;
  --g-tint-3:#EEF1F6;
  --g-canvas:#F8F9FA;
  --g-surface:#FFFFFF;
  --g-warning:#B45309;
  --g-warning-bg:#FEF3C7;
  --g-error:#DC2626;
  --g-sans:"Instrument Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --g-mono:"IBM Plex Mono",ui-monospace,Menlo,monospace;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --g-blue:#5DE0E6;
    --g-ink:#F3F6FB;
    --g-muted:#9FB0C9;
    --g-tint-1:#1C2D4A;
    --g-tint-2:#243752;
    --g-tint-3:#1A2A44;
    --g-canvas:#0B1322;
    --g-surface:#15233C;
    --g-warning:#FCD34D;
    --g-warning-bg:#3A2A0C;
  }
}
:root[data-theme="dark"]{
  --g-blue:#5DE0E6;--g-ink:#F3F6FB;--g-muted:#9FB0C9;--g-tint-1:#1C2D4A;--g-tint-2:#243752;
  --g-tint-3:#1A2A44;--g-canvas:#0B1322;--g-surface:#15233C;--g-warning:#FCD34D;--g-warning-bg:#3A2A0C;
}

/* ── Page shell (the site header and footer keep their own light look) ── */
body.guides{background:var(--g-canvas);overflow-x:hidden}
.guides main{font-family:var(--g-sans);color:var(--g-ink);font-size:15px;line-height:1.55}
.guides main *,.guides main *::before,.guides main *::after{box-sizing:border-box}
.g-wrap{width:100%;max-width:1100px;margin:0 auto;padding:0 16px}
@media (min-width:700px){.g-wrap{padding:0 24px}}
:where(.guides main) a{color:var(--g-blue)}
.guides main :focus-visible{outline:2px solid var(--g-blue);outline-offset:3px}

/* ── Guide header ── */
.g-head{padding:40px 0 28px;border-bottom:1px solid var(--g-tint-2);margin-bottom:28px}
.g-kicker{display:block;font-size:12.5px;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:var(--g-blue);margin:0 0 12px}
.g-head h1{font-size:32px;line-height:1.15;font-weight:700;letter-spacing:-.03em;margin:0 0 12px;max-width:760px}
@media (min-width:700px){.g-head h1{font-size:40px}}
.g-summary{font-size:17px;color:var(--g-muted);margin:0 0 16px;max-width:680px}
.g-meta{font-size:13px;color:var(--g-muted);margin:0 0 20px}
.g-notice{background:var(--g-tint-1);border:1px solid var(--g-tint-2);border-radius:12px;padding:10px 14px;font-size:14px;margin:0 0 20px;max-width:680px}
.g-btn{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:11px 24px;border-radius:999px;font:600 15px/1.2 var(--g-sans);text-decoration:none;
  background:var(--g-surface);color:var(--g-ink);border:1px solid var(--g-tint-2)}
.guides main a.g-btn{color:var(--g-ink)}
.g-btn:hover{border-color:var(--g-blue)}

/* ── Layout: contents beside the body on wide screens, a disclosure on phones ── */
.g-layout{display:block;padding-bottom:56px}
.g-toc{margin:0 0 28px}
.g-toc details{background:var(--g-surface);border:1px solid var(--g-tint-2);border-radius:16px;padding:14px 18px}
.g-toc summary{cursor:pointer;font-weight:600;font-size:15px;min-height:28px;list-style-position:inside}
.g-toc ol{list-style:none;margin:12px 0 0;padding:0}
.g-toc li{margin:0}
.g-toc a{display:block;padding:6px 0;color:var(--g-ink);text-decoration:none;font-size:14px}
.g-toc a:hover{color:var(--g-blue)}
.g-toc li.l3 a{padding-left:14px;color:var(--g-muted);font-size:13.5px}
@media (min-width:1000px){
  .g-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:48px;align-items:start}
  .g-toc{position:sticky;top:88px;margin:0;max-height:calc(100vh - 110px);overflow:auto}
  .g-toc details{background:transparent;border:0;padding:0}
  .g-toc summary{font-size:12.5px;letter-spacing:.2em;text-transform:uppercase;color:var(--g-muted);list-style:none;pointer-events:none}
  .g-toc summary::-webkit-details-marker{display:none}
}

/* ── Body type (BRAND.md scale) ── */
.g-body{max-width:720px;min-width:0}
.g-body h2{font-size:22px;line-height:1.25;font-weight:700;letter-spacing:-.02em;margin:44px 0 12px;scroll-margin-top:84px}
.g-body h2:first-child{margin-top:0}
.g-body h3{font-size:19px;line-height:1.3;font-weight:600;margin:28px 0 8px;scroll-margin-top:84px}
.g-body p{margin:0 0 14px}
.g-body ul,.g-body ol{margin:0 0 16px;padding-left:22px}
.g-body li{margin:0 0 6px}
.g-body strong{font-weight:600}
.g-body code{font-family:var(--g-mono);font-size:13px;background:var(--g-tint-3);padding:1px 6px;border-radius:6px}
.g-body pre{font-family:var(--g-mono);font-size:13px;background:var(--g-tint-3);padding:12px 14px;border-radius:12px;overflow-x:auto}
.g-body hr{border:0;border-top:1px solid var(--g-tint-2);margin:32px 0}
.g-body table{border-collapse:collapse;width:100%;margin:0 0 18px;font-size:14px;display:block;overflow-x:auto}
.g-body th,.g-body td{text-align:left;padding:8px 12px;border-bottom:1px solid var(--g-tint-2);vertical-align:top}
.g-body th{font-weight:600}
.g-body tr:nth-child(even) td{background:var(--g-tint-3)}
.g-body blockquote{margin:0 0 16px;padding:0 0 0 14px;border-left:3px solid var(--g-tint-2);color:var(--g-muted)}

/* Callouts: Note / Tip on tint-1, Warning on the warning pair */
.callout{background:var(--g-tint-1);border:1px solid var(--g-tint-2);border-radius:12px;padding:12px 16px;margin:0 0 18px;break-inside:avoid;page-break-inside:avoid}
.callout p{margin:0 0 8px}
.callout p:last-child{margin-bottom:0}
.callout strong:first-child{color:var(--g-blue)}
.callout-warning{background:var(--g-warning-bg);border-color:transparent}
.callout-warning strong:first-child{color:var(--g-warning)}

/* Figures: phone screenshots capped at 320 px, 16 px radius, tint-2 border */
.figure{margin:4px 0 22px;break-inside:avoid;page-break-inside:avoid}
.figure img{display:block;max-width:100%;height:auto;border:1px solid var(--g-tint-2);border-radius:16px;background:var(--g-surface)}
.figure.shot img{width:320px}
.figure figcaption{font-size:13px;color:var(--g-muted);margin-top:8px;max-width:320px}
.figure.wide figcaption{max-width:none}

/* ── Help home ── */
.h-head{padding:40px 0 24px}
.h-head h1{font-size:32px;line-height:1.15;font-weight:700;letter-spacing:-.03em;margin:0 0 10px}
@media (min-width:700px){.h-head h1{font-size:40px}}
.h-head p{color:var(--g-muted);font-size:17px;margin:0 0 20px;max-width:640px}
.h-label{display:block;font-size:13.5px;font-weight:600;margin:0 0 6px}
.h-search{display:block;width:100%;max-width:520px;font:400 15px var(--g-sans);color:var(--g-ink);background:var(--g-surface);
  border:1px solid var(--g-tint-2);border-radius:10px;padding:12px 14px;min-height:48px}
.h-search:focus{outline:none;border-color:var(--g-blue);box-shadow:0 0 0 1px var(--g-blue)}
.h-group{margin:28px 0 8px}
.h-group-head{display:flex;align-items:center;gap:10px;margin:0 0 12px}
.h-group-head img{width:26px;height:26px}
.h-group h2{font-size:17px;font-weight:600;margin:0}
.h-list{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.h-card{display:flex;align-items:center;gap:16px;background:var(--g-surface);border:1px solid var(--g-tint-2);border-radius:16px;padding:20px 22px;
  color:var(--g-ink);text-decoration:none}
.guides main a.h-card{color:var(--g-ink)}
.h-card:hover{border-color:var(--g-blue);box-shadow:0 6px 24px rgba(60,64,67,.12)}
.h-card .t{flex:1;min-width:0}
.h-card h3{font-size:19px;font-weight:600;margin:0 0 4px}
.h-card p{margin:0 0 6px;color:var(--g-muted);font-size:14px}
.h-card .u{font-size:12px;color:var(--g-muted)}
.h-card .chev{flex:none;width:10px;height:10px;border-right:2px solid var(--g-muted);border-top:2px solid var(--g-muted);transform:rotate(45deg)}
.h-empty{color:var(--g-muted);font-size:14px;margin:16px 0 48px}
.h-foot{padding:8px 0 56px;color:var(--g-muted);font-size:14px}

/* ── Print document (PDF): body.guide-print ── */
.guide-print{margin:0;background:#fff;color:#0A1628;font-family:var(--g-sans);font-size:11pt;line-height:1.5;
  -webkit-print-color-adjust:exact;print-color-adjust:exact}
.guide-print .cover{height:257mm;position:relative;page-break-after:always;break-after:page}
.guide-print .cover .logo{height:28px;width:auto;display:block}
.guide-print .cover .kicker{position:absolute;top:95mm;left:0;font-size:12.5px;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:#004AAD;margin:0}
.guide-print .cover .kicker .bar{display:inline-block;width:1px;height:12px;background:#DBE7F6;margin:0 10px;vertical-align:-1px}
.guide-print .cover h1{position:absolute;top:104mm;left:0;right:0;font-size:40px;line-height:1.1;font-weight:700;letter-spacing:-.03em;margin:0}
.guide-print .cover .summary{position:absolute;top:140mm;left:0;right:20mm;font-size:16px;color:#5B6B85;margin:0}
.guide-print .cover .meta{position:absolute;bottom:0;left:0;font-size:12px;color:#5B6B85;margin:0}
.guide-print .cover .mascot{position:absolute;bottom:0;right:0;width:72px;height:auto;mix-blend-mode:multiply}
.guide-print .rule{position:absolute;top:88mm;left:0;width:48px;height:3px;background:#004AAD}
.guide-print .contents{page-break-after:always;break-after:page}
.guide-print .contents h2{font-size:22px;font-weight:700;letter-spacing:-.02em;margin:0 0 18px}
.guide-print .contents ol{list-style:none;margin:0;padding:0}
.guide-print .contents li{display:flex;align-items:baseline;gap:8px;padding:7px 0;border-bottom:1px solid #DBE7F6;font-size:12pt}
.guide-print .contents li .n{font-family:var(--g-mono);color:#5B6B85;width:22px;flex:none;font-size:10pt}
.guide-print .contents li .x{flex:1}
.guide-print .contents li .p{font-family:var(--g-mono);font-size:10pt;color:#0A1628}
.guide-print .g-body{max-width:none}
.guide-print .g-body h2{page-break-before:always;break-before:page;margin:0 0 12px;font-size:22px}
.guide-print .g-body h2:first-child{page-break-before:avoid;break-before:avoid}
.guide-print .g-body h2,.guide-print .g-body h3{page-break-after:avoid;break-after:avoid}
.guide-print .figure.shot img{width:62mm}
.guide-print .figure figcaption{max-width:62mm;font-size:9.5pt}
.guide-print .callout{font-size:10.5pt}
