/* Section folding. Every content section carries one disclosure triangle before its heading and one wrapper
   around the content below it. Sections ship collapsed once the script runs; without JavaScript the page is
   complete and open.

   The control is a filled triangle on the heading's baseline, accent coloured, right pointing while the section
   is folded and turned down while it is open. The button itself is invisible: only the triangle paints, and the
   button keeps a 28px box so the target stays comfortable. */

.section-heading{position:relative}
/* Balance the intro's lines so a short last line never strands one or two words. */
.section-heading>p{text-wrap:balance}
/* One mark per section, set inline with the display heading so it rides the same masked reveal. */
.section-heading h2 .section-mark{display:inline-block;width:.42em;height:.42em;margin-right:.16em;color:var(--accent);vertical-align:baseline;transform:translateY(-.02em)}
.section-heading h2 .section-mark svg{display:block;width:100%;height:100%}

.section-title{display:flex;align-items:baseline;gap:12px;min-width:0}
html.js .section-heading{cursor:pointer}
.section-title h2{min-width:0}
.section-toggle{display:inline-flex;align-items:flex-end;justify-content:center;flex:0 0 auto;width:28px;height:28px;margin:0;padding:0;border:0;background:none;color:var(--accent);cursor:pointer}
.section-toggle::before{content:"";width:0;height:0;border-left:15px solid currentColor;border-top:9px solid transparent;border-bottom:9px solid transparent;transform-origin:35% 50%;transform:translateY(-5px)}
.section-toggle[aria-expanded=true]::before{transform:translateY(-5px) rotate(90deg)}
.motion-on .section-toggle::before{transition:transform 180ms var(--ease-arrive)}
@media(hover:hover) and (pointer:fine){
  .section-toggle:hover{color:color-mix(in srgb,var(--accent) 75%,var(--ink))}
}
.section-toggle:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:4px}
/* Without the js class nothing can fold, so the control is hidden and every section stays open. */
html.js .section-body{display:none}
html.js .section-body.is-open{display:block}
html:not(.js) .section-toggle{display:none}

@media(max-width:700px){
  .section-title{gap:10px}
  .section-toggle{width:24px;height:24px}
  .section-toggle::before{border-left-width:12px;border-top-width:7px;border-bottom-width:7px;transform:translateY(-3px)}
  .section-toggle[aria-expanded=true]::before{transform:translateY(-3px) rotate(90deg)}
}

@media print{
  .section-toggle{display:none}
  html.js .section-body{display:block}
}
