/* Roll Corn
   The look borrows from the seed signs staked at the end of Iowa corn rows:
   a flat yellow plaque, heavy black condensed lettering, a stake below it. */

:root {
  --gold: #FFCD00;
  --ink: #000000;
  --paper: #FFFFFF;
  --husk: #5F5F4C;      /* quiet text: timestamps, counts, footer */
  --furrow: #E3E0D0;    /* hairlines between stories */
  --stake: #000000;     /* the line running down from each sign */
  --clock: #000000;     /* the time column in Just in */
  --sign-text: #000000;
  --measure: 36rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  color-scheme: light;   /* white page for everyone, whatever the device theme */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  font-stretch: 100%;
  -webkit-text-size-adjust: 100%;
}
@media (min-width: 70rem) { body { font-size: 1.0625rem; } }

/* the mouse pointer is the corn wheel; it grows over anything clickable.
   The first line is for browsers that do not understand image-set. */
html {
  cursor: url("cursor.png") 16 16, auto;
  cursor: image-set(url("cursor.png") 1x, url("cursor@2x.png") 2x) 16 16, auto;
}
a, button {
  cursor: url("cursor-link.png") 22 22, pointer;
  cursor: image-set(url("cursor-link.png") 1x, url("cursor-link@2x.png") 2x) 22 22, pointer;
}

a { color: inherit; }
a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  background: var(--ink);
  color: var(--paper);
  padding: .6rem 1rem;
}
.skip:focus { left: var(--gutter); top: .5rem; z-index: 10; }

/* ---------- masthead: the big sign ---------- */

.masthead {
  background: var(--gold);
  color: var(--sign-text);
  padding: clamp(.6rem, 1.5vw, 1rem);
}
.masthead-sign {
  border: clamp(4px, .7vw, 9px) solid var(--sign-text);
  border-radius: clamp(10px, 1.6vw, 22px);
  padding: clamp(1rem, 3vw, 2rem) var(--gutter) clamp(.9rem, 2vw, 1.4rem);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  column-gap: 2rem;
}
.wordmark {
  grid-column: 1 / -1;
  margin: 0;
  font-weight: 900;
  font-stretch: 62%;
  font-size: clamp(3.6rem, 17.2vw, 15.5rem);
  line-height: .8;
  letter-spacing: -.015em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* the two O's are corn wheels: an ear with its husk rolled around it.
   --roll is set from the scroll position so they turn as the page moves */
.ear {
  display: inline-block;
  transform-origin: 50% 50%;
  transform: rotate(var(--roll, 0deg));
}
.wordmark .ear {
  width: .85em;
  height: .85em;
  margin: 0 -.01em;
  vertical-align: -.09em;
  animation: roll-in 1.2s cubic-bezier(.2, .7, .2, 1) backwards;
}
.wordmark .word { display: inline-block; }
.wordmark .word + .word { margin-left: .16em; }
.wordmark .word + .word .ear { animation-delay: .12s; }
@keyframes roll-in {
  from { transform: rotate(-270deg); }
  to { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .wordmark .ear { animation: none; }
}
.tagline {
  margin: clamp(.8rem, 2vw, 1.4rem) 0 0;
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  font-weight: 600;
  max-width: 30ch;
  line-height: 1.25;
}
.updated {
  margin: 0;
  font-size: .9rem;
  font-weight: 500;
  text-align: right;
}

/* wide screens: the name on the left, the details stacked at the right edge,
   so the sign stays a band and the headlines start higher */
@media (min-width: 62rem) {
  .masthead-sign {
    grid-template-columns: auto 1fr;
    grid-template-rows: 1fr auto;
    column-gap: 3rem;
  }
  .wordmark {
    grid-column: 1;
    grid-row: 1 / span 2;
    font-size: clamp(7rem, 11.4vw, 11.5rem);
  }
  .tagline {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: end;
    text-align: right;
    max-width: 22ch;
  }
  .updated { grid-column: 2; grid-row: 2; margin-top: .5rem; }
}

/* ---------- sport jump bar ---------- */

.jump {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #000;
  color: #fff;
}
.jump-inner {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}
.jump-inner::-webkit-scrollbar { display: none; }
.jump a {
  flex: none;
  padding: .8rem 0 .65rem;
  border-bottom: 4px solid transparent;
  font-stretch: 80%;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
}
.jump a:hover { border-bottom-color: var(--gold); }
.jump a:focus-visible { outline-color: var(--gold); outline-offset: -3px; }
.jump .jump-home {
  display: flex;
  align-items: center;
  padding: 0;
  border-bottom: 0;
}
.jump-home .ear { height: 2.1rem; width: 2.1rem; }

/* ---------- signs and stakes ---------- */

main {
  max-width: 90rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3.25rem) var(--gutter) 0;
}

.sign {
  display: inline-block;
  margin: 0;
  padding: .3em .6em .22em;
  background: var(--gold);
  color: var(--sign-text);
  border-radius: 5px;
  font-weight: 900;
  font-stretch: 68%;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .01em;
  white-space: nowrap;
}

/* the stake: a rule dropping from the sign, with the stories hung off it */
.latest-body,
.plot-body,
.quiet {
  margin: 0 0 0 .9rem;
  padding: 1.1rem 0 .25rem 1.4rem;
  border-left: 3px solid var(--stake);
}

/* ---------- a story ---------- */

.stories { list-style: none; margin: 0; padding: 0; }
.stories .story {
  padding: .8rem 0;
  border-top: 1px solid var(--furrow);
  break-inside: avoid;
}
.story { max-width: var(--measure); }
.story a,
.brief a {
  font-weight: 600;
  font-size: 1.04em;
  line-height: 1.28;
  text-decoration: none;
  text-wrap: pretty;
}
.story a:hover,
.brief a:hover {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: .16em;
  text-underline-offset: .18em;
}
.story a:visited,
.brief a:visited { color: var(--husk); }
.from {
  margin: .25rem 0 0;
  font-size: .82em;
  color: var(--husk);
}
.source {
  font-weight: 700;
  color: var(--ink);
  margin-right: .5em;
}

/* published since this reader's last visit */
.is-new .source::before {
  content: "New";
  display: inline-block;
  margin-right: .5em;
  padding: .05em .42em 0;
  border-radius: 3px;
  background: var(--gold);
  color: #000;
  font-weight: 800;
  font-stretch: 80%;
}

.quiet {
  color: var(--husk);
  max-width: var(--measure);
}

/* ---------- latest: the lead story beside a running clock ---------- */

.latest { margin-bottom: clamp(2.75rem, 5vw, 4.5rem); }

.latest-body {
  display: grid;
  gap: 2rem clamp(2rem, 4vw, 4rem);
  align-items: start;
}
@media (min-width: 58rem) {
  .latest-body { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}

.lead {
  max-width: 20em;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1;
}
.lead a {
  font-size: 1em;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.lead .from { font-size: 1rem; line-height: 1.45; margin-top: 1rem; }

/* three runners-up under the lead */
.runners {
  list-style: none;
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  padding: 1.1rem 0 0;
  border-top: 3px solid var(--stake);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1.1rem clamp(1.25rem, 2.5vw, 2.25rem);
}
.runners .story a { font-size: 1.12em; font-weight: 700; font-stretch: 90%; line-height: 1.2; }

.justin-title {
  margin: 0;
  padding-bottom: .45rem;
  border-bottom: 3px solid var(--stake);
  font-size: 1.35rem;
  font-weight: 900;
  font-stretch: 70%;
  line-height: 1;
}
.briefs { list-style: none; margin: 0; padding: 0; }
.brief {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  column-gap: .9rem;
  padding: .62rem 0;
  border-bottom: 1px solid var(--furrow);
}
.brief .when {
  padding-top: .08em;
  color: var(--clock);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 1.05em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.brief a { font-size: 1em; line-height: 1.25; }
.brief .from { margin-top: .12rem; }

/* ---------- the field: one row per sport ---------- */

.field {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: clamp(2.75rem, 4vw, 3.75rem) clamp(1.75rem, 3vw, 3rem);
  align-items: start;
}

.plot-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .2rem 1rem;
}
.plot-meta {
  margin: 0;
  padding-bottom: .15rem;
  font-size: .82em;
  color: var(--husk);
  white-space: nowrap;
}

/* the first story in each sport carries the row */
.story-top { padding-bottom: 1rem; }
.story-top a {
  font-size: 1.5em;
  font-weight: 800;
  font-stretch: 80%;
  line-height: 1.08;
  letter-spacing: -.005em;
  text-wrap: balance;
}
.story-top .from { margin-top: .5rem; }

/* the busiest sport runs the full width */
.plot-wide { grid-column: 1 / -1; }
@media (min-width: 58rem) {
  .plot-wide .plot-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    column-gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
  }
  .plot-wide .story-top a { font-size: clamp(1.9rem, 2.9vw, 2.7rem); line-height: 1.03; }
  .plot-wide .stories { columns: 2; column-gap: clamp(1.75rem, 3vw, 3rem); }
  .plot-wide .stories .story:first-child { border-top: 0; padding-top: 0; }
}

/* ---------- footer ---------- */

.foot {
  max-width: 90rem;
  margin: clamp(3rem, 6vw, 5rem) auto 0;
  padding: 1.5rem var(--gutter) 2.5rem;
  color: var(--husk);
  font-size: .88rem;
}
.foot::before {
  content: "";
  display: block;
  border-top: 3px solid var(--stake);
  margin-bottom: 1.5rem;
}
.foot p { max-width: 68ch; margin: 0 0 .6rem; }

@media (max-width: 34rem) {
  /* on a phone the two words stack, so each can be large */
  .wordmark { font-size: clamp(4.4rem, 34vw, 8.6rem); line-height: .9; }
  .wordmark .word { display: block; }
  .wordmark .word + .word { margin-left: 0; }
  .masthead-sign { grid-template-columns: 1fr; }
  .updated { text-align: left; margin-top: .5rem; }
  .latest-body, .plot-body, .quiet { margin-left: .5rem; padding-left: 1rem; }
}
