/* WaterBrief data-analysis pages: figures, tables, key points, FAQ, downloads, read-next links.
   Loaded only by story pages that use these blocks (scripts/build_waterbrief_content.py). */
.wb-keypoints { margin: 1.25rem 0 1.5rem; padding-left: 1.2rem; }
.wb-keypoints li { margin: .45rem 0; line-height: 1.55; }
.wb-figure { margin: 2rem 0; }
.wb-figure img { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto; border: 1px solid #d5e0e6; border-radius: 4px; }
.wb-figure figcaption { max-width: 640px; margin: .6rem auto 0; font-size: .86rem; line-height: 1.5; color: #4a5d6b; }
.wb-table-wrap { margin: 1.75rem 0; overflow-x: auto; }
.wb-table { width: 100%; border-collapse: collapse; font-size: .94rem; font-variant-numeric: tabular-nums; }
.wb-table caption { text-align: left; font-weight: 700; color: #00243c; padding-bottom: .55rem; }
.wb-table th, .wb-table td { padding: .5rem .65rem; text-align: right; border-bottom: 1px solid #d5e0e6; white-space: nowrap; }
.wb-table thead th { border-bottom: 2px solid #00243c; color: #00243c; font-weight: 700; }
.wb-table thead th:first-child, .wb-table tbody th { text-align: left; font-weight: 600; white-space: normal; }
.wb-table-note { margin-top: .5rem; font-size: .84rem; color: #4a5d6b; }
.wb-faq { margin: 2.5rem 0 1.5rem; padding-top: 1.25rem; border-top: 1px solid #d5e0e6; }
.wb-faq h3 { margin: 1.4rem 0 .35rem; color: #00243c; }
.wb-faq p { margin: 0; line-height: 1.6; }
.wb-downloads, .wb-readnext { margin: 2rem 0; padding: 1.1rem 1.25rem; border-left: 4px solid #008a8a; background: #f2f7f9; }
.wb-downloads h2, .wb-readnext h2 { margin: 0 0 .6rem; font-size: 1.1rem; color: #00243c; }
.wb-downloads ul, .wb-readnext ul { list-style: none; margin: 0; padding: 0; }
.wb-downloads li, .wb-readnext li { display: flex; flex-direction: column; gap: .1rem; padding: .45rem 0; border-top: 1px solid #dbe6ec; }
.wb-downloads li:first-child, .wb-readnext li:first-child { border-top: 0; }
.wb-downloads a, .wb-readnext a { font-weight: 600; color: #006e6e; }
.wb-downloads span, .wb-readnext span { font-size: .86rem; color: #4a5d6b; }
@media (max-width: 640px) { .wb-table { font-size: .86rem; } .wb-table th, .wb-table td { padding: .4rem .45rem; } }
.wb-table thead th:first-child, .wb-table tbody th { position: sticky; left: 0; background: #fff; box-shadow: 1px 0 0 #d5e0e6; }

/* Native charts (inline SVG, drawn by scripts/build_waterbrief_content.py) */
.wb-chart { margin: 2rem 0; padding: 1.1rem 1.1rem .9rem; border: 1px solid #d5e0e6; border-radius: 4px; background: #fff; }
.wb-chart-title { font-weight: 700; color: #00243c; margin: 0 0 .5rem; font-size: 1.02rem; }
.wb-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.wb-chart text { font-family: inherit; fill: #00243c; }
.wb-chart-lab { font-size: 15px; font-weight: 600; }
.wb-chart-val { font-size: 15px; font-weight: 700; }
.wb-chart-val2 { font-weight: 500; fill: #4a5d6b; }
.wb-chart-sub { font-size: 12.5px; fill: #4a5d6b; }
.wb-chart-axis { stroke: #8fa3af; stroke-width: 1; }
.wb-chart-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; list-style: none; margin: 0 0 .6rem; padding: 0; font-size: .86rem; color: #00243c; }
.wb-chart-legend i { display: inline-block; width: .75rem; height: .75rem; margin-right: .4rem; vertical-align: -1px; border-radius: 2px; }
.wb-chart p.wb-chart-source, .wb-chart p.wb-chart-note { margin: .7rem 0 0; font-size: .84rem; line-height: 1.5; color: #4a5d6b; }
.wb-chart p.wb-chart-note { margin-top: .25rem; }
@media (max-width: 520px) { .wb-chart { padding: .8rem .5rem; } .wb-chart-lab, .wb-chart-val { font-size: 16px; } .wb-chart-sub { font-size: 13px; } }

/* Gated data section and request dialog */
.wb-gate { margin: 2rem 0; padding: 1.25rem 1.4rem; border-left: 4px solid #008a8a; background: #f2f7f9; }
.wb-gate h2 { margin: 0 0 .5rem; font-size: 1.15rem; color: #00243c; }
.wb-gate p { margin: .4rem 0; line-height: 1.55; }
.wb-gate-files { list-style: none; margin: .7rem 0; padding: 0; }
.wb-gate-files li { padding: .4rem 0; border-top: 1px solid #dbe6ec; display: flex; flex-direction: column; font-weight: 600; color: #00243c; }
.wb-gate-files li:first-child { border-top: 0; }
.wb-gate-files span { font-weight: 400; font-size: .86rem; color: #4a5d6b; }
.wb-gate-how { font-size: .9rem; color: #4a5d6b; }
.wb-gate-open, .wb-gate-primary { appearance: none; border: 0; border-radius: 3px; background: #00243c; color: #fff; font: inherit; font-weight: 700; padding: .7rem 1.2rem; cursor: pointer; }
.wb-gate-open:hover, .wb-gate-primary:hover { background: #006e6e; }
.wb-gate-primary:disabled { opacity: .6; cursor: wait; }
.wb-gate-open:focus-visible, .wb-gate-primary:focus-visible, .wb-gate-link:focus-visible, .wb-gate-close:focus-visible, .wb-field input:focus-visible, .wb-field textarea:focus-visible, .wb-purposes textarea:focus-visible { outline: 3px solid #1aa6a6; outline-offset: 2px; }
.wb-gate-dialog { font-family: inherit; position: fixed; inset: 0; margin: auto; height: fit-content; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; box-sizing: border-box; padding: 0; border: 0; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 36, 60, .35); color: #00243c; }
.wb-gate-dialog::backdrop { background: rgba(0, 36, 60, .6); }
.wb-gate-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid #d5e0e6; position: sticky; top: 0; background: #fff; }
.wb-gate-head h2 { margin: 0; font-size: 1.1rem; line-height: 1.35; }
.wb-gate-close, .wb-gate-link { appearance: none; background: none; border: 0; color: #006e6e; font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; padding: .2rem; }
.wb-gate-body { padding: 1rem 1.25rem 1.4rem; }
.wb-gate-lead { margin: 0 0 1rem; line-height: 1.55; }
.wb-field { margin: 0 0 .9rem; }
.wb-field label { display: block; font-weight: 600; margin-bottom: .25rem; font-size: .92rem; }
.wb-field input, .wb-purposes textarea { width: 100%; box-sizing: border-box; font: inherit; padding: .6rem .7rem; border: 1px solid #8fa3af; border-radius: 3px; background: #fff; color: #00243c; }
.wb-field small { display: block; margin-top: .3rem; color: #4a5d6b; font-size: .82rem; line-height: 1.4; }
fieldset { border: 1px solid #d5e0e6; border-radius: 4px; margin: 0 0 1rem; padding: .7rem .9rem .9rem; }
legend { font-weight: 700; font-size: .92rem; padding: 0 .3rem; }
.wb-checkrow { display: flex; gap: .6rem; align-items: flex-start; margin: .45rem 0; }
.wb-checkrow input { margin-top: .3rem; flex: none; width: 1.05rem; height: 1.05rem; accent-color: #008a8a; }
.wb-check { font-size: .92rem; line-height: 1.5; font-weight: 400; }
.wb-check a { color: #006e6e; }
.wb-purposes textarea { margin-top: .5rem; }
.wb-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.wb-gate-error { min-height: 1.2rem; margin: .4rem 0; color: #a12622; font-weight: 600; font-size: .92rem; }
.wb-gate-ok { margin: .4rem 0; color: #006e6e; font-weight: 600; font-size: .92rem; }
.wb-gate-links { display: flex; gap: 1.2rem; margin-top: .9rem; flex-wrap: wrap; }
.wb-gate-downloads { list-style: none; margin: 0 0 1rem; padding: 0; }
.wb-gate-downloads li { padding: .6rem 0; border-top: 1px solid #d5e0e6; }
.wb-gate-downloads a { font-weight: 700; color: #006e6e; }

/* Analysis pages: text left-aligned, related links in a side column */
@media (min-width: 1100px) {
  .wc-article-body:has(.wb-aside) { display: grid; grid-template-columns: minmax(0, 740px) 300px; column-gap: 3rem; max-width: none; margin: 0; padding-left: clamp(1.5rem, 4vw, 3.5rem); padding-right: 1.5rem; justify-content: start; }
  .wc-article-body:has(.wb-aside) > * { grid-column: 1; min-width: 0; }
  .wc-article-body:has(.wb-aside) > .wb-aside { grid-column: 2; grid-row: 1 / span 40; align-self: start; position: sticky; top: 1.5rem; margin: 0; }
  .wb-aside > section, .wb-aside > nav { margin: 0 0 1.25rem; }
  .wb-aside .wb-readnext { margin-top: 0; }
  .wb-aside h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; }
  .wb-readnext h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; }
}

.wb-toc, .wb-datacard { padding: 1rem 1.25rem; background: #fff; border: 1px solid #dbe6ec; border-left: 4px solid #00243c; }
.wb-toc h2, .wb-datacard h2 { margin: 0 0 .5rem; font-size: 1rem; color: #00243c; }
.wb-toc ul { list-style: none; margin: 0; padding: 0; }
.wb-toc li { padding: .3rem 0; border-top: 1px solid #eef3f6; font-size: .92rem; }
.wb-toc li:first-child { border-top: 0; }
.wb-toc a { color: #006e6e; text-decoration: none; }
.wb-toc a:hover { text-decoration: underline; }
.wb-datacard p { margin: 0 0 .7rem; font-size: .92rem; color: #4a5d6b; }
.wb-datacard-link { display: inline-block; padding: .55rem .95rem; background: #00243c; color: #fff; font-weight: 700; text-decoration: none; border-radius: 3px; }
.wb-datacard-link:hover { background: #006e6e; }
@media (min-width: 1100px) { .wb-aside { max-height: calc(100vh - 3rem); overflow-y: auto; } }
@media (max-width: 1099px) { .wb-aside { margin: 2rem 0; } .wb-toc, .wb-datacard { margin-bottom: 1rem; } }
