/* The Edge: the Engines page. Same rules as the rest of the site: red is the engine, white is the sportsbook line and the result. */
.eng-mast { margin-top: 22px; }
.eng-h { margin-top: 30px; }
.eng-note { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 0; }

/* running now: one ruled panel, a cell per sport */
.eng-now { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); background: var(--panel); border-radius: var(--r); overflow: hidden; margin: 18px 0 4px; }
.eng-now > a { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 10px 14px; padding: 16px 16px 15px; text-decoration: none; color: inherit; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); border-top: 3px solid transparent; }
.eng-now > a:hover { background: var(--hover); }
.eng-now > a[aria-current="page"] { border-top-color: var(--red); background: var(--panel-2); }
.eng-sp { grid-column: 1 / -1; font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 20px; line-height: 1; }
.eng-ver { grid-column: 1 / -1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 9px; }
.eng-ver b { font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 40px; line-height: .95; font-variant-numeric: tabular-nums; }
.eng-ver small, .eng-fact small, .eng-fact i { font-size: 12.5px; color: var(--ink-3); font-style: normal; }
.eng-fact { display: grid; gap: 1px; min-width: 0; }
.eng-fact b { font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 22px; line-height: 1.05; font-variant-numeric: tabular-nums; }

/* a market: a panel with one row per engine, newest first */
.eng-mk { background: var(--panel); border-radius: var(--r); overflow: hidden; margin: 14px 0 0; }
.eng-mk > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 15px 16px 13px; border-bottom: 1px solid var(--line-2); }
.eng-mk h3 { margin: 0; font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 23px; line-height: 1; }
.eng-mk > header p { margin: 0; font-size: 13px; color: var(--ink-3); }
.eng-row { display: grid; grid-template-columns: 128px minmax(0, 1fr) minmax(0, 1fr); gap: 4px 22px; padding: 15px 16px 16px 13px; border-left: 3px solid transparent; border-bottom: 1px solid var(--line); }
.eng-row:last-child { border-bottom: 0; }
.eng-row.cur { border-left-color: var(--red); }
.eng-v b { display: block; font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.eng-v span { font-size: 12.5px; color: var(--ink-3); }
.eng-row:not(.cur) .eng-v b { color: var(--ink-2); }
.eng-cell { min-width: 0; }
.eng-cell > small { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 5px; }
.eng-rec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 9px; font-variant-numeric: tabular-nums; }
.eng-rec b { font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 22px; line-height: 1.1; }
.eng-rec span { font-size: 13px; color: var(--ink-2); }
.eng-rec .eng-u { color: var(--ink-3); }
.eng-meter { position: relative; display: block; height: 8px; margin: 7px 0 3px; background: var(--trk); border-radius: 4px; max-width: 340px; }
.eng-meter > i { display: block; height: 100%; background: var(--mdl); border-radius: 4px 0 0 4px; min-width: 2px; }
.eng-meter > b { position: absolute; top: -3px; bottom: -3px; width: 2px; }
.eng-meter > b.half { left: 50%; background: var(--neu); }
.eng-meter > b.be { left: 62%; background: var(--ink); }
.eng-meter.wide > i { border-radius: 4px; }
.eng-few { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.eng-pair { max-width: 340px; margin-top: 9px; }
.eng-pair div { grid-template-columns: 46px 1fr 40px; }
.eng-props { margin: 0; border-radius: 0; border-top: 1px solid var(--line-2); }
.eng-mk > .eng-note { padding: 0 16px 14px; }
.anim .eng-meter > i { animation: growx .55s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left center; }

/* version history: a rail, a filled mark where this sport's model changed */
.eng-line { list-style: none; margin: 14px 0 0; padding: 0; }
.eng-line li { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 2px 18px; padding: 0 0 22px 26px; }
.eng-line li::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: -8px; width: 1px; background: var(--line-2); }
.eng-line li:last-child::before { display: none; }
.eng-line li::after { content: ""; position: absolute; left: 0; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--neu); }
.eng-line li.mdl::after { box-shadow: inset 0 0 0 2px var(--ink); }
.eng-line li.cur::after { background: var(--red); box-shadow: none; }
.eng-lv b { display: block; font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.eng-line li:not(.mdl) .eng-lv b { color: var(--ink-3); }
.eng-lv time { font-size: 12.5px; color: var(--ink-3); }
.eng-lt h3 { margin: 0 0 4px; font-size: 15.5px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; }
.eng-lt p { margin: 0 0 4px; max-width: 70ch; color: var(--ink-2); font-size: 14px; }
.eng-line li:not(.mdl) .eng-lt h3, .eng-line li:not(.mdl) .eng-lt p { color: var(--ink-3); }

.eng-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px 28px; margin: 12px 0 0; }
.eng-dl dt { font-weight: 600; margin-bottom: 3px; }
.eng-dl dd { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 62ch; }
.flinks a[hidden] { display: none; }

@media (max-width: 760px) {
  .eng-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 18px; }
  .eng-v { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; }
  .eng-v b { font-size: 26px; }
  .eng-line li { grid-template-columns: 1fr; }
  .eng-lv { display: flex; align-items: baseline; gap: 10px; }
}
@media (max-width: 620px) {
  /* on a phone the four cells are the sport switch: two by two, the version and nothing else */
  .eng-now { grid-template-columns: 1fr 1fr; }
  .eng-now > a { padding: 13px 14px 12px; gap: 6px 10px; }
  .eng-now .eng-fact { display: none; }
  .eng-sp { font-size: 17px; }
  .eng-ver b { font-size: 32px; }
  .eng-ver small { flex-basis: 100%; }
}
@media (max-width: 460px) {
  .eng-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .anim .eng-meter > i { animation: none; } }
