/* Methodology page: editorial layout matching the Senate analysis page. */
.mx-page { padding-bottom: 72px; }
.mx-masthead { max-width: 820px; margin: 0 auto; padding: 52px 0 30px; text-align: center; }
.mx-kicker { margin: 0 0 14px; color: var(--blue); font: 700 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.mx-masthead h1 { margin: 0; font-family: var(--serif); font-size: clamp(2.3rem, 5.2vw, 3.7rem); line-height: 1.04; letter-spacing: -.01em; }
.mx-dek { max-width: 680px; margin: 18px auto 0; color: var(--ink-soft); font-family: var(--serif); font-size: clamp(1.1rem, 1.6vw, 1.28rem); line-height: 1.5; }
.mx-byline { margin: 20px 0 0; color: var(--muted); font: 400 13.5px/1.4 var(--sans); }
.mx-byline a { color: var(--ink); font-weight: 700; text-decoration: none; }
.mx-byline a:hover { text-decoration: underline; }

.mx-jump { position: sticky; top: 56px; z-index: 20; display: flex; gap: 4px 22px; overflow-x: auto; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper); scrollbar-width: none; }
.mx-jump::-webkit-scrollbar { display: none; }
.mx-jump a { flex: 0 0 auto; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.mx-jump a:hover { color: var(--ink); }

/* At-a-glance numbers. */
.mx-glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 32px 0 0; border-bottom: 1px solid var(--rule); }
.mx-glance__item { padding: 6px 20px 22px; border-left: 1px solid var(--rule-faint); }
.mx-glance__item:first-child { padding-left: 0; border-left: 0; }
.mx-glance__value { display: block; font: 700 clamp(1.9rem, 3.4vw, 2.6rem)/1.05 var(--serif); color: var(--ink); }
.mx-glance__value--dem { color: var(--blue); }
.mx-glance__value--rep { color: var(--red); }
.mx-glance__label { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.4; }

/* Model sections: sticky label column + content column. */
.mx-model { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 40px; padding: 56px 0 8px; border-bottom: 1px solid var(--rule); scroll-margin-top: 100px; }
.mx-model:last-of-type { border-bottom: 0; }
.mx-model__aside { position: relative; }
.mx-model__aside-inner { position: sticky; top: 112px; }
.mx-model__tag { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 4px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-soft); font: 700 11px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.mx-model__tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mx-accent, var(--blue)); }
.mx-model__aside h2 { margin: 0; font-family: var(--serif); font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.1; }
.mx-model__lede { margin: 14px 0 0; color: var(--ink-soft); font-family: var(--serif); font-size: 1.05rem; line-height: 1.5; }
.mx-model__body > p { max-width: var(--measure); color: var(--ink-soft); line-height: 1.65; }
.mx-model--senate { --mx-accent: linear-gradient(90deg, var(--blue) 50%, var(--red) 50%); }
.mx-model--senate .mx-model__tag::before { background: linear-gradient(90deg, var(--blue) 50%, var(--red) 50%); }
.mx-model--governor { --mx-accent: var(--purple); }
.mx-model--house { --mx-accent: var(--amber); }
.mx-model--local { --mx-accent: var(--neutral); }
.mx-badge { display: inline-block; margin-left: 4px; padding: 2px 7px; border-radius: 3px; background: var(--purple-pale); color: var(--purple); font: 700 10.5px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
.mx-warning { margin: 0 0 22px; padding: 12px 16px; border-left: 3px solid var(--amber); background: var(--amber-pale); color: var(--ink); font-size: 14.5px; line-height: 1.5; }

/* Pipeline strip. */
.mx-pipeline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.mx-pipeline li { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.mx-pipeline a { padding: 6px 11px; border: 1px solid var(--rule); border-radius: 999px; color: inherit; text-decoration: none; background: var(--neutral-pale); }
.mx-pipeline a:hover { border-color: var(--ink-soft); color: var(--ink); }
.mx-pipeline li + li::before { content: "→"; color: var(--muted-light); }

/* Steps as a numbered timeline. */
.mx-steps { position: relative; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.mx-steps::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 17px; width: 2px; background: linear-gradient(var(--rule), var(--rule-faint)); }
.mx-step { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 20px; padding: 0 0 30px; scroll-margin-top: 110px; }
.mx-step__num { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--rule); border-radius: 50%; background: var(--paper); color: var(--ink); font: 700 15px/1 var(--sans); }
.mx-model--senate .mx-step__num { border-color: var(--blue); }
.mx-model--governor .mx-step__num { border-color: var(--purple); }
.mx-model--local .mx-step__num { border-color: var(--neutral); }
.mx-step h3 { margin: 6px 0 8px; font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.mx-step p { max-width: var(--measure); margin: 0 0 10px; color: var(--ink-soft); line-height: 1.65; }
.mx-formula { display: inline-block; margin: 4px 0 0; padding: 9px 14px; border: 1px solid var(--rule); border-radius: 6px; background: #0c0d0e; color: var(--ink); font: 500 14px/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.mx-formula code { font: inherit; }

/* Small explanatory graphics. */
.mx-figure { max-width: 560px; margin: 14px 0 6px; }
.mx-figure figcaption { margin-top: 6px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.mx-weights { display: flex; height: 30px; overflow: hidden; border-radius: 4px; font: 700 12px/30px var(--sans); }
.mx-weights span { padding: 0 8px; white-space: nowrap; color: #0d0f11; }
.mx-weights .w16 { flex: 10; background: #3c5a73; color: var(--ink); }
.mx-weights .w20 { flex: 15; background: #3f7fae; color: var(--ink); }
.mx-weights .w24 { flex: 75; background: var(--blue); }
.mx-scale { display: grid; grid-template-columns: 1.5fr 1.3fr 1fr 1.4fr 1fr 1.3fr 1.5fr; height: 28px; overflow: hidden; border-radius: 4px; font: 700 11px/28px var(--sans); text-align: center; color: var(--ink); }
.mx-scale span { overflow: hidden; white-space: nowrap; }
.mx-scale .sd { background: #1f6fae; } .mx-scale .ld { background: #3f8fca; } .mx-scale .lnd { background: #8cc1e8; color: #0d0f11; }
.mx-scale .tu { background: #5d6268; }
.mx-scale .lnr { background: #ef9f9a; color: #0d0f11; } .mx-scale .lr { background: #d9605a; } .mx-scale .sr { background: #b23a35; }
.mx-scale-ticks { display: flex; justify-content: space-between; margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.mx-curve { width: 100%; height: auto; }
.mx-curve .axis { stroke: var(--rule); stroke-width: 1; }
.mx-curve .cap { stroke: var(--muted-light); stroke-dasharray: 4 4; stroke-width: 1; }
.mx-curve .line { fill: none; stroke: var(--blue); stroke-width: 2.5; }
.mx-curve text { fill: var(--muted); font: 500 11px var(--sans); }

/* Fine print. */
.mx-notes { margin: 18px 0 40px; padding: 22px 24px; border: 1px solid var(--rule); border-radius: 8px; background: var(--neutral-pale); }
.mx-notes h3 { margin: 0 0 12px; font: 700 12px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mx-notes p { max-width: var(--measure); margin: 0 0 12px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.mx-notes .source-note { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--rule-faint); color: var(--muted); font-size: 13px; }
.mx-model code:not(.mx-formula code) { padding: 1px 5px; border-radius: 3px; background: var(--neutral-pale); font-size: .9em; }

@media (max-width: 860px) {
  .mx-model { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 40px; }
  .mx-model__aside-inner { position: static; }
  .mx-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mx-glance__item:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 600px) {
  .mx-masthead { padding-top: 34px; text-align: left; }
  .mx-dek { margin-left: 0; }
  .mx-glance__item { padding: 4px 12px 18px; }
  .mx-glance__item:nth-child(odd) { padding-left: 0; border-left: 0; }
  .mx-notes { padding: 18px 16px; }
  .mx-scale { font-size: 9.5px; }
}

.mx-kicker, .mx-model__tag, .mx-glance__label, .mx-byline, .mx-notes h3, .mx-figure figcaption { font-family: var(--sans) !important; }
.mx-model__tag { font-size: 11px !important; font-weight: 700 !important; }
.mx-masthead .mx-kicker { color: var(--blue); }
.mx-masthead .mx-byline { color: var(--muted); font-size: 13.5px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.mx-masthead .eyebrow { justify-content: center; gap: 6px; }
.mx-masthead .mx-byline { font-weight: 400; }
@media (max-width: 600px) { .mx-masthead .eyebrow { justify-content: flex-start; } }

/* About page: shares the methodology masthead. */
.about-page .mx-dek a { color: var(--ink); }
.ab-section { max-width: 980px; margin: 0 auto; padding: 40px 0 8px; border-top: 1px solid var(--rule); }
.ab-section h2 { margin: 0 0 18px; font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.ab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; padding: 0; list-style: none; }
.ab-grid li { padding: 16px 0; border-top: 1px solid var(--rule-faint); }
.ab-grid li:nth-child(-n + 2) { border-top: 0; padding-top: 0; }
.ab-grid a { color: var(--ink); font: 700 16px/1.3 var(--sans); text-decoration: none; }
.ab-grid a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ab-grid p { margin: 6px 0 0; color: var(--ink-soft); font-family: var(--serif); font-size: 1rem; line-height: 1.5; }
.ab-tag { margin-left: 6px; padding: 2px 6px; border: 1px solid var(--rule); border-radius: 4px; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; vertical-align: 2px; }
.ab-list { margin: 0; padding: 0; list-style: none; }
.ab-list li { padding: 14px 0; border-top: 1px solid var(--rule-faint); color: var(--ink-soft); font-family: var(--serif); font-size: 1.04rem; line-height: 1.55; }
.ab-list li:first-child { border-top: 0; padding-top: 0; }
.ab-list strong { color: var(--ink); font-family: var(--sans); font-size: .95rem; }
.ab-copy { margin: 0; color: var(--ink-soft); font-family: var(--serif); font-size: 1.04rem; line-height: 1.55; }
.ab-copy a { color: var(--ink); }
@media (max-width: 700px) {
  .ab-grid { grid-template-columns: minmax(0, 1fr); }
  .ab-grid li:nth-child(2) { border-top: 1px solid var(--rule-faint); padding-top: 16px; }
}
