/* KPACE Meet Simulations (preview). Tokens, the top bar, the segmented controls and the simulation layout (steps,
   counter, the odds-settling chart, one season, tables) come from Bidology's style.css, copied beside this file by
   scripts/build_meetsim_page.py; this file adds the meet fields, the weather step, the teams, the finish-line view
   and the tour. */
.ms{padding-top:28px}
.ms-lab{font:500 12px/1.2 var(--font-ui);color:var(--muted)}
.ms-hint{margin:8px 0 0;font-size:12px;line-height:1.5;color:var(--muted)}
.ms-empty{margin:12px 0;padding:16px;border:1px dashed var(--line);border-radius:12px;font-size:14px;color:var(--muted)}
.ms-empty-s{margin:6px 10px;font-size:13px;color:var(--muted)}
.ms-count{margin:8px 0 0;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.ms-count:empty{display:none}
/* the team count, and the Raced in <season> switch at the end of its line */
.ms-countrow{display:flex;align-items:center;gap:12px;margin-top:8px}
.ms-countrow .ms-count{margin:0}

/* buttons */
.ms-btn{border:1px solid var(--line);border-radius:999px;background:var(--bg);padding:7px 14px;font:500 13px/1 var(--font-ui);color:var(--ink);cursor:pointer;white-space:nowrap}
.ms-btn:hover{border-color:var(--faint)}
.ms-primary{background:var(--neutral);border-color:var(--neutral);color:var(--on-neutral)}
.ms-primary:hover{border-color:var(--neutral)}
.ms-link{border:0;background:none;padding:4px 0;font:500 13px var(--font-ui);color:var(--muted);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.ms-link:hover{color:var(--ink)}
.ms-new::before{content:"";display:inline-block;width:6px;height:6px;margin:0 7px 1px 0;border-radius:50%;background:var(--heart);vertical-align:middle}
.seg-sm button{padding:6px 11px;font-size:13px}

/* heading */
.ms-head{padding-bottom:18px}
.ms-head h1{margin:0;font:700 34px/1.1 var(--font-display);letter-spacing:-.02em;color:var(--ink)}
.ms-head h1{display:flex;align-items:center;gap:10px}
.ms-glyph{width:40px;height:40px;flex:none;margin-left:-4px}
.ms-glyph path{fill:none;stroke:var(--heart);stroke-width:3;stroke-linecap:round}
.ms-explain{margin:8px 0 0}
.sh-learn{font:500 14px var(--font-ui);color:var(--ink);text-underline-offset:3px}

/* the layout: steps left, the live panel right and sticky while the steps scroll */
.ms-simgrid{grid-template-columns:minmax(0,440px) minmax(0,1fr);gap:36px}
.ms-live{position:sticky;top:76px;align-self:start}

/* step 1: the meet */
.ms-fields{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 16px;align-items:end}
.ms-wide{grid-column:1 / -1}
.ms-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.ms-field>.seg{align-self:flex-start}
#wxStart,#wxDate{width:100%;min-width:0;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink);font:500 14px var(--font-ui)}
#wxStart{appearance:none;padding-right:34px;background:var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236c757d' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center/11px;cursor:pointer}
#wxDate{color-scheme:light dark}
.ms-pick{position:relative}
.ms-course{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;padding:7px 12px;border:1px solid var(--line);border-radius:10px;background:var(--bg);text-align:left;cursor:pointer}
.ms-course:hover{border-color:var(--faint)}
.ms-course b{font:600 14px/1.25 var(--font-ui);color:var(--ink)}
.ms-course span{font-size:12px;color:var(--muted)}
.ms-pop{position:absolute;z-index:25;left:0;top:calc(100% + 6px);width:min(440px,92vw);padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--bg);box-shadow:var(--shadow-xl)}
.ms-pop input:focus-visible{outline:none;box-shadow:none;border-color:var(--ink)}
.ms-pop input{width:100%;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink);font:400 14px var(--font-ui)}
.ms-results{max-height:320px;overflow:auto;margin-top:6px}
.ms-results button{display:flex;flex-direction:column;align-items:flex-start;width:100%;text-align:left;border:0;background:none;padding:8px 10px;border-radius:8px;cursor:pointer;color:var(--ink)}
.ms-results button:hover,.ms-results button:focus-visible{background:var(--bg2)}
.ms-results b{display:block;font:500 14px/1.25 var(--font-ui)}
.ms-results small{display:block;font-size:12px;color:var(--muted)}
.ms-results button.on{background:var(--bg3)}
.ms-results button[aria-current="true"] b::after{content:" · now";font-weight:400;color:var(--muted)}
.ms-results small.ms-via{margin:1px 0;color:var(--ink-body)}
/* the meet picker: a search, two filters, the meets grouped by division and kind */
.ms-meetpop{width:min(520px,92vw)}
.ms-chips{display:flex;flex-wrap:wrap;gap:6px 8px;margin-top:8px}
.ms-meetpop .ms-results{max-height:360px}
.ms-grp{margin:10px 10px 2px;font:600 11px/1.3 var(--font-ui);letter-spacing:.02em;color:var(--faint)}
.ms-grp:first-child{margin-top:4px}

/* step 2: race-day weather */
.wx-row{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:12px}
.wx-sl{display:grid;gap:12px;margin-top:16px}
.wx-s{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;align-items:baseline;font-size:13px;color:var(--ink)}
.wx-s>span{font-weight:500}
.wx-s b{font:500 13px var(--font-num);color:var(--ink);text-align:right}
.wx-s input{grid-column:1 / -1;width:100%;margin:2px 0 0;accent-color:var(--ink)}
.wx-segs{display:grid;gap:12px;margin-top:16px}
.wx-segs .seg{flex-wrap:wrap}
.wx-eff{margin-top:18px;padding:14px 16px 12px;border-radius:14px;background:var(--bg2)}
.wx-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.wx-tag{padding:3px 9px;border-radius:999px;background:var(--bg3);font:600 11px/1.4 var(--font-ui);color:var(--muted)}
.wx-big{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin:6px 0 12px}
.wx-big b{font-size:30px;font-weight:500;line-height:1;color:var(--ink);letter-spacing:-.02em}
.wx-big span{font-size:13px;color:var(--muted)}
.wx-scale{position:relative;height:6px;border-radius:3px;background:var(--bg3)}
.wx-scale i{position:absolute;top:50%;transform:translate(-50%,-50%)}
.wx-scale .z{width:1.5px;height:12px;background:var(--faint)}
.wx-scale .t{width:1.5px;height:10px;background:var(--muted)}
.wx-scale .m{width:12px;height:12px;border-radius:50%;background:var(--heart);border:2px solid var(--bg2)}
.wx-ticks{position:relative;height:18px;margin-top:4px}
.wx-ticks span{position:absolute;white-space:nowrap;font-size:11px;color:var(--muted)}
.wx-ticks span:first-child{transform:translateX(calc(-100% + 4px))}
.wx-ticks span:last-child{transform:translateX(-4px)}
.wx-sub{margin:6px 0 0;font-size:12px;line-height:1.45;color:var(--muted);font-variant-numeric:tabular-nums}

/* step 3: teams */
.ms-teamq{margin-bottom:4px}
.ms-teamq .results button{grid-template-columns:28px 1fr}
#teams{margin-top:12px;border-top:1px solid var(--hair)}
.ms-team{border-bottom:1px solid var(--hair)}
.ms-team summary{display:grid;grid-template-columns:26px minmax(0,1fr) 14px;gap:10px;align-items:center;padding:10px 2px;cursor:pointer;list-style:none}
.ms-team summary::-webkit-details-marker{display:none}
.ms-team .nm{font:500 14px/1.25 var(--font-ui);color:var(--ink);min-width:0}
.ms-team .nm small{display:block;margin-top:2px;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.ms-div{display:inline-block;margin-left:4px;padding:1px 6px;border-radius:6px;background:var(--bg3);font:600 10px/1.5 var(--font-ui);color:var(--muted);vertical-align:2px}
.ms-caret{width:8px;height:8px;border-right:1.5px solid var(--faint);border-bottom:1.5px solid var(--faint);transform:translateX(-2px) rotate(-45deg)}
.ms-team[open] .ms-caret{transform:translateY(-2px) rotate(45deg)}
.ms-roster{padding:0 0 12px 36px}
.ms-mk{display:inline-block;width:26px;height:26px;flex:none;background-repeat:no-repeat}
.ms-mk.tone-light{background-color:var(--mk-tile-light);border-radius:6px}
.ms-mk.tone-dark{background-color:var(--mk-tile-dark);border-radius:6px}
.ms-mono{display:inline-grid;place-items:center;border-radius:50%;background:var(--bg3);font:600 10px/1 var(--font-ui);color:var(--muted)}
.ms-rh,.ms-rr{display:grid;grid-template-columns:18px minmax(0,1fr) 46px 74px;gap:8px;align-items:center}
.ms-rh{padding:2px 0 4px;font:500 11px/1 var(--font-ui);color:var(--faint)}
.ms-rh span:nth-child(3){text-align:right}
.ms-rr{padding:5px 0;font-size:13px;color:var(--ink)}
.ms-rr .ms-addrm{display:inline;margin-left:6px;font-size:12px}
.ms-rs{margin:10px 0 2px;height:38px}
.ms-rs .results{top:42px}
.ms-rs .results button{grid-template-columns:minmax(0,1fr) auto}
.ms-ro{min-width:0}
.ms-ro b{display:block;font:500 14px/1.25 var(--font-ui);color:var(--ink)}
.ms-ro small{display:block;font-size:12px;color:var(--muted)}
.ms-rs .results .mono{font-size:13px;color:var(--ink)}
.ms-newr{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:8px 0 2px;padding:8px 10px;border-radius:10px;background:var(--bg2);font-size:13px}
.ms-newr span{font-weight:600;color:var(--ink)}
.ms-newr input{flex:1 1 120px;min-width:0;padding:7px 9px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--ink);font:500 13px var(--font-ui)}
.ms-newr input[name="t5"]{flex:0 1 140px;font-family:var(--font-num)}
.ms-newr input:focus-visible{box-shadow:none;border-color:var(--ink)}
.ms-newr button[type="submit"]{border:0;border-radius:999px;padding:7px 12px;background:var(--neutral);color:var(--on-neutral);font:600 12px var(--font-ui);cursor:pointer}
.ms-rr .n{font:500 12px var(--font-num);color:var(--faint);text-align:right}
.ms-rr .nm small{display:block;font-size:11px;color:var(--muted)}
.ms-rr .t{text-align:right;font-size:13px}
.ms-rr.res,.ms-rr.out{color:var(--muted)}
.ms-rr.out .nm{text-decoration:line-through;text-decoration-color:var(--faint)}
.ms-tg{justify-self:end;border:1px solid var(--line);border-radius:999px;background:var(--bg);padding:4px 9px;font:500 11px/1 var(--font-ui);color:var(--ink);cursor:pointer;white-space:nowrap}
.ms-tg:hover{border-color:var(--faint)}
.ms-cut{margin:6px 0 2px;padding-top:6px;border-top:1px dashed var(--line);font-size:11px;color:var(--faint)}
/* fewer than five racing: Bidology's red note (the what-if and roster banners' heart-soft) */
.ms-warn{display:flex;gap:8px;align-items:flex-start;margin:0 0 10px;padding:9px 12px;border-radius:12px;background:var(--heart-soft);font:500 13px/1.4 var(--font-ui);color:var(--heart-ink)}
.ms-warn::before{content:"";flex:none;width:7px;height:7px;margin-top:6px;border-radius:50%;background:var(--heart)}
/* a note that waits hidden (#meetNote: a Projected Nationals that couldn't load): display:flex above outranks [hidden] */
.ms-warn[hidden]{display:none}
.ms-noscore{color:var(--heart-ink);font-weight:600}
/* the seven spots: an empty one waits for a runner; the one under a dragged runner lights */
.ms-slot{border-radius:8px}
.ms-slot.ms-open{margin:2px 0;padding:6px 0;outline:1.5px dashed var(--line);outline-offset:-1.5px;color:var(--muted)}
.ms-slot.ms-open .nm{color:var(--muted);font-style:italic}
.ms-slot.ms-open .nm small{font-style:normal;color:var(--faint)}
.ms-slot.ms-over{background:var(--heart-soft);outline:2px solid var(--heart);outline-offset:-2px}
/* Add a runner: the next fastest, to drag into a spot */
.ms-addbtn{display:inline-flex;align-items:center;gap:6px;margin:10px 0 2px;border:1px solid var(--line);border-radius:999px;background:var(--bg);padding:7px 13px;font:600 13px var(--font-ui);color:var(--ink);cursor:pointer}
.ms-addbtn:hover{border-color:var(--faint)}
.ms-addbtn span{font:600 15px/1 var(--font-ui);color:var(--heart)}
.ms-addbtn[aria-expanded="true"]{background:var(--bg3)}
.ms-pool{margin:8px 0 2px;padding:6px 6px 8px;border-radius:12px;background:var(--bg2)}
.ms-pool .ms-grp{margin:6px 6px 4px}
.ms-pool .ms-grp small{display:block;margin-top:2px;font:400 12px var(--font-ui);letter-spacing:0;color:var(--muted)}
.ms-pool .ms-rs{margin:6px 0 4px}
.ms-pool .ms-link{margin:0 6px}
.ms-pr{display:grid;grid-template-columns:16px minmax(0,1fr) auto;gap:8px;align-items:center;padding:7px 8px;border-radius:9px;background:var(--bg);margin-top:4px;cursor:grab;user-select:none;-webkit-user-select:none}
.ms-pr:hover{box-shadow:0 0 0 1px var(--line)}
.ms-pr:focus-visible{outline:2px solid var(--ink);outline-offset:1px}
.ms-pr .mono{font-size:13px;color:var(--ink)}
.ms-grip{width:10px;height:16px;justify-self:center;touch-action:none;background:radial-gradient(circle,var(--faint) 1.2px,transparent 1.6px) 0 0/5px 5px}
.ms-ghost{position:fixed;left:0;top:0;z-index:1000;pointer-events:none;box-shadow:0 10px 30px rgba(0,0,0,.18),0 0 0 1px var(--line);cursor:grabbing;opacity:.96}
body.ms-dragging,body.ms-dragging *{cursor:grabbing}
body.ms-dragging{user-select:none;-webkit-user-select:none}
.ms-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ms-remove{margin-top:8px;font-size:12px}

/* the live panel */
.ms-live .counter span{max-width:44ch}
.ms-counter{align-items:center;flex-wrap:nowrap}
.ms-counter span{line-height:1.45}
@media (max-width:560px){.ms-counter{flex-wrap:wrap}}
.ms-stale{margin:0;padding:9px 12px;border-radius:10px;background:var(--amber-soft);font-size:13px;color:var(--ink)}
.conv .sh small{letter-spacing:0;text-transform:none;font-weight:500}
.ms-sum{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;border-top:1px solid var(--hair);border-bottom:1px solid var(--hair)}
.ms-sum>div{padding:12px 16px 12px 0}
.ms-sum>div+div{padding-left:16px;border-left:1px solid var(--hair)}
.ms-sum dt{font-size:12px;color:var(--muted)}
.ms-sum dd{display:flex;align-items:flex-start;gap:8px;margin:6px 0 0;font-size:14px;line-height:1.45;color:var(--ink)}
.ms-sum dd small{display:block;font-size:12px;color:var(--muted)}
.ms-sum b{font-weight:600}

/* one simulated meet: team scores and the finish line */
.ms-racecols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px}
.ms-racecols .svcard{display:grid;gap:2px}
.ms-racecols .svr{grid-template-columns:18px 22px minmax(0,1fr) 120px 40px}
.ms-racecols .svr .ms-mk{width:22px;height:22px}
.svhead .ms-clock{display:inline-flex;align-items:center;gap:12px}
.ms-skip{padding:7px 12px;font-size:13px}
.ms-finish{margin:0;padding:0;list-style:none;border-top:1px solid var(--hair)}
.ms-finish li{display:grid;grid-template-columns:26px 22px minmax(0,1fr) auto;gap:8px;align-items:center;padding:6px 4px;border-bottom:1px solid var(--hair);font-size:14px;color:var(--ink)}
.ms-finish li .pl{font-size:12px;color:var(--muted);text-align:right}
.ms-finish li .ms-mk{width:22px;height:22px}
.ms-finish li .nm{min-width:0}
.ms-finish li .nm b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.ms-finish li .nm small{display:block;font-size:12px;color:var(--muted)}
.ms-finish li.new{background:var(--heart-soft)}
.simres .grid .sub{color:var(--muted)}
/* a number column's heading sits over its numbers (Bidology's grid leaves every heading on the left) */
.simres table.grid th.n{text-align:right}
/* where the results tables scroll sideways (Bidology's .tw, up to 1120px) the rank and the name stay pinned at the
   left: scrolled to Avg score, a row otherwise no longer says whose it is (Tommy, 2026-10-22) */
@media (max-width:1120px){
  .simres table.grid :is(th,td):nth-child(-n+2){position:sticky;z-index:1;background:var(--bg)}
  .simres table.grid th:nth-child(-n+2){z-index:2}
  .simres table.grid :is(th,td):first-child{left:0;width:42px;min-width:42px;max-width:42px;box-sizing:border-box;padding-left:0;padding-right:4px}
  .simres table.grid :is(th,td):nth-child(2){left:42px;box-shadow:inset -1px 0 0 var(--hair)}
  .simres table.grid th{white-space:nowrap}
}
/* on a phone the pinned name takes 120px, not the grid's 220, or it leaves the numbers no room to scroll in; a long
   name wraps rather than shortening */
@media (max-width:720px){
  .simres table.grid .who{min-width:0;gap:8px}
  .simres table.grid .who>div{width:120px}
  .simres table.grid .who b{font-size:14px}
  .simres table.grid .who .ms-mk{width:20px;height:20px}
}
/* an individual's places: a bar from first to last in the field (the rankings' gap bar), filled to the place they
   finish at or better in 80% of simulations, a mark at the median place */
.ms-prb{position:relative;display:inline-block;vertical-align:middle;width:96px;height:6px;border-radius:3px;background:var(--bg3)}
.ms-prb i{position:absolute;left:0;top:0;height:100%;min-width:4px;border-radius:3px;background:var(--faint)}
.ms-prb b{position:absolute;top:-2px;width:2px;height:10px;margin-left:-1px;border-radius:1px;background:var(--ink)}
.ms-more{margin-top:12px}
/* the single simulated meet's line saying it is one draw */
.ms-onenote{margin:4px 0 16px}


/* the tour */
.ms-tour{position:fixed;z-index:60;padding:16px 18px 14px;border:1px solid var(--line);border-radius:14px;background:var(--bg);box-shadow:var(--shadow-xl)}
.ms-tour:focus{outline:none}
.ms-tour-n{margin:0 0 4px;font:500 12px var(--font-num);color:var(--muted)}
.ms-tour h2{margin:0 0 6px;font:650 17px/1.25 var(--font-display);color:var(--ink)}
.ms-tour p{margin:0;font-size:14px;line-height:1.5;color:var(--ink-body)}
.ms-tour-f{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px}
.ms-tour-f span{display:flex;gap:8px}
.ms-spot{position:relative;z-index:20;border-radius:12px;box-shadow:0 0 0 6px var(--bg),0 0 0 8px var(--ink)}

@media (max-width:980px){
  .ms-simgrid{grid-template-columns:1fr}
  .ms-live{position:static}
  .ms-racecols,.ms-mgrid{grid-template-columns:1fr}
}
@media (max-width:560px){
  /* the bottom keeps style.css's comfortable runway */
  .page.ms{padding-inline:16px}
  .ms-head h1{font-size:28px}
  .ms-glyph{width:34px;height:34px}
  .ms-sum{grid-template-columns:1fr}
  .ms-sum>div+div{padding-left:0;border-left:0;border-top:1px solid var(--hair)}
  .ms-fields,.wx-row{grid-template-columns:1fr}
  .ms-racecols .svr{grid-template-columns:18px 22px minmax(0,1fr) 70px 40px}
  .ms-prb{width:56px}
}
@media (prefers-reduced-motion: reduce){.ms-finish li.new{background:none}}
.wx-reset{margin-left:auto;border:0;border-radius:999px;padding:7px 14px;background:var(--bg3);color:var(--ink);font:600 13px var(--font-ui);cursor:pointer}
.wx-reset:hover:not(:disabled){filter:brightness(.95)}
.wx-reset:disabled{opacity:.45;cursor:default}

/* "How it works": the pop-up, in Bidology's step styles */
.sh-eq{display:grid;gap:4px}
.sh-eq .sh-row{grid-template-columns:1fr auto}
.sh-eq .sh-row.tot{box-shadow:inset 3px 0 0 var(--neutral);font-weight:600}
.sh-day{display:grid;gap:14px;padding:18px 14px}
.sh-day .wx-scale{margin:0 8px}
.sh-day{row-gap:8px}
.sh-day .wx-top,.sh-day .wx-ticks{position:relative;margin:0 8px;font-size:11px;color:var(--muted)}
.sh-day .wx-top{height:16px}
.sh-day .wx-ticks{height:34px}
.sh-day .wx-top span,.sh-day .wx-ticks span{position:absolute;transform:translateX(-50%);white-space:nowrap;text-align:center;font-family:var(--font-num)}
.sh-day .wx-ticks small{display:block;font:11px var(--font-ui);color:var(--muted)}
.sh-day .wx-top span{font-family:var(--font-ui)}
.sh-day .sh-share{justify-content:center}

/* the steps fold: a chevron button at the heading's end, pointing right while the step is folded and down while it is
   open (every KPACE disclosure: closed right, open down; Tommy, 2026-10-22); the body closes on its grid rows and fades, and a folded step shows a one-line summary instead */
.ms-fold{flex:none;display:inline-grid;place-items:center;width:32px;height:32px;margin-left:auto;padding:0;border:0;border-radius:50%;background:none;color:var(--muted);cursor:pointer}
.ms-fold:hover{background:var(--bg3);color:var(--ink)}
.ms-fold svg{transform:none;transition:transform .25s ease}
.ms-folded .ms-fold svg{transform:rotate(-90deg)}
.wx-reset+.ms-fold{margin-left:4px}
.ms-folded .wx-reset+.ms-fold{margin-left:auto}
.steph .h2{white-space:nowrap}
.ms-fbody{display:grid;grid-template-rows:1fr;transition:grid-template-rows .25s ease}
.ms-fin{min-height:0;transition:opacity .25s ease}
.ms-folded .ms-fbody{grid-template-rows:0fr}
.ms-folded .ms-fin{opacity:0}
.ms-moving .ms-fin,.ms-folded .ms-fin{overflow:hidden}
.ms-sumline{display:none;margin:6px 0 0 34px;font-size:13px;line-height:1.45;color:var(--muted)}
.ms-folded .ms-sumline{display:block}
.ms-folded .wx-reset{display:none}
/* Advanced settings (the race-day weather): an unnumbered fold under the steps, quieter than a step */
.ms-adv .steph .h2{font-size:17px;color:var(--ink-body)}
.ms-gear{flex:none;display:inline-grid;place-items:center;width:24px;height:24px;color:var(--muted)}
.ms-adv .ms-sumline{margin-left:34px}
.ms-advh{margin:4px 0 0;font:600 14px var(--font-ui);color:var(--ink)}
/* the docked run tray (style.css .tray): the results' end clears it */
body.tray-on .simbody{padding-bottom:80px}
@media (max-width:720px){body.tray-on .simbody{padding-bottom:130px}}
@media (prefers-reduced-motion: reduce){.ms-fbody,.ms-fin,.ms-fold svg{transition:none}}

/* the results and their navigation: Bidology's layout, with the sticky offsets this page's single top bar needs */
html{scroll-padding-top:80px}
#race-top,#res-top,#res-teams,#res-ind{scroll-margin-top:84px}
@media (min-width:1100px){.simnav{top:84px;max-height:calc(100vh - 100px)}}

/* A championship's individual qualifiers (the Nationals field from Bidology): one list under the teams; they race and
   place but score nothing. */
.ms-inds{margin:12px 0 0;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--bg2)}
.ms-indh{margin:0 0 6px}
.ms-indh b{display:block;font:700 15px var(--font-display);letter-spacing:-.01em;color:var(--ink)}
.ms-indh small{display:block;margin-top:2px;font-size:12.5px;line-height:1.4;color:var(--muted)}
.ms-inds .ms-rr{border-top:1px solid var(--hair)}
/* Advanced settings: lock in results. The rows, chips and kind tags are Bidology's lock picker (style.css); the place
   and "or better" are two selects, so they keep the page's own control look inside the row's pill buttons */
.ms-advh2{margin-top:26px}
.ms-lockq{margin-top:10px}
.ms-lockq .results button{grid-template-columns:28px 1fr}
.ms-lockq .results b,.ms-lockq .results small{display:block}
.ms-lockq .results b{color:var(--ink);font-weight:600}
.ms-lockplace{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px;margin-right:auto;font:600 13px var(--font-ui);color:var(--ink)}
.ms-lockplace select{height:32px;padding:0 8px;border:1px solid var(--line);border-radius:10px;background:var(--bg);font:500 13px var(--font-ui);color:var(--ink)}
.ms-lockchips{margin-top:12px}
.ms-lockline{display:flex;gap:8px;align-items:flex-start;margin:10px 0 0;padding:10px 12px;border-radius:12px;background:var(--bg2);font:400 13px/1.45 var(--font-ui);color:var(--muted)}
.ms-lockline .lki,.ms-lockhint .lki{flex:none;margin-top:2px;color:var(--heart)}
.ms-lockline b{color:var(--ink);font-weight:600}
.ms-lockhint{display:flex;gap:8px;align-items:flex-start;margin:4px 0 12px;font-size:13px}

/* the featured-meets callout (assets/featured-meets.js): one line above the masthead, a rose dot for the mark (rose stays
   on marks, never a fill), the links as outlined pills, and the x at the end */
.ms-feat{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin:0 0 20px;padding:10px 10px 10px 14px;border:1px solid var(--line);border-radius:14px;background:var(--bg2)}
.ms-feat[hidden]{display:none}
.ms-feat-text{flex:1 1 auto;min-width:0;margin:0;font:400 14px/1.4 var(--font-ui);color:var(--ink-body)}
.ms-feat-text::before{content:"";display:inline-block;width:7px;height:7px;margin:0 9px 2px 0;border-radius:50%;background:var(--heart);vertical-align:middle}
.ms-feat-text b{font-weight:600;color:var(--ink)}
.ms-feat-meta{margin-left:10px;font-size:13px;color:var(--muted)}
.ms-feat-links{display:flex;flex-wrap:wrap;gap:6px}
.ms-feat-link{display:inline-flex;align-items:center;padding:6px 12px;border:1px solid var(--line);border-radius:999px;background:var(--bg);font:500 13px/1 var(--font-ui);color:var(--ink);text-decoration:none;white-space:nowrap}
.ms-feat-link:hover{border-color:var(--faint)}
.ms-feat-link:focus-visible,.ms-feat-x:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.ms-feat-x{display:inline-flex;align-items:center;justify-content:center;flex:none;width:32px;height:32px;margin-left:auto;border:0;border-radius:50%;background:none;color:var(--muted);cursor:pointer}
.ms-feat-x:hover{background:var(--bg3);color:var(--ink)}
/* a phone: the text takes its own line, the links and the x share the next */
@media (max-width:640px){
  .ms-feat-text{flex-basis:calc(100% - 46px)}
  .ms-feat-meta{display:block;margin:2px 0 0 16px}
  .ms-feat{position:relative;padding-right:46px}
  .ms-feat-x{position:absolute;top:6px;right:6px}
}
