/* The home page's two choices, quick match's steps and the matches on this phone, in the code page's own look
   (score.css: the marketing site's colours and Geist). Phone first; light and dark follow the device. */
main{padding-bottom:calc(env(safe-area-inset-bottom,0px) + 40px)}
.brand{padding:4px 0 28px}
.brand-btn{display:block;padding:6px 6px 6px 0;margin:-6px 0 0;border:0;background:transparent;cursor:pointer;border-radius:8px;-webkit-tap-highlight-color:transparent}
.brand-btn:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.brand .logo{width:150px}
h2{margin:44px 0 12px;font-size:20px;line-height:1.2;letter-spacing:-.02em;font-weight:600}
h2:focus{outline:none}
[hidden]{display:none!important}
.lead{text-wrap:pretty}
h1{text-wrap:balance}

/* the cards: the home page's two choices and each step's choices */
.choices{display:grid;gap:12px}
.choice,.pick{position:relative;display:flex;flex-direction:column;gap:3px;width:100%;margin:0;padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--field);color:var(--ink);text-decoration:none;text-align:left;font:inherit;cursor:pointer;box-shadow:var(--shadow);-webkit-tap-highlight-color:transparent;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background-color .18s ease}
.choice b,.pick b{font-size:18px;line-height:1.25;font-weight:600;letter-spacing:-.015em}
.choice-txt span,.pick-sub{font-size:14px;color:var(--muted);line-height:1.4}
.choice:active,.pick:active{transform:scale(.985)}
.choice:focus-visible,.pick:focus-visible,.back:focus-visible,.mini:focus-visible,.match-open:focus-visible,select:focus-visible,summary:focus-visible,.linkish:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
@media (hover:hover){.choice:hover,.pick:hover{transform:translateY(-2px);box-shadow:var(--shadow-up);border-color:var(--line-2)}}

/* the home page: an icon, the words, an arrow */
.choice{flex-direction:row;align-items:center;gap:16px;min-height:88px;padding:16px 18px}
.choice-ic{flex:none;display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:var(--tint);color:var(--ink)}
.choice-ic svg{width:26px;height:26px}
.choice-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.choice-go{flex:none;width:18px;height:18px;color:var(--muted);transition:transform .18s ease}
.choice.is-main{background:var(--yellow);border-color:var(--yellow);color:#1b1a17;box-shadow:0 1px 2px rgba(27,26,23,.08),0 6px 18px rgba(247,194,59,.3)}
.choice.is-main .choice-txt span{color:#4a463a}
.choice.is-main .choice-ic{background:rgba(255,255,255,.55);color:#1b1a17}
.choice.is-main .choice-go{color:#1b1a17}
@media (hover:hover){.choice:hover .choice-go{transform:translateX(3px)}.choice.is-main:hover{border-color:var(--yellow);box-shadow:0 2px 4px rgba(27,26,23,.1),0 10px 26px rgba(247,194,59,.4)}}

/* the steps: Back and where you are on one line, then the heading */
.wiz-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 20px}
.back{display:inline-flex;align-items:center;min-height:44px;margin:0 0 0 -4px;padding:0 10px 0 4px;border:0;border-radius:10px;background:transparent;color:var(--ink);font:500 16px/1 Geist,system-ui,sans-serif;text-decoration:none;cursor:pointer}
.back::before{content:"";width:8px;height:8px;margin:0 10px 0 4px;border-left:1.75px solid currentColor;border-bottom:1.75px solid currentColor;transform:rotate(45deg)}
@media (hover:hover){.back:hover{background:var(--tint)}}
#v-code>.back{margin-bottom:20px}
.prog{display:flex;flex-direction:column;align-items:flex-end;gap:7px}
.prog-bar{display:flex;gap:5px}
.prog-bar span{width:22px;height:4px;border-radius:4px;background:var(--line);transition:background-color .25s ease,width .25s ease}
.prog-bar .is-done{background:var(--ink);opacity:.35}
.prog-bar .is-now{width:34px;background:var(--yellow)}
.step{margin:0;font-size:12px;font-weight:500;letter-spacing:.02em;color:var(--muted);line-height:1}
.step-what{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
h1:focus{outline:none}
#wiz h1{font-size:clamp(32px,8.4vw,40px)}
#wiz .lead{margin-bottom:28px}
#wiz.is-in>*{animation:wiz-in .32s cubic-bezier(.2,.7,.2,1) both}
#wiz.is-in>*:nth-child(2){animation-delay:.03s}
#wiz.is-in>*:nth-child(3){animation-delay:.06s}
#wiz.is-in>*:nth-child(n+4){animation-delay:.09s}
@keyframes wiz-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* step 1: the sports, two to a row (one where the phone is narrow) */
.picks{display:grid;gap:12px;margin:0 0 24px}
.sports{grid-template-columns:repeat(2,minmax(0,1fr))}
.sport{align-items:flex-start;gap:4px;min-height:168px;padding:16px 16px 18px}
.pick-ic{display:grid;place-items:center;width:64px;height:64px;margin:0 0 12px;border-radius:18px;background:var(--tint);color:var(--ink);transition:background-color .18s ease,transform .18s ease}
.pick-ic .ic{width:50px;height:50px}
.pick-ic.sm{width:44px;height:44px;margin:0;border-radius:12px}
.pick-ic.sm .ic{width:36px;height:36px}
.pick-txt{display:flex;flex-direction:column;gap:4px;min-width:0}
.sport .pick-sub{font-size:13px;line-height:1.35;text-wrap:pretty}
.sports.is-odd .sport:last-child{grid-column:1/-1;flex-direction:row;align-items:center;min-height:0;gap:16px}
.sports.is-odd .sport:last-child .pick-ic{margin:0;flex:none}
.ic-acc{fill:var(--yellow)}
@media (hover:hover){.pick:hover .pick-ic{background:var(--tint-on)}.pick:hover .pick-ic .ic{transform:rotate(-4deg)}}
.pick-ic .ic{transition:transform .25s ease}
.pick.is-on{border-color:var(--yellow);box-shadow:0 0 0 1px var(--yellow),var(--shadow)}
.pick.is-on .pick-ic{background:var(--tint-on)}
@media (max-width:339px){.sports{grid-template-columns:1fr}.sport,.sports.is-odd .sport:last-child{flex-direction:row;align-items:center;min-height:0;gap:14px}.sport .pick-ic{margin:0;flex:none}}

/* step 2: singles or doubles */
.sides{grid-template-columns:repeat(2,minmax(0,1fr))}
.side{align-items:center;text-align:center;gap:4px;min-height:176px;padding:22px 14px 20px}
.pick-fig{display:grid;place-items:center;width:100%;height:88px;margin:0 0 14px;border-radius:14px;background:var(--tint);color:var(--ink);transition:background-color .18s ease}
.fig{width:112px;height:59px}
@media (hover:hover){.pick:hover .pick-fig{background:var(--tint-on)}}
.pick.is-on .pick-fig{background:var(--tint-on)}

/* step 3: the names, the two sides as a pair with "v" between them */
.names{display:grid;gap:0}
.pair-up{display:grid;gap:0;margin:0 0 24px}
.side-box{margin:0;padding:16px 16px 4px;border:1px solid var(--line);border-radius:16px;background:var(--field);box-shadow:var(--shadow);min-width:0}
.side-box legend{float:left;width:100%;padding:0;margin:0 0 12px;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.side-box legend+*{clear:both}
.vs{position:relative;z-index:1;display:grid;place-items:center;height:18px}
.vs span{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:var(--bg);border:1px solid var(--line);font-size:15px;font-weight:600;font-style:italic;color:var(--muted);line-height:1}
.field{margin:0 0 16px}
.field label{font-size:13px;font-weight:500;letter-spacing:.01em;color:var(--muted);margin:0 0 6px}
.field input,.field select{display:block;width:100%;min-height:52px;padding:12px 14px;font:500 17px/1.2 Geist,system-ui,sans-serif;letter-spacing:-.005em;text-transform:none;color:var(--ink);background:var(--field);border:1.5px solid var(--line-2);border-radius:12px;transition:border-color .15s,box-shadow .15s}
.side-box .field input{background:var(--bg)}
.field input::placeholder{font-weight:400;opacity:.6}
.field input:focus,.field select:focus,#code:focus{border-color:var(--ink);outline:none;box-shadow:0 0 0 4px rgba(247,194,59,.35)}
.field select{appearance:none;-webkit-appearance:none;padding-right:44px;cursor:pointer;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 22px) 50%,calc(100% - 16px) 50%;background-size:6px 6px;background-repeat:no-repeat}
.field.title{margin:0 0 4px}
.field.title input{min-height:48px;font-size:16px;background:transparent}
.names .msg{margin:8px 0 0}
.names .btn{margin-top:24px}
.side-box>.field:first-child{margin-top:2px}
.dbl .field label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.dbl .field{margin:0 0 10px}
.dbl .side-box{padding-bottom:6px}

/* step 4: the rules */
.card{margin:0 0 16px;padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--field);box-shadow:var(--shadow)}
.rules-top{display:flex;align-items:center;gap:12px;margin:0 0 14px}
.kicker{margin:0;font-size:13px;font-weight:600;letter-spacing:.01em;line-height:1.35;color:var(--muted)}
.rules-now{margin:0;font-size:18px;line-height:1.45;font-weight:500;letter-spacing:-.01em}
.match-who{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;margin:16px 0 0;padding:14px 0 0;border-top:1px solid var(--line);font-size:15px}
.match-who.dbl{flex-direction:column;align-items:flex-start}
.who-side{font-weight:600;overflow-wrap:anywhere}
.who-v{font-size:13px;font-style:italic;color:var(--muted)}
.fold-in .field select{font-size:16px;min-height:50px}
.folds{margin:0 0 20px;border:1px solid var(--line);border-radius:16px;background:var(--field);box-shadow:var(--shadow);overflow:hidden}
.fold{margin:0;border:0}
.fold+.fold{border-top:1px solid var(--line)}
.fold summary{min-height:56px;display:flex;align-items:center;padding:0 18px;font-weight:500;cursor:pointer;list-style:none;border-radius:16px}
.fold summary::-webkit-details-marker{display:none}
.fold summary::after{content:"";flex:none;width:8px;height:8px;margin:-4px 2px 0 auto;border-right:1.75px solid var(--muted);border-bottom:1.75px solid var(--muted);transform:rotate(45deg);transition:transform .2s ease}
.fold[open] summary::after{transform:translateY(4px) rotate(-135deg)}
.fold summary:focus-visible{outline-offset:-3px}
@media (hover:hover){.fold summary:hover{background:var(--tint)}}
.fold-in{padding:6px 18px 16px}
.words{margin:0;padding-left:18px;color:var(--muted);font-size:15px}
.words li{margin:0 0 8px}
.words li::marker{color:var(--line-2)}
.linkish{min-height:44px;padding:0;border:0;background:transparent;color:var(--ink);font:500 15px/1 Geist,system-ui,sans-serif;text-decoration:underline;text-decoration-color:var(--line-2);text-underline-offset:4px;cursor:pointer}
.msg:empty{min-height:0;margin:0}

/* the matches on this phone: one compact row each, the latest few on the home page and every one at #matches */
.matches{list-style:none;margin:0;padding:0 8px 0 16px;border:1px solid var(--line);border-radius:16px;background:var(--field);box-shadow:var(--shadow)}
.match{display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--line)}
.match:last-child{border-bottom:0}
.match-open{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;padding:10px 0;color:var(--ink);text-decoration:none;border-radius:8px}
.match-open b{font-size:16px;line-height:1.35;font-weight:600;overflow-wrap:anywhere}
.match-meta{font-size:13.5px;line-height:1.4;color:var(--muted)}
.match-meta .match-state{color:var(--ink)}
.mini{flex:none;display:grid;place-items:center;min-width:40px;min-height:40px;padding:0 8px;border:0;border-radius:10px;background:transparent;color:var(--muted);font:500 13px/1.2 Geist,system-ui,sans-serif;cursor:pointer;-webkit-tap-highlight-color:transparent}
.mini .bin{width:19px;height:19px}
@media (hover:hover){.mini:hover{background:var(--tint);color:var(--ink)}}
.mini[data-sure="1"]{border:1px solid var(--bad);color:var(--bad);padding:0 10px}
.more{display:inline-flex;align-items:center;min-height:44px;margin:6px 0 0;color:var(--ink);font-size:15px;font-weight:500;text-decoration:underline;text-decoration-color:var(--line-2);text-underline-offset:4px;border-radius:8px}
.more:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
#v-matches>.back{margin-bottom:20px}
#v-matches h1:focus{outline:none}
#all[hidden]{display:none}

/* the home page: on a tall screen the block sits nearer the middle (the space above it grows a little less than the
   space below); on a short screen, or with a long list, there is no spare space and nothing moves */
html[data-on="home"] main{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}
html[data-on="home"] .brand{flex:1 0 auto}
html[data-on="home"] main::after{content:"";flex:1.6 0 0}

@media (prefers-reduced-motion:reduce){.choice:hover,.pick:hover,.choice:active,.pick:active,.pick:hover .pick-ic .ic,.choice:hover .choice-go{transform:none!important}}
.foot-about{margin-top:10px}
.foot-about a{color:inherit;text-decoration:underline;text-underline-offset:2px}
