/* Year-wise CLAT selections 2009–2025 */

.clat-hist-page {
  --ch-navy: #0a225f;
  --ch-gold: #e6ad38;
  --ch-ink: #1c1915;
  --ch-muted: #4a5568;
  --ch-line: #e4dfd4;
  --ch-soft: #f3efe6;
}

.clat-hist-page .sem-wrap {
  max-width: 960px;
}

.clat-hist-lead {
  margin: 0 0 24px;
  color: var(--ch-muted);
  line-height: 1.75;
  font-size: 1.02rem;
}

.clat-hist-lead a {
  color: #8a6a14;
  font-weight: 700;
}

.clat-hist-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 28px;
}

.clat-hist-stat {
  background: #fff;
  border: 1px solid var(--ch-line);
  border-radius: 12px;
  padding: 14px 16px;
}

.clat-hist-stat span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  font-family: "Roboto Condensed", "Open Sans", sans-serif;
  margin-bottom: 6px;
}

.clat-hist-stat strong {
  font-family: "Roboto Condensed", "Open Sans", sans-serif;
  font-size: 1.35rem;
  color: var(--ch-navy);
  font-weight: 700;
  line-height: 1.2;
}

.clat-hist-stat em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 0.82rem;
  color: var(--ch-muted);
}

.clat-hist-chart {
  background: #fff;
  border: 1px solid var(--ch-line);
  border-radius: 14px;
  padding: 18px 16px 12px;
  margin: 0 0 28px;
  box-shadow: 0 8px 24px rgba(28, 25, 21, 0.05);
}

.clat-hist-chart h2 {
  font-family: "Roboto Condensed", "Open Sans", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ch-navy);
  margin: 0 0 6px;
}

.clat-hist-chart > p {
  margin: 0 0 16px;
  color: var(--ch-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.clat-hist-bars {
  display: grid;
  grid-template-columns: repeat(17, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  min-height: 220px;
  padding: 8px 4px 0;
  border-bottom: 1px solid var(--ch-line);
}

.clat-hist-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.clat-hist-bar {
  width: 100%;
  max-width: 28px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #1a3a8a 0%, var(--ch-navy) 100%);
  min-height: 8px;
  position: relative;
  transition: filter 0.15s ease;
}

.clat-hist-bar.is-dip {
  background: linear-gradient(180deg, #c9a227 0%, var(--ch-gold) 100%);
}

.clat-hist-bar.is-peak {
  background: linear-gradient(180deg, #f0c14b 0%, #d4a017 55%, var(--ch-navy) 100%);
}

.clat-hist-bar-wrap:hover .clat-hist-bar,
.clat-hist-bar-wrap:focus-within .clat-hist-bar {
  filter: brightness(1.08);
}

.clat-hist-bar-val {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ch-navy);
  font-family: "Roboto Condensed", "Open Sans", sans-serif;
  line-height: 1;
}

.clat-hist-bar-year {
  font-size: 0.62rem;
  color: #64748b;
  writing-mode: horizontal-tb;
  transform: none;
  white-space: nowrap;
}

.clat-hist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: var(--ch-muted);
}

.clat-hist-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.clat-hist-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.clat-hist-swatch.up {
  background: var(--ch-navy);
}

.clat-hist-swatch.dip {
  background: var(--ch-gold);
}

.clat-hist-table-wrap {
  overflow-x: auto;
  margin: 0 0 28px;
  border: 1px solid var(--ch-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 25, 21, 0.05);
}

.clat-hist-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 0.94rem;
}

.clat-hist-table th {
  background: var(--ch-navy);
  color: #fff;
  text-align: left;
  padding: 13px 14px;
  font-family: "Roboto Condensed", "Open Sans", sans-serif;
  font-weight: 700;
  border-bottom: 3px solid var(--ch-gold);
  white-space: nowrap;
}

.clat-hist-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ch-line);
  color: #2d3748;
  vertical-align: top;
  line-height: 1.55;
}

.clat-hist-table tbody tr:nth-child(even) td {
  background: #fbfaf7;
}

.clat-hist-table tbody tr:hover td {
  background: #fff8e8;
}

.clat-hist-num {
  font-family: "Roboto Condensed", "Open Sans", sans-serif;
  font-weight: 700;
  color: var(--ch-navy);
  font-size: 1.05rem;
}

.clat-hist-delta {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.86rem;
  font-family: "Roboto Condensed", "Open Sans", sans-serif;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.clat-hist-delta.up {
  background: #e8f5e9;
  color: #1b5e20;
}

.clat-hist-delta.down {
  background: #fff3e0;
  color: #e65100;
}

.clat-hist-delta.flat {
  background: #eef2ff;
  color: var(--ch-navy);
}

.clat-hist-section {
  margin: 0 0 28px;
}

.clat-hist-section h2 {
  font-family: "Roboto Condensed", "Open Sans", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ch-navy);
  margin: 0 0 10px;
}

.clat-hist-section p {
  margin: 0 0 12px;
  color: var(--ch-muted);
  line-height: 1.75;
}

.clat-hist-section a {
  color: #8a6a14;
  font-weight: 700;
}

.clat-hist-faq {
  margin: 0;
  padding: 0;
  list-style: none;
}

.clat-hist-faq details {
  border: 1px solid var(--ch-line);
  border-radius: 12px;
  background: #fff;
  margin: 0 0 10px;
  overflow: hidden;
}

.clat-hist-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--ch-ink);
  font-family: "Roboto Condensed", "Open Sans", sans-serif;
  position: relative;
  padding-right: 36px;
}

.clat-hist-faq summary::-webkit-details-marker {
  display: none;
}

.clat-hist-faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ch-gold);
  font-weight: 800;
}

.clat-hist-faq details[open] summary::after {
  content: "–";
}

.clat-hist-faq details p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--ch-muted);
  line-height: 1.7;
}

.clat-hist-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.clat-hist-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  font-family: "Roboto Condensed", "Open Sans", sans-serif;
}

.clat-hist-cta .btn-primary {
  background: var(--ch-gold);
  color: #2c2a26;
}

.clat-hist-cta .btn-ghost {
  border: 1px solid #c9c2b4;
  color: var(--ch-navy);
  background: transparent;
}

@media (max-width: 820px) {
  .clat-hist-stats {
    grid-template-columns: 1fr;
  }

  .clat-hist-bars {
    grid-template-columns: repeat(17, minmax(18px, 1fr));
    min-height: 180px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .clat-hist-bar-val {
    font-size: 0.58rem;
  }

  .clat-hist-bar-year {
    font-size: 0.55rem;
  }
}

@media (max-width: 560px) {
  .clat-hist-chart {
    padding: 14px 10px 10px;
  }

  .clat-hist-bars {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    align-items: end;
    padding-bottom: 8px;
  }

  .clat-hist-bar-wrap {
    flex: 0 0 36px;
  }

  .clat-hist-bar {
    max-width: 22px;
  }
}
