/* The demo's own pages (landing, benefits, results, run it yourself): page nav, ? tips, accordions, callouts.
   Kept out of style.css so the store pages, which are what gets measured, don't change. */

/* Page nav: every demo page links to the others and to the three stores */
.demo-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 28px; font-size: .92rem; }
.demo-nav a { text-decoration: none; padding: 6px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; }
.demo-nav a:hover { color: var(--text); background: var(--surface); }
.demo-nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }
.demo-nav .home { color: var(--text); font-weight: 800; padding-left: 0; margin-right: auto; }
.demo-nav .home:hover, .demo-nav .home[aria-current="page"] { background: none; color: var(--text); }
.demo-nav .stores { display: flex; align-items: center; gap: 4px; margin-left: 6px; color: var(--muted); font-weight: 600; }
.demo-nav a.ver { padding: 0; color: #fff; }
@media (max-width: 640px) {
  .demo-nav { gap: 2px; }
  .demo-nav .home { flex-basis: 100%; margin-bottom: 4px; }
  .demo-nav a { padding: 6px 10px; }
  .demo-nav .stores { margin-left: 0; }
}

/* Version letters */
.ver { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--a); color: #fff; font-weight: 800; text-decoration: none; }
.ver.b { background: var(--b); }
.ver.c { background: var(--c); }
.ver.big { width: 54px; height: 54px; font-size: 1.6rem; }

/* ? tips: the text lives in data-tip; tips.js shows it on hover, focus or tap */
.q { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 4px; padding: 0; border: 0; border-radius: 50%;
     background: var(--line); color: var(--text); font: 700 12px/1 system-ui, sans-serif; cursor: help; vertical-align: 2px; }
.q::after { content: ""; position: absolute; inset: -8px; } /* a bigger target for fingers */
.q:hover, .q:focus-visible { background: var(--accent); color: var(--accent-ink); outline: none; }
.q.warn { background: #f59e0b; color: #1c1917; }
.qtip-bubble { position: fixed; z-index: 50; max-width: min(320px, calc(100vw - 32px)); padding: 9px 12px; border-radius: 10px;
               background: var(--text); color: var(--bg); font-size: .86rem; line-height: 1.45; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); pointer-events: none; }

/* Accordions: a one-line summary, details on demand */
details.more { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 0 18px; margin: 16px 0; }
details.more > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; font-weight: 700; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; flex: none; font-size: 1.4rem; line-height: 1; color: var(--accent); }
details.more[open] > summary::after { content: "−"; }
details.more > summary ~ * { margin-top: 0; }
details.more[open] { padding-bottom: 16px; }

/* Callouts: a label that says what it is, one line, then "Why?" */
.callout { margin: 24px 0; padding: 14px 18px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); border-left: 6px solid var(--accent); }
.callout p { margin: 0; }
.callout .label { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 6px; background: var(--accent); color: var(--accent-ink);
                  font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px; }
.callout details { margin-top: 8px; }
.callout summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.callout details p { margin-top: 8px; }
.callout details p.aside { margin-top: 10px; font-size: .88rem; color: var(--muted); } /* the secondary details */

/* Where to go next: big buttons */
.next-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 40px 0 24px; }
.next-steps a { display: block; padding: 18px 20px; border-radius: 16px; background: var(--accent); color: var(--accent-ink); text-decoration: none; box-shadow: var(--shadow); }
.next-steps a:hover { filter: brightness(1.08); }
.next-steps strong { display: block; font-size: 1.2rem; }
.next-steps span { font-size: .92rem; opacity: .85; }
.next-steps.one { grid-template-columns: minmax(0, 360px); }

/* Page intro with the QR code to "run it yourself" beside it (laptops only) */
.intro { display: flex; gap: 28px; align-items: center; }
.intro > div { flex: 1; }
.qr { flex: none; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--surface); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); text-align: center; }
.qr img { width: 150px; height: 150px; display: block; image-rendering: pixelated; }
.qr strong { font-size: .95rem; }
.qr span { font-size: .8rem; color: var(--muted); max-width: 150px; }
@media (max-width: 900px), (pointer: coarse) { .qr { display: none; } } /* already on a phone: no QR */

/* Landing: the three versions */
.versions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0; }
.version { position: relative; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 20px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.version:hover { box-shadow: var(--shadow), inset 0 0 0 2px var(--line); }
.version a { text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.version a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; } /* the whole card is the link */
.version .q { z-index: 1; }
.version span.line { display: block; color: var(--muted); font-size: .95rem; }
@media (max-width: 640px) {
  .versions { grid-template-columns: 1fr; }
  .version { flex-direction: row; align-items: center; }
}
