/* The demo page: the site's tokens, a nav, and a console filling the rest. */

.demo-body { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.demo-nav { position: static; flex: none; }
.demo-row { padding: 0 16px; }
@media (min-width: 768px) { .demo-row { padding: 0 20px; } }
.demo-tag {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 9px; margin-left: -10px;
}
.demo-status { color: var(--dim); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.demo-main { flex: 1; min-height: 0; position: relative; }
.demo-view { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }

.demo-panel {
  position: absolute; inset: 0; z-index: 1; overflow: auto;
  display: grid; place-items: center; padding: 24px 16px;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 22px 22px;
}
.demo-card {
  width: 100%; max-width: 640px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
@media (min-width: 768px) { .demo-card { padding: 36px; } }
.demo-card h1 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); margin-bottom: 14px; }
.demo-card > p { color: var(--dim); }
.demo-card > p + p { margin-top: 12px; }
.demo-notice {
  margin-top: 18px; padding: 14px 16px; border-radius: 10px;
  background: var(--accent-soft); color: var(--fg); border: 1px solid transparent;
}
.demo-notice strong { display: block; margin-bottom: 4px; }
.demo-choices { display: grid; gap: 12px; margin-top: 22px; }
@media (min-width: 640px) { .demo-choices { grid-template-columns: 1fr 1fr; } }
.demo-choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left;
  padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg);
  color: var(--fg); font: inherit; cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease;
}
.demo-choice:hover { border-color: var(--accent); }
.demo-choice:active { transform: translateY(1px); }
.demo-choice .icon { width: 22px; height: 22px; color: var(--accent); }
.demo-choice strong { font-size: 1.05rem; }
.demo-choice span { color: var(--dim); font-size: 0.92rem; line-height: 1.45; }
.demo-fine { margin-top: 18px; font-size: 0.85rem; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.demo-log {
  margin: 18px 0 0; max-height: 240px; overflow: auto; padding: 14px; border-radius: 10px;
  background: var(--muted); border: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.5; white-space: pre-wrap;
}
#boot-step:not(.waiting)::after { content: "…"; }
.dots { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: block; }
@media (prefers-reduced-motion: no-preference) {
  .dots i { animation: bounce 1.1s infinite ease-in-out; }
  .dots i:nth-child(2) { animation-delay: 0.15s; }
  .dots i:nth-child(3) { animation-delay: 0.3s; }
  @keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.55; } 30% { transform: translateY(-6px); opacity: 1; } }
}

[hidden] { display: none !important; }
