/* Needt Budget — /demo. Loaded after proto.css and landing.css: the page uses the landing's paper,
   type and buttons (lp-*), the phone uses the app's components (nd-*). Page parts are dm-*. */

/* ── page ── */
.dm-intro { max-width: 920px; margin: 0 auto; padding: clamp(48px, 8vh, 96px) var(--lp-gutter) 0; text-align: center; }
.dm-nowrap { white-space: nowrap; }
.dm-intro .lp-lede { margin-left: auto; margin-right: auto; max-width: 36em; }
.dm-stage { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 420px); justify-content: center; align-items: start; gap: clamp(32px, 6vw, 80px); max-width: var(--lp-max); margin: clamp(40px, 6vw, 72px) auto 0; padding: 0 var(--lp-gutter); }
.dm-phone-col { display: grid; justify-items: center; gap: 12px; position: sticky; top: 96px; }
.dm-tries ol { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: dm; }
.dm-tries li { counter-increment: dm; }
.dm-tries button { position: relative; display: grid; gap: 4px; width: 100%; padding: 16px 18px 16px 58px; text-align: left; font: inherit; color: var(--lp-ink); background: var(--lp-cream); border: 2px solid var(--lp-ink); border-radius: 18px; cursor: pointer; transition: transform 160ms var(--lp-ease), box-shadow 160ms var(--lp-ease), background-color 160ms; }
.dm-tries button::before { content: counter(dm); position: absolute; left: 16px; top: 15px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--lp-ink); font-size: 13px; font-weight: 700; }
.dm-tries button:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--lp-ink); }
.dm-tries button[aria-pressed="true"] { background: var(--lp-cyan); }
.dm-tries button[aria-pressed="true"]::before { background: var(--lp-ink); color: var(--lp-cyan); }
.dm-tries b { font-size: 17px; font-weight: 600; }
.dm-tries span { font-size: 15px; line-height: 1.4; color: #33434a; }
.dm-left-out { margin: 22px 0 0; font-size: 15px; line-height: 1.5; color: var(--lp-fog); }
.dm-noscript { margin: 0; font-size: 14px; color: var(--lp-fog); text-align: center; }
.dm-cta { max-width: 1080px; margin: clamp(72px, 10vw, 120px) auto 0; padding: clamp(36px, 6vw, 64px) clamp(24px, 5vw, 64px); border-radius: 28px; width: calc(100% - 2 * var(--lp-gutter)); }
.dm-cta .lp-h { font-size: clamp(40px, 5vw, 64px); }
.dm-cta .lp-lede { margin-top: 16px; max-width: 30em; }
.dm-cta .lp-cta-row { justify-content: flex-start; margin-top: 28px; }
.dm-cta-fine { margin: 14px 0 0; font-size: 14px; color: var(--lp-on-dark-muted); }
.lp-phone-note a { text-decoration: underline; text-underline-offset: 3px; }

/* ── the phone: as wide as the column allows, the 390 × 844 screen scaled to fit (demo.js) ── */
.lp-phone.dm-phone { width: min(100%, 360px); height: auto; padding: 10px; border-radius: 48px; }
.dm-phone .lp-phone-screen { height: auto; aspect-ratio: 390 / 844; border-radius: 38px; }
.dm-host { transform: scale(.872); }

/* ── inside the phone ── */
.dm-tabs { padding: 0 4px; }
.dm-tabs .nd-tab { min-width: 52px; font-size: 10.5px; }
.dm-tabs .nd-fab { flex: none; }
.dm-badge { position: absolute; top: 0; left: 50%; margin-left: 4px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.dm-badge[hidden] { display: none; }
.dm-hint { margin: 12px 0 0; text-align: center; }
.nd-opcard .v .dm-conv { display: block; margin-top: 2px; font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: 0; color: var(--ink-muted); }
.dm-add .nd-amount { padding-top: var(--space-2); }
.dm-add .nd-keys { margin: var(--space-3) 0; }
.dm-add .nd-keys button { height: 48px; }
.dm-add [data-cats] { margin-top: 10px; }
.dm-add [hidden] { display: none; }
.dm-pickrow { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 10px; }
.dm-pickrow .nd-hscroll { margin: 0 calc(-1 * var(--space-5)) 0 0; padding: 0 var(--space-5) 0 0; }
.dm-res [hidden] { display: none !important; }
.dm-res .lpd-row { max-height: none; }
.dm-res .acts .nd-btn { white-space: nowrap; }
.dm-part { display: flex; gap: 8px; align-items: center; padding: 0 0 12px 48px; }
.dm-part .nd-input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; }
.dm-part .nd-input input { width: 100%; min-width: 0; font-size: 16px; font-variant-numeric: tabular-nums; }
.dm-part-cur { color: var(--ink-muted); font-weight: 600; }
.dm-part .nd-btn { height: 40px; padding: 0 14px; font-size: 13px; }
.dm-line { cursor: pointer; border-radius: 12px; }
.dm-line:active { transform: scale(.99); }
.dm-chat { bottom: 214px; }
.dm-chatfoot { bottom: 100px; padding-bottom: 8px; box-shadow: none; background: none; }
.dm-chatfoot .nd-input input { font-size: 16px; }

@media (max-width: 980px) {
  .dm-stage { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .dm-phone-col { position: static; width: 100%; }
  .dm-tries { width: 100%; max-width: 560px; }
}
@media (max-width: 560px) {
  .dm-intro { text-align: left; }
  .dm-phone .lp-phone-screen { border-radius: 34px; }
  .lp-phone.dm-phone { border-radius: 44px; }
  .dm-cta .lp-btn { width: 100%; white-space: normal; text-align: center; height: auto; min-height: 56px; padding-top: 12px; padding-bottom: 12px; line-height: 1.3; }
}
