/* J.A.R. public-site theme: white, light gray, anthracite and WordPress blue. */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.75;
  color: #333;
  background: #fff;
}

h1,
h2,
h3,
h4,
button,
th,
.sans {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.25;
}

h1,
h2,
h3,
h4 { color: #1a1a1a; }

a { color: #0073aa; text-decoration: underline; }
a:hover { color: #005177; }
button { cursor: pointer; }

.wrap {
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
}

/* Standard J.A.R. navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.header-inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-branding {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.site-logo {
  width: auto;
  height: 84px;
  display: block;
  flex-shrink: 0;
}

.site-tagline {
  max-width: 200px;
  color: #666;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.main-nav a {
  display: block;
  padding: 10px 14px;
  color: #333;
  font: 600 14px/1.25 "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-decoration: none;
}

.main-nav a:hover { color: #0073aa; }

.main-nav a.nav-cta {
  margin-left: 8px;
  color: #fff;
  background: #0073aa;
}

.main-nav a.nav-cta:hover { color: #fff; background: #005177; }

.menu-toggle {
  display: none;
  padding: 8px 14px;
  color: #333;
  background: none;
  border: 1px solid #ccc;
  font-size: 14px;
  font-weight: 600;
}

/* Standard J.A.R. hero treatment */
.hero {
  padding: 92px 24px 76px;
  color: #fff;
  background:
    linear-gradient(rgba(20, 24, 28, 0.74), rgba(20, 24, 28, 0.84)),
    #23282d center/cover no-repeat
    url("https://commons.wikimedia.org/wiki/Special:FilePath/Krankenwagen%20in%20Berlin.%20April%202020.jpg?width=1600");
  text-align: center;
}

.hero-copy {
  width: min(820px, 100%);
  margin-inline: auto;
}

.eyebrow {
  display: block;
  margin-bottom: 12px;
  color: #0073aa;
  font: 700 13px/1.25 "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero .eyebrow { color: #9ec7dd; }

h1 {
  color: #fff;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

h1 em {
  color: #fff;
  font-style: normal;
}

.hero-text {
  max-width: 680px;
  margin: 20px auto 0;
  color: #d6d6d6;
  font-size: 19px;
  line-height: 1.6;
}

.summary-card {
  width: min(760px, 100%);
  margin: 34px auto 0;
  color: #333;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #e5e5e5;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  text-align: left;
}

.summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  color: #666;
  background: #f7f7f7;
  border-bottom: 1px solid #e5e5e5;
  font: 700 12px/1.25 "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 1px;
}

.connection { color: #287346; }
.connection.error { color: #a33a32; }
.connection.loading { color: #8a5a20; }

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 22px 18px;
}

.summary-stats div + div {
  padding-left: 18px;
  border-left: 1px solid #e5e5e5;
}

.summary-stats dt {
  color: #777;
  font: 700 12px/1.25 "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
}

.summary-stats dd {
  margin-top: 5px;
  color: #0073aa;
  font: 700 clamp(1.35rem, 2.5vw, 2rem)/1.1 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.published-time {
  margin: 0;
  padding: 11px 18px;
  color: #777;
  border-top: 1px solid #e5e5e5;
  font: 13px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Leaderboard section */
.board-section {
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
  padding: 72px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

h2 {
  margin-bottom: 0;
  font-size: 32px;
}

.refresh-button {
  display: inline-block;
  padding: 11px 20px;
  color: #0073aa;
  background: #fff;
  border: 2px solid #0073aa;
  font-size: 14px;
  font-weight: 700;
}

.refresh-button:hover {
  color: #fff;
  background: #0073aa;
}

.refresh-button:disabled { cursor: wait; opacity: 0.6; }

.board-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
  padding: 14px;
  background: #f7f7f7;
  border: 1px solid #e5e5e5;
}

.board-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.board-tab,
.sort-direction {
  padding: 9px 16px;
  color: #555;
  background: #fff;
  border: 1px solid #ccc;
  font: 700 14px/1.25 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.board-tab + .board-tab { border-left: 0; }
.board-tab:hover,
.sort-direction:hover { color: #0073aa; border-color: #0073aa; }
.board-tab.active { color: #fff; background: #0073aa; border-color: #0073aa; }

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: #555;
  font: 600 14px/1.25 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.sort-control select {
  min-width: 160px;
  padding: 8px 28px 8px 10px;
  color: #333;
  background: #fff;
  border: 1px solid #bbb;
  font: inherit;
}

.sort-direction { white-space: nowrap; }

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.podium-card {
  min-height: 164px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.06);
}

.podium-card:first-child {
  border-top: 4px solid #0073aa;
  background: #f7f7f7;
}

.podium-rank {
  color: #0073aa;
  font: 700 13px/1.25 "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 1px;
}

.podium-name {
  margin-top: 18px;
  color: #1a1a1a;
  font: 700 20px/1.25 "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow-wrap: anywhere;
}

.podium-crew {
  margin-top: 4px;
  color: #777;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.podium-score {
  margin-top: 18px;
  color: #0073aa;
  font: 700 24px/1.1 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.podium-score small {
  color: #777;
  font-size: 11px;
  letter-spacing: 1px;
}

.table-shell {
  position: relative;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e5e5e5;
}

table {
  width: 100%;
  min-width: 790px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

th {
  color: #555;
  background: #f7f7f7;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

td { font-size: 15px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7fbfd; }
.rank-cell { color: #0073aa; font-weight: 700; }
.player-cell strong { display: block; color: #1a1a1a; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.player-cell small { display: block; margin-top: 3px; color: #777; }
.score-cell { color: #0073aa; font-weight: 700; }
.muted-cell { color: #777; }
.loading-row td { height: 120px; color: #777; text-align: center; }

.empty-state {
  padding: 58px 24px;
  background: #f7f7f7;
  text-align: center;
}

.empty-state strong {
  color: #1a1a1a;
  font: 700 20px/1.25 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.empty-state p { margin: 10px 0 16px; color: #555; }
.empty-state a { font-weight: 700; }

.board-error {
  min-height: 24px;
  margin: 13px 0 0;
  color: #a33a32;
  font: 13px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Standard J.A.R. footer */
.site-footer {
  width: 100%;
  margin: 0;
  padding: 56px 0 40px;
  color: #b3b3b3;
  background: #222;
  font-size: 15px;
}

.footer-widgets {
  display: flex;
  gap: 48px;
}

.footer-widgets .widget { flex: 1; }
.site-footer h4 {
  margin-bottom: 16px;
  color: #fff;
  font: 700 15px/1.25 "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.site-footer p { color: #b3b3b3; }
.footer-bottom {
  margin-top: 42px;
  padding-top: 18px;
  color: #888;
  background: #1a1a1a;
  font: 13px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.footer-bottom .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom a { margin-left: 18px; color: #aaa; }
.footer-bottom a:hover { color: #fff; }

@media (max-width: 860px) {
  h1 { font-size: 34px; }
  .site-tagline { max-width: 170px; }
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 96px;
    left: 0;
    right: 0;
    display: none;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 24px 16px;
  }
  .main-nav a.nav-cta { margin-left: 0; text-align: center; }
  .podium { grid-template-columns: 1fr; }
  .podium-card { min-height: 0; }
  .footer-widgets { flex-direction: column; gap: 28px; }
  .sort-control { margin-left: 0; }
}

@media (max-width: 560px) {
  .wrap,
  .board-section { width: min(100% - 32px, 1080px); }
  .site-logo { height: 70px; }
  .site-tagline { display: none; }
  .header-inner { min-height: 78px; }
  .main-nav { top: 78px; }
  .hero { padding: 72px 16px 58px; }
  h1 { font-size: 32px; }
  .hero-text { font-size: 17px; }
  .summary-stats { padding-inline: 12px; }
  .summary-stats div + div { padding-left: 10px; }
  .summary-stats dt { font-size: 10px; }
  .section-heading { align-items: center; }
  .refresh-button { padding: 9px 13px; font-size: 13px; }
  .board-section { padding-top: 52px; }
  .board-controls { align-items: stretch; flex-direction: column; }
  .board-tabs { width: 100%; }
  .board-tab { flex: 1; }
  .sort-control { align-items: stretch; flex-direction: column; gap: 4px; }
  .sort-control select,
  .sort-direction { width: 100%; }
  .footer-bottom .wrap { align-items: flex-start; flex-direction: column; }
  .footer-bottom a:first-child { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
