/*
 * The one look of every tech-article demo: Pico.css (classless, slate, dark; MIT, vendored beside this file) with a small set of our own tokens and nine components. The page is dark because the
 * author's articles are; the colours are the ones of the author's own article images (slate cards, a teal accent, amber for "decide by", coral for a failure). Nothing here loads anything: no fonts,
 * no images, no requests. A demo never carries CSS of its own (the rules in rules.ts refuse a <style> block, a style attribute and any class not listed here).
 */
:root[data-theme="dark"] {
  --pico-background-color: #1f252d;
  --pico-card-background-color: #272f39;
  --pico-card-sectioning-background-color: #2c3541;
  --pico-card-border-color: #3a4554;
  --pico-muted-border-color: #3a4554;
  --pico-color: #dde3ea;
  --pico-muted-color: #98a3b2;
  --pico-h1-color: #f3f6f9;
  --pico-h2-color: #f3f6f9;
  --pico-h3-color: #e9edf2;
  --pico-primary: #4fbfb3;
  --pico-primary-background: #2f9d92;
  --pico-primary-hover-background: #3bb1a5;
  --pico-primary-underline: rgba(79, 191, 179, 0.5);
  --pico-primary-focus: rgba(79, 191, 179, 0.35);
  --pico-primary-inverse: #0f1418;
  --pico-border-radius: 0.5rem;
  --demo-ok: #4fbfb3;
  --demo-warn: #f2a65a;
  --demo-error: #ef7b70;
  --demo-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

body { background: var(--pico-background-color); }
body > header { padding-block: 2rem 0.5rem; }
body > header hgroup p { color: var(--pico-muted-color); max-width: 60ch; }
body > header .eyebrow { margin: 0 0 0.25rem; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--demo-ok); }
body > main { padding-block: 0.5rem 1.5rem; }
body > footer { padding-block: 0 2rem; color: var(--pico-muted-color); }

/* The try-this line under the intro. */
.try { margin-bottom: 1.25rem; padding: 0.75rem 1rem; border-left: 3px solid var(--demo-ok); background: var(--pico-card-background-color); border-radius: 0 var(--pico-border-radius) var(--pico-border-radius) 0; }

/* Components. */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--pico-card-background-color); border: 1px solid var(--pico-card-border-color); border-radius: var(--pico-border-radius); padding: 1rem 1.1rem; min-width: 0; }
.panel > h2 { margin: 0 0 0.75rem; font-size: 1.05rem; }
.panel h3 { margin: 1.1rem 0 0.5rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--pico-muted-color); }
.panel > :last-child { margin-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1rem; }
.actions button, .actions label { margin: 0; }
.log { font-family: var(--demo-mono); font-size: 0.8rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: #aeb8c5; min-height: 12rem; }
.log .line { display: block; padding: 0 0.25rem; border-radius: 0.25rem; }
.log .line[data-level="WARN"] .lvl { color: var(--demo-warn); }
.muted { color: var(--pico-muted-color); }
.item { padding: 0.55rem 0.7rem; margin-bottom: 0.5rem; border: 1px solid var(--pico-card-border-color); border-radius: var(--pico-border-radius); background: var(--pico-card-sectioning-background-color); }
.item > :last-child { margin-bottom: 0; }
.item strong { display: block; margin-bottom: 0.15rem; font-size: 0.95rem; font-weight: 600; color: var(--pico-h3-color); }
.item small { display: block; margin-top: 0.2rem; color: var(--pico-muted-color); }
.item .badge { margin-top: 0.3rem; }
.badge { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--pico-card-sectioning-background-color); color: var(--pico-color); border: 1px solid var(--pico-card-border-color); vertical-align: middle; }
.badge.ok { color: var(--demo-ok); border-color: rgba(79, 191, 179, 0.5); }
.badge.warn { color: var(--demo-warn); border-color: rgba(242, 166, 90, 0.5); }
.badge.error { color: var(--demo-error); border-color: rgba(239, 123, 112, 0.5); }
.callout { margin: 0.1rem 0 0.4rem 1.2rem; padding: 0.35rem 0.6rem; border-left: 2px solid var(--demo-warn); color: #f0d7bb; font-size: 0.8rem; background: rgba(242, 166, 90, 0.08); border-radius: 0 0.35rem 0.35rem 0; }
.summary { margin: 0 0 0.4rem; font-family: var(--demo-mono); font-size: 0.85rem; color: var(--pico-muted-color); }
progress { margin-bottom: 0; }
details { margin-bottom: 0.5rem; }
