/* Estimate Earnings page */
.est { display: flex; flex-direction: column; gap: var(--s-4); padding-bottom: var(--s-9); }
.est-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 40px; }

.flow {
  display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr) minmax(0, 280px);
  grid-template-areas: 'in viz out'; column-gap: var(--s-6); align-items: center;
}
.flow__in { grid-area: in; display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; container-type: inline-size; }
.flow__viz { grid-area: viz; display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.flow__out { grid-area: out; display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; container-type: inline-size; }

.big { display: block; font-family: var(--f-display); font-size: min(112px, 38cqi); line-height: .9; white-space: nowrap; }
.hint { color: var(--faint); font-family: var(--f-mono); font-size: 13px; letter-spacing: .04em; }
.ticks { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .06em; color: var(--faint); margin-top: -6px; }
.rule { height: 1px; background: var(--line); margin: var(--s-3) 0 var(--s-1); }
.share-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.share-val { font-family: var(--f-display); font-size: 24px; color: var(--acc); }

.presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.presets .chip { padding: 0; font-size: 12px; }

/* native range, styled */
.range {
  --pct: 50%; --c: var(--ink);
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0;
  background: transparent; cursor: pointer; touch-action: pan-y;
}
.range--acc { --c: var(--acc); }
.range::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: linear-gradient(to right, var(--c) var(--pct), rgba(255, 255, 255, .14) var(--pct)); }
.range::-moz-range-track { height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .14); }
.range::-moz-range-progress { height: 2px; border-radius: 2px; background: var(--c); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; margin-top: -11px; border-radius: 50%;
  background: var(--bg); border: 5px solid var(--c); box-shadow: 0 0 0 7px color-mix(in oklab, var(--c) 14%, transparent);
}
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 5px solid var(--c); box-shadow: 0 0 0 7px color-mix(in oklab, var(--c) 14%, transparent); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--acc); outline-offset: 4px; }
.range:focus-visible::-moz-range-thumb { outline: 2px solid var(--acc); outline-offset: 4px; }

/* animation */
.viz { position: relative; height: 460px; border-radius: var(--r-md); overflow: hidden; background: radial-gradient(ellipse 70% 60% at 50% 50%, #17171d, #111116 70%); }
.viz__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.viz__pause {
  position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: rgba(10, 10, 12, .6); color: var(--muted); cursor: pointer;
  transition: color var(--m-out) var(--ease), border-color var(--m-out) var(--ease);
}
.viz__pause:hover { color: var(--ink); border-color: var(--line-strong); transition-duration: var(--m-in); }
.viz__pause svg { width: 12px; height: 12px; fill: currentColor; }
.viz__pause .i-play { display: none; }
.viz__pause[aria-pressed="true"] .i-play { display: block; }
.viz__pause[aria-pressed="true"] .i-pause { display: none; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 11px; letter-spacing: .1em; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend__note { font-size: 14px; color: var(--ink); }
.legend__money { font-family: var(--f-display); font-size: 14px; color: var(--money); }
.legend__sq { width: 8px; height: 8px; border-radius: 2px; background: rgba(150, 150, 160, .8); }

/* results */
.earn { font-family: var(--f-display); font-size: min(84px, 15.5cqi); line-height: .95; white-space: nowrap; color: var(--acc); }
.range-line { font-size: 16px; color: var(--muted); }
.range-line strong { color: var(--ink); font-weight: 700; }
.split { margin: var(--s-2) 0 0; padding-top: var(--s-4); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s-3); }
.split div { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); }
.split dt { display: flex; align-items: center; gap: 8px; letter-spacing: .14em; color: var(--muted); }
.split dd { margin: 0; font-weight: 700; }
.sq { width: 8px; height: 8px; border-radius: 2px; background: var(--ink); }
.sq--acc { background: var(--acc); }

.per { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 40px 0 0; border-top: 1px solid var(--line); }
.per div { padding: 28px 24px 4px; display: flex; flex-direction: column; gap: 12px; border-left: 1px solid var(--line); }
.per div:first-child { padding-left: 0; border-left: 0; }
.per dd { margin: 0; font-family: var(--f-display); font-size: clamp(22px, 2.6vw, 34px); }

.est-table { padding: 36px 44px; }
.est-table table { width: 100%; border-collapse: collapse; font-size: 17px; }
.est-table th, .est-table td { padding: 20px 0; text-align: right; border-bottom: 1px solid var(--line); font-weight: 400; }
.est-table th:first-child { text-align: left; color: var(--muted); }
.est-table thead th { padding-top: 0; padding-bottom: 18px; color: var(--muted); }
.est-table tbody td { color: var(--muted); }
.est-table td.strong { color: var(--ink); font-weight: 700; }
.est-table tfoot th, .est-table tfoot td { border-bottom: 0; padding-bottom: 4px; font-weight: 700; color: var(--ink); }
.est-table td.acc { color: var(--acc); }

.note { margin-top: var(--s-2); max-width: 80ch; font-size: 14px; line-height: 1.7; color: var(--faint); text-wrap: pretty; }

@media (max-width: 1180px) {
  .flow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'in out' 'viz viz'; row-gap: 36px; }
  .viz { height: 300px; }
}
@media (max-width: 640px) {
  .est-panel { padding: 24px 20px; border-radius: 14px; }
  .flow { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'in' 'out' 'viz'; row-gap: 30px; }
  .viz { height: 340px; }
  .presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .presets .chip { padding: 0; font-size: 11px; }
  .per { grid-template-columns: 1fr 1fr; }
  .per div { padding: 20px 16px 4px; }
  .per div:nth-child(3) { border-left: 0; padding-left: 0; }
  .per div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .est-table { padding: 20px; }
  .est-table table { font-size: 14px; }
  .est-table thead th { font-size: 10px; letter-spacing: .1em; }
  .est-table th, .est-table td { padding: 14px 0 14px 6px; }
}
