/* AutoLNK POS staff guide. Layout:
   header with a "Staff Guide" badge, icon menu on the left, article in the middle, Contents on the right. */
@font-face { font-family: "Inter var"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/Inter-roman-latin-var.woff2) format("woff2"); }
@font-face { font-family: "Inter var"; font-style: italic; font-weight: 100 900; font-display: swap; src: url(fonts/Inter-italic-latin-var.woff2) format("woff2"); }

:root {
  --bg: #ffffff;
  --text: #2c3247;
  --strong: #090d1a;
  --muted: #8595a9;
  --border: #e6e9f3;
  --border-hover: #bdc7dc;
  --link: #5294f2;
  --link-hover: #305090;
  --item-hover: #edf2fe;
  --item-active: #e3eff9;
  --panel: #f3f4fa;
  --label-bg: #edf2fe;
  --label-text: #5294f2;
  --label-border: #c2d6fb;
  --success: #5aab9b;
  --primary: #4182f9;
  --warning: #e1b044;
  --shadow: 0 10px 30px rgba(9, 13, 26, .12);
  --font: "Inter var", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --top: 80px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111318; --text: #c3c5c5; --strong: #ffffff; --muted: #8b93a6; --border: #2a2c33; --border-hover: #44536b;
    --link: #6ea6f5; --link-hover: #a9c9fa; --item-hover: #1b2230; --item-active: #1d2a40; --panel: #191b21;
    --label-bg: #1d2a40; --label-text: #8fb8f7; --label-border: #2e4468; --shadow: 0 10px 30px rgba(0, 0, 0, .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111318; --text: #c3c5c5; --strong: #ffffff; --muted: #8b93a6; --border: #2a2c33; --border-hover: #44536b;
  --link: #6ea6f5; --link-hover: #a9c9fa; --item-hover: #1b2230; --item-active: #1d2a40; --panel: #191b21;
  --label-bg: #1d2a40; --label-text: #8fb8f7; --label-border: #2e4468; --shadow: 0 10px 30px rgba(0, 0, 0, .5); color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
a { color: var(--link); font-weight: 500; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
svg { flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--strong); color: var(--bg); padding: 8px 12px; z-index: 60; border-radius: 6px; }
.skip:focus { left: 12px; }

/* header */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; background: var(--bg); border-bottom: 1px solid var(--border);
  padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.menu-btn { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: max(10px, env(safe-area-inset-left, 0px)); border: 0; border-radius: 999px; background: none; color: var(--strong); cursor: pointer; }
.brand-wrap { display: flex; align-items: center; gap: 16px; width: 300px; flex: none; height: 48px; padding: 0 24px; border-right: 1px solid var(--border); }
.brand { color: var(--strong); text-decoration: none; font-size: 24px; line-height: 1.15; font-weight: 700; max-width: 7.5em; }
.brand:hover { color: var(--strong); }
.brand-label { display: inline-block; font-size: 12px; font-weight: 500; line-height: 1; padding: 5px 8px; border-radius: 6px; background: var(--label-bg); color: var(--label-text); box-shadow: inset 0 0 0 1px var(--label-border); white-space: nowrap; }
.topnav { display: flex; gap: 24px; padding-left: 64px; }
.topnav a { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--link); white-space: nowrap; }
.topnav a:hover { color: var(--link-hover); }
.search { position: relative; margin-left: auto; width: min(320px, 100%); display: flex; align-items: center; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.search-input { width: 100%; font: inherit; font-size: 15px; line-height: 1.4; color: var(--strong); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 64px 8px 36px; }
.search-input::placeholder { color: var(--muted); }
.search-input:hover { border-color: var(--border-hover); }
.search-input:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 20%, transparent); }
.search-input::-webkit-search-cancel-button { display: none; }
.kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-family: var(--font); font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; pointer-events: none; }
.theme-btn { margin-left: 14px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--strong); border-radius: 999px; cursor: pointer; }
.theme-btn:hover { background: var(--item-hover); }
.t-moon { display: none; }
:root[data-theme="dark"] .t-sun { display: none; }
:root[data-theme="dark"] .t-moon { display: flex; }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; max-height: 70vh; overflow: auto; z-index: 40; min-width: 300px; }
.results a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--strong); text-decoration: none; font-weight: 500; line-height: 1.4; }
.results a small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.results a[aria-selected="true"], .results a:hover { background: var(--item-active); color: var(--link); }
.results p { margin: 8px 12px; color: var(--muted); font-size: 14px; }

/* columns */
.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr) 260px; }
.sidebar { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 24px 16px 48px 24px; border-right: 1px solid var(--border); font-size: 15px; line-height: 1.4; }
.filter input { width: 100%; font: inherit; font-size: 14px; color: var(--strong); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px 7px 32px; margin-bottom: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='%238595a9'%3E%3Cpath d='M3 5h18v2H3zm3 6h12v2H6zm4 6h4v2h-4z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 11px 50%; }
.filter input:focus { outline: none; border-color: var(--link); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a, .nav-group summary { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: var(--strong); text-decoration: none; font-weight: 400; }
.sidebar li a:hover, .nav-group summary:hover { background: var(--item-hover); color: var(--link); }
.sidebar li a[aria-current="page"] { background: var(--item-active); color: var(--link); font-weight: 500; }
.nav-icon { color: var(--muted); }
.sidebar li a:hover .nav-icon, .sidebar li a[aria-current="page"] .nav-icon, .nav-group summary:hover .nav-icon { color: var(--link); }
.nav-group summary { cursor: pointer; list-style: none; user-select: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary span { flex: 1; }
.chev { color: var(--muted); transition: transform .15s ease; }
.nav-group[open] > summary .chev { transform: rotate(90deg); }
.nav-group > ul { margin-left: 18px !important; padding-left: 8px !important; border-left: 1px solid var(--border) !important; margin-bottom: 4px !important; }
.nav-empty { color: var(--muted); padding: 6px 10px; font-size: 14px; }
.main { min-width: 0; padding: 40px 56px 72px; max-width: 920px; width: 100%; justify-self: center; }
.toc { position: sticky; top: var(--top); align-self: start; padding: 40px 24px; font-size: 14px; line-height: 1.4; max-height: calc(100vh - var(--top)); overflow-y: auto; }
.toc-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text); margin: 0 0 12px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 5px 0 5px 14px; color: var(--text); text-decoration: none; font-weight: 400; border-left: 1px solid var(--border); }
.toc a:hover { color: var(--link); }
.toc a.on { color: var(--link); border-left: 2px solid var(--link); padding-left: 13px; }

/* article */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border-hover); }
.crumbs a { color: var(--muted); font-weight: 400; text-decoration: none; }
.crumbs a:hover { color: var(--link); }
.title-row { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 32px; }
.article h1 { flex: 1; font-size: 2.5rem; line-height: 1.2; font-weight: 700; color: var(--strong); margin: 0; letter-spacing: -.02em; text-wrap: balance; }
.copy-btn { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; cursor: pointer; white-space: nowrap; }
.copy-btn:hover { border-color: var(--border-hover); color: var(--strong); }
.article h2 { font-size: 2rem; line-height: 1.25; font-weight: 700; color: var(--strong); margin: 48px 0 24px; letter-spacing: -.015em; text-wrap: balance; }
.article h3 { font-size: 1.5rem; line-height: 1.3; font-weight: 700; color: var(--strong); margin: 32px 0 16px; }
.article h4, .article h5 { color: var(--strong); }
.article p { margin: 0 0 24px; }
.article strong { color: var(--strong); font-weight: 600; }
.article ul, .article ol { margin: 0 0 24px; padding-left: 26px; }
.article li { margin-bottom: 8px; padding-left: 4px; }
.article li > ul, .article li > ol { margin: 8px 0 0; }
.article img { display: block; margin: 0 0 28px; border-radius: 6px; }
.article code { font-family: var(--mono); font-size: .9em; background: var(--panel); padding: 2px 6px; border-radius: 4px; }
.article hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }

.callout { display: flex; margin: 0 0 24px; }
.callout-bar { flex: none; width: 6px; border-radius: 8px 0 0 8px; }
.callout-box { flex: 1; display: flex; gap: 12px; padding: 16px 20px 16px 16px; border: 1px solid var(--border); border-left: 0; border-radius: 0 8px 8px 0; background: var(--bg); }
.callout-icon { display: flex; align-items: center; height: 28px; }
.callout-body { flex: 1; min-width: 0; }
.callout-body h5 { margin: 0 0 4px; font-size: 1rem; line-height: 28px; font-weight: 700; color: var(--strong); }
.callout-body > :last-child { margin-bottom: 0; }
.callout-body p:first-child { margin-top: 2px; }
.callout-success .callout-bar { background: var(--success); } .callout-success .callout-icon { color: var(--success); }
.callout-note .callout-bar { background: var(--primary); } .callout-note .callout-icon { color: var(--primary); }
.callout-warning .callout-bar { background: var(--warning); } .callout-warning .callout-icon { color: var(--warning); }

.table-wrap { overflow-x: auto; margin: 0 0 28px; border: 1px solid var(--border); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
th { font-weight: 600; color: var(--strong); background: var(--panel); }
.related { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.related h2 { font-size: 1.25rem; font-weight: 700; color: var(--strong); margin: 0 0 12px; }
.related ul { margin: 0; padding-left: 22px; }
.related li { margin-bottom: 6px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.pg { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--link); font-weight: 500; line-height: 1.35; }
.pg:hover { border-color: var(--link); }
.pg span { flex: 1; }
.pg small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-bottom: 2px; }
.pg-next { text-align: right; }
.pg-arrow { color: var(--muted); }
.task-list li { margin-bottom: 10px; }

/* home */
.hero { padding: 8px 0 0; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.hero h1 { font-size: 2.5rem; line-height: 1.15; font-weight: 700; color: var(--strong); margin: 0 0 24px; letter-spacing: -.02em; }
.search-big { margin: 0; width: 100%; max-width: 640px; }
.search-big .search-input { font-size: 17px; padding: 14px 16px 14px 44px; border-radius: 10px; }
.search-big .search-icon { left: 15px; }
.home-sec { margin-top: 48px; }
.home-sec h2 { font-size: 1.5rem; font-weight: 700; color: var(--strong); margin: 0 0 16px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 12px; }
.role-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--strong); background: var(--bg); font-weight: 400; }
.role-card:hover { border-color: var(--link); background: var(--item-hover); color: var(--strong); }
.role-icon { color: var(--link); margin-bottom: 6px; }
.role-card b { font-size: 16px; font-weight: 600; }
.role-card span { color: var(--muted); font-size: 14px; line-height: 1.4; }
.link-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.link-grid li { border-top: 1px solid var(--border); }
.link-grid a { display: block; padding: 11px 0; }
.examples { color: var(--muted); font-size: 14px; margin-top: 20px; line-height: 1.6; }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 32px; }
.topic { scroll-margin-top: calc(var(--top) + 16px); }
.topic h3 { font-size: 15px; font-weight: 600; color: var(--strong); margin: 16px 0 6px; }
.topic ul { list-style: none; margin: 0; padding: 0; }
.topic li { padding: 3px 0; font-size: 15px; line-height: 1.45; }
.topic:target h3 { color: var(--link); }

.foot { border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; line-height: 1.6; padding: 20px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px)); text-align: center; }
.foot p { margin: 0 auto; max-width: 760px; }

/* artifact start page uses the same parts without the menu */
.artifact-home .main-solo { max-width: 920px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px)); }
.artifact-home .brand-wrap { border-right: 0; }

@media (max-width: 1280px) {
  .layout { grid-template-columns: 300px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 1040px) { .topnav { padding-left: 28px; gap: 18px; } }
@media (max-width: 900px) { .topnav { display: none; } }
@media (max-width: 768px) {
  :root { --top: 64px; }
  .menu-btn { display: inline-flex; }
  .brand-wrap { width: auto; border-right: 0; padding: 0 8px; gap: 10px; }
  .brand { font-size: 20px; max-width: none; white-space: nowrap; }
  .kbd { display: none; }
  .search { width: auto; flex: 1; margin-left: 8px; min-width: 0; }
  .search-input { padding-right: 10px; }
  .theme-btn { margin-left: 6px; }
  .topbar { padding-right: max(10px, env(safe-area-inset-right, 0px)); }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; top: var(--top); left: 0; bottom: 0; height: auto; width: min(320px, 86vw); background: var(--bg); z-index: 25;
    transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  body.nav-open .sidebar { transform: none; }
  .main { padding: 24px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px)); }
  .article h1, .hero h1 { font-size: 2rem; }
  .article h2 { font-size: 1.6rem; margin-top: 36px; }
  .title-row { margin-bottom: 24px; }
  .link-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .brand-label { display: none; }
  .copy-btn span { display: none; }
  .pager { grid-template-columns: 1fr; }
  .pg-next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .chev { transition: none; } }

/* role pages: a clear button under each step that opens the steps with pictures */
.step-btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 6px; }
.step-btn { display: inline-flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%; padding: 10px 14px; border: 1px solid var(--link); border-radius: 8px; background: var(--item-hover); color: var(--strong); text-decoration: none; line-height: 1.3; }
.step-btn:hover { background: var(--bg); color: var(--strong); }
.step-btn:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.step-btn b { display: block; font-size: 15px; font-weight: 600; }
.step-btn small { display: block; font-size: 13px; color: var(--muted); }
.step-btn span { min-width: 0; }
.step-btn svg { flex: none; color: var(--link); }
/* the same button inside text on task pages: on its own line, as wide as its words */
.link-btn { display: flex; width: fit-content; margin: 12px 0 6px; font-weight: 400; }
.article li .link-btn, .article td .link-btn { margin: 8px 0 4px; }
.callout-body .link-btn { background: var(--bg); }

/* printing a role page gives a one-page quick start */
@page { size: Letter; margin: 0.45in 0.55in; }
@media print {
  .topbar, .sidebar, .toc, .crumbs, .pager, .related, .role-all, .foot, .skip, .copy-btn, .callout-note, .step-btns { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; max-width: none; }
  body { font-size: 11.5px; line-height: 16px; background: #fff; color: #000; font-family: "Segoe UI", Arial, sans-serif; }
  .title-row { margin-bottom: 8px; }
  .article h1 { font-size: 24px; }
  .article h2 { font-size: 14.5px; margin: 9px 0 2px; break-after: avoid; }
  .article p { margin-bottom: 3px; }
  .who { padding: 5px 10px; border: 1px solid #999; }
  a { color: #000; text-decoration: none; font-weight: 600; }
}
