/* ===== v146, drawing part: the star and folder marks, the order of what you saved, and the key to how the boxes work =====
   Loaded without blocking the first paint (index.html links it with media=print and switches it on when it has arrived), so the rules that place a mark are in srl-components.css and only the drawing is here.
   Everything here is added; no rule above is changed except that the new-term dot moves from the top-right corner (where the folder mark now sits) to the bottom-right.
   A mark is the same star or folder shape every time: a thin outline while the term is not saved, dark and filled once it is. State is carried by outline against fill, never by colour alone.
   The shapes are the outline of the library's own filled star and folder, drawn as masks, so they take the text colour. */
/* where the marks sit (rules kept in srl-components.css so the first paint has them): on the map, two strips over the edges of a box, 24 pixels wide and as tall as the box; the box is 4 pixels wider on each side than the library's own (m1 140, m2 124, centre 192) and its padding grew by the same 4, so a label wraps as before; the widest left-hand boxes reach 2 pixels past the stage edge, so the scroll pane keeps 2 pixels on its left; beside a chip or a link the same marks sit in the flow of the line, a chip being one pill: star, name, folder */
:root{--srl-mk-star-o:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www%2Ew3%2Eorg/2000/svg%22%20viewBox=%220%200%20256%20256%22%3E%3Cpath%20d=%22m234.29%20114.85l-45%2038.83L203%20211.75a16.4%2016.4%200%200%201-24.5%2017.82L128%20198.49l-50.53%2031.08A16.4%2016.4%200%200%201%2053%20211.75l13.76-58.07l-45-38.83A16.46%2016.46%200%200%201%2031.08%2086l59-4.76l22.76-55.08a16.36%2016.36%200%200%201%2030.27%200l22.75%2055.08l59%204.76a16.46%2016.46%200%200%201%209.37%2028.86Z%22%20fill=%22none%22%20stroke=%22%23000%22%20stroke-width=%2222%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E");--srl-mk-star-f:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www%2Ew3%2Eorg/2000/svg%22%20viewBox=%220%200%20256%20256%22%3E%3Cpath%20d=%22m234.29%20114.85l-45%2038.83L203%20211.75a16.4%2016.4%200%200%201-24.5%2017.82L128%20198.49l-50.53%2031.08A16.4%2016.4%200%200%201%2053%20211.75l13.76-58.07l-45-38.83A16.46%2016.46%200%200%201%2031.08%2086l59-4.76l22.76-55.08a16.36%2016.36%200%200%201%2030.27%200l22.75%2055.08l59%204.76a16.46%2016.46%200%200%201%209.37%2028.86Z%22%20fill=%22%23000%22%20stroke=%22%23000%22%20stroke-width=%2222%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E");--srl-mk-fold-o:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www%2Ew3%2Eorg/2000/svg%22%20viewBox=%220%200%20256%20256%22%3E%3Cpath%20d=%22M216%2074h-85.51l-27.9-27.9a13.94%2013.94%200%200%200-9.9-4.1H40a14%2014%200%200%200-14%2014v144.62A13.39%2013.39%200%200%200%2039.38%20214h177.51A13.12%2013.12%200%200%200%20230%20200.89V88a14%2014%200%200%200-14-14Z%22%20fill=%22none%22%20stroke=%22%23000%22%20stroke-width=%2222%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E");--srl-mk-fold-f:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www%2Ew3%2Eorg/2000/svg%22%20viewBox=%220%200%20256%20256%22%3E%3Cpath%20d=%22M216%2074h-85.51l-27.9-27.9a13.94%2013.94%200%200%200-9.9-4.1H40a14%2014%200%200%200-14%2014v144.62A13.39%2013.39%200%200%200%2039.38%20214h177.51A13.12%2013.12%200%200%200%20230%20200.89V88a14%2014%200%200%200-14-14Z%22%20fill=%22%23000%22%20stroke=%22%23000%22%20stroke-width=%2222%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E");--srl-mk-fold-ol:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www%2Ew3%2Eorg/2000/svg%22%20viewBox=%220%200%20256%20256%22%3E%3Cpath%20d=%22M216%2074h-85.51l-27.9-27.9a13.94%2013.94%200%200%200-9.9-4.1H40a14%2014%200%200%200-14%2014v144.62A13.39%2013.39%200%200%200%2039.38%20214h177.51A13.12%2013.12%200%200%200%20230%20200.89V88a14%2014%200%200%200-14-14Z%22%20fill=%22none%22%20stroke=%22%23000%22%20stroke-width=%2212%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E")}
.st.mk::before,.cf.mk::before{content:"";display:block;width:14px;height:14px;background:currentColor;-webkit-mask:var(--srl-mk-star-o) center/contain no-repeat;mask:var(--srl-mk-star-o) center/contain no-repeat}
.cf.mk::before{-webkit-mask-image:var(--srl-mk-fold-o);mask-image:var(--srl-mk-fold-o)}
.st.mk[aria-pressed=true]::before{-webkit-mask-image:var(--srl-mk-star-f);mask-image:var(--srl-mk-star-f)}
.cf.mk.has::before{-webkit-mask-image:var(--srl-mk-fold-f);mask-image:var(--srl-mk-fold-f)}
.st.mk[aria-pressed=true],.cf.mk.has{color:var(--srl-text)}
.st.mk:hover,.cf.mk:hover,.cf.mk.has:hover{background:transparent;color:var(--srl-text)}

/* the marks sit inside the two top corners, 10 pixels across and 1 pixel clear of the border. The box is 4 pixels wider on each side than the library's own (m1 140, m2 124, centre 192) and its padding grew by the same 4, so the label has the room it had and wraps as before. Measured on all 2,437 maps: no label comes closer than 1 pixel to a mark */
.st.mko::before,.cf.mko::before{width:10px;height:10px}
.st.mko::before{margin:1px 0 0 1px}
.cf.mko::before{margin:1px 1px 0 0}
.st.mko:hover,.cf.mko:hover,.cf.mko.has:hover{background:var(--srl-border)}
.st.mko:focus-visible,.cf.mko:focus-visible{outline-offset:-2px}
/* the centre box is dark and the marks now sit on it, so they take the pale text colour; outline against fill still tells saved from not saved */
.mko.mkd,.st.mko.mkd[aria-pressed=true],.cf.mko.mkd.has,.st.mko.mkd:hover,.cf.mko.mkd:hover{color:var(--srl-text-on-dark)}
.st.mko.mkd:hover,.cf.mko.mkd:hover,.cf.mko.mkd.has:hover{background:color-mix(in srgb,var(--srl-text-on-dark) 22%,transparent)}
.mapstage.grow .mko{animation:srl-fade var(--srl-dur-quick) var(--srl-ease) backwards;animation-delay:calc(var(--srl-dur-slow) + 120ms)}
@media (prefers-reduced-motion:reduce){.mapstage.grow .mko{animation:none}}
.rc:hover{border-color:var(--srl-border-strong)}
.rc .rchip:hover{background:var(--srl-surface-tint)}
.rc .st.mkg:hover,.rc .cf.mkg:hover{background:var(--srl-surface-tint)}
.cf.mk.mkr::before{width:20px;height:20px;-webkit-mask-image:var(--srl-mk-fold-ol);mask-image:var(--srl-mk-fold-ol)}
.cf.mk.mkr.has::before{-webkit-mask-image:var(--srl-mk-fold-f);mask-image:var(--srl-mk-fold-f)}
.cf.mk.mkr:hover{background:var(--srl-surface-tint)}

/* the order of what you saved */
.sortbar{display:flex;align-items:center;gap:8px;padding:4px 16px 8px;flex:none}
.sortbar label{font:500 var(--srl-fs-xs) var(--srl-font);color:var(--srl-text-muted)}
.sortbar .sel{height:40px;flex:0 1 auto}
.gsort{padding:0 4px 8px}

/* the key to how the boxes work: a sample box with its three parts named, and the same box saved */
.howto{margin:12px 0 0;border:1px solid var(--srl-border);border-radius:var(--srl-radius);background:var(--srl-surface-subtle)}
.howbtn{display:inline-flex;align-items:center;gap:4px;min-height:28px;padding:2px 8px 2px 4px;border:1px solid var(--srl-border);border-radius:var(--srl-radius);background:var(--srl-surface);color:var(--srl-text);cursor:pointer;font:600 var(--srl-fs-xs) var(--srl-font)}
.howbtn:hover{background:var(--srl-surface-tint);border-color:var(--srl-border-strong)}
.howbtn .ic{flex:none;transition:transform var(--srl-dur-quick) var(--srl-ease)}
.howbtn[aria-expanded=true] .ic{transform:rotate(90deg)}
.hwrow{display:flex;flex-wrap:wrap;gap:16px 32px;padding:4px 16px 16px}
.hwfig{margin:0;flex:0 1 auto}
.hwbox{position:relative;display:flex;align-items:center;justify-content:center;width:176px;height:52px;padding:4px 28px;border:1px solid var(--srl-border-strong);border-radius:var(--srl-radius);background:var(--srl-surface);box-shadow:var(--srl-shadow-card);font:700 var(--srl-fs-xs)/16px var(--srl-font);text-align:center}
.hwbox .mk{position:absolute;top:0;display:flex;width:24px;height:100%;padding:4px 0 0;align-items:flex-start;justify-content:center;pointer-events:none}
.hwbox .mk:first-child{left:0}
.hwbox .mk:last-child{right:0}
.hwbox .mk::before{content:"";display:block;width:14px;height:14px;background:currentColor;-webkit-mask:var(--srl-mk-star-o) center/contain no-repeat;mask:var(--srl-mk-star-o) center/contain no-repeat}
.hwbox .mk:last-child::before{-webkit-mask-image:var(--srl-mk-fold-o);mask-image:var(--srl-mk-fold-o)}
.hwbox.hwon .mk{color:var(--srl-text)}
.hwbox.hwon .mk:first-child::before{-webkit-mask-image:var(--srl-mk-star-f);mask-image:var(--srl-mk-star-f)}
.hwbox.hwon .mk:last-child::before{-webkit-mask-image:var(--srl-mk-fold-f);mask-image:var(--srl-mk-fold-f)}
.hwbox .mk{color:var(--srl-text-muted)}
.hwbox::before,.hwbox::after{content:"";position:absolute;top:1px;bottom:1px;border-left:1px dashed var(--srl-border-strong)}
.hwbox::before{left:24px}
.hwbox::after{right:24px}
.hwcap{display:flex;justify-content:space-between;gap:8px;width:176px;margin:6px 0 0;padding:0;list-style:none;font-size:var(--srl-fs-xs);color:var(--srl-text-muted)}
.hwfig figcaption{width:176px;margin:6px 0 0;font-size:var(--srl-fs-xs);color:var(--srl-text-muted)}
.hwnote{flex:1 1 200px;min-width:0;margin:0;font-size:var(--srl-fs-sm);align-self:center}
.hwnote li{margin:0 0 4px}
@media (prefers-reduced-motion:reduce){.howbtn .ic{transition-duration:0s}}
@media (pointer:coarse){.howbtn{min-height:44px}}
/* the folder menu stays above the on-screen keyboard: the app sets --srl-kb to the height the keyboard covers and --srl-vvh to the height still visible */
.fmenu{bottom:calc(var(--srl-inset) + var(--srl-kb,0px));max-height:min(70dvh,480px,calc(var(--srl-vvh,100dvh) - 2 * var(--srl-inset)))}
@media (min-width:901px){.fmenu{bottom:auto;max-height:min(70dvh,480px)}}
@media (pointer:coarse){.sortbar .sel{height:44px}}
@media (forced-colors:active){
  .st.mk::before,.cf.mk::before,.hwbox .mk::before{forced-color-adjust:none;background:CanvasText}
  .howto,.hwbox{border:1px solid CanvasText}
  .cf.mk.has{outline:0}
}
