/* Styles for the home plugin. Every selector is prefixed with .p-home */

/* ---------- headline ---------- */
.p-home.hp-hero { padding-top: 6px; }
.p-home .hp-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 12px 44px; align-items: end; margin-bottom: 30px; }
.p-home .hp-h1 { font-size: clamp(36px, 5.5vw, 66px); margin: 0; max-width: none; }
.p-home .hp-deck { font-size: 17px; line-height: 1.45; margin: 0 0 6px; max-width: 34em; }

/* ---------- the rack: one beam, three pendulums ---------- */
.p-home .hp-rack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; border-top: 4px solid var(--ink); }
.p-home .hp-el { min-width: 0; }
.p-home .hp-pend { display: block; width: 100%; max-width: 300px; height: auto; overflow: visible; margin: -9px 0 6px; }
.p-home .hp-pend text { font: 400 12px var(--mono); fill: var(--ink-2); }
.p-home .hp-pend .strong { fill: var(--ink); font-weight: 500; }
.p-home .hp-ticks line { stroke: var(--ink); stroke-width: 1.5; }
.p-home .hp-swing { transform-box: view-box; transform-origin: 150px 7px; transform: rotate(var(--a)); }
.p-home .hp-swing.hp-moving { animation: p-home-settle var(--dur, 3s) cubic-bezier(.37, 0, .63, 1) both; }
@keyframes p-home-settle {
  0% { transform: rotate(var(--s)); }
  26% { transform: rotate(calc(var(--a) + (var(--a) - var(--s)) * 0.42)); }
  46% { transform: rotate(calc(var(--a) - (var(--a) - var(--s)) * 0.2)); }
  64% { transform: rotate(calc(var(--a) + (var(--a) - var(--s)) * 0.09)); }
  80% { transform: rotate(calc(var(--a) - (var(--a) - var(--s)) * 0.035)); }
  100% { transform: rotate(var(--a)); }
}
@media (prefers-reduced-motion: reduce) { .p-home .hp-swing.hp-moving { animation: none; } }

/* ---------- one election ---------- */
.p-home .hp-body h2 { font-size: 27px; line-height: 1.06; margin: 0 0 8px; min-height: 2.12em; text-wrap: balance; }
.p-home .hp-body h2 a { text-decoration: none; }
.p-home .hp-body h2 a:hover { background: var(--mark); }
.p-home .hp-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 0 16px; font: 400 13px/1.4 var(--mono); color: var(--ink-2); }
.p-home .hp-when b { font: 800 19px/1.1 var(--display); font-variation-settings: "wdth" 80; color: var(--ink); background: var(--mark); padding: 2px 6px; }
.p-home .hp-odds, .p-home .hp-seats-text, .p-home .hp-trend p { font-size: 15px; line-height: 1.4; margin: 0 0 8px; min-height: 2.8em; }
.p-home .hp-odds b, .p-home .hp-seats-text b, .p-home .hp-trend b { font-weight: 700; }
.p-home .hp-nb { white-space: nowrap; }
.p-home .hp-odds { min-height: 4.2em; }
.p-home .hp-trend { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 14px; align-items: center; margin: 0 0 18px; }
.p-home .hp-trend p { margin: 0; min-height: 4.2em; }
.p-home .hp-legend { font: 400 12px/1.5 var(--mono); color: var(--ink-2); max-width: 74em; margin: 26px 0 0; padding-top: 10px; border-top: 1px solid var(--rule); }
.p-home .hp-odds .sw { margin-right: 5px; width: 10px; height: 10px; }
.p-home .hp-bar { position: relative; display: flex; gap: 2px; height: 12px; margin: 0 0 20px; background: var(--wash); }
.p-home .hp-bar i { display: block; height: 100%; min-width: 3px; border-radius: 2px; }
.p-home .hp-bar b { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); }
.p-home .hp-loading .hp-bar b { display: none; }

.p-home .hp-seats { position: relative; display: grid; gap: 4px; margin: 20px 0 18px; min-height: 44px; }
.p-home .hp-seat-row { position: relative; height: 12px; background: var(--wash); }
.p-home .hp-seat-row i { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.p-home .hp-seat-row u { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--paper); }
.p-home .hp-maj { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1.5px dashed var(--ink); }
.p-home .hp-maj em { position: absolute; bottom: 100%; left: 0; transform: translateX(-50%); font: 500 11px/1.3 var(--mono); color: var(--ink); font-style: normal; }
.p-home .hp-key { font: 400 11.5px/1.4 var(--mono); color: var(--ink-2); margin: 0 0 18px; min-height: 1.4em; }
.p-home .hp-spark { display: block; width: 104px; height: 36px; overflow: visible; }
.p-home .hp-spark path { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.p-home .hp-spark line { stroke: var(--rule); stroke-width: 1; }
.p-home .hp-ghost { color: var(--ink-3); }
.p-home .hp-body .notice { margin: 0 0 16px; }

.p-home .hp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0; }
.p-home .hp-go, .p-home .hp-btn, .p-home .hp-retry {
  display: inline-block; font: 700 16px/1 var(--display); color: var(--ink); text-decoration: none; cursor: pointer;
  padding: 12px 16px; border: 2px solid var(--ink); border-radius: 2px; background: var(--paper); box-shadow: 4px 4px 0 var(--ink);
}
.p-home .hp-btn { background: var(--mark); }
.p-home .hp-go:hover, .p-home .hp-retry:hover { background: var(--mark); }
.p-home .hp-go:hover, .p-home .hp-btn:hover, .p-home .hp-retry:hover { transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }
.p-home .hp-go:active, .p-home .hp-btn:active, .p-home .hp-retry:active { transform: translate(4px, 4px); box-shadow: none; }
.p-home .hp-btn:disabled { opacity: .5; cursor: default; }
.p-home .hp-retry { font-weight: 500; box-shadow: none; }

/* ---------- ways in ---------- */
.p-home .hp-tour-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px 48px; align-items: start; margin-top: 18px; }
.p-home .hp-run { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 18px 20px 16px; }
.p-home .hp-run h3 { font-size: 24px; margin: 0 0 6px; }
.p-home .hp-run-sub { font-size: 15px; line-height: 1.45; color: var(--ink-2); margin: 0 0 16px; }
.p-home .hp-more { font-size: 15px; }
.p-home .hp-run-out { margin-top: 18px; min-height: 108px; font-size: 15px; line-height: 1.4; }
.p-home .hp-run-out p { margin: 0; }
.p-home .hp-tally { position: relative; display: flex; gap: 2px; height: 28px; margin: 0 0 10px; }
.p-home .hp-tally i { display: flex; align-items: center; justify-content: center; min-width: 3px; border-radius: 2px; overflow: hidden; color: #fff; font: 500 13px var(--mono); font-style: normal; }
.p-home .hp-tally i.on-on, .p-home .hp-tally i.on-ind, .p-home .hp-tally i.on-oth { color: var(--ink); }
.p-home .hp-tally b { position: absolute; left: 50%; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--ink); }

.p-home .hp-ways { list-style: none; margin: 0; padding: 0; }
.p-home .hp-ways li { padding: 11px 0 12px; border-top: 1px solid var(--rule); }
.p-home .hp-ways li:first-child { border-top: 0; padding-top: 0; }
.p-home .hp-ways a { display: inline; font-weight: 800; font-size: 20px; line-height: 1.15; font-variation-settings: "wdth" 80; text-decoration-thickness: 2px; }
.p-home .hp-ways span { display: block; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); margin-top: 3px; max-width: 40em; }

/* ---------- what this is ---------- */
.p-home .hp-about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 20px 48px; align-items: start; margin-top: 14px; }
.p-home .hp-about-text p { font-size: 15.5px; line-height: 1.5; margin: 0 0 10px; max-width: 42em; }
.p-home .hp-about-text b { font-weight: 700; }
.p-home .hp-updated { background: var(--wash); padding: 14px 16px 4px; }
.p-home .hp-updated h3 { font-size: 17px; margin: 0 0 8px; }
.p-home .hp-updated dl { margin: 0 0 10px; }
.p-home .hp-updated dl div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.p-home .hp-updated dt { font-weight: 700; }
.p-home .hp-updated dd { margin: 0; font: 400 13px/1.6 var(--mono); }
.p-home .hp-updated .hp-key { margin-bottom: 10px; }

/* ---------- narrow ---------- */
@media (max-width: 860px) {
  .p-home .hp-deck { font-size: 16px; }
  .p-home .hp-top { grid-template-columns: minmax(0, 1fr); margin-bottom: 24px; }
  .p-home .hp-rack { grid-template-columns: minmax(0, 1fr); border-top: 0; gap: 40px 0; }
  .p-home .hp-el { border-top: 4px solid var(--ink); }
  .p-home .hp-pend { margin-left: auto; margin-right: auto; }
  .p-home .hp-odds { min-height: 2.8em; }
  .p-home .hp-tour-grid, .p-home .hp-about-grid { grid-template-columns: minmax(0, 1fr); }
}
