/* Demo-only additions, layered on top of frontend/style.css. Every color,
   radius and spacing unit here reuses that file's tokens - no new palette,
   so the demo reads as part of the same product rather than a skin over it. */

.demo-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 13px 15px;
  margin-bottom: 20px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-soft);
}
.demo-banner p { margin: 0; }
.demo-banner-cta { margin-top: 6px; }
.demo-banner strong { color: var(--text); }
.demo-banner a { color: var(--accent); font-weight: 600; text-decoration: none; }
.demo-banner a:hover { text-decoration: underline; }

/* The mechanism, stated once, before the picker below asks the visitor to
   choose among fifteen medical topics without knowing what choosing one
   does. Same bordered-block treatment as .demo-banner above it (surface,
   border, accent left edge) so the two read as one continuous intro
   instead of a box followed by loose text. */
.demo-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 15px;
  list-style: none;
}
.demo-steps li {
  flex: 1 1 200px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--text-soft);
  line-height: 1.4;
}
.demo-step-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 1px;
}

/* A <details> disclosure, styled to match details.stats in frontend/style.css
   (same bordered card, same rotating chevron) so it reads as the same kind
   of component instead of a one-off. Fifteen full cards are the right first
   view; once one is picked it collapses to a single summary line so it stops
   competing with the results for space. */
details.demo-picker {
  margin: 18px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
details.demo-picker > summary {
  cursor: pointer;
  padding: 11px 16px;
  font-size: 0.85rem;
  color: var(--text-soft);
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
details.demo-picker > summary::-webkit-details-marker { display: none; }
details.demo-picker > summary::before {
  content: "▸";
  font-size: 0.7rem;
  color: var(--text-faint);
  transition: transform 0.15s;
  flex: none;
}
details.demo-picker[open] > summary::before { transform: rotate(90deg); }
.demo-picker-summary-label {
  flex: none;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.demo-picker-summary-active {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
}
.demo-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  padding: 4px 16px 16px;
  border-top: 1px solid var(--border);
}
.demo-picker-card {
  text-align: left;
  font: inherit;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.demo-picker-card:hover { border-color: var(--border-strong); }
.demo-picker-card[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}
.demo-picker-topic { font-size: 0.87rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.demo-picker-showcase { font-size: 0.78rem; color: var(--text-soft); line-height: 1.4; }
.demo-picker-meta { font-size: 0.72rem; color: var(--text-faint); font-family: var(--mono); }

.demo-picker-more {
  display: block;
  width: calc(100% - 32px);
  margin: 2px 16px 14px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 9px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.demo-picker-more:hover { background: var(--surface); border-color: var(--accent); }

@media (max-width: 600px) {
  .demo-banner { padding: 10px 13px; }

  .demo-steps { gap: 6px 16px; margin-bottom: 14px; }
  .demo-steps li { font-size: 0.79rem; }

  /* The title alone is enough to pick from on a phone; the one-line
     showcase blurb would turn four cards into a long scroll here. */
  .demo-picker-card { padding: 9px 12px; }
  .demo-picker-showcase { display: none; }

  .discovery-note { font-size: 0.78rem; padding: 7px 11px; }
}
