/* Forecast Desk route styles.
 *
 * Scoped under .forecast-page. Everything structural (.module, .tt, .chip and
 * the .t-* / .d-* ramps) comes from instrument.css via theme.css; this file only
 * adds the layout and the two or three objects unique to the Desk. Per DESIGN.md
 * there are no page-level inline styles, no hue on data, and no shadow at rest.
 */

.forecast-page .forecast-hero {
  padding: var(--sp-4, 40px) 0 var(--sp-3, 24px);
}

.forecast-page .forecast-hero h1 {
  margin: 6px 0 10px;
}

.forecast-page .forecast-hero .hero-tagline {
  color: var(--ink-1);
  margin: 0 0 8px;
}

.forecast-page .forecast-hero .hero-copy {
  color: var(--ink-1);
  max-width: 74ch;
  margin: 0;
}

.forecast-page .forecast-hero .kicker a {
  color: inherit;
}

/* Wide tables scroll inside their own container; the page keeps one left edge. */
.forecast-page .forecast-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.forecast-page .forecast-board {
  min-width: 720px;
}

.forecast-page .forecast-board td,
.forecast-page .forecast-board th {
  vertical-align: middle;
}

/* A probability is a magnitude, not a direction: neutral ink, never green/red. */
.forecast-page .forecast-prob {
  color: var(--ink-0);
  font-variant-numeric: tabular-nums;
}

.forecast-page .forecast-prob.is-empty {
  color: var(--ink-2);
}

.forecast-page .forecast-prob-cell {
  width: 5.5rem;
  white-space: nowrap;
}

.forecast-page .forecast-chip-provisional {
  border-style: dashed;
}

.forecast-page .forecast-evidence-strong,
.forecast-page .forecast-evidence-limited,
.forecast-page .forecast-evidence-insufficient,
.forecast-page .forecast-evidence-unmeasured {
  border-color: var(--rule-strong);
  background: var(--surface-2);
  color: var(--ink-1);
}

.forecast-page .forecast-chip-void,
.forecast-page .forecast-chip-member {
  color: var(--ink-2);
}

.forecast-page .forecast-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3, 24px);
  margin: var(--sp-3, 24px) 0;
}

.forecast-page .forecast-method {
  margin: 0;
  padding-left: 1.2em;
  color: var(--ink-1);
}

.forecast-page .forecast-method li {
  margin-bottom: var(--sp-1, 8px);
  max-width: 82ch;
}

.forecast-page .forecast-endpoints,
.forecast-page .forecast-evidence {
  margin: var(--sp-1, 8px) 0 0;
  padding-left: 1.1em;
}

.forecast-page .forecast-endpoints li,
.forecast-page .forecast-evidence li {
  margin-bottom: 4px;
}

.forecast-page .forecast-calendar-links {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.forecast-page .forecast-calendar-links a {
  color: var(--ink-1);
  font: 500 12px/1.5 var(--mono);
  text-decoration: none;
}
.forecast-page .forecast-calendar-links a:hover {
  color: var(--ink-0);
  text-decoration: underline;
}

.forecast-page .forecast-scorecard {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3, 24px);
  margin: 0 0 var(--sp-2, 16px);
  padding: 0;
  list-style: none;
}

.forecast-page .forecast-scorecard li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.forecast-page .forecast-building {
  border: 1px dashed var(--rule-strong, var(--rule));
  border-radius: var(--r, 6px);
  background: var(--surface-2);
  color: var(--ink-1);
  padding: var(--sp-2, 16px);
  margin: 0 0 var(--sp-3, 24px);
  max-width: 82ch;
}

.forecast-page .forecast-criterion {
  margin: 0;
  max-width: 82ch;
  color: var(--ink-0);
}

.forecast-page .forecast-facts {
  min-width: 0;
}

/* A fact table reads as label/value pairs, so both columns align left. The
 * shared `.tt td:last-child` right-aligns the last cell, which is right for a
 * numeric column and wrong here: it pushed each value to the far edge of the
 * 1280px canvas, a screen width away from the label naming it.
 *
 * The selector must name `:last-child` too. `.forecast-page .forecast-facts td`
 * ties `.tt td:last-child` at (0,2,1), and instrument.css arrives through the
 * @import on line 1 of theme.css, which loads after this file, so on a tie the
 * shared rule wins. Specificity, not source order, is the lever here. */
.forecast-page .forecast-facts th,
.forecast-page .forecast-facts td,
.forecast-page .forecast-facts td:last-child {
  text-align: left;
}

.forecast-page .forecast-facts th {
  width: 9rem;
  white-space: nowrap;
}

/* The state cell can hold two chips (state plus method). It stays a table-cell:
 * making it a flex container takes it out of the row's layout, which drops the
 * row rule and lets the chips escape the cell. Width and line-height give the
 * pair room to wrap tidily instead. */
.forecast-page .forecast-board td:last-child {
  min-width: 9.5rem;
  line-height: 1.9;
}

.forecast-page .forecast-spark-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-2, 16px);
  margin-top: var(--sp-2, 16px);
  padding-top: var(--sp-2, 16px);
  border-top: 1px solid var(--rule);
}

.forecast-page .forecast-spark {
  color: var(--ink-0);
  display: block;
}

.forecast-page .forecast-scoreline {
  margin: 0 0 4px;
}

@media (max-width: 860px) {
  .forecast-page .forecast-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .forecast-page .forecast-facts th {
    width: 7rem;
  }
}
