/* Cedwyn dashboard kit v1.0.0 (11 Nov 2026) - one-glance tiles, gauges, charts and (i) detail modals.
   Copy this file and dashboard.js into a webapp; see STANDARD.md. Colours follow the house palette (day + night). - Cedwyn editors */
:root{--cwd-bg:#fbfaf7;--cwd-card:#ffffff;--cwd-ink:#1d1d1f;--cwd-mut:#5d6168;--cwd-line:#d9d6cf;--cwd-acc:#7a2fd0;--cwd-soft:#f3eff8;
--cwd-s1:#7a2fd0;--cwd-s2:#2f6fbf;--cwd-s3:#b5651d;--cwd-s4:#1f8a4c;--cwd-s5:#c0392b;--cwd-s6:#8a8f98}
html[data-ghf-mode="night"]{--cwd-bg:#0d0d10;--cwd-card:#16161b;--cwd-ink:#ecebef;--cwd-mut:#a4a7ae;--cwd-line:#2c2c33;--cwd-acc:#c08bff;--cwd-soft:#1f1a28;
--cwd-s1:#c08bff;--cwd-s2:#7fb2ff;--cwd-s3:#f0a868;--cwd-s4:#6fd69a;--cwd-s5:#ff8a80;--cwd-s6:#8d929b}
.cwd{margin:.6rem 0 1.2rem;color:var(--cwd-ink)}
.cwd *{box-sizing:border-box}
.cwd-bar{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin:0 0 .6rem;font-size:.78rem;color:var(--cwd-mut)}
.cwd-chip{display:inline-flex;align-items:center;gap:.3rem;padding:.12rem .55rem;border:1px solid var(--cwd-line);border-radius:999px;background:var(--cwd-card);white-space:nowrap}
.cwd-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.6rem;margin:0 0 .6rem}
@media(max-width:640px){.cwd-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
.cwd-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
@media(max-width:640px){.cwd-grid{grid-template-columns:1fr}}
.cwd-wide{grid-column:1/-1}
.cwd-tile,.cwd-card{position:relative;background:var(--cwd-card);border:1px solid var(--cwd-line);border-radius:12px;padding:.7rem .8rem;min-width:0}
.cwd-tile{padding:.65rem .75rem .6rem;border-top:3px solid var(--cwd-tone,var(--cwd-acc))}
.cwd-val{font-size:1.9rem;font-weight:700;line-height:1.05;font-variant-numeric:tabular-nums;color:var(--cwd-ink)}
.cwd-lab{margin-top:.2rem;font-size:.78rem;font-weight:600;color:var(--cwd-mut);line-height:1.25;padding-right:1.6rem}
.cwd-sub{font-size:.72rem;color:var(--cwd-mut);margin-top:.1rem}
.cwd-h{display:flex;align-items:center;justify-content:space-between;gap:.4rem;margin:0 0 .5rem}
.cwd-h b{font-size:.86rem;line-height:1.25}
.cwd-i{flex:none;display:inline-flex!important;align-items:center;justify-content:center;width:1.55rem!important;height:1.55rem!important;min-width:0!important;border-radius:999px!important;border:1px solid var(--cwd-line);background:var(--cwd-card);color:var(--cwd-acc);font:600 .8rem/1 Georgia,"Times New Roman",serif;font-style:italic;cursor:pointer;padding:0}
.cwd-i:hover,.cwd-i:focus-visible{border-color:var(--cwd-acc);outline:none;box-shadow:0 0 0 2px var(--cwd-soft)}
.cwd-tile>.cwd-i{position:absolute;top:.5rem;right:.5rem}
.cwd-svg{display:block;width:100%;height:auto;overflow:visible}
.cwd-svg text{fill:var(--cwd-ink);font:600 12px system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.cwd-svg .cwd-t-mut{fill:var(--cwd-mut);font-weight:500;font-size:10.5px}
.cwd-svg .cwd-t-big{font-size:26px;font-weight:700}
.cwd-g{max-width:15rem;margin:0 auto}
.cwd-track{stroke:var(--cwd-line);fill:none}
.cwd-donut{display:grid;grid-template-columns:7.5rem 1fr;gap:.7rem;align-items:center}
.cwd-leg{list-style:none;margin:0;padding:0;font-size:.78rem;line-height:1.35}
.cwd-leg li{display:flex;gap:.4rem;align-items:flex-start;margin:0 0 .3rem}
.cwd-leg i{flex:none;width:.7rem;height:.7rem;border-radius:3px;margin-top:.18rem}
.cwd-leg b{font-variant-numeric:tabular-nums;margin-left:auto;padding-left:.4rem}
.cwd-bars{list-style:none;margin:0;padding:0}
.cwd-bars li{margin:0 0 .45rem;font-size:.76rem}
.cwd-bl{display:flex;justify-content:space-between;gap:.4rem;color:var(--cwd-mut)}
.cwd-bl b{color:var(--cwd-ink);font-variant-numeric:tabular-nums;white-space:nowrap}
.cwd-bt{height:.55rem;border-radius:999px;background:var(--cwd-soft);overflow:hidden;margin-top:.15rem}
.cwd-bt span{display:block;height:100%;border-radius:999px;background:var(--cwd-tone,var(--cwd-acc))}
.cwd-rows{list-style:none;margin:0;padding:0}
.cwd-rows li{display:flex;align-items:center;gap:.5rem;padding:.42rem 0;border-top:1px solid var(--cwd-line);font-size:.8rem;min-width:0}
.cwd-rows li:first-child{border-top:0}
.cwd-dot{flex:none;width:.6rem;height:.6rem;border-radius:999px;background:var(--cwd-tone,var(--cwd-acc))}
.cwd-rt{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cwd-rt small{color:var(--cwd-mut)}
.cwd-tag{flex:none;font-size:.68rem;padding:.05rem .45rem;border-radius:999px;border:1px solid var(--cwd-tone,var(--cwd-line));color:var(--cwd-tone,var(--cwd-mut));white-space:nowrap}
.cwd-modal{border:1px solid var(--cwd-line);border-radius:14px;padding:0;width:min(40rem,94vw);max-height:86vh;background:var(--cwd-card);color:var(--cwd-ink)}
.cwd-modal::backdrop{background:rgba(0,0,0,.55)}
.cwd-mh{position:sticky;top:0;display:flex;justify-content:space-between;align-items:center;gap:.5rem;padding:.6rem .9rem;border-bottom:1px solid var(--cwd-line);background:var(--cwd-card);z-index:1}
.cwd-mh b{font-size:.95rem}
.cwd-x{font-size:1.4rem;line-height:1;background:none;border:0;color:inherit;cursor:pointer;padding:.1rem .3rem}
.cwd-mb{padding:.7rem .9rem 1rem;font-size:.9rem;line-height:1.5;overflow-wrap:anywhere}
.cwd-mb dl{display:grid;grid-template-columns:7.5rem 1fr;gap:.25rem .7rem;margin:.2rem 0 .7rem}
.cwd-mb dt{font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:var(--cwd-mut)}
.cwd-mb dd{margin:0}
@media(max-width:520px){.cwd-mb dl{grid-template-columns:1fr}.cwd-mb dt{margin-top:.3rem}}
.cwd-modal a{color:var(--cwd-acc)}
.cwd-mb ul{margin:.3rem 0 .7rem;padding-left:1.1rem}.cwd-mb li{margin:0 0 .25rem}
.cwd-ids{font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--cwd-mut)}
html.cwd-lock{overflow:hidden}
@media(prefers-reduced-motion:no-preference){.cwd-arc{transition:stroke-dashoffset .8s ease}.cwd-bt span{transition:width .8s ease}}
