/* The article on wind direction (/blog/windrichting/). Loaded after site.css and built from its
   tokens. Every figure is a compass: north up, the nature in the middle. Data wears Natura green
   and ink: the sensitive hexagons and a 0,00 result in green, deposition and results above 0,00
   in ink. A building site is a parcel and wears the parcel's Signal Brick, as on the homepage. */

.wr { background: var(--paper); }
.wr-green { color: var(--n2k-deep); }
.wr p, .wr dd, .wr figcaption { text-wrap-style: pretty; }

/* ---------- Opening: the claim and its legend left, the compass right ---------- */
.wr-open { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding-top: clamp(1.75rem, 3.5vw, 3rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.wr-title { max-width: 14.5em; margin-bottom: 0.6em; font-size: clamp(2rem, 3.3vw, 2.95rem); line-height: 1.06; }
.wr-intro .lead { max-width: 34rem; }
.wr-key { list-style: none; margin-top: clamp(1.4rem, 2.4vw, 2rem); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.wr-key li { display: grid; grid-template-columns: 22px 10.2rem minmax(0, 1fr); gap: 0 0.85rem; align-items: center; padding: 0.8rem 0; }
.wr-key li + li { border-top: 1px solid var(--line); }
.wr-key b small { font-size: 0.5em; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.wr-key b { font-size: clamp(2rem, 3vw, 2.7rem); font-weight: 650; line-height: 1; letter-spacing: -0.03em; font-variation-settings: "opsz" 96; white-space: nowrap; }
.wr-key span { font-size: 0.95rem; line-height: 1.45; color: var(--ink-2); }
.wr-key-symbol { width: 22px; height: 22px; overflow: visible; }

/* ---------- The compass ---------- */
.wr-compass { margin: 0; }
.wr-compass-stage { position: relative; aspect-ratio: 1; }
/* the day of publication, pinned to the top right of the compass; its key word leads to the list */
.wr-date { top: 0; right: 0; z-index: 2; }
.wr-date a { text-decoration: none; }
/* stickers on the compass: the chosen site's value and the area's name */
.wr-sticker { --gap: 22px; position: absolute; z-index: 1; padding: 4px 9px; background: #fff; border: 1px solid var(--line-2); border-radius: 3px; box-shadow: var(--shadow-label); font-size: 14px; font-weight: 500; line-height: 1.25; color: var(--ink-2); white-space: nowrap; pointer-events: none; transition: left 0.3s var(--ease), top 0.3s var(--ease); }
.wr-sticker::after { content: ""; position: absolute; width: 8px; height: 8px; background: #fff; border: 0 solid var(--line-2); }
.wr-sticker.is-up { transform: translate(-50%, calc(-100% - var(--gap))); }
.wr-sticker.is-up::after { left: 50%; bottom: -5px; border-width: 0 1px 1px 0; transform: translateX(-50%) rotate(45deg); }
.wr-sticker.is-down { transform: translate(-50%, var(--gap)); }
.wr-sticker.is-down::after { left: 50%; top: -5px; border-width: 1px 0 0 1px; transform: translateX(-50%) rotate(45deg); }
.wr-sticker.is-left { transform: translate(calc(-100% - var(--gap)), -50%); }
.wr-sticker.is-left::after { top: 50%; right: -5px; border-width: 1px 1px 0 0; transform: translateY(-50%) rotate(45deg); }
.wr-sticker.is-right { transform: translate(var(--gap), -50%); }
.wr-sticker.is-right::after { top: 50%; left: -5px; border-width: 0 0 1px 1px; transform: translateY(-50%) rotate(45deg); }
.wr-sticker b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.wr-sticker-n2k { --gap: 8px; color: var(--n2k-deep); font-weight: 600; border-color: rgba(47, 125, 79, 0.5); }
.wr-sticker-n2k::after { border-color: rgba(47, 125, 79, 0.5); }
.wr-site-g.is-on .wr-site-value { opacity: 0; }
.wr-compass svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wr-disc-ground { fill: #f2f2ee; }
.wr-compass image { opacity: 0.82; }
.wr-area { fill: rgba(255, 255, 255, 0.35); stroke: var(--n2k-deep); stroke-width: 1.5px; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.wr-hex { fill: var(--n2k); fill-opacity: 0.62; stroke: #fff; stroke-opacity: 0.9; stroke-width: 0.75px; vector-effect: non-scaling-stroke; }
.wr-ink path { fill: var(--ink); transition: fill-opacity 0.35s var(--ease); }
.wr-ring { fill: none; stroke: var(--ink); stroke-opacity: 0.6; stroke-width: 1.25px; stroke-dasharray: 5 6; vector-effect: non-scaling-stroke; }
.wr-zero-line { fill: none; stroke: var(--ink); stroke-width: 2.75px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.wr-check { fill: #fff; stroke: var(--ink); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.wr-rim { fill: none; stroke: var(--ink); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.wr-ticks line { stroke: var(--ink); stroke-width: 1.25px; vector-effect: non-scaling-stroke; }
.wr-ticks .wr-tick-major { stroke-width: 2.25px; }
.wr-letter { font-size: 30px; font-weight: 650; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.wr-site-g { cursor: pointer; outline: none; }
.wr-site-hit { fill: transparent; }
.wr-site { fill: var(--signal); stroke: #fff; stroke-width: 2.5px; vector-effect: non-scaling-stroke; transition: r 0.25s var(--ease); }
.wr-site-g.is-on .wr-site { stroke: var(--signal-2); stroke-width: 3px; }
.wr-site-g.is-on .wr-site-hit { fill: rgba(255, 255, 255, 0.55); stroke: var(--signal-2); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.wr-site-g:focus-visible .wr-site-hit { stroke: var(--ink); stroke-width: 2px; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.wr-site-value { font-size: 27px; font-weight: 650; fill: var(--ink); text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: #fff; stroke-width: 7px; stroke-linejoin: round; pointer-events: none; }
.wr-scale line { stroke: var(--ink); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.wr-scale text { font-size: 24px; font-weight: 500; fill: var(--ink-2); }
.wr-compass figcaption { max-width: 36rem; margin: 0.4rem auto 0; }
.wr-readout { margin: 0 0 0.45rem; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.wr-readout b { font-weight: 650; color: var(--ink); }
.wr-note, .wr-stand, .wr-polar figcaption, .wr-rose figcaption { font-size: 0.85rem; line-height: 1.5; color: var(--muted); }
.wr-note { margin: 0; }
.wr-lesson { margin: 0 0 0.35rem; font-size: 1.05rem; font-weight: 650; line-height: 1.4; color: var(--ink); }
/* the drawn legend under a figure: symbol, then a few words */
.wr-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem 1.4rem; margin: 0.7rem 0 0; font-size: 0.88rem; line-height: 1.4; color: var(--ink-2); }
.wr-legend li { display: flex; align-items: center; gap: 0.5rem; }
.wr-legend svg { flex: none; width: 30px; height: 22px; overflow: visible; }
.wr-legend .wr-ring { stroke-dasharray: 4 4; }
.wr-legend-lines { margin-top: 1.1rem; }
/* the magnified sensitive hexagons in the bottom right corner of the compass */
.wr-frame { fill: none; stroke: var(--ink); stroke-width: 1.5px; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.wr-inset-panel { fill: #fff; stroke: var(--line-2); stroke-width: 1px; vector-effect: non-scaling-stroke; filter: drop-shadow(0 6px 10px rgba(22, 32, 26, 0.22)); }
.wr-area-inset { fill: rgba(127, 183, 216, 0.25); }
.wr-inset .wr-hex { stroke-width: 1px; }
.wr-peak { fill: none; stroke: var(--signal-2); stroke-width: 2.5px; vector-effect: non-scaling-stroke; transition: cx 0.35s var(--ease), cy 0.35s var(--ease); }
.wr-inset-title { font-size: 26px; font-weight: 650; fill: var(--ink); }
.wr-sticker-line { font-size: 13px; color: var(--ink-2); }
.wr-sticker-zero { font-weight: 650; color: var(--ink); }

/* ---------- Bands, headings ---------- */
.wr-band { padding: var(--space-section) 0; background: var(--ground); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wr-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.wr-head h2 { max-width: 22em; }
.wr-head p { margin: 0; color: var(--ink-2); }

/* ---------- Measuring lines: per side, every calculation as a dot ---------- */
/* one bar per side: dark is too close (above 0,00), the light green track beyond is far enough */
.wr-bars { list-style: none; border-top: 1px solid var(--line-2); }
.wr-bars li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.wr-bar-track { position: relative; height: 22px; border-radius: 3px; background: var(--n2k-soft); box-shadow: inset 0 0 0 1px rgba(47, 125, 79, 0.25); overflow: hidden; }
.wr-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); border-radius: 3px 0 0 3px; transform-origin: left center; }
.wr-bars .is-key .wr-line-side { color: var(--ink); font-weight: 650; }
.wr-bars .is-key .wr-line-value { font-size: 1.25rem; }
.wr-bars.is-ready .wr-bar { transform: scaleX(0); }
.wr-bars.is-playing .wr-bar { transform: none; transition: transform 1.1s var(--ease) calc(var(--i) * 90ms); }
.wr-bar-key { display: inline-block; width: 26px; height: 14px; border-radius: 2px; background: var(--ink); }
.wr-bar-key.is-zero { background: var(--n2k-soft); box-shadow: inset 0 0 0 1px rgba(47, 125, 79, 0.45); }
.wr-bars li, .wr-axis { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 6.2rem; gap: 0 1.25rem; align-items: center; }
.wr-line-side { font-size: 0.98rem; font-weight: 500; color: var(--ink-2); }
.wr-line-value { font-size: 1.05rem; font-weight: 650; text-align: right; white-space: nowrap; }
.wr-line-value small { font-size: 0.78em; font-weight: 500; color: var(--muted); }
.wr-axis { margin: 0.4rem 0 0; font-size: 0.82rem; color: var(--muted); }
.wr-axis-track { position: relative; height: 1.2em; }
.wr-axis-track i { position: absolute; font-style: normal; transform: translateX(-50%); white-space: nowrap; }
.wr-axis-track i:first-child { transform: none; }
.wr-axis-track i:last-child { transform: translateX(-100%); }

/* ---------- Why: the wind rose of Twente ---------- */
.wr-why { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: center; padding: var(--space-section) clamp(1.25rem, 4vw, 2.5rem); }
.wr-rose { margin: 0; max-width: 28rem; justify-self: center; width: 100%; }
.wr-rose svg { display: block; width: 100%; height: auto; overflow: visible; }
.wr-rose-ring { fill: none; stroke: var(--line-2); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.wr-rose-petals { fill: var(--ink); fill-opacity: 0.82; }
.wr-rose-pct { font-size: 24px; font-weight: 650; fill: var(--ink); text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: var(--paper); stroke-width: 6px; }
.wr-rose .wr-letter { font-size: 28px; }
.wr-why-text h2 { max-width: 18em; }
.wr-why-text p { max-width: 34rem; color: var(--ink-2); }

/* ---------- Real projects: two compasses ---------- */
.wr-polar { margin: 0; }
.wr-polar svg { display: block; width: 100%; height: auto; overflow: visible; }
.wr-polar figcaption { margin-top: 0.6rem; max-width: 36rem; }
.wr-polar-ring { fill: none; stroke: var(--line-2); stroke-width: 1px; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.wr-polar-label { font-size: 20px; font-weight: 500; fill: var(--muted); paint-order: stroke; stroke: var(--ground); stroke-width: 6px; }
.wr-polar-nature { fill: var(--n2k); fill-opacity: 0.32; stroke: var(--n2k); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.wr-rose-hex { fill: var(--n2k); fill-opacity: 0.2; stroke: var(--n2k); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.wr-count { font-size: 26px; font-weight: 650; fill: var(--ink); text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: var(--ground); stroke-width: 7px; }
.wr-count.is-big { font-size: 40px; fill: var(--n2k-deep); }
.wr-burst-site { fill: var(--signal); stroke: #fff; stroke-width: 2.5px; vector-effect: non-scaling-stroke; }
.wr-burst circle { fill: var(--ink); fill-opacity: 0.78; stroke: #fff; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.wr-burst circle:hover { fill: var(--signal-2); fill-opacity: 1; }
/* the figure of real projects plays once when it scrolls into view: the dots leave the
   building site for where their nitrogen landed, then the counts appear */
.wr-polar.is-ready .wr-burst circle { transform: translate(var(--dx), var(--dy)); opacity: 0; }
.wr-polar.is-ready [data-wr-grow] { opacity: 0; }
.wr-polar.is-playing .wr-burst circle { transform: none; opacity: 1; transition: transform 1.2s var(--ease) var(--delay), opacity 0.2s linear var(--delay); }
.wr-polar.is-playing [data-wr-grow] { opacity: 1; transition: opacity 0.8s var(--ease) 1.9s; }
.wr-real-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.wr-real-text h2 { max-width: 16em; }
.wr-real-text p { max-width: 32rem; color: var(--ink-2); }
.wr-polar { position: relative; max-width: 600px; justify-self: center; width: 100%; }

.wr-tip { position: absolute; z-index: 3; margin: 0; padding: 5px 9px; background: #fff; border: 1px solid var(--line-2); border-radius: 3px; box-shadow: var(--shadow-label); font-size: 0.85rem; font-weight: 500; line-height: 1.35; white-space: nowrap; pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); }

/* ---------- Method and close ---------- */
.wr-method { padding: var(--space-section) clamp(1.25rem, 4vw, 2.5rem) clamp(3rem, 6vw, 4.5rem); }
.wr-method h2 { max-width: 22em; margin-bottom: clamp(1.25rem, 2.4vw, 2rem); }
.wr-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.wr-facts > div { padding: 1.25rem 1.5rem 1.4rem 0; border-bottom: 1px solid var(--line); }
.wr-facts > div:nth-child(3n + 2), .wr-facts > div:nth-child(3n + 3) { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.wr-facts > div:nth-last-child(-n + 3) { border-bottom: 0; }
.wr-facts dt { margin-bottom: 0.4rem; font-size: 1.05rem; font-weight: 650; }
.wr-facts dd { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--ink-2); }
.wr-stand { margin: 1rem 0 0; }
.wr-more { border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.wr-more summary { padding: 0.95rem 0; font-weight: 600; cursor: pointer; }
.wr-more summary:hover { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 0.18em; }
.wr-more[open] summary { border-bottom: 1px solid var(--line); }
.wr-more .wr-facts { border: 0; }
.wr-close { padding-top: 0; }
.wr-back { margin: 1.5rem 0 0; }

@media (max-width: 1100px) {
  .wr-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wr-facts > div:nth-child(n) { padding: 1.25rem 1.25rem 1.4rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .wr-facts > div:nth-child(2n) { padding-left: 1.25rem; border-left: 1px solid var(--line); }
  .wr-facts > div:nth-last-child(-n + 2) { border-bottom: 0; }
}
@media (max-width: 900px) {
  .wr-open { grid-template-columns: 1fr; }
  .wr-compass { max-width: 560px; justify-self: center; width: 100%; }
  .wr-why { grid-template-columns: 1fr; }
  .wr-rose { max-width: 22rem; }
  .wr-real-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wr-key li { grid-template-columns: 22px auto; gap: 0.3rem 0.75rem; }
  .wr-key li span { grid-column: 2; }
  .wr-key b { font-size: 2rem; }
  .wr-sticker { font-size: 12px; padding: 3px 7px; }
  .wr-sticker b { font-size: 16px; }
  .wr-count { font-size: 38px; }
  .wr-count.is-big { font-size: 54px; }
  .wr-bars li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "side value" "track track"; gap: 0.15rem 0.75rem; }
  .wr-line-side { grid-area: side; font-size: 0.92rem; }
  .wr-line-value { grid-area: value; }
  .wr-bar-track { grid-area: track; }
  .wr-axis { grid-template-columns: 1fr; }
  .wr-axis > span:first-child, .wr-axis > span:last-child { display: none; }
  .wr-site-value { font-size: 44px; stroke-width: 10px; }
  .wr-letter { font-size: 44px; }
  .wr-scale text { font-size: 36px; }
  .wr-rose-pct { font-size: 34px; }
  .wr-polar-label { font-size: 30px; }
  .wr-inset-title { font-size: 40px; }
  .wr-sticker-line { font-size: 11px; padding: 2px 6px; }
  .wr-facts { grid-template-columns: 1fr; }
  .wr-facts > div:nth-child(n) { padding: 1.1rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .wr-facts > div:last-child { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wr-ink path, .wr-site, .wr-peak, .wr-bar { transition: none; }
}
