/* The early vote model (scripts/_model_page.py, site/src/model.js): the memo page,
   and the model card on the early vote and results pages. */
.mo { --mo-dem: #3463b8; --mo-rep: #b8332a; --mo-una: #6b6a63; --mo-accent: var(--ink); --mo-muted: #a8a49a;
  max-width: 1100px; }
.mo-head { margin: 8px 0 28px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.mo .mo-deck, .mo .mo-asof { max-width: 68ch; }
.mo .mo-kick { margin: 0 0 10px; font: 600 13px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.mo .mo-kick a { color: var(--accent); text-decoration: none; }
.mo .mo-kick a:hover { text-decoration: underline; }
.mo .mo-deck { margin: 14px 0 8px; font: 400 18px/1.5 var(--serif); color: var(--body); }
.mo .mo-asof { margin: 0; font: 500 14px var(--sans); color: var(--mute); }
.mo h2 { margin: 44px 0 10px; font: 700 26px/1.2 var(--serif); }
.mo h3 { margin: 26px 0 6px; font: 600 17px/1.3 var(--sans); }
.mo p, .mo li { font: 400 16px/1.6 var(--sans); color: var(--body); max-width: 68ch; }
.mo p { margin: 0 0 14px; }
.mo ul, .mo ol { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 6px; }
.mo strong { font-weight: 600; color: var(--ink); }
.mo .cap { font-size: 13.5px; line-height: 1.45; color: var(--soft); max-width: none; }
.mo-src { font-size: 13.5px !important; color: var(--soft) !important; margin-top: 28px !important; }

.mo-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.mo-call { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
.mo-call .race { font: 600 12px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
.mo-call .big { font: 700 30px/1.1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.mo-call .big.d { color: var(--mo-dem); }
.mo-call .big.r { color: var(--mo-rep); }
.mo svg.mo-bar, .mocard svg.mo-bar { width: 100%; max-width: 220px; height: auto; display: block; margin: 4px 0 2px; }
svg.mo-bar .grid { stroke: var(--hair); stroke-width: 2; } svg.mo-bar .band { fill: #c9d6ef; }
svg.mo-bar .tie { font: 500 10px var(--sans); fill: var(--soft); }
svg.mo-bar .zero { stroke: var(--soft); stroke-width: 1.2; } svg.mo-bar .med { stroke: #3463b8; stroke-width: 3; }
.mo-call .small { font: 400 13.5px/1.4 var(--sans); color: var(--soft); }

.mo-fig { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r); padding: 14px 14px 8px; margin: 16px 0 20px; }
.mo-fig .ttl { font: 600 14px/1.3 var(--sans); margin: 0 2px 8px; color: var(--ink); }
.mo-fig .cap { margin: 8px 2px 4px; }
.mo svg { width: 100%; height: auto; display: block; }
.mo svg text { font-family: var(--sans); fill: var(--ink); }
.mo svg .lab { font-size: 13px; } .mo svg .lab.strong { font-weight: 600; }
.mo svg .tick { font-size: 11.5px; fill: var(--soft); font-variant-numeric: tabular-nums; }
.mo svg .axis { font-size: 12.5px; fill: var(--soft); }
.mo svg .val { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mo svg .inbar { font-size: 12px; font-weight: 600; fill: #fff; }
.mo svg .fd { fill: var(--mo-dem); } .mo svg .fr { fill: var(--mo-rep); } .mo svg .fu { fill: var(--mo-una); }
.mo svg .grid { stroke: var(--hair); stroke-width: 1; }
.mo svg .zero { stroke: var(--soft); stroke-width: 1.2; }
.mo svg .stem { stroke: var(--rule); stroke-width: 3; }
.mo svg .dot { fill: var(--ink); } .mo svg .ref { fill: var(--mo-rep); } .mo svg .poll { fill: var(--mo-dem); }
.mo svg .ln { fill: none; stroke-width: 2.2; stroke-linejoin: round; }
.mo svg .ln0 { stroke: var(--mo-accent); } .mo svg .ln1 { stroke: var(--mo-dem); stroke-dasharray: 6 4; }
.mo svg .ln2 { stroke: var(--mo-muted); } .mo svg .ln3 { stroke: var(--mo-rep); stroke-dasharray: 2 4; }
.mo-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 400 13px var(--sans); color: var(--soft); margin: 6px 2px 0; }
.mo-legend i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }

.mo-tbl { overflow-x: auto; margin: 12px 0 20px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r); }
.mo table { border-collapse: collapse; width: 100%; font: 400 14px var(--sans); }
.mo th, .mo td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--row-line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mo th { font: 600 12px/1.3 var(--sans); color: var(--mute); text-transform: uppercase; letter-spacing: .04em; vertical-align: bottom; background: var(--hover); }
.mo th.c { text-align: center; }
.mo thead tr + tr th:first-child { text-align: right; min-width: 0; }
.mo th:first-child, .mo td:first-child { text-align: left; white-space: normal; min-width: 150px; }
.mo tr:last-child td { border-bottom: 0; }
.mo tr.hl td { background: var(--hover-soft); font-weight: 600; }
.mo td .sub { display: block; color: var(--soft); font-size: 12.5px; }
.mo-steps { counter-reset: s; list-style: none; padding: 0 !important; }
.mo-steps li { counter-increment: s; position: relative; padding-left: 34px; }
.mo-steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); color: var(--on-ink); font: 600 12px/22px var(--sans); text-align: center; }
[data-v][hidden] { display: none; }
/* On a phone a chart keeps a readable size and scrolls inside its box */
@media (max-width: 700px) {
  .mo-fig [data-mh] { overflow-x: auto; }
  .mo-fig [data-mh] > svg { min-width: 640px; }
}
.mo [data-mh] { position: relative; }
.mo svg .hit { fill: none; stroke: transparent; stroke-width: 14; }
.mo svg .band { fill: var(--mo-rep); fill-opacity: 0.18; }
.mo svg .fz { fill: var(--mo-dem); fill-opacity: 0.08; }
.mo svg .ln3s { stroke: var(--mo-rep); stroke-width: 2.6; }
.mo svg .thr { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 6 4; }
.mo svg .thr3 { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 4; }
.mo svg circle.hit { fill: transparent; stroke: none; }
.mo svg [data-tip] { cursor: default; }

/* Details, closed by default: the dense tables */
.mo-more { margin: 4px 0 24px; border: 1px solid var(--edge); border-radius: var(--r); background: var(--surface); }
.mo-more > summary { cursor: pointer; padding: 12px 16px; font: 600 15px var(--sans); color: var(--ink); list-style: none; }
.mo-more > summary::-webkit-details-marker { display: none; }
.mo-more > summary::before { content: "+"; display: inline-block; width: 18px; font-weight: 700; color: var(--accent); }
.mo-more[open] > summary::before { content: "−"; }
.mo-more > :not(summary) { margin-left: 16px; margin-right: 16px; }
.mo-more .mo-tbl { margin-left: 16px; margin-right: 16px; }
.mo-look { max-width: 460px; }
.mo-look td:first-child { font-weight: 600; }

/* The Senate polls, in the forecast section */
.mo-polls { max-width: 420px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r); padding: 14px 16px 6px; margin: 4px 0 20px; }
.mo .mo-polls-h { margin: 0 0 8px; font: 600 12px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
.mo-polls table { font-size: 14px; }
.mo-polls td { padding: 7px 0; }
.mo-polls td:first-child { min-width: 0; }
.mo-polls a { color: var(--ink); }
.mo-polls .cap { margin: 10px 0 8px; }

/* The model card on the early vote page and the results page */
.mocard { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px 28px; margin: 0 0 40px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.mocard:hover { border-color: var(--ink); }
/* Across the width on a computer: the races, then the rule beside them */
.mocard .mc-txt { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 40px; row-gap: 4px; align-items: center; min-width: 0; }
.mocard .mc-kick { grid-column: 1 / -1; }
.mocard .mc-rule { display: block; }
.mocard .mc-rule { margin: 0 !important; max-width: 56ch !important; }
.mocard .mc-kick { font: 600 12px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.mocard .mc-races { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 6px 0 4px; }
.mocard .mc-race { display: flex; flex-direction: column; gap: 1px; }
.mocard .mc-big { font: 700 24px/1.15 var(--serif); color: #3463b8; font-variant-numeric: tabular-nums; }
.mocard .mc-big.r { color: #b8332a; }
.mocard .mc-line { display: flex; align-items: baseline; flex-wrap: wrap; }
/* After a batch moves the estimate: how far and toward whom, as the race cards show it
   (election.css .rc-move) */
.mocard .mc-move { display: inline-block; margin-left: 8px; padding: 0 2px; font: 600 12px/1.3 var(--sans); color: var(--ink); white-space: nowrap;
  background: linear-gradient(transparent 52%, #f7e39a 52%); animation: mc-move 12s ease-out forwards; }
@keyframes mc-move { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mocard .mc-move { animation: none; } }
.mocard .mc-small { font: 400 13px/1.35 var(--sans); color: var(--soft); }
.mocard .mc-rule { margin: 6px 0 0; font: 400 14px/1.45 var(--sans); color: var(--body); max-width: 640px; }
.mocard .mc-go { white-space: nowrap; }
.mocard [hidden] { display: none !important; }
.el .mocard { margin: 0 0 20px; }
@media (max-width: 640px) {
  .mocard { grid-template-columns: 1fr; }
  .mocard .mc-txt { grid-template-columns: 1fr; }
  .mocard .mc-go { justify-self: start; }
}

/* The ballots bar in the results page's header on election night (model.js bar()): counted
   early and mail, counted Election Day, then the estimate of each still out, lighter. It
   grows as batches come in. */
.mobal { --mb-em: #4b4f57; --mb-ed: #1d1f22; --mb-pe: #c9c6bd; --mb-pd: #e4e1d8; margin: 10px 0 4px; max-width: 760px; }
.mobal .mb-txt { margin: 0 0 6px; font: 400 14px/1.45 var(--sans); color: var(--body); }
.mobal .mb-txt b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.mobal .mb-bar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: var(--mb-pd); }
.mobal .mb-bar i { display: block; height: 100%; width: 0; transition: width 1.2s ease-out; }
.mobal .mb-em { background: var(--mb-em); } .mobal .mb-ed { background: var(--mb-ed); }
.mobal .mb-pe { background: repeating-linear-gradient(135deg, var(--mb-pe) 0 4px, var(--mb-pd) 4px 8px); } .mobal .mb-pd { background: var(--mb-pd); }
.mobal .mb-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; font: 400 12.5px var(--sans); color: var(--soft); }
.mobal .mb-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.mobal .mb-key .mb-pd { box-shadow: inset 0 0 0 1px var(--mb-pe); }
.mobal [hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .mobal .mb-bar i { transition: none; } }
