/*
  Guides: how-to pages for shops that already use Order-Point (marketing/site/guides).

  Loaded after site.css, on the guide pages only. Every class here starts g- because the home
  page already has a .faq, a .steps, a .lede and an .eyebrow of its own, drawn for selling rather
  than for following along; a guide that borrowed them would inherit three-column steps and
  card-style questions. The palette and the faces are the site's.

  One reading column, like a printed shop-floor sheet: a guide is followed with the admin centre
  open beside it, so it is words first, with small diagrams of where things are.
*/

.guide {
  background: var(--ground-2);
  padding-block: clamp(32px, 6vw, 64px) clamp(56px, 8vw, 96px);

  --surface: #ffffff;
  --fill: #eceeee;
  --ok: #2d6f4a; --ok-bg: #dff2e6;
  --warn: #85580d; --warn-bg: #fbeed5;
  --mute: #55605e; --mute-bg: #eceeee;
  --bad: #a8271e; --bad-bg: #fdecea;
}
.guide .wrap { max-width: 800px; }

.g-page { display: grid; gap: 48px; }
.guide h1, .guide h2, .guide h3, .guide p { margin: 0; }
.guide h1 { font-size: clamp(1.9rem, 4.6vw, 2.5rem); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.guide h2 { font-size: 1.45rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
.guide h3 { font-size: 1.03rem; font-weight: 600; letter-spacing: -0.01em; }
.guide p { max-width: 65ch; color: var(--ink-2); }
.guide section { display: grid; gap: 16px; }
.guide strong { color: var(--ink); font-weight: 600; }
.guide code { font-family: var(--mono); font-size: .9em; background: var(--fill); padding: 1px 6px; border-radius: 5px; color: var(--ink); white-space: nowrap; }

.g-head { display: grid; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.g-crumb { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.g-crumb a { color: inherit; text-decoration: none; }
.g-crumb a:hover { text-decoration: underline; }
.g-lede { font-size: 1.12rem; }

/* The words printed on a button or a menu, so they can be found on the screen. */
.g-menu { font-weight: 600; color: var(--ink); white-space: nowrap; }

/* ── The list of guides ─────────────────────────────────────────── */

.g-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.g-card { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; color: inherit; text-decoration: none; }
.g-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.g-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.g-card h2 { font-size: 1.15rem; }
.g-card .g-where-in { font-size: 13px; color: var(--ink-3); }
.g-card .g-open { font-size: 14px; font-weight: 600; color: var(--accent-ink); }

/* ── Screens ────────────────────────────────────────────────────────
   Captures of the real app (marketing/capture/capture-guide-shots.ps1), each cut down to the part
   the guide is pointing at. Never drawings of it: a guide that shows a screen the reader cannot
   find on their own is worse than one with no pictures. */

.g-shot { display: block; width: 100%; height: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }

/* Where customers see them: three screens side by side, cut to one shape so they line up. */
.g-where { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.g-where figure { margin: 0; display: grid; gap: 10px; align-content: start; }
.g-where figcaption { font-size: 14px; color: var(--ink-2); }
.g-where figcaption strong { display: block; margin-bottom: 2px; }
.guide p.g-aside { font-size: 13px; color: var(--ink-3); }

/* One screen of the admin centre, the width of the column. */
.g-screen { margin: 0; display: grid; gap: 8px; }
.g-screen figcaption { font-size: 14px; color: var(--ink-2); }

/* ── File names: the thing the shop has to get right ────────────── */

.g-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 4px; }
.g-names { width: 100%; border-collapse: collapse; font-size: 15px; }
.g-names th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 0 12px 8px 0; border-bottom: 1px solid var(--line); }
.g-names td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.g-names tr:last-child td { border-bottom: 0; }
.g-names td:first-child { font-family: var(--mono); font-size: 14px; white-space: nowrap; color: var(--ink); }
.g-names td:last-child { color: var(--ink-2); }

/* ── The three shapes of photo, each in the square the product list gives it ─ */

.g-shapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.g-shapes figure { margin: 0; display: grid; gap: 8px; justify-items: start; align-content: start; }
.g-shapes .g-sq { width: 72px; height: 72px; border-radius: 10px; background: #ffffff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.g-shapes .g-sq i { display: block; background: var(--accent); }
.g-shapes figcaption { font-size: 14px; color: var(--ink-2); }
.g-shapes figcaption strong { display: block; }
.guide p.g-best { font-size: 1.12rem; color: var(--ink); font-weight: 600; }

.g-tips { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); max-width: 65ch; }
.g-tips li::marker { color: var(--accent-ink); }

/* ── Steps: a real sequence, so they are numbered ───────────────── */

.g-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: g-step; }
.g-steps > li { counter-increment: g-step; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; }
.g-steps > li::before {
  content: counter(g-step); width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--accent); color: var(--on-accent);
}
.g-steps > li > div { display: grid; gap: 6px; padding-top: 3px; }

/* ── The match labels, as the Pictures page shows them ──────────── */

.g-legend { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.g-legend div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 15px; color: var(--ink-2); }
.g-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; justify-self: start; }
.g-pill-ok { background: var(--ok-bg); color: var(--ok); }
.g-pill-warn { background: var(--warn-bg); color: var(--warn); }
.g-pill-mute { background: var(--mute-bg); color: var(--mute); }
.g-pill-bad { background: var(--bad-bg); color: var(--bad); }

.guide p.g-note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; border-radius: 0 8px 8px 0; }

/* ── Questions: all open, because a guide is also printed ───────── */

.g-qa { display: grid; gap: 0; border-top: 1px solid var(--line); }
.g-qa > div { display: grid; gap: 6px; border-bottom: 1px solid var(--line); padding: 14px 0; }

.guide .g-foot { font-size: 14px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 16px; max-width: none; }
.g-foot a { color: var(--accent-ink); }

@media (max-width: 620px) {
  .g-where { grid-template-columns: 1fr; }
  .g-where .g-shot { max-width: 320px; }
  .g-shapes { grid-template-columns: 1fr; }
  .g-shapes figure { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; }
  .g-legend div { grid-template-columns: 1fr; gap: 4px; }
}

/*
  On paper: the guide and nothing round it, white to the edges. The stacks become plain blocks,
  because Chromium breaks a grid inside a grid across pages badly (a note printed over the step
  above it) — the same gaps, as margins.
*/
@media print {
  .site-header, .site-footer, .skip { display: none !important; }
  html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .guide { background: #ffffff; padding-block: 0; }
  .g-page, .guide section, .g-head, .g-steps, .g-qa { display: block; }
  .g-page > * + * { margin-top: 40px; }
  .guide section > * + *, .guide .g-head > * + * { margin-top: 16px; }
  .g-steps > li + li { margin-top: 18px; }
  figure, .g-steps > li, .g-legend, .g-note, .g-qa > div, .g-shapes, .g-table-wrap { break-inside: avoid; }
  .guide h2 { break-after: avoid; }
}
