/* St. John Almanac: the look of the Sun page's figures and drawings (parts.js), apart from any page's own
   layout. One copy for every page that shows them. Every colour is one of the site's tokens, so day and
   night both work. Load it after the site's stylesheet.

   What a page gives them:
     the tiles              a ul with the classes "tiles su-figures"
     a drawing              any holder; the drawing takes its holder's whole width
     a drawing's key        a ul with the class "su-key"
     the look-out's words   a box with the class "su-over" lying over the view, inside a holder that is positioned */

/* ----- the day's figures ----- */
.su-figures .tile-n { font-size: clamp(1.7rem, 2vw + 1.2rem, 2.4rem); }
.su-figures .tile-n small { font-size: 0.5em; }
.su-dash { font-family: var(--text); font-size: 0.45em; font-weight: 600; color: var(--ink-soft); padding-inline: 0.2em; }
.su-rough { color: var(--signal); }

/* ----- the drawings: the skyline with the sun's path, and the year ----- */
.su-pano, .su-carpet { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); }
.su-sky, .su-night { fill: var(--water); }
.su-land { fill: var(--land-edge); stroke: var(--ink-soft); stroke-width: 0.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-width: 1px; }
.su-grid { stroke: var(--water-edge); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.su-base { stroke: var(--ink-soft); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.su-ref { fill: none; stroke: var(--ink-soft); stroke-width: 1px; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; opacity: 0.75; }
.su-hid { fill: none; stroke: var(--ink-soft); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.su-lit { fill: none; stroke: var(--gold); stroke-width: 3.5px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.su-hour { fill: var(--sheet); stroke: var(--gold); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.su-hourt, .su-tick { fill: var(--ink-soft); font-family: var(--text); font-weight: 600; }
.su-reft { fill: var(--ink-soft); font-family: var(--text); font-weight: 600; paint-order: stroke; stroke: var(--water); stroke-width: 3px; stroke-linejoin: round; }
.su-card { fill: var(--ink); font-family: var(--text); font-weight: 700; }
.su-edge { fill: var(--signal); stroke: var(--sheet); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.su-edget { fill: var(--ink); font-family: var(--text); font-weight: 700; paint-order: stroke; stroke: var(--water); stroke-width: 3px; stroke-linejoin: round; }
.su-open { fill: var(--land-edge); }
.su-direct { fill: var(--gold); }
.su-chosen { stroke: var(--signal); stroke-width: 2px; vector-effect: non-scaling-stroke; }

/* ----- their keys ----- */
.su-key { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 0; padding: 0; list-style: none; font-size: var(--step--1); color: var(--ink-soft); }
.su-key li { display: flex; align-items: center; gap: 0.45rem; }
.su-key i { display: inline-block; width: 1.4rem; height: 0.7rem; border-radius: 2px; border: 1px solid var(--rule); }
.su-key .k-direct { background: var(--gold); }
.su-key .k-open { background: var(--land-edge); }
.su-key .k-night { background: var(--water); }
.su-key .k-lit { height: 0; border: 0; border-top: 3.5px solid var(--gold); border-radius: 0; }
.su-key .k-hid { height: 0; border: 0; border-top: 1.5px solid var(--ink-soft); border-radius: 0; }
.su-key .k-ref { height: 0; border: 0; border-top: 1.5px dashed var(--ink-soft); border-radius: 0; }

/* ----- the words laid over a look-out view ----- */
.su-over { position: absolute; inset: 0; pointer-events: none; overflow: hidden; font-family: var(--text); }
.su-over span { position: absolute; transform: translate(-50%, -50%); font-size: 0.78rem; font-weight: 700; line-height: 1; white-space: nowrap; color: var(--ink); text-shadow: 0 0 3px var(--sheet), 0 0 3px var(--sheet), 0 0 2px var(--sheet); }
.su-over .su-over-q { font-weight: 600; color: var(--ink-soft); }
.su-over .su-over-h { color: var(--gold); }
