/* Unlocks & loyalty (homepage). Neutral black / white / gray only.
   Vite may emit this before styles.css, so selectors that meet .sheet / .fine are scoped under .unlocks. */
.unlocks .section-head { margin-bottom: 0.5rem; }
.unlock-steps { margin-top: 2rem; display: grid; gap: 0.75rem; }
@media (min-width: 800px) { .unlock-steps { grid-template-columns: repeat(3, 1fr); } }
.unlock-step { border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.25rem; background: var(--raised); }
.unlock-step .idx { margin: 0; color: #d0d0d0; font-size: 1.5rem; }
.unlock-step h3 { margin: 0.6rem 0 0; font-size: 1.5rem; }
.unlock-step p { margin: 0.6rem 0 0; }

.unlock-example { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.unlock-math { margin: 0.6rem 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.9rem; }
.unlock-math .display { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.unlock-math .op { color: var(--muted); font-size: 1.05rem; }
.unlock-ramp { position: relative; margin-top: 1.25rem; height: 1rem; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #0a0a0a; }
.unlock-ramp span {
  position: absolute; inset: 0 auto 0 0; display: block;
  background: repeating-linear-gradient(90deg, #ffffff 0, #ffffff calc(100% / 60 - 1px), #000000 calc(100% / 60 - 1px), #000000 calc(100% / 60));
  background-size: 100% 100%;
  -webkit-mask-image: linear-gradient(90deg, rgba(255,255,255,0.35), #fff);
  mask-image: linear-gradient(90deg, rgba(255,255,255,0.35), #fff);
}
.calc-ramp span { background: #ffffff; -webkit-mask-image: none; mask-image: none; transition: width .2s; }
.unlock-ramp-scale { margin-top: 0.5rem; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.unlock-ramp-scale span:last-child { text-align: right; }
.unlock-example > p.muted { margin: 1rem 0 0; }

.unlock-table-wrap { margin-top: 2.5rem; overflow-x: auto; padding-right: 0.35rem; }
.unlock-table { min-width: 34rem; font-variant-numeric: tabular-nums; }
.unlocks .unlock-table caption { text-align: left; padding-bottom: 0.75rem; }
.unlock-table th:nth-child(4), .unlock-table td:nth-child(4) { width: 46%; padding-right: 0; }
.unlocks .unlock-table td:first-child { font-weight: 600; }
.tl-head { position: relative; }
.tl-head span { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 0.75rem; white-space: nowrap; }
.tl-head span:first-child { transform: translate(0, -50%); }
.tl-head span:last-child { transform: translate(-100%, -50%); }
.tl { position: relative; }
.tl::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--line); }
.tl span { position: absolute; top: calc(50% - 0.35rem); height: 0.7rem; border-radius: 999px; }
.tl .tl-sale { background: transparent; border: 1px solid #6b6b6b; }
.tl .tl-bar { background: linear-gradient(90deg, #5a5a5a, #ffffff); }
.unlocks .unlock-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 1rem; }
.key { display: inline-block; width: 1.4rem; height: 0.6rem; border-radius: 999px; margin-left: 0.3rem; }
.key:first-child { margin-left: 0; }
.key-sale { border: 1px solid #6b6b6b; }
.key-bar { background: linear-gradient(90deg, #5a5a5a, #ffffff); }

.loyalty { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .loyalty { grid-template-columns: 1fr 1fr; align-items: center; } }
.loyalty h3, .calc-head h3 { margin: 0.6rem 0 0; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.loyalty p.muted { margin: 0.75rem 0 0; }
.loyalty-table { font-variant-numeric: tabular-nums; }
.unlocks .loyalty-table th, .unlocks .loyalty-table td { text-align: center; padding-right: 0.25rem; }
.unlocks .loyalty-table th:first-child { text-align: left; }
.unlocks .loyalty-table td:last-child { color: #000000; background: #ffffff; font-weight: 700; border-radius: 0.4rem; }

.unlock-calc { margin-top: 2.5rem; border: 1px solid var(--line); border-radius: 1.25rem; background: var(--raised); padding: 1.25rem; }
.calc-head p.muted { margin: 0.6rem 0 0; }
.calc-fields { margin-top: 1rem; display: grid; gap: 0.75rem; }
@media (min-width: 700px) { .calc-fields { grid-template-columns: 1.4fr 1fr 1fr; } }
.unlock-calc label { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.unlock-calc input[type="number"], .unlock-calc select {
  display: block; width: 100%; margin-top: 0.45rem; background: #000000; color: #ffffff;
  border: 1px solid #3a3a3a; border-radius: 0.75rem; padding: 0.8rem 0.9rem; font: inherit; font-size: 1rem;
  letter-spacing: normal; text-transform: none;
}
.unlock-calc input:focus, .unlock-calc select:focus { outline: 1px solid #ffffff; border-color: #ffffff; }
.calc-out { margin: 1.25rem 0 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(3, 1fr); }
.calc-out div { border-top: 1px solid var(--line); padding-top: 0.75rem; }
.calc-out dt { color: var(--muted); font-size: 0.8rem; }
.calc-out dd { margin: 0.2rem 0 0; font-family: var(--display); font-size: clamp(1.25rem, 3vw, 1.8rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.calc-day { margin-top: 1.5rem; }
.calc-day strong { color: var(--fg); letter-spacing: normal; text-transform: none; font-variant-numeric: tabular-nums; }
.calc-day input[type="range"] { display: block; width: 100%; margin-top: 0.75rem; accent-color: #ffffff; }
.calc-day-out { margin: 0.75rem 0 0; font-variant-numeric: tabular-nums; }
#calc-loyalty { margin: 0.5rem 0 0; }

/* Step-up rule (current plan): "Buy more, keep your early unlock". */
.stepup { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.stepup h3 { margin: 0.6rem 0 0; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.stepup-head { max-width: 44rem; }
.stepup-head p.muted { margin: 0.75rem 0 0; }
.stepup .unlock-table-wrap { margin-top: 1.5rem; }
.unlocks .stepup-table td:nth-child(2), .unlocks .stepup-table td:nth-child(3) { white-space: nowrap; }
.tl .tl-miss { background: transparent; border: 1px dashed #9a9a9a; }
.unlocks .tl .tl-anchor { top: 0.25rem; bottom: 0.25rem; height: auto; width: 0; border-radius: 0; border-left: 1px solid #ffffff; }
.key-miss { border: 1px dashed #9a9a9a; }
.key-anchor { width: 0; height: 0.9rem; border-radius: 0; border-left: 1px solid #ffffff; vertical-align: middle; }
.calc-stepup-fields { margin-top: 0.75rem; }
@media (min-width: 700px) { .calc-stepup-fields { grid-template-columns: 1fr 2fr; } }
.calc-icp { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 0.75rem; }
@media (min-width: 700px) { .calc-icp { grid-template-columns: 1fr 1fr; } }
.calc-icp:disabled { opacity: 0.45; }
#calc-stepup { margin: 0.5rem 0 0; }
