| 1 | :root { |
| 2 | color-scheme: light dark; |
| 3 | --line: #aaa; |
| 4 | --header-bg: #cbf0fa; |
| 5 | } |
| 6 | |
| 7 | @media (prefers-color-scheme: dark) { |
| 8 | :root { |
| 9 | --header-bg: #15363e; |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | body { |
| 14 | font-family: 'Helvetica Neue', Helvetica, Arial, FreeSans, sans-serif; |
| 15 | margin: 0; |
| 16 | } |
| 17 | |
| 18 | section { |
| 19 | margin: 0 8px; |
| 20 | } |
| 21 | |
| 22 | .intro p { |
| 23 | font-size: .8rem; |
| 24 | padding-top: 1em; |
| 25 | text-align: center; |
| 26 | } |
| 27 | |
| 28 | /* Layout ------------------------------------------------------------------ |
| 29 | The bracket is three column-groups: the left half (East + South), the |
| 30 | centre (Final Four + title game) and the right half (West + Midwest). |
| 31 | Each group owns its own date band, which is what lets a group scroll |
| 32 | horizontally on a phone without the band drifting out of register. */ |
| 33 | |
| 34 | .bracket { |
| 35 | display: flex; |
| 36 | flex-direction: row; |
| 37 | align-items: stretch; |
| 38 | } |
| 39 | |
| 40 | .half { |
| 41 | display: flex; |
| 42 | flex-direction: column; |
| 43 | min-width: 0; |
| 44 | } |
| 45 | |
| 46 | /* Fill the height left over by the date band so every group's columns line |
| 47 | up with each other. */ |
| 48 | .half > .tournament:last-child { |
| 49 | flex: 1 1 auto; |
| 50 | } |
| 51 | |
| 52 | .tournament { |
| 53 | display: flex; |
| 54 | flex-direction: row; |
| 55 | } |
| 56 | |
| 57 | .tournament .round { |
| 58 | font-size: .5rem; |
| 59 | display: flex; |
| 60 | flex-direction: column; |
| 61 | justify-content: center; |
| 62 | white-space: nowrap; |
| 63 | overflow: hidden; |
| 64 | text-overflow: ellipsis; |
| 65 | /* A starting size, not a floor: the columns shrink to fit the viewport. */ |
| 66 | width: 200px; |
| 67 | list-style: none; |
| 68 | padding: 0; |
| 69 | } |
| 70 | |
| 71 | .tournament .round .spacer { |
| 72 | flex-grow: 2; |
| 73 | } |
| 74 | |
| 75 | .tournament .round .spacer:first-child, |
| 76 | .tournament .round .spacer:last-child { |
| 77 | flex-grow: 1; |
| 78 | } |
| 79 | |
| 80 | .tournament-header { |
| 81 | margin-top: 1em; |
| 82 | text-align: center; |
| 83 | font-weight: bold; |
| 84 | background-color: var(--header-bg); |
| 85 | } |
| 86 | |
| 87 | /* Equal-height bands across all three groups, so the brackets below them |
| 88 | start at the same y. Never let a round name wrap and break that; let a long |
| 89 | one ("National Championship") spill into the blank columns flanking it |
| 90 | instead, which reads as centred rather than clipped. */ |
| 91 | .tournament-header .round { |
| 92 | min-height: 2.8em; |
| 93 | white-space: nowrap; |
| 94 | overflow: visible; |
| 95 | } |
| 96 | |
| 97 | .round-1 li.game-left, |
| 98 | .round-2 li.game-left, |
| 99 | .round-3 li.game-left, |
| 100 | .round-4 li.game-left, |
| 101 | .semi-final li.game-left { |
| 102 | padding-left: 0.5em; |
| 103 | } |
| 104 | |
| 105 | .round-1 li.game-right, |
| 106 | .round-2 li.game-right, |
| 107 | .round-3 li.game-right, |
| 108 | .round-4 li.game-right, |
| 109 | .semi-final li.game-right { |
| 110 | padding-right: 0.5em; |
| 111 | } |
| 112 | |
| 113 | .region { |
| 114 | font-size: 1rem; |
| 115 | font-weight: bold; |
| 116 | } |
| 117 | |
| 118 | .region-right { |
| 119 | text-align: right; |
| 120 | padding-right: 5px; |
| 121 | } |
| 122 | |
| 123 | .region-left { |
| 124 | text-align: left; |
| 125 | padding-left: 5px; |
| 126 | } |
| 127 | |
| 128 | .seed-num { |
| 129 | font-size: .8em; |
| 130 | opacity: .7; |
| 131 | } |
| 132 | |
| 133 | /* Connector lines. Order matters: game-top clears the side border so the |
| 134 | bracket "elbow" reads correctly. Don't reorder these four rules. */ |
| 135 | li.game-right { |
| 136 | text-align: right; |
| 137 | border-left: 1px solid var(--line); |
| 138 | } |
| 139 | |
| 140 | li.game-left { |
| 141 | border-right: 1px solid var(--line); |
| 142 | } |
| 143 | |
| 144 | li.game-bottom { |
| 145 | border-bottom: 1px solid var(--line); |
| 146 | } |
| 147 | |
| 148 | li.game-top { |
| 149 | border: none; |
| 150 | border-bottom: 1px solid var(--line); |
| 151 | } |
| 152 | |
| 153 | li.game-left.spacer { |
| 154 | border-right: 1px solid var(--line); |
| 155 | min-height: 5px; |
| 156 | padding-right: .25em; |
| 157 | } |
| 158 | |
| 159 | li.game-right.spacer { |
| 160 | border-left: 1px solid var(--line); |
| 161 | min-height: 5px; |
| 162 | padding-left: .25em; |
| 163 | text-align: left; |
| 164 | } |
| 165 | |
| 166 | .final { |
| 167 | text-align: center; |
| 168 | padding-top: 1em; |
| 169 | padding-bottom: 1em; |
| 170 | border: 1px solid var(--line); |
| 171 | margin-top: 1em; |
| 172 | margin-bottom: 1em; |
| 173 | font-weight: bold; |
| 174 | } |
| 175 | |
| 176 | @media (min-width: 800px) { |
| 177 | .intro p { |
| 178 | font-size: 1rem; |
| 179 | } |
| 180 | |
| 181 | .tournament .round { |
| 182 | font-size: .75rem; |
| 183 | } |
| 184 | |
| 185 | .region { |
| 186 | font-size: 1.5rem; |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | /* Letting team names wrap removes the columns' ability to shrink below their |
| 191 | min-content width, so 13 of them stop fitting. Only switch it on once |
| 192 | there is room, or the page gains a horizontal scrollbar. */ |
| 193 | @media (min-width: 1000px) { |
| 194 | .tournament:not(.tournament-header):not(.mini) .round { |
| 195 | white-space: normal; |
| 196 | overflow: visible; |
| 197 | text-overflow: clip; |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | /* ========================================================================= |
| 202 | NARROW-SCREEN VIEW |
| 203 | |
| 204 | Below 800px the 13-column mirrored bracket is unusable, so it is replaced |
| 205 | wholesale: a champion card, then the four regions as condensed four-column |
| 206 | brackets, then the Final Four. Nothing here scrolls horizontally, down to |
| 207 | 320px. The two views are alternatives and never appear together. |
| 208 | ====================================================================== */ |
| 209 | |
| 210 | .mobile-views { |
| 211 | display: none; |
| 212 | } |
| 213 | |
| 214 | @media (max-width: 799px) { |
| 215 | .bracket { |
| 216 | display: none; |
| 217 | } |
| 218 | |
| 219 | .mobile-views { |
| 220 | display: block; |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | .champion-card { |
| 225 | text-align: center; |
| 226 | border: 2px solid var(--line); |
| 227 | padding: .75em; |
| 228 | margin-top: 1em; |
| 229 | } |
| 230 | |
| 231 | .champion-label { |
| 232 | font-size: .7rem; |
| 233 | letter-spacing: .12em; |
| 234 | text-transform: uppercase; |
| 235 | opacity: .7; |
| 236 | } |
| 237 | |
| 238 | .champion-name { |
| 239 | font-size: 1.5rem; |
| 240 | font-weight: bold; |
| 241 | padding: .1em 0; |
| 242 | } |
| 243 | |
| 244 | .champion-over { |
| 245 | font-size: .8rem; |
| 246 | opacity: .7; |
| 247 | } |
| 248 | |
| 249 | .mobile-views h3 { |
| 250 | font-size: .75rem; |
| 251 | text-transform: uppercase; |
| 252 | letter-spacing: .08em; |
| 253 | opacity: .7; |
| 254 | margin: 1em 0 .4em; |
| 255 | } |
| 256 | |
| 257 | .mobile-views h3 small { |
| 258 | text-transform: none; |
| 259 | letter-spacing: 0; |
| 260 | font-weight: normal; |
| 261 | } |
| 262 | |
| 263 | .card { |
| 264 | border: 1px solid var(--line); |
| 265 | margin-bottom: .4em; |
| 266 | } |
| 267 | |
| 268 | .side { |
| 269 | font-size: .85rem; |
| 270 | padding: .35em .5em; |
| 271 | } |
| 272 | |
| 273 | .side + .side { |
| 274 | border-top: 1px solid var(--line); |
| 275 | } |
| 276 | |
| 277 | .side.won { |
| 278 | font-weight: bold; |
| 279 | background-color: var(--header-bg); |
| 280 | } |
| 281 | |
| 282 | .panel-head { |
| 283 | display: flex; |
| 284 | justify-content: space-between; |
| 285 | align-items: baseline; |
| 286 | gap: .5em; |
| 287 | background-color: var(--header-bg); |
| 288 | padding: .45em .6em; |
| 289 | margin: 1em 0 0; |
| 290 | font-size: .8rem; |
| 291 | } |
| 292 | |
| 293 | .panel-name { |
| 294 | font-weight: bold; |
| 295 | text-transform: uppercase; |
| 296 | letter-spacing: .06em; |
| 297 | } |
| 298 | |
| 299 | .panel-winner { |
| 300 | opacity: .8; |
| 301 | overflow: hidden; |
| 302 | text-overflow: ellipsis; |
| 303 | white-space: nowrap; |
| 304 | } |
| 305 | |
| 306 | /* The four-column region bracket. Columns share the width evenly and can |
| 307 | shrink freely, which is what guarantees no horizontal scroll at 320px. */ |
| 308 | .tournament.mini { |
| 309 | padding-top: .5em; |
| 310 | } |
| 311 | |
| 312 | .tournament.mini .round { |
| 313 | flex: 1 1 0; |
| 314 | width: auto; |
| 315 | min-width: 0; |
| 316 | font-size: .62rem; |
| 317 | } |
| 318 | |
| 319 | /* A4 portrait is 794 CSS px, which matches the narrow-screen breakpoint above. |
| 320 | Force the real bracket back on, or that paper size would print the phone |
| 321 | view instead. */ |
| 322 | @media print { |
| 323 | .mobile-views { |
| 324 | display: none !important; |
| 325 | } |
| 326 | |
| 327 | .bracket { |
| 328 | display: flex !important; |
| 329 | } |
| 330 | |
| 331 | .intro { |
| 332 | display: none; |
| 333 | } |
| 334 | |
| 335 | .tournament-header { |
| 336 | margin-top: 0; |
| 337 | } |
| 338 | |
| 339 | .tournament .round { |
| 340 | font-size: .5rem; |
| 341 | margin: 0; |
| 342 | flex: 0 1 auto; |
| 343 | } |
| 344 | } |
| 345 |