/* page-base.css — shared non-variable page chrome for interactive demos.
   Loaded first; inline <style> blocks override with theme-specific var(--) rules. */

/* Reset */
* { box-sizing: border-box; margin: 0; }

/* Page container */
.page { padding: 80px 1.5rem 4rem; max-width: 1100px; margin: 0 auto; }

/* Headings — sizing only (color set per-page via vars) */
h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
h2 { font-size: 1.1rem; margin: 2.5rem 0 0.75rem; padding-bottom: 0.4rem; }
h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 1.5rem 0 0.6rem; }

/* Inline code — font + sizing only (bg set per-page via vars) */
code { font-family: ui-monospace, Menlo, monospace; font-size: 0.82em; padding: 1px 4px; border-radius: 3px; }

/* Pre blocks — layout only (bg/border/color set per-page via vars) */
pre { border-radius: 6px; padding: 0.75rem; overflow: auto; font-size: 0.78rem; line-height: 1.45; margin: 0.75rem 0; }

/* Tables — structure only (border color set per-page via vars) */
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin: 0.75rem 0; }
th, td { padding: 0.5rem 0.75rem; text-align: left; }

/* Stats bar — layout only (bg/border/color set per-page via vars) */
.stats-bar { display: flex; flex-wrap: wrap; gap: 0; border-radius: 8px; overflow: hidden; margin: 1rem 0 2rem; }
.stat { flex: 1 1 auto; min-width: 80px; text-align: center; padding: 0.75rem 0.5rem; }
.stat-val { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.stat-lbl { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.15rem; }

/* Demo sections — layout only (border/bg set per-page via vars) */
.demo-section { border-radius: 8px; padding: 1.25rem; margin: 0.75rem 0; }
.demo-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.demo-row + .demo-row { margin-top: 0.75rem; }

/* Comparison grid */
.comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1rem 0; }
@media (max-width: 768px) { .comparison { grid-template-columns: 1fr; } }
.comparison > div { border-radius: 8px; padding: 1rem; }
.comparison h4 { margin: 0 0 0.6rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* Graph layout */
.graph-section { margin: 1rem 0 2rem; }
.graph-layout { display: grid; grid-template-columns: 1fr 260px; gap: 1rem; }
@media (max-width: 800px) { .graph-layout { grid-template-columns: 1fr; } }
.graph-aside { border-radius: 8px; padding: 0.75rem; font-size: 0.8rem; }
.graph-aside h4 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 0.4rem; }
.graph-controls { display: flex; gap: 0.4rem; margin-bottom: 0.5rem; }
.graph-controls button { border-radius: 5px; padding: 0.3rem 0.6rem; cursor: pointer; font-size: 0.75rem; }
#detail { margin-top: 0.75rem; padding-top: 0.6rem; min-height: 3rem; font-size: 0.8rem; }
#detail .name { font-weight: 600; }
.legend div { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.3rem; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* Swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }
.swatch { width: 60px; text-align: center; }
.swatch-color { height: 36px; border-radius: 6px; }
.swatch-label { font-size: 0.6rem; margin-top: 0.2rem; word-break: break-all; }

/* Notes */
.note { font-size: 0.78rem; margin-top: 0.6rem; font-style: italic; }

/* Section spacing */
section { margin-bottom: 2.5rem; }
