/* Larzscript Cosmos - components layered on the site's /assets/content.css variables. */
.cs-main{max-width:860px}
.cs-badges{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 4px}
.cs-badge{font-size:12px;font-weight:700;color:var(--muted);border:1px solid var(--border);border-radius:999px;padding:5px 11px;background:var(--card)}
.cs-badge b{color:var(--accent);font-weight:800}
.cs-panel{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:18px;margin:18px 0}
.cs-panel h2{font-size:15px;margin:0 0 4px;letter-spacing:.02em}
.cs-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.cs-field label{margin-top:0}
.cs-field .u{color:var(--muted);font-size:12px;margin-top:5px}
.cs-status{font-size:13px;min-height:19px;margin-top:12px;color:var(--muted)}
.cs-status.run{color:var(--accent)}.cs-status.err{color:#f87171}.cs-status.ok{color:var(--muted)}
.cs-res{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin-top:14px}
.cs-res .b{background:var(--bg2);border:1px solid var(--border);border-radius:14px;padding:14px}
.cs-res .b .k{color:var(--muted);font-size:12px;font-weight:600}
.cs-res .b .v{font-size:21px;font-weight:800;margin-top:3px;word-break:break-word}
.cs-res .b.acc{border-color:var(--accent)}.cs-res .b.acc .v{color:var(--accent)}
.cs-res .b .n{color:var(--muted);font-size:12px;margin-top:3px}
.cs-bar{display:grid;grid-template-columns:minmax(64px,auto) 1fr auto;gap:10px;align-items:center;margin:6px 0;font-size:13px}
.cs-bl{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--text)}
.cs-bt{background:var(--bg2);border:1px solid var(--border);border-radius:6px;height:16px;overflow:hidden}
.cs-bt i{display:block;height:100%;background:linear-gradient(90deg,var(--accent),var(--accent2))}
.cs-bv{color:var(--muted);min-width:56px;text-align:right}
.cs-plot{width:100%;height:auto;display:block;margin-top:8px}
.cs-plot .g{stroke:var(--border);stroke-width:1}.cs-plot .frame{fill:none;stroke:var(--border)}
.cs-plot text{fill:var(--muted);font-size:11px}.cs-plot .ax{font-size:12px;fill:var(--text)}
.cs-legend{display:flex;flex-wrap:wrap;gap:14px;font-size:12.5px;color:var(--muted);margin-top:6px}
.cs-legend i{display:inline-block;width:14px;height:4px;border-radius:2px;margin-right:6px;vertical-align:middle}
pre.cs-code{background:var(--bg2);border:1px solid var(--border);border-radius:12px;padding:14px;overflow:auto;font-size:12.5px;line-height:1.55;color:#cfe8f3;margin:10px 0}
pre.cs-diagram{background:var(--bg2);border:1px solid var(--border);border-radius:12px;padding:12px 14px;overflow:auto;font-size:13px;line-height:1.45;color:var(--text);margin:10px 0}
.cs-formula{background:var(--bg2);border-left:3px solid var(--accent);border-radius:0 12px 12px 0;padding:12px 16px;margin:14px 0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:14.5px;overflow:auto}
.cs-note{color:var(--muted);font-size:13.5px}
.cs-swatch{display:inline-block;width:100%;height:46px;border-radius:10px;border:1px solid var(--border);margin-top:6px}
details.cs-more{margin:14px 0}details.cs-more summary{cursor:pointer;font-weight:700;color:var(--accent);font-size:14px}
.cs-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;margin:14px 0}
.cs-cards a{display:block;background:var(--card);border:1px solid var(--border);border-radius:14px;padding:15px 16px;transition:border-color .15s}
.cs-cards a:hover{border-color:var(--accent)}
.cs-cards b{display:block;font-size:15.5px;margin-bottom:4px}.cs-cards span{color:var(--muted);font-size:13.5px;line-height:1.5;display:block}
.cs-tbl{overflow:auto}
@media(max-width:560px){.cs-res .b .v{font-size:18px}}
