/* global React */
/* ============================================================
Arogya — Mini visualizations for every use case
55 distinct cards across Adults / Children / Elders / Pets,
each with a compact graph or visual artifact.
============================================================ */
/* ---------- shared frame ---------- */
function UCFrame({ title, eyebrow, flag, height, children }) {
return (
{eyebrow &&
{eyebrow}
}
{title}
{flag &&
{flag.t} }
{children}
);
}
/* ---------- PRIMITIVES ---------- */
function Spark({ points, color = "var(--c-brand)", height = 42, dots = "last" }) {
const max = Math.max(...points), min = Math.min(...points);
const range = (max - min) || 1;
const w = 200, h = height;
const norm = points.map(p => (p - min) / range);
const path = norm.map((v, i) => `${i === 0 ? "M" : "L"} ${(i / (points.length - 1)) * w} ${h - v * h}`).join(" ");
return (
{norm.map((v, i) => {
const show = dots === "all" || (dots === "last" && i === norm.length - 1);
return show ? : null;
})}
);
}
function MultiSpark({ lines, height = 44 }) {
/* lines = [{label, points, color}] — all share the same x-axis */
const allPts = lines.flatMap(l => l.points);
const max = Math.max(...allPts), min = Math.min(...allPts);
const range = (max - min) || 1;
const w = 200, h = height;
return (
{lines.map((L, idx) => {
const norm = L.points.map(p => (p - min) / range);
const path = norm.map((v, i) => `${i === 0 ? "M" : "L"} ${(i / (L.points.length - 1)) * w} ${h - v * h}`).join(" ");
return ;
})}
{lines.map((L, i) => (
{L.label}
))}
);
}
function RingProgress({ value, total, center, sub, color = "var(--c-brand)" }) {
const r = 24, c = 2 * Math.PI * r;
const pct = total ? value / total : value;
return (
{center && {center} }
{sub &&
{sub}
}
);
}
function DotRow({ items }) {
/* items: [{label, status: 'done'|'due'|'flagged'|'·', value?}] */
return (
{items.map((it, i) => (
{it.status === "done" ? "✓" : it.status === "flagged" ? "!" : it.status === "due" ? "·" : "·"}
{it.label}
{it.value && {it.value} }
))}
);
}
function BarRow({ bars, max, color = "var(--c-brand)" }) {
const peak = max || Math.max(...bars.map(b => b.v));
return (
{bars.map((b, i) => (
))}
);
}
function ChipCloud({ chips, dense }) {
return (
{chips.map((c, i) => {
const obj = typeof c === "string" ? { t: c } : c;
return (
{obj.t}
);
})}
);
}
function Timeline({ steps }) {
/* steps: [{label, done, current}] */
return (
{steps.map((s, i) => (
{s.label}
))}
);
}
function PillGrid({ pills }) {
/* pills: [{n, t, c}] — name, time (AM/PM), color */
return (
{pills.map((p, i) => (
{p.n}
{p.t && {p.t} }
))}
);
}
function BodyMap({ marks, view = "front" }) {
/* marks: [{x, y, kind: 'flag'|'ok'}] — coords in 0..100 box */
return (
{/* head */}
{/* body */}
{marks.map((m, i) => (
))}
);
}
function ToothRow({ flagged = [] }) {
/* flagged is array of {row, col, kind} */
return (
{[0, 1].map(row => (
{Array.from({ length: 16 }).map((_, i) => {
const f = flagged.find(x => x.row === row && x.col === i);
return (
);
})}
))}
);
}
function EyeMeter({ left, right, label }) {
return (
);
}
function HeatCal({ weeks = 6, days = 7, data, max = 4 }) {
/* data: 2D array [week][day] */
return (
{Array.from({ length: weeks }).map((_, w) => (
{Array.from({ length: days }).map((_, d) => {
const v = (data && data[w] && data[w][d]) || 0;
const op = v / max;
return 0 ? "var(--c-brand)" : "var(--c-line)" }} />;
})}
))}
);
}
function DocGlyph({ kind, title, items }) {
/* miniature document with kind eyebrow + a few extracted rows */
return (
{kind}
{title}
{items.map((it, i) => (
{it[0]} {it[1]}
))}
);
}
function IconGlyph({ icon, label, value, color = "var(--c-brand)" }) {
return (
{icon}
{label}
{value &&
{value}
}
);
}
function GrowthCurve({ pts, baseline, label }) {
/* pts: child weights at each month; baseline: WHO 50th %ile */
const w = 200, h = 50;
const all = [...pts, ...baseline];
const max = Math.max(...all), min = Math.min(...all), range = (max - min) || 1;
const norm = pts.map(p => (p - min) / range);
const baseN = baseline.map(p => (p - min) / range);
const path = norm.map((v, i) => `${i === 0 ? "M" : "L"} ${(i / (pts.length - 1)) * w} ${h - v * h}`).join(" ");
const basePath = baseN.map((v, i) => `${i === 0 ? "M" : "L"} ${(i / (baseN.length - 1)) * w} ${h - v * h}`).join(" ");
return (
);
}
function StagePager({ stages, current }) {
return (
{stages.map((s, i) => (
))}
);
}
function CalDots({ rows }) {
/* rows: [{l: label, d: dots: '✓✓✓·'}] */
return (
{rows.map((r, i) => (
{r.l}
{r.d.split("").map((c, j) => (
))}
))}
);
}
/* ===============================================================
USE CASES — Adults (25–50)
=============================================================== */
const ADULTS = [
{ id: "cycle", title: "Cycle tracking", eyebrow: "PRIVATE",
Viz: () => (
),
},
{ id: "hb", title: "Hemoglobin", flag: { t: "↓ 11.4", k: "warn" }, eyebrow: "5 YR · CBC",
Viz: () => <>
2021 g/dL 2026
>,
},
{ id: "b12d3", title: "B12 & D3", eyebrow: "DEFICIENCY",
Viz: () => ,
},
{ id: "thyroid", title: "Thyroid panel", eyebrow: "TSH · T3 · T4",
Viz: () => ,
},
{ id: "pcod", title: "PCOD / PCOS", eyebrow: "HORMONES",
Viz: () => ,
},
{ id: "oncology", title: "Oncology", eyebrow: "CHEMO + CA-125",
Viz: () => (
{Array.from({ length: 6 }).map((_, i) => )}
cycle 4/6
),
},
{ id: "lipid", title: "Cholesterol", flag: { t: "↑ +30%", k: "warn" }, eyebrow: "5 YR · LDL",
Viz: () => <>
2021 mg/dL 2026
>,
},
{ id: "diabetes", title: "Diabetes risk", eyebrow: "HBA1C",
Viz: () => (
),
},
{ id: "ivf", title: "IVF protocol", eyebrow: "CYCLE 2",
Viz: () => ,
},
{ id: "prenatal", title: "Prenatal", eyebrow: "WEEK 24",
Viz: () => (
),
},
{ id: "mental", title: "Mental-health meds", eyebrow: "CONTINUITY",
Viz: () => ,
},
{ id: "eye", title: "Eye prescription", eyebrow: "YEAR ON YEAR",
Viz: () => (
),
},
{ id: "bone", title: "Bone health", eyebrow: "DEXA · T-SCORE",
Viz: () => (
),
},
{ id: "allergy", title: "Allergies", eyebrow: "CONFIRMED",
Viz: () => ,
},
{ id: "sports", title: "Sports injury", eyebrow: "MRI · PHYSIO",
Viz: () => (
),
},
{ id: "ayurveda", title: "Ayurveda + GP", eyebrow: "INTEGRATIVE",
Viz: () => (
),
},
];
/* ===============================================================
USE CASES — Children (0–18)
=============================================================== */
const CHILDREN = [
{ id: "vaccines", title: "Vaccine schedule", flag: { t: "1 due", k: "warn" }, eyebrow: "BIRTH → 18",
Viz: () => ,
},
{ id: "growth", title: "Growth chart", eyebrow: "WHO 50TH %ILE",
Viz: () => (
),
},
{ id: "antibiotics", title: "Antibiotic history", eyebrow: "WHAT WORKED",
Viz: () => ,
},
{ id: "school", title: "School certificate", eyebrow: "READY · PDF",
Viz: () => ,
},
{ id: "visit", title: "Pediatric visits", eyebrow: "VERBATIM",
Viz: () => (
12 AUG · DR. SHAH
“Viral. Stay home 48h. Recheck if fever after Wed.”
),
},
{ id: "kid-allergy", title: "Child allergies", eyebrow: "SCHOOL/CAMP",
Viz: () => ,
},
{ id: "myopia", title: "Myopia progression", eyebrow: "YEAR ON YEAR",
Viz: () => (
),
},
{ id: "dental", title: "Dental development", eyebrow: "MILK → PERMANENT",
Viz: () => ,
},
{ id: "milestones", title: "Milestones", eyebrow: "SPEECH · MOTOR",
Viz: () => ,
},
{ id: "recurring", title: "Recurring illness", flag: { t: "winter", k: "brand" }, eyebrow: "PATTERN",
Viz: () => ,
},
{ id: "ent", title: "ENT history", eyebrow: "EARS · TONSILS",
Viz: () => ,
},
{ id: "nutrition", title: "Nutrition", eyebrow: "IRON · PROTEIN",
Viz: () => (
),
},
];
/* ===============================================================
USE CASES — Elder care (60+)
=============================================================== */
const ELDERS = [
{ id: "meds", title: "Multi-medication", flag: { t: "9 daily", k: "brand" }, eyebrow: "3 SPECIALISTS",
Viz: () => ,
},
{ id: "cardiac", title: "Cardiac", flag: { t: "BP 142/88", k: "warn" }, eyebrow: "ECG · ECHO · BP",
Viz: () => (
),
},
{ id: "elder-diabetes", title: "Diabetes (HbA1c)", eyebrow: "DECADE TREND",
Viz: () => <>
2018 % 2026
>,
},
{ id: "kidney", title: "Kidney function", flag: { t: "eGFR ↓", k: "warn" }, eyebrow: "CREATININE",
Viz: () => ,
},
{ id: "specialists", title: "4 specialists", eyebrow: "ONE TIMELINE",
Viz: () => (
{[
{ l: "GP", c: "#2563eb" },
{ l: "Cardio", c: "#dc2626" },
{ l: "Nephro", c: "#7c3aed" },
{ l: "Endo", c: "#0891b2" },
].map((d, i) => (
{d.l}
))}
),
},
{ id: "discharge", title: "Discharge summary", eyebrow: "INDEXED",
Viz: () => ,
},
{ id: "screening", title: "Cancer screening", eyebrow: "SCHEDULE",
Viz: () => ,
},
{ id: "cataract", title: "Cataract surgery", eyebrow: "IOL POWER",
Viz: () => (
),
},
{ id: "ortho", title: "Orthopedic", eyebrow: "DEXA · X-RAY",
Viz: () => (
),
},
{ id: "neuro", title: "Neurology", eyebrow: "MRI · MMSE",
Viz: () => (
}
label="MMSE 26 / 30"
value="mild decline"
/>
),
},
{ id: "caregiver", title: "Caregiver access", eyebrow: "CONTROLLED",
Viz: () => ,
},
{ id: "emergency", title: "Emergency · 1 tap", eyebrow: "ER-READY",
Viz: () => (
AMMA · 62 B+
Allergies Penicillin, Sulfa
Conditions HTN, T2 DM
),
},
{ id: "ayur-allo", title: "Ayurveda + allopathy", eyebrow: "SIDE BY SIDE",
Viz: () => ,
},
{ id: "elder-nutrition", title: "Nutrition", eyebrow: "B12 · CA · D3",
Viz: () => ,
},
{ id: "sleep", title: "Sleep apnea", eyebrow: "CPAP",
Viz: () => ,
},
];
/* ===============================================================
USE CASES — Pets
=============================================================== */
const PETS = [
{ id: "pet-vaccines", title: "Vaccines", flag: { t: "on time", k: "ok" }, eyebrow: "DHPP · RABIES",
Viz: () => ,
},
{ id: "deworm", title: "Deworming", eyebrow: "QUARTERLY",
Viz: () => (
{["Q1", "Q2", "Q3", "Q4"].map((q, i) => {
const done = i < 3;
return (
);
})}
),
},
{ id: "wellness", title: "Annual wellness", eyebrow: "BLOODWORK · DENTAL",
Viz: () => ,
},
{ id: "pet-weight", title: "Weight tracking", flag: { t: "12.4 kg", k: "brand" }, eyebrow: "18 MO",
Viz: () => ,
},
{ id: "chronic", title: "Chronic conditions", eyebrow: "DAILY MEDS",
Viz: () => ,
},
{ id: "pet-dental", title: "Dental cleaning", eyebrow: "EXTRACTIONS",
Viz: () => ,
},
{ id: "pet-allergy", title: "Allergies", eyebrow: "ELIMINATION",
Viz: () => ,
},
{ id: "surgery", title: "Surgery records", eyebrow: "NEUTER · ORTHO",
Viz: () => ,
},
{ id: "pet-oncology", title: "Oncology", eyebrow: "TUMOUR SIZE",
Viz: () => (
{Array.from({ length: 6 }).map((_, i) => )}
5 / 6 sessions
),
},
{ id: "breed", title: "Breed screening", eyebrow: "HIP · ELBOW",
Viz: () => ,
},
{ id: "senior-blood", title: "Senior bloodwork", eyebrow: "BI-ANNUAL",
Viz: () => ,
},
{ id: "pet-emergency", title: "Emergency / boarding", eyebrow: "ONE LINK",
Viz: () => (
BRUNO · 4y DEA 1+
Microchip 9001 2245 11
Vet Dr. Iyer · CR Park
),
},
];
window.UCV = { UCFrame, ADULTS, CHILDREN, ELDERS, PETS };
/* ---------- CSS for all .ucv-* primitives (injected once) ---------- */
(function injectUCVStyles() {
if (typeof document === "undefined" || document.getElementById("__ucv_styles")) return;
const s = document.createElement("style");
s.id = "__ucv_styles";
s.textContent = `
.ucv-card {
background: var(--c-card);
border: 1px solid var(--c-line);
border-radius: 14px;
padding: 12px 12px 12px;
display: flex; flex-direction: column; gap: 10px;
transition: transform .25s, box-shadow .25s, border-color .25s;
min-height: 178px;
}
.ucv-card:hover {
transform: translateY(-2px);
border-color: color-mix(in oklab, var(--c-brand) 24%, var(--c-line));
box-shadow: 0 1px 2px rgba(11,21,48,.04), 0 14px 28px rgba(11,21,48,.06);
}
.ucv-card-head { display: flex; flex-direction: column; gap: 4px; }
.ucv-eyebrow {
font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
color: var(--c-mute); text-transform: uppercase;
}
.ucv-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ucv-title {
font-family: var(--serif); font-weight: 600;
font-size: 14px; color: var(--c-ink); letter-spacing: -0.01em;
line-height: 1.15;
}
.ucv-flag {
font-family: var(--mono); font-size: 9.5px;
padding: 2px 6px; border-radius: 99px; flex-shrink: 0; letter-spacing: .02em;
}
.ucv-flag--ok { background: color-mix(in oklab, var(--c-brand) 14%, transparent); color: var(--c-brand-deep); }
.ucv-flag--warn { background: color-mix(in oklab, var(--c-accent) 14%, transparent); color: var(--c-accent); }
.ucv-flag--brand { background: color-mix(in oklab, var(--c-brand-deep) 14%, transparent); color: var(--c-brand-deep); }
.ucv-card-body { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.ucv-flex-col { display: flex; flex-direction: column; gap: 6px; }
.ucv-flex-mid { display: flex; align-items: center; gap: 10px; }
.ucv-axis {
display: flex; justify-content: space-between;
font-family: var(--mono); font-size: 9.5px; color: var(--c-mute);
}
/* legend */
.ucv-legend {
display: flex; flex-wrap: wrap; gap: 8px;
font-family: var(--mono); font-size: 9.5px; color: var(--c-ink-2);
margin-top: 4px;
}
.ucv-legend-item { display: inline-flex; align-items: center; gap: 4px; }
.ucv-legend-dot { width: 7px; height: 7px; border-radius: 99px; display: inline-block; }
/* ring */
.ucv-ring-row { display: flex; align-items: center; gap: 10px; }
.ucv-ring-sub { font-size: 11.5px; color: var(--c-ink-2); }
/* list rows */
.ucv-list { display: flex; flex-direction: column; gap: 5px; }
.ucv-list-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ucv-status {
width: 16px; height: 16px; border-radius: 99px; display: grid; place-items: center;
font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.ucv-status--done { background: color-mix(in oklab, var(--c-brand) 18%, transparent); color: var(--c-brand-deep); }
.ucv-status--due { background: color-mix(in oklab, var(--c-accent) 18%, transparent); color: var(--c-accent); }
.ucv-status--flagged { background: color-mix(in oklab, #dc2626 18%, transparent); color: #dc2626; }
.ucv-list-label { flex: 1; color: var(--c-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucv-list-val { font-family: var(--mono); font-size: 10.5px; color: var(--c-mute); flex-shrink: 0; }
/* bars */
.ucv-bars { display: flex; flex-direction: column; gap: 4px; }
.ucv-bar-row { display: grid; grid-template-columns: 52px 1fr 30px; gap: 6px; align-items: center; font-size: 11px; }
.ucv-bar-label { color: var(--c-ink-2); font-family: var(--mono); font-size: 10px; }
.ucv-bar-track { height: 6px; background: color-mix(in oklab, var(--c-brand) 8%, var(--c-bg-2)); border-radius: 99px; overflow: hidden; }
.ucv-bar-fill { height: 100%; border-radius: 99px; transition: width .4s; }
.ucv-bar-val { font-family: var(--mono); font-size: 10px; color: var(--c-ink-2); text-align: right; }
/* chips */
.ucv-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ucv-chips.is-dense .ucv-chip { padding: 2px 7px; font-size: 10px; }
.ucv-chip {
font-family: var(--mono); font-size: 11px;
padding: 3px 8px; border-radius: 99px;
background: color-mix(in oklab, var(--c-brand) 10%, transparent);
color: var(--c-brand-deep);
letter-spacing: .01em;
}
.ucv-chip--warn { background: color-mix(in oklab, #dc2626 12%, transparent); color: #b1281e; }
.ucv-chip--brand { background: color-mix(in oklab, var(--c-brand-deep) 14%, transparent); color: var(--c-brand-deep); }
.ucv-chip--ok { background: color-mix(in oklab, var(--c-brand) 16%, transparent); color: var(--c-brand-deep); }
/* timeline */
.ucv-tl { position: relative; padding-left: 12px; display: flex; flex-direction: column; gap: 6px; }
.ucv-tl-line { position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1.5px; background: var(--c-line); }
.ucv-tl-step { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--c-ink); }
.ucv-tl-dot {
width: 9px; height: 9px; border-radius: 99px;
background: var(--c-bg-2); border: 1.5px solid var(--c-line);
position: relative; left: -8px; flex-shrink: 0;
}
.ucv-tl-dot.is-done { background: var(--c-brand-deep); border-color: var(--c-brand-deep); }
.ucv-tl-dot.is-current { background: var(--c-brand); border-color: var(--c-brand); box-shadow: 0 0 0 3px color-mix(in oklab, var(--c-brand) 30%, transparent); }
.ucv-tl-label { color: var(--c-ink); font-size: 12px; }
/* pills */
.ucv-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ucv-pill {
display: flex; align-items: center; gap: 6px;
padding: 4px 6px; border-radius: 6px;
background: color-mix(in oklab, var(--c-brand) 6%, var(--c-bg-2));
font-size: 10.5px;
}
.ucv-pill-glyph {
width: 14px; height: 7px; border-radius: 99px;
flex-shrink: 0;
}
.ucv-pill-name { color: var(--c-ink); font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucv-pill-time { font-family: var(--mono); font-size: 9.5px; color: var(--c-mute); }
/* body map */
.ucv-body { display: grid; place-items: center; }
.ucv-body-row { display: flex; align-items: center; gap: 10px; }
/* teeth */
.ucv-teeth { display: flex; flex-direction: column; gap: 3px; }
.ucv-teeth-row {
display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px;
}
.ucv-tooth {
height: 10px; border-radius: 40% 40% 30% 30% / 60% 60% 40% 40%;
background: var(--c-bg-2);
border: 1px solid var(--c-line);
}
.ucv-tooth--flag { background: #dc2626; border-color: #b1281e; }
.ucv-tooth--lost { background: var(--c-card); border: 1px dashed var(--c-mute); }
/* eye */
.ucv-eye { display: flex; align-items: center; gap: 10px; justify-content: center; }
.ucv-eye-val { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--c-ink); text-align: center; }
.ucv-eye-side { font-family: var(--mono); font-size: 9.5px; color: var(--c-mute); text-align: center; letter-spacing: .14em; }
/* heat grid */
.ucv-heat { display: grid; gap: 2px; }
.ucv-heat-col { display: flex; flex-direction: column; gap: 2px; }
.ucv-heat-cell { display: block; height: 7px; border-radius: 1.5px; }
/* doc glyph */
.ucv-doc {
background: color-mix(in oklab, var(--c-bg-2) 60%, transparent);
border: 1px solid var(--c-line); border-radius: 8px;
padding: 8px 10px;
display: flex; flex-direction: column; gap: 4px;
}
.ucv-doc-eyebrow { font-family: var(--mono); font-size: 9.5px; color: var(--c-brand-deep); letter-spacing: .12em; text-transform: uppercase; }
.ucv-doc-title { font-family: var(--serif); font-weight: 600; font-size: 12.5px; color: var(--c-ink); }
.ucv-doc-rows { display: flex; flex-direction: column; gap: 2px; }
.ucv-doc-row {
display: flex; justify-content: space-between; font-family: var(--mono);
font-size: 10.5px; color: var(--c-ink-2);
}
.ucv-doc-row b { color: var(--c-ink); }
/* icon glyph */
.ucv-icon-row { display: flex; align-items: center; gap: 10px; }
.ucv-icon-mark {
width: 36px; height: 36px; border-radius: 8px;
display: grid; place-items: center; flex-shrink: 0;
}
.ucv-icon-label { font-size: 12px; color: var(--c-ink); font-weight: 500; }
.ucv-icon-val { font-family: var(--mono); font-size: 10px; color: var(--c-mute); }
/* cycle dots */
.ucv-cyc { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ucv-cyc-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--c-bg-2); border: 1px solid var(--c-line); }
.ucv-cyc-dot.is-done { background: var(--c-brand-deep); border-color: var(--c-brand-deep); }
.ucv-cyc-label { font-family: var(--mono); font-size: 9.5px; color: var(--c-mute); margin-left: 4px; }
/* stages pager */
.ucv-stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.ucv-stage {
padding: 6px 2px; text-align: center;
background: var(--c-bg-2); border-radius: 5px;
font-family: var(--mono); font-size: 9.5px; color: var(--c-mute);
}
.ucv-stage.is-done { background: color-mix(in oklab, var(--c-brand) 14%, transparent); color: var(--c-brand-deep); }
.ucv-stage.is-current { background: var(--c-brand); color: white; box-shadow: 0 2px 6px color-mix(in oklab, var(--c-brand) 30%, transparent); }
.ucv-stage-num { font-weight: 700; font-size: 11px; }
.ucv-stage-label { font-size: 8.5px; margin-top: 2px; }
/* cal dots rows */
.ucv-caldots { display: flex; flex-direction: column; gap: 4px; }
.ucv-caldots-row { display: flex; align-items: center; gap: 8px; }
.ucv-caldots-label { font-family: var(--mono); font-size: 10px; color: var(--c-mute); width: 50px; letter-spacing: .04em; text-transform: uppercase; }
.ucv-caldots-dots { display: flex; gap: 3px; }
.ucv-caldot { width: 9px; height: 9px; border-radius: 2px; background: var(--c-bg-2); border: 1px solid var(--c-line); }
.ucv-caldot.is-done { background: var(--c-brand); border-color: var(--c-brand); }
.ucv-caldot.is-flag { background: var(--c-accent); border-color: var(--c-accent); }
/* doctor mosaic */
.ucv-doc-mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ucv-doc-tile {
display: flex; align-items: center; gap: 5px;
padding: 5px 7px; background: var(--c-bg-2); border-radius: 5px;
font-family: var(--mono); font-size: 10.5px; color: var(--c-ink);
}
.ucv-doc-tile > span:first-child { width: 6px; height: 6px; border-radius: 99px; flex-shrink: 0; }
/* visit quote */
.ucv-visit { border-left: 3px solid var(--c-brand); padding-left: 10px; }
.ucv-visit-eyebrow { font-family: var(--mono); font-size: 9.5px; color: var(--c-brand-deep); letter-spacing: .12em; }
.ucv-visit-q { font-family: var(--serif); font-size: 12.5px; line-height: 1.35; color: var(--c-ink); margin-top: 4px; }
/* ER card */
.ucv-er {
background: linear-gradient(135deg, var(--c-ink), var(--c-slate));
color: var(--c-bg); border-radius: 8px; padding: 10px;
display: flex; flex-direction: column; gap: 8px;
}
.ucv-er-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; opacity: 0.85; }
.ucv-er-bg { background: #dc2626; color: white; padding: 1px 7px; border-radius: 99px; font-weight: 700; }
.ucv-er-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 10.5px; }
.ucv-er-rows b { font-family: var(--mono); font-size: 9.5px; opacity: 0.6; letter-spacing: .1em; display: block; }
/* quarters (deworm) */
.ucv-quarters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ucv-quarter {
padding: 8px 4px; text-align: center;
background: var(--c-bg-2); border-radius: 6px;
font-family: var(--mono); font-size: 10px; color: var(--c-mute);
border: 1px dashed var(--c-line);
}
.ucv-quarter.is-done {
background: color-mix(in oklab, var(--c-brand) 14%, transparent);
border-color: color-mix(in oklab, var(--c-brand) 40%, var(--c-line));
color: var(--c-brand-deep);
}
.ucv-quarter > div:first-child { font-weight: 700; font-size: 11px; }
`;
document.head.appendChild(s);
})();