:root {

  --green-dark: #0b3920;
  --green-main: #1f6d39;
  --green-light: #2d8a4f;

  --gold: #c6a55c;

  --cream: #faf7f2;

  --text-main: #13311f;
}

body {
  font-family: "Merriweather", serif;
  margin: 0;
  padding: 0;

  background:
    radial-gradient(circle at top, #f8faf8, #ffffff 40%);

  color: var(--text-main);

  overflow-x: hidden;
}

/* HEADER */

header {

  display: flex;
  flex-direction: column;
  align-items: center;

  padding-top: 1rem;

  background:
    linear-gradient(
      135deg,
      var(--green-dark),
      var(--green-main)
    );

  margin-bottom: 1rem;

  position: relative;

  box-shadow:
    0 6px 20px rgba(0,0,0,0.12);
}

.logo {

  height: 120px;
  width: auto;

  filter:
    drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* NAV */

.nav-content {

  display: flex;
  justify-content: center;

  gap: 30px;

  padding-bottom: 1rem;

  font-weight: 600;

  text-transform: uppercase;

  letter-spacing: 0.08em;
}

.nav-content a {

  color: #ffffff;

  text-decoration: none;

  font-size: 14px;

  position: relative;

  transition:
    color 0.25s ease,
    opacity 0.25s ease;
}

.nav-content a::after {

  content: "";

  position: absolute;

  left: 0;
  bottom: -4px;

  width: 0;
  height: 2px;

  background: var(--gold);

  transition: width 0.25s ease;
}

.nav-content a:hover::after {
  width: 100%;
}

.nav-content a:hover {
  color: var(--gold);
}

/* HAMBURGER */

.menu-toggle {

  display: none;

  position: absolute;

  right: 20px;
  top: 25px;

  font-size: 28px;

  color: white;

  cursor: pointer;
}

/* PAGE WRAPPER */

.page-wrapper {

  max-width: 1200px;

  margin: 0 auto;

  padding: 0 15px;

  display: flex;
  flex-direction: column;

}

/* TITLES */

.title-overall,
.filter-title, 
.oom-title {

  text-align: center;

  color: var(--green-dark);

  font-weight: 800;

  font-size: clamp(1.9rem, 4vw, 2.5rem);

  margin-top: 2em;

  position: relative;

  letter-spacing: -0.03em;
}

.title-overall::after,
.filter-title::after,
.oom-title::after {

  content: "";

  width: 80px;
  height: 3px;

  background: var(--gold);

  display: block;

  margin: 14px auto 0;

  border-radius: 999px;
}

/* CHART CARD */

.chart-card {

  padding: 24px;
  display: flex;
  flex-direction: column;

}

.chart-title {

  font-size: 18px;

  font-weight: 700;

  margin-bottom: 1.5em;
  margin-top: 1em;

  text-align: center;

  color: var(--green-dark);

  letter-spacing: 0.03em;
}

#positionsChart {
  flex-grow: 1;
  width: 100% !important;
  height: 100% !important;
}

/* SELECTS */

#datasetSelector,
#stablefordView,
#year-select,
#totalView {

  padding: 12px 18px;

  border-radius: 14px;

  border:
    1px solid rgba(31,109,57,0.15);

  background:
    linear-gradient(
      145deg,
      #ffffff,
      #f8faf8
    );

  font-size: 14px;

  text-align: center;
  text-align-last: center;

  cursor: pointer;

  color: var(--green-dark);

  font-weight: 600;

  box-shadow:
    0 2px 8px rgba(0,0,0,0.04);

  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

#datasetSelector:hover,
#stablefordView:hover,
#year-select:hover {

  border-color:
    rgba(31,109,57,0.35);

  transform: translateY(-2px);

  box-shadow:
    0 6px 18px rgba(31,109,57,0.10);
}

#year-select {
  margin-top: 2em;
}


#courses-list {
  margin: 2em;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.course-link {
  display: block;
  padding: 16px;
  border-radius: 12px;
  text-decoration: none;
  color: #111;
  font-size: 1rem;

  background:
    white;

  border:
    1px solid rgba(31,109,57,0.12);

  border-left:
    5px solid var(--green-main);

  box-shadow:
    0 2px 6px rgba(0,0,0,0.04),
    0 8px 24px rgba(31,109,57,0.08);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.course-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.course-title {

  font-size: 0.92rem;

  font-weight: 700;

  letter-spacing: 0.14em;

  text-transform: uppercase;

  color: var(--gold);

  margin-bottom: 1em;
}
/* BAR CHART */

.bar-chart-wrapper {
  height: 500px;
}

/* YEARLY STATS */

#yearly-stats-wrapper {

  text-align: center;

  display: block;

  justify-content: center;
}

.stats {

  margin: 32px 1em;

  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 28px;
}

/* STAT CARDS */

.stats-data {

  background:
    white;

  border:
    1px solid rgba(31,109,57,0.12);

  border-left:
    5px solid var(--green-main);

  border-radius: 20px;

  padding: 32px 24px;

  min-height: 220px;

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  text-align: center;

  box-shadow:
    0 2px 6px rgba(0,0,0,0.04),
    0 8px 24px rgba(31,109,57,0.08);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.stats-data:hover {

  transform: translateY(-5px);

  border-color:
    rgba(31,109,57,0.25);

  box-shadow:
    0 10px 30px rgba(31,109,57,0.14);
}

/* STAT TEXT */

.stat-title {

  font-size: 0.82rem;

  font-weight: 700;

  letter-spacing: 0.14em;

  text-transform: uppercase;

  color: var(--gold);

  margin-bottom: 20px;
}

.stats_underwrite {

  font-size: 0.85rem;

  font-weight: 600;

  letter-spacing: 0.08em;

  text-transform: uppercase;

  color: #7a7a7a;

  margin-top: 18px;
}

.stats-data span {

  font-size: clamp(1.6rem, 3vw, 2.2rem);

  font-weight: 700;

  line-height: 1.3;

  color: var(--green-dark);
}

/* HIDDEN */

.hidden {
  display: none !important;
}

/* SUBTITLE */

.chart-subtitle {

  text-align: center;

  font-size: 12px;

  opacity: 0.6;

  margin: 10px;
}

/* MOBILE */

@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .nav-content {

    display: none;

    flex-direction: column;

    gap: 15px;

    width: 100%;

    text-align: center;

    padding-bottom: 1rem;
  }

  .nav-content.active {
    display: flex;
  }

  .logo {
    height: 90px;
  }

  .chart-card {

    padding: 16px;

    border-radius: 20px;
  }

  .bar-chart-wrapper {
  height: 500px;
  } 

  .chart-title {

    font-size: 16px;

    margin-bottom: 1em;
  }

  .stats {

    display: flex;

    overflow-x: auto;

    scroll-snap-type: x mandatory;

    gap: 20px;

    padding: 0 1em;

    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;
  }

  .stats::-webkit-scrollbar {
    display: none;
  }

  .stats-data {

    flex: 0 0 85%;

    scroll-snap-align: center;
    box-shadow: none;
  }

  .stats-data:hover {

    transform: none;
  }
}

/*ORDER OF MERIT*/

/* TABLE WRAPPER FOR SCROLL */
.oom-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 3rem;
}

/* TABLE */
.oom-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1000px;
  max-width: 1200px;
  margin: auto;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  margin-bottom: 3rem;
}

thead {
  background: linear-gradient(135deg, #0b3920, #1f6d39);
  color: #ffffff;
}

thead th {
  padding: 10px;
  font-weight: 600;
  text-align: center;
}

tbody td {
  padding: 8px;
  text-align: center;
  border: 2px solid #e0e0e0;
  font-size: 14px;
}

tbody tr:nth-child(even) {
  background: linear-gradient(135deg, #faf0e6, #f5f5dc);
}

table thead tr:first-child th:first-child {
  border-top-left-radius: 8px;
}
table thead tr:first-child th:last-child {
  border-top-right-radius: 8px;
}

 .form-up {
    color: green;
    font-weight: 700;
  }

  .form-down {
    color: crimson;
    font-weight: 700;
  }

  .form-same {
    color: #666;
    font-weight: 700;
  }

  .form-new {
    color: mediumturquoise;
    font-weight: 700;
  }
  
.mobile-oom {
  display: none;
}

@media (max-width: 768px) {

  .oom-table-wrapper {
    display: none;
  }

  .mobile-oom {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 2rem;
  }

  .oom-card {
    background: white;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-left: 5px solid var(--green-main);
    margin: 0 1em;
  }

  .oom-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }

  .oom-rank {
    font-size: 20px;
    font-weight: 700;
    text-align: left;
    margin-bottom: 0.3em;
  }

  .oom-name {
    font-size: 18px;
    font-weight: 600;
  }

  .oom-points {
    font-size: 24px;
    font-weight: 700;
    color: #0b3920;
  }

  .oom-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    color: #666;
    font-size: 14px;
  }

  .oom-form.up {
    color: green;
    font-weight: 700;
  }

  .oom-form.down {
    color: crimson;
    font-weight: 700;
  }

  .oom-form.same {
    color: #666;
    font-weight: 700;
  }

  .oom-form.new {
    color: mediumturquoise;
    font-weight: 700;
  }

  .avg {
    color: #666;
    font-size: 14px;
  }
}