/* QuickMunch documentation — one stylesheet, light only.
 *
 * The palette, the type and the radii below are the APPLICATION'S own, lifted from
 * assets/css/app.css so the manual and the product read as one thing: Poppins, the #ff003d
 * brand, the warm ink scale and the pink line colours — not a generic documentation theme.
 *
 * Poppins is copied into docs/assets/fonts so the guide still looks right when the folder is
 * opened on its own, away from the application.
 */

@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/poppins-regular.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/poppins-medium.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/poppins-semibold.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/poppins-bold.woff2') format('woff2'); }

:root {
  /* The brand red is the product's own. Everything AROUND it is neutral, the way the marketing
     site is: a white page, grey text, and red kept for the few things that should be noticed —
     the section marker, the current page, a link. Pink as a surface reads as decoration on a
     document this long, so there is none. */
  --qm-primary: #ff003d;
  --qm-primary-600: #d10032;
  --qm-primary-50:  #fff5f7;
  --qm-primary-100: #ffd7e0;
  --ink-900: #17171a;  --ink-800: #26262b;  --ink-700: #3d3d44;
  --ink-600: #55555d;  --ink-500: #6b6b74;  --ink-400: #8a8a93;  --ink-300: #c4c4cb;
  --line: #e7e7ec;     --line-2: #f1f1f5;
  --surface: #ffffff;  --surface-2: #fafafb;  --pink-bg: var(--qm-primary-50);
  --r-sm: 8px; --r-md: 12px;
  --f-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --f-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --sidebar-w: 274px;
  --rail-w: 220px;
  /* The article takes the width it is given. A manual is full of tables and step lists, which
     read badly squeezed into a narrow column, so the cap is high and the right rail — not empty
     margin — takes what is left over on a wide screen. */
  --measure: 128ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink-700); font: 400 15.5px/1.68 var(--f-sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  background: var(--surface);
}
:target { scroll-margin-top: 110px; }

/* ---------------------------------------------------------------- header */
.doc-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 20px;
  padding: 0 26px; height: 78px;          /* room for the model tabs to breathe */
  background: rgba(255, 255, 255, .93); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
/* A quiet label beside the logo. The red belongs on the page title, not here — two red
   wordmarks on one line compete, and this one is not the thing you came to read. */
.doc-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.doc-brand img { height: 24px; width: auto; display: block; }
.doc-brand span {
  font: 600 11px/1 var(--f-sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-400); white-space: nowrap; padding-top: 1px;
}

/* Business-model tabs — the reader's own model, so pages that cannot exist in it are removed. */
.doc-markets { display: flex; gap: 3px; margin-inline-start: auto; background: var(--surface-2); padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.doc-market {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: none; cursor: pointer; white-space: nowrap;
  font: 600 12.5px/1 var(--f-sans); color: var(--ink-500);
  padding: 11px 17px; border-radius: 999px;
}
.doc-market:hover { color: var(--ink-800); }
.doc-market[aria-pressed="true"] { background: var(--surface); color: var(--qm-primary-600); box-shadow: 0 1px 4px rgba(31, 11, 18, .10); }

/* A live dot on the model you are reading as, the same signal the marketing site uses for a
   service that is switched on. Only the selected tab carries it. */
.doc-market i { display: none; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; flex: 0 0 8px; position: relative; }
.doc-market[aria-pressed="true"] i { display: block; }
.doc-market[aria-pressed="true"] i::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: #16a34a; animation: qm-pulse 1.9s ease-out infinite;
}
@keyframes qm-pulse {
  0%   { transform: scale(1);   opacity: .55; }
  70%  { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .doc-market[aria-pressed="true"] i::after { animation: none; }
}

.doc-burger { display: none; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); width: 38px; height: 38px; cursor: pointer; font-size: 15px; color: var(--ink-700); }

/* ---------------------------------------------------------------- shell
   Three columns: contents, the article, and what's on this page. The third column is what
   stops a wide screen from leaving two thirds of itself empty. */
.doc-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); align-items: start; }

.doc-side {
  position: sticky; top: 78px; height: calc(100vh - 78px);
  overflow-y: auto; overscroll-behavior: contain; padding: 0 14px 60px;
  border-inline-end: 1px solid var(--line); background: var(--surface);
}
/* The search rides at the top of the contents while the links scroll beneath it. A hundred-odd
   links means the reader is usually a long way from the top, and a search box they have to
   scroll back to find is a search box they stop using. */
.doc-side-head {
  position: sticky; top: 0; z-index: 2;
  padding: 18px 0 12px; margin: 0 -14px; padding-inline: 14px;
  background: var(--surface);
  border-bottom: 1px solid transparent;
}
.doc-side:not([data-top="1"]) .doc-side-head { border-bottom-color: var(--line-2); }
.doc-search {
  display: block; width: 100%; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  font: 400 13.5px var(--f-sans); color: var(--ink-800);
}
.doc-side-empty { padding: 4px 10px; margin: 0; color: var(--ink-400); font-size: 13.2px; }
/* The close button belongs to the drawer, so it only exists where the drawer does. */
.doc-side-close { display: none; }

/* A wide table scrolls inside its own box rather than pushing the page sideways. */
.doc-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 18px 0; }
.doc-tablewrap > table { margin: 0; }
.doc-tablewrap:focus-visible { outline: 2px solid var(--qm-primary); outline-offset: 2px; }

.doc-backdrop {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(23, 23, 26, .42); backdrop-filter: blur(1px);
}
.doc-backdrop[hidden] { display: none; }
body.is-drawer-open { overflow: hidden; }
.doc-search::placeholder { color: var(--ink-400); }
.doc-search:focus { outline: 2px solid var(--qm-primary); outline-offset: -1px; }
/* Set for reading, not for fitting the most rows on screen. A hundred-odd links pressed together
   are harder to scan than the same links with air around them — scrolling is cheap, misreading
   a row is not. */
.doc-group { margin-bottom: 26px; }
.doc-group:first-child { margin-top: 4px; }
.doc-group-t {
  font: 700 10.5px/1 var(--f-sans); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-400); padding: 0 10px 11px;
}
.doc-side a { display: block; padding: 8px 10px; border-radius: 7px; font-size: 13.6px; line-height: 1.5; color: var(--ink-600); text-decoration: none; }
.doc-side a:hover { background: var(--line-2); color: var(--ink-900); }
.doc-side a.is-here { background: var(--qm-primary-50); color: var(--qm-primary-600); font-weight: 600; box-shadow: inset 2px 0 0 var(--qm-primary); }

/* ---------------------------------------------------------------- article */
.doc-main { padding: 40px 54px 44px; min-width: 0; }
/* Centred, so the space a very wide monitor leaves over is split evenly instead of all piling
   up on the right of the rail. */
.doc-wrap { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-w); gap: 52px; align-items: start; max-width: 1520px; margin-inline: auto; }
.doc-body { max-width: var(--measure); min-width: 0; }

/* Everything takes the full column — prose included. Capping the paragraphs to a reading measure
   was tried and rejected: it left the text stranded in a narrow strip beside full-width tables,
   which read worse here than a long line does. One width, edge to edge. */

/* The page title ends in a red full stop, the way the marketing site sets its headlines: the
   colour marks the title without repainting the words you have to read. */
.doc-body h1 {
  font-size: clamp(28px, 3vw, 36px); line-height: 1.15; letter-spacing: -.4px;
  margin: 0 0 12px; color: var(--ink-900); font-weight: 700;
}
/* Colour the WORD that names the page, the way the marketing site sets its headlines. Pages
   opt in by wrapping it; nothing is coloured automatically. The closing full stop is added here
   and stays in ink: it is punctuation finishing the sentence, not a second accent. */
.doc-body h1 .is-accent { color: var(--qm-primary); }
.doc-body h1::after { content: "."; color: var(--ink-900); }
.doc-lede { font-size: 17.5px; line-height: 1.6; color: var(--ink-500); margin: 0 0 24px; }

/* Section heads carry the RED BAR the dashboard already uses to mark a page section, so the
   manual and the product mark the same thing the same way. */
/* No marker beside the heading. A rule above it already says "new section", and a second signal
   in the margin only competed with it — which is what made the alignment look wrong however it
   was nudged. The weight and the size do the work. */
.doc-body h2 {
  font-size: 23px; font-weight: 700; letter-spacing: -.2px;
  margin: 48px 0 16px; padding-top: 26px;
  color: var(--ink-900); border-top: 1px solid var(--line-2);
}
.doc-body h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.doc-body h3 { font-size: 17px; font-weight: 600; margin: 28px 0 8px; color: var(--qm-primary-600); }
.doc-body p, .doc-body li { font-size: 15.5px; }
.doc-body ul { padding-inline-start: 22px; }
/* Ordered lists are procedures. Each item renders as a step row — the number in a brand-ringed
   disc beside the instruction, air between the rows — so a sequence reads as one. Unordered
   lists keep their plain markers; order carrying meaning is what earns the treatment. */
.doc-body ol { list-style: none; padding-inline-start: 0; margin: 16px 0 22px; counter-reset: doc-step; }
.doc-body ol > li { counter-increment: doc-step; position: relative; padding-inline-start: 42px; margin: 0 0 14px; }
.doc-body ol > li::before {
  content: counter(doc-step);
  position: absolute; inset-inline-start: 0; top: 0;
  width: 27px; height: 27px; border-radius: 50%;
  background: var(--qm-primary-50); border: 1px solid var(--qm-primary-100); color: var(--qm-primary-600);
  font: 600 13.5px/25px var(--f-sans); text-align: center;
}
.doc-body li { margin: 7px 0; }
.doc-body a { color: var(--qm-primary-600); text-underline-offset: 2px; }
.doc-body strong, .doc-body b { color: var(--ink-900); font-weight: 600; }

code {
  font: 500 13px var(--f-mono); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; color: var(--ink-800);
}
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; }

/* Badges under the H1. Small, outlined — they label the page, they are not decoration. */
.doc-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 18px; }
.doc-badge {
  font: 600 11.5px/1 var(--f-sans); padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-500); background: var(--surface);
}
.doc-badge.is-role   { border-color: var(--ink-300); color: var(--ink-700); }
.doc-badge.is-needs  { border-color: #f0dcc0; color: #8a5a12; background: #fffaf2; }
.doc-badge.is-market { border-color: var(--qm-primary-100); color: var(--qm-primary-600); background: var(--qm-primary-50); }
.doc-path { font: 500 12.8px var(--f-mono); color: var(--ink-400); margin: 0 0 26px; }

table { border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 14.6px; }
th, td { border: 1px solid var(--line); padding: 10px 13px; text-align: start; vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; font-size: 13.4px; color: var(--ink-800); }
tbody tr:nth-child(even) td, table tr:nth-child(even) td { background: var(--surface-2); }

/* Callouts: a coloured EDGE and a white body. A filled panel shouts over the paragraph it is
   meant to support, which is why the whole block is no longer tinted. */
.doc-note, .doc-warn {
  background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--qm-primary);
  border-radius: var(--r-md); padding: 14px 17px; margin: 22px 0; font-size: 15px;
}
.doc-warn { border-inline-start-color: #e0a01a; }
.doc-note strong:first-child, .doc-warn strong:first-child { color: var(--ink-900); }

.doc-rel { margin-top: 46px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14.6px; }
.doc-rel b { display: block; margin-bottom: 7px; font: 700 10.5px/1 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-400); }

.doc-pager { display: flex; gap: 12px; margin-top: 32px; }
.doc-pager a { flex: 1; padding: 13px 17px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink-800); background: var(--surface); }
.doc-pager a:hover { border-color: var(--qm-primary); }
.doc-pager span { display: block; font-size: 11.5px; color: var(--ink-400); margin-bottom: 3px; }
.doc-pager .is-next { text-align: end; }

/* ---------------------------------------------------------------- right rail */
.doc-rail { position: sticky; top: 106px; font-size: 13.2px; }
.doc-rail-t { font: 700 10.5px/1 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-400); margin-bottom: 10px; }
.doc-rail a { display: block; padding: 5px 0 5px 12px; color: var(--ink-500); text-decoration: none; border-inline-start: 2px solid var(--line); line-height: 1.45; }
.doc-rail a:hover { color: var(--ink-900); border-inline-start-color: var(--ink-300); }
.doc-rail a.is-here { color: var(--qm-primary-600); border-inline-start-color: var(--qm-primary); font-weight: 600; }
.doc-rail a.is-sub { padding-inline-start: 24px; font-size: 12.6px; }

/* ---------------------------------------------------------------- landing */
.doc-hero { max-width: 78ch; margin-bottom: 34px; }
.doc-hero h1 { font-size: clamp(30px, 3.4vw, 40px); margin: 0 0 12px; letter-spacing: -.6px; }
.doc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; margin: 18px 0 34px; }
.doc-card { display: block; padding: 17px 19px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink-700); background: var(--surface); }
.doc-card:hover { border-color: var(--qm-primary); box-shadow: 0 2px 10px rgba(255, 0, 61, .07); }
.doc-card b { display: block; font-size: 15.2px; margin-bottom: 5px; color: var(--ink-900); }
.doc-card span { font-size: 13.6px; color: var(--ink-500); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1240px) {
  .doc-wrap { grid-template-columns: minmax(0, 1fr); }
  .doc-rail { display: none; }
}
@media (max-width: 980px) {
  .doc-shell { grid-template-columns: 1fr; }
  .doc-burger { display: block; flex: 0 0 auto; }
  .doc-top { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 10px; }

  /* The three models fill the row and share it equally. They used to sit in a strip that
     scrolled sideways, which hid the third one behind a gesture nobody knew was there. */
  .doc-markets { order: 3; width: 100%; overflow: visible; margin: 0; gap: 2px; }
  .doc-market {
    flex: 1 1 0; min-width: 0; justify-content: center; text-align: center;
    white-space: normal; padding: 9px 6px; font-size: 12px; gap: 6px;
  }

  .doc-side {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 50;
    width: min(88vw, 320px); height: 100dvh; background: var(--surface);
    transform: translateX(-102%); transition: transform .22s ease;
    box-shadow: 0 0 40px rgba(31, 11, 18, .2);
    border-inline-end: 0;
  }
  .doc-side[data-open="1"] { transform: none; }

  /* Room for the X, which sits on the same line as the search. */
  .doc-side-head { display: flex; align-items: center; gap: 8px; padding-top: 14px; }
  .doc-side-close {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto; width: 38px; height: 38px; padding: 0;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--surface); color: var(--ink-600);
    font: 400 22px/1 var(--f-sans); cursor: pointer;
  }
  .doc-side-close:hover { color: var(--ink-900); background: var(--line-2); }

  .doc-main { padding: 22px 16px 32px; }
  .doc-body h1 { font-size: 26px; }
  .doc-crumbs { font-size: 12.5px; gap: 6px; }
  .doc-foot { align-items: flex-start; gap: 12px 20px; }
  .doc-foot-links { gap: 6px 16px; }
}

@media (max-width: 620px) {
  /* Two cards side by side leaves each too narrow to read the page name in. A tablet has
     the room; a phone does not. */
  .doc-pager { flex-direction: column; }
  .doc-pager a { width: 100%; }
}

@media (max-width: 380px) {
  /* "My own restaurants" is the long one; let it take two lines rather than shrink the rest. */
  .doc-market { font-size: 11.5px; padding: 8px 4px; }
}

@media print {
  .doc-top, .doc-side, .doc-rail, .doc-pager, .doc-foot, .doc-backdrop { display: none; }
  .doc-tablewrap { overflow: visible; }
  .doc-main { padding: 0; }
  .doc-wrap { grid-template-columns: 1fr; }
  body { background: #fff; font-size: 11pt; }
}


/* ---------------------------------------------------------------- breadcrumbs
   One quiet line above the title: the guide, the group, this page. It is orientation, not
   navigation, so it is small, grey, and never competes with the H1 underneath it. */
.doc-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 14px; font-size: 13px; line-height: 1.5; color: var(--ink-400);
}
.doc-crumbs a { color: var(--ink-500); text-decoration: none; border-bottom: 1px solid transparent; }
.doc-crumbs a:hover { color: var(--qm-primary-600); border-bottom-color: var(--qm-primary-100); }
.doc-crumbs i { font-style: normal; color: var(--ink-300); }
.doc-crumbs .is-here { color: var(--ink-700); }

/* ---------------------------------------------------------------- footer
   Deliberately plain: the pages a reader wants when they have finished reading one, and
   nothing else. A documentation footer that repeats the whole contents is just the sidebar
   again, further down. */
/* Two halves on one line: the mark on the left, the links on the right — the header's
   arrangement, repeated at the foot of the page. */
.doc-foot {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px 28px;
  margin-top: 44px; padding: 20px 0 0;
  border-top: 1px solid var(--line);
}
.doc-foot-brand img { height: 20px; }
.doc-foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.doc-foot-links a {
  font-size: 13.6px; color: var(--ink-600); text-decoration: none;
  border-bottom: 1px solid transparent;
}
.doc-foot-links a:hover { color: var(--qm-primary-600); border-bottom-color: var(--qm-primary-100); }
