/* The Leverage Board: a free money tool in the Modern Earner "Atelier" style.
   Builds on me.css tokens. One screen per step on a phone. */

.lb { width: 100%; max-width: 640px; margin: 0 auto; padding: clamp(20px, 4svh, 44px) var(--gutter) 56px; min-height: calc(100dvh - 140px); }
.lb-head { margin-bottom: clamp(16px, 3svh, 28px); }
.lb-step { font: 600 11.5px var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.lb-head .ticks { margin-top: 0; }
.lb-screen { animation: rise 700ms var(--ease) both; }
.lb-screen p { color: var(--ink-2); }

/* Intro */
.lb-title { font-family: var(--serif); font-weight: 500; font-size: clamp(46px, 11vw, 76px); line-height: 0.98; letter-spacing: -0.015em; margin: 10px 0 16px; text-wrap: balance; }
.lb-lede { font-size: clamp(18px, 2.2vw, 20px); line-height: 1.55; max-width: 32ch; }
.lb-facts { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.lb-facts li { padding: 12px 0 12px 26px; border-bottom: 1px solid var(--line); position: relative; font-weight: 600; font-size: 15.5px; }
.lb-facts li::before { content: ''; position: absolute; left: 4px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-radius: 50%; border: 1.5px solid var(--red); }

/* Questions */
.lb-q { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 6.4vw, 40px); line-height: 1.12; margin: 0 0 10px; text-wrap: balance; }
.lb-q:focus { outline: none; }
.lb-note { font-size: 15px; color: var(--muted); margin: 0 0 16px; max-width: 52ch; }
.lb-note b { color: var(--ink); }
.lb-sub { font-weight: 700; color: var(--ink) !important; margin: 26px 0 4px; }
.lb-money { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid #8c8173; border-radius: 14px; padding: 2px 18px; transition: border-color 250ms, box-shadow 250ms; }
.lb-money:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.08); }
.lb-money > span { font-family: var(--serif); font-size: 30px; color: var(--muted); }
.lb-money input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 36px/1.2 var(--serif); padding: 10px 0; font-variant-numeric: tabular-nums; }
.lb-money.is-small > span { font-size: 24px; }
.lb-money.is-small input { font-size: 26px; padding: 8px 0; }
.lb-react { min-height: 1.5em; margin: 12px 0 0; color: var(--red) !important; font-weight: 600; font-size: 15px; }
.lb-hint { font-size: 14.5px; color: var(--muted); margin-top: 12px; }
.lb-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lb-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
@media (max-width: 420px) { .lb-pair { grid-template-columns: 1fr; } }

/* The split bar */
.lb-bar { display: flex; height: 36px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); margin-top: 18px; background: var(--card); }
.lb-bar i { display: flex; align-items: center; justify-content: center; font: 600 12px var(--sans); font-style: normal; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; width: 0; transition: width 600ms var(--ease); }
.lb-bar .spent, .lb-key .spent { background: var(--line-2); color: var(--ink); }
.lb-bar .kept, .lb-key .kept { background: var(--ink); color: var(--bone); }
.lb-bar .leak, .lb-key .leak { background: var(--red-fill); color: #fff; }
.lb-bar i.is-narrow { color: transparent; }
.lb-key { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.lb-key b { font-variant-numeric: tabular-nums; }
.lb-key .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Navigation */
.lb-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: clamp(20px, 3.5svh, 32px); }
.lb-nav .btn { white-space: nowrap; }
.lb-nav .btn-ghost { flex: none; padding-inline: 20px; }
.lb-nav [data-next] { flex: 0 1 260px; }
.lb-nav-start { justify-content: flex-start; }
.lb-nav-start [data-next] { flex: 0 1 300px; }

/* The board */
.lb-verdict { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 8.4vw, 56px); line-height: 1.04; margin: 0 0 10px; text-wrap: balance; }
.lb-verdict:focus, .lb-punch:focus { outline: none; }
.lb-lead { font-size: 17px; }
.lb-vision { font-family: var(--serif); font-size: 21px; line-height: 1.4; color: var(--ink) !important; border-left: 3px solid var(--red); padding-left: 14px; }
.lb-vision b { font-weight: 600; }
.lb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 20px 0; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.lb-stats div { background: var(--card); padding: 14px 12px; }
.lb-stats dt { font: 600 10.5px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.lb-stats dd { margin: 4px 0 0; font: 600 clamp(19px, 4.6vw, 24px) var(--serif); font-variant-numeric: tabular-nums; color: var(--ink); }
.lb-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 18px 0; }
.lb-card h3 { font: 600 11.5px/1.4 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); margin: 0 0 12px; }
.lb-card p { margin: 0; }
.lb-card b { color: var(--ink); }
.lb-card.noir { background: var(--noir); border-color: var(--noir); }
.lb-card.noir h3 { color: var(--rose); }
.lb-card.noir p { color: var(--bone); }
.lb-card.noir b { color: #fff; }
.lb-card .big { font: 500 clamp(38px, 9vw, 50px)/1 var(--serif); color: #fff; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.lb-rungs { list-style: none; margin: 0; padding: 0; }
.lb-rungs li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lb-rungs li:last-child { border-bottom: 0; padding-bottom: 0; }
.lb-rungs .tick { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.lb-rungs .done .tick { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.lb-rungs .here .tick { border-color: var(--red); color: var(--red); }
.lb-rungs b { display: block; font: 600 21px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.lb-rungs small { display: block; font-size: 13px; line-height: 1.45; color: var(--muted); margin-top: 2px; }
.lb-rungs .here small { color: var(--red); font-weight: 600; }

/* What the board can't show */
.lb-punch { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 6.6vw, 44px); line-height: 1.1; margin: 0 0 16px; text-wrap: balance; }
.lb-punch em { color: var(--red); }
.lb-story { margin: 24px 0; padding: 0 0 0 16px; border-left: 3px solid var(--red); }
.lb-story p { font-family: var(--serif); font-size: 21px; line-height: 1.45; color: var(--ink) !important; margin: 0 0 10px; }
.lb-lines { background: var(--paper-2); border-radius: var(--radius); padding: 20px 22px; margin: 24px 0; }
.lb-lines p { margin: 0 0 14px; }
.lb-snap { border: 1px dashed var(--line-2); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; text-align: center; }
.lb-snap b { color: var(--ink); }
.lb-foot { font-size: 12.5px; color: var(--muted) !important; margin-top: 18px; }
.lb ~ .site-footer { margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  .lb-screen { animation: none; }
  .lb-bar i { transition: none; }
}
