/* ---------------------------------------------------------------------------
   Rankings page — skiracing.nastar.com (index.jsp?pagename=selectrankings).

   Page-level layout only. The leaderboard component itself lives in
   theme_2026/css/leaderboard.css, which is a mirror of nastar.com's; nothing
   in this file belongs there, and nothing here exists on nastar.com.

   The page has one job that needed design rather than markup: making the
   historical boundary legible. The leaderboards start at the 2012-13 season;
   the legacy ranking forms below them are the only route to anything earlier.
   That is said in three places, in decreasing prominence -- the lede, the
   scope line beside each section heading, and the callout that opens the
   search section -- so a racer meets it whether they read the page top to
   bottom or scroll straight past the leaderboard.

   Sizes are in px, not rem: legacy nastar_2019.css carries `* { font-size:14px }`,
   which lands on <html> too, so the root font here is 14px and rem cannot
   express sizes that match the rest of the 2026 theme.

   THE FILENAME IS LOAD-BEARING. It cannot contain "/rankings": the vhost in
   /etc/httpd/conf/httpd.conf carries an UNANCHORED legacy pretty-URL rule,
   `RewriteRule /rankings /index.jsp?pagename=selectrankings`, which matches any
   request path containing that substring anywhere. A file named rankings.css
   was therefore served as the Rankings PAGE, with Content-Type text/html, and
   the browser silently parsed zero rules from it. Verified 2026-08-26:
   rankings.css and rankings-page.css both returned text/html; leaderboard.css
   and this name return text/css. Do not "tidy" this to rankings.css. The same
   trap applies to /results, /myresults, /raceresults, /user, /users, /team and
   /logout, which are unanchored in the same block.
   --------------------------------------------------------------------------- */

/* ------------------------------------------------------------- page head */
.rk-head { margin: 0 0 var(--space-6); }

/* Replaces the legacy `.title` div (34px italic Trebuchet in Drupal-era red).
   Same weight in the page, restated in the 2026 theme's own voice, because
   this page now opens with the 2026 leaderboard and a red italic heading above
   it read as two different sites stacked. */
.rk-title {
  margin: 0 0 var(--space-3);
  font: 700 34px/1.1 var(--font-heading);
  color: var(--nastar-blue-dark);
}

.rk-lede {
  max-width: 62em;
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--gray-700);
}
.rk-lede strong { font-weight: 700; color: var(--gray-900); }

/* Season labels are hyphenated ("2012-13"), and a hyphen is a legal break
   point, so the lede was breaking one across two lines as "2012-" / "13".
   Wrapped around every rendered season label on this page. */
.rk-nb { white-space: nowrap; }
.main-container .rk-lede a { color: var(--nastar-blue); text-decoration: underline; }

/* -------------------------------------------------------------- sections */
.rk-sec { margin: 0 0 var(--space-7); }

/* The transition between the modern leaderboard and the historical forms.
   A rule plus real space, so the second half of the page reads as a different
   tool rather than as more of the leaderboard. */
.rk-sec--search {
  margin-bottom: var(--space-5);
  padding-top: var(--space-7);
  border-top: 3px solid var(--gray-200);
}

.rk-sechead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-4);
}
.rk-sechead h2 {
  margin: 0;
  font: 700 26px/1.15 var(--font-heading);
  color: var(--nastar-blue-dark);
}

/* The scope line. Not decoration: it is the answer to "does this cover the
   season I want?", which is the one question this page has to answer twice. */
.rk-sechead__scope {
  margin: 0;
  padding: 4px var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--gray-700);
  font: 700 11px/1.3 var(--font-heading);
  letter-spacing: .08em;
  text-transform: uppercase;
}
/* Gold on the search section: on this site gold means "this is the thing you
   act on", and for a racer looking for an old season that is this section. */
.rk-sechead__scope--alt {
  background: rgba(234, 175, 29, .22);
  color: var(--gray-900);
}

/* ------------------------------------------------ historical-boundary note */
.rk-callout {
  margin: 0 0 var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--nastar-gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--gray-100);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--gray-700);
}
.rk-callout strong { color: var(--gray-900); }

/* ---------------------------------------------------- season for the forms
   The legacy "Change Season" control, promoted out of its floated
   `.season2change` box and given a label that says what it governs. The
   <select> and its Go button are the original controls with the original
   names -- only their wrapper and labelling changed. */
.rk-season {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.rk-season form { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.rk-season__label {
  font: 700 11px/1 var(--font-heading);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.rk-season__select {
  min-height: var(--tap-min);
  max-width: 100%;
  padding: 0 var(--space-3);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-900);
  font: 15px/1 var(--font-body);
}
.rk-season__note {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--gray-500);
}

/* ------------------------------------------------------- the legacy forms
   Untouched apart from the space around them. `.subtitle` floats, so each
   form group is given its own containing block; without it the floated
   headings escaped upward past the new section header. */
.rk-forms { clear: both; }
.rk-forms::after { content: ""; display: table; clear: both; }

/* --------------------------------------------------- leaderboard-less state
   Shown in place of the leaderboard when no artifact is readable. The page
   must still work: the ranking forms below cover every season, including the
   ones the leaderboard would have shown. */
.rk-empty {
  margin: 0;
  padding: var(--space-5);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-100);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--gray-700);
}

@media (max-width: 640px) {
  .rk-title { font-size: 26px; }
  .rk-sechead h2 { font-size: 21px; }
  .rk-lede { font-size: 15px; }
  .rk-sec { margin-bottom: var(--space-6); }
  .rk-sec--search { padding-top: var(--space-6); }
  .rk-callout { padding: var(--space-3) var(--space-4); }
  .rk-season { gap: var(--space-2); }
  .rk-season form { width: 100%; }
  .rk-season__select { flex: 1 1 auto; min-width: 0; }
}
