/* YARDtwin Help Centre — served at /help/. No inline scripts anywhere (the
   site CSP only allows same-origin script files), so all behaviour lives in
   site.js. Colours follow the app: navy #1e40af, blue #3b82f6. */

:root {
  --navy: #1e40af; --blue: #3b82f6; --indigo: #818cf8; --mark: #e11d48;
  --ink: #0f172a; --text: #1e293b; --muted: #64748b; --line: #e2e8f0; --soft: #f1f5f9;
  --bg: #ffffff; --panel: #f8fafc; --link: #1d4ed8; --code: #f1f5f9;
  --tip: #059669; --tip-bg: #ecfdf5; --note: #2563eb; --note-bg: #eff6ff;
  --warn: #b45309; --warn-bg: #fffbeb; --imp: #be123c; --imp-bg: #fff1f2;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1f5f9; --text: #cbd5e1; --muted: #94a3b8; --line: #1e293b; --soft: #111827;
    --bg: #0b1120; --panel: #0f172a; --link: #93c5fd; --code: #1e293b; --navy: #93c5fd;
    --tip-bg: #052e22; --note-bg: #0b1f45; --warn-bg: #2b1d05; --imp-bg: #3b0a19;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f1f5f9; --text: #cbd5e1; --muted: #94a3b8; --line: #1e293b; --soft: #111827;
  --bg: #0b1120; --panel: #0f172a; --link: #93c5fd; --code: #1e293b; --navy: #93c5fd;
  --tip-bg: #052e22; --note-bg: #0b1f45; --warn-bg: #2b1d05; --imp-bg: #3b0a19;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--code); padding: .1em .35em; border-radius: 4px; font-size: .88em; }
kbd { font: 600 .8em/1 var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: .2em .45em; background: var(--panel); color: var(--ink); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--bg); padding: 8px 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 18px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--navy); font-weight: 800; } .brand em { font-style: normal; color: var(--muted); font-weight: 500; margin-left: 4px; }
.logo { width: 28px; height: 28px; color: var(--navy); }
.search { position: relative; flex: 1; max-width: 560px; margin-left: 16px; }
.search input, .hero-search input { width: 100%; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 40px 9px 14px; outline: none; }
.search input:focus, .hero-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent); background: var(--bg); }
.search-key { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.theme { margin-left: auto; }
.theme, .navtoggle { font: inherit; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; width: 38px; height: 38px; cursor: pointer; }
.navtoggle { display: none; }
.app-link { white-space: nowrap; font-weight: 600; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 9px; }
:root[data-theme="dark"] .app-link { color: #0b1120; }
.app-link:hover { text-decoration: none; filter: brightness(1.1); }

/* results dropdown */
.results { text-align: left; position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 70vh; overflow: auto; z-index: 30; padding: 6px; }
.results a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); }
.results a:hover, .results a.sel { background: var(--soft); text-decoration: none; }
.results b { color: var(--ink); display: block; }
.results small { color: var(--muted); display: block; font-size: 13px; }
.results mark { background: color-mix(in srgb, var(--blue) 22%, transparent); color: inherit; border-radius: 3px; }
.results .none { padding: 12px; color: var(--muted); }

/* shell */
.shell { display: grid; grid-template-columns: 280px minmax(0, 1fr) 220px; max-width: 1440px; margin: 0 auto; }
.shell.wide { grid-template-columns: 280px minmax(0, 1fr); }
.sidenav { position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px); overflow: auto; padding: 20px 14px 40px 20px; border-right: 1px solid var(--line); font-size: 14.5px; }
.sidenav-qs { display: block; font-weight: 700; color: var(--ink); padding: 6px 10px; border-radius: 8px; }
.sidenav-qs.on, .sidenav a.on { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--navy); }
.sidenav details { margin: 4px 0; }
.sidenav summary { list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 8px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.sidenav summary::before { content: '›'; display: inline-block; transition: transform .15s; color: var(--muted); width: 10px; }
.sidenav details[open] > summary::before { transform: rotate(90deg); }
.sidenav summary a { color: inherit; } .sidenav summary::-webkit-details-marker { display: none; }
.sidenav ul { list-style: none; margin: 2px 0 8px; padding: 0 0 0 18px; border-left: 1px solid var(--line); margin-left: 15px; }
.sidenav li a { display: block; padding: 4px 10px; border-radius: 6px; color: var(--muted); line-height: 1.35; }
.sidenav li a:hover { color: var(--ink); text-decoration: none; background: var(--soft); }

.content { min-width: 0; padding: 32px 48px 40px; }
.shell:not(.wide) .content { max-width: 1060px; }
.toc { position: sticky; top: 64px; align-self: start; padding: 32px 16px; font-size: 13.5px; max-height: calc(100vh - 64px); overflow: auto; }
.toc-title { font-weight: 700; color: var(--ink); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; }
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 4px 12px; color: var(--muted); }
.toc a.on { color: var(--navy); border-left: 2px solid var(--navy); margin-left: -1px; }

/* typography */
h1 { color: var(--ink); font-size: 36px; line-height: 1.2; letter-spacing: -.02em; margin: 8px 0 10px; font-weight: 800; }
h2 { color: var(--ink); font-size: 24px; line-height: 1.3; margin: 40px 0 12px; letter-spacing: -.01em; font-weight: 750; }
h3 { color: var(--ink); font-size: 19px; margin: 28px 0 8px; font-weight: 700; }
h4 { color: var(--ink); font-size: 16px; margin: 20px 0 6px; }
p, li { max-width: 72ch; }
.lede { font-size: 18.5px; color: var(--muted); margin: 0 0 18px; }
.lede.small { font-size: 16px; }
.crumbs { font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.topic ul, .topic ol { padding-left: 1.4em; }
.topic li { margin: 4px 0; }
/* Numbered steps match the numbered marks on the screenshots. */
.topic ol { list-style: none; counter-reset: step; padding-left: 0; }
.topic ol > li { counter-increment: step; position: relative; padding-left: 40px; margin: 10px 0; }
.topic ol > li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--mark); color: #fff; font: 700 13.5px/26px var(--font); text-align: center; }
.topic ol ol > li::before { background: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; }
.meta div { display: flex; gap: 6px; align-items: baseline; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13.5px; }
.meta dt { font-weight: 700; color: var(--ink); } .meta dd { margin: 0; color: var(--text); }

/* figures */
figure.shot { margin: 22px 0 26px; }
figure.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); background: #fff; }
figure.shot.phone img { max-width: 320px; margin: 0 auto; border-radius: 24px; border: 8px solid #0f172a; }
figure.shot figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 10px; }
figure.shot a { display: block; cursor: zoom-in; }
.shot-missing { border: 2px dashed var(--line); border-radius: 10px; padding: 40px; text-align: center; color: var(--muted); }

/* callouts */
.callout { border-left: 4px solid var(--note); background: var(--note-bg); border-radius: 0 10px 10px 0; padding: 12px 16px; margin: 18px 0; }
.callout p { margin: 4px 0; } .callout-label { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--note); }
.callout.tip { border-color: var(--tip); background: var(--tip-bg); } .callout.tip .callout-label { color: var(--tip); }
.callout.good-to-know { border-color: var(--tip); background: var(--tip-bg); } .callout.good-to-know .callout-label { color: var(--tip); }
.callout.warning { border-color: var(--warn); background: var(--warn-bg); } .callout.warning .callout-label { color: var(--warn); }
.callout.important { border-color: var(--imp); background: var(--imp-bg); } .callout.important .callout-label { color: var(--imp); }
blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--line); color: var(--muted); }

/* tables */
.table-wrap, .matrix-wrap { overflow-x: auto; margin: 16px 0 24px; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--panel); color: var(--ink); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.matrix th span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 12.5px; }
.matrix td:not(:first-child) { text-align: center; color: var(--tip); font-weight: 800; }
.matrix tr.sec td { background: var(--soft); font-weight: 800; color: var(--ink); text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }
.matrix td em { font-size: 12px; color: var(--muted); font-style: normal; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 4px; }

/* cards & lists */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 16px 0 32px; }
.cards li { max-width: none; }
.cards a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.cards a:hover { border-color: var(--blue); box-shadow: var(--shadow); text-decoration: none; }
.cards b { color: var(--ink); font-size: 16px; } .cards span { color: var(--muted); font-size: 14px; line-height: 1.5; } .cards small { color: var(--muted); font-size: 12.5px; margin-top: auto; }
.cards.roles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.qlist { columns: 1; padding-left: 1.1em; } .qlist.two { columns: 2; column-gap: 40px; }
.qlist li { break-inside: avoid; margin: 5px 0; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 48px 0 8px; }
.prevnext a { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; color: var(--ink); font-weight: 600; }
.prevnext a:hover { border-color: var(--blue); text-decoration: none; }
.prevnext span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.prevnext .next { text-align: right; grid-column: 2; }
.pagefoot { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }

/* home */
.hero { text-align: center; padding: 36px 0 12px; }
.hero h1 { font-size: 44px; }
.hero p { margin: 0 auto 22px; color: var(--muted); font-size: 18px; }
.hero-search { position: relative; max-width: 640px; margin: 0 auto; }
.hero-search input { font-size: 18px; padding: 14px 18px; border-radius: 14px; box-shadow: var(--shadow); }
.start { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 30px 0 10px; }
.start-card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 10%, var(--bg)), var(--bg)); border: 1px solid var(--line); color: var(--text); }
.start-card:hover { border-color: var(--blue); text-decoration: none; }
.start-card b { color: var(--ink); font-size: 17px; } .start-card span { color: var(--muted); font-size: 14.5px; }
.downloads { color: var(--muted); }
section.qs { border-top: 1px solid var(--line); margin-top: 40px; }

/* phones and tablets */
@media (max-width: 1200px) { .shell { grid-template-columns: 260px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 860px) {
  .shell, .shell.wide { grid-template-columns: minmax(0, 1fr); }
  .navtoggle { display: inline-block; }
  .sidenav { position: fixed; top: 64px; left: 0; bottom: 0; width: 86vw; max-width: 340px; height: auto; background: var(--bg); z-index: 25; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  body.nav-open .sidenav { transform: none; }
  .content { padding: 20px 16px 32px; }
  .app-link, .search-key, .brand em { display: none; }
  .search { margin-left: 0; }
  .topbar { gap: 8px; padding: 0 12px; }
  h1 { font-size: 28px; } .hero h1 { font-size: 32px; }
  .start { grid-template-columns: 1fr; } .qlist.two { columns: 1; }
  .prevnext { grid-template-columns: 1fr; } .prevnext .next { grid-column: 1; }
}

/* The one-truck journey strip used by the Quick Start and "What YARDtwin does":
   <ol class="journey"><li><b>Book</b><span>…</span></li>…</ol> in Markdown. */
.topic ol.journey, ol.journey { list-style: none; counter-reset: j; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 0; margin: 20px 0 28px; }
ol.journey > li { counter-increment: j; position: relative; padding: 40px 12px 14px !important; margin: 0 !important; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: center; max-width: none; }
ol.journey > li::before { content: counter(j) !important; position: absolute; top: 10px; left: 50% !important; transform: translateX(-50%); width: 24px !important; height: 24px !important; line-height: 24px !important; border-radius: 50%; background: var(--navy) !important; color: #fff; font: 700 13px/24px var(--font); }
ol.journey > li:not(:last-child)::after { content: '→'; position: absolute; right: -10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
ol.journey b { display: block; color: var(--ink); } ol.journey span { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 4px; }
@media (max-width: 860px) { ol.journey { grid-template-columns: 1fr; gap: 22px; } ol.journey > li:not(:last-child)::after { content: '↓'; right: auto; left: 50%; top: auto; bottom: -21px; transform: translateX(-50%); } }

.page-break { display: none; }
