/* --- Demo template — base styles ----------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
  color: #111827;
  line-height: 1.5;
  background: #ffffff;
}

a { color: #0b5fff; }

.demo-main { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.demo-main--bare { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

.demo-section { padding: 40px 0; }
.demo-section--center { text-align: center; }
.demo-section h1 { margin-top: 0; }

.demo-lede { font-size: 1.05rem; color: #4b5563; }

.demo-banner {
  background: #e0f2fe; color: #075985; padding: 16px 20px; border-radius: 10px;
  margin: 16px 0; font-weight: 500;
}
.demo-banner--muted { background: #f3f4f6; color: #6b7280; }

.demo-grid { display: grid; gap: 24px; }
.demo-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .demo-grid--2 { grid-template-columns: 1fr; } }

.demo-btn {
  display: inline-block; background: #0b5fff; color: #fff;
  padding: 12px 24px; border: 0; border-radius: 8px; cursor: pointer;
  font-size: 1rem; font-weight: 600; text-decoration: none; margin-right: 8px;
}
.demo-btn:hover { background: #0847c4; }
.demo-btn--ghost { background: transparent; color: #0b5fff; border: 1px solid #0b5fff; }
.demo-btn--ghost:hover { background: #eff6ff; }

.demo-note { background: #ecfdf5; color: #065f46; padding: 12px 16px; border-radius: 10px; }

/* Device-class hooks for layout <body class="device-{{ua.device}}"> */
body.device-mobile .demo-main { padding: 0 12px; }

/* --- Showcase: source-next-to-render example blocks ------------------ */

.demo-ex { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 8px; align-items: start; }
@media (max-width: 860px) { .demo-ex { grid-template-columns: 1fr; } }
.demo-ex__pane { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; background: #fff; }
.demo-ex__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 12px; background: #f3f4f6; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; }
.demo-ex__src { margin: 0; padding: 12px; background: #0b1020; color: #c9d4f5; font-size: .8rem; line-height: 1.55; overflow-x: auto; white-space: pre; }
.demo-ex__src--standalone { border-radius: 10px; margin: 12px 0; }
.demo-ex__render { padding: 16px; }
.demo-ex__render img { max-width: 220px; height: auto; border-radius: 8px; }
.demo-ex__note { color: #6b7280; font-size: .9rem; margin: 4px 0 24px; }
.demo-ex__note code, .demo-table code, .demo-lede code, .demo-card code { background: #f3f4f6; padding: 1px 6px; border-radius: 6px; font-size: .85em; }

.demo-tier { font-size: .68rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.demo-tier--1 { background: #dbeafe; color: #1e40af; }
.demo-tier--2 { background: #dcfce7; color: #166534; }
.demo-tier--soon { background: #fef3c7; color: #92400e; }

.demo-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .95rem; }
.demo-table th, .demo-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }

.demo-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 24px 0; }
.demo-card { display: block; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; text-decoration: none; color: inherit; background: #fff; }
.demo-card:hover { border-color: #0b5fff; box-shadow: 0 2px 10px rgba(11, 95, 255, .08); }
.demo-card h3 { margin: 0 0 6px; color: #0b5fff; }
.demo-card p { margin: 0; color: #4b5563; font-size: .9rem; }

.demo-chip { display: inline-block; background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 4px 12px; margin: 0 6px 6px 0; font-size: .85rem; }

.demo-plan { border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 16px; margin: 8px 0; }
.demo-plan h4 { margin: 0 0 6px; }
.demo-plan ul { margin: 0; padding-left: 20px; }