/* ============================================================
   Public vs Expert frame-divergence workstation - styling

   Horizontal dumbbell: frame pill on the left, a Public dot and an
   Expert dot on a shared 0-AXIS_MAX track, joined by a line, value
   labels above. Pills sized by height only (aspect preserved).
   Scoped to .chart--frame-contrast.
   ============================================================ */

.chart--frame-contrast {
  --fc-gutter: 300px;          /* left pill column width */
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  padding: 44px 60px 36px;
  font-family: var(--font-body, 'Work Sans', sans-serif);
  color: var(--chart-grey-text, #2b2b2b);
}

.chart--frame-contrast .chart__title {
  font-size: 40px;
  line-height: 1.12;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.chart--frame-contrast .chart__subtitle {
  font-size: 20px;
  line-height: 1.3;
  color: var(--chart-grey-muted, #6b6b6b);
  margin: 0 0 22px;
}

.fc-legend {
  display: flex;
  gap: 32px;
  margin-bottom: 24px;
}
.fc-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 700;
}
.fc-legend__dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.fc-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Soft vertical gridlines, behind the rows, spanning the track area
   only (offset by the gutter + row gap so they align with the dots
   and the axis ticks). */
.fc-grid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--fc-gutter) + 28px);
  right: 0;
  z-index: 0;
  pointer-events: none;
}
.fc-gridline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #ececec;
}

/* Divider between the public-led and expert-led blocks. */
.fc-divider {
  flex: 0 0 auto;
  height: 0;
  border-top: 1px solid #e3e3e3;
  margin: 6px 0;
  position: relative;
  z-index: 1;
}

.fc-row {
  position: relative;
  z-index: 1;              /* sit above the gridline layer */
  flex: 1;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 0;
}

/* Fixed-width left column; pill right-aligned so it abuts the track
   consistently regardless of pill width. */
.fc-pillwrap {
  flex: 0 0 var(--fc-gutter);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.fc-pill {
  height: 38px;
  width: auto;
  display: block;
}

/* Quiet link wrapper around a pill. No visible affordance at rest;
   a faint dim + pointer cursor only on hover, so the link is
   discoverable without advertising itself. */
.fc-pilllink {
  display: inline-flex;
  text-decoration: none;
  cursor: pointer;
  border-radius: 999px;
  transition: opacity 0.15s ease;
}
.fc-pilllink:hover { opacity: 0.78; }
.fc-pilllink:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

.fc-track {
  position: relative;
  flex: 1;
  height: 100%;
}

.fc-line {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: #d3d7dd;
  border-radius: 2px;
}

.fc-dot {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px #fff;   /* separate overlapping dots / line */
}

.fc-val {
  position: absolute;
  top: calc(50% - 34px);
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1;
}

.fc-axis {
  display: flex;
  gap: 28px;               /* match .fc-row gap so ticks align with tracks */
  margin-top: 8px;
}
.fc-axis__spacer {
  flex: 0 0 var(--fc-gutter);
}
.fc-axis__ticks {
  position: relative;
  flex: 1;
  height: 26px;
  border-top: 1px solid #e6e6e6;
}
.fc-axis__tick {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  font-size: 15px;
  color: #9aa0a6;
  font-variant-numeric: tabular-nums;
  /* The last tick sits at left:100% (right edge of the slot), so it has
     ~0px of available width to its right. Without nowrap the browser
     shrink-wraps it to min-content and stacks "30%" onto three lines.
     nowrap keeps it on one line; the JS translateX(-100%) then anchors
     it inward. */
  white-space: nowrap;
}

/* ============================================================
   Report context overrides

   The chart is built for a portrait half-slide frame (~1920px wide)
   in the workshop, so its native type and spacing are slide-scale.
   In the report it sits in a narrow article column, so it needs a
   fixed height (flex rows have no height to fill otherwise) and
   scaled-down typography. Scoped to the report host id+class so the
   workshop host (.ws-chart-host) is unaffected.

   The 28px row-gap / axis-gap / grid-offset trio stays synced here
   too: all three drop to 18px together.
   ============================================================ */
#chart-frame-contrast.chart-container {
  height: 560px;
}

#chart-frame-contrast.chart-container .chart--frame-contrast {
  --fc-gutter: 160px;
  padding: 8px 12px 4px 4px;  /* small right margin past the right-anchored 30% tick */
}
#chart-frame-contrast.chart-container .chart__title {
  font-size: 22px;
  margin: 0 0 4px;
}
#chart-frame-contrast.chart-container .chart__subtitle {
  font-size: 13px;
  margin: 0 0 14px;
}
#chart-frame-contrast.chart-container .fc-legend {
  gap: 22px;
  margin-bottom: 16px;
}
#chart-frame-contrast.chart-container .fc-legend__item { font-size: 14px; }
#chart-frame-contrast.chart-container .fc-legend__dot { width: 13px; height: 13px; }
#chart-frame-contrast.chart-container .fc-grid { left: calc(var(--fc-gutter) + 18px); }
#chart-frame-contrast.chart-container .fc-row { gap: 18px; }
#chart-frame-contrast.chart-container .fc-pill { height: 24px; }
#chart-frame-contrast.chart-container .fc-line { height: 3px; }
#chart-frame-contrast.chart-container .fc-dot {
  width: 17px;
  height: 17px;
  box-shadow: 0 0 0 2px #fff;
}
#chart-frame-contrast.chart-container .fc-val {
  top: calc(50% - 24px);
  font-size: 14px;
}
#chart-frame-contrast.chart-container .fc-axis { gap: 18px; }
#chart-frame-contrast.chart-container .fc-axis__tick { font-size: 12px; }
