/* Where it applies sectors as six picture boxes. Each box shows its sector's picture and
   name; pressing it opens the sector's details in a dialog (ap-boxes.js), with previous and next
   to move between sectors. Without the script the details simply show under each box. */
.ap-boxes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 22px;margin:0;padding:0;list-style:none}
.ap-box{display:flex;flex-direction:column}
.ap-open{display:flex;flex-direction:column;width:100%;padding:0;border:0;border-radius:8px;overflow:hidden;cursor:pointer;
  background:var(--surface);color:var(--text);text-align:left;font:inherit;transition:background-color .25s ease}
html[data-theme=dark] .ap-open{background:#102036}
.ap-pic{display:block;aspect-ratio:16/9;overflow:hidden;background:var(--surface2)}
.ap-pic img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .7s cubic-bezier(.2,.7,.2,1)}
.ap-name{display:block;padding:20px 22px 6px;font:600 clamp(20px,1.6vw,24px)/1.25 'Manrope',sans-serif;letter-spacing:-.03em;color:var(--text)}
.ap-cta{display:inline-flex;align-items:center;gap:8px;padding:0 22px 22px;font:700 15px/1.4 'DM Sans',sans-serif;color:#1b4585}
html[data-theme=dark] .ap-cta{color:#9fc0f5}
.ap-cta svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .25s ease}
.ap-open:hover .ap-pic img{transform:scale(1.05)}
.ap-open:hover .ap-cta svg{transform:translateX(4px)}
.ap-open:active{transform:scale(.99)}
.ap-open:focus-visible{outline:3px solid #faa61a;outline-offset:3px}
/* the details: under each box without the script, in the dialog with it */
.ap-more{padding:18px 4px 0}
.ap-more h3,.ap-d-text h3{margin:0;font:700 var(--t-h3,20px)/1.3 'Manrope',sans-serif;letter-spacing:-.02em;color:var(--text)}
.ap-more p,.ap-d-text p{margin:12px 0 0;font-size:var(--t-card,17px);line-height:1.65;color:var(--muted)}
.ap-more .ap-gives,.ap-d-text .ap-gives{margin-top:22px;padding:2px 0 2px 18px;border-left:4px solid #faa61a;font:700 var(--t-card,17px)/1.5 'Manrope',sans-serif;color:var(--text)}
.ap-gives small{display:block;margin-bottom:4px;font:700 14px/1.4 'DM Sans',sans-serif;color:var(--muted)}
.ap-js .ap-more{display:none}

/* the dialog */
.ap-dialog{width:min(1040px,calc(100% - 32px));max-height:calc(100dvh - 48px);padding:0;border:0;border-radius:12px;overflow:auto;
  background:var(--surface);color:var(--text);box-shadow:0 30px 80px rgba(7,23,44,.35)}
html[data-theme=dark] .ap-dialog{background:#102036}
.ap-dialog[open]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr)}
.ap-dialog::backdrop{background:rgba(7,23,44,.45);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
@media(prefers-reduced-transparency:reduce){.ap-dialog::backdrop{background:rgba(7,23,44,.8);-webkit-backdrop-filter:none;backdrop-filter:none}}
.ap-d-pic{min-height:420px;background:var(--surface2)}
.ap-d-pic img{display:block;width:100%;height:100%;object-fit:cover}
.ap-d-body{display:flex;flex-direction:column;padding:48px 44px 30px}
.ap-d-name{margin:0 48px 14px 0;font:700 15px/1.4 'DM Sans',sans-serif;color:#1b4585}
html[data-theme=dark] .ap-d-name{color:#9fc0f5}
.ap-d-text h3{font-size:clamp(24px,2vw,30px);letter-spacing:-.035em;line-height:1.2}
.ap-d-nav{display:flex;align-items:center;gap:6px;margin-top:auto;padding-top:30px}
.ap-d-nav button,.ap-d-close{display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:var(--surface2);color:var(--text);cursor:pointer;transition:background-color .2s}
.ap-d-nav button:hover,.ap-d-close:hover{background:#dfe5ee}
html[data-theme=dark] .ap-d-nav button:hover,html[data-theme=dark] .ap-d-close:hover{background:#22344f}
.ap-d-nav svg,.ap-d-close svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.ap-d-nav button:focus-visible,.ap-d-close:focus-visible{outline:3px solid #faa61a;outline-offset:2px}
.ap-d-count{min-width:64px;text-align:center;font:600 14px/1 'DM Sans',sans-serif;color:var(--muted)}
.ap-d-close{position:absolute;top:16px;right:16px}
.ap-dialog[open]{animation:ap-d-in .28s cubic-bezier(.2,.7,.2,1)}
.ap-dialog[open]::backdrop{animation:ap-d-fade .28s ease}
@keyframes ap-d-in{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
@keyframes ap-d-fade{from{opacity:0}to{opacity:1}}
.ap-d-body.is-changing .ap-d-text,.ap-d-body.is-changing .ap-d-name{animation:ap-d-fade .3s ease}

@media(max-width:980px){
  .ap-boxes{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ap-dialog[open]{grid-template-columns:1fr;overflow:auto}
  .ap-d-pic{min-height:0;aspect-ratio:16/9}
  .ap-d-body{padding:30px 24px 22px}
  .ap-d-close{background:rgba(255,255,255,.9);color:#182b46}
}
@media(max-width:600px){
  .ap-boxes{grid-template-columns:1fr;gap:20px}
  .ap-dialog{width:calc(100% - 20px);max-height:calc(100dvh - 20px)}
}
@media(prefers-reduced-motion:reduce){
  .ap-pic img,.ap-cta svg{transition:none}
  .ap-dialog[open],.ap-dialog[open]::backdrop,.ap-d-body.is-changing .ap-d-text,.ap-d-body.is-changing .ap-d-name{animation:none}
}
/* the mergers picture has a dark strip down its right edge: crop in past it */
.ap-open[data-sector=mergers] .ap-pic img,.ap-dialog[data-sector=mergers] .ap-d-pic img{transform:scale(1.08);transform-origin:0 40%}
.ap-open[data-sector=mergers]:hover .ap-pic img{transform:scale(1.13)}
.ap-d-pic{overflow:hidden}
/* no scrollbar: the popup is sized to its longest sector, and when that would not fit the screen
   the script switches it to this tighter setting */
.ap-dialog{scrollbar-width:none}
.ap-dialog::-webkit-scrollbar{display:none}
.ap-dialog.is-compact .ap-d-body{padding:30px 34px 22px}
.ap-dialog.is-compact .ap-d-name{margin-bottom:8px}
.ap-dialog.is-compact .ap-d-text h3{font-size:clamp(21px,1.7vw,25px)}
.ap-dialog.is-compact .ap-d-text p{margin-top:8px;font-size:16px;line-height:1.55}
.ap-dialog.is-compact .ap-d-text .ap-gives{margin-top:14px}
.ap-dialog.is-compact .ap-d-nav{padding-top:16px}
@media(max-width:980px){
  .ap-dialog.is-compact .ap-d-pic{aspect-ratio:21/9}
  .ap-dialog.is-compact .ap-d-body{padding:20px 20px 16px}
}
/* in the tall popup crop, keep the town hall's lettering in view */
.ap-dialog[data-sector=local-government] .ap-d-pic img{object-position:30% 0!important}

/* the cards are near-white on a near-white page: a cool grey edge and a soft lift keep their edges
   clear, and the lift deepens when a card is pointed at */
.ap-open{border:1px solid #d5dde8;box-shadow:0 1px 2px rgba(7,23,44,.05),0 10px 26px -14px rgba(7,23,44,.22);
  transition:background-color .25s ease,box-shadow .3s ease,border-color .3s ease}
.ap-open:hover{border-color:#b9c6d8;box-shadow:0 1px 2px rgba(7,23,44,.06),0 18px 36px -16px rgba(7,23,44,.3)}
html[data-theme=dark] .ap-open{border-color:#24395a;box-shadow:0 12px 28px -14px rgba(0,0,0,.6)}
html[data-theme=dark] .ap-open:hover{border-color:#36507a}

/* on this page each section intro sits under its heading at a readable measure; centred intros
   stay centred */
#main .section-intro{display:block}
#main .section-intro h2{margin-bottom:0}
#main .section-intro .intro-side{max-width:62ch;margin-top:22px;margin-bottom:0}
