Files
stack/dev/scripts/dossier_page/template.html

458 lines
36 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, nofollow">
<title>lex</title>
<!-- fhirworx favicon set (assets/icons), inlined by build.py -->
<link rel="icon" type="image/svg+xml" href="/*__FAVICON_SVG__*/">
<link rel="icon" type="image/png" sizes="32x32" href="/*__FAVICON_PNG__*/">
<link rel="apple-touch-icon" sizes="180x180" href="/*__APPLE_TOUCH_ICON__*/">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<script>
/* Light is the default, as on the dashboard and the Gitea fhirworx theme; dark is opt-in (the
Gitea fhirworx-dark theme is a user choice too), remembered per browser. */
try { if (localStorage.getItem("lex-theme") === "dark") document.documentElement.setAttribute("data-theme", "dark"); } catch (e) {}
</script>
<!-- HTI-5 fhirworx design system: assets/css/fhirworx.css, inlined by build.py (palette, fonts, base classes) -->
<style id="fhirworx">/*__FHIRWORX_CSS__*/</style>
<!-- the fhirworx dark palette (infra/gitea/theme/theme-fhirworx-dark.css) on the same token names, by build.py -->
<style id="fhirworx-dark">/*__FHIRWORX_DARK__*/</style>
<style>
/* lex on the fhirworx design system. Every colour, font and radius below is a fhirworx.css token
(or a mix of two). Patterns come from the system's own pages:
masthead, section header, tile + icon plate + health box + badge + stripe, footer: assets/css/dashboard.css
navbar, tables, buttons, inputs, links, scrollbars: assets/css/inject.css, Gitea theme
in-page sidebar: assets/css/marimo.css (.app-sidebar)
Layout: the masthead, then a three-pane workspace: the book in the left rail, the selected
object with one tab per view, and the evidence drawer.
The page is the lex app shell: no data is inlined. app.js (an ES module served next to this
page from /assets/dossier/) reads the policy API and renders each view. */
:root {
color-scheme: light only; /* as the Gitea fhirworx theme: an OS dark setting does not flip it */
/* Roles, each one a system token. */
--s-final: var(--chart-2); /* chart: final values (indigo) */
--s-prop: var(--chart-5); /* chart: proposed values (amber) */
--s-ruc: var(--muted-foreground); /* chart: neutral reference marks */
--s-alt: var(--chart-1); /* chart: second series (indigo, lighter step) */
--st-support: var(--chart-4); /* stance: teal */
--st-modify: var(--chart-5); /* stance: amber */
--st-oppose: var(--destructive);
--st-unclear: var(--muted-foreground);
--on-amber: var(--foreground); /* Gitea theme rule: near-black, not white, on orange */
--nav-rule: var(--foreground); /* the 3px ink line under the navbar */
}
:root[data-theme="dark"] {
color-scheme: dark;
--s-final: var(--chart-1); /* the system has no dark indigo scale; chart-2 is under 3:1 on the dark card */
--s-alt: var(--muted-foreground);
--on-amber: var(--primary-foreground);
--nav-rule: var(--border); /* Gitea fhirworx-dark draws the navbar rule in the border colour */
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; }
a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); transition: color .15s ease; }
a:hover { color: var(--foreground); text-decoration-color: currentColor; }
::selection { background: var(--primary); color: var(--primary-foreground); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; border: 2px solid var(--secondary); }
::-webkit-scrollbar-thumb:hover { background: var(--muted-foreground); }
h1, h2, h3 { text-wrap: balance; }
.mono { font-family: var(--font-mono); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.muted { color: var(--muted-foreground); }
.nowrap { white-space: nowrap; }
.small { font-size: 13px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* ── navbar: the Gitea fhirworx bar (sidebar navy, 3px ink rule, logo first) ── */
.nav { background: var(--sidebar); color: var(--sidebar-foreground); border-bottom: 3px solid var(--nav-rule); }
.nav-in { max-width: 1480px; margin: 0 auto; padding: 6px 1.5rem; min-height: 54px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.brand-group { display: inline-flex; align-items: center; gap: 12px; margin-right: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; color: var(--sidebar-accent-foreground); }
.brand svg { width: 30px; height: 30px; flex: none; }
.app { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--sidebar-accent-foreground); padding-left: 12px; border-left: 1px solid color-mix(in srgb, var(--sidebar-foreground) 40%, transparent); }
.nav-item { font-family: var(--font-body); font-size: 15px; color: var(--sidebar-foreground); padding: 5px 10px; border-radius: var(--radius); display: inline-flex; align-items: center; gap: 6px; }
.nav-item.on { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); }
.nav a { text-decoration: none; }
.nav a:hover, .nav button:hover { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); }
.nav a.brand:hover, .nav a.app:hover { background: transparent; color: var(--sidebar-accent-foreground); }
.nav-sp { flex: 1; }
.nav-note { font-size: 14px; opacity: .85; }
.nav button.nav-item { background: transparent; border: 0; cursor: pointer; }
.nav-item svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav :focus-visible { outline-color: var(--sidebar-primary) !important; }
/* ── page + masthead: dashboard.css ── */
.page { max-width: 1480px; margin: 0 auto; padding: 3rem 1.5rem 2.5rem; }
.masthead { margin-bottom: .5rem; }
.masthead-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.masthead-brand { display: flex; align-items: center; gap: 1rem; }
.masthead-logo { width: clamp(48px, 6vw, 80px); height: clamp(48px, 6vw, 80px); display: block; flex: 0 0 auto; }
.masthead h1 { font-weight: 800; font-size: clamp(2.5rem, 5vw, 3.5rem); line-height: 1.1; letter-spacing: -.02em; margin: 0; }
.masthead-eyebrow { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-foreground); align-self: flex-end; padding-bottom: .35rem; }
.masthead-body { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0 2.5rem; }
.tagline { font-size: 1.125rem; color: var(--muted-foreground); max-width: 65ch; line-height: 1.65; margin: 0 0 1.5rem; text-wrap: pretty; }
.tagline em { color: var(--foreground); }
.masthead .health { margin: 0 0 1.5rem; max-width: 34rem; }
.masthead .health-v { font-size: 16px; }
.status-note { font-size: 14px; color: var(--muted-foreground); margin-top: 2px; }
/* health box: dashboard.css (label, status word, the left edge carries the state) */
.health { display: flex; flex-direction: column; margin: 0 0 .85rem; padding: 8px 10px; border: 1px solid var(--border); border-left-width: 4px; background: var(--background); }
.health-k { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-foreground); }
.health-v { font-size: 18px; font-weight: 600; line-height: 1.2; color: var(--foreground); }
.health-ok { border-left-color: var(--chart-4); }
.health-warn { border-left-color: var(--chart-5); }
.health-bad { border-left-color: var(--destructive); }
.health-unknown { border-left-color: var(--muted-foreground); }
/* badge: dashboard.css */
.badge { font-family: var(--font-mono); color: var(--primary-foreground); background: var(--primary); font-size: .6rem; padding: 3px 7px; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; display: inline-block; line-height: 1.4; }
.badge.new { background: var(--chart-5); }
.tile > .badge { position: absolute; top: -1px; left: 1.5rem; }
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr) 330px; align-items: start; }
/* ── left rail: the book (an in-page sidebar, as marimo's .app-sidebar) ── */
.rail { position: sticky; top: 0; max-height: 100vh; overflow: auto; padding: 1rem 1.5rem 1.5rem 0; border-right: 1px solid var(--border); }
.rail label.eyebrow { display: block; margin-bottom: 6px; }
.rail input { width: 100%; }
.rail input, select.fsel { font: inherit; font-size: 15px; padding: 6px 10px; background: var(--card); color: var(--foreground); border: 1px solid var(--input); border-radius: var(--radius); }
select.fsel { font-size: 14px; padding: 4px 8px; }
.rail input:focus, select.fsel:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent); }
.rail h2 { font-size: 1.25rem; margin: 1.25rem 0 .4rem; }
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc li { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; padding: 4px 8px; font-size: 15px; line-height: 1.4; color: var(--muted-foreground); }
.toc li.cur { background: var(--card); border-left: 3px solid var(--foreground); color: var(--foreground); }
.toc li.cur a { color: var(--foreground); font-weight: 600; text-decoration: none; }
.toc li.cur a:hover { color: var(--primary); }
.toc .tier { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-foreground); white-space: nowrap; }
.toc li.planned span:first-child { color: var(--secondary-foreground); }
.rail .eyebrow + .toc, .rail .toc + .eyebrow { margin-top: 4px; }
.rail .note { font-size: 14px; color: var(--muted-foreground); margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.rail details summary { cursor: pointer; list-style: none; }
.rail details summary::-webkit-details-marker { display: none; }
.rail details:not([open]) summary h2::after { content: " +"; color: var(--muted-foreground); font-family: var(--font-mono); font-size: 14px; }
/* ── main pane ── */
.main { min-width: 0; padding: 1rem 1.5rem 4rem; }
.section-header { margin-bottom: 1.25rem; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.section-eyebrow { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-foreground); display: block; }
.section-row .section-eyebrow { margin: 0; }
.section-header h2 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; margin: 0; }
.section-sub { margin: .4rem 0 0; font-size: .95rem; color: var(--muted-foreground); line-height: 1.55; }
.tabs-wrap { overflow-x: auto; margin: 0 0 1.5rem; border-bottom: 1px solid var(--border); }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; align-items: flex-end; }
.tabs .grp { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-foreground); opacity: .8; padding: 0 6px 11px 10px; }
.tabs a { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-foreground); text-decoration: none; padding: 10px 10px 8px; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--foreground); background: var(--secondary); }
.tabs a.on { color: var(--foreground); border-bottom-color: var(--foreground); font-weight: 600; }
.tabs a.soon { border-bottom-style: dashed; }
.tabs a.soon::after { content: "coming"; margin-left: 6px; font-size: 9px; padding: 1px 4px; border: 1px dashed var(--border); color: var(--muted-foreground); vertical-align: 1px; }
.view h2 { font-size: 1.25rem; letter-spacing: -.01em; margin: 0 0 .25rem; }
.view h3 { font-size: 1.1rem; margin: 1.75rem 0 .5rem; }
.view .lede { color: var(--muted-foreground); max-width: 72ch; margin: 0 0 1rem; line-height: 1.6; }
.sec { margin-top: 1.75rem; }
.sec-head { margin: 1.75rem 0 1rem; }
.sec-head h3 { margin: 0 !important; }
/* ── tiles: dashboard.css (icon plate, eyebrow, title, description, health, port, stripe) ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.tile { background: var(--card); border: 1px solid var(--border); border-top: 3px solid var(--foreground); padding: 1.5rem; position: relative; overflow: hidden; transition: border-color .15s ease, background .15s ease; min-width: 0; display: flex; flex-direction: column; }
.tile > .icon, .tile > .tile-port { align-self: flex-start; }
.tile:hover { border-color: var(--primary); }
.tile[data-fact] { cursor: pointer; }
.tile .icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1px solid var(--border); color: var(--primary); margin-bottom: .9rem; transition: border-color .15s ease; }
.tile .icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tile:hover .icon { border-color: var(--primary); }
.tile-eyebrow { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-foreground); margin-bottom: .25rem; }
.tile-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; color: var(--foreground); margin: .25rem 0 .5rem; transition: color .15s ease; }
.tile-title a { color: inherit; text-decoration: none; }
.tile:hover .tile-title { color: var(--primary); }
.tile-desc { font-size: .95rem; color: var(--muted-foreground); line-height: 1.55; margin: 0 0 1rem; }
.tile-port { font-family: var(--font-mono); font-size: .65rem; color: var(--muted-foreground); opacity: .7; display: inline-block; }
.stripe { position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--border); }
.tile .health { margin-top: auto; }
.facts { grid-template-columns: minmax(0, 1fr); list-style: none; padding: 0; display: grid; gap: 7px; color: var(--secondary-foreground); }
.facts li { line-height: 1.5; }
.tile .codes { margin: .25rem 0 .5rem; }
.tile dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0 0 1rem; font-size: .9rem; color: var(--secondary-foreground); }
.tile dt { font-family: var(--font-mono); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); padding-top: 4px; }
.tile dd { margin: 0; min-width: 0; }
.cite { font-family: var(--font-mono); font-size: 11px; white-space: nowrap; text-decoration: none; color: var(--primary); border: 1px solid var(--border); background: var(--card); padding: 1px 5px; margin-left: 2px; line-height: 1.9; }
.cite::after { content: " \2197"; font-size: 10px; }
.cite:hover { border-color: var(--primary); color: var(--primary); }
.cite.book { white-space: normal; color: var(--secondary-foreground); }
.tile dd .cite { white-space: normal; }
.tbl td.why { min-width: 9rem; }
.cite.book::after { content: ""; }
.codes { display: flex; flex-wrap: wrap; gap: 4px; }
.code { font-family: var(--font-mono); font-size: 12px; padding: 1px 6px; border: 1px solid var(--border); background: var(--card); }
.code.del { text-decoration: line-through; color: var(--muted-foreground); border-style: dashed; }
.code.lnk { border-color: var(--primary); color: var(--primary); }
.hdr-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0 0 4px; align-items: baseline; }
.hdr-grid > .eyebrow { padding-top: 3px; }
/* panel: the health-box shape at section scale (left edge carries the state) */
.panel { border: 1px solid var(--border); border-left-width: 4px; background: var(--card); padding: 12px 16px; }
.panel.warn { border-left-color: var(--chart-5); }
.panel.info { border-left-color: var(--primary); }
.panel.soon { border-left-color: var(--muted-foreground); border-style: dashed; border-left-style: solid; }
.panel h3 { margin-top: 0 !important; }
.gaps { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 5px; font-size: 15px; }
/* pills: inject.css badges/labels (mono, secondary ground, hairline); the state is in the border */
.pill { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border: 1px solid var(--border); background: var(--secondary); color: var(--secondary-foreground); white-space: nowrap; display: inline-block; }
.pill.prelim { border-color: var(--chart-5); background: color-mix(in srgb, var(--chart-5) 12%, var(--card)); color: var(--foreground); }
.pill.cms { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--card)); color: var(--foreground); }
.pill.prop { border-color: var(--s-prop); border-style: dashed; background: color-mix(in srgb, var(--s-prop) 10%, var(--card)); color: var(--foreground); }
.pill.final { border-color: var(--s-final); background: var(--card); color: var(--foreground); }
.pill.model { border-style: dotted; color: var(--muted-foreground); background: var(--card); }
.pill.soon { border-style: dashed; color: var(--muted-foreground); background: var(--card); }
/* ── tables: inject.css (navy mono header, hairline grid, zebra rows) ── */
.tbl-wrap { overflow-x: auto; background: var(--card); }
table.tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
.tbl th { background: var(--primary); color: var(--primary-foreground); font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; text-align: left; padding: 10px 12px; border: 1px solid var(--sidebar-accent); white-space: nowrap; vertical-align: bottom; }
.tbl td { background: var(--card); color: var(--foreground); padding: 8px 12px; border: 1px solid var(--border); vertical-align: top; }
.tbl tbody tr:nth-child(even) td { background: var(--secondary); }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tbody tr[data-fact] { cursor: pointer; }
.tbl tbody tr[data-fact]:hover td { background: color-mix(in srgb, var(--primary) 8%, var(--background)); }
.tbl tr.sel td { background: color-mix(in srgb, var(--primary) 13%, var(--card)) !important; }
.tbl tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.tbl .grp-row td { background: var(--muted); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--secondary-foreground); padding-top: 9px; border-top: 2px solid var(--foreground); }
.tbl td.pcol { border-left: 2px dashed var(--s-prop); font-style: italic; background-image: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--s-prop) 16%, transparent) 0 1px, transparent 1px 6px); }
.tbl th.pcol { border-left: 2px dashed var(--s-prop); }
.tbl td.na { color: var(--muted-foreground); }
.chg { position: relative; }
.chg::before { content: ""; position: absolute; left: 3px; top: 50%; width: 5px; height: 5px; margin-top: -3px; background: var(--s-prop); border-radius: 50%; }
.tbl .stick { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--border); }
/* stance: teal support, amber modify, red oppose, grey unclear (chart-4, chart-5, destructive, muted) */
.st { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 20px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--primary-foreground); }
.st.support { background: var(--st-support); }
.st.modify { background: var(--st-modify); color: var(--on-amber); }
.st.oppose { background: var(--st-oppose); }
.st.unclear { background: var(--st-unclear); }
.st.none { background: transparent; color: var(--border); font-weight: 400; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--secondary-foreground); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.sw { width: 12px; height: 12px; display: inline-block; }
.bar { display: flex; height: 22px; gap: 2px; min-width: 0; }
.bar > div { display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; color: var(--primary-foreground); min-width: 18px; }
.bar > .st-modify { color: var(--on-amber); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.col-h { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; flex-wrap: wrap; }
.col-h h2, .col-h h3 { margin: 0 !important; }
/* buttons: inject.css (body face, secondary ground, primary on hover and when pressed) */
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 1rem; }
.fbtn, .drawer .close { font-family: var(--font-body); font-size: 14px; font-weight: 500; line-height: 1.4; padding: 3px 10px; border: 1px solid var(--border); background: var(--secondary); color: var(--foreground); border-radius: var(--radius); cursor: pointer; transition: all .15s ease; }
.fbtn:hover, .fbtn[aria-pressed="true"], .drawer .close:hover { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.fbtn:active { transform: translate(1px, 1px); }
.fbtn:hover .muted, .fbtn[aria-pressed="true"] .muted { color: inherit; opacity: .75; }
button.dis { font-family: var(--font-body); font-size: 14px; padding: 3px 10px; border: 1px dashed var(--border); background: var(--muted); color: var(--muted-foreground); border-radius: var(--radius); cursor: not-allowed; }
.cms-list { display: grid; gap: 0; border: 1px solid var(--border); background: var(--card); }
.cms-list > div { padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; display: grid; gap: 4px; }
.cms-list > div:last-child { border-bottom: 0; }
.cms-list > div:hover { background: var(--secondary); }
.cms-list > div.sel { background: color-mix(in srgb, var(--primary) 13%, var(--card)); box-shadow: inset 3px 0 0 var(--primary); }
.cms-list q { font-size: 14px; quotes: "\201C" "\201D"; }
.charts { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
.charts .chart-box svg { max-width: 760px; }
/* timeline */
.tl-year { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 12px; border-top: 1px solid var(--border); padding: 12px 0 6px; }
.tl-year > h4 { font-size: 1.3rem; margin: 0; line-height: 1.1; }
.tl-year > h4 small { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-foreground); font-weight: 400; letter-spacing: .06em; margin-top: 4px; }
.tl-items { display: grid; gap: 8px; min-width: 0; }
.tl-item { border: 1px solid var(--border); background: var(--card); padding: 9px 13px; cursor: pointer; display: grid; gap: 4px; min-width: 0; transition: border-color .15s ease; }
.tl-item:hover { border-color: var(--primary); }
.tl-item.sel { border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.tl-item .top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tl-item .ttl { font-weight: 600; }
.tl-item .sum { font-size: 14px; color: var(--secondary-foreground); }
.tl-item .tl-blk { border-top: 1px dashed var(--border); padding-top: 6px; display: grid; gap: 4px; }
.tl-item details > summary { cursor: pointer; color: var(--muted-foreground); }
.tl-item[hidden], .tl-year[hidden] { display: none; }
.tl-item .cite { white-space: normal; overflow-wrap: anywhere; }
.tl-item .facts { font-size: 14px; }
.tbl td.why { min-width: 14rem; max-width: 26rem; }
.type { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 1px 5px; border: 1px solid var(--border); color: var(--secondary-foreground); background: var(--secondary); white-space: nowrap; }
.type.origin { border-color: var(--s-alt); }
.type.valuation { border-color: var(--s-final); }
.type.cms { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--card)); }
.type.link { border-color: var(--chart-4); }
/* story strip */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border: 1px solid var(--border); border-top: 3px solid var(--foreground); background: var(--card); }
.steps li { padding: 12px 14px; border-right: 1px solid var(--border); min-width: 0; display: grid; gap: 6px; align-content: start; cursor: pointer; }
.steps li:last-child { border-right: 0; }
.steps li:hover { background: var(--secondary); }
.steps li.sel { box-shadow: inset 0 -3px 0 var(--primary); }
.steps .n { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; color: var(--muted-foreground); letter-spacing: .12em; }
.steps .h { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.steps q { font-size: 14px; color: var(--secondary-foreground); quotes: "\201C" "\201D"; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted-foreground); font-family: var(--font-mono); font-size: 11px; }
.chart .ax { stroke: var(--muted-foreground); stroke-width: 1; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart-box { border: 1px solid var(--border); background: var(--card); padding: 1rem 1rem .5rem; min-width: 0; }
.tip { position: fixed; pointer-events: none; z-index: 30; background: var(--primary); color: var(--primary-foreground); font-family: var(--font-mono); font-size: 11.5px; padding: 5px 8px; max-width: 260px; }
/* evidence drawer */
.drawer { position: sticky; top: 0; max-height: 100vh; overflow: auto; padding: 1rem 0 2rem 1.5rem; border-left: 1px solid var(--border); min-width: 0; }
.drawer .d-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.drawer .close { display: none; }
.drawer h3 { font-size: 1.25rem; margin: 6px 0 10px; line-height: 1.25; }
.ev-src { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 12px; display: grid; gap: 6px; }
.ev-src .src-t { font-size: 13px; color: var(--muted-foreground); }
.ev-src blockquote { margin: 0; padding: 8px 12px; background: var(--card); border-left: 3px solid var(--primary); font-size: 14px; line-height: 1.55; }
.ev-src blockquote.cmt { border-left-color: var(--s-prop); }
.ev-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 10px; font-size: 14px; margin: 0; }
.ev-dl dt { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-foreground); padding-top: 3px; }
.ev-dl dd { margin: 0; min-width: 0; }
.sketch { border: 1px dashed var(--border); padding: 1.25rem 1rem 1rem; background: var(--card); position: relative; }
.sketch::before { content: "Sketch with real rows"; position: absolute; top: -9px; left: 10px; background: var(--background); padding: 0 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-foreground); }
.ph { border: 1px dashed var(--border); color: var(--muted-foreground); font-style: italic; padding: 6px 8px; font-size: 14px; }
/* ── the app shell: facts, accuracy lines, summary cites, error panels, loading ── */
[data-fact] { cursor: pointer; transition: background .15s ease; }
[data-fact]:hover { background: color-mix(in srgb, var(--primary) 5%, transparent); }
[data-fact].sel { background: color-mix(in srgb, var(--primary) 10%, transparent); box-shadow: inset 3px 0 0 var(--primary); }
.facts li[data-fact] { padding: 2px 6px; margin: 0 -6px; }
.acc { display: block; margin-top: 4px; padding-left: 8px; border-left: 2px solid var(--chart-5); font-size: 13px; line-height: 1.5; color: var(--muted-foreground); }
.cite[data-ref] { margin-left: 1px; vertical-align: 1px; }
.cite.book[data-ref] { cursor: pointer; }
.cite.group { cursor: pointer; margin-left: 1px; vertical-align: 1px; }
.facts li[data-ref] { cursor: pointer; }
.panel.err { border-left-color: var(--destructive); max-width: 72ch; }
.panel.err[data-err="signed-out"], .panel.err[data-err="rebuilt"] { border-left-color: var(--chart-5); }
.panel.err[data-err="not-found"] { border-left-color: var(--muted-foreground); }
.panel.err p { margin: .4rem 0 0; line-height: 1.55; }
.main[data-ready=""] .view { opacity: .6; transition: opacity .15s ease .2s; }
.toc-h { margin-top: 12px; }
.ev-codes, .ev-flags { margin: 0 0 8px; }
.ev-text { margin: 0 0 10px; line-height: 1.55; }
.drawer .acc { margin: 0 0 10px; }
.ev-dl { margin-bottom: 4px; }
/* footer: dashboard.css */
.ftr { margin-top: 3rem; padding-top: 1rem; border-top: 3px solid var(--foreground); color: var(--muted-foreground); font-family: var(--font-mono); font-size: .65rem; letter-spacing: .08em; }
.ftr .site { color: var(--chart-5); }
.ftr a { color: inherit; }
@media (max-width: 1180px) {
.shell { grid-template-columns: 214px minmax(0, 1fr); }
.drawer { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 52vh; z-index: 20; background: var(--background); border-left: 0; border-top: 3px solid var(--foreground); padding: 14px max(1.5rem, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(1.5rem, env(safe-area-inset-left, 0px)); box-shadow: 0 -8px 24px color-mix(in srgb, var(--foreground) 18%, transparent); }
.drawer:not(.open) { display: none; }
.drawer .close { display: inline-block; }
body.drawer-open .page { padding-bottom: 54vh; }
}
@media (max-width: 760px) {
.page { padding-top: 2rem; }
.shell { grid-template-columns: minmax(0, 1fr); }
.rail { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 1rem; }
.main { padding: 1.25rem 0 3rem; }
.two { grid-template-columns: minmax(0, 1fr); }
.tabs { flex-wrap: nowrap; min-width: max-content; }
.nav-note { display: none; }
.nav-theme span { display: none; }
.tl-year { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.steps { grid-template-columns: minmax(0, 1fr); }
.steps li { border-right: 0; border-bottom: 1px solid var(--border); }
.hdr-grid { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
.hdr-grid > .eyebrow { padding-top: 8px; }
}
@media (max-width: 480px) {
.nav-in { padding-inline: 1rem; }
.nav-explore { display: none; } /* the logo already links to the Gitea home */
}
</style>
</head>
<body>
<!-- Glyphs: Tabler Icons outline (MIT), the set the dashboard sprite uses; stroke and size come from the
.tile .icon and .nav-item rules. #fw-logo is the fhirworx logo (assets/icons/logo.svg), inlined by build.py. -->
<svg class="sprite" aria-hidden="true" focusable="false">
<!--__FW_LOGO__-->
<symbol id="i-home" viewBox="0 0 24 24"><path d="M5 12l-2 0l9 -9l9 9l-2 0" /><path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7" /><path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6" /></symbol>
<symbol id="i-stethoscope" viewBox="0 0 24 24"><path d="M6 4h-1a2 2 0 0 0 -2 2v3.5a5.5 5.5 0 0 0 11 0v-3.5a2 2 0 0 0 -2 -2h-1" /><path d="M8 15a6 6 0 1 0 12 0v-3" /><path d="M11 3v2" /><path d="M6 3v2" /><path d="M18 10a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /></symbol>
<symbol id="i-versions" viewBox="0 0 24 24"><path d="M10 7a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2l0 -10" /><path d="M7 7l0 10" /><path d="M4 8l0 8" /></symbol>
<symbol id="i-timeline" viewBox="0 0 24 24"><path d="M4 16l6 -7l5 5l5 -6" /><path d="M14 14a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M9 9a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M3 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 8a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></symbol>
<symbol id="i-scale" viewBox="0 0 24 24"><path d="M7 20l10 0" /><path d="M6 6l6 -1l6 1" /><path d="M12 3l0 17" /><path d="M9 12l-3 -6l-3 6a3 3 0 0 0 6 0" /><path d="M21 12l-3 -6l-3 6a3 3 0 0 0 6 0" /></symbol>
<symbol id="i-chart-dots" viewBox="0 0 24 24"><path d="M3 3v18h18" /><path d="M7 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M17 7a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M12 15a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M10.16 10.62l2.34 2.88" /><path d="M15.088 13.328l2.837 -4.586" /></symbol>
<symbol id="i-coin" viewBox="0 0 24 24"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /><path d="M14.8 9a2 2 0 0 0 -1.8 -1h-2a2 2 0 1 0 0 4h2a2 2 0 1 1 0 4h-2a2 2 0 0 1 -1.8 -1" /><path d="M12 7v10" /></symbol>
<symbol id="i-messages" viewBox="0 0 24 24"><path d="M21 14l-3 -3h-7a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1h9a1 1 0 0 1 1 1v10" /><path d="M14 15v2a1 1 0 0 1 -1 1h-7l-3 3v-10a1 1 0 0 1 1 -1h2" /></symbol>
<symbol id="i-books" viewBox="0 0 24 24"><path d="M5 5a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -14" /><path d="M9 5a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -14" /><path d="M5 8h4" /><path d="M9 16h4" /><path d="M13.803 4.56l2.184 -.53c.562 -.135 1.133 .19 1.282 .732l3.695 13.418a1.02 1.02 0 0 1 -.634 1.219l-.133 .041l-2.184 .53c-.562 .135 -1.133 -.19 -1.282 -.732l-3.695 -13.418a1.02 1.02 0 0 1 .634 -1.219l.133 -.041" /><path d="M14 9l4 -1" /><path d="M16 16l3.923 -.98" /></symbol>
<symbol id="i-moon" viewBox="0 0 24 24"><path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008" /></symbol>
<symbol id="i-sun" viewBox="0 0 24 24"><path d="M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7" /></symbol>
</svg>
<header class="nav"><div class="nav-in">
<span class="brand-group"><a class="brand" href="https://git./*__DOMAIN__*//"><svg role="img" aria-label="fhirworx logo"><use href="#fw-logo"/></svg>fhirworx</a><a class="app" href="/" aria-current="page">lex</a></span>
<a class="nav-item nav-explore" href="https://git./*__DOMAIN__*//explore/repos">Explore</a>
<span class="nav-item on">Dossier</span>
<span class="nav-sp"></span>
<span class="nav-item nav-note">Policy evidence &middot; CMS payment and quality</span>
<button class="nav-item nav-theme" type="button" id="theme-btn" aria-pressed="false" title="Switch to the fhirworx dark palette"><svg aria-hidden="true"><use href="#i-moon"/></svg><span>Dark</span></button>
</div></header>
<div class="page">
<div class="masthead">
<div class="rule-line"></div>
<div class="masthead-row">
<div class="masthead-brand"><svg class="masthead-logo" role="img" aria-label="fhirworx logo"><use href="#fw-logo"/></svg><h1>lex</h1></div>
<span class="masthead-eyebrow">lex./*__DOMAIN__*/</span>
</div>
<div class="masthead-body">
<p class="tagline">Latin for <em>law</em>. A legal-epidemiology workbench for CMS payment and quality rules: for each code family it traces what the rules said, how they changed, who argued for and against each change, and what happened after&nbsp;— to inform predictions, policy work and comment letters.</p>
<div id="status"><div class="health health-unknown" role="status"><span class="health-k">Loading</span><span class="health-v">Reading the stored dossiers…</span></div></div>
</div>
<div class="rule-line-thin"></div>
</div>
<div class="shell">
<aside class="rail" id="rail" aria-label="The book">
<label class="eyebrow" for="q">Search the book</label>
<input id="q" type="search" placeholder="Family, code or name" autocomplete="off">
<details id="toc-d" open>
<summary><h2>The book</h2></summary>
<div id="toc"></div>
</details>
</aside>
<main class="main" id="main" data-ready="">
<div id="mast"></div>
<div class="tabs-wrap"><nav class="tabs" id="tabs" aria-label="Views"></nav></div>
<section class="view" id="view" aria-live="polite" aria-busy="true"><p class="muted">Loading…</p><noscript><div class="panel warn"><h3>JavaScript is off</h3><p>lex reads the stored dossiers in the browser, so it needs JavaScript.</p></div></noscript></section>
</main>
<aside class="drawer" id="drawer" aria-label="Evidence" aria-live="polite"></aside>
</div>
<footer class="ftr"><span class="site">lex./*__DOMAIN__*/</span> &mdash; legal-epidemiology workbench &mdash; app /*__VERSION__*/ &mdash; part of <a href="https://dashboard./*__DOMAIN__*//">fhirworx</a></footer>
</div>
<div class="tip" id="tip" hidden></div>
<!-- The app: ES modules served from /assets/dossier/, no third-party scripts. ?v= is the modules' content hash, stamped by build.py. -->
<script type="module" src="/assets/dossier/app.js?v=/*__VERSION__*/"></script>
</body>
</html>