/* Earnings calculator page. Loads after the main site's site.css (fonts, colours, nav, title entrance,
   chrome buttons, footer), so this file only has what is special to the calculator. */
[hidden] { display: none !important; }

/* first screen: the calculator in the middle of the page, with the title and one line of text above it */
.calc-top { display: flex; flex-direction: column; align-items: center; gap: clamp(24px, 3.4vh, 40px); min-height: 100svh; padding: 104px var(--pad) clamp(48px, 8vh, 96px); border-bottom: 1px solid var(--rule); }
.calc-intro { text-align: center; }
.calc-title { font-size: clamp(44px, 6.6vw, 96px); }
.calc-intro .statement { margin: clamp(14px, 1.6vw, 22px) auto 0; max-width: 30em; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.45; color: var(--text-2); }

/* the panel: a solid card a shade lighter than the page, with a plain hairline edge. No glow, no glass. */
.calc-panel { position: relative; width: min(100%, 580px); display: flex; flex-direction: column; background: #111816; border: 1px solid rgba(236, 243, 241, 0.2); border-radius: 16px; padding: clamp(22px, 2.6vw, 34px); }

/* form */
.field { margin-bottom: 20px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.calc-panel input[type="text"], .calc-panel input[type="email"] { width: 100%; height: 52px; padding: 0 14px; border: 1px solid rgba(236, 243, 241, 0.2); border-radius: 10px; background: #0a0f0e; color: var(--text); font: 500 18px/1 var(--body); outline: none; transition: border-color 0.2s; }
.calc-panel input[type="text"]:hover, .calc-panel input[type="email"]:hover { border-color: rgba(236, 243, 241, 0.34); }
.calc-panel input:focus { border-color: #7ee8d6; }
.calc-panel input[aria-invalid="true"] { border-color: rgba(255, 150, 140, 0.8); }
.calc-panel ::placeholder { color: #4f5b58; }
.calc-panel input.views-text { width: 112px; height: auto; padding: 2px 6px; border-color: transparent; border-radius: 6px; background: transparent; text-align: right; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-panel input.views-text:focus { border-color: #7ee8d6; }
.money { position: relative; }
.money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-2); font-size: 18px; font-weight: 500; pointer-events: none; }
.calc-panel .money input { padding-left: 30px; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.err { margin: 8px 0 0; color: #ffb4a8; font-size: 13.5px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#calc-form .chrome-btn { width: 100%; margin-top: 6px; justify-content: center; }

/* views slider (log scale): a flat track that fills in, with a chrome bead like the drops */
.range { --fill: 40%; -webkit-appearance: none; appearance: none; width: 100%; height: 30px; margin: 6px 0 0; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: linear-gradient(90deg, #7ee8d6 var(--fill), rgba(236, 243, 241, 0.16) var(--fill)); }
.range::-moz-range-track { height: 4px; border-radius: 99px; background: rgba(236, 243, 241, 0.16); }
.range::-moz-range-progress { height: 4px; border-radius: 99px; background: #7ee8d6; }
.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: -10px; border: 0; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff 0 10%, #d8fbf4 24%, #6fd0bf 48%, #1d5c52 74%, #04140f 100%); }
.range::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff 0 10%, #d8fbf4 24%, #6fd0bf 48%, #1d5c52 74%, #04140f 100%); }
.range:focus { outline: none; }
.range:focus-visible::-webkit-slider-thumb { outline: 2px solid #7ee8d6; outline-offset: 3px; }
.range:focus-visible::-moz-range-thumb { outline: 2px solid #7ee8d6; outline-offset: 3px; }
.ticks { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }


/* reading the channel */
.loading { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; text-align: center; }
.loading-title { margin: 0; font-family: var(--display); font-weight: 500; font-size: 26px; line-height: 1.1; }
.loading-line { position: relative; width: 220px; height: 2px; overflow: hidden; background: rgba(236, 243, 241, 0.18); }
.loading-line::after { content: ""; position: absolute; inset: 0; background: #7ee8d6; transform: scaleX(0); transform-origin: left; animation: calc-fill 1.6s cubic-bezier(0.33, 0, 0.2, 1) forwards; }
@keyframes calc-fill { to { transform: scaleX(1); } }

/* results */
.res-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.who-text { min-width: 0; }
.res-name { margin: 0; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.link { padding: 0; border: 0; background: none; color: var(--text-2); font: 500 15px var(--body); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.link:hover { color: var(--text); }
/* the results get focus when they appear (for screen readers); no ring around the whole block */
.results:focus { outline: none; }
/* the two estimates, one under the other, split by a rule */
.res-cards { display: grid; grid-template-columns: minmax(0, 1fr); }
.res-card { min-width: 0; padding: 18px 0 16px; border-top: 1px solid var(--rule); }
.res-label { margin: 0; color: var(--text-2); font-size: 14px; }
/* the numbers are in the plain text font: the graffiti hand's zero has a slash through it */
.res-big { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.28em; margin: 6px 0 4px; font-family: var(--body); font-weight: 600; font-size: clamp(34px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.res-big .to { font-size: 0.42em; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.res-per { margin: 0; color: var(--text-2); font-size: 15px; }
.res-year { display: flex; justify-content: space-between; gap: 16px; margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.res-year span:last-child { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.res-facts { margin: 0; }
.res-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.res-facts dt { color: var(--muted); }
.res-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.compare { margin: 0; padding: 14px 0 6px; border-top: 1px solid var(--rule); }
.compare figcaption { margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: center; padding: 7px 0; }
.bar-name { color: var(--text-2); font-size: 14px; line-height: 1.3; }
.bar-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar { display: block; flex: none; width: 0; height: 10px; border-radius: 999px; background: #9fe2d6; transition: width 1.1s cubic-bezier(0.2, 0, 0, 1); }
.bar.now { background: #3a4644; }
.bar-val { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.how { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: 8px; }
.how summary { padding: 13px 0; color: var(--text-2); font-size: 15px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.how summary::-webkit-details-marker { display: none; }
.how summary::after { content: "+"; color: var(--muted); }
.how[open] summary::after { content: "−"; }
.how p { margin: 0 0 12px; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.how .fine { color: var(--muted); font-size: 13px; }
/* the one line under the results that says these are estimates */
.res-note { margin: 8px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; line-height: 1.5; }
.res-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.ghost-btn { height: 56px; padding: 0 24px; border: 1px solid rgba(236, 243, 241, 0.3); border-radius: 999px; background: transparent; color: var(--text); font: 600 16px var(--body); cursor: pointer; transition: border-color 0.3s; }
.ghost-btn:hover { border-color: var(--text); }

/* two ways to earn more */
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); }
.way { padding-top: 22px; border-top: 1px solid var(--rule); }
.way-mult { margin: 0; font-family: var(--body); font-weight: 600; font-size: clamp(36px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.02em; }
.way-mult .mult-unit { margin-left: 0.3em; font-size: 0.4em; font-weight: 600; letter-spacing: 0; color: var(--text-2); }
.way h3 { margin: 14px 0 8px; font-family: var(--display); font-weight: 500; font-size: 23px; line-height: 1.15; }
.way p:not(.way-mult) { margin: 0; max-width: 30em; color: var(--text-2); font-size: 17px; line-height: 1.5; }

@media (max-width: 960px) {
  .calc-top { min-height: 0; }
}
@media (max-width: 680px) {
  .ways { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 112px minmax(0, 1fr); }
  .res-actions > * { flex: 1 1 100%; justify-content: center; }
}
