/* The Ladder: floors of rungs on the left, your combined rarity on the right; the accent warms from green to pink as rarity climbs. */
:root { --t: 0; --c-common: #1f9a56; --c-rare: #e0407f; --accent: color-mix(in oklch, var(--c-common), var(--c-rare) calc(var(--t) * 100%)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c-common: #3fcf7c; --c-rare: #ff6ba3; } }
:root[data-theme="dark"] { --c-common: #3fcf7c; --c-rare: #ff6ba3; }

.top, main, .foot { max-width: 1080px; }
.ladder-head { margin-top: 10px; max-width: 640px; }
.ladder-head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 7vw, 52px); letter-spacing: -0.03em; line-height: 1; margin: 0; }
.ladder-head p { margin: 8px 0 0; color: var(--muted); font-size: 17px; max-width: 48ch; }
.jumps { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }

/* scale */
.scale { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0 8px; margin-top: 18px; border-bottom: 2px solid var(--line); }
.scale-track { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(to right, var(--c-common), #d98c0b, var(--c-rare)); opacity: .9; margin-top: 6px; }
.scale-marker { position: absolute; top: 50%; left: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); box-shadow: 2px 2px 0 var(--shadow); transform: translate(-50%, -50%); transition: left .35s cubic-bezier(.2, 1, .3, 1); }
.scale-you { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; transition: left .45s cubic-bezier(.2, 1, .3, 1); pointer-events: none; }
.scale-you svg { width: 14px; height: 34px; fill: var(--ink); filter: drop-shadow(0 0 2px var(--bg)); }
.scale-you span { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--bg); padding: 0 4px; border-radius: 4px; }
.scale-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; }
.fchips { display: flex; gap: 6px; }
.fchip { border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 10px; min-height: 30px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fchip:hover { border-color: var(--ink); color: var(--ink); }
.floor-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; padding-bottom: 2px; }
.floor-chips::-webkit-scrollbar { display: none; }
.floor-chip { flex: 0 0 auto; white-space: nowrap; }
.floor-chip[aria-current="true"] { border-color: var(--accent); color: var(--accent); }
.you-line { flex: 0 0 auto; border: 2px solid var(--ink); background: var(--ink); color: var(--bg); border-radius: 999px; padding: 5px 11px; min-height: 30px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.you-line b { font-family: var(--display); font-weight: 700; }
.scale-now { margin: 6px 0 0; font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--accent); letter-spacing: -0.01em; min-height: 20px; transition: color .3s; }

/* two columns */
.columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.rungs { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; padding-bottom: 40px; min-width: 0; }
.floor { margin: 26px 0 2px; padding-top: 8px; border-top: 2px solid var(--line); scroll-margin-top: 150px; }
.floor h2 { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; margin: 0; }
.floor p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.rung {
  --accent: color-mix(in oklch, var(--c-common), var(--c-rare) calc(var(--t) * 100%));
  display: grid; grid-template-columns: 34px minmax(96px, 150px) 1fr auto auto; gap: 12px; align-items: center; text-align: left;
  border: 2px solid var(--line); background: var(--surface); border-radius: 16px; padding: 14px 12px; width: 100%; color: inherit; font: inherit;
  transition: border-color .12s, transform .08s, box-shadow .08s, background-color .15s; scroll-margin-top: 150px;
}
.rung:hover { border-color: var(--ink); }
.rung[aria-pressed="true"] { border-color: var(--ink); box-shadow: 4px 4px 0 var(--shadow); transform: translate(-1px, -1px); background: color-mix(in oklch, var(--surface), var(--accent) 14%); }
.rung.bump { animation: bump .32s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes bump { 0% { transform: scale(.985); } 60% { transform: scale(1.015) translate(-1px, -1px); } 100% { transform: translate(-1px, -1px); } }
.rung.flash { animation: flash 1.1s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 var(--accent); } 40% { box-shadow: 0 0 0 6px color-mix(in oklch, var(--accent), transparent 40%); } 100% { box-shadow: 0 0 0 0 transparent; } }
.rung .emoji { font-size: 26px; line-height: 1; text-align: center; }
.rung .big { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 4.6vw, 32px); letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }
.rung .txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rung strong { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.rung em { font-style: normal; color: var(--muted); font-size: 14px; }
.rung small { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.rung .me { display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--line); border-radius: 999px; padding: 5px 10px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; min-height: 30px; }
.rung .me-on { display: none; }
.rung[aria-pressed="true"] .me { background: var(--accent); border-color: var(--ink); color: var(--accent-ink); }
.rung[aria-pressed="true"] .me-off { display: none; }
.rung[aria-pressed="true"] .me-on { display: inline; }

.mini { position: relative; width: 64px; height: 64px; }
.mini.grid .dots { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background-image: radial-gradient(circle, var(--fig-light) 2.4px, transparent 2.9px); background-size: 10% 10%; background-position: 0 0; }
.mini.grid .dots.fill { background-image: radial-gradient(circle, var(--accent) 2.4px, transparent 2.9px); }
.mini.unit { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 64px; }
.mini.unit svg { width: 26px; height: 30px; fill: var(--accent); color: var(--accent); }
.mini.unit b { font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--accent); white-space: nowrap; }
.mini.unit i { font-style: normal; font-size: 10px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

/* the You column */
.you { border: 2px solid var(--ink); border-radius: 18px; background: var(--surface); padding: 16px 16px 14px; box-shadow: 5px 5px 0 var(--shadow); margin-top: 8px; }
.you h2 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; font-weight: 700; }
.you-head { display: flex; align-items: center; gap: 10px; }
.you-icon { width: 22px; height: 40px; fill: var(--accent); color: var(--accent); flex: 0 0 auto; }
.you-big { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.03em; color: var(--accent); line-height: 1; display: inline-block; }
.you-big.pop { animation: pop .3s cubic-bezier(.2, 1.4, .4, 1); }
.you-head p { margin: 4px 0 0; font-weight: 600; font-size: 14px; }
.you-sentence { margin: 12px 0 10px; font-size: 15px; font-weight: 600; line-height: 1.4; }
#youCrowd { display: block; width: 100%; height: auto; max-height: 300px; color: var(--fig-light); }
#youCrowd .fig { fill: var(--fig-light); }
#youCrowd .fig.you { fill: var(--accent); color: var(--accent); }
#youCrowd[data-tier="earths"] .fig { fill: var(--fig-light); }
#youCrowd[data-tier="earths"] .fig.you { fill: var(--accent); }
.you-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.you-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.you-chip { border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.you-chip:hover { border-color: var(--ink); }
.you-actions { display: flex; gap: 6px; margin-top: 12px; }

@media (min-width: 900px) {
  .columns { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
  .you { position: sticky; top: 150px; margin-top: 34px; }
  .you-line { display: none; }
}
@media (max-width: 899px) {
  .you { order: -1; }
}
@media (max-width: 520px) {
  .rung { grid-template-columns: 34px 1fr auto auto; grid-template-areas: "emoji big mini me" "txt txt txt txt"; padding: 12px; gap: 8px 10px; }
  .rung .emoji { grid-area: emoji; } .rung .big { grid-area: big; } .rung .mini { grid-area: mini; } .rung .me { grid-area: me; } .rung .txt { grid-area: txt; }
  .rung .mini.grid { width: 44px; height: 44px; } .mini.unit { width: 52px; } .mini.unit svg { width: 20px; height: 24px; }
  .rung .me { padding: 5px 8px; font-size: 12px; }
}
