/* The Bulge — page styles, built on styles.css tokens */
.bg-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 34px; align-items: start; margin-top: 10px; }
.bg-card {
  margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 16px; box-shadow: var(--shadow); min-width: 0;
}
.bg-card figcaption { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.bg-card figcaption strong { font-family: var(--serif); color: var(--forest); font-size: 1.12rem; font-weight: 600; }
.bg-card figcaption span { font-size: .85rem; color: var(--ink-soft); }
.bg-chart { position: relative; width: 100%; min-height: 280px; }
.bg-chart-tall { min-height: 340px; }
.bg-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.bg-chart text { font-family: var(--sans); fill: var(--ink-soft); }
.bg-tip {
  position: absolute; pointer-events: none; background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); padding: 8px 10px; font-size: .82rem; line-height: 1.4;
  color: var(--ink); white-space: nowrap; z-index: 5;
}
.bg-tip .t { color: var(--ink-soft); font-weight: 600; margin-bottom: 2px; }
.bg-tip i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

.bg-list { padding-left: 1.1em; margin: 0 0 1.3em; }
.bg-list li { margin-bottom: .7em; }

.bg-controls { display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: flex-end; margin: 18px 0 18px; }
.bg-ctl { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bg-ctl label, .bg-lab { font-weight: 600; color: var(--ink); font-size: .9rem; margin: 0; }
.bg-ctl select { width: auto; min-width: min(100%, 300px); max-width: 100%; padding: 10px 12px; background: var(--white); }
.bg-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--white); }
.bg-seg button { font: inherit; font-size: .9rem; border: 0; background: transparent; color: var(--ink-soft); padding: 9px 16px; cursor: pointer; }
.bg-seg button[aria-pressed="true"] { background: var(--forest); color: #fff; }
.bg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bg-chips button {
  font: inherit; font-size: .85rem; border: 1px solid var(--line); background: var(--white); color: var(--ink-soft);
  border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.bg-chips button[aria-pressed="true"] { border-color: var(--forest); color: var(--forest); font-weight: 600; }
.bg-chips button i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.bg-seg button:focus-visible, .bg-chips button:focus-visible, .bg-table button:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }

.bg-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .85rem; color: var(--ink-soft); margin-top: 6px; }
.bg-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.bg-legend .hatch { background: repeating-linear-gradient(45deg, var(--sand-2) 0 2px, var(--white) 2px 4px); border: 1px solid var(--line); }

.bg-measures { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 22px; }
.bg-measures .num { font-variant-numeric: tabular-nums; }
.bg-quality { font-size: .9rem; color: var(--ink-soft); margin-top: 12px; }
.bg-quality.warn { color: var(--bark); }

.bg-tablewrap { overflow-x: auto; max-height: 620px; overflow-y: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.bg-table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.bg-table th, .bg-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.bg-table th { position: sticky; top: 0; background: var(--white); z-index: 1; }
.bg-table th button { font: inherit; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
.bg-table th button[aria-sort="descending"]::after { content: " ↓"; color: var(--clay); }
.bg-table th button[aria-sort="ascending"]::after { content: " ↑"; color: var(--clay); }
.bg-table .num { text-align: right; }
.bg-table tbody tr { cursor: pointer; }
.bg-table tbody tr:hover { background: var(--sand); }
.bg-table tbody tr.sel { background: #eef1e6; }
.bg-table tbody tr.nz td { font-weight: 600; color: var(--forest); border-top: 2px solid var(--line); }
.bg-bar { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bg-bar span.b { display: inline-block; height: 10px; border-radius: 3px; background: var(--moss); }
.bg-bar span.b.hot { background: var(--clay); }
.bg-flag { font-size: .8rem; color: var(--ink-soft); }
.bg-flag.warn { color: var(--bark); font-weight: 600; }
.bg-small { font-size: .9rem; }

@media (max-width: 860px) { .bg-two { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .hide-sm { display: none; }
  .bg-table th, .bg-table td { padding: 9px 10px; }
  .bg-card { padding: 16px 14px 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .bg-chart rect.bar { transition: y .35s ease, height .35s ease; }
}
