:root {
  --green: #18453B;
  --green-ink: #0F2E27;
  --green-tint: #E4EEE8;
  --ink: #1C2321;
  --muted: #66706C;
  --line: #D8DDD9;
  --paper: #FFFFFF;
  --panel: #F5F7F5;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); line-height: 1.5;
}
a { color: var(--green); }
header {
  padding: 2.2rem 2.5rem 1.4rem; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 46rem) minmax(10rem, 1fr); gap: 2rem; align-items: end;
}
header h1 {
  font-family: var(--serif); font-weight: 500; font-size: 2.35rem; line-height: 1.08;
  margin: 0 0 .6rem; letter-spacing: -.01em;
}
header p { margin: 0; font-size: 1.05rem; max-width: 42rem; }
.stamp { font-family: var(--sans); font-size: .8rem; color: var(--muted); justify-self: end; text-align: right; }
main { display: grid; grid-template-columns: 19rem minmax(0, 1fr); min-height: 70vh; }
aside {
  background: var(--panel); border-right: 1px solid var(--line);
  padding: 1.6rem 1.5rem 2rem; font-family: var(--sans); font-size: .9rem;
}
aside h2 { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
aside h2:first-child { margin-top: 0; }
.hint { color: var(--muted); font-size: .8rem; margin: .2rem 0 .6rem; line-height: 1.4; }
label.row { display: flex; align-items: center; gap: .55rem; padding: .28rem 0; cursor: pointer; }
label.row input { accent-color: var(--green); width: 1rem; height: 1rem; margin: 0; }
label.row .sub { color: var(--muted); font-size: .78rem; margin-left: auto; }
.range-wrap { position: relative; height: 2.2rem; margin: .4rem 0 .2rem; }
.range-wrap input[type=range] {
  position: absolute; left: 0; right: 0; top: 0; width: 100%; margin: 0;
  -webkit-appearance: none; appearance: none; background: none; pointer-events: none; height: 2.2rem;
}
.range-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: all; width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--green); cursor: pointer; margin-top: -7px;
}
.range-wrap input[type=range]::-moz-range-thumb {
  pointer-events: all; width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--green); cursor: pointer;
}
.range-wrap input[type=range]::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.range-wrap input[type=range]::-moz-range-track { height: 4px; background: transparent; }
.range-wrap .track { position: absolute; left: 9px; right: 9px; top: 1.05rem; height: 4px; background: var(--line); border-radius: 2px; }
.range-wrap .fill { position: absolute; top: 1.05rem; height: 4px; background: var(--green); border-radius: 2px; }
.nums { display: flex; align-items: center; gap: .5rem; }
.nums input[type=number] {
  width: 4.2rem; font: inherit; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: 4px; background: var(--paper);
}
.nums span { color: var(--muted); }
.presets { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.presets button {
  font: inherit; font-size: .78rem; padding: .22rem .55rem; border: 1px solid var(--line); background: var(--paper);
  border-radius: 999px; cursor: pointer; color: var(--ink);
}
.presets button:hover { border-color: var(--green); color: var(--green); }
section.content { padding: 1.6rem 2.5rem 3rem; min-width: 0; }
.headline { font-family: var(--serif); font-size: 1.35rem; line-height: 1.35; margin: 0 0 1.4rem; max-width: 48rem; }
.headline strong { font-weight: 600; color: var(--green-ink); }
/* beside the headline: how far along the season usually is by now, for the same search */
.top { display: grid; grid-template-columns: minmax(0, 1fr) 17.5rem; gap: 1.8rem; align-items: start; margin: 0 0 1.4rem; max-width: 70rem; }
.top .headline { margin: 0; }
.sofar { margin: .15rem 0 0; font-family: var(--sans); font-size: .86rem; line-height: 1.45; color: var(--ink); background: var(--green-tint); border-left: 3px solid var(--green); padding: .75rem .95rem; }
.sofar strong { font-weight: 600; color: var(--green-ink); font-size: 1.05rem; }
.sofar .spread { display: block; margin-top: .45rem; font-size: .78rem; color: var(--muted); }
@media (max-width: 1180px) { .top { grid-template-columns: minmax(0, 1fr); gap: 1rem; } .sofar { max-width: 30rem; } }
.headline .cmp { display: block; font-size: 1rem; color: var(--muted); margin-top: .35rem; }
.chart { width: 100%; height: 420px; }
.chart.short { height: 300px; }
h3 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; margin: 2rem 0 .3rem; }
.note { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin: 0 0 .6rem; max-width: 46rem; }
.key { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-family: var(--sans); font-size: .82rem; color: var(--muted); margin: 0 0 .25rem; }
.key span { display: inline-flex; align-items: center; gap: .45rem; }
.key i { display: inline-block; width: 1.5rem; border-top: 2px solid #8A9690; }
.key i.cur { border-top: 3px solid var(--green); }
.key i.last { border-top-color: #4B5B55; }
.key i.dash { border-top-style: dashed; }
.key i.dot { border-top-style: dotted; }
.key i.band { height: .7rem; border: 0; background: rgba(75, 91, 85, .16); }
.key i.joe, .key i.other { height: .7rem; border: 0; width: 1rem; border-radius: 2px; }
.key i.joe { background: rgba(24, 69, 59, .55); }
.key i.other { background: rgba(194, 112, 27, .7); }
.pick { margin-left: .8rem; white-space: nowrap; cursor: pointer; }
.pick input { accent-color: var(--green); vertical-align: -1px; }
.src { font-size: .8rem; color: var(--muted); }
.src a { color: inherit; }
.maybe { display: block; font-size: .74rem; }
.under .maybe { display: inline; }
.under .maybe::before { content: " · "; }
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: .86rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tablewrap { overflow-x: auto; }                 /* a narrow screen scrolls the table, never the page */
th { font-weight: 500; color: var(--muted); font-size: .78rem; }
td.r, th.r { text-align: right; white-space: nowrap; }
td.rank { color: var(--green-ink); font-weight: 600; white-space: nowrap; }
tbody tr:hover { background: var(--green-tint); }
.more { font-family: var(--sans); font-size: .85rem; margin-top: .8rem; }
.more button { font: inherit; padding: .35rem .8rem; border: 1px solid var(--green); color: var(--green); background: var(--paper); border-radius: 4px; cursor: pointer; }
footer { border-top: 1px solid var(--line); padding: 1.2rem 2.5rem 2rem; font-family: var(--sans); font-size: .8rem; color: var(--muted); }
footer p { margin: .55rem 0; }
/* the asterisk after "ranking" in the title leads to the paragraph about rankings, which wears the same asterisk */
h1 .star { color: var(--green); text-decoration: none; padding: 0 .25em 0 .03em; margin-right: -.25em; }   /* close to the word, easy to hit */
h1 .star:hover { color: var(--green-ink); }
footer .star { color: var(--green); font-weight: 600; margin-right: .1em; }
.loading { padding: 3rem; color: var(--muted); font-family: var(--sans); }
@media (max-width: 900px) {
  header { grid-template-columns: 1fr; padding: 1.5rem 1.2rem 1rem; }
  .stamp { justify-self: start; text-align: left; }
  main { grid-template-columns: 1fr; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); }
  section.content { padding: 1.2rem 1.2rem 2rem; }
  .chart { height: 320px; }
  footer { padding: 1rem 1.2rem 1.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .range-wrap .fill { transition: left .05s linear, width .05s linear; }
  /* It is the last paragraph on the page, so it cannot scroll to the top of the window: glide there and light it up */
  html { scroll-behavior: smooth; }
  footer p:target { animation: landed 3s ease-out; border-radius: 2px; }
  @keyframes landed {
    0%, 35% { background: var(--green-tint); box-shadow: 0 0 0 .35rem var(--green-tint); color: var(--ink); }
    100% { background: transparent; box-shadow: 0 0 0 .35rem transparent; }
  }
}
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* the two pages, United States and international */
.pages { display: flex; gap: 1.2rem; margin: 0 0 .8rem; font-family: var(--sans); font-size: .85rem; }
.pages a { color: var(--muted); text-decoration: none; padding-bottom: .15rem; border-bottom: 2px solid transparent; }
.pages a:hover { color: var(--green); }
.pages a[aria-current] { color: var(--green); border-bottom-color: var(--green); font-weight: 500; }
aside select { font: inherit; width: 100%; margin-top: .5rem; padding: .35rem .4rem; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); }
#regions.off { opacity: .45; }
td.where { white-space: nowrap; }

/* a chart that stays folded away until asked for */
details.fold > summary { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; margin: 2rem 0 .3rem; cursor: pointer; }
details.fold > summary::marker { color: var(--green); font-size: .85rem; }
details.fold > summary:hover { color: var(--green); }

#jel { font: inherit; width: 100%; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 4px; }

/* shown only when the daily update has stopped */
.stale { font-family: var(--sans); font-size: .88rem; color: #6B4A0F; background: #FFF4DD; border: 1px solid #E9CC8F; border-radius: 4px; padding: .6rem .8rem; margin: 0 0 1.2rem; max-width: 48rem; }

/* the two sortable column heads of the listings table */
.sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.sort:hover { color: var(--green); }
.sort[aria-pressed="true"] { color: var(--green); font-weight: 600; }
.sort[aria-pressed="true"]::after { content: " \25BE"; }
.past { color: #9AA39F; text-decoration: line-through; }

/* seven columns need room; below that, Type and Found on move to a line under the title */
.under { display: none; margin-top: .15rem; }
@media (max-width: 1250px) {
  .opt { display: none; }
  .under { display: block; }
}

/* the two tick boxes that follow the rank presets, with no heading of their own */
.which { margin-top: .9rem; }

/* one rank control; on the US page a two-way switch says which ranking it reads */
/* research universities or liberal arts colleges: they are ranked on different lists, so the page shows one kind at a time */
.kind { margin: 0 0 1.4rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; font-family: var(--sans); }
.two button { font: inherit; font-size: .82rem; line-height: 1.25; padding: .55rem .3rem; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); cursor: pointer; }
.two button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.two button:not([aria-pressed="true"]):hover { border-color: var(--green); color: var(--green); }
.seg[hidden] { display: none; }
.rank-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 0 .6rem; }
.rank-head h2 { margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.seg button { font: inherit; font-size: .78rem; padding: .2rem .7rem; border: 0; background: none; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--green); color: #fff; }
.seg button:not([aria-pressed="true"]):hover { color: var(--green); }
.ctry { display: block; font-size: .78rem; color: var(--muted); }
#range-count { white-space: nowrap; }
