/* SPC colours: blue for improvement, orange for concern, purple for special cause with no set direction, grey for common cause */
:root,.lightvars{--spc-good:#2a78d6;--spc-bad:#eb6834;--spc-other:#6250d6;--spc-common:#8a96a3}
/* .lightvars is a hidden element that always carries the light colours, so a copied or downloaded chart is drawn on white */
:root,.lightvars{
  color-scheme:light;
  --plane:#f3f4f5; --surface:#ffffff; --ink:#26323a; --ink2:#36454f; --muted:#5f6f7e; --grid:#e6e8ea; --axis:#b9c0c7;
  --border:rgba(54,69,79,.18); --wash:rgba(54,69,79,.06); --sel:#36454f; --sel-ink:#ffffff; --focus:#2a78d6;
  --s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; --s4:#eda100; --s5:#e87ba4; --s6:#008300; --s7:#6250d6; --s8:#e34948;
  --ref:#36454f; --bar:#a9b4bf; --note-bg:#eceef0; --ctl:#7b8794; --track:#e3e6e9; --hover:rgba(54,69,79,.12); --paper:#d3e3f6; --av-g:#2e8540; --av-a:#e08a00; --av-r:#c8322b;
  --display:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
b,strong,th,h1,h2,h3,h4{font-weight:600}
summary,optgroup{font-weight:400}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--plane);color:var(--ink);font:14px/1.5 var(--font)}
.page{max-width:1440px;margin:0 auto;padding:8px 32px 48px;display:flex;flex-direction:column;gap:24px}
header.top{padding:16px 0 0}
.skip{position:absolute;left:-9999px;top:8px;background:var(--surface);color:var(--ink);padding:8px 12px;border-radius:8px;z-index:5}
.skip:focus{left:8px}
footer.foot{font-size:13px;line-height:1.5;color:var(--muted);text-align:center;margin-top:16px}
footer.foot p{margin:0}
footer.foot a{color:inherit}
#footsrc.off{display:none}
h1{font-family:var(--display);font-size:26px;color:var(--ink);line-height:1.2;margin:0;font-weight:600;letter-spacing:-.01em;text-wrap:balance}
nav.tabs{display:flex;justify-content:flex-end;gap:24px;margin-bottom:16px}
nav.tabs a{padding:4px 0 8px;font-size:16px;color:var(--muted);text-decoration:none;border-bottom:2px solid transparent;font-weight:400}
nav.tabs a[aria-current="page"]{color:var(--ink);border-bottom-color:var(--ink)}
nav.tabs a:hover{color:var(--ink)}
.filters{display:flex;flex-direction:column;gap:12px}
.side{display:flex;flex-direction:column;gap:24px;min-width:0}
.pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pair .field{flex-direction:row;align-items:center;gap:8px}
.pair select{flex:1;min-width:0;padding:4px 8px}
.pair select,.picker select,.picker input[type=search]{width:100%}
.filters .seg,.picker .seg{display:flex;align-self:stretch}
.filters .seg button,.picker .seg button{flex:1;padding:4px}
.maincol{min-width:0;display:flex;flex-direction:column}
.maincol main.card{flex:1}
.field{display:flex;flex-direction:column;gap:4px;min-width:0}
.field>span,.lab{font-size:13px;color:var(--ink2);font-weight:400}
select,input[type=search],button{font:inherit;color:var(--ink)}
select,input[type=search]{background:var(--surface);border:1px solid var(--ctl);border-radius:8px;padding:4px 12px;max-width:100%;min-height:36px}
#measure,#cat{width:100%}
.seg{display:inline-flex;background:var(--track);border-radius:8px;padding:2px;gap:2px;flex-wrap:wrap}
.seg button{border:0;background:transparent;padding:4px 12px;cursor:pointer;min-height:32px;border-radius:6px;color:var(--ink)}
.seg button:hover{background:var(--hover)}
.seg button[aria-pressed="true"]:hover{background:var(--sel)}
.seg button[aria-pressed="true"]{background:var(--sel);color:var(--sel-ink)}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.work{display:grid;grid-template-columns:304px minmax(0,1fr);gap:48px;align-items:stretch}
.card{background:var(--surface);border-radius:12px;padding:24px;min-width:0}
.picker{display:flex;flex-direction:column;gap:8px;min-width:0}
.grphead{margin:0;font-size:14px;line-height:1.3;color:var(--ink);font-weight:600;font-family:var(--font)}
/* each group in the side panel folds away under its heading; all are open when the page loads */
.fold{all:unset;box-sizing:border-box;display:flex;align-items:baseline;gap:8px;width:100%;cursor:pointer;border-radius:4px}
.fold::before{content:"";flex:none;width:7px;height:7px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:translateY(-3px) rotate(45deg);transition:transform .15s}
.fold[aria-expanded="false"]::before{transform:translateY(-1px) rotate(-45deg)}
.fold:hover::before{border-color:var(--ink)}
.fold:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.fold .now{font-weight:400;color:var(--ink2);margin-left:auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.grp.shut>*:not(.grphead){display:none!important}
.picker.shut{flex:none!important}
main.card{padding:24px}
.picker .seg{flex-wrap:nowrap}
/* the level tabs share a row with the find button; choosing it swaps the tabs for a search box until "OK" */
.levrow{display:flex;gap:6px;align-items:stretch;min-width:0;min-height:41px}
.levrow input[type=search]{flex:1}
.levrow .seg,.levrow .field{flex:1;min-width:0}
.levrow .seg button{flex:1 1 auto;padding:4px 2px}
.findbtn{flex:none;display:flex;align-items:center;justify-content:center;width:36px;padding:0;background:transparent;border:1.5px solid var(--ctl);border-radius:3px;cursor:pointer;font-weight:700}
.findbtn:hover{background:var(--hover)}
.list{background:var(--surface);border-radius:8px;max-height:min(56vh,560px);overflow:auto;padding:4px}
.list label{display:flex;gap:8px;align-items:flex-start;padding:4px 8px;border-radius:4px;cursor:pointer;font-size:14px;line-height:1.3}
.list label:hover{background:var(--wash)}
.list input{margin:2px 0 0;flex:none}
.list .dis{opacity:.45;cursor:default}
.list .row{display:flex;align-items:flex-start;gap:4px}.list .row label{flex:1;min-width:0}
.list .more{flex:none;display:inline-flex;align-items:center;gap:3px;white-space:nowrap;border:0;background:none;color:var(--muted);font:inherit;font-size:12px;line-height:1.3;padding:5px 6px;border-radius:4px;cursor:pointer}
.list .more:hover{background:var(--wash);color:var(--ink)}.list .more svg{flex:none;transition:transform .15s}.list .more[aria-expanded="true"] svg{transform:rotate(180deg)}
.list .sub{margin:0 0 2px 27px;border-left:2px solid var(--wash);padding-left:6px}.list .sub label{font-size:13px}
.opts{display:flex;flex-wrap:wrap;gap:8px 24px}
.opt{display:flex;align-items:center;gap:8px}
.hint{font-size:14px;color:var(--muted);margin:0}
.chk{display:flex;gap:8px;align-items:center;font-size:14px;cursor:pointer}
.head{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:baseline;justify-content:space-between;align-items:center;margin-bottom:0}
h2{font-family:var(--display);font-size:20px;line-height:1.2;margin:0;font-weight:600;text-wrap:balance}
.meta{font-size:14px;color:var(--muted)}
#view-ranking .head{display:block}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 12px}
.chip{display:inline-flex;align-items:center;gap:8px;background:var(--wash);border-radius:999px;padding:0 4px 0 12px;font-size:14px;max-width:100%}
.chip i{width:14px;height:3px;border-radius:2px;flex:none}
.chip span{overflow-wrap:anywhere}
.chip button{border:0;background:transparent;cursor:pointer;color:var(--muted);border-radius:50%;width:24px;height:24px;line-height:1;font-size:16px;flex:none}
.chip button:hover{background:var(--wash);color:var(--ink)}
.chartwrap{position:relative;height:420px;transition:opacity .15s}
.chartwrap svg{position:absolute;inset:0}
#r-table{transition:opacity .15s;margin-top:24px}
.loading{opacity:.45}
svg{display:block;max-width:100%}
svg text{font-family:var(--font);font-variant-numeric:lining-nums tabular-nums}
.tip{position:absolute;pointer-events:none;background:var(--surface);border:1px solid var(--border);border-radius:8px;box-shadow:0 4px 14px rgba(0,0,0,.14);padding:12px;font-size:14px;min-width:180px;max-width:340px;z-index:3}
.tip h4{margin:0 0 8px;font-size:12px;color:var(--ink2);font-weight:400}
.tip .r{display:grid;grid-template-columns:14px auto 1fr;gap:8px;align-items:baseline;line-height:1.4}
.tip .r i{height:3px;border-radius:2px;align-self:center}
b{color:var(--ink)}
.tip .r b{font-variant-numeric:lining-nums tabular-nums;white-space:nowrap}
.tip .r span{color:var(--ink2);overflow-wrap:anywhere}
.note{font-size:12px;color:var(--muted);margin-top:8px}
.key{display:flex;flex-wrap:wrap;gap:4px 20px;font-size:13px;color:var(--ink2);margin:16px 0 12px}
.key span{display:inline-flex;align-items:center;gap:6px}
.key i{width:10px;height:10px;border-radius:50%;flex:none}
.key i.ln{width:18px;height:0;border-radius:0;border-top:2px solid var(--ink2)}
.key i.dash{border-top-style:dashed}
.spcsum{margin:0;font-size:14px;color:var(--ink)}.spcsum:empty{display:none}
.pop{position:absolute;right:0;top:40px;width:min(420px,calc(100vw - 48px));background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.18);padding:12px 16px;font-size:13px;line-height:1.5;color:var(--ink2)}
#s-details{margin-top:8px}
.base{margin-top:8px;flex-shrink:0}
.base .chk{margin-bottom:8px}
.base::after{content:"";display:block;clear:both}
summary{cursor:pointer;font-size:14px;color:var(--ink2);font-weight:400}
.tablewrap{overflow-x:auto;margin-top:8px}
table{border-collapse:collapse;font-size:14px;width:100%}
th,td{padding:8px;text-align:right;border-bottom:1px solid var(--grid);font-variant-numeric:lining-nums tabular-nums;white-space:nowrap}
th{font-weight:600;color:var(--ink2);font-size:12px;vertical-align:bottom;white-space:normal;position:sticky;top:0;background:var(--surface);z-index:1}
th:first-child,td:first-child{text-align:left}
td.name,th.name{text-align:left;white-space:normal;min-width:168px}
th button{all:unset;cursor:pointer;font:inherit;color:inherit}
th:first-child button{white-space:nowrap}
th button:hover{color:var(--ink)}
th button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
tr.ref td{background:var(--wash)}
tr.grp th{position:static;text-align:left;font-size:13px;font-weight:600;color:var(--ink2);padding-top:24px;white-space:normal}
tr.picked td.name .linkbtn{position:relative;padding-left:15px}
tr.picked td.name .linkbtn::before{content:"";position:absolute;left:0;top:.5em;width:8px;height:8px;border-radius:50%;background:var(--pc)}
td.barcell{width:16%;min-width:72px;padding-right:8px}
.bar{height:10px;border-radius:0 4px 4px 0;background:var(--bar);min-width:1px}
td .nd{color:var(--muted)}
td.av,th.av{text-align:left;white-space:nowrap}
.av i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px;background:var(--av)}
.av-g{--av:var(--av-g)}.av-a{--av:var(--av-a)}.av-r{--av:var(--av-r)}
td.sp{min-width:calc(var(--spw,96px) + 8px)}
td.sp svg{max-width:none;width:var(--spw,96px);height:var(--sph,24px);display:block;margin-left:auto}
.btn{border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:8px 12px;cursor:pointer;min-height:40px;font-size:14px}
.btn:hover{background:var(--wash)}
.linkbtn{all:unset;cursor:pointer;text-decoration:underline;text-decoration-color:var(--axis);text-underline-offset:2px}
.linkbtn:hover{text-decoration-color:var(--ink)}
.linkbtn:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
main.card{position:relative}
/* the cog is centred on the title row, and its icon (not its larger click area) lines up with the right edge of the chart */
.head{padding-right:44px}
.head h2{padding:6px 0}
.tools{position:absolute;top:24px;right:16px;z-index:4;display:flex}
#view-spc .head,#view-ranking .head{padding-right:80px}
.cog{border:0;background:transparent;border-radius:8px;width:36px;height:36px;display:grid;place-items:center;cursor:pointer;color:var(--muted)}
.cog:hover,.cog[aria-expanded="true"]{background:var(--wash);color:var(--ink)}
.menu{position:absolute;right:0;top:40px;width:240px;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.18);padding:8px;display:flex;flex-direction:column;gap:2px}
.mi{border:0;background:transparent;text-align:left;padding:8px;border-radius:8px;cursor:pointer;min-height:36px}
.mi:hover{background:var(--wash)}
.mgroup{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px}
#lw{flex:1;min-width:0;max-width:130px;accent-color:var(--pen);height:28px;margin:0}
#lwshow{display:block;width:100%;height:16px;margin:0 0 6px}
#lwshow[hidden]{display:none}
.menu .hint{font-size:13px;padding:0 8px 4px}
.err{padding:24px;color:var(--ink2)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
[hidden]{display:none!important}
/* side by side: the view tabs sit on the title line, and both panels start at the same height */
@media (min-width:861px){
  .work{margin-top:8px}
  .maincol{position:relative}
  nav.tabs{position:absolute;right:0;bottom:calc(100% + 22px);margin:0}
  .base .chk{float:right;margin:0 0 0 24px}
}
/* desktop: one screen, nothing scrolls except the organisation list, the ranking table and an opened figures table */
@media (min-width:1000px) and (min-height:560px){
  html,body{height:100%}
  .page{height:100%;padding-bottom:16px;gap:16px}
  .work{flex:1;min-height:0;margin-top:16px}
  .side,.maincol{min-height:0}
  .picker{flex:1;min-height:0}
  .picker>*{flex-shrink:0}
  .list{flex:1 1 72px;min-height:72px;max-height:none}
  .maincol main.card{min-height:0;display:flex;flex-direction:column;overflow:auto}
  #view-trend,#view-ranking,#view-spc,#view-compare{flex:1;min-height:0;display:flex;flex-direction:column}
  .chartwrap{flex:1 0 220px;height:auto}
  #r-table{flex:1;min-height:0;overflow:auto}
}
/* large screens: the page uses nearly the full width, with a wider side panel, so the chart and ranking table grow */
@media (min-width:1600px) and (min-height:780px){
  .page{max-width:2200px;padding-left:48px;padding-right:48px}
  .work{grid-template-columns:352px minmax(0,1fr)}
}
/* short laptop windows: the same one-screen layout, with tighter spacing so the organisation list keeps a usable height */
@media (min-width:1000px) and (min-height:560px) and (max-height:779px){
  .page{padding-top:0;padding-bottom:8px;gap:8px}
  header.top{padding-top:12px}
  h1{font-size:22px}
  nav.tabs{bottom:calc(100% + 10px)}
  nav.tabs a{padding:2px 0 6px}
  .work{margin-top:12px}
  .side{gap:14px}
  .filters{gap:8px}
  .filters>.field{flex-direction:row;align-items:center;gap:8px}
  .filters>.field>span{flex:0 0 60px}
  .filters>.field>select{flex:1;min-width:0;width:auto}
  select,input[type=search]{min-height:32px}
  .seg button{min-height:28px}
  footer.foot{margin-top:0}
  main.card{padding:16px 24px}
  .tools{top:16px}
  .chips{margin:8px 0}
  #r-table{margin-top:12px}
}
@media (max-width:860px){.work{grid-template-columns:1fr}.list{max-height:200px}.work{gap:32px}.page{padding:16px 16px 48px}main.card{padding:16px}h2{font-size:20px}}
@media (max-width:860px){.opt{flex-direction:column;align-items:flex-start;gap:4px}}
/* phone: the tabs, title and chart come first; the legend, the option buttons and then the whole control panel follow */
@media (max-width:860px){
  .work{display:flex;flex-direction:column}
  .maincol{order:-1}
  #view-trend,#view-spc,#view-compare{display:flex;flex-direction:column}
  #view-trend .head{display:contents}
  #view-trend .head h2{padding-right:44px}
  .head h2{padding:0}
  .tools{top:10px;right:8px}
  .chartwrap{order:1;margin-top:12px}
  .chips,.key{order:2;margin:12px 0 0}
  #view-trend .opts{order:3;margin-top:16px}
  .note{order:4}
  .base{order:5}
  /* the control panel sits on its own tinted ground, so it reads as separate from the white chart panel above it */
  .side{background:#dfe4e9;--track:#cbd3da;border-radius:12px;padding:16px}
}
@media (prefers-reduced-motion:reduce){.chartwrap,.fold::before{transition:none}}
/* ---------- Paper style ----------
   The page is a sheet of grey card with pieces of off-white card laid on it. Every piece has square corners, a cut edge,
   a shadow from one light at the top left and a pencil line ruled just inside the cut. Kraft card marks what is selected
   (the current view and the chosen buttons) and nothing else. Headings are typed (Special Elite); everything that is read
   or clicked is in a sans (Carlito). Both fonts are served from this site. A copied or downloaded chart is not restyled:
   .lightvars keeps the plain colours above. */
@font-face{font-family:"Carlito";font-weight:400;font-style:normal;src:url(fonts/carlito-400.woff2) format("woff2");font-display:swap}
@font-face{font-family:"Carlito";font-weight:700;font-style:normal;src:url(fonts/carlito-700.woff2) format("woff2");font-display:swap}
@font-face{font-family:"Special Elite";font-weight:400;font-style:normal;src:url(fonts/special-elite.woff2) format("woff2");font-display:swap}
:root{
  color-scheme:light;
  --plane:#5c5e60; --surface:#fcfbf6; --ink:#3a3f3a; --ink2:#4a504a; --muted:#6b716b; --grid:#e6e4dc; --axis:#a5a7a3;
  --border:rgba(96,98,102,.6); --wash:rgba(74,80,74,.08); --sel:#cdb896; --sel-ink:#3a3f3a; --focus:#1f2a44;
  --ref:#3a3f3a; --bar:#b0babe; --note-bg:#f1efe6; --ctl:#606266; --track:transparent; --hover:rgba(74,80,74,.1); --paper:#dddcd5;
  --display:"Carlito",Calibri,system-ui,sans-serif; --font:"Carlito",Calibri,system-ui,sans-serif;
  --type:"Special Elite","Courier New",monospace; --pen:#1c1c1b; --kraft:#cdb896; --pencil:rgba(96,98,102,.62);
  /* a large paper piece, a small paper piece and a small kraft piece */
  --cut:inset 1px 1px 0 rgba(255,255,255,.92),3px 3px 0 #cdccc9,4px 4px 1px rgba(18,19,20,.69),8px 11px 12px rgba(18,19,20,.43);
  --cut-s:inset 1px 1px 0 rgba(255,255,255,.92),2px 2px 0 #cdccc9,3px 3px 1px rgba(18,19,20,.55),4px 6px 6px rgba(18,19,20,.3);
  --cut-k:inset 1px 1px 0 rgba(255,255,255,.6),2px 2px 0 #ad9f88,3px 3px 1px rgba(18,19,20,.55),4px 6px 6px rgba(18,19,20,.3);
}
body{font-size:15px;background:#5c5e60 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .9' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .22 0'/%3E%3C/filter%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .4 0 0 0 0 .4 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)'/%3E%3Crect width='400' height='400' filter='url(%23m)'/%3E%3C/svg%3E")}
/* the pieces */
.side .grp,main.card,h1,nav.tabs a{position:relative;background:var(--surface);border-radius:0;box-shadow:var(--cut)}
.side .grp::after,nav.tabs a::after{content:"";position:absolute;inset:5px;border:1.6px solid var(--pencil);pointer-events:none;filter:url(#pencil)}
.side{gap:20px}
.side .grp{padding:16px 18px 18px}
.side .picker{padding-bottom:28px} /* room between the foot of the organisation list and the panel's pencil line */
@media (min-width:1000px) and (min-height:780px) and (max-height:849px){.side .picker{padding-bottom:18px}} /* no room to spare: the list is at its smallest here */
/* the shortest windows of the standard layout: tighter panel spacing, so the organisation list ends above the pencil line */
@media (min-width:1000px) and (min-height:780px) and (max-height:819px){.side{gap:clamp(14px,calc(14px + (100vh - 780px)*.2),20px)}.side .grp{padding-top:11px;padding-bottom:13px}.side .picker{padding-bottom:18px}}
.side .grp:nth-child(1){transform:rotate(-.25deg)}
.side .grp:nth-child(2){transform:rotate(.2deg)}
.side .grp:nth-child(3){transform:rotate(-.15deg)}
.side .grp:nth-child(4){transform:rotate(.15deg)}
/* Compare view: four boxes. If the visitor opens them all there is not room for them in one screen, so the panel scrolls
   inside itself and the organisation list keeps a fixed height. The margin and padding keep the boxes' shadows unclipped. */
@media (min-width:861px){
  .side.four{overflow-y:auto;overflow-x:hidden;margin:-10px;padding:10px;scrollbar-width:thin;gap:20px} /* two boxes are folded, so there is room for the standard gap in every window */
  .side.four .picker{flex:0 0 auto;overflow:visible}
  .side.four .list{flex:none;height:200px;max-height:none}
}
/* the chart panel: a paper-coloured border keeps scrolling content inside the pencil line, which does not scroll */
main.card{border:9px solid var(--surface);padding:17px 19px}
.tools{top:17px;right:11px}
/* typed headings */
header.top{padding-top:14px}
h1{display:inline-block;padding:12px 26px 9px;font-size:27px;line-height:1.2}
h1,.grphead,.fold,main h2,nav.tabs a,nav.tabs a[aria-current="page"]{font-family:var(--type);font-weight:400;color:var(--pen);letter-spacing:0}
.grphead{font-size:17px}
.fold .now{font-family:var(--font);font-size:14px}
main h2{font-size:20px;line-height:1.3}
/* view tags: small paper pieces; the current one is kraft and takes the same slight tilt as every kraft piece */
nav.tabs{gap:14px}
nav.tabs a,nav.tabs a[aria-current="page"]{border:0;font-size:16px;padding:9px 14px 5px}
nav.tabs a{box-shadow:var(--cut-s)}
nav.tabs a::after{inset:3px;border-width:1.2px}
nav.tabs a[aria-current="page"]{background:var(--kraft);box-shadow:var(--cut-k);transform:rotate(-1deg)}
nav.tabs a:not([aria-current="page"]):hover{background-image:linear-gradient(var(--hover),var(--hover))}
/* the Help tag shows an info symbol, not a word, and is only as wide as the symbol needs. The symbol is sized by the tag's letters and nudged up, because the tags have more space above their letters than below */
nav.tabs a#tab-about{width:auto;flex:0 0 auto;padding-left:13px;padding-right:13px}
nav.tabs a#tab-about svg{display:block;width:1.2em;height:1.455em;position:relative;top:-2px}
/* controls drawn in pencil on the paper */
select,input[type=search]{background:transparent;border:1.5px solid var(--ctl);border-radius:3px}
input[type=checkbox]{accent-color:var(--pen)}
.seg{border:1.5px solid var(--ctl);border-radius:3px;padding:3px}
.seg button{border-radius:1px}
.seg button[aria-pressed="true"]{box-shadow:var(--cut-k);transform:rotate(-1deg);color:var(--ink);font-weight:700}
.list{background:transparent;border:1.5px solid rgba(96,98,102,.45);border-radius:3px}
.chip{border-radius:2px;background:var(--note-bg);box-shadow:1px 1px 0 #cdccc9,2px 3px 3px rgba(18,19,20,.22)}
.chip:nth-child(odd){transform:rotate(-.6deg)}
.chip:nth-child(even){transform:rotate(.5deg)}
.tip,.menu,.pop{border:0;border-radius:0;box-shadow:var(--cut)}
.tip h4,.tip .r span{color:var(--ink)}
.btn,.mi,.cog{border-radius:3px}
.bar{border-radius:0;background:var(--kraft);box-shadow:1px 1px 0 #ad9f88,2px 2px 2px rgba(18,19,20,.3)}
th,td{border-bottom-color:#dcdad1}
/* the source line: small pale text on the card, left-aligned */
footer.foot{text-align:left;margin-top:8px}
footer.foot p{padding-left:2px;color:#d6d7d2;font-size:12.5px}
/* trend view: scale and rolling average sit under the chart, with one info button that explains both */
#view-trend{display:flex;flex-direction:column}
#view-trend .head{display:contents}
#view-trend .head h2{padding-right:44px}
#view-trend .chartwrap{order:1}
#view-trend .opts{order:2;margin-top:12px;flex-shrink:0;position:relative}
#view-trend .note{order:3}
#view-trend .base{order:4}
.optinfo{display:inline-flex}
.optinfo .pop{top:auto;bottom:calc(100% + 8px);left:0;right:auto;z-index:6;width:min(460px,100%)}
.optinfo .pop p{margin:0 0 8px}
.optinfo .pop p:last-child{margin:0}
.about{max-width:70ch}
.about h2{margin-bottom:10px}
.about div{margin-bottom:16px}
.about h3{font-family:var(--type);font-weight:400;color:var(--pen);font-size:16px;line-height:1.3;margin:0 0 4px}
.a-views p+p{margin-top:8px}
#a-lines{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:6}
#a-lines path{fill:none;stroke:#7a1f33;stroke-linecap:round;stroke-linejoin:round}
#a-dots,#a-loops{stroke-width:3.6;stroke-dasharray:.1 9}
#a-lines #a-loops{stroke-width:1.9;stroke-dasharray:none}
#a-heads{stroke-width:3}
/* laptop and desktop: the three view notes are stacked at the top left, each in a dotted loop with a dotted curve from
   its right-hand side up to its tag; About and Data sit side by side beneath, in line with the notes' text.
   drawAbout sets --az, the room kept clear under the tags for the curves. */
@media (min-width:1220px){
  .about{max-width:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:40px;align-items:start;padding-left:14px}
  .about>div{order:2;margin:40px 0 0;padding-left:14px}
  .about .a-views{order:1;grid-column:1/-1;margin-top:0;padding:16px calc(var(--az,440px) + 28px) 14px 0}
  .a-views h3{display:none}
  .a-views p{padding:6px 14px}
  .a-views p+p{margin-top:36px}
  .about h2{font-size:16px;margin-bottom:4px}
}
.about p{margin:0;font-size:15px;line-height:1.55;color:var(--ink2);max-width:66ch}
@media (min-width:1220px) and (min-height:560px) and (max-height:779px){.about p{font-size:14px;line-height:1.45}.about>div{margin-top:18px}.about .a-views{margin-top:0;padding-top:10px}.a-views p{padding:3px 14px}.a-views p+p{margin-top:31px}}
.about a{color:inherit}
/* laptop and desktop: the view tags are the same width and a step smaller than the title */
@media (min-width:861px){
  .maincol::after{content:"";position:absolute;inset:5px;border:1.6px solid var(--pencil);pointer-events:none;filter:url(#pencil);z-index:5}
  nav.tabs{gap:16px;right:6px;bottom:calc(100% + 37px)} /* level with the title: the middles of the tags and of the title line up */
  nav.tabs a,nav.tabs a[aria-current="page"]{font-size:21px;width:116px;text-align:center;padding:8px 0 4px}
}
@media (min-width:1000px) and (min-height:560px){.page{padding-bottom:14px}.work{gap:40px}}
@media (min-width:1000px) and (min-height:560px) and (max-height:779px){
  header.top{padding-top:8px}
  h1{font-size:22px;padding:8px 20px 5px}
  nav.tabs{bottom:calc(100% + 22px)}
  nav.tabs a,nav.tabs a[aria-current="page"]{font-size:18px;width:104px;padding:6px 0 2px}
  .side{gap:clamp(6px,calc(6px + (100vh - 560px)*.16),20px)} /* the gaps between the boxes grow with the window's height, up to the standard 20 pixels */
  .side .grp{padding:9px 16px 11px;gap:6px}
  .side .picker{padding-bottom:19px}
  .picker{overflow:hidden}
  .levrow{min-height:39px}
  .grphead{font-size:15px}
  main.card{padding:9px 17px}
  .tools{top:9px}
}
/* the shortest of those: tighter again, for the same reason */
@media (min-width:1000px) and (min-height:560px) and (max-height:619px){.side .grp{padding-top:7px;padding-bottom:9px}.side .picker{padding-bottom:19px}}
/* five tags do not fit beside the full-size title in a narrower window, so there they are only as wide as their words */
@media (min-width:861px) and (max-width:999px),(min-width:1000px) and (max-width:1259px) and (min-height:780px),(min-width:1000px) and (max-width:1259px) and (max-height:559px){
  nav.tabs{gap:12px;bottom:calc(100% + 40px)}
  nav.tabs a,nav.tabs a[aria-current="page"]{font-size:17px;width:auto;padding:8px 13px 4px}
}
/* the same in the short-window layout, whose title and tags are a step smaller */
@media (min-width:1000px) and (max-width:1099px) and (min-height:560px) and (max-height:779px){
  nav.tabs{gap:12px}
  nav.tabs a,nav.tabs a[aria-current="page"]{width:auto;padding:6px 11px 2px}
}
/* just above phone width, and where the full-size title first appears, the five tags are a step smaller again */
@media (min-width:861px) and (max-width:919px),(min-width:1000px) and (max-width:1039px) and (min-height:780px),(min-width:1000px) and (max-width:1039px) and (max-height:559px){
  nav.tabs{gap:10px}
  nav.tabs a,nav.tabs a[aria-current="page"]{font-size:15px;padding:8px 10px 4px}
}
/* under 1000 pixels wide the full-size title would reach the first tag, so the title is a step smaller there */
@media (min-width:861px) and (max-width:999px){
  h1{font-size:22px;padding:8px 20px 5px}
  nav.tabs{bottom:calc(100% + 33px)}
}
/* phone: the pencil line is on the panel itself (the page scrolls, not the panel); legend, then options, under the chart */
@media (max-width:860px){
  .side{background:transparent;padding:0;--track:transparent}
  h1{font-size:21px}
  nav.tabs{justify-content:flex-start;flex-wrap:nowrap;gap:8px;margin:6px 0 20px}
  nav.tabs a,nav.tabs a[aria-current="page"]{flex:1 1 auto;text-align:center;padding:9px 8px 5px}
  main.card{border-width:0;padding:16px}
  main.card::after{content:"";position:absolute;inset:5px;border:1.6px solid var(--pencil);pointer-events:none;filter:url(#pencil)}
  .tools{top:10px;right:8px}
  #view-trend .opts{order:3}
  #view-trend .note{order:4}
  #view-trend .base{order:5}
}
/* five tags on one row of a phone: smaller type under 768 pixels wide */
@media (max-width:767px){nav.tabs a,nav.tabs a[aria-current="page"]{font-size:14px}}
#view-compare .opts,#view-compare .opt{min-width:0;max-width:100%}
#view-compare .opts{margin-top:12px;flex-shrink:0;position:relative}
/* Compare: the legend is inside the heading row. It takes its own line, except in short laptop windows, where it sits
   beside the organisation's name so that the two charts keep their height. On a phone it goes under the chart. */
/* the info button stays beside the rolling average choices, so it is never left on a line of its own */
.corr{font-size:13px;line-height:1.45;color:var(--ink2);margin:10px 0 0}
.corr b{color:var(--ink)}
.segrow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
/* a folded Organisations box is the same height as a folded Period box: it drops the extra room kept under the open list */
.side .picker.grp.shut{padding-bottom:18px}
@media (min-width:1000px) and (min-height:780px) and (max-height:819px){.side .picker.grp.shut{padding-bottom:13px}}
@media (min-width:1000px) and (min-height:560px) and (max-height:779px){.side .picker.grp.shut{padding-bottom:11px}}
@media (min-width:1000px) and (min-height:560px) and (max-height:619px){.side .picker.grp.shut{padding-bottom:9px}}
/* three choices under the Compare charts: in narrower laptop windows they are set closer so that they stay on one row */
@media (min-width:861px) and (max-width:1365px){#view-compare .opts{gap:8px 14px}#view-compare .opt{gap:6px}#view-compare .opts .seg button{padding:4px 8px}}
/* windows 861 to 1279 pixels wide have no room for the three choices in full on one row: the buttons use shorter
   words ("Actual", "Indexed", "3", "12", with "(months)" added to the name), and from 960 to 1159 pixels each name sits
   above its buttons */
.sht{display:none}
@media (min-width:861px) and (max-width:1279px){#view-compare .opts .lng{display:none}#view-compare .opts .sht{display:inline}#view-compare .opts .seg button{min-width:36px}}
@media (min-width:960px) and (max-width:1159px){#view-compare .opt{flex-direction:column;align-items:flex-start;gap:3px}}
#view-compare .head .key{flex:1 0 100%}
@media (min-width:1000px) and (min-height:560px) and (max-height:779px){
  #view-compare .head{justify-content:flex-start;gap:4px 28px}
  #view-compare .head .key{flex:0 1 auto;margin:0}
}
@media (max-width:860px){
  #view-compare .head{display:contents}
  #view-compare .head h2{padding-right:44px}
  #view-compare .opts{order:3;margin-top:16px}
}
@media (max-width:359px){nav.tabs{gap:6px}nav.tabs a,nav.tabs a[aria-current="page"]{padding:9px 5px 5px}}
.key i.sw{width:18px;height:0;border-radius:0;border-top:3px solid}
/* phone held upright: the chart is about two thirds as tall as the window is wide, so it is wider than it is tall */
@media (max-width:860px) and (orientation:portrait){.chartwrap{height:clamp(220px,68vw,420px)}}
/* room to breathe: more space under the title line and above the source line, taken from the panels' height.
   --air-t is added under the title (the view tags are lifted by the same amount, so they stay level with it);
   --air-b is added above the source line. In short laptop windows the extra grows with the window's height, so the
   shortest windows, where the organisation list is already small, give up least. */
@media (min-width:861px){
  :root{--air-t:16px;--air-b:12px}
  header.top{padding-bottom:var(--air-t)}
  nav.tabs{margin-bottom:var(--air-t)}
  footer.foot{margin-top:calc(8px + var(--air-b))}
}
@media (min-width:1000px) and (min-height:560px) and (max-height:779px){
  :root{--air-t:clamp(4px,calc((100vh - 560px)*.2),16px);--air-b:clamp(4px,calc((100vh - 560px)*.16),14px)}
}
@media (min-width:1600px) and (min-height:780px){:root{--air-t:20px;--air-b:16px}}
/* more room above the title in laptop and desktop windows at least 850 pixels tall: the title, view tags and panels
   move down 12 pixels and the panels give up that height. Shorter windows, where the organisation list is already at
   its smallest, keep their room for the panels. */
@media (min-width:861px) and (min-height:850px){header.top{padding-top:26px}}
/* short laptop windows (560 to 779 pixels tall): the title and view tags come down, up to 8 pixels, taken from the
   space under them, so the panels do not move. The amount grows with the window's height (8 pixels from 640 tall). */
@media (min-width:1000px) and (min-height:560px) and (max-height:779px){
  :root{--lift:clamp(0px,calc((100vh - 560px)*.1),8px);--air-t:calc(clamp(4px,calc((100vh - 560px)*.2),16px) - var(--lift))}
  header.top{padding-top:calc(8px + var(--lift))}
}
/* ranking rows: taller, with larger trend lines, where the table has room. Laptop and desktop windows 1200 pixels
   wide or more; a little smaller in short windows, so that more organisations still fit. Narrower windows and phones
   keep 96 by 24, because there the table already needs the room. */
@media (min-width:1200px){#view-ranking{--spw:140px;--sph:32px}#r-table td{padding-top:10px;padding-bottom:10px}}
@media (min-width:1200px) and (max-height:779px){#view-ranking{--spw:124px;--sph:28px}#r-table td{padding-top:8px;padding-bottom:8px}}
