/* INT Builder (calculator #9). The monolith's inline <style> block, taken at cb02cf0 and moved to a file because the
 * Content Security Policy refuses inline style. Class names are the source's. What is new: every `style=""` the source's
 * markup and script carried is a class here (the IMD ramp is ten classes, `.int-d1` to `.int-d10`), the page wrapper is
 * scoped so the variables cannot leak into the shell, and the controls have visible focus. */
.int-wrap { --ph-border:#e6ebf1; --ph-ink:#0f172a; --ph-mut:#475569; --ph-soft:#56657a; --ph-theme:#0d5bb8; --ph-navy:#0b2545; --ph-blue-soft:#eaf2fc;
            max-width:none; margin:0; padding:0 0 48px; color:var(--ph-ink); }   /* the shell's .content-inner (1560px, its own padding) is the page width, as on Population & Inequalities */
.int-wrap button, .int-wrap input { font:inherit; }
.int-wrap button:focus-visible, .int-wrap input:focus-visible, .int-wrap a:focus-visible, .int-wrap .epick-chip:focus-visible { outline:3px solid #f59e0b; outline-offset:2px; }
.int-title { font-size:26px; font-weight:800; margin:0 0 6px; }
.ph-lead { color:var(--ph-mut); font-size:15px; margin:0 0 16px; max-width:880px; }
.ph-attr { background:#f6f8fc; border:1px solid var(--ph-border); border-left:3px solid var(--ph-theme); border-radius:8px; padding:13px 17px; font-size:13px; color:#374151; margin-bottom:18px; }
.ph-attr ul { margin:6px 0; padding-left:20px; }
.ph-ico { width:1.1em; height:1.1em; vertical-align:-.18em; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.ph-warn { display:flex; gap:8px; align-items:center; background:#fff7ed; border:1px solid #fed7aa; color:#9a3412; border-radius:8px; padding:12px 14px; margin-bottom:14px; font-size:13.5px; }
.ph-card { background:#fff; border:1px solid var(--ph-border); border-radius:12px; padding:20px; margin-bottom:18px; box-shadow:0 1px 2px rgba(15,23,42,.04); }
.ph-card[hidden], .int-panel[hidden], .ph-empty[hidden], [hidden] { display:none !important; }
.ph-h { font-size:16px; font-weight:800; color:var(--ph-ink); margin:0 0 3px; }
.ph-h .ph-ico { color:var(--ph-theme); }
.ph-h-aside { font-weight:600; color:var(--ph-mut); }
.ph-sub { font-size:13px; color:var(--ph-mut); margin:0 0 14px; }
.ph-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; }
.ph-kpi { border:1px solid var(--ph-border); border-radius:10px; padding:14px 16px; }
.ph-kpi .k-l { font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--ph-mut); }
.ph-kpi .k-v { font-size:26px; font-weight:800; color:var(--ph-ink); margin-top:4px; }
.ph-kpi .k-d { font-size:12px; color:var(--ph-mut); margin-top:2px; }
.ph-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:18px; } @media(max-width:860px){.ph-grid2{grid-template-columns:1fr;}}
.ph-chart-box { position:relative; width:100%; }
.int-h170 { height:170px; } .int-h200 { height:200px; } .int-h240 { height:240px; } .int-h260 { height:260px; } .int-h300 { height:300px; } .int-h330 { height:330px; } .int-h360 { height:360px; }
.int-scroll { position:relative; overflow-x:auto; }
table.ph-t { width:100%; border-collapse:collapse; font-size:13px; }
table.ph-t th { text-align:left; font-size:11px; font-weight:700; text-transform:uppercase; color:var(--ph-mut); padding:8px 10px; border-bottom:2px solid var(--ph-border); }
table.ph-t td { padding:8px 10px; border-bottom:1px solid #f1f4f8; }
.num { text-align:right; font-variant-numeric:tabular-nums; }
#int-map { height:460px; border-radius:12px; border:1px solid var(--ph-border); isolation:isolate; }
.ph-legend { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; font-size:11.5px; color:var(--ph-mut); align-items:center; }
.ph-legend i { width:14px; height:14px; border-radius:3px; display:inline-block; }
.ph-empty { text-align:center; color:var(--ph-mut); padding:60px 20px; font-size:15px; }
.ph-empty .ph-ico { width:34px; height:34px; color:#cbd5e1; }
.ph-msg { font-size:13px; color:#b91c1c; margin-top:10px; }
.leaflet-tooltip.int-tt { font-size:12px; }
.int-d1 { background:#7f1d1d; } .int-d2 { background:#b91c1c; } .int-d3 { background:#dc2626; } .int-d4 { background:#ea580c; } .int-d5 { background:#f59e0b; }
.int-d6 { background:#eab308; } .int-d7 { background:#a3e635; } .int-d8 { background:#4ade80; } .int-d9 { background:#22c55e; } .int-d10 { background:#16a34a; }
/* INT needs-assessment blocks */
.ph-int-verdict { display:flex; gap:11px; align-items:flex-start; padding:12px 14px; border-radius:10px; margin:4px 0 14px; font-size:13px; line-height:1.45; }
.ph-int-verdict .badge { font-weight:800; white-space:nowrap; padding:3px 9px; border-radius:7px; font-size:12px; }
.ph-int-verdict.fit { background:#f0fdf4; } .ph-int-verdict.fit .badge { background:#15803d; color:#fff; }
.ph-int-verdict.below { background:var(--ph-blue-soft); } .ph-int-verdict.below .badge { background:#0d5bb8; color:#fff; }
.ph-int-verdict.above { background:#fff7ed; } .ph-int-verdict.above .badge { background:#c2410c; color:#fff; }
.ph-int-cohorts { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:11px; }
.ph-int-coh { border:1px solid var(--ph-border); border-radius:10px; padding:12px 13px; }
.ph-int-coh .c-v { font-size:23px; font-weight:800; color:var(--ph-navy); } .ph-int-coh.bad .c-v { color:#b91c1c; }
.ph-int-coh .c-p { font-size:12px; font-weight:700; color:var(--ph-theme); } .ph-int-coh .c-l { font-size:12px; font-weight:700; margin-top:3px; } .ph-int-coh .c-d { font-size:11px; color:var(--ph-soft); line-height:1.3; margin-top:2px; }
.ph-practice-pill { display:inline-block; font-size:11px; background:var(--ph-blue-soft); color:var(--ph-navy); border-radius:20px; padding:3px 10px; margin:3px 4px 0 0; }
.int-practices { margin-top:6px; }
/* priority-LSOA drill-down (drivers + practices serving it) */
.int-lsoa-name { font-weight:600; }
.int-lsoa-sub { font-size:11px; color:var(--ph-soft); }
.int-drivers { display:flex; flex-wrap:wrap; gap:5px; margin-top:5px; }
.int-tag { font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:20px; background:#eef2f7; color:#334155; }
.int-tag.bad { background:#fef2f2; color:#b91c1c; }
.int-served { margin-top:6px; font-size:11.5px; color:var(--ph-mut); display:flex; flex-wrap:wrap; gap:4px 7px; align-items:center; }
.int-served-l { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--ph-soft); }
.int-served-p { background:var(--ph-blue-soft); color:var(--ph-navy); border-radius:6px; padding:2px 7px; }
.int-served-more { color:var(--ph-soft); font-style:italic; }
/* builder */
#int-builder { border:1px solid var(--ph-theme); }
.ph-basket { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0; min-height:8px; padding:0; list-style:none; }
.ph-basket:empty::before { content:"No areas added yet — add a PCN or practice to start building."; font-size:12px; color:var(--ph-soft); }
.ph-chip2 { display:inline-flex; align-items:center; gap:8px; background:var(--ph-navy); color:#fff; border-radius:9px; padding:6px 10px; font-size:12px; font-weight:600; }
.ph-chip2 .tag { font-size:10px; text-transform:uppercase; letter-spacing:.04em; opacity:.8; }
.ph-chip2 .pp { opacity:.9; font-weight:700; }
.ph-chip2 .rm { cursor:pointer; background:none; border:0; color:#fff; opacity:.8; font-weight:800; padding:0 2px; line-height:1; }
.ph-chip2 .rm:hover { opacity:1; }
.ph-builder-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.ph-builder-actions .epick-chip { margin:0; }
.ph-name-in { border:1px solid #94a3b8; border-radius:8px; padding:7px 11px; font-size:13px; flex:1; min-width:160px; }
.ph-breview { background:var(--ph-theme); color:#fff; border:0; border-radius:8px; padding:8px 15px; font-size:13px; font-weight:700; cursor:pointer; }
.ph-bshare { background:#fff; color:var(--ph-theme); border:1px solid var(--ph-theme); border-radius:8px; padding:8px 14px; font-size:13px; font-weight:700; cursor:pointer; }
.ph-bshare:hover { background:var(--ph-blue-soft); } .ph-bshare:disabled { opacity:.45; cursor:not-allowed; }
.ph-breset { background:none; border:0; color:var(--ph-mut); font-size:13px; cursor:pointer; text-decoration:underline; }
.int-share-msg { font-size:12.5px; font-weight:700; color:#15803d; }
.int-share-msg.is-warn { color:#b91c1c; }
.int-share-box { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:10px; }
.int-share-box label { font-size:12.5px; font-weight:700; }
.int-share-box input { flex:1; min-width:220px; border:1px solid #94a3b8; border-radius:8px; padding:7px 11px; font-size:12.5px; }
.ph-builder-sum { margin-top:12px; font-size:13px; }
.ph-builder-sum .big { font-size:20px; font-weight:800; color:var(--ph-navy); }
.ph-builder-sum .v { font-weight:800; padding:3px 9px; border-radius:7px; font-size:12px; margin-left:6px; }
.ph-builder-sum .v.fit { background:#15803d; color:#fff; } .ph-builder-sum .v.below { background:#0d5bb8; color:#fff; } .ph-builder-sum .v.above { background:#c2410c; color:#fff; }
.int-faint { color:var(--ph-soft); }
/* framework section tabs + banners + metric rows */
.ph-tabs { display:flex; flex-wrap:wrap; gap:8px; padding:12px 0; margin:8px 0; }
.ph-tab { display:inline-flex; align-items:center; gap:8px; border:1px solid var(--ph-border); background:#fff; color:var(--ph-mut); padding:9px 15px; border-radius:9px; font-size:13px; font-weight:700; cursor:pointer; }
.ph-tab:hover { color:var(--ph-theme); border-color:var(--ph-theme); }
.ph-tab[aria-pressed="true"] { background:var(--ph-theme); color:#fff; border-color:var(--ph-theme); }
.int-panel { display:none; } .int-panel.active { display:block; }
.int-fwbanner { display:flex; align-items:center; gap:14px; background:linear-gradient(135deg,#0d5bb8,#0b2545); color:#fff; border-radius:12px; padding:15px 20px; margin:4px 0 14px; }
.int-fwbanner .n { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; background:rgba(255,255,255,.2); border-radius:6px; padding:3px 9px; white-space:nowrap; }
.int-fwbanner .t strong { font-size:17px; display:block; } .int-fwbanner .t span { font-size:12.5px; }
.int-metrics { display:flex; flex-direction:column; }
.int-metric { display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:12px; padding:11px 2px; border-bottom:1px solid #f1f4f8; }
.int-metric:last-child { border-bottom:0; }
.int-metric .m-l { font-size:13.5px; font-weight:700; color:var(--ph-ink); }
.int-metric .m-l span { display:block; font-size:11.5px; font-weight:400; color:var(--ph-soft); margin-top:1px; }
.int-metric .m-v { font-size:18px; font-weight:800; color:var(--ph-navy); text-align:right; font-variant-numeric:tabular-nums; }
.int-metric .m-eng { display:block; font-size:11px; font-weight:600; color:var(--ph-soft); }
.int-metric .m-arrow { font-size:13px; font-weight:800; width:18px; text-align:center; }
.int-metric.good .m-arrow { color:#15803d; } .int-metric.bad .m-arrow { color:#b91c1c; }
.int-subcard .sc-h { font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--ph-theme); margin:14px 2px 2px; }
.int-src { font-size:11.5px; color:var(--ph-soft); margin-top:10px; }
.int-unavail { color:var(--ph-mut); font-size:13px; padding:8px 0; }
.int-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; } @media(max-width:820px){.int-grid2{grid-template-columns:1fr;}}
.int-tablewrap { position:relative; overflow-x:auto; }
details.int-tbl { margin-top:8px; font-size:12.5px; }
details.int-tbl summary { cursor:pointer; color:var(--ph-theme); font-weight:700; }
@media (max-width:520px) { .int-fwbanner { flex-direction:column; align-items:flex-start; } #int-map { height:340px; } .ph-tabs { overflow-x:auto; flex-wrap:nowrap; } .ph-tab { white-space:nowrap; } }
.visually-hidden { position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.int-code { color:var(--ph-mut); font-size:11.5px; white-space:nowrap; }
.int-allhoods-wrap { max-height:70vh; overflow:auto; }
tr.int-top > th, tr.int-top > td { background:#fef9c3; }
@media (forced-colors: active) {
  .ph-legend i, .int-d1, .int-d2, .int-d3, .int-d4, .int-d5, .int-d6, .int-d7, .int-d8, .int-d9, .int-d10 { forced-color-adjust:none; border:1px solid CanvasText; }
  tr.int-top > th, tr.int-top > td { background:Canvas; border-left:3px solid Highlight; }
}
@media (forced-colors: active) {
  .ph-breview, .ph-bshare, .ph-breset, #int-basket .rm, summary { border:1px solid ButtonText; }
}
@media (min-width:1200px) { #int-map { height:560px; } }
@media (min-width:1700px) { #int-map { height:640px; } }
/* Cards and charts use the full width; explanatory prose keeps a readable line length. */
.int-wrap .ph-sub, .int-wrap .ph-attr, .int-wrap .int-fwbanner .t span { max-width:100ch; }
