@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 200 800; font-display: swap; src: url(fonts/newsreader-latin-standard-normal.woff2) format("woff2"); }
:root {
  color-scheme: light;
  --page: #edf1f4;
  --surface: #ffffff;
  --ink: #142033;
  --ink-2: #485467;
  --muted: #7a8494;
  --hair: #dce2e8;
  --hair-2: #c9d1da;
  --accent: #1f5f8b;
  --accent-wash: #e3edf5;
  --up: #0b6b3a;
  --down: #a8321f;
  --y26: #2a78d6;
  --y25: #eb6834;
  --y24: #1baf7a;
  --serif: "Newsreader", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-lg: 14px;
  --r-sm: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 15px/1.5 var(--sans); }
[hidden] { display: none !important; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* sign in */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 32px 28px; }
.login-title { font: 500 34px/1.1 var(--serif); margin: 0 0 8px; }
.login-copy { color: var(--ink-2); margin: 0 0 20px; }
.field-label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 6px; }
input[type=email] { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--hair-2); border-radius: var(--r-sm); margin-bottom: 14px; }
.btn { width: 100%; font: 600 15px var(--sans); color: #fff; background: var(--accent); border: 0; border-radius: var(--r-sm); padding: 11px 14px; cursor: pointer; }
.btn:hover { background: #184e74; }
.login-msg { min-height: 1.5em; margin: 14px 0 0; color: var(--ink-2); font-size: 14px; }

/* shell */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 24px 18px 18px; border-right: 1px solid var(--hair); background: var(--surface); }
.brand { font: 500 24px/1 var(--serif); padding: 0 10px 18px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: var(--r-sm); font-weight: 500; }
.nav a:hover { background: var(--page); color: var(--ink); }
.nav a[aria-current=page] { background: var(--accent-wash); color: var(--accent); }
.nav-group { margin: 14px 10px 3px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.page-head .lede, .page-head .page-title { flex: 1 1 420px; }
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.control-label { font-size: 13px; color: var(--muted); }
select.pick { font: 500 14px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--hair-2); border-radius: 99px; padding: 6px 30px 6px 12px; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.site-note { font-size: 13px; color: var(--muted); margin: -20px 0 24px; }
.cmp th.grp { text-align: center; color: var(--ink); border-bottom: 0; padding-bottom: 0; }
td.sub-row { color: var(--ink-2); padding-left: 22px; }
.bar-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-cell i { display: inline-block; height: 6px; border-radius: 3px; background: var(--accent); opacity: 0.75; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--page); color: var(--ink-2); margin-left: 6px; vertical-align: 1px; }
.figs.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* highlights */
.moves { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.move { background: var(--surface); border: 1px solid var(--hair); border-left: 4px solid var(--hair-2); border-radius: var(--r-sm); padding: 14px 16px; }
.move.good { border-left-color: var(--up); }
.move.bad { border-left-color: var(--down); }
.move-label { font-size: 13px; color: var(--ink-2); margin: 0 0 4px; }
.move-main { font: 500 20px/1.25 var(--sans); margin: 0 0 4px; }
.move-note { font-size: 13px; color: var(--muted); margin: 0; }
.move a { font-size: 13px; }
.range { white-space: nowrap; }
.method { color: var(--ink-2); font-size: 14px; max-width: 80ch; }
.method li { margin-bottom: 6px; }
tr.mine td { background: var(--accent-wash); }
/* upload */
.upload-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.upload-form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.upload-form input[type=file], .upload-form input[type=month], .upload-form select { width: 100%; font: inherit; padding: 9px 10px; border: 1px solid var(--hair-2); border-radius: var(--r-sm); background: var(--surface); }
.upload-form .btn { width: auto; padding: 10px 18px; }
.upload-form .full { grid-column: 1 / -1; }
.progress { height: 6px; border-radius: 3px; background: var(--page); overflow: hidden; width: 140px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.progress i { display: block; height: 100%; background: var(--accent); }
.status.warn { background: #fbeae6; color: var(--down); }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; font-size: 13px; color: var(--muted); }
.asof { margin: 0 0 8px; }
.link-btn { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; }

.main { min-width: 0; padding: 40px 48px 64px; max-width: 1180px; width: 100%; outline: none; }
.loading { color: var(--muted); }

/* page heading: the one bold element is the plain-language summary sentence */
.lede { font: 400 clamp(26px, 3.1vw, 38px)/1.22 var(--serif); letter-spacing: -0.01em; max-width: 30ch; margin: 0 0 8px; }
.lede strong { font-weight: 500; }
.sub { color: var(--ink-2); margin: 0 0 32px; max-width: 70ch; }
.page-title { font: 500 30px/1.15 var(--serif); margin: 0 0 6px; }

/* figures row */
.figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 28px; }
.fig { background: var(--surface); padding: 18px 20px; }
.fig-label { font-size: 13px; color: var(--ink-2); margin: 0 0 6px; }
.fig-value { font: 500 26px/1.15 var(--sans); margin: 0; cursor: help; }
.fig-delta { font-size: 13px; margin: 6px 0 0; color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }

/* panels */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 20px 22px 16px; margin-bottom: 20px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel h2 { font: 600 15px/1.3 var(--sans); margin: 0; }
.panel-note { font-size: 13px; color: var(--muted); margin: 0; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.chart { position: relative; height: 260px; }
.chart.tall { height: 300px; }

/* segmented toggle */
.seg { display: inline-flex; border: 1px solid var(--hair-2); border-radius: 99px; padding: 2px; }
.seg button { font: 500 13px var(--sans); color: var(--ink-2); background: none; border: 0; border-radius: 99px; padding: 5px 12px; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--accent-wash); color: var(--accent); }
.legend-row { margin: -4px 0 10px; }
.chart-note { font-size: 13px; color: var(--ink-2); margin: 12px 0 2px; max-width: 90ch; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: right; font-weight: 500; color: var(--ink-2); font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--hair-2); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
th button[aria-sort] { color: var(--ink); }
td { text-align: right; padding: 10px; border-bottom: 1px solid var(--hair); font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: #f6f8fa; }
tbody tr[aria-selected=true] td { background: var(--accent-wash); }
td .who { font-weight: 500; }
tfoot tr.total td { font-weight: 600; border-top: 1.5px solid var(--hair-2); border-bottom: 0; }
td.strong { font-weight: 600; }
.pct { color: var(--muted); }
.note-inline { display: block; font-size: 12px; color: var(--muted); }
.explain-list { margin: 0; padding-left: 18px; color: var(--ink-2); max-width: 95ch; }
.explain-list li { margin: 0 0 6px; }
td .role { display: block; font-size: 12px; color: var(--muted); }
.num-src { cursor: help; }
.empty { color: var(--muted); }

/* physician detail */
.figs.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.figs.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.back { display: inline-block; margin-bottom: 14px; font-size: 14px; }

/* packages */
.status { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--page); color: var(--ink-2); }
.status.ok { background: #e2f1e8; color: var(--up); }
.missing { margin: 0; padding-left: 18px; color: var(--ink-2); }

table.dense { font-size: 13.5px; }
table.dense th, table.dense td { padding: 9px 7px; }
.main { padding-bottom: 96px; }
/* assistant */
.ask-fab { position: fixed; right: 24px; bottom: 24px; z-index: 20; font: 600 15px var(--sans); color: #fff; background: var(--accent); border: 0; border-radius: 99px; padding: 12px 22px; box-shadow: 0 6px 20px rgba(20, 32, 51, 0.22); cursor: pointer; }
.ask-fab:hover { background: #184e74; }
.ask { position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; width: min(440px, 100vw); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--hair); box-shadow: -8px 0 30px rgba(20, 32, 51, 0.12); }
.ask-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--hair); }
.ask-title { font: 500 20px/1.2 var(--serif); margin: 0; }
.ask-sub { font-size: 12px; color: var(--muted); margin: 3px 0 0; }
.ask-actions { display: flex; gap: 4px; flex-shrink: 0; }
.ask-btn { font: 500 13px var(--sans); color: var(--ink-2); background: none; border: 1px solid var(--hair-2); border-radius: 99px; padding: 5px 11px; cursor: pointer; }
.ask-btn:hover { background: var(--page); }
.ask-list { border-bottom: 1px solid var(--hair); max-height: 40vh; overflow-y: auto; padding: 6px 8px; }
.ask-list button { display: block; width: 100%; text-align: left; font: 14px/1.35 var(--sans); color: var(--ink); background: none; border: 0; border-radius: var(--r-sm); padding: 8px 12px; cursor: pointer; }
.ask-list button:hover, .ask-list button[aria-current=true] { background: var(--accent-wash); }
.ask-list small { display: block; color: var(--muted); font-size: 12px; }
.ask-log { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { font-size: 14.5px; line-height: 1.55; max-width: 100%; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--accent-wash); color: var(--ink); padding: 9px 13px; border-radius: 14px 14px 4px 14px; max-width: 85%; white-space: pre-wrap; }
.msg.assistant p { margin: 0 0 8px; }
.msg.assistant ul, .msg.assistant ol { margin: 0 0 8px; padding-left: 20px; }
.msg.assistant li { margin-bottom: 4px; }
.msg.assistant table { font-size: 13px; margin: 4px 0 10px; }
.msg.assistant th, .msg.assistant td { padding: 5px 6px; white-space: normal; overflow-wrap: normal; word-break: normal; }
.msg.assistant th:not(:first-child), .msg.assistant td:not(:first-child) { white-space: nowrap; }
.msg.assistant td:first-child { min-width: 9em; }
@media (max-width: 560px) {
  #ask-sub { display: none; }
  .msg.assistant table { font-size: 12.5px; }
  .msg.assistant th:not(:first-child) { white-space: normal; }
  .msg.assistant td:first-child { min-width: 7em; }
  .msg.assistant th, .msg.assistant td { padding: 5px 4px; }
}
.msg.assistant .tbl { overflow-x: auto; }
.msg .where { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.msg.thinking { color: var(--muted); font-style: italic; }
.ask-empty { color: var(--ink-2); font-size: 14px; }
.ask-empty button { display: block; text-align: left; font: 14px var(--sans); color: var(--accent); background: var(--page); border: 0; border-radius: var(--r-sm); padding: 8px 12px; margin: 6px 0; cursor: pointer; width: 100%; }
.ask-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px 16px; border-top: 1px solid var(--hair); }
.ask-form textarea { flex: 1; font: 15px/1.4 var(--sans); padding: 9px 11px; border: 1px solid var(--hair-2); border-radius: var(--r-sm); resize: none; max-height: 160px; }
.ask-form .btn { width: auto; padding: 10px 16px; }
@media (min-width: 1400px) { body.ask-open .shell { padding-right: 440px; } }

.saved { padding: 6px 8px 10px; }
.saved-h { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: 10px 4px 6px; }
.saved-row { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; font-size: 13.5px; padding: 6px 4px; border-bottom: 1px solid var(--hair); }
.saved-row .ask-btn { flex-shrink: 0; padding: 3px 9px; font-size: 12px; }

/* what it means */
.takeaway { background: var(--accent-wash); border-radius: var(--r-sm); padding: 9px 14px; margin: 4px 0 18px; font-size: 14.5px; color: var(--ink); max-width: 90ch; }
.takeaway-k { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); margin-right: 6px; }
.takeaway a { font-size: 13px; margin-left: 4px; }
.utabs { margin: 0 0 20px; flex-wrap: wrap; border-radius: 18px; }
.lvl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: 99px; white-space: nowrap; }
.lvl .dots { letter-spacing: 1px; font-size: 10px; }
.lvl-fact { background: #dfe9f3; color: #17496c; }
.lvl-likely { background: #eaf0ea; color: #2c5d3a; }
.lvl-possible { background: #f6eedf; color: #7a5310; }
.lvl-q { background: var(--page); color: var(--ink-2); padding: 2px 9px; }
.lvl-legend { display: grid; gap: 8px; padding: 10px 2px 4px; font-size: 13.5px; color: var(--ink-2); }
.lvl-legend > div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: baseline; }
.lvl-help { margin: 0 0 18px; font-size: 14px; }
.lvl-help summary, .claim summary { cursor: pointer; color: var(--accent); }
.istatus { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); padding: 8px 12px; border-radius: var(--r-sm); margin-bottom: 18px; background: var(--surface); border: 1px solid var(--hair); }
.istatus.draft { border-color: #e7d3ae; background: #fbf6ec; }
.istatus-actions { display: flex; gap: 6px; }
.reading-head { margin: 0 0 14px; }
.reading-headline { font: 400 clamp(22px, 2.6vw, 30px)/1.25 var(--serif); margin: 0 0 8px; max-width: 40ch; }
.reading-summary { color: var(--ink-2); margin: 0; max-width: 75ch; }
.claims { list-style: none; margin: 0; padding: 0; }
.claim { padding: 12px 0 14px; border-top: 1px solid var(--hair); }
.claim:first-child { border-top: 0; padding-top: 2px; }
.claim-top { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.claim-page { font-size: 12.5px; }
.claim-text { font-size: 15.5px; margin: 0 0 6px; max-width: 80ch; }
.claim-why { font-size: 14px; color: var(--ink-2); margin: 0 0 6px; max-width: 80ch; }
.claim details { font-size: 13.5px; color: var(--ink-2); max-width: 80ch; }
.claim details p { margin: 6px 0; }
.claim-figs { color: var(--muted); }
.qs { margin: 0; padding-left: 20px; }
.qs li { margin-bottom: 12px; }
.q { margin: 0 0 2px; font-weight: 500; }
.q-why { margin: 0; font-size: 14px; color: var(--ink-2); }
.outside p { max-width: 85ch; margin: 0 0 8px; }
.outside .panel-head h2 { flex: 1 1 300px; }
.sources { font-size: 13px; }
.fine { font-size: 12.5px; color: var(--muted); max-width: 85ch; }
.flow { margin: 0; padding: 0; list-style: none; counter-reset: f; display: grid; gap: 2px; }
.flow li { counter-increment: f; position: relative; padding: 4px 0 10px 40px; }
.flow li::before { content: counter(f); position: absolute; left: 0; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-wash); color: var(--accent); font-weight: 600; font-size: 13px; display: grid; place-items: center; }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 12.5px; top: 34px; bottom: -2px; width: 1px; background: var(--hair-2); }
.flow p { margin: 0; color: var(--ink-2); max-width: 80ch; }
.flow .flow-h, .habits .flow-h { color: var(--ink); font-weight: 600; margin: 0 0 2px; }
.habits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
.habits p { margin: 0; color: var(--ink-2); font-size: 14px; }
.terms { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 8px 20px; margin: 0; }
.terms dt { font-weight: 600; }
.terms dd { margin: 0; color: var(--ink-2); }
/* presenting mode */
.present-btn { font: 500 13px var(--sans); color: var(--ink-2); background: none; border: 1px solid var(--hair-2); border-radius: 99px; padding: 5px 12px; cursor: pointer; margin-bottom: 12px; }
.present-btn[aria-pressed=true] { background: #fbeee0; border-color: #e9b98a; color: #8a4b12; }
.nav-present { display: none; }
.present-only { display: none; }
body.presenting .present-only { display: block; }
body.presenting .personal, body.presenting .ask-fab, body.presenting .ask { display: none !important; }
body.presenting tr.mine td { background: none; }
body.presenting .main::before { content: "Presenting mode: personal pay, the Physicians page and the finance-director questions are hidden."; display: block; font-size: 13px; color: #8a4b12; background: #fbeee0; border-radius: var(--r-sm); padding: 7px 12px; margin-bottom: 16px; }

/* tooltip */
.tip { position: fixed; z-index: 10; max-width: 280px; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.4; padding: 8px 10px; border-radius: 6px; pointer-events: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; z-index: 5; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--hair); overflow-x: auto; }
  .brand { padding: 0; font-size: 20px; white-space: nowrap; }
  .nav { flex-direction: row; align-items: center; }
  .nav-group { display: none; }
  .nav a { white-space: nowrap; padding: 7px 10px; }
  .sidebar-foot { display: none; }
  .main { padding: 24px 16px 48px; }
  .figs, .figs.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figs.five .fig:last-child { grid-column: span 2; }
  .grid-2 { grid-template-columns: 1fr; }
  .moves { grid-template-columns: 1fr; }
  .fig-value { font-size: 22px; }
  .figs.three { grid-template-columns: minmax(0, 1fr); }
  .fig-value .range { white-space: normal; }
  .upload-form { grid-template-columns: 1fr; }
  .nav-present { display: inline-block; margin: 0 0 0 6px; white-space: nowrap; }
  .habits, .terms { grid-template-columns: 1fr; }
  .terms dd { margin-bottom: 6px; }
  .lvl-legend > div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 560px) { .brand { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
body.presenting .claim.personal + .claim:not(.personal) { border-top: 0; padding-top: 2px; }
