/**
 * F1GMAT MBA value ranking selector (applicant profiles).
 * Colours map to the F1GMAT tokens: paper, paper-warm, ink, ink-soft,
 * ink-muted, teal, gold-dark, hairline. Square corners, no shadows.
 */
.value-selector {
  --vs-paper: #fbfaf7;
  --vs-paper-warm: #f5efdf;
  --vs-ink: #1a1a1a;
  --vs-ink-soft: #3d3d3d;
  --vs-ink-muted: #525252;
  --vs-teal: #0e7490;
  --vs-gold-dark: #8a6b1f;
  --vs-hairline: #d4cfc4;
  --vs-serif: Georgia, "Times New Roman", Times, serif;
  --vs-sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
  margin: 48px 0;
  color: var(--vs-ink);
  font-family: var(--vs-serif);
}

/* Profile buttons (built by the script). */
.value-selector__profiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 0 0 32px;
}

.value-selector__profile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--vs-hairline);
  border-bottom: 4px solid var(--vs-hairline);
  border-radius: 0;
  background: transparent;
  color: var(--vs-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.value-selector__profile:hover {
  border-bottom-color: var(--vs-ink-muted);
}

.value-selector__profile.is-active {
  border-bottom-color: var(--vs-teal);
  background: var(--vs-paper-warm);
}

.value-selector__profile:focus-visible {
  outline: 2px solid var(--vs-teal);
  outline-offset: 2px;
}

.value-selector__profile-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.value-selector__profile-desc {
  color: var(--vs-ink-soft);
  font-family: var(--vs-sans);
  font-size: 14px;
  line-height: 1.4;
}

.value-selector__profile-mix {
  color: var(--vs-teal);
  font-family: var(--vs-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Panels. Without the script, every panel shows with its own heading. */
.value-selector__panel {
  margin: 0 0 40px;
}

.value-selector__panel[hidden] {
  display: none;
}

.value-selector__profile-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.value-selector__profile-summary {
  margin: 0 0 4px;
  color: var(--vs-ink-soft);
  font-size: 17px;
  line-height: 1.6;
}

.value-selector__profile-weights {
  margin: 0 0 16px;
  color: var(--vs-teal);
  font-family: var(--vs-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Once enhanced, the button already carries the summary and weights. */
.value-selector.is-enhanced .value-selector__profile-summary,
.value-selector.is-enhanced .value-selector__profile-weights {
  display: none;
}

/* Table. */
.value-selector__scroll {
  overflow-x: auto;
}

.value-selector__table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-family: var(--vs-sans);
  font-size: 15px;
}

.value-selector__table caption {
  padding: 12px 0 0;
  color: var(--vs-ink-muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  caption-side: bottom;
}

.value-selector__table th {
  padding: 0 8px 8px;
  border-bottom: 2px solid var(--vs-gold-dark);
  color: var(--vs-ink-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-align: right;
  text-transform: uppercase;
}

.value-selector__table th:nth-child(-n + 2),
.value-selector__table td:nth-child(-n + 2) {
  text-align: left;
}

.value-selector__table td {
  height: 44px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--vs-hairline);
  color: var(--vs-ink-soft);
  text-align: right;
}

.value-selector__table td:first-child {
  width: 56px;
  color: var(--vs-gold-dark);
  font-family: var(--vs-serif);
  font-size: 24px;
  font-weight: 700;
}

.value-selector__table td:nth-child(2) {
  color: var(--vs-ink);
  font-family: var(--vs-serif);
  font-size: 18px;
  font-weight: 700;
}

.value-selector__move {
  font-weight: 700;
}

.value-selector__move--up {
  color: var(--vs-teal);
}

.value-selector__move--down {
  color: var(--vs-gold-dark);
}

.value-selector__method {
  margin: 0;
  color: var(--vs-ink-muted);
  font-family: var(--vs-sans);
  font-size: 14px;
  line-height: 1.5;
}

/* "Set your own weights" sliders (built by the script). */
.value-selector__controls {
  margin: 0 0 24px;
  padding: 24px;
  border: 0;
  background: #ede5d1;
}

.value-selector__legend {
  padding: 0;
  font-size: 22px;
  font-weight: 700;
}

.value-selector__sliders {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 16px 0;
}

.value-selector__slider {
  flex: 1 1 220px;
  min-width: 0;
}

.value-selector__slider-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.value-selector__label {
  color: var(--vs-teal);
  font-family: var(--vs-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.value-selector__pct {
  font-size: 28px;
  font-weight: 700;
}

.value-selector__range {
  width: 100%;
  height: 44px;
  margin: 0;
  accent-color: var(--vs-teal);
}

.value-selector__range:focus-visible,
.value-selector__button:focus-visible {
  outline: 2px solid var(--vs-teal);
  outline-offset: 2px;
}

.value-selector__help {
  margin: 0;
  color: var(--vs-ink-muted);
  font-family: var(--vs-sans);
  font-size: 14px;
  line-height: 1.4;
}

.value-selector__button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--vs-ink-muted);
  border-radius: 0;
  background: transparent;
  color: var(--vs-teal);
  font-family: var(--vs-sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Opening answer, mini-analyses and per-school details */
.value-selector__answer { font-size: 1.125rem; line-height: 1.6; color: var(--vs-ink, #1a1a1a); }
.value-selector__asof { font-family: Arial, Helvetica, sans-serif; font-size: 0.875rem; color: var(--vs-ink-muted, #525252); }
.value-selector__analysis { margin: 0 0 1rem; padding: 1rem 1.25rem; background: var(--vs-paper-aged, #ede5d1); }
.value-selector__analysis p { margin: 0 0 0.5rem; line-height: 1.6; }
.value-selector__analysis p:last-child { margin-bottom: 0; }
.value-schools__item { border-bottom: 1px solid var(--vs-hairline, #d4cfc4); }
.value-schools__item > summary { min-height: 44px; padding: 0.625rem 0; font-weight: 700; cursor: pointer; }
.value-schools__item > summary:focus-visible { outline: 2px solid var(--vs-teal, #0e7490); outline-offset: 2px; }
.value-schools__item p { margin: 0 0 0.5rem; line-height: 1.6; }
