/* St. John Almanac: the wind section's own charts for its plain pages (a place, a storm, the two lists).
   The shell's parts (the head, tiles, a dial, picture cards, folds) are in assets/almanac.css; only what the
   shell does not have is here: the bars of modelled gusts, the sixteen-direction rose, and a drawing in a card.
   Colours are the shell's tokens, so day and night follow the reader's choice. */

/* a row for each storm or place: its modelled gust as a bar, its likely range as a line over the bar */
.wbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.wbars > li { display: grid; grid-template-columns: minmax(6.5rem, 11rem) minmax(0, 1fr) 7.2rem; gap: 0.3rem 0.8rem; align-items: center; font-size: 0.94rem; }
.wbar-name { min-width: 0; overflow-wrap: anywhere; }
.wbar-track { position: relative; height: 1.15rem; border-radius: 6px; background: var(--water); border: 1px solid var(--water-edge); overflow: hidden; }
.wbar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px 0 0 5px; background: var(--accent); opacity: 0.55; }
.wbar-fill--1 { opacity: 0.7; }
.wbar-fill--3 { opacity: 0.85; }
.wbar-fill--5 { opacity: 1; }
.wbar-range { position: absolute; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--gold); z-index: 1; }
.wbar-range::before, .wbar-range::after { content: ""; position: absolute; top: -4px; width: 2px; height: 11px; background: var(--gold); }
.wbar-range::before { left: 0; }
.wbar-range::after { right: 0; }
.wbar-n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.wbar-n b { color: var(--ink); font-size: 1.05rem; }
@media (max-width: 36rem) {
  .wbars > li { grid-template-columns: minmax(0, 1fr) auto; }
  .wbar-track { grid-column: 1 / -1; grid-row: 2; }
}

/* the rose beside its tiles */
.wsplit { display: grid; grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr); gap: 1.25rem 1.5rem; align-items: start; }
.wsplit > .tiles { grid-template-columns: repeat(auto-fill, minmax(min(11rem, 100%), 1fr)); }
@media (max-width: 44rem) { .wsplit { grid-template-columns: 1fr; } .wrose { max-width: 19rem; } }
.wrose { margin: 0; }
.wrose svg { display: block; width: 100%; height: auto; overflow: visible; }
.wrose figcaption { margin-top: 0.5rem; font-size: var(--step--1); line-height: 1.45; color: var(--ink-soft); }
.wrose-spoke { stroke: var(--rule); stroke-width: 0.6; }
.wrose-ring { fill: none; stroke: var(--water-edge); stroke-width: 0.8; stroke-dasharray: 2 3; }
.wrose-ring--one { stroke: var(--ink-soft); stroke-width: 1.6; stroke-dasharray: none; }
.wrose-shape { fill: var(--accent); fill-opacity: 0.28; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.wrose-lee { fill: var(--gold); stroke: var(--sheet); stroke-width: 1.2; }
.wrose-t { font: 600 10px var(--text, sans-serif); fill: var(--ink-soft); text-anchor: middle; }

/* a few tiles that fill their row (the shell's grid keeps empty columns for the many) */
.tiles--fit { grid-template-columns: repeat(auto-fit, minmax(min(10.5rem, 46%), 1fr)); }

/* in the tool: the chosen place's card, and a storm's name as a plain button in the bars */
.pic-card.is-chosen { outline: 3px solid var(--accent); outline-offset: 2px; }
.wbar-name .linkish { all: unset; cursor: pointer; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.wbar-name .linkish:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* a tile that holds a dial beside its sentence: on a narrow phone it takes the whole row (the shell's wide tile
   falls back to one column there, which leaves no room for both) */
.wdial-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.wdial-row > .tile-say { flex: 1 1 8.5rem; min-width: 0; }
@media (max-width: 24rem) { .tiles > .tile.tile--row { grid-column: 1 / -1; } }

/* a word, not a number, as a tile's figure */
.tile-word { font-size: 0.62em; line-height: 1.15; display: inline-block; }

/* a card whose picture is this section's drawing of the ground round the place, not a photograph */
a.pic-card-pic { display: block; }
.pic-card h3 a { color: inherit; text-decoration: none; }
.pic-card h3 a:hover { text-decoration: underline; }
.pic-grid--small .pic-card h3 { font-size: 1.15rem; }
.pic-grid--small .pic-card-in { padding: 0.7rem 0.8rem 0.8rem; gap: 0.3rem; }
.pic-grid--small .pic-card-line { font-size: 0.86rem; line-height: 1.4; color: var(--ink-soft); }
.pic-grid--small .pic-card-sub { font-size: 0.7rem; line-height: 1.3; }
