/* The demo pages (/demo, /demo/news, /demo/video; templates/site_demo.html,
   static/demo.js), on site.css and the tokens. */
.demo-sites { display: flex; gap: var(--space-2); margin-bottom: var(--space-5); }
.demo-sites a { padding: var(--space-1) var(--space-4); border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--ink-muted); font-weight: 600; font-size: 15px; line-height: 24px; text-decoration: none; }
.demo-sites a[aria-current="page"] { background: var(--orange); color: var(--on-orange); }
.demo-sites a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.demo-consent { display: flex; gap: var(--space-5); align-items: center; justify-content: space-between; padding: var(--space-5) var(--space-6); margin-bottom: var(--space-5); background: var(--sky-soft); box-shadow: none; }
.demo-consent h2 { font-size: 17px; line-height: 24px; font-weight: 600; margin: 0 0 var(--space-1); }
.demo-consent p { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 24px; max-width: 720px; }
.demo-consent[hidden], .demo-consented[hidden] { display: none; }
.demo-consented { margin: 0 0 var(--space-5); color: var(--ink-muted); font-size: 15px; }
.demo-link { background: none; border: 0; padding: 0; font: inherit; color: var(--sky-text); text-decoration: underline; cursor: pointer; }

.demo-nav { display: flex; gap: var(--space-2); margin-bottom: var(--space-5); border-bottom: 1px solid var(--line); }
.demo-tab { display: inline-flex; gap: var(--space-2); align-items: center; padding: var(--space-3) var(--space-4); color: var(--ink-muted); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.demo-tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--orange); }
.demo-tab .mono { font-size: 13px; background: var(--surface-sunken); border-radius: var(--radius-pill); padding: 0 var(--space-2); }

.demo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-6); align-items: start; }
.demo-view { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.demo-view-title { font-family: var(--font-display); font-size: 32px; line-height: 38px; font-weight: 700; letter-spacing: -0.03em; margin: 0; }

.demo-row-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); }
.demo-row-head h2 { font-size: 17px; line-height: 24px; font-weight: 600; margin: 0; }
.demo-call { font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--ink-subtle); overflow-wrap: anywhere; }
.demo-items { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.demo-item { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.demo-card { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3); background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-card); color: var(--ink); text-decoration: none; }
.demo-card:hover .demo-name { text-decoration: underline; }
.demo-name { font-weight: 600; font-size: 15px; line-height: 22px; }
.demo-facts { color: var(--ink-muted); font-size: 13px; line-height: 20px; margin: 0; }
.demo-why { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.demo-why-q { color: var(--orange-text); font-weight: 600; }
.demo-note { grid-column: 1 / -1; color: var(--ink-subtle); font-size: 15px; margin: 0; }

.demo-tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); font-family: var(--font-display); font-weight: 700; font-size: 28px; margin-bottom: var(--space-2); }
.demo-tile img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.demo-tile-lg { width: 240px; flex: none; font-size: 56px; margin: 0; }

.demo-product { display: flex; gap: var(--space-6); padding: var(--space-6); }
.demo-product-body { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.demo-product-body .demo-facts { font-size: 15px; }
.demo-price { font-size: 20px; line-height: 28px; margin: 0; }
.demo-was { color: var(--ink-muted); font-weight: 400; }
.demo-prices { white-space: nowrap; }
.demo-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.demo-text { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 24px; max-width: 560px; }
.demo-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.demo-cart { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.demo-cart-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.demo-cart-items li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: var(--space-3); align-items: center; }
.demo-cart-items .demo-tile { font-size: 18px; margin: 0; }
.demo-cart-items a { color: var(--ink); font-weight: 600; }

.demo-side { display: grid; gap: var(--space-5); }
.demo-how, .demo-sees { padding: var(--space-5); }
.demo-how h2 { font-size: 17px; line-height: 24px; font-weight: 600; margin: 0 0 var(--space-2); }
.demo-how p { color: var(--ink-muted); font-size: 13px; line-height: 20px; margin: 0 0 var(--space-3); }
.demo-how dl { margin: 0 0 var(--space-3); font-size: 13px; line-height: 20px; }
.demo-how dt { font-weight: 600; margin-top: var(--space-3); }
.demo-how dd { margin: 0; color: var(--ink-muted); }
.demo-how code { font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.demo-how a { color: var(--sky-text); }
.demo-empty { padding: var(--space-6); max-width: 760px; }
.demo-empty h2 { font-size: 17px; line-height: 24px; font-weight: 600; margin: 0 0 var(--space-2); }
.demo-empty code { font-family: var(--font-mono); font-size: 0.88em; }

.demo-card:focus-visible, .demo-tab:focus-visible, .demo-link:focus-visible, .demo-view-title:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (max-width: 1000px) {
  .demo-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .demo-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-consent, .demo-product { flex-direction: column; align-items: flex-start; padding: var(--space-5); }
  .demo-tile-lg { width: 100%; }
}

/* The demo sites' pages (AP-0686): breadcrumbs, the cart's links, the
   pretend checkout form. */
.demo-nav { flex-wrap: wrap; }
.demo-tab-cart { margin-left: auto; }
.hp .btn-quiet { background: var(--surface-sunken); color: var(--ink); text-decoration: none; }
.demo-crumbs { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-subtle); }
.demo-crumbs a { color: var(--sky-text); }
.demo-row[hidden] { display: none; }
.demo-cart-items button { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--sky-text); text-decoration: underline; cursor: pointer; }
.demo-total { margin: 0; font-size: 17px; line-height: 24px; font-weight: 600; }
.demo-form { display: flex; flex-direction: column; gap: var(--space-3); max-width: 420px; }
.demo-form label { display: flex; flex-direction: column; gap: var(--space-1); font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.demo-form input { height: 40px; padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; color: var(--ink); background: var(--surface); }
.demo-form input:focus-visible, .demo-crumbs a:focus-visible, .demo-cart-items button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* What Recapi sees: the visitor's history, each row's reasons, personas. */
.demo-sees h2 { font-size: 17px; line-height: 24px; font-weight: 600; margin: 0 0 var(--space-2); }
.demo-sees h3 { font-size: 13px; line-height: 20px; font-weight: 600; margin: var(--space-4) 0 var(--space-2); }
.demo-sees p { color: var(--ink-muted); font-size: 13px; line-height: 20px; margin: 0 0 var(--space-2); }
.demo-who { color: var(--ink); }
.demo-personas { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.demo-personas h3, .demo-personas p { flex-basis: 100%; margin-bottom: 0; }
.demo-chip { font: inherit; font-size: 13px; line-height: 20px; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); border: 1px solid var(--sky); background: var(--surface); color: var(--ink); cursor: pointer; }
.demo-chip[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
.demo-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.demo-history { margin: 0; padding-left: var(--space-5); font-size: 13px; line-height: 20px; }
.demo-history li { display: flex; justify-content: space-between; gap: var(--space-2); }
.demo-history .mono, .demo-reason { font-family: var(--font-mono); font-size: 12px; color: var(--ink-subtle); }
.demo-note[hidden] { display: none; }
.demo-whys { margin: 0; font-size: 13px; line-height: 20px; }
.demo-whys dt { font-weight: 600; margin-top: var(--space-2); }
.demo-whys dd { margin: 0; color: var(--ink-muted); }
.demo-reason { margin: 0; overflow-wrap: anywhere; }
.demo-owner { border-left: 3px solid var(--orange); padding-left: var(--space-3); }

/* Recapi or a plain popular list (AP-0688): a compared row shows both
   lists side by side, Recapi's marked orange and the comparison blue as in
   the charts, and the items both hold tagged. */
.demo-row-head .demo-compare { margin-left: auto; }
.demo-lists { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.demo-row[data-compare="on"] .demo-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.demo-row[data-compare="on"] .demo-items, .demo-base-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.demo-base-items { display: grid; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.demo-list { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.demo-list[hidden] { display: none; }
.demo-list-head { margin: 0; font-size: 13px; line-height: 20px; font-weight: 600; border-left: 3px solid var(--orange); padding-left: var(--space-2); display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); align-items: baseline; }
.demo-baseline .demo-list-head { border-left-color: var(--sky); }
.demo-row:not([data-compare="on"]) .demo-list-head { display: none; }
.demo-both-tag { align-self: flex-start; font-size: var(--text-xs); line-height: 16px; font-weight: 600; padding: 0 var(--space-2); border-radius: var(--radius-xs); background: var(--surface-sunken); color: var(--ink-muted); }
.demo-compare-sum { margin: var(--space-2) 0 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.demo-compare-sum[hidden] { display: none; }
@media (max-width: 720px) {
  .demo-row[data-compare="on"] .demo-lists { grid-template-columns: minmax(0, 1fr); }
}

/* The link to the site's read-only dashboard, under the page's lead. */
.demo-dash-cta { margin-top: var(--space-3); color: var(--ink-muted); }
.demo-dash-cta a { color: var(--sky-text); font-weight: 600; }
