/* The public demo's banner. Loaded only when DEMO_MODE is on — the server adds
   the <link> to the page on the way out — so a real install never ships it.

   Self-contained on purpose: the guide is dark and branded, the builder is light,
   and the banner has to read the same on both without borrowing either one's
   variables. Not fixed to the viewport: on a phone, a strip that follows the
   reader covers the very steps they came to look at. */

.demo-banner {
  position: relative;
  z-index: 5;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 10px 16px;
  background: #fff4cf;
  color: #3d3214;
  border-bottom: 1px solid #e6cf7a;
  font: 13.5px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  text-align: left;
}

.demo-banner > *,
.demo-signin > p,
.demo-signin > ul {
  max-width: 620px;
  margin: 0 auto;
}

.demo-banner > * + * { margin-top: 6px; }

.demo-banner-builder > * { max-width: none; }

.demo-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: #3d3214;
  color: #fff4cf;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.demo-banner a { color: #6b4e00; font-weight: 600; }

/* Fixed-width digits, so the line does not shimmy every second. */
.demo-countdown strong { font-variant-numeric: tabular-nums; white-space: nowrap; }

.demo-signin ul {
  list-style: none;
  padding: 0;
  margin-top: 4px;
  display: grid;
  gap: 3px;
}

/* The guide styles every <button> as a full-width call to action, and the
   banner's buttons are chips — hence the explicit width and height. */
.demo-banner .demo-digits {
  width: auto;
  min-width: 4.2em;
  min-height: 0;
  margin: 0 6px 0 0;
  padding: 2px 8px;
  border: 1px solid #c9ad4f;
  border-radius: 6px;
  background: #fff;
  color: #3d3214;
  font: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  cursor: pointer;
  filter: none;
}

.demo-banner .demo-digits:hover,
.demo-banner .demo-digits:focus-visible { background: #ffe9a3; filter: none; }

.demo-note { color: #6f6340; }

/* Once signed in, the list of people is noise above the guide. */
body:has(#gate[hidden]) .demo-signin { display: none; }

/* The builder's sign-in page centres one card in a grid; the banner is a second
   grid item and should sit as a card of its own above it, not stretch. */
body.centred:has(.demo-banner) {
  align-content: center;
  gap: 16px;
}

/* The code box's own colours are a development afterthought — pale yellow on
   cream. In the demo it is the thing the visitor has to read and type. */
#devcode-value { color: #3d3214; }

body.centred .demo-banner {
  max-width: 420px;
  border: 1px solid #e6cf7a;
  border-radius: 10px;
}
