/* ============================================================
   Hospital deck additions on top of deck.css.
   Status colours follow the Continuity mockup:
   in date (ok) · due, window found (due) · closes unless you act (close)
   · in use without proof (unp) · report owed (owed)
   ============================================================ */
:root { --gap: #7c4ddb; --owed: #2859e1; }

/* big numbers */
.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 26px; }
.stats4 .card { padding: 22px 22px 18px; }
.stats4 .n { font-size: 46px; font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--blue); }
.stats4 .l { font-size: 16px; color: var(--dmid); margin-top: 8px; line-height: 1.35; }

/* what one OR depends on */
.deps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: 26px; hyphens: auto; -webkit-hyphens: auto; }
.deps .card { padding: 16px 14px 14px; border-radius: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 320px; }
.deps .card.hot { border: 2px solid var(--blue); }
.deps b { font-size: 21px; line-height: 1.2; }
.deps p { font-size: 14px; color: var(--dmid); line-height: 1.4; }
.deps .who { margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--mid); line-height: 1.38; }
.deps .lapse { font-size: 16px; font-weight: 600; color: var(--bad); }

/* continuity grid */
.cg { width: 100%; border-collapse: separate; border-spacing: 4px 3px; font-size: 12px; margin-top: 4px; }
.cg th { text-align: left; font-weight: 600; color: var(--mid); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 0 6px 4px; vertical-align: bottom; }
.cg th small { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 10.5px; }
.cg td { padding: 5px 8px; border-radius: 8px; line-height: 1.22; vertical-align: middle; white-space: nowrap; }
.cg td.a { font-weight: 600; font-size: 13px; padding-left: 2px; }
.cg td.a small { display: block; font-weight: 400; color: var(--mid); font-size: 10.5px; }
.cg td b { font-weight: 600; display: block; }
.cg td small { color: var(--mid); font-size: 10.5px; }
.cg .ok { color: var(--ok); }
.cg .ok b { font-weight: 500; }
.cg .due { background: #fdf3df; color: #a8700a; }
.cg .close { background: #fbe6e8; color: var(--bad); }
.cg .unp { background: #efe8fc; color: var(--gap); }
.cg .owed { background: var(--tint); color: var(--owed); }
.cg .na { color: #c3cad6; }
.cg tr.hot td.a { color: var(--blue); }
.legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--dmid); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* "what Cue found": evidence trail with sources */
.trail { display: flex; flex-direction: column; gap: 0; }
.trail > div { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 7px 0; position: relative; }
.trail > div:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 33px; bottom: -3px; width: 2px; background: var(--line); }
.trail i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 700; background: #e9f8ef; color: var(--ok); }
.trail i.w { background: #fdf3df; color: #a8700a; }
.trail i.x { background: #fbe6e8; color: var(--bad); }
.trail b { font-weight: 500; font-size: 15.5px; line-height: 1.35; display: block; }
.trail .src { font-size: 12px; color: var(--blue); display: inline-flex; gap: 6px; align-items: center; margin-top: 2px; }
.trail .src svg { font-size: 13px; }
.has-dark-background .trail > div:not(:last-child)::after { background: rgba(255, 255, 255, .15); }
.has-dark-background .trail .src { color: #9fb6ff; }

/* the window: three jobs, one closure */
.win { background: var(--ink); color: #fff; border-radius: 22px; padding: 20px 22px; }
.win .kick { color: var(--lime); margin-bottom: 6px; }
.win h3 { font-size: 24px; margin-bottom: 4px; }
.win .sub { font-size: 14px; color: rgba(255, 255, 255, .65); }
.win ul { list-style: none; padding: 0; margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.win li { margin: 0; display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 15.5px; line-height: 1.35; }
.win li svg { color: var(--lime); font-size: 20px; margin-top: 1px; }
.win li small { display: block; color: rgba(255, 255, 255, .55); font-size: 12.5px; }
.win .due-by { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 14.5px; }
.win .due-by b { color: var(--lime); }

/* finding cards */
.fcard { border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.fcard .hd { display: flex; align-items: center; gap: 10px; }
.fcard .hd b { font-size: 19px; }
.fcard .hd .chip { margin-left: auto; }
.fcard p { font-size: 19px; line-height: 1.5; color: var(--dmid); }
.fcard .srcs2 { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.fcard .tbl td { font-size: 19px; padding-top: 14px; padding-bottom: 14px; }
.fcard.close { border-left: 5px solid var(--bad); }
.fcard.unp { border-left: 5px solid var(--gap); }
.fcard.owed { border-left: 5px solid var(--owed); }
.fcard.due { border-left: 5px solid var(--warn); }
.chip.close { background: #fbe6e8; border-color: transparent; color: var(--bad); }
.chip.unp { background: #efe8fc; border-color: transparent; color: var(--gap); }
.chip.owed { background: var(--tint); border-color: transparent; color: var(--owed); }
.chip.due { background: #fdf3df; border-color: transparent; color: #a8700a; }
.chip.okc { background: #e9f8ef; border-color: transparent; color: var(--ok); }

/* big fact inside a finding card */
.fact { font-size: 54px; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; color: var(--ink); }
.fact small { display: block; font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--mid); margin-top: 4px; }
.fcard.owed .fact { color: var(--owed); }
.fcard.unp .fact { color: var(--gap); }

/* more cases: 3 × 2 tiles */
.ex { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.ex > div { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px; min-height: 205px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.ex .hd { display: flex; align-items: center; gap: 8px; }
.ex .hd b { font-size: 19px; }
.ex .hd .chip { margin-left: auto; }
.ex p { font-size: 17px; color: var(--dmid); line-height: 1.4; }
.ex > .due { border-left: 5px solid var(--warn); }
.ex > .due .fact { color: #a8700a; }
.ex > .close { border-left: 5px solid var(--bad); }
.ex > .close .fact { color: var(--bad); }
.ex > .owed { border-left: 5px solid var(--owed); }
.ex > .owed .fact { color: var(--owed); }

/* questions Cue answers */
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 30px; margin-top: 40px; }
.qa > div { display: flex; flex-direction: column; gap: 8px; }
.qa .q { align-self: flex-start; background: #e3e7ee; color: var(--ink); border-radius: 18px 18px 18px 4px; padding: 14px 20px; font-size: 22px; font-weight: 500; }
.qa .a { align-self: flex-end; background: var(--ink); color: #fff; border-radius: 18px 18px 4px 18px; padding: 16px 20px; font-size: 21px; line-height: 1.4; max-width: 95%; }
.qa .a b { color: var(--lime); }
.qa .a .src { display: flex; gap: 6px; align-items: center; font-size: 14px; color: #9fb6ff; margin-top: 6px; }

/* sterile supply fan-out */
svg.fan { width: 100%; height: auto; font-family: Poppins, sans-serif; overflow: visible; }
svg.fan .box { fill: #fff; stroke: var(--line); stroke-width: 1.5; }
svg.fan .box.bad { fill: #fbe6e8; stroke: var(--bad); }
svg.fan .box.hub { fill: var(--ink); stroke: none; }
svg.fan .t { font-size: 15px; font-weight: 600; fill: var(--ink); }
svg.fan .s { font-size: 12px; fill: var(--mid); }
svg.fan .tw { fill: #fff; }
svg.fan .sw { fill: rgba(255, 255, 255, .65); font-size: 12px; }
svg.fan .bt { fill: var(--bad); }
svg.fan .ln { stroke: var(--bad); stroke-width: 2; fill: none; }
svg.fan .ln.soft { stroke: #c9d0dc; stroke-dasharray: 4 5; }

/* real-world case */
.case { background: var(--ink); color: #fff; border-radius: 20px; padding: 18px 20px; }
.case .kick { color: var(--lime); margin-bottom: 6px; font-size: 12.5px; }
.case p { font-size: 15.5px; line-height: 1.45; color: rgba(255, 255, 255, .85); }
.case a { color: #9fb6ff; font-size: 12.5px; }

/* why now */
.steps.s4h .step p { font-size: 14.5px; }
.steps.big .step h3 { font-size: 26px; }
.steps.big .step p { font-size: 19px; }
.steps.big .step .when { font-size: 16px; }
.steps.s4h .step .when { font-size: 13px; font-weight: 600; color: var(--blue); }

/* rule pack */
.rp { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.rp > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 13px; display: flex; flex-direction: column; gap: 3px; }
.rp b { font-size: 14.5px; line-height: 1.25; }
.rp span { font-size: 12px; color: var(--mid); line-height: 1.35; }
.rp em { font-style: normal; font-size: 11.5px; color: var(--bad); font-weight: 600; margin-top: auto; padding-top: 4px; }
.rp > div.own { background: var(--lime); border-color: var(--lime); }
.rp > div.own span { color: var(--ink); }

/* app ratings */
.apps { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.apps > div { display: grid; grid-template-columns: 210px 130px 1fr; gap: 20px; align-items: center; padding: 13px 18px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); }
.apps > div.top { border: 2px solid var(--lime); background: rgba(226, 245, 82, .08); }
.apps b { font-size: 20px; }
.apps p { font-size: 20px; line-height: 1.4; color: rgba(255, 255, 255, .82); }
.apps p small { display: block; color: rgba(255, 255, 255, .5); font-size: 12.5px; margin-top: 2px; }
.stars { color: var(--lime); font-size: 20px; letter-spacing: 2px; white-space: nowrap; }
.stars s { text-decoration: none; color: rgba(255, 255, 255, .22); }

/* what stays where */
.stay { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.stay .chip { font-size: 14px; padding: 6px 12px; }
.outs4 .card p { font-size: 13px; color: var(--mid); line-height: 1.35; }

/* short-bullet comparison */
.cmp.big ul { font-size: 23px; }
.cmp.big li { margin: 16px 0; }

/* questions */
.qs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.qs .card { display: grid; grid-template-columns: 46px 1fr; gap: 16px; align-items: center; padding: 30px 24px; }
.qs b { font-size: 22px; display: block; margin-bottom: 4px; }
.qs p { font-size: 14.5px; color: var(--dmid); line-height: 1.45; }

/* sources */
.srclist { columns: 2; column-gap: 40px; font-size: 13.5px; margin-top: 10px; }
.srclist li { margin: 0 0 7px; break-inside: avoid; }
.srclist a { color: var(--blue); text-decoration: none; }
