/* ————————————————————————————————————————————————————————————
   Take-the-scale — light theme, compact
   ———————————————————————————————————————————————————————————— */

.scale-app {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1000px) {
  .scale-app { grid-template-columns: 1fr; }
}

/* Left: item list */
.scale-items {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.scale-item-compact {
  display: grid;
  grid-template-columns: 22px 1.4fr 1fr 52px;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 120ms ease;
}
.scale-item-compact:last-child { border-bottom: none; }
.scale-item-compact:hover { background: var(--bg-1); }
.scale-item-compact.answered { background: var(--bg-1); }

.scale-item-compact .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
}
.scale-item-compact.answered .num { color: var(--accent); }

.scale-item-compact .text {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 400;
}

.scale-item-compact .slider-col {
  position: relative;
  cursor: pointer;
  user-select: none;
  padding: 14px 0 8px;
}
.scale-item-compact .track {
  position: relative;
  height: 6px;
  background: var(--bg-2);
  border-radius: 3px;
}
.scale-item-compact .track .fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--accent);
  width: 0;
  transition: width 80ms ease-out;
  border-radius: 3px;
}
.scale-item-compact .track .tick {
  position: absolute;
  top: -3px; bottom: -3px;
  width: 1px;
  background: var(--line-2);
  opacity: 0.8;
}
.scale-item-compact .handle {
  position: absolute;
  top: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: none;
  pointer-events: none;
}
.scale-item-compact.answered .handle { display: block; }

.scale-item-compact .anchors {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.2;
  color: var(--ink-dim);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.scale-item-compact .anchors > span {
  flex: 0 1 auto;
  text-align: center;
  white-space: nowrap;
}
.scale-item-compact .anchors > span:first-child { text-align: left; }
.scale-item-compact .anchors > span:last-child  { text-align: right; }

.scale-item-compact .value {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--muted-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.scale-item-compact.answered .value {
  color: var(--accent);
  font-weight: 500;
}

/* Right panel */
.scale-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 72px;
  align-self: start;
}

.panel-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px 20px;
}
.panel-card .p-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.progress-card .prog-count {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.progress-card .prog-count .of {
  font-size: 18px;
  color: var(--ink-dim);
}
.progress-card .prog-bar {
  height: 4px;
  background: var(--bg-3);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}
.progress-card .prog-bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 300ms ease;
}

.running-score-card .rs-value {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.running-score-card .rs-locked {
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 300;
}
.running-score-card .rs-pctl {
  font-size: 13px;
  color: var(--ink-dim);
  margin-top: 6px;
  line-height: 1.45;
}
.running-score-card .rs-pctl strong { color: var(--accent); font-weight: 600; }
.running-score-card .rs-dist {
  margin-top: 12px;
  height: 52px;
}

.cta-btn {
  background: var(--accent);
  border: none;
  color: #FFF;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: all 140ms ease;
  width: 100%;
}
.cta-btn:hover:not(:disabled) { background: var(--accent-dim); }
.cta-btn:disabled {
  background: var(--bg-3);
  color: var(--muted);
  cursor: not-allowed;
}

.reset-btn {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--muted);
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 4px;
  transition: all 120ms ease;
  width: 100%;
}
.reset-btn:hover { color: var(--accent); border-color: var(--accent); }

.anchor-key {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-dim);
}
.anchor-key .v {
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 500;
}

/* ————————————————————————————————————————————————————————————
   MOBILE (≤700px) — stack item rows; abbreviate anchors so the
   slider fits without horizontal overflow. Desktop unchanged.
   ———————————————————————————————————————————————————————————— */
@media (max-width: 700px) {
  .scale-item-compact {
    grid-template-columns: 28px 1fr 44px;
    grid-template-areas:
      "num text  value"
      "num slider slider";
    gap: 6px 10px;
    padding: 12px 14px;
  }
  .scale-item-compact .num    { grid-area: num; align-self: start; padding-top: 2px; }
  .scale-item-compact .text   { grid-area: text; font-size: 13.5px; line-height: 1.35; }
  .scale-item-compact .slider-col { grid-area: slider; padding: 10px 0 4px; }
  .scale-item-compact .value  { grid-area: value; align-self: start; font-size: 14px; padding-top: 2px; }

  /* Hide the two intermediate anchor labels; keep the three that fit */
  .scale-item-compact .anchors {
    font-size: 9.5px;
    gap: 2px;
  }
  .scale-item-compact .anchors > span:nth-child(2),
  .scale-item-compact .anchors > span:nth-child(4) {
    display: none;
  }
  /* Shrink the panel-card type a notch */
  .panel-card { padding: 14px 16px; }
  .progress-card .prog-count,
  .running-score-card .rs-value { font-size: 30px; }
}
