/* Risk Monitor, overview tab: styles this tab alone needs. The shared vocabulary is in style.css. Colors only from the theme. */

/* the computed paragraph */
.ov-read { font-size: 16px; line-height: 1.62; max-width: 940px; margin: 8px 0 10px; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--soft); border-radius: 0 6px 6px 0; }

/* controls drawn inside a block sit a little clear of the text above and the figure below */
#tab-ov .ctl-row { margin: 12px 0 8px; }
#tab-ov .block > h3 { margin-top: 22px; }
#tab-ov .block > .note { margin-top: 10px; }
#tab-ov .ctl > label:not(.check) { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }

/* the heat map: every cell takes a click; the whole map takes the keyboard */
.ov-heatsvg { outline: none; border-radius: 3px; }
.ov-heatsvg:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.ov-heatsvg .ov-row { cursor: pointer; }

/* the month and year menus of “Then and now”, side by side */
.ov-selects { display: flex; gap: 6px; }
.ov-selects select { width: 132px; }

/* the “Then and now” table: a measure's name may wrap; the month the reader added is tinted */
.tbl td.ov-nm { font-weight: 600; min-width: 210px; max-width: 380px; line-height: 1.35; }
.tbl th.ov-pick, .tbl td.ov-pick { background: var(--soft); }
.tbl th.ov-pick .dt { text-transform: none; letter-spacing: 0; }
.ov-fn { font-size: 9.5px; font-weight: 400; color: var(--muted); margin-left: 2px; line-height: 0; }
.ov-notes { font-size: 12px; color: var(--muted); line-height: 1.45; text-align: left; margin: 10px 0 2px; padding-left: 1.9em; columns: 2; column-gap: 34px; }
.ov-notes li { margin: 0 0 5px; break-inside: avoid; }

/* the area heading of the table under the map is as wide as the table's box and stays in view while the table
   scrolls sideways, so a long heading wraps instead of running out of sight */
#ov-heat-detail .tablewrap { container-type: inline-size; }
.tbl.ov-detail tr.sec td { padding: 8px 0; }
.ov-sechead { display: block; position: sticky; left: 0; width: 100cqw; max-width: 100%; text-align: center; padding: 0 10px; }

/* the table under the map: a reading carried forward from an earlier quarter is set apart */
.tbl td.ov-carried { color: var(--muted); font-style: italic; }

/* what moved, and the table under the map: a long indicator name wraps instead of pushing the table past its box */
.tbl.ov-moved td.nm, .tbl.ov-detail td.nm { white-space: normal; min-width: 150px; max-width: 290px; line-height: 1.3; }
.tbl td.ov-area { min-width: 120px; max-width: 180px; line-height: 1.3; font-size: 12.5px; }

@media (max-width: 760px) {
  .ov-read { font-size: 15px; padding: 12px 14px; }
  .ov-selects select { width: calc(50% - 3px); }
  .ov-notes { columns: 1; }
  /* on a phone the three fixed columns of “Then and now” fit the screen without scrolling */
  .tbl.ov-thennow { font-size: 12.5px; }
  .tbl.ov-thennow th, .tbl.ov-thennow td { padding: 7px 4px; }
  .tbl.ov-thennow td.ov-nm { min-width: 108px; max-width: 124px; font-size: 12px; line-height: 1.3; }
  .tbl.ov-thennow .dt { white-space: normal; font-size: 10px; }
}
