/* Build Your Own Quietcation: live custom-vs-official comparison block.
   Sits above the slider list and updates as the user drags weights.
   Owned by Wave 8B (content + visuals). Do not modify slider timing here. */

.weight-section { background: transparent; }

.weight-headline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 880px;
  margin: 0 auto 36px;
}

.weight-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weight-card--custom {
  border-color: rgba(46, 123, 232, 0.30);
  background: linear-gradient(180deg, rgba(46, 123, 232, 0.04), transparent 60%), var(--surface);
}

.weight-card--official { border-color: rgba(15, 27, 51, 0.12); }

.weight-card-eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.weight-card-city {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.1;
}

.weight-card-score {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.weight-card-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--brand-navy);
  line-height: 1;
}

.weight-card--custom .weight-card-num { color: var(--brand-sky); }

.weight-card-rank {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.weight-card-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(15, 27, 51, 0.06);
  overflow: hidden;
  margin-top: 4px;
}

.weight-card-bar-fill {
  display: block;
  height: 100%;
  background: var(--brand-sky);
  border-radius: 3px;
  transition: width 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.weight-card--official .weight-card-bar-fill { background: var(--brand-navy); }

.weight-card-delta {
  grid-column: 1 / -1;
  padding: 14px 18px;
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  text-align: center;
}

.weight-card-delta strong {
  color: var(--brand-sky);
  font-weight: 600;
}

@media (max-width: 720px) {
  .weight-headline { grid-template-columns: 1fr; }
  .weight-card-num { font-size: 1.8rem; }
}

/* Official weights: stacked proportional bar + legend.
   Replaces the old plain-text "Noise 35%, density 20%..." caption with a
   data-vis breakdown that reads at a glance.
   Note: sections.css ".weight-note span { display: block }" has 0,1,1
   specificity. Selectors below use 0,2,0+ so this component overrides
   that legacy rule for the new pill markup. */
.weight-note.official-weights {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  display: grid;
  gap: 14px;
}
.weight-note .official-weights-eyebrow {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.weight-note .official-weights-caption {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}

.weight-note .ow-bar {
  display: flex;
  width: 100%;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15, 27, 51, 0.04) inset;
  align-items: stretch;
}
.weight-note .ow-seg {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--w, 10%);
  min-width: 30px;
  height: auto;
  transition: transform var(--dur-fast) var(--ease-responsive), filter var(--dur-fast) var(--ease-responsive);
}
.weight-note .ow-seg .ow-seg-pct {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 28px;
  height: 22px;
  padding: 0 9px;
  margin: 0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand-navy);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(15, 27, 51, 0.10);
  white-space: nowrap;
  text-transform: none;
}
.weight-note .ow-seg.ow-noise     { background: var(--brand-navy); }
.weight-note .ow-seg.ow-density   { background: #2C4F86; }
.weight-note .ow-seg.ow-visitors  { background: var(--brand-sky); }
.weight-note .ow-seg.ow-nature    { background: #6A8FBE; }
.weight-note .ow-seg.ow-commute   { background: #A6BCD7; }
.weight-note .ow-seg.ow-instagram { background: #D6E1EF; }
.weight-note .ow-seg:hover { transform: translateY(-1px); filter: brightness(1.04); }

.weight-note .ow-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}
.weight-note .ow-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: var(--ink);
}
.weight-note .ow-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: 0 0 10px;
  margin: 0;
}
.weight-note .ow-swatch.ow-noise     { background: var(--brand-navy); }
.weight-note .ow-swatch.ow-density   { background: #2C4F86; }
.weight-note .ow-swatch.ow-visitors  { background: var(--brand-sky); }
.weight-note .ow-swatch.ow-nature    { background: #6A8FBE; }
.weight-note .ow-swatch.ow-commute   { background: #A6BCD7; }
.weight-note .ow-swatch.ow-instagram { background: #D6E1EF; }
.weight-note .ow-name { display: inline-block; flex: 1; color: var(--ink-soft); font-family: var(--font-display); font-weight: 500; margin: 0; }
.weight-note .ow-pct  { display: inline-block; font-family: var(--font-mono); font-weight: 600; color: var(--brand-navy); margin: 0; }

/* Smallest two segments are too narrow to comfortably hold a pill: omit
   the inline pill and let the legend below carry the value. */
.weight-note .ow-seg.ow-commute .ow-seg-pct,
.weight-note .ow-seg.ow-instagram .ow-seg-pct { display: none; }

@media (max-width: 600px) {
  .weight-note .ow-seg.ow-nature .ow-seg-pct { display: none; }
  .weight-note .ow-bar { height: 32px; }
  .weight-note .ow-seg .ow-seg-pct { font-size: 0.72rem; min-width: 24px; padding: 0 7px; height: 18px; }
}
@media (max-width: 480px) {
  .weight-note .ow-legend { grid-template-columns: 1fr; }
  .weight-note .ow-seg .ow-seg-pct { display: none; }
  .weight-note .ow-seg.ow-noise .ow-seg-pct { display: inline-flex; }
}
