/* PhyloMosaic stylesheet. Brand: STEMsaic Research Impacts (mosaic-brand-studio tokens, Appendix A and B).
   Page CSS reads only from --m-* and the app aliases below, so a brand swap is one attribute on <html>. */

/* ---------- Appendix A: STEMsaic tokens ---------- */
:root[data-brand="stemsaic"], .brand-stemsaic {
--m-font-display: "Montserrat", system-ui, sans-serif;
--m-font-body: "Inter", system-ui, sans-serif;
--m-font-data: "Inter", system-ui, sans-serif;
--m-display-weight: 700;
--m-display-weight-strong: 800;
--m-display-tracking: -0.015em;
--m-ground: #FFFFFF;
--m-ground-2: #f4f8fd;
--m-ground-3: #e2edf8;
--m-ink: #1a2744;
--m-ink-2: #233763;
--m-line: rgba(26, 39, 68, 0.14);
--m-link: #2d5a9e;
--m-kicker: #2d5a9e;
--m-dark: #1a2744;
--m-dark-2: #14203a;
--m-on-dark: #FFFFFF;
--m-on-dark-2: #c9ddf1;
--m-kicker-on-dark: #a9c8e8;
--m-accent: #4a90d9;
--m-accent-bright: #4a90d9;
--m-accent-light: #a9c8e8;
--m-support: #2f8f9d;
--m-support-light: #67c2cc;
--m-support-pale: #e2edf8;
--m-dot: #d4a843;
--m-grout: #FFFFFF;
--m-grout-w: 2.25px;
--m-notch: 28px;
--m-notch-sm: 12px;
--m-scrim-rgb: 20, 32, 58;
--m-hairline-dark: rgba(130, 174, 221, 0.5);
--m-card-dark: rgba(26, 39, 68, 0.92);
--m-card-shard: #d4a843;
--m-pill-fill: #14203a;
--m-ring: #d4a843;
--m-chip-radius: 9px;
--m-tile-fill: #e2edf8;
--m-tile-line: #2d5a9e;
--m-cat-1: #2d5a9e;
--m-cat-2: #2f8f9d;
--m-cat-3: #82aedd;
--m-cat-4: #1a2744;
}

/* ---------- App aliases (read from the brand tokens) ---------- */
:root {
  --bg: var(--m-ground); --bg-2: var(--m-ground-2); --bg-3: var(--m-ground-3); --surface: var(--m-ground); --surface-2: var(--m-ground-2);
  --ink: var(--m-ink); --ink-2: #4a5a7a; --line: var(--m-line); --line-2: rgba(26, 39, 68, 0.08);
  --accent: var(--m-link); --accent-strong: var(--m-ink); --on-accent: var(--m-on-dark); --focus: var(--m-accent);
  --t1: var(--m-cat-1); --t2: var(--m-cat-2); --t3: var(--m-cat-3); --t4: var(--m-cat-4);
  /* health reads as fullness: darker is healthier; the lowest band is pale and outlined */
  --h4: #2d5a9e; --h3: #82aedd; --h2: #c9ddf1; --h1: #f4f8fd; --cell-empty: #f4f8fd; --cell-started: #e2edf8;
  --danger: #8a2e2e; --danger-line: rgba(138, 46, 46, 0.4);
  --notch: var(--m-notch); --notch-sm: var(--m-notch-sm); --notch-btn: 10px; --chip: var(--m-chip-radius);
  --font: var(--m-font-body); --display: var(--m-font-display); --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --side: 232px; --content: 1180px;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.55 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: var(--m-display-weight); letter-spacing: var(--m-display-tracking); margin: 0 0 8px; line-height: 1.15; text-wrap: balance; }
h1 { font-size: 28px; font-weight: var(--m-display-weight-strong); } h2 { font-size: 22px; } h3 { font-size: 16.5px; } h4 { font-size: 13.5px; margin-top: 18px; color: var(--ink-2); font-weight: 600; }
p { margin: 0 0 10px; max-width: 72ch; }
.muted { color: var(--ink-2); } .small { font-size: 13px; } .mono { font-family: var(--mono); font-size: 12.5px; } .right { text-align: right; }
.kicker { font-family: var(--display); font-weight: 600; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--m-kicker); margin: 0 0 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; } .skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button:focus-visible, .button:focus-visible, .navlink:focus-visible, .ptile:focus-visible, .template:focus-visible, .option:focus-visible, .piece:focus-visible, .tl-item:focus-visible, .artifact-card:focus-visible, .cellbtn:focus-visible, tr.rowlink:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus), inset 0 0 0 4px var(--surface); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* shard geometry: one corner cut at 45 degrees, never rounded */
.ptile, .piece, .tile, .stat, .artifact-card, .template, .option, .tl-item, button.primary, .button.primary, .card, .setup-card {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--n, var(--notch-sm))), calc(100% - var(--n, var(--notch-sm))) 100%, 0 100%);
}
.card, .setup-card { --n: var(--notch); }
.artifact-card, .piece, .tile, .stat, .template, .option, .tl-item { --n: var(--notch-sm); }
button.primary, .button.primary, .ptile { --n: var(--notch-btn); }
.modal, .empty-state, .tag-right, .textpane, .cloud, .prompts, .lineage, .thumb { box-shadow: inset 0 0 0 1px var(--line); }

/* controls */
button, .button { font: 600 14px/1.3 var(--display); padding: 9px 16px; border: 0; background: var(--bg-3); color: var(--ink); cursor: pointer; }
button:hover, .button:hover { background: var(--m-accent-light); text-decoration: none; }
button.primary, .button.primary { background: var(--m-ink); color: var(--m-on-dark); } button.primary:hover { background: var(--m-link); }
button.ghost { background: transparent; } button.ghost:hover { background: var(--bg-3); }
button.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger-line); } button.small { padding: 5px 11px; font-size: 12.5px; --n: 8px; }
button.icon { background: none; font-size: 22px; line-height: 1; padding: 0 6px; clip-path: none; }
button:not(.primary) { clip-path: none; box-shadow: inset 0 0 0 1px var(--line); } button.ghost { box-shadow: none; }
input, textarea, select { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid rgba(26, 39, 68, .55); background: var(--surface); color: var(--ink); width: 100%; border-radius: 0; }
textarea { resize: vertical; min-height: 60px; } input[type=checkbox], input[type=range] { width: auto; } input[type=file] { padding: 4px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
details summary { cursor: pointer; color: var(--accent); margin: 6px 0; } pre { white-space: pre-wrap; background: var(--bg-2); padding: 12px; max-height: 420px; overflow: auto; }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: 4px 0; border-bottom: 1px solid var(--line-2); } ul.plain li:last-child { border-bottom: 0; }

/* shell: sidebar + body */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--bg-2); border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 18px; font-weight: 800; letter-spacing: -0.015em; color: var(--ink); padding: 4px 8px 6px; } .brand:hover { text-decoration: none; }
.brand-sub { display: block; font: 600 11.5px/1.3 var(--display); color: var(--m-kicker); margin: 0 8px 12px; }
.brand-mark { display: block; height: 30px; width: auto; flex: none; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; } .foot-brand img { height: 28px; width: auto; display: block; } body.locked .foot-line > span:first-child { visibility: hidden; }
#nav { display: flex; flex-direction: column; gap: 1px; }
.navgroup { font: 600 11px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--m-kicker); padding: 16px 8px 6px; }
.navlink { display: block; padding: 6px 10px; color: var(--ink); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); } .navlink:hover { background: var(--bg-3); text-decoration: none; } .navlink.on { background: var(--m-ink); color: var(--m-on-dark); font-weight: 600; }
.side-foot { margin-top: auto; padding: 8px; } .status { font-size: 12px; color: var(--ink-2); }
/* the pathway badge: which governance the workspace runs under; a filled dot means the store is locked */
.pathway-badge { display: inline-flex; align-items: center; gap: 7px; font: 600 11.5px/1.2 var(--display); color: var(--ink-2); text-decoration: none; padding: 3px 8px; margin-left: 10px; border: 1px solid var(--line); border-radius: var(--chip); vertical-align: middle; }
.pathway-badge:hover { color: var(--ink); border-color: var(--m-link); } .pathway-badge .dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--m-link); } .pathway-badge .dot.locked { background: var(--m-link); }
/* data-class pills: the class of data a screen or report holds */
.pill.dataclass { font: 600 11px/1.4 var(--display); letter-spacing: .02em; vertical-align: middle; background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
h1 .pill.dataclass { margin-left: 10px; position: relative; top: -3px; }
.pill.dataclass.identified { border-color: var(--m-ink); color: var(--m-ink); } .pill.dataclass.coded { border-color: var(--m-link); color: var(--m-link); } .pill.dataclass.deidentified { border-color: var(--m-ink-2); color: var(--m-ink-2); } .pill.dataclass.aggregate { background: var(--bg-3); } .pill.dataclass.public { background: var(--m-support-pale); border-color: transparent; color: var(--m-ink-2); }
/* the accountability checklist */
.checklist { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; grid-template-columns: 1fr; gap: 6px; } .checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 10px; background: var(--bg-2); } .checklist .ck-mark { font: 700 14px/1.2 var(--display); width: 16px; flex: none; color: var(--ink-2); }
.checklist li.ok .ck-mark { color: var(--m-link); } .checklist li.gap { box-shadow: inset 0 0 0 1.5px var(--m-ink); background: transparent; } .checklist li.gap .ck-mark { color: var(--m-ink); } .checklist li.info { opacity: .85; }
.card.pathway h4 { margin: 18px 0 6px; } .record { margin-top: 6px; } .checks { display: grid; gap: 6px; align-content: start; padding-top: 22px; }
.body { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; min-height: 58px; }
.top-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; } .top-name strong { font-family: var(--display); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .top-name .muted { font-size: 12.5px; }
.no-workspace .top { display: none; } .no-workspace .side { display: none; } .no-workspace .shell { grid-template-columns: 1fr; }
.foot { color: var(--ink-2); font-size: 12.5px; padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 12px; }
.foot .m-seam { display: block; width: 100%; height: 12px; } .foot .m-seam svg { display: block; width: 100%; height: 100%; }
.foot-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
main { padding: 0; }

/* the period strip: one shard per period, shaded by health, the current one carries the gold data dot */
.strip-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.strip { display: flex; gap: 3px; flex-wrap: wrap; max-width: 560px; }
.ptile { width: 24px; height: 24px; padding: 0; --n: 8px; background: var(--cell-empty); box-shadow: inset 0 0 0 1px var(--line); position: relative; }
.ptile.future { background: repeating-linear-gradient(135deg, var(--cell-empty) 0 3px, var(--surface) 3px 6px); }
.ptile.low { box-shadow: inset 0 0 0 2px var(--m-ink); } .ptile.mid { box-shadow: inset 0 -3px 0 0 var(--m-ink); }
.matrix th[title] { cursor: help; }
.ptile.now::after { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--m-dot); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.ptile.focus { box-shadow: inset 0 0 0 2.5px var(--m-accent); transform: scale(1.18); }
.ptile:hover { box-shadow: inset 0 0 0 1.5px var(--m-ink); }
.strip-label { font-size: 13px; white-space: nowrap; } .strip-label button { margin-left: 6px; }

/* page */
.page { max-width: var(--content); margin: 0 auto; padding: 26px 28px 40px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 4px; } .page-head p { margin: 0; } .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { font-size: 13px; display: inline-block; margin-bottom: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 13.5px; } .meta span { white-space: nowrap; }
.block { padding: 18px 0 20px; border-top: 1px solid var(--line); } .block:first-of-type { border-top: 0; padding-top: 0; } .block h3 { margin-bottom: 8px; }
.card { background: var(--bg-2); padding: 20px 22px 24px; margin-bottom: 18px; position: relative; }
.card h3 { margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid2 > .card, .grid3 > .card { margin-bottom: 0; } .grid2 .field { margin-bottom: 0; }
.scroll { overflow: auto; }
.empty-state { background: var(--bg-2); padding: 30px 30px 40px; color: var(--ink-2); text-align: center; } .empty-state p { margin: 0 auto; }

/* facet hero: the brand's mosaic field with a scrim and a caption */
.facet { position: relative; overflow: hidden; display: grid; min-height: 0; margin-bottom: 22px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%); }
.facet > canvas[data-mosaic] { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.facet-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(var(--m-scrim-rgb), .95) 0%, rgba(var(--m-scrim-rgb), .55) 44%, rgba(var(--m-scrim-rgb), .08) 100%); }
.facet-cap { position: relative; padding: 64px 28px 24px; z-index: 2; color: var(--m-on-dark); }
.facet-cap .kicker { color: var(--m-kicker-on-dark); } .facet-cap .kicker, .facet-cap h2, .facet-cap p { text-shadow: 0 1px 3px rgba(20, 32, 58, .55); } .facet-cap h2 { color: #fff; font-size: clamp(20px, 2.6vw, 28px); font-weight: 800; margin: 0 0 4px; max-width: 30ch; }
.facet-cap p { color: var(--m-on-dark-2); font-size: 14px; margin: 0; max-width: 60ch; }
.facet--setup { margin: 0 0 22px; }

.finding { position: relative; padding: 9px 12px 11px; margin-bottom: 8px; font-size: 14px; max-width: 72ch; background: var(--bg-2); --n: var(--notch-sm); clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--n)), calc(100% - var(--n)) 100%, 0 100%); }
.finding::before { content: attr(data-kicker); display: block; font: 600 11px/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--m-kicker); margin-bottom: 3px; }
.finding.warn { box-shadow: inset 0 0 0 1.5px var(--m-ink); background: var(--surface); } .finding.good::before { color: var(--m-link); }
.health-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.health-chip { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: var(--chip); padding: 4px 12px 4px 6px; color: var(--ink); background: var(--surface); } .health-chip:hover { text-decoration: none; border-color: var(--ink); }
.health-chip b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-3); font-size: 13px; } .health-chip b.dark { color: #fff; } .health-chip b.low { box-shadow: inset 0 0 0 2px var(--m-ink); }
.row-link { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line-2); color: var(--ink); } .row-link:last-child { border-bottom: 0; } .row-link:hover { text-decoration: none; color: var(--accent); }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: var(--chip); background: var(--bg-3); color: var(--ink-2); margin-left: 6px; white-space: nowrap; }
.pill.empty { border: 1px dashed var(--line); background: transparent; } .pill.ai { background: transparent; border: 1px solid var(--line); } .pill.quiet { background: transparent; border: 1px solid var(--line); }
.stats, .tiles { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.stat, .tile { background: var(--bg-2); padding: 10px 16px 14px; font-size: 13px; color: var(--ink-2); min-width: 128px; }
.stat b, .tile b { display: block; font-family: var(--display); font-size: 24px; color: var(--ink); font-weight: 800; letter-spacing: -0.015em; line-height: 1.1; } .tile span { display: block; } .tile small { display: block; font-size: 11.5px; margin-top: 2px; } .tile.suppressed { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.star { color: var(--m-link); }

/* tables */
.table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14px; }
.table th, .table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; } .table th { font: 600 12px/1.3 var(--display); letter-spacing: .04em; color: var(--ink-2); background: var(--bg-2); }
.table.compact th, .table.compact td { padding: 6px 10px; font-size: 13px; } .table tr.problem td { color: var(--ink-2); } .table tr.rowlink { cursor: pointer; } .table tr.rowlink:hover td { background: var(--bg-2); }
.matrix { border-collapse: separate; border-spacing: 3px; font-size: 13px; } .matrix th { text-align: left; padding: 6px 8px; font-weight: 600; white-space: nowrap; } .matrix thead th { color: var(--ink-2); font-size: 12px; font-weight: 500; } .matrix th { max-width: 260px; white-space: normal; line-height: 1.25; }
.matrix td.cell { min-width: 52px; height: 40px; text-align: center; cursor: pointer; box-shadow: inset 0 0 0 1px transparent; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); } .matrix td.cell:hover { box-shadow: inset 0 0 0 1.5px var(--m-ink); }
.matrix td.cell.primary { background: var(--m-link); color: var(--m-on-dark); font-weight: 600; } .matrix td.cell.supporting { background: var(--cell-started); }
.matrix td.cell.low { box-shadow: inset 0 0 0 2px var(--m-ink); } .matrix td.cell.dark { color: #fff; } .cellbtn { all: unset; display: block; width: 100%; height: 100%; cursor: pointer; box-sizing: border-box; padding: 0; text-align: center; line-height: 40px; }
.matrix td.fcell { min-width: 120px; max-width: 220px; vertical-align: top; padding: 6px 8px; border: 1px solid var(--line); cursor: pointer; font-size: 12.5px; } .matrix td.fcell b { color: var(--accent); }
.matrix.small td.cell { min-width: 28px; height: 28px; font-size: 11px; } .vert { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; display: inline-block; max-height: 110px; overflow: hidden; }
.spark { width: 100%; max-width: 620px; height: auto; display: block; }
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; } .filterbar select, .filterbar input { width: auto; min-width: 150px; max-width: 280px; }
.subtabs { display: flex; gap: 2px; margin-bottom: 18px; border-bottom: 1px solid var(--line); overflow: auto; } .subtab { background: none; clip-path: none; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--ink-2); white-space: nowrap; font-weight: 600; } .subtab:hover { background: var(--bg-2); } .subtab.on { color: var(--ink); border-bottom-color: var(--m-ink); font-weight: 700; }
.status { font: 600 11.5px/1.3 var(--display); padding: 2px 8px; border-radius: var(--chip); background: var(--bg-3); color: var(--ink-2); white-space: nowrap; }
.status.on-track, .status.done, .status.approved, .status.sent, .status.closed { background: var(--m-link); color: #fff; } .status.scheduled, .status.planned, .status.not-started, .status.pending { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); } .status.at-risk, .status.blocked { background: transparent; box-shadow: inset 0 0 0 1.5px var(--m-ink); color: var(--m-ink); } .status.in-progress, .status.open, .status.accepted { background: var(--bg-3); color: var(--ink); }
.tri { font: 700 11.5px/1.3 var(--display); padding: 2px 8px; letter-spacing: .04em; } .tri.CONVERGE { background: var(--m-link); color: #fff; } .tri.COMPLEMENT { background: var(--m-ink-2); color: #fff; } .tri.DIVERGE { background: var(--m-ink); color: #fff; } .tri.SINGLE { box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); }
.bars { margin: 8px 0 14px; } .bars h4 { margin: 0 0 6px; } .bar-row { display: grid; grid-template-columns: minmax(220px, 2fr) 1.6fr auto; gap: 10px; align-items: center; font-size: 13px; padding: 3px 0; }
.bar-label { white-space: normal; line-height: 1.3; } .bar-track { height: 10px; background: var(--bg-3); overflow: hidden; } .bar-fill { display: block; height: 100%; background: var(--m-link); } .bar-n { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* setup funnel */
.setup { max-width: 820px; margin: 30px auto; padding: 0 20px; }
.setup-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.steps { display: flex; gap: 14px; list-style: none; padding: 0; margin: 0; font-size: 12.5px; color: var(--ink-2); counter-reset: s; }
.steps li { counter-increment: s; } .steps li::before { content: counter(s) " "; font-weight: 600; } .steps li.on { color: var(--ink); font-weight: 600; } .steps li.done { color: var(--accent); }
.setup-card { background: var(--bg-2); padding: 28px 30px 34px; }
.setup-card .lead { color: var(--ink-2); font-size: 15px; margin-bottom: 16px; }
.setup-nav { display: flex; justify-content: space-between; margin-top: 22px; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 18px; }
.template, .option { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font-family: var(--font); font-weight: 400; } .template strong, .option strong { font-family: var(--display); font-size: 14px; } .template span, .option span { font-size: 13px; color: var(--ink-2); }
.template:hover, .option:hover { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--m-ink); }
.template.on, .option.on { background: var(--m-tile-fill); box-shadow: inset 0 0 0 2px var(--m-tile-line); }
.option-list { display: grid; gap: 8px; margin-bottom: 18px; } .option-list.row { grid-template-columns: 1fr 1fr; }
.summary-list { padding-left: 18px; } .summary-list li { margin-bottom: 6px; }

/* forms */
.field { display: block; margin-bottom: 14px; } .field-label { display: block; font: 600 13px/1.3 var(--display); margin-bottom: 4px; } .hint { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 6px; margin: 8px 0; font-size: 14px; } .checks-list { display: flex; flex-wrap: wrap; gap: 4px 14px; } .checks-list .check { margin: 2px 0; }
.range { display: flex; align-items: center; gap: 12px; } .range input { flex: 1; accent-color: var(--m-ink); } .range b { font-family: var(--display); font-size: 20px; width: 30px; text-align: center; }
.align-list { display: grid; gap: 6px; } .align-row { display: grid; grid-template-columns: 1fr 90px; gap: 10px; align-items: center; font-size: 14px; }
.prompts { background: var(--bg-2); padding: 10px 14px 14px; margin-bottom: 14px; } .prompts ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.toolkit-row { display: grid; grid-template-columns: 1fr 200px; gap: 10px; align-items: center; margin-bottom: 14px; }
.preview img { max-width: 100%; max-height: 260px; margin-bottom: 12px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(var(--m-scrim-rgb), .5); display: grid; place-items: center; z-index: 50; padding: 20px; overflow: auto; }
.modal { background: var(--surface); width: min(560px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(var(--m-scrim-rgb), .35); margin: 0; } .modal.wide { width: min(900px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px 8px; } .modal-body { padding: 8px 22px; overflow: auto; } .modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 28px; border-top: 1px solid var(--line); }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--m-ink); color: #fff; padding: 10px 18px; opacity: 0; transition: .2s; font: 600 14px var(--display); z-index: 60; pointer-events: none; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); } #toast.show { opacity: 1; transform: translate(-50%, 0); } #toast.warn { background: var(--danger); }

/* artifacts and tagging */
.artifact-list { display: grid; gap: 8px; }
.artifact-card { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; background: var(--bg-2); padding: 10px 14px 12px; color: var(--ink); } .artifact-card:hover { background: var(--m-tile-fill); text-decoration: none; }
.thumb { width: 56px; height: 56px; object-fit: cover; background: var(--bg-3); display: grid; place-items: center; font: 800 20px var(--display); color: var(--ink-2); --n: 8px; }
.tag-cols { display: grid; grid-template-columns: 1fr 320px; gap: 24px; } @media (max-width: 900px) { .tag-cols { grid-template-columns: 1fr; } }
.tag-left { min-width: 0; } .tag-right { background: var(--bg-2); padding: 14px 16px 24px; position: sticky; top: 74px; max-height: calc(100vh - 96px); overflow: auto; }
.img-wrap { position: relative; display: inline-block; max-width: 100%; user-select: none; cursor: crosshair; } .img-wrap img { max-width: 100%; display: block; }
.overlay { position: absolute; inset: 0; } .box { position: absolute; border: 2px solid var(--m-accent); background: rgba(74, 144, 217, .16); } .box span { position: absolute; top: -20px; left: -2px; font: 600 11.5px var(--display); background: var(--m-ink-2); color: #fff; padding: 1px 6px; white-space: nowrap; } .box.pending { border-style: dashed; border-color: var(--m-accent); background: rgba(74, 144, 217, .1); }
.textpane { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 18px 22px 26px; white-space: pre-wrap; line-height: 1.7; font-size: 15px; max-height: 70vh; overflow: auto; max-width: 78ch; }
.textpane mark { background: var(--m-tile-fill); color: inherit; border-bottom: 2px solid var(--m-tile-line); }
.pending-note { background: var(--bg-3); padding: 8px 10px; font-size: 13px; margin-bottom: 8px; } .pending-note q { font-style: italic; }
.taggroup { margin: 10px 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } .taggroup small { width: 100%; font: 600 11px/1.3 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--m-kicker); }
.tagbtn { font: 500 13px var(--font); padding: 3px 10px; border-radius: var(--chip); clip-path: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); } .tagbtn:hover { background: var(--m-tile-fill); box-shadow: inset 0 0 0 1px var(--m-tile-line); } .tagbtn sup { color: var(--ink-2); font-size: 11px; margin-left: 3px; vertical-align: baseline; } .tagbtn .code { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); margin-right: 5px; }
.applied { border-top: 1px solid var(--line-2); padding: 8px 0; font-size: 13px; } .applied q { display: block; color: var(--ink-2); font-style: italic; margin: 2px 0; } .applied button { margin-top: 4px; }
.resources { padding-left: 18px; } .resources li { margin-bottom: 4px; }
.prompt { border-top: 1px solid var(--line-2); padding: 10px 0; } .prompt .actions { margin: 6px 0; }
.cloud { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; justify-content: center; padding: 16px 16px 28px; background: var(--bg-2); line-height: 1.1; }
.cw { color: var(--t1); font-family: var(--display); font-weight: 700; } .cw:nth-child(3n) { color: var(--t2); } .cw:nth-child(5n) { color: var(--t3); } .cw:nth-child(7n) { color: var(--t4); }

/* goals */
.goal-tree { list-style: none; padding-left: 0; margin: 0; } .goal-tree.nested { padding-left: 22px; border-left: 1px solid var(--line); margin-left: 8px; }
.goal-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; } @media (max-width: 860px) { .goal-row { display: grid; grid-template-columns: 1fr auto; } .goal-row .goal-title { grid-column: 1 / -1; } } .goal-row.root .goal-title { font-family: var(--display); font-size: 16px; font-weight: 700; }
.goal-title { cursor: pointer; } .goal-title:hover { color: var(--accent); }

/* guides */
.guide-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.section { text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--font); font-weight: 400; } .section b { font-family: var(--display); font-size: 13.5px; } .section:hover { background: var(--m-tile-fill); }

/* sociogram */
.graph { padding: 8px; min-height: 420px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); } .graph svg { display: block; } .legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 10px; font-size: 12.5px; color: var(--ink-2); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }

/* timeline */
.timeline { max-width: 860px; }
.tl-period { font-family: var(--display); font-size: 16px; font-weight: 700; margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.tl-item { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 10px 12px 14px; margin: 0 0 6px; background: var(--bg-2); color: var(--ink); }
.tl-item:hover { background: var(--bg-3); text-decoration: none; }
.tl-date { font-size: 12.5px; color: var(--ink-2); padding-top: 3px; font-variant-numeric: tabular-nums; }
.filterbar input[type=range] { min-width: 180px; width: 220px; accent-color: var(--m-ink); }

/* mosaic plane */
.clusters { display: grid; gap: 22px; } .cluster h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 3px; }
.piece { display: flex; flex-direction: column; gap: 3px; padding: 10px 36px 14px 12px; min-height: 96px; background: var(--piece-h, var(--m-tile-fill)); box-shadow: inset 0 0 0 1.5px var(--m-tile-line); color: var(--ink); font-size: 12.5px; position: relative; overflow: hidden; }
.piece:hover { box-shadow: inset 0 0 0 2.5px var(--m-ink); text-decoration: none; } .piece b { font-family: var(--display); font-size: 13px; line-height: 1.25; } .piece-meta { color: var(--ink-2); font-size: 11.5px; } .piece-text { color: var(--ink-2); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.piece img { width: 100%; height: 70px; object-fit: cover; } .piece-health { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--display); color: #fff; }
.piece.dark, .piece.dark .piece-meta, .piece.dark .piece-text { color: #fff; } .piece.low { box-shadow: inset 0 0 0 2.5px var(--m-ink); }
.jux { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; } .jux h2 { font-size: 18px; } @media (max-width: 860px) { .jux { grid-template-columns: 1fr; } }
.lineage { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; margin: -6px 0 16px; padding: 8px 12px 12px; background: var(--bg-2); } .lineage-note { color: var(--m-link); }

/* responsive */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side { flex-wrap: wrap; overflow: visible; } #nav { flex-direction: row; flex-wrap: wrap; gap: 2px; } .navgroup { display: none; } .navlink { white-space: nowrap; padding: 8px 10px; font-size: 13.5px; } .ptile { width: 28px; height: 28px; } .strip { gap: 6px; } .side-foot { display: none; } .brand { padding: 0 6px 0 0; font-size: 17px; } .brand-sub { display: none; }
  .top { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 16px; } .strip-wrap { justify-content: flex-start; }
  .grid2, .grid3 { grid-template-columns: 1fr; } .page { padding: 16px; } .tag-cols { grid-template-columns: 1fr; } .tag-right { position: static; max-height: none; }
  .toolkit-row { grid-template-columns: 1fr; } .option-list.row { grid-template-columns: 1fr; }
}

/* ---------- banners: backup due, storage ---------- */
.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 18px; background: var(--m-ground-3); border-left: 4px solid var(--m-dot); }
.banner p { margin: 0; font-size: 0.95rem; } .banner .actions { margin: 0; display: flex; gap: 12px; align-items: center; } .banner a.small { font-size: 0.85rem; }
.demo-box { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); } .demo-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
